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.
49 lines
2.1 KiB
Markdown
49 lines
2.1 KiB
Markdown
---
|
|
name: gsd:docs-update
|
|
description: Generate or update project documentation verified against the codebase
|
|
argument-hint: "[--force] [--verify-only]"
|
|
allowed-tools:
|
|
- Read
|
|
- Write
|
|
- Edit
|
|
- Bash
|
|
- Glob
|
|
- Grep
|
|
- Task
|
|
- AskUserQuestion
|
|
---
|
|
<objective>
|
|
Generate and update up to 9 documentation files for the current project. Each doc type is written by a gsd-doc-writer subagent that explores the codebase directly — no hallucinated paths, phantom endpoints, or stale signatures.
|
|
|
|
Flag handling rule:
|
|
- The optional flags documented below are available behaviors, not implied active behaviors
|
|
- A flag is active only when its literal token appears in `$ARGUMENTS`
|
|
- If a documented flag is absent from `$ARGUMENTS`, treat it as inactive
|
|
- `--force`: skip preservation prompts, regenerate all docs regardless of existing content or GSD markers
|
|
- `--verify-only`: check existing docs for accuracy against codebase, no generation (full verification requires Phase 4 verifier)
|
|
- If `--force` and `--verify-only` both appear in `$ARGUMENTS`, `--force` takes precedence
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@~/.claude/get-shit-done/workflows/docs-update.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
Arguments: $ARGUMENTS
|
|
|
|
**Available optional flags (documentation only — not automatically active):**
|
|
- `--force` — Regenerate all docs. Overwrites hand-written and GSD docs alike. No preservation prompts.
|
|
- `--verify-only` — Check existing docs for accuracy against the codebase. No files are written. Reports VERIFY marker count. Full codebase fact-checking requires the gsd-doc-verifier agent (Phase 4).
|
|
|
|
**Active flags must be derived from `$ARGUMENTS`:**
|
|
- `--force` is active only if the literal `--force` token is present in `$ARGUMENTS`
|
|
- `--verify-only` is active only if the literal `--verify-only` token is present in `$ARGUMENTS`
|
|
- If neither token appears, run the standard full-phase generation flow
|
|
- Do not infer that a flag is active just because it is documented in this prompt
|
|
</context>
|
|
|
|
<process>
|
|
Execute end-to-end.
|
|
Preserve all workflow gates (preservation_check, flag handling, wave execution, monorepo dispatch, commit, reporting).
|
|
</process>
|