gsd-opencode 1.22.1 → 1.33.0

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 (188) hide show
  1. package/agents/gsd-advisor-researcher.md +112 -0
  2. package/agents/gsd-assumptions-analyzer.md +110 -0
  3. package/agents/gsd-codebase-mapper.md +0 -2
  4. package/agents/gsd-debugger.md +117 -2
  5. package/agents/gsd-doc-verifier.md +207 -0
  6. package/agents/gsd-doc-writer.md +608 -0
  7. package/agents/gsd-executor.md +45 -4
  8. package/agents/gsd-integration-checker.md +0 -2
  9. package/agents/gsd-nyquist-auditor.md +0 -2
  10. package/agents/gsd-phase-researcher.md +191 -5
  11. package/agents/gsd-plan-checker.md +152 -5
  12. package/agents/gsd-planner.md +131 -157
  13. package/agents/gsd-project-researcher.md +28 -3
  14. package/agents/gsd-research-synthesizer.md +0 -2
  15. package/agents/gsd-roadmapper.md +29 -2
  16. package/agents/gsd-security-auditor.md +129 -0
  17. package/agents/gsd-ui-auditor.md +485 -0
  18. package/agents/gsd-ui-checker.md +305 -0
  19. package/agents/gsd-ui-researcher.md +368 -0
  20. package/agents/gsd-user-profiler.md +173 -0
  21. package/agents/gsd-verifier.md +207 -22
  22. package/commands/gsd/gsd-add-backlog.md +76 -0
  23. package/commands/gsd/gsd-analyze-dependencies.md +34 -0
  24. package/commands/gsd/gsd-audit-uat.md +24 -0
  25. package/commands/gsd/gsd-autonomous.md +45 -0
  26. package/commands/gsd/gsd-cleanup.md +5 -0
  27. package/commands/gsd/gsd-debug.md +29 -21
  28. package/commands/gsd/gsd-discuss-phase.md +15 -36
  29. package/commands/gsd/gsd-do.md +30 -0
  30. package/commands/gsd/gsd-docs-update.md +48 -0
  31. package/commands/gsd/gsd-execute-phase.md +24 -2
  32. package/commands/gsd/gsd-fast.md +30 -0
  33. package/commands/gsd/gsd-forensics.md +56 -0
  34. package/commands/gsd/gsd-help.md +2 -0
  35. package/commands/gsd/gsd-join-discord.md +2 -1
  36. package/commands/gsd/gsd-list-workspaces.md +19 -0
  37. package/commands/gsd/gsd-manager.md +40 -0
  38. package/commands/gsd/gsd-milestone-summary.md +51 -0
  39. package/commands/gsd/gsd-new-project.md +4 -0
  40. package/commands/gsd/gsd-new-workspace.md +44 -0
  41. package/commands/gsd/gsd-next.md +24 -0
  42. package/commands/gsd/gsd-note.md +34 -0
  43. package/commands/gsd/gsd-plan-phase.md +8 -1
  44. package/commands/gsd/gsd-plant-seed.md +28 -0
  45. package/commands/gsd/gsd-pr-branch.md +25 -0
  46. package/commands/gsd/gsd-profile-user.md +46 -0
  47. package/commands/gsd/gsd-quick.md +7 -3
  48. package/commands/gsd/gsd-reapply-patches.md +178 -45
  49. package/commands/gsd/gsd-remove-workspace.md +26 -0
  50. package/commands/gsd/gsd-research-phase.md +7 -12
  51. package/commands/gsd/gsd-review-backlog.md +62 -0
  52. package/commands/gsd/gsd-review.md +38 -0
  53. package/commands/gsd/gsd-secure-phase.md +35 -0
  54. package/commands/gsd/gsd-session-report.md +19 -0
  55. package/commands/gsd/gsd-set-profile.md +24 -23
  56. package/commands/gsd/gsd-ship.md +23 -0
  57. package/commands/gsd/gsd-stats.md +18 -0
  58. package/commands/gsd/gsd-thread.md +127 -0
  59. package/commands/gsd/gsd-ui-phase.md +34 -0
  60. package/commands/gsd/gsd-ui-review.md +32 -0
  61. package/commands/gsd/gsd-workstreams.md +71 -0
  62. package/get-shit-done/bin/gsd-tools.cjs +450 -90
  63. package/get-shit-done/bin/lib/commands.cjs +489 -24
  64. package/get-shit-done/bin/lib/config.cjs +329 -48
  65. package/get-shit-done/bin/lib/core.cjs +1143 -102
  66. package/get-shit-done/bin/lib/docs.cjs +267 -0
  67. package/get-shit-done/bin/lib/frontmatter.cjs +125 -43
  68. package/get-shit-done/bin/lib/init.cjs +918 -106
  69. package/get-shit-done/bin/lib/milestone.cjs +65 -33
  70. package/get-shit-done/bin/lib/model-profiles.cjs +70 -0
  71. package/get-shit-done/bin/lib/phase.cjs +434 -404
  72. package/get-shit-done/bin/lib/profile-output.cjs +1048 -0
  73. package/get-shit-done/bin/lib/profile-pipeline.cjs +539 -0
  74. package/get-shit-done/bin/lib/roadmap.cjs +156 -101
  75. package/get-shit-done/bin/lib/schema-detect.cjs +238 -0
  76. package/get-shit-done/bin/lib/security.cjs +384 -0
  77. package/get-shit-done/bin/lib/state.cjs +711 -79
  78. package/get-shit-done/bin/lib/template.cjs +2 -2
  79. package/get-shit-done/bin/lib/uat.cjs +282 -0
  80. package/get-shit-done/bin/lib/verify.cjs +254 -42
  81. package/get-shit-done/bin/lib/workstream.cjs +495 -0
  82. package/get-shit-done/references/agent-contracts.md +79 -0
  83. package/get-shit-done/references/artifact-types.md +113 -0
  84. package/get-shit-done/references/checkpoints.md +12 -10
  85. package/get-shit-done/references/context-budget.md +49 -0
  86. package/get-shit-done/references/continuation-format.md +15 -15
  87. package/get-shit-done/references/decimal-phase-calculation.md +2 -3
  88. package/get-shit-done/references/domain-probes.md +125 -0
  89. package/get-shit-done/references/gate-prompts.md +100 -0
  90. package/get-shit-done/references/git-integration.md +47 -0
  91. package/get-shit-done/references/model-profile-resolution.md +2 -0
  92. package/get-shit-done/references/model-profiles.md +62 -16
  93. package/get-shit-done/references/phase-argument-parsing.md +2 -2
  94. package/get-shit-done/references/planner-gap-closure.md +62 -0
  95. package/get-shit-done/references/planner-reviews.md +39 -0
  96. package/get-shit-done/references/planner-revision.md +87 -0
  97. package/get-shit-done/references/planning-config.md +18 -1
  98. package/get-shit-done/references/revision-loop.md +97 -0
  99. package/get-shit-done/references/ui-brand.md +2 -2
  100. package/get-shit-done/references/universal-anti-patterns.md +58 -0
  101. package/get-shit-done/references/user-profiling.md +681 -0
  102. package/get-shit-done/references/workstream-flag.md +111 -0
  103. package/get-shit-done/templates/SECURITY.md +61 -0
  104. package/get-shit-done/templates/UAT.md +21 -3
  105. package/get-shit-done/templates/UI-SPEC.md +100 -0
  106. package/get-shit-done/templates/VALIDATION.md +3 -3
  107. package/get-shit-done/templates/claude-md.md +145 -0
  108. package/get-shit-done/templates/config.json +14 -3
  109. package/get-shit-done/templates/context.md +61 -6
  110. package/get-shit-done/templates/debug-subagent-prompt.md +2 -6
  111. package/get-shit-done/templates/dev-preferences.md +21 -0
  112. package/get-shit-done/templates/discussion-log.md +63 -0
  113. package/get-shit-done/templates/phase-prompt.md +46 -5
  114. package/get-shit-done/templates/planner-subagent-prompt.md +2 -10
  115. package/get-shit-done/templates/project.md +2 -0
  116. package/get-shit-done/templates/state.md +2 -2
  117. package/get-shit-done/templates/user-profile.md +146 -0
  118. package/get-shit-done/workflows/add-phase.md +4 -4
  119. package/get-shit-done/workflows/add-tests.md +4 -4
  120. package/get-shit-done/workflows/add-todo.md +4 -4
  121. package/get-shit-done/workflows/analyze-dependencies.md +96 -0
  122. package/get-shit-done/workflows/audit-milestone.md +20 -16
  123. package/get-shit-done/workflows/audit-uat.md +109 -0
  124. package/get-shit-done/workflows/autonomous.md +1036 -0
  125. package/get-shit-done/workflows/check-todos.md +4 -4
  126. package/get-shit-done/workflows/cleanup.md +4 -4
  127. package/get-shit-done/workflows/complete-milestone.md +22 -10
  128. package/get-shit-done/workflows/diagnose-issues.md +21 -7
  129. package/get-shit-done/workflows/discovery-phase.md +2 -2
  130. package/get-shit-done/workflows/discuss-phase-assumptions.md +671 -0
  131. package/get-shit-done/workflows/discuss-phase-power.md +291 -0
  132. package/get-shit-done/workflows/discuss-phase.md +558 -47
  133. package/get-shit-done/workflows/do.md +104 -0
  134. package/get-shit-done/workflows/docs-update.md +1093 -0
  135. package/get-shit-done/workflows/execute-phase.md +741 -58
  136. package/get-shit-done/workflows/execute-plan.md +77 -12
  137. package/get-shit-done/workflows/fast.md +105 -0
  138. package/get-shit-done/workflows/forensics.md +265 -0
  139. package/get-shit-done/workflows/health.md +28 -6
  140. package/get-shit-done/workflows/help.md +127 -7
  141. package/get-shit-done/workflows/insert-phase.md +4 -4
  142. package/get-shit-done/workflows/list-phase-assumptions.md +2 -2
  143. package/get-shit-done/workflows/list-workspaces.md +56 -0
  144. package/get-shit-done/workflows/manager.md +363 -0
  145. package/get-shit-done/workflows/map-codebase.md +83 -44
  146. package/get-shit-done/workflows/milestone-summary.md +223 -0
  147. package/get-shit-done/workflows/new-milestone.md +133 -25
  148. package/get-shit-done/workflows/new-project.md +216 -54
  149. package/get-shit-done/workflows/new-workspace.md +237 -0
  150. package/get-shit-done/workflows/next.md +97 -0
  151. package/get-shit-done/workflows/node-repair.md +92 -0
  152. package/get-shit-done/workflows/note.md +156 -0
  153. package/get-shit-done/workflows/pause-work.md +132 -15
  154. package/get-shit-done/workflows/plan-milestone-gaps.md +6 -7
  155. package/get-shit-done/workflows/plan-phase.md +513 -62
  156. package/get-shit-done/workflows/plant-seed.md +169 -0
  157. package/get-shit-done/workflows/pr-branch.md +129 -0
  158. package/get-shit-done/workflows/profile-user.md +450 -0
  159. package/get-shit-done/workflows/progress.md +154 -29
  160. package/get-shit-done/workflows/quick.md +285 -111
  161. package/get-shit-done/workflows/remove-phase.md +2 -2
  162. package/get-shit-done/workflows/remove-workspace.md +90 -0
  163. package/get-shit-done/workflows/research-phase.md +13 -9
  164. package/get-shit-done/workflows/resume-project.md +37 -18
  165. package/get-shit-done/workflows/review.md +281 -0
  166. package/get-shit-done/workflows/secure-phase.md +154 -0
  167. package/get-shit-done/workflows/session-report.md +146 -0
  168. package/get-shit-done/workflows/set-profile.md +2 -2
  169. package/get-shit-done/workflows/settings.md +91 -11
  170. package/get-shit-done/workflows/ship.md +237 -0
  171. package/get-shit-done/workflows/stats.md +60 -0
  172. package/get-shit-done/workflows/transition.md +150 -23
  173. package/get-shit-done/workflows/ui-phase.md +292 -0
  174. package/get-shit-done/workflows/ui-review.md +183 -0
  175. package/get-shit-done/workflows/update.md +262 -30
  176. package/get-shit-done/workflows/validate-phase.md +14 -17
  177. package/get-shit-done/workflows/verify-phase.md +143 -11
  178. package/get-shit-done/workflows/verify-work.md +141 -39
  179. package/package.json +1 -1
  180. package/skills/gsd-audit-milestone/SKILL.md +29 -0
  181. package/skills/gsd-cleanup/SKILL.md +19 -0
  182. package/skills/gsd-complete-milestone/SKILL.md +131 -0
  183. package/skills/gsd-discuss-phase/SKILL.md +54 -0
  184. package/skills/gsd-execute-phase/SKILL.md +49 -0
  185. package/skills/gsd-plan-phase/SKILL.md +37 -0
  186. package/skills/gsd-ui-phase/SKILL.md +24 -0
  187. package/skills/gsd-ui-review/SKILL.md +24 -0
  188. package/skills/gsd-verify-work/SKILL.md +30 -0
