sillyspec 3.27.2 → 3.27.6
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 +8 -0
- package/.claude/skills/sillyspec-quick/SKILL.md +2 -1
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-archive/SKILL.md +87 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-auto/SKILL.md +93 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-brainstorm/SKILL.md +114 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-commit/SKILL.md +67 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-continue/SKILL.md +47 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-doctor/SKILL.md +76 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-execute/SKILL.md +214 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-explore/SKILL.md +102 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-export/SKILL.md +57 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-init/SKILL.md +177 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-knowledge/SKILL.md +270 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-plan/SKILL.md +156 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-quick/SKILL.md +116 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-resume/SKILL.md +70 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-scan/SKILL.md +79 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-state/SKILL.md +64 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-status/SKILL.md +54 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-verify/SKILL.md +87 -0
- package/.claude/worktrees/sillyspec-data-model-research/.claude/skills/sillyspec-workspace/SKILL.md +175 -0
- package/.claude/worktrees/sillyspec-data-model-research/.gitattributes +2 -0
- package/.claude/worktrees/sillyspec-data-model-research/.husky/pre-push +20 -0
- package/.claude/worktrees/sillyspec-data-model-research/README.md +203 -0
- package/.claude/worktrees/sillyspec-data-model-research/SKILL.md +91 -0
- package/.claude/worktrees/sillyspec-data-model-research/bin/sillyspec.js +2 -0
- package/.claude/worktrees/sillyspec-data-model-research/logo.jpg +0 -0
- package/.claude/worktrees/sillyspec-data-model-research/package-lock.json +977 -0
- package/.claude/worktrees/sillyspec-data-model-research/package.json +39 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-Bq_Z2hne.js +7446 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/assets/index-O2W5RV4z.css +1 -0
- 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 +16 -0
- 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 +836 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/dist/prototype-overview.html +256 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/package.json +25 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/executor.js +95 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/index.js +679 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/parser.js +526 -0
- package/.claude/worktrees/sillyspec-data-model-research/packages/dashboard/server/watcher.js +357 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/agent-session-log.js +803 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/change-list.js +290 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/change-risk-profile.js +270 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/check-primitives.js +65 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/classify-change.js +109 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/commit-suggest.js +202 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/config-cat.js +88 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/config-schema.js +328 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/constants.js +97 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/contract-matrix.js +480 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/datetime.js +20 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/db-engine.js +55 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/db.js +381 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/decision-distill.js +517 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/local-agent.js +155 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/backends/sillyhub-mcp.js +245 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/probe.js +246 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/dispatch/strategy.js +121 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-check.js +825 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-debt.js +393 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/docs-gate.js +107 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/doctor-diagnostics.js +1099 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/endpoint-extractor.js +420 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/foreign-declared.js +78 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/fs-atomic.js +73 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/git-helper.js +150 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/hooks/claude-pre-tool-use.cjs +130 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/hooks/worktree-guard.js +892 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/index.js +2798 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/init.js +626 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/knowledge-match.js +231 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/local-detect.js +128 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/local-register.js +104 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/machine-interface.js +543 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/migrate.js +127 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/module-impact.js +166 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/module-resolve.js +222 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/modules.js +580 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/change-registry.js +336 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/consistency-doctor.js +355 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/shared.js +36 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/stage-machine.js +594 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress/step-store.js +265 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/progress.js +1304 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/quick-recommend.js +115 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/quicklog.js +852 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/review-tier.js +77 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/command.js +1595 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/complete-handlers.js +1552 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/complete.js +1259 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/concurrent-detect.js +156 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/gates.js +1084 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/multi-repo-context.js +208 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/next.js +128 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/prompt.js +843 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/quick-audit.js +186 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/scan-profile.js +269 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/shared.js +1562 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run/stage.js +584 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/run.js +23 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-diff.js +388 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-postcheck.js +512 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/scan-staleness.js +95 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/setup.js +414 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/client.js +597 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/sillyhub-mcp/config.js +62 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/spec-dir-typo.js +50 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/spec-sync.js +358 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-engine.js +171 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract-spec.js +550 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-contract.js +889 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stage-review.js +597 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/archive.js +199 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm-auto.js +236 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/brainstorm.js +617 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/cmd-existence.js +145 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/doctor.js +540 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/execute.js +1275 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/explore.js +43 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/index.js +29 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/knowledge.js +514 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan-postcheck.js +1344 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/plan.js +650 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/quick.js +167 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/scan.js +608 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/status.js +64 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/stages/verify.js +246 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/sync.js +1470 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/task-review.js +1498 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/taskcard.js +210 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/verify-postcheck.js +1718 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/verify-probes.js +277 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/version.js +19 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/workflow.js +600 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/workspace.js +125 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree-apply.js +1446 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree-deps.js +576 -0
- package/.claude/worktrees/sillyspec-data-model-research/src/worktree.js +1715 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/claude-instruction.md +23 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/taskcard-rules.md +28 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/testcase-design.md +12 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/prompts/verify-probes.md +32 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/archive-impact.yaml +79 -0
- package/.claude/worktrees/sillyspec-data-model-research/templates/workflows/scan-docs.yaml +132 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-archive/SKILL.md +87 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-auto/SKILL.md +93 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-brainstorm/SKILL.md +114 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-commit/SKILL.md +67 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-continue/SKILL.md +47 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-doctor/SKILL.md +76 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-execute/SKILL.md +214 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-explore/SKILL.md +102 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-export/SKILL.md +57 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-init/SKILL.md +177 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-knowledge/SKILL.md +270 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-plan/SKILL.md +156 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-propose/SKILL.md +87 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-quick/SKILL.md +116 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-resume/SKILL.md +70 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-scan/SKILL.md +79 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-state/SKILL.md +64 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-status/SKILL.md +54 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-verify/SKILL.md +87 -0
- package/.worktrees/8d2d0392/.claude/skills/sillyspec-workspace/SKILL.md +175 -0
- package/.worktrees/8d2d0392/.claude/skills/verify-per-user/SKILL.md +6 -0
- package/.worktrees/8d2d0392/.gitattributes +2 -0
- package/.worktrees/8d2d0392/.husky/pre-push +20 -0
- package/.worktrees/8d2d0392/README.md +203 -0
- package/.worktrees/8d2d0392/SKILL.md +91 -0
- package/.worktrees/8d2d0392/architecture-analysis.md +448 -0
- package/.worktrees/8d2d0392/bin/sillyspec.js +2 -0
- package/.worktrees/8d2d0392/eval/README.md +86 -0
- package/.worktrees/8d2d0392/eval/eval.config.json +28 -0
- package/.worktrees/8d2d0392/eval/lib/adapters/cli.mjs +63 -0
- package/.worktrees/8d2d0392/eval/lib/adapters/dryrun.mjs +27 -0
- package/.worktrees/8d2d0392/eval/lib/config.mjs +82 -0
- package/.worktrees/8d2d0392/eval/lib/db.mjs +76 -0
- package/.worktrees/8d2d0392/eval/lib/report.mjs +120 -0
- package/.worktrees/8d2d0392/eval/lib/runner.mjs +157 -0
- package/.worktrees/8d2d0392/eval/lib/tasks.mjs +73 -0
- package/.worktrees/8d2d0392/eval/lib/util.mjs +107 -0
- package/.worktrees/8d2d0392/eval/lib/workdir.mjs +30 -0
- package/.worktrees/8d2d0392/eval/run.mjs +83 -0
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/files/package.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/solution/src/slugify.mjs +26 -0
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/task.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/001-slugify/verify.mjs +28 -0
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/package.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/files/src/dates.mjs +4 -0
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/solution/src/dates.mjs +30 -0
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/task.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/002-each-day/verify.mjs +31 -0
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/data/notes.txt +5 -0
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/files/package.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/solution/bin/report.mjs +36 -0
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/task.json +6 -0
- package/.worktrees/8d2d0392/eval/tasks/003-word-report/verify.mjs +38 -0
- package/.worktrees/8d2d0392/logo.jpg +0 -0
- package/.worktrees/8d2d0392/package-lock.json +977 -0
- package/.worktrees/8d2d0392/package.json +41 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-Bq_Z2hne.js +7446 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/assets/index-O2W5RV4z.css +1 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/favicon.jpg +0 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/index.html +16 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/logo.jpg +0 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-dashboard.html +836 -0
- package/.worktrees/8d2d0392/packages/dashboard/dist/prototype-overview.html +256 -0
- package/.worktrees/8d2d0392/packages/dashboard/package.json +25 -0
- package/.worktrees/8d2d0392/packages/dashboard/server/executor.js +95 -0
- package/.worktrees/8d2d0392/packages/dashboard/server/index.js +679 -0
- package/.worktrees/8d2d0392/packages/dashboard/server/parser.js +526 -0
- package/.worktrees/8d2d0392/packages/dashboard/server/watcher.js +357 -0
- package/.worktrees/8d2d0392/src/agent-session-log.js +803 -0
- package/.worktrees/8d2d0392/src/change-list.js +290 -0
- package/.worktrees/8d2d0392/src/change-risk-profile.js +339 -0
- package/.worktrees/8d2d0392/src/check-primitives.js +65 -0
- package/.worktrees/8d2d0392/src/classify-change.js +109 -0
- package/.worktrees/8d2d0392/src/commit-suggest.js +202 -0
- package/.worktrees/8d2d0392/src/config-cat.js +88 -0
- package/.worktrees/8d2d0392/src/config-schema.js +328 -0
- package/.worktrees/8d2d0392/src/constants.js +97 -0
- package/.worktrees/8d2d0392/src/contract-matrix.js +533 -0
- package/.worktrees/8d2d0392/src/datetime.js +20 -0
- package/.worktrees/8d2d0392/src/db-engine.js +55 -0
- package/.worktrees/8d2d0392/src/db.js +381 -0
- package/.worktrees/8d2d0392/src/decision-distill.js +517 -0
- package/.worktrees/8d2d0392/src/dispatch/backends/local-agent.js +155 -0
- package/.worktrees/8d2d0392/src/dispatch/backends/sillyhub-mcp.js +245 -0
- package/.worktrees/8d2d0392/src/dispatch/probe.js +246 -0
- package/.worktrees/8d2d0392/src/dispatch/strategy.js +121 -0
- package/.worktrees/8d2d0392/src/docs-check.js +825 -0
- package/.worktrees/8d2d0392/src/docs-debt.js +393 -0
- package/.worktrees/8d2d0392/src/docs-gate.js +107 -0
- package/.worktrees/8d2d0392/src/doctor-diagnostics.js +1099 -0
- package/.worktrees/8d2d0392/src/endpoint-extractor.js +409 -0
- package/.worktrees/8d2d0392/src/foreign-declared.js +78 -0
- package/.worktrees/8d2d0392/src/fs-atomic.js +73 -0
- package/.worktrees/8d2d0392/src/git-helper.js +150 -0
- package/.worktrees/8d2d0392/src/hooks/claude-pre-tool-use.cjs +130 -0
- package/.worktrees/8d2d0392/src/hooks/worktree-guard.js +892 -0
- package/.worktrees/8d2d0392/src/index.js +2854 -0
- package/.worktrees/8d2d0392/src/init.js +626 -0
- package/.worktrees/8d2d0392/src/knowledge-match.js +231 -0
- package/.worktrees/8d2d0392/src/local-detect.js +128 -0
- package/.worktrees/8d2d0392/src/local-register.js +104 -0
- package/.worktrees/8d2d0392/src/machine-interface.js +543 -0
- package/.worktrees/8d2d0392/src/migrate.js +127 -0
- package/.worktrees/8d2d0392/src/module-impact.js +166 -0
- package/.worktrees/8d2d0392/src/module-resolve.js +222 -0
- package/.worktrees/8d2d0392/src/modules.js +580 -0
- package/.worktrees/8d2d0392/src/plan-adopt-waves.js +126 -0
- package/.worktrees/8d2d0392/src/progress/change-registry.js +336 -0
- package/.worktrees/8d2d0392/src/progress/consistency-doctor.js +355 -0
- package/.worktrees/8d2d0392/src/progress/shared.js +36 -0
- package/.worktrees/8d2d0392/src/progress/stage-machine.js +594 -0
- package/.worktrees/8d2d0392/src/progress/step-store.js +265 -0
- package/.worktrees/8d2d0392/src/progress.js +1304 -0
- package/.worktrees/8d2d0392/src/quick-recommend.js +115 -0
- package/.worktrees/8d2d0392/src/quicklog.js +883 -0
- package/.worktrees/8d2d0392/src/review-tier.js +77 -0
- package/.worktrees/8d2d0392/src/run/command.js +1641 -0
- package/.worktrees/8d2d0392/src/run/complete-handlers.js +1552 -0
- package/.worktrees/8d2d0392/src/run/complete.js +1259 -0
- package/.worktrees/8d2d0392/src/run/concurrent-detect.js +156 -0
- package/.worktrees/8d2d0392/src/run/gates.js +1094 -0
- package/.worktrees/8d2d0392/src/run/multi-repo-context.js +208 -0
- package/.worktrees/8d2d0392/src/run/next.js +128 -0
- package/.worktrees/8d2d0392/src/run/prompt.js +843 -0
- package/.worktrees/8d2d0392/src/run/quick-audit.js +186 -0
- package/.worktrees/8d2d0392/src/run/scan-profile.js +269 -0
- package/.worktrees/8d2d0392/src/run/shared.js +1562 -0
- package/.worktrees/8d2d0392/src/run/stage.js +587 -0
- package/.worktrees/8d2d0392/src/run.js +23 -0
- package/.worktrees/8d2d0392/src/scan-diff.js +388 -0
- package/.worktrees/8d2d0392/src/scan-postcheck.js +524 -0
- package/.worktrees/8d2d0392/src/scan-staleness.js +95 -0
- package/.worktrees/8d2d0392/src/setup.js +414 -0
- package/.worktrees/8d2d0392/src/sillyhub-mcp/client.js +597 -0
- package/.worktrees/8d2d0392/src/sillyhub-mcp/config.js +62 -0
- package/.worktrees/8d2d0392/src/spec-dir-typo.js +50 -0
- package/.worktrees/8d2d0392/src/spec-sync.js +358 -0
- package/.worktrees/8d2d0392/src/stage-contract-engine.js +171 -0
- package/.worktrees/8d2d0392/src/stage-contract-spec.js +551 -0
- package/.worktrees/8d2d0392/src/stage-contract.js +948 -0
- package/.worktrees/8d2d0392/src/stage-review.js +597 -0
- package/.worktrees/8d2d0392/src/stages/archive.js +199 -0
- package/.worktrees/8d2d0392/src/stages/brainstorm-auto.js +285 -0
- package/.worktrees/8d2d0392/src/stages/brainstorm.js +624 -0
- package/.worktrees/8d2d0392/src/stages/cmd-existence.js +145 -0
- package/.worktrees/8d2d0392/src/stages/doctor.js +540 -0
- package/.worktrees/8d2d0392/src/stages/execute.js +1277 -0
- package/.worktrees/8d2d0392/src/stages/explore.js +43 -0
- package/.worktrees/8d2d0392/src/stages/index.js +29 -0
- package/.worktrees/8d2d0392/src/stages/knowledge.js +514 -0
- package/.worktrees/8d2d0392/src/stages/plan-postcheck.js +1398 -0
- package/.worktrees/8d2d0392/src/stages/plan.js +651 -0
- package/.worktrees/8d2d0392/src/stages/quick.js +167 -0
- package/.worktrees/8d2d0392/src/stages/scan.js +608 -0
- package/.worktrees/8d2d0392/src/stages/status.js +64 -0
- package/.worktrees/8d2d0392/src/stages/verify.js +246 -0
- package/.worktrees/8d2d0392/src/sync.js +1470 -0
- package/.worktrees/8d2d0392/src/task-review.js +1498 -0
- package/.worktrees/8d2d0392/src/taskcard-placeholders.js +21 -0
- package/.worktrees/8d2d0392/src/taskcard.js +217 -0
- package/.worktrees/8d2d0392/src/verify-postcheck.js +1718 -0
- package/.worktrees/8d2d0392/src/verify-probes.js +327 -0
- package/.worktrees/8d2d0392/src/version.js +19 -0
- package/.worktrees/8d2d0392/src/workflow.js +600 -0
- package/.worktrees/8d2d0392/src/workspace.js +125 -0
- package/.worktrees/8d2d0392/src/worktree-apply.js +1611 -0
- package/.worktrees/8d2d0392/src/worktree-deps.js +576 -0
- package/.worktrees/8d2d0392/src/worktree.js +1838 -0
- package/.worktrees/8d2d0392/templates/claude-instruction.md +23 -0
- package/.worktrees/8d2d0392/templates/prompts/taskcard-rules.md +29 -0
- package/.worktrees/8d2d0392/templates/prompts/testcase-design.md +12 -0
- package/.worktrees/8d2d0392/templates/prompts/verify-probes.md +32 -0
- package/.worktrees/8d2d0392/templates/workflows/archive-impact.yaml +79 -0
- package/.worktrees/8d2d0392/templates/workflows/scan-docs.yaml +132 -0
- package/architecture-analysis.md +448 -0
- package/eval/README.md +86 -0
- package/eval/eval.config.json +28 -0
- package/eval/lib/adapters/cli.mjs +63 -0
- package/eval/lib/adapters/dryrun.mjs +27 -0
- package/eval/lib/config.mjs +82 -0
- package/eval/lib/db.mjs +76 -0
- package/eval/lib/report.mjs +120 -0
- package/eval/lib/runner.mjs +157 -0
- package/eval/lib/tasks.mjs +73 -0
- package/eval/lib/util.mjs +107 -0
- package/eval/lib/workdir.mjs +30 -0
- package/eval/run.mjs +83 -0
- package/eval/tasks/001-slugify/files/package.json +6 -0
- package/eval/tasks/001-slugify/solution/src/slugify.mjs +26 -0
- package/eval/tasks/001-slugify/task.json +6 -0
- package/eval/tasks/001-slugify/verify.mjs +28 -0
- package/eval/tasks/002-each-day/files/package.json +6 -0
- package/eval/tasks/002-each-day/files/src/dates.mjs +4 -0
- package/eval/tasks/002-each-day/solution/src/dates.mjs +30 -0
- package/eval/tasks/002-each-day/task.json +6 -0
- package/eval/tasks/002-each-day/verify.mjs +31 -0
- package/eval/tasks/003-word-report/files/data/notes.txt +5 -0
- package/eval/tasks/003-word-report/files/package.json +6 -0
- package/eval/tasks/003-word-report/solution/bin/report.mjs +36 -0
- package/eval/tasks/003-word-report/task.json +6 -0
- package/eval/tasks/003-word-report/verify.mjs +38 -0
- package/package.json +4 -2
- package/src/agent-session-log.js +45 -5
- package/src/change-risk-profile.js +83 -14
- package/src/config-schema.js +18 -3
- package/src/contract-matrix.js +90 -29
- package/src/datetime.js +20 -0
- package/src/decision-distill.js +517 -0
- package/src/dispatch/backends/local-agent.js +4 -4
- package/src/docs-check.js +227 -0
- package/src/docs-debt.js +187 -24
- package/src/doctor-diagnostics.js +102 -2
- package/src/endpoint-extractor.js +41 -52
- package/src/foreign-declared.js +155 -0
- package/src/index.js +95 -13
- package/src/init.js +9 -7
- package/src/knowledge-match.js +107 -6
- package/src/local-register.js +7 -1
- package/src/module-resolve.js +12 -1
- package/src/modules.js +2 -1
- package/src/plan-adopt-waves.js +126 -0
- package/src/quicklog.js +50 -4
- package/src/run/command.js +124 -44
- package/src/run/complete-handlers.js +48 -19
- package/src/run/complete.js +5 -2
- package/src/run/gates.js +104 -22
- package/src/run/prompt.js +84 -42
- package/src/run/quick-audit.js +11 -0
- package/src/run/shared.js +152 -10
- package/src/run/stage.js +8 -5
- package/src/run.js +2 -2
- package/src/scan-postcheck.js +30 -17
- package/src/stage-contract-spec.js +3 -2
- package/src/stage-contract.js +68 -4
- package/src/stages/archive.js +53 -12
- package/src/stages/brainstorm-auto.js +50 -1
- package/src/stages/brainstorm.js +13 -0
- package/src/stages/doctor.js +157 -1
- package/src/stages/execute.js +32 -6
- package/src/stages/plan-postcheck.js +76 -17
- package/src/stages/plan.js +9 -4
- package/src/stages/quick.js +6 -1
- package/src/stages/verify.js +32 -15
- package/src/sync.js +41 -3
- package/src/task-review.js +2 -2
- package/src/taskcard-placeholders.js +21 -0
- package/src/taskcard.js +43 -1
- package/src/verify-postcheck.js +315 -13
- package/src/verify-probes.js +73 -10
- package/src/worktree-apply.js +569 -227
- package/src/worktree-deps.js +150 -1
- package/src/worktree.js +285 -77
- package/templates/prompts/taskcard-rules.md +2 -1
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
// SillySpec Doctor — 项目自检阶段
|
|
2
|
+
// 检查项通过 prompt 中的 bash 命令执行,此文件仅定义步骤结构
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export const definition = {
|
|
6
|
+
name: 'doctor',
|
|
7
|
+
title: '项目自检',
|
|
8
|
+
description: '检查 SillySpec 配置、构建环境和外部依赖',
|
|
9
|
+
auxiliary: true,
|
|
10
|
+
steps: [
|
|
11
|
+
{
|
|
12
|
+
name: 'SillySpec 内部检查',
|
|
13
|
+
prompt: `运行 SillySpec 内部检查。逐项执行以下命令并汇总结果:
|
|
14
|
+
|
|
15
|
+
> ✅ Windows 兼容(SS-1,2026-08-20):db 查询已全部改走 node:sqlite(node≥22.13 内置),不再依赖外部 sqlite3 CLI。若 node 脚本失败,改用 sillyspec 自身命令替代——sillyspec progress show 查看当前变更与各阶段状态,sillyspec doctor --json 查看 db 健康与活跃变更列表。
|
|
16
|
+
|
|
17
|
+
### 1. 目录结构完整性
|
|
18
|
+
\`\`\`bash
|
|
19
|
+
# 检查 .sillyspec/ 及子目录
|
|
20
|
+
for d in .sillyspec .sillyspec/projects .sillyspec/docs .sillyspec/changes .sillyspec/.runtime; do
|
|
21
|
+
[ -d "$d" ] && echo "✅ $d" || echo "❌ $d"
|
|
22
|
+
done
|
|
23
|
+
# 检查 sillyspec.db(SQLite 权威状态源)
|
|
24
|
+
DB_FILE='.sillyspec/.runtime/sillyspec.db'
|
|
25
|
+
[ -f "$DB_FILE" ] && echo "✅ sillyspec.db 存在" || echo "❌ sillyspec.db 不存在"
|
|
26
|
+
# 用 sillyspec 自身命令验证 db 可读(fallback 不依赖外部 sqlite3 CLI,兼容 Windows)
|
|
27
|
+
sqlite3 "$DB_FILE" "SELECT count(*) FROM project" 2>/dev/null && echo "✅ sillyspec.db 可查询" || (sillyspec progress show >/dev/null 2>&1 && echo "✅ sillyspec.db 可查询(经 sillyspec 命令)" || echo "⚠️ sillyspec.db 不可查询")
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
### 2. 项目配置检查
|
|
31
|
+
\`\`\`bash
|
|
32
|
+
ls .sillyspec/projects/*.yaml 2>/dev/null
|
|
33
|
+
# 对每个 yaml 文件,检查 name 和 path 字段,验证 path 存在
|
|
34
|
+
for f in .sillyspec/projects/*.yaml; do
|
|
35
|
+
[ -f "$f" ] || continue
|
|
36
|
+
name=$(grep '^name:' "$f" | head -1 | sed 's/^name:[[:space:]]*//')
|
|
37
|
+
p=$(grep '^path:' "$f" | head -1 | sed 's/^path:[[:space:]]*//')
|
|
38
|
+
[ -z "$name" ] && echo "⚠️ $(basename $f) — 缺少 name"
|
|
39
|
+
[ -z "$p" ] && echo "⚠️ $(basename $f) — 缺少 path"
|
|
40
|
+
[ -n "$p" ] && [ ! -d "$p" ] && echo "❌ $(basename $f) — path 不存在: $p"
|
|
41
|
+
[ -n "$name" ] && [ -n "$p" ] && [ -d "$p" ] && echo "✅ $(basename $f) — $name ($p)"
|
|
42
|
+
done
|
|
43
|
+
\`\`\`
|
|
44
|
+
|
|
45
|
+
### 3. 进度数据一致性
|
|
46
|
+
\`\`\`bash
|
|
47
|
+
# 从 sillyspec.db 读取活跃变更并检查目录存在性(node:sqlite 主路径,Windows 无 sqlite3 CLI)
|
|
48
|
+
DB_FILE='.sillyspec/.runtime/sillyspec.db'
|
|
49
|
+
if [ ! -f "$DB_FILE" ]; then echo "⚠️ sillyspec.db 不存在"; exit 0; fi
|
|
50
|
+
node --input-type=module -e "
|
|
51
|
+
import { DatabaseSync } from 'node:sqlite';
|
|
52
|
+
import { existsSync } from 'node:fs';
|
|
53
|
+
const db = new DatabaseSync(process.argv[1], { readOnly: true });
|
|
54
|
+
const row = db.prepare(\\"SELECT name FROM changes WHERE status='active' ORDER BY last_active DESC LIMIT 1\\").get();
|
|
55
|
+
if (!row) { console.log('ℹ️ 无当前变更'); process.exit(0); }
|
|
56
|
+
console.log('当前变更: ' + row.name);
|
|
57
|
+
const dir = '.sillyspec/changes/' + row.name;
|
|
58
|
+
console.log(existsSync(dir) ? '✅ 变更目录存在: ' + row.name : '❌ 变更目录不存在: ' + row.name);
|
|
59
|
+
const stages = db.prepare('SELECT s.stage AS stage, s.status AS status FROM stages s JOIN changes c ON s.change_id=c.id WHERE c.name=? ORDER BY s.stage').all(row.name);
|
|
60
|
+
if (stages.length === 0) console.log('⚠️ 无阶段数据'); else for (const s of stages) console.log(' ' + s.stage + ': ' + s.status);
|
|
61
|
+
db.close();
|
|
62
|
+
" "$DB_FILE" 2>/dev/null || echo "⚠️ 无法查询阶段数据"
|
|
63
|
+
\`\`\`
|
|
64
|
+
|
|
65
|
+
### 4. 孤儿文件检查
|
|
66
|
+
\`\`\`bash
|
|
67
|
+
DB_FILE='.sillyspec/.runtime/sillyspec.db'
|
|
68
|
+
if [ ! -f "$DB_FILE" ]; then echo "⚠️ sillyspec.db 不存在"; exit 0; fi
|
|
69
|
+
node -e "
|
|
70
|
+
const fs = require('fs');
|
|
71
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
72
|
+
const dir = '.sillyspec/changes';
|
|
73
|
+
const subs = fs.existsSync(dir) ? fs.readdirSync(dir).filter(f => { try { return fs.statSync(dir+'/'+f).isDirectory() && f !== 'archive'; } catch { return false; } }) : [];
|
|
74
|
+
let known;
|
|
75
|
+
try { const db = new DatabaseSync('.sillyspec/.runtime/sillyspec.db', { readOnly: true }); known = new Set(db.prepare(\"SELECT name FROM changes WHERE status='active'\").all().map(r => r.name)); db.close(); } catch (e) { console.log('⚠️ db 读取失败: ' + e.message + '(跳过孤儿判定,不做任何清理建议)'); known = null; }
|
|
76
|
+
// known 为 null(db 不可读)时只列目录不判定孤儿,后续僵尸检查同样跳过——不守卫会 TypeError 半途崩
|
|
77
|
+
if (known) subs.forEach(s => {
|
|
78
|
+
console.log(known.has(s) ? '✅ ' + s + ' — 已关联' : '⚠️ ' + s + ' — 孤儿目录(先 dump 取证再手工归位,勿直接 rm)');
|
|
79
|
+
});
|
|
80
|
+
// 反向检查(multi-agent-review Q1):DB active 且匹配 quick-<hex> 但无目录 → 僵尸 quick 会话
|
|
81
|
+
// (quick 收尾未注销,active 行累积污染 listChanges/doctor)。新代码已修收尾,此项清理历史残留。
|
|
82
|
+
const QUICK_RE = /^quick-[0-9a-f]{8}$/;
|
|
83
|
+
const zombieQuick = known ? [...known].filter(n => QUICK_RE.test(n) && !subs.includes(n)) : [];
|
|
84
|
+
if (zombieQuick.length > 0) {
|
|
85
|
+
console.log('⚠️ 检测到 ' + zombieQuick.length + ' 个僵尸 quick 会话(DB active 但无目录):');
|
|
86
|
+
zombieQuick.forEach(n => console.log(' - ' + n));
|
|
87
|
+
}
|
|
88
|
+
"
|
|
89
|
+
\`\`\`
|
|
90
|
+
|
|
91
|
+
### 5. 配置文件检查
|
|
92
|
+
\`\`\`bash
|
|
93
|
+
# 检查 local.yaml 和 scan 总览文档
|
|
94
|
+
for f in .sillyspec/projects/*.yaml; do
|
|
95
|
+
[ -f "$f" ] || continue
|
|
96
|
+
name=$(grep '^name:' "$f" | head -1 | sed 's/^name:[[:space:]]*//')
|
|
97
|
+
p=$(grep '^path:' "$f" | head -1 | sed 's/^path:[[:space:]]*//')
|
|
98
|
+
[ -z "$p" ] && continue
|
|
99
|
+
local_yaml="$p/.sillyspec/local.yaml"
|
|
100
|
+
arch_md=".sillyspec/docs/$name/scan/ARCHITECTURE.md"
|
|
101
|
+
[ -f "$local_yaml" ] && echo "✅ local.yaml ($name)" || echo "⚠️ local.yaml ($name) — 不存在"
|
|
102
|
+
if [ -f "$local_yaml" ]; then
|
|
103
|
+
grep -q 'test:' "$local_yaml" && echo " ✅ test 命令已配置" || echo " ⚠️ 缺少 test 命令"
|
|
104
|
+
fi
|
|
105
|
+
[ -f "$arch_md" ] && echo "✅ scan/ARCHITECTURE.md ($name)" || echo "⚠️ scan/ARCHITECTURE.md ($name) — 不存在(运行 sillyspec run scan)"
|
|
106
|
+
done
|
|
107
|
+
\`\`\`
|
|
108
|
+
|
|
109
|
+
### 6. Worktree 隔离环境检查
|
|
110
|
+
\`\`\`bash
|
|
111
|
+
# 检测当前目录是否在 submodule 中
|
|
112
|
+
SUPERPROJECT=$(git rev-parse --show-superproject-working-tree 2>/dev/null)
|
|
113
|
+
if [ -n "$SUPERPROJECT" ]; then
|
|
114
|
+
echo "⚠️ 当前目录在 git submodule 内,worktree 隔离不可用"
|
|
115
|
+
else
|
|
116
|
+
echo "✅ 不在 submodule 中"
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# 检测是否已在 linked worktree 中
|
|
120
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
121
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
122
|
+
if [ "$GIT_DIR" != "$GIT_COMMON" ] && [ -z "$SUPERPROJECT" ]; then
|
|
123
|
+
echo "✅ 已在 linked worktree 中"
|
|
124
|
+
else
|
|
125
|
+
echo "ℹ️ 在主仓库中(非 worktree)"
|
|
126
|
+
fi
|
|
127
|
+
|
|
128
|
+
# 检查 worktree 存储目录是否被 .gitignore 忽略
|
|
129
|
+
WT_DIR='.sillyspec/.runtime/worktrees'
|
|
130
|
+
if git check-ignore -q "$WT_DIR" 2>/dev/null; then
|
|
131
|
+
echo "✅ worktree 目录已被 .gitignore 忽略 ($WT_DIR)"
|
|
132
|
+
else
|
|
133
|
+
echo "❌ worktree 目录未被 .gitignore 忽略 ($WT_DIR) — worktree 创建将被阻断"
|
|
134
|
+
echo " 修复: 在 .gitignore 中添加 $WT_DIR/"
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# 检查 DB 中的 isolation 状态
|
|
138
|
+
DB_FILE='.sillyspec/.runtime/sillyspec.db'
|
|
139
|
+
if [ -f "$DB_FILE" ]; then
|
|
140
|
+
echo ""
|
|
141
|
+
echo "isolation 状态(来自 sillyspec.db):"
|
|
142
|
+
node -e "
|
|
143
|
+
const { DatabaseSync } = require('node:sqlite');
|
|
144
|
+
const db = new DatabaseSync(process.argv[1], { readOnly: true });
|
|
145
|
+
const rows = db.prepare(\"SELECT name, isolation_status AS status, isolation_mode AS mode, isolation_reason AS reason FROM changes WHERE status='active'\").all();
|
|
146
|
+
for (const r of rows) console.log(' ' + r.name + ' | ' + r.status + ' | ' + r.mode + ' | ' + (r.reason || ''));
|
|
147
|
+
db.close();
|
|
148
|
+
" "$DB_FILE" 2>/dev/null || echo "⚠️ 查询 isolation 失败"
|
|
149
|
+
else
|
|
150
|
+
echo ""
|
|
151
|
+
echo "ℹ️ sillyspec.db 不存在(尚未初始化)"
|
|
152
|
+
fi
|
|
153
|
+
\`\`\`\n
|
|
154
|
+
### 输出
|
|
155
|
+
汇总所有检查结果,按以下格式:
|
|
156
|
+
\`\`\`
|
|
157
|
+
## SillySpec 内部
|
|
158
|
+
✅/⚠️/❌ 各项状态
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
### 注意
|
|
162
|
+
- 不要编造路径或结果,严格基于命令输出
|
|
163
|
+
- 如果 .sillyspec/ 不存在,直接输出 ❌ 并跳过后续检查`,
|
|
164
|
+
outputHint: 'SillySpec 内部检查结果',
|
|
165
|
+
optional: false
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
name: '构建环境检查',
|
|
169
|
+
prompt: `检查项目构建环境。先探测项目使用的构建工具,再逐项检查可用性。
|
|
170
|
+
|
|
171
|
+
### 1. 探测构建工具
|
|
172
|
+
\`\`\`bash
|
|
173
|
+
# 确定项目路径(使用 sillyspec.db 中的项目路径或当前目录)
|
|
174
|
+
PROJECT_DIR=$(sqlite3 -json '.sillyspec/.runtime/sillyspec.db' "SELECT name FROM project WHERE id=1" 2>/dev/null | node -e "const r=JSON.parse(require('fs').readFileSync(0,'utf8'));console.log(r.length>0&&r[0].name?r[0].name:'.')" 2>/dev/null || node -e "
|
|
175
|
+
const fs=require('fs');
|
|
176
|
+
try{const files=fs.readdirSync('.sillyspec/projects').filter(f=>f.endsWith('.yaml'));
|
|
177
|
+
if(files.length>0){const c=fs.readFileSync('.sillyspec/projects/'+files[0],'utf8');const m=c.match(/^path:\\s*(.+)/m);console.log(m?m[1].trim():'.')}else console.log('.')
|
|
178
|
+
}catch{console.log('.')}
|
|
179
|
+
" 2>/dev/null)
|
|
180
|
+
echo "项目目录: $PROJECT_DIR"
|
|
181
|
+
|
|
182
|
+
# 探测构建工具
|
|
183
|
+
for f in pom.xml build.gradle package.json requirements.txt pyproject.toml go.mod Cargo.toml; do
|
|
184
|
+
[ -f "$PROJECT_DIR/$f" ] && echo "检测到: $f"
|
|
185
|
+
done
|
|
186
|
+
cat .sillyspec/docs/*/scan/ARCHITECTURE.md 2>/dev/null | head -30 || echo "(无 scan/ARCHITECTURE.md)"
|
|
187
|
+
\`\`\`
|
|
188
|
+
|
|
189
|
+
### 2. 构建工具可用性
|
|
190
|
+
根据上面检测到的工具,运行对应检查(未检测到的跳过):
|
|
191
|
+
|
|
192
|
+
**Maven 项目:**
|
|
193
|
+
\`\`\`bash
|
|
194
|
+
timeout 10 mvn -v 2>/dev/null | head -1 && echo "✅ Maven 可用" || echo "❌ Maven 不可用"
|
|
195
|
+
[ -f ~/.m2/settings.xml ] && echo "✅ Maven settings.xml 存在" || echo "⚠️ Maven settings.xml 不存在"
|
|
196
|
+
timeout 10 java -version 2>&1 | head -1
|
|
197
|
+
\`\`\`
|
|
198
|
+
|
|
199
|
+
**Gradle 项目:**
|
|
200
|
+
\`\`\`bash
|
|
201
|
+
timeout 10 gradle -v 2>/dev/null | head -1 && echo "✅ Gradle 可用" || echo "❌ Gradle 不可用"
|
|
202
|
+
\`\`\`
|
|
203
|
+
|
|
204
|
+
**Node.js 项目:**
|
|
205
|
+
\`\`\`bash
|
|
206
|
+
timeout 5 node -v 2>/dev/null && echo "✅ Node.js 可用" || echo "❌ Node.js 不可用"
|
|
207
|
+
timeout 5 npm -v 2>/dev/null && echo "✅ npm 可用" || echo "❌ npm 不可用"
|
|
208
|
+
timeout 5 pnpm -v 2>/dev/null && echo "✅ pnpm 可用" || echo "ℹ️ pnpm 未安装"
|
|
209
|
+
# 检查 registry
|
|
210
|
+
npm config get registry 2>/dev/null
|
|
211
|
+
\`\`\`
|
|
212
|
+
|
|
213
|
+
**Python 项目:**
|
|
214
|
+
\`\`\`bash
|
|
215
|
+
timeout 5 python3 --version 2>/dev/null && echo "✅ Python3 可用" || echo "❌ Python3 不可用"
|
|
216
|
+
timeout 5 pip3 --version 2>/dev/null && echo "✅ pip3 可用" || echo "❌ pip3 不可用"
|
|
217
|
+
\`\`\`
|
|
218
|
+
|
|
219
|
+
### 3. Maven 私服检查(仅 Maven 项目)
|
|
220
|
+
\`\`\`bash
|
|
221
|
+
# 从 settings.xml 提取仓库地址
|
|
222
|
+
if [ -f ~/.m2/settings.xml ]; then
|
|
223
|
+
grep -oP 'https?://[^<"]+:[0-9]+' ~/.m2/settings.xml 2>/dev/null | sort -u | while read url; do
|
|
224
|
+
timeout 5 curl -s -o /dev/null -w "%{http_code}" "$url" 2>/dev/null
|
|
225
|
+
echo " — $url"
|
|
226
|
+
done
|
|
227
|
+
fi
|
|
228
|
+
# 从 pom.xml 提取
|
|
229
|
+
if [ -f "$PROJECT_DIR/pom.xml" ]; then
|
|
230
|
+
grep -oP 'https?://[^<"]+:[0-9]+' "$PROJECT_DIR/pom.xml" 2>/dev/null | sort -u | while read url; do
|
|
231
|
+
code=$(timeout 5 curl -s -o /dev/null -w "%{http_code}" "$url" 2>/dev/null)
|
|
232
|
+
[ "$code" = "000" ] && echo "❌ 私服不可达: $url(超时)" || echo "✅ 私服可达 ($code): $url"
|
|
233
|
+
done
|
|
234
|
+
fi
|
|
235
|
+
\`\`\`
|
|
236
|
+
|
|
237
|
+
### 4. 运行时环境
|
|
238
|
+
\`\`\`bash
|
|
239
|
+
timeout 5 node -v 2>/dev/null && echo "Node.js: $(node -v)" || echo "❌ Node.js 未安装"
|
|
240
|
+
timeout 5 git --version 2>/dev/null && echo "Git: $(git --version)" || echo "❌ Git 未安装"
|
|
241
|
+
timeout 10 git remote -v 2>/dev/null | head -2
|
|
242
|
+
timeout 5 git ls-remote --heads origin 2>/dev/null >/dev/null && echo "✅ Git remote 可达" || echo "⚠️ Git remote 不可达"
|
|
243
|
+
timeout 5 java -version 2>&1 | head -1
|
|
244
|
+
timeout 5 python3 --version 2>/dev/null
|
|
245
|
+
\`\`\`
|
|
246
|
+
|
|
247
|
+
### 输出
|
|
248
|
+
汇总所有检查结果:
|
|
249
|
+
\`\`\`
|
|
250
|
+
## 构建环境
|
|
251
|
+
✅/⚠️/❌ 各项状态
|
|
252
|
+
\`\`\`
|
|
253
|
+
|
|
254
|
+
### 注意
|
|
255
|
+
- 未检测到的构建工具直接跳过,不要报错
|
|
256
|
+
- timeout 超时的命令视为不可用
|
|
257
|
+
- 不编造结果`,
|
|
258
|
+
outputHint: '构建环境检查结果',
|
|
259
|
+
optional: false
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
name: '外部依赖检查',
|
|
263
|
+
prompt: `检查外部依赖工具是否可用。
|
|
264
|
+
|
|
265
|
+
### 1. Context7 MCP
|
|
266
|
+
\`\`\`bash
|
|
267
|
+
# 检查 MCP 配置
|
|
268
|
+
for f in ~/.config/claude/claude_desktop_config.json ~/.cursor/mcp.json ~/.openclaw/mcp.json; do
|
|
269
|
+
[ -f "$f" ] && echo "MCP 配置文件: $f" && grep -i context7 "$f" 2>/dev/null && echo "✅ Context7 已配置" || true
|
|
270
|
+
done
|
|
271
|
+
# 也检查 sillyspec 自身的 setup
|
|
272
|
+
node -e "
|
|
273
|
+
try{const m=require(require('path').join(require('os').homedir(),'.sillyspec','config.json'));console.log('✅ sillyspec config 存在')}catch{console.log('ℹ️ 无 sillyspec 全局配置')}
|
|
274
|
+
" 2>/dev/null
|
|
275
|
+
\`\`\`
|
|
276
|
+
|
|
277
|
+
### 2. grep.app
|
|
278
|
+
\`\`\`bash
|
|
279
|
+
timeout 5 curl -s -o /dev/null -w "%{http_code}" https://grep.app 2>/dev/null | grep -q "200" && echo "✅ grep.app 可达" || echo "⚠️ grep.app 不可达"
|
|
280
|
+
\`\`\`
|
|
281
|
+
|
|
282
|
+
### 3. 其他 AI 工具(可选)
|
|
283
|
+
\`\`\`bash
|
|
284
|
+
# 检查常用 AI/开发工具
|
|
285
|
+
timeout 5 which gh 2>/dev/null && echo "✅ GitHub CLI 可用" || echo "ℹ️ GitHub CLI 未安装"
|
|
286
|
+
timeout 5 which docker 2>/dev/null && echo "✅ Docker 可用" || echo "ℹ️ Docker 未安装"
|
|
287
|
+
\`\`\`
|
|
288
|
+
|
|
289
|
+
### 输出
|
|
290
|
+
\`\`\`
|
|
291
|
+
## 外部依赖
|
|
292
|
+
✅/⚠️/❌ 各项状态
|
|
293
|
+
\`\`\`
|
|
294
|
+
|
|
295
|
+
### 注意
|
|
296
|
+
- 不编造结果
|
|
297
|
+
- 工具未安装用 ℹ️ 标记(非错误),不可达用 ⚠️`,
|
|
298
|
+
outputHint: '外部依赖检查结果',
|
|
299
|
+
optional: false
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: '模块文档健康检查',
|
|
303
|
+
prompt: `检查模块索引和卡片文档的健康状态。
|
|
304
|
+
|
|
305
|
+
### 操作
|
|
306
|
+
1. 运行 \`sillyspec modules status\` 查看模块索引概览
|
|
307
|
+
2. 读取 \`.sillyspec/docs/<project>/modules/_module-map.yaml\`
|
|
308
|
+
3. 对每个模块,检查:
|
|
309
|
+
- module_id 是否有对应的卡片文件(modules/<module-id>.md)
|
|
310
|
+
- 卡片文件是否有有效的 frontmatter(schema_version, doc_type, module_id)
|
|
311
|
+
- 人工备注标记是否配对(MANUAL_NOTES_START 和 MANUAL_NOTES_END 必须成对出现)
|
|
312
|
+
- needs_review 为 true 的模块列表
|
|
313
|
+
4. 汇总结果
|
|
314
|
+
|
|
315
|
+
### 输出格式
|
|
316
|
+
\`\`\`
|
|
317
|
+
📋 模块文档健康检查
|
|
318
|
+
✅ _module-map.yaml — 存在,N 个模块
|
|
319
|
+
⚠️ auth-service — needs_review=true,原因:...
|
|
320
|
+
❌ payment-service — 卡片文件缺失
|
|
321
|
+
✅ 所有模块人工备注标记配对正常
|
|
322
|
+
\`\`\`
|
|
323
|
+
|
|
324
|
+
### 注意
|
|
325
|
+
- 如果 _module-map.yaml 不存在,输出"模块索引未生成,建议运行 scan"
|
|
326
|
+
`,
|
|
327
|
+
outputHint: '模块文档健康状态',
|
|
328
|
+
optional: false
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
name: '决策待复核检查',
|
|
332
|
+
prompt: `检查决策知识库(knowledge/decisions/)的待复核状态(advisory,不阻断)。
|
|
333
|
+
|
|
334
|
+
### 操作
|
|
335
|
+
运行 docs-check 决策规则族(锚点存在性 + behind 阈值复核,task: 2026-08-23-adopt-harness-practices):
|
|
336
|
+
|
|
337
|
+
\`\`\`bash
|
|
338
|
+
# 定位 sillyspec 源码根:sillyspec 本仓 dogfood 优先用仓内源码(全局安装版本可能落后于本检查项);
|
|
339
|
+
# 其余场景经 bin 符号链接解析到安装包根;均不可得时降级跳过
|
|
340
|
+
SRC_ROOT=""
|
|
341
|
+
if grep -q '"name": *"sillyspec"' package.json 2>/dev/null && [ -f "src/docs-check.js" ]; then
|
|
342
|
+
SRC_ROOT="$PWD"
|
|
343
|
+
else
|
|
344
|
+
BIN=$(command -v sillyspec)
|
|
345
|
+
if [ -n "$BIN" ]; then
|
|
346
|
+
SRC_ROOT=$(node -e 'const fs=require("fs");const p=fs.realpathSync(process.argv[1]).replace(/\\\\/g,"/");const i=p.lastIndexOf("/bin/sillyspec.js");console.log(i===-1?"":p.slice(0,i));' "$BIN")
|
|
347
|
+
fi
|
|
348
|
+
fi
|
|
349
|
+
if [ -z "$SRC_ROOT" ]; then
|
|
350
|
+
echo "ℹ️ 无法定位 sillyspec 源码(非 sillyspec 仓且未安装 sillyspec 命令),跳过决策待复核检查"
|
|
351
|
+
else
|
|
352
|
+
node --input-type=module -e '
|
|
353
|
+
import { readFileSync, existsSync } from "node:fs";
|
|
354
|
+
import { pathToFileURL } from "node:url";
|
|
355
|
+
let specBase = process.argv[2];
|
|
356
|
+
if (existsSync(".sillyspec-platform.json")) {
|
|
357
|
+
try { const p = JSON.parse(readFileSync(".sillyspec-platform.json", "utf8")); if (p.specRoot) specBase = p.specRoot; } catch {}
|
|
358
|
+
}
|
|
359
|
+
const mod = await import(pathToFileURL(process.argv[1] + "/docs-check.js"));
|
|
360
|
+
const r = await mod.runDecisionRules({ projectRoot: process.cwd(), specBase: specBase });
|
|
361
|
+
if (r.empty) {
|
|
362
|
+
console.log("ℹ️ 决策库未初始化(" + specBase + "/knowledge/decisions/ 不存在)——冷启动空库,变更归档时 decision-distill 自动积累(R-02)");
|
|
363
|
+
} else if (r.findings.length === 0) {
|
|
364
|
+
console.log("✅ 决策待复核:无信号(" + r.implemented + "/" + r.entries + " 条 implemented,behind 阈值 " + r.threshold + ")");
|
|
365
|
+
} else {
|
|
366
|
+
console.log("⚠️ 决策待复核清单(" + r.findings.length + " 条,advisory 不阻断——D-003):");
|
|
367
|
+
for (const f of r.findings) console.log(" - " + f.message);
|
|
368
|
+
}
|
|
369
|
+
if (r.exempted.length > 0) console.log("ℹ️ 另有 " + r.exempted.length + " 条经 known_failures decisions.* 键豁免: " + r.exempted.map(e => e.key).join(", "));
|
|
370
|
+
' "$SRC_ROOT/src" "$PWD/.sillyspec" || echo "⚠️ 决策规则执行失败(降级跳过,不影响其他检查项)"
|
|
371
|
+
fi
|
|
372
|
+
\`\`\`
|
|
373
|
+
|
|
374
|
+
同步骤追加 CLI 版本漂移检测(D-002 并入既有检查段不新增步骤;D-004 git/version 双轨;advisory 不阻断)——检测全局安装的 sillyspec 流程引擎与当前仓源码是否脱节:
|
|
375
|
+
|
|
376
|
+
\`\`\`bash
|
|
377
|
+
# 安装根独立解析:command -v sillyspec → realpath → 向上找 name=sillyspec 的 package.json
|
|
378
|
+
# 勿复用上方 SRC_ROOT——sillyspec 仓场景它被 dogfood 分支强制指向当前仓,比较恒等(Grill 实证陷阱)
|
|
379
|
+
node --input-type=module -e '
|
|
380
|
+
import { execFileSync } from "node:child_process";
|
|
381
|
+
import { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
382
|
+
import { dirname, join } from "node:path";
|
|
383
|
+
|
|
384
|
+
const run = (cmd, args) => { try { return execFileSync(cmd, args, { encoding: "utf8", timeout: 8000, stdio: ["ignore", "pipe", "pipe"] }).trim(); } catch { return ""; } };
|
|
385
|
+
const pkgOf = (dir) => { try { return JSON.parse(readFileSync(join(dir, "package.json"), "utf8")); } catch { return null; } };
|
|
386
|
+
const short = (h) => h.slice(0, 7);
|
|
387
|
+
|
|
388
|
+
try {
|
|
389
|
+
const cur = pkgOf(process.cwd());
|
|
390
|
+
if (!cur || cur.name !== "sillyspec") process.exit(0); // 当前仓非 sillyspec(消费项目)→ 静默跳过
|
|
391
|
+
const bin = run("sh", ["-c", "command -v sillyspec"]);
|
|
392
|
+
if (!bin) process.exit(0); // 无全局安装 → 静默跳过
|
|
393
|
+
let installRoot = "";
|
|
394
|
+
try {
|
|
395
|
+
let dir = dirname(realpathSync(bin));
|
|
396
|
+
for (;;) {
|
|
397
|
+
const p = pkgOf(dir);
|
|
398
|
+
if (p && p.name === "sillyspec") { installRoot = dir; break; }
|
|
399
|
+
const up = dirname(dir);
|
|
400
|
+
if (up === dir) break;
|
|
401
|
+
dir = up;
|
|
402
|
+
}
|
|
403
|
+
} catch {}
|
|
404
|
+
if (!installRoot) { console.log("⚠️ CLI 版本漂移检测降级:sillyspec 命令存在但未定位到安装根(" + bin + "),跳过比较,不阻断其余检查项"); process.exit(0); }
|
|
405
|
+
if (installRoot === process.cwd()) process.exit(0); // 安装根=当前仓(npm link 自身)→ 恒等不误报
|
|
406
|
+
|
|
407
|
+
// 双轨比较(D-004):
|
|
408
|
+
// git 轨——安装根有 .git(开发态:npm link / file: 链接)→ rev-parse HEAD 双仓 + remote origin 归一化同源判定
|
|
409
|
+
// version 兜底轨——安装根无 .git(安装态:registry 安装 / npm i -g . 拷贝,npm 恒排除 .git)→ 比较双仓 package.json version
|
|
410
|
+
// 盲区声明(R-04):同 version 不同 commit 的源码热改不检测——version 轨只在版本号变更时感知;
|
|
411
|
+
// git 轨管开发态、version 轨管安装态,两轨并集覆盖主流形态
|
|
412
|
+
const inst = pkgOf(installRoot) || {};
|
|
413
|
+
const curVer = cur.version || "?";
|
|
414
|
+
const instVer = inst.version || "?";
|
|
415
|
+
const warn = (detail) => console.log("⚠️ CLI 版本漂移:" + detail + "——全局安装的流程引擎与当前仓源码脱节,归档等流程行为可能滞后(2026-08-23 归档实证踩坑:五步版 archive 驱动六步定义,旧引擎驱动新定义),建议同步(安装根 git pull 或在 sillyspec 仓 npm i -g .)后重跑流程(advisory,不阻断)");
|
|
416
|
+
|
|
417
|
+
if (existsSync(join(installRoot, ".git"))) {
|
|
418
|
+
// remote 归一化:https/ssh 归一、.git 后缀剥离、host 小写——同源才可比较(异源 fork 无从判定 → 静默)
|
|
419
|
+
const normRemote = (u) => {
|
|
420
|
+
if (!u) return "";
|
|
421
|
+
let s = u.trim();
|
|
422
|
+
if (s.indexOf("://") === -1) {
|
|
423
|
+
const scp = s.match(/^([^@\\/]+@)([^:\\/]+):(.+)$/); // scp 形态 git@host:owner/repo.git
|
|
424
|
+
if (scp) s = "https://" + scp[2] + "/" + scp[3];
|
|
425
|
+
}
|
|
426
|
+
s = s.replace(/^ssh:\\/\\//, "https://").replace(/^git:\\/\\//, "https://");
|
|
427
|
+
const m = s.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/(.*)$/);
|
|
428
|
+
const rest = m ? m[1] : s;
|
|
429
|
+
const slash = rest.indexOf("/");
|
|
430
|
+
let host = slash === -1 ? rest : rest.slice(0, slash);
|
|
431
|
+
const tail = slash === -1 ? "" : rest.slice(slash);
|
|
432
|
+
const at = host.indexOf("@");
|
|
433
|
+
if (at !== -1) host = host.slice(at + 1); // 剥 userinfo(ssh://git@… / https://token@…)
|
|
434
|
+
let out = "https://" + host.toLowerCase() + tail;
|
|
435
|
+
out = out.replace(/\\/+$/, "");
|
|
436
|
+
if (out.endsWith(".git")) out = out.slice(0, -4);
|
|
437
|
+
return out;
|
|
438
|
+
};
|
|
439
|
+
const curHead = run("git", ["-C", process.cwd(), "rev-parse", "HEAD"]);
|
|
440
|
+
const instHead = run("git", ["-C", installRoot, "rev-parse", "HEAD"]);
|
|
441
|
+
if (!curHead || !instHead) { console.log("⚠️ CLI 版本漂移检测降级:git 轨 rev-parse 失败(当前仓=" + (curHead ? "ok" : "fail") + " 安装根=" + (instHead ? "ok" : "fail") + "),跳过比较,不阻断其余检查项"); process.exit(0); }
|
|
442
|
+
const curRemote = normRemote(run("git", ["-C", process.cwd(), "remote", "get-url", "origin"]));
|
|
443
|
+
const instRemote = normRemote(run("git", ["-C", installRoot, "remote", "get-url", "origin"]));
|
|
444
|
+
if (curRemote && instRemote && curRemote !== instRemote) process.exit(0); // 非同源 → 静默
|
|
445
|
+
if (curHead !== instHead) warn("全局安装 " + installRoot + "(version " + instVer + " / commit " + short(instHead) + ")与当前仓(version " + curVer + " / HEAD " + short(curHead) + ")不一致");
|
|
446
|
+
// 同 commit → 一致静默
|
|
447
|
+
} else if (instVer !== curVer) {
|
|
448
|
+
warn("全局安装 " + installRoot + "(version " + instVer + ")与当前仓(version " + curVer + ")不一致(安装根无 .git,走 version 兜底轨)");
|
|
449
|
+
// 同 version → 一致静默(同 version 不同 commit 热改盲区见上方 R-04 注释)
|
|
450
|
+
}
|
|
451
|
+
} catch (e) {
|
|
452
|
+
console.log("⚠️ CLI 版本漂移检测降级:" + (e && e.message ? e.message : String(e)) + "(不阻断其余检查项)");
|
|
453
|
+
}
|
|
454
|
+
' || echo "⚠️ CLI 版本漂移检测降级:脚本执行失败(不阻断其余检查项)"
|
|
455
|
+
\`\`\`
|
|
456
|
+
|
|
457
|
+
### 输出格式
|
|
458
|
+
\`\`\`
|
|
459
|
+
📋 决策待复核
|
|
460
|
+
✅ 决策待复核:无信号(3/5 条 implemented,behind 阈值 10)
|
|
461
|
+
⚠️ 决策待复核清单(1 条,advisory 不阻断——D-003):
|
|
462
|
+
- 「D-012@v1」决策待复核:锚定模块 docs-consistency 在最近确认 a1b2c3d 后源码已前进 15 commit,超阈值 10
|
|
463
|
+
ℹ️ 决策库未初始化 —— 冷启动空库(R-02)
|
|
464
|
+
|
|
465
|
+
⚠️ CLI 版本漂移:全局安装 /path/to/sillyspec(version 3.26.0 / commit a1b2c3d)与当前仓(version 3.27.3 / HEAD e4f5a6b)不一致——全局安装的流程引擎与当前仓源码脱节,建议同步后重跑流程(仅漂移时输出;一致/非 sillyspec 仓/无全局安装/安装根=当前仓均静默)
|
|
466
|
+
\`\`\`
|
|
467
|
+
|
|
468
|
+
### 注意
|
|
469
|
+
- 本检查项为 advisory(只 ⚠️ 不 ❌),不作为修复阻断项
|
|
470
|
+
- 待复核的复核再确认由用户完成:确认决策仍成立后,把条目「最近确认」更新为当前 HEAD——不要自动改写
|
|
471
|
+
- 全程只读,不修改 knowledge/decisions/ 下任何文件
|
|
472
|
+
- CLI 版本漂移检测(同步骤追加段,D-002/D-004)同为 advisory:漂移时一行警告;一致、非 sillyspec 仓消费场景、无全局安装、安装根=当前仓(npm link 自身)均静默;探测失败降级单行,不阻断其余检查项`,
|
|
473
|
+
outputHint: '决策待复核清单',
|
|
474
|
+
optional: false
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
name: '汇总报告',
|
|
478
|
+
prompt: `汇总前面各步的所有检查结果,生成最终的自检报告。
|
|
479
|
+
|
|
480
|
+
### 输出格式
|
|
481
|
+
\`\`\`
|
|
482
|
+
🔍 SillySpec Doctor — 项目自检报告
|
|
483
|
+
|
|
484
|
+
## SillySpec 内部
|
|
485
|
+
✅ .sillyspec/ 目录结构 — 正常
|
|
486
|
+
✅ projects/*.yaml — N 个项目已注册
|
|
487
|
+
⚠️ local.yaml (xxx) — 缺少 test 命令
|
|
488
|
+
❌ sillyspec.db 阶段状态 — brainstorm 标记完成但 design.md 不存在
|
|
489
|
+
|
|
490
|
+
## 构建环境
|
|
491
|
+
✅ Node.js v23.4.0 — 可用
|
|
492
|
+
✅ npm 10.x — 可用
|
|
493
|
+
✅ Java 17.0.2 — 可用
|
|
494
|
+
❌ Maven 私服 (10.0.0.1:8081) — 不可达(超时)
|
|
495
|
+
|
|
496
|
+
## 外部依赖
|
|
497
|
+
✅ Context7 MCP — 已配置
|
|
498
|
+
⚠️ grep.app — 不可达
|
|
499
|
+
|
|
500
|
+
## 决策待复核(advisory)
|
|
501
|
+
⚠️ 「D-012@v1」— 锚定模块源码 behind 15 超阈值 10(复核后更新「最近确认」)
|
|
502
|
+
|
|
503
|
+
## CLI 版本漂移(advisory)
|
|
504
|
+
⚠️ 全局安装 sillyspec(version 3.26.0 / commit a1b2c3d)与当前仓(version 3.27.3 / HEAD e4f5a6b)不一致 — 同步后重跑流程
|
|
505
|
+
\`\`\`
|
|
506
|
+
|
|
507
|
+
### 要求
|
|
508
|
+
- 基于前 3 步的实际输出汇总,不要编造
|
|
509
|
+
- 每类问题归入对应分区
|
|
510
|
+
- 全部通过给出 🎉
|
|
511
|
+
- 如果有 ❌ 或 ⚠️,在末尾逐项给出修复建议
|
|
512
|
+
|
|
513
|
+
### 修复建议模板
|
|
514
|
+
根据问题类型给出具体可操作的修复命令:
|
|
515
|
+
|
|
516
|
+
**常见问题及修复:**
|
|
517
|
+
- CLI 未安装 → \`npm install -g sillyspec\`
|
|
518
|
+
- 缺少 local.yaml → \`sillyspec local detect\` 重新生成,或手动创建
|
|
519
|
+
- local.yaml 缺少 test 命令 → 补充对应命令
|
|
520
|
+
- 缺少 scan 文档(ARCHITECTURE.md 等)→ \`sillyspec run scan\` 重新扫描
|
|
521
|
+
- sillyspec.db 状态不一致 → \`sillyspec run <阶段> --reset\` 重置对应阶段
|
|
522
|
+
- 孤儿目录 → 确认后 \`rm -rf .sillyspec/changes/<目录名>\`
|
|
523
|
+
- Maven 私服不可达 → 检查 VPN、settings.xml 配置、私服状态
|
|
524
|
+
- Git remote 不可达 → 检查网络、SSH key 或凭证
|
|
525
|
+
- CLI 版本漂移(全局安装落后于当前仓)→ 在 sillyspec 仓执行 \`npm i -g .\` 重新全局安装(或安装根 git pull),同步后重跑流程
|
|
526
|
+
- 工具未安装 → 给出安装命令(如 \`brew install maven\`)
|
|
527
|
+
|
|
528
|
+
**状态错乱补 postmortem(advisory,不强制):**
|
|
529
|
+
若本次自检检出状态错乱或不一致(sillyspec.db 阶段状态与实际产出不符、孤儿目录、僵尸 quick 会话等)并已修复,建议补一条轻量 postmortem 记录进 QUICKLOG(走 quick 流程或既有条目正文核对),根因块内按列表行写四子字段:\`- 现象:\`(错乱表现)、\`- 根因:\`(深层原因)、\`- 护栏:\`(防再犯措施)、\`- 证据:\`(可追溯路径——\`sillyspec agent-log --json\` 输出的本地会话日志 jsonl 路径、相关变更 review.json、verify-result.md)。护栏结论经人工确认后归入 \`.sillyspec/knowledge/known-issues.md\`——走既有 knowledge 追加链路(先入 knowledge/uncategorized.md,经知识整理确认后归类),不新建链路不新建命令。
|
|
530
|
+
|
|
531
|
+
每条建议格式:
|
|
532
|
+
\`\`\`
|
|
533
|
+
💡 修复:<问题描述>
|
|
534
|
+
<具体命令或操作>
|
|
535
|
+
\`\`\``,
|
|
536
|
+
outputHint: '完整自检报告',
|
|
537
|
+
optional: false
|
|
538
|
+
}
|
|
539
|
+
]
|
|
540
|
+
}
|