@bhargavvc/sdd-cc 1.35.0 → 1.42.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja-JP.md +54 -52
- package/README.ko-KR.md +47 -45
- package/README.md +86 -733
- package/README.pt-BR.md +14 -12
- package/README.zh-CN.md +31 -29
- package/agents/sdd-ai-researcher.md +2 -2
- package/agents/sdd-code-fixer.md +169 -17
- package/agents/sdd-code-reviewer.md +40 -8
- package/agents/sdd-codebase-mapper.md +89 -6
- package/agents/sdd-debug-session-manager.md +314 -0
- package/agents/sdd-debugger.md +147 -80
- package/agents/sdd-doc-classifier.md +168 -0
- package/agents/sdd-doc-synthesizer.md +204 -0
- package/agents/sdd-doc-verifier.md +20 -4
- package/agents/sdd-doc-writer.md +22 -9
- package/agents/sdd-domain-researcher.md +2 -2
- package/agents/sdd-eval-auditor.md +30 -3
- package/agents/sdd-eval-planner.md +2 -2
- package/agents/sdd-executor.md +203 -43
- package/agents/sdd-framework-selector.md +1 -1
- package/agents/sdd-integration-checker.md +30 -3
- package/agents/sdd-intel-updater.md +51 -23
- package/agents/sdd-nyquist-auditor.md +31 -4
- package/agents/sdd-pattern-mapper.md +335 -0
- package/agents/sdd-phase-researcher.md +195 -32
- package/agents/sdd-plan-checker.md +135 -24
- package/agents/sdd-planner.md +190 -205
- package/agents/sdd-project-researcher.md +7 -7
- package/agents/sdd-research-synthesizer.md +6 -6
- package/agents/sdd-roadmapper.md +19 -10
- package/agents/sdd-security-auditor.md +33 -6
- package/agents/sdd-ui-auditor.md +23 -7
- package/agents/sdd-ui-checker.md +16 -7
- package/agents/sdd-ui-researcher.md +8 -8
- package/agents/sdd-verifier.md +124 -27
- package/bin/install.js +5016 -372
- package/bin/sdd-sdk.js +37 -0
- package/commands/sdd/add-tests.md +5 -4
- package/commands/sdd/ai-integration-phase.md +4 -3
- package/commands/sdd/audit-fix.md +2 -1
- package/commands/sdd/audit-milestone.md +3 -2
- package/commands/sdd/autonomous.md +3 -3
- package/commands/sdd/capture.md +62 -0
- package/commands/sdd/cleanup.md +2 -1
- package/commands/sdd/code-review.md +8 -4
- package/commands/sdd/complete-milestone.md +15 -8
- package/commands/sdd/config.md +58 -0
- package/commands/sdd/debug.md +21 -155
- package/commands/sdd/discuss-phase.md +18 -11
- package/commands/sdd/docs-update.md +3 -2
- package/commands/sdd/eval-review.md +4 -3
- package/commands/sdd/execute-phase.md +5 -4
- package/commands/sdd/explore.md +3 -3
- package/commands/sdd/extract-learnings.md +23 -0
- package/commands/sdd/fast.md +4 -3
- package/commands/sdd/forensics.md +3 -2
- package/commands/sdd/graphify.md +199 -0
- package/commands/sdd/health.md +12 -3
- package/commands/sdd/help.md +1 -1
- package/commands/sdd/import.md +10 -5
- package/commands/sdd/inbox.md +39 -0
- package/commands/sdd/ingest-docs.md +42 -0
- package/commands/sdd/manager.md +8 -3
- package/commands/sdd/map-codebase.md +18 -6
- package/commands/sdd/milestone-summary.md +1 -1
- package/commands/sdd/mvp-phase.md +45 -0
- package/commands/sdd/new-milestone.md +4 -3
- package/commands/sdd/new-project.md +4 -3
- package/commands/sdd/ns-context.md +23 -0
- package/commands/sdd/ns-ideate.md +24 -0
- package/commands/sdd/ns-manage.md +29 -0
- package/commands/sdd/ns-project.md +22 -0
- package/commands/sdd/ns-review.md +26 -0
- package/commands/sdd/ns-workflow.md +28 -0
- package/commands/sdd/pause-work.md +6 -1
- package/commands/sdd/phase.md +56 -0
- package/commands/sdd/plan-phase.md +15 -5
- package/commands/sdd/plan-review-convergence.md +59 -0
- package/commands/sdd/pr-branch.md +2 -1
- package/commands/sdd/profile-user.md +1 -1
- package/commands/sdd/progress.md +27 -5
- package/commands/sdd/quick.md +128 -3
- package/commands/sdd/resume-work.md +2 -12
- package/commands/sdd/review-backlog.md +3 -2
- package/commands/sdd/review.md +3 -2
- package/commands/sdd/secure-phase.md +3 -2
- package/commands/sdd/settings.md +2 -9
- package/commands/sdd/ship.md +2 -1
- package/commands/sdd/sketch.md +60 -0
- package/commands/sdd/spec-phase.md +63 -0
- package/commands/sdd/spike.md +57 -0
- package/commands/sdd/stats.md +2 -1
- package/commands/sdd/surface.md +129 -0
- package/commands/sdd/thread.md +8 -111
- package/commands/sdd/ui-phase.md +3 -2
- package/commands/sdd/ui-review.md +3 -2
- package/commands/sdd/ultraplan-phase.md +34 -0
- package/commands/sdd/undo.md +2 -1
- package/commands/sdd/update.md +21 -10
- package/commands/sdd/validate-phase.md +3 -2
- package/commands/sdd/verify-work.md +5 -4
- package/commands/sdd/workspace.md +52 -0
- package/commands/sdd/workstreams.md +12 -11
- package/hooks/dist/sdd-check-update-worker.js +116 -0
- package/hooks/dist/sdd-check-update.js +13 -88
- package/hooks/dist/sdd-context-monitor.js +28 -1
- package/hooks/dist/sdd-phase-boundary.sh +23 -3
- package/hooks/dist/sdd-read-guard.js +21 -2
- package/hooks/dist/sdd-read-injection-scanner.js +152 -0
- package/hooks/dist/sdd-session-state.sh +38 -12
- package/hooks/dist/sdd-statusline.js +324 -28
- package/hooks/dist/sdd-update-banner.js +134 -0
- package/hooks/dist/sdd-validate-commit.sh +15 -5
- package/hooks/dist/sdd-workflow-guard.js +2 -2
- package/hooks/lib/git-cmd.js +150 -0
- package/hooks/sdd-check-update-worker.js +116 -0
- package/hooks/sdd-check-update.js +13 -88
- package/hooks/sdd-context-monitor.js +28 -1
- package/hooks/sdd-phase-boundary.sh +23 -3
- package/hooks/sdd-read-guard.js +21 -2
- package/hooks/sdd-read-injection-scanner.js +152 -0
- package/hooks/sdd-session-state.sh +38 -12
- package/hooks/sdd-statusline.js +324 -28
- package/hooks/sdd-update-banner.js +134 -0
- package/hooks/sdd-validate-commit.sh +15 -5
- package/hooks/sdd-workflow-guard.js +2 -2
- package/package.json +32 -7
- package/scripts/audit-workflow-script-paths.cjs +73 -0
- package/scripts/build-hooks.js +98 -4
- package/scripts/changeset/cli.cjs +269 -0
- package/scripts/changeset/github-release-notes.cjs +198 -0
- package/scripts/changeset/lint.cjs +110 -0
- package/scripts/changeset/new.cjs +137 -0
- package/scripts/changeset/parse.cjs +60 -0
- package/scripts/changeset/render.cjs +34 -0
- package/scripts/changeset/serialize.cjs +74 -0
- package/scripts/command-contract-helpers.cjs +61 -0
- package/scripts/diff-touches-shipped-paths.cjs +147 -0
- package/scripts/fix-slash-commands.cjs +106 -0
- package/scripts/gen-inventory-manifest.cjs +109 -0
- package/scripts/lint-command-contract.cjs +108 -0
- package/scripts/lint-descriptions.cjs +83 -0
- package/scripts/lint-no-source-grep-extras.cjs +81 -0
- package/scripts/lint-no-source-grep.cjs +174 -0
- package/scripts/lint-shell-command-projection-drift.cjs +57 -0
- package/scripts/lint-skill-deps.cjs +180 -0
- package/scripts/pr-template-policy.cjs +169 -0
- package/scripts/prompt-injection-scan.sh +2 -0
- package/scripts/rebrand-gsd-to-sdd.sh +4 -3
- package/scripts/strip-prose-atrefs.cjs +106 -0
- package/scripts/verify-tarball-sdk-dist.sh +69 -0
- package/sdd/bin/check-latest-version.cjs +104 -0
- package/sdd/bin/lib/active-workstream-store.cjs +85 -0
- package/sdd/bin/lib/adr-parser.cjs +394 -0
- package/sdd/bin/lib/artifacts.cjs +53 -0
- package/sdd/bin/lib/audit.cjs +755 -0
- package/sdd/bin/lib/cjs-command-router-adapter.cjs +39 -0
- package/sdd/bin/lib/clusters.cjs +135 -0
- package/sdd/bin/lib/command-aliases.generated.cjs +838 -0
- package/sdd/bin/lib/commands.cjs +108 -98
- package/sdd/bin/lib/config-schema.cjs +135 -0
- package/sdd/bin/lib/config.cjs +253 -68
- package/sdd/bin/lib/context-utilization.cjs +47 -0
- package/sdd/bin/lib/core.cjs +997 -607
- package/sdd/bin/lib/decisions.cjs +48 -0
- package/sdd/bin/lib/docs.cjs +36 -33
- package/sdd/bin/lib/drift.cjs +379 -0
- package/sdd/bin/lib/fallow-runner.cjs +109 -0
- package/sdd/bin/lib/frontmatter.cjs +19 -11
- package/sdd/bin/lib/gap-checker.cjs +197 -0
- package/sdd/bin/lib/graphify.cjs +577 -0
- package/sdd/bin/lib/init-command-router.cjs +70 -0
- package/sdd/bin/lib/init.cjs +603 -102
- package/sdd/bin/lib/install-profiles.cjs +572 -0
- package/sdd/bin/lib/installer-migration-authoring.cjs +117 -0
- package/sdd/bin/lib/installer-migration-report.cjs +328 -0
- package/sdd/bin/lib/installer-migrations/000-first-time-baseline.cjs +220 -0
- package/sdd/bin/lib/installer-migrations/001-legacy-orphan-files.cjs +41 -0
- package/sdd/bin/lib/installer-migrations/002-codex-legacy-hooks-json.cjs +80 -0
- package/sdd/bin/lib/installer-migrations.cjs +703 -0
- package/sdd/bin/lib/intel.cjs +35 -52
- package/sdd/bin/lib/learnings.cjs +2 -1
- package/sdd/bin/lib/milestone.cjs +313 -283
- package/sdd/bin/lib/model-catalog.cjs +136 -0
- package/sdd/bin/lib/model-profiles.cjs +25 -70
- package/sdd/bin/lib/phase-command-router.cjs +96 -0
- package/sdd/bin/lib/phase.cjs +556 -102
- package/sdd/bin/lib/phases-command-router.cjs +39 -0
- package/sdd/bin/lib/plan-scan.cjs +138 -0
- package/sdd/bin/lib/planning-workspace.cjs +361 -0
- package/sdd/bin/lib/profile-output.cjs +109 -43
- package/sdd/bin/lib/profile-pipeline.cjs +1 -1
- package/sdd/bin/lib/review-reviewer-selection.cjs +125 -0
- package/sdd/bin/lib/roadmap-command-router.cjs +23 -0
- package/sdd/bin/lib/roadmap.cjs +278 -17
- package/sdd/bin/lib/runtime-homes.cjs +178 -0
- package/sdd/bin/lib/sdd2-import.cjs +3 -3
- package/sdd/bin/lib/secrets.cjs +33 -0
- package/sdd/bin/lib/security.cjs +8 -7
- package/sdd/bin/lib/shell-command-projection.cjs +548 -0
- package/sdd/bin/lib/state-command-router.cjs +100 -0
- package/sdd/bin/lib/state-document.cjs +12 -0
- package/sdd/bin/lib/state-document.generated.cjs +127 -0
- package/sdd/bin/lib/state.cjs +720 -218
- package/sdd/bin/lib/surface.cjs +398 -0
- package/sdd/bin/lib/template.cjs +4 -2
- package/sdd/bin/lib/uat.cjs +9 -2
- package/sdd/bin/lib/validate-command-router.cjs +55 -0
- package/sdd/bin/lib/verify-command-router.cjs +34 -0
- package/sdd/bin/lib/verify.cjs +464 -137
- package/sdd/bin/lib/workstream-inventory.cjs +159 -0
- package/sdd/bin/lib/workstream-name-policy.cjs +33 -0
- package/sdd/bin/lib/workstream.cjs +73 -195
- package/sdd/bin/lib/worktree-safety.cjs +563 -0
- package/sdd/bin/sdd-tools.cjs +386 -252
- package/sdd/bin/verify-reapply-patches.cjs +247 -0
- package/sdd/contexts/review.md +1 -0
- package/sdd/references/artifact-types.md +18 -0
- package/sdd/references/autonomous-smart-discuss.md +277 -0
- package/sdd/references/checkpoints.md +36 -0
- package/sdd/references/context-budget.md +85 -49
- package/sdd/references/continuation-format.md +26 -22
- package/sdd/references/debugger-philosophy.md +76 -0
- package/sdd/references/decimal-phase-calculation.md +5 -5
- package/sdd/references/doc-conflict-engine.md +91 -0
- package/sdd/references/domain-probes.md +1 -1
- package/sdd/references/execute-mvp-tdd.md +81 -0
- package/sdd/references/executor-examples.md +110 -0
- package/sdd/references/gate-prompts.md +2 -2
- package/sdd/references/git-integration.md +10 -7
- package/sdd/references/git-planning-commit.md +6 -4
- package/sdd/references/mandatory-initial-read.md +2 -0
- package/sdd/references/model-profiles.md +106 -6
- package/sdd/references/mvp-concepts.md +49 -0
- package/sdd/references/phase-argument-parsing.md +3 -3
- package/sdd/references/planner-antipatterns.md +89 -0
- package/sdd/references/planner-chunked.md +49 -0
- package/sdd/references/planner-human-verify-mode.md +57 -0
- package/sdd/references/planner-mvp-mode.md +53 -0
- package/sdd/references/planner-revision.md +1 -1
- package/sdd/references/planner-source-audit.md +73 -0
- package/sdd/references/planning-config.md +30 -13
- package/sdd/references/project-skills-discovery.md +19 -0
- package/sdd/references/scout-codebase.md +51 -0
- package/sdd/references/skeleton-template.md +48 -0
- package/sdd/references/sketch-interactivity.md +41 -0
- package/sdd/references/sketch-theme-system.md +94 -0
- package/sdd/references/sketch-tooling.md +45 -0
- package/sdd/references/sketch-variant-patterns.md +81 -0
- package/sdd/references/spidr-splitting.md +69 -0
- package/sdd/references/tdd.md +67 -0
- package/sdd/references/thinking-partner.md +1 -1
- package/sdd/references/universal-anti-patterns.md +4 -4
- package/sdd/references/user-story-template.md +58 -0
- package/sdd/references/verification-overrides.md +3 -3
- package/sdd/references/verify-mvp-mode.md +85 -0
- package/sdd/references/workstream-flag.md +11 -11
- package/sdd/references/worktree-path-safety.md +89 -0
- package/sdd/templates/AI-SPEC.md +1 -1
- package/sdd/templates/DEBUG.md +8 -3
- package/sdd/templates/README.md +77 -0
- package/sdd/templates/UAT.md +4 -4
- package/sdd/templates/VALIDATION.md +1 -1
- package/sdd/templates/claude-md.md +5 -5
- package/sdd/templates/config.json +16 -2
- package/sdd/templates/debug-subagent-prompt.md +1 -1
- package/sdd/templates/dev-preferences.md +1 -1
- package/sdd/templates/discovery.md +2 -2
- package/sdd/templates/phase-prompt.md +1 -1
- package/sdd/templates/planner-subagent-prompt.md +3 -3
- package/sdd/templates/project.md +1 -1
- package/sdd/templates/research.md +41 -1
- package/sdd/templates/spec.md +307 -0
- package/sdd/templates/state.md +9 -1
- package/sdd/workflows/add-backlog.md +90 -0
- package/sdd/workflows/add-phase.md +7 -7
- package/sdd/workflows/add-tests.md +12 -12
- package/sdd/workflows/add-todo.md +4 -4
- package/sdd/workflows/ai-integration-phase.md +26 -16
- package/sdd/workflows/analyze-dependencies.md +3 -3
- package/sdd/workflows/audit-fix.md +23 -3
- package/sdd/workflows/audit-milestone.md +37 -20
- package/sdd/workflows/audit-uat.md +3 -3
- package/sdd/workflows/autonomous.md +31 -301
- package/sdd/workflows/check-todos.md +6 -6
- package/sdd/workflows/cleanup.md +1 -1
- package/sdd/workflows/code-review-fix.md +20 -16
- package/sdd/workflows/code-review.md +114 -16
- package/sdd/workflows/complete-milestone.md +68 -15
- package/sdd/workflows/debug.md +231 -0
- package/sdd/workflows/diagnose-issues.md +8 -6
- package/sdd/workflows/discovery-phase.md +3 -3
- package/sdd/workflows/discuss-phase/modes/advisor.md +175 -0
- package/sdd/workflows/discuss-phase/modes/all.md +28 -0
- package/sdd/workflows/discuss-phase/modes/analyze.md +44 -0
- package/sdd/workflows/discuss-phase/modes/auto.md +56 -0
- package/sdd/workflows/discuss-phase/modes/batch.md +52 -0
- package/sdd/workflows/discuss-phase/modes/chain.md +97 -0
- package/sdd/workflows/discuss-phase/modes/default.md +141 -0
- package/sdd/workflows/discuss-phase/modes/power.md +44 -0
- package/sdd/workflows/discuss-phase/modes/text.md +55 -0
- package/sdd/workflows/discuss-phase/templates/checkpoint.json +18 -0
- package/sdd/workflows/discuss-phase/templates/context.md +136 -0
- package/sdd/workflows/discuss-phase/templates/discussion-log.md +50 -0
- package/sdd/workflows/discuss-phase-assumptions.md +24 -21
- package/sdd/workflows/discuss-phase-power.md +3 -3
- package/sdd/workflows/discuss-phase.md +203 -905
- package/sdd/workflows/do.md +25 -21
- package/sdd/workflows/docs-update.md +23 -17
- package/sdd/workflows/edit-phase.md +294 -0
- package/sdd/workflows/eval-review.md +7 -7
- package/sdd/workflows/execute-phase/steps/codebase-drift-gate.md +81 -0
- package/sdd/workflows/execute-phase/steps/per-plan-worktree-gate.md +94 -0
- package/sdd/workflows/execute-phase/steps/post-merge-gate.md +116 -0
- package/sdd/workflows/execute-phase.md +650 -252
- package/sdd/workflows/execute-plan.md +75 -35
- package/sdd/workflows/explore.md +7 -3
- package/sdd/workflows/extract-learnings.md +242 -0
- package/sdd/workflows/fast.md +5 -5
- package/sdd/workflows/forensics.md +19 -6
- package/sdd/workflows/graduation.md +195 -0
- package/sdd/workflows/health.md +49 -7
- package/sdd/workflows/help.md +323 -149
- package/sdd/workflows/import.md +20 -43
- package/sdd/workflows/inbox.md +5 -5
- package/sdd/workflows/ingest-docs.md +339 -0
- package/sdd/workflows/insert-phase.md +33 -12
- package/sdd/workflows/list-phase-assumptions.md +2 -2
- package/sdd/workflows/list-workspaces.md +2 -2
- package/sdd/workflows/manager.md +38 -11
- package/sdd/workflows/map-codebase.md +87 -23
- package/sdd/workflows/milestone-summary.md +8 -8
- package/sdd/workflows/mvp-phase.md +221 -0
- package/sdd/workflows/new-milestone.md +163 -23
- package/sdd/workflows/new-project.md +254 -53
- package/sdd/workflows/new-workspace.md +8 -8
- package/sdd/workflows/next.md +85 -18
- package/sdd/workflows/note.md +2 -2
- package/sdd/workflows/pause-work.md +13 -9
- package/sdd/workflows/plan-milestone-gaps.md +18 -11
- package/sdd/workflows/plan-phase.md +767 -94
- package/sdd/workflows/plan-review-convergence.md +329 -0
- package/sdd/workflows/plant-seed.md +146 -89
- package/sdd/workflows/pr-branch.md +1 -1
- package/sdd/workflows/profile-user.md +15 -15
- package/sdd/workflows/progress.md +198 -56
- package/sdd/workflows/quick.md +318 -54
- package/{commands/sdd → sdd/workflows}/reapply-patches.md +102 -23
- package/sdd/workflows/remove-phase.md +10 -10
- package/sdd/workflows/remove-workspace.md +21 -6
- package/sdd/workflows/resume-project.md +26 -23
- package/sdd/workflows/review.md +151 -20
- package/sdd/workflows/scan.md +5 -3
- package/sdd/workflows/secure-phase.md +26 -13
- package/sdd/workflows/settings-advanced.md +579 -0
- package/sdd/workflows/settings-integrations.md +281 -0
- package/sdd/workflows/settings.md +202 -23
- package/sdd/workflows/ship.md +131 -16
- package/sdd/workflows/sketch-wrap-up.md +285 -0
- package/sdd/workflows/sketch.md +360 -0
- package/sdd/workflows/spec-phase.md +262 -0
- package/sdd/workflows/spike-wrap-up.md +306 -0
- package/sdd/workflows/spike.md +452 -0
- package/sdd/workflows/stats.md +21 -2
- package/sdd/workflows/sync-skills.md +182 -0
- package/sdd/workflows/thread.md +221 -0
- package/sdd/workflows/transition.md +52 -30
- package/sdd/workflows/ui-phase.md +37 -20
- package/sdd/workflows/ui-review.md +12 -10
- package/sdd/workflows/ultraplan-phase.md +198 -0
- package/sdd/workflows/undo.md +9 -9
- package/sdd/workflows/update.md +187 -17
- package/sdd/workflows/validate-phase.md +12 -10
- package/sdd/workflows/verify-phase.md +112 -27
- package/sdd/workflows/verify-work.md +97 -28
- package/sdk/dist/cli-transport.d.ts +19 -0
- package/sdk/dist/cli-transport.d.ts.map +1 -0
- package/sdk/dist/cli-transport.js +104 -0
- package/sdk/dist/cli-transport.js.map +1 -0
- package/sdk/dist/cli.d.ts +46 -0
- package/sdk/dist/cli.d.ts.map +1 -0
- package/sdk/dist/cli.js +511 -0
- package/sdk/dist/cli.js.map +1 -0
- package/sdk/dist/config.d.ts +84 -0
- package/sdk/dist/config.d.ts.map +1 -0
- package/sdk/dist/config.js +135 -0
- package/sdk/dist/config.js.map +1 -0
- package/sdk/dist/context-engine.d.ts +49 -0
- package/sdk/dist/context-engine.d.ts.map +1 -0
- package/sdk/dist/context-engine.js +142 -0
- package/sdk/dist/context-engine.js.map +1 -0
- package/sdk/dist/context-truncation.d.ts +33 -0
- package/sdk/dist/context-truncation.d.ts.map +1 -0
- package/sdk/dist/context-truncation.js +197 -0
- package/sdk/dist/context-truncation.js.map +1 -0
- package/sdk/dist/errors.d.ts +46 -0
- package/sdk/dist/errors.d.ts.map +1 -0
- package/sdk/dist/errors.js +64 -0
- package/sdk/dist/errors.js.map +1 -0
- package/sdk/dist/event-stream.d.ts +53 -0
- package/sdk/dist/event-stream.d.ts.map +1 -0
- package/sdk/dist/event-stream.js +321 -0
- package/sdk/dist/event-stream.js.map +1 -0
- package/sdk/dist/golden/capture.d.ts +15 -0
- package/sdk/dist/golden/capture.d.ts.map +1 -0
- package/sdk/dist/golden/capture.js +67 -0
- package/sdk/dist/golden/capture.js.map +1 -0
- package/sdk/dist/golden/golden-integration-covered.d.ts +6 -0
- package/sdk/dist/golden/golden-integration-covered.d.ts.map +1 -0
- package/sdk/dist/golden/golden-integration-covered.js +30 -0
- package/sdk/dist/golden/golden-integration-covered.js.map +1 -0
- package/sdk/dist/golden/golden-mutation-covered.d.ts +7 -0
- package/sdk/dist/golden/golden-mutation-covered.d.ts.map +1 -0
- package/sdk/dist/golden/golden-mutation-covered.js +17 -0
- package/sdk/dist/golden/golden-mutation-covered.js.map +1 -0
- package/sdk/dist/golden/golden-policy.d.ts +10 -0
- package/sdk/dist/golden/golden-policy.d.ts.map +1 -0
- package/sdk/dist/golden/golden-policy.js +98 -0
- package/sdk/dist/golden/golden-policy.js.map +1 -0
- package/sdk/dist/golden/init-golden-normalize.d.ts +8 -0
- package/sdk/dist/golden/init-golden-normalize.d.ts.map +1 -0
- package/sdk/dist/golden/init-golden-normalize.js +14 -0
- package/sdk/dist/golden/init-golden-normalize.js.map +1 -0
- package/sdk/dist/golden/read-only-golden-rows.d.ts +20 -0
- package/sdk/dist/golden/read-only-golden-rows.d.ts.map +1 -0
- package/sdk/dist/golden/read-only-golden-rows.js +67 -0
- package/sdk/dist/golden/read-only-golden-rows.js.map +1 -0
- package/sdk/dist/golden/registry-canonical-commands.d.ts +6 -0
- package/sdk/dist/golden/registry-canonical-commands.d.ts.map +1 -0
- package/sdk/dist/golden/registry-canonical-commands.js +30 -0
- package/sdk/dist/golden/registry-canonical-commands.js.map +1 -0
- package/sdk/dist/index.d.ts +125 -0
- package/sdk/dist/index.d.ts.map +1 -0
- package/sdk/dist/index.js +298 -0
- package/sdk/dist/index.js.map +1 -0
- package/sdk/dist/init-runner.d.ts +90 -0
- package/sdk/dist/init-runner.d.ts.map +1 -0
- package/sdk/dist/init-runner.js +613 -0
- package/sdk/dist/init-runner.js.map +1 -0
- package/sdk/dist/logger.d.ts +50 -0
- package/sdk/dist/logger.d.ts.map +1 -0
- package/sdk/dist/logger.js +70 -0
- package/sdk/dist/logger.js.map +1 -0
- package/sdk/dist/model-catalog.d.ts +31 -0
- package/sdk/dist/model-catalog.d.ts.map +1 -0
- package/sdk/dist/model-catalog.js +31 -0
- package/sdk/dist/model-catalog.js.map +1 -0
- package/sdk/dist/phase-prompt.d.ts +72 -0
- package/sdk/dist/phase-prompt.d.ts.map +1 -0
- package/sdk/dist/phase-prompt.js +213 -0
- package/sdk/dist/phase-prompt.js.map +1 -0
- package/sdk/dist/phase-runner.d.ts +145 -0
- package/sdk/dist/phase-runner.d.ts.map +1 -0
- package/sdk/dist/phase-runner.js +1206 -0
- package/sdk/dist/phase-runner.js.map +1 -0
- package/sdk/dist/plan-parser.d.ts +55 -0
- package/sdk/dist/plan-parser.d.ts.map +1 -0
- package/sdk/dist/plan-parser.js +389 -0
- package/sdk/dist/plan-parser.js.map +1 -0
- package/sdk/dist/planning-journal.d.ts +64 -0
- package/sdk/dist/planning-journal.d.ts.map +1 -0
- package/sdk/dist/planning-journal.js +88 -0
- package/sdk/dist/planning-journal.js.map +1 -0
- package/sdk/dist/planning-runtime.d.ts +67 -0
- package/sdk/dist/planning-runtime.d.ts.map +1 -0
- package/sdk/dist/planning-runtime.js +58 -0
- package/sdk/dist/planning-runtime.js.map +1 -0
- package/sdk/dist/prompt-builder.d.ts +44 -0
- package/sdk/dist/prompt-builder.d.ts.map +1 -0
- package/sdk/dist/prompt-builder.js +180 -0
- package/sdk/dist/prompt-builder.js.map +1 -0
- package/sdk/dist/prompt-sanitizer.d.ts +35 -0
- package/sdk/dist/prompt-sanitizer.d.ts.map +1 -0
- package/sdk/dist/prompt-sanitizer.js +101 -0
- package/sdk/dist/prompt-sanitizer.js.map +1 -0
- package/sdk/dist/query/active-workstream-store.d.ts +7 -0
- package/sdk/dist/query/active-workstream-store.d.ts.map +1 -0
- package/sdk/dist/query/active-workstream-store.js +56 -0
- package/sdk/dist/query/active-workstream-store.js.map +1 -0
- package/sdk/dist/query/agent-failure-classifier.d.ts +38 -0
- package/sdk/dist/query/agent-failure-classifier.d.ts.map +1 -0
- package/sdk/dist/query/agent-failure-classifier.js +83 -0
- package/sdk/dist/query/agent-failure-classifier.js.map +1 -0
- package/sdk/dist/query/audit-open.d.ts +46 -0
- package/sdk/dist/query/audit-open.d.ts.map +1 -0
- package/sdk/dist/query/audit-open.js +662 -0
- package/sdk/dist/query/audit-open.js.map +1 -0
- package/sdk/dist/query/check-auto-mode.d.ts +13 -0
- package/sdk/dist/query/check-auto-mode.d.ts.map +1 -0
- package/sdk/dist/query/check-auto-mode.js +40 -0
- package/sdk/dist/query/check-auto-mode.js.map +1 -0
- package/sdk/dist/query/check-completion.d.ts +10 -0
- package/sdk/dist/query/check-completion.d.ts.map +1 -0
- package/sdk/dist/query/check-completion.js +157 -0
- package/sdk/dist/query/check-completion.js.map +1 -0
- package/sdk/dist/query/check-decision-coverage.d.ts +33 -0
- package/sdk/dist/query/check-decision-coverage.d.ts.map +1 -0
- package/sdk/dist/query/check-decision-coverage.js +472 -0
- package/sdk/dist/query/check-decision-coverage.js.map +1 -0
- package/sdk/dist/query/check-gates.d.ts +10 -0
- package/sdk/dist/query/check-gates.d.ts.map +1 -0
- package/sdk/dist/query/check-gates.js +89 -0
- package/sdk/dist/query/check-gates.js.map +1 -0
- package/sdk/dist/query/check-ship-ready.d.ts +10 -0
- package/sdk/dist/query/check-ship-ready.d.ts.map +1 -0
- package/sdk/dist/query/check-ship-ready.js +93 -0
- package/sdk/dist/query/check-ship-ready.js.map +1 -0
- package/sdk/dist/query/check-verification-status.d.ts +10 -0
- package/sdk/dist/query/check-verification-status.d.ts.map +1 -0
- package/sdk/dist/query/check-verification-status.js +142 -0
- package/sdk/dist/query/check-verification-status.js.map +1 -0
- package/sdk/dist/query/command-aliases.generated.d.ts +31 -0
- package/sdk/dist/query/command-aliases.generated.d.ts.map +1 -0
- package/sdk/dist/query/command-aliases.generated.js +135 -0
- package/sdk/dist/query/command-aliases.generated.js.map +1 -0
- package/sdk/dist/query/command-catalog.d.ts +9 -0
- package/sdk/dist/query/command-catalog.d.ts.map +1 -0
- package/sdk/dist/query/command-catalog.js +17 -0
- package/sdk/dist/query/command-catalog.js.map +1 -0
- package/sdk/dist/query/command-definition.d.ts +19 -0
- package/sdk/dist/query/command-definition.d.ts.map +1 -0
- package/sdk/dist/query/command-definition.js +44 -0
- package/sdk/dist/query/command-definition.js.map +1 -0
- package/sdk/dist/query/command-family-handlers.d.ts +3 -0
- package/sdk/dist/query/command-family-handlers.d.ts.map +1 -0
- package/sdk/dist/query/command-family-handlers.js +94 -0
- package/sdk/dist/query/command-family-handlers.js.map +1 -0
- package/sdk/dist/query/command-manifest.d.ts +2 -0
- package/sdk/dist/query/command-manifest.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.init.d.ts +6 -0
- package/sdk/dist/query/command-manifest.init.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.init.js +23 -0
- package/sdk/dist/query/command-manifest.init.js.map +1 -0
- package/sdk/dist/query/command-manifest.js +17 -0
- package/sdk/dist/query/command-manifest.js.map +1 -0
- package/sdk/dist/query/command-manifest.non-family.d.ts +9 -0
- package/sdk/dist/query/command-manifest.non-family.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.non-family.js +59 -0
- package/sdk/dist/query/command-manifest.non-family.js.map +1 -0
- package/sdk/dist/query/command-manifest.phase.d.ts +6 -0
- package/sdk/dist/query/command-manifest.phase.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.phase.js +15 -0
- package/sdk/dist/query/command-manifest.phase.js.map +1 -0
- package/sdk/dist/query/command-manifest.phases.d.ts +7 -0
- package/sdk/dist/query/command-manifest.phases.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.phases.js +10 -0
- package/sdk/dist/query/command-manifest.phases.js.map +1 -0
- package/sdk/dist/query/command-manifest.roadmap.d.ts +6 -0
- package/sdk/dist/query/command-manifest.roadmap.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.roadmap.js +10 -0
- package/sdk/dist/query/command-manifest.roadmap.js.map +1 -0
- package/sdk/dist/query/command-manifest.state.d.ts +9 -0
- package/sdk/dist/query/command-manifest.state.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.state.js +30 -0
- package/sdk/dist/query/command-manifest.state.js.map +1 -0
- package/sdk/dist/query/command-manifest.types.d.ts +12 -0
- package/sdk/dist/query/command-manifest.types.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.types.js +2 -0
- package/sdk/dist/query/command-manifest.types.js.map +1 -0
- package/sdk/dist/query/command-manifest.validate.d.ts +6 -0
- package/sdk/dist/query/command-manifest.validate.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.validate.js +10 -0
- package/sdk/dist/query/command-manifest.validate.js.map +1 -0
- package/sdk/dist/query/command-manifest.verify.d.ts +6 -0
- package/sdk/dist/query/command-manifest.verify.d.ts.map +1 -0
- package/sdk/dist/query/command-manifest.verify.js +14 -0
- package/sdk/dist/query/command-manifest.verify.js.map +1 -0
- package/sdk/dist/query/command-static-catalog-domain.d.ts +3 -0
- package/sdk/dist/query/command-static-catalog-domain.d.ts.map +1 -0
- package/sdk/dist/query/command-static-catalog-domain.js +116 -0
- package/sdk/dist/query/command-static-catalog-domain.js.map +1 -0
- package/sdk/dist/query/command-static-catalog-foundation.d.ts +7 -0
- package/sdk/dist/query/command-static-catalog-foundation.d.ts.map +1 -0
- package/sdk/dist/query/command-static-catalog-foundation.js +98 -0
- package/sdk/dist/query/command-static-catalog-foundation.js.map +1 -0
- package/sdk/dist/query/command-topology.d.ts +32 -0
- package/sdk/dist/query/command-topology.d.ts.map +1 -0
- package/sdk/dist/query/command-topology.js +66 -0
- package/sdk/dist/query/command-topology.js.map +1 -0
- package/sdk/dist/query/commands-list.d.ts +14 -0
- package/sdk/dist/query/commands-list.d.ts.map +1 -0
- package/sdk/dist/query/commands-list.js +18 -0
- package/sdk/dist/query/commands-list.js.map +1 -0
- package/sdk/dist/query/commit.d.ts +79 -0
- package/sdk/dist/query/commit.d.ts.map +1 -0
- package/sdk/dist/query/commit.js +340 -0
- package/sdk/dist/query/commit.js.map +1 -0
- package/sdk/dist/query/config-gates.d.ts +12 -0
- package/sdk/dist/query/config-gates.d.ts.map +1 -0
- package/sdk/dist/query/config-gates.js +66 -0
- package/sdk/dist/query/config-gates.js.map +1 -0
- package/sdk/dist/query/config-mutation.d.ts +86 -0
- package/sdk/dist/query/config-mutation.d.ts.map +1 -0
- package/sdk/dist/query/config-mutation.js +518 -0
- package/sdk/dist/query/config-mutation.js.map +1 -0
- package/sdk/dist/query/config-query.d.ts +57 -0
- package/sdk/dist/query/config-query.d.ts.map +1 -0
- package/sdk/dist/query/config-query.js +208 -0
- package/sdk/dist/query/config-query.js.map +1 -0
- package/sdk/dist/query/config-schema.d.ts +36 -0
- package/sdk/dist/query/config-schema.d.ts.map +1 -0
- package/sdk/dist/query/config-schema.js +147 -0
- package/sdk/dist/query/config-schema.js.map +1 -0
- package/sdk/dist/query/decisions.d.ts +58 -0
- package/sdk/dist/query/decisions.d.ts.map +1 -0
- package/sdk/dist/query/decisions.js +161 -0
- package/sdk/dist/query/decisions.js.map +1 -0
- package/sdk/dist/query/detect-custom-files.d.ts +11 -0
- package/sdk/dist/query/detect-custom-files.d.ts.map +1 -0
- package/sdk/dist/query/detect-custom-files.js +89 -0
- package/sdk/dist/query/detect-custom-files.js.map +1 -0
- package/sdk/dist/query/detect-phase-type.d.ts +9 -0
- package/sdk/dist/query/detect-phase-type.d.ts.map +1 -0
- package/sdk/dist/query/detect-phase-type.js +124 -0
- package/sdk/dist/query/detect-phase-type.js.map +1 -0
- package/sdk/dist/query/docs-init.d.ts +26 -0
- package/sdk/dist/query/docs-init.d.ts.map +1 -0
- package/sdk/dist/query/docs-init.js +231 -0
- package/sdk/dist/query/docs-init.js.map +1 -0
- package/sdk/dist/query/fallow-audit.d.ts +44 -0
- package/sdk/dist/query/fallow-audit.d.ts.map +1 -0
- package/sdk/dist/query/fallow-audit.js +44 -0
- package/sdk/dist/query/fallow-audit.js.map +1 -0
- package/sdk/dist/query/frontmatter-mutation.d.ts +77 -0
- package/sdk/dist/query/frontmatter-mutation.d.ts.map +1 -0
- package/sdk/dist/query/frontmatter-mutation.js +317 -0
- package/sdk/dist/query/frontmatter-mutation.js.map +1 -0
- package/sdk/dist/query/frontmatter.d.ts +93 -0
- package/sdk/dist/query/frontmatter.d.ts.map +1 -0
- package/sdk/dist/query/frontmatter.js +365 -0
- package/sdk/dist/query/frontmatter.js.map +1 -0
- package/sdk/dist/query/helpers.d.ts +191 -0
- package/sdk/dist/query/helpers.d.ts.map +1 -0
- package/sdk/dist/query/helpers.js +613 -0
- package/sdk/dist/query/helpers.js.map +1 -0
- package/sdk/dist/query/index.d.ts +8 -0
- package/sdk/dist/query/index.d.ts.map +1 -0
- package/sdk/dist/query/index.js +6 -0
- package/sdk/dist/query/index.js.map +1 -0
- package/sdk/dist/query/init-complex.d.ts +47 -0
- package/sdk/dist/query/init-complex.d.ts.map +1 -0
- package/sdk/dist/query/init-complex.js +718 -0
- package/sdk/dist/query/init-complex.js.map +1 -0
- package/sdk/dist/query/init.d.ts +106 -0
- package/sdk/dist/query/init.d.ts.map +1 -0
- package/sdk/dist/query/init.js +1159 -0
- package/sdk/dist/query/init.js.map +1 -0
- package/sdk/dist/query/intel.d.ts +43 -0
- package/sdk/dist/query/intel.d.ts.map +1 -0
- package/sdk/dist/query/intel.js +416 -0
- package/sdk/dist/query/intel.js.map +1 -0
- package/sdk/dist/query/mutation-event-decorator.d.ts +5 -0
- package/sdk/dist/query/mutation-event-decorator.d.ts.map +1 -0
- package/sdk/dist/query/mutation-event-decorator.js +28 -0
- package/sdk/dist/query/mutation-event-decorator.js.map +1 -0
- package/sdk/dist/query/mutation-event-mapper.d.ts +4 -0
- package/sdk/dist/query/mutation-event-mapper.d.ts.map +1 -0
- package/sdk/dist/query/mutation-event-mapper.js +70 -0
- package/sdk/dist/query/mutation-event-mapper.js.map +1 -0
- package/sdk/dist/query/mvp.d.ts +113 -0
- package/sdk/dist/query/mvp.d.ts.map +1 -0
- package/sdk/dist/query/mvp.js +225 -0
- package/sdk/dist/query/mvp.js.map +1 -0
- package/sdk/dist/query/phase-filesystem-adapter.d.ts +4 -0
- package/sdk/dist/query/phase-filesystem-adapter.d.ts.map +1 -0
- package/sdk/dist/query/phase-filesystem-adapter.js +33 -0
- package/sdk/dist/query/phase-filesystem-adapter.js.map +1 -0
- package/sdk/dist/query/phase-lifecycle-policy.d.ts +34 -0
- package/sdk/dist/query/phase-lifecycle-policy.d.ts.map +1 -0
- package/sdk/dist/query/phase-lifecycle-policy.js +138 -0
- package/sdk/dist/query/phase-lifecycle-policy.js.map +1 -0
- package/sdk/dist/query/phase-lifecycle.d.ts +116 -0
- package/sdk/dist/query/phase-lifecycle.d.ts.map +1 -0
- package/sdk/dist/query/phase-lifecycle.js +1486 -0
- package/sdk/dist/query/phase-lifecycle.js.map +1 -0
- package/sdk/dist/query/phase-list-queries.d.ts +18 -0
- package/sdk/dist/query/phase-list-queries.d.ts.map +1 -0
- package/sdk/dist/query/phase-list-queries.js +129 -0
- package/sdk/dist/query/phase-list-queries.js.map +1 -0
- package/sdk/dist/query/phase-ready.d.ts +9 -0
- package/sdk/dist/query/phase-ready.d.ts.map +1 -0
- package/sdk/dist/query/phase-ready.js +132 -0
- package/sdk/dist/query/phase-ready.js.map +1 -0
- package/sdk/dist/query/phase-roadmap-mutation.d.ts +13 -0
- package/sdk/dist/query/phase-roadmap-mutation.d.ts.map +1 -0
- package/sdk/dist/query/phase-roadmap-mutation.js +65 -0
- package/sdk/dist/query/phase-roadmap-mutation.js.map +1 -0
- package/sdk/dist/query/phase.d.ts +48 -0
- package/sdk/dist/query/phase.d.ts.map +1 -0
- package/sdk/dist/query/phase.js +451 -0
- package/sdk/dist/query/phase.js.map +1 -0
- package/sdk/dist/query/pipeline.d.ts +53 -0
- package/sdk/dist/query/pipeline.d.ts.map +1 -0
- package/sdk/dist/query/pipeline.js +198 -0
- package/sdk/dist/query/pipeline.js.map +1 -0
- package/sdk/dist/query/plan-scan.d.ts +14 -0
- package/sdk/dist/query/plan-scan.d.ts.map +1 -0
- package/sdk/dist/query/plan-scan.js +70 -0
- package/sdk/dist/query/plan-scan.js.map +1 -0
- package/sdk/dist/query/plan-task-structure.d.ts +9 -0
- package/sdk/dist/query/plan-task-structure.d.ts.map +1 -0
- package/sdk/dist/query/plan-task-structure.js +59 -0
- package/sdk/dist/query/plan-task-structure.js.map +1 -0
- package/sdk/dist/query/profile-extract-messages.d.ts +40 -0
- package/sdk/dist/query/profile-extract-messages.d.ts.map +1 -0
- package/sdk/dist/query/profile-extract-messages.js +195 -0
- package/sdk/dist/query/profile-extract-messages.js.map +1 -0
- package/sdk/dist/query/profile-output.d.ts +11 -0
- package/sdk/dist/query/profile-output.d.ts.map +1 -0
- package/sdk/dist/query/profile-output.js +873 -0
- package/sdk/dist/query/profile-output.js.map +1 -0
- package/sdk/dist/query/profile-questionnaire-data.d.ts +21 -0
- package/sdk/dist/query/profile-questionnaire-data.d.ts.map +1 -0
- package/sdk/dist/query/profile-questionnaire-data.js +171 -0
- package/sdk/dist/query/profile-questionnaire-data.js.map +1 -0
- package/sdk/dist/query/profile-sample.d.ts +22 -0
- package/sdk/dist/query/profile-sample.d.ts.map +1 -0
- package/sdk/dist/query/profile-sample.js +136 -0
- package/sdk/dist/query/profile-sample.js.map +1 -0
- package/sdk/dist/query/profile-scan-sessions.d.ts +49 -0
- package/sdk/dist/query/profile-scan-sessions.d.ts.map +1 -0
- package/sdk/dist/query/profile-scan-sessions.js +137 -0
- package/sdk/dist/query/profile-scan-sessions.js.map +1 -0
- package/sdk/dist/query/profile.d.ts +61 -0
- package/sdk/dist/query/profile.d.ts.map +1 -0
- package/sdk/dist/query/profile.js +307 -0
- package/sdk/dist/query/profile.js.map +1 -0
- package/sdk/dist/query/progress.d.ts +77 -0
- package/sdk/dist/query/progress.d.ts.map +1 -0
- package/sdk/dist/query/progress.js +481 -0
- package/sdk/dist/query/progress.js.map +1 -0
- package/sdk/dist/query/query-cli-adapter.d.ts +8 -0
- package/sdk/dist/query/query-cli-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-cli-adapter.js +32 -0
- package/sdk/dist/query/query-cli-adapter.js.map +1 -0
- package/sdk/dist/query/query-cli-output.d.ts +9 -0
- package/sdk/dist/query/query-cli-output.d.ts.map +1 -0
- package/sdk/dist/query/query-cli-output.js +28 -0
- package/sdk/dist/query/query-cli-output.js.map +1 -0
- package/sdk/dist/query/query-command-diagnosis.d.ts +6 -0
- package/sdk/dist/query/query-command-diagnosis.d.ts.map +1 -0
- package/sdk/dist/query/query-command-diagnosis.js +6 -0
- package/sdk/dist/query/query-command-diagnosis.js.map +1 -0
- package/sdk/dist/query/query-command-resolution-strategy.d.ts +29 -0
- package/sdk/dist/query/query-command-resolution-strategy.d.ts.map +1 -0
- package/sdk/dist/query/query-command-resolution-strategy.js +103 -0
- package/sdk/dist/query/query-command-resolution-strategy.js.map +1 -0
- package/sdk/dist/query/query-command-semantics.d.ts +7 -0
- package/sdk/dist/query/query-command-semantics.d.ts.map +1 -0
- package/sdk/dist/query/query-command-semantics.js +7 -0
- package/sdk/dist/query/query-command-semantics.js.map +1 -0
- package/sdk/dist/query/query-dispatch-contract.d.ts +21 -0
- package/sdk/dist/query/query-dispatch-contract.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-contract.js +2 -0
- package/sdk/dist/query/query-dispatch-contract.js.map +1 -0
- package/sdk/dist/query/query-dispatch-error-mapper.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-error-mapper.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-error-mapper.js +6 -0
- package/sdk/dist/query/query-dispatch-error-mapper.js.map +1 -0
- package/sdk/dist/query/query-dispatch-formatting.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-formatting.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-formatting.js +6 -0
- package/sdk/dist/query/query-dispatch-formatting.js.map +1 -0
- package/sdk/dist/query/query-dispatch-input-validation.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-input-validation.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-input-validation.js +6 -0
- package/sdk/dist/query/query-dispatch-input-validation.js.map +1 -0
- package/sdk/dist/query/query-dispatch-observability.d.ts +2 -0
- package/sdk/dist/query/query-dispatch-observability.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-observability.js +7 -0
- package/sdk/dist/query/query-dispatch-observability.js.map +1 -0
- package/sdk/dist/query/query-dispatch-plan.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-plan.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-plan.js +6 -0
- package/sdk/dist/query/query-dispatch-plan.js.map +1 -0
- package/sdk/dist/query/query-dispatch-result-builder.d.ts +6 -0
- package/sdk/dist/query/query-dispatch-result-builder.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch-result-builder.js +6 -0
- package/sdk/dist/query/query-dispatch-result-builder.js.map +1 -0
- package/sdk/dist/query/query-dispatch.d.ts +48 -0
- package/sdk/dist/query/query-dispatch.d.ts.map +1 -0
- package/sdk/dist/query/query-dispatch.js +175 -0
- package/sdk/dist/query/query-dispatch.js.map +1 -0
- package/sdk/dist/query/query-error-details-schema.d.ts +19 -0
- package/sdk/dist/query/query-error-details-schema.d.ts.map +1 -0
- package/sdk/dist/query/query-error-details-schema.js +10 -0
- package/sdk/dist/query/query-error-details-schema.js.map +1 -0
- package/sdk/dist/query/query-error-taxonomy.d.ts +38 -0
- package/sdk/dist/query/query-error-taxonomy.d.ts.map +1 -0
- package/sdk/dist/query/query-error-taxonomy.js +74 -0
- package/sdk/dist/query/query-error-taxonomy.js.map +1 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.d.ts +14 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.js +33 -0
- package/sdk/dist/query/query-fallback-bridge-adapter.js.map +1 -0
- package/sdk/dist/query/query-fallback-executor.d.ts +11 -0
- package/sdk/dist/query/query-fallback-executor.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-executor.js +31 -0
- package/sdk/dist/query/query-fallback-executor.js.map +1 -0
- package/sdk/dist/query/query-fallback-output-classifier.d.ts +6 -0
- package/sdk/dist/query/query-fallback-output-classifier.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-output-classifier.js +27 -0
- package/sdk/dist/query/query-fallback-output-classifier.js.map +1 -0
- package/sdk/dist/query/query-fallback-policy.d.ts +6 -0
- package/sdk/dist/query/query-fallback-policy.d.ts.map +1 -0
- package/sdk/dist/query/query-fallback-policy.js +7 -0
- package/sdk/dist/query/query-fallback-policy.js.map +1 -0
- package/sdk/dist/query/query-native-dispatch-adapter.d.ts +7 -0
- package/sdk/dist/query/query-native-dispatch-adapter.d.ts.map +1 -0
- package/sdk/dist/query/query-native-dispatch-adapter.js +6 -0
- package/sdk/dist/query/query-native-dispatch-adapter.js.map +1 -0
- package/sdk/dist/query/query-policy-capability.d.ts +10 -0
- package/sdk/dist/query/query-policy-capability.d.ts.map +1 -0
- package/sdk/dist/query/query-policy-capability.js +17 -0
- package/sdk/dist/query/query-policy-capability.js.map +1 -0
- package/sdk/dist/query/query-runtime-context.d.ts +19 -0
- package/sdk/dist/query/query-runtime-context.d.ts.map +1 -0
- package/sdk/dist/query/query-runtime-context.js +31 -0
- package/sdk/dist/query/query-runtime-context.js.map +1 -0
- package/sdk/dist/query/query-unknown-command-hints.d.ts +2 -0
- package/sdk/dist/query/query-unknown-command-hints.d.ts.map +1 -0
- package/sdk/dist/query/query-unknown-command-hints.js +6 -0
- package/sdk/dist/query/query-unknown-command-hints.js.map +1 -0
- package/sdk/dist/query/registry-assembly-descriptor.d.ts +12 -0
- package/sdk/dist/query/registry-assembly-descriptor.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly-descriptor.js +61 -0
- package/sdk/dist/query/registry-assembly-descriptor.js.map +1 -0
- package/sdk/dist/query/registry-assembly-invariants.d.ts +30 -0
- package/sdk/dist/query/registry-assembly-invariants.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly-invariants.js +77 -0
- package/sdk/dist/query/registry-assembly-invariants.js.map +1 -0
- package/sdk/dist/query/registry-assembly.d.ts +10 -0
- package/sdk/dist/query/registry-assembly.d.ts.map +1 -0
- package/sdk/dist/query/registry-assembly.js +53 -0
- package/sdk/dist/query/registry-assembly.js.map +1 -0
- package/sdk/dist/query/registry.d.ts +90 -0
- package/sdk/dist/query/registry.d.ts.map +1 -0
- package/sdk/dist/query/registry.js +129 -0
- package/sdk/dist/query/registry.js.map +1 -0
- package/sdk/dist/query/requirements-extract-from-plans.d.ts +9 -0
- package/sdk/dist/query/requirements-extract-from-plans.d.ts.map +1 -0
- package/sdk/dist/query/requirements-extract-from-plans.js +76 -0
- package/sdk/dist/query/requirements-extract-from-plans.js.map +1 -0
- package/sdk/dist/query/roadmap-update-plan-progress.d.ts +11 -0
- package/sdk/dist/query/roadmap-update-plan-progress.d.ts.map +1 -0
- package/sdk/dist/query/roadmap-update-plan-progress.js +124 -0
- package/sdk/dist/query/roadmap-update-plan-progress.js.map +1 -0
- package/sdk/dist/query/roadmap.d.ts +137 -0
- package/sdk/dist/query/roadmap.d.ts.map +1 -0
- package/sdk/dist/query/roadmap.js +753 -0
- package/sdk/dist/query/roadmap.js.map +1 -0
- package/sdk/dist/query/route-next-action.d.ts +9 -0
- package/sdk/dist/query/route-next-action.d.ts.map +1 -0
- package/sdk/dist/query/route-next-action.js +318 -0
- package/sdk/dist/query/route-next-action.js.map +1 -0
- package/sdk/dist/query/schema-detect.d.ts +21 -0
- package/sdk/dist/query/schema-detect.d.ts.map +1 -0
- package/sdk/dist/query/schema-detect.js +146 -0
- package/sdk/dist/query/schema-detect.js.map +1 -0
- package/sdk/dist/query/secrets.d.ts +27 -0
- package/sdk/dist/query/secrets.d.ts.map +1 -0
- package/sdk/dist/query/secrets.js +42 -0
- package/sdk/dist/query/secrets.js.map +1 -0
- package/sdk/dist/query/skill-manifest.d.ts +50 -0
- package/sdk/dist/query/skill-manifest.d.ts.map +1 -0
- package/sdk/dist/query/skill-manifest.js +171 -0
- package/sdk/dist/query/skill-manifest.js.map +1 -0
- package/sdk/dist/query/skills.d.ts +27 -0
- package/sdk/dist/query/skills.d.ts.map +1 -0
- package/sdk/dist/query/skills.js +137 -0
- package/sdk/dist/query/skills.js.map +1 -0
- package/sdk/dist/query/state-document.d.ts +14 -0
- package/sdk/dist/query/state-document.d.ts.map +1 -0
- package/sdk/dist/query/state-document.js +110 -0
- package/sdk/dist/query/state-document.js.map +1 -0
- package/sdk/dist/query/state-mutation.d.ts +224 -0
- package/sdk/dist/query/state-mutation.d.ts.map +1 -0
- package/sdk/dist/query/state-mutation.js +1539 -0
- package/sdk/dist/query/state-mutation.js.map +1 -0
- package/sdk/dist/query/state-project-load.d.ts +23 -0
- package/sdk/dist/query/state-project-load.d.ts.map +1 -0
- package/sdk/dist/query/state-project-load.js +75 -0
- package/sdk/dist/query/state-project-load.js.map +1 -0
- package/sdk/dist/query/state.d.ts +78 -0
- package/sdk/dist/query/state.d.ts.map +1 -0
- package/sdk/dist/query/state.js +430 -0
- package/sdk/dist/query/state.js.map +1 -0
- package/sdk/dist/query/summary.d.ts +18 -0
- package/sdk/dist/query/summary.d.ts.map +1 -0
- package/sdk/dist/query/summary.js +249 -0
- package/sdk/dist/query/summary.js.map +1 -0
- package/sdk/dist/query/template.d.ts +46 -0
- package/sdk/dist/query/template.d.ts.map +1 -0
- package/sdk/dist/query/template.js +210 -0
- package/sdk/dist/query/template.js.map +1 -0
- package/sdk/dist/query/uat.d.ts +34 -0
- package/sdk/dist/query/uat.d.ts.map +1 -0
- package/sdk/dist/query/uat.js +339 -0
- package/sdk/dist/query/uat.js.map +1 -0
- package/sdk/dist/query/utils.d.ts +59 -0
- package/sdk/dist/query/utils.d.ts.map +1 -0
- package/sdk/dist/query/utils.js +74 -0
- package/sdk/dist/query/utils.js.map +1 -0
- package/sdk/dist/query/validate.d.ts +67 -0
- package/sdk/dist/query/validate.d.ts.map +1 -0
- package/sdk/dist/query/validate.js +908 -0
- package/sdk/dist/query/validate.js.map +1 -0
- package/sdk/dist/query/verify.d.ts +110 -0
- package/sdk/dist/query/verify.d.ts.map +1 -0
- package/sdk/dist/query/verify.js +631 -0
- package/sdk/dist/query/verify.js.map +1 -0
- package/sdk/dist/query/websearch.d.ts +24 -0
- package/sdk/dist/query/websearch.d.ts.map +1 -0
- package/sdk/dist/query/websearch.js +68 -0
- package/sdk/dist/query/websearch.js.map +1 -0
- package/sdk/dist/query/workspace.d.ts +62 -0
- package/sdk/dist/query/workspace.d.ts.map +1 -0
- package/sdk/dist/query/workspace.js +104 -0
- package/sdk/dist/query/workspace.js.map +1 -0
- package/sdk/dist/query/workstream-inventory.d.ts +52 -0
- package/sdk/dist/query/workstream-inventory.d.ts.map +1 -0
- package/sdk/dist/query/workstream-inventory.js +141 -0
- package/sdk/dist/query/workstream-inventory.js.map +1 -0
- package/sdk/dist/query/workstream.d.ts +35 -0
- package/sdk/dist/query/workstream.d.ts.map +1 -0
- package/sdk/dist/query/workstream.js +298 -0
- package/sdk/dist/query/workstream.js.map +1 -0
- package/sdk/dist/query/worktree.d.ts +3 -0
- package/sdk/dist/query/worktree.d.ts.map +1 -0
- package/sdk/dist/query/worktree.js +36 -0
- package/sdk/dist/query/worktree.js.map +1 -0
- package/sdk/dist/query-command-executor.d.ts +22 -0
- package/sdk/dist/query-command-executor.d.ts.map +1 -0
- package/sdk/dist/query-command-executor.js +22 -0
- package/sdk/dist/query-command-executor.js.map +1 -0
- package/sdk/dist/query-execution-policy.d.ts +24 -0
- package/sdk/dist/query-execution-policy.d.ts.map +1 -0
- package/sdk/dist/query-execution-policy.js +27 -0
- package/sdk/dist/query-execution-policy.js.map +1 -0
- package/sdk/dist/query-failure-classification.d.ts +9 -0
- package/sdk/dist/query-failure-classification.d.ts.map +1 -0
- package/sdk/dist/query-failure-classification.js +32 -0
- package/sdk/dist/query-failure-classification.js.map +1 -0
- package/sdk/dist/query-hotpath-methods.d.ts +19 -0
- package/sdk/dist/query-hotpath-methods.d.ts.map +1 -0
- package/sdk/dist/query-hotpath-methods.js +34 -0
- package/sdk/dist/query-hotpath-methods.js.map +1 -0
- package/sdk/dist/query-native-direct-adapter.d.ts +20 -0
- package/sdk/dist/query-native-direct-adapter.d.ts.map +1 -0
- package/sdk/dist/query-native-direct-adapter.js +52 -0
- package/sdk/dist/query-native-direct-adapter.js.map +1 -0
- package/sdk/dist/query-native-hotpath-adapter.d.ts +15 -0
- package/sdk/dist/query-native-hotpath-adapter.d.ts.map +1 -0
- package/sdk/dist/query-native-hotpath-adapter.js +32 -0
- package/sdk/dist/query-native-hotpath-adapter.js.map +1 -0
- package/sdk/dist/query-raw-output-projection.d.ts +6 -0
- package/sdk/dist/query-raw-output-projection.d.ts.map +1 -0
- package/sdk/dist/query-raw-output-projection.js +67 -0
- package/sdk/dist/query-raw-output-projection.js.map +1 -0
- package/sdk/dist/query-runtime-bridge.d.ts +61 -0
- package/sdk/dist/query-runtime-bridge.d.ts.map +1 -0
- package/sdk/dist/query-runtime-bridge.js +144 -0
- package/sdk/dist/query-runtime-bridge.js.map +1 -0
- package/sdk/dist/query-sdd-tools-path.d.ts +2 -0
- package/sdk/dist/query-sdd-tools-path.d.ts.map +1 -0
- package/sdk/dist/query-sdd-tools-path.js +2 -0
- package/sdk/dist/query-sdd-tools-path.js.map +1 -0
- package/sdk/dist/query-sdd-tools-runtime.d.ts +20 -0
- package/sdk/dist/query-sdd-tools-runtime.d.ts.map +1 -0
- package/sdk/dist/query-sdd-tools-runtime.js +47 -0
- package/sdk/dist/query-sdd-tools-runtime.js.map +1 -0
- package/sdk/dist/query-subprocess-adapter.d.ts +18 -0
- package/sdk/dist/query-subprocess-adapter.d.ts.map +1 -0
- package/sdk/dist/query-subprocess-adapter.js +92 -0
- package/sdk/dist/query-subprocess-adapter.js.map +1 -0
- package/sdk/dist/query-tools-error-factory.d.ts +16 -0
- package/sdk/dist/query-tools-error-factory.d.ts.map +1 -0
- package/sdk/dist/query-tools-error-factory.js +33 -0
- package/sdk/dist/query-tools-error-factory.js.map +1 -0
- package/sdk/dist/research-gate.d.ts +24 -0
- package/sdk/dist/research-gate.d.ts.map +1 -0
- package/sdk/dist/research-gate.js +70 -0
- package/sdk/dist/research-gate.js.map +1 -0
- package/sdk/dist/runtime-gate.d.ts +14 -0
- package/sdk/dist/runtime-gate.d.ts.map +1 -0
- package/sdk/dist/runtime-gate.js +48 -0
- package/sdk/dist/runtime-gate.js.map +1 -0
- package/sdk/dist/sdd-tools-error.d.ts +23 -0
- package/sdk/dist/sdd-tools-error.d.ts.map +1 -0
- package/sdk/dist/sdd-tools-error.js +29 -0
- package/sdk/dist/sdd-tools-error.js.map +1 -0
- package/sdk/dist/sdd-tools.d.ts +97 -0
- package/sdk/dist/sdd-tools.d.ts.map +1 -0
- package/sdk/dist/sdd-tools.js +168 -0
- package/sdk/dist/sdd-tools.js.map +1 -0
- package/sdk/dist/sdd-transport-policy.d.ts +10 -0
- package/sdk/dist/sdd-transport-policy.d.ts.map +1 -0
- package/sdk/dist/sdd-transport-policy.js +32 -0
- package/sdk/dist/sdd-transport-policy.js.map +1 -0
- package/sdk/dist/sdd-transport.d.ts +39 -0
- package/sdk/dist/sdd-transport.d.ts.map +1 -0
- package/sdk/dist/sdd-transport.js +78 -0
- package/sdk/dist/sdd-transport.js.map +1 -0
- package/sdk/dist/sdk-package-compatibility.d.ts +38 -0
- package/sdk/dist/sdk-package-compatibility.d.ts.map +1 -0
- package/sdk/dist/sdk-package-compatibility.js +90 -0
- package/sdk/dist/sdk-package-compatibility.js.map +1 -0
- package/sdk/dist/session-runner.d.ts +40 -0
- package/sdk/dist/session-runner.d.ts.map +1 -0
- package/sdk/dist/session-runner.js +274 -0
- package/sdk/dist/session-runner.js.map +1 -0
- package/sdk/dist/tool-scoping.d.ts +31 -0
- package/sdk/dist/tool-scoping.d.ts.map +1 -0
- package/sdk/dist/tool-scoping.js +54 -0
- package/sdk/dist/tool-scoping.js.map +1 -0
- package/sdk/dist/types.d.ts +794 -0
- package/sdk/dist/types.d.ts.map +1 -0
- package/sdk/dist/types.js +77 -0
- package/sdk/dist/types.js.map +1 -0
- package/sdk/dist/workstream-name-policy.d.ts +13 -0
- package/sdk/dist/workstream-name-policy.d.ts.map +1 -0
- package/sdk/dist/workstream-name-policy.js +24 -0
- package/sdk/dist/workstream-name-policy.js.map +1 -0
- package/sdk/dist/workstream-utils.d.ts +15 -0
- package/sdk/dist/workstream-utils.d.ts.map +1 -0
- package/sdk/dist/workstream-utils.js +21 -0
- package/sdk/dist/workstream-utils.js.map +1 -0
- package/sdk/dist/ws-transport.d.ts +32 -0
- package/sdk/dist/ws-transport.d.ts.map +1 -0
- package/sdk/dist/ws-transport.js +84 -0
- package/sdk/dist/ws-transport.js.map +1 -0
- package/sdk/package-lock.json +2502 -0
- package/sdk/package.json +57 -0
- package/sdk/prompts/templates/project.md +186 -0
- package/sdk/prompts/templates/requirements.md +231 -0
- package/sdk/prompts/templates/research-project/ARCHITECTURE.md +204 -0
- package/sdk/prompts/templates/research-project/FEATURES.md +147 -0
- package/sdk/prompts/templates/research-project/PITFALLS.md +200 -0
- package/sdk/prompts/templates/research-project/STACK.md +120 -0
- package/sdk/prompts/templates/research-project/SUMMARY.md +170 -0
- package/sdk/prompts/templates/roadmap.md +202 -0
- package/sdk/prompts/templates/state.md +175 -0
- package/sdk/shared/model-catalog.json +122 -0
- package/sdk/src/assembled-prompts.test.ts +349 -0
- package/sdk/src/bug-3591-sddtools-runtime-workstream.test.ts +179 -0
- package/sdk/src/cli-transport.test.ts +388 -0
- package/sdk/src/cli-transport.ts +130 -0
- package/sdk/src/cli.test.ts +426 -0
- package/sdk/src/cli.ts +589 -0
- package/sdk/src/config.test.ts +271 -0
- package/sdk/src/config.ts +218 -0
- package/sdk/src/context-engine.test.ts +295 -0
- package/sdk/src/context-engine.ts +170 -0
- package/sdk/src/context-truncation.test.ts +163 -0
- package/sdk/src/context-truncation.ts +233 -0
- package/sdk/src/e2e.integration.test.ts +181 -0
- package/sdk/src/errors.ts +72 -0
- package/sdk/src/event-stream.test.ts +661 -0
- package/sdk/src/event-stream.ts +441 -0
- package/sdk/src/golden/capture.ts +95 -0
- package/sdk/src/golden/fixtures/generate-slug.golden.json +1 -0
- package/sdk/src/golden/fixtures/profile-sample-sessions/demo-project/sample.jsonl +3 -0
- package/sdk/src/golden/fixtures/summary-extract-sample.md +26 -0
- package/sdk/src/golden/fixtures/uat-render-checkpoint-sample.md +15 -0
- package/sdk/src/golden/golden-integration-covered.ts +30 -0
- package/sdk/src/golden/golden-mutation-covered.ts +17 -0
- package/sdk/src/golden/golden-policy.test.ts +8 -0
- package/sdk/src/golden/golden-policy.ts +120 -0
- package/sdk/src/golden/golden.integration.test.ts +677 -0
- package/sdk/src/golden/init-golden-normalize.ts +15 -0
- package/sdk/src/golden/read-only-golden-rows.ts +77 -0
- package/sdk/src/golden/read-only-parity.integration.test.ts +133 -0
- package/sdk/src/golden/registry-canonical-commands.ts +31 -0
- package/sdk/src/index.ts +352 -0
- package/sdk/src/init-e2e.integration.test.ts +138 -0
- package/sdk/src/init-runner.test.ts +740 -0
- package/sdk/src/init-runner.ts +734 -0
- package/sdk/src/lifecycle-e2e.integration.test.ts +258 -0
- package/sdk/src/logger.test.ts +149 -0
- package/sdk/src/logger.ts +113 -0
- package/sdk/src/milestone-runner.test.ts +421 -0
- package/sdk/src/model-catalog.ts +70 -0
- package/sdk/src/phase-prompt.test.ts +535 -0
- package/sdk/src/phase-prompt.ts +259 -0
- package/sdk/src/phase-runner-types.test.ts +421 -0
- package/sdk/src/phase-runner.integration.test.ts +377 -0
- package/sdk/src/phase-runner.test.ts +2720 -0
- package/sdk/src/phase-runner.ts +1442 -0
- package/sdk/src/plan-parser.test.ts +579 -0
- package/sdk/src/plan-parser.ts +431 -0
- package/sdk/src/planning-journal.test.ts +70 -0
- package/sdk/src/planning-journal.ts +153 -0
- package/sdk/src/planning-runtime.test.ts +29 -0
- package/sdk/src/planning-runtime.ts +100 -0
- package/sdk/src/prompt-builder.test.ts +318 -0
- package/sdk/src/prompt-builder.ts +218 -0
- package/sdk/src/prompt-sanitizer.test.ts +260 -0
- package/sdk/src/prompt-sanitizer.ts +116 -0
- package/sdk/src/query/QUERY-HANDLERS.md +349 -0
- package/sdk/src/query/active-workstream-store.ts +50 -0
- package/sdk/src/query/agent-failure-classifier.test.ts +157 -0
- package/sdk/src/query/agent-failure-classifier.ts +105 -0
- package/sdk/src/query/audit-open.ts +722 -0
- package/sdk/src/query/check-auto-mode.test.ts +77 -0
- package/sdk/src/query/check-auto-mode.ts +49 -0
- package/sdk/src/query/check-completion.test.ts +113 -0
- package/sdk/src/query/check-completion.ts +182 -0
- package/sdk/src/query/check-decision-coverage.test.ts +519 -0
- package/sdk/src/query/check-decision-coverage.ts +554 -0
- package/sdk/src/query/check-gates.test.ts +103 -0
- package/sdk/src/query/check-gates.ts +112 -0
- package/sdk/src/query/check-ship-ready.test.ts +111 -0
- package/sdk/src/query/check-ship-ready.ts +104 -0
- package/sdk/src/query/check-verification-status.test.ts +143 -0
- package/sdk/src/query/check-verification-status.ts +160 -0
- package/sdk/src/query/command-aliases.generated.ts +156 -0
- package/sdk/src/query/command-catalog.ts +31 -0
- package/sdk/src/query/command-definition.test.ts +47 -0
- package/sdk/src/query/command-definition.ts +70 -0
- package/sdk/src/query/command-family-handlers.ts +117 -0
- package/sdk/src/query/command-manifest.init.ts +24 -0
- package/sdk/src/query/command-manifest.non-family.ts +85 -0
- package/sdk/src/query/command-manifest.phase.ts +16 -0
- package/sdk/src/query/command-manifest.phases.ts +11 -0
- package/sdk/src/query/command-manifest.roadmap.ts +11 -0
- package/sdk/src/query/command-manifest.state.ts +31 -0
- package/sdk/src/query/command-manifest.ts +17 -0
- package/sdk/src/query/command-manifest.types.ts +13 -0
- package/sdk/src/query/command-manifest.validate.ts +11 -0
- package/sdk/src/query/command-manifest.verify.ts +15 -0
- package/sdk/src/query/command-resolution.test.ts +70 -0
- package/sdk/src/query/command-seam-coverage.test.ts +118 -0
- package/sdk/src/query/command-static-catalog-domain.ts +117 -0
- package/sdk/src/query/command-static-catalog-foundation.ts +103 -0
- package/sdk/src/query/command-topology.test.ts +28 -0
- package/sdk/src/query/command-topology.ts +114 -0
- package/sdk/src/query/commands-list.test.ts +36 -0
- package/sdk/src/query/commands-list.ts +19 -0
- package/sdk/src/query/commit.test.ts +485 -0
- package/sdk/src/query/commit.ts +383 -0
- package/sdk/src/query/config-gates.test.ts +89 -0
- package/sdk/src/query/config-gates.ts +69 -0
- package/sdk/src/query/config-mutation.test.ts +598 -0
- package/sdk/src/query/config-mutation.ts +575 -0
- package/sdk/src/query/config-query.test.ts +367 -0
- package/sdk/src/query/config-query.ts +244 -0
- package/sdk/src/query/config-schema.ts +159 -0
- package/sdk/src/query/decisions.test.ts +215 -0
- package/sdk/src/query/decisions.ts +192 -0
- package/sdk/src/query/decomposed-handlers.test.ts +431 -0
- package/sdk/src/query/detect-custom-files.test.ts +115 -0
- package/sdk/src/query/detect-custom-files.ts +96 -0
- package/sdk/src/query/detect-phase-type.test.ts +105 -0
- package/sdk/src/query/detect-phase-type.ts +141 -0
- package/sdk/src/query/docs-init.ts +258 -0
- package/sdk/src/query/fallow-audit.ts +88 -0
- package/sdk/src/query/frontmatter-array.test.ts +14 -0
- package/sdk/src/query/frontmatter-mutation.test.ts +259 -0
- package/sdk/src/query/frontmatter-mutation.ts +343 -0
- package/sdk/src/query/frontmatter.test.ts +326 -0
- package/sdk/src/query/frontmatter.ts +395 -0
- package/sdk/src/query/helpers.test.ts +615 -0
- package/sdk/src/query/helpers.ts +646 -0
- package/sdk/src/query/index-thin-seam.test.ts +16 -0
- package/sdk/src/query/index.ts +9 -0
- package/sdk/src/query/init-complex.test.ts +616 -0
- package/sdk/src/query/init-complex.ts +799 -0
- package/sdk/src/query/init-progress-precedence.test.ts +177 -0
- package/sdk/src/query/init-workstream-milestone-op.test.ts +321 -0
- package/sdk/src/query/init.test.ts +792 -0
- package/sdk/src/query/init.ts +1262 -0
- package/sdk/src/query/intel.test.ts +90 -0
- package/sdk/src/query/intel.ts +404 -0
- package/sdk/src/query/mutation-event-decorator.test.ts +45 -0
- package/sdk/src/query/mutation-event-decorator.ts +37 -0
- package/sdk/src/query/mutation-event-mapper.test.ts +33 -0
- package/sdk/src/query/mutation-event-mapper.ts +102 -0
- package/sdk/src/query/mvp.test.ts +335 -0
- package/sdk/src/query/mvp.ts +292 -0
- package/sdk/src/query/normalize-query-command.test.ts +102 -0
- package/sdk/src/query/phase-filesystem-adapter.ts +35 -0
- package/sdk/src/query/phase-lifecycle-policy.ts +171 -0
- package/sdk/src/query/phase-lifecycle.test.ts +1750 -0
- package/sdk/src/query/phase-lifecycle.ts +1833 -0
- package/sdk/src/query/phase-list-queries.test.ts +88 -0
- package/sdk/src/query/phase-list-queries.ts +152 -0
- package/sdk/src/query/phase-ready.test.ts +65 -0
- package/sdk/src/query/phase-ready.ts +159 -0
- package/sdk/src/query/phase-roadmap-mutation.ts +77 -0
- package/sdk/src/query/phase.test.ts +651 -0
- package/sdk/src/query/phase.ts +550 -0
- package/sdk/src/query/pipeline.test.ts +169 -0
- package/sdk/src/query/pipeline.ts +243 -0
- package/sdk/src/query/plan-scan.test.ts +35 -0
- package/sdk/src/query/plan-scan.ts +82 -0
- package/sdk/src/query/plan-task-structure.test.ts +65 -0
- package/sdk/src/query/plan-task-structure.ts +63 -0
- package/sdk/src/query/policy-convergence.test.ts +28 -0
- package/sdk/src/query/profile-extract-messages.ts +247 -0
- package/sdk/src/query/profile-output.ts +929 -0
- package/sdk/src/query/profile-questionnaire-data.ts +181 -0
- package/sdk/src/query/profile-sample.ts +184 -0
- package/sdk/src/query/profile-scan-sessions.ts +174 -0
- package/sdk/src/query/profile.test.ts +136 -0
- package/sdk/src/query/profile.ts +337 -0
- package/sdk/src/query/progress.test.ts +156 -0
- package/sdk/src/query/progress.ts +566 -0
- package/sdk/src/query/query-cli-adapter.test.ts +79 -0
- package/sdk/src/query/query-cli-adapter.ts +39 -0
- package/sdk/src/query/query-cli-output.test.ts +33 -0
- package/sdk/src/query/query-cli-output.ts +35 -0
- package/sdk/src/query/query-command-diagnosis.test.ts +22 -0
- package/sdk/src/query/query-command-diagnosis.ts +5 -0
- package/sdk/src/query/query-command-resolution-strategy.test.ts +34 -0
- package/sdk/src/query/query-command-resolution-strategy.ts +121 -0
- package/sdk/src/query/query-command-semantics.test.ts +22 -0
- package/sdk/src/query/query-command-semantics.ts +22 -0
- package/sdk/src/query/query-dispatch-contract.ts +30 -0
- package/sdk/src/query/query-dispatch-error-mapper.test.ts +62 -0
- package/sdk/src/query/query-dispatch-error-mapper.ts +5 -0
- package/sdk/src/query/query-dispatch-formatting.test.ts +28 -0
- package/sdk/src/query/query-dispatch-formatting.ts +5 -0
- package/sdk/src/query/query-dispatch-input-validation.test.ts +23 -0
- package/sdk/src/query/query-dispatch-input-validation.ts +5 -0
- package/sdk/src/query/query-dispatch-observability.test.ts +10 -0
- package/sdk/src/query/query-dispatch-observability.ts +6 -0
- package/sdk/src/query/query-dispatch-plan.test.ts +25 -0
- package/sdk/src/query/query-dispatch-plan.ts +5 -0
- package/sdk/src/query/query-dispatch-result-builder.test.ts +16 -0
- package/sdk/src/query/query-dispatch-result-builder.ts +5 -0
- package/sdk/src/query/query-dispatch.test.ts +399 -0
- package/sdk/src/query/query-dispatch.ts +243 -0
- package/sdk/src/query/query-error-details-schema.ts +29 -0
- package/sdk/src/query/query-error-taxonomy.test.ts +39 -0
- package/sdk/src/query/query-error-taxonomy.ts +117 -0
- package/sdk/src/query/query-fallback-bridge-adapter.test.ts +32 -0
- package/sdk/src/query/query-fallback-bridge-adapter.ts +54 -0
- package/sdk/src/query/query-fallback-executor.test.ts +82 -0
- package/sdk/src/query/query-fallback-executor.ts +44 -0
- package/sdk/src/query/query-fallback-output-classifier.test.ts +36 -0
- package/sdk/src/query/query-fallback-output-classifier.ts +31 -0
- package/sdk/src/query/query-fallback-policy.test.ts +13 -0
- package/sdk/src/query/query-fallback-policy.ts +11 -0
- package/sdk/src/query/query-native-dispatch-adapter.ts +16 -0
- package/sdk/src/query/query-policy-capability.test.ts +10 -0
- package/sdk/src/query/query-policy-capability.ts +26 -0
- package/sdk/src/query/query-policy-snapshot.test.ts +9 -0
- package/sdk/src/query/query-registry-capability.test.ts +14 -0
- package/sdk/src/query/query-runtime-context.ts +44 -0
- package/sdk/src/query/query-unknown-command-hints.test.ts +9 -0
- package/sdk/src/query/query-unknown-command-hints.ts +5 -0
- package/sdk/src/query/registry-assembly-descriptor.ts +87 -0
- package/sdk/src/query/registry-assembly-invariants.ts +127 -0
- package/sdk/src/query/registry-assembly.test.ts +138 -0
- package/sdk/src/query/registry-assembly.ts +78 -0
- package/sdk/src/query/registry.test.ts +208 -0
- package/sdk/src/query/registry.ts +142 -0
- package/sdk/src/query/requirements-extract-from-plans.test.ts +58 -0
- package/sdk/src/query/requirements-extract-from-plans.ts +86 -0
- package/sdk/src/query/roadmap-update-plan-progress.test.ts +233 -0
- package/sdk/src/query/roadmap-update-plan-progress.ts +159 -0
- package/sdk/src/query/roadmap.test.ts +1181 -0
- package/sdk/src/query/roadmap.ts +894 -0
- package/sdk/src/query/route-next-action.test.ts +61 -0
- package/sdk/src/query/route-next-action.ts +345 -0
- package/sdk/src/query/schema-detect.ts +189 -0
- package/sdk/src/query/secrets.test.ts +66 -0
- package/sdk/src/query/secrets.ts +43 -0
- package/sdk/src/query/skill-manifest.test.ts +62 -0
- package/sdk/src/query/skill-manifest.ts +216 -0
- package/sdk/src/query/skills.test.ts +234 -0
- package/sdk/src/query/skills.ts +143 -0
- package/sdk/src/query/state-document.test.ts +197 -0
- package/sdk/src/query/state-document.ts +129 -0
- package/sdk/src/query/state-mutation.test.ts +1198 -0
- package/sdk/src/query/state-mutation.ts +1718 -0
- package/sdk/src/query/state-project-load.ts +80 -0
- package/sdk/src/query/state.test.ts +616 -0
- package/sdk/src/query/state.ts +463 -0
- package/sdk/src/query/sub-repos-root.integration.test.ts +79 -0
- package/sdk/src/query/summary.test.ts +95 -0
- package/sdk/src/query/summary.ts +296 -0
- package/sdk/src/query/template.test.ts +180 -0
- package/sdk/src/query/template.ts +242 -0
- package/sdk/src/query/uat.test.ts +77 -0
- package/sdk/src/query/uat.ts +365 -0
- package/sdk/src/query/utils.test.ts +82 -0
- package/sdk/src/query/utils.ts +106 -0
- package/sdk/src/query/validate.test.ts +831 -0
- package/sdk/src/query/validate.ts +952 -0
- package/sdk/src/query/verify.test.ts +414 -0
- package/sdk/src/query/verify.ts +692 -0
- package/sdk/src/query/websearch.test.ts +31 -0
- package/sdk/src/query/websearch.ts +82 -0
- package/sdk/src/query/workspace.test.ts +120 -0
- package/sdk/src/query/workspace.ts +145 -0
- package/sdk/src/query/workstream-inventory.ts +195 -0
- package/sdk/src/query/workstream.test.ts +153 -0
- package/sdk/src/query/workstream.ts +324 -0
- package/sdk/src/query/worktree.ts +39 -0
- package/sdk/src/query-command-executor.ts +31 -0
- package/sdk/src/query-execution-policy.test.ts +52 -0
- package/sdk/src/query-execution-policy.ts +46 -0
- package/sdk/src/query-failure-classification.test.ts +23 -0
- package/sdk/src/query-failure-classification.ts +42 -0
- package/sdk/src/query-hotpath-methods.ts +48 -0
- package/sdk/src/query-native-direct-adapter.test.ts +35 -0
- package/sdk/src/query-native-direct-adapter.ts +70 -0
- package/sdk/src/query-native-hotpath-adapter.test.ts +43 -0
- package/sdk/src/query-native-hotpath-adapter.ts +45 -0
- package/sdk/src/query-raw-output-projection.test.ts +39 -0
- package/sdk/src/query-raw-output-projection.ts +74 -0
- package/sdk/src/query-runtime-bridge.test.ts +150 -0
- package/sdk/src/query-runtime-bridge.ts +215 -0
- package/sdk/src/query-runtime-seam-coverage.test.ts +20 -0
- package/sdk/src/query-sdd-tools-path.ts +1 -0
- package/sdk/src/query-sdd-tools-runtime.ts +89 -0
- package/sdk/src/query-subprocess-adapter.test.ts +84 -0
- package/sdk/src/query-subprocess-adapter.ts +146 -0
- package/sdk/src/query-tools-error-factory.test.ts +35 -0
- package/sdk/src/query-tools-error-factory.ts +76 -0
- package/sdk/src/research-gate.test.ts +190 -0
- package/sdk/src/research-gate.ts +94 -0
- package/sdk/src/runtime-bridge-options.test.ts +33 -0
- package/sdk/src/runtime-gate.test.ts +84 -0
- package/sdk/src/runtime-gate.ts +52 -0
- package/sdk/src/sdd-tools-error.test.ts +21 -0
- package/sdk/src/sdd-tools-error.ts +65 -0
- package/sdk/src/sdd-tools.test.ts +472 -0
- package/sdk/src/sdd-tools.ts +237 -0
- package/sdk/src/sdd-transport-policy.test.ts +34 -0
- package/sdk/src/sdd-transport-policy.ts +48 -0
- package/sdk/src/sdd-transport.test.ts +292 -0
- package/sdk/src/sdd-transport.ts +117 -0
- package/sdk/src/sdk-package-compatibility.test.ts +97 -0
- package/sdk/src/sdk-package-compatibility.ts +141 -0
- package/sdk/src/session-runner.test.ts +164 -0
- package/sdk/src/session-runner.ts +327 -0
- package/sdk/src/tool-scoping.test.ts +160 -0
- package/sdk/src/tool-scoping.ts +61 -0
- package/sdk/src/types.ts +927 -0
- package/sdk/src/workflow-agent-skills-consistency.test.ts +98 -0
- package/sdk/src/workstream-name-policy.ts +24 -0
- package/sdk/src/workstream-utils.ts +21 -0
- package/sdk/src/ws-flag.test.ts +285 -0
- package/sdk/src/ws-transport.test.ts +161 -0
- package/sdk/src/ws-transport.ts +93 -0
- package/sdk/tsconfig.json +20 -0
- package/commands/sdd/add-backlog.md +0 -76
- package/commands/sdd/add-phase.md +0 -43
- package/commands/sdd/add-todo.md +0 -47
- package/commands/sdd/analyze-dependencies.md +0 -34
- package/commands/sdd/check-todos.md +0 -45
- package/commands/sdd/code-review-fix.md +0 -52
- package/commands/sdd/do.md +0 -30
- package/commands/sdd/from-sdd2.md +0 -45
- package/commands/sdd/insert-phase.md +0 -32
- package/commands/sdd/intel.md +0 -179
- package/commands/sdd/join-discord.md +0 -19
- package/commands/sdd/list-phase-assumptions.md +0 -46
- package/commands/sdd/list-workspaces.md +0 -19
- package/commands/sdd/new-workspace.md +0 -44
- package/commands/sdd/next.md +0 -26
- package/commands/sdd/note.md +0 -34
- package/commands/sdd/plan-milestone-gaps.md +0 -34
- package/commands/sdd/plant-seed.md +0 -28
- package/commands/sdd/remove-phase.md +0 -31
- package/commands/sdd/remove-workspace.md +0 -26
- package/commands/sdd/research-phase.md +0 -195
- package/commands/sdd/scan.md +0 -26
- package/commands/sdd/session-report.md +0 -19
- package/commands/sdd/set-profile.md +0 -12
- package/scripts/sync-upstream.sh +0 -56
- package/sdd/workflows/research-phase.md +0 -82
|
@@ -10,56 +10,57 @@ You are a thinking partner, not an interviewer. The user is the visionary — yo
|
|
|
10
10
|
@~/.claude/sdd/references/universal-anti-patterns.md
|
|
11
11
|
</required_reading>
|
|
12
12
|
|
|
13
|
+
<progressive_disclosure>
|
|
14
|
+
**Per-mode bodies, templates, and the advisor flow are lazy-loaded** to keep
|
|
15
|
+
this file under the 500-line workflow budget (#2551, mirrors #2361's agent
|
|
16
|
+
budget). Read only the files needed for the current invocation:
|
|
17
|
+
|
|
18
|
+
| When | Read |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `--power` in $ARGUMENTS | `workflows/discuss-phase/modes/power.md` (then exit standard flow) |
|
|
21
|
+
| `--all` in $ARGUMENTS | `workflows/discuss-phase/modes/all.md` overlay |
|
|
22
|
+
| `--auto` in $ARGUMENTS | `workflows/discuss-phase/modes/auto.md` + `workflows/discuss-phase/modes/chain.md` (auto-advance) |
|
|
23
|
+
| `--chain` in $ARGUMENTS | `workflows/discuss-phase/modes/default.md` + `workflows/discuss-phase/modes/chain.md` |
|
|
24
|
+
| `--text` in $ARGUMENTS or `workflow.text_mode: true` | `workflows/discuss-phase/modes/text.md` overlay |
|
|
25
|
+
| `--batch` in $ARGUMENTS | `workflows/discuss-phase/modes/batch.md` overlay |
|
|
26
|
+
| `--analyze` in $ARGUMENTS | `workflows/discuss-phase/modes/analyze.md` overlay |
|
|
27
|
+
| ADVISOR_MODE = true (USER-PROFILE.md exists) | `workflows/discuss-phase/modes/advisor.md` |
|
|
28
|
+
| no flags above | `workflows/discuss-phase/modes/default.md` |
|
|
29
|
+
| in `write_context` step | `workflows/discuss-phase/templates/context.md` |
|
|
30
|
+
| in `git_commit` step | `workflows/discuss-phase/templates/discussion-log.md` |
|
|
31
|
+
| writing checkpoints | `workflows/discuss-phase/templates/checkpoint.json` |
|
|
32
|
+
|
|
33
|
+
Do not Read mode files unless the corresponding flag/condition is set.
|
|
34
|
+
</progressive_disclosure>
|
|
35
|
+
|
|
13
36
|
<downstream_awareness>
|
|
14
37
|
**CONTEXT.md feeds into:**
|
|
15
38
|
|
|
16
39
|
1. **sdd-phase-researcher** — Reads CONTEXT.md to know WHAT to research
|
|
17
|
-
- "User wants card-based layout" → researcher investigates card component patterns
|
|
18
|
-
- "Infinite scroll decided" → researcher looks into virtualization libraries
|
|
19
|
-
|
|
20
40
|
2. **sdd-planner** — Reads CONTEXT.md to know WHAT decisions are locked
|
|
21
|
-
- "Pull-to-refresh on mobile" → planner includes that in task specs
|
|
22
|
-
- "Claude's Discretion: loading skeleton" → planner can decide approach
|
|
23
41
|
|
|
24
42
|
**Your job:** Capture decisions clearly enough that downstream agents can act on them without asking the user again.
|
|
25
|
-
|
|
26
43
|
**Not your job:** Figure out HOW to implement. That's what research and planning do with the decisions you capture.
|
|
27
44
|
</downstream_awareness>
|
|
28
45
|
|
|
29
46
|
<philosophy>
|
|
30
47
|
**User = founder/visionary. Claude = builder.**
|
|
31
48
|
|
|
32
|
-
The user knows:
|
|
33
|
-
- How they imagine it working
|
|
34
|
-
- What it should look/feel like
|
|
35
|
-
- What's essential vs nice-to-have
|
|
36
|
-
- Specific behaviors or references they have in mind
|
|
49
|
+
The user knows: how they imagine it working, what it should look/feel like, what's essential vs nice-to-have, specific behaviors or references they have in mind.
|
|
37
50
|
|
|
38
|
-
The user doesn't know (and shouldn't be asked):
|
|
39
|
-
- Codebase patterns (researcher reads the code)
|
|
40
|
-
- Technical risks (researcher identifies these)
|
|
41
|
-
- Implementation approach (planner figures this out)
|
|
42
|
-
- Success metrics (inferred from the work)
|
|
51
|
+
The user doesn't know (and shouldn't be asked): codebase patterns (researcher reads the code), technical risks (researcher identifies these), implementation approach (planner figures this out), success metrics (inferred from the work).
|
|
43
52
|
|
|
44
53
|
Ask about vision and implementation choices. Capture decisions for downstream agents.
|
|
45
54
|
</philosophy>
|
|
46
55
|
|
|
47
56
|
<scope_guardrail>
|
|
48
|
-
**CRITICAL: No scope creep.**
|
|
49
|
-
|
|
50
|
-
The phase boundary comes from ROADMAP.md and is FIXED. Discussion clarifies HOW to implement what's scoped, never WHETHER to add new capabilities.
|
|
57
|
+
**CRITICAL: No scope creep.** The phase boundary comes from ROADMAP.md and is FIXED. Discussion clarifies HOW to implement what's scoped, never WHETHER to add new capabilities.
|
|
51
58
|
|
|
52
|
-
**Allowed (clarifying ambiguity):**
|
|
53
|
-
- "How should posts be displayed?" (layout, density, info shown)
|
|
54
|
-
- "What happens on empty state?" (within the feature)
|
|
55
|
-
- "Pull to refresh or manual?" (behavior choice)
|
|
59
|
+
**Allowed (clarifying ambiguity):** "How should posts be displayed?" (layout), "What happens on empty state?" (within the feature), "Pull to refresh or manual?" (behavior choice).
|
|
56
60
|
|
|
57
|
-
**Not allowed (scope creep):**
|
|
58
|
-
- "Should we also add comments?" (new capability)
|
|
59
|
-
- "What about search/filtering?" (new capability)
|
|
60
|
-
- "Maybe include bookmarking?" (new capability)
|
|
61
|
+
**Not allowed (scope creep):** "Should we also add comments?" / "What about search/filtering?" / "Maybe include bookmarking?" — those are new capabilities and belong in their own phase.
|
|
61
62
|
|
|
62
|
-
**
|
|
63
|
+
**Heuristic:** Does this clarify how we implement what's already in the phase, or does it add a new capability that could be its own phase?
|
|
63
64
|
|
|
64
65
|
**When user suggests scope creep:**
|
|
65
66
|
```
|
|
@@ -75,104 +76,78 @@ Capture the idea in a "Deferred Ideas" section. Don't lose it, don't act on it.
|
|
|
75
76
|
<gray_area_identification>
|
|
76
77
|
Gray areas are **implementation decisions the user cares about** — things that could go multiple ways and would change the result.
|
|
77
78
|
|
|
78
|
-
|
|
79
|
+
1. Read the phase goal from ROADMAP.md
|
|
80
|
+
2. Understand the domain — something users SEE / CALL / RUN / READ / something being ORGANIZED — and let that drive what kinds of decisions matter
|
|
81
|
+
3. Generate phase-specific gray areas (not generic categories)
|
|
79
82
|
|
|
80
|
-
|
|
81
|
-
2. **Understand the domain** — What kind of thing is being built?
|
|
82
|
-
- Something users SEE → visual presentation, interactions, states matter
|
|
83
|
-
- Something users CALL → interface contracts, responses, errors matter
|
|
84
|
-
- Something users RUN → invocation, output, behavior modes matter
|
|
85
|
-
- Something users READ → structure, tone, depth, flow matter
|
|
86
|
-
- Something being ORGANIZED → criteria, grouping, handling exceptions matter
|
|
87
|
-
3. **Generate phase-specific gray areas** — Not generic categories, but concrete decisions for THIS phase
|
|
88
|
-
|
|
89
|
-
**Don't use generic category labels** (UI, UX, Behavior). Generate specific gray areas:
|
|
83
|
+
**Don't use generic category labels** (UI, UX, Behavior). Generate specific gray areas. Examples:
|
|
90
84
|
|
|
91
85
|
```
|
|
92
|
-
Phase: "User authentication"
|
|
93
|
-
→
|
|
94
|
-
|
|
95
|
-
Phase: "
|
|
96
|
-
→ Grouping criteria, Duplicate handling, Naming convention, Folder structure
|
|
97
|
-
|
|
98
|
-
Phase: "CLI for database backups"
|
|
99
|
-
→ Output format, Flag design, Progress reporting, Error recovery
|
|
100
|
-
|
|
101
|
-
Phase: "API documentation"
|
|
102
|
-
→ Structure/navigation, Code examples depth, Versioning approach, Interactive elements
|
|
86
|
+
Phase: "User authentication" → Session handling, Error responses, Multi-device policy, Recovery flow
|
|
87
|
+
Phase: "Organize photo library" → Grouping criteria, Duplicate handling, Naming convention, Folder structure
|
|
88
|
+
Phase: "CLI for database backups"→ Output format, Flag design, Progress reporting, Error recovery
|
|
89
|
+
Phase: "API documentation" → Structure/navigation, Code examples depth, Versioning approach, Interactive elements
|
|
103
90
|
```
|
|
104
91
|
|
|
105
|
-
**
|
|
106
|
-
|
|
107
|
-
**Claude handles these (don't ask):**
|
|
108
|
-
- Technical implementation details
|
|
109
|
-
- Architecture patterns
|
|
110
|
-
- Performance optimization
|
|
111
|
-
- Scope (roadmap defines this)
|
|
92
|
+
**Claude handles these (don't ask):** technical implementation details, architecture patterns, performance optimization, scope (roadmap defines this).
|
|
112
93
|
</gray_area_identification>
|
|
113
94
|
|
|
114
95
|
<answer_validation>
|
|
115
|
-
**IMPORTANT: Answer validation** — After every AskUserQuestion call,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
Never proceed with
|
|
119
|
-
|
|
120
|
-
**Text mode (`workflow.text_mode: true`
|
|
121
|
-
When text mode is active, **do not use AskUserQuestion at all**. Instead, present every
|
|
122
|
-
question as a plain-text numbered list and ask the user to type their choice number.
|
|
123
|
-
This is required for Claude Code remote sessions (`/rc` mode) where the Claude App
|
|
124
|
-
cannot forward TUI menu selections back to the host.
|
|
125
|
-
|
|
126
|
-
Enable text mode:
|
|
127
|
-
- Per-session: pass `--text` flag to any command (e.g., `/sdd-discuss-phase --text`)
|
|
128
|
-
- Per-project: `sdd-tools config-set workflow.text_mode true`
|
|
129
|
-
|
|
130
|
-
Text mode applies to ALL workflows in the session, not just discuss-phase.
|
|
96
|
+
**IMPORTANT: Answer validation** — After every AskUserQuestion call, if the response is empty/whitespace-only:
|
|
97
|
+
|
|
98
|
+
- **"Other" with empty text** (the user wants to type freeform): output `"What would you like to discuss?"`, STOP generating, wait for the user's next message, then reflect it back and continue. Do NOT retry AskUserQuestion or call any tools.
|
|
99
|
+
- **Any other empty response:** retry once with the same parameters; if still empty, present options as a plain-text numbered list. Never proceed with empty input.
|
|
100
|
+
|
|
101
|
+
**Text mode** (`--text` or `workflow.text_mode: true`): follow `workflows/discuss-phase/modes/text.md` — do not use AskUserQuestion at all.
|
|
131
102
|
</answer_validation>
|
|
132
103
|
|
|
133
104
|
<process>
|
|
134
105
|
|
|
135
|
-
**Express path available:** If you already have a PRD or acceptance criteria document, use `/sdd
|
|
106
|
+
**Express path available:** If you already have a PRD or acceptance criteria document, use `/sdd:plan-phase {phase} --prd path/to/prd.md` to skip this discussion and go straight to planning.
|
|
136
107
|
|
|
137
108
|
<step name="initialize" priority="first">
|
|
138
109
|
Phase number from argument (required).
|
|
139
110
|
|
|
140
111
|
```bash
|
|
141
|
-
INIT=$(
|
|
112
|
+
INIT=$(sdd-sdk query init.phase-op "${PHASE}")
|
|
142
113
|
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
143
|
-
AGENT_SKILLS_ADVISOR=$(
|
|
114
|
+
AGENT_SKILLS_ADVISOR=$(sdd-sdk query agent-skills sdd-advisor-researcher)
|
|
144
115
|
```
|
|
145
116
|
|
|
146
117
|
Parse JSON for: `commit_docs`, `phase_found`, `phase_dir`, `phase_number`, `phase_name`, `phase_slug`, `padded_phase`, `has_research`, `has_context`, `has_plans`, `has_verification`, `plan_count`, `roadmap_exists`, `planning_exists`, `response_language`.
|
|
147
118
|
|
|
148
|
-
**If `response_language` is set:** All user-facing questions, prompts, and explanations in this workflow MUST be presented in `{response_language}`.
|
|
119
|
+
**If `response_language` is set:** All user-facing questions, prompts, and explanations in this workflow MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.
|
|
149
120
|
|
|
150
121
|
**If `phase_found` is false:**
|
|
151
122
|
```
|
|
152
123
|
Phase [X] not found in roadmap.
|
|
153
|
-
|
|
154
|
-
Use /sdd-progress ${SDD_WS} to see available phases.
|
|
124
|
+
Use /sdd:progress ${SDD_WS} to see available phases.
|
|
155
125
|
```
|
|
156
126
|
Exit workflow.
|
|
157
127
|
|
|
158
|
-
**
|
|
128
|
+
**Mode dispatch — Read mode files lazily based on flags in $ARGUMENTS:**
|
|
159
129
|
|
|
160
|
-
|
|
161
|
-
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
130
|
+
```bash
|
|
131
|
+
# Detect advisor mode (file-existence guard — no Read until needed)
|
|
132
|
+
if [ -f "$HOME/.claude/sdd/USER-PROFILE.md" ]; then
|
|
133
|
+
ADVISOR_MODE=true
|
|
134
|
+
else
|
|
135
|
+
ADVISOR_MODE=false
|
|
136
|
+
fi
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- If `--power` in $ARGUMENTS: `Read(workflows/discuss-phase/modes/power.md)` and execute it end-to-end. Do NOT continue with the steps below.
|
|
140
|
+
- Otherwise, continue. Per-flag overlay reads happen at their relevant steps:
|
|
141
|
+
- `--all` → Read `workflows/discuss-phase/modes/all.md` before `present_gray_areas`.
|
|
142
|
+
- `--auto` → Read `workflows/discuss-phase/modes/auto.md` before `check_existing` (it overrides several steps).
|
|
143
|
+
- `--chain` → Read `workflows/discuss-phase/modes/chain.md` before `auto_advance`.
|
|
144
|
+
- `--text` (or `workflow.text_mode: true`) → Read `workflows/discuss-phase/modes/text.md` before any AskUserQuestion call.
|
|
145
|
+
- `--batch` → Read `workflows/discuss-phase/modes/batch.md` before `discuss_areas`.
|
|
146
|
+
- `--analyze` → Read `workflows/discuss-phase/modes/analyze.md` before `discuss_areas`.
|
|
147
|
+
- `ADVISOR_MODE = true` → Read `workflows/discuss-phase/modes/advisor.md` before `analyze_phase` (it changes the discussion flow and adds an `advisor_research` substep).
|
|
148
|
+
- No flags → Read `workflows/discuss-phase/modes/default.md` before `discuss_areas`.
|
|
149
|
+
|
|
150
|
+
**If `phase_found` is true:** Continue to `check_blocking_antipatterns`.
|
|
176
151
|
</step>
|
|
177
152
|
|
|
178
153
|
<step name="check_blocking_antipatterns" priority="first">
|
|
@@ -186,17 +161,33 @@ ls ${phase_dir}/.continue-here.md 2>/dev/null || true
|
|
|
186
161
|
|
|
187
162
|
If `.continue-here.md` exists, parse its "Critical Anti-Patterns" table for rows with `severity` = `blocking`.
|
|
188
163
|
|
|
189
|
-
**If one or more `blocking` anti-patterns are found:**
|
|
190
|
-
|
|
191
|
-
This step cannot be skipped. Before proceeding to `check_existing` or any other step, the agent must demonstrate understanding of each blocking anti-pattern by answering all three questions for each one:
|
|
192
|
-
|
|
193
|
-
1. **What is this anti-pattern?** — Describe it in your own words, not by quoting the handoff.
|
|
164
|
+
**If one or more `blocking` anti-patterns are found:** the agent must demonstrate understanding of each by answering all three questions for each one:
|
|
165
|
+
1. **What is this anti-pattern?** — Describe it in your own words.
|
|
194
166
|
2. **How did it manifest?** — Explain the specific failure that caused it to be recorded.
|
|
195
|
-
3. **What structural mechanism (not acknowledgment) prevents it?** — Name the concrete step
|
|
167
|
+
3. **What structural mechanism (not acknowledgment) prevents it?** — Name the concrete step or enforcement mechanism that stops recurrence.
|
|
196
168
|
|
|
197
169
|
Write these answers inline before continuing. If a blocking anti-pattern cannot be answered from the context in `.continue-here.md`, stop and ask the user for clarification.
|
|
198
170
|
|
|
199
|
-
**If no `.continue-here.md` exists, or no `blocking` rows are found:** Proceed directly to `
|
|
171
|
+
**If no `.continue-here.md` exists, or no `blocking` rows are found:** Proceed directly to `check_spec`.
|
|
172
|
+
</step>
|
|
173
|
+
|
|
174
|
+
<step name="check_spec">
|
|
175
|
+
Check if a SPEC.md (from `/sdd:spec-phase`) exists for this phase. SPEC.md locks requirements before implementation decisions.
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
ls ${phase_dir}/*-SPEC.md 2>/dev/null | grep -v AI-SPEC | head -1 || true
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**If SPEC.md is found:**
|
|
182
|
+
1. Read the SPEC.md file.
|
|
183
|
+
2. Count requirements (numbered items in `## Requirements`).
|
|
184
|
+
3. Display: `Found SPEC.md — {N} requirements locked. Focusing on implementation decisions.`
|
|
185
|
+
4. Set `spec_loaded = true`.
|
|
186
|
+
5. Store requirements, boundaries, and acceptance criteria as `<locked_requirements>` — these flow directly into CONTEXT.md without re-asking.
|
|
187
|
+
|
|
188
|
+
**If no SPEC.md is found:** Continue with `spec_loaded = false`.
|
|
189
|
+
|
|
190
|
+
**Note:** SPEC.md files named `AI-SPEC.md` (from `/sdd:ai-integration-phase`) are excluded — different purpose.
|
|
200
191
|
</step>
|
|
201
192
|
|
|
202
193
|
<step name="check_existing">
|
|
@@ -208,769 +199,203 @@ ls ${phase_dir}/*-CONTEXT.md 2>/dev/null || true
|
|
|
208
199
|
|
|
209
200
|
**If exists:**
|
|
210
201
|
|
|
211
|
-
**If `--auto`:** Auto-select "Update it" — load existing context and continue to analyze_phase
|
|
212
|
-
|
|
213
|
-
**Otherwise:** Use AskUserQuestion:
|
|
214
|
-
- header: "Context"
|
|
215
|
-
- question: "Phase [X] already has context. What do you want to do?"
|
|
216
|
-
- options:
|
|
217
|
-
- "Update it" — Review and revise existing context
|
|
218
|
-
- "View it" — Show me what's there
|
|
219
|
-
- "Skip" — Use existing context as-is
|
|
202
|
+
**If `--auto`:** Auto-select "Update it" — load existing context and continue to `analyze_phase`. Log: `[auto] Context exists — updating with auto-selected decisions.`
|
|
220
203
|
|
|
221
|
-
|
|
222
|
-
If "View": Display CONTEXT.md, then offer update/skip
|
|
223
|
-
If "Skip": Exit workflow
|
|
204
|
+
**Otherwise:** AskUserQuestion (header: "Context"; question: "Phase [X] already has context. What do you want to do?"; options: "Update it" / "View it" / "Skip"). Branch accordingly.
|
|
224
205
|
|
|
225
206
|
**If doesn't exist:**
|
|
226
207
|
|
|
227
|
-
|
|
228
|
-
|
|
208
|
+
Check for an interrupted discussion checkpoint:
|
|
229
209
|
```bash
|
|
230
210
|
ls ${phase_dir}/*-DISCUSS-CHECKPOINT.json 2>/dev/null || true
|
|
231
211
|
```
|
|
232
212
|
|
|
233
|
-
If a checkpoint file exists
|
|
213
|
+
If a checkpoint file exists:
|
|
234
214
|
|
|
235
215
|
**If `--auto`:** Auto-select "Resume" — load checkpoint and continue from last completed area.
|
|
236
216
|
|
|
237
|
-
**Otherwise:**
|
|
238
|
-
- header: "Resume"
|
|
239
|
-
- question: "Found interrupted discussion checkpoint ({N} areas completed out of {M}). Resume from where you left off?"
|
|
240
|
-
- options:
|
|
241
|
-
- "Resume" — Load checkpoint, skip completed areas, continue discussion
|
|
242
|
-
- "Start fresh" — Delete checkpoint, start discussion from scratch
|
|
243
|
-
|
|
244
|
-
If "Resume": Parse the checkpoint JSON. Load `decisions` into the internal accumulator. Set `areas_completed` to skip those areas. Continue to `present_gray_areas` with only the remaining areas.
|
|
245
|
-
If "Start fresh": Delete the checkpoint file. Continue as if no checkpoint existed.
|
|
217
|
+
**Otherwise:** AskUserQuestion (header: "Resume"; question: "Found interrupted discussion checkpoint ({N} areas completed out of {M}). Resume from where you left off?"; options: "Resume" / "Start fresh"). On "Resume", parse the checkpoint JSON, load `decisions` into the internal accumulator, set `areas_completed` to skip those areas, continue to `present_gray_areas` with only the remaining areas. On "Start fresh", delete the checkpoint and continue.
|
|
246
218
|
|
|
247
219
|
Check `has_plans` and `plan_count` from init. **If `has_plans` is true:**
|
|
248
220
|
|
|
249
221
|
**If `--auto`:** Auto-select "Continue and replan after". Log: `[auto] Plans exist — continuing with context capture, will replan after.`
|
|
250
222
|
|
|
251
|
-
**Otherwise:**
|
|
252
|
-
- header: "Plans exist"
|
|
253
|
-
- question: "Phase [X] already has {plan_count} plan(s) created without user context. Your decisions here won't affect existing plans unless you replan."
|
|
254
|
-
- options:
|
|
255
|
-
- "Continue and replan after" — Capture context, then run /sdd-plan-phase {X} ${SDD_WS} to replan
|
|
256
|
-
- "View existing plans" — Show plans before deciding
|
|
257
|
-
- "Cancel" — Skip discuss-phase
|
|
223
|
+
**Otherwise:** AskUserQuestion (header: "Plans exist"; question: "Phase [X] already has {plan_count} plan(s) created without user context. Your decisions here won't affect existing plans unless you replan."; options: "Continue and replan after" / "View existing plans" / "Cancel"). Branch accordingly.
|
|
258
224
|
|
|
259
|
-
If
|
|
260
|
-
If "View existing plans": Display plan files, then offer "Continue" / "Cancel".
|
|
261
|
-
If "Cancel": Exit workflow.
|
|
262
|
-
|
|
263
|
-
**If `has_plans` is false:** Continue to load_prior_context.
|
|
225
|
+
**If `has_plans` is false:** Continue to `load_prior_context`.
|
|
264
226
|
</step>
|
|
265
227
|
|
|
266
228
|
<step name="load_prior_context">
|
|
267
|
-
Read project-level and prior phase context to avoid re-asking decided questions
|
|
229
|
+
Read project-level and prior phase context to avoid re-asking decided questions.
|
|
268
230
|
|
|
269
|
-
**Step 1: Read project-level files**
|
|
270
231
|
```bash
|
|
271
|
-
# Core project files
|
|
272
232
|
cat .planning/PROJECT.md 2>/dev/null || true
|
|
273
233
|
cat .planning/REQUIREMENTS.md 2>/dev/null || true
|
|
274
234
|
cat .planning/STATE.md 2>/dev/null || true
|
|
275
235
|
```
|
|
276
236
|
|
|
277
|
-
|
|
278
|
-
- **PROJECT.md** — Vision, principles, non-negotiables, user preferences
|
|
279
|
-
- **REQUIREMENTS.md** — Acceptance criteria, constraints, must-haves vs nice-to-haves
|
|
280
|
-
- **STATE.md** — Current progress, any flags or session notes
|
|
237
|
+
Read at most **3** prior CONTEXT.md files (most recent 3 phases before current). If `.planning/DECISIONS-INDEX.md` exists, read that instead — it is a bounded rolling summary that supersedes per-phase reads.
|
|
281
238
|
|
|
282
|
-
**Step 2: Read all prior CONTEXT.md files**
|
|
283
239
|
```bash
|
|
284
|
-
|
|
285
|
-
(find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort
|
|
240
|
+
(find .planning/phases -name "*-CONTEXT.md" 2>/dev/null || true) | sort -r
|
|
286
241
|
```
|
|
287
242
|
|
|
288
|
-
For each CONTEXT.md
|
|
289
|
-
- Read the `<decisions>` section — these are locked preferences
|
|
290
|
-
- Read `<specifics>` — particular references or "I want it like X" moments
|
|
291
|
-
- Note any patterns (e.g., "user consistently prefers minimal UI", "user rejected single-key shortcuts")
|
|
292
|
-
|
|
293
|
-
**Step 3: Build internal `<prior_decisions>` context**
|
|
243
|
+
For each CONTEXT.md read: extract `<decisions>` (locked preferences), `<specifics>` (particular references), and patterns (e.g., "user prefers minimal UI", "user rejected single-key shortcuts").
|
|
294
244
|
|
|
295
|
-
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
## From Prior Phases
|
|
303
|
-
### Phase N: [Name]
|
|
304
|
-
- [Decision that may be relevant to current phase]
|
|
305
|
-
- [Preference that establishes a pattern]
|
|
306
|
-
|
|
307
|
-
### Phase M: [Name]
|
|
308
|
-
- [Another relevant decision]
|
|
309
|
-
</prior_decisions>
|
|
245
|
+
**Spike/sketch findings:** Check for project-local skills:
|
|
246
|
+
```bash
|
|
247
|
+
SPIKE_FINDINGS=$(ls ./.claude/skills/spike-findings-*/SKILL.md 2>/dev/null | head -1 || true)
|
|
248
|
+
SKETCH_FINDINGS=$(ls ./.claude/skills/sketch-findings-*/SKILL.md 2>/dev/null | head -1 || true)
|
|
249
|
+
RAW_SPIKES=$(ls .planning/spikes/MANIFEST.md 2>/dev/null)
|
|
250
|
+
RAW_SKETCHES=$(ls .planning/sketches/MANIFEST.md 2>/dev/null)
|
|
310
251
|
```
|
|
311
252
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
253
|
+
If findings skills exist, read SKILL.md and reference files; extract validated patterns, landmines, constraints, design decisions. Add them to `<prior_decisions>`.
|
|
254
|
+
|
|
255
|
+
If raw spikes/sketches exist but no findings skill, note: `⚠ Unpackaged spikes/sketches detected — run /sdd:spike --wrap-up or /sdd:sketch --wrap-up to make findings available.`
|
|
256
|
+
|
|
257
|
+
Build internal `<prior_decisions>` with sections for Project-Level (from PROJECT.md / REQUIREMENTS.md), From Prior Phases (per-phase decisions), and From Spike/Sketch Findings (validated patterns, landmines, design decisions).
|
|
258
|
+
|
|
259
|
+
**Usage downstream:** `analyze_phase` skips already-decided gray areas; `present_gray_areas` annotates options ("You chose X in Phase 5"); `discuss_areas` pre-fills or flags conflicts.
|
|
316
260
|
|
|
317
|
-
**If no prior context exists:** Continue without —
|
|
261
|
+
**If no prior context exists:** Continue without — expected for early phases.
|
|
318
262
|
</step>
|
|
319
263
|
|
|
320
264
|
<step name="cross_reference_todos">
|
|
321
|
-
Check
|
|
265
|
+
Check pending todos for matches with this phase's scope.
|
|
322
266
|
|
|
323
|
-
**Load and match todos:**
|
|
324
267
|
```bash
|
|
325
|
-
TODO_MATCHES=$(
|
|
268
|
+
TODO_MATCHES=$(sdd-sdk query todo.match-phase "${PHASE_NUMBER}")
|
|
326
269
|
```
|
|
327
270
|
|
|
328
271
|
Parse JSON for: `todo_count`, `matches[]` (each with `file`, `title`, `area`, `score`, `reasons`).
|
|
329
272
|
|
|
330
|
-
**If `todo_count` is 0 or `matches` is empty:** Skip silently
|
|
331
|
-
|
|
332
|
-
**If matches found:**
|
|
333
|
-
|
|
334
|
-
Present matched todos to the user. Show each match with its title, area, and why it matched:
|
|
335
|
-
|
|
336
|
-
```
|
|
337
|
-
📋 Found {N} pending todo(s) that may be relevant to Phase {X}:
|
|
338
|
-
|
|
339
|
-
{For each match:}
|
|
340
|
-
- **{title}** (area: {area}, relevance: {score}) — matched on {reasons}
|
|
341
|
-
```
|
|
342
|
-
|
|
343
|
-
Use AskUserQuestion (multiSelect) asking which todos to fold into this phase's scope:
|
|
344
|
-
|
|
345
|
-
```
|
|
346
|
-
Which of these todos should be folded into Phase {X} scope?
|
|
347
|
-
(Select any that apply, or none to skip)
|
|
348
|
-
```
|
|
273
|
+
**If `todo_count` is 0 or `matches` is empty:** Skip silently.
|
|
349
274
|
|
|
350
|
-
**
|
|
351
|
-
- Store internally as `<folded_todos>` for inclusion in CONTEXT.md `<decisions>` section
|
|
352
|
-
- These become additional scope items that downstream agents (researcher, planner) will see
|
|
353
|
-
|
|
354
|
-
**For unselected (reviewed but not folded) todos:**
|
|
355
|
-
- Store internally as `<reviewed_todos>` for inclusion in CONTEXT.md `<deferred>` section
|
|
356
|
-
- This prevents future phases from re-surfacing the same todos as "missed"
|
|
275
|
+
**If matches found:** Present each match (title, area, why it matched). AskUserQuestion (multiSelect) asking which to fold. Folded → `<folded_todos>` for CONTEXT.md `<decisions>`. Reviewed but not folded → `<reviewed_todos>` for CONTEXT.md `<deferred>`.
|
|
357
276
|
|
|
358
277
|
**Auto mode (`--auto`):** Fold all todos with score >= 0.4 automatically. Log the selection.
|
|
359
278
|
</step>
|
|
360
279
|
|
|
361
280
|
<step name="scout_codebase">
|
|
362
|
-
Lightweight scan of existing code to inform gray area identification
|
|
281
|
+
Lightweight scan of existing code to inform gray area identification (~10% context).
|
|
363
282
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
**If codebase maps exist:** Read the most relevant ones (CONVENTIONS.md, STRUCTURE.md, STACK.md based on phase type). Extract:
|
|
370
|
-
- Reusable components/hooks/utilities
|
|
371
|
-
- Established patterns (state management, styling, data fetching)
|
|
372
|
-
- Integration points (where new code would connect)
|
|
373
|
-
|
|
374
|
-
Skip to Step 3 below.
|
|
375
|
-
|
|
376
|
-
**Step 2: If no codebase maps, do targeted grep**
|
|
377
|
-
|
|
378
|
-
Extract key terms from the phase goal (e.g., "feed" → "post", "card", "list"; "auth" → "login", "session", "token").
|
|
379
|
-
|
|
380
|
-
```bash
|
|
381
|
-
# Find files related to phase goal terms
|
|
382
|
-
grep -rl "{term1}\|{term2}" src/ app/ --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null | head -10 || true
|
|
383
|
-
|
|
384
|
-
# Find existing components/hooks
|
|
385
|
-
ls src/components/ 2>/dev/null || true
|
|
386
|
-
ls src/hooks/ 2>/dev/null || true
|
|
387
|
-
ls src/lib/ src/utils/ 2>/dev/null || true
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
Read the 3-5 most relevant files to understand existing patterns.
|
|
391
|
-
|
|
392
|
-
**Step 3: Build internal codebase_context**
|
|
393
|
-
|
|
394
|
-
From the scan, identify:
|
|
395
|
-
- **Reusable assets** — existing components, hooks, utilities that could be used in this phase
|
|
396
|
-
- **Established patterns** — how the codebase does state management, styling, data fetching
|
|
397
|
-
- **Integration points** — where new code would connect (routes, nav, providers)
|
|
398
|
-
- **Creative options** — approaches the existing architecture enables or constrains
|
|
399
|
-
|
|
400
|
-
Store as internal `<codebase_context>` for use in analyze_phase and present_gray_areas. This is NOT written to a file — it's used within this session only.
|
|
283
|
+
Read `@~/.claude/sdd/references/scout-codebase.md` — it contains the phase-type→map selection table, single-read rule, no-maps fallback, and `<codebase_context>` output schema. Then execute:
|
|
284
|
+
1. `ls .planning/codebase/*.md` to find existing maps
|
|
285
|
+
2. Select 2–3 maps via the reference's table; or grep fallback if none exist
|
|
286
|
+
3. Build internal `<codebase_context>` per the reference's output schema
|
|
401
287
|
</step>
|
|
402
288
|
|
|
403
289
|
<step name="analyze_phase">
|
|
404
|
-
Analyze the phase to identify gray areas
|
|
405
|
-
|
|
406
|
-
**Read the phase description from ROADMAP.md and determine:**
|
|
290
|
+
Analyze the phase to identify gray areas. Use both `prior_decisions` and `codebase_context` to ground the analysis.
|
|
407
291
|
|
|
408
292
|
1. **Domain boundary** — What capability is this phase delivering? State it clearly.
|
|
409
293
|
|
|
410
|
-
1b. **Initialize canonical refs accumulator** — Start building
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
**Source 3 (scout_codebase):** If existing code references docs (e.g., comments citing ADRs), add those.
|
|
415
|
-
**Source 4 (discuss_areas):** When the user says "read X", "check Y", or references any doc/spec/ADR during discussion — add it immediately. These are often the MOST important refs because they represent docs the user specifically wants followed.
|
|
294
|
+
1b. **Initialize canonical refs accumulator** — Start building `<canonical_refs>` for CONTEXT.md. Sources:
|
|
295
|
+
- **Now:** Copy `Canonical refs:` from ROADMAP.md for this phase. Expand each to a full relative path. Check REQUIREMENTS.md and PROJECT.md for specs/ADRs referenced.
|
|
296
|
+
- **`scout_codebase`:** If existing code references docs (e.g., comments citing ADRs), add those.
|
|
297
|
+
- **`discuss_areas`:** When the user says "read X", "check Y", or references any doc/spec/ADR — add it immediately. These are often the MOST important refs.
|
|
416
298
|
|
|
417
|
-
This list is MANDATORY in CONTEXT.md. Every ref must have a full relative path
|
|
299
|
+
This list is MANDATORY in CONTEXT.md. Every ref must have a full relative path. If no external docs exist, note that explicitly.
|
|
418
300
|
|
|
419
|
-
2. **Check prior decisions** —
|
|
420
|
-
- Scan `<prior_decisions>` for relevant choices (e.g., "Ctrl+C only, no single-key shortcuts")
|
|
421
|
-
- These are **pre-answered** — don't re-ask unless this phase has conflicting needs
|
|
422
|
-
- Note applicable prior decisions for use in presentation
|
|
301
|
+
2. **Check prior decisions** — Scan `<prior_decisions>` for already-decided gray areas; mark them pre-answered.
|
|
423
302
|
|
|
424
|
-
|
|
303
|
+
2b. **SPEC.md awareness** — If `spec_loaded = true`: `<locked_requirements>` are pre-answered (Goal, Boundaries, Constraints, Acceptance Criteria). Do NOT generate gray areas about WHAT to build or WHY. Only generate gray areas about HOW to implement. When presenting, include: "Requirements are locked by SPEC.md — discussing implementation decisions only."
|
|
425
304
|
|
|
426
|
-
|
|
305
|
+
3. **Gray areas** — For each relevant category, identify 1-2 specific ambiguities that would change implementation. Annotate with code context where relevant.
|
|
427
306
|
|
|
428
|
-
**
|
|
307
|
+
4. **Skip assessment** — If no meaningful gray areas exist (pure infrastructure, clear-cut implementation, all already decided), the phase may not need discussion.
|
|
429
308
|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
1. Check for USER-PROFILE.md:
|
|
433
|
-
```bash
|
|
434
|
-
PROFILE_PATH="$HOME/.claude/sdd/USER-PROFILE.md"
|
|
435
|
-
```
|
|
436
|
-
ADVISOR_MODE = file exists at PROFILE_PATH → true, otherwise → false
|
|
437
|
-
|
|
438
|
-
2. If ADVISOR_MODE is true, resolve vendor_philosophy calibration tier:
|
|
439
|
-
- Priority 1: Read config.json > preferences.vendor_philosophy (project-level override)
|
|
440
|
-
- Priority 2: Read USER-PROFILE.md Vendor Choices/Philosophy rating (global)
|
|
441
|
-
- Priority 3: Default to "standard" if neither has a value or value is UNSCORED
|
|
442
|
-
|
|
443
|
-
Map to calibration tier:
|
|
444
|
-
- conservative OR thorough-evaluator → full_maturity
|
|
445
|
-
- opinionated → minimal_decisive
|
|
446
|
-
- pragmatic-fast OR any other value OR empty → standard
|
|
447
|
-
|
|
448
|
-
3. Resolve model for advisor agents:
|
|
449
|
-
```bash
|
|
450
|
-
ADVISOR_MODEL=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" resolve-model sdd-advisor-researcher --raw)
|
|
451
|
-
```
|
|
452
|
-
|
|
453
|
-
If ADVISOR_MODE is false, skip all advisor-specific steps — workflow proceeds with existing conversational flow unchanged.
|
|
454
|
-
|
|
455
|
-
**Output your analysis internally, then present to user.**
|
|
456
|
-
|
|
457
|
-
Example analysis for "Post Feed" phase (with code and prior context):
|
|
458
|
-
```
|
|
459
|
-
Domain: Displaying posts from followed users
|
|
460
|
-
Existing: Card component (src/components/ui/Card.tsx), useInfiniteQuery hook, Tailwind CSS
|
|
461
|
-
Prior decisions: "Minimal UI preferred" (Phase 2), "No pagination — always infinite scroll" (Phase 4)
|
|
462
|
-
Gray areas:
|
|
463
|
-
- UI: Layout style (cards vs timeline vs grid) — Card component exists with shadow/rounded variants
|
|
464
|
-
- UI: Information density (full posts vs previews) — no existing density patterns
|
|
465
|
-
- Behavior: Loading pattern — ALREADY DECIDED: infinite scroll (Phase 4)
|
|
466
|
-
- Empty State: What shows when no posts exist — EmptyState component exists in ui/
|
|
467
|
-
- Content: What metadata displays (time, author, reactions count)
|
|
468
|
-
```
|
|
309
|
+
**Advisor mode hand-off:** If `ADVISOR_MODE` is true, follow `workflows/discuss-phase/modes/advisor.md` for the rest of analyze/discuss flow (it adds an `advisor_research` substep and replaces the standard `discuss_areas` with table-first selection). The detection block (USER-PROFILE.md existence + non-technical-owner signals + calibration tier resolution) lives in that file — read it once when ADVISOR_MODE is true and follow its rules.
|
|
469
310
|
</step>
|
|
470
311
|
|
|
471
312
|
<step name="present_gray_areas">
|
|
472
|
-
Present the domain boundary, prior decisions, and gray areas to user.
|
|
313
|
+
Present the domain boundary, prior decisions, and gray areas to the user.
|
|
473
314
|
|
|
474
|
-
**First, state the boundary and any prior decisions that apply:**
|
|
475
315
|
```
|
|
476
316
|
Phase [X]: [Name]
|
|
477
317
|
Domain: [What this phase delivers — from your analysis]
|
|
478
318
|
|
|
479
|
-
We'll clarify HOW to implement this.
|
|
480
|
-
(New capabilities belong in other phases.)
|
|
319
|
+
We'll clarify HOW to implement this. (New capabilities belong in other phases.)
|
|
481
320
|
|
|
482
321
|
[If prior decisions apply:]
|
|
483
322
|
**Carrying forward from earlier phases:**
|
|
484
323
|
- [Decision from Phase N that applies here]
|
|
485
|
-
- [Decision from Phase M that applies here]
|
|
486
324
|
```
|
|
487
325
|
|
|
488
|
-
**If `--auto
|
|
326
|
+
**If `--auto` or `--all`** (per `modes/auto.md` or `modes/all.md`): Auto-select ALL gray areas. Log: `[--auto/--all] Selected all gray areas: [list area names].` Skip the AskUserQuestion below and continue directly to `discuss_areas` with all areas selected.
|
|
489
327
|
|
|
490
328
|
**Otherwise, use AskUserQuestion (multiSelect: true):**
|
|
491
329
|
- header: "Discuss"
|
|
492
330
|
- question: "Which areas do you want to discuss for [phase name]?"
|
|
493
|
-
- options:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
**Prior decision annotations:** When a gray area was already decided in a prior phase, annotate it:
|
|
499
|
-
```
|
|
500
|
-
☐ Exit shortcuts — How should users quit?
|
|
501
|
-
(You decided "Ctrl+C only, no single-key shortcuts" in Phase 5 — revisit or keep?)
|
|
502
|
-
```
|
|
503
|
-
|
|
504
|
-
**Code context annotations:** When the scout found relevant existing code, annotate the gray area description:
|
|
505
|
-
```
|
|
506
|
-
☐ Layout style — Cards vs list vs timeline?
|
|
507
|
-
(You already have a Card component with shadow/rounded variants. Reusing it keeps the app consistent.)
|
|
508
|
-
```
|
|
509
|
-
|
|
510
|
-
**Combining both:** When both prior decisions and code context apply:
|
|
511
|
-
```
|
|
512
|
-
☐ Loading behavior — Infinite scroll or pagination?
|
|
513
|
-
(You chose infinite scroll in Phase 4. useInfiniteQuery hook already set up.)
|
|
514
|
-
```
|
|
515
|
-
|
|
516
|
-
**Do NOT include a "skip" or "you decide" option.** User ran this command to discuss — give them real choices.
|
|
517
|
-
|
|
518
|
-
**Examples by domain (with code context):**
|
|
519
|
-
|
|
520
|
-
For "Post Feed" (visual feature):
|
|
521
|
-
```
|
|
522
|
-
☐ Layout style — Cards vs list vs timeline? (Card component exists with variants)
|
|
523
|
-
☐ Loading behavior — Infinite scroll or pagination? (useInfiniteQuery hook available)
|
|
524
|
-
☐ Content ordering — Chronological, algorithmic, or user choice?
|
|
525
|
-
☐ Post metadata — What info per post? Timestamps, reactions, author?
|
|
526
|
-
```
|
|
527
|
-
|
|
528
|
-
For "Database backup CLI" (command-line tool):
|
|
529
|
-
```
|
|
530
|
-
☐ Output format — JSON, table, or plain text? Verbosity levels?
|
|
531
|
-
☐ Flag design — Short flags, long flags, or both? Required vs optional?
|
|
532
|
-
☐ Progress reporting — Silent, progress bar, or verbose logging?
|
|
533
|
-
☐ Error recovery — Fail fast, retry, or prompt for action?
|
|
534
|
-
```
|
|
535
|
-
|
|
536
|
-
For "Organize photo library" (organization task):
|
|
537
|
-
```
|
|
538
|
-
☐ Grouping criteria — By date, location, faces, or events?
|
|
539
|
-
☐ Duplicate handling — Keep best, keep all, or prompt each time?
|
|
540
|
-
☐ Naming convention — Original names, dates, or descriptive?
|
|
541
|
-
☐ Folder structure — Flat, nested by year, or by category?
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
Continue to discuss_areas with selected areas (or advisor_research if ADVISOR_MODE is true).
|
|
545
|
-
</step>
|
|
546
|
-
|
|
547
|
-
<step name="advisor_research">
|
|
548
|
-
**Advisor Research** (only when ADVISOR_MODE is true)
|
|
549
|
-
|
|
550
|
-
After user selects gray areas in present_gray_areas, spawn parallel research agents.
|
|
551
|
-
|
|
552
|
-
1. Display brief status: "Researching {N} areas..."
|
|
553
|
-
|
|
554
|
-
2. For EACH user-selected gray area, spawn a Task() in parallel:
|
|
555
|
-
|
|
556
|
-
Task(
|
|
557
|
-
prompt="First, read @~/.claude/agents/sdd-advisor-researcher.md for your role and instructions.
|
|
558
|
-
|
|
559
|
-
<gray_area>{area_name}: {area_description from gray area identification}</gray_area>
|
|
560
|
-
<phase_context>{phase_goal and description from ROADMAP.md}</phase_context>
|
|
561
|
-
<project_context>{project name and brief description from PROJECT.md}</project_context>
|
|
562
|
-
<calibration_tier>{resolved calibration tier: full_maturity | standard | minimal_decisive}</calibration_tier>
|
|
563
|
-
|
|
564
|
-
Research this gray area and return a structured comparison table with rationale.
|
|
565
|
-
${AGENT_SKILLS_ADVISOR}",
|
|
566
|
-
subagent_type="general-purpose",
|
|
567
|
-
model="{ADVISOR_MODEL}",
|
|
568
|
-
description="Research: {area_name}"
|
|
569
|
-
)
|
|
570
|
-
|
|
571
|
-
All Task() calls spawn simultaneously — do NOT wait for one before starting the next.
|
|
331
|
+
- options: 3-4 phase-specific gray areas, each with a concrete label (not generic), 1-2 questions in description, and code-context / prior-decision annotations:
|
|
332
|
+
```
|
|
333
|
+
☐ Layout style — Cards vs list vs timeline?
|
|
334
|
+
(You already have a Card component with shadow/rounded variants. Reusing it keeps the app consistent.)
|
|
572
335
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
b. Verify all 5 columns present (Option | Pros | Cons | Complexity | Recommendation) — fill any missing columns rather than showing broken table
|
|
577
|
-
c. Verify option count matches calibration tier:
|
|
578
|
-
- full_maturity: 3-5 options acceptable
|
|
579
|
-
- standard: 2-4 options acceptable
|
|
580
|
-
- minimal_decisive: 1-2 options acceptable
|
|
581
|
-
If agent returned too many, trim least viable. If too few, accept as-is.
|
|
582
|
-
d. Rewrite rationale paragraph to weave in project context and ongoing discussion context that the agent did not have access to
|
|
583
|
-
e. If agent returned only 1 option, convert from table format to direct recommendation: "Standard approach for {area}: {option}. {rationale}"
|
|
336
|
+
☐ Loading behavior — Infinite scroll or pagination?
|
|
337
|
+
(You chose infinite scroll in Phase 4. useInfiniteQuery hook already set up.)
|
|
338
|
+
```
|
|
584
339
|
|
|
585
|
-
|
|
340
|
+
**Do NOT include a "skip" or "you decide" option.** User ran this command to discuss — give real choices.
|
|
586
341
|
|
|
587
|
-
|
|
342
|
+
Continue to `discuss_areas` with selected areas (or to `advisor_research` per `modes/advisor.md` if `ADVISOR_MODE` is true).
|
|
588
343
|
</step>
|
|
589
344
|
|
|
590
345
|
<step name="discuss_areas">
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
**If ADVISOR_MODE is true:**
|
|
594
|
-
|
|
595
|
-
Table-first discussion flow — present research-backed comparison tables, then capture user picks.
|
|
596
|
-
|
|
597
|
-
**For each selected area:**
|
|
598
|
-
|
|
599
|
-
1. **Present the synthesized comparison table + rationale paragraph** (from advisor_research step)
|
|
600
|
-
|
|
601
|
-
2. **Use AskUserQuestion:**
|
|
602
|
-
- header: "{area_name}"
|
|
603
|
-
- question: "Which approach for {area_name}?"
|
|
604
|
-
- options: Extract from the table's Option column (AskUserQuestion adds "Other" automatically)
|
|
346
|
+
Discussion behavior is defined by the active mode file(s):
|
|
605
347
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
348
|
+
- **Advisor mode (ADVISOR_MODE = true):** follow `workflows/discuss-phase/modes/advisor.md` — research-backed comparison tables, table-first selection.
|
|
349
|
+
- **--auto:** follow `workflows/discuss-phase/modes/auto.md` — Claude picks recommended option for every question; no AskUserQuestion. Single-pass cap enforced.
|
|
350
|
+
- **Default (no flags):** follow `workflows/discuss-phase/modes/default.md` — 4 single-question turns per area, then check whether to continue.
|
|
609
351
|
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
352
|
+
Overlays (combine with the active mode):
|
|
353
|
+
- `--text` → `workflows/discuss-phase/modes/text.md` (replace AskUserQuestion with plain-text numbered lists)
|
|
354
|
+
- `--batch` → `workflows/discuss-phase/modes/batch.md` (group 2–5 questions per turn)
|
|
355
|
+
- `--analyze` → `workflows/discuss-phase/modes/analyze.md` (trade-off table before each question)
|
|
613
356
|
|
|
614
|
-
|
|
615
|
-
I notice competing priorities here — {option_A} optimizes for {goal_A} while {option_B} optimizes for {goal_B}.
|
|
357
|
+
**Overlay stacking:** overlays combine and apply outer→inner in fixed order `--analyze` → `--batch` → `--text` (e.g., `--batch --analyze` = trade-off table per question group; add `--text` for plain-text rendering). Mode-specific precedence (e.g., `--auto --power`) is documented in each overlay file's "Combination rules" section.
|
|
616
358
|
|
|
617
|
-
|
|
618
|
-
[Yes, analyze] / [No, decision made]
|
|
619
|
-
```
|
|
620
|
-
|
|
621
|
-
If yes: provide 3-5 bullet analysis (what each optimizes/sacrifices, alignment with PROJECT.md goals, recommendation). Then return to normal flow.
|
|
622
|
-
If no or thinking_partner disabled: continue to next area.
|
|
623
|
-
|
|
624
|
-
4. **After recording pick, Claude decides whether follow-up questions are needed:**
|
|
625
|
-
- If the pick has ambiguity that would affect downstream planning → ask 1-2 targeted follow-up questions using AskUserQuestion
|
|
626
|
-
- If the pick is clear and self-contained → move to next area
|
|
627
|
-
- Do NOT ask the standard 4 questions — the table already provided the context
|
|
628
|
-
|
|
629
|
-
5. **After all areas processed:**
|
|
630
|
-
- header: "Done"
|
|
631
|
-
- question: "That covers [list areas]. Ready to create context?"
|
|
632
|
-
- options: "Create context" / "Revisit an area"
|
|
633
|
-
|
|
634
|
-
**Scope creep handling (advisor mode):**
|
|
635
|
-
If user mentions something outside the phase domain:
|
|
636
|
-
```
|
|
637
|
-
"[Feature] sounds like a new capability — that belongs in its own phase.
|
|
638
|
-
I'll note it as a deferred idea.
|
|
639
|
-
|
|
640
|
-
Back to [current area]: [return to current question]"
|
|
641
|
-
```
|
|
642
|
-
|
|
643
|
-
Track deferred ideas internally.
|
|
644
|
-
|
|
645
|
-
---
|
|
646
|
-
|
|
647
|
-
**If ADVISOR_MODE is false:**
|
|
648
|
-
|
|
649
|
-
For each selected area, conduct a focused discussion loop.
|
|
650
|
-
|
|
651
|
-
**Research-before-questions mode:** Check if `workflow.research_before_questions` is enabled in config (from init context or `.planning/config.json`). When enabled, before presenting questions for each area:
|
|
652
|
-
1. Do a brief web search for best practices related to the area topic
|
|
653
|
-
2. Summarize the top findings in 2-3 bullet points
|
|
654
|
-
3. Present the research alongside the question so the user can make a more informed decision
|
|
655
|
-
|
|
656
|
-
Example with research enabled:
|
|
657
|
-
```
|
|
658
|
-
Let's talk about [Authentication Strategy].
|
|
359
|
+
All modes preserve the universal rules below.
|
|
659
360
|
|
|
660
|
-
|
|
661
|
-
• OAuth 2.0 + PKCE is the current standard for SPAs (replaces implicit flow)
|
|
662
|
-
• Session tokens with httpOnly cookies preferred over localStorage for XSS protection
|
|
663
|
-
• Consider passkey/WebAuthn support — adoption is accelerating in 2025-2026
|
|
361
|
+
**Universal rules (apply to every mode):**
|
|
664
362
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
**Text mode support:** Parse optional `--text` from `$ARGUMENTS`.
|
|
671
|
-
- Accept `--text` flag OR read `workflow.text_mode` from config (from init context)
|
|
672
|
-
- When active, replace ALL `AskUserQuestion` calls with plain-text numbered lists
|
|
673
|
-
- User types a number to select, or types free text for "Other"
|
|
674
|
-
- This is required for Claude Code remote sessions (`/rc` mode) where TUI menus
|
|
675
|
-
don't work through the Claude App
|
|
676
|
-
|
|
677
|
-
**Batch mode support:** Parse optional `--batch` from `$ARGUMENTS`.
|
|
678
|
-
- Accept `--batch`, `--batch=N`, or `--batch N`
|
|
679
|
-
|
|
680
|
-
**Analyze mode support:** Parse optional `--analyze` from `$ARGUMENTS`.
|
|
681
|
-
When `--analyze` is active, before presenting each question (or question group in batch mode), provide a brief **trade-off analysis** for the decision:
|
|
682
|
-
- 2-3 options with pros/cons based on codebase context and common patterns
|
|
683
|
-
- A recommended approach with reasoning
|
|
684
|
-
- Known pitfalls or constraints from prior phases
|
|
685
|
-
|
|
686
|
-
Example with `--analyze`:
|
|
687
|
-
```
|
|
688
|
-
**Trade-off analysis: Authentication strategy**
|
|
689
|
-
|
|
690
|
-
| Approach | Pros | Cons |
|
|
691
|
-
|----------|------|------|
|
|
692
|
-
| Session cookies | Simple, httpOnly prevents XSS | Requires CSRF protection, sticky sessions |
|
|
693
|
-
| JWT (stateless) | Scalable, no server state | Token size, revocation complexity |
|
|
694
|
-
| OAuth 2.0 + PKCE | Industry standard for SPAs | More setup, redirect flow UX |
|
|
695
|
-
|
|
696
|
-
💡 Recommended: OAuth 2.0 + PKCE — your app has social login in requirements (REQ-04) and this aligns with the existing NextAuth setup in `src/lib/auth.ts`.
|
|
697
|
-
|
|
698
|
-
How should users authenticate?
|
|
699
|
-
```
|
|
700
|
-
|
|
701
|
-
This gives the user context to make informed decisions without extra prompting. When `--analyze` is absent, present questions directly as before.
|
|
702
|
-
- Accept `--batch`, `--batch=N`, or `--batch N`
|
|
703
|
-
- Default to 4 questions per batch when no number is provided
|
|
704
|
-
- Clamp explicit sizes to 2-5 so a batch stays answerable
|
|
705
|
-
- If `--batch` is absent, keep the existing one-question-at-a-time flow
|
|
706
|
-
|
|
707
|
-
**Philosophy:** stay adaptive, but let the user choose the pacing.
|
|
708
|
-
- Default mode: 4 single-question turns, then check whether to continue
|
|
709
|
-
- `--batch` mode: 1 grouped turn with 2-5 numbered questions, then check whether to continue
|
|
710
|
-
|
|
711
|
-
Each answer (or answer set, in batch mode) should reveal the next question or next batch.
|
|
712
|
-
|
|
713
|
-
**Auto mode (`--auto`):** For each area, Claude selects the recommended option (first option, or the one explicitly marked "recommended") for every question without using AskUserQuestion. Log each auto-selected choice:
|
|
714
|
-
```
|
|
715
|
-
[auto] [Area] — Q: "[question text]" → Selected: "[chosen option]" (recommended default)
|
|
716
|
-
```
|
|
717
|
-
After all areas are auto-resolved, skip the "Explore more gray areas" prompt and proceed directly to write_context.
|
|
718
|
-
|
|
719
|
-
**CRITICAL — Auto-mode pass cap:**
|
|
720
|
-
In `--auto` mode, the discuss step MUST complete in a **single pass**. After writing CONTEXT.md once, you are DONE — proceed immediately to write_context and then auto_advance. Do NOT re-read your own CONTEXT.md to find "gaps", "undefined types", or "missing decisions" and run additional passes. This creates a self-feeding loop where each pass generates references that the next pass treats as gaps, consuming unbounded time and resources.
|
|
721
|
-
|
|
722
|
-
Check the pass cap from config:
|
|
723
|
-
```bash
|
|
724
|
-
MAX_PASSES=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get workflow.max_discuss_passes 2>/dev/null || echo "3")
|
|
725
|
-
```
|
|
726
|
-
|
|
727
|
-
If you have already written and committed CONTEXT.md, the discuss step is complete. Move on.
|
|
728
|
-
|
|
729
|
-
**Interactive mode (no `--auto`):**
|
|
730
|
-
|
|
731
|
-
**For each area:**
|
|
732
|
-
|
|
733
|
-
1. **Announce the area:**
|
|
734
|
-
```
|
|
735
|
-
Let's talk about [Area].
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
2. **Ask questions using the selected pacing:**
|
|
739
|
-
|
|
740
|
-
**Default (no `--batch`): Ask 4 questions using AskUserQuestion**
|
|
741
|
-
- header: "[Area]" (max 12 chars — abbreviate if needed)
|
|
742
|
-
- question: Specific decision for this area
|
|
743
|
-
- options: 2-3 concrete choices (AskUserQuestion adds "Other" automatically), with the recommended choice highlighted and brief explanation why
|
|
744
|
-
- **Annotate options with code context** when relevant:
|
|
745
|
-
```
|
|
746
|
-
"How should posts be displayed?"
|
|
747
|
-
- Cards (reuses existing Card component — consistent with Messages)
|
|
748
|
-
- List (simpler, would be a new pattern)
|
|
749
|
-
- Timeline (needs new Timeline component — none exists yet)
|
|
750
|
-
```
|
|
751
|
-
- Include "You decide" as an option when reasonable — captures Claude discretion
|
|
752
|
-
- **Context7 for library choices:** When a gray area involves library selection (e.g., "magic links" → query next-auth docs) or API approach decisions, use `mcp__context7__*` tools to fetch current documentation and inform the options. Don't use Context7 for every question — only when library-specific knowledge improves the options.
|
|
753
|
-
|
|
754
|
-
**Batch mode (`--batch`): Ask 2-5 numbered questions in one plain-text turn**
|
|
755
|
-
- Group closely related questions for the current area into a single message
|
|
756
|
-
- Keep each question concrete and answerable in one reply
|
|
757
|
-
- When options are helpful, include short inline choices per question rather than a separate AskUserQuestion for every item
|
|
758
|
-
- After the user replies, reflect back the captured decisions, note any unanswered items, and ask only the minimum follow-up needed before moving on
|
|
759
|
-
- Preserve adaptiveness between batches: use the full set of answers to decide the next batch or whether the area is sufficiently clear
|
|
760
|
-
|
|
761
|
-
3. **After the current set of questions, check:**
|
|
762
|
-
- header: "[Area]" (max 12 chars)
|
|
763
|
-
- question: "More questions about [area], or move to next? (Remaining: [list other unvisited areas])"
|
|
764
|
-
- options: "More questions" / "Next area"
|
|
765
|
-
|
|
766
|
-
When building the question text, list the remaining unvisited areas so the user knows what's ahead. For example: "More questions about Layout, or move to next? (Remaining: Loading behavior, Content ordering)"
|
|
767
|
-
|
|
768
|
-
If "More questions" → ask another 4 single questions, or another 2-5 question batch when `--batch` is active, then check again
|
|
769
|
-
If "Next area" → proceed to next selected area
|
|
770
|
-
If "Other" (free text) → interpret intent: continuation phrases ("chat more", "keep going", "yes", "more") map to "More questions"; advancement phrases ("done", "move on", "next", "skip") map to "Next area". If ambiguous, ask: "Continue with more questions about [area], or move to the next area?"
|
|
771
|
-
|
|
772
|
-
4. **After all initially-selected areas complete:**
|
|
773
|
-
- Summarize what was captured from the discussion so far
|
|
774
|
-
- AskUserQuestion:
|
|
775
|
-
- header: "Done"
|
|
776
|
-
- question: "We've discussed [list areas]. Which gray areas remain unclear?"
|
|
777
|
-
- options: "Explore more gray areas" / "I'm ready for context"
|
|
778
|
-
- If "Explore more gray areas":
|
|
779
|
-
- Identify 2-4 additional gray areas based on what was learned
|
|
780
|
-
- Return to present_gray_areas logic with these new areas
|
|
781
|
-
- Loop: discuss new areas, then prompt again
|
|
782
|
-
- If "I'm ready for context": Proceed to write_context
|
|
783
|
-
|
|
784
|
-
**Canonical ref accumulation during discussion:**
|
|
785
|
-
When the user references a doc, spec, or ADR during any answer — e.g., "read adr-014", "check the MCP spec", "per browse-spec.md" — immediately:
|
|
786
|
-
1. Read the referenced doc (or confirm it exists)
|
|
787
|
-
2. Add it to the canonical refs accumulator with full relative path
|
|
788
|
-
3. Use what you learned from the doc to inform subsequent questions
|
|
789
|
-
|
|
790
|
-
These user-referenced docs are often MORE important than ROADMAP.md refs because they represent docs the user specifically wants downstream agents to follow. Never drop them.
|
|
791
|
-
|
|
792
|
-
**Question design:**
|
|
793
|
-
- Options should be concrete, not abstract ("Cards" not "Option A")
|
|
794
|
-
- Each answer should inform the next question or next batch
|
|
795
|
-
- If user picks "Other" to provide freeform input (e.g., "let me describe it", "something else", or an open-ended reply), ask your follow-up as plain text — NOT another AskUserQuestion. Wait for them to type at the normal prompt, then reflect their input back and confirm before resuming AskUserQuestion or the next numbered batch.
|
|
796
|
-
|
|
797
|
-
**Scope creep handling:**
|
|
798
|
-
If user mentions something outside the phase domain:
|
|
799
|
-
```
|
|
800
|
-
"[Feature] sounds like a new capability — that belongs in its own phase.
|
|
801
|
-
I'll note it as a deferred idea.
|
|
802
|
-
|
|
803
|
-
Back to [current area]: [return to current question]"
|
|
804
|
-
```
|
|
805
|
-
|
|
806
|
-
Track deferred ideas internally.
|
|
807
|
-
|
|
808
|
-
**Incremental checkpoint — save after each area completes:**
|
|
809
|
-
|
|
810
|
-
After each area is resolved (user says "Next area" or area auto-resolves in `--auto` mode), immediately write a checkpoint file with all decisions captured so far. This prevents data loss if the session is interrupted mid-discussion.
|
|
811
|
-
|
|
812
|
-
**Checkpoint file:** `${phase_dir}/${padded_phase}-DISCUSS-CHECKPOINT.json`
|
|
813
|
-
|
|
814
|
-
Write after each area:
|
|
815
|
-
```json
|
|
816
|
-
{
|
|
817
|
-
"phase": "{PHASE_NUM}",
|
|
818
|
-
"phase_name": "{phase_name}",
|
|
819
|
-
"timestamp": "{ISO timestamp}",
|
|
820
|
-
"areas_completed": ["Area 1", "Area 2"],
|
|
821
|
-
"areas_remaining": ["Area 3", "Area 4"],
|
|
822
|
-
"decisions": {
|
|
823
|
-
"Area 1": [
|
|
824
|
-
{"question": "...", "answer": "...", "options_presented": ["..."]},
|
|
825
|
-
{"question": "...", "answer": "...", "options_presented": ["..."]}
|
|
826
|
-
],
|
|
827
|
-
"Area 2": [
|
|
828
|
-
{"question": "...", "answer": "...", "options_presented": ["..."]}
|
|
829
|
-
]
|
|
830
|
-
},
|
|
831
|
-
"deferred_ideas": ["..."],
|
|
832
|
-
"canonical_refs": ["..."]
|
|
833
|
-
}
|
|
834
|
-
```
|
|
835
|
-
|
|
836
|
-
This is a structured checkpoint, not the final CONTEXT.md — the `write_context` step still produces the canonical output. But if the session dies, the next `/sdd-discuss-phase` invocation can detect this checkpoint and offer to resume from it instead of starting from scratch.
|
|
837
|
-
|
|
838
|
-
**On session resume:** In the `check_existing` step, also check for `*-DISCUSS-CHECKPOINT.json`. If found and no CONTEXT.md exists:
|
|
839
|
-
- Display: "Found interrupted discussion checkpoint ({N} areas completed). Resume from checkpoint?"
|
|
840
|
-
- Options: "Resume" / "Start fresh"
|
|
841
|
-
- On "Resume": Load the checkpoint, skip completed areas, continue from where it left off
|
|
842
|
-
- On "Start fresh": Delete the checkpoint, proceed as normal
|
|
843
|
-
|
|
844
|
-
**After write_context completes successfully:** Delete the checkpoint file — the canonical CONTEXT.md now has all decisions.
|
|
845
|
-
|
|
846
|
-
**Track discussion log data internally:**
|
|
847
|
-
For each question asked, accumulate:
|
|
848
|
-
- Area name
|
|
849
|
-
- All options presented (label + description)
|
|
850
|
-
- Which option the user selected (or their free-text response)
|
|
851
|
-
- Any follow-up notes or clarifications the user provided
|
|
852
|
-
This data is used to generate DISCUSSION-LOG.md in the `write_context` step.
|
|
363
|
+
- **Canonical ref accumulation** — when the user references a doc/spec/ADR during any answer, immediately Read it (or confirm it exists) and add it to the canonical refs accumulator with full relative path. Use what you learned to inform subsequent questions. These docs are often MORE important than ROADMAP.md refs because the user specifically wants downstream agents to follow them.
|
|
364
|
+
- **Scope creep** — if user mentions something outside the phase domain, capture as deferred idea and redirect.
|
|
365
|
+
- **Incremental checkpoint** — after each area completes, write `${phase_dir}/${padded_phase}-DISCUSS-CHECKPOINT.json`. Read `workflows/discuss-phase/templates/checkpoint.json` for the schema. The checkpoint is structured state, not the canonical CONTEXT.md (`write_context` produces the canonical output). On session resume, the parent's `check_existing` step detects the checkpoint and offers to resume.
|
|
366
|
+
- **Discussion log accumulation** — for each question asked, accumulate area name, options presented, user's selection, follow-up notes. Used by `git_commit` to write DISCUSSION-LOG.md.
|
|
853
367
|
</step>
|
|
854
368
|
|
|
855
369
|
<step name="write_context">
|
|
856
|
-
Create CONTEXT.md
|
|
370
|
+
Create CONTEXT.md and DISCUSSION-LOG.md.
|
|
857
371
|
|
|
858
|
-
|
|
859
|
-
This file is for human reference only (software audits, compliance reviews). It is NOT
|
|
860
|
-
consumed by downstream agents (researcher, planner, executor).
|
|
372
|
+
DISCUSSION-LOG.md is for human reference only (audits, retrospectives) and is NOT consumed by downstream agents (researcher, planner, executor).
|
|
861
373
|
|
|
862
374
|
**Find or create phase directory:**
|
|
863
375
|
|
|
864
|
-
Use values from init: `phase_dir`, `phase_slug`, `padded_phase`.
|
|
865
|
-
|
|
866
|
-
If `phase_dir` is null (phase exists in roadmap but no directory):
|
|
376
|
+
Use values from init: `phase_dir`, `expected_phase_dir`, `phase_slug`, `padded_phase`. If `phase_dir` is null:
|
|
867
377
|
```bash
|
|
868
|
-
mkdir -p "
|
|
378
|
+
mkdir -p "${expected_phase_dir}"
|
|
869
379
|
```
|
|
870
380
|
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
**Structure the content by what was discussed:**
|
|
874
|
-
|
|
875
|
-
```markdown
|
|
876
|
-
# Phase [X]: [Name] - Context
|
|
877
|
-
|
|
878
|
-
**Gathered:** [date]
|
|
879
|
-
**Status:** Ready for planning
|
|
880
|
-
|
|
881
|
-
<domain>
|
|
882
|
-
## Phase Boundary
|
|
883
|
-
|
|
884
|
-
[Clear statement of what this phase delivers — the scope anchor]
|
|
885
|
-
|
|
886
|
-
</domain>
|
|
887
|
-
|
|
888
|
-
<decisions>
|
|
889
|
-
## Implementation Decisions
|
|
890
|
-
|
|
891
|
-
### [Category 1 that was discussed]
|
|
892
|
-
- **D-01:** [Decision or preference captured]
|
|
893
|
-
- **D-02:** [Another decision if applicable]
|
|
894
|
-
|
|
895
|
-
### [Category 2 that was discussed]
|
|
896
|
-
- **D-03:** [Decision or preference captured]
|
|
897
|
-
|
|
898
|
-
### Claude's Discretion
|
|
899
|
-
[Areas where user said "you decide" — note that Claude has flexibility here]
|
|
900
|
-
|
|
901
|
-
### Folded Todos
|
|
902
|
-
[If any todos were folded into scope from the cross_reference_todos step, list them here.
|
|
903
|
-
Each entry should include the todo title, original problem, and how it fits this phase's scope.
|
|
904
|
-
If no todos were folded: omit this subsection entirely.]
|
|
905
|
-
|
|
906
|
-
</decisions>
|
|
907
|
-
|
|
908
|
-
<canonical_refs>
|
|
909
|
-
## Canonical References
|
|
910
|
-
|
|
911
|
-
**Downstream agents MUST read these before planning or implementing.**
|
|
912
|
-
|
|
913
|
-
[MANDATORY section. Write the FULL accumulated canonical refs list here.
|
|
914
|
-
Sources: ROADMAP.md refs + REQUIREMENTS.md refs + user-referenced docs during
|
|
915
|
-
discussion + any docs discovered during codebase scout. Group by topic area.
|
|
916
|
-
Every entry needs a full relative path — not just a name.]
|
|
917
|
-
|
|
918
|
-
### [Topic area 1]
|
|
919
|
-
- `path/to/adr-or-spec.md` — [What it decides/defines that's relevant]
|
|
920
|
-
- `path/to/doc.md` §N — [Specific section reference]
|
|
921
|
-
|
|
922
|
-
### [Topic area 2]
|
|
923
|
-
- `path/to/feature-doc.md` — [What this doc defines]
|
|
924
|
-
|
|
925
|
-
[If no external specs: "No external specs — requirements fully captured in decisions above"]
|
|
926
|
-
|
|
927
|
-
</canonical_refs>
|
|
928
|
-
|
|
929
|
-
<code_context>
|
|
930
|
-
## Existing Code Insights
|
|
931
|
-
|
|
932
|
-
### Reusable Assets
|
|
933
|
-
- [Component/hook/utility]: [How it could be used in this phase]
|
|
934
|
-
|
|
935
|
-
### Established Patterns
|
|
936
|
-
- [Pattern]: [How it constrains/enables this phase]
|
|
937
|
-
|
|
938
|
-
### Integration Points
|
|
939
|
-
- [Where new code connects to existing system]
|
|
940
|
-
|
|
941
|
-
</code_context>
|
|
942
|
-
|
|
943
|
-
<specifics>
|
|
944
|
-
## Specific Ideas
|
|
945
|
-
|
|
946
|
-
[Any particular references, examples, or "I want it like X" moments from discussion]
|
|
947
|
-
|
|
948
|
-
[If none: "No specific requirements — open to standard approaches"]
|
|
949
|
-
|
|
950
|
-
</specifics>
|
|
381
|
+
Set `phase_dir="${expected_phase_dir}"` after creation.
|
|
951
382
|
|
|
952
|
-
|
|
953
|
-
## Deferred Ideas
|
|
954
|
-
|
|
955
|
-
[Ideas that came up but belong in other phases. Don't lose them.]
|
|
956
|
-
|
|
957
|
-
### Reviewed Todos (not folded)
|
|
958
|
-
[If any todos were reviewed in cross_reference_todos but not folded into scope,
|
|
959
|
-
list them here so future phases know they were considered.
|
|
960
|
-
Each entry: todo title + reason it was deferred (out of scope, belongs in Phase Y, etc.)
|
|
961
|
-
If no reviewed-but-deferred todos: omit this subsection entirely.]
|
|
962
|
-
|
|
963
|
-
[If none: "None — discussion stayed within phase scope"]
|
|
383
|
+
**File location:** `${phase_dir}/${padded_phase}-CONTEXT.md`
|
|
964
384
|
|
|
965
|
-
|
|
385
|
+
**Read the CONTEXT.md template now (lazy-loaded):**
|
|
386
|
+
```
|
|
387
|
+
Read(workflows/discuss-phase/templates/context.md)
|
|
388
|
+
```
|
|
966
389
|
|
|
967
|
-
|
|
390
|
+
The template documents variable substitutions and conditional sections. Substitute live values for `[X]`, `[Name]`, `[date]`, `${padded_phase}`, `{N}`. Include `<spec_lock>` only when `spec_loaded = true`. Include "Folded Todos" / "Reviewed Todos" subsections only when the `cross_reference_todos` step folded or reviewed todos.
|
|
968
391
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
392
|
+
**SPEC.md integration** — If `spec_loaded = true`:
|
|
393
|
+
- Add the `<spec_lock>` section immediately after `<domain>`.
|
|
394
|
+
- Add the SPEC.md file to `<canonical_refs>` with note "Locked requirements — MUST read before planning".
|
|
395
|
+
- Do NOT duplicate requirements text from SPEC.md into `<decisions>` — agents read SPEC.md directly.
|
|
396
|
+
- The `<decisions>` section contains only implementation decisions from this discussion.
|
|
972
397
|
|
|
973
|
-
Write file.
|
|
398
|
+
Write the file.
|
|
974
399
|
</step>
|
|
975
400
|
|
|
976
401
|
<step name="confirm_creation">
|
|
@@ -980,10 +405,6 @@ Present summary and next steps:
|
|
|
980
405
|
Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
|
|
981
406
|
|
|
982
407
|
## Decisions Captured
|
|
983
|
-
|
|
984
|
-
### [Category]
|
|
985
|
-
- [Key decision]
|
|
986
|
-
|
|
987
408
|
### [Category]
|
|
988
409
|
- [Key decision]
|
|
989
410
|
|
|
@@ -993,81 +414,40 @@ Created: .planning/phases/${PADDED_PHASE}-${SLUG}/${PADDED_PHASE}-CONTEXT.md
|
|
|
993
414
|
|
|
994
415
|
---
|
|
995
416
|
|
|
996
|
-
## ▶ Next Up
|
|
417
|
+
## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE}
|
|
997
418
|
|
|
998
419
|
**Phase ${PHASE}: [Name]** — [Goal from ROADMAP.md]
|
|
999
420
|
|
|
1000
421
|
`/clear` then:
|
|
1001
422
|
|
|
1002
|
-
`/sdd
|
|
423
|
+
`/sdd:plan-phase ${PHASE} ${SDD_WS}`
|
|
1003
424
|
|
|
1004
425
|
---
|
|
1005
426
|
|
|
1006
|
-
**Also available:**
|
|
1007
|
-
- `/sdd-discuss-phase ${PHASE} --chain ${SDD_WS}` — re-run with auto plan+execute after
|
|
1008
|
-
- `/sdd-plan-phase ${PHASE} --skip-research ${SDD_WS}` — plan without research
|
|
1009
|
-
- `/sdd-ui-phase ${PHASE} ${SDD_WS}` — generate UI design contract before planning (if phase has frontend work)
|
|
1010
|
-
- Review/edit CONTEXT.md before continuing
|
|
1011
|
-
|
|
1012
|
-
---
|
|
427
|
+
**Also available:** `--chain` for auto plan+execute after; `/sdd:plan-phase ${PHASE} --skip-research ${SDD_WS}` to plan without research; `/sdd:ui-phase ${PHASE} ${SDD_WS}` for UI design contracts; review/edit CONTEXT.md before continuing.
|
|
1013
428
|
```
|
|
1014
429
|
</step>
|
|
1015
430
|
|
|
1016
431
|
<step name="git_commit">
|
|
1017
|
-
**Write DISCUSSION-LOG.md before committing
|
|
432
|
+
**Write DISCUSSION-LOG.md before committing.**
|
|
1018
433
|
|
|
1019
434
|
**File location:** `${phase_dir}/${padded_phase}-DISCUSSION-LOG.md`
|
|
1020
435
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
> **Audit trail only.** Do not use as input to planning, research, or execution agents.
|
|
1025
|
-
> Decisions are captured in CONTEXT.md — this log preserves the alternatives considered.
|
|
1026
|
-
|
|
1027
|
-
**Date:** [ISO date]
|
|
1028
|
-
**Phase:** [phase number]-[phase name]
|
|
1029
|
-
**Areas discussed:** [comma-separated list]
|
|
1030
|
-
|
|
1031
|
-
---
|
|
1032
|
-
|
|
1033
|
-
[For each gray area discussed:]
|
|
1034
|
-
|
|
1035
|
-
## [Area Name]
|
|
1036
|
-
|
|
1037
|
-
| Option | Description | Selected |
|
|
1038
|
-
|--------|-------------|----------|
|
|
1039
|
-
| [Option 1] | [Description from AskUserQuestion] | |
|
|
1040
|
-
| [Option 2] | [Description] | ✓ |
|
|
1041
|
-
| [Option 3] | [Description] | |
|
|
1042
|
-
|
|
1043
|
-
**User's choice:** [Selected option or free-text response]
|
|
1044
|
-
**Notes:** [Any clarifications, follow-up context, or rationale the user provided]
|
|
1045
|
-
|
|
1046
|
-
---
|
|
1047
|
-
|
|
1048
|
-
[Repeat for each area]
|
|
1049
|
-
|
|
1050
|
-
## Claude's Discretion
|
|
1051
|
-
|
|
1052
|
-
[List areas where user said "you decide" or deferred to Claude]
|
|
1053
|
-
|
|
1054
|
-
## Deferred Ideas
|
|
1055
|
-
|
|
1056
|
-
[Ideas mentioned during discussion that were noted for future phases]
|
|
436
|
+
**Read the DISCUSSION-LOG.md template now (lazy-loaded):**
|
|
437
|
+
```
|
|
438
|
+
Read(workflows/discuss-phase/templates/discussion-log.md)
|
|
1057
439
|
```
|
|
1058
440
|
|
|
1059
|
-
Write file.
|
|
441
|
+
Substitute live values from the discussion log accumulator (area names, options presented, user selections, notes, deferred ideas, Claude's discretion items). Write the file.
|
|
1060
442
|
|
|
1061
443
|
**Clean up checkpoint file** — CONTEXT.md is now the canonical record:
|
|
1062
|
-
|
|
1063
444
|
```bash
|
|
1064
445
|
rm -f "${phase_dir}/${padded_phase}-DISCUSS-CHECKPOINT.json"
|
|
1065
446
|
```
|
|
1066
447
|
|
|
1067
448
|
Commit phase context and discussion log:
|
|
1068
|
-
|
|
1069
449
|
```bash
|
|
1070
|
-
|
|
450
|
+
sdd-sdk query commit "docs(${padded_phase}): capture phase context" --files "${phase_dir}/${padded_phase}-CONTEXT.md" "${phase_dir}/${padded_phase}-DISCUSSION-LOG.md"
|
|
1071
451
|
```
|
|
1072
452
|
|
|
1073
453
|
Confirm: "Committed: docs(${padded_phase}): capture phase context"
|
|
@@ -1077,125 +457,43 @@ Confirm: "Committed: docs(${padded_phase}): capture phase context"
|
|
|
1077
457
|
Update STATE.md with session info:
|
|
1078
458
|
|
|
1079
459
|
```bash
|
|
1080
|
-
|
|
460
|
+
sdd-sdk query state.record-session \
|
|
1081
461
|
--stopped-at "Phase ${PHASE} context gathered" \
|
|
1082
462
|
--resume-file "${phase_dir}/${padded_phase}-CONTEXT.md"
|
|
1083
|
-
```
|
|
1084
463
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
```bash
|
|
1088
|
-
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
|
|
464
|
+
sdd-sdk query commit "docs(state): record phase ${PHASE} context session" --files .planning/STATE.md
|
|
1089
465
|
```
|
|
1090
466
|
</step>
|
|
1091
467
|
|
|
1092
468
|
<step name="auto_advance">
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
1. Parse `--auto` and `--chain` flags from $ARGUMENTS
|
|
1096
|
-
2. **Sync chain flag with intent** — if user invoked manually (no `--auto` and no `--chain`), clear the ephemeral chain flag from any previous interrupted `--auto` chain. This does NOT touch `workflow.auto_advance` (the user's persistent settings preference):
|
|
1097
|
-
```bash
|
|
1098
|
-
if [[ ! "$ARGUMENTS" =~ --auto ]] && [[ ! "$ARGUMENTS" =~ --chain ]]; then
|
|
1099
|
-
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-set workflow._auto_chain_active false 2>/dev/null
|
|
1100
|
-
fi
|
|
1101
|
-
```
|
|
1102
|
-
3. Read both the chain flag and user preference:
|
|
1103
|
-
```bash
|
|
1104
|
-
AUTO_CHAIN=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get workflow._auto_chain_active 2>/dev/null || echo "false")
|
|
1105
|
-
AUTO_CFG=$(node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-get workflow.auto_advance 2>/dev/null || echo "false")
|
|
1106
|
-
```
|
|
1107
|
-
|
|
1108
|
-
**If `--auto` or `--chain` flag present AND `AUTO_CHAIN` is not true:** Persist chain flag to config (handles direct usage without new-project):
|
|
1109
|
-
```bash
|
|
1110
|
-
node "$HOME/.claude/sdd/bin/sdd-tools.cjs" config-set workflow._auto_chain_active true
|
|
1111
|
-
```
|
|
1112
|
-
|
|
1113
|
-
**If `--auto` flag present OR `--chain` flag present OR `AUTO_CHAIN` is true OR `AUTO_CFG` is true:**
|
|
1114
|
-
|
|
1115
|
-
Display banner:
|
|
1116
|
-
```
|
|
1117
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1118
|
-
SDD ► AUTO-ADVANCING TO PLAN
|
|
1119
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1120
|
-
|
|
1121
|
-
Context captured. Launching plan-phase...
|
|
1122
|
-
```
|
|
1123
|
-
|
|
1124
|
-
Launch plan-phase using the Skill tool to avoid nested Task sessions (which cause runtime freezes due to deep agent nesting — see #686):
|
|
1125
|
-
```
|
|
1126
|
-
Skill(skill="sdd-plan-phase", args="${PHASE} --auto ${SDD_WS}")
|
|
1127
|
-
```
|
|
1128
|
-
|
|
1129
|
-
This keeps the auto-advance chain flat — discuss, plan, and execute all run at the same nesting level rather than spawning increasingly deep Task agents.
|
|
469
|
+
Auto-advance behavior is defined in `workflows/discuss-phase/modes/chain.md`.
|
|
1130
470
|
|
|
1131
|
-
|
|
1132
|
-
- **PHASE COMPLETE** → Full chain succeeded. Display:
|
|
1133
|
-
```
|
|
1134
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1135
|
-
SDD ► PHASE ${PHASE} COMPLETE
|
|
1136
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1137
|
-
|
|
1138
|
-
Auto-advance pipeline finished: discuss → plan → execute
|
|
471
|
+
If `--auto`, `--chain`, or `workflow.auto_advance` is enabled, Read that file now and execute its `auto_advance` step (which handles flag-syncing, banner display, plan-phase Skill dispatch, and return-status branching).
|
|
1139
472
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
Next: /sdd-discuss-phase ${NEXT_PHASE} ${WAS_CHAIN ? "--chain" : "--auto"} ${SDD_WS}
|
|
1143
|
-
```
|
|
1144
|
-
- **PLANNING COMPLETE** → Planning done, execution didn't complete:
|
|
1145
|
-
```
|
|
1146
|
-
Auto-advance partial: Planning complete, execution did not finish.
|
|
1147
|
-
Continue: /sdd-execute-phase ${PHASE} ${SDD_WS}
|
|
1148
|
-
```
|
|
1149
|
-
- **PLANNING INCONCLUSIVE / CHECKPOINT** → Stop chain:
|
|
1150
|
-
```
|
|
1151
|
-
Auto-advance stopped: Planning needs input.
|
|
1152
|
-
Continue: /sdd-plan-phase ${PHASE} ${SDD_WS}
|
|
1153
|
-
```
|
|
1154
|
-
- **GAPS FOUND** → Stop chain:
|
|
1155
|
-
```
|
|
1156
|
-
Auto-advance stopped: Gaps found during execution.
|
|
1157
|
-
Continue: /sdd-plan-phase ${PHASE} --gaps ${SDD_WS}
|
|
1158
|
-
```
|
|
1159
|
-
|
|
1160
|
-
**If none of `--auto`, `--chain`, nor config enabled:**
|
|
1161
|
-
Route to `confirm_creation` step (existing behavior — show manual next steps).
|
|
473
|
+
Otherwise, route to `confirm_creation` (manual next steps).
|
|
1162
474
|
</step>
|
|
1163
475
|
|
|
1164
476
|
</process>
|
|
1165
477
|
|
|
1166
|
-
<power_user_mode>
|
|
1167
|
-
When `--power` flag is present in ARGUMENTS, skip interactive questioning and execute the power user workflow.
|
|
1168
|
-
|
|
1169
|
-
The power user mode generates ALL questions upfront into machine-readable and human-friendly files, then waits for the user to answer at their own pace before processing all answers in a single pass.
|
|
1170
|
-
|
|
1171
|
-
**Full step-by-step instructions:** @~/.claude/sdd/workflows/discuss-phase-power.md
|
|
1172
|
-
|
|
1173
|
-
**Summary of flow:**
|
|
1174
|
-
1. Run the same phase analysis (gray area identification) as standard mode
|
|
1175
|
-
2. Write all questions to `{phase_dir}/{padded_phase}-QUESTIONS.json` and `{phase_dir}/{padded_phase}-QUESTIONS.html`
|
|
1176
|
-
3. Notify user with file paths and wait for a "refresh" or "finalize" command
|
|
1177
|
-
4. On "refresh": read the JSON, process answered questions, update stats and HTML
|
|
1178
|
-
5. On "finalize": read all answers from JSON, generate CONTEXT.md in the standard format
|
|
1179
|
-
</power_user_mode>
|
|
1180
|
-
|
|
1181
478
|
<success_criteria>
|
|
1182
479
|
- Phase validated against roadmap
|
|
1183
480
|
- Prior context loaded (PROJECT.md, REQUIREMENTS.md, STATE.md, prior CONTEXT.md files)
|
|
1184
481
|
- Already-decided questions not re-asked (carried forward from prior phases)
|
|
1185
482
|
- Codebase scouted for reusable assets, patterns, and integration points
|
|
1186
|
-
- Gray areas identified
|
|
1187
|
-
- User selected which areas to discuss
|
|
1188
|
-
- Each selected area explored
|
|
483
|
+
- Gray areas identified with code and prior-decision annotations
|
|
484
|
+
- User selected which areas to discuss (or `--all`/`--auto` auto-selected)
|
|
485
|
+
- Each selected area explored under the active mode's rules until satisfied
|
|
1189
486
|
- Scope creep redirected to deferred ideas
|
|
1190
487
|
- CONTEXT.md captures actual decisions, not vague vision
|
|
1191
|
-
- CONTEXT.md includes canonical_refs section with full file paths to every spec/ADR/doc downstream agents need (MANDATORY
|
|
488
|
+
- CONTEXT.md includes canonical_refs section with full file paths to every spec/ADR/doc downstream agents need (MANDATORY)
|
|
1192
489
|
- CONTEXT.md includes code_context section with reusable assets and patterns
|
|
1193
490
|
- Deferred ideas preserved for future phases
|
|
1194
491
|
- STATE.md updated with session info
|
|
1195
492
|
- User knows next steps
|
|
1196
493
|
- Checkpoint file written after each area completes (incremental save)
|
|
1197
|
-
- Interrupted sessions can be resumed from checkpoint
|
|
494
|
+
- Interrupted sessions can be resumed from checkpoint
|
|
1198
495
|
- Checkpoint file cleaned up after successful CONTEXT.md write
|
|
1199
496
|
- `--chain` triggers interactive discuss followed by auto plan+execute (no auto-answering)
|
|
1200
497
|
- `--chain` and `--auto` both persist chain flag and auto-advance to plan-phase
|
|
498
|
+
- Per-mode bodies, templates, and advisor flow are lazy-loaded — parent stays under the workflow size budget enforced by `tests/workflow-size-budget.test.cjs`
|
|
1201
499
|
</success_criteria>
|