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
@@ -4,7 +4,7 @@
4
4
 
5
5
  - Requirement version: `REQ-001.v1`
6
6
  - Design version: `design.v1`
7
- - CC-Plan skill version: `3.9.2`
7
+ - CC-Plan skill version: `3.10.1`
8
8
  - Work branch: `REQ/001-copy-invite-link`
9
9
  - Source roadmap item: `RM-001`
10
10
  - Source roadmap version: `roadmap.v1`
@@ -45,20 +45,25 @@
45
45
  ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
46
46
 
47
47
  - Template source: `assets/TASKS_TEMPLATE.md`
48
- - Context index first: run `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections; use `packetOnly` plus `mustNotForget` first, verify `sourceHashes`, open `defaultOpen` refs only when needed, and reserve `deepOpen` for matching `openWhen.conditions`.
49
- - Task selection: read `planning/task-manifest.json.currentTaskId`; if empty, run the ready-task selector before choosing work.
48
+ - CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `query workflow-context` and `next-change-key`, stop blocked.
49
+ - Context first: run resolved CLI `query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact` before opening deep sections.
50
+ - Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
50
51
  - Task block rule: read the full task block before coding; title-only execution is invalid.
51
- - Completion rule: after verification and review gates pass, run the completion script; do not manually edit checkbox, status, or `currentTaskId`.
52
- - Completion failure: if the script fails, fix the missing review / dependency evidence and rerun it. Do not bypass it by editing JSON or Markdown.
52
+ - Completion rule: after verification and review gates pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
53
+ - Runtime file ban: do not generate process files beyond this `task.md`.
53
54
 
54
55
  ```bash
55
- cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact
56
- SCRIPT_ROOT=".claude/skills/cc-do/scripts"
56
+ DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
57
+ if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
58
+ DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
59
+ fi
60
+ bash "$DEVFLOW" require query workflow-context next-change-key
61
+ bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compactSCRIPT_ROOT=".claude/skills/cc-do/scripts"
57
62
  if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
58
63
  SCRIPT_ROOT=".codex/skills/cc-do/scripts"
59
64
  fi
60
- bash "$SCRIPT_ROOT/select-ready-tasks.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json
61
- bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md --task <task-id>
65
+ bash "$SCRIPT_ROOT/select-ready-tasks.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/
66
+ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/ --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md --task <task-id>
62
67
  ```
63
68
 
64
69
  ## Phase 1: Foundation
@@ -70,7 +75,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/cha
70
75
  Read first: `design.md`, `src/features/share/ShareDialog.tsx`
71
76
  Verification: `npm test -- src/features/share/ShareDialog.test.tsx`
72
77
  Evidence: failing output that shows the missing button / action
73
- Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md --task T001`; do not hand-edit status.
78
+ Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/ --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md --task T001`; do not hand-edit status.
74
79
  Test seam: share dialog UI behavior
75
80
  Public verification path: Run the share dialog test and observe the copy action through the rendered dialog
76
81
  Allowed mocks: clipboard boundary
@@ -83,7 +88,7 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/cha
83
88
  Read first: `design.md`, `src/features/share/ShareDialog.test.tsx`
84
89
  Verification: `npm test -- src/features/share/ShareDialog.test.tsx`
85
90
  Evidence: passing output + review notes
86
- Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md --task T002`; do not hand-edit status.
91
+ Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/ --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md --task T002`; do not hand-edit status.
87
92
  Test seam: share dialog UI behavior
88
93
  Public verification path: Run the share dialog test and observe the copy action through the rendered dialog
89
94
  Allowed mocks: clipboard boundary
@@ -95,12 +100,12 @@ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/cha
95
100
  Goal: 为 `cc-check` 准备本次实现的真实验证证据。
96
101
  TDD phase: evidence
97
102
  Files: `src/features/share/ShareDialog.tsx`, `src/features/share/ShareDialog.test.tsx`
98
- Read first: `tasks.md`, `task-manifest.json`
103
+ Read first: `task.md`
99
104
  Verification:
100
105
  - `npm test -- src/features/share/ShareDialog.test.tsx`
101
106
  - `npm run lint -- src/features/share/ShareDialog.tsx`
102
107
  Evidence: passing test output + clean lint output
103
- Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md --task T003`; do not hand-edit status.
108
+ Completion: after verification evidence and required review records exist, run `SCRIPT_ROOT=".claude/skills/cc-do/scripts"; if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then SCRIPT_ROOT=".codex/skills/cc-do/scripts"; fi; bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/ --tasks docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/task.md --task T003`; do not hand-edit status.
104
109
  Test seam: share dialog UI behavior
