cc-devflow 4.2.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/cc-act/CHANGELOG.md +64 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +212 -0
- package/.claude/skills/cc-act/SKILL.md +322 -0
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +64 -0
- package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +25 -0
- package/.claude/skills/cc-act/references/closure-contract.md +49 -0
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +83 -0
- package/.claude/skills/cc-act/scripts/archive-requirement.sh +49 -0
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +240 -0
- package/.claude/skills/cc-act/scripts/detect-ship-target.sh +82 -0
- package/.claude/skills/cc-act/scripts/generate-status-report.sh +83 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +195 -0
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +315 -0
- package/.claude/skills/cc-act/scripts/verify-act-gate.sh +63 -0
- package/.claude/skills/cc-check/CHANGELOG.md +73 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +153 -0
- package/.claude/skills/cc-check/SKILL.md +345 -0
- package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +50 -0
- package/.claude/skills/cc-check/references/gate-contract.md +29 -0
- package/.claude/skills/cc-check/references/review-contract.md +45 -0
- package/.claude/skills/cc-check/scripts/render-report-card.js +229 -0
- package/.claude/skills/cc-check/scripts/run-quality-gates.sh +86 -0
- package/.claude/skills/cc-check/scripts/verify-gate.sh +57 -0
- package/.claude/skills/cc-do/CHANGELOG.md +49 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +119 -0
- package/.claude/skills/cc-do/SKILL.md +216 -0
- package/.claude/skills/cc-do/references/execution-recovery.md +86 -0
- package/.claude/skills/cc-do/references/parallel-dispatch.md +80 -0
- package/.claude/skills/cc-do/scripts/build-task-context.sh +184 -0
- package/.claude/skills/cc-do/scripts/cc-do-common.sh +79 -0
- package/.claude/skills/cc-do/scripts/check-task-status.sh +92 -0
- package/.claude/skills/cc-do/scripts/detect-file-conflicts.sh +87 -0
- package/.claude/skills/cc-do/scripts/mark-task-complete.sh +119 -0
- package/.claude/skills/cc-do/scripts/record-review-decision.sh +89 -0
- package/.claude/skills/cc-do/scripts/recover-workflow.sh +84 -0
- package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +70 -0
- package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +135 -0
- package/.claude/skills/cc-do/scripts/verify-task-gates.sh +94 -0
- package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +102 -0
- package/.claude/skills/cc-investigate/CHANGELOG.md +26 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +49 -0
- package/.claude/skills/cc-investigate/SKILL.md +221 -0
- package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +55 -0
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +52 -0
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +103 -0
- package/.claude/skills/cc-investigate/references/investigation-contract.md +28 -0
- package/.claude/skills/cc-investigate/scripts/bootstrap-analysis.sh +38 -0
- package/.claude/skills/cc-plan/CHANGELOG.md +99 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +106 -0
- package/.claude/skills/cc-plan/SKILL.md +325 -0
- package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +155 -0
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +98 -0
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +108 -0
- package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +79 -0
- package/.claude/skills/cc-plan/references/planning-contract.md +82 -0
- package/.claude/skills/cc-plan/scripts/bump-skill-version.sh +103 -0
- package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +75 -0
- package/.claude/skills/cc-plan/scripts/validate-scope.sh +78 -0
- package/.claude/skills/cc-roadmap/CHANGELOG.md +114 -0
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +136 -0
- package/.claude/skills/cc-roadmap/SKILL.md +259 -0
- package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +45 -0
- package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +153 -0
- package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +48 -0
- package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +37 -0
- package/.claude/skills/cc-roadmap/scripts/bump-skill-version.sh +103 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/markdown.js +604 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/query.js +63 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/schema.js +245 -0
- package/.claude/skills/cc-roadmap/scripts/lib/roadmap-tracking/store.js +139 -0
- package/.claude/skills/cc-roadmap/scripts/locate-roadmap-item.sh +109 -0
- package/.claude/skills/cc-roadmap/scripts/roadmap-tracking.js +153 -0
- package/.claude/skills/cc-roadmap/scripts/sync-roadmap-progress.sh +100 -0
- package/.claude/skills/cc-simplify/CHANGELOG.md +10 -0
- package/.claude/skills/cc-simplify/SKILL.md +55 -0
- package/.claude/skills/cc-spec-init/CHANGELOG.md +7 -0
- package/.claude/skills/cc-spec-init/PLAYBOOK.md +55 -0
- package/.claude/skills/cc-spec-init/SKILL.md +127 -0
- package/.claude/skills/cc-spec-init/assets/CAPABILITY_TEMPLATE.md +63 -0
- package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +25 -0
- package/.claude/skills/cc-spec-init/assets/INDEX_TEMPLATE.md +34 -0
- package/.claude/skills/cc-spec-init/references/spec-contract.md +22 -0
- package/.claude/skills/cc-spec-init/scripts/bootstrap-specs.sh +31 -0
- package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +45 -0
- package/CHANGELOG.md +101 -4
- package/README.md +120 -755
- package/README.zh-CN.md +119 -755
- package/bin/adapt.js +2 -6
- package/bin/cc-devflow-cli.js +72 -177
- package/config/distributable-skills.json +24 -0
- package/docs/CLAUDE.md +10 -6
- package/docs/commands/README.md +19 -46
- package/docs/commands/README.zh-CN.md +25 -48
- package/docs/examples/BY-ARTIFACT.md +7 -0
- package/docs/examples/README.md +38 -0
- package/docs/examples/START-HERE.md +149 -0
- package/docs/examples/example-bindings.json +38 -0
- package/docs/examples/full-design-blocked/BACKLOG.md +45 -0
- package/docs/examples/full-design-blocked/README.md +55 -0
- package/docs/examples/full-design-blocked/ROADMAP.md +53 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +154 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +146 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +78 -0
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +52 -0
- package/docs/examples/full-design-blocked/roadmap-tracking.json +50 -0
- package/docs/examples/local-handoff/BACKLOG.md +45 -0
- package/docs/examples/local-handoff/README.md +56 -0
- package/docs/examples/local-handoff/ROADMAP.md +45 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +39 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +29 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +71 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +98 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +59 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +44 -0
- package/docs/examples/local-handoff/roadmap-tracking.json +48 -0
- package/docs/examples/pdca-loop/BACKLOG.md +46 -0
- package/docs/examples/pdca-loop/README.md +58 -0
- package/docs/examples/pdca-loop/ROADMAP.md +133 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +72 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +29 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +72 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +201 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +73 -0
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +44 -0
- package/docs/examples/pdca-loop/roadmap-tracking.json +114 -0
- package/docs/examples/scripts/check-example-bindings.sh +116 -0
- package/docs/guides/getting-started.md +94 -129
- package/docs/guides/getting-started.zh-CN.md +103 -84
- package/docs/skill-runtime-migration.md +46 -0
- package/docs/v4.3.0-migration-guide.md +111 -0
- package/lib/compiler/CLAUDE.md +55 -84
- package/lib/compiler/__tests__/drift.test.js +1 -1
- package/lib/compiler/__tests__/errors.test.js +0 -1
- package/lib/compiler/__tests__/integration.test.js +49 -3
- package/lib/compiler/__tests__/manifest.test.js +0 -156
- package/lib/compiler/__tests__/parser.test.js +33 -104
- package/lib/compiler/__tests__/schemas.test.js +30 -34
- package/lib/compiler/__tests__/skills-registry.test.js +114 -0
- package/lib/compiler/__tests__/transformer.test.js +5 -9
- package/lib/compiler/emitters/antigravity-emitter.js +5 -213
- package/lib/compiler/emitters/base-emitter.js +3 -298
- package/lib/compiler/emitters/codex-emitter.js +4 -202
- package/lib/compiler/emitters/cursor-emitter.js +3 -287
- package/lib/compiler/emitters/qwen-emitter.js +4 -176
- package/lib/compiler/index.js +65 -345
- package/lib/compiler/manifest.js +6 -68
- package/lib/compiler/parser.js +31 -63
- package/lib/compiler/platforms.js +32 -277
- package/lib/compiler/resource-copier.js +176 -6
- package/lib/compiler/rules-emitters/__tests__/antigravity-rules-emitter.test.js +3 -3
- package/lib/compiler/rules-emitters/__tests__/cursor-rules-emitter.test.js +14 -4
- package/lib/compiler/rules-emitters/__tests__/qwen-rules-emitter.test.js +16 -7
- package/lib/compiler/rules-emitters/antigravity-rules-emitter.js +10 -15
- package/lib/compiler/rules-emitters/base-rules-emitter.js +5 -5
- package/lib/compiler/rules-emitters/cursor-rules-emitter.js +7 -12
- package/lib/compiler/rules-emitters/index.js +6 -3
- package/lib/compiler/rules-emitters/qwen-rules-emitter.js +7 -7
- package/lib/compiler/schemas.js +8 -4
- package/lib/compiler/skills-registry.js +213 -15
- package/lib/compiler/transformer.js +1 -1
- package/lib/skill-runtime/CLAUDE.md +19 -0
- package/lib/skill-runtime/__tests__/autopilot.test.js +210 -0
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +181 -0
- package/lib/skill-runtime/__tests__/delegation.test.js +97 -0
- package/lib/skill-runtime/__tests__/dispatch.test.js +267 -0
- package/lib/skill-runtime/__tests__/intent.test.js +219 -0
- package/lib/skill-runtime/__tests__/lifecycle.test.js +169 -0
- package/lib/skill-runtime/__tests__/paths.test.js +42 -0
- package/lib/skill-runtime/__tests__/planner.tdd.test.js +250 -0
- package/lib/skill-runtime/__tests__/prepare-pr.test.js +139 -0
- package/lib/skill-runtime/__tests__/query.test.js +284 -0
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +279 -0
- package/lib/skill-runtime/__tests__/schemas.test.js +207 -0
- package/lib/skill-runtime/__tests__/team-state.test.js +51 -0
- package/lib/skill-runtime/__tests__/worker-run.test.js +253 -0
- package/lib/skill-runtime/__tests__/worker.test.js +56 -0
- package/lib/skill-runtime/artifacts.js +93 -0
- package/lib/skill-runtime/delegation.js +533 -0
- package/lib/skill-runtime/index.js +34 -0
- package/lib/skill-runtime/intent.js +333 -0
- package/lib/skill-runtime/lifecycle.js +294 -0
- package/lib/skill-runtime/operations/CLAUDE.md +19 -0
- package/lib/skill-runtime/operations/approve.js +66 -0
- package/lib/skill-runtime/operations/autopilot-core.js +337 -0
- package/lib/skill-runtime/operations/autopilot-execution.js +307 -0
- package/lib/skill-runtime/operations/autopilot-shared.js +48 -0
- package/lib/skill-runtime/operations/autopilot.js +163 -0
- package/lib/skill-runtime/operations/dispatch.js +454 -0
- package/lib/skill-runtime/operations/init.js +64 -0
- package/lib/{harness → skill-runtime}/operations/janitor.js +9 -6
- package/lib/skill-runtime/operations/plan.js +59 -0
- package/lib/skill-runtime/operations/prepare-pr.js +25 -0
- package/lib/{harness → skill-runtime}/operations/release.js +18 -5
- package/lib/skill-runtime/operations/resume.js +143 -0
- package/lib/skill-runtime/operations/snapshot.js +45 -0
- package/lib/skill-runtime/operations/verify.js +170 -0
- package/lib/skill-runtime/operations/worker-run.js +529 -0
- package/lib/skill-runtime/operations/worker.js +33 -0
- package/lib/skill-runtime/paths.js +213 -0
- package/lib/skill-runtime/planner.js +519 -0
- package/lib/skill-runtime/query.js +157 -0
- package/lib/skill-runtime/review.js +557 -0
- package/lib/skill-runtime/schemas.js +400 -0
- package/lib/{harness → skill-runtime}/store.js +45 -30
- package/lib/skill-runtime/team-state.js +122 -0
- package/package.json +13 -11
- package/.claude/CLAUDE.md +0 -125
- package/.claude/agents/architecture-designer.md +0 -443
- package/.claude/agents/bug-analyzer.md +0 -381
- package/.claude/agents/checklist-agent.md +0 -175
- package/.claude/agents/clarify-analyst.md +0 -50
- package/.claude/agents/code-quality-reviewer.md +0 -205
- package/.claude/agents/code-reviewer.md +0 -71
- package/.claude/agents/codex-analyzer.md +0 -39
- package/.claude/agents/compatibility-checker.md +0 -579
- package/.claude/agents/consistency-checker.md +0 -532
- package/.claude/agents/dev-implementer.md +0 -195
- package/.claude/agents/flow-researcher.md +0 -132
- package/.claude/agents/impact-analyzer.md +0 -440
- package/.claude/agents/planner.md +0 -230
- package/.claude/agents/prd-writer.md +0 -320
- package/.claude/agents/project-guidelines-generator.md +0 -1329
- package/.claude/agents/qa-tester.md +0 -313
- package/.claude/agents/release-manager.md +0 -295
- package/.claude/agents/security-reviewer.md +0 -314
- package/.claude/agents/spec-reviewer.md +0 -221
- package/.claude/agents/style-guide-generator.md +0 -458
- package/.claude/agents/tech-architect.md +0 -516
- package/.claude/agents/ui-designer.md +0 -485
- package/.claude/commands/core/architecture.md +0 -459
- package/.claude/commands/core/guidelines.md +0 -511
- package/.claude/commands/core/roadmap.md +0 -468
- package/.claude/commands/core/style.md +0 -83
- package/.claude/commands/flow/CLAUDE.md +0 -28
- package/.claude/commands/flow/archive.md +0 -280
- package/.claude/commands/flow/checklist.md +0 -18
- package/.claude/commands/flow/clarify.md +0 -18
- package/.claude/commands/flow/constitution.md +0 -82
- package/.claude/commands/flow/context.md +0 -150
- package/.claude/commands/flow/delta.md +0 -245
- package/.claude/commands/flow/dev.md +0 -40
- package/.claude/commands/flow/fix.md +0 -217
- package/.claude/commands/flow/ideate.md +0 -214
- package/.claude/commands/flow/init.md +0 -38
- package/.claude/commands/flow/new.md +0 -23
- package/.claude/commands/flow/quality.md +0 -21
- package/.claude/commands/flow/release.md +0 -36
- package/.claude/commands/flow/restart.md +0 -97
- package/.claude/commands/flow/spec.md +0 -36
- package/.claude/commands/flow/status.md +0 -64
- package/.claude/commands/flow/update.md +0 -111
- package/.claude/commands/flow/upgrade.md +0 -115
- package/.claude/commands/flow/verify.md +0 -37
- package/.claude/commands/flow/workspace.md +0 -155
- package/.claude/commands/util/cancel-ralph.md +0 -60
- package/.claude/commands/util/code-review.md +0 -58
- package/.claude/commands/util/git-commit.md +0 -422
- package/.claude/commands/util/problem-analyzer.md +0 -60
- package/.claude/config/quality-gates.yml +0 -305
- package/.claude/config/quality-rules.yml +0 -161
- package/.claude/docs/SPEC_KIT_CONSTITUTION_ANALYSIS.md +0 -426
- package/.claude/docs/design/consistency-conflict-detection-algorithms.md +0 -658
- package/.claude/docs/design/intent-driven-input-design.md +0 -380
- package/.claude/docs/design/prd-version-management-design.md +0 -437
- package/.claude/docs/guides/INIT_TROUBLESHOOTING.md +0 -117
- package/.claude/docs/guides/NEW_TROUBLESHOOTING.md +0 -99
- package/.claude/docs/guides/ROADMAP_TROUBLESHOOTING.md +0 -188
- package/.claude/docs/guides/TASK_COMPLETION_MARKING.md +0 -338
- package/.claude/docs/guides/TEAM_MODE_GUIDE.md +0 -312
- package/.claude/docs/templates/ARCHITECTURE_TEMPLATE.md +0 -633
- package/.claude/docs/templates/ATTEMPT_TEMPLATE.md +0 -156
- package/.claude/docs/templates/BACKLOG_TEMPLATE.md +0 -261
- package/.claude/docs/templates/BRAINSTORM_TEMPLATE.md +0 -148
- package/.claude/docs/templates/CHECKLIST_TEMPLATE.md +0 -52
- package/.claude/docs/templates/CLARIFICATION_REPORT_TEMPLATE.md +0 -206
- package/.claude/docs/templates/CODE_REVIEW_TEMPLATE.md +0 -71
- package/.claude/docs/templates/DELTA_SPEC_TEMPLATE.md +0 -91
- package/.claude/docs/templates/DESIGN_DECISIONS_TEMPLATE.md +0 -151
- package/.claude/docs/templates/EPIC_TEMPLATE.md +0 -805
- package/.claude/docs/templates/ERROR_LOG_TEMPLATE.md +0 -80
- package/.claude/docs/templates/INIT_FLOW_TEMPLATE.md +0 -198
- package/.claude/docs/templates/INTENT_CLARIFICATION_TEMPLATE.md +0 -57
- package/.claude/docs/templates/JOURNAL_TEMPLATE.md +0 -75
- package/.claude/docs/templates/NEW_ORCHESTRATION_TEMPLATE.md +0 -76
- package/.claude/docs/templates/PRD_TEMPLATE.md +0 -562
- package/.claude/docs/templates/RESEARCH_TEMPLATE.md +0 -276
- package/.claude/docs/templates/REVIEW-HIGH.md +0 -57
- package/.claude/docs/templates/ROADMAP_DIALOGUE_TEMPLATE.md +0 -198
- package/.claude/docs/templates/ROADMAP_TEMPLATE.md +0 -310
- package/.claude/docs/templates/STYLE_TEMPLATE.md +0 -1266
- package/.claude/docs/templates/TASKS_TEMPLATE.md +0 -523
- package/.claude/docs/templates/TECH_DESIGN_TEMPLATE.md +0 -1019
- package/.claude/docs/templates/UI_PROTOTYPE_TEMPLATE.md +0 -1435
- package/.claude/docs/templates/_shared/CLAUDE.md +0 -36
- package/.claude/docs/templates/_shared/CONSTITUTION_CHECK.md +0 -125
- package/.claude/docs/templates/_shared/VALIDATION_CHECKLIST.md +0 -187
- package/.claude/docs/templates/_shared/YAML_FRONTMATTER.md +0 -164
- package/.claude/docs/templates/context/dev.jsonl.template +0 -6
- package/.claude/docs/templates/context/epic.jsonl.template +0 -5
- package/.claude/docs/templates/context/prd.jsonl.template +0 -4
- package/.claude/docs/templates/context/research.jsonl.template +0 -4
- package/.claude/docs/templates/context/review.jsonl.template +0 -5
- package/.claude/docs/templates/context/tech.jsonl.template +0 -5
- package/.claude/guides/agent-guides/agent-coordination-guide.md +0 -459
- package/.claude/guides/project-guidelines-system.md +0 -463
- package/.claude/guides/technical-guides/datetime-handling-guide.md +0 -563
- package/.claude/guides/technical-guides/git-github-guide.md +0 -642
- package/.claude/guides/technical-guides/test-execution-guide.md +0 -618
- package/.claude/guides/workflow-guides/bug-fix-orchestrator.md +0 -217
- package/.claude/guides/workflow-guides/flow-orchestrator.md +0 -48
- package/.claude/hooks/CLAUDE.md +0 -342
- package/.claude/hooks/checklist-gate.js +0 -397
- package/.claude/hooks/error-handling-reminder.sh +0 -12
- package/.claude/hooks/error-handling-reminder.ts +0 -459
- package/.claude/hooks/hooks.json +0 -15
- package/.claude/hooks/inject-agent-context.ts +0 -480
- package/.claude/hooks/inject-skill-context.ts +0 -359
- package/.claude/hooks/post-tool-use-tracker.sh +0 -280
- package/.claude/hooks/pre-tool-use-guardrail.sh +0 -36
- package/.claude/hooks/pre-tool-use-guardrail.ts +0 -342
- package/.claude/hooks/ralph-loop.ts +0 -931
- package/.claude/hooks/ralph-stop-hook.sh +0 -190
- package/.claude/hooks/skill-activation-prompt.sh +0 -36
- package/.claude/hooks/skill-activation-prompt.ts +0 -214
- package/.claude/hooks/state/skills-used-test-guard.json +0 -3
- package/.claude/hooks/task-completed-hook.ts +0 -593
- package/.claude/hooks/teammate-idle-hook.ts +0 -690
- package/.claude/hooks/types/team-types.d.ts +0 -238
- package/.claude/rules/devflow-conventions.md +0 -286
- package/.claude/rules/project-constitution.md +0 -1002
- package/.claude/rules/rationalization-library.md +0 -282
- package/.claude/schemas/constitution.schema.json +0 -43
- package/.claude/scripts/CLAUDE.md +0 -76
- package/.claude/scripts/analyze-upgrade-impact.sh +0 -200
- package/.claude/scripts/archive-requirement.sh +0 -394
- package/.claude/scripts/calculate-checklist-completion.sh +0 -243
- package/.claude/scripts/calculate-quarter.sh +0 -206
- package/.claude/scripts/check-dependencies.sh +0 -409
- package/.claude/scripts/check-prerequisites.sh +0 -232
- package/.claude/scripts/check-task-status.sh +0 -288
- package/.claude/scripts/checklist-errors.sh +0 -131
- package/.claude/scripts/common.sh +0 -1102
- package/.claude/scripts/consolidate-research.sh +0 -182
- package/.claude/scripts/create-requirement.sh +0 -451
- package/.claude/scripts/delta-parser.ts +0 -527
- package/.claude/scripts/detect-file-conflicts.sh +0 -151
- package/.claude/scripts/export-contracts.sh +0 -117
- package/.claude/scripts/extract-data-model.sh +0 -78
- package/.claude/scripts/flow-context-add.sh +0 -134
- package/.claude/scripts/flow-context-init.sh +0 -133
- package/.claude/scripts/flow-context-validate.sh +0 -144
- package/.claude/scripts/flow-delta-apply.sh +0 -297
- package/.claude/scripts/flow-delta-archive.sh +0 -71
- package/.claude/scripts/flow-delta-create.sh +0 -202
- package/.claude/scripts/flow-delta-list.sh +0 -142
- package/.claude/scripts/flow-delta-status.sh +0 -235
- package/.claude/scripts/flow-quality-full.sh +0 -215
- package/.claude/scripts/flow-quality-quick.sh +0 -119
- package/.claude/scripts/flow-workspace-init.sh +0 -117
- package/.claude/scripts/flow-workspace-record.sh +0 -164
- package/.claude/scripts/generate-clarification-questions.sh +0 -377
- package/.claude/scripts/generate-clarification-report.sh +0 -463
- package/.claude/scripts/generate-quickstart.sh +0 -146
- package/.claude/scripts/generate-research-tasks.sh +0 -157
- package/.claude/scripts/generate-status-report.sh +0 -523
- package/.claude/scripts/generate-tech-analysis.sh +0 -46
- package/.claude/scripts/get-workflow-status.sh +0 -415
- package/.claude/scripts/locate-requirement-in-roadmap.sh +0 -233
- package/.claude/scripts/manage-constitution.sh +0 -602
- package/.claude/scripts/mark-task-complete.sh +0 -198
- package/.claude/scripts/parse-task-dependencies.js +0 -334
- package/.claude/scripts/populate-research-tasks.sh +0 -284
- package/.claude/scripts/record-quality-error.sh +0 -165
- package/.claude/scripts/recover-workflow.sh +0 -463
- package/.claude/scripts/run-clarify-scan.sh +0 -601
- package/.claude/scripts/run-high-review.sh +0 -62
- package/.claude/scripts/run-problem-analysis.sh +0 -68
- package/.claude/scripts/run-quality-gates.sh +0 -242
- package/.claude/scripts/setup-epic.sh +0 -173
- package/.claude/scripts/setup-ralph-loop.sh +0 -155
- package/.claude/scripts/sync-roadmap-progress.sh +0 -300
- package/.claude/scripts/sync-task-marks.sh +0 -199
- package/.claude/scripts/team-dev-init.sh +0 -319
- package/.claude/scripts/team-state-recovery.sh +0 -229
- package/.claude/scripts/test-clarify-scan.sh +0 -515
- package/.claude/scripts/update-agent-context.sh +0 -806
- package/.claude/scripts/validate-constitution.sh +0 -567
- package/.claude/scripts/validate-hooks.sh +0 -487
- package/.claude/scripts/validate-research.sh +0 -332
- package/.claude/scripts/validate-scope-boundary.sh +0 -493
- package/.claude/scripts/verify-gate.sh +0 -269
- package/.claude/scripts/verify-setup.sh +0 -37
- package/.claude/scripts/workflow-status.ts +0 -433
- package/.claude/settings.json +0 -95
- package/.claude/skills/_reference-implementations/README.md +0 -96
- package/.claude/skills/_reference-implementations/backend-express-prisma/SKILL.md +0 -302
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/architecture-overview.md +0 -451
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/async-and-errors.md +0 -307
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/complete-examples.md +0 -638
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/configuration.md +0 -275
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/database-patterns.md +0 -224
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/middleware-guide.md +0 -213
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/routing-and-controllers.md +0 -756
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/sentry-and-monitoring.md +0 -336
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/services-and-repositories.md +0 -789
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/testing-guide.md +0 -235
- package/.claude/skills/_reference-implementations/backend-express-prisma/resources/validation-patterns.md +0 -754
- package/.claude/skills/_reference-implementations/frontend-react-mui/SKILL.md +0 -399
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/common-patterns.md +0 -331
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/complete-examples.md +0 -872
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/component-patterns.md +0 -502
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/data-fetching.md +0 -767
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/file-organization.md +0 -502
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/loading-and-error-states.md +0 -501
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/performance.md +0 -406
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/routing-guide.md +0 -364
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/styling-guide.md +0 -428
- package/.claude/skills/_reference-implementations/frontend-react-mui/resources/typescript-standards.md +0 -418
- package/.claude/skills/cc-devflow-orchestrator/SKILL.md +0 -169
- package/.claude/skills/domain/attention-refresh/SKILL.md +0 -170
- package/.claude/skills/domain/brainstorming/SKILL.md +0 -161
- package/.claude/skills/domain/debugging/SKILL.md +0 -221
- package/.claude/skills/domain/finishing-branch/SKILL.md +0 -189
- package/.claude/skills/domain/receiving-review/SKILL.md +0 -153
- package/.claude/skills/domain/tdd/SKILL.md +0 -218
- package/.claude/skills/domain/verification/SKILL.md +0 -158
- package/.claude/skills/guardrail/constitution-guardian/SKILL.md +0 -306
- package/.claude/skills/guardrail/tdd-enforcer/SKILL.md +0 -192
- package/.claude/skills/skill-rules.json +0 -359
- package/.claude/skills/utility/constitution-quick-ref/SKILL.md +0 -374
- package/.claude/skills/utility/file-standards/SKILL.md +0 -353
- package/.claude/skills/utility/fractal-docs/SKILL.md +0 -45
- package/.claude/skills/utility/journey-checker/SKILL.md +0 -199
- package/.claude/skills/utility/journey-checker/pressure-scenarios.md +0 -164
- package/.claude/skills/utility/npm-release/SKILL.md +0 -314
- package/.claude/skills/utility/skill-creator/LICENSE.txt +0 -202
- package/.claude/skills/utility/skill-creator/SKILL.md +0 -356
- package/.claude/skills/utility/skill-creator/references/output-patterns.md +0 -82
- package/.claude/skills/utility/skill-creator/references/workflows.md +0 -28
- package/.claude/skills/utility/skill-creator/scripts/init_skill.py +0 -303
- package/.claude/skills/utility/skill-creator/scripts/package_skill.py +0 -110
- package/.claude/skills/utility/skill-creator/scripts/quick_validate.py +0 -95
- package/.claude/skills/workflow/CLAUDE.md +0 -24
- package/.claude/skills/workflow/flow-dev/CLAUDE.md +0 -16
- package/.claude/skills/workflow/flow-dev/SKILL.md +0 -94
- package/.claude/skills/workflow/flow-dev/assets/IMPLEMENTATION_PLAN_TEMPLATE.md +0 -71
- package/.claude/skills/workflow/flow-dev/context.jsonl +0 -4
- package/.claude/skills/workflow/flow-dev/dev-implementer.jsonl +0 -8
- package/.claude/skills/workflow/flow-dev/scripts/entry-gate.sh +0 -116
- package/.claude/skills/workflow/flow-dev/scripts/exit-gate.sh +0 -101
- package/.claude/skills/workflow/flow-dev/scripts/task-orchestrator.sh +0 -106
- package/.claude/skills/workflow/flow-fix/SKILL.md +0 -105
- package/.claude/skills/workflow/flow-fix/context.jsonl +0 -6
- package/.claude/skills/workflow/flow-fix/references/bug-analyzer.md +0 -381
- package/.claude/skills/workflow/flow-init/SKILL.md +0 -84
- package/.claude/skills/workflow/flow-init/assets/BRAINSTORM_TEMPLATE.md +0 -148
- package/.claude/skills/workflow/flow-init/assets/INIT_FLOW_TEMPLATE.md +0 -198
- package/.claude/skills/workflow/flow-init/assets/RESEARCH_TEMPLATE.md +0 -276
- package/.claude/skills/workflow/flow-init/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-init/references/flow-researcher.md +0 -132
- package/.claude/skills/workflow/flow-init/scripts/check-prerequisites.sh +0 -240
- package/.claude/skills/workflow/flow-init/scripts/consolidate-research.sh +0 -182
- package/.claude/skills/workflow/flow-init/scripts/create-requirement.sh +0 -404
- package/.claude/skills/workflow/flow-init/scripts/generate-research-tasks.sh +0 -157
- package/.claude/skills/workflow/flow-init/scripts/populate-research-tasks.sh +0 -284
- package/.claude/skills/workflow/flow-init/scripts/validate-research.sh +0 -340
- package/.claude/skills/workflow/flow-quality/SKILL.md +0 -98
- package/.claude/skills/workflow/flow-quality/context.jsonl +0 -6
- package/.claude/skills/workflow/flow-quality/references/code-quality-reviewer.md +0 -205
- package/.claude/skills/workflow/flow-quality/references/qa-tester.md +0 -313
- package/.claude/skills/workflow/flow-quality/references/security-reviewer.md +0 -314
- package/.claude/skills/workflow/flow-quality/references/spec-reviewer.md +0 -221
- package/.claude/skills/workflow/flow-release/SKILL.md +0 -49
- package/.claude/skills/workflow/flow-release/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-release/references/release-manager.md +0 -295
- package/.claude/skills/workflow/flow-spec/CLAUDE.md +0 -17
- package/.claude/skills/workflow/flow-spec/SKILL.md +0 -74
- package/.claude/skills/workflow/flow-spec/context.jsonl +0 -5
- package/.claude/skills/workflow/flow-spec/scripts/entry-gate.sh +0 -194
- package/.claude/skills/workflow/flow-spec/scripts/exit-gate.sh +0 -244
- package/.claude/skills/workflow/flow-spec/scripts/parallel-orchestrator.sh +0 -205
- package/.claude/skills/workflow/flow-spec/scripts/team-communication.sh +0 -353
- package/.claude/skills/workflow/flow-spec/scripts/team-init.sh +0 -195
- package/.claude/skills/workflow/flow-spec/scripts/test-team-mode.sh +0 -496
- package/.claude/skills/workflow/flow-spec/team-config.json +0 -165
- package/.claude/skills/workflow/flow-verify/CLAUDE.md +0 -10
- package/.claude/skills/workflow/flow-verify/SKILL.md +0 -53
- package/.claude/skills/workflow/flow-verify/context.jsonl +0 -5
- package/.claude/skills/workflow.yaml +0 -219
- package/.claude/tests/README.md +0 -300
- package/.claude/tests/TODO.md +0 -69
- package/.claude/tests/__pycache__/test_analyze_upgrade_impact.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_consolidate_research.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_export_contracts.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_extract_data_model.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_quickstart.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/__pycache__/test_generate_research_tasks.cpython-311-pytest-7.2.2.pyc +0 -0
- package/.claude/tests/constitution/run_all_constitution_tests.sh +0 -111
- package/.claude/tests/constitution/test_agent_assignment.sh +0 -207
- package/.claude/tests/constitution/test_article_coverage.sh +0 -201
- package/.claude/tests/constitution/test_template_completeness.sh +0 -150
- package/.claude/tests/constitution/test_version_consistency.sh +0 -120
- package/.claude/tests/fixtures/spec_delta_full.md +0 -16
- package/.claude/tests/fixtures/tasks_progress_sample.md +0 -5
- package/.claude/tests/run-all-tests.sh +0 -229
- package/.claude/tests/scripts/run.sh +0 -30
- package/.claude/tests/scripts/test-framework.sh +0 -128
- package/.claude/tests/scripts/test_check_prerequisites.sh +0 -511
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak +0 -504
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak2 +0 -505
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak3 +0 -506
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak4 +0 -507
- package/.claude/tests/scripts/test_check_prerequisites.sh.bak5 +0 -508
- package/.claude/tests/scripts/test_check_task_status.sh +0 -499
- package/.claude/tests/scripts/test_common.sh +0 -244
- package/.claude/tests/scripts/test_generate_status_report.sh +0 -71
- package/.claude/tests/scripts/test_mark_task_complete.sh +0 -441
- package/.claude/tests/scripts/test_mark_task_complete.sh.backup +0 -410
- package/.claude/tests/scripts/test_recover_workflow.sh +0 -304
- package/.claude/tests/scripts/test_setup_epic.sh +0 -437
- package/.claude/tests/scripts/test_sync_task_marks.sh +0 -196
- package/.claude/tests/scripts/test_validate_constitution.sh +0 -74
- package/.claude/tests/scripts/test_validate_research.sh +0 -462
- package/.claude/tests/slugify.bats +0 -82
- package/.claude/tests/test-framework.sh +0 -732
- package/.claude/tests/test_analyze_upgrade_impact.py +0 -34
- package/.claude/tests/test_consolidate_research.py +0 -48
- package/.claude/tests/test_export_contracts.py +0 -43
- package/.claude/tests/test_extract_data_model.py +0 -33
- package/.claude/tests/test_generate_quickstart.py +0 -50
- package/.claude/tests/test_generate_research_tasks.py +0 -52
- package/bin/harness.js +0 -22
- package/docs/commands/core-roadmap.md +0 -106
- package/docs/commands/core-roadmap.zh-CN.md +0 -102
- package/docs/commands/core-style.md +0 -53
- package/docs/commands/core-style.zh-CN.md +0 -53
- package/docs/commands/flow-init.md +0 -140
- package/docs/commands/flow-init.zh-CN.md +0 -169
- package/docs/commands/flow-new.md +0 -39
- package/docs/commands/flow-new.zh-CN.md +0 -39
- package/lib/compiler/__tests__/compile-regression.test.js +0 -103
- package/lib/compiler/__tests__/multi-module-emitters.test.js +0 -534
- package/lib/compiler/__tests__/resource-copier.test.js +0 -26
- package/lib/compiler/__tests__/skill-discovery.test.js +0 -72
- package/lib/compiler/context-expander.js +0 -179
- package/lib/compiler/rules-emitters/__tests__/codex-rules-emitter.test.js +0 -109
- package/lib/compiler/rules-emitters/codex-rules-emitter.js +0 -116
- package/lib/compiler/skill-discovery.js +0 -68
- package/lib/harness/CLAUDE.md +0 -21
- package/lib/harness/cli.js +0 -208
- package/lib/harness/index.js +0 -16
- package/lib/harness/operations/dispatch.js +0 -285
- package/lib/harness/operations/init.js +0 -48
- package/lib/harness/operations/pack.js +0 -100
- package/lib/harness/operations/plan.js +0 -29
- package/lib/harness/operations/resume.js +0 -44
- package/lib/harness/operations/verify.js +0 -163
- package/lib/harness/planner.js +0 -141
- package/lib/harness/schemas.js +0 -108
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# ------------------------------------------------------------
|
|
6
|
+
# 校验任务是否完成 Red / Green / Refactor / Review 闭环
|
|
7
|
+
# ------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
usage() {
|
|
10
|
+
cat <<'EOF'
|
|
11
|
+
Usage:
|
|
12
|
+
verify-task-gates.sh --dir path/to/change --task T001
|
|
13
|
+
EOF
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
+
source "$SCRIPT_DIR/cc-do-common.sh"
|
|
18
|
+
REQ_DIR=""
|
|
19
|
+
TASK_ID=""
|
|
20
|
+
|
|
21
|
+
while [[ $# -gt 0 ]]; do
|
|
22
|
+
case "$1" in
|
|
23
|
+
--dir) REQ_DIR="$2"; shift 2 ;;
|
|
24
|
+
--task) TASK_ID="$(echo "$2" | tr '[:lower:]' '[:upper:]')"; shift 2 ;;
|
|
25
|
+
-h|--help) usage; exit 0 ;;
|
|
26
|
+
*) echo "Unknown arg: $1" >&2; usage; exit 1 ;;
|
|
27
|
+
esac
|
|
28
|
+
done
|
|
29
|
+
|
|
30
|
+
if [[ -z "$REQ_DIR" || -z "$TASK_ID" ]]; then
|
|
31
|
+
usage
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
|
|
36
|
+
manifest="$(req_do_manifest_path "$CHANGE_DIR")"
|
|
37
|
+
runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
|
|
38
|
+
events_file="$runtime_task_dir/events.jsonl"
|
|
39
|
+
checkpoint_file="$runtime_task_dir/checkpoint.json"
|
|
40
|
+
|
|
41
|
+
if [[ ! -f "$checkpoint_file" ]]; then
|
|
42
|
+
echo "Missing $checkpoint_file" >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
checkpoint_status="$(jq -r '.status // "unknown"' "$checkpoint_file" 2>/dev/null || echo unknown)"
|
|
47
|
+
[[ "$checkpoint_status" == "passed" ]] || {
|
|
48
|
+
echo "Task $TASK_ID checkpoint status is not passed" >&2
|
|
49
|
+
exit 1
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
spec_verdict="$(jq -r --arg task "$TASK_ID" '.tasks[] | select(.id == $task) | .reviews.spec // "pending"' "$manifest" 2>/dev/null || echo pending)"
|
|
53
|
+
code_verdict="$(jq -r --arg task "$TASK_ID" '.tasks[] | select(.id == $task) | .reviews.code // "pending"' "$manifest" 2>/dev/null || echo pending)"
|
|
54
|
+
|
|
55
|
+
[[ "$spec_verdict" == "pass" ]] || {
|
|
56
|
+
echo "Task $TASK_ID spec review verdict is not pass" >&2
|
|
57
|
+
exit 1
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[[ "$code_verdict" == "pass" ]] || {
|
|
61
|
+
echo "Task $TASK_ID code review verdict is not pass" >&2
|
|
62
|
+
exit 1
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if [[ -f "$events_file" ]]; then
|
|
66
|
+
events=()
|
|
67
|
+
while IFS= read -r event; do
|
|
68
|
+
events+=("$event")
|
|
69
|
+
done < <(jq -r --arg task "$TASK_ID" 'select(.taskId == $task) | .type' "$events_file")
|
|
70
|
+
|
|
71
|
+
if [[ ${#events[@]} -gt 0 ]]; then
|
|
72
|
+
first_index() {
|
|
73
|
+
local target="$1"
|
|
74
|
+
local index=0
|
|
75
|
+
for event in "${events[@]}"; do
|
|
76
|
+
if [[ "$event" == "$target" ]]; then
|
|
77
|
+
echo "$index"
|
|
78
|
+
return
|
|
79
|
+
fi
|
|
80
|
+
index=$((index + 1))
|
|
81
|
+
done
|
|
82
|
+
echo "-1"
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
red_idx="$(first_index "red_failed")"
|
|
86
|
+
green_idx="$(first_index "green_passed")"
|
|
87
|
+
if [[ "$red_idx" != "-1" && "$green_idx" != "-1" && "$red_idx" -ge "$green_idx" ]]; then
|
|
88
|
+
echo "Task $TASK_ID gate order is invalid" >&2
|
|
89
|
+
exit 1
|
|
90
|
+
fi
|
|
91
|
+
fi
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
echo "Task $TASK_ID gates verified"
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# ------------------------------------------------------------
|
|
6
|
+
# 写入 task checkpoint.json / events.jsonl
|
|
7
|
+
# ------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
usage() {
|
|
10
|
+
cat <<'EOF'
|
|
11
|
+
Usage:
|
|
12
|
+
write-task-checkpoint.sh --dir path/to/change --task T001 --status pending|running|passed|failed|skipped --summary "..." [--event context_ready] [--attempt 0] [--session session-id] [--next-action "..."]
|
|
13
|
+
EOF
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
17
|
+
source "$SCRIPT_DIR/cc-do-common.sh"
|
|
18
|
+
REQ_DIR=""
|
|
19
|
+
TASK_ID=""
|
|
20
|
+
STATUS=""
|
|
21
|
+
SUMMARY=""
|
|
22
|
+
EVENT_TYPE=""
|
|
23
|
+
ATTEMPT="0"
|
|
24
|
+
SESSION_ID=""
|
|
25
|
+
NEXT_ACTION=""
|
|
26
|
+
|
|
27
|
+
while [[ $# -gt 0 ]]; do
|
|
28
|
+
case "$1" in
|
|
29
|
+
--dir) REQ_DIR="$2"; shift 2 ;;
|
|
30
|
+
--task) TASK_ID="$(echo "$2" | tr '[:lower:]' '[:upper:]')"; shift 2 ;;
|
|
31
|
+
--status) STATUS="$2"; shift 2 ;;
|
|
32
|
+
--summary) SUMMARY="$2"; shift 2 ;;
|
|
33
|
+
--event) EVENT_TYPE="$2"; shift 2 ;;
|
|
34
|
+
--attempt) ATTEMPT="$2"; shift 2 ;;
|
|
35
|
+
--session) SESSION_ID="$2"; shift 2 ;;
|
|
36
|
+
--next-action) NEXT_ACTION="$2"; shift 2 ;;
|
|
37
|
+
-h|--help) usage; exit 0 ;;
|
|
38
|
+
*) echo "Unknown arg: $1" >&2; usage; exit 1 ;;
|
|
39
|
+
esac
|
|
40
|
+
done
|
|
41
|
+
|
|
42
|
+
if [[ -z "$REQ_DIR" || -z "$TASK_ID" || -z "$STATUS" || -z "$SUMMARY" ]]; then
|
|
43
|
+
usage
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
|
|
48
|
+
manifest="$(req_do_manifest_path "$CHANGE_DIR")"
|
|
49
|
+
change_id="$(jq -r '.changeId // .requirementId // "REQ-UNKNOWN"' "$manifest" 2>/dev/null || basename "$REQ_DIR")"
|
|
50
|
+
plan_version="$(jq -r '.metadata.planVersion // 1' "$manifest" 2>/dev/null || echo 1)"
|
|
51
|
+
timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
|
|
52
|
+
runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
|
|
53
|
+
|
|
54
|
+
mkdir -p "$runtime_task_dir"
|
|
55
|
+
|
|
56
|
+
if [[ -z "$SESSION_ID" ]]; then
|
|
57
|
+
SESSION_ID="${TASK_ID}-$(date -u +%s)"
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
jq -nc \
|
|
61
|
+
--arg changeId "$change_id" \
|
|
62
|
+
--arg taskId "$TASK_ID" \
|
|
63
|
+
--arg sessionId "$SESSION_ID" \
|
|
64
|
+
--arg planVersion "$plan_version" \
|
|
65
|
+
--arg status "$STATUS" \
|
|
66
|
+
--arg summary "$SUMMARY" \
|
|
67
|
+
--arg timestamp "$timestamp" \
|
|
68
|
+
--arg attempt "$ATTEMPT" \
|
|
69
|
+
'{
|
|
70
|
+
changeId: $changeId,
|
|
71
|
+
taskId: $taskId,
|
|
72
|
+
sessionId: $sessionId,
|
|
73
|
+
planVersion: ($planVersion | tonumber),
|
|
74
|
+
status: $status,
|
|
75
|
+
summary: $summary,
|
|
76
|
+
timestamp: $timestamp,
|
|
77
|
+
attempt: ($attempt | tonumber)
|
|
78
|
+
}' > "$runtime_task_dir/checkpoint.json"
|
|
79
|
+
|
|
80
|
+
if [[ -n "$EVENT_TYPE" || "$STATUS" == "failed" ]]; then
|
|
81
|
+
jq -nc \
|
|
82
|
+
--arg type "${EVENT_TYPE:-status_$STATUS}" \
|
|
83
|
+
--arg changeId "$change_id" \
|
|
84
|
+
--arg taskId "$TASK_ID" \
|
|
85
|
+
--arg sessionId "$SESSION_ID" \
|
|
86
|
+
--arg status "$STATUS" \
|
|
87
|
+
--arg summary "$SUMMARY" \
|
|
88
|
+
--arg nextAction "$NEXT_ACTION" \
|
|
89
|
+
--arg timestamp "$timestamp" \
|
|
90
|
+
'{
|
|
91
|
+
type: $type,
|
|
92
|
+
changeId: $changeId,
|
|
93
|
+
taskId: $taskId,
|
|
94
|
+
sessionId: $sessionId,
|
|
95
|
+
status: $status,
|
|
96
|
+
summary: $summary,
|
|
97
|
+
nextAction: $nextAction,
|
|
98
|
+
timestamp: $timestamp
|
|
99
|
+
}' >> "$runtime_task_dir/events.jsonl"
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
echo "Wrote $runtime_task_dir/checkpoint.json"
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# CC-Investigate Skill Changelog
|
|
2
|
+
|
|
3
|
+
## v1.1.1 - 2026-04-25
|
|
4
|
+
|
|
5
|
+
- require new bug-fix investigations to use `FIX-<number>-<description>` change keys
|
|
6
|
+
- update manifest examples so repair handoffs no longer advertise `REQ-*` for fresh fix work
|
|
7
|
+
|
|
8
|
+
Migration note:
|
|
9
|
+
|
|
10
|
+
- existing `REQ-*` investigation directories can still be read as historical requirement-linked work; new bug-fix work should start with `FIX-*`
|
|
11
|
+
|
|
12
|
+
## v1.1.0 - 2026-04-19
|
|
13
|
+
|
|
14
|
+
- add `change-meta.json` to the investigation output so bug work also preserves capability/spec linkage
|
|
15
|
+
- upgrade `ANALYSIS.md`, debug task handoff, and manifest templates with spec diagnosis and expected spec delta fields
|
|
16
|
+
- teach investigation to classify whether the problem is implementation drift, missing spec truth, or roadmap mismatch
|
|
17
|
+
|
|
18
|
+
Migration note:
|
|
19
|
+
|
|
20
|
+
- investigated bug changes should now refresh or create `devflow/changes/<change-key>/change-meta.json`
|
|
21
|
+
|
|
22
|
+
## v1.0.0 - 2026-04-17
|
|
23
|
+
|
|
24
|
+
- 初始版 `cc-investigate` skill,作为 bug 路径里的专用调查入口。
|
|
25
|
+
- 把根因调查从 `cc-do` 中拆出,形成 `cc-investigate -> cc-do -> cc-check -> cc-act` 的独立闭环。
|
|
26
|
+
- 新增 `ANALYSIS.md`、debug `TASKS.md`、`task-manifest.json` 的调查输出模型,让 bug 修复也能留下可执行 handoff。
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# CC-Investigate Playbook
|
|
2
|
+
|
|
3
|
+
## Visible State Machine
|
|
4
|
+
|
|
5
|
+
`cc-investigate -> cc-do -> cc-check`
|
|
6
|
+
|
|
7
|
+
- Enter from: a bug, regression, or broken requirement whose root cause is still unclear.
|
|
8
|
+
- Stay in: `cc-investigate` until `planning/analysis.md` and the repair handoff are both frozen.
|
|
9
|
+
- Exit to: `cc-do` only after root cause and repair boundary are explicit in canonical artifacts.
|
|
10
|
+
- Reroute to: `cc-plan` for scope/design truth changes, or `roadmap` for project-level priority decisions.
|
|
11
|
+
|
|
12
|
+
## Core Rules
|
|
13
|
+
|
|
14
|
+
1. 先复现,再猜原因。
|
|
15
|
+
2. 先看最近变化,再决定是不是 regression。
|
|
16
|
+
3. 先证伪假设,再冻结根因。
|
|
17
|
+
4. `planning/analysis.md` 和 `planning/tasks.md` 必须足够让 `cc-do` 脱离当前会话继续工作。
|
|
18
|
+
5. 调查失败三次后先重建入口,不准继续乱补。
|
|
19
|
+
|
|
20
|
+
## Required Outputs
|
|
21
|
+
|
|
22
|
+
- `planning/analysis.md`
|
|
23
|
+
- `planning/tasks.md`
|
|
24
|
+
- `planning/task-manifest.json`
|
|
25
|
+
|
|
26
|
+
## Investigation Standard
|
|
27
|
+
|
|
28
|
+
1. 先收集 symptom、expected、actual、repro。
|
|
29
|
+
2. 先沿代码路径定位触点和最近变更。
|
|
30
|
+
3. 每个假设都要写支持证据和反证。
|
|
31
|
+
4. 只有被证据钉死的根因才能进入 repair contract。
|
|
32
|
+
5. repair contract 只讲最小修复边界,不顺手发明新范围。
|
|
33
|
+
|
|
34
|
+
## Local Kit
|
|
35
|
+
|
|
36
|
+
- 模板在 `assets/`
|
|
37
|
+
- 调查契约在 `references/investigation-contract.md`
|
|
38
|
+
- 需要分析骨架时用 `scripts/bootstrap-analysis.sh`
|
|
39
|
+
|
|
40
|
+
## Exit Rule
|
|
41
|
+
|
|
42
|
+
只有当下一位执行者读完 `planning/analysis.md`、`planning/tasks.md`、`planning/task-manifest.json` 就知道:
|
|
43
|
+
|
|
44
|
+
- 为什么坏
|
|
45
|
+
- 该修什么
|
|
46
|
+
- 不该扩到哪里
|
|
47
|
+
- 用什么命令证明修好了
|
|
48
|
+
|
|
49
|
+
这次调查才算合格。
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cc-investigate
|
|
3
|
+
version: 1.1.1
|
|
4
|
+
description: "Use when a bug, regression, broken task, or unexpected behavior needs root-cause investigation, reproducible evidence, and a frozen repair handoff before cc-do resumes coding."
|
|
5
|
+
triggers:
|
|
6
|
+
- "帮我查这个 bug"
|
|
7
|
+
- "先别修先找根因"
|
|
8
|
+
- "debug this bug"
|
|
9
|
+
- "investigate this regression"
|
|
10
|
+
- "why is this broken"
|
|
11
|
+
- "root cause this"
|
|
12
|
+
- "先调查再修"
|
|
13
|
+
reads:
|
|
14
|
+
- "PLAYBOOK.md"
|
|
15
|
+
- "CHANGELOG.md"
|
|
16
|
+
- "references/investigation-contract.md"
|
|
17
|
+
- "assets/ANALYSIS_TEMPLATE.md"
|
|
18
|
+
- "assets/TASKS_TEMPLATE.md"
|
|
19
|
+
- "assets/TASK_MANIFEST_TEMPLATE.json"
|
|
20
|
+
writes:
|
|
21
|
+
- path: "devflow/changes/<change-key>/planning/analysis.md"
|
|
22
|
+
durability: "durable"
|
|
23
|
+
required: true
|
|
24
|
+
- path: "devflow/changes/<change-key>/planning/tasks.md"
|
|
25
|
+
durability: "durable"
|
|
26
|
+
required: true
|
|
27
|
+
- path: "devflow/changes/<change-key>/planning/task-manifest.json"
|
|
28
|
+
durability: "durable"
|
|
29
|
+
required: true
|
|
30
|
+
- path: "devflow/changes/<change-key>/change-meta.json"
|
|
31
|
+
durability: "durable"
|
|
32
|
+
required: true
|
|
33
|
+
entry_gate:
|
|
34
|
+
- "Read the current bug report, existing requirement artifacts, relevant code, tests, and recent history before forming any hypothesis."
|
|
35
|
+
- "Use a FIX-<number>-<description> change key for new bug-fix investigations."
|
|
36
|
+
- "Reproduce or narrow the symptom first, then freeze the evidence chain before proposing repair tasks."
|
|
37
|
+
- "Do not write production code here; this stage ends with planning/analysis.md plus executable repair tasks for cc-do."
|
|
38
|
+
exit_criteria:
|
|
39
|
+
- "planning/analysis.md records symptom, reproduction, evidence chain, confirmed root cause, and repair boundary."
|
|
40
|
+
- "planning/tasks.md and planning/task-manifest.json are explicit enough that cc-do can repair the bug without chat memory."
|
|
41
|
+
- "The honest next step is cc-do, cc-plan, or roadmap."
|
|
42
|
+
reroutes:
|
|
43
|
+
- when: "The issue is actually a new feature, a scope redesign, or a product decision instead of a bug investigation."
|
|
44
|
+
target: "cc-plan"
|
|
45
|
+
- when: "The discussion expands into project sequencing or roadmap priority instead of one broken requirement."
|
|
46
|
+
target: "roadmap"
|
|
47
|
+
- when: "Root cause and repair boundary are already frozen."
|
|
48
|
+
target: "cc-do"
|
|
49
|
+
recovery_modes:
|
|
50
|
+
- name: "repro-reset"
|
|
51
|
+
when: "The current conversation cannot state a stable reproduction path or the symptom evidence is stale."
|
|
52
|
+
action: "Drop the narrative, rebuild the reproduction from canonical artifacts and fresh output, then restate the symptom before testing hypotheses."
|
|
53
|
+
- name: "re-open-investigation"
|
|
54
|
+
when: "New execution evidence disproves the current root-cause contract or widens the suspected blast radius."
|
|
55
|
+
action: "Reopen planning/analysis.md, update the evidence chain, and regenerate repair tasks only after the new root cause is frozen."
|
|
56
|
+
tool_budget:
|
|
57
|
+
read_files: 10
|
|
58
|
+
search_steps: 6
|
|
59
|
+
shell_commands: 6
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
# CC-Investigate
|
|
63
|
+
|
|
64
|
+
> [PROTOCOL]: 变更时同步更新 `version`、`CHANGELOG.md`、相关模板/脚本引用,然后检查 `CLAUDE.md`
|
|
65
|
+
|
|
66
|
+
## Role
|
|
67
|
+
|
|
68
|
+
`cc-investigate` 是 bug 路径里的 `Investigate`,也可以理解成 `Debug Plan`。
|
|
69
|
+
|
|
70
|
+
它不是直接修 bug 的地方,而是替代原来 bug 场景下那种混在 `cc-do` 里的临场 planning。它先把症状压成证据,再把证据压成根因,再把根因压成一个可执行的修复 handoff。
|
|
71
|
+
|
|
72
|
+
一句话:
|
|
73
|
+
|
|
74
|
+
- 新需求走 `cc-plan -> cc-do -> cc-check -> cc-act`
|
|
75
|
+
- 已知需求里的 bug 走 `cc-investigate -> cc-do -> cc-check -> cc-act`
|
|
76
|
+
|
|
77
|
+
所以现在仓库里有两条闭环:
|
|
78
|
+
|
|
79
|
+
- `PDCA`
|
|
80
|
+
- `IDCA`,如果你更喜欢口语,也可以把它理解成 `DDCA`
|
|
81
|
+
|
|
82
|
+
## Read First
|
|
83
|
+
|
|
84
|
+
1. `PLAYBOOK.md`
|
|
85
|
+
2. `CHANGELOG.md`
|
|
86
|
+
3. `references/investigation-contract.md`
|
|
87
|
+
4. `assets/ANALYSIS_TEMPLATE.md`
|
|
88
|
+
5. `assets/TASKS_TEMPLATE.md`
|
|
89
|
+
6. `assets/TASK_MANIFEST_TEMPLATE.json`
|
|
90
|
+
|
|
91
|
+
## Use This Skill When
|
|
92
|
+
|
|
93
|
+
- bug 现象很多,但根因还没冻结
|
|
94
|
+
- regression 已出现,不能接受“先补一个试试”
|
|
95
|
+
- `cc-do` 连续修补失败,怀疑上游根因判断错了
|
|
96
|
+
- review / verification 指出当前修法只是症状补丁
|
|
97
|
+
- 你需要一个专门面向 debug 的可执行 handoff,而不是重开 feature planning
|
|
98
|
+
|
|
99
|
+
如果问题其实是在问“应该做什么功能”或“范围是否要变”,别硬调试,回 `cc-plan`。
|
|
100
|
+
|
|
101
|
+
## Quick Start
|
|
102
|
+
|
|
103
|
+
先判断你面对的是哪一类调查现实:
|
|
104
|
+
|
|
105
|
+
| 现实状态 | 先走什么路径 |
|
|
106
|
+
| --- | --- |
|
|
107
|
+
| 症状真实,但还没有稳定复现 | `reproduce-first`,先把现象钉死 |
|
|
108
|
+
| 明显是 regression | `diff-trace`,先查最近变化 |
|
|
109
|
+
| 症状已知,但修复边界可能扩大范围 | `contract-check`,先判是否还属于当前 requirement |
|
|
110
|
+
| 看起来像 bug,实则是未定义行为或新需求 | 直接 reroute 到 `cc-plan` |
|
|
111
|
+
|
|
112
|
+
先说“这是什么类问题”,再说“我要怎么修”。没有分类的 debug,最后都会变成乱打补丁。
|
|
113
|
+
|
|
114
|
+
## Harness Contract
|
|
115
|
+
|
|
116
|
+
- Allowed actions: reproduce, collect evidence, trace code paths, test hypotheses, freeze root cause, and write only `planning/analysis.md`, `planning/tasks.md`, `planning/task-manifest.json`, and `change-meta.json`.
|
|
117
|
+
- Forbidden actions: writing production code, disguising guesses as root cause, or skipping directly from symptoms to repair.
|
|
118
|
+
- Required evidence: every root-cause claim must point to reproduction evidence, code facts, recent history, or explicit user confirmation.
|
|
119
|
+
- Reroute rule: product/scope changes go to `cc-plan`; strategy questions go to `roadmap`; only confirmed repair handoff goes to `cc-do`.
|
|
120
|
+
|
|
121
|
+
## Output Model
|
|
122
|
+
|
|
123
|
+
`cc-investigate` 只允许产出 4 个主文件:
|
|
124
|
+
|
|
125
|
+
1. `planning/analysis.md`
|
|
126
|
+
- 现象
|
|
127
|
+
- 复现
|
|
128
|
+
- 证据链
|
|
129
|
+
- 假设表
|
|
130
|
+
- 已确认根因
|
|
131
|
+
- 修复边界
|
|
132
|
+
2. `planning/tasks.md`
|
|
133
|
+
- 只保留真正要执行的修复任务
|
|
134
|
+
- 顶部明确 canonical contract 是 `planning/analysis.md`
|
|
135
|
+
3. `planning/task-manifest.json`
|
|
136
|
+
- 机器真相源
|
|
137
|
+
- 标记当前任务、依赖、验证命令、调查版本链
|
|
138
|
+
4. `change-meta.json`
|
|
139
|
+
- 标记当前 bug 是实现偏离 spec、spec 本身缺失,还是 roadmap 假设错误
|
|
140
|
+
- 记录这次修复会如何影响 capability truth
|
|
141
|
+
|
|
142
|
+
`cc-investigate` 不写生产代码,不在这里偷跑 `cc-do`。
|
|
143
|
+
|
|
144
|
+
## Entry Gate
|
|
145
|
+
|
|
146
|
+
1. 先确认当前对象仍然属于一个 requirement,而不是整个项目级故障。
|
|
147
|
+
2. 先收症状事实:错误、触发条件、影响面、复现路径。
|
|
148
|
+
3. 先读现有 change 目录里的 `planning/design.md` / `planning/analysis.md` / `planning/tasks.md` / `planning/task-manifest.json`,不要假设自己是第一位调查者。
|
|
149
|
+
4. 先读代码、测试、日志、相关 capability spec 和最近提交,再下任何假设。
|
|
150
|
+
5. 如果复现都不稳定,先不要写根因。
|
|
151
|
+
|
|
152
|
+
## Investigation Loop
|
|
153
|
+
|
|
154
|
+
1. **Collect symptom**
|
|
155
|
+
- 记录用户看见了什么
|
|
156
|
+
- 记录预期与实际差异
|
|
157
|
+
- 记录复现命令或手动路径
|
|
158
|
+
2. **Trace reality**
|
|
159
|
+
- 沿着代码路径找触点
|
|
160
|
+
- 查最近提交和同类改动
|
|
161
|
+
- 找现有测试和断点证据
|
|
162
|
+
- 判定偏离的是 capability boundary、invariant,还是只是实现细节
|
|
163
|
+
3. **Form hypotheses**
|
|
164
|
+
- 只保留 1-3 个可被证伪的假设
|
|
165
|
+
- 每个假设都写支持证据和反证
|
|
166
|
+
4. **Test hypotheses**
|
|
167
|
+
- 用复现、日志、断言、最小探针验证
|
|
168
|
+
- 三次假设都失败,就停下重建上下文
|
|
169
|
+
5. **Freeze repair contract**
|
|
170
|
+
- 根因确认后,写进 `planning/analysis.md`
|
|
171
|
+
- 只保留最小修复边界
|
|
172
|
+
- 输出 `planning/tasks.md` + `planning/task-manifest.json` + `change-meta.json`
|
|
173
|
+
6. **Hand off**
|
|
174
|
+
- 下一步明确写成 `cc-do`
|
|
175
|
+
- 如果 repair contract 越过当前 requirement,就 reroute 到 `cc-plan`
|
|
176
|
+
|
|
177
|
+
## Good Output
|
|
178
|
+
|
|
179
|
+
- 看完第一屏就知道 bug 是什么、怎么复现、为什么会坏
|
|
180
|
+
- 根因不是感觉,而是被证据钉死的具体断点
|
|
181
|
+
- 修复边界清楚到 `cc-do` 不需要二次调查
|
|
182
|
+
- `planning/tasks.md` 只包含修复任务,不夹带新需求
|
|
183
|
+
- 如果应该回 `cc-plan`,理由写清楚,不假装还能继续 patch
|
|
184
|
+
|
|
185
|
+
## Bundled Resources
|
|
186
|
+
|
|
187
|
+
- 变更记录:`CHANGELOG.md`
|
|
188
|
+
- 调查契约:`references/investigation-contract.md`
|
|
189
|
+
- 分析模板:`assets/ANALYSIS_TEMPLATE.md`
|
|
190
|
+
- 修复任务模板:`assets/TASKS_TEMPLATE.md`
|
|
191
|
+
- manifest 模板:`assets/TASK_MANIFEST_TEMPLATE.json`
|
|
192
|
+
- 分析骨架:`scripts/bootstrap-analysis.sh`
|
|
193
|
+
|
|
194
|
+
## Working Rules
|
|
195
|
+
|
|
196
|
+
1. 没有复现,不准声称找到了根因。
|
|
197
|
+
2. 没有证据,不准把猜测写成结论。
|
|
198
|
+
3. 先根因,再修复;先调查,再编码。
|
|
199
|
+
4. `planning/tasks.md` 必须足够让 `cc-do` 在脱离当前对话后继续推进。
|
|
200
|
+
5. 如果修复方案已经变成新 feature 设计,停止 debug,回 `cc-plan`。
|
|
201
|
+
6. 三次假设失败后,默认说明你的调查入口错了,不准继续硬猜。
|
|
202
|
+
7. 好的调查不是“找了很多可能性”,而是把错误世界缩成一个可信的 repair contract。
|
|
203
|
+
|
|
204
|
+
## Exit Criteria
|
|
205
|
+
|
|
206
|
+
- `planning/analysis.md` 已冻结症状、复现、证据链、根因和修复边界
|
|
207
|
+
- `planning/tasks.md` / `planning/task-manifest.json` 可直接交给 `cc-do`
|
|
208
|
+
- 下一步唯一答案是 `cc-do`、`cc-plan` 或 `roadmap`
|
|
209
|
+
|
|
210
|
+
## Do Not
|
|
211
|
+
|
|
212
|
+
- 不在这里写生产代码
|
|
213
|
+
- 不拿“可能是”冒充“已经证实”
|
|
214
|
+
- 不把新需求伪装成 bug 修复
|
|
215
|
+
- 不在根因未明时开始堆 patch
|
|
216
|
+
|
|
217
|
+
## Companion Files
|
|
218
|
+
|
|
219
|
+
- 深入剧本:`PLAYBOOK.md`
|
|
220
|
+
- 变更记录:`CHANGELOG.md`
|
|
221
|
+
- 调查契约:`references/investigation-contract.md`
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ANALYSIS
|
|
2
|
+
|
|
3
|
+
## Investigation Meta
|
|
4
|
+
|
|
5
|
+
- Requirement version:
|
|
6
|
+
- Analysis version:
|
|
7
|
+
- Investigate skill version:
|
|
8
|
+
- Source roadmap item:
|
|
9
|
+
- Source roadmap version:
|
|
10
|
+
- Incident / bug ID:
|
|
11
|
+
- Primary capability:
|
|
12
|
+
- Related capability specs:
|
|
13
|
+
|
|
14
|
+
## Symptom
|
|
15
|
+
|
|
16
|
+
- What the user saw:
|
|
17
|
+
- Reproduction command / path:
|
|
18
|
+
- Expected:
|
|
19
|
+
- Actual:
|
|
20
|
+
|
|
21
|
+
## Evidence Chain
|
|
22
|
+
|
|
23
|
+
- Logs / stack traces:
|
|
24
|
+
- Code path:
|
|
25
|
+
- Recent changes:
|
|
26
|
+
- Existing tests:
|
|
27
|
+
|
|
28
|
+
## Hypothesis Table
|
|
29
|
+
|
|
30
|
+
| Hypothesis | Evidence for | Evidence against | Status |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| | | | pending |
|
|
33
|
+
|
|
34
|
+
## Root Cause
|
|
35
|
+
|
|
36
|
+
- Confirmed root cause:
|
|
37
|
+
- Broken contract:
|
|
38
|
+
- Spec diagnosis: `implementation drift` | `missing spec truth` | `roadmap mismatch`
|
|
39
|
+
- Why it escaped:
|
|
40
|
+
|
|
41
|
+
## Repair Boundary
|
|
42
|
+
|
|
43
|
+
- Fix strategy:
|
|
44
|
+
- Files likely touched:
|
|
45
|
+
- Do not change:
|
|
46
|
+
- Expected spec delta:
|
|
47
|
+
- Verification after fix:
|
|
48
|
+
- Why this can enter `cc-do`:
|
|
49
|
+
|
|
50
|
+
## Review Gate
|
|
51
|
+
|
|
52
|
+
- Repro stable:
|
|
53
|
+
- Root cause confirmed:
|
|
54
|
+
- Repair scope still belongs to this requirement:
|
|
55
|
+
- If not, reroute:
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# TASKS
|
|
2
|
+
|
|
3
|
+
## Investigation Meta
|
|
4
|
+
|
|
5
|
+
- Requirement version:
|
|
6
|
+
- Analysis version:
|
|
7
|
+
- Investigate skill version:
|
|
8
|
+
- Source bug / incident:
|
|
9
|
+
- Change meta: `change-meta.json`
|
|
10
|
+
|
|
11
|
+
## Execution Handoff
|
|
12
|
+
|
|
13
|
+
- Canonical analysis: `planning/analysis.md`
|
|
14
|
+
- Canonical change meta: `change-meta.json`
|
|
15
|
+
- Execution mode: `single-path` | `parallel-ready`
|
|
16
|
+
- Confirmed root cause:
|
|
17
|
+
- Frozen repair boundary:
|
|
18
|
+
- Capability specs:
|
|
19
|
+
- Read first:
|
|
20
|
+
- Commands to trust:
|
|
21
|
+
- Do not re-decide:
|
|
22
|
+
- Parallel boundaries:
|
|
23
|
+
|
|
24
|
+
## Phase 1: Reproduce Guard
|
|
25
|
+
|
|
26
|
+
- [ ] T001 [TEST] Capture the failing behavior as a stable reproduction (dependsOn:none) `path/to/test`
|
|
27
|
+
Goal: 让 bug 先变成一个可复跑的失败事实。
|
|
28
|
+
Files: `path/to/test`
|
|
29
|
+
Read first: `analysis.md`, `tasks.md`
|
|
30
|
+
Verification: `npm test -- path/to/test`
|
|
31
|
+
Evidence: failing output or reproducible log
|
|
32
|
+
Ready when: reproduction path 已稳定
|
|
33
|
+
|
|
34
|
+
## Phase 2: Repair
|
|
35
|
+
|
|
36
|
+
- [ ] T002 [IMPL] Apply the minimal root-cause fix (dependsOn:T001) `path/to/file`
|
|
37
|
+
Goal: 只修已确认根因,不扩成重写。
|
|
38
|
+
Files: `path/to/file`
|
|
39
|
+
Read first: `analysis.md`, `path/to/test`
|
|
40
|
+
Verification: `npm test -- path/to/test`
|
|
41
|
+
Evidence: passing output + checkpoint
|
|
42
|
+
Ready when: T001 已证明问题存在
|
|
43
|
+
|
|
44
|
+
## Phase 3: Verify
|
|
45
|
+
|
|
46
|
+
- [ ] T003 Run checks and collect fresh evidence (dependsOn:T002) `command or file`
|
|
47
|
+
Goal: 为 `cc-check` 准备新鲜证据。
|
|
48
|
+
Files: `command or file`
|
|
49
|
+
Read first: `tasks.md`, `task-manifest.json`
|
|
50
|
+
Verification: `npm test && npm run lint`
|
|
51
|
+
Evidence: gate output
|
|
52
|
+
Ready when: repair task 已收口
|