sillyspec 3.27.12 → 3.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/sillyspec-execute/SKILL.md +214 -214
- package/.claude/skills/sillyspec-plan/SKILL.md +156 -156
- package/.claude/skills/sillyspec-quick/SKILL.md +116 -116
- package/package.json +1 -1
- package/src/agent-session-log.js +77 -10
- package/src/archive-delta.js +419 -0
- package/src/config-schema.js +2 -2
- package/src/contract-matrix.js +15 -2
- package/src/design-facts.js +354 -0
- package/src/docs-check.js +79 -8
- package/src/doctor-diagnostics.js +75 -3
- package/src/endpoint-baseline.js +109 -0
- package/src/endpoint-extractor.js +100 -24
- package/src/git-helper.js +31 -0
- package/src/index.js +248 -8
- package/src/machine-interface.js +63 -0
- package/src/modules.js +41 -12
- package/src/progress/change-registry.js +20 -0
- package/src/progress/consistency-doctor.js +124 -5
- package/src/progress/stage-machine.js +118 -2
- package/src/progress.js +6 -0
- package/src/quicklog.js +51 -0
- package/src/run/command.js +71 -2
- package/src/run/complete-handlers.js +84 -7
- package/src/run/complete.js +58 -5
- package/src/run/gates.js +333 -2
- package/src/run/prompt.js +70 -0
- package/src/run/quick-audit.js +98 -0
- package/src/run/scan-profile.js +98 -6
- package/src/run/shared.js +66 -1
- package/src/run/stage.js +25 -12
- package/src/scan-diff.js +54 -1
- package/src/scan-facts.js +173 -0
- package/src/scan-postcheck.js +110 -3
- package/src/spec-sync.js +210 -16
- package/src/stage-review.js +62 -3
- package/src/stages/archive.js +5 -5
- package/src/stages/brainstorm.js +10 -10
- package/src/stages/execute.js +21 -15
- package/src/stages/plan-postcheck.js +194 -1
- package/src/stages/plan.js +6 -2
- package/src/stages/scan.js +44 -102
- package/src/stages/verify.js +9 -7
- package/src/sync.js +122 -4
- package/src/task-review.js +51 -4
- package/src/taskcard.js +8 -1
- package/src/verify-postcheck.js +670 -10
- package/src/verify-probes.js +92 -10
- package/src/workflow.js +30 -0
- package/templates/agents-instruction.md +1 -1
- package/templates/prompts/taskcard-rules.md +5 -0
- package/templates/workflows/scan-docs.yaml +6 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.claude/worktrees/sillyspec-data-model-research/.gitattributes +0 -2
- package/.claude/worktrees/sillyspec-data-model-research/.husky/pre-push +0 -20
- package/.claude/worktrees/sillyspec-data-model-research/README.md +0 -203
- package/.claude/worktrees/sillyspec-data-model-research/SKILL.md +0 -91
- package/.claude/worktrees/sillyspec-data-model-research/bin/sillyspec.js +0 -2
- package/.claude/worktrees/sillyspec-data-model-research/logo.jpg +0 -0
- package/.claude/worktrees/sillyspec-data-model-research/package-lock.json +0 -977
- package/.claude/worktrees/sillyspec-data-model-research/package.json +0 -39
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/favicon.jpg +0 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/index.html +0 -16
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/logo.jpg +0 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/package.json +0 -25
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/executor.js +0 -95
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/index.js +0 -679
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/parser.js +0 -526
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/watcher.js +0 -357
- package/.claude/worktrees/sillyspec-data-model-research/src/agent-session-log.js +0 -803
- package/.claude/worktrees/sillyspec-data-model-research/src/change-list.js +0 -290
- package/.claude/worktrees/sillyspec-data-model-research/src/change-risk-profile.js +0 -270
- package/.claude/worktrees/sillyspec-data-model-research/src/check-primitives.js +0 -65
- package/.claude/worktrees/sillyspec-data-model-research/src/classify-change.js +0 -109
- package/.claude/worktrees/sillyspec-data-model-research/src/commit-suggest.js +0 -202
- package/.claude/worktrees/sillyspec-data-model-research/src/config-cat.js +0 -88
- package/.claude/worktrees/sillyspec-data-model-research/src/config-schema.js +0 -328
- package/.claude/worktrees/sillyspec-data-model-research/src/constants.js +0 -97
- package/.claude/worktrees/sillyspec-data-model-research/src/contract-matrix.js +0 -480
- package/.claude/worktrees/sillyspec-data-model-research/src/datetime.js +0 -20
- package/.claude/worktrees/sillyspec-data-model-research/src/db-engine.js +0 -55
- package/.claude/worktrees/sillyspec-data-model-research/src/db.js +0 -381
- package/.claude/worktrees/sillyspec-data-model-research/src/decision-distill.js +0 -517
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/local-agent.js +0 -155
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/probe.js +0 -246
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/strategy.js +0 -121
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-check.js +0 -825
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-debt.js +0 -393
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-gate.js +0 -107
- package/.claude/worktrees/sillyspec-data-model-research/src/doctor-diagnostics.js +0 -1099
- package/.claude/worktrees/sillyspec-data-model-research/src/endpoint-extractor.js +0 -420
- package/.claude/worktrees/sillyspec-data-model-research/src/foreign-declared.js +0 -78
- package/.claude/worktrees/sillyspec-data-model-research/src/fs-atomic.js +0 -73
- package/.claude/worktrees/sillyspec-data-model-research/src/git-helper.js +0 -150
- package/.claude/worktrees/sillyspec-data-model-research/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.claude/worktrees/sillyspec-data-model-research/src/hooks/worktree-guard.js +0 -892
- package/.claude/worktrees/sillyspec-data-model-research/src/index.js +0 -2798
- package/.claude/worktrees/sillyspec-data-model-research/src/init.js +0 -626
- package/.claude/worktrees/sillyspec-data-model-research/src/knowledge-match.js +0 -231
- package/.claude/worktrees/sillyspec-data-model-research/src/local-detect.js +0 -128
- package/.claude/worktrees/sillyspec-data-model-research/src/local-register.js +0 -104
- package/.claude/worktrees/sillyspec-data-model-research/src/machine-interface.js +0 -543
- package/.claude/worktrees/sillyspec-data-model-research/src/migrate.js +0 -127
- package/.claude/worktrees/sillyspec-data-model-research/src/module-impact.js +0 -166
- package/.claude/worktrees/sillyspec-data-model-research/src/module-resolve.js +0 -222
- package/.claude/worktrees/sillyspec-data-model-research/src/modules.js +0 -580
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/change-registry.js +0 -336
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/consistency-doctor.js +0 -355
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/shared.js +0 -36
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/stage-machine.js +0 -594
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/step-store.js +0 -265
- package/.claude/worktrees/sillyspec-data-model-research/src/progress.js +0 -1304
- package/.claude/worktrees/sillyspec-data-model-research/src/quick-recommend.js +0 -115
- package/.claude/worktrees/sillyspec-data-model-research/src/quicklog.js +0 -852
- package/.claude/worktrees/sillyspec-data-model-research/src/review-tier.js +0 -77
- package/.claude/worktrees/sillyspec-data-model-research/src/run/command.js +0 -1595
- package/.claude/worktrees/sillyspec-data-model-research/src/run/complete-handlers.js +0 -1552
- package/.claude/worktrees/sillyspec-data-model-research/src/run/complete.js +0 -1259
- package/.claude/worktrees/sillyspec-data-model-research/src/run/concurrent-detect.js +0 -156
- package/.claude/worktrees/sillyspec-data-model-research/src/run/gates.js +0 -1084
- package/.claude/worktrees/sillyspec-data-model-research/src/run/multi-repo-context.js +0 -208
- package/.claude/worktrees/sillyspec-data-model-research/src/run/next.js +0 -128
- package/.claude/worktrees/sillyspec-data-model-research/src/run/prompt.js +0 -843
- package/.claude/worktrees/sillyspec-data-model-research/src/run/quick-audit.js +0 -186
- package/.claude/worktrees/sillyspec-data-model-research/src/run/scan-profile.js +0 -269
- package/.claude/worktrees/sillyspec-data-model-research/src/run/shared.js +0 -1562
- package/.claude/worktrees/sillyspec-data-model-research/src/run/stage.js +0 -584
- package/.claude/worktrees/sillyspec-data-model-research/src/run.js +0 -23
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-diff.js +0 -388
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-postcheck.js +0 -512
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-staleness.js +0 -95
- package/.claude/worktrees/sillyspec-data-model-research/src/setup.js +0 -414
- package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/client.js +0 -597
- package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/config.js +0 -62
- package/.claude/worktrees/sillyspec-data-model-research/src/spec-dir-typo.js +0 -50
- package/.claude/worktrees/sillyspec-data-model-research/src/spec-sync.js +0 -358
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-engine.js +0 -171
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-spec.js +0 -550
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract.js +0 -889
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-review.js +0 -597
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/archive.js +0 -199
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm-auto.js +0 -236
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm.js +0 -617
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/cmd-existence.js +0 -145
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/doctor.js +0 -540
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/execute.js +0 -1275
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/explore.js +0 -43
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/index.js +0 -29
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/knowledge.js +0 -514
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan-postcheck.js +0 -1344
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan.js +0 -650
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/quick.js +0 -167
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/scan.js +0 -608
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/status.js +0 -64
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/verify.js +0 -246
- package/.claude/worktrees/sillyspec-data-model-research/src/sync.js +0 -1470
- package/.claude/worktrees/sillyspec-data-model-research/src/task-review.js +0 -1498
- package/.claude/worktrees/sillyspec-data-model-research/src/taskcard.js +0 -210
- package/.claude/worktrees/sillyspec-data-model-research/src/verify-postcheck.js +0 -1718
- package/.claude/worktrees/sillyspec-data-model-research/src/verify-probes.js +0 -277
- package/.claude/worktrees/sillyspec-data-model-research/src/version.js +0 -19
- package/.claude/worktrees/sillyspec-data-model-research/src/workflow.js +0 -600
- package/.claude/worktrees/sillyspec-data-model-research/src/workspace.js +0 -125
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree-apply.js +0 -1446
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree-deps.js +0 -576
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree.js +0 -1715
- package/.claude/worktrees/sillyspec-data-model-research/templates/claude-instruction.md +0 -23
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/taskcard-rules.md +0 -28
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/testcase-design.md +0 -12
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/verify-probes.md +0 -32
- package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/archive-impact.yaml +0 -79
- package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-propose/SKILL.md +0 -87
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/2c37b1d7/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/2c37b1d7/.claude/skills/verify-per-user/SKILL.md +0 -6
- package/.worktrees/2c37b1d7/.gitattributes +0 -2
- package/.worktrees/2c37b1d7/.husky/pre-push +0 -20
- package/.worktrees/2c37b1d7/README.md +0 -203
- package/.worktrees/2c37b1d7/SKILL.md +0 -91
- package/.worktrees/2c37b1d7/architecture-analysis.md +0 -448
- package/.worktrees/2c37b1d7/bin/sillyspec.js +0 -2
- package/.worktrees/2c37b1d7/eval/README.md +0 -86
- package/.worktrees/2c37b1d7/eval/eval.config.json +0 -28
- package/.worktrees/2c37b1d7/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/2c37b1d7/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/2c37b1d7/eval/lib/config.mjs +0 -82
- package/.worktrees/2c37b1d7/eval/lib/db.mjs +0 -76
- package/.worktrees/2c37b1d7/eval/lib/report.mjs +0 -120
- package/.worktrees/2c37b1d7/eval/lib/runner.mjs +0 -157
- package/.worktrees/2c37b1d7/eval/lib/tasks.mjs +0 -73
- package/.worktrees/2c37b1d7/eval/lib/util.mjs +0 -107
- package/.worktrees/2c37b1d7/eval/lib/workdir.mjs +0 -30
- package/.worktrees/2c37b1d7/eval/run.mjs +0 -83
- package/.worktrees/2c37b1d7/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/2c37b1d7/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/2c37b1d7/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/2c37b1d7/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/2c37b1d7/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/2c37b1d7/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/2c37b1d7/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/2c37b1d7/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/2c37b1d7/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/2c37b1d7/logo.jpg +0 -0
- package/.worktrees/2c37b1d7/package-lock.json +0 -977
- package/.worktrees/2c37b1d7/package.json +0 -41
- package/.worktrees/2c37b1d7/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/2c37b1d7/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/2c37b1d7/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/2c37b1d7/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/2c37b1d7/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/2c37b1d7/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/2c37b1d7/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/2c37b1d7/packages/dashboard/package.json +0 -25
- package/.worktrees/2c37b1d7/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/2c37b1d7/packages/dashboard/server/index.js +0 -679
- package/.worktrees/2c37b1d7/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/2c37b1d7/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/2c37b1d7/src/agent-session-log.js +0 -803
- package/.worktrees/2c37b1d7/src/change-list.js +0 -290
- package/.worktrees/2c37b1d7/src/change-risk-profile.js +0 -339
- package/.worktrees/2c37b1d7/src/check-primitives.js +0 -65
- package/.worktrees/2c37b1d7/src/classify-change.js +0 -109
- package/.worktrees/2c37b1d7/src/commit-suggest.js +0 -202
- package/.worktrees/2c37b1d7/src/config-cat.js +0 -88
- package/.worktrees/2c37b1d7/src/config-schema.js +0 -328
- package/.worktrees/2c37b1d7/src/constants.js +0 -97
- package/.worktrees/2c37b1d7/src/contract-matrix.js +0 -533
- package/.worktrees/2c37b1d7/src/datetime.js +0 -20
- package/.worktrees/2c37b1d7/src/db-engine.js +0 -55
- package/.worktrees/2c37b1d7/src/db.js +0 -381
- package/.worktrees/2c37b1d7/src/decision-distill.js +0 -517
- package/.worktrees/2c37b1d7/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/2c37b1d7/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/2c37b1d7/src/dispatch/probe.js +0 -246
- package/.worktrees/2c37b1d7/src/dispatch/strategy.js +0 -121
- package/.worktrees/2c37b1d7/src/docs-check.js +0 -825
- package/.worktrees/2c37b1d7/src/docs-debt.js +0 -393
- package/.worktrees/2c37b1d7/src/docs-gate.js +0 -107
- package/.worktrees/2c37b1d7/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/2c37b1d7/src/endpoint-extractor.js +0 -409
- package/.worktrees/2c37b1d7/src/foreign-declared.js +0 -155
- package/.worktrees/2c37b1d7/src/fs-atomic.js +0 -73
- package/.worktrees/2c37b1d7/src/git-helper.js +0 -150
- package/.worktrees/2c37b1d7/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/2c37b1d7/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/2c37b1d7/src/index.js +0 -2854
- package/.worktrees/2c37b1d7/src/init.js +0 -626
- package/.worktrees/2c37b1d7/src/knowledge-match.js +0 -231
- package/.worktrees/2c37b1d7/src/local-detect.js +0 -128
- package/.worktrees/2c37b1d7/src/local-register.js +0 -104
- package/.worktrees/2c37b1d7/src/machine-interface.js +0 -543
- package/.worktrees/2c37b1d7/src/migrate.js +0 -127
- package/.worktrees/2c37b1d7/src/module-impact.js +0 -166
- package/.worktrees/2c37b1d7/src/module-resolve.js +0 -222
- package/.worktrees/2c37b1d7/src/modules.js +0 -580
- package/.worktrees/2c37b1d7/src/plan-adopt-waves.js +0 -126
- package/.worktrees/2c37b1d7/src/progress/change-registry.js +0 -336
- package/.worktrees/2c37b1d7/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/2c37b1d7/src/progress/shared.js +0 -36
- package/.worktrees/2c37b1d7/src/progress/stage-machine.js +0 -594
- package/.worktrees/2c37b1d7/src/progress/step-store.js +0 -265
- package/.worktrees/2c37b1d7/src/progress.js +0 -1304
- package/.worktrees/2c37b1d7/src/quick-recommend.js +0 -115
- package/.worktrees/2c37b1d7/src/quicklog.js +0 -883
- package/.worktrees/2c37b1d7/src/review-tier.js +0 -77
- package/.worktrees/2c37b1d7/src/run/command.js +0 -1641
- package/.worktrees/2c37b1d7/src/run/complete-handlers.js +0 -1552
- package/.worktrees/2c37b1d7/src/run/complete.js +0 -1259
- package/.worktrees/2c37b1d7/src/run/concurrent-detect.js +0 -156
- package/.worktrees/2c37b1d7/src/run/gates.js +0 -1111
- package/.worktrees/2c37b1d7/src/run/multi-repo-context.js +0 -208
- package/.worktrees/2c37b1d7/src/run/next.js +0 -128
- package/.worktrees/2c37b1d7/src/run/prompt.js +0 -843
- package/.worktrees/2c37b1d7/src/run/quick-audit.js +0 -186
- package/.worktrees/2c37b1d7/src/run/scan-profile.js +0 -269
- package/.worktrees/2c37b1d7/src/run/shared.js +0 -1562
- package/.worktrees/2c37b1d7/src/run/stage.js +0 -587
- package/.worktrees/2c37b1d7/src/run.js +0 -23
- package/.worktrees/2c37b1d7/src/scan-diff.js +0 -388
- package/.worktrees/2c37b1d7/src/scan-postcheck.js +0 -524
- package/.worktrees/2c37b1d7/src/scan-staleness.js +0 -95
- package/.worktrees/2c37b1d7/src/setup.js +0 -414
- package/.worktrees/2c37b1d7/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/2c37b1d7/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/2c37b1d7/src/spec-dir-typo.js +0 -50
- package/.worktrees/2c37b1d7/src/spec-sync.js +0 -358
- package/.worktrees/2c37b1d7/src/stage-contract-engine.js +0 -171
- package/.worktrees/2c37b1d7/src/stage-contract-spec.js +0 -551
- package/.worktrees/2c37b1d7/src/stage-contract.js +0 -948
- package/.worktrees/2c37b1d7/src/stage-review.js +0 -597
- package/.worktrees/2c37b1d7/src/stages/archive.js +0 -199
- package/.worktrees/2c37b1d7/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/2c37b1d7/src/stages/brainstorm.js +0 -624
- package/.worktrees/2c37b1d7/src/stages/cmd-existence.js +0 -145
- package/.worktrees/2c37b1d7/src/stages/doctor.js +0 -540
- package/.worktrees/2c37b1d7/src/stages/execute.js +0 -1277
- package/.worktrees/2c37b1d7/src/stages/explore.js +0 -43
- package/.worktrees/2c37b1d7/src/stages/index.js +0 -29
- package/.worktrees/2c37b1d7/src/stages/knowledge.js +0 -514
- package/.worktrees/2c37b1d7/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/2c37b1d7/src/stages/plan.js +0 -655
- package/.worktrees/2c37b1d7/src/stages/quick.js +0 -167
- package/.worktrees/2c37b1d7/src/stages/scan.js +0 -608
- package/.worktrees/2c37b1d7/src/stages/status.js +0 -64
- package/.worktrees/2c37b1d7/src/stages/verify.js +0 -246
- package/.worktrees/2c37b1d7/src/sync.js +0 -1470
- package/.worktrees/2c37b1d7/src/task-review.js +0 -1498
- package/.worktrees/2c37b1d7/src/taskcard-placeholders.js +0 -21
- package/.worktrees/2c37b1d7/src/taskcard.js +0 -250
- package/.worktrees/2c37b1d7/src/verify-postcheck.js +0 -1718
- package/.worktrees/2c37b1d7/src/verify-probes.js +0 -327
- package/.worktrees/2c37b1d7/src/version.js +0 -19
- package/.worktrees/2c37b1d7/src/workflow.js +0 -600
- package/.worktrees/2c37b1d7/src/workspace.js +0 -125
- package/.worktrees/2c37b1d7/src/worktree-apply.js +0 -1611
- package/.worktrees/2c37b1d7/src/worktree-deps.js +0 -668
- package/.worktrees/2c37b1d7/src/worktree.js +0 -1849
- package/.worktrees/2c37b1d7/templates/claude-instruction.md +0 -23
- package/.worktrees/2c37b1d7/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/2c37b1d7/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/2c37b1d7/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/2c37b1d7/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/2c37b1d7/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/542c4415/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/542c4415/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/542c4415/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/542c4415/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/542c4415/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/542c4415/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/542c4415/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/542c4415/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/542c4415/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/542c4415/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/542c4415/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/542c4415/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/542c4415/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/542c4415/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/542c4415/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/542c4415/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/542c4415/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/542c4415/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/542c4415/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/542c4415/.gitattributes +0 -2
- package/.worktrees/542c4415/.husky/pre-push +0 -20
- package/.worktrees/542c4415/README.md +0 -203
- package/.worktrees/542c4415/SKILL.md +0 -91
- package/.worktrees/542c4415/architecture-analysis.md +0 -448
- package/.worktrees/542c4415/bin/sillyspec.js +0 -2
- package/.worktrees/542c4415/eval/README.md +0 -86
- package/.worktrees/542c4415/eval/eval.config.json +0 -28
- package/.worktrees/542c4415/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/542c4415/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/542c4415/eval/lib/config.mjs +0 -82
- package/.worktrees/542c4415/eval/lib/db.mjs +0 -76
- package/.worktrees/542c4415/eval/lib/report.mjs +0 -120
- package/.worktrees/542c4415/eval/lib/runner.mjs +0 -157
- package/.worktrees/542c4415/eval/lib/tasks.mjs +0 -73
- package/.worktrees/542c4415/eval/lib/util.mjs +0 -107
- package/.worktrees/542c4415/eval/lib/workdir.mjs +0 -30
- package/.worktrees/542c4415/eval/run.mjs +0 -83
- package/.worktrees/542c4415/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/542c4415/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/542c4415/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/542c4415/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/542c4415/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/542c4415/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/542c4415/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/542c4415/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/542c4415/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/542c4415/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/542c4415/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/542c4415/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/542c4415/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/542c4415/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/542c4415/logo.jpg +0 -0
- package/.worktrees/542c4415/package-lock.json +0 -977
- package/.worktrees/542c4415/package.json +0 -41
- package/.worktrees/542c4415/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/542c4415/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/542c4415/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/542c4415/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/542c4415/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/542c4415/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/542c4415/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/542c4415/packages/dashboard/package.json +0 -25
- package/.worktrees/542c4415/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/542c4415/packages/dashboard/server/index.js +0 -679
- package/.worktrees/542c4415/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/542c4415/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/542c4415/src/agent-session-log.js +0 -803
- package/.worktrees/542c4415/src/change-list.js +0 -290
- package/.worktrees/542c4415/src/change-risk-profile.js +0 -339
- package/.worktrees/542c4415/src/check-primitives.js +0 -65
- package/.worktrees/542c4415/src/classify-change.js +0 -109
- package/.worktrees/542c4415/src/commit-suggest.js +0 -202
- package/.worktrees/542c4415/src/config-cat.js +0 -88
- package/.worktrees/542c4415/src/config-schema.js +0 -328
- package/.worktrees/542c4415/src/constants.js +0 -97
- package/.worktrees/542c4415/src/contract-matrix.js +0 -533
- package/.worktrees/542c4415/src/datetime.js +0 -20
- package/.worktrees/542c4415/src/db-engine.js +0 -55
- package/.worktrees/542c4415/src/db.js +0 -381
- package/.worktrees/542c4415/src/decision-distill.js +0 -517
- package/.worktrees/542c4415/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/542c4415/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/542c4415/src/dispatch/probe.js +0 -246
- package/.worktrees/542c4415/src/dispatch/strategy.js +0 -121
- package/.worktrees/542c4415/src/docs-check.js +0 -825
- package/.worktrees/542c4415/src/docs-debt.js +0 -393
- package/.worktrees/542c4415/src/docs-gate.js +0 -107
- package/.worktrees/542c4415/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/542c4415/src/endpoint-extractor.js +0 -409
- package/.worktrees/542c4415/src/foreign-declared.js +0 -155
- package/.worktrees/542c4415/src/fs-atomic.js +0 -73
- package/.worktrees/542c4415/src/git-helper.js +0 -150
- package/.worktrees/542c4415/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/542c4415/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/542c4415/src/index.js +0 -2854
- package/.worktrees/542c4415/src/init.js +0 -626
- package/.worktrees/542c4415/src/knowledge-match.js +0 -231
- package/.worktrees/542c4415/src/local-detect.js +0 -128
- package/.worktrees/542c4415/src/local-register.js +0 -104
- package/.worktrees/542c4415/src/machine-interface.js +0 -543
- package/.worktrees/542c4415/src/migrate.js +0 -127
- package/.worktrees/542c4415/src/module-impact.js +0 -166
- package/.worktrees/542c4415/src/module-resolve.js +0 -222
- package/.worktrees/542c4415/src/modules.js +0 -580
- package/.worktrees/542c4415/src/plan-adopt-waves.js +0 -126
- package/.worktrees/542c4415/src/progress/change-registry.js +0 -336
- package/.worktrees/542c4415/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/542c4415/src/progress/shared.js +0 -36
- package/.worktrees/542c4415/src/progress/stage-machine.js +0 -594
- package/.worktrees/542c4415/src/progress/step-store.js +0 -265
- package/.worktrees/542c4415/src/progress.js +0 -1304
- package/.worktrees/542c4415/src/quick-recommend.js +0 -115
- package/.worktrees/542c4415/src/quicklog.js +0 -883
- package/.worktrees/542c4415/src/review-tier.js +0 -77
- package/.worktrees/542c4415/src/run/command.js +0 -1641
- package/.worktrees/542c4415/src/run/complete-handlers.js +0 -1552
- package/.worktrees/542c4415/src/run/complete.js +0 -1259
- package/.worktrees/542c4415/src/run/concurrent-detect.js +0 -156
- package/.worktrees/542c4415/src/run/gates.js +0 -1111
- package/.worktrees/542c4415/src/run/multi-repo-context.js +0 -208
- package/.worktrees/542c4415/src/run/next.js +0 -128
- package/.worktrees/542c4415/src/run/prompt.js +0 -843
- package/.worktrees/542c4415/src/run/quick-audit.js +0 -186
- package/.worktrees/542c4415/src/run/scan-profile.js +0 -269
- package/.worktrees/542c4415/src/run/shared.js +0 -1562
- package/.worktrees/542c4415/src/run/stage.js +0 -587
- package/.worktrees/542c4415/src/run.js +0 -23
- package/.worktrees/542c4415/src/scan-diff.js +0 -388
- package/.worktrees/542c4415/src/scan-postcheck.js +0 -524
- package/.worktrees/542c4415/src/scan-staleness.js +0 -95
- package/.worktrees/542c4415/src/setup.js +0 -414
- package/.worktrees/542c4415/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/542c4415/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/542c4415/src/spec-dir-typo.js +0 -50
- package/.worktrees/542c4415/src/spec-sync.js +0 -358
- package/.worktrees/542c4415/src/stage-contract-engine.js +0 -171
- package/.worktrees/542c4415/src/stage-contract-spec.js +0 -551
- package/.worktrees/542c4415/src/stage-contract.js +0 -948
- package/.worktrees/542c4415/src/stage-review.js +0 -597
- package/.worktrees/542c4415/src/stages/archive.js +0 -199
- package/.worktrees/542c4415/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/542c4415/src/stages/brainstorm.js +0 -624
- package/.worktrees/542c4415/src/stages/cmd-existence.js +0 -145
- package/.worktrees/542c4415/src/stages/doctor.js +0 -540
- package/.worktrees/542c4415/src/stages/execute.js +0 -1277
- package/.worktrees/542c4415/src/stages/explore.js +0 -43
- package/.worktrees/542c4415/src/stages/index.js +0 -29
- package/.worktrees/542c4415/src/stages/knowledge.js +0 -514
- package/.worktrees/542c4415/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/542c4415/src/stages/plan.js +0 -655
- package/.worktrees/542c4415/src/stages/quick.js +0 -167
- package/.worktrees/542c4415/src/stages/scan.js +0 -608
- package/.worktrees/542c4415/src/stages/status.js +0 -64
- package/.worktrees/542c4415/src/stages/verify.js +0 -246
- package/.worktrees/542c4415/src/sync.js +0 -1470
- package/.worktrees/542c4415/src/task-review.js +0 -1498
- package/.worktrees/542c4415/src/taskcard-placeholders.js +0 -21
- package/.worktrees/542c4415/src/taskcard.js +0 -250
- package/.worktrees/542c4415/src/verify-postcheck.js +0 -1718
- package/.worktrees/542c4415/src/verify-probes.js +0 -327
- package/.worktrees/542c4415/src/version.js +0 -19
- package/.worktrees/542c4415/src/workflow.js +0 -600
- package/.worktrees/542c4415/src/workspace.js +0 -125
- package/.worktrees/542c4415/src/worktree-apply.js +0 -1611
- package/.worktrees/542c4415/src/worktree-deps.js +0 -668
- package/.worktrees/542c4415/src/worktree.js +0 -1849
- package/.worktrees/542c4415/templates/claude-instruction.md +0 -23
- package/.worktrees/542c4415/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/542c4415/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/542c4415/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/542c4415/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/542c4415/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-propose/SKILL.md +0 -87
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/8d2d0392/.claude/skills/verify-per-user/SKILL.md +0 -6
- package/.worktrees/8d2d0392/.gitattributes +0 -2
- package/.worktrees/8d2d0392/.husky/pre-push +0 -20
- package/.worktrees/8d2d0392/README.md +0 -203
- package/.worktrees/8d2d0392/SKILL.md +0 -91
- package/.worktrees/8d2d0392/architecture-analysis.md +0 -448
- package/.worktrees/8d2d0392/bin/sillyspec.js +0 -2
- package/.worktrees/8d2d0392/eval/README.md +0 -86
- package/.worktrees/8d2d0392/eval/eval.config.json +0 -28
- package/.worktrees/8d2d0392/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/8d2d0392/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/8d2d0392/eval/lib/config.mjs +0 -82
- package/.worktrees/8d2d0392/eval/lib/db.mjs +0 -76
- package/.worktrees/8d2d0392/eval/lib/report.mjs +0 -120
- package/.worktrees/8d2d0392/eval/lib/runner.mjs +0 -157
- package/.worktrees/8d2d0392/eval/lib/tasks.mjs +0 -73
- package/.worktrees/8d2d0392/eval/lib/util.mjs +0 -107
- package/.worktrees/8d2d0392/eval/lib/workdir.mjs +0 -30
- package/.worktrees/8d2d0392/eval/run.mjs +0 -83
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/8d2d0392/logo.jpg +0 -0
- package/.worktrees/8d2d0392/package-lock.json +0 -977
- package/.worktrees/8d2d0392/package.json +0 -41
- package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/8d2d0392/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/8d2d0392/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/8d2d0392/packages/dashboard/package.json +0 -25
- package/.worktrees/8d2d0392/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/8d2d0392/packages/dashboard/server/index.js +0 -679
- package/.worktrees/8d2d0392/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/8d2d0392/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/8d2d0392/src/agent-session-log.js +0 -803
- package/.worktrees/8d2d0392/src/change-list.js +0 -290
- package/.worktrees/8d2d0392/src/change-risk-profile.js +0 -339
- package/.worktrees/8d2d0392/src/check-primitives.js +0 -65
- package/.worktrees/8d2d0392/src/classify-change.js +0 -109
- package/.worktrees/8d2d0392/src/commit-suggest.js +0 -202
- package/.worktrees/8d2d0392/src/config-cat.js +0 -88
- package/.worktrees/8d2d0392/src/config-schema.js +0 -328
- package/.worktrees/8d2d0392/src/constants.js +0 -97
- package/.worktrees/8d2d0392/src/contract-matrix.js +0 -533
- package/.worktrees/8d2d0392/src/datetime.js +0 -20
- package/.worktrees/8d2d0392/src/db-engine.js +0 -55
- package/.worktrees/8d2d0392/src/db.js +0 -381
- package/.worktrees/8d2d0392/src/decision-distill.js +0 -517
- package/.worktrees/8d2d0392/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/8d2d0392/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/8d2d0392/src/dispatch/probe.js +0 -246
- package/.worktrees/8d2d0392/src/dispatch/strategy.js +0 -121
- package/.worktrees/8d2d0392/src/docs-check.js +0 -825
- package/.worktrees/8d2d0392/src/docs-debt.js +0 -393
- package/.worktrees/8d2d0392/src/docs-gate.js +0 -107
- package/.worktrees/8d2d0392/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/8d2d0392/src/endpoint-extractor.js +0 -409
- package/.worktrees/8d2d0392/src/foreign-declared.js +0 -78
- package/.worktrees/8d2d0392/src/fs-atomic.js +0 -73
- package/.worktrees/8d2d0392/src/git-helper.js +0 -150
- package/.worktrees/8d2d0392/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/8d2d0392/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/8d2d0392/src/index.js +0 -2854
- package/.worktrees/8d2d0392/src/init.js +0 -626
- package/.worktrees/8d2d0392/src/knowledge-match.js +0 -231
- package/.worktrees/8d2d0392/src/local-detect.js +0 -128
- package/.worktrees/8d2d0392/src/local-register.js +0 -104
- package/.worktrees/8d2d0392/src/machine-interface.js +0 -543
- package/.worktrees/8d2d0392/src/migrate.js +0 -127
- package/.worktrees/8d2d0392/src/module-impact.js +0 -166
- package/.worktrees/8d2d0392/src/module-resolve.js +0 -222
- package/.worktrees/8d2d0392/src/modules.js +0 -580
- package/.worktrees/8d2d0392/src/plan-adopt-waves.js +0 -126
- package/.worktrees/8d2d0392/src/progress/change-registry.js +0 -336
- package/.worktrees/8d2d0392/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/8d2d0392/src/progress/shared.js +0 -36
- package/.worktrees/8d2d0392/src/progress/stage-machine.js +0 -594
- package/.worktrees/8d2d0392/src/progress/step-store.js +0 -265
- package/.worktrees/8d2d0392/src/progress.js +0 -1304
- package/.worktrees/8d2d0392/src/quick-recommend.js +0 -115
- package/.worktrees/8d2d0392/src/quicklog.js +0 -883
- package/.worktrees/8d2d0392/src/review-tier.js +0 -77
- package/.worktrees/8d2d0392/src/run/command.js +0 -1641
- package/.worktrees/8d2d0392/src/run/complete-handlers.js +0 -1552
- package/.worktrees/8d2d0392/src/run/complete.js +0 -1259
- package/.worktrees/8d2d0392/src/run/concurrent-detect.js +0 -156
- package/.worktrees/8d2d0392/src/run/gates.js +0 -1094
- package/.worktrees/8d2d0392/src/run/multi-repo-context.js +0 -208
- package/.worktrees/8d2d0392/src/run/next.js +0 -128
- package/.worktrees/8d2d0392/src/run/prompt.js +0 -843
- package/.worktrees/8d2d0392/src/run/quick-audit.js +0 -186
- package/.worktrees/8d2d0392/src/run/scan-profile.js +0 -269
- package/.worktrees/8d2d0392/src/run/shared.js +0 -1562
- package/.worktrees/8d2d0392/src/run/stage.js +0 -587
- package/.worktrees/8d2d0392/src/run.js +0 -23
- package/.worktrees/8d2d0392/src/scan-diff.js +0 -388
- package/.worktrees/8d2d0392/src/scan-postcheck.js +0 -524
- package/.worktrees/8d2d0392/src/scan-staleness.js +0 -95
- package/.worktrees/8d2d0392/src/setup.js +0 -414
- package/.worktrees/8d2d0392/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/8d2d0392/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/8d2d0392/src/spec-dir-typo.js +0 -50
- package/.worktrees/8d2d0392/src/spec-sync.js +0 -358
- package/.worktrees/8d2d0392/src/stage-contract-engine.js +0 -171
- package/.worktrees/8d2d0392/src/stage-contract-spec.js +0 -551
- package/.worktrees/8d2d0392/src/stage-contract.js +0 -948
- package/.worktrees/8d2d0392/src/stage-review.js +0 -597
- package/.worktrees/8d2d0392/src/stages/archive.js +0 -199
- package/.worktrees/8d2d0392/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/8d2d0392/src/stages/brainstorm.js +0 -624
- package/.worktrees/8d2d0392/src/stages/cmd-existence.js +0 -145
- package/.worktrees/8d2d0392/src/stages/doctor.js +0 -540
- package/.worktrees/8d2d0392/src/stages/execute.js +0 -1277
- package/.worktrees/8d2d0392/src/stages/explore.js +0 -43
- package/.worktrees/8d2d0392/src/stages/index.js +0 -29
- package/.worktrees/8d2d0392/src/stages/knowledge.js +0 -514
- package/.worktrees/8d2d0392/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/8d2d0392/src/stages/plan.js +0 -651
- package/.worktrees/8d2d0392/src/stages/quick.js +0 -167
- package/.worktrees/8d2d0392/src/stages/scan.js +0 -608
- package/.worktrees/8d2d0392/src/stages/status.js +0 -64
- package/.worktrees/8d2d0392/src/stages/verify.js +0 -246
- package/.worktrees/8d2d0392/src/sync.js +0 -1470
- package/.worktrees/8d2d0392/src/task-review.js +0 -1498
- package/.worktrees/8d2d0392/src/taskcard-placeholders.js +0 -21
- package/.worktrees/8d2d0392/src/taskcard.js +0 -217
- package/.worktrees/8d2d0392/src/verify-postcheck.js +0 -1718
- package/.worktrees/8d2d0392/src/verify-probes.js +0 -327
- package/.worktrees/8d2d0392/src/version.js +0 -19
- package/.worktrees/8d2d0392/src/workflow.js +0 -600
- package/.worktrees/8d2d0392/src/workspace.js +0 -125
- package/.worktrees/8d2d0392/src/worktree-apply.js +0 -1611
- package/.worktrees/8d2d0392/src/worktree-deps.js +0 -576
- package/.worktrees/8d2d0392/src/worktree.js +0 -1838
- package/.worktrees/8d2d0392/templates/claude-instruction.md +0 -23
- package/.worktrees/8d2d0392/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/8d2d0392/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/8d2d0392/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/8d2d0392/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/8d2d0392/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/c1eae35e/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/c1eae35e/.gitattributes +0 -2
- package/.worktrees/c1eae35e/.husky/pre-push +0 -20
- package/.worktrees/c1eae35e/README.md +0 -203
- package/.worktrees/c1eae35e/SKILL.md +0 -91
- package/.worktrees/c1eae35e/architecture-analysis.md +0 -448
- package/.worktrees/c1eae35e/bin/sillyspec.js +0 -2
- package/.worktrees/c1eae35e/eval/README.md +0 -86
- package/.worktrees/c1eae35e/eval/eval.config.json +0 -28
- package/.worktrees/c1eae35e/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/c1eae35e/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/c1eae35e/eval/lib/config.mjs +0 -82
- package/.worktrees/c1eae35e/eval/lib/db.mjs +0 -76
- package/.worktrees/c1eae35e/eval/lib/report.mjs +0 -120
- package/.worktrees/c1eae35e/eval/lib/runner.mjs +0 -157
- package/.worktrees/c1eae35e/eval/lib/tasks.mjs +0 -73
- package/.worktrees/c1eae35e/eval/lib/util.mjs +0 -107
- package/.worktrees/c1eae35e/eval/lib/workdir.mjs +0 -30
- package/.worktrees/c1eae35e/eval/run.mjs +0 -83
- package/.worktrees/c1eae35e/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/c1eae35e/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/c1eae35e/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/c1eae35e/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/c1eae35e/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/c1eae35e/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/c1eae35e/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/c1eae35e/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/c1eae35e/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/c1eae35e/logo.jpg +0 -0
- package/.worktrees/c1eae35e/package-lock.json +0 -977
- package/.worktrees/c1eae35e/package.json +0 -41
- package/.worktrees/c1eae35e/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/c1eae35e/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/c1eae35e/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/c1eae35e/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/c1eae35e/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/c1eae35e/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/c1eae35e/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/c1eae35e/packages/dashboard/package.json +0 -25
- package/.worktrees/c1eae35e/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/c1eae35e/packages/dashboard/server/index.js +0 -679
- package/.worktrees/c1eae35e/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/c1eae35e/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/c1eae35e/src/agent-session-log.js +0 -803
- package/.worktrees/c1eae35e/src/change-list.js +0 -290
- package/.worktrees/c1eae35e/src/change-risk-profile.js +0 -339
- package/.worktrees/c1eae35e/src/check-primitives.js +0 -65
- package/.worktrees/c1eae35e/src/classify-change.js +0 -109
- package/.worktrees/c1eae35e/src/commit-suggest.js +0 -202
- package/.worktrees/c1eae35e/src/config-cat.js +0 -88
- package/.worktrees/c1eae35e/src/config-schema.js +0 -328
- package/.worktrees/c1eae35e/src/constants.js +0 -97
- package/.worktrees/c1eae35e/src/contract-matrix.js +0 -533
- package/.worktrees/c1eae35e/src/datetime.js +0 -20
- package/.worktrees/c1eae35e/src/db-engine.js +0 -55
- package/.worktrees/c1eae35e/src/db.js +0 -381
- package/.worktrees/c1eae35e/src/decision-distill.js +0 -517
- package/.worktrees/c1eae35e/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/c1eae35e/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/c1eae35e/src/dispatch/probe.js +0 -246
- package/.worktrees/c1eae35e/src/dispatch/strategy.js +0 -121
- package/.worktrees/c1eae35e/src/docs-check.js +0 -825
- package/.worktrees/c1eae35e/src/docs-debt.js +0 -393
- package/.worktrees/c1eae35e/src/docs-gate.js +0 -107
- package/.worktrees/c1eae35e/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/c1eae35e/src/endpoint-extractor.js +0 -409
- package/.worktrees/c1eae35e/src/foreign-declared.js +0 -155
- package/.worktrees/c1eae35e/src/fs-atomic.js +0 -73
- package/.worktrees/c1eae35e/src/git-helper.js +0 -150
- package/.worktrees/c1eae35e/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/c1eae35e/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/c1eae35e/src/index.js +0 -2854
- package/.worktrees/c1eae35e/src/init.js +0 -626
- package/.worktrees/c1eae35e/src/knowledge-match.js +0 -231
- package/.worktrees/c1eae35e/src/local-detect.js +0 -128
- package/.worktrees/c1eae35e/src/local-register.js +0 -104
- package/.worktrees/c1eae35e/src/machine-interface.js +0 -543
- package/.worktrees/c1eae35e/src/migrate.js +0 -127
- package/.worktrees/c1eae35e/src/module-impact.js +0 -166
- package/.worktrees/c1eae35e/src/module-resolve.js +0 -222
- package/.worktrees/c1eae35e/src/modules.js +0 -580
- package/.worktrees/c1eae35e/src/plan-adopt-waves.js +0 -126
- package/.worktrees/c1eae35e/src/progress/change-registry.js +0 -336
- package/.worktrees/c1eae35e/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/c1eae35e/src/progress/shared.js +0 -36
- package/.worktrees/c1eae35e/src/progress/stage-machine.js +0 -594
- package/.worktrees/c1eae35e/src/progress/step-store.js +0 -265
- package/.worktrees/c1eae35e/src/progress.js +0 -1304
- package/.worktrees/c1eae35e/src/quick-recommend.js +0 -115
- package/.worktrees/c1eae35e/src/quicklog.js +0 -883
- package/.worktrees/c1eae35e/src/review-tier.js +0 -77
- package/.worktrees/c1eae35e/src/run/command.js +0 -1641
- package/.worktrees/c1eae35e/src/run/complete-handlers.js +0 -1552
- package/.worktrees/c1eae35e/src/run/complete.js +0 -1259
- package/.worktrees/c1eae35e/src/run/concurrent-detect.js +0 -156
- package/.worktrees/c1eae35e/src/run/gates.js +0 -1111
- package/.worktrees/c1eae35e/src/run/multi-repo-context.js +0 -208
- package/.worktrees/c1eae35e/src/run/next.js +0 -128
- package/.worktrees/c1eae35e/src/run/prompt.js +0 -843
- package/.worktrees/c1eae35e/src/run/quick-audit.js +0 -186
- package/.worktrees/c1eae35e/src/run/scan-profile.js +0 -269
- package/.worktrees/c1eae35e/src/run/shared.js +0 -1562
- package/.worktrees/c1eae35e/src/run/stage.js +0 -587
- package/.worktrees/c1eae35e/src/run.js +0 -23
- package/.worktrees/c1eae35e/src/scan-diff.js +0 -388
- package/.worktrees/c1eae35e/src/scan-postcheck.js +0 -524
- package/.worktrees/c1eae35e/src/scan-staleness.js +0 -95
- package/.worktrees/c1eae35e/src/setup.js +0 -414
- package/.worktrees/c1eae35e/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/c1eae35e/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/c1eae35e/src/spec-dir-typo.js +0 -50
- package/.worktrees/c1eae35e/src/spec-sync.js +0 -358
- package/.worktrees/c1eae35e/src/stage-contract-engine.js +0 -171
- package/.worktrees/c1eae35e/src/stage-contract-spec.js +0 -551
- package/.worktrees/c1eae35e/src/stage-contract.js +0 -948
- package/.worktrees/c1eae35e/src/stage-review.js +0 -597
- package/.worktrees/c1eae35e/src/stages/archive.js +0 -199
- package/.worktrees/c1eae35e/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/c1eae35e/src/stages/brainstorm.js +0 -624
- package/.worktrees/c1eae35e/src/stages/cmd-existence.js +0 -145
- package/.worktrees/c1eae35e/src/stages/doctor.js +0 -540
- package/.worktrees/c1eae35e/src/stages/execute.js +0 -1277
- package/.worktrees/c1eae35e/src/stages/explore.js +0 -43
- package/.worktrees/c1eae35e/src/stages/index.js +0 -29
- package/.worktrees/c1eae35e/src/stages/knowledge.js +0 -514
- package/.worktrees/c1eae35e/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/c1eae35e/src/stages/plan.js +0 -655
- package/.worktrees/c1eae35e/src/stages/quick.js +0 -167
- package/.worktrees/c1eae35e/src/stages/scan.js +0 -608
- package/.worktrees/c1eae35e/src/stages/status.js +0 -64
- package/.worktrees/c1eae35e/src/stages/verify.js +0 -246
- package/.worktrees/c1eae35e/src/sync.js +0 -1470
- package/.worktrees/c1eae35e/src/task-review.js +0 -1498
- package/.worktrees/c1eae35e/src/taskcard-placeholders.js +0 -21
- package/.worktrees/c1eae35e/src/taskcard.js +0 -250
- package/.worktrees/c1eae35e/src/verify-postcheck.js +0 -1718
- package/.worktrees/c1eae35e/src/verify-probes.js +0 -327
- package/.worktrees/c1eae35e/src/version.js +0 -19
- package/.worktrees/c1eae35e/src/workflow.js +0 -600
- package/.worktrees/c1eae35e/src/workspace.js +0 -125
- package/.worktrees/c1eae35e/src/worktree-apply.js +0 -1611
- package/.worktrees/c1eae35e/src/worktree-deps.js +0 -668
- package/.worktrees/c1eae35e/src/worktree.js +0 -1849
- package/.worktrees/c1eae35e/templates/claude-instruction.md +0 -23
- package/.worktrees/c1eae35e/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/c1eae35e/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/c1eae35e/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/c1eae35e/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/c1eae35e/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-propose/SKILL.md +0 -87
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/dafc71ad/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/dafc71ad/.gitattributes +0 -2
- package/.worktrees/dafc71ad/.husky/pre-push +0 -20
- package/.worktrees/dafc71ad/README.md +0 -203
- package/.worktrees/dafc71ad/SKILL.md +0 -91
- package/.worktrees/dafc71ad/analysis.md +0 -366
- package/.worktrees/dafc71ad/architecture-analysis.md +0 -448
- package/.worktrees/dafc71ad/bin/sillyspec.js +0 -2
- package/.worktrees/dafc71ad/eval/README.md +0 -86
- package/.worktrees/dafc71ad/eval/eval.config.json +0 -28
- package/.worktrees/dafc71ad/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/dafc71ad/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/dafc71ad/eval/lib/config.mjs +0 -82
- package/.worktrees/dafc71ad/eval/lib/db.mjs +0 -76
- package/.worktrees/dafc71ad/eval/lib/report.mjs +0 -120
- package/.worktrees/dafc71ad/eval/lib/runner.mjs +0 -157
- package/.worktrees/dafc71ad/eval/lib/tasks.mjs +0 -73
- package/.worktrees/dafc71ad/eval/lib/util.mjs +0 -107
- package/.worktrees/dafc71ad/eval/lib/workdir.mjs +0 -30
- package/.worktrees/dafc71ad/eval/run.mjs +0 -83
- package/.worktrees/dafc71ad/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/dafc71ad/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/dafc71ad/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/dafc71ad/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/dafc71ad/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/dafc71ad/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/dafc71ad/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/dafc71ad/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/dafc71ad/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/dafc71ad/logo.jpg +0 -0
- package/.worktrees/dafc71ad/package-lock.json +0 -977
- package/.worktrees/dafc71ad/package.json +0 -41
- package/.worktrees/dafc71ad/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/dafc71ad/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/dafc71ad/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/dafc71ad/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/dafc71ad/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/dafc71ad/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/dafc71ad/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/dafc71ad/packages/dashboard/package.json +0 -25
- package/.worktrees/dafc71ad/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/dafc71ad/packages/dashboard/server/index.js +0 -679
- package/.worktrees/dafc71ad/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/dafc71ad/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/dafc71ad/src/agent-session-log.js +0 -803
- package/.worktrees/dafc71ad/src/change-list.js +0 -290
- package/.worktrees/dafc71ad/src/change-risk-profile.js +0 -339
- package/.worktrees/dafc71ad/src/check-primitives.js +0 -65
- package/.worktrees/dafc71ad/src/classify-change.js +0 -109
- package/.worktrees/dafc71ad/src/commit-suggest.js +0 -202
- package/.worktrees/dafc71ad/src/config-cat.js +0 -88
- package/.worktrees/dafc71ad/src/config-schema.js +0 -328
- package/.worktrees/dafc71ad/src/constants.js +0 -97
- package/.worktrees/dafc71ad/src/contract-matrix.js +0 -533
- package/.worktrees/dafc71ad/src/datetime.js +0 -20
- package/.worktrees/dafc71ad/src/db-engine.js +0 -55
- package/.worktrees/dafc71ad/src/db.js +0 -381
- package/.worktrees/dafc71ad/src/decision-distill.js +0 -517
- package/.worktrees/dafc71ad/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/dafc71ad/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/dafc71ad/src/dispatch/probe.js +0 -246
- package/.worktrees/dafc71ad/src/dispatch/strategy.js +0 -121
- package/.worktrees/dafc71ad/src/docs-check.js +0 -825
- package/.worktrees/dafc71ad/src/docs-debt.js +0 -393
- package/.worktrees/dafc71ad/src/docs-gate.js +0 -107
- package/.worktrees/dafc71ad/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/dafc71ad/src/endpoint-extractor.js +0 -409
- package/.worktrees/dafc71ad/src/foreign-declared.js +0 -155
- package/.worktrees/dafc71ad/src/fs-atomic.js +0 -73
- package/.worktrees/dafc71ad/src/git-helper.js +0 -150
- package/.worktrees/dafc71ad/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/dafc71ad/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/dafc71ad/src/index.js +0 -2854
- package/.worktrees/dafc71ad/src/init.js +0 -626
- package/.worktrees/dafc71ad/src/knowledge-match.js +0 -231
- package/.worktrees/dafc71ad/src/local-detect.js +0 -128
- package/.worktrees/dafc71ad/src/local-register.js +0 -104
- package/.worktrees/dafc71ad/src/machine-interface.js +0 -543
- package/.worktrees/dafc71ad/src/migrate.js +0 -127
- package/.worktrees/dafc71ad/src/module-impact.js +0 -166
- package/.worktrees/dafc71ad/src/module-resolve.js +0 -222
- package/.worktrees/dafc71ad/src/modules.js +0 -580
- package/.worktrees/dafc71ad/src/plan-adopt-waves.js +0 -126
- package/.worktrees/dafc71ad/src/progress/change-registry.js +0 -336
- package/.worktrees/dafc71ad/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/dafc71ad/src/progress/shared.js +0 -36
- package/.worktrees/dafc71ad/src/progress/stage-machine.js +0 -594
- package/.worktrees/dafc71ad/src/progress/step-store.js +0 -265
- package/.worktrees/dafc71ad/src/progress.js +0 -1304
- package/.worktrees/dafc71ad/src/quick-recommend.js +0 -115
- package/.worktrees/dafc71ad/src/quicklog.js +0 -883
- package/.worktrees/dafc71ad/src/review-tier.js +0 -77
- package/.worktrees/dafc71ad/src/run/command.js +0 -1641
- package/.worktrees/dafc71ad/src/run/complete-handlers.js +0 -1552
- package/.worktrees/dafc71ad/src/run/complete.js +0 -1259
- package/.worktrees/dafc71ad/src/run/concurrent-detect.js +0 -156
- package/.worktrees/dafc71ad/src/run/gates.js +0 -1111
- package/.worktrees/dafc71ad/src/run/multi-repo-context.js +0 -208
- package/.worktrees/dafc71ad/src/run/next.js +0 -128
- package/.worktrees/dafc71ad/src/run/prompt.js +0 -843
- package/.worktrees/dafc71ad/src/run/quick-audit.js +0 -186
- package/.worktrees/dafc71ad/src/run/scan-profile.js +0 -269
- package/.worktrees/dafc71ad/src/run/shared.js +0 -1562
- package/.worktrees/dafc71ad/src/run/stage.js +0 -587
- package/.worktrees/dafc71ad/src/run.js +0 -23
- package/.worktrees/dafc71ad/src/scan-diff.js +0 -388
- package/.worktrees/dafc71ad/src/scan-postcheck.js +0 -524
- package/.worktrees/dafc71ad/src/scan-staleness.js +0 -95
- package/.worktrees/dafc71ad/src/setup.js +0 -414
- package/.worktrees/dafc71ad/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/dafc71ad/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/dafc71ad/src/spec-dir-typo.js +0 -50
- package/.worktrees/dafc71ad/src/spec-sync.js +0 -358
- package/.worktrees/dafc71ad/src/stage-contract-engine.js +0 -171
- package/.worktrees/dafc71ad/src/stage-contract-spec.js +0 -551
- package/.worktrees/dafc71ad/src/stage-contract.js +0 -948
- package/.worktrees/dafc71ad/src/stage-review.js +0 -597
- package/.worktrees/dafc71ad/src/stages/archive.js +0 -199
- package/.worktrees/dafc71ad/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/dafc71ad/src/stages/brainstorm.js +0 -624
- package/.worktrees/dafc71ad/src/stages/cmd-existence.js +0 -145
- package/.worktrees/dafc71ad/src/stages/doctor.js +0 -540
- package/.worktrees/dafc71ad/src/stages/execute.js +0 -1277
- package/.worktrees/dafc71ad/src/stages/explore.js +0 -43
- package/.worktrees/dafc71ad/src/stages/index.js +0 -29
- package/.worktrees/dafc71ad/src/stages/knowledge.js +0 -514
- package/.worktrees/dafc71ad/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/dafc71ad/src/stages/plan.js +0 -655
- package/.worktrees/dafc71ad/src/stages/quick.js +0 -167
- package/.worktrees/dafc71ad/src/stages/scan.js +0 -608
- package/.worktrees/dafc71ad/src/stages/status.js +0 -64
- package/.worktrees/dafc71ad/src/stages/verify.js +0 -246
- package/.worktrees/dafc71ad/src/sync.js +0 -1470
- package/.worktrees/dafc71ad/src/task-review.js +0 -1498
- package/.worktrees/dafc71ad/src/taskcard-placeholders.js +0 -21
- package/.worktrees/dafc71ad/src/taskcard.js +0 -250
- package/.worktrees/dafc71ad/src/verify-postcheck.js +0 -1718
- package/.worktrees/dafc71ad/src/verify-probes.js +0 -327
- package/.worktrees/dafc71ad/src/version.js +0 -19
- package/.worktrees/dafc71ad/src/workflow.js +0 -600
- package/.worktrees/dafc71ad/src/workspace.js +0 -125
- package/.worktrees/dafc71ad/src/worktree-apply.js +0 -1611
- package/.worktrees/dafc71ad/src/worktree-deps.js +0 -668
- package/.worktrees/dafc71ad/src/worktree.js +0 -1849
- package/.worktrees/dafc71ad/templates/claude-instruction.md +0 -23
- package/.worktrees/dafc71ad/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/dafc71ad/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/dafc71ad/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/dafc71ad/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/dafc71ad/templates/workflows/scan-docs.yaml +0 -132
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-archive/SKILL.md +0 -87
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-auto/SKILL.md +0 -93
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-brainstorm/SKILL.md +0 -114
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-commit/SKILL.md +0 -67
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-continue/SKILL.md +0 -47
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-doctor/SKILL.md +0 -76
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-execute/SKILL.md +0 -214
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-explore/SKILL.md +0 -102
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-export/SKILL.md +0 -57
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-init/SKILL.md +0 -177
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-knowledge/SKILL.md +0 -270
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-plan/SKILL.md +0 -156
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-propose/SKILL.md +0 -87
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-quick/SKILL.md +0 -116
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-resume/SKILL.md +0 -70
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-scan/SKILL.md +0 -79
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-state/SKILL.md +0 -64
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-status/SKILL.md +0 -54
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-verify/SKILL.md +0 -87
- package/.worktrees/e58fcc4c/.claude/skills/sillyspec-workspace/SKILL.md +0 -175
- package/.worktrees/e58fcc4c/.gitattributes +0 -2
- package/.worktrees/e58fcc4c/.husky/pre-push +0 -20
- package/.worktrees/e58fcc4c/README.md +0 -203
- package/.worktrees/e58fcc4c/SKILL.md +0 -91
- package/.worktrees/e58fcc4c/architecture-analysis.md +0 -503
- package/.worktrees/e58fcc4c/bin/sillyspec.js +0 -2
- package/.worktrees/e58fcc4c/eval/README.md +0 -86
- package/.worktrees/e58fcc4c/eval/eval.config.json +0 -28
- package/.worktrees/e58fcc4c/eval/lib/adapters/cli.mjs +0 -63
- package/.worktrees/e58fcc4c/eval/lib/adapters/dryrun.mjs +0 -27
- package/.worktrees/e58fcc4c/eval/lib/config.mjs +0 -82
- package/.worktrees/e58fcc4c/eval/lib/db.mjs +0 -76
- package/.worktrees/e58fcc4c/eval/lib/report.mjs +0 -120
- package/.worktrees/e58fcc4c/eval/lib/runner.mjs +0 -157
- package/.worktrees/e58fcc4c/eval/lib/tasks.mjs +0 -73
- package/.worktrees/e58fcc4c/eval/lib/util.mjs +0 -107
- package/.worktrees/e58fcc4c/eval/lib/workdir.mjs +0 -30
- package/.worktrees/e58fcc4c/eval/run.mjs +0 -83
- package/.worktrees/e58fcc4c/eval/tasks/001-slugify/files/package.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/001-slugify/solution/src/slugify.mjs +0 -26
- package/.worktrees/e58fcc4c/eval/tasks/001-slugify/task.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/001-slugify/verify.mjs +0 -28
- package/.worktrees/e58fcc4c/eval/tasks/002-each-day/files/package.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/002-each-day/files/src/dates.mjs +0 -4
- package/.worktrees/e58fcc4c/eval/tasks/002-each-day/solution/src/dates.mjs +0 -30
- package/.worktrees/e58fcc4c/eval/tasks/002-each-day/task.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/002-each-day/verify.mjs +0 -31
- package/.worktrees/e58fcc4c/eval/tasks/003-word-report/files/data/notes.txt +0 -5
- package/.worktrees/e58fcc4c/eval/tasks/003-word-report/files/package.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/003-word-report/solution/bin/report.mjs +0 -36
- package/.worktrees/e58fcc4c/eval/tasks/003-word-report/task.json +0 -6
- package/.worktrees/e58fcc4c/eval/tasks/003-word-report/verify.mjs +0 -38
- package/.worktrees/e58fcc4c/logo.jpg +0 -0
- package/.worktrees/e58fcc4c/package-lock.json +0 -977
- package/.worktrees/e58fcc4c/package.json +0 -41
- package/.worktrees/e58fcc4c/packages/dashboard/dist/assets/index-Bq_Z2hne.js +0 -7446
- package/.worktrees/e58fcc4c/packages/dashboard/dist/assets/index-O2W5RV4z.css +0 -1
- package/.worktrees/e58fcc4c/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/e58fcc4c/packages/dashboard/dist/index.html +0 -16
- package/.worktrees/e58fcc4c/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/e58fcc4c/packages/dashboard/dist/prototype-dashboard.html +0 -836
- package/.worktrees/e58fcc4c/packages/dashboard/dist/prototype-overview.html +0 -256
- package/.worktrees/e58fcc4c/packages/dashboard/package.json +0 -25
- package/.worktrees/e58fcc4c/packages/dashboard/server/executor.js +0 -95
- package/.worktrees/e58fcc4c/packages/dashboard/server/index.js +0 -679
- package/.worktrees/e58fcc4c/packages/dashboard/server/parser.js +0 -526
- package/.worktrees/e58fcc4c/packages/dashboard/server/watcher.js +0 -357
- package/.worktrees/e58fcc4c/src/agent-session-log.js +0 -803
- package/.worktrees/e58fcc4c/src/change-list.js +0 -290
- package/.worktrees/e58fcc4c/src/change-risk-profile.js +0 -339
- package/.worktrees/e58fcc4c/src/check-primitives.js +0 -65
- package/.worktrees/e58fcc4c/src/classify-change.js +0 -109
- package/.worktrees/e58fcc4c/src/commit-suggest.js +0 -202
- package/.worktrees/e58fcc4c/src/config-cat.js +0 -88
- package/.worktrees/e58fcc4c/src/config-schema.js +0 -328
- package/.worktrees/e58fcc4c/src/constants.js +0 -97
- package/.worktrees/e58fcc4c/src/contract-matrix.js +0 -533
- package/.worktrees/e58fcc4c/src/datetime.js +0 -20
- package/.worktrees/e58fcc4c/src/db-engine.js +0 -55
- package/.worktrees/e58fcc4c/src/db.js +0 -381
- package/.worktrees/e58fcc4c/src/decision-distill.js +0 -517
- package/.worktrees/e58fcc4c/src/dispatch/backends/local-agent.js +0 -155
- package/.worktrees/e58fcc4c/src/dispatch/backends/sillyhub-mcp.js +0 -245
- package/.worktrees/e58fcc4c/src/dispatch/probe.js +0 -246
- package/.worktrees/e58fcc4c/src/dispatch/strategy.js +0 -121
- package/.worktrees/e58fcc4c/src/docs-check.js +0 -825
- package/.worktrees/e58fcc4c/src/docs-debt.js +0 -393
- package/.worktrees/e58fcc4c/src/docs-gate.js +0 -107
- package/.worktrees/e58fcc4c/src/doctor-diagnostics.js +0 -1099
- package/.worktrees/e58fcc4c/src/endpoint-extractor.js +0 -409
- package/.worktrees/e58fcc4c/src/foreign-declared.js +0 -155
- package/.worktrees/e58fcc4c/src/fs-atomic.js +0 -73
- package/.worktrees/e58fcc4c/src/git-helper.js +0 -150
- package/.worktrees/e58fcc4c/src/hooks/claude-pre-tool-use.cjs +0 -130
- package/.worktrees/e58fcc4c/src/hooks/worktree-guard.js +0 -892
- package/.worktrees/e58fcc4c/src/index.js +0 -2854
- package/.worktrees/e58fcc4c/src/init.js +0 -626
- package/.worktrees/e58fcc4c/src/knowledge-match.js +0 -231
- package/.worktrees/e58fcc4c/src/local-detect.js +0 -128
- package/.worktrees/e58fcc4c/src/local-register.js +0 -104
- package/.worktrees/e58fcc4c/src/machine-interface.js +0 -543
- package/.worktrees/e58fcc4c/src/migrate.js +0 -127
- package/.worktrees/e58fcc4c/src/module-impact.js +0 -166
- package/.worktrees/e58fcc4c/src/module-resolve.js +0 -222
- package/.worktrees/e58fcc4c/src/modules.js +0 -580
- package/.worktrees/e58fcc4c/src/plan-adopt-waves.js +0 -126
- package/.worktrees/e58fcc4c/src/progress/change-registry.js +0 -336
- package/.worktrees/e58fcc4c/src/progress/consistency-doctor.js +0 -355
- package/.worktrees/e58fcc4c/src/progress/shared.js +0 -36
- package/.worktrees/e58fcc4c/src/progress/stage-machine.js +0 -594
- package/.worktrees/e58fcc4c/src/progress/step-store.js +0 -265
- package/.worktrees/e58fcc4c/src/progress.js +0 -1304
- package/.worktrees/e58fcc4c/src/quick-recommend.js +0 -115
- package/.worktrees/e58fcc4c/src/quicklog.js +0 -883
- package/.worktrees/e58fcc4c/src/review-tier.js +0 -77
- package/.worktrees/e58fcc4c/src/run/command.js +0 -1641
- package/.worktrees/e58fcc4c/src/run/complete-handlers.js +0 -1552
- package/.worktrees/e58fcc4c/src/run/complete.js +0 -1259
- package/.worktrees/e58fcc4c/src/run/concurrent-detect.js +0 -156
- package/.worktrees/e58fcc4c/src/run/gates.js +0 -1111
- package/.worktrees/e58fcc4c/src/run/multi-repo-context.js +0 -208
- package/.worktrees/e58fcc4c/src/run/next.js +0 -128
- package/.worktrees/e58fcc4c/src/run/prompt.js +0 -843
- package/.worktrees/e58fcc4c/src/run/quick-audit.js +0 -186
- package/.worktrees/e58fcc4c/src/run/scan-profile.js +0 -269
- package/.worktrees/e58fcc4c/src/run/shared.js +0 -1562
- package/.worktrees/e58fcc4c/src/run/stage.js +0 -587
- package/.worktrees/e58fcc4c/src/run.js +0 -23
- package/.worktrees/e58fcc4c/src/scan-diff.js +0 -388
- package/.worktrees/e58fcc4c/src/scan-postcheck.js +0 -524
- package/.worktrees/e58fcc4c/src/scan-staleness.js +0 -95
- package/.worktrees/e58fcc4c/src/setup.js +0 -414
- package/.worktrees/e58fcc4c/src/sillyhub-mcp/client.js +0 -597
- package/.worktrees/e58fcc4c/src/sillyhub-mcp/config.js +0 -62
- package/.worktrees/e58fcc4c/src/spec-dir-typo.js +0 -50
- package/.worktrees/e58fcc4c/src/spec-sync.js +0 -358
- package/.worktrees/e58fcc4c/src/stage-contract-engine.js +0 -171
- package/.worktrees/e58fcc4c/src/stage-contract-spec.js +0 -551
- package/.worktrees/e58fcc4c/src/stage-contract.js +0 -948
- package/.worktrees/e58fcc4c/src/stage-review.js +0 -597
- package/.worktrees/e58fcc4c/src/stages/archive.js +0 -199
- package/.worktrees/e58fcc4c/src/stages/brainstorm-auto.js +0 -285
- package/.worktrees/e58fcc4c/src/stages/brainstorm.js +0 -624
- package/.worktrees/e58fcc4c/src/stages/cmd-existence.js +0 -145
- package/.worktrees/e58fcc4c/src/stages/doctor.js +0 -540
- package/.worktrees/e58fcc4c/src/stages/execute.js +0 -1277
- package/.worktrees/e58fcc4c/src/stages/explore.js +0 -43
- package/.worktrees/e58fcc4c/src/stages/index.js +0 -29
- package/.worktrees/e58fcc4c/src/stages/knowledge.js +0 -514
- package/.worktrees/e58fcc4c/src/stages/plan-postcheck.js +0 -1398
- package/.worktrees/e58fcc4c/src/stages/plan.js +0 -655
- package/.worktrees/e58fcc4c/src/stages/quick.js +0 -167
- package/.worktrees/e58fcc4c/src/stages/scan.js +0 -608
- package/.worktrees/e58fcc4c/src/stages/status.js +0 -64
- package/.worktrees/e58fcc4c/src/stages/verify.js +0 -246
- package/.worktrees/e58fcc4c/src/sync.js +0 -1470
- package/.worktrees/e58fcc4c/src/task-review.js +0 -1498
- package/.worktrees/e58fcc4c/src/taskcard-placeholders.js +0 -21
- package/.worktrees/e58fcc4c/src/taskcard.js +0 -250
- package/.worktrees/e58fcc4c/src/verify-postcheck.js +0 -1718
- package/.worktrees/e58fcc4c/src/verify-probes.js +0 -327
- package/.worktrees/e58fcc4c/src/version.js +0 -19
- package/.worktrees/e58fcc4c/src/workflow.js +0 -600
- package/.worktrees/e58fcc4c/src/workspace.js +0 -125
- package/.worktrees/e58fcc4c/src/worktree-apply.js +0 -1611
- package/.worktrees/e58fcc4c/src/worktree-deps.js +0 -668
- package/.worktrees/e58fcc4c/src/worktree.js +0 -1849
- package/.worktrees/e58fcc4c/templates/claude-instruction.md +0 -23
- package/.worktrees/e58fcc4c/templates/prompts/taskcard-rules.md +0 -29
- package/.worktrees/e58fcc4c/templates/prompts/testcase-design.md +0 -12
- package/.worktrees/e58fcc4c/templates/prompts/verify-probes.md +0 -32
- package/.worktrees/e58fcc4c/templates/workflows/archive-impact.yaml +0 -79
- package/.worktrees/e58fcc4c/templates/workflows/scan-docs.yaml +0 -132
|
@@ -1,1277 +0,0 @@
|
|
|
1
|
-
import { existsSync, readFileSync, readdirSync, writeFileSync } from 'fs'
|
|
2
|
-
import path from 'path'
|
|
3
|
-
import { buildContractMatrix, buildConsumerInjection, buildContractFieldInjection } from '../contract-matrix.js'
|
|
4
|
-
import { getRule } from '../stage-contract-spec.js'
|
|
5
|
-
import { renderDispatchInstruction } from '../dispatch/strategy.js'
|
|
6
|
-
import { isPathASupported } from '../dispatch/backends/sillyhub-mcp.js'
|
|
7
|
-
import { readMcpConfig } from '../sillyhub-mcp/config.js'
|
|
8
|
-
import { gitQuiet } from '../git-helper.js'
|
|
9
|
-
import { parseRepo } from './plan-postcheck.js'
|
|
10
|
-
// 模块卡分级解析(token 成本优化 P0a)。注意:module-resolve.js 反向 import 本文件的
|
|
11
|
-
// parseTaskRegistry(注册表同口径)——双向引用均为函数声明 + 调用时解引(无模块初始化期
|
|
12
|
-
// 交叉求值),ESM live binding 下安全;两边都是纯读函数,无副作用序问题。
|
|
13
|
-
import { resolveChangeModuleCards } from '../module-resolve.js'
|
|
14
|
-
// 决策锚点触碰事实(2026-08-24-decision-touch-cli-drift task-01,W-A 主渲染点 D-003):
|
|
15
|
-
// changedFiles 口径与 {DOCS_DEBT} 现算同源(collectExecuteChangedFiles 唯一实现,勿双写)
|
|
16
|
-
import { collectExecuteChangedFiles, computeDecisionTouches, renderDecisionTouchFacts } from '../docs-debt.js'
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 任务注册表解析(2026-08-20-task-truth-unify D-001@v1:tasks.md 唯一任务真相)。
|
|
20
|
-
* 行契约:`- [ ] task-01: 名称 [model:xxx] (depends_on: task-01,02)`——标注均可选;
|
|
21
|
-
* ql-xxx 等 task-XX 前缀之外的行(quick 挂载条目)与注册表正交,不收。
|
|
22
|
-
* @param {string} tasksContent - tasks.md 文件内容
|
|
23
|
-
* @returns {Array<{index:number, id:string, name:string, done:boolean, model:string|null, dependsOn:string[], file:string, steps:string, reference:string}>}
|
|
24
|
-
*/
|
|
25
|
-
export function parseTaskRegistry(tasksContent) {
|
|
26
|
-
const tasks = []
|
|
27
|
-
if (!tasksContent) return tasks
|
|
28
|
-
for (const line of String(tasksContent).split('\n')) {
|
|
29
|
-
const m = line.match(/^[-*]\s*\[([ xX])\]\s*task-(\d+)\b[::]?\s*(.*)/)
|
|
30
|
-
if (!m) continue
|
|
31
|
-
let name = (m[3] || '').trim()
|
|
32
|
-
let model = null
|
|
33
|
-
const modelMatch = name.match(/\[model:([^\]]+)\]/i)
|
|
34
|
-
if (modelMatch) { model = modelMatch[1].trim(); name = name.replace(modelMatch[0], '').trim() }
|
|
35
|
-
let dependsOn = []
|
|
36
|
-
const depMatch = name.match(/\(depends_on:\s*([^)]+)\)/i)
|
|
37
|
-
if (depMatch) {
|
|
38
|
-
dependsOn = depMatch[1].split(/[,,]/).map(s => s.trim().replace(/^task-/i, '')).filter(Boolean).map(n => `task-${n.padStart(2, '0')}`)
|
|
39
|
-
name = name.replace(depMatch[0], '').trim()
|
|
40
|
-
}
|
|
41
|
-
// 兼容行尾 (文件路径) 尾注(旧 plan 内联习惯在 tasks.md 沿用时同样收容)
|
|
42
|
-
let file = ''
|
|
43
|
-
const fileMatch = name.match(/\(([^()]+)\)$/)
|
|
44
|
-
if (fileMatch) { file = fileMatch[1].trim(); name = name.replace(/\([^()]+\)$/, '').trim() }
|
|
45
|
-
tasks.push({
|
|
46
|
-
index: parseInt(m[2], 10),
|
|
47
|
-
id: `task-${m[2].padStart(2, '0')}`,
|
|
48
|
-
name,
|
|
49
|
-
done: (m[1] === 'x' || m[1] === 'X'),
|
|
50
|
-
model,
|
|
51
|
-
dependsOn,
|
|
52
|
-
file,
|
|
53
|
-
steps: '',
|
|
54
|
-
reference: ''
|
|
55
|
-
})
|
|
56
|
-
}
|
|
57
|
-
return tasks
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 校验 tasks.md(任务注册表)× plan.md(Wave ID 引用)是否满足 execute 执行契约。
|
|
62
|
-
* 新契约(D-001@v1):任务清单唯一真相在 tasks.md;plan.md Wave 段下为纯 ID 引用行
|
|
63
|
-
* (`- task-01`,不重抄任务名),交叉校验存在性/覆盖恰一次/编号连续。
|
|
64
|
-
* @param {string} tasksContent - tasks.md 文件内容
|
|
65
|
-
* @param {string} planContent - plan.md 文件内容
|
|
66
|
-
* @returns {{ ok: boolean, errors: string[], warnings: string[], tasks: object[], waves: object[] }}
|
|
67
|
-
*/
|
|
68
|
-
export function validatePlanForExecute(tasksContent, planContent) {
|
|
69
|
-
const errors = []
|
|
70
|
-
const warnings = []
|
|
71
|
-
const plan = String(planContent || '')
|
|
72
|
-
const registry = parseTaskRegistry(tasksContent)
|
|
73
|
-
|
|
74
|
-
if (!plan.trim() && !String(tasksContent || '').trim()) {
|
|
75
|
-
return { ok: false, errors: ['plan.md 与 tasks.md 内容均为空'], warnings, tasks: [], waves: [] }
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// 检查 0: Wave 编号带字母后缀(如 "## Wave 2b")→ 显式报错(坑 plan-wave-letter-suffix)
|
|
79
|
-
const letterSuffixWaves = [...plan.matchAll(/^#+\s*Wave\s+(\d+)([a-z])(?![a-z0-9])/gim)]
|
|
80
|
-
for (const m of letterSuffixWaves) {
|
|
81
|
-
errors.push(
|
|
82
|
-
`Wave 编号带字母后缀:${m[0].trim()}("${m[1]}${m[2]}")不被支持。` +
|
|
83
|
-
`解析器只认纯数字编号("## Wave N"),字母后缀会被截断为 "${m[1]}" 与显式 Wave ${m[1]} 静默合并强制并行。` +
|
|
84
|
-
`解法:改顺序纯数字编号(Wave 3/4…)或并入相邻 Wave`
|
|
85
|
-
)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
// 检查 0.5: 旧格式残留——plan.md 内出现任务名级 checkbox 行(任务清单旧家)→ 指路迁移
|
|
89
|
-
const legacyCheckbox = [...plan.matchAll(/^[-*]\s*\[[ xX]\]\s*task-\d+\b[::]/gim)]
|
|
90
|
-
if (legacyCheckbox.length > 0) {
|
|
91
|
-
errors.push(
|
|
92
|
-
`plan.md 含 ${legacyCheckbox.length} 处旧格式任务 checkbox 行("- [ ] task-XX: 名称")。` +
|
|
93
|
-
`新契约(2026-08-20-task-truth-unify):任务清单唯一真相在 tasks.md,plan.md Wave 段下只写纯 ID 引用行。` +
|
|
94
|
-
`迁移:把任务 checkbox 行移入 tasks.md(保留 [model:xxx]/(depends_on: …) 行内标注),plan.md Wave 段改为 "- task-XX" 引用行`
|
|
95
|
-
)
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
const waves = parseWavesFromPlan(plan, registry)
|
|
99
|
-
const allTasks = registry
|
|
100
|
-
|
|
101
|
-
// 检查 0.6: plan_level 锚点缺失(2026-08-21 审查 CLI-5):plan_level 是 review tier 的
|
|
102
|
-
// 判定主锚(classifyReviewTier)——漏写时静默退文件数启发式,full 级大变更会被降级成
|
|
103
|
-
// self 自审且无人报错(降级方向比 fail 更危险)。与 gates 读侧同口径:任意行 plan_level:。
|
|
104
|
-
const fmLine = plan.split('\n').find(l => l.trim().startsWith('plan_level:'))
|
|
105
|
-
if (!fmLine) {
|
|
106
|
-
errors.push(
|
|
107
|
-
`plan.md 缺 plan_level 锚点。brainstorm 的规模判定落盘(frontmatter 写 plan_level: none|light|full)是 review 分级的主锚,` +
|
|
108
|
-
`漏写会静默退文件数启发式——full 级变更可能被降级自审。修复:在 plan.md frontmatter 补一行,如 plan_level: full`
|
|
109
|
-
)
|
|
110
|
-
} else {
|
|
111
|
-
const planLevelValue = fmLine.split(':')[1].trim()
|
|
112
|
-
if (!['none', 'light', 'full'].includes(planLevelValue)) {
|
|
113
|
-
errors.push(
|
|
114
|
-
`plan_level 值非法:${JSON.stringify(planLevelValue)}(合法值 none|light|full)。` +
|
|
115
|
-
`非法值在 review 分级中被当作无锚点处理,同样会静默退文件数启发式`
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// 检查 0.8: Wave 标题格式不对(W1/波次1 等)→ 引用行不被收容,静默退化隐式单 Wave
|
|
121
|
-
// 全并行——串行意图失效且无提示(原「标题格式不对」诊断的新契约承接)。仅在确有疑似标题
|
|
122
|
-
// 且无任何显式 Wave 被解析时报,正常 Wave 10/带括号标题不误伤。
|
|
123
|
-
const hasExplicitWave = waves.some(w => !w.implicit)
|
|
124
|
-
const waveLikeHeading = /^#+\s*(?:wave\s*\d+|w\d+|波次\s*\d+)/im
|
|
125
|
-
if (!hasExplicitWave && waveLikeHeading.test(plan)) {
|
|
126
|
-
errors.push(
|
|
127
|
-
`Wave 标题格式不对:必须字面 "## Wave N"(Wave + 空格 + 数字),"## W1" / "## Wave1" / "## 波次1" 都不被识别。` +
|
|
128
|
-
`其下的 "- task-XX" 引用行不会被收容——任务将退化为单个隐式 Wave 全并行,串行意图失效`
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
// 检查 0.9(坑 wave-heading-undercount,2026-08-21 实证):部分 Wave 被识别 + 部分
|
|
132
|
-
// wave-like 标题漏识别(6 标题解析 5 个)→ 漏掉 Wave 的任务静默落入后续步骤,收尾靠
|
|
133
|
-
// 批量完成兜住才没出事。逐个点名漏网标题,plan --done 即阻断修复。
|
|
134
|
-
if (hasExplicitWave) {
|
|
135
|
-
const strictRe = /^#+\s*Wave\s*\d+/i
|
|
136
|
-
const missed = plan.split('\n')
|
|
137
|
-
.map(l => l.replace(/\r$/, ''))
|
|
138
|
-
.filter(l => waveLikeHeading.test(l) && !strictRe.test(l))
|
|
139
|
-
if (missed.length > 0) {
|
|
140
|
-
errors.push(
|
|
141
|
-
`存在 ${missed.length} 个「疑似 Wave 标题但未被识别」的行(其余 Wave 已正常解析,这 ${missed.length} 个段的任务会漏进后续步骤):` +
|
|
142
|
-
missed.slice(0, 5).map(l => `"${l.trim().slice(0, 50)}"`).join('、') +
|
|
143
|
-
`。必须字面 "## Wave N" 格式(Wave+空格+数字),修正后重跑 plan --done`
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// 检查 1: 注册表非空(tasks.md 无 task-XX checkbox → 三类根因诊断)
|
|
149
|
-
if (allTasks.length === 0) {
|
|
150
|
-
const diags = diagnoseNoTaskRegistry(tasksContent, plan)
|
|
151
|
-
errors.push('tasks.md 中没有找到 task-XX checkbox(任务注册表为空,格式: "- [ ] task-XX: 任务名")')
|
|
152
|
-
for (const d of diags) errors.push(` 诊断:${d}`)
|
|
153
|
-
return { ok: false, errors, warnings, tasks: allTasks, waves }
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
// 检查 2: task id 唯一性(tasks.md 内重复行)
|
|
157
|
-
const idCounts = {}
|
|
158
|
-
for (const task of allTasks) idCounts[task.id] = (idCounts[task.id] || 0) + 1
|
|
159
|
-
for (const [id, count] of Object.entries(idCounts)) {
|
|
160
|
-
if (count > 1) errors.push(`task id 重复: ${id} 在 tasks.md 出现 ${count} 次`)
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// 检查 3: task id 连续性(从 1 开始;ids[0]!==1 时整体跳过 = 兼容旧变更编号不从 1 起,
|
|
164
|
-
// 契约由 test/plan-execute-contract.test.mjs Case 10 钉死,勿改)
|
|
165
|
-
const ids = allTasks.map(t => t.index).sort((a, b) => a - b)
|
|
166
|
-
if (ids.length > 0 && ids[0] === 1) {
|
|
167
|
-
for (let i = 0; i < ids.length; i++) {
|
|
168
|
-
if (ids[i] !== i + 1) {
|
|
169
|
-
errors.push(getRule('plan.task-id-continuity').failMessage.replaceAll('${expected}', String(i + 1).padStart(2, '0')).replaceAll('${actual}', String(ids[i]).padStart(2, '0')))
|
|
170
|
-
break
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// 检查 4: task name 非空(注册表行)
|
|
176
|
-
for (const task of allTasks) {
|
|
177
|
-
if (!task.name || !task.name.trim()) {
|
|
178
|
-
errors.push(`${task.id}: 任务名为空(tasks.md 行格式 "- [ ] ${task.id}: 一句话任务名")`)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
// 交叉校验:plan.md Wave 引用 × tasks.md 注册表(仅显式 Wave 结构参与;隐式 Wave 由
|
|
183
|
-
// parseWavesFromPlan 从注册表整体合成,天然全覆盖)
|
|
184
|
-
const explicitWaves = waves.filter(w => !w.implicit)
|
|
185
|
-
if (explicitWaves.length > 0) {
|
|
186
|
-
const refCount = {}
|
|
187
|
-
for (const wave of explicitWaves) {
|
|
188
|
-
for (const task of wave.tasks) {
|
|
189
|
-
refCount[task.id] = (refCount[task.id] || 0) + 1
|
|
190
|
-
if (task.dangling) {
|
|
191
|
-
errors.push(`plan.md Wave ${wave.index} 引用的 ${task.id} 不存在于 tasks.md 注册表(悬空引用)`)
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
// 覆盖恰一次:注册表每个 id 必须被引用(缺失)且只被一个 Wave 引用(重复)
|
|
196
|
-
for (const task of allTasks) {
|
|
197
|
-
const n = refCount[task.id] || 0
|
|
198
|
-
if (n === 0) errors.push(`${task.id} 未被任何 Wave 引用(plan.md Wave 段缺 "- ${task.id}" 引用行——未引用的任务不进 execute 步骤)`)
|
|
199
|
-
if (n > 1) errors.push(`${task.id} 被多个 Wave 重复引用 ${n} 次(一个任务只属一个 Wave;跨 Wave 依赖用 (depends_on: …) 声明)`)
|
|
200
|
-
}
|
|
201
|
-
// Wave 段空引用诊断
|
|
202
|
-
const emptyWave = explicitWaves.find(w => w.tasks.length === 0)
|
|
203
|
-
if (emptyWave) {
|
|
204
|
-
errors.push(`plan.md Wave ${emptyWave.index} 段下没有任何 "- task-XX" 引用行(新契约 Wave 段只收 ID 引用行)`)
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
return { ok: errors.length === 0, errors, warnings, tasks: allTasks, waves }
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export const definition = {
|
|
212
|
-
name: 'execute',
|
|
213
|
-
title: '波次执行',
|
|
214
|
-
description: '子代理并行 + 强制 TDD + 两阶段审查',
|
|
215
|
-
steps: [] // 动态构建,由 buildExecuteSteps() 生成
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// 固定前缀步骤定义
|
|
219
|
-
const fixedPrefix = [
|
|
220
|
-
{
|
|
221
|
-
name: '进度确认',
|
|
222
|
-
migratedFrom: ['状态检查'],
|
|
223
|
-
prompt: `检查当前进度,确认可以执行 execute。用 \`sillyspec progress show\` 查流程进度,不要用 \`sillyspec status\`(项目级快照,不推进流程)。
|
|
224
|
-
|
|
225
|
-
### 操作
|
|
226
|
-
1. 运行 \`sillyspec progress show\`
|
|
227
|
-
2. 确认 currentStage 为 execute
|
|
228
|
-
3. 如果不是 → 检查是否有未完成的 tasks.md
|
|
229
|
-
4. 确认执行范围($ARGUMENTS 指定 wave/task 或全部)
|
|
230
|
-
|
|
231
|
-
### 输出
|
|
232
|
-
当前状态 + 执行范围确认`,
|
|
233
|
-
outputHint: '当前状态 + 执行范围',
|
|
234
|
-
optional: false
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: '加载上下文',
|
|
238
|
-
prompt: `加载计划、设计和代码库上下文。
|
|
239
|
-
|
|
240
|
-
### 操作
|
|
241
|
-
1. 读取 tasks.md(任务注册表与勾选唯一真相;plan.md 只提供 Wave 分组/依赖结构——Wave 段下为纯 ID 引用行)
|
|
242
|
-
2. 读取 design.md(技术方案)
|
|
243
|
-
3. 读取 CONVENTIONS.md、ARCHITECTURE.md
|
|
244
|
-
4. 读取 local.yaml(构建命令);若 local.yaml 不存在,先 \`sillyspec local detect\` 生成骨架再读取
|
|
245
|
-
5. 加载项目总览 \`.sillyspec/docs/<project>/scan/PROJECT.md\`(如存在)
|
|
246
|
-
|
|
247
|
-
### 模块文档加载(细粒度卡优先——CLI 已按 tasks 卡 allowed_paths 级联匹配)
|
|
248
|
-
6. 读取下方注入的 per-task 模块卡表({MODULE_RESOLVE_TABLE})——跨全部 _module-map.yaml 最长前缀匹配,子项目细粒度卡优先于根层大卡
|
|
249
|
-
7. 主代理与子代理**只读表中命中的卡**:细粒度卡整卡可读(体量小、语义近);仅粗粒度大卡命中时**按节读**——只读「契约摘要」「注意事项」「定位」,跳过「变更索引」「人工备注」等历史累积段
|
|
250
|
-
8. 实现代码时遵循模块卡中描述的接口约定、数据流和依赖关系
|
|
251
|
-
9. **利用模块索引快速定位源码**:
|
|
252
|
-
- 用 entrypoints 字段直接找到模块对外 API 的源码位置
|
|
253
|
-
- 用 main_symbols 字段找到核心类/函数的定义位置
|
|
254
|
-
- 子代理优先读模块卡片理解语义,再读 entrypoints/main_symbols 对应的源码
|
|
255
|
-
10. 表查询命令同源可复跑:\`sillyspec modules resolve --change <change-name>\`(任务卡改动后重跑刷新表)
|
|
256
|
-
|
|
257
|
-
### 符号影响面扩展检查
|
|
258
|
-
11. **符号影响面扫描**(Critical — execute 前必做):
|
|
259
|
-
- **重入沿用(省重复消耗)**:若 symbol-impact.md 已存在、结论完整且其文件头「tasks.md 内容指纹」与当前 tasks.md 一致(中断续跑/阶段重开场景),直接复核沿用既有结论,**不重做调用点扫描**
|
|
260
|
-
- **报告骨架勿手写**:先跑 \`sillyspec symbol-impact --change <change-name>\`——CLI 从 tasks.md 生成逐 task \`<!--TODO-->\` 骨架(gate 拦截时也会自动落一份);把每行占位替换为真实结论(**未替换的 TODO 占位会被 gate 拒绝**,骨架不能直接过门)
|
|
261
|
-
- 读取所有 tasks/task-NN.md,提取每个任务涉及的修改文件
|
|
262
|
-
- 对每个修改文件,检查是否涉及以下变更类型:
|
|
263
|
-
- class 构造函数参数变更(新增/删除/修改参数)
|
|
264
|
-
- 接口(interface)定义变更
|
|
265
|
-
- DTO / 类型定义变更
|
|
266
|
-
- API client 方法签名变更
|
|
267
|
-
- 函数/方法签名变更(参数增删改)
|
|
268
|
-
- 如果涉及上述变更类型,执行调用点搜索(用于补骨架外的调用点证据,不是生成报告的方式):
|
|
269
|
-
\`\`\`bash
|
|
270
|
-
rg "new ClassName\(" src/
|
|
271
|
-
rg "ClassName\(" src/
|
|
272
|
-
rg "methodName\(" src/
|
|
273
|
-
rg "import.*from.*filePath" src/
|
|
274
|
-
\`\`\`
|
|
275
|
-
- 将搜索到的调用点与 plan.md 和 tasks/task-NN.md 的 allowed_paths 对比
|
|
276
|
-
- **发现调用点不在任何 task 的 allowed_paths 中 → 直接阻断 execute**
|
|
277
|
-
- **报告落盘(CLI 硬校验)**:结论写入 \`{SPEC_ROOT}/changes/<change-name>/symbol-impact.md\`,每个 task 一行结论(task-XX: 变更类型 + 受影响调用点 + 是否在范围内;无签名级变更也要显式写「无签名级变更」)。\`--done\` 时 CLI 校验该文件存在且覆盖 plan.md 全部 task,缺失或不覆盖会阻断完成
|
|
278
|
-
- 如果调用点不在范围内但任务明确写了"不改原因",记录但不阻断
|
|
279
|
-
|
|
280
|
-
### 输出
|
|
281
|
-
已加载的上下文摘要(含模块文档 + 源码锚点)+ 符号影响面结论摘要`,
|
|
282
|
-
outputHint: '上下文摘要 + 符号影响面结论',
|
|
283
|
-
optional: false
|
|
284
|
-
},
|
|
285
|
-
{
|
|
286
|
-
name: '确认 worktree 路径',
|
|
287
|
-
prompt: `确认当前 worktree 状态,提取隔离路径。
|
|
288
|
-
|
|
289
|
-
### 操作
|
|
290
|
-
1. 运行 \`sillyspec worktree meta <change-name>\` 读取 meta.json
|
|
291
|
-
2. 从输出中提取 worktreePath、branch、mode 字段
|
|
292
|
-
3. 确认 worktree 目录存在(如果是 worktree/native-worktree 模式)
|
|
293
|
-
4. **确认工具链可用**:worktree 内项目工具链(lint/format/test 二进制,如 ruff / prettier / uv)可能不全——对本次会用到的工具先跑一次 \`--version\` 确认;缺失则按项目方式安装(Python 项目 \`uv tool install ruff\` / \`uv sync\`,Node 项目 node_modules 已由 CLI 链接主仓)。不要等到 commit 才发现二进制不在 PATH 被 hook 拦。**Python 项目注意**:worktree 自建 .venv 只含 pyproject 声明依赖,pytest 等 dev 工具可能缺失——优先在 worktree 内补装(\`uv sync --group dev\` / \`uv pip install pytest\`),**不要回退用主仓 venv 跑测试**(主仓 venv 加载的可能是主仓代码而非 worktree 代码,环境不一致会掩真 bug)
|
|
294
|
-
|
|
295
|
-
### 铁律
|
|
296
|
-
- **worktree 已由 CLI 在 execute 阶段启动时自动创建,不要自行创建或跳过**
|
|
297
|
-
- **后续所有子代理的 cwd 必须设为该 worktree 路径**
|
|
298
|
-
- 如果 meta.json 不存在(说明创建失败),停止并报错
|
|
299
|
-
- **不要自行检查 git dirty/uncommitted 状态来判断是否可以进入 worktree,CLI 已自动处理**
|
|
300
|
-
|
|
301
|
-
### 输出
|
|
302
|
-
worktree 路径 + 分支名 + 模式
|
|
303
|
-
|
|
304
|
-
`,
|
|
305
|
-
outputHint: 'worktree 路径 + 分支名 + 模式',
|
|
306
|
-
optional: false
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: '确认执行范围',
|
|
310
|
-
prompt: `解析任务,确认执行范围和确认模式。
|
|
311
|
-
|
|
312
|
-
### 操作
|
|
313
|
-
1. 从 plan 中解析 Wave 分组和任务列表
|
|
314
|
-
2. 模型档位:若 tasks.md 中某 task 标注了 [model:xxx],启动该 task 子代理时按标签选模型(档位由 plan 阶段或用户在 tasks.md 显式标注,execute 不在此自动建议——关键词→档位无统一映射,自动建议反而易误导)
|
|
315
|
-
3. 确认频率:默认每个 Wave 完成后展示结果(wave 模式);用户口头指定按 Task 展示或全自动时遵从
|
|
316
|
-
4. 查询知识库:读取 \`.sillyspec/knowledge/INDEX.md\`,根据 Task 关键词匹配
|
|
317
|
-
|
|
318
|
-
### 知识命中报告
|
|
319
|
-
{KNOWLEDGE_HIT_REPORT}
|
|
320
|
-
|
|
321
|
-
如上所示的知识条目与本次任务相关。请阅读这些条目以获取项目约定和已知模式。
|
|
322
|
-
如无命中条目(Status: no matches),跳过本节。
|
|
323
|
-
|
|
324
|
-
### 模块文档欠账(CLI 算事实)
|
|
325
|
-
{DOCS_DEBT}
|
|
326
|
-
|
|
327
|
-
如上为 CLI 用 git 事实算出的本变更触及模块文档欠账(无输出=无欠账或归属数据缺失)。
|
|
328
|
-
欠账处理:Wave 收尾时顺手同步对应模块卡,不必为此停下。变更索引类条目追加到卡同目录 \`<module>.changelog.md\` sidecar(无则创建;可先跑 \`sillyspec modules split-changelog\` 迁出历史段)——勿把历史条目堆回模块卡正文(卡是子代理的读取税)。
|
|
329
|
-
|
|
330
|
-
### 铁律
|
|
331
|
-
- **不要询问用户确认频率**,默认 wave 模式;用户已明确口头指定时遵从其指定`,
|
|
332
|
-
outputHint: 'Wave 分组 + 模型分配',
|
|
333
|
-
optional: false
|
|
334
|
-
}
|
|
335
|
-
]
|
|
336
|
-
|
|
337
|
-
// 全局验收步骤定义
|
|
338
|
-
const acceptanceSteps = [
|
|
339
|
-
{
|
|
340
|
-
name: '对照设计检查',
|
|
341
|
-
mode: 'acceptance',
|
|
342
|
-
prompt: `对照 design.md 检查所有实现是否与设计一致。
|
|
343
|
-
|
|
344
|
-
### 执行方式(CLI 按变更规模判定,占位符由 run.js 注入)
|
|
345
|
-
tier: {REVIEW_TIER}({REVIEW_TIER_REASON})
|
|
346
|
-
- tier=self:当前 agent 汇总执行(对照 design.md 逐项检查 + 偏差说明)
|
|
347
|
-
- tier=independent:必须用 Agent tool 启动一个独立的 QA 子代理(独立上下文,不共享实现者的分析),子代理对照 design.md 逐项检查实现一致性并输出 review.json。review.json 产物契约(CLI Stage Review Gate 将硬校验,schema + 完整示例 + docHash 算法如下,照抄改值;reviewedFiles 除主文档 design.md 外可追加 git diff 涉及的源码文件):
|
|
348
|
-
{REVIEW_JSON_CONTRACT}
|
|
349
|
-
该 acceptance review 同时覆盖"代码审查"视角(风格/bug/安全/冗余),后续代码审查步骤仅需轻量复审。
|
|
350
|
-
|
|
351
|
-
**审查范围分级(省重复消耗,task review 已覆盖的不全量重审)**:每个 task 在 Task Review Gate 已产出 review.json({SPEC_ROOT}/.runtime/execute-runs/{EXECUTE_RUN_ID}/tasks/task-XX/review.json,specVerdict/qualityVerdict 双 pass)。QA 子代理按它分层:双 pass 的 task 只**抽查**(读 1-2 个核心 diff 文件抽验 reviewerNotes 与实际改动相符,不必逐文件重审);未双 pass(fail/cannot_verify/缺失)的 task 必须全量重审。无论抽查还是全量,以下三项始终必查——task review 铁律是"只看当前 task 的 diff",这三项是它覆盖不到、只有 stage review 能兜住的:
|
|
352
|
-
1. 跨 task 交界(A 产出的接口/数据结构与 B 的消费是否对得上)
|
|
353
|
-
2. design.md 整体对照(最终实现拼起来是否仍符合设计意图,而非仅各 task 局部合规)
|
|
354
|
-
3. 组装行为(全量测试/构建/启动通过——单 task 测试全绿 ≠ 组装正确)
|
|
355
|
-
|
|
356
|
-
**产物唯一化(省重复消耗)**:本步逐项对照结论**只落盘一份**——直接写进 review.json 的 \`checklist\` 数组(item=设计要点/FR/决策,note=实现状态 ✅/⚠️/❌ + 偏差说明 + commit 锚点),reviewerNotes 写汇总。**不要**另写独立的 design-check.md 长文(同一份 design×diff 二次消费;2026-08-22 实测该重复一遍 ≈8 分钟全量重读)。
|
|
357
|
-
**gate 重试修复**:review.json 落盘后若后续 gate 报 docHash 失配 / 路径错,跑 \`sillyspec register-stage-review --change <变更名> --stage execute --refresh-hash\` 一键重算修复——**不要重做审查**(重做=同一材料第三遍)。
|
|
358
|
-
|
|
359
|
-
### 操作
|
|
360
|
-
1. 读取 design.md(技术方案)——按章节精准读(design-check 对照表可借 tasks 卡 §锚点定位),避免反复整读全文
|
|
361
|
-
2. 逐一对照 design.md 中的设计要点与实际代码实现
|
|
362
|
-
3. 检查接口签名、数据结构、模块划分是否一致
|
|
363
|
-
4. 记录偏差项(偏差 ≠ 错误,可能是合理的实现调整)
|
|
364
|
-
|
|
365
|
-
### 输出
|
|
366
|
-
review.json 已落盘(checklist=逐项核验表)+ checklist 摘要与偏差说明;无独立长文产物`,
|
|
367
|
-
outputHint: '设计对照检查清单',
|
|
368
|
-
optional: false
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
name: '运行测试',
|
|
372
|
-
mode: 'acceptance',
|
|
373
|
-
prompt: `运行所有测试,验证代码质量。
|
|
374
|
-
|
|
375
|
-
### 执行方式
|
|
376
|
-
本步骤由当前 agent 执行,不需要启动独立子代理。
|
|
377
|
-
|
|
378
|
-
### 操作
|
|
379
|
-
1. 读取 local.yaml 获取构建和测试命令;若 local.yaml 不存在,先 \`sillyspec local detect\` 生成骨架再读取
|
|
380
|
-
2. 运行测试套件(单元测试、集成测试)
|
|
381
|
-
3. 运行 lint 检查 **+ 格式化**:凡变更涉及的源码,既跑 lint check 也跑 formatter(如 \`ruff format\` / \`prettier --write\` / \`black\`),不要只跑 check——只 check 不 format 会把格式问题留到 commit 时被 pre-commit hook 拦截
|
|
382
|
-
4. 如果有测试失败 → 分析原因,标注是代码问题还是测试本身的问题
|
|
383
|
-
5. 汇总测试结果
|
|
384
|
-
|
|
385
|
-
### 铁律
|
|
386
|
-
- 长测试/构建/lint 命令必须**前台同步执行**,禁止 run_in_background:true / & / nohup / disown——后台任务易被会话生命周期回收导致中断无果
|
|
387
|
-
|
|
388
|
-
### 输出
|
|
389
|
-
测试结果摘要:通过/失败/跳过数量 + 失败项分析`,
|
|
390
|
-
outputHint: '测试结果摘要',
|
|
391
|
-
optional: false
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
name: '代码审查',
|
|
395
|
-
mode: 'acceptance',
|
|
396
|
-
prompt: `对本次变更进行代码审查。
|
|
397
|
-
|
|
398
|
-
### 执行方式
|
|
399
|
-
本步骤由当前 agent 或一个 QA agent 汇总执行,不需要为每个文件启动独立子代理。
|
|
400
|
-
|
|
401
|
-
### 操作
|
|
402
|
-
1. 检查 git diff 查看所有变更
|
|
403
|
-
2. 审查要点:
|
|
404
|
-
- 代码风格是否符合 CONVENTIONS.md
|
|
405
|
-
- 是否有明显的 bug 或安全漏洞
|
|
406
|
-
- 是否有未处理的 TODO/FIXME
|
|
407
|
-
- 错误处理是否完善
|
|
408
|
-
- 是否有冗余代码或可简化的逻辑
|
|
409
|
-
3. 对照 ARCHITECTURE.md 检查架构合规性
|
|
410
|
-
|
|
411
|
-
### 输出
|
|
412
|
-
审查结果:问题列表(严重程度 + 建议修复方式)+ 总体评价`,
|
|
413
|
-
outputHint: '代码审查结果',
|
|
414
|
-
optional: true
|
|
415
|
-
}
|
|
416
|
-
]
|
|
417
|
-
|
|
418
|
-
// 固定后缀步骤定义
|
|
419
|
-
const fixedSuffix = [
|
|
420
|
-
{
|
|
421
|
-
name: '知识库审阅',
|
|
422
|
-
prompt: `检查本轮执行产生的新知识。
|
|
423
|
-
|
|
424
|
-
### 操作
|
|
425
|
-
1. 检查 \`.sillyspec/knowledge/uncategorized.md\` 中待确认条目
|
|
426
|
-
2. 如有 → 提示用户审阅
|
|
427
|
-
3. 用户确认后改为 [已确认],可归类到专题文件
|
|
428
|
-
|
|
429
|
-
### 输出
|
|
430
|
-
新知识条目数量 + 审阅提示(或"无新知识")`,
|
|
431
|
-
outputHint: '知识条目数量',
|
|
432
|
-
optional: true
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
name: '完成确认',
|
|
436
|
-
prompt: `所有任务完成后的收尾。
|
|
437
|
-
|
|
438
|
-
先检查当前 worktree 的隔离模式:
|
|
439
|
-
\`\`\`bash
|
|
440
|
-
sillyspec worktree meta <change-name>
|
|
441
|
-
\`\`\`
|
|
442
|
-
(CLI 子命令,输出 meta.json 的 mode / worktreePath 字段;无 meta 输出 no meta)
|
|
443
|
-
|
|
444
|
-
### 操作(mode = worktree,SillySpec 创建的隔离 worktree)
|
|
445
|
-
|
|
446
|
-
**自动审计流程(不需要用户确认代码):**
|
|
447
|
-
|
|
448
|
-
1. 运行 \`sillyspec worktree assess <change-name>\` 自动风险审计
|
|
449
|
-
2. 系统自动检查:
|
|
450
|
-
- patch --check 是否通过
|
|
451
|
-
- 变更是否在 allowed_paths 内
|
|
452
|
-
- 主工作区是否有未提交 dirty(拦截;已提交推进交 --3way 自动三路合并)
|
|
453
|
-
- 是否有高风险文件(lockfile/migration/配置/入口)
|
|
454
|
-
- diff 规模是否异常
|
|
455
|
-
3. 输出 Apply Decision:
|
|
456
|
-
|
|
457
|
-
\`\`\`
|
|
458
|
-
Worktree Apply Decision
|
|
459
|
-
────────────────────────
|
|
460
|
-
Decision: SAFE | WARNING | BLOCKED
|
|
461
|
-
Changed files: N
|
|
462
|
-
Additions: +N Deletions: -N
|
|
463
|
-
Risky files: none | <list>
|
|
464
|
-
Action: auto-applied | blocked
|
|
465
|
-
\`\`\`
|
|
466
|
-
|
|
467
|
-
4. **SAFE** → 自动 \`sillyspec worktree apply <change-name>\` + cleanup
|
|
468
|
-
5. **WARNING** → 自动 apply(有警告但不阻断)+ cleanup
|
|
469
|
-
6. **BLOCKED** → 不 apply,输出原因,提示用户检查:
|
|
470
|
-
- \`sillyspec worktree diff <change-name>\` 查看具体变更
|
|
471
|
-
- \`sillyspec worktree cleanup <change-name>\` 丢弃
|
|
472
|
-
7. 建议下一步:\`sillyspec run verify\`
|
|
473
|
-
|
|
474
|
-
### 操作(mode = native-worktree,用户已有的 linked worktree)
|
|
475
|
-
1. 同上自动审计流程
|
|
476
|
-
2. SAFE/WARNING → \`sillyspec worktree apply <change-name>\`
|
|
477
|
-
3. **不要运行 cleanup**
|
|
478
|
-
4. 输出 Worktree: kept
|
|
479
|
-
5. 建议下一步:\`sillyspec run verify\`
|
|
480
|
-
|
|
481
|
-
### 操作(mode = in-place-fallback,降级模式无隔离目录)
|
|
482
|
-
1. 展示本次执行摘要(\`git diff\` 查看变更)
|
|
483
|
-
2. 跳过 apply 和 cleanup
|
|
484
|
-
3. 输出 Worktree: none
|
|
485
|
-
4. 建议下一步:\`sillyspec run verify\`
|
|
486
|
-
|
|
487
|
-
### 输出
|
|
488
|
-
Apply Decision + 下一步建议
|
|
489
|
-
|
|
490
|
-
### 注意
|
|
491
|
-
- 完成后运行 \`sillyspec run execute --done\` 即可自动推进阶段`,
|
|
492
|
-
outputHint: 'apply 结果',
|
|
493
|
-
optional: false
|
|
494
|
-
}
|
|
495
|
-
]
|
|
496
|
-
|
|
497
|
-
/**
|
|
498
|
-
* 诊断任务注册表为空的根因(坑 plan-md-format-contract-hidden 延续:笼统报错逼 agent 试错)。
|
|
499
|
-
* 三类根因:tasks.md 无 task-XX checkbox / plan.md Wave 段无 ID 引用 / 旧格式(任务 checkbox 还在 plan.md)。
|
|
500
|
-
* @param {string} tasksContent
|
|
501
|
-
* @param {string} planContent
|
|
502
|
-
* @returns {string[]}
|
|
503
|
-
*/
|
|
504
|
-
function diagnoseNoTaskRegistry(tasksContent, planContent) {
|
|
505
|
-
const diags = []
|
|
506
|
-
const tc = String(tasksContent || '')
|
|
507
|
-
const pc = String(planContent || '')
|
|
508
|
-
const hasTaskCheckboxInTasks = /^[-*]\s*\[[ xX]\]\s*task-\d+/im.test(tc)
|
|
509
|
-
const hasQlLines = /^[-*]\s*\[[ xX]\]\s*ql-/im.test(tc)
|
|
510
|
-
const hasLegacyInPlan = /^[-*]\s*\[[ xX]\]\s*task-\d+\b[::]/im.test(pc)
|
|
511
|
-
const hasWaveHeading = /^#+\s*Wave\s+\d+/im.test(pc)
|
|
512
|
-
const hasRefLine = /^[-*]\s+task-\d+\s*$/im.test(pc)
|
|
513
|
-
|
|
514
|
-
if (hasLegacyInPlan) {
|
|
515
|
-
diags.push('任务 checkbox 还在 plan.md(旧格式):请移入 tasks.md(行格式 "- [ ] task-XX: 一句话任务名",[model:xxx]/(depends_on: …) 标注随行),plan.md Wave 段改为 "- task-XX" 纯 ID 引用行')
|
|
516
|
-
} else if (!tc.trim()) {
|
|
517
|
-
diags.push('tasks.md 内容为空或缺失:plan 阶段应把展开后的任务清单写回 tasks.md(brainstorm 骨架只是名字级占位)')
|
|
518
|
-
} else if (!hasTaskCheckboxInTasks && hasQlLines) {
|
|
519
|
-
diags.push('tasks.md 只有 ql-xxx 行(quick 挂载条目),没有 task-XX 任务行——完整流程变更的任务清单尚未写入')
|
|
520
|
-
} else if (!hasTaskCheckboxInTasks) {
|
|
521
|
-
diags.push('tasks.md 无 "- [ ] task-XX:" 格式的任务行:检查行首格式(- 空格 [ ] 空格 task-XX: 英文冒号)')
|
|
522
|
-
}
|
|
523
|
-
if (hasTaskCheckboxInTasks && hasWaveHeading && !hasRefLine) {
|
|
524
|
-
diags.push('plan.md 有 Wave 段但没有 "- task-XX" 引用行:新契约 Wave 段只收纯 ID 引用行(如 "- task-01"),未引用的任务不进 execute')
|
|
525
|
-
}
|
|
526
|
-
return diags
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* 从 plan 解析 Wave 分组(新契约:Wave 段下纯 ID 引用行 `- task-XX`,任务详情在 tasks.md 注册表)。
|
|
531
|
-
* @param {string} planContent
|
|
532
|
-
* @param {Array<object>} registry - parseTaskRegistry 产物(id → 任务详情富化源)
|
|
533
|
-
*/
|
|
534
|
-
function parseWavesFromPlan(planContent, registry = []) {
|
|
535
|
-
const waves = []
|
|
536
|
-
const regById = new Map(registry.map(t => [t.id, t]))
|
|
537
|
-
let currentWave = null
|
|
538
|
-
// Wave 标题正则(坑 wave-heading-undercount,2026-08-21 实证:plan 6 个 Wave 只解析出 5 个,
|
|
539
|
-
// 末 Wave 任务静默落入「运行测试」验收步靠批量完成兜住)。空格可选("Wave6"/"Wave 6")、
|
|
540
|
-
// 编号后缀任意("## Wave 6(测试)")——解析侧宁可多收(字母后缀重复编号的硬拦仍在
|
|
541
|
-
// validatePlanForExecute),不可静默丢。
|
|
542
|
-
const WAVE_HEADING_RE = /^#+\s*Wave\s*(\d+)/i
|
|
543
|
-
|
|
544
|
-
for (const line of String(planContent || '').split('\n')) {
|
|
545
|
-
const waveMatch = line.match(WAVE_HEADING_RE)
|
|
546
|
-
if (waveMatch) {
|
|
547
|
-
currentWave = { index: parseInt(waveMatch[1]), tasks: [] }
|
|
548
|
-
waves.push(currentWave)
|
|
549
|
-
continue
|
|
550
|
-
}
|
|
551
|
-
// 任何非 Wave 的标题行退出当前 Wave 段(「## 自检」段的行不收,与旧解析同守卫)
|
|
552
|
-
if (/^#{1,6}\s+/.test(line)) { currentWave = null; continue }
|
|
553
|
-
const refMatch = line.match(/^[-*]\s+task-(\d+)\s*$/i)
|
|
554
|
-
if (refMatch && currentWave) {
|
|
555
|
-
const id = `task-${refMatch[1].padStart(2, '0')}`
|
|
556
|
-
const reg = regById.get(id)
|
|
557
|
-
currentWave.tasks.push(reg
|
|
558
|
-
? { ...reg }
|
|
559
|
-
: { index: parseInt(refMatch[1], 10), id, name: '', done: false, model: null, dependsOn: [], file: '', steps: '', reference: '', dangling: true })
|
|
560
|
-
}
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
// wave-like 漂移告警(坑 wave-heading-undercount 运行时防线):比解析正则更宽的「像 Wave
|
|
564
|
-
// 标题」形态(波次/W+数字等)若未被收容,说明该 Wave 段的任务会被静默漏进后续步骤——
|
|
565
|
-
// execute 启动即 warn(agent 当场修 plan),而非收尾才发现步骤表缺 Wave。
|
|
566
|
-
try {
|
|
567
|
-
const likeRe = /^#{1,6}\s*(?:wave|w|波次)\s*\d+/i
|
|
568
|
-
const likeHeadings = String(planContent || '').split('\n')
|
|
569
|
-
.map(l => l.replace(/\r$/, ''))
|
|
570
|
-
.filter(l => likeRe.test(l) && !WAVE_HEADING_RE.test(l))
|
|
571
|
-
if (likeHeadings.length > 0) {
|
|
572
|
-
console.warn(`⚠️ plan 存在 ${likeHeadings.length} 个「疑似 Wave 标题但未被识别」的行(其任务会漏进后续步骤):`)
|
|
573
|
-
for (const h of likeHeadings.slice(0, 5)) console.warn(` ${h.trim().slice(0, 60)}(须字面 "## Wave N" 格式)`)
|
|
574
|
-
}
|
|
575
|
-
} catch { /* 告警失败不阻断解析 */ }
|
|
576
|
-
|
|
577
|
-
// 无显式 Wave 结构但注册表非空(light 级:任务全在 tasks.md、plan.md 只留策略)→
|
|
578
|
-
// 合成单隐式 Wave 收容全部任务(与旧 light `## Tasks` 隐式收容语义对齐,单 Wave 串行执行)
|
|
579
|
-
if (waves.length === 0 && registry.length > 0) {
|
|
580
|
-
waves.push({ index: 1, implicit: true, tasks: registry.map(t => ({ ...t })) })
|
|
581
|
-
}
|
|
582
|
-
return waves
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/**
|
|
586
|
-
* 同步判定派发后端模式(不发网络,零回归关键)— task-07
|
|
587
|
-
*
|
|
588
|
-
* stub 下 isPathASupported()=false → 有配置也只 local-fallback(加提示),不注入完整 SillyHub 指令。
|
|
589
|
-
* 现有测试套件不设 SILLYHUB_MCP_URL/TOKEN 且无 local.yaml mcp 段 → readMcpConfig 返回 null → 默认 'local' → buildWavePrompt 不注入派发段,
|
|
590
|
-
* 输出与改前字节一致(零回归,D-005)。
|
|
591
|
-
*
|
|
592
|
-
* @returns {'local' | 'local-fallback' | 'sillyhub'}
|
|
593
|
-
* - local:无 MCP 配置(零回归,与现状一致)
|
|
594
|
-
* - local-fallback:有配置但路径A 未落地(isPathASupported()=false),派发仍走 Local + 短提示
|
|
595
|
-
* - sillyhub:有配置且路径A 落地(isPathASupported()=true),注入完整 SillyHub 派发指令
|
|
596
|
-
*/
|
|
597
|
-
export function getDispatchMode() {
|
|
598
|
-
const hasConfig = !!readMcpConfig(process.cwd())
|
|
599
|
-
if (!hasConfig) return 'local'
|
|
600
|
-
return isPathASupported() ? 'sillyhub' : 'local-fallback'
|
|
601
|
-
}
|
|
602
|
-
|
|
603
|
-
/**
|
|
604
|
-
* 解析 task 卡的 repo 归属(W3 task-08,D-012)。
|
|
605
|
-
* 读 changeDir/tasks/task-<num>.md 的 frontmatter `repo:` 字段;缺省/无卡/'main' → 'main'。
|
|
606
|
-
* 单仓 change(无 repo: 字段)恒返 'main',零回归。
|
|
607
|
-
*
|
|
608
|
-
* @param {{ index?: number, name?: string }} task - wave.tasks 元素
|
|
609
|
-
* @param {string|null} changeDir - change 目录绝对路径
|
|
610
|
-
* @returns {string} repoKey,'main' 或 parseRepo 返回值
|
|
611
|
-
*/
|
|
612
|
-
function resolveTaskRepo(task, changeDir) {
|
|
613
|
-
if (!changeDir || !task || task.index == null) return 'main'
|
|
614
|
-
const num = String(task.index).padStart(2, '0')
|
|
615
|
-
const taskFile = path.join(changeDir, 'tasks', `task-${num}.md`)
|
|
616
|
-
if (!existsSync(taskFile)) return 'main'
|
|
617
|
-
try {
|
|
618
|
-
const content = readFileSync(taskFile, 'utf8')
|
|
619
|
-
const repo = parseRepo(content)
|
|
620
|
-
return repo || 'main'
|
|
621
|
-
} catch {
|
|
622
|
-
return 'main'
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
/**
|
|
627
|
-
* 把 commit 锡点(base_commit/head_commit)写入 task 卡 frontmatter(W3 task-08,D-010;
|
|
628
|
-
* head 侧 2026-08-21 审计项③ 补对称)。
|
|
629
|
-
*
|
|
630
|
-
* 策略:幂等写——frontmatter 有该字段行则就地替换,无则按 D-010 协议顺序插入:
|
|
631
|
-
* head_commit 跟在 base_commit 行后;base_commit 跟在 repo 行后;均无则插 frontmatter
|
|
632
|
-
* 首部。仅改 frontmatter 不动正文。已存在相同值不重复写。
|
|
633
|
-
*
|
|
634
|
-
* @param {string} taskFilePath - task-NN.md 绝对路径
|
|
635
|
-
* @param {'base_commit'|'head_commit'} field - 锚点字段名
|
|
636
|
-
* @param {string} commit - commit sha
|
|
637
|
-
* @returns {boolean} 是否实际写入(false = 文件不存在 / 写失败 / 值未变)
|
|
638
|
-
*/
|
|
639
|
-
export function writeCommitAnchorToTaskCard(taskFilePath, field, commit) {
|
|
640
|
-
if (!taskFilePath || !commit || (field !== 'base_commit' && field !== 'head_commit')) return false
|
|
641
|
-
if (!existsSync(taskFilePath)) return false
|
|
642
|
-
let content
|
|
643
|
-
try {
|
|
644
|
-
content = readFileSync(taskFilePath, 'utf8')
|
|
645
|
-
} catch {
|
|
646
|
-
return false
|
|
647
|
-
}
|
|
648
|
-
// CRLF 归一(坑 base-commit-crlf-frontmatter,plan-postcheck.js 同款):跨仓 task 卡被
|
|
649
|
-
// 编辑器/子代理写成 CRLF 后 `^---\n` 匹配失败 → 锚点静默不落盘,而 Wave
|
|
650
|
-
// prompt 仍声称「CLI 已落盘」。归一后按 LF 写回(taskcard 生成侧本就强制 LF)。
|
|
651
|
-
content = content.replace(/\r\n?/g, '\n')
|
|
652
|
-
const fmMatch = content.match(/^---\n([\s\S]*?)\n---/)
|
|
653
|
-
if (!fmMatch) return false
|
|
654
|
-
const fm = fmMatch[1]
|
|
655
|
-
const lineRe = new RegExp(`^${field}:\\s.*$`, 'm')
|
|
656
|
-
let newFm
|
|
657
|
-
if (lineRe.test(fm)) {
|
|
658
|
-
const existing = (fm.match(lineRe) || [''])[0]
|
|
659
|
-
if (existing === `${field}: ${commit}`) return false // 值未变,幂等跳过
|
|
660
|
-
newFm = fm.replace(lineRe, `${field}: ${commit}`)
|
|
661
|
-
} else {
|
|
662
|
-
// 插入锚点(D-010 协议顺序 repo→base_commit→head_commit):head 跟 base 后,
|
|
663
|
-
// base 跟 repo 后,都无则 frontmatter 首字段
|
|
664
|
-
const anchor = `${field}: ${commit}`
|
|
665
|
-
const prevField = field === 'head_commit' ? 'base_commit' : 'repo'
|
|
666
|
-
const prevRe = new RegExp(`^${prevField}:\\s.*$`, 'm')
|
|
667
|
-
if (prevRe.test(fm)) {
|
|
668
|
-
newFm = fm.replace(prevRe, m => m + '\n' + anchor)
|
|
669
|
-
} else {
|
|
670
|
-
newFm = anchor + '\n' + fm
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
const newContent = content.replace(/^---\n[\s\S]*?\n---/, `---\n${newFm}\n---`)
|
|
674
|
-
if (newContent === content) return false
|
|
675
|
-
try {
|
|
676
|
-
writeFileSync(taskFilePath, newContent)
|
|
677
|
-
return true
|
|
678
|
-
} catch {
|
|
679
|
-
return false
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
function writeBaseCommitToTaskCard(taskFilePath, baseCommit) {
|
|
684
|
-
return writeCommitAnchorToTaskCard(taskFilePath, 'base_commit', baseCommit)
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
/**
|
|
688
|
-
* 跨仓 task head_commit 锡点自动落盘(2026-08-21 agent-手工产出审计项③,D-010 补对称)。
|
|
689
|
-
*
|
|
690
|
-
* base_commit 已在派发时 CLI 落盘,head_commit 此前靠主 agent 按 Wave prompt 指引手跑
|
|
691
|
-
* `rev-parse` 手写(漏抄/抄错直接炸 Task Review Gate 真实性校验)。本函数在 execute
|
|
692
|
-
* --done 时机补齐另一半:扫描 task 卡,跨仓 task(repo≠main)缺 head_commit 的,实时
|
|
693
|
-
* `git -C <跨仓仓根> rev-parse HEAD` 幂等写入(**已存在不覆盖**——agent 手写的精确锚点优先)。
|
|
694
|
-
*
|
|
695
|
-
* best-effort:MultiRepoContext 构造失败 / git 不可达 → 跳过该 task 记 reason,绝不抛。
|
|
696
|
-
*
|
|
697
|
-
* @param {{ changeName: string, cwd: string, specBase?: string, platformOpts?: object }} opts
|
|
698
|
-
* @returns {Promise<{ stamped: number, stampedTasks: string[], skipped: number, reasons: string[] }>}
|
|
699
|
-
*/
|
|
700
|
-
export async function stampCrossRepoHeadCommits({ changeName, cwd, specBase, platformOpts = {} }) {
|
|
701
|
-
const base = specBase || platformOpts.specRoot || path.join(cwd, '.sillyspec')
|
|
702
|
-
const reasons = []
|
|
703
|
-
const stampedTasks = []
|
|
704
|
-
if (!changeName) {
|
|
705
|
-
return { stamped: 0, stampedTasks, skipped: 0, reasons: ['无 changeName'] }
|
|
706
|
-
}
|
|
707
|
-
const tasksDir = path.join(base, 'changes', changeName, 'tasks')
|
|
708
|
-
if (!existsSync(tasksDir)) {
|
|
709
|
-
return { stamped: 0, stampedTasks, skipped: 0, reasons: ['无 tasks/ 目录(单 task 变更,无跨仓锡点)'] }
|
|
710
|
-
}
|
|
711
|
-
let ctx = null
|
|
712
|
-
try {
|
|
713
|
-
const { getOrCreateMultiRepoContext } = await import('../run/shared.js')
|
|
714
|
-
ctx = await getOrCreateMultiRepoContext({ cwd, changeName, platformOpts })
|
|
715
|
-
} catch (e) {
|
|
716
|
-
return { stamped: 0, stampedTasks, skipped: 0, reasons: [`MultiRepoContext 构造失败: ${e.message}`] }
|
|
717
|
-
}
|
|
718
|
-
let stamped = 0
|
|
719
|
-
let skipped = 0
|
|
720
|
-
for (const f of readdirSync(tasksDir).filter(n => /^task-\d+\.md$/.test(n)).sort()) {
|
|
721
|
-
const taskFile = path.join(tasksDir, f)
|
|
722
|
-
let content
|
|
723
|
-
try {
|
|
724
|
-
content = readFileSync(taskFile, 'utf8')
|
|
725
|
-
} catch {
|
|
726
|
-
skipped++
|
|
727
|
-
continue
|
|
728
|
-
}
|
|
729
|
-
if (/^head_commit:/m.test(content)) continue // 已有(手写或前次落盘)不覆盖
|
|
730
|
-
const repoKey = parseRepo(content)
|
|
731
|
-
if (!repoKey || repoKey === 'main') continue // 主仓 task 锚 meta,无 head_commit 字段
|
|
732
|
-
const entry = ctx && ctx.resolve ? ctx.resolve(repoKey) : null
|
|
733
|
-
if (!entry || !entry.gitDir) {
|
|
734
|
-
skipped++
|
|
735
|
-
reasons.push(`${f}: repo "${repoKey}" 无法解析 gitDir(local.yaml repos 未注册?)`)
|
|
736
|
-
continue
|
|
737
|
-
}
|
|
738
|
-
const head = gitQuiet(entry.gitDir, ['rev-parse', 'HEAD'])
|
|
739
|
-
if (!head) {
|
|
740
|
-
skipped++
|
|
741
|
-
reasons.push(`${f}: git rev-parse HEAD 失败(${entry.gitDir})`)
|
|
742
|
-
continue
|
|
743
|
-
}
|
|
744
|
-
if (writeCommitAnchorToTaskCard(taskFile, 'head_commit', head)) {
|
|
745
|
-
stamped++
|
|
746
|
-
stampedTasks.push(f.replace(/\.md$/, ''))
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
return { stamped, stampedTasks, skipped, reasons }
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* 为 Wave 生成 prompt(强制子代理执行)
|
|
754
|
-
*
|
|
755
|
-
* W3 task-08(D-012 per-task workdir):签名加可选 `ctx`(MultiRepoContext)参数。
|
|
756
|
-
* - 无 ctx(单仓 change / 旧调用方)→ 退化为单 worktreePath 单值 worktreeSection(零回归)
|
|
757
|
-
* - 有 ctx → 按 task 逐个解析 repo 归属,构造 per-task workdir 多值表,跨仓 task 派发前
|
|
758
|
-
* 落 base_commit 锡点(D-010),注入跨仓 task commit 指引 + head_commit 落盘指引。
|
|
759
|
-
* 同 Wave 允许主仓+跨仓 task 混合(各独立 Task 调用各传 workdir,不强制同 Wave 同 repo)。
|
|
760
|
-
*/
|
|
761
|
-
export function buildWavePrompt(wave, waveIndex, changeDir, worktreePath, options = {}) {
|
|
762
|
-
const ctx = options.ctx || null
|
|
763
|
-
// ── Contract Matrix:检查是否有 provider/consumer 契约需要注入 ──
|
|
764
|
-
let contractInjection = ''
|
|
765
|
-
let prototypeInjection = ''
|
|
766
|
-
if (changeDir) {
|
|
767
|
-
try {
|
|
768
|
-
const planFile = path.join(changeDir, 'plan.md')
|
|
769
|
-
if (existsSync(planFile)) {
|
|
770
|
-
const planContent = readFileSync(planFile, 'utf8')
|
|
771
|
-
// 收集本 wave 所有 task(端点注入与字段注入共用)
|
|
772
|
-
const waveTasks = wave.tasks.map((t, ti) => {
|
|
773
|
-
const num = String(t.index || (ti + 1)).padStart(2, '0')
|
|
774
|
-
return `task-${num}`
|
|
775
|
-
})
|
|
776
|
-
|
|
777
|
-
// 1) 端点级契约(provider/consumer via buildContractMatrix)
|
|
778
|
-
const contracts = buildContractMatrix(planContent, changeDir)
|
|
779
|
-
const relevantContracts = contracts.filter(c => waveTasks.includes(c.consumer))
|
|
780
|
-
if (relevantContracts.length > 0) {
|
|
781
|
-
contractInjection = `
|
|
782
|
-
### API Contract Matrix
|
|
783
|
-
本 Wave 存在前端/后端跨 task 契约:
|
|
784
|
-
${relevantContracts.map(c => `- **${c.consumer}** 消费 **${c.provider}** 产出的 API`).join('\n')}
|
|
785
|
-
`
|
|
786
|
-
for (const taskName of waveTasks) {
|
|
787
|
-
const injection = buildConsumerInjection(changeDir, path.join(changeDir, '..', '..'), taskName, contracts)
|
|
788
|
-
if (injection) {
|
|
789
|
-
contractInjection += `
|
|
790
|
-
### 子代理 ${taskName} 的端点契约注入
|
|
791
|
-
为 ${taskName} 启动子代理时,在子代理 prompt 末尾追加以下内容:
|
|
792
|
-
|
|
793
|
-
<contract-injection>
|
|
794
|
-
${injection}
|
|
795
|
-
</contract-injection>
|
|
796
|
-
`
|
|
797
|
-
}
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
// 2) 字段级契约(expects_from ↔ provides)
|
|
802
|
-
// 命中「provider 漏字段、consumer fallback 编造 → 运行时 403/500」这类 bug:
|
|
803
|
-
// 把 consumer 期望字段 vs provider 承诺字段显式注入子代理 prompt
|
|
804
|
-
for (const taskName of waveTasks) {
|
|
805
|
-
const fi = buildContractFieldInjection(changeDir, taskName)
|
|
806
|
-
if (fi) {
|
|
807
|
-
contractInjection += `
|
|
808
|
-
### 子代理 ${taskName} 的字段契约注入
|
|
809
|
-
为 ${taskName} 启动子代理时,在子代理 prompt 末尾追加以下内容:
|
|
810
|
-
|
|
811
|
-
<contract-field-injection>
|
|
812
|
-
${fi}
|
|
813
|
-
</contract-field-injection>
|
|
814
|
-
`
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
} catch (e) {
|
|
819
|
-
// 契约注入是 best-effort:失败不阻断 execute,只记录
|
|
820
|
-
console.warn(` ⚠️ 契约注入跳过: ${e?.message || e}`)
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
// 原型引用注入:brainstorm 阶段的 HTML 原型(确认过的布局/组件/交互),
|
|
824
|
-
// 让 execute 实现前端/UI task 时参考原型,而非凭 design 文字重新发明(避免原型浪费)。
|
|
825
|
-
try {
|
|
826
|
-
const prototypes = readdirSync(changeDir).filter(f => /^prototype-.*\.html$/i.test(f))
|
|
827
|
-
if (prototypes.length > 0) {
|
|
828
|
-
const protoRelDir = `.sillyspec/changes/${path.basename(changeDir)}`
|
|
829
|
-
prototypeInjection = `
|
|
830
|
-
### 📐 原型参考(brainstorm 可视化确认)
|
|
831
|
-
本次变更有 HTML 原型(brainstorm 阶段确认过的视觉/交互),实现前端/UI 相关 task 时参考:
|
|
832
|
-
${prototypes.map(p => `- \`${path.join(protoRelDir, p)}\``).join('\n')}
|
|
833
|
-
|
|
834
|
-
照原型的布局/组件/交互实现,不要凭 design.md 文字重新发明。纯后端/无 UI 的 task 忽略本节。
|
|
835
|
-
`
|
|
836
|
-
}
|
|
837
|
-
} catch {}
|
|
838
|
-
}
|
|
839
|
-
|
|
840
|
-
// ── 模块卡分级(P0a):本 Wave per-task 最优卡表,细卡优先——治「根层大卡被每个子代理
|
|
841
|
-
// 整读」(multi-agent-platform backend.md 58KB 实测单卡一项 20 万+ tokens/全流程)。
|
|
842
|
-
// best-effort:解析失败/无 map 不注入(零回归),可经 `sillyspec modules resolve` 手查。
|
|
843
|
-
let moduleSection = ''
|
|
844
|
-
try {
|
|
845
|
-
if (changeDir) {
|
|
846
|
-
const specBase = path.dirname(path.dirname(changeDir))
|
|
847
|
-
// repo root 推导:默认 spec 布局(<repo>/.sillyspec/changes/<change>)从 specBase 反推,
|
|
848
|
-
// 平台模式(specRoot 异位)回退 process.cwd()——子项目目录前缀判定用,误差只降级匹配粒度
|
|
849
|
-
const repoRoot = path.basename(specBase) === '.sillyspec' ? path.dirname(specBase) : process.cwd()
|
|
850
|
-
const waveTaskIds = new Set(wave.tasks.map((t, ti) => `task-${String(t.index || (ti + 1)).padStart(2, '0')}`))
|
|
851
|
-
const { hasMaps, rows } = resolveChangeModuleCards({
|
|
852
|
-
cwd: repoRoot,
|
|
853
|
-
specBase,
|
|
854
|
-
changeName: path.basename(changeDir),
|
|
855
|
-
})
|
|
856
|
-
const hits = rows.filter(r => waveTaskIds.has(r.taskId) && r.moduleId)
|
|
857
|
-
if (hasMaps && hits.length > 0) {
|
|
858
|
-
const kb = n => (n > 0 ? `${(n / 1024).toFixed(1)}KB` : '?')
|
|
859
|
-
const cardLines = hits.map(r =>
|
|
860
|
-
`- ${r.taskId} → \`${r.cardPath}\`(${r.moduleId},${r.granularity === 'fine' ? '细卡' : '粗卡'} ${kb(r.cardBytes)}:${r.advice})`
|
|
861
|
-
).join('\n')
|
|
862
|
-
moduleSection = `
|
|
863
|
-
### 模块卡分级(本 Wave 子代理按表引用,勿按目录漫游 / 整读根层大卡)
|
|
864
|
-
|
|
865
|
-
${cardLines}
|
|
866
|
-
|
|
867
|
-
细粒度卡整卡读;粗粒度大卡只读「契约摘要/注意事项/定位」节(跳过变更索引/人工备注历史段)。为子代理写 prompt 时把对应卡路径直接写入。
|
|
868
|
-
`
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
} catch { /* 模块卡分级是 best-effort:失败不注入不阻断 */ }
|
|
872
|
-
|
|
873
|
-
// ── design.md 热区(P1a):Wave 前置只需「非目标/兼容策略」两节,CLI 提取直供——免每
|
|
874
|
-
// Wave 整读全文(28KB 级 design × 8 Wave 重复读)。无 design.md / 无对应节 → 不注入零回归。
|
|
875
|
-
let designHotzone = ''
|
|
876
|
-
let hasDesignHotzone = false
|
|
877
|
-
try {
|
|
878
|
-
if (changeDir) {
|
|
879
|
-
const designPath = path.join(changeDir, 'design.md')
|
|
880
|
-
if (existsSync(designPath)) {
|
|
881
|
-
const SECTION_CHAR_LIMIT = 2400
|
|
882
|
-
const dLines = readFileSync(designPath, 'utf8').replace(/\r\n/g, '\n').split('\n')
|
|
883
|
-
const sections = []
|
|
884
|
-
let cur = null
|
|
885
|
-
dLines.forEach((l, i) => {
|
|
886
|
-
const m = l.match(/^##\s+(.+)$/)
|
|
887
|
-
if (m) {
|
|
888
|
-
if (cur) cur.end = i
|
|
889
|
-
cur = { title: m[1].trim(), start: i, end: dLines.length }
|
|
890
|
-
sections.push(cur)
|
|
891
|
-
}
|
|
892
|
-
})
|
|
893
|
-
const grab = kwRe => {
|
|
894
|
-
const s = sections.find(s => kwRe.test(s.title))
|
|
895
|
-
if (!s) return null
|
|
896
|
-
const body = dLines.slice(s.start + 1, s.end).join('\n').trim()
|
|
897
|
-
if (!body) return null
|
|
898
|
-
return { title: s.title, body: body.length > SECTION_CHAR_LIMIT ? body.slice(0, SECTION_CHAR_LIMIT) + '\n…(超长截断,原文见 design.md)' : body }
|
|
899
|
-
}
|
|
900
|
-
const nonGoals = grab(/非目标/)
|
|
901
|
-
const compat = grab(/兼容/)
|
|
902
|
-
if (nonGoals || compat) {
|
|
903
|
-
hasDesignHotzone = true
|
|
904
|
-
const fmt = s => (s ? `#### ${s.title}\n${s.body}\n` : '')
|
|
905
|
-
const indexLines = sections.map(s => `- L${s.start + 1} ## ${s.title}`).join('\n')
|
|
906
|
-
designHotzone = `
|
|
907
|
-
### design.md 热区(CLI 提取——Wave 前置只读这两节,勿整读全文)
|
|
908
|
-
|
|
909
|
-
${fmt(nonGoals)}${fmt(compat)}
|
|
910
|
-
### design.md 章节行号索引(需要其余章节时按行号精准读,Read offset/limit)
|
|
911
|
-
|
|
912
|
-
${indexLines}
|
|
913
|
-
`
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
} catch { /* 热区提取 best-effort:失败不注入 */ }
|
|
918
|
-
|
|
919
|
-
// ── 决策锚点触碰事实(W-A 主渲染点,D-003):changedFiles 口径与 run/prompt.js {DOCS_DEBT}
|
|
920
|
-
// 现算同源——collectExecuteChangedFiles(porcelain 未提交 ∪ baseline..HEAD)唯一实现,勿双写。
|
|
921
|
-
// 单过流程前缀第 4 步渲染 {DOCS_DEBT} 时 changedFiles 恒空,Wave 步(重入/续跑时已含前置
|
|
922
|
-
// Wave 已提交变更)才是触碰事实的主呈现时机。advisory:无触碰 section=''(模板字节不变,
|
|
923
|
-
// 零输出零阻断);≤5 条截断(R-05)。best-effort:失败不注入不阻断。
|
|
924
|
-
let decisionTouchSection = ''
|
|
925
|
-
try {
|
|
926
|
-
if (changeDir) {
|
|
927
|
-
const dtSpecBase = path.dirname(path.dirname(changeDir))
|
|
928
|
-
const { changedFiles } = collectExecuteChangedFiles({
|
|
929
|
-
specBase: dtSpecBase,
|
|
930
|
-
changeName: path.basename(changeDir),
|
|
931
|
-
cwd: options.cwd || process.cwd(),
|
|
932
|
-
})
|
|
933
|
-
const dtFacts = renderDecisionTouchFacts(computeDecisionTouches(changedFiles, path.join(dtSpecBase, 'knowledge')).touches)
|
|
934
|
-
if (dtFacts) {
|
|
935
|
-
decisionTouchSection = `\n### 决策锚点触碰(CLI 算,advisory——改到锚定文件时复核对应决策)\n\n${dtFacts}\n`
|
|
936
|
-
}
|
|
937
|
-
}
|
|
938
|
-
} catch { /* 触碰事实 best-effort:失败不注入不阻断 */ }
|
|
939
|
-
|
|
940
|
-
// 子代理要点 4 / Wave 开始前第 1 条:模块表 / 热区存在时换成「按注入内容执行」版文案,
|
|
941
|
-
// 否则保留原文(零回归——无 map / 无 design 的项目 prompt 不变)
|
|
942
|
-
const moduleDocPoint = moduleSection
|
|
943
|
-
? '4. **模块卡分级**:把上方「模块卡分级」表中该 task 命中的卡路径写进子代理 prompt(细卡整读;粗大卡只读「契约摘要/注意事项/定位」节)——勿让子代理按目录漫游或整读根层大卡'
|
|
944
|
-
: '4. 如存在模块文档({SPEC_ROOT}/docs/*/modules/),按需读取涉及模块的 <module>.md 参考接口约定和数据流——读主仓路径(CLI 已替换为绝对路径),不要读 worktree 副本'
|
|
945
|
-
const waveStartItem1 = hasDesignHotzone
|
|
946
|
-
? '1. 「非目标」「兼容策略」两节已由 CLI 提取附在上方「design.md 热区」——**不要再整读 design.md**;需要其余章节时按热区下方行号索引精准读取(Read offset/limit)。确保子代理不超范围、不破坏旧逻辑'
|
|
947
|
-
: '1. 读取 design.md 的「非目标」与「兼容策略」章节(如存在),确保子代理不超范围、不破坏旧逻辑'
|
|
948
|
-
|
|
949
|
-
// 构建任务摘要(不再内联完整蓝图,减少上下文污染)。
|
|
950
|
-
// 任务卡路径用 {SPEC_ROOT} 占位符(坑 worktree-spec-artifact-misplace):子代理 cwd=worktree 时
|
|
951
|
-
// 相对路径会解析到 worktree 的 .sillyspec 副本;占位符经 CLI 替换为主仓绝对路径。
|
|
952
|
-
const taskSummary = wave.tasks.map((t, ti) => {
|
|
953
|
-
const taskNum = String(t.index || (ti + 1)).padStart(2, '0')
|
|
954
|
-
const taskRelPath = changeDir
|
|
955
|
-
? `{SPEC_ROOT}/changes/${path.basename(changeDir)}/tasks/task-${taskNum}.md`
|
|
956
|
-
: `task-${taskNum}.md`
|
|
957
|
-
const fileInfo = t.file ? ` (${t.file})` : ''
|
|
958
|
-
return `task-${taskNum}: ${t.name}${fileInfo} → ${taskRelPath}`
|
|
959
|
-
}).join('\n')
|
|
960
|
-
|
|
961
|
-
const taskList = wave.tasks.map((t, ti) => {
|
|
962
|
-
const taskNum = String(t.index || (ti + 1)).padStart(2, '0')
|
|
963
|
-
let s = `- [ ] ${t.name}`
|
|
964
|
-
if (t.file) s += ` (${t.file})`
|
|
965
|
-
return s
|
|
966
|
-
}).join('\n')
|
|
967
|
-
|
|
968
|
-
// ── per-task workdir 解析(W3 task-08,D-012)──
|
|
969
|
-
// 无 ctx(单仓 change)→ 全 task workdir=主仓 worktreePath,沿用旧单值逻辑(零回归)。
|
|
970
|
-
// 有 ctx → 按 task 卡 repo: 字段逐个解析:主仓 task workdir=主仓 worktreePath,跨仓 task
|
|
971
|
-
// workdir=ctx.resolve(repo).worktreePath(跨仓仓根)。同 Wave 允许主仓+跨仓混合。
|
|
972
|
-
const taskRepos = wave.tasks.map(t => ctx ? resolveTaskRepo(t, changeDir) : 'main')
|
|
973
|
-
const hasCrossRepoWave = ctx ? taskRepos.some(r => r !== 'main') : false
|
|
974
|
-
|
|
975
|
-
// per-task workdir 映射(用于多值 worktreeSection + 跨仓 commit 指引)
|
|
976
|
-
// 无 ctx 或无跨仓 task → 不构造(沿用旧单值 worktreePath 注入)
|
|
977
|
-
let perTaskWorkdirs = null
|
|
978
|
-
let crossRepoCommitSection = ''
|
|
979
|
-
let baseCommitWrites = [] // [{ taskNum, repo, taskFile, written }] 跨仓 task base 锡点落盘记录
|
|
980
|
-
if (ctx && hasCrossRepoWave) {
|
|
981
|
-
perTaskWorkdirs = wave.tasks.map((t, ti) => {
|
|
982
|
-
const taskNum = String(t.index || (ti + 1)).padStart(2, '0')
|
|
983
|
-
const repo = taskRepos[ti]
|
|
984
|
-
const entry = ctx.resolve(repo)
|
|
985
|
-
const workdir = entry ? entry.worktreePath : (worktreePath || '')
|
|
986
|
-
return { taskNum, repo, workdir }
|
|
987
|
-
})
|
|
988
|
-
|
|
989
|
-
// D-010 跨仓 task base 锡点:派发前实时 git rev-parse HEAD 落 task 卡 base_commit
|
|
990
|
-
// 仅对跨仓 task(repo≠'main')落盘,主仓 task 锚 meta.baseHash(MultiRepoContext 已处理)
|
|
991
|
-
for (const item of perTaskWorkdirs) {
|
|
992
|
-
if (item.repo === 'main') continue
|
|
993
|
-
const entry = ctx.resolve(item.repo)
|
|
994
|
-
if (!entry) continue
|
|
995
|
-
const baseCommit = gitQuiet(entry.gitDir, ['rev-parse', 'HEAD'])
|
|
996
|
-
if (!baseCommit) continue // git 不可达已由 MultiRepoContext 构造时 fail-closed 拦截,此处置防御
|
|
997
|
-
const taskFile = changeDir
|
|
998
|
-
? path.join(changeDir, 'tasks', `task-${item.taskNum}.md`)
|
|
999
|
-
: null
|
|
1000
|
-
const written = taskFile ? writeBaseCommitToTaskCard(taskFile, baseCommit) : false
|
|
1001
|
-
baseCommitWrites.push({ taskNum: item.taskNum, repo: item.repo, taskFile, written, baseCommit })
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
// 跨仓 task commit 指引 + head_commit 落盘指引(D-010 回收时机)
|
|
1005
|
-
const crossLines = perTaskWorkdirs
|
|
1006
|
-
.filter(i => i.repo !== 'main')
|
|
1007
|
-
.map(i => `- task-${i.taskNum} → repo \`${i.repo}\`,workdir=\`${i.workdir}\``)
|
|
1008
|
-
.join('\n')
|
|
1009
|
-
crossRepoCommitSection = `
|
|
1010
|
-
### 跨仓 task 派发与双锡点
|
|
1011
|
-
|
|
1012
|
-
本 Wave 含跨仓 task(直接改跨仓仓主干,**不经主仓 worktree**):
|
|
1013
|
-
|
|
1014
|
-
${crossLines}
|
|
1015
|
-
|
|
1016
|
-
**派发跨仓 task 前(base 锡点,CLI 已在 prompt 构造时落盘):**
|
|
1017
|
-
- 跨仓 task 卡 frontmatter 的 \`base_commit\` 已由 CLI 实时 \`git -C <跨仓仓根> rev-parse HEAD\` 锁定(base 锡点,约束①)。子代理在此 HEAD 上改+commit,不受同 Wave 其他 task 推进 HEAD 影响。
|
|
1018
|
-
|
|
1019
|
-
**回收跨仓 task(head 锡点,CLI 自动落盘,勿手写):**
|
|
1020
|
-
- 子代理完成 commit 后,正常写 review.json(verdict/notes)并勾选 checkbox 即可。execute \`--done\` 时 CLI 自动 \`git -C <跨仓仓根> rev-parse HEAD\` 写入该 task 卡 \`head_commit:\`(幂等,已存在不覆盖——你若手写了精确锚点则以你的为准)。
|
|
1021
|
-
- review.json 的 mechanics 字段(\`base\`/\`head\`/\`changedFiles\`)无需手算:\`base\` 取 task 卡 \`base_commit\`、\`head\` 取 task 卡 \`head_commit\`,写完跑 \`sillyspec backfill-reviews --change <变更名> --adopt\` 一键代填(verdict 保留)。
|
|
1022
|
-
|
|
1023
|
-
**跨仓 task 子代理 prompt 必须注入:**
|
|
1024
|
-
> 该 task 改的是 \`<repo>\` 仓,workdir=\`<跨仓仓根>\`。**直接在该仓主干工作区改+commit(git add + git commit 到该仓主干),不经主仓 worktree、不建分支。** commit 到该仓主干即落盘,apply 阶段对跨仓 task 为 no-op(design §5.4 G1)。
|
|
1025
|
-
`
|
|
1026
|
-
}
|
|
1027
|
-
|
|
1028
|
-
// worktreeSection:无 ctx / 无跨仓 task → 旧单值(零回归);有 ctx 含跨仓 task → per-task 多值表
|
|
1029
|
-
let worktreeSection
|
|
1030
|
-
if (ctx && hasCrossRepoWave && perTaskWorkdirs) {
|
|
1031
|
-
const workdirLines = perTaskWorkdirs.map(i =>
|
|
1032
|
-
` - task-${i.taskNum} (repo: ${i.repo}) → workdir: "${i.workdir}"`
|
|
1033
|
-
).join('\n')
|
|
1034
|
-
worktreeSection = `
|
|
1035
|
-
### 工作目录(per-task)
|
|
1036
|
-
|
|
1037
|
-
调用 Task 工具启动子代理时,**workdir 参数是强制必传的**,且本 Wave 内不同 task 的 workdir 不同(主仓 task vs 跨仓 task)。
|
|
1038
|
-
|
|
1039
|
-
**per-task workdir 表(每个子代理按其 task 对应的 workdir 启动):**
|
|
1040
|
-
|
|
1041
|
-
${workdirLines}
|
|
1042
|
-
|
|
1043
|
-
不传 workdir 或传错 workdir 会导致:主仓 task 写到跨仓仓 / 跨仓 task 写到主仓 worktree,破坏隔离与 apply 归属。
|
|
1044
|
-
|
|
1045
|
-
\`\`\`json
|
|
1046
|
-
{
|
|
1047
|
-
"subagent_type": "general",
|
|
1048
|
-
"workdir": "<按上方 per-task 表选>",
|
|
1049
|
-
"prompt": "在此编写任务描述..."
|
|
1050
|
-
}
|
|
1051
|
-
\`\`\`
|
|
1052
|
-
|
|
1053
|
-
### 注意
|
|
1054
|
-
蓝图文件(tasks.md / design.md / proposal.md / requirements.md / tasks/task-XX.md)在主工作区 {SPEC_ROOT}/changes/<change>/ 下(CLI 已替换为主仓绝对路径),它们不在跨仓仓也不在 worktree 中。读取蓝图时使用主工作区路径,不要拼接到 worktree / 跨仓仓路径下。
|
|
1055
|
-
`
|
|
1056
|
-
} else {
|
|
1057
|
-
worktreeSection = (worktreePath)
|
|
1058
|
-
? `
|
|
1059
|
-
### 工作目录
|
|
1060
|
-
|
|
1061
|
-
调用 Task 工具启动子代理时,**workdir 参数是强制必传的**。
|
|
1062
|
-
不传 workdir 会导致子代理把文件写到主工作区而非 worktree,破坏隔离。
|
|
1063
|
-
|
|
1064
|
-
\`\`\`json
|
|
1065
|
-
{
|
|
1066
|
-
"subagent_type": "general",
|
|
1067
|
-
"workdir": "${worktreePath}",
|
|
1068
|
-
"prompt": "在此编写任务描述..."
|
|
1069
|
-
}
|
|
1070
|
-
\`\`\`
|
|
1071
|
-
|
|
1072
|
-
### 注意
|
|
1073
|
-
蓝图文件(tasks.md / design.md / proposal.md / requirements.md)在主工作区 {SPEC_ROOT}/changes/<change>/ 下(CLI 已替换为主仓绝对路径),它们可能不在 worktree 中。读取蓝图时使用主工作区路径,不要拼接到 worktree 路径下;同理,spec 流程产物(module-impact.md / knowledge 条目 / 模块文档)只写主仓 {SPEC_ROOT},绝不写进 worktree 副本。
|
|
1074
|
-
`
|
|
1075
|
-
: ''
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1078
|
-
// ── 派发后端段注入(task-07,D-006 / D-007 / D-008 接入)──
|
|
1079
|
-
// 同步判定(不发网络,零回归关键):local(无 MCP 配置)→ dispatchSection='' → 本 prompt 与改前
|
|
1080
|
-
// 字节一致;sillyhub(配置 + 路径A 落地)→ 注入完整 SillyHub 派发指令(一 Wave 一 mission /
|
|
1081
|
-
// dispatch_worker / 轮询 list_workers / 超时 kill lease 防双写 / 回收 + Local 兜底);local-fallback
|
|
1082
|
-
// (配置但路径A 未落地)→ 短提示,派发仍走 Local(与默认行为一致)。worktreePath 为空时不注入
|
|
1083
|
-
// (无 worktree 无谓派发指令)。测试/调用方可经 options.dispatchMode 覆盖,避免 env 污染。
|
|
1084
|
-
const dispatchMode = options.dispatchMode || getDispatchMode()
|
|
1085
|
-
let dispatchSection = ''
|
|
1086
|
-
if (worktreePath && dispatchMode === 'sillyhub') {
|
|
1087
|
-
// 路径A 落地后:注入完整 SillyHub 派发指令(renderDispatchInstruction 已含 Local 兜底全文)
|
|
1088
|
-
const contract = {
|
|
1089
|
-
brief: '本 Wave 任务(见上方任务摘要与 tasks/task-XX.md)',
|
|
1090
|
-
worktreePath,
|
|
1091
|
-
branch: options.branch || '<未提供 branch>',
|
|
1092
|
-
allowedPaths: [],
|
|
1093
|
-
readOnly: false,
|
|
1094
|
-
runId: '{EXECUTE_RUN_ID}', // 占位符,prompt.js 注入阶段替换为真实 run id
|
|
1095
|
-
}
|
|
1096
|
-
const { instruction } = renderDispatchInstruction(contract, { available: true })
|
|
1097
|
-
dispatchSection = `\n### 派发后端:SillyHub MCP(探测可用,一 Wave 一 mission)\n\n本次 Wave 派发经 SillyHub MCP。按以下派发指令执行(含 create_mission / dispatch_worker / 轮询 list_workers / 超时 kill lease 防双写 / 回收 + Local 兜底):\n\n${instruction}\n`
|
|
1098
|
-
} else if (worktreePath && dispatchMode === 'local-fallback') {
|
|
1099
|
-
// 有 MCP 配置但路径A 未落地:加短提示,派发仍走 Local(与默认行为一致)
|
|
1100
|
-
dispatchSection = `\n### 派发后端提示:SillyHub MCP 已配置但路径A 未落地\n\n检测到 local.yaml mcp 段或 env 配置,但 SillyHub \`dispatch_worker\` 尚不支持 \`worktree_path\`(路径A 跨仓未落地)。本次派发走 Local(本机 Agent tool),与默认行为一致——上方「执行方式」与「工作目录」段适用。\n`
|
|
1101
|
-
}
|
|
1102
|
-
// dispatchMode === 'local'(无配置)或 worktreePath 为空 → dispatchSection = '' → 输出与改前字节一致(零回归)
|
|
1103
|
-
|
|
1104
|
-
return `## Wave ${waveIndex}: 执行以下任务
|
|
1105
|
-
|
|
1106
|
-
## 执行方式
|
|
1107
|
-
|
|
1108
|
-
**默认每个任务由独立子代理执行,你不要自己写代码。**
|
|
1109
|
-
|
|
1110
|
-
可选 batch(合并实现):同一 Wave 内,若一组任务同时满足以下三个条件,可把它们合并为一个 batch(最多 3 个 task),交给单个子代理串行逐个完成实现:
|
|
1111
|
-
- 组内任意两个 task 的 allowed_paths 无交集(文件正交)
|
|
1112
|
-
- 组内任意两个 task 之间无 provides / expects_from 契约链(契约 task 禁止同批——串行实现会读到半成品,契约 task 由独立子代理并行处理或落在不同 Wave)
|
|
1113
|
-
- 组大小不超过 3 个 task
|
|
1114
|
-
|
|
1115
|
-
任一条件不满足,该 task 走独立子代理(默认形态);拿不准就不合并。无论独立还是 batch,实现一律由子代理完成,你不要自己写代码。
|
|
1116
|
-
|
|
1117
|
-
你的角色是调度者 + 审查者(batch 只合并实现、不合并审查):
|
|
1118
|
-
1. 为每个任务启动一个子代理(Agent tool),或按上述三条件把多个任务合并为一个 batch 子代理,同 Wave 内可并行
|
|
1119
|
-
2. 子代理完成后审查结果——batch 子代理只做实现与自验,task 审查、review.json 产出与 checkbox 勾选仍归你(主 agent),在子代理返回后逐 task 进行;审查 batch 报告时逐 task 对照 allowed_paths 检查改动文件清单有无越权
|
|
1120
|
-
3. 勾选 tasks.md 中对应任务的 checkbox
|
|
1121
|
-
4. 记录改动文件和测试结果
|
|
1122
|
-
|
|
1123
|
-
${worktreeSection}${crossRepoCommitSection}${dispatchSection}
|
|
1124
|
-
**SillyHub 派发互斥**:SillyHub 派发模式下按派发段执行(一 Wave 一 mission),不按 batch 分组;batch 分组指导仅适用于本地 Agent tool 派发。
|
|
1125
|
-
${moduleSection}
|
|
1126
|
-
### 任务摘要(按需读取完整蓝图)
|
|
1127
|
-
为每个任务启动子代理时,**只需告知任务目标和蓝图文件路径,让子代理按需读取**:
|
|
1128
|
-
|
|
1129
|
-
${taskSummary}
|
|
1130
|
-
|
|
1131
|
-
子代理 prompt 要点:
|
|
1132
|
-
1. 任务目标(简短描述)
|
|
1133
|
-
2. 蓝图文件路径(让子代理自行读取详情)
|
|
1134
|
-
3. 编码铁律:先读后写、TDD、不编造方法、只做蓝图里写的事、遵守边界处理规则、不超出 allowed_paths
|
|
1135
|
-
4. ${moduleDocPoint}
|
|
1136
|
-
5. 任务含测试代码时,把下方「测试用例设计」整段复制进子代理 prompt,要求子代理按此设计测试用例
|
|
1137
|
-
6. **增量落盘与中断接手指引**:每完成一个可见产出(代码/测试/文档),立即写盘并执行一次最小验证(如语法检查、单跑相关测试)。工作过程中如被 429/API 配额/会话中断,应在最终回复里输出「已完成清单」(含文件路径、测试命令、当前卡点),不要只输出结论——主代理会依据磁盘产物和该清单判断哪些部分已完成,哪些需接手补做,避免重做已落盘的工作
|
|
1138
|
-
7. **任务边界铁律**:严格只实现本 task 的 \`allowed_paths\` 内文件;若 design.md/plan.md 明确指定了接口/回调/钩子接入位置,必须逐字遵守;不允许顺手实现其他 task 的内容(如 task-01 不要把 task-02 的接入也做了)。如发现必须改其他 task 文件才能继续,先回到主代理由主代理决定是否重分 Wave 或调整 plan,禁止子代理私自越界
|
|
1139
|
-
8. **batch 子代理协议**(仅当按「执行方式」节条件合并 batch 时附加进该子代理 prompt):按 batch 内 task 顺序逐个完成实现闭环——读取 tasks/task-N.md → 实现 → 跑该 task 的 verify 命令 → 记录该 task 报告(改动文件清单 / verify 结果 / 卡点)→ 才开始下一个 task;最终回复输出逐 task 报告清单。禁止写 review.json、禁止勾选 tasks.md checkbox——task 审查与勾选归主 agent,在子代理返回后逐 task 进行。越权即停:发现必须改 batch 内其他 task 或任何 batch 外 task 的 allowed_paths 文件 → 立即停止本 task 及后续,报告冲突文件与卡点,回主 agent 裁决(重分 Wave / 调整 plan / 回退独立子代理)。第 7 条任务边界铁律在 batch 语境下的「本 task」= 当前正在实现的 task
|
|
1140
|
-
|
|
1141
|
-
{{include: testcase-design}}
|
|
1142
|
-
|
|
1143
|
-
${designHotzone}${decisionTouchSection}
|
|
1144
|
-
### Wave 开始前
|
|
1145
|
-
${waveStartItem1}
|
|
1146
|
-
2. 读取 plan.md 了解全局任务划分和依赖关系
|
|
1147
|
-
3. 确认本 Wave 的输入/输出契约(前置 Wave 产出了什么,本 Wave 需要消费什么)
|
|
1148
|
-
4. 检查前置 Wave 的产出是否完整(文件是否存在、测试是否通过)
|
|
1149
|
-
5. **上下文分层加载**:
|
|
1150
|
-
- 🔥 热上下文:design.md 非目标/兼容策略 + 当前 Wave 任务(必须加载)
|
|
1151
|
-
- 🌡️ 温上下文:CONVENTIONS.md + ARCHITECTURE.md(需要时加载)
|
|
1152
|
-
- ❄️ 冷上下文:其他变更的 design.md、历史 plan.md(不要主动加载,除非明确需要)
|
|
1153
|
-
|
|
1154
|
-
### 中断续跑(如曾中断恢复)
|
|
1155
|
-
execute 按 Wave 持久化进度,task 级进度靠 tasks.md checkbox 勾选。若本 Wave 曾因 429/API 配额/崩溃中断:
|
|
1156
|
-
- tasks.md 中**已勾选 \`- [x]\` 的 task 已完成,跳过不重跑**(子代理也可能在完成前中断,重跑前先确认该 task 产出文件是否完整)
|
|
1157
|
-
- 用 \`sillyspec status\` 查当前进度,重新 \`sillyspec run execute\` 会回到当前 Wave step 继续,**不要从零重置或重跑已完成 Wave**
|
|
1158
|
-
- 本 Wave 已完成但不完整(产出缺文件)的 task 补做,不牵连其他 task
|
|
1159
|
-
|
|
1160
|
-
${contractInjection}${prototypeInjection}
|
|
1161
|
-
### 本 Wave 任务
|
|
1162
|
-
${taskList}
|
|
1163
|
-
|
|
1164
|
-
### 调度要求
|
|
1165
|
-
1. **同一 Wave 的多个子代理(独立或 batch)必须并行启动,batch 内部串行**(batch 分组仅按文件正交 / 无契约链判定,不改变 Wave 依赖语义——Wave 定义=无依赖可并行;有依赖应在 plan.md 的不同 Wave 中)。
|
|
1166
|
-
2. **Reverse Sync**:子代理报告实现与 design.md 不一致时,先检查是代码错了还是文档有遗漏
|
|
1167
|
-
3. **不要频繁编译!** 编译很慢,只在以下情况运行:
|
|
1168
|
-
- 写了大量代码后需要验证语法正确性
|
|
1169
|
-
- 最后一个 Wave 完成后做一次全量编译验证
|
|
1170
|
-
- 用户明确要求编译时
|
|
1171
|
-
4. 每个任务完成后:
|
|
1172
|
-
- **在 worktree 内 git add -A && git commit -m "<task-NN 摘要>"**(坑 subagent-uncommitted-newfile-apply3way,2026-08-22 实证:纯新增文件不 commit 时 apply 的 git apply --3way 报 "does not exist in index" 直接炸——未 commit 的新文件不在 base commit 也不在 index,patch 生成取不到。commit 后 base..HEAD diff 完整、apply 顺畅,review.json 的 head 也有真实锚点)
|
|
1173
|
-
- **先写 review.json 再勾选 checkbox**(见下方 Task Review Gate)
|
|
1174
|
-
- **既跑 lint check 也跑 formatter**:凡变更涉及的源码跑项目的 lint 检查 **和** 格式化(如 \`ruff format\` / \`prettier --write\`),不要只跑 check——只 check 不 format 会把格式问题留到 commit 时被 pre-commit hook 拦截(worktree 内二进制可能缺失,先 \`which <bin>\` 确认,缺则 \`uv tool install\` / \`uv sync\`)
|
|
1175
|
-
- 记录改动文件和测试结果
|
|
1176
|
-
5. 遇到 BLOCKED → 记录原因,选择:重试/跳过/停止
|
|
1177
|
-
|
|
1178
|
-
### Task Review Gate
|
|
1179
|
-
|
|
1180
|
-
每个子代理完成后、勾选 checkbox **之前**,你必须创建 task review。
|
|
1181
|
-
|
|
1182
|
-
**操作步骤:**
|
|
1183
|
-
1. 读取当前 task 的 git diff(从 task 开始到完成的变更)
|
|
1184
|
-
2. 对照 plan.md 中该 task 的描述和 tasks/task-XX.md(如果存在)检查实现是否符合要求
|
|
1185
|
-
3. 写入 review.json 文件
|
|
1186
|
-
4. **只有 review.json 写入成功后,才允许勾选 tasks.md 中对应任务的 checkbox**(勾选唯一落点;CLI 的 autoCheckPlanFromReviews 机器勾选器同样写 tasks.md,文件锁 .tasks.md.lock 串行化双路勾选)
|
|
1187
|
-
|
|
1188
|
-
**review.json 路径:**
|
|
1189
|
-
|
|
1190
|
-
task-XX 对应:{SPEC_ROOT}/.runtime/execute-runs/{EXECUTE_RUN_ID}/tasks/task-XX/review.json
|
|
1191
|
-
|
|
1192
|
-
本 execute run 的固定 ID 是:{EXECUTE_RUN_ID}
|
|
1193
|
-
**所有 task 的 review.json 必须使用这个 ID,不要自行创建新目录。**
|
|
1194
|
-
|
|
1195
|
-
**review.json 必填字段:**
|
|
1196
|
-
|
|
1197
|
-
{ "name_zh": "任务评审", "schemaVersion": {REVIEW_SCHEMA_VERSION}, "task": "task-XX", "base": "<git-base-commit>", "head": "<git-head-commit>",
|
|
1198
|
-
"changedFiles": ["src/foo.js"], "specVerdict": "pass|fail|cannot_verify",
|
|
1199
|
-
"qualityVerdict": "pass|fail|cannot_verify", "reviewerNotes": "评审说明",
|
|
1200
|
-
"requiredEvidence": [] }
|
|
1201
|
-
|
|
1202
|
-
**评审铁律:**
|
|
1203
|
-
- 不信任 implementer 自报结果,对照 diff 和 task brief 验证
|
|
1204
|
-
- 只看当前 task 的 diff,不做全仓库漫游审查
|
|
1205
|
-
- \`cannot_verify\` 只在确实无法验证且有待补充证据时使用,且 requiredEvidence 必须非空
|
|
1206
|
-
- \`sillyspec run execute --done\` 会校验所有 task 的 review.json,缺失或 fail 会阻断完成
|
|
1207
|
-
|
|
1208
|
-
### module-impact.md 更新(主代理在本 Wave 所有 task 完成后汇总)
|
|
1209
|
-
本 Wave 内所有 task 子代理完成、review.json 写好后,**由你(主代理/调度者)**汇总本 Wave 的实际代码变更,更新 {SPEC_ROOT}/changes/<change>/module-impact.md(plan 阶段已生成首版):
|
|
1210
|
-
- 基于本 Wave 各 task 的实际 git diff(不是计划)+ {SPEC_ROOT}/docs/<project>/modules/_module-map.yaml 对照
|
|
1211
|
-
- 更新受影响模块的影响类型/说明(实际改动可能与 plan 首版预估不同,据实修正)
|
|
1212
|
-
- **不由各 task 子代理分别改**(同 Wave 并行子代理改同一文件会互相覆盖)——只由主代理在 Wave 收尾统一更新一次
|
|
1213
|
-
- 无 _module-map.yaml 时跳过模块匹配,仅按文件清单更新 unmapped 部分
|
|
1214
|
-
这是可选更新(不阻断 execute 完成),但保持 module-impact 与实际变更一致利于 verify 核对与 archive 终审。
|
|
1215
|
-
|
|
1216
|
-
### 知识沉淀(主代理在本 Wave 收尾,与 module-impact.md 同批)
|
|
1217
|
-
本 Wave 各 task 子代理报告里若提到**真正的项目特有坑**(跨变更可复用、未来 agent 可能再次踩到、且不是本任务专属细节),由你在 Wave 收尾统一追加到 \`{SPEC_ROOT}/knowledge/uncategorized.md\`:
|
|
1218
|
-
- 条目格式:\`## <一句话标题>\` + 一段说明(坑的来龙去脉 + 规避/解法),末尾标注来源(task-XX)
|
|
1219
|
-
- 不由各 task 子代理分别写(并行改同一文件会互相覆盖),只由主代理在 Wave 收尾统一追加——与 module-impact.md 同一收尾节奏
|
|
1220
|
-
- 不要为了完成任务而硬凑条目;纯新增/纯样式/单点 bug 修复/临时绕过不写;拿不准时不写,宁缺毋滥
|
|
1221
|
-
- execute 末步「知识库审阅」会检查待确认条目并提示用户归类
|
|
1222
|
-
|
|
1223
|
-
### 完成后
|
|
1224
|
-
1. 为每个后端 router task 生成 API 端点 artifact——**用 CLI 命令,勿手扫装饰器手写(易漏 endpoint)**:
|
|
1225
|
-
- 逐 task 运行:sillyspec endpoints extract --change <change> --task <task-NN>(<change> = 当前变更名)
|
|
1226
|
-
- CLI 静态扫描变更文件(FastAPI @router.* / Express router.* / Spring @*Mapping)生成
|
|
1227
|
-
{SPEC_ROOT}/.runtime/contract-artifacts/<task-name>/endpoints.json
|
|
1228
|
-
- 格式: { "task": "task-XX", "type": "backend_endpoints", "endpoints": [{ "method": "GET", "path": "/api/ppm/xxx" }] }(CLI 已按此格式写好,verify 探针 5 直接消费)
|
|
1229
|
-
`
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
* 动态构建 execute 步骤列表
|
|
1234
|
-
* @param {string|null} planFilePath - plan 文件路径,null 则用默认 3 Wave
|
|
1235
|
-
* @param {{ worktreePath?: string, noWorktree?: boolean }} options
|
|
1236
|
-
* @returns {Array} 步骤列表
|
|
1237
|
-
*/
|
|
1238
|
-
export function buildExecuteSteps(planFilePath = null, options = {}) {
|
|
1239
|
-
const noWorktree = !!options.noWorktree
|
|
1240
|
-
let waves
|
|
1241
|
-
let changeDir = null
|
|
1242
|
-
|
|
1243
|
-
if (planFilePath && existsSync(planFilePath)) {
|
|
1244
|
-
const planContent = readFileSync(planFilePath, 'utf8')
|
|
1245
|
-
// 新契约(D-001@v1):任务注册表在 tasks.md(与 plan.md 同目录),Wave 结构在 plan.md
|
|
1246
|
-
const tasksPath = path.join(path.dirname(planFilePath), 'tasks.md')
|
|
1247
|
-
const tasksContent = existsSync(tasksPath) ? readFileSync(tasksPath, 'utf8') : ''
|
|
1248
|
-
const registry = parseTaskRegistry(tasksContent)
|
|
1249
|
-
waves = parseWavesFromPlan(planContent, registry)
|
|
1250
|
-
changeDir = path.dirname(planFilePath)
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
// 没解析出 Wave(plan 不存在或不含可识别 task)→ 默认 3 Wave(向后兼容)
|
|
1254
|
-
if (!waves || waves.length === 0) {
|
|
1255
|
-
waves = []
|
|
1256
|
-
for (let i = 1; i <= 3; i++) {
|
|
1257
|
-
waves.push({ index: i, tasks: [{ name: `默认任务 ${i}`, file: 'TBD' }] })
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
// 尝试获取 worktree 路径(可能由前缀步骤创建)
|
|
1262
|
-
const worktreePath = options.worktreePath || null
|
|
1263
|
-
|
|
1264
|
-
// W3 task-08:ctx 由 execute 启动入口(task-09)透传,进程级单例贯穿 execute/apply/verify
|
|
1265
|
-
// (D-013)。缺省=null → buildWavePrompt 退化为单仓单 worktreePath(零回归)。
|
|
1266
|
-
const ctx = options.ctx || null
|
|
1267
|
-
|
|
1268
|
-
const waveSteps = waves.map((wave, i) => ({
|
|
1269
|
-
name: `Wave ${i + 1} 执行`,
|
|
1270
|
-
mode: 'implementation',
|
|
1271
|
-
prompt: buildWavePrompt(wave, i + 1, changeDir, worktreePath, { dispatchMode: options.dispatchMode, branch: options.branch, ctx }),
|
|
1272
|
-
outputHint: `Wave ${i + 1} 执行结果`,
|
|
1273
|
-
optional: false
|
|
1274
|
-
}))
|
|
1275
|
-
|
|
1276
|
-
return [...fixedPrefix, ...waveSteps, ...acceptanceSteps, ...fixedSuffix]
|
|
1277
|
-
}
|