-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
architectureArchitecture and design patternsArchitecture and design patternsbackendblocked-by:#138Blocked by issue #138Blocked by issue #138phase:34-gsd-adapterPhase 34: GSD AdapterPhase 34: GSD Adapter
Milestone
Description
Context
Phase 34 — GSD Adapter, completion. After #138 creates the adapter with utility functions, this issue adds the most valuable new function: selectGsdRoute(issue, projectState) — the routing decision that currently lives implicitly in LLM prompts scattered across run.md (1282 lines). Centralizing it makes the routing logic auditable, testable (Phase 32 test suite can cover it), and consistent across pipeline commands.
What Already Exists
lib/gsd-adapter.cjs— created by Create lib/gsd-adapter.cjs with path resolution and tool invocation #138; has getGsdToolsPath, invokeGsdTool, getTimestamp, generateSlug, resolveModel, historyDigest, roadmapAnalyzecommands/run.md(1282 lines) — routing decision logic is prose in the LLM context: "if quick → quick path, if plan-phase needed → standard path, if diagnose needed → diagnose path"; not a structured functioncommands/milestone.md(952 lines) — milestone execution loop; references pipeline_stage values but has no adapter calls.mgw/active/*.json— issue state files with pipeline_stage, labels, assignees fields used for routing- Pipeline stages: new → triaged → planning → executing → verifying → pr-created → done (plus blocked, failed, diagnosing)
Description
Complete lib/gsd-adapter.cjs by adding selectGsdRoute() and getGsdState(), then update command files to use them.
Technical Approach
- selectGsdRoute(issue, projectState): decision priority: 1. Explicit label (quick, needs-diagnosis), 2. Pipeline stage continuation, 3. Milestone position (first vs subsequent), 4. Default (plan-phase)
- Returns one of: 'quick', 'plan-phase', 'diagnose', 'execute-only', 'verify-only'
- getGsdState(): reads .planning/STATE.md + ROADMAP.md via gsd-tools roadmap analyze; returns { activeMilestone, currentPhase, planCount }
- Update run.md to call selectGsdRoute() in validate_and_load step
- Update milestone.md to call getGsdState() for GSD linkage check
Done When
-
lib/gsd-adapter.cjsexports selectGsdRoute(issue, projectState) returning one of the 5 route strings - selectGsdRoute() decision priority order is documented with inline comments: labels → stage → milestone position → default
-
lib/gsd-adapter.cjsexports getGsdState() returning { activeMilestone, currentPhase, planCount } or null -
commands/run.mdvalidate_and_load step uses selectGsdRoute() to determine execution path -
commands/milestone.mdGSD linkage check uses getGsdState() from adapter
GSD Route
Quick task or GSD Phase 34 plan.
Phase Context
Phase 34 of 36 — GSD Adapter. Issues: #138 (blocks this), #139 (this).
Depends on
#138 — gsd-adapter.cjs must exist with base functions before route selection is added.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
architectureArchitecture and design patternsArchitecture and design patternsbackendblocked-by:#138Blocked by issue #138Blocked by issue #138phase:34-gsd-adapterPhase 34: GSD AdapterPhase 34: GSD Adapter