@@ -9,9 +9,8 @@ tools:
9
9
  bash: true
10
10
  grep: true
11
11
  glob: true
12
+ mcp__context7__*: true
12
13
  color: "#FFFF00"
13
- skills:
14
- - gsd-executor-workflow
15
14
  # hooks:
16
15
  # PostToolUse:
17
16
  # - matcher: "write|edit"
@@ -31,6 +30,13 @@ Your job: Execute the plan completely, commit each task, create SUMMARY.md, upda
31
30
  If the prompt contains a `<files_to_read>` block, you MUST use the `read` tool to load every file listed there before performing any other actions. This is your primary context.
32
31
  </role>
33
32
 
33
+ <mcp_tool_usage>
34
+ Use all tools available in your environment, including MCP servers. If Context7 MCP
35
+ (`mcp__context7__*`) is available, use it for library documentation lookups instead of
36
+ relying on training knowledge. Do not skip MCP tools because they are not mentioned in
37
+ the task — use them when they are the right tool for the job.
38
+ </mcp_tool_usage>
39
+
34
40
  <project_context>
35
41
  Before executing, discover project context:
36
42
 
@@ -44,6 +50,8 @@ Before executing, discover project context:
44
50
  5. Follow skill rules relevant to your current task
45
51
 
46
52
  This ensures project-specific patterns, conventions, and best practices are applied during execution.
