@opengsd/gsd-core 1.4.2 → 1.5.0-rc.1

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 (153) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +3 -3
  3. package/agents/gsd-executor.md +1 -1
  4. package/agents/gsd-plan-checker.md +11 -2
  5. package/agents/gsd-planner.md +11 -7
  6. package/agents/gsd-verifier.md +3 -3
  7. package/bin/install.js +947 -149
  8. package/commands/gsd/autonomous.md +5 -1
  9. package/commands/gsd/ns-manage.md +8 -1
  10. package/commands/gsd/ns-project.md +5 -0
  11. package/commands/gsd/ns-review.md +4 -1
  12. package/commands/gsd/ns-workflow.md +7 -1
  13. package/commands/gsd/plan-review-convergence.md +6 -5
  14. package/commands/gsd/surface.md +12 -5
  15. package/gemini-extension.json +1 -1
  16. package/gsd-core/bin/gsd-tools.cjs +198 -101
  17. package/gsd-core/bin/lib/audit-command-router.cjs +61 -0
  18. package/gsd-core/bin/lib/capability-registry.cjs +417 -0
  19. package/gsd-core/bin/lib/capability-state.cjs +336 -0
  20. package/gsd-core/bin/lib/cli-exit.cjs +22 -3
  21. package/gsd-core/bin/lib/config-loader.cjs +716 -0
  22. package/gsd-core/bin/lib/configuration.cjs +4 -34
  23. package/gsd-core/bin/lib/core-utils.cjs +198 -0
  24. package/gsd-core/bin/lib/core.cjs +57 -1817
  25. package/gsd-core/bin/lib/federated-config.cjs +182 -0
  26. package/gsd-core/bin/lib/graphify-command-router.cjs +74 -0
  27. package/gsd-core/bin/lib/init.cjs +58 -12
  28. package/gsd-core/bin/lib/install-profiles.cjs +157 -3
  29. package/gsd-core/bin/lib/installer-migrations/004-prune-stale-pristine-snapshots.cjs +123 -0
  30. package/gsd-core/bin/lib/intel-command-router.cjs +116 -0
  31. package/gsd-core/bin/lib/io.cjs +167 -0
  32. package/gsd-core/bin/lib/loop-host-contract.cjs +105 -0
  33. package/gsd-core/bin/lib/loop-resolver.cjs +460 -0
  34. package/gsd-core/bin/lib/model-resolver.cjs +426 -0
  35. package/gsd-core/bin/lib/phase-id.cjs +215 -0
  36. package/gsd-core/bin/lib/phase-locator.cjs +148 -0
  37. package/gsd-core/bin/lib/profile-pipeline.cjs +2 -2
  38. package/gsd-core/bin/lib/roadmap-parser.cjs +443 -0
  39. package/gsd-core/bin/lib/roadmap.cjs +4 -1
  40. package/gsd-core/bin/lib/runtime-artifact-layout.cjs +96 -9
  41. package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +2 -1
  42. package/gsd-core/bin/lib/runtime-homes.cjs +40 -0
  43. package/gsd-core/bin/lib/runtime-name-policy.cjs +1 -0
  44. package/gsd-core/bin/lib/shell-command-projection.cjs +13 -0
  45. package/gsd-core/bin/lib/state.cjs +114 -2
  46. package/gsd-core/bin/lib/surface.cjs +66 -14
  47. package/gsd-core/bin/lib/verify.cjs +1 -1
  48. package/gsd-core/bin/shared/model-catalog.json +5 -0
  49. package/gsd-core/bin/shared/runtime-aliases.manifest.json +3 -0
  50. package/gsd-core/bin/verify-reapply-patches.cjs +57 -7
  51. package/gsd-core/references/planner-reviews.md +5 -2
  52. package/gsd-core/templates/phase-prompt.md +7 -7
  53. package/gsd-core/templates/project.md +19 -2
  54. package/gsd-core/templates/summary-complex.md +1 -0
  55. package/gsd-core/templates/summary-minimal.md +1 -0
  56. package/gsd-core/templates/summary-standard.md +1 -0
  57. package/gsd-core/templates/summary.md +1 -0
  58. package/gsd-core/workflows/_runtime-launcher.snippet.sh +1 -1
  59. package/gsd-core/workflows/add-backlog.md +1 -1
  60. package/gsd-core/workflows/add-phase.md +1 -1
  61. package/gsd-core/workflows/add-tests.md +1 -1
  62. package/gsd-core/workflows/add-todo.md +1 -1
  63. package/gsd-core/workflows/ai-integration-phase.md +1 -1
  64. package/gsd-core/workflows/audit-fix.md +1 -1
  65. package/gsd-core/workflows/audit-milestone.md +1 -1
  66. package/gsd-core/workflows/audit-uat.md +1 -1
  67. package/gsd-core/workflows/autonomous.md +86 -15
  68. package/gsd-core/workflows/check-todos.md +1 -1
  69. package/gsd-core/workflows/cleanup.md +1 -1
  70. package/gsd-core/workflows/code-review-fix.md +6 -4
  71. package/gsd-core/workflows/code-review.md +3 -2
  72. package/gsd-core/workflows/complete-milestone.md +11 -5
  73. package/gsd-core/workflows/debug.md +1 -1
  74. package/gsd-core/workflows/diagnose-issues.md +1 -1
  75. package/gsd-core/workflows/discuss-phase/modes/advisor.md +1 -1
  76. package/gsd-core/workflows/discuss-phase/modes/auto.md +1 -1
  77. package/gsd-core/workflows/discuss-phase/modes/chain.md +1 -1
  78. package/gsd-core/workflows/discuss-phase-assumptions.md +1 -1
  79. package/gsd-core/workflows/discuss-phase.md +8 -1
  80. package/gsd-core/workflows/do.md +1 -1
  81. package/gsd-core/workflows/docs-update.md +1 -1
  82. package/gsd-core/workflows/edit-phase.md +1 -1
  83. package/gsd-core/workflows/eval-review.md +4 -1
  84. package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +1 -1
  85. package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +1 -1
  86. package/gsd-core/workflows/execute-phase.md +8 -1
  87. package/gsd-core/workflows/execute-plan.md +1 -1
  88. package/gsd-core/workflows/explore.md +1 -1
  89. package/gsd-core/workflows/extract-learnings.md +1 -1
  90. package/gsd-core/workflows/forensics.md +1 -1
  91. package/gsd-core/workflows/graduation.md +1 -1
  92. package/gsd-core/workflows/health.md +1 -1
  93. package/gsd-core/workflows/help/modes/full.md +1 -1
  94. package/gsd-core/workflows/import.md +1 -1
  95. package/gsd-core/workflows/ingest-docs.md +1 -1
  96. package/gsd-core/workflows/insert-phase.md +1 -1
  97. package/gsd-core/workflows/list-workspaces.md +1 -1
  98. package/gsd-core/workflows/manager.md +1 -1
  99. package/gsd-core/workflows/map-codebase.md +1 -1
  100. package/gsd-core/workflows/milestone-summary.md +1 -1
  101. package/gsd-core/workflows/mvp-phase.md +1 -1
  102. package/gsd-core/workflows/new-milestone.md +1 -1
  103. package/gsd-core/workflows/new-project.md +1 -1
  104. package/gsd-core/workflows/new-workspace.md +1 -1
  105. package/gsd-core/workflows/next.md +1 -1
  106. package/gsd-core/workflows/pause-work.md +1 -1
  107. package/gsd-core/workflows/plan-milestone-gaps.md +1 -1
  108. package/gsd-core/workflows/plan-phase.md +27 -2
  109. package/gsd-core/workflows/plan-review-convergence.md +76 -63
  110. package/gsd-core/workflows/plant-seed.md +1 -1
  111. package/gsd-core/workflows/profile-user.md +1 -1
  112. package/gsd-core/workflows/progress.md +1 -1
  113. package/gsd-core/workflows/quick.md +2 -2
  114. package/gsd-core/workflows/reapply-patches.md +18 -1
  115. package/gsd-core/workflows/remove-phase.md +1 -1
  116. package/gsd-core/workflows/remove-workspace.md +1 -1
  117. package/gsd-core/workflows/resume-project.md +1 -1
  118. package/gsd-core/workflows/review.md +1 -1
  119. package/gsd-core/workflows/scan.md +1 -1
  120. package/gsd-core/workflows/secure-phase.md +1 -1
  121. package/gsd-core/workflows/settings-advanced.md +1 -1
  122. package/gsd-core/workflows/settings-integrations.md +1 -1
  123. package/gsd-core/workflows/settings.md +1 -1
  124. package/gsd-core/workflows/ship.md +8 -1
  125. package/gsd-core/workflows/sketch-wrap-up.md +1 -1
  126. package/gsd-core/workflows/sketch.md +1 -1
  127. package/gsd-core/workflows/spec-phase.md +1 -1
  128. package/gsd-core/workflows/spike-wrap-up.md +1 -1
  129. package/gsd-core/workflows/spike.md +1 -1
  130. package/gsd-core/workflows/stats.md +1 -1
  131. package/gsd-core/workflows/thread.md +1 -1
  132. package/gsd-core/workflows/transition.md +1 -1
  133. package/gsd-core/workflows/ui-phase.md +1 -1
  134. package/gsd-core/workflows/ui-review.md +1 -1
  135. package/gsd-core/workflows/ultraplan-phase.md +1 -1
  136. package/gsd-core/workflows/update.md +20 -15
  137. package/gsd-core/workflows/validate-phase.md +1 -1
  138. package/gsd-core/workflows/verify-phase.md +1 -1
  139. package/gsd-core/workflows/verify-work.md +8 -1
  140. package/package.json +7 -2
  141. package/scripts/base64-scan.sh +1 -1
  142. package/scripts/changeset/cli.cjs +9 -2
  143. package/scripts/changeset/lint.cjs +38 -2
  144. package/scripts/ci-test-scope.cjs +21 -10
  145. package/scripts/gen-capability-registry.cjs +1808 -0
  146. package/scripts/gen-loop-host-contract.cjs +471 -0
  147. package/scripts/lint-regression-test-names.allowlist.json +269 -0
  148. package/scripts/lint-regression-test-names.cjs +117 -0
  149. package/scripts/lint-test-file-count.allowlist.json +12 -4
  150. package/scripts/prompt-injection-scan.sh +4 -4
  151. package/scripts/run-tests.cjs +79 -16
  152. package/scripts/secret-scan.sh +3 -3
  153. package/scripts/run-cross-platform-tests.cjs +0 -67
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gsd-core",
3
3
  "displayName": "GSD Core",
