ln-750-commands-generator

L2 Domain Coordinator - Generates project-specific .claude/commands

Main Workflow

stateDiagram-v2 [*] --> Analyze: Start Generation state Analyze { [*] --> ReadProject ReadProject --> DetectScripts DetectScripts --> MapEndpoints MapEndpoints --> [*] } Analyze --> Generate: Context Collected state Generate { [*] --> Templates Templates --> Customize Customize --> Write Write --> [*] Templates: ln-751 Load Templates Customize: Apply Project Variables Write: Write .claude/commands/ } Generate --> [*]: Commands Ready

Command Templates

flowchart TD subgraph Core["Core Commands (Always)"] RC[refresh_context.md] RI[refresh_infrastructure.md] BT[build-and-test.md] end subgraph Optional["Optional Commands"] UT[ui-testing.md] Deploy[deploy.md] DB[database-ops.md] end Detect([Detect Project]) --> Core Detect --> Check{Has UI Tests?} Check -->|Yes| UT Check -->|No| Skip1[Skip] Detect --> Check2{Has Deploy Config?} Check2 -->|Yes| Deploy Check2 -->|No| Skip2[Skip] Detect --> Check3{Has Database?} Check3 -->|Yes| DB Check3 -->|No| Skip3[Skip] classDef core fill:#90EE90 classDef optional fill:#E6E6FA class RC,RI,BT core class UT,Deploy,DB optional

Variable Substitution

flowchart LR Template["Template File"] --> Parser[Variable Parser] subgraph Variables["Detected Variables"] PN["PROJECT_NAME"] FR["FRONTEND_ROOT"] BR["BACKEND_ROOT"] DU["DEV_URL"] TS["TECH_STACK"] end Parser --> PN Parser --> FR Parser --> BR Parser --> DU Parser --> TS PN --> Output["Generated Command"] FR --> Output BR --> Output DU --> Output TS --> Output classDef var fill:#FFD700 class PN,FR,BR,DU,TS var

refresh_context.md Structure

flowchart TD Start([refresh_context.md]) --> Profile[Project Profile Constants] Profile --> Stack[Tech Stack Summary] Stack --> Structure[Project Structure] Structure --> Commands[Available Commands] Commands --> Endpoints[API Endpoints] Endpoints --> Workflows[Common Workflows] classDef section fill:#E6E6FA class Profile,Stack,Structure,Commands,Endpoints,Workflows section