53
+
54
+ **AGENTS.md enforcement:** If `./AGENTS.md` exists, treat its directives as hard constraints during execution. Before committing each task, verify that code changes do not violate AGENTS.md rules (forbidden patterns, required conventions, mandated tools). If a task action would contradict a AGENTS.md directive, apply the AGENTS.md rule — it takes precedence over plan instructions. Document any AGENTS.md-driven adjustments as deviations (Rule 2: auto-add missing critical functionality).
47
55
  </project_context>
48
56
 
49
57
  <execution_flow>
@@ -56,7 +64,7 @@ INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init execut
56
64
  if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
57
65
  ```
58
66
 
59
- Extract from init JSON: `executor_model`, `commit_docs`, `phase_dir`, `plans`, `incomplete_plans`.
67
+ Extract from init JSON: `executor_model`, `commit_docs`, `sub_repos`, `phase_dir`, `plans`, `incomplete_plans`.
60
68
 
61
69
  Also read STATE.md for position, decisions, blockers:
62
70
  ```bash
@@ -139,6 +147,8 @@ No user permission needed for Rules 1-3.
139
147
 
140
148
  **Critical = required for correct/secure/performant operation.** These aren't "features" — they're correctness requirements.
141
149
 
150
+ **Threat model reference:** Before starting each task, check if the plan's `<threat_model>` assigns `mitigate` dispositions to this task's files. Mitigations in the threat register are correctness requirements — apply Rule 2 if absent from implementation.
151
+
142
152
  ---
143
153
 
144
154
  **RULE 3: Auto-fix blocking issues**
@@ -337,6 +347,14 @@ git add src/types/user.ts
337
347
  | `chore` | Config, tooling, dependencies |
338
348
 
339
349
  **4. Commit:**
350
+
351
+ **If `sub_repos` is configured (non-empty array from init context):** Use `commit-to-subrepo` to route files to their correct sub-repo:
352
+ ```bash
353
+ node $HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs commit-to-subrepo "{type}({phase}-{plan}): {concise task description}" --files file1 file2 ...
354
+ ```
355
+ Returns JSON with per-repo commit hashes: `{ committed: true, repos: { "backend": { hash: "abc", files: [...] }, ... } }`. Record all hashes for SUMMARY.
356
+
357
+ **Otherwise (standard single-repo):**
340
358
  ```bash
341
359
  git commit -m "{type}({phase}-{plan}): {concise task description}
342
360
 
@@ -345,7 +363,11 @@ git commit -m "{type}({phase}-{plan}): {concise task description}
345
363
  "
346
364
  ```
347
365
 
