cc-devflow 4.5.11 → 4.5.12

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.
Files changed (185) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +18 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
  3. package/.claude/skills/cc-act/SKILL.md +38 -425
  4. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +2 -13
  5. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +1 -9
  6. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +21 -177
  7. package/.claude/skills/cc-act/references/closure-contract.md +12 -63
  8. package/.claude/skills/cc-act/references/git-commit-guidelines.md +5 -5
  9. package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -322
  10. package/.claude/skills/cc-act/scripts/detect-ship-target.sh +11 -2
  11. package/.claude/skills/cc-act/scripts/inspect-git-index.sh +58 -0
  12. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +40 -440
  13. package/.claude/skills/cc-act/scripts/verify-act-gate.sh +10 -50
  14. package/.claude/skills/cc-check/CHANGELOG.md +18 -0
  15. package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
  16. package/.claude/skills/cc-check/SKILL.md +33 -456
  17. package/.claude/skills/cc-check/references/review-contract.md +12 -147
  18. package/.claude/skills/cc-dev/CHANGELOG.md +15 -0
  19. package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
  20. package/.claude/skills/cc-dev/SKILL.md +52 -137
  21. package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
  22. package/.claude/skills/cc-do/CHANGELOG.md +11 -0
  23. package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
  24. package/.claude/skills/cc-do/SKILL.md +39 -245
  25. package/.claude/skills/cc-do/references/execution-recovery.md +15 -109
  26. package/.claude/skills/cc-do/scripts/cc-do-common.sh +5 -57
  27. package/.claude/skills/cc-do/scripts/check-task-status.sh +35 -65
  28. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +9 -46
  29. package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +29 -97
  30. package/.claude/skills/cc-investigate/CHANGELOG.md +16 -0
  31. package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
  32. package/.claude/skills/cc-investigate/SKILL.md +64 -246
  33. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -98
  34. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -218
  35. package/.claude/skills/cc-next/CHANGELOG.md +6 -0
  36. package/.claude/skills/cc-next/PLAYBOOK.md +12 -8
  37. package/.claude/skills/cc-next/SKILL.md +34 -140
  38. package/.claude/skills/cc-plan/CHANGELOG.md +16 -0
  39. package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
  40. package/.claude/skills/cc-plan/SKILL.md +45 -295
  41. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -228
  42. package/.claude/skills/cc-plan/references/planning-contract.md +24 -161
  43. package/.claude/skills/cc-plan/scripts/next-change-key.sh +8 -44
  44. package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +2 -2
  45. package/.claude/skills/cc-plan/scripts/validate-scope.sh +1 -1
  46. package/.claude/skills/cc-pr-land/SKILL.md +14 -114
  47. package/.claude/skills/cc-pr-review/CHANGELOG.md +4 -0
  48. package/.claude/skills/cc-pr-review/SKILL.md +20 -103
  49. package/.claude/skills/cc-review/CHANGELOG.md +17 -0
  50. package/.claude/skills/cc-review/PLAYBOOK.md +13 -86
  51. package/.claude/skills/cc-review/SKILL.md +53 -241
  52. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +2 -2
  53. package/.claude/skills/cc-review/references/implementation-review-branch.md +7 -147
  54. package/.claude/skills/cc-review/references/plan-review-branch.md +5 -147
  55. package/.claude/skills/cc-review/references/review-methods.md +10 -218
  56. package/.claude/skills/cc-review/scripts/collect-review-context.sh +4 -63
  57. package/.claude/skills/cc-roadmap/PLAYBOOK.md +1 -1
  58. package/.claude/skills/cc-roadmap/SKILL.md +3 -3
  59. package/.claude/skills/cc-simplify/CHANGELOG.md +7 -0
  60. package/.claude/skills/cc-simplify/SKILL.md +26 -21
  61. package/.claude/skills/cc-spec-init/PLAYBOOK.md +12 -48
  62. package/.claude/skills/cc-spec-init/SKILL.md +29 -132
  63. package/.claude/skills/cc-spec-init/references/spec-contract.md +8 -17
  64. package/CHANGELOG.md +13 -0
  65. package/bin/cc-devflow-cli.js +20 -260
  66. package/bin/cc-devflow.js +44 -7
  67. package/docs/commands/README.md +1 -1
  68. package/docs/commands/README.zh-CN.md +1 -1
  69. package/docs/examples/README.md +1 -1
  70. package/docs/examples/START-HERE.md +14 -15
  71. package/docs/examples/example-bindings.json +11 -11
  72. package/docs/examples/full-design-blocked/README.md +4 -6
  73. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
  74. package/docs/examples/local-handoff/README.md +8 -11
  75. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
  76. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
  77. package/docs/examples/pdca-loop/README.md +6 -9
  78. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
  79. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
  80. package/docs/examples/scripts/check-example-bindings.sh +11 -62
  81. package/docs/guides/artifact-contract.md +10 -40
  82. package/docs/guides/getting-started.md +8 -8
  83. package/docs/guides/getting-started.zh-CN.md +8 -8
  84. package/docs/guides/minimize-artifacts.md +16 -130
  85. package/docs/guides/project-postmortem.md +14 -71
  86. package/lib/compiler/__tests__/skills-registry.test.js +9 -8
  87. package/lib/compiler/resource-copier.js +29 -0
  88. package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
  89. package/lib/skill-runtime/__tests__/benchmark-skills.test.js +3 -3
  90. package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
  91. package/lib/skill-runtime/errors.js +3 -3
  92. package/lib/skill-runtime/index.js +5 -23
  93. package/lib/skill-runtime/paths.js +5 -52
  94. package/lib/skill-runtime/query-registry.js +4 -4
  95. package/lib/skill-runtime/query.js +89 -201
  96. package/lib/skill-runtime/store.js +4 -40
  97. package/lib/skill-runtime/trace.js +2 -2
  98. package/package.json +2 -5
  99. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
  100. package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
  101. package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
  102. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
  103. package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
  104. package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
  105. package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
  106. package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
  107. package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
  108. package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
  109. package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
  110. package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
  111. package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
  112. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -224
  113. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -178
  114. package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
  115. package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
  116. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
  117. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
  118. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
  119. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
  120. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
  121. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
  122. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
  123. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
  124. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
  125. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
  126. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
  127. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
  128. package/docs/get-shit-done-strategy-audit.md +0 -518
  129. package/docs/skill-runtime-migration.md +0 -46
  130. package/lib/skill-runtime/__tests__/approve.test.js +0 -92
  131. package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
  132. package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
  133. package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
  134. package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
  135. package/lib/skill-runtime/__tests__/intent.test.js +0 -203
  136. package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
  137. package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
  138. package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
  139. package/lib/skill-runtime/__tests__/query.test.js +0 -860
  140. package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
  141. package/lib/skill-runtime/__tests__/release.test.js +0 -85
  142. package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
  143. package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
  144. package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
  145. package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
  146. package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
  147. package/lib/skill-runtime/__tests__/task-contract.test.js +0 -874
  148. package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
  149. package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
  150. package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
  151. package/lib/skill-runtime/__tests__/worker.test.js +0 -56
  152. package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
  153. package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
  154. package/lib/skill-runtime/artifacts.js +0 -88
  155. package/lib/skill-runtime/context-index.js +0 -545
  156. package/lib/skill-runtime/delegation.js +0 -533
  157. package/lib/skill-runtime/intent.js +0 -309
  158. package/lib/skill-runtime/lifecycle.js +0 -294
  159. package/lib/skill-runtime/operations/CLAUDE.md +0 -19
  160. package/lib/skill-runtime/operations/approve.js +0 -81
  161. package/lib/skill-runtime/operations/autopilot-core.js +0 -337
  162. package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
  163. package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
  164. package/lib/skill-runtime/operations/autopilot.js +0 -163
  165. package/lib/skill-runtime/operations/dispatch.js +0 -416
  166. package/lib/skill-runtime/operations/init.js +0 -60
  167. package/lib/skill-runtime/operations/janitor.js +0 -61
  168. package/lib/skill-runtime/operations/plan.js +0 -59
  169. package/lib/skill-runtime/operations/prepare-pr.js +0 -25
  170. package/lib/skill-runtime/operations/release.js +0 -99
  171. package/lib/skill-runtime/operations/resume.js +0 -126
  172. package/lib/skill-runtime/operations/review-records.js +0 -265
  173. package/lib/skill-runtime/operations/snapshot.js +0 -45
  174. package/lib/skill-runtime/operations/task-contract.js +0 -593
  175. package/lib/skill-runtime/operations/verify.js +0 -170
  176. package/lib/skill-runtime/operations/worker-run.js +0 -531
  177. package/lib/skill-runtime/operations/worker.js +0 -33
  178. package/lib/skill-runtime/planner.js +0 -539
  179. package/lib/skill-runtime/readiness.js +0 -84
  180. package/lib/skill-runtime/review-records.js +0 -123
  181. package/lib/skill-runtime/review.js +0 -855
  182. package/lib/skill-runtime/schemas.js +0 -746
  183. package/lib/skill-runtime/task-contract.js +0 -188
  184. package/lib/skill-runtime/team-state.js +0 -122
  185. package/lib/skill-runtime/workflow-context.js +0 -748
