@opengsd/gsd-core 1.9.0 → 1.10.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -3
- package/.opencode/plugins/gsd-core.js +8 -1
- package/agents/gsd-code-fixer.md +131 -34
- package/agents/gsd-debugger.md +12 -246
- package/agents/gsd-executor.md +7 -5
- package/agents/gsd-integration-checker.md +3 -0
- package/agents/gsd-plan-checker.md +9 -0
- package/agents/gsd-planner.md +5 -8
- package/agents/gsd-roadmapper.md +21 -3
- package/agents/gsd-verifier.md +14 -70
- package/bin/install.js +503 -341
- package/commands/gsd/mempalace-capture.md +1 -1
- package/commands/gsd/new-milestone.md +1 -1
- package/commands/gsd/plan-phase.md +1 -1
- package/gsd-core/bin/gsd-tools.cjs +607 -63
- package/gsd-core/bin/lib/active-workstream-store.cjs +25 -0
- package/gsd-core/bin/lib/agent-install-check.cjs +38 -6
- package/gsd-core/bin/lib/api-coverage.cjs +120 -0
- package/gsd-core/bin/lib/audit.cjs +89 -1
- package/gsd-core/bin/lib/broken-windows.cjs +36 -6
- package/gsd-core/bin/lib/capability-registry.cjs +96 -110
- package/gsd-core/bin/lib/capability-validator.cjs +12 -2
- package/gsd-core/bin/lib/check-command-router.cjs +43 -1
- package/gsd-core/bin/lib/command-aliases.cjs +72 -0
- package/gsd-core/bin/lib/commands.cjs +26 -25
- package/gsd-core/bin/lib/commonjs-marker.cjs +136 -0
- package/gsd-core/bin/lib/config-loader.cjs +1 -0
- package/gsd-core/bin/lib/config.cjs +12 -1
- package/gsd-core/bin/lib/context-composer.cjs +278 -0
- package/gsd-core/bin/lib/context-predicates.cjs +506 -0
- package/gsd-core/bin/lib/core-utils.cjs +91 -12
- package/gsd-core/bin/lib/docs.cjs +3 -2
- package/gsd-core/bin/lib/external-job.cjs +19 -4
- package/gsd-core/bin/lib/frontmatter.cjs +84 -12
- package/gsd-core/bin/lib/gate-predicate-evaluator.cjs +57 -6
- package/gsd-core/bin/lib/git-base-branch.cjs +58 -15
- package/gsd-core/bin/lib/graphify.cjs +142 -27
- package/gsd-core/bin/lib/gsd2-import.cjs +27 -4
- package/gsd-core/bin/lib/host-integration.cjs +13 -1
- package/gsd-core/bin/lib/init-command-router.cjs +83 -8
- package/gsd-core/bin/lib/init.cjs +1021 -57
- package/gsd-core/bin/lib/install-engine.cjs +64 -10
- package/gsd-core/bin/lib/install-profiles.cjs +27 -1
- package/gsd-core/bin/lib/installer-migration-authoring.cjs +3 -1
- package/gsd-core/bin/lib/installer-migration-report.cjs +4 -0
- package/gsd-core/bin/lib/installer-migrations/007-retire-config-root-commonjs-marker.cjs +149 -0
- package/gsd-core/bin/lib/installer-migrations/008-cursor-retire-commands-surface.cjs +55 -0
- package/gsd-core/bin/lib/installer-migrations/009-pi-retire-reserved-hooks-dir.cjs +199 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +87 -1
- package/gsd-core/bin/lib/io.cjs +28 -3
- package/gsd-core/bin/lib/markdown-sectionizer.cjs +6 -0
- package/gsd-core/bin/lib/mcp-catalog.cjs +518 -0
- package/gsd-core/bin/lib/mcp-server.cjs +135 -3
- package/gsd-core/bin/lib/milestone.cjs +106 -51
- package/gsd-core/bin/lib/phase-id.cjs +63 -0
- package/gsd-core/bin/lib/phase-locator.cjs +138 -45
- package/gsd-core/bin/lib/phase.cjs +260 -25
- package/gsd-core/bin/lib/plan-dependency-graph.cjs +232 -0
- package/gsd-core/bin/lib/planning-workspace.cjs +4 -0
- package/gsd-core/bin/lib/project-root.cjs +48 -0
- package/gsd-core/bin/lib/prompt-budget.cjs +128 -165
- package/gsd-core/bin/lib/retired-artifact-cleanup.cjs +80 -0
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +99 -0
- package/gsd-core/bin/lib/review-lane-runner.cjs +30 -6
- package/gsd-core/bin/lib/roadmap-command-router.cjs +42 -9
- package/gsd-core/bin/lib/roadmap-parser.cjs +100 -18
- package/gsd-core/bin/lib/roadmap.cjs +37 -7
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +195 -62
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +15 -3
- package/gsd-core/bin/lib/runtime-homes.cjs +154 -41
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +105 -41
- package/gsd-core/bin/lib/section-manifest.cjs +209 -0
- package/gsd-core/bin/lib/shell-command-projection.cjs +113 -27
- package/gsd-core/bin/lib/smart-entry.cjs +12 -0
- package/gsd-core/bin/lib/state-transition.cjs +73 -8
- package/gsd-core/bin/lib/state.cjs +151 -62
- package/gsd-core/bin/lib/surface.cjs +12 -1
- package/gsd-core/bin/lib/uat-predicate.cjs +11 -1
- package/gsd-core/bin/lib/uat.cjs +320 -21
- package/gsd-core/bin/lib/unusable-input.cjs +9 -0
- package/gsd-core/bin/lib/verification.cjs +29 -12
- package/gsd-core/bin/lib/verify.cjs +29 -5
- package/gsd-core/bin/lib/workflow-fragments.cjs +557 -0
- package/gsd-core/bin/lib/workstream-inventory-builder.cjs +181 -18
- package/gsd-core/bin/lib/workstream-inventory.cjs +519 -27
- package/gsd-core/bin/lib/workstream.cjs +6 -0
- package/gsd-core/bin/lib/worktree-base-ref.cjs +50 -6
- package/gsd-core/bin/lib/worktree-safety.cjs +276 -118
- package/gsd-core/bin/shared/config-schema.manifest.json +2 -0
- package/gsd-core/references/artifact-types.md +10 -3
- package/gsd-core/references/autonomous-ui-design-contract.md +42 -0
- package/gsd-core/references/debugger-techniques.md +255 -0
- package/gsd-core/references/research-documentation-lookup.md +5 -3
- package/gsd-core/references/specless-probe-fallback.md +7 -6
- package/gsd-core/references/verifier-wiring-patterns.md +100 -0
- package/gsd-core/references/worktree-branch-check.md +2 -2
- package/gsd-core/templates/summary-complex.md +2 -0
- package/gsd-core/templates/summary-minimal.md +2 -0
- package/gsd-core/templates/summary-standard.md +2 -0
- package/gsd-core/templates/summary.md +2 -0
- package/gsd-core/workflows/audit-milestone.md +3 -0
- package/gsd-core/workflows/autonomous/steps/converge-banner.md +1 -0
- package/gsd-core/workflows/autonomous/steps/converge-dispatch-bg.md +11 -0
- package/gsd-core/workflows/autonomous/steps/converge-dispatch-inline.md +7 -0
- package/gsd-core/workflows/autonomous/steps/converge-fail-fast.md +21 -0
- package/gsd-core/workflows/autonomous/steps/converge-loop.md +7 -0
- package/gsd-core/workflows/autonomous.md +32 -69
- package/gsd-core/workflows/code-review/steps/dispatch-fix.md +39 -0
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +83 -0
- package/gsd-core/workflows/code-review.md +42 -145
- package/gsd-core/workflows/complete-milestone/steps/git-tag.md +29 -0
- package/gsd-core/workflows/complete-milestone.md +23 -81
- package/gsd-core/workflows/debug.md +9 -12
- package/gsd-core/workflows/diagnose-issues.md +22 -0
- package/gsd-core/workflows/discovery-phase.md +4 -4
- package/gsd-core/workflows/discuss-phase-assumptions/steps/auto-advance-dispatch.md +15 -0
- package/gsd-core/workflows/discuss-phase-assumptions.md +5 -16
- package/gsd-core/workflows/docs-update/steps/dispatch-monorepo-packages.md +51 -0
- package/gsd-core/workflows/docs-update.md +8 -51
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +34 -2
- package/gsd-core/workflows/execute-phase/steps/gap-closure-artifacts.md +50 -0
- package/gsd-core/workflows/execute-phase/steps/partial-wave.md +31 -0
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +19 -0
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +42 -0
- package/gsd-core/workflows/execute-phase/steps/regression-gate.md +43 -37
- package/gsd-core/workflows/execute-phase.md +65 -137
- package/gsd-core/workflows/execute-plan.md +1 -1
- package/gsd-core/workflows/help/modes/full.md +6 -1
- package/gsd-core/workflows/ingest-docs.md +2 -1
- package/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md +16 -0
- package/gsd-core/workflows/new-milestone/steps/reset-phase-safety.md +19 -0
- package/gsd-core/workflows/new-milestone.md +21 -38
- package/gsd-core/workflows/new-project/steps/auto-mode-config.md +176 -0
- package/gsd-core/workflows/new-project/steps/auto-mode-detection.md +32 -0
- package/gsd-core/workflows/new-project/steps/codebase-map-offer.md +18 -0
- package/gsd-core/workflows/new-project.md +13 -226
- package/gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md +15 -0
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +110 -0
- package/gsd-core/workflows/plan-phase/steps/prd-express-gate.md +8 -0
- package/gsd-core/workflows/plan-phase/steps/research-only-early-exit.md +17 -0
- package/gsd-core/workflows/plan-phase/steps/research-only-modifiers.md +16 -0
- package/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md +17 -0
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +149 -0
- package/gsd-core/workflows/plan-phase.md +49 -193
- package/gsd-core/workflows/progress/steps/forensic-audit.md +125 -0
- package/gsd-core/workflows/progress/steps/mvp-display.md +18 -0
- package/gsd-core/workflows/progress.md +11 -153
- package/gsd-core/workflows/quick/steps/discussion-phase.md +124 -0
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +111 -0
- package/gsd-core/workflows/quick/steps/quick-verification.md +46 -0
- package/gsd-core/workflows/quick/steps/research-phase.md +72 -0
- package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md +37 -0
- package/gsd-core/workflows/quick.md +20 -390
- package/gsd-core/workflows/resume-project.md +3 -0
- package/gsd-core/workflows/review/steps/reviewer-instances-note-1.md +4 -0
- package/gsd-core/workflows/review/steps/reviewer-instances-note-2.md +3 -0
- package/gsd-core/workflows/review.md +15 -8
- package/gsd-core/workflows/section-manifest.json +219 -0
- package/gsd-core/workflows/sketch.md +1 -1
- package/gsd-core/workflows/spec-phase.md +17 -14
- package/gsd-core/workflows/spike-wrap-up.md +20 -5
- package/gsd-core/workflows/spike.md +50 -16
- package/gsd-core/workflows/sync-skills.md +49 -11
- package/gsd-core/workflows/transition/steps/workstream-collision-check.md +17 -0
- package/gsd-core/workflows/transition.md +8 -21
- package/gsd-core/workflows/ui-phase.md +8 -7
- package/gsd-core/workflows/update/steps/channel-banner.md +7 -0
- package/gsd-core/workflows/update.md +18 -7
- package/gsd-core/workflows/verify-phase.md +4 -7
- package/gsd-core/workflows/verify-work/steps/automated-ui-verification.md +36 -0
- package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +21 -0
- package/gsd-core/workflows/verify-work.md +8 -58
- package/hooks/dist/gsd-agent-isolation-guard.js +428 -0
- package/hooks/dist/gsd-check-update-worker.js +14 -5
- package/hooks/dist/gsd-cursor-subagent-start.js +532 -26
- package/hooks/dist/gsd-read-injection-scanner.js +7 -0
- package/hooks/dist/gsd-statusline.js +72 -6
- package/hooks/dist/gsd-worktree-path-guard.js +2 -1
- package/hooks/dist/gsd-write-guard.js +359 -0
- package/hooks/dist/lib/isolation-sentinel.js +268 -0
- package/hooks/dist/managed-hooks-registry.cjs +2 -0
- package/hooks/gsd-agent-isolation-guard.js +428 -0
- package/hooks/gsd-check-update-worker.js +14 -5
- package/hooks/gsd-cursor-subagent-start.js +532 -26
- package/hooks/gsd-read-injection-scanner.js +7 -0
- package/hooks/gsd-statusline.js +72 -6
- package/hooks/gsd-worktree-path-guard.js +2 -1
- package/hooks/gsd-write-guard.js +359 -0
- package/hooks/hooks.json +12 -0
- package/hooks/lib/isolation-sentinel.js +268 -0
- package/hooks/managed-hooks-registry.cjs +2 -0
- package/package.json +14 -5
- package/pi/gsd.cjs +57 -12
- package/scripts/build-hooks.js +9 -0
- package/scripts/changeset/lint.cjs +9 -2
- package/scripts/changeset/serialize.cjs +5 -1
- package/scripts/gen-capability-matrix.cjs +1 -1
- package/scripts/gen-context-index.cjs +448 -0
- package/scripts/gen-inventory-manifest.cjs +101 -1
- package/scripts/gen-prompt-budget-parity-corpus.cjs +645 -0
- package/scripts/gen-registry.cjs +39 -15
- package/scripts/gen-section-manifest.cjs +638 -0
- package/scripts/generate-package-identity.cjs +4 -2
- package/scripts/lint-allow-test-rule-refs.allowlist.json +17 -31
- package/scripts/lint-compiled-artifact-sync.cjs +6 -1
- package/scripts/lint-docs-command-form.cjs +195 -0
- package/scripts/lint-docs-required.cjs +9 -1
- package/scripts/lint-emitted-drift-ack.cjs +215 -20
- package/scripts/lint-example-parser-parity.cjs +395 -0
- package/scripts/lint-test-file-count.allowlist.json +27 -1
- package/scripts/mutation-matrix.cjs +13 -0
- package/scripts/prompt-injection-scan.sh +27 -6
- package/scripts/registry-schema.cjs +323 -94
- package/scripts/run-tests.cjs +3 -2
- package/scripts/validate-registry.cjs +10 -6
- package/skills/gsd-autonomous/SKILL.md +1 -1
- package/skills/gsd-execute-phase/SKILL.md +1 -1
- package/skills/gsd-mempalace-capture/SKILL.md +1 -1
- package/skills/gsd-new-milestone/SKILL.md +1 -1
- package/skills/gsd-plan-phase/SKILL.md +2 -2
- package/vscode/package.json +1 -1
- package/scripts/gen-emitted-baseline.cjs +0 -145
|
@@ -13,11 +13,12 @@ Read all files referenced by the invoking prompt's execution_context before star
|
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
15
|
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${GSD_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${GSD_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
16
|
-
|
|
16
|
+
FORENSIC_PARAM=""; if [[ "$ARGUMENTS" =~ (^|[[:space:]])--forensic([[:space:]]|$) ]]; then FORENSIC_PARAM="--forensic"; fi
|
|
17
|
+
INIT=$(gsd_run query init.progress $FORENSIC_PARAM)
|
|
17
18
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
18
19
|
```
|
|
19
20
|
|
|
20
|
-
Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`, `state_path`, `roadmap_path`, `project_path`, `config_path`.
|
|
21
|
+
Extract from init JSON: `project_exists`, `roadmap_exists`, `state_exists`, `phases`, `current_phase`, `next_phase`, `milestone_version`, `completed_count`, `phase_count`, `paused_at`, `state_path`, `roadmap_path`, `project_path`, `config_path`, `phase_mvp_mode`.
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
24
|
DISCUSS_MODE=$(gsd_run query config-get workflow.discuss_mode 2>/dev/null || echo "discuss")
|
|
@@ -104,7 +105,7 @@ PROGRESS_BAR=$(gsd_run query progress.bar --raw)
|
|
|
104
105
|
|
|
105
106
|
Present:
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
````
|
|
108
109
|
# [Project Name]
|
|
109
110
|
|
|
110
111
|
**Progress:** {PROGRESS_BAR}
|
|
@@ -150,34 +151,13 @@ Render `Open Windows` only when `$WINDOWS_OPEN` is greater than `0` (or `$WINDOW
|
|
|
150
151
|
|
|
151
152
|
## What's Next
|
|
152
153
|
[Next phase/plan objective from roadmap analyze]
|
|
153
|
-
|
|
154
|
+
````
|
|
154
155
|
|
|
155
156
|
</step>
|
|
156
157
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
Resolve `MVP_MODE` per phase via the centralized resolver. progress has no `--mvp` CLI flag (mode is inherited from the planned phase), so we omit `--cli-flag`:
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
MVP_MODE=$(gsd_run query phase.mvp-mode "${PHASE_NUMBER}" --pick active)
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
When `MVP_MODE=true`, the per-phase progress block adds a **user-flow status** sub-block sourced from the phase's PLAN.md task names. Each task whose name reads like a user-visible capability (e.g., "Register flow", "Login flow", "Password reset") is rendered as a status line:
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
Phase 1 — User Auth MVP
|
|
170
|
-
✅ Walking Skeleton complete ← from SKELETON.md existence
|
|
171
|
-
✅ Register flow working ← from PLAN.md task with summary
|
|
172
|
-
✅ Login flow working ← from PLAN.md task with summary
|
|
173
|
-
🔄 Password reset (in progress) ← from PLAN.md task without summary
|
|
174
|
-
⬜ Email verification ← from PLAN.md task not yet started
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
**User-flow filter:** Tasks whose names are technical-sounding ("Wire DB schema", "Create migration", "Bump deps") are NOT rendered as user-flow status lines. Heuristic: a task name is user-flow-shaped if it ends in "flow", "page", "screen", or starts with a verb the user would recognize ("Register", "Login", "Upload", "View"). Tasks that fail the heuristic still count toward the standard task progress total but don't appear in the user-flow sub-block.
|
|
178
|
-
|
|
179
|
-
When `MVP_MODE=false` (mode is null, absent, or the phase has no `**Mode:**` line), fall back to the standard display path — no behavioral change.
|
|
180
|
-
</step>
|
|
158
|
+
<!-- gsd:section id="mvp-display" when="state:phase-mvp-mode" -->
|
|
159
|
+
If `section_manifest` is `null` or `"mvp-display"` is in its `included` list: read and execute `gsd-core/workflows/progress/steps/mvp-display.md`. Otherwise skip — do not read the file.
|
|
160
|
+
<!-- /gsd:section -->
|
|
181
161
|
|
|
182
162
|
<step name="route">
|
|
183
163
|
**Determine next action based on verified counts.**
|
|
@@ -678,131 +658,9 @@ Ready to plan the next milestone.
|
|
|
678
658
|
- Handoff file exists → mention it, offer `/gsd:resume-work ${GSD_WS}`
|
|
679
659
|
</step>
|
|
680
660
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
If `--forensic` is NOT present in ARGUMENTS: skip this step entirely. Default progress behavior (standard report + routing) is unchanged.
|
|
685
|
-
|
|
686
|
-
If `--forensic` IS present: after the standard report and routing suggestion have been displayed, append the following audit section.
|
|
687
|
-
|
|
688
|
-
---
|
|
689
|
-
|
|
690
|
-
## Forensic Integrity Audit
|
|
691
|
-
|
|
692
|
-
Running 7 deep checks against project state...
|
|
693
|
-
|
|
694
|
-
Run each check in order. For each check, emit ✓ (pass) or ⚠ (warning) with concrete evidence when a problem is found.
|
|
695
|
-
|
|
696
|
-
**Check 1 — STATE vs artifact consistency**
|
|
697
|
-
|
|
698
|
-
Read STATE.md `status` / `stopped_at` fields (from the STATE snapshot already loaded). Compare against the artifact count from the roadmap analysis. If STATE.md claims the current phase is pending/mid-flight but the artifact count shows it as complete (all PLAN.md files have matching SUMMARY.md files), flag inconsistency. Emit:
|
|
699
|
-
- ✓ `STATE.md consistent with artifact count` — if both agree
|
|
700
|
-
- ⚠ `STATE.md claims [status] but artifact count shows phase complete` — with the specific values
|
|
701
|
-
|
|
702
|
-
**Check 2 — Orphaned handoff files**
|
|
703
|
-
|
|
704
|
-
Check for existence of:
|
|
705
|
-
```bash
|
|
706
|
-
ls .planning/HANDOFF.json .planning/phases/*/.continue-here.md .planning/phases/*/*HANDOFF*.md 2>/dev/null || true
|
|
707
|
-
```
|
|
708
|
-
Also check `.planning/continue-here.md`.
|
|
709
|
-
|
|
710
|
-
Emit:
|
|
711
|
-
- ✓ `No orphaned handoff files` — if none found
|
|
712
|
-
- ⚠ `Orphaned handoff files found` — list each file path, add: `→ Work was paused mid-flight. Read the handoff before continuing.`
|
|
713
|
-
|
|
714
|
-
**Check 3 — Deferred scope drift**
|
|
715
|
-
|
|
716
|
-
Search phase artifacts (CONTEXT.md, DISCUSSION-LOG.md, BUG-BRIEF.md, VERIFICATION.md, SUMMARY.md, HANDOFF.md files under `.planning/phases/`) for patterns:
|
|
717
|
-
```bash
|
|
718
|
-
grep -rl "defer to Phase\|future phase\|out of scope Phase\|deferred to Phase" .planning/phases/ 2>/dev/null || true
|
|
719
|
-
```
|
|
720
|
-
|
|
721
|
-
For each match, extract the referenced phase number. Cross-reference against ROADMAP.md phase list. If the referenced phase number is NOT in ROADMAP.md, flag as deferred scope not captured.
|
|
722
|
-
|
|
723
|
-
Emit:
|
|
724
|
-
- ✓ `All deferred scope captured in ROADMAP` — if no mismatches
|
|
725
|
-
- ⚠ `Deferred scope references phase(s) not in ROADMAP` — list: file, reference text, missing phase number
|
|
726
|
-
|
|
727
|
-
**Check 4 — Memory-flagged pending work**
|
|
728
|
-
|
|
729
|
-
Check if `.planning/MEMORY.md` or `.planning/memory/` exists:
|
|
730
|
-
```bash
|
|
731
|
-
ls .planning/MEMORY.md .planning/memory/*.md 2>/dev/null || true
|
|
732
|
-
```
|
|
733
|
-
|
|
734
|
-
If found, grep for entries containing: `pending`, `status`, `deferred`, `not yet run`, `backfill`, `blocking`.
|
|
735
|
-
|
|
736
|
-
Emit:
|
|
737
|
-
- ✓ `No memory entries flagging pending work` — if none found or no MEMORY.md
|
|
738
|
-
- ⚠ `Memory entries flag pending/deferred work` — list the matching lines (max 5, truncated at 80 chars)
|
|
739
|
-
|
|
740
|
-
**Check 5 — Blocking operational todos**
|
|
741
|
-
|
|
742
|
-
Check for pending todos:
|
|
743
|
-
```bash
|
|
744
|
-
ls .planning/todos/pending/*.md 2>/dev/null || true
|
|
745
|
-
```
|
|
746
|
-
|
|
747
|
-
For files found, scan for keywords indicating operational blockers: `script`, `credential`, `API key`, `manual`, `verification`, `setup`, `configure`, `run `.
|
|
748
|
-
|
|
749
|
-
Emit:
|
|
750
|
-
- ✓ `No blocking operational todos` — if no pending todos or none match operational keywords
|
|
751
|
-
- ⚠ `Blocking operational todos found` — list the file names and matching keywords (max 5)
|
|
752
|
-
|
|
753
|
-
**Check 6 — Uncommitted code**
|
|
754
|
-
|
|
755
|
-
```bash
|
|
756
|
-
git status --porcelain 2>/dev/null | grep -v "^??" | grep -v "^.planning\/" | grep -v "^\.\." | head -10
|
|
757
|
-
```
|
|
758
|
-
|
|
759
|
-
If output is non-empty (modified/staged files outside `.planning/`), flag as uncommitted code.
|
|
760
|
-
|
|
761
|
-
Emit:
|
|
762
|
-
- ✓ `Working tree clean` — if no modified files outside `.planning/`
|
|
763
|
-
- ⚠ `Uncommitted changes in source files` — list up to 10 file paths
|
|
764
|
-
|
|
765
|
-
**Check 7 — Unresolved deferred items**
|
|
766
|
-
|
|
767
|
-
Glob every phase directory's SCOPE BOUNDARY log (executor writes out-of-scope discoveries here per `agents/gsd-executor.md`):
|
|
768
|
-
```bash
|
|
769
|
-
ls .planning/phases/*/deferred-items.md 2>/dev/null || true
|
|
770
|
-
```
|
|
771
|
-
|
|
772
|
-
For each `deferred-items.md` found, read its entries (bullet list, one entry per top-level `- ` line, continuation lines indented beneath it). An entry is RESOLVED only if it carries an explicit `status: resolved` field (case-insensitive) on one of its lines; every other entry — including one with no `status:` field at all — is UNRESOLVED and must be surfaced (fail-safe: never silently drop a possibly-open item).
|
|
773
|
-
|
|
774
|
-
Emit:
|
|
775
|
-
- ✓ `No unresolved deferred items` — if no `deferred-items.md` files exist, or every entry in every file is `status: resolved`
|
|
776
|
-
- ⚠ `Unresolved deferred items found` — list each file's phase directory and its unresolved entry text (max 5 per file, truncated at 80 chars)
|
|
777
|
-
|
|
778
|
-
---
|
|
779
|
-
|
|
780
|
-
After all 7 checks, display the verdict:
|
|
781
|
-
|
|
782
|
-
**If all 7 checks passed:**
|
|
783
|
-
```
|
|
784
|
-
### Verdict: CLEAN
|
|
785
|
-
|
|
786
|
-
The standard progress report is trustworthy — proceed with the routing suggestion above.
|
|
787
|
-
```
|
|
788
|
-
|
|
789
|
-
**If 1 or more checks failed:**
|
|
790
|
-
```
|
|
791
|
-
### Verdict: N INTEGRITY ISSUE(S) FOUND
|
|
792
|
-
|
|
793
|
-
The standard progress report may not reflect true project state.
|
|
794
|
-
Review the flagged items above before acting on the routing suggestion.
|
|
795
|
-
```
|
|
796
|
-
|
|
797
|
-
Then for each failed check, add a concrete next action:
|
|
798
|
-
- Check 2 (orphaned handoff): `Read the handoff file(s) and resume from where work was paused: /gsd:resume-work ${GSD_WS}`
|
|
799
|
-
- Check 3 (deferred scope): `Add the missing phases to ROADMAP.md or update the deferred references`
|
|
800
|
-
- Check 4 (memory pending): `Review the flagged memory entries and resolve or clear them`
|
|
801
|
-
- Check 5 (blocking todos): `Complete the operational steps in .planning/todos/pending/ before continuing`
|
|
802
|
-
- Check 6 (uncommitted code): `Commit or stash the uncommitted changes before advancing`
|
|
803
|
-
- Check 7 (unresolved deferred items): `Address each deferred item and mark it status: resolved in its deferred-items.md, or fold it into the roadmap`
|
|
804
|
-
- Check 1 (STATE inconsistency): `Run /gsd:verify-work ${PHASE} ${GSD_WS} to reconcile state`
|
|
805
|
-
</step>
|
|
661
|
+
<!-- gsd:section id="forensic-audit" when="flag:--forensic" -->
|
|
662
|
+
If `section_manifest` is `null` or `"forensic-audit"` is in its `included` list: read and execute `gsd-core/workflows/progress/steps/forensic-audit.md`. Otherwise skip — do not read the file.
|
|
663
|
+
<!-- /gsd:section -->
|
|
806
664
|
|
|
807
665
|
</process>
|
|
808
666
|
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
**Step 4.5: Discussion phase (only when `$DISCUSS_MODE`)**
|
|
2
|
+
|
|
3
|
+
Skip this step entirely if NOT `$DISCUSS_MODE`.
|
|
4
|
+
|
|
5
|
+
Display banner:
|
|
6
|
+
```
|
|
7
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
8
|
+
GSD ► DISCUSSING QUICK TASK
|
|
9
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
10
|
+
|
|
11
|
+
◆ Surfacing gray areas for: ${DESCRIPTION}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**4.5a. Identify gray areas**
|
|
15
|
+
|
|
16
|
+
Analyze `$DESCRIPTION` to identify 2-4 gray areas — implementation decisions that would change the outcome and that the user should weigh in on.
|
|
17
|
+
|
|
18
|
+
Use the domain-aware heuristic to generate phase-specific (not generic) gray areas:
|
|
19
|
+
- Something users **SEE** → layout, density, interactions, states
|
|
20
|
+
- Something users **CALL** → responses, errors, auth, versioning
|
|
21
|
+
- Something users **RUN** → output format, flags, modes, error handling
|
|
22
|
+
- Something users **READ** → structure, tone, depth, flow
|
|
23
|
+
- Something being **ORGANIZED** → criteria, grouping, naming, exceptions
|
|
24
|
+
|
|
25
|
+
Each gray area should be a concrete decision point, not a vague category. Example: "Loading behavior" not "UX".
|
|
26
|
+
|
|
27
|
+
**4.5b. Present gray areas**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
AskUserQuestion(
|
|
31
|
+
header: "Gray Areas",
|
|
32
|
+
question: "Which areas need clarification before planning?",
|
|
33
|
+
options: [
|
|
34
|
+
{ label: "${area_1}", description: "${why_it_matters_1}" },
|
|
35
|
+
{ label: "${area_2}", description: "${why_it_matters_2}" },
|
|
36
|
+
{ label: "${area_3}", description: "${why_it_matters_3}" },
|
|
37
|
+
{ label: "All clear", description: "Skip discussion — I know what I want" }
|
|
38
|
+
],
|
|
39
|
+
multiSelect: true
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If user selects "All clear" → skip to Step 5 (no CONTEXT.md written).
|
|
44
|
+
|
|
45
|
+
**4.5c. Discuss selected areas**
|
|
46
|
+
|
|
47
|
+
For each selected area, ask 1-2 focused questions via AskUserQuestion:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
AskUserQuestion(
|
|
51
|
+
header: "${area_name}",
|
|
52
|
+
question: "${specific_question_about_this_area}",
|
|
53
|
+
options: [
|
|
54
|
+
{ label: "${concrete_choice_1}", description: "${what_this_means}" },
|
|
55
|
+
{ label: "${concrete_choice_2}", description: "${what_this_means}" },
|
|
56
|
+
{ label: "${concrete_choice_3}", description: "${what_this_means}" },
|
|
57
|
+
{ label: "You decide", description: "Claude's discretion" }
|
|
58
|
+
],
|
|
59
|
+
multiSelect: false
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Rules:
|
|
64
|
+
- Options must be concrete choices, not abstract categories
|
|
65
|
+
- Highlight recommended choice where you have a clear opinion
|
|
66
|
+
- If user selects "Other" with freeform text, switch to plain text follow-up (per questioning.md freeform rule)
|
|
67
|
+
- If user selects "You decide", capture as Claude's Discretion in CONTEXT.md
|
|
68
|
+
- Max 2 questions per area — this is lightweight, not a deep dive
|
|
69
|
+
|
|
70
|
+
Collect all decisions into `$DECISIONS`.
|
|
71
|
+
|
|
72
|
+
**4.5d. Write CONTEXT.md**
|
|
73
|
+
|
|
74
|
+
Write `${QUICK_DIR}/${quick_id}-CONTEXT.md` using the standard context template structure:
|
|
75
|
+
|
|
76
|
+
```markdown
|
|
77
|
+
# Quick Task ${quick_id}: ${DESCRIPTION} - Context
|
|
78
|
+
|
|
79
|
+
**Gathered:** ${date}
|
|
80
|
+
**Status:** Ready for planning
|
|
81
|
+
|
|
82
|
+
<domain>
|
|
83
|
+
## Task Boundary
|
|
84
|
+
|
|
85
|
+
${DESCRIPTION}
|
|
86
|
+
|
|
87
|
+
</domain>
|
|
88
|
+
|
|
89
|
+
<decisions>
|
|
90
|
+
## Implementation Decisions
|
|
91
|
+
|
|
92
|
+
### ${area_1_name}
|
|
93
|
+
- ${decision_from_discussion}
|
|
94
|
+
|
|
95
|
+
### ${area_2_name}
|
|
96
|
+
- ${decision_from_discussion}
|
|
97
|
+
|
|
98
|
+
### Claude's Discretion
|
|
99
|
+
${areas_where_user_said_you_decide_or_areas_not_discussed}
|
|
100
|
+
|
|
101
|
+
</decisions>
|
|
102
|
+
|
|
103
|
+
<specifics>
|
|
104
|
+
## Specific Ideas
|
|
105
|
+
|
|
106
|
+
${any_specific_references_or_examples_from_discussion}
|
|
107
|
+
|
|
108
|
+
[If none: "No specific requirements — open to standard approaches"]
|
|
109
|
+
|
|
110
|
+
</specifics>
|
|
111
|
+
|
|
112
|
+
<canonical_refs>
|
|
113
|
+
## Canonical References
|
|
114
|
+
|
|
115
|
+
${any_specs_adrs_or_docs_referenced_during_discussion}
|
|
116
|
+
|
|
117
|
+
[If none: "No external specs — requirements fully captured in decisions above"]
|
|
118
|
+
|
|
119
|
+
</canonical_refs>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Note: Quick task CONTEXT.md omits `<code_context>` and `<deferred>` sections (no codebase scouting, no phase scope to defer to). Keep it lean. The `<canonical_refs>` section is included when external docs were referenced — omit it only if no external docs apply.
|
|
123
|
+
|
|
124
|
+
Report: `Context captured: ${QUICK_DIR}/${quick_id}-CONTEXT.md`
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
**Step 5.5: Plan-checker loop (only when `$VALIDATE_MODE`)**
|
|
2
|
+
|
|
3
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
4
|
+
|
|
5
|
+
Display banner:
|
|
6
|
+
```
|
|
7
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
8
|
+
GSD ► CHECKING PLAN
|
|
9
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
10
|
+
|
|
11
|
+
◆ Spawning plan checker... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Checker prompt:
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
<verification_context>
|
|
18
|
+
**Mode:** quick-full
|
|
19
|
+
**Task Description:** ${DESCRIPTION}
|
|
20
|
+
|
|
21
|
+
<files_to_read>
|
|
22
|
+
- ${QUICK_DIR}/${quick_id}-PLAN.md (Plan to verify)
|
|
23
|
+
</files_to_read>
|
|
24
|
+
|
|
25
|
+
${AGENT_SKILLS_CHECKER}
|
|
26
|
+
|
|
27
|
+
**Scope:** This is a quick task, not a full phase. Skip checks that require a ROADMAP phase goal.
|
|
28
|
+
</verification_context>
|
|
29
|
+
|
|
30
|
+
<check_dimensions>
|
|
31
|
+
- Requirement coverage: Does the plan address the task description?
|
|
32
|
+
- Task completeness: Do tasks have files, action, verify, done fields?
|
|
33
|
+
- Key links: Are referenced files real?
|
|
34
|
+
- Scope sanity: Is this appropriately sized for a quick task (1-3 tasks)?
|
|
35
|
+
- must_haves derivation: Are must_haves traceable to the task description?
|
|
36
|
+
|
|
37
|
+
Skip: cross-plan deps (single plan), ROADMAP alignment
|
|
38
|
+
${DISCUSS_MODE ? '- Context compliance: Does the plan honor locked decisions from CONTEXT.md?' : '- Skip: context compliance (no CONTEXT.md)'}
|
|
39
|
+
</check_dimensions>
|
|
40
|
+
|
|
41
|
+
<expected_output>
|
|
42
|
+
- ## VERIFICATION PASSED — all checks pass
|
|
43
|
+
- ## ISSUES FOUND — structured issue list
|
|
44
|
+
</expected_output>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
Agent(
|
|
49
|
+
prompt=checker_prompt,
|
|
50
|
+
subagent_type="gsd-plan-checker",
|
|
51
|
+
model="{checker_model}",
|
|
52
|
+
description="Check quick plan: ${DESCRIPTION}"
|
|
53
|
+
)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
57
|
+
|
|
58
|
+
**Handle checker return:**
|
|
59
|
+
|
|
60
|
+
- **`## VERIFICATION PASSED`:** Display confirmation, proceed to step 6.
|
|
61
|
+
- **`## ISSUES FOUND`:** Display issues, check iteration count, enter revision loop.
|
|
62
|
+
|
|
63
|
+
**Revision loop (max 2 iterations):**
|
|
64
|
+
|
|
65
|
+
Track `iteration_count` (starts at 1 after initial plan + check).
|
|
66
|
+
|
|
67
|
+
**If iteration_count < 2:**
|
|
68
|
+
|
|
69
|
+
Display: `Sending back to planner for revision... (iteration ${N}/2)`
|
|
70
|
+
|
|
71
|
+
Revision prompt:
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
<revision_context>
|
|
75
|
+
**Mode:** quick-full (revision)
|
|
76
|
+
|
|
77
|
+
<files_to_read>
|
|
78
|
+
- ${QUICK_DIR}/${quick_id}-PLAN.md (Existing plan)
|
|
79
|
+
</files_to_read>
|
|
80
|
+
|
|
81
|
+
${AGENT_SKILLS_PLANNER}
|
|
82
|
+
|
|
83
|
+
**Checker issues:** ${structured_issues_from_checker}
|
|
84
|
+
|
|
85
|
+
</revision_context>
|
|
86
|
+
|
|
87
|
+
<instructions>
|
|
88
|
+
Make targeted updates to address checker issues.
|
|
89
|
+
Do NOT replan from scratch unless issues are fundamental.
|
|
90
|
+
Return what changed.
|
|
91
|
+
</instructions>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Agent(
|
|
96
|
+
prompt=revision_prompt,
|
|
97
|
+
subagent_type="gsd-planner",
|
|
98
|
+
model="{planner_model}",
|
|
99
|
+
description="Revise quick plan: ${DESCRIPTION}"
|
|
100
|
+
)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
104
|
+
|
|
105
|
+
After planner returns → spawn checker again, increment iteration_count.
|
|
106
|
+
|
|
107
|
+
**If iteration_count >= 2:**
|
|
108
|
+
|
|
109
|
+
Display: `Max iterations reached. ${N} issues remain:` + issue list
|
|
110
|
+
|
|
111
|
+
Offer: 1) Force proceed, 2) Abort
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
**Step 6.5: Verification (only when `$VALIDATE_MODE`)**
|
|
2
|
+
|
|
3
|
+
Skip this step entirely if NOT `$VALIDATE_MODE`.
|
|
4
|
+
|
|
5
|
+
Display banner:
|
|
6
|
+
```
|
|
7
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
8
|
+
GSD ► VERIFYING RESULTS
|
|
9
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
10
|
+
|
|
11
|
+
◆ Spawning verifier... (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Agent(
|
|
16
|
+
prompt="Verify quick task goal achievement.
|
|
17
|
+
Task directory: ${QUICK_DIR}
|
|
18
|
+
Task goal: ${DESCRIPTION}
|
|
19
|
+
|
|
20
|
+
<files_to_read>
|
|
21
|
+
- ${QUICK_DIR}/${quick_id}-PLAN.md (Plan)
|
|
22
|
+
</files_to_read>
|
|
23
|
+
|
|
24
|
+
${AGENT_SKILLS_VERIFIER}
|
|
25
|
+
|
|
26
|
+
Check must_haves against actual codebase. Create VERIFICATION.md at ${QUICK_DIR}/${quick_id}-VERIFICATION.md.",
|
|
27
|
+
subagent_type="gsd-verifier",
|
|
28
|
+
model="{verifier_model}",
|
|
29
|
+
description="Verify: ${DESCRIPTION}"
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
34
|
+
|
|
35
|
+
Read verification status:
|
|
36
|
+
```bash
|
|
37
|
+
grep "^status:" "${QUICK_DIR}/${quick_id}-VERIFICATION.md" | cut -d: -f2 | tr -d ' '
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Store as `$VERIFICATION_STATUS`.
|
|
41
|
+
|
|
42
|
+
| Status | Action |
|
|
43
|
+
|--------|--------|
|
|
44
|
+
| `passed` | Store `$VERIFICATION_STATUS = "Verified"`, continue to step 7 |
|
|
45
|
+
| `human_needed` | Display items needing manual check, store `$VERIFICATION_STATUS = "Needs Review"`, continue |
|
|
46
|
+
| `gaps_found` | Display gap summary, offer: 1) Re-run executor to fix gaps, 2) Accept as-is. Store `$VERIFICATION_STATUS = "Gaps"` |
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
**Step 4.75: Research phase (only when `$RESEARCH_MODE`)**
|
|
2
|
+
|
|
3
|
+
Skip this step entirely if NOT `$RESEARCH_MODE`.
|
|
4
|
+
|
|
5
|
+
Display banner:
|
|
6
|
+
```
|
|
7
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
8
|
+
GSD ► RESEARCHING QUICK TASK
|
|
9
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
10
|
+
|
|
11
|
+
◆ Investigating approaches for: ${DESCRIPTION} (runs in a subagent — no output until it returns, ~1–5 min; expected, not a freeze)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Spawn a single focused researcher (not 4 parallel researchers like full phases — quick tasks need targeted research, not broad domain surveys):
|
|
15
|
+
|
|
16
|
+
<!-- #2517 model-omit-on-inherit -->
|
|
17
|
+
|
|
18
|
+
> **Model omission (#2517).** Omit the `model` parameter entirely when the value it would carry (`planner_model`, `checker_model`, `executor_model`, `reviewer_model`, `verifier_model`) is `"inherit"` or empty. An empty value 404s on runtimes without native tier aliases — the default on non-Claude runtimes. Omitting it inherits the orchestrator's model. See @gsd-core/references/model-profile-resolution.md.
|
|
19
|
+
|
|
20
|
+
<!-- #2508 runtime-aware-dispatch -->
|
|
21
|
+
|
|
22
|
+
> **Runtime-aware dispatch (#2508 Phase 4).** GSD workflows dispatch specialized subagents by role. Before dispatching on a built-in-only runtime (kimi-code — three built-ins only), resolve the role to a built-in via `gsd_run query resolve-dispatch-type --requested <role> --raw`. On named-dispatch runtimes (Claude/OpenCode/…) the role is returned unchanged; on kimi-code it maps to `coder`/`explore`/`plan` by role-suffix. The persona rides `${AGENT_SKILLS_<ROLE>}` (Phase 3) regardless. See @gsd-core/references/runtime-aware-dispatch.md.
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
Agent(
|
|
26
|
+
prompt="
|
|
27
|
+
<research_context>
|
|
28
|
+
|
|
29
|
+
**Mode:** quick-task
|
|
30
|
+
**Task:** ${DESCRIPTION}
|
|
31
|
+
**Output:** ${QUICK_DIR}/${quick_id}-RESEARCH.md
|
|
32
|
+
|
|
33
|
+
<files_to_read>
|
|
34
|
+
- ${STATE_PATH} (Project state — what's already built)
|
|
35
|
+
- ${PROJECT_PATH} (Project context)
|
|
36
|
+
- ./CLAUDE.md or ./.claude/CLAUDE.md (if exists — project-specific guidelines)
|
|
37
|
+
${DISCUSS_MODE ? '- ' + QUICK_DIR + '/' + quick_id + '-CONTEXT.md (User decisions — research should align with these)' : ''}
|
|
38
|
+
</files_to_read>
|
|
39
|
+
|
|
40
|
+
${AGENT_SKILLS_PLANNER}
|
|
41
|
+
|
|
42
|
+
</research_context>
|
|
43
|
+
|
|
44
|
+
<focus>
|
|
45
|
+
This is a quick task, not a full phase. Research should be concise and targeted:
|
|
46
|
+
1. Best libraries/patterns for this specific task
|
|
47
|
+
2. Common pitfalls and how to avoid them
|
|
48
|
+
3. Integration points with existing codebase
|
|
49
|
+
4. Any constraints or gotchas worth knowing before planning
|
|
50
|
+
|
|
51
|
+
Do NOT produce a full domain survey. Target 1-2 pages of actionable findings.
|
|
52
|
+
</focus>
|
|
53
|
+
|
|
54
|
+
<output>
|
|
55
|
+
Write research to: ${QUICK_DIR}/${quick_id}-RESEARCH.md
|
|
56
|
+
Use standard research format but keep it lean — skip sections that don't apply.
|
|
57
|
+
Return: ## RESEARCH COMPLETE with file path
|
|
58
|
+
</output>
|
|
59
|
+
",
|
|
60
|
+
subagent_type="gsd-phase-researcher",
|
|
61
|
+
model="{planner_model}",
|
|
62
|
+
description="Research: ${DESCRIPTION}"
|
|
63
|
+
)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
> **ORCHESTRATOR RULE — CODEX RUNTIME**: After calling Agent() above, stop working on this task immediately. Do not read more files, edit code, or run tests related to this task while the subagent is active. Wait for the subagent to return its result. This prevents duplicate work, conflicting edits, and wasted context. Only resume when the subagent result is available.
|
|
67
|
+
|
|
68
|
+
After researcher returns:
|
|
69
|
+
1. Verify research exists at `${QUICK_DIR}/${quick_id}-RESEARCH.md`
|
|
70
|
+
2. Report: "Research complete: ${QUICK_DIR}/${quick_id}-RESEARCH.md"
|
|
71
|
+
|
|
72
|
+
If research file not found, warn but continue: "Research agent did not produce output — proceeding to planning without research."
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
**Step 5.6: Pre-dispatch plan commit (worktree mode only)**
|
|
2
|
+
|
|
3
|
+
When `USE_WORKTREES !== "false"`, commit PLAN.md to the current branch **before** spawning the executor. This ensures the worktree inherits PLAN.md at its branch HEAD so the executor can read it via a worktree-rooted path — avoiding the main-repo path priming that triggers CC #36182 path-resolution drift.
|
|
4
|
+
|
|
5
|
+
Skip this step entirely if `USE_WORKTREES === "false"` (non-worktree mode: PLAN.md is committed in Step 8 as usual).
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
_GSD_SHIM_NAME="gsd-tools.cjs"; _GSD_RUNTIME_ROOT="${RUNTIME_DIR:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"; GSD_TOOLS="${_GSD_RUNTIME_ROOT}/gsd-core/bin/${_GSD_SHIM_NAME}"; if [ -f "$GSD_TOOLS" ]; then gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.claude/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${_GSD_RUNTIME_ROOT}/.codex/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif command -v gsd-tools >/dev/null 2>&1; then GSD_TOOLS="$(command -v gsd-tools)"; gsd_run() { "$GSD_TOOLS" "$@"; }; elif [ -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLAUDE_CONFIG_DIR:-$HOME/.claude}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${HERMES_HOME:-$HOME/.hermes}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CURSOR_CONFIG_DIR:-$HOME/.cursor}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEX_HOME:-$HOME/.codex}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GEMINI_CONFIG_DIR:-$HOME/.gemini}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${COPILOT_CONFIG_DIR:-$HOME/.copilot}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${WINDSURF_CONFIG_DIR:-$HOME/.codeium/windsurf}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${AUGMENT_CONFIG_DIR:-$HOME/.augment}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${TRAE_CONFIG_DIR:-$HOME/.trae}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${QWEN_CONFIG_DIR:-$HOME/.qwen}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CODEBUDDY_CONFIG_DIR:-$HOME/.codebuddy}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${CLINE_CONFIG_DIR:-$HOME/.cline}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${GROK_AGENTS_HOME:-$HOME/.agents}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${ANTIGRAVITY_CONFIG_DIR:-$HOME/.gemini/antigravity}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${OPENCODE_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/opencode}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; elif [ -f "${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}" ]; then GSD_TOOLS="${KILO_CONFIG_DIR:-${XDG_CONFIG_HOME:-$HOME/.config}/kilo}/gsd-core/bin/${_GSD_SHIM_NAME}"; gsd_run() { node "$GSD_TOOLS" "$@"; }; else echo "ERROR: gsd-tools.cjs not found at $GSD_TOOLS and gsd-tools is not on PATH. Run: npx -y @opengsd/gsd-core@latest --claude --local" >&2; exit 1; fi; if [ -n "${CLAUDE_ENV_FILE:-}" ] && [ -n "${GSD_TOOLS:-}" ]; then printf "export PATH='%s':\"\$PATH\"\n" "${GSD_TOOLS%/*}" >> "$CLAUDE_ENV_FILE" 2>/dev/null || true; fi
|
|
9
|
+
QUICK_PLAN_PARENT=""
|
|
10
|
+
QUICK_PLAN_COMMIT=""
|
|
11
|
+
if [ "${USE_WORKTREES}" != "false" ]; then
|
|
12
|
+
QUICK_PLAN_PARENT=$(git rev-parse HEAD)
|
|
13
|
+
COMMIT_DOCS=$(gsd_run query config-get commit_docs 2>/dev/null || echo "true")
|
|
14
|
+
if [ "$COMMIT_DOCS" != "false" ]; then
|
|
15
|
+
git add "${QUICK_DIR}/${quick_id}-PLAN.md"
|
|
16
|
+
# No-op skip if nothing actually staged (idempotent re-runs).
|
|
17
|
+
if git diff --cached --quiet -- "${QUICK_DIR}/${quick_id}-PLAN.md"; then
|
|
18
|
+
echo "ℹ Pre-dispatch PLAN.md commit skipped (no staged changes)"
|
|
19
|
+
else
|
|
20
|
+
# Run hooks normally (#2924). If a project opts out via
|
|
21
|
+
# workflow.worktree_skip_hooks=true, honor that opt-in only.
|
|
22
|
+
SKIP_HOOKS=$(gsd_run query config-get workflow.worktree_skip_hooks 2>/dev/null || echo "false")
|
|
23
|
+
if [ "$SKIP_HOOKS" = "true" ]; then
|
|
24
|
+
git commit --no-verify -m "docs(${quick_id}): pre-dispatch plan for ${DESCRIPTION}" -- "${QUICK_DIR}/${quick_id}-PLAN.md" \
|
|
25
|
+
|| { echo "ERROR: pre-dispatch PLAN.md commit failed (--no-verify path). Aborting before executor dispatch." >&2; exit 1; }
|
|
26
|
+
else
|
|
27
|
+
git commit -m "docs(${quick_id}): pre-dispatch plan for ${DESCRIPTION}" -- "${QUICK_DIR}/${quick_id}-PLAN.md" \
|
|
28
|
+
|| { echo "ERROR: pre-dispatch PLAN.md commit failed — likely a pre-commit hook failure. Fix the hook output above (or set workflow.worktree_skip_hooks=true to bypass) and re-run." >&2; exit 1; }
|
|
29
|
+
fi
|
|
30
|
+
QUICK_PLAN_COMMIT=$(git rev-parse HEAD)
|
|
31
|
+
fi
|
|
32
|
+
fi
|
|
33
|
+
if [ -z "$QUICK_PLAN_COMMIT" ]; then
|
|
34
|
+
QUICK_PLAN_COMMIT=$(git rev-parse HEAD)
|
|
35
|
+
fi
|
|
36
|
+
fi
|
|
37
|
+
```
|