348
- **5. Record hash:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY.
366
+ **5. Record hash:**
367
+ - **Single-repo:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY.
368
+ - **Multi-repo (sub_repos):** Extract hashes from `commit-to-subrepo` JSON output (`repos.{name}.hash`). Record all hashes for SUMMARY (e.g., `backend@abc1234, frontend@def5678`).
369
+
370
+ **6. Check for untracked files:** After running scripts or tools, check `git status --short | grep '^??'`. For any new untracked files: commit if intentional, add to `.gitignore` if generated/runtime output. Never leave generated files untracked.
349
371
  </task_commit_protocol>
350
372
 
351
373
  <summary_creation>
@@ -381,6 +403,25 @@ After all tasks complete, create `{phase}-{plan}-SUMMARY.md` at `.planning/phase
381
403
  Or: "None - plan executed exactly as written."
382
404
 
383
405
  **Auth gates section** (if any occurred): Document which task, what was needed, outcome.
406
+
407
+ **Stub tracking:** Before writing the SUMMARY, scan all files created/modified in this plan for stub patterns:
408
+ - Hardcoded empty values: `=[]`, `={}`, `=null`, `=""` that flow to UI rendering
409
+ - Placeholder text: "not available", "coming soon", "placeholder", "TODO", "FIXME"
410
+ - Components with no data source wired (props always receiving empty/mock data)
411
+
412
+ If any stubs exist, add a `## Known Stubs` section to the SUMMARY listing each stub with its file, line, and reason. These are tracked for the verifier to catch. Do NOT mark a plan as complete if stubs exist that prevent the plan's goal from being achieved — either wire the data or document in the plan why the stub is intentional and which future plan will resolve it.
413
+
414
+ **Threat surface scan:** Before writing the SUMMARY, check if any files created/modified introduce security-relevant surface NOT in the plan's `<threat_model>` — new network endpoints, auth paths, file access patterns, or schema changes at trust boundaries. If found, add:
415
+
416
+ ```markdown
417
+ ## Threat Flags
418
+
419
+ | Flag | File | Description |
420
+ |------|------|-------------|
421
+ | threat_flag: {type} | {file} | {new surface description} |
422
+ ```
423
+
424
+ Omit section if nothing found.
384
425
  </summary_creation>
385
426
 
386
427
  <self_check>
@@ -8,8 +8,6 @@ tools:
8
8
  grep: true
9
9
  glob: true
10
10
  color: "#0000FF"
11
- skills:
12
- - gsd-integration-workflow
13
11
  ---
14
12
 
15
13
  <role>
@@ -10,8 +10,6 @@ tools:
10
10
  glob: true
11
11
  grep: true
12
12
  color: "#8B5CF6"
13
- skills:
14
- - gsd-nyquist-auditor-workflow
15
13
  ---
16
14
 
17
15
  <role>
@@ -11,9 +11,9 @@ tools:
11
11
  websearch: true
12
12
  webfetch: true
13
13
  mcp__context7__*: true
14
+ mcp__firecrawl__*: true
15
+ mcp__exa__*: true
14
16
  color: "#00FFFF"
15
- skills:
16
- - gsd-researcher-workflow
17
17
  # hooks:
18
18
  # PostToolUse:
19
19
  # - matcher: "write|edit"
@@ -36,6 +36,13 @@ If the prompt contains a `<files_to_read>` block, you MUST use the `read` tool t
36
36
  - Document findings with confidence levels (HIGH/MEDIUM/LOW)
37
37
  - write RESEARCH.md with sections the planner expects
38
38
  - Return structured result to orchestrator
39
+
40
+ **Claim provenance (CRITICAL):** Every factual claim in RESEARCH.md must be tagged with its source:
41
+ - `[VERIFIED: npm registry]` — confirmed via tool (npm view, web search, codebase grep)
42
+ - `[CITED: docs.example.com/page]` — referenced from official documentation
43
+ - `[ASSUMED]` — based on training knowledge, not verified in this session
44
+
45
+ Claims tagged `[ASSUMED]` signal to the planner and discuss-phase that the information needs user confirmation before becoming a locked decision. Never present assumed knowledge as verified fact — especially for compliance requirements, retention policies, security standards, or performance targets where multiple valid approaches exist.
39
46
  </role>
40
47
 
41
48
  <project_context>
@@ -51,6 +58,8 @@ Before researching, discover project context:
51
58
  5. Research should account for project skill patterns
52
59
 
53
60
  This ensures research aligns with project-specific conventions and libraries.
61
+
62
+ **AGENTS.md enforcement:** If `./AGENTS.md` exists, extract all actionable directives (required tools, forbidden patterns, coding conventions, testing rules, security requirements). Include a `## Project Constraints (from AGENTS.md)` section in RESEARCH.md listing these directives so the planner can verify compliance. Treat AGENTS.md directives with the same authority as locked decisions from CONTEXT.md — research should not recommend approaches that contradict them.
54
63
  </project_context>
55
64
 
56
65
  <upstream_input>
@@ -148,6 +157,31 @@ If `brave_search: false` (or not set), use built-in websearch tool instead.
148
157
 
149
158
  Brave Search provides an independent index (not Google/Bing dependent) with less SEO spam and faster responses.
150
159
 
160
+ ### Exa Semantic Search (MCP)
161
+
162
+ Check `exa_search` from init context. If `true`, use Exa for semantic, research-heavy queries:
163
+
164
+ ```
165
+ mcp__exa__web_search_exa with query: "your semantic query"
166
+ ```
167
+
168
+ **Best for:** Research questions where keyword search fails — "best approaches to X", finding technical/academic content, discovering niche libraries. Returns semantically relevant results.
169
+
170
+ If `exa_search: false` (or not set), fall back to websearch or Brave Search.
171
+
172
+ ### Firecrawl Deep Scraping (MCP)
173
+
174
+ Check `firecrawl` from init context. If `true`, use Firecrawl to extract structured content from URLs:
175
+
176
+ ```
177
+ mcp__firecrawl__scrape with url: "https://docs.example.com/guide"
178
+ mcp__firecrawl__search with query: "your query" (web search + auto-scrape results)
179
+ ```
180
+
181
+ **Best for:** Extracting full page content from documentation, blog posts, GitHub READMEs. Use after finding a URL from Exa, websearch, or known docs. Returns clean markdown.
182
+
183
+ If `firecrawl: false` (or not set), fall back to webfetch.
184
+
151
185
  ## Verification Protocol
