ADR-0002: commands/gsd/*.md contract now enforced at two layers: LINT (scripts/lint-command-contract.cjs — new CI step): - name: present, starts with gsd: or gsd- - description: non-empty - allowed-tools: non-empty, all entries canonical - execution_context @-refs: resolve on disk, no trailing prose on same line - handles both @~/ and $HOME/ path prefixes TEST (tests/command-contract.test.cjs — 361 assertions): - Behavioral contract for all 65 command files - Replaces scattered coverage in enh-2790 + bug-3135 - Per-command per-rule test — one failure names the exact file + rule CI (.github/workflows/test.yml): - 'Lint — command contract (ADR-0002)' step added to lint-tests job PROSE @-REF CLEANUP (39 command files, ~900 tokens/invocation recovered): - Removed redundant @~/.claude/get-shit-done/... paths from <process> prose - execution_context block is now the single authoritative load declaration - Routing commands (sketch, spike, update, pause-work, etc.) keep routing instructions; only the inert path token is stripped WORKFLOW EXTRACTION (debug.md + thread.md, ~15,000 chars / ~3,750 tokens): - get-shit-done/workflows/debug.md: full process extracted from commands/gsd/debug.md - get-shit-done/workflows/thread.md: full process extracted from commands/gsd/thread.md - Command files reduced to frontmatter + objective + execution_context + context - debug.md: 9,603 → 1,703 chars; thread.md: 7,868 → 585 chars RENAME: - get-shit-done/workflows/extract_learnings.md → extract-learnings.md (aligns with hyphen convention of all other workflow files) DOCS: - docs/INVENTORY.md: count 85→87, new rows, rename row, fix add-todo --backlog attribution - docs/INVENTORY-MANIFEST.json: +debug.md +thread.md +extract-learnings.md -extract_learnings.md Closes ADR-0002 implementation.
63 lines
2.4 KiB
Markdown
63 lines
2.4 KiB
Markdown
---
|
|
name: gsd:spec-phase
|
|
description: Clarify WHAT a phase delivers with ambiguity scoring; produces a SPEC.md before discuss-phase.
|
|
argument-hint: "<phase> [--auto] [--text]"
|
|
allowed-tools:
|
|
- Read
|
|
- Write
|
|
- Bash
|
|
- Glob
|
|
- Grep
|
|
- AskUserQuestion
|
|
---
|
|
|
|
<objective>
|
|
Clarify phase requirements through structured Socratic questioning with quantitative ambiguity scoring.
|
|
|
|
**Position in workflow:** `spec-phase → discuss-phase → plan-phase → execute-phase → verify`
|
|
|
|
**How it works:**
|
|
1. Load phase context (PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md)
|
|
2. Scout the codebase — understand current state before asking questions
|
|
3. Run Socratic interview loop (up to 6 rounds, rotating perspectives)
|
|
4. Score ambiguity across 4 weighted dimensions after each round
|
|
5. Gate: ambiguity ≤ 0.20 AND all dimensions meet minimums → write SPEC.md
|
|
6. Commit SPEC.md — discuss-phase picks it up automatically on next run
|
|
|
|
**Output:** `{phase_dir}/{padded_phase}-SPEC.md` — falsifiable requirements that lock "what/why" before discuss-phase handles "how"
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@~/.claude/get-shit-done/workflows/spec-phase.md
|
|
@~/.claude/get-shit-done/templates/spec.md
|
|
</execution_context>
|
|
|
|
<runtime_note>
|
|
**Copilot (VS Code):** Use `vscode_askquestions` wherever this workflow calls `AskUserQuestion`. They are equivalent.
|
|
</runtime_note>
|
|
|
|
<context>
|
|
Phase number: $ARGUMENTS (required)
|
|
|
|
**Flags:**
|
|
- `--auto` — Skip interactive questions; Claude selects recommended defaults and writes SPEC.md
|
|
- `--text` — Use plain-text numbered lists instead of TUI menus (required for `/rc` remote sessions)
|
|
|
|
Context files are resolved in-workflow using `init phase-op`.
|
|
</context>
|
|
|
|
<process>
|
|
Execute end-to-end.
|
|
|
|
**MANDATORY:** Read the workflow file BEFORE taking any action. The workflow contains the complete step-by-step process including the Socratic interview loop, ambiguity scoring gate, and SPEC.md generation. Do not improvise from the objective summary above.
|
|
</process>
|
|
|
|
<success_criteria>
|
|
- Codebase scouted for current state before questioning begins
|
|
- All 4 ambiguity dimensions scored after each interview round
|
|
- Gate passed: ambiguity ≤ 0.20 AND all dimension minimums met
|
|
- SPEC.md written with falsifiable requirements, explicit boundaries, and acceptance criteria
|
|
- SPEC.md committed atomically
|
|
- User knows they can now run /gsd-discuss-phase which will load SPEC.md automatically
|
|
</success_criteria>
|