@@ -1,92 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- # ------------------------------------------------------------
6
- # 兼容旧入口:只写必要的 CLI 事件,不再生成 checkpoint.json
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 "..."] [--tdd-json '{"red":...}']
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
- TDD_JSON=""
27
-
28
- while [[ $# -gt 0 ]]; do
29
- case "$1" in
30
- --dir) REQ_DIR="$2"; shift 2 ;;
31
- --task) TASK_ID="$(echo "$2" | tr '[:lower:]' '[:upper:]')"; shift 2 ;;
32
- --status) STATUS="$2"; shift 2 ;;
33
- --summary) SUMMARY="$2"; shift 2 ;;
34
- --event) EVENT_TYPE="$2"; shift 2 ;;
35
- --attempt) ATTEMPT="$2"; shift 2 ;;
36
- --session) SESSION_ID="$2"; shift 2 ;;
37
- --next-action) NEXT_ACTION="$2"; shift 2 ;;
38
- --tdd-json) TDD_JSON="$2"; shift 2 ;;
39
- -h|--help) usage; exit 0 ;;
40
- *) echo "Unknown arg: $1" >&2; usage; exit 1 ;;
41
- esac
42
- done
43
-
44
- if [[ -z "$REQ_DIR" || -z "$TASK_ID" || -z "$STATUS" ]]; then
45
- usage
46
- exit 1
47
- fi
48
-
49
- CHANGE_DIR="$(req_do_resolve_change_dir "$REQ_DIR")"
50
- manifest="$(req_do_manifest_path "$CHANGE_DIR")"
51
- change_id="$(jq -r '.changeId // .requirementId // "REQ-UNKNOWN"' "$manifest" 2>/dev/null || basename "$REQ_DIR")"
52
- timestamp="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
53
- runtime_task_dir="$(req_do_task_runtime_dir "$CHANGE_DIR" "$TASK_ID")"
54
-
55
- if [[ -z "$SESSION_ID" ]]; then
56
- SESSION_ID="${TASK_ID}-$(date -u +%s)"
57
- fi
58
-
59
- tdd_payload="null"
60
- if [[ -n "$TDD_JSON" ]]; then
61
- if [[ -f "$TDD_JSON" ]]; then
62
- tdd_payload="$(jq -c . "$TDD_JSON")"
63
- else
64
- tdd_payload="$(printf '%s' "$TDD_JSON" | jq -c .)"
65
- fi
66
- fi
67
-
68
- if [[ -n "$EVENT_TYPE" || "$STATUS" == "failed" ]]; then
69
- mkdir -p "$runtime_task_dir"
70
- jq -nc \
71
- --arg type "${EVENT_TYPE:-status_$STATUS}" \
72
- --arg changeId "$change_id" \
73
- --arg taskId "$TASK_ID" \
74
- --arg sessionId "$SESSION_ID" \
75
- --arg status "$STATUS" \
76
- --arg summary "$SUMMARY" \
77
- --arg nextAction "$NEXT_ACTION" \
78
- --arg timestamp "$timestamp" \
79
- --argjson tdd "$tdd_payload" \
80
- '{
81
- type: $type,
82
- changeId: $changeId,
83
- taskId: $taskId,
84
- sessionId: $sessionId,
85
- status: $status,
86
- summary: $summary,
87
- nextAction: $nextAction,
88
- timestamp: $timestamp
89
- } + (if $tdd == null then {} else {tdd: $tdd} end)' >> "$runtime_task_dir/events.jsonl"
90
- fi
91
-
92
- echo "No checkpoint written; task truth lives in planning/tasks.md and planning/task-manifest.json"
@@ -1,224 +0,0 @@
1
- {
2
- "changeId": "FIX-XXX",
3
- "requirementId": "FIX-XXX",
4
- "requirementVersion": "FIX-XXX.v1",
5
- "outputPolicy": {
6
- "documentLanguage": ""
7
- },
8
- "planningMeta": {
9
- "ccInvestigateSkillVersion": "1.5.1",
10
- "analysisVersion": "analysis.v1",
11
- "workBranch": "FIX/XXX-short-bug-name",
12
- "approvedAt": "2026-04-17T12:00:00.000Z",
13
- "basedOnRootCause": "Root cause sentence"
14
- },
15
- "investigationMeta": {
16
- "symptomStatus": "stable",
17
- "reproductionPath": "npm test -- src/feature/feature.test.ts",
18
- "feedbackLoop": {
19
- "loopType": "failing-test",
20
- "commandOrDriver": "npm test -- src/feature/feature.test.ts",
21
- "expectedFailingSignal": "The test fails with the user-reported behavior",
22
- "actualFailingSignal": "Observed failure output from the current repo",
23
- "symptomMatchEvidence": "Failure output matches the reported symptom, not a nearby unrelated failure",
24
- "runtime": "under 10s",
25
- "determinism": "deterministic",
26
- "failureRate": "100%",
27
- "signalSpecificity": "asserts the exact broken behavior",
28
- "sharpeningPlan": "Narrow setup or assertions if the loop becomes slow or broad",
29
- "evidenceRequest": ""
30
- },
31
- "patternAnalysis": {
32
- "selectedPattern": "null propagation",
33
- "ruledOutPatterns": [
34
- "race condition",
35
- "performance regression",
36
- "configuration drift",
37
- "timing guess / flaky wait"
38
- ],
39
- "notes": "Pattern evidence belongs in planning/tasks.md#Root Cause Contract"
40
- },
41
- "boundaryProbes": [
42
- {
43
- "componentBoundary": "api -> service",
44
- "inputObserved": "Request payload matches the reproduced failure",
45
- "outputObserved": "Service receives invalid state",
46
- "configEnvObserved": "Relevant env/config values recorded in planning/tasks.md#Root Cause Contract",
47
- "stateObserved": "State snapshot or log pointer",
48
- "verdict": "fail"
49
- }
50
- ],
51
- "backwardTrace": {
52
- "immediateFailureSite": "file:line or operation where the symptom appears",
53
- "directCaller": "caller that passed the bad value or state",
54
- "callerChain": [
55
- "entrypoint",
56
- "intermediate caller",
57
- "failure site"
58
- ],
59
- "badValueOrigin": "where the invalid data/state first appears",
60
- "originalTrigger": "user action, command, event, config, or dependency response that starts the chain",
61
- "symptomSiteFixRejectedBecause": "Guarding only the failure site would leave the bad upstream contract intact"
62
- },
63
- "rootCauseProof": {
64
- "symptomSite": "User-visible failure, command, UI state, log, or bad artifact",
65
- "firstBadState": "First field, artifact, cache entry, queue message, config, response, or memory object that becomes invalid",
66
- "firstBadStateEvidence": [
67
- "Boundary probe or trace evidence from planning/tasks.md#Root Cause Contract"
68
- ],
69
- "violatedContract": "Schema, invariant, API contract, state transition, trust boundary, or timing condition violated",
70
- "originalTrigger": "User action, command, event, recent diff, config change, or external response that created the first bad state",
71
- "counterfactualProof": {
72
- "method": "Restore the contract, replace input, roll back diff, fix config, or assert the boundary",
73
- "expectedObservation": "The first bad state no longer forms and the symptom disappears",
74
- "actualObservation": "Observed evidence from the current repo"
75
- },
76
- "escapeReason": "Why tests, types, validators, monitoring, review, or artifact gates missed it",
77
- "status": "confirmed"
78
- },
79
- "referenceComparison": {
80
- "similarWorkingExample": "path/to/working/example",
81
- "brokenPath": "path/to/broken/path",
82
- "differencesFound": [
83
- "Working path validates input before persistence"
84
- ],
85
- "differencesAcceptedAsHypothesis": [
86
- "Missing validation before persistence"
87
- ],
88
- "differencesRuledOut": []
89
- },
90
- "diagnosticInstrumentation": [
91
- {
92
- "probeTag": "[DEBUG-FIXXXX-a4f2]",
93
- "probeLocation": "file:line or component boundary",
94
- "questionAnswered": "Which boundary first emits the invalid value?",
95
- "commandToRun": "npm test -- src/feature/feature.test.ts",
96
- "expectedSignal": "Probe records invalid value before the failure site",
97
- "actualSignal": "Observed evidence from the current repo",
98
- "cleanupRequirement": "Remove temporary probe or convert it into a durable assertion/log"
99
- }
100
- ],
101
- "candidateHypotheses": [
102
- {
103
- "rank": 1,
104
- "statement": "Specific, testable root-cause claim",
105
- "whyPlausible": "Reproduction output points to the affected contract",
106
- "prediction": "The failing signal disappears when that contract is restored",
107
- "status": "accepted-for-testing"
108
- }
109
- ],
110
- "priorInvestigations": [],
111
- "researchEvidence": [],
112
- "domainDecisionContext": {
113
- "contextFilesRead": [],
114
- "adrFilesRead": [],
115
- "vocabularyNotes": [],
116
- "adrConflicts": []
117
- },
118
- "rootCauseHypothesis": {
119
- "statement": "Specific, testable root-cause claim",
120
- "falsificationMethod": "Command, log probe, assertion, or code-path check",
121
- "expectedObservation": "What should be observed if the hypothesis is true",
122
- "actualObservation": "Observed evidence from the current repo",
123
- "status": "confirmed"
124
- },
125
- "rootCauseClass": "code",
126
- "noCodeRootCause": {
127
- "whyNotCodeRootCause": "",
128
- "monitoringOrFutureEvidenceNeeded": "",
129
- "operatorHandlingAfterFix": ""
130
- },
131
- "hypothesisAttempts": [
132
- {
133
- "statement": "Specific, testable root-cause claim",
134
- "status": "confirmed",
135
- "evidenceFor": [
136
- "Reproduction output points to the affected code path"
137
- ],
138
- "evidenceAgainst": [],
139
- "falsificationMethod": "Run the reproduction command"
140
- }
141
- ],
142
- "escalationDecision": {
143
- "failedHypothesisCount": 0,
144
- "nextOption": "cc-do",
145
- "recommendation": "Repair the confirmed root cause"
146
- },
147
- "correctTestSeam": {
148
- "testSeam": "public interface or end-to-end path that reaches the real trigger chain",
149
- "publicInterfaceExercised": "CLI/API/UI behavior observed by callers",
150
- "realTriggerChainCoverage": "The test enters through the same trigger path as the bug",
151
- "whyShallowTestRejected": "A lower-level unit test would not prove the upstream contract",
152
- "ifNoCorrectSeam": ""
153
- },
154
- "repairBoundary": {
155
- "affectedModule": "src/feature",
156
- "allowedFiles": [
157
- "src/feature/feature.ts",
158
- "src/feature/feature.test.ts"
159
- ],
160
- "forbiddenFiles": [
161
- "unrelated modules"
162
- ],
163
- "blastRadiusFileCount": 2,
164
- "blastRadiusRisk": "low",
165
- "splitOrRerouteDecision": "single focused repair"
166
- }
167
- },
168
- "currentTaskId": "T001",
169
- "tasks": [
170
- {
171
- "id": "T001",
172
- "title": "[TEST] Capture the bug as a failing reproduction",
173
- "phase": 1,
174
- "status": "pending",
175
- "dependsOn": [],
176
- "parallel": false,
177
- "touches": [
178
- "tests",
179
- "bug-reproduction"
180
- ],
181
- "files": [
182
- "src/feature/feature.test.ts"
183
- ],
184
- "acceptance": [
185
- "The target bug is reproduced as a stable failure",
186
- "The failing loop matches the user-reported symptom",
187
- "The regression test uses the correct seam for the real trigger chain",
188
- "The failure output points to the confirmed root-cause path",
189
- "The reproduction preserves evidence for first bad state and original trigger"
190
- ],
191
- "verification": [
192
- "npm test -- src/feature/feature.test.ts"
193
- ],
194
- "evidence": [
195
- "Failing test output"
196
- ],
197
- "context": {
198
- "readFiles": [
199
- "tasks.md",
200
- "change-meta.json"
201
- ],
202
- "commands": [
203
- "npm test -- src/feature/feature.test.ts"
204
- ],
205
- "notes": [
206
- "Prove the bug first",
207
- "Do not repair the symptom site unless Root Cause Contract proves it is the original trigger",
208
- "Do not change unrelated contracts in this task"
209
- ]
210
- },
211
- "reviews": {
212
- "spec": "pending",
213
- "code": "pending"
214
- },
215
- "type": "TEST",
216
- "run": [
217
- "npm test -- src/feature/feature.test.ts"
218
- ],
219
- "checks": [],
220
- "attempts": 0,
221
- "maxRetries": 1
222
- }
223
- ]
224
- }
@@ -1,178 +0,0 @@
1
- {
2
- "changeId": "REQ-XXX",
3
- "goal": "Deliver planned requirement changes safely.",
4
- "createdAt": "2026-05-11T00:00:00.000Z",
5
- "updatedAt": "2026-05-11T00:00:00.000Z",
6
- "requirementId": "REQ-XXX",
7
- "requirementVersion": "REQ-XXX.v1",
8
- "outputPolicy": {
9
- "documentLanguage": ""
10
- },
11
- "planningMeta": {
12
- "reqPlanSkillVersion": "3.9.2",
13
- "designVersion": "design.v1",
14
- "workBranch": "REQ/XXX-short-feature-name",
15
- "approvedAt": "2026-04-15T12:00:00.000Z",
16
- "basedOnOption": "Option A",
17
- "aiLeverageDecisionLens": {
18
- "realUserOrOperator": "",
19
- "statusQuoWorkaround": "",
20
- "humanTeamEffortForFullScope": "",
21
- "ccAgentEffortForFullScope": "",
22
- "aiCompressionRatio": "",
23
- "completeLakeBoundary": "",
24
- "oceanBoundary": "",
25
- "scopeRecommendation": "sharp-wedge",
26
- "costModel": {
27
- "agentTime": "",
28
- "humanReviewTime": "",
29
- "verificationCost": "",
30
- "maintenanceCost": "",
31
- "failureCost": "",
32
- "reversibility": ""
33
- },
34
- "verdict": "sharp-wedge",
35
- "missingEvidenceOrPivotReason": "",
36
- "impactOnApprovedDirection": ""
37
- },
38
- "externalBestPractice": {
39
- "needed": false,
40
- "decisionStatus": "not-needed",
41
- "decisionQuestionId": "",
42
- "privacyGuard": "generalized terms only; no project names, private requirements, customer names, secrets, logs, or proprietary concepts",
43
- "generalizedSearchTerms": [],
44
- "sourcesChecked": [],
45
- "conventionalWisdom": "",
46
- "currentDiscourse": "",
47
- "repoFitVerdict": "skipped",
48
- "designImpacts": [],
49
- "skippedReason": "repo evidence is sufficient for this plan"
50
- },
51
- "decisionQuestions": [
52
- {
53
- "questionId": "D1",
54
- "gate": "approach-approval",
55
- "knownEvidence": [],
56
- "recommendation": "Option A",
57
- "options": [
58
- {
59
- "id": "A",
60
- "label": "Minimal viable",
61
- "recommended": true,
62
- "completeness": "7/10",
63
- "good": "",
64
- "costRisk": ""
65
- },
66
- {
67
- "id": "B",
68
- "label": "Ideal architecture",
69
- "recommended": false,
70
- "completeness": "10/10",
71
- "good": "",
72
- "costRisk": ""
73
- }
74
- ],
75
- "userChoice": "A",
76
- "impact": "cc-do follows the approved implementation surface and task split",
77
- "status": "answered"
78
- }
79
- ]
80
- },
81
- "currentTaskId": "T001",
82
- "tasks": [
83
- {
84
- "id": "T001",
85
- "title": "[TEST] Add a failing test for the missing behavior",
86
- "type": "TEST",
87
- "phase": 1,
88
- "contract": {
89
- "sourceFunnelRounds": [
90
- "Requirement Reality",
91
- "Interface & Data Contract",
92
- "Task Contract"
93
- ],
94
- "userStory": "US-001",
95
- "edgeOrRecoveryStory": "US-EDGE-001",
96
- "fileResponsibility": "tests own behavior proof",
97
- "methodOrInterface": "public interface / caller flow / CLI / API / UI / trace replay / harness",
98
- "keyFields": [],
99
- "inputOutput": "",
100
- "failurePath": "The behavior is currently missing",
101
- "afkOrHitl": "AFK",
102
- "doNotRedecide": [
103
- "target behavior",
104
- "public seam",
105
- "key fields",
106
- "allowed mock boundary"
107
- ],
108
- "artifactUpdates": [
109
- "src/feature/feature.test.ts"
110
- ]
111
- },
112
- "parallel": false,
113
- "dependsOn": [],
114
- "touches": [
115
- "tests",
116
- "requirement-behavior"
117
- ],
118
- "files": [
119
- "src/feature/feature.test.ts"
120
- ],
121
- "run": [
122
- "npm test -- src/feature/feature.test.ts"
123
- ],
124
- "acceptance": [
125
- "The target behavior is reproduced as a failing test",
126
- "The failure message points to the missing requirement behavior"
127
- ],
128
- "verification": [
129
- "npm test -- src/feature/feature.test.ts"
130
- ],
131
- "evidence": [
132
- "Failing test output"
133
- ],
134
- "context": {
135
- "readFiles": [
136
- "tasks.md",
137
- "change-meta.json"
138
- ],
139
- "commands": [
140
- "npm test -- src/feature/feature.test.ts"
141
- ],
142
- "notes": [
143
- "Write the failing test first",
144
- "Do not change unrelated contracts in this task",
145
- "Do not generate execution context.md, checkpoint.json, review markdown, or AI-written process files"
146
- ]
147
- },
148
- "reviews": {
149
- "spec": "pending",
150
- "code": "pending"
151
- },
152
- "status": "pending",
153
- "tddPhase": "red",
154
- "verticalSlice": "Slice 1",
155
- "testSeam": {
156
- "entry": "public interface / caller flow / CLI / API / UI / trace replay / harness",
157
- "behaviorAsserted": "The user or caller observable behavior that should exist",
158
- "specStyleTestName": "caller can observe the required behavior",
159
- "oneLogicalBehavior": true,
160
- "publicVerificationPath": "Read back through the same public interface or user-visible path",
161
- "implementationDetailRisk": "low"
162
- },
163
- "feedbackLoop": {
164
- "type": "automated-test",
165
- "determinism": "deterministic",
166
- "expectedFailure": "Fails because the target behavior is missing"
167
- },
168
- "checks": [],
169
- "attempts": 0,
170
- "maxRetries": 1
171
- }
172
- ],
173
- "metadata": {
174
- "source": "tasks.md",
175
- "generatedBy": "cc-devflow task-contract",
176
- "planVersion": 1
177
- }
178
- }
@@ -1,28 +0,0 @@
1
- {
2
- "changeId": "REQ-001",
3
- "requirementId": "REQ-001",
4
- "outputPolicy": {
5
- "documentLanguage": ""
6
- },
7
- "sourceRoadmap": {
8
- "itemId": "RM-001",
9
- "roadmapVersion": "roadmap.v1",
10
- "roadmapSkillVersion": "4.1.0"
11
- },
12
- "spec": {
13
- "primaryCapability": "cap-example",
14
- "secondaryCapabilities": [],
15
- "changeType": "update",
16
- "specFiles": [
17
- "devflow/specs/capabilities/cap-example.md"
18
- ],
19
- "expectedDelta": [
20
- "Describe the new truth the change should add or tighten"
21
- ],
22
- "affectedInvariants": [],
23
- "gapsClosed": [],
24
- "newGaps": [],
25
- "syncStatus": "planned",
26
- "notes": []
27
- }
28
- }
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -euo pipefail
4
-
5
- # ------------------------------------------------------------
6
- # 校验 spec / roadmap / change 链路是否断裂
7
- # ------------------------------------------------------------
8
-
9
- ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
10
- INDEX_FILE="$ROOT/devflow/specs/INDEX.md"
11
- CAP_DIR="$ROOT/devflow/specs/capabilities"
12
- FAILED=0
13
-
14
- if [[ ! -f "$INDEX_FILE" ]]; then
15
- echo "Missing devflow/specs/INDEX.md" >&2
16
- exit 1
17
- fi
18
-
19
- if [[ ! -d "$CAP_DIR" ]]; then
20
- echo "Missing devflow/specs/capabilities/" >&2
21
- exit 1
22
- fi
23
-
24
- while IFS= read -r capability; do
25
- [[ -z "$capability" ]] && continue
26
- if [[ ! -f "$CAP_DIR/$capability.md" ]]; then
27
- echo "Dangling capability in INDEX.md: $capability" >&2
28
- FAILED=1
29
- fi
30
- done < <(awk -F'|' '/^\|/ {id=$2; gsub(/^[[:space:]]+|[[:space:]]+$/, "", id); if (id != "" && id != "Capability ID" && id !~ /^-+$/) print id}' "$INDEX_FILE")
31
-
32
- while IFS= read -r meta; do
33
- primary="$(jq -r '.spec.primaryCapability // empty' "$meta" 2>/dev/null || true)"
34
- [[ -z "$primary" ]] && continue
35
- if [[ ! -f "$CAP_DIR/$primary.md" ]]; then
36
- echo "Dangling primary capability in ${meta#$ROOT/}: $primary" >&2
37
- FAILED=1
38
- fi
39
- done < <(find "$ROOT/devflow/changes" -maxdepth 2 -name change-meta.json -type f 2>/dev/null | sort)
40
-
41
- if [[ "$FAILED" -ne 0 ]]; then
42
- exit 1
43
- fi
44
-
45
- echo "Spec links are valid"