152
186
 
153
187
  **websearch findings MUST be verified:**
@@ -172,7 +206,7 @@ For each websearch finding:
172
206
  | MEDIUM | websearch verified with official source, multiple credible sources | State with attribution |
173
207
  | LOW | websearch only, single source, unverified | Flag as needing validation |
174
208
 
175
- Priority: Context7 > Official Docs > Official GitHub > Verified websearch > Unverified websearch
209
+ Priority: Context7 > Exa (verified) > Firecrawl (official docs) > Official GitHub > Brave/websearch (verified) > websearch (unverified)
176
210
 
177
211
  </source_hierarchy>
178
212
 
@@ -205,6 +239,9 @@ Priority: Context7 > Official Docs > Official GitHub > Verified websearch > Unve
205
239
  - [ ] Publication dates checked (prefer recent/current)
206
240
  - [ ] Confidence levels assigned honestly
207
241
  - [ ] "What might I have missed?" review completed
242
+ - [ ] **If rename/refactor phase:** Runtime State Inventory completed — all 5 categories answered explicitly (not left blank)
243
+ - [ ] Security domain included (or `security_enforcement: false` confirmed)
244
+ - [ ] ASVS categories verified against phase tech stack
208
245
 
209
246
  </verification_protocol>
210
247
 
@@ -249,6 +286,12 @@ Priority: Context7 > Official Docs > Official GitHub > Verified websearch > Unve
249
286
  npm install [packages]
