@hegemonart/get-design-done 1.57.2 → 1.57.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/.claude-plugin/marketplace.json +4 -4
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/CHANGELOG.md +48 -0
  4. package/README.md +1 -1
  5. package/SKILL.md +2 -6
  6. package/connections/cursor.md +0 -1
  7. package/package.json +1 -2
  8. package/reference/skill-graph.md +1 -5
  9. package/scripts/lib/manifest/skills.json +3 -23
  10. package/scripts/lib/worktree-resolve.cjs +4 -16
  11. package/skills/README.md +46 -0
  12. package/skills/bootstrap-ds/SKILL.md +1 -1
  13. package/skills/compare/SKILL.md +1 -1
  14. package/skills/new-cycle/SKILL.md +1 -1
  15. package/skills/peer-cli-customize/SKILL.md +0 -1
  16. package/skills/peers/SKILL.md +1 -1
  17. package/skills/reflect/procedures/capability-gap-scan.md +0 -1
  18. package/skills/report-issue/report-issue-procedure.md +0 -1
  19. package/skills/synthesize/SKILL.md +1 -1
  20. package/skills/turn-closeout/SKILL.md +1 -1
  21. package/dist/claude-code/.claude/skills/add-backlog/SKILL.md +0 -48
  22. package/dist/claude-code/.claude/skills/analyze-dependencies/SKILL.md +0 -95
  23. package/dist/claude-code/.claude/skills/apply-reflections/SKILL.md +0 -109
  24. package/dist/claude-code/.claude/skills/apply-reflections/apply-reflections-procedure.md +0 -170
  25. package/dist/claude-code/.claude/skills/audit/SKILL.md +0 -79
  26. package/dist/claude-code/.claude/skills/bandit-status/SKILL.md +0 -94
  27. package/dist/claude-code/.claude/skills/benchmark/SKILL.md +0 -65
  28. package/dist/claude-code/.claude/skills/bootstrap-ds/SKILL.md +0 -43
  29. package/dist/claude-code/.claude/skills/brief/SKILL.md +0 -145
  30. package/dist/claude-code/.claude/skills/budget/SKILL.md +0 -45
  31. package/dist/claude-code/.claude/skills/cache-manager/SKILL.md +0 -66
  32. package/dist/claude-code/.claude/skills/cache-manager/cache-policy.md +0 -126
  33. package/dist/claude-code/.claude/skills/check-update/SKILL.md +0 -98
  34. package/dist/claude-code/.claude/skills/compare/SKILL.md +0 -82
  35. package/dist/claude-code/.claude/skills/compare/compare-rubric.md +0 -171
  36. package/dist/claude-code/.claude/skills/complete-cycle/SKILL.md +0 -81
  37. package/dist/claude-code/.claude/skills/connections/SKILL.md +0 -71
  38. package/dist/claude-code/.claude/skills/connections/connections-onboarding.md +0 -608
  39. package/dist/claude-code/.claude/skills/context/SKILL.md +0 -137
  40. package/dist/claude-code/.claude/skills/continue/SKILL.md +0 -24
  41. package/dist/claude-code/.claude/skills/darkmode/SKILL.md +0 -76
  42. package/dist/claude-code/.claude/skills/darkmode/darkmode-audit-procedure.md +0 -258
  43. package/dist/claude-code/.claude/skills/debug/SKILL.md +0 -41
  44. package/dist/claude-code/.claude/skills/debug/debug-feedback-loops.md +0 -119
  45. package/dist/claude-code/.claude/skills/design/SKILL.md +0 -118
  46. package/dist/claude-code/.claude/skills/design/design-procedure.md +0 -304
  47. package/dist/claude-code/.claude/skills/discover/SKILL.md +0 -78
  48. package/dist/claude-code/.claude/skills/discover/discover-procedure.md +0 -222
  49. package/dist/claude-code/.claude/skills/discuss/SKILL.md +0 -96
  50. package/dist/claude-code/.claude/skills/do/SKILL.md +0 -45
  51. package/dist/claude-code/.claude/skills/explore/SKILL.md +0 -118
  52. package/dist/claude-code/.claude/skills/explore/explore-procedure.md +0 -267
  53. package/dist/claude-code/.claude/skills/export/SKILL.md +0 -30
  54. package/dist/claude-code/.claude/skills/extract-learnings/SKILL.md +0 -114
  55. package/dist/claude-code/.claude/skills/fast/SKILL.md +0 -91
  56. package/dist/claude-code/.claude/skills/figma-extract/SKILL.md +0 -64
  57. package/dist/claude-code/.claude/skills/figma-write/SKILL.md +0 -50
  58. package/dist/claude-code/.claude/skills/graphify/SKILL.md +0 -49
  59. package/dist/claude-code/.claude/skills/health/SKILL.md +0 -99
  60. package/dist/claude-code/.claude/skills/health/health-mcp-detection.md +0 -44
  61. package/dist/claude-code/.claude/skills/health/health-skill-length-report.md +0 -69
  62. package/dist/claude-code/.claude/skills/help/SKILL.md +0 -87
  63. package/dist/claude-code/.claude/skills/instinct/SKILL.md +0 -111
  64. package/dist/claude-code/.claude/skills/list-assumptions/SKILL.md +0 -61
  65. package/dist/claude-code/.claude/skills/list-pins/SKILL.md +0 -27
  66. package/dist/claude-code/.claude/skills/live/SKILL.md +0 -98
  67. package/dist/claude-code/.claude/skills/locale/SKILL.md +0 -51
  68. package/dist/claude-code/.claude/skills/map/SKILL.md +0 -89
  69. package/dist/claude-code/.claude/skills/migrate/SKILL.md +0 -70
  70. package/dist/claude-code/.claude/skills/migrate-context/SKILL.md +0 -123
  71. package/dist/claude-code/.claude/skills/new-addendum/SKILL.md +0 -81
  72. package/dist/claude-code/.claude/skills/new-cycle/SKILL.md +0 -37
  73. package/dist/claude-code/.claude/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  74. package/dist/claude-code/.claude/skills/new-project/SKILL.md +0 -53
  75. package/dist/claude-code/.claude/skills/new-skill/SKILL.md +0 -90
  76. package/dist/claude-code/.claude/skills/next/SKILL.md +0 -68
  77. package/dist/claude-code/.claude/skills/note/SKILL.md +0 -48
  78. package/dist/claude-code/.claude/skills/openrouter-status/SKILL.md +0 -86
  79. package/dist/claude-code/.claude/skills/optimize/SKILL.md +0 -97
  80. package/dist/claude-code/.claude/skills/override/SKILL.md +0 -86
  81. package/dist/claude-code/.claude/skills/paper-write/SKILL.md +0 -54
  82. package/dist/claude-code/.claude/skills/pause/SKILL.md +0 -77
  83. package/dist/claude-code/.claude/skills/peer-cli-add/SKILL.md +0 -88
  84. package/dist/claude-code/.claude/skills/peer-cli-add/peer-cli-protocol.md +0 -161
  85. package/dist/claude-code/.claude/skills/peer-cli-customize/SKILL.md +0 -90
  86. package/dist/claude-code/.claude/skills/peers/SKILL.md +0 -96
  87. package/dist/claude-code/.claude/skills/pencil-write/SKILL.md +0 -54
  88. package/dist/claude-code/.claude/skills/pin/SKILL.md +0 -37
  89. package/dist/claude-code/.claude/skills/plan/SKILL.md +0 -105
  90. package/dist/claude-code/.claude/skills/plan/plan-procedure.md +0 -278
  91. package/dist/claude-code/.claude/skills/plant-seed/SKILL.md +0 -48
  92. package/dist/claude-code/.claude/skills/pr-branch/SKILL.md +0 -32
  93. package/dist/claude-code/.claude/skills/progress/SKILL.md +0 -107
  94. package/dist/claude-code/.claude/skills/quality-gate/SKILL.md +0 -90
  95. package/dist/claude-code/.claude/skills/quality-gate/threat-modeling.md +0 -101
  96. package/dist/claude-code/.claude/skills/quick/SKILL.md +0 -44
  97. package/dist/claude-code/.claude/skills/reapply-patches/SKILL.md +0 -32
  98. package/dist/claude-code/.claude/skills/recall/SKILL.md +0 -75
  99. package/dist/claude-code/.claude/skills/reflect/SKILL.md +0 -85
  100. package/dist/claude-code/.claude/skills/reflect/procedures/capability-gap-scan.md +0 -120
  101. package/dist/claude-code/.claude/skills/report-issue/SKILL.md +0 -53
  102. package/dist/claude-code/.claude/skills/report-issue/report-issue-procedure.md +0 -120
  103. package/dist/claude-code/.claude/skills/resume/SKILL.md +0 -93
  104. package/dist/claude-code/.claude/skills/review-backlog/SKILL.md +0 -46
  105. package/dist/claude-code/.claude/skills/review-decisions/SKILL.md +0 -42
  106. package/dist/claude-code/.claude/skills/roi/SKILL.md +0 -54
  107. package/dist/claude-code/.claude/skills/rollout-status/SKILL.md +0 -35
  108. package/dist/claude-code/.claude/skills/router/SKILL.md +0 -89
  109. package/dist/claude-code/.claude/skills/router/capability-gap-emitter.md +0 -65
  110. package/dist/claude-code/.claude/skills/router/router-pick-emitter.md +0 -78
  111. package/dist/claude-code/.claude/skills/router/router-rules.md +0 -84
  112. package/dist/claude-code/.claude/skills/scan/SKILL.md +0 -92
  113. package/dist/claude-code/.claude/skills/scan/scan-procedure.md +0 -732
  114. package/dist/claude-code/.claude/skills/settings/SKILL.md +0 -87
  115. package/dist/claude-code/.claude/skills/ship/SKILL.md +0 -48
  116. package/dist/claude-code/.claude/skills/sketch/SKILL.md +0 -78
  117. package/dist/claude-code/.claude/skills/sketch-wrap-up/SKILL.md +0 -92
  118. package/dist/claude-code/.claude/skills/skill-manifest/SKILL.md +0 -79
  119. package/dist/claude-code/.claude/skills/spike/SKILL.md +0 -67
  120. package/dist/claude-code/.claude/skills/spike-wrap-up/SKILL.md +0 -86
  121. package/dist/claude-code/.claude/skills/start/SKILL.md +0 -67
  122. package/dist/claude-code/.claude/skills/start/start-procedure.md +0 -115
  123. package/dist/claude-code/.claude/skills/state/SKILL.md +0 -106
  124. package/dist/claude-code/.claude/skills/stats/SKILL.md +0 -51
  125. package/dist/claude-code/.claude/skills/style/SKILL.md +0 -71
  126. package/dist/claude-code/.claude/skills/style/style-doc-procedure.md +0 -150
  127. package/dist/claude-code/.claude/skills/synthesize/SKILL.md +0 -94
  128. package/dist/claude-code/.claude/skills/timeline/SKILL.md +0 -66
  129. package/dist/claude-code/.claude/skills/todo/SKILL.md +0 -64
  130. package/dist/claude-code/.claude/skills/turn-closeout/SKILL.md +0 -95
  131. package/dist/claude-code/.claude/skills/undo/SKILL.md +0 -31
  132. package/dist/claude-code/.claude/skills/unlock-decision/SKILL.md +0 -54
  133. package/dist/claude-code/.claude/skills/unpin/SKILL.md +0 -31
  134. package/dist/claude-code/.claude/skills/update/SKILL.md +0 -56
  135. package/dist/claude-code/.claude/skills/using-gdd/SKILL.md +0 -78
  136. package/dist/claude-code/.claude/skills/verify/SKILL.md +0 -113
  137. package/dist/claude-code/.claude/skills/verify/verify-procedure.md +0 -511
  138. package/dist/claude-code/.claude/skills/warm-cache/SKILL.md +0 -81
  139. package/dist/claude-code/.claude/skills/watch-authorities/SKILL.md +0 -82
  140. package/dist/claude-code/.claude/skills/zoom-out/SKILL.md +0 -26
  141. package/hooks/run-hook.cmd +0 -35
  142. package/skills/discover/SKILL.md +0 -78
  143. package/skills/discover/discover-procedure.md +0 -222
  144. package/skills/new-cycle/milestone-completeness-rubric.md +0 -87
  145. package/skills/scan/SKILL.md +0 -92
  146. package/skills/scan/scan-procedure.md +0 -732