4
- "version": "1.4.2",
4
+ "version": "1.5.0-rc.1",
5
5
  "description": "GSD Core is a meta-prompting, context engineering, and spec-driven development system for AI coding agents.",
6
6
  "author": {
7
7
  "name": "open-gsd",
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  **English** · [Português](README.pt-BR.md) · [简体中文](README.zh-CN.md) · [日本語](README.ja-JP.md) · [한국어](README.ko-KR.md)
8
8
 
9
- **A light-weight meta-prompting, context engineering, and spec-driven development system for Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, Cursor, Windsurf, and more.**
9
+ **A light-weight meta-prompting, context engineering, and spec-driven development system for Claude Code, OpenCode, Gemini CLI, Kimi CLI, Kilo, Codex, Copilot, Cursor, Windsurf, and more.**
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/%40opengsd%2Fgsd-core?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@opengsd/gsd-core)
12
12
  [![npm downloads](https://img.shields.io/npm/dm/%40opengsd%2Fgsd-core?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@opengsd/gsd-core)
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## What is GSD Core
23
23
 
24
- GSD Core is a context-engineering and spec-driven development framework that drives AI coding agents (Claude Code, Codex, Gemini CLI, Copilot, Cursor, and more) through a disciplined phase loop. It solves [context rot](docs/explanation/context-engineering.md) — the quality degradation that accumulates as an AI fills its context window — by running all heavy research, planning, and execution work in fresh-context subagents while keeping your main session lean.
24
+ GSD Core is a context-engineering and spec-driven development framework that drives AI coding agents (Claude Code, Codex, Gemini CLI, Kimi CLI, Copilot, Cursor, and more) through a disciplined phase loop. It solves [context rot](docs/explanation/context-engineering.md) — the quality degradation that accumulates as an AI fills its context window — by running all heavy research, planning, and execution work in fresh-context subagents while keeping your main session lean.
25
25
 
26
26
  ---
27
27
 
@@ -43,7 +43,7 @@ Each milestone repeats the same five-step loop, one phase at a time:
43
43
  npx @opengsd/gsd-core@latest
44
44
  ```
45
45
 
46
- The installer prompts for your runtime (Claude Code, OpenCode, Gemini CLI, Kilo, Codex, Copilot, Cursor, Windsurf, and more) and whether to install globally or locally. The installer is required for cross-runtime compatibility — do not copy files from `agents/` or `commands/` directly.
46
+ The installer prompts for your runtime (Claude Code, OpenCode, Gemini CLI, Kimi CLI, Kilo, Codex, Copilot, Cursor, Windsurf, and more) and whether to install globally or locally. The installer is required for cross-runtime compatibility — do not copy files from `agents/` or `commands/` directly.
47
47
 
48
48
  On another runtime or without Node.js? See [Install on your runtime](docs/how-to/install-on-your-runtime.md).
49
49
 
@@ -604,7 +604,7 @@ This file is the canonical output of this step. The orchestrator reads `.plannin
604
604
 
605
605
  **Use template:** @~/.claude/gsd-core/templates/summary.md
606
606
 
607
- **Frontmatter:** phase, plan, subsystem, tags, dependency graph (requires/provides/affects), tech-stack (added/patterns), key-files (created/modified), decisions, metrics (duration, completed date).
607
+ **Frontmatter:** phase, plan, subsystem, tags, dependency graph (requires/provides/affects), tech-stack (added/patterns), key-files (created/modified), decisions, metrics (duration, completed date), status (`status: complete` — required so the audit-open scanner recognises the summary as done).
608
608
 
609
609
  **Title:** `# Phase [X] Plan [Y]: [Name] Summary`
610
610
 
@@ -76,6 +76,15 @@ If CONTEXT.md exists, add verification dimension: **Context Compliance**
76
76
  - Do plans honor locked decisions?
77
77
  - Are deferred ideas excluded?
78
78
  - Are discretion areas handled appropriately?
79
+
80
+ **REVIEWS.md** (if included by reviews mode) — Cross-AI review feedback from `/gsd:review`
81
+
82
+ REVIEWS.md is audit trail and feedback input, not a hidden execution contract. /gsd:execute-phase primarily consumes PLAN.md plus normal phase context. Add verification dimension: **Review Incorporation**.
83
+
84
+ - Extract current actionable findings from the human-readable per-reviewer and consensus content in REVIEWS.md. Do NOT look for a `CYCLE_SUMMARY: current_high=<N> current_actionable=<M>` line or `## Current HIGH Concerns` / `## Current Actionable Non-HIGH Concerns` section headers — those machine-readable fields exist only in the convergence orchestrator's return message, never in REVIEWS.md (which contains only human-readable review content).
85
+ - Do not re-open historical findings that are already incorporated, explicitly deferred/rejected in PLAN.md, or marked fully resolved.
86
+ - Verify each current actionable review finding appears in executable PLAN.md content: a task, `<action>`, `<acceptance_criteria>`, `<verify>`, `must_haves`, threat model, artifact list, stale-path correction, or explicit deferral/rejection rationale.
87
+ - If a current actionable finding remains only in REVIEWS.md and would be invisible to /gsd:execute-phase, return `## ISSUES FOUND`. Use WARNING by default; use BLOCKER when the missing incorporation can prevent the phase goal, create unsafe execution, or invalidate verification.
79
88
  </upstream_input>
80
89
 
81
90
  <core_principle>
@@ -707,8 +716,8 @@ must_haves:
707
716
  min_lines: 30
708
717
  key_links:
709
718
  - from: "src/components/LoginForm.tsx"
710
- to: "/api/auth/login"
711
- via: "fetch in onSubmit"
719
+ to: "src/app/api/auth/login/route.ts"
720
+ via: "fetch in onSubmit → POST /api/auth/login"
712
721
  ```
713
722
 
714
723
  Aggregate across plans for full picture of what phase delivers.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: gsd-planner
3
3
  description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator.
4
- tools: Read, Write, Bash, Glob, Grep, WebFetch, mcp__context7__*
4
+ tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, mcp__context7__*
5
5
  color: green
6
6
  # hooks:
7
7
  # PostToolUse:
@@ -632,12 +632,12 @@ must_haves:
632
632
  contains: "model Message"
633
633
  key_links:
634
634
  - from: "src/components/Chat.tsx"
635
- to: "/api/chat"
636
- via: "fetch in useEffect"
635
+ to: "src/app/api/chat/route.ts"
636
+ via: "fetch in useEffect — calls /api/chat endpoint"
637
637
  pattern: "fetch.*api/chat"
638
638
  - from: "src/app/api/chat/route.ts"
639
- to: "prisma.message"
640
- via: "database query"
639
+ to: "prisma/schema.prisma"
640
+ via: "database query via prisma.message"
641
641
  pattern: "prisma\\.message\\.(find|create)"
642
642
  ```
643
643
 
@@ -998,6 +998,8 @@ Use template structure for each PLAN.md.
998
998
 
999
999
  These PLAN.md files are the canonical output of this agent. The orchestrator reads each `.planning/phases/{padded_phase}-{slug}/{padded_phase}-{NN}-PLAN.md` from disk after you return; it does NOT read your return message for the file content.
1000
1000
 
1001
+ **Write is for net-new PLAN.md only.** For any existing file (`ROADMAP.md`, `.planning/` files) use `Edit` (scoped replacement), never `Write`. See `update_roadmap`.
1002
+
1001
1003
  1. **Default: write each PLAN.md in a single `Write` call.** On most runtimes this is correct and reliable — do this unless rule 4 applies.
1002
1004
  2. **Do NOT return the PLAN.md content in your response.** Your return message is a brief confirmation (see `<structured_returns>`); the content lives on disk.
1003
1005
  3. **Do NOT use `Bash(cat << 'EOF')` or heredoc** for file creation. Use the `Write` tool.
@@ -1062,9 +1064,11 @@ Returns JSON: `{ valid, errors, warnings, task_count, tasks }`
1062
1064
  <step name="update_roadmap">
1063
1065
  Update ROADMAP.md to finalize phase placeholders:
1064
1066
 
1067
+ **CRITICAL — use `Edit` (scoped), NOT `Write`, for ROADMAP.md.** A whole-file `Write` destroys all phase entries outside your diff window. Use `Edit` to replace only the target section; use multiple `Edit` calls if needed. NEVER pass the entire ROADMAP.md content to `Write`.
1068
+
1065
1069
  1. Read `.planning/ROADMAP.md`
1066
1070
  2. Find phase entry (`### Phase {N}:`)
1067
- 3. Update placeholders:
1071
+ 3. Update placeholders using `Edit` (scoped replacement only):
1068
1072
 
1069
1073
  **Goal** (only if placeholder):
1070
1074
  - `[To be planned]` → derive from CONTEXT.md > RESEARCH.md > phase description
@@ -1080,7 +1084,7 @@ Plans:
1080
1084
  - [ ] {phase}-02-PLAN.md — {brief objective}
1081
1085
  ```
1082
1086
 
1083
- 4. Write updated ROADMAP.md
1087
+ 4. Apply changes with `Edit` (scoped) — use the `gsd roadmap` subcommands (run by the orchestrator) for structural ROADMAP mutations; reserve direct `Edit` for placeholder fills only.
1084
1088
  </step>
1085
1089
 
1086
1090
  <step name="git_commit">
@@ -136,9 +136,9 @@ must_haves:
136
136
  - path: "src/components/Chat.tsx"
137
137
  provides: "Message list rendering"
138
138
  key_links:
139
- - from: "Chat.tsx"
140
- to: "api/chat"
141
- via: "fetch in useEffect"
139
+ - from: "src/components/Chat.tsx"
140
+ to: "src/app/api/chat/route.ts"
141
+ via: "fetch in useEffect — calls /api/chat endpoint"
142
142
  ```
143
143
 
144
144
  **Step 2c: Merge must-haves**