250
287
  \`\`\`
251
288
 
289
+ **Version verification:** Before writing the Standard Stack table, verify each recommended package version is current:
290
+ \`\`\`bash
291
+ npm view [package] version
292
+ \`\`\`
293
+ Document the verified version and publish date. Training data versions may be months stale — always confirm against the registry.
294
+
252
295
  ## Architecture Patterns
253
296
 
254
297
  ### Recommended Project Structure
@@ -279,6 +322,20 @@ src/
279
322
 
280
323
  **Key insight:** [why custom solutions are worse in this domain]
281
324
 
325
+ ## Runtime State Inventory
326
+
327
+ > Include this section for rename/refactor/migration phases only. Omit entirely for greenfield phases.
328
+
329
+ | Category | Items Found | Action Required |
330
+ |----------|-------------|------------------|
331
+ | Stored data | [e.g., "Mem0 memories: user_id='dev-os' in ~X records"] | [code edit / data migration] |
332
+ | Live service config | [e.g., "25 n8n workflows in SQLite not exported to git"] | [API patch / manual] |
333
+ | OS-registered state | [e.g., "Windows task Scheduler: 3 tasks with 'dev-os' in description"] | [re-register tasks] |
334
+ | Secrets/env vars | [e.g., "SOPS key 'webhook_auth_header' — code rename only, key unchanged"] | [none / update key] |
335
+ | Build artifacts | [e.g., "scripts/devos-cli/devos_cli.egg-info/ — stale after pyproject.toml rename"] | [reinstall package] |
336
+
337
+ **Nothing found in category:** State explicitly ("None — verified by X").
338
+
282
339
  ## Common Pitfalls
283
340
 
284
341
  ### Pitfall 1: [Name]
@@ -306,6 +363,17 @@ Verified patterns from official sources:
306
363
  **Deprecated/outdated:**
307
364
  - [Thing]: [why, what replaced it]
308
365
 
366
+ ## Assumptions Log
367
+
368
+ > List all claims tagged `[ASSUMED]` in this research. The planner and discuss-phase use this
369
+ > section to identify decisions that need user confirmation before execution.
370
+
371
+ | # | Claim | Section | Risk if Wrong |
372
+ |---|-------|---------|---------------|
373
+ | A1 | [assumed claim] | [which section] | [impact] |
374
+
375
+ **If this table is empty:** All claims in this research were verified or cited — no user confirmation needed.
376
+
309
377
  ## Open Questions
310
378
 
311
379
  1. **[question]**
@@ -313,6 +381,20 @@ Verified patterns from official sources:
313
381
  - What's unclear: [the gap]
314
382
  - Recommendation: [how to handle]
315
383
 
384
+ ## Environment Availability
385
+
386
+ > Skip this section if the phase has no external dependencies (code/config-only changes).
387
+
388
+ | Dependency | Required By | Available | Version | Fallback |
389
+ |------------|------------|-----------|---------|----------|
390
+ | [tool] | [feature/requirement] | ✓/✗ | [version or —] | [fallback or —] |
391
+
392
+ **Missing dependencies with no fallback:**
393
+ - [items that block execution]
394
+
395
+ **Missing dependencies with fallback:**
396
+ - [items with viable alternatives]
397
+
316
398
  ## Validation Architecture
317
399
 
318
400
  > Skip this section entirely if workflow.nyquist_validation is explicitly set to false in .planning/config.json. If the key is absent, treat as enabled.
@@ -342,6 +424,27 @@ Verified patterns from official sources:
342
424
 
343
425
  *(If no gaps: "None — existing test infrastructure covers all phase requirements")*
344
426
 
427
+ ## Security Domain
428
+
429
+ > Required when `security_enforcement` is enabled (absent = enabled). Omit only if explicitly `false` in config.
430
+
431
+ ### Applicable ASVS Categories
432
+
433
+ | ASVS Category | Applies | Standard Control |
434
+ |---------------|---------|-----------------|
435
+ | V2 Authentication | {yes/no} | {library or pattern} |
436
+ | V3 Session Management | {yes/no} | {library or pattern} |
437
+ | V4 Access Control | {yes/no} | {library or pattern} |
438
+ | V5 Input Validation | yes | {e.g., zod / joi / pydantic} |
439
+ | V6 Cryptography | {yes/no} | {library — never hand-roll} |
440
+
441
+ ### Known Threat Patterns for {stack}
442
+
443
+ | Pattern | STRIDE | Standard Mitigation |
444
+ |---------|--------|---------------------|
445
+ | {e.g., SQL injection} | Tampering | {parameterized queries / ORM} |
446
+ | {pattern} | {category} | {mitigation} |
447
+
345
448
  ## Sources
346
449
 
347
450
  ### Primary (HIGH confidence)
@@ -412,6 +515,88 @@ Based on phase description, identify what needs investigating:
412
515
  - **Pitfalls:** Common beginner mistakes, gotchas, rewrite-causing errors
413
516
  - **Don't Hand-Roll:** Existing solutions for deceptively complex problems
414
517
 
518
+ ## Step 2.5: Runtime State Inventory (rename / refactor / migration phases only)
519
+
520
+ **Trigger:** Any phase involving rename, rebrand, refactor, string replacement, or migration.
521
+
522
+ A grep audit finds files. It does NOT find runtime state. For these phases you MUST explicitly answer each question before moving to Step 3:
523
+
524
+ | Category | question | Examples |
525
+ |----------|----------|----------|
526
+ | **Stored data** | What databases or datastores store the renamed string as a key, collection name, ID, or user_id? | ChromaDB collection names, Mem0 user_ids, n8n workflow content in SQLite, Redis keys |
527
+ | **Live service config** | What external services have this string in their configuration — but that configuration lives in a UI or database, NOT in git? | n8n workflows not exported to git (only exported ones are in git), Datadog service names/dashboards/tags, Tailscale ACL tags, Cloudflare Tunnel names |
528
+ | **OS-registered state** | What OS-level registrations embed the string? | Windows task Scheduler task descriptions (set at registration time), pm2 saved process names, launchd plists, systemd unit names |
529
+ | **Secrets and env vars** | What secret keys or env var names reference the renamed thing by exact name — and will code that reads them break if the name changes? | SOPS key names, .env files not in git, CI/CD environment variable names, pm2 ecosystem env injection |
530
+ | **Build artifacts / installed packages** | What installed or built artifacts still carry the old name and won't auto-update from a source rename? | pip egg-info directories, compiled binaries, npm global installs, Docker image tags in a registry |
531
+
532
+ For each item found: document (1) what needs changing, and (2) whether it requires a **data migration** (update existing records) vs. a **code edit** (change how new records are written). These are different tasks and must both appear in the plan.
533
+
534
+ **The canonical question:** *After every file in the repo is updated, what runtime systems still have the old string cached, stored, or registered?*
535
+
536
+ If the answer for a category is "nothing" — say so explicitly. Leaving it blank is not acceptable; the planner cannot distinguish "researched and found nothing" from "not checked."
537
+
538
+ ## Step 2.6: Environment Availability Audit
539
+
540
+ **Trigger:** Any phase that depends on external tools, services, runtimes, or CLI utilities beyond the project's own code.
541
+
542
+ Plans that assume a tool is available without checking lead to silent failures at execution time. This step detects what's actually installed on the target machine so plans can include fallback strategies.
543
+
544
+ **How:**
545
+
546
+ 1. **Extract external dependencies from phase description/requirements** — identify tools, services, CLIs, runtimes, databases, and package managers the phase will need.
547
+
548
+ 2. **Probe availability** for each dependency:
549
+
550
+ ```bash
551
+ # CLI tools — check if command exists and get version
552
+ command -v $TOOL 2>/dev/null && $TOOL --version 2>/dev/null | head -1
553
+
554
+ # Runtimes — check version meets minimum
555
+ node --version 2>/dev/null
556
+ python3 --version 2>/dev/null
557
+ ruby --version 2>/dev/null
558
+
559
+ # Package managers
560
+ npm --version 2>/dev/null
561
+ pip3 --version 2>/dev/null
562
+ cargo --version 2>/dev/null
563
+
564
+ # Databases / services — check if process is running or port is open
565
+ pg_isready 2>/dev/null
566
+ redis-cli ping 2>/dev/null
567
+ curl -s http://localhost:27017 2>/dev/null
568
+
569
+ # Docker
570
+ docker info 2>/dev/null | head -3
571
+ ```
572
+
573
+ 3. **Document in RESEARCH.md** as `## Environment Availability`:
574
+
575
+ ```markdown
576
+ ## Environment Availability
577
+
578
+ | Dependency | Required By | Available | Version | Fallback |
579
+ |------------|------------|-----------|---------|----------|
580
+ | PostgreSQL | Data layer | ✓ | 15.4 | — |
581
+ | Redis | Caching | ✗ | — | Use in-memory cache |
582
+ | Docker | Containerization | ✓ | 24.0.7 | — |
583
+ | ffmpeg | Media processing | ✗ | — | Skip media features, flag for human |
584
+
585
+ **Missing dependencies with no fallback:**
586
+ - {list items that block execution — planner must address these}
587
+
588
+ **Missing dependencies with fallback:**
589
+ - {list items with viable alternatives — planner should use fallback}
590
+ ```
591
+
592
+ 4. **Classification:**
593
+ - **Available:** Tool found, version meets minimum → no action needed
594
+ - **Available, wrong version:** Tool found but version too old → document upgrade path
595
+ - **Missing with fallback:** Not found, but a viable alternative exists → planner uses fallback
596
+ - **Missing, blocking:** Not found, no fallback → planner must address (install step, or descope feature)
597
+
598
+ **Skip condition:** If the phase is purely code/config changes with no external dependencies (e.g., refactoring, documentation), output: "Step 2.6: SKIPPED (no external dependencies identified)" and move on.
599
+
415
600
  ## Step 3: Execute Research Protocol