@@ -1,44 +0,0 @@
1
- ---
2
- name: gdd-quick
3
- description: "Run the pipeline with optional agents skipped for speed. Skips: phase-researcher, design-assumptions-analyzer, design-integration-checker. Keeps: planner, executor, verifier, auditor. Activates for requests involving a lightweight design pass, a fast iteration, or a quick low-ceremony change."
4
- argument-hint: "[--skip <agent-name>] [stage]"
5
- tools: Read, Task
6
- disable-model-invocation: true
7
- ---
8
-
9
- # /gdd:quick
10
-
11
- Fast pipeline run. Skips optional-quality agents for speed while keeping the core decision chain (planner → executor → verifier → auditor) intact.
12
-
13
- ## Default skipped agents
14
-
15
- - `design-phase-researcher` - no external research step
16
- - `design-assumptions-analyzer` - no assumption surfacing
17
- - `design-integration-checker` - skipped (verifier still runs)
18
-
19
- ## Default kept agents
20
-
21
- - `design-planner`, `design-executor`, `design-verifier`, `design-auditor`
22
-
23
- ## Steps
24
-
25
- 1. Parse args:
26
- - Optional stage name (defaults to full pipeline from the current STATE.md position).
27
- - `--skip <agent-name>` (repeatable) adds to the skip list.
28
- 2. Read `.design/STATE.md` to determine entry stage if none was passed.
29
- 3. For each stage to execute, spawn the stage skill with a `quick_mode: true` flag and the effective skip list in the spawn context. Stage skills read this flag and route around the listed agents.
30
- 4. After each stage, print: "Stage <name> done. Skipped: <list>."
31
- 5. Final summary prints which agents were skipped across the full run.
32
-
33
- ## Use When
34
-
35
- - You trust the problem scope (no need for fresh research).
36
- - The project has a mature DESIGN-CONTEXT.md (assumptions already surfaced).
37
- - You want verify + audit coverage without integration-checker overhead.
38
-
39
- ## Do Not Use When
40
-
41
- - First pipeline run in a new project - use the full pipeline.
42
- - Large or cross-cutting changes - skip risks are higher.
43
-
44
- ## QUICK COMPLETE
@@ -1,32 +0,0 @@
1
- ---
2
- name: gdd-reapply-patches
3
- description: "Reapply user modifications to reference/ files after a plugin update. Detects customizations via git diff against pristine baseline."
4
- argument-hint: "[--dry-run]"
5
- tools: Read, Write, Bash
6
- disable-model-invocation: true
7
- ---
8
-
9
- # gdd-reapply-patches
10
-
11
- Re-applies user customizations to `reference/*.md` files after `/gdd:update` resyncs the plugin. Customizations are detected by diffing each `reference/` file against a pristine baseline stored in `.gdd-baseline/`.
12
-
13
- ## Steps
14
-
15
- 1. **Detect baseline** - check for `.gdd-baseline/reference/`. If it does not exist, warn the user and offer to initialize it from the current `reference/` state (no diffs will be generated on this run; the next `/gdd:update` will use the new baseline).
16
- 2. **Generate diffs** - for each `reference/*.md`, run `git diff --no-index .gdd-baseline/reference/<file> reference/<file>` (or plain `diff -u`). Non-empty diffs are candidate user patches.
17
- 3. **Review patches** - for each non-empty diff, print the hunk and ask: `Apply this customization to the updated reference/<file>? (yes/no/view)`. `view` shows the full diff; `yes` queues the patch; `no` skips it.
18
- 4. **Apply** - for each confirmed patch, apply it with `patch -p0` or with a targeted `Edit` call. Log every applied patch.
19
- 5. **Refresh baseline** - after applying, copy the current `reference/*.md` tree into `.gdd-baseline/reference/` to record the new pristine-for-this-user state.
20
- 6. **Dry-run** - if `--dry-run` is passed, perform steps 1–3 but do not apply patches or refresh the baseline.
21
-
22
- ## Design note
23
-
24
- `.gdd-baseline/` is per-install and user-local. It must be gitignored by the host project - it is never committed to the plugin repo.
25
-
26
- ## Output
27
-
28
- End every invocation with:
29
-
30
- ```
31
- ## REAPPLY-PATCHES COMPLETE
32
- ```
@@ -1,75 +0,0 @@
1
- ---
2
- name: gdd-recall
3
- description: "Search cross-cycle memory: decisions, learnings, experience archives. Returns ranked matches."
4
- argument-hint: "<query> [--reindex]"
5
- tools: Read, Write, Bash
6
- disable-model-invocation: true
7
- ---
8
-
9
- @reference/retrieval-contract.md
10
-
11
- # /gdd:recall
12
-
13
- Searches `.design/archive/`, `.design/learnings/LEARNINGS.md`, `.design/CYCLES.md`, and `STATE.md` decision blocks for the given query and returns ranked matches. Uses FTS5 when `better-sqlite3` is available, ripgrep next, Node fs scan as universal fallback.
14
-
15
- ## Steps
16
-
17
- 1. **Parse argument**: extract `<query>` and optional `--reindex` flag.
18
- - If no query and no `--reindex`: print usage and exit.
19
- - If `--reindex` only: rebuild the index (see step 3), then exit.
20
-
21
- 2. **Check backend**: run
22
- ```bash
23
- node -e "const {backendName}=require('./scripts/lib/design-search.cjs');console.log(backendName())"
24
- ```
25
- Print a one-line notice: `Search backend: fts5 | ripgrep | node-grep`.
26
-
27
- 3. **Reindex if requested**: run
28
- ```bash
29
- node -e "require('./scripts/lib/design-search.cjs').reindex(process.cwd())"
30
- ```
31
- Print: "Index rebuilt."
32
-
33
- 4. **Search**: run
34
- ```bash
35
- node -e "
36
- const s=require('./scripts/lib/design-search.cjs');
37
- const r=s.search(process.argv[1], process.cwd(), {limit:20});
38
- console.log(JSON.stringify(r));
39
- " -- "<query>"
40
- ```
41
- Parse the JSON array of `{file, line, text}` objects.
42
-
43
- 5. **Format results**: print in this shape:
44
- ```
45
- ## Recall: "<query>" (N matches, backend: fts5)
46
-
47
- ### 1. .design/archive/cycle-2/EXPERIENCE.md:42
48
- > Decided to skip dark-mode token layer in cycle 2 — cost–benefit did not clear threshold
49
-
50
- ### 2. .design/learnings/LEARNINGS.md:18
51
- > L-03 · color · cited:4 · Color contrast failures cluster around interactive states, not surfaces
52
- ```
53
- Group by file. Truncate text at 120 chars. Cap at 20 results.
54
-
55
- 6. **Signal relevance**: for every result whose text contains an `L-NN` learning ID, record a `surfaced` signal:
56
- ```bash
57
- node -e "
58
- const rc=require('./scripts/lib/relevance-counter.cjs');
59
- rc.record('L-NN','surfaced','.design');
60
- "
61
- ```
62
-
63
- 7. **Empty result**: if no matches, print:
64
- ```
65
- No matches for "<query>" in cross-cycle memory.
66
- Tip: run /gdd:recall --reindex if the archive has been updated since last index build.
67
- ```
68
-
69
- ## Do Not
70
-
71
- - Do not modify any source file.
72
- - Do not run git commands.
73
- - Do not write `.design/STATE.md`.
74
-
75
- ## RECALL COMPLETE
@@ -1,85 +0,0 @@
1
- ---
2
- name: gdd-reflect
3
- description: "Run design-reflector on demand - produces .design/reflections/<cycle-slug>.md with improvement proposals. Review proposals with /gdd:apply-reflections."
4
- argument-hint: "[--dry-run] [--cycle <slug>]"
5
- tools: Read, Write, Task
6
- ---
7
-
8
- @reference/retrieval-contract.md
9
-
10
- # /gdd:reflect
11
-
12
- Run `design-reflector` on demand against the current (or specified) cycle. Produces `.design/reflections/<cycle-slug>.md` with numbered improvement proposals. Every proposal requires explicit user review - nothing is auto-applied.
13
-
14
- ## Steps
15
-
16
- 1. **Parse args**: extract `--dry-run` flag and `--cycle <slug>` value.
17
-
18
- 2. **Resolve cycle slug**:
19
- - If `--cycle <slug>` given: use that slug directly
20
- - Else: read `.design/STATE.md`, extract the active `cycle:` ID from the `<position>` block
21
- - If STATE.md not found: abort with "No .design/STATE.md found. Run `/gdd:new-project` first."
22
-
23
- 3. **Build required-reading list**:
24
- ```
25
- .design/STATE.md
26
- .design/DESIGN-VERIFICATION.md
27
- .design/learnings/*.md (glob)
28
- .design/telemetry/costs.jsonl
29
- .design/agent-metrics.json
30
- .design/learnings/question-quality.jsonl
31
- .design/cycles/<slug>/CYCLE-SUMMARY.md
32
- .design/authority-report.md
33
- ```
34
- Use the resolved slug where `<slug>` appears.
35
-
36
- 3.5. **Optional: capability-gap pre-scan** (Phase 29 Plan 02; runs only if `.design/config.json.reflector.capability_gap_scan_enabled !== false`):
37
- See @skills/reflect/procedures/capability-gap-scan.md for the full procedure.
38
- The `design-reflector` agent runs the scan automatically as part of its reflection pass; this step lets users dry-run it independently with:
39
- ```
40
- node scripts/lib/reflector/capability-gap-scan.cjs --dry-run
41
- ```
42
- The scan emits `capability_gap` events (`source: "reflector_pattern"`) for recurring patterns lacking a dedicated executable owner; Plan 29-03 aggregates these for `/gdd:apply-reflections`.
43
-
44
- 4. **Spawn design-reflector**:
45
- ```
46
- Task("design-reflector", """
47
- <required_reading>
48
- @.design/STATE.md
49
- @.design/DESIGN-VERIFICATION.md
50
- @.design/agent-metrics.json
51
- @.design/telemetry/costs.jsonl
52
- @.design/learnings/question-quality.jsonl
53
- </required_reading>
54
-
55
- Cycle slug: <slug>
56
- Dry-run: <true|false>
57
-
58
- Produce .design/reflections/<slug>.md with all reflection sections and proposals.
59
- If dry-run is true, print proposals to stdout only — do not write the file.
60
- """)
61
- ```
62
-
63
- 5. **After completion**:
64
- - If `--dry-run`: print the agent output directly; skip steps below
65
- - Else: read `.design/reflections/<slug>.md`
66
- - Count proposals by type (scan for `[FRONTMATTER]`, `[REFERENCE]`, `[BUDGET]`, `[QUESTION]`, `[GLOBAL-SKILL]`)
67
- - Print summary:
68
- ```
69
- Reflection complete — cycle: <slug>
70
- Proposals: N total
71
- [FRONTMATTER] N
72
- [REFERENCE] N
73
- [BUDGET] N
74
- [QUESTION] N
75
- [GLOBAL-SKILL] N
76
-
77
- Review and apply: /gdd:apply-reflections
78
- ```
79
-
80
- ## Do Not
81
-
82
- - Do not auto-apply any proposal.
83
- - Do not modify agent files, reference files, or budget.json.
84
- - Do not run the full audit pipeline - this is a standalone reflection run.
85
- - Do not bypass the threshold knob. The default `reflector.capability_gap_threshold: 3` exists to suppress noise; do NOT lower it below 1.
@@ -1,120 +0,0 @@
1
- # Procedure: reflector pattern-detection capability-gap scan
2
-
3
- Run during the reflection pass to detect recurring patterns lacking a dedicated executable owner; emit `capability_gap` events with `source: "reflector_pattern"` (Phase 29 Plan 02) for Plan 29-03 to aggregate.
4
-
5
- ## Inputs
6
-
7
- Three signal sources are scanned. All paths are repo-relative; the scan tolerates absent sources (returns `[]` from that source, no error):
8
-
9
- - `.design/intel/*.md` - Phase 11 intel-store slice files. The scan extracts `Touches:` lines, tokenizes the comma-separated value, and clusters slices that share the same canonical `(sortedTouches, agent_type)` signal.
10
- - `.design/telemetry/posterior.json` - Phase 23.5 bandit posterior file written by `scripts/lib/bandit-router.cjs`. The scan reads `arms[]` and flags arms whose `count >= threshold` AND whose `agent` is in `GENERIC_AGENT_FALLBACKS` (`general-purpose`, `default-executor`, `fallback`, `generic`) OR is not in the project's specialized-agent set.
11
- - `.design/gep/events.jsonl` - Phase 22 typed-causal event chain via `scripts/lib/event-chain.cjs`. The scan filters rows to the last `windowDays` (default 30), groups by `(sortedDecisionRefs, agent)`, and flags sequences that recur ≥ threshold times.
12
-
13
- ## Outputs
14
-
15
- For each qualifying cluster:
16
-
17
- - One `capability_gap` event appended to `.design/gep/events.jsonl` via `appendChainEvent` from `scripts/lib/event-chain.cjs`.
18
- - The event's `payload` carries exactly the 7 fields documented in CONTEXT D-02: `event_id` (UUIDv4), `parent_event_id` (nullable), `source` (`"reflector_pattern"`), `context_hash` (sha256 of normalized signal), `intent_summary` (≤256 chars), `suggested_kind` (`"agent"` | `"skill"`), `evidence_refs[]` (TrajectoryRef pointers with `sha256:` content hash).
19
- - The orchestrator returns `{findings, emittedEventIds, skippedBelowThreshold}` to the caller (the `design-reflector` agent), which cites the event IDs in its run summary under `## Capability gaps emitted`.
20
-
21
- ## Algorithm
22
-
23
- The orchestrator `runCapabilityGapScan(opts)` in `scripts/lib/reflector/capability-gap-scan.cjs` follows four phases:
24
-
25
- 1. **Load threshold.** Resolve in priority order: `opts.threshold` → `.design/config.json` field `reflector.capability_gap_threshold` → `DEFAULT_THRESHOLD` (=3). Throws if the resolved value is non-integer or < 1.
26
- 2. **Build agent inventory.** Read `agents/*.md` frontmatter `name:` fields; partition into specialized vs generic.
27
- 3. **Three scans (parallel-safe in concept; sequential in code for simplicity).** Call `scanIntelTouchesClusters`, `scanPosteriorArms`, `scanTrajectorySlices` and concatenate findings.
28
- 4. **Emit.** For each finding, call the injected `opts.emit` spy (tests) or the default emitter (`defaultEmitCapabilityGapEvent`, which calls `appendChainEvent` from `scripts/lib/event-chain.cjs`). Collect returned `event_id`s.
29
-
30
- Key entry points (all exported from the module):
31
-
32
- - `computeContextHash({touches, agent_type})` - pure deterministic hash (sha256 of normalized JSON; touches are sorted ASCII-asc).
33
- - `scanIntelTouchesClusters({intelDir, existingAgents, threshold, baseDir})`
34
- - `scanPosteriorArms({posteriorPath, specializedAgents, threshold, baseDir})`
35
- - `scanTrajectorySlices({chainPath, windowDays, threshold, specializedAgents, baseDir})`
36
- - `runCapabilityGapScan(opts)` - orchestrator.
37
-
38
- The `context_hash` is the join key for Plan 29-03's aggregation: the same signal across runs produces the same hash regardless of touches-list ordering.
39
-
40
- ## Threshold configuration
41
-
42
- The scan honors `reflector.capability_gap_threshold` in `.design/config.json`. Default `N = 3` (must be integer ≥ 1). Override knob documented in `.design/config.example.json`.
43
-
44
- To raise the threshold (suppress noise):
45
-
46
- ```json
47
- {
48
- "reflector": {
49
- "capability_gap_threshold": 5
50
- }
51
- }
52
- ```
53
-
54
- To dry-run with an injected threshold without writing the config file:
55
-
56
- ```bash
57
- node -e "console.log(JSON.stringify(require('./scripts/lib/reflector/capability-gap-scan.cjs').runCapabilityGapScan({threshold: 5, emit: () => 'DRY'}), null, 2))"
58
- ```
59
-
60
- ## Hard exclusions (D-08)
61
-
62
- MCP-probe failures MUST NOT contribute to any scan. Connection observability is Phase 22's separate surface; mixing those signals into the capability-gap stream would pollute Plan 29-03's clustering.
63
-
64
- The scan filters rows matching ANY of the following three shapes (liberal exclusion):
65
-
66
- - `outcome === 'connection-error'`
67
- - `agent === 'mcp-probe'`
68
- - `mcp_probe: true`
69
-
70
- The exclusion is enforced in `scanTrajectorySlices` via the internal `isMcpProbeRow` predicate (also exported for tests). Tests assert all three exclusion shapes regress separately.
71
-
72
- ## Evidence-refs contract (D-07)
73
-
74
- Each event's `evidence_refs[]` is a list of POINTERS to source slices, never duplicated content. The scan emits items in the schema's `TrajectoryRef` shape:
75
-
76
- ```typescript
77
- interface TrajectoryRef {
78
- trajectory_path: string; // repo-relative path
79
- byte_start: number; // inclusive byte offset
80
- byte_end: number; // exclusive byte offset
81
- content_hash: string; // "sha256:" + 64-hex
82
- }
83
- ```
84
-
85
- Internally, the scan carries a line-based `{path, lineStart, lineEnd, sha256}` shape on each `Finding.evidence_refs`. The `lineRefToTrajectoryRef` translator converts to the schema shape at emit time. The sha256 algorithm: read lines `[lineStart..lineEnd]` (1-based inclusive), join with `'\n'` (no trailing newline - stable across OSes), sha256 the UTF-8 bytes.
86
-
87
- Consumers (Plan 29-03 + audit tooling) re-read the slice and recompute the hash; mismatch = chain mutation; abort + warn.
88
-
89
- ## CLI dry-run
90
-
91
- ```bash
92
- node scripts/lib/reflector/capability-gap-scan.cjs --dry-run
93
- ```
94
-
95
- Runs all three scans against the current working directory and prints findings (and would-be event payloads) without writing to `.design/gep/events.jsonl`. Useful for operator-side inspection of what the design-reflector agent would emit on the next reflection pass.
96
-
97
- Without `--dry-run`, the CLI writes events to the chain file and prints a one-line summary: `emitted N capability_gap event(s); skipped M below threshold`.
98
-
99
- ## Testing
100
-
101
- Tests live at `tests/reflector-capability-gap.test.cjs` and run on synthetic in-tmpdir fixtures only (D-11 - no live writes to real `.design/`). Each test passes an injected `emit` spy so no real `appendChainEvent` calls occur. The hash-pin mutation-detection regression is enforced by a dedicated test: re-read the pointed-to slice, recompute the sha256, and assert mismatch after the source file is mutated.
102
-
103
- Run the tests directly:
104
-
105
- ```bash
106
- node --test tests/reflector-capability-gap.test.cjs
107
- ```
108
-
109
- Run the full suite to verify no regressions in `tests/reflection-proposal.test.cjs` or `tests/reflector-cross-runtime.test.cjs`:
110
-
111
- ```bash
112
- npm test
113
- ```
114
-
115
- ## See also
116
-
117
- - `reference/schemas/events.schema.json` - the `capability_gap` event class shipped by Plan 29-01 (the 7-field shape + `TrajectoryRef` definition).
118
- - `scripts/lib/event-chain.cjs` - `appendChainEvent` (the real emitter API; 29-01 did NOT ship a separate helper file).
119
- - `scripts/lib/bandit-router.cjs` - Phase 23.5 posterior file producer (the source for scan #2).
120
- - `.planning/phases/29-capability-gap-self-authoring/CONTEXT.md` - phase decisions (D-02 7-field shape, D-07 hash-pinning, D-08 MCP carve-out, D-11 tmpdir tests).
@@ -1,53 +0,0 @@
1
- ---
2
- name: report-issue
3
- description: "Consent-gated GitHub issue reporter for /gdd. Triages locally against `reference/known-failure-modes.md`, layers Phase 22 secret-redaction with Phase 30 pseudonymization, drafts the payload to `.design/issue-drafts/`, opens `$EDITOR` for inspection, and submits via the user's `gh` CLI to a hardcoded repo only after explicit per-issue consent. Use when the user runs `/gdd:report-issue`, hits a failure on a whitelisted command with the `--report` flag, or asks to file a bug against get-design-done."
4
- argument-hint: "[<command-name>] [--force-report]"
5
- tools: Read, Write, Grep, Bash
6
- ---
7
-
8
- # /gdd:report-issue
9
-
10
- Local-first, consent-gated GitHub issue reporter. No auto-mode. Destination repo is hardcoded. The full step-by-step lives in [report-issue-procedure.md](./report-issue-procedure.md); this file is the entry contract.
11
-
12
- ## Pre-flight
13
-
14
- If invoked without an error context (the user just typed `/gdd:report-issue` cold), ask in one round-trip: *"What command failed and what was the error?"* Capture command name + a paraphrase of the error. Don't interrogate - one short answer is enough to feed the triage matcher.
15
-
16
- ## Steps
17
-
18
- 0. **Kill-switch** (D-08). Call `isDisabled()` from `scripts/lib/issue-reporter/kill-switch.cjs` FIRST. Either env (`GDD_DISABLE_ISSUE_REPORTER=1`) OR config (`.design/config.json` with `{ "issue_reporter": false }`) makes the command unavailable. Surface the disable line via `getDisableReason()` ('env' wins when both set) and stop. No draft, no triage, no payload. `/gdd:health` mirrors the same line for at-a-glance verification.
19
- 1. **Triage**. Call `matchKnownFailure(errorContext)` from `scripts/lib/issue-reporter/triage-matcher.cjs` (Plan 30-03). If `matched === true` and `--force-report` is NOT set: print the suggested diagnosis + remedy, stop. Do NOT write a draft. (D-07)
20
- 2. **Assemble**. Call `assemble(commandName, errorContext, trajectoryRef?, capabilityGapEvent?)` from `scripts/lib/issue-reporter/payload-assembly.cjs` (Plan 30-02). This layers Phase 22 redact → Phase 30 pseudonymize, computes the fingerprint, and renders bilingual disclaimer + sections.
21
- 3. **Draft**. Call `writeDraft({title, body, fingerprint})` from `scripts/lib/issue-reporter/draft-writer.cjs`. Print the absolute path: `Draft written to .design/issue-drafts/<timestamp>-<fp8>.md`. The file persists across decline - the user keeps their work either way. (D-04)
22
- 4. **Dedup** (D-06). Call `searchByFingerprint(fingerprint, {destination})` from `scripts/lib/issue-reporter/dedup.cjs`. If `degraded === true` show a one-line warning and fall through to Step 5. If `matches.length === 0` fall through to Step 5 unchanged. If `matches.length >= 1` render the dedup UI listing each `{number,title,url}` with three actions per match: **`+1`** → `react(n, {destination})` (no new issue, D-06), **`me-too`** → `commentMeToo(n, {destination, errorContext, runtime, pluginVersion})` body is EXACTLY 3 fields (last error line, runtime, plugin version) from the ALREADY-pseudonymized 30-02 pipeline (D-01), **`new`** → fall through to Step 5 with the prepared draft despite the match.
23
- 5. **Edit**. If `$EDITOR` is set, the consent prompt opens it on the draft and blocks until exit. Otherwise the path is printed and the user can open it manually. `EDITOR` is the only env var the report flow reads.
24
- 6. **Consent**. Call `promptConsent({draftPath})` from `scripts/lib/issue-reporter/consent-prompt.cjs`. Re-reads the (possibly edited) draft from disk, prints a summary, asks `Submit this issue to hegemonart/get-design-done? [y/N]`. Anything other than `y`/`yes` declines. (D-03)
25
- - Throws if `process.stdin.isTTY` is false (no auto-mode).
26
- - Throws if any `process.env` key matching `/REPORT|ISSUE|AUTO_REPORT/i` is set to a truthy value.
27
- 7. **Submit**. On `y`, call `submitViaGh({title, body})` from `scripts/lib/issue-reporter/gh-submit.cjs`. This spawns `gh issue create --repo hegemonart/get-design-done --title <title> --body-file <tmp>`. Destination is hardcoded; no env var or flag can redirect it. (D-02 + D-05)
28
- 8. **gh-absent fallback** (D-10). If `detectGh()` from `scripts/lib/issue-reporter/gh-absent-fallback.cjs` returns false BEFORE Step 7 runs: call `runFallback(consent.finalBody)` to copy the (already-pseudonymized) payload to the clipboard via the platform's clipboard command (`pbcopy` on macOS, `wl-copy`/`xclip` on Linux, `clip.exe` on Windows) and print the message `gh CLI not found; payload copied to clipboard, paste into the link below.` followed by the issue-template URL. The draft persists on disk for re-submission once `gh` is installed.
29
-
30
- ## Use through `--report`
31
-
32
- Whitelisted to specific commands via `scripts/lib/issue-reporter/cli-flag-report.cjs`. Only `gdd:plan-phase`, `gdd:execute-phase`, and `gdd:report-issue` itself install the flag - and only when `reference/known-failure-modes.md` has at least one `propose_report: true` entry. Non-whitelisted commands silently do not see the flag. (D-11)
33
-
34
- ## Use through `--force-report`
35
-
36
- Available on `/gdd:report-issue`. Overrides the triage gate (Step 1) but does NOT override consent. The user still gets the draft + consent prompt. There is no path to submit without an explicit `y`.
37
-
38
- ## Privacy contract
39
-
40
- - **Pseudonymization, not anonymization.** Disclaimer (Russian + English) is rendered at the top of the payload by Plan 30-02. Side-channel content (writing style, code patterns) may still re-identify. The user reviews the exact bytes before consenting.
41
- - **No auto-mode, no env-var bypass.** Static tests (`tests/report-issue-no-auto-submit-static.test.cjs`) fail the build if anyone adds a `process.env.*REPORT*`/`*ISSUE*`/`*AUTO_REPORT*` read here or under `scripts/lib/issue-reporter/`. Runtime check in `consent-prompt.cjs` is the second layer.
42
- - **Hardcoded destination.** `scripts/lib/issue-reporter/destination.cjs` is the only file that contains the literal repo string; it exports a frozen object so runtime tampering throws. Static tests enforce both invariants.
43
- - **No HTTPS, no fetch.** Submission goes through the user's `gh` CLI only. Plan 30-07 ships a CI gate that fails the build if any network primitive is added here.
44
-
45
- ## Troubleshooting
46
-
47
- - **`gh` not authenticated.** The submission step fails with a clear error pointing to the draft path. Run `gh auth login` and re-invoke `/gdd:report-issue` - the draft survives.
48
- - **No `EDITOR` set.** The path is printed; open it in whatever editor you prefer, save, then return to the consent prompt.
49
- - **Triage matched something irrelevant.** Pass `--force-report` to bypass the gate. Consent is still required.
50
- - **`gh` not installed (D-10).** After consent, the payload is copied to your clipboard and an issue-template URL is printed. Paste into the URL to file manually. Install `gh` later and the existing draft can be re-submitted.
51
- - **Command unavailable / disabled (D-08).** Run `/gdd:health`. The `issue reporter:` line shows the active disable surface - either `disabled by env (GDD_DISABLE_ISSUE_REPORTER=1)` or `disabled by config (.design/config.json: issue_reporter=false)`. Unset the env var or flip the config key to re-enable.
52
-
53
- See [report-issue-procedure.md](./report-issue-procedure.md) for the full procedure with rationale per decision (D-02, D-03, D-04, D-05, D-07, D-11).
@@ -1,120 +0,0 @@
1
- # `/gdd:report-issue` - Full Procedure
2
-
3
- Long-form companion to [SKILL.md](./SKILL.md). Phase 28.5 keeps SKILL.md ≤100 lines; step-by-step + rationale live here.
4
-
5
- ## Architecture
6
-
7
- The report flow is the only outbound path the plugin offers. Every byte leaving the user's machine via this surface:
8
-
9
- 1. has been redacted for secrets (Phase 22 `redact.cjs`),
10
- 2. has been pseudonymized for identity (Plan 30-01 `pseudonymize.cjs`),
11
- 3. has been written to disk where the user can read it,
12
- 4. has cleared a pre-submit dedup check against the destination repo (Plan 30-05) - `+1` and `me-too` on a matching existing issue NEVER spawn a duplicate (D-06),
13
- 5. has been read back from disk after the user closed the editor, and
14
- 6. has cleared an explicit per-issue `y/N` prompt.
15
-
16
- No environment variable, command-line flag, or build configuration bypasses any of these steps. Two test layers enforce this:
17
-
18
- - **Static** (`tests/report-issue-destination-static.test.cjs`, `tests/report-issue-no-auto-submit-static.test.cjs`) - fail the build on any forbidden code pattern in `skills/report-issue/` or `scripts/lib/issue-reporter/`.
19
- - **Runtime** (`tests/report-issue.test.cjs`) - 26 cases proving the orchestrator threads consent + persistence + edit-before-submit + triage + hardcoded destination + flag whitelist.
20
-
21
- ## Steps
22
-
23
- ### Step 1 - Triage gate (D-07)
24
-
25
- `matchKnownFailure(errorContext)` regex-matches `error.message + error.stack` against `reference/known-failure-modes.md`. If matched, prints diagnosis + remedy and exits without writing a draft. `--force-report` overrides the gate but does NOT override consent.
26
-
27
- ### Step 2 - Assemble payload (D-01)
28
-
29
- `assemble(commandName, errorContext, trajectoryRef?, capabilityGapEvent?)` returns markdown. Order is locked: redact → pseudonymize (Case 9 of 30-02 enforces). Bilingual disclaimer at top: "Это псевдонимизация, не анонимизация" / "This is pseudonymization, not anonymization." Fingerprint computed on the scrubbed stack so the same bug from different cwd's hashes the same.
30
-
31
- ### Step 3 - Write draft (D-04)
32
-
33
- `writeDraft({title, body, fingerprint})` writes to `.design/issue-drafts/<YYYYMMDDTHHMMSSZ>-<fp8>.md`. The file has a small HTML-comment header (timestamp, destination, full fingerprint) so a future maintainer with a corrupted-looking draft can reconstruct provenance. The file is NOT deleted on decline - the user keeps their work.
34
-
35
- ### Step 4 - Pre-submit dedup (D-06)
36
-
37
- `scripts/lib/issue-reporter/dedup.cjs` exports `searchByFingerprint(fingerprint, {destination})` which spawns `gh issue list --search "fingerprint:<hash>" --json number,title,url --repo <destination>` (read-only). Resolves `{matches: [...], degraded?, reason?}` - NEVER throws on gh failure.
38
-
39
- Routing:
40
-
41
- - `matches.length === 0` (no existing issue) **or** `degraded === true` (search unavailable; surface a one-line warning) → fall through to Step 5 with the prepared draft.
42
- - `matches.length >= 1` → render the dedup UI listing each `{number, title, url}` with three actions per match:
43
-
44
- - **`+1`** → `react(n, {destination})` spawns `gh api -X POST /repos/<destination>/issues/<n>/reactions -f content=+1`. Resolves `{ok:true}`; exits the report flow on success ("reaction recorded on #<n>"). **NO new issue is created** (D-06).
45
- - **`me-too`** → `commentMeToo(n, {destination, errorContext, runtime, pluginVersion})` spawns `gh issue comment <n> --repo <destination> --body <body>`. The body contains EXACTLY three fields (`Last error:`, `Runtime:`, `Plugin version:`) - nothing more (negative-presence tested). `errorContext.lastErrorLine` is the ALREADY-pseudonymized last error line from 30-02's payload pipeline (D-01); dedup.cjs does NOT re-derive raw stderr. Exits the report flow on success ("comment added to #<n>"). **NO new issue is created** (D-06).
46
- - **`new`** → fall through to Step 5 with the prepared draft despite the match (user explicitly opted to force a new issue).
47
-
48
- `+1` and `me-too` failures (auth/network/rate) propagate as rejected promises with annotated `.reason` so the caller can offer retry/cancel - they do NOT silently fall back to creating a new issue (that would defeat dedup intent).
49
-
50
- Wiring: `runReportFlow` calls `options.dedupCheck({fingerprint, title})` BEFORE the consent prompt (`report-flow.cjs` STEP 4). The skill drives the `+1`/`me-too`/`new` UI by passing a `dedupCheck` callback that wraps `searchByFingerprint` + the `react`/`commentMeToo` calls. Returning truthy `existing` from the callback short-circuits `runReportFlow` to `{submitted:false, reason:'duplicate'}`. Returning falsy continues to Step 5.
51
-
52
- ### Step 5 - Edit (optional)
53
-
54
- If `$EDITOR` is set, `promptConsent` spawns it on the draft path and blocks until exit. Otherwise the user opens it manually. `EDITOR` is a POSIX convention (git, crontab, gh all use it); the static-grep test only forbids env-var reads matching `/REPORT|ISSUE|AUTO_REPORT/i`.
55
-
56
- ### Step 6 - Consent prompt (D-03)
57
-
58
- The single submission gate for the new-issue path. Three preconditions must hold:
59
-
60
- 1. `process.stdin.isTTY === true`.
61
- 2. No env var matches `/REPORT|ISSUE|AUTO_REPORT/i` with a truthy value (`rejectBypassEnv` throws otherwise, naming the offender).
62
- 3. The draft file exists and is readable.
63
-
64
- The function prints a summary (destination, draft path, title, first 10 body lines), asks `Submit this issue to hegemonart/get-design-done? [y/N]` via `readline`, treats anything other than `y`/`yes` (case-insensitive, trimmed) as decline, and **re-reads the draft from disk** so user edits in Step 5 are picked up.
65
-
66
- (The `+1` / `me-too` paths from Step 4 do NOT pass through this consent prompt - selecting either action in the dedup UI IS the explicit consent for that minimal interaction. The new-issue path always passes through this prompt.)
67
-
68
- ### Step 7 - Submit via `gh` (D-05 + D-02)
69
-
70
- `submitViaGh({title, body})` spawns:
71
-
72
- ```bash
73
- gh issue create --repo hegemonart/get-design-done --title <title> --body-file <tmp/body.md>
74
- ```
75
-
76
- Body is written to a tmp file to avoid arg-length and shell-escaping. URL parsed from stdout. No HTTPS, no fetch, no third-party packages - only the user's `gh` CLI with their credentials.
77
-
78
- ## The `--report` flag (D-11)
79
-
80
- `cli-flag-report.cjs` whitelists three commands today: `gdd:plan-phase`, `gdd:execute-phase`, `gdd:report-issue`. The whitelist intersects with `listProposeReportModes()`; if the catalogue has zero `propose_report: true` entries, the flag disables everywhere. `installReportFlagOn(parser, commandName)` is a no-op for non-whitelisted commands; `parseReportFlag` returns `{report: false}` regardless of argv.
81
-
82
- ## Privacy guarantees
83
-
84
- | Layer | Guarantee | Enforced by |
85
- |---|---|---|
86
- | Static code | No `process.env.*REPORT*`/`*ISSUE*`/`*AUTO_REPORT*` reads in the report tree | `report-issue-no-auto-submit-static.test.cjs` |
87
- | Static string | Only `destination.cjs` may contain the literal repo string | `report-issue-destination-static.test.cjs` |
88
- | Static flag | No `--yes` / `--no-confirm` / `--auto-confirm` / `--auto-submit` strings | `report-issue-no-auto-submit-static.test.cjs` |
89
- | Runtime frozen | `DESTINATION_REPO` reassignment throws | static test S3 + behavioural H2 |
90
- | Runtime env | `rejectBypassEnv` throws on truthy forbidden env var | `report-issue.test.cjs` B1, U1 |
91
- | Runtime TTY | `promptConsent` throws on `!stdin.isTTY` | C5 |
92
- | Runtime consent | Only `y`/`yes` accepted | C1..C3, U3 |
93
- | Runtime re-read | `promptConsent` re-reads draft before returning final body | E1, E2 |
94
- | Runtime destination | `submitViaGh` always passes `--repo hegemonart/get-design-done` | H1 |
95
- | Dedup destination | `dedup.cjs` accepts `destination` only as a parameter - no env/config lookup (D-02) | `issue-reporter-dedup.test.cjs` test 11 |
96
- | Dedup body shape | `buildMeTooBody` returns EXACTLY 3 lines (`Last error:` / `Runtime:` / `Plugin version:`) - no stack/path/env/cmd (D-06) | tests 5 + 6 (verbatim + negative-presence) |
97
- | Dedup network | `dedup.cjs` imports only `child_process`; no outbound URL literals, no global fetch primitive, no third-party HTTP client libraries (D-05) | 30-07 static-grep gate |
98
- | Dedup test hermeticity | No live `gh` calls in CI; injected spawn spy + traced `child_process.spawnSync` counter assert 0 real invocations (D-13) | `issue-reporter-dedup.test.cjs` test 10 |
99
- | Dedup pseudonymization | `me-too` body uses the ALREADY-pseudonymized `errorContext.lastErrorLine` from 30-02's pipeline; dedup.cjs does NOT re-derive raw stderr (D-01) | dedup test "commentMeToo passes pseudonymized lastErrorLine through to gh body" |
100
-
101
- ## Troubleshooting
102
-
103
- - **`gh` not authenticated**: submission throws with status + stderr; draft path preserved. Run `gh auth login`, retry. (T-30-04-08 accepted)
104
- - **`EDITOR` spawns wrong tool**: set `EDITOR=<your-editor>` in shell rc.
105
- - **Triage matched something irrelevant**: pass `--force-report`. Consent still required.
106
- - **TTY refused (CI / non-interactive)**: by design - run locally. (T-30-04-05 mitigated)
107
- - **No `--report` flag on a command you expected**: not on the whitelist; file an issue via this flow describing the use case.
108
-
109
- ## Forward-looking hooks
110
-
111
- - **Plan 30-05** *(landed)* - `scripts/lib/issue-reporter/dedup.cjs` wires `options.dedupCheck` to `gh issue list --search "fingerprint:<hash>"`. The skill drives the `+1` / `me-too` / `new` UI by passing a `dedupCheck` callback that wraps `searchByFingerprint` + `react` + `commentMeToo`. The hook in `runReportFlow` now runs BEFORE consent (per D-06).
112
- - **Plan 30-06** *(landed)* - `scripts/lib/issue-reporter/kill-switch.cjs` adds the D-08 dual-surface disable check (`GDD_DISABLE_ISSUE_REPORTER=1` env OR `.design/config.json: { "issue_reporter": false }` config). `runReportFlow` calls `isDisabled()` as **Step 0**, BEFORE triage and any draft writing - when disabled, returns `{ submitted:false, reason:'disabled', surface:'env'|'config', message }`. `scripts/lib/issue-reporter/gh-absent-fallback.cjs` adds the D-10 clipboard+URL path (pbcopy / wl-copy → xclip / clip.exe) - invoked after consent when `detectGh()` returns false. `scripts/lib/gsd-health-mirror/index.cjs` mirrors the disable surface as a 5th health check; output is exactly one of: `issue reporter: enabled` / `issue reporter: disabled by env (GDD_DISABLE_ISSUE_REPORTER=1)` / `issue reporter: disabled by config (.design/config.json: issue_reporter=false)`. Tests at `tests/issue-reporter-fallback.test.cjs` (15 cases). Env wins precedence when both flags are set (matches gsd-health display).
113
- - **Plan 30-07** ships the network-isolation CI gate. Plans 30-04 and 30-05 already meet the invariant (no outbound URL literals, no global fetch primitive, no third-party HTTP client libraries - see `tests/issue-reporter-network-isolation.test.cjs` for the enforced forbidden-token list); the gate locks it in.
114
-
115
- ## References
116
-
117
- - [SKILL.md](./SKILL.md) - entry contract.
118
- - `reference/pseudonymization-rules.md` - full R1..R8 rule catalog (Plan 30-01).
119
- - `reference/known-failure-modes.md` - triage catalogue (Plan 30-03).
120
- - `.planning/phases/30-issue-reporter/CONTEXT.md` - phase decisions D-01..D-15.
@@ -1,93 +0,0 @@
1
- ---
2
- name: gdd-resume
3
- description: "Restore session context from a numbered checkpoint. Lists available checkpoints when no argument given."
4
- argument-hint: "[<N>]"
5
- tools: Read, Write, Bash, Glob, AskUserQuestion, mcp__gdd_state__get, mcp__gdd_state__set_status, mcp__gdd_state__resolve_blocker, mcp__gdd_state__checkpoint, mcp__gdd_status, mcp__gdd_phase_current, mcp__gdd_plans_list, mcp__gdd_decisions_list
6
- disable-model-invocation: true
7
- ---
8
-
9
- @reference/retrieval-contract.md
10
- @reference/cycle-handoff-preamble.md
11
-
12
- # /gdd:resume
13
-
14
- Inverse of `/gdd:pause`. Reads a checkpoint file, prints a clear "you were here" summary, and routes to the next command.
15
-
16
- ## Step 0 - Prime cycle context
17
-
18
- Two paths - MCP preferred when available, file-read fallback otherwise. This runs BEFORE checkpoint restoration so the "you were here" summary has full cycle context (phase, plans, decisions).
19
-
20
- ### MCP path (preferred)
21
-
22
- When `mcp__gdd_status` is exposed (Phase 27.7+, registered via `npx @hegemonart/get-design-done --register-mcp`):
23
-
24
- 1. Call `mcp__gdd_status` (no args) → `{phase, branch, last_decisions, last_completed_plans, blocker_count}`. One call replaces reading STATE.md + parsing frontmatter + extracting decisions.
25
- 2. Call `mcp__gdd_cycle_recap` (no args) → diff vs last cycle snapshot. Critical for session-restoration context: what changed since you paused?
26
- 3. Call `mcp__gdd_decisions_list` (no args) → full D-XX list with rationale. Use for the "decisions you made" line in the resume summary.
27
- 4. (Optional) Call `mcp__gdd_plans_list` (no args) → current phase plans + status, to identify next incomplete plan.
28
-
29
- Three to four MCP calls = full resume priming (~5s, ~32k tokens - Storybloq benchmark). Proceed to Step 1.
30
-
31
- ### File-read path (fallback)
32
-
33
- When MCP tools are not available:
34
-
35
- 1. `Read .design/STATE.md` and parse the frontmatter + `<position>`, `<decisions>`, `<plans>` sections. Extract `cycle`, `branch`, `last N decisions`, `completed plans`.
36
- 2. Also `Read .design/CYCLES.md` (if present) to see prior cycle state for the recap.
37
- 3. Proceed to Step 1.
38
-
39
- This path loads the same context in 3–5 file reads (~60s, ~46.5k tokens - file-reading baseline).
40
-
41
- ## Steps
42
-
43
- 1. **Parse argument**:
44
- - If argument is a number N → restore checkpoint N.
45
- - If no argument → list available checkpoints and ask which to restore (see step 2).
46
-
47
- 2. **List mode** (no argument):
48
- ```bash
49
- ls .design/checkpoints/ 2>/dev/null | sort -n
50
- ```
51
- If empty, fall back to reading `.design/HANDOFF.md` (legacy single-slot format).
52
- If checkpoints exist, present the list and ask (AskUserQuestion):
53
- "Which checkpoint would you like to restore? (enter number, or press Enter for the latest)"
54
- Use the answer (or latest if Enter pressed) as N.
55
-
56
- 3. **Read checkpoint**: load `.design/checkpoints/NN-*.md`. If not found, try `.design/HANDOFF.md` as legacy fallback.
57
-
58
- 4. **Check paused status via MCP**: call `mcp__gdd_state__get` and inspect `status`. If it does **not** start with `paused:`, print "No pause to resume" and exit - the prior session was not paused via `/gdd:pause`, so there is nothing to restore.
59
-
60
- 5. **Restore prior status via MCP**: parse the prior status from the `paused:<prior>` prefix. Call `mcp__gdd_state__set_status` with `status: <prior>` to restore the pre-pause state.
61
-
62
- 6. **Clear the pause blocker**: optionally call `mcp__gdd_state__resolve_blocker` to clear the pause-related blocker (match by text containing "paused"). Skip if no such blocker exists.
63
-
64
- 7. **Stamp last_checkpoint via MCP**: call `mcp__gdd_state__checkpoint`.
65
-
66
- 8. **Print summary** in this exact shape:
67
- ```
68
- Checkpoint NN restored.
69
- Saved: <timestamp>
70
- You were: <in-progress description>
71
- Next step: <next>
72
- Active sketch: <path or none>
73
- Open todos: <N>
74
- ```
75
-
76
- 9. **Staleness check**: compare mtime of `.design/` artifacts vs `src/` via Bash `stat` when available. If `src/` has commits newer than the checkpoint timestamp, warn:
77
- "Source has changed since checkpoint NN - consider re-running explore or verify."
78
-
79
- 10. **Route recommendation** based on checkpoint `Stage:` field:
80
- - `brief` → "Run `/gdd:brief`"
81
- - `explore` → "Run `/gdd:explore`"
82
- - `plan` → "Run `/gdd:plan`"
83
- - `design` → "Run `/gdd:design` to continue"
84
- - `verify` → "Run `/gdd:verify`"
85
-
86
- ## Do Not
87
-
88
- - Do not delete checkpoint files.
89
- - Do not mutate STATE.md directly - all STATE.md writes go through the `gdd-state` MCP tools above.
90
- - Do not auto-execute the next command - just recommend.
91
- - Do not call `mcp__gdd_state__transition_stage` - resume restores prior status without moving the pipeline.
92
-
93
- ## RESUME COMPLETE