105
110
  Public verification path: Run the share dialog test and observe the copy action through the rendered dialog
106
111
  Allowed mocks: clipboard boundary
@@ -17,11 +17,6 @@ fi
17
17
  skill_version() {
18
18
  local skill="$1"
19
19
  local file="$ROOT_DIR/.claude/skills/$skill/SKILL.md"
20
- if [[ ! -f "$file" ]]; then
21
- echo "Missing skill file: $file" >&2
22
- exit 1
23
- fi
24
-
25
20
  sed -n 's/^version: //p' "$file" | head -n 1
26
21
  }
27
22
 
@@ -35,27 +30,15 @@ assert_contains() {
35
30
  }
36
31
 
37
32
  ROADMAP_VERSION="$(skill_version cc-roadmap)"
38
- NEXT_VERSION="$(skill_version cc-next)"
39
- DEV_VERSION="$(skill_version cc-dev)"
40
33
  REQ_PLAN_VERSION="$(skill_version cc-plan)"
41
- INVESTIGATE_VERSION="$(skill_version cc-investigate)"
42
34
  REQ_DO_VERSION="$(skill_version cc-do)"
43
- REQ_REVIEW_VERSION="$(skill_version cc-review)"
44
- PR_REVIEW_VERSION="$(skill_version cc-pr-review)"
45
- PR_LAND_VERSION="$(skill_version cc-pr-land)"
46
35
  REQ_CHECK_VERSION="$(skill_version cc-check)"
47
36
  REQ_ACT_VERSION="$(skill_version cc-act)"
48
37
 
49
38
  for pair in \
50
39
  "cc-roadmap:$ROADMAP_VERSION" \
51
- "cc-next:$NEXT_VERSION" \
52
- "cc-dev:$DEV_VERSION" \
53
40
  "cc-plan:$REQ_PLAN_VERSION" \
54
- "cc-investigate:$INVESTIGATE_VERSION" \
55
41
  "cc-do:$REQ_DO_VERSION" \
56
- "cc-review:$REQ_REVIEW_VERSION" \
57
- "cc-pr-review:$PR_REVIEW_VERSION" \
58
- "cc-pr-land:$PR_LAND_VERSION" \
59
42
  "cc-check:$REQ_CHECK_VERSION" \
60
43
  "cc-act:$REQ_ACT_VERSION"
61
44
  do
@@ -73,11 +56,10 @@ while IFS= read -r encoded; do
73
56
  readme="$ROOT_DIR/$(jq -r '.readme' <<<"$encoded")"
74
57
  root="$ROOT_DIR/$(jq -r '.root' <<<"$encoded")"
75
58
  change_dir="$ROOT_DIR/$(jq -r '.changeDir' <<<"$encoded")"
76
- planning_dir="$change_dir/planning"
77
- review_dir="$change_dir/review"
59
+ task_file="$change_dir/task.md"
78
60
  handoff_dir="$change_dir/handoff"
79
61
 
80
- for file in "$readme" "$root/ROADMAP.md" "$root/BACKLOG.md" "$root/roadmap.json" "$planning_dir/design.md" "$planning_dir/tasks.md" "$planning_dir/task-manifest.json"; do
62
+ for file in "$readme" "$root/ROADMAP.md" "$root/BACKLOG.md" "$root/roadmap.json" "$task_file"; do
81
63
  if [[ ! -f "$file" ]]; then
82
64
  echo "Example $example_id is missing required file: $file" >&2
83
65
  exit 1
@@ -85,40 +67,14 @@ while IFS= read -r encoded; do
85
67
  done
86
68
 
87
69
  assert_contains "$root/ROADMAP.md" "- Skill version: \`$ROADMAP_VERSION\`"
88
- assert_contains "$root/ROADMAP.md" "- Roadmap state source: \`roadmap.json\`"
89
- assert_contains "$root/ROADMAP.md" "## Technical Architecture"
90
- assert_contains "$root/ROADMAP.md" "\`\`\`mermaid"
91
70
  assert_contains "$root/BACKLOG.md" "- Skill version: \`$ROADMAP_VERSION\`"