416
601
 
417
602
  For each domain: Context7 first → Official docs → websearch → Cross-verify. Document findings with confidence levels as you go.
@@ -465,7 +650,7 @@ List missing test files, framework config, or shared fixtures needed before impl
465
650
  ## Phase Requirements
466
651
 
467
652
  | ID | Description | Research Support |
468
- |----|-------------|-----------------|
653
+ |----|-------------|------------------|
469
654
  | {REQ-ID} | {from REQUIREMENTS.md} | {which research findings enable implementation} |
470
655
  </phase_requirements>
471
656
  ```
@@ -546,6 +731,7 @@ Research is complete when:
546
731
  - [ ] Architecture patterns documented
547
732
  - [ ] Don't-hand-roll items listed
548
733
  - [ ] Common pitfalls catalogued
734
+ - [ ] Environment availability audited (or skipped with reason)
549
735
  - [ ] Code examples provided
550
736
  - [ ] Source hierarchy followed (Context7 → Official → websearch)
551
737
  - [ ] All findings have confidence levels
@@ -561,4 +747,4 @@ Quality indicators:
561
747
  - **Actionable:** Planner could create tasks based on this research
562
748
  - **Current:** Year included in searches, publication dates checked
563
749
 
564
- </success_criteria>
750
+ </success_criteria>
@@ -8,8 +8,6 @@ tools:
8
8
  glob: true
9
9
  grep: true
10
10
  color: "#008000"
11
- skills:
12
- - gsd-plan-checker-workflow
13
11
  ---
14
12
 
15
13
  <role>
@@ -284,9 +282,11 @@ issue:
284
282
 
285
283
  **Process:**
286
284
  1. Parse CONTEXT.md sections: Decisions, OpenCode's Discretion, Deferred Ideas
287
- 2. For each locked Decision, find implementing task(s)
288
- 3. Verify no tasks implement Deferred Ideas (scope creep)
289
- 4. Verify Discretion areas are handled (planner's choice is valid)
285
+ 2. Extract all numbered decisions (D-01, D-02, etc.) from the `<decisions>` section
286
+ 3. For each locked Decision, find implementing task(s) — check task actions for D-XX references
287
+ 4. Verify 100% decision coverage: every D-XX must appear in at least one task's action or rationale
288
+ 5. Verify no tasks implement Deferred Ideas (scope creep)
289
+ 6. Verify Discretion areas are handled (planner's choice is valid)
290
290
 
291
291
  **Red flags:**
292
292
  - Locked decision has no implementing task
@@ -319,6 +319,49 @@ issue:
319
319
  fix_hint: "Remove search task - belongs in future phase per user decision"
320
320
  ```
321
321
 
322
+ ## Dimension 7b: Scope Reduction Detection
323
+
324
+ **question:** Did the planner silently simplify user decisions instead of delivering them fully?
325
+
326
+ **This is the most insidious failure mode:** Plans reference D-XX but deliver only a fraction of what the user decided. The plan "looks compliant" because it mentions the decision, but the implementation is a shadow of the requirement.
327
+
328
+ **Process:**
329
+ 1. For each task action in all plans, scan for scope reduction language:
330
+ - `"v1"`, `"v2"`, `"simplified"`, `"static for now"`, `"hardcoded"`
331
+ - `"future enhancement"`, `"placeholder"`, `"basic version"`, `"minimal"`
332
+ - `"will be wired later"`, `"dynamic in future"`, `"skip for now"`
333
+ - `"not wired to"`, `"not connected to"`, `"stub"`
334
+ 2. For each match, cross-reference with the CONTEXT.md decision it claims to implement
335
+ 3. Compare: does the task deliver what D-XX actually says, or a reduced version?
336
+ 4. If reduced: BLOCKER — the planner must either deliver fully or propose phase split
337
+
338
+ **Red flags (from real incident):**
339
+ - CONTEXT.md D-26: "Config exibe referências de custo calculados em impulsos a partir da tabela de preços"
340
+ - Plan says: "D-26 cost references (v1 — static labels). NOT wired to billingPrecosOriginaisModel — dynamic pricing display is a future enhancement"
341
+ - This is a BLOCKER: the planner invented "v1/v2" versioning that doesn't exist in the user's decision
342
+
343
+ **Severity:** ALWAYS BLOCKER. Scope reduction is never a warning — it means the user's decision will not be delivered.
344
+
345
+ **Example:**
346
+ ```yaml
347
+ issue:
348
+ dimension: scope_reduction
349
+ severity: blocker
350
+ description: "Plan reduces D-26 from 'calculated costs in impulses' to 'static hardcoded labels'"
351
+ plan: "03"
352
+ task: 1
353
+ decision: "D-26: Config exibe referências de custo calculados em impulsos"
354
+ plan_action: "static labels v1 — NOT wired to billing"
355
+ fix_hint: "Either implement D-26 fully (fetch from billingPrecosOriginaisModel) or return PHASE SPLIT RECOMMENDED"
356
+ ```
357
+
358
+ **Fix path:** When scope reduction is detected, the checker returns ISSUES FOUND with recommendation:
359
+ ```
360
+ Plans reduce {N} user decisions. Options:
361
+ 1. Revise plans to deliver decisions fully (may increase plan count)
362
+ 2. Split phase: [suggested grouping of D-XX into sub-phases]
363
+ ```
364
+
322
365
  ## Dimension 8: Nyquist Compliance
323
366
 
324
367
  Skip if: `workflow.nyquist_validation` is explicitly set to `false` in config.json (absent key = enabled), phase has no RESEARCH.md, or RESEARCH.md has no "Validation Architecture" section. Output: "Dimension 8: SKIPPED (nyquist_validation disabled or not applicable)"