92
- assert_contains "$root/BACKLOG.md" "> Deprecated projection. Edit \`roadmap.json\` instead."
93
- assert_contains "$root/BACKLOG.md" "- Roadmap state source: \`roadmap.json\`"
94
- assert_contains "$root/BACKLOG.md" "| RM-ID | Title | Source Stage | Priority | Primary Capability | Secondary Capabilities | Capability Gap | Expected Spec Delta | Evidence | Depends On | Parallel With | Unknowns | Next Decision | Ready |"
95
- assert_contains "$root/BACKLOG.md" "## Ready For Req-Plan"
96
- assert_contains "$root/BACKLOG.md" " - Primary Capability:"
97
- assert_contains "$root/BACKLOG.md" " - Expected spec delta:"
98
- jq -er '.version == 3 and (.items | length) > 0 and (.meta | type == "object") and (.handoff | type == "object") and (.architecture.nodes | length) > 0 and any(.items[]; .backlog != null)' "$root/roadmap.json" >/dev/null
99
- assert_contains "$planning_dir/design.md" "- CC-Plan skill version: \`$REQ_PLAN_VERSION\`"
100
- assert_contains "$planning_dir/tasks.md" "- CC-Plan skill version: \`$REQ_PLAN_VERSION\`"
101
-
102
- jq -er --arg roadmap "$ROADMAP_VERSION" --arg reqplan "$REQ_PLAN_VERSION" '
103
- (.planningMeta.reqPlanSkillVersion // $reqplan) == $reqplan and
104
- (.status? == null) and
105
- (.activePhase? == null) and
106
- (.sourceRoadmap? == null) and
107
- (.spec? == null) and
108
- (.executionProtocol? == null) and
109
- (.planningMeta.requirementBrief? == null) and
110
- (.planningMeta.ambiguityGate? == null) and
111
- (.planningMeta.reviewLoop? == null) and
112
- all(.tasks[]; (.completion? == null) and (.tddPhase | type == "string") and (.testSeam.publicVerificationPath | type == "string"))
113
- ' "$planning_dir/task-manifest.json" >/dev/null
114
-
115
- assert_contains "$planning_dir/tasks.md" "## Execution Protocol"
116
- assert_contains "$planning_dir/tasks.md" "cc-devflow query workflow-context"
117
- assert_contains "$planning_dir/tasks.md" "--data-only --no-trace --compact"
118
- assert_contains "$planning_dir/tasks.md" "mark-task-complete.sh"
119
- assert_contains "$planning_dir/tasks.md" "TDD phase:"
120
- assert_contains "$planning_dir/tasks.md" "Completion:"
121
- assert_contains "$planning_dir/tasks.md" "Public verification path:"
71
+ assert_contains "$task_file" "- CC-Plan skill version: \`$REQ_PLAN_VERSION\`"
72
+ assert_contains "$task_file" "## Execution Protocol"
73
+ assert_contains "$task_file" "task.md"
74
+ assert_contains "$task_file" "mark-task-complete.sh"
75
+ assert_contains "$task_file" "TDD phase:"
76
+ assert_contains "$task_file" "Completion:"
77
+ assert_contains "$task_file" "Public verification path:"
122
78
 
123
79
  assert_contains "$readme" "## Example Meta"
124
80
  assert_contains "$readme" "\`cc-roadmap@$ROADMAP_VERSION\`"
@@ -128,15 +84,8 @@ while IFS= read -r encoded; do
128
84
 
129
85
  if jq -e '.covers | index("cc-act")' <<<"$encoded" >/dev/null; then
130
86
  assert_contains "$readme" "\`cc-act@$REQ_ACT_VERSION\`"
131
- fi
132
-
133
- if [[ -f "$review_dir/report-card.json" ]]; then
134
- "$ROOT_DIR/.claude/skills/cc-check/scripts/verify-gate.sh" --report "$review_dir/report-card.json" >/dev/null
135
- fi
136
-
137
- if jq -e '.covers | index("cc-act")' <<<"$encoded" >/dev/null; then
138
- if [[ ! -f "$handoff_dir/pr-brief.md" && ! -f "$handoff_dir/resume-index.md" && ! -f "$handoff_dir/release-note.md" && ! -f "$handoff_dir/status.md" ]]; then
139
- echo "Example $example_id is missing a final handoff file under $handoff_dir" >&2
87
+ if [[ ! -f "$handoff_dir/pr-brief.md" ]]; then
88
+ echo "Example $example_id is missing PR file: $handoff_dir/pr-brief.md" >&2
140
89
  exit 1
141
90
  fi
142
91
  fi
@@ -1,48 +1,18 @@
1
1
  # Artifact Contract
2
2
 
3
- cc-devflow artifacts follow two rules: progressive disclosure and one state owner.
4
- Machine JSON has a third rule: it is CLI-owned. Agents write the human contract
5
- in `planning/tasks.md`, then run `cc-devflow task-contract compile` / `validate`;
6
- they must not handwrite `task-manifest.json` or `change-meta.json`.
3
+ cc-devflow keeps the workflow surface intentionally small.
7
4
 
8
- ## Progressive Disclosure
5
+ ## Durable Files
9
6
 
10
- Every skill output should have a default path and deeper layers.
7
+ - `devflow/changes/<change-key>/task.md`
8
+ - `devflow/changes/<change-key>/handoff/pr-brief.md` when PR or local handoff needs it
9
+ - `devflow/postmortems/incidents/<date>-<change-key>.md` when a FIX or recurring failure needs a postmortem
10
+ - `devflow/postmortems/INDEX.md` as the postmortem index
11
11
 
12
- - Default layer: the next actor can see the current state, next action, and proof source quickly.
13
- - Conditional layer: open only when scope, dependency, review, or conflict questions arise.
14
- - Deep layer: full evidence, reasoning, or historical review, opened only for audit or recovery.
12
+ ## State Source
15
13
 
16
- If a field has no clear opener and no downstream consumer, remove it.
14
+ Git records process history. Commit after each completed PDCA or IDCA environment/stage.
17
15
 
18
- ## State Owners
16
+ ## Retired Surface
19
17
 
20
- | State | Owner artifact | Projection / derived readers |
21
- | --- | --- | --- |
22
- | Roadmap item status and progress | `devflow/roadmap.json` | `devflow/ROADMAP.md`, `devflow/BACKLOG.md`, handoff summaries |
23
- | Capability/spec sync state | `devflow/changes/<change-key>/change-meta.json` | `planning/tasks.md`, `review/report-card.json`, handoff summaries |
24
- | Execution task status | `planning/task-manifest.json.tasks[].status` | `planning/tasks.md` checkboxes, recovery summaries |
25
- | Ready task / phase | derived from `tasks[].status`, `tasks[].phase`, and `tasks[].dependsOn` | `currentTaskId` cache, ready-task selector output |
26
- | Runtime event log | `execution/tasks/<task-id>/events.jsonl` only for debug/failed runs | recovery summaries |
27
- | Review verdict | `review/report-card.json.verdict` | PR brief, release note, act gate |
28
- | PR / remote queue truth | live GitHub API / `gh` output | local review notes and handoff summaries |
29
- | Project postmortem facts and principles | `devflow/postmortems/` | planning recall, investigation hypotheses, task guardrails |
30
-
31
- ## Duplication Rules
32
-
33
- - Machine artifacts may reference another owner by id or path, but must not copy its status lifecycle.
34
- - Markdown projections must state their source instead of becoming editable truth.
35
- - Derived fields must be described as derived/cache and must be recomputable.
36
- - A skill must not create a new status field unless it also names the owner, lifecycle, projection readers, and validation gate.
37
- - Task manifests must not duplicate PRD narrative, review-loop prose, source-trust details, completion shell commands, roadmap progress, or spec sync status.
38
- - Task manifests and change metadata must be generated or refreshed by CLI/template tooling, not manually edited as process notes.
39
- - Project postmortems must cite stronger owner artifacts and Git evidence; they do not own roadmap progress, task status, review verdicts, or spec sync state.
40
-
41
- ## Required Check
42
-
43
- Before changing any skill output, answer:
44
-
45
- 1. Who owns this state?
46
- 2. Is this field consumed directly, or is it a projection?
47
- 3. Can it be recomputed from a stronger source?
48
- 4. What validation fails if this state diverges?
18
+ Do not create process JSON, review ledgers, report cards, status files, resume files, release notes, or principle files.
@@ -86,20 +86,20 @@ Use the skills in this order:
86
86
  Typical outputs:
87
87
 
88
88
  - `cc-roadmap` writes `devflow/roadmap.json` as the editable roadmap truth, then generates `devflow/ROADMAP.md` and deprecated `devflow/BACKLOG.md`
89
- - `cc-spec-init` writes `devflow/specs/INDEX.md`, capability specs, and `change-meta.json`
90
- - `cc-plan` writes `planning/tasks.md#Contract Summary`, then CLI-generates `task-manifest.json` and `change-meta.json`
91
- - `cc-investigate` writes `planning/tasks.md#Root Cause Contract`, then CLI-generates `task-manifest.json` and `change-meta.json`
92
- - `cc-review` writes `review-ledger.jsonl`, optional `review-findings.json`, and Markdown reports only when rendered on demand
93
- - `cc-check` writes `report-card.json`
94
- - `cc-act` writes exactly one final handoff file: `handoff/pr-brief.md`, `handoff/resume-index.md`, or `handoff/release-note.md`
89
+ - `cc-spec-init` writes `devflow/specs/INDEX.md` and capability specs
90
+ - `cc-plan` writes `task.md#Contract Summary`
91
+ - `cc-investigate` writes `task.md#Root Cause Contract`
92
+ - `cc-review` reports concrete findings in the response; it does not write review process files
93
+ - `cc-check` reports verification facts in the response, PR brief, or Git commit
94
+ - `cc-act` writes exactly one final PR file, `handoff/pr-brief.md`, or incident postmortem files when a real incident needs a corpse report
95
95
 
96
96
  Capability truth lives in `devflow/specs/`.
97
97
  Change truth lives in `devflow/changes/<change>/`.
98
98
 
99
99
  - Keep `INDEX.md` plus capability markdown under `devflow/specs/`.
100
100
  - Name new change directories as `REQ-<number>-<description>` for requirements or `FIX-<number>-<description>` for bug fixes. `REQ` and `FIX` advance as separate local sequences, so cross-prefix duplicates are valid. Parallel worktrees may still repeat numbers; the full change key, especially the description, distinguishes the work. Old lowercase directories are compatibility reads only.
101
- - Keep CLI-generated `change-meta.json`, `planning/tasks.md`, CLI-generated `task-manifest.json`, review ledger/findings records, optional CLI logs for debug/failure, `report-card.json`, and one final handoff file under each `devflow/changes/<change>/`. Do not generate task `context.md`, `checkpoint.json`, or AI-written process files.
102
- - Machine JSON is CLI-owned: run `cc-devflow task-contract compile` / `validate`; do not handwrite `task-manifest.json` or `change-meta.json`.
101
+ - Keep `task.md`, optional `handoff/pr-brief.md`, and incident postmortem files under each `devflow/changes/<change>/`. Do not generate task `context.md`, `checkpoint.json`, review ledgers, status/resume files, release notes, principle files, or AI-written process files.
102
+ - Workflow state is Git-owned: keep `task.md`, commit each completed stage, and do not create process JSON.
103
103
  - Legacy `planning/design.md`, `planning/analysis.md`, and `cc-review-*.md` are readable fallback inputs for older changes, not new default writes.
104
104
  - Worker prompts, journals, assignments, and session logs belong under `devflow/workspaces/<change>/` as ephemeral scratch.
105
105
 
@@ -86,19 +86,19 @@ find .codex/skills -mindepth 2 -maxdepth 2 -name SKILL.md | sort
86
86
  常见产物:
87
87
 
88
88
  - `cc-roadmap` 产出可编辑真相 `devflow/roadmap.json`,再生成 `devflow/ROADMAP.md` 和 deprecated `devflow/BACKLOG.md`
89
- - `cc-spec-init` 产出 `devflow/specs/INDEX.md`、capability spec 和 `change-meta.json`
90
- - `cc-plan` 产出 `planning/tasks.md#Contract Summary`,再由 CLI 生成 `task-manifest.json` 和 `change-meta.json`
91
- - `cc-investigate` 产出 `planning/tasks.md#Root Cause Contract`,再由 CLI 生成 `task-manifest.json` 和 `change-meta.json`
92
- - `cc-review` 产出 `review-ledger.jsonl`、可选 `review-findings.json`,Markdown 报告只在需要时按需渲染
93
- - `cc-check` 产出 `report-card.json`
94
- - `cc-act` 只产出一个最终 handoff 文件:`handoff/pr-brief.md`、`handoff/resume-index.md` `handoff/release-note.md`
89
+ - `cc-spec-init` 产出 `devflow/specs/INDEX.md` 和 capability spec
90
+ - `cc-plan` 产出 `task.md#Contract Summary`
91
+ - `cc-investigate` 产出 `task.md#Root Cause Contract`
92
+ - `cc-review` 在当前回复里报告具体问题,不写 review 过程文件
93
+ - `cc-check` 在当前回复、PR 文件或 Git commit 里记录验证事实
94
+ - `cc-act` 只产出最终 PR 文件 `handoff/pr-brief.md`;真实事故需要尸检时才产出 incident postmortem 文件
95
95
 
96
96
  durable truth 分两层:
97
97
 
98
98
  - `devflow/specs/`:capability 真相,保留 `INDEX.md` 与 `capabilities/*.md`
99
99
  - 新 change 目录必须命名为 `REQ-<number>-<description>`(需求)或 `FIX-<number>-<description>`(修复);`REQ` 和 `FIX` 分别维护自己的递增编号,跨前缀同号不是冲突;并行工作树造成重复编号时,完整 change key 的描述负责区分业务内容,旧小写目录只作为历史兼容读取。
100
- - `devflow/changes/<change>/`:变更真相,保留 CLI 生成的 `change-meta.json`、`planning/tasks.md`、CLI 生成的 `task-manifest.json`、review ledger / findings 记录、debug / failed 的可选 CLI 日志、`report-card.json` 和唯一的最终 handoff 文件。不要生成任务级 `context.md`、`checkpoint.json` 或 AI 手写过程文件。
101
- - 机器态 JSON 归 CLI 所有:运行 `cc-devflow task-contract compile` / `validate`;不要手写 `task-manifest.json` `change-meta.json`。
100
+ - `devflow/changes/<change>/`:变更真相,只保留 `task.md`、可选 `handoff/pr-brief.md`,以及真实事故需要的尸检文件。不要生成任务级 `context.md`、`checkpoint.json`、review ledger、status/resume 文件、release note、principles 或 AI 手写过程文件。
101
+ - 流程状态归 Git:保留 `task.md`,每个完成阶段提交 commit,不创建过程 JSON。
102
102
  - 历史 `planning/design.md`、`planning/analysis.md` 和 `cc-review-*.md` 是旧 change 的可读 fallback,不再是新默认写入。
103
103
  - worker prompt、journal、assignment、session log 统一放到 `devflow/workspaces/<change>/`,作为 ephemeral scratch。
104
104
 
@@ -1,137 +1,23 @@
1
- # Minimized Workflow Artifacts
1
+ # Minimize Artifacts
2
2
 
3
- This guide describes the default artifact contract for new cc-devflow changes.
4
- The goal is simple: keep durable workflow truth readable, small, and measurable.
3
+ The workflow is intentionally Git-first.
5
4
 
6
- ## Default Shape
5
+ ## Keep
7
6
 
8
- Each new change keeps durable truth under `devflow/changes/<change-key>/`.
7
+ - `task.md`
8
+ - `handoff/pr-brief.md` when a PR or local handoff needs it
9
+ - incident postmortem when a FIX or recurring failure needs it
9
10
 
10
- Default human-authored Markdown:
11
+ ## Do Not Keep
11
12
 
12
- - `planning/tasks.md`
13
+ - process JSON
14
+ - review ledgers or finding files
15
+ - report cards
16
+ - status or resume files
17
+ - release notes
18
+ - principles files
19
+ - task context or checkpoint files
13
20
 
14
- Default CLI-owned machine records:
21
+ ## Commit Rule
15
22
 
16
- - `change-meta.json`
17
- - `planning/task-manifest.json`
18
- - `review/review-ledger.jsonl`
19
- - `review/review-findings.json` when findings exist
20
- - `execution/tasks/<task-id>/checkpoint.json`
21
- - `review/report-card.json`
22
- - one final handoff file under `handoff/`
23
-
24
- Runtime scratch, worker prompts, journals, assignments, and session logs belong
25
- under `devflow/workspaces/<change-key>/`, not beside durable change truth.
26
-
27
- ## Feature Plans
28
-
29
- Feature and scope changes use:
30
-
31
- - `planning/tasks.md#Contract Summary`
32
- - `planning/task-manifest.json`
33
- - `change-meta.json`
34
-
35
- `Contract Summary` owns the frozen human-readable plan: user story, non-negotiable
36
- constraints, decisions that must not be reopened, task slices, and verification
37
- expectations. `task-manifest.json` and `change-meta.json` must be generated or
38
- updated by `cc-devflow task-contract compile`; agents must not handwrite them.
39
-
40
- ## Bug Investigations
41
-
42
- Bug, regression, and unexpected-behavior work uses:
43
-
44
- - `planning/tasks.md#Root Cause Contract`
45
- - `planning/task-manifest.json`
46
- - `change-meta.json`
47
-
48
- `Root Cause Contract` owns the symptom, reproduction evidence, confirmed cause,
49
- rejected near-causes, repair boundary, and task handoff. `cc-do` should implement
50
- from that frozen contract instead of reopening investigation during execution.
51
- `task-manifest.json` and `change-meta.json` must be generated or updated by
52
- `cc-devflow task-contract compile`; agents must not handwrite them.
53
-
54
- ## Review Records
55
-
56
- `cc-review` writes structured lifecycle events first:
57
-
58
- - `review/review-ledger.jsonl`
59
- - optional `review/review-findings.json`
60
- - optional rendered Markdown from `cc-devflow review render`
61
-
62
- Markdown review reports are for human reading when needed. They are not the
63
- default durable review source.
64
-
65
- Useful commands:
66
-
67
- ```bash
68
- npx cc-devflow review start --change REQ-001 --change-key REQ-001-copy-invite-link --base-sha abc123 --head-sha def456
69
- npx cc-devflow review record-node --change REQ-001 --change-key REQ-001-copy-invite-link --review-id <review-id> --node-id R001 --target planning/tasks.md --status checked --coverage contract --evidence-ref "cmd:npm run verify"
70
- npx cc-devflow review add-finding --change REQ-001 --change-key REQ-001-copy-invite-link --review-id <review-id> --finding-id F001 --severity important --confidence 8 --display-tier blocking --fingerprint sha256:<hash> --scope "current change" --path planning/tasks.md --evidence "finding evidence" --recommendation "repair action" --route cc-do
71
- npx cc-devflow review close --change REQ-001 --change-key REQ-001-copy-invite-link --review-id <review-id> --status clean --blocking-count 0 --warning-count 0 --next cc-check
72
- npx cc-devflow review render --change REQ-001 --change-key REQ-001-copy-invite-link --review-id <review-id> --output review/review-report.md
73
- ```
74
-
75
- ## Legacy Fallback
76
-
77
- Older changes may still contain:
78
-
79
- - `planning/design.md`
80
- - `planning/analysis.md`
81
- - `review/cc-review-plan.md`
82
- - `review/cc-review-report.md`
83
- - `review/cc-review-agent-results.jsonl`
84
-
85
- Those files remain readable compatibility inputs. New changes should not write
86
- them by default. When migrating old work, fold feature-plan truth into
87
- `planning/tasks.md#Contract Summary` and bug-investigation truth into
88
- `planning/tasks.md#Root Cause Contract`.
89
-
90
- ## Validation Gates
91
-
92
- Validate one change:
93
-
94
- ```bash
95
- npx cc-devflow task-contract compile --change REQ-001 --change-key REQ-001-copy-invite-link
96
- npx cc-devflow task-contract validate --change REQ-001 --change-key REQ-001-copy-invite-link
97
- ```
98
-
99
- Validate the repository artifact contract:
100
-
101
- ```bash
102
- npm run verify:artifacts
103
- ```
104
-
105
- Measure the contract:
106
-
107
- ```bash
108
- npm run benchmark:artifacts
109
- ```
110
-
111
- The package-level verification command also includes artifact validation:
112
-
113
- ```bash
114
- npm run verify
115
- ```
116
-
117
- Skill entrypoints have a separate context budget:
118
-
119
- ```bash
120
- npm run benchmark:skills
121
- ```
122
-
123
- Keep `SKILL.md` files as thin entry contracts. Move low-frequency planning,
124
- review, and recovery details behind `PLAYBOOK.md` or `references/*` so agents
125
- open them only when the matching escalation condition appears.
126
-
127
- ## Authoring Rule
128
-
129
- Before adding a durable file under `devflow/changes/<change-key>/`, answer:
130
-
131
- 1. Which downstream skill reads it by default?
132
- 2. Which state does it own that no existing artifact owns?
133
- 3. Which command fails if it drifts?
134
-
135
- If those answers are unclear, keep the information in `planning/tasks.md` or
136
- ephemeral workspace scratch. Machine JSON belongs to the CLI/compiler path, not
137
- manual agent authoring.
23
+ Each completed PDCA or IDCA environment/stage gets a Git commit. Use the commit graph as the process record.
@@ -1,78 +1,21 @@
1
- # Project Postmortem Contract
1
+ # Project Postmortems
2
2
 
3
- cc-devflow treats project postmortems as a durable AI memory surface. They are not
4
- chat summaries. They are repo-owned evidence that future agents can search before
5
- planning, investigating, or executing work.
3
+ Postmortems preserve recurring failures without turning every workflow step into a file.
6
4
 
7
- ## Storage Layout
5
+ ## Files
8
6
 
9
- Project-level postmortems live under `devflow/postmortems/`:
7
+ - `devflow/postmortems/INDEX.md`
8
+ - `devflow/postmortems/incidents/<date>-<change-key>.md`
10
9
 
11
- | Path | Owner | Purpose |
12
- | --- | --- | --- |
13
- | `INDEX.md` | `cc-act` | Progressive entry point, latest incidents, tags, and search hints |
14
- | `principles.md` | `cc-act` | Generalized lessons about recurring model, process, and engineering mistakes |
15
- | `incidents/<date>-<change-key>.md` | `cc-act` | Immutable-ish factual record for one incident, bug, or repeated AI failure |
10
+ ## When To Write One
16
11
 
17
- `cc-act` owns writes because it has verified closeout, Git state, review state, and
18
- ship facts. Earlier skills only read and project the relevant reminders into their
19
- own artifacts.
12
+ - closing a `FIX-*`
13
+ - repeated AI, test, release, Git, or architecture failure
14
+ - explicit user request
20
15
 
21
- ## Progressive Disclosure
16
+ ## Rules
22
17
 
23
- - Default layer: `INDEX.md` gives tags, one-line lessons, severity, affected
24
- surfaces, and links to deeper incident files.
25
- - Principle layer: `principles.md` gives reusable rules such as model failure
26
- modes, domain-specific judgment traps, and required countermeasures.
27
- - Incident layer: `incidents/*.md` gives the detailed facts, Git evidence,
28
- timeline, root cause, detection gap, repair, follow-ups, and search terms.
29
-
30
- Agents should start with keyword search over the default and principle layers, then
31
- open incident files only when the tags or failure class match the current task.
32
-
33
- ## Required Incident Evidence
34
-
35
- Every incident file should include:
36
-
37
- - Symptom and impact.
38
- - Trigger and timeline.
39
- - Confirmed root cause and rejected near-causes.
40
- - Why the failure escaped planning, investigation, execution, review, or ship.
41
- - Git evidence: branch, base, head SHA, PR if any, relevant commits, review range,
42
- and dirty-tree notes when they matter.
43
- - Verification evidence: commands, exit status, key output, and artifact paths.
44
- - Follow-up actions: root-cause fixes, detection improvements, and backlog items.
45
- - AI failure mode: model limitation, pattern-matching trap, missing evidence habit,
46
- over-broad abstraction, fake compatibility, test-seam mistake, or other reusable
47
- class.
48
- - Search terms future agents should use before repeating similar work.
49
-
50
- ## Redaction Guard
51
-
52
- Postmortems are durable repo artifacts, so they must never preserve secrets,
53
- tokens, private customer data, personal machine paths, or raw private logs unless
54
- the repository already treats that exact artifact as public source truth.
55
-
56
- - Record the command, file path, commit, or artifact pointer that proves the fact.
57
- - Quote only the minimal output needed to prove the incident.
58
- - Replace sensitive values with `<redacted>` and add a short redaction summary.
59
- - If the only available proof is sensitive, cite the owner artifact and describe
60
- the observed shape instead of copying the raw value.
61
-
62
- ## Read Gates
63
-
64
- `cc-plan`, `cc-investigate`, and `cc-do` must run a quick local search before they
65
- freeze direction or touch code:
66
-
67
- ```bash
68
- rg -n "<capability|module|error|failure-class|model-risk>" devflow/postmortems
69
- ```
70
-
71
- If `devflow/postmortems/` does not exist, record `no-project-postmortems-yet`.
72
- If a match exists, load only `INDEX.md`, `principles.md`, and the one or two
73
- incident files most relevant to the current work.
74
-
75
- ## State Ownership
76
-
77
- Postmortems do not own task status, roadmap progress, review verdicts, or spec sync
78
- state. They cite those stronger owners by path, commit, or command output.
18
+ - Use Git evidence, commands, and current files.
19
+ - Redact secrets, customer data, private logs, and local machine paths.
20
+ - Do not create a separate principles file.
21
+ - Do not use postmortems as task, review, or release state.
@@ -159,9 +159,9 @@ describe('Skills Registry Generator', () => {
159
159
  expect(execute.writes).toEqual(
160
160
  expect.arrayContaining([
161
161
  expect.objectContaining({
162
- path: 'devflow/changes/<change-key>/execution/tasks/<task-id>/events.jsonl',
162
+ path: 'devflow/changes/<change-key>/task.md',
163
163
  durability: 'durable',
164
- required: false
164
+ required: true
165
165
  })
166
166
  ])
167
167
  );
@@ -183,13 +183,14 @@ describe('Skills Registry Generator', () => {
183
183
  expect.arrayContaining([
184
184
  expect.objectContaining({
185
185
  path: 'devflow/changes/<change-key>/handoff/pr-brief.md',
186
- required: false,
187
- exclusiveGroup: 'handoff'
188
- }),
186
+ required: false
187
+ })
188
+ ])
189
+ );
190
+ expect(act.writes).not.toEqual(
191
+ expect.arrayContaining([
189
192
  expect.objectContaining({
190
- path: 'devflow/changes/<change-key>/handoff/release-note.md',
191
- required: false,
192
- exclusiveGroup: 'handoff'
193
+ path: expect.stringContaining('release')
193
194
  })
194
195
  ])
195
196
  );