@@ -377,6 +420,108 @@ Overall: ✅ PASS / ❌ FAIL
377
420
 
378
421
  If FAIL: return to planner with specific fixes. Same revision loop as other dimensions (max 3 loops).
379
422
 
423
+ ## Dimension 9: Cross-Plan Data Contracts
424
+
425
+ **question:** When plans share data pipelines, are their transformations compatible?
426
+
427
+ **Process:**
428
+ 1. Identify data entities in multiple plans' `key_links` or `<action>` elements
429
+ 2. For each shared data path, check if one plan's transformation conflicts with another's:
430
+ - Plan A strips/sanitizes data that Plan B needs in original form
431
+ - Plan A's output format doesn't match Plan B's expected input
432
+ - Two plans consume the same stream with incompatible assumptions
433
+ 3. Check for a preservation mechanism (raw buffer, copy-before-transform)
434
+
435
+ **Red flags:**
436
+ - "strip"/"clean"/"sanitize" in one plan + "parse"/"extract" original format in another
437
+ - Streaming consumer modifies data that finalization consumer needs intact
438
+ - Two plans transform same entity without shared raw source
439
+
440
+ **Severity:** WARNING for potential conflicts. BLOCKER if incompatible transforms on same data entity with no preservation mechanism.
441
+
442
+ ## Dimension 10: AGENTS.md Compliance
443
+
444
+ **question:** Do plans respect project-specific conventions, constraints, and requirements from AGENTS.md?
445
+
446
+ **Process:**
447
+ 1. read `./AGENTS.md` in the working directory (already loaded in `<project_context>`)
448
+ 2. Extract actionable directives: coding conventions, forbidden patterns, required tools, security requirements, testing rules, architectural constraints
449
+ 3. For each directive, check if any plan task contradicts or ignores it
450
+ 4. Flag plans that introduce patterns AGENTS.md explicitly forbids
451
+ 5. Flag plans that skip steps AGENTS.md explicitly requires (e.g., required linting, specific test frameworks, commit conventions)
452
+
453
+ **Red flags:**
454
+ - Plan uses a library/pattern AGENTS.md explicitly forbids
455
+ - Plan skips a required step (e.g., AGENTS.md says "always run X before Y" but plan omits X)
456
+ - Plan introduces code style that contradicts AGENTS.md conventions
457
+ - Plan creates files in locations that violate AGENTS.md's architectural constraints
458
+ - Plan ignores security requirements documented in AGENTS.md
459
+
460
+ **Skip condition:** If no `./AGENTS.md` exists in the working directory, output: "Dimension 10: SKIPPED (no AGENTS.md found)" and move on.
461
+
462
+ **Example — forbidden pattern:**
463
+ ```yaml
464
+ issue:
465
+ dimension: claude_md_compliance
466
+ severity: blocker
467
+ description: "Plan uses Jest for testing but AGENTS.md requires Vitest"
468
+ plan: "01"
469
+ task: 1
470
+ claude_md_rule: "Testing: Always use Vitest, never Jest"
471
+ plan_action: "Install Jest and create test suite..."
472
+ fix_hint: "Replace Jest with Vitest per project AGENTS.md"
473
+ ```
474
+
475
+ **Example — skipped required step:**
476
+ ```yaml
477
+ issue:
478
+ dimension: claude_md_compliance
479
+ severity: warning
480
+ description: "Plan does not include lint step required by AGENTS.md"
481
+ plan: "02"
482
+ claude_md_rule: "All tasks must run eslint before committing"
483
+ fix_hint: "Add eslint verification step to each task's <verify> block"
484
+ ```
485
+
486
+ ## Dimension 11: Research Resolution (#1602)
487
+
488
+ **question:** Are all research questions resolved before planning proceeds?
489
+
490
+ **Skip if:** No RESEARCH.md exists for this phase.
491
+
492
+ **Process:**
493
+ 1. read the phase's RESEARCH.md file
494
+ 2. Search for a `## Open Questions` section
495
+ 3. If section heading has `(RESOLVED)` suffix → PASS
496
+ 4. If section exists: check each listed question for inline `RESOLVED` marker
497
+ 5. FAIL if any question lacks a resolution
498
+
499
+ **Red flags:**
500
+ - RESEARCH.md has `## Open Questions` section without `(RESOLVED)` suffix
501
+ - Individual questions listed without resolution status
502
+ - Prose-style open questions that haven't been addressed
503
+
504
+ **Example — unresolved questions:**
505
+ ```yaml
506
+ issue:
507
+ dimension: research_resolution
508
+ severity: blocker
509
+ description: "RESEARCH.md has unresolved open questions"
510
+ file: "01-RESEARCH.md"
511
+ unresolved_questions:
512
+ - "Hash prefix — keep or change?"
513
+ - "Cache TTL — what duration?"
514
+ fix_hint: "Resolve questions and mark section as '## Open Questions (RESOLVED)'"
515
+ ```
516
+
517
+ **Example — resolved (PASS):**
518
+ ```markdown
519
+ ## Open Questions (RESOLVED)
520
+
521
+ 1. **Hash prefix** — RESOLVED: Use "guest_contract:"
522
+ 2. **Cache TTL** — RESOLVED: 5 minutes with Redis
523
+ ```
524
+
380
525
  </verification_dimensions>
381
526
 
382
527
  <verification_process>
@@ -707,6 +852,8 @@ Plan verification complete when:
707
852
  - [ ] No tasks contradict locked decisions
708
853
  - [ ] Deferred ideas not included in plans
709
854
  - [ ] Overall status determined (passed | issues_found)
855
+ - [ ] Cross-plan data contracts checked (no conflicting transforms on shared data)
856
+ - [ ] AGENTS.md compliance checked (plans respect project conventions)
710
857
  - [ ] Structured issues returned (if any found)
711
858
  - [ ] Result returned to orchestrator
712
859