cc-devflow 4.5.8 → 4.5.9

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 (77) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +27 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +9 -4
  3. package/.claude/skills/cc-act/SKILL.md +62 -3
  4. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +30 -0
  5. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +29 -0
  6. package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +103 -0
  7. package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +60 -4
  8. package/.claude/skills/cc-act/references/closure-contract.md +3 -0
  9. package/.claude/skills/cc-act/references/git-commit-guidelines.md +342 -37
  10. package/.claude/skills/cc-act/scripts/cc-act-common.sh +29 -1
  11. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +164 -0
  12. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +1 -1
  13. package/.claude/skills/cc-do/CHANGELOG.md +11 -0
  14. package/.claude/skills/cc-do/SKILL.md +19 -13
  15. package/.claude/skills/cc-do/scripts/build-task-context.sh +9 -5
  16. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +0 -6
  17. package/.claude/skills/cc-investigate/CHANGELOG.md +17 -0
  18. package/.claude/skills/cc-investigate/PLAYBOOK.md +15 -0
  19. package/.claude/skills/cc-investigate/SKILL.md +46 -1
  20. package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +47 -0
  21. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +21 -2
  22. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +28 -58
  23. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -0
  24. package/.claude/skills/cc-next/CHANGELOG.md +6 -0
  25. package/.claude/skills/cc-next/PLAYBOOK.md +26 -4
  26. package/.claude/skills/cc-next/SKILL.md +39 -4
  27. package/.claude/skills/cc-plan/CHANGELOG.md +19 -0
  28. package/.claude/skills/cc-plan/PLAYBOOK.md +25 -20
  29. package/.claude/skills/cc-plan/SKILL.md +83 -22
  30. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +67 -0
  31. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +59 -0
  32. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +55 -228
  33. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +46 -0
  34. package/.claude/skills/cc-plan/references/planning-contract.md +41 -27
  35. package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
  36. package/.claude/skills/cc-roadmap/PLAYBOOK.md +30 -0
  37. package/.claude/skills/cc-roadmap/SKILL.md +45 -8
  38. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +8 -0
  39. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +22 -0
  40. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +32 -1
  41. package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +14 -14
  42. package/CHANGELOG.md +12 -0
  43. package/README.md +37 -35
  44. package/README.zh-CN.md +37 -35
  45. package/docs/examples/example-bindings.json +7 -7
  46. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  47. package/docs/examples/full-design-blocked/README.md +1 -1
  48. package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
  49. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
  50. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +27 -311
  51. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +1 -1
  52. package/docs/examples/full-design-blocked/roadmap.json +1 -1
  53. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  54. package/docs/examples/local-handoff/README.md +1 -1
  55. package/docs/examples/local-handoff/ROADMAP.md +1 -1
  56. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
  57. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +25 -209
  58. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +1 -1
  59. package/docs/examples/local-handoff/roadmap.json +1 -1
  60. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  61. package/docs/examples/pdca-loop/README.md +1 -1
  62. package/docs/examples/pdca-loop/ROADMAP.md +1 -1
  63. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +64 -0
  64. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
  65. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +25 -228
  66. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +1 -1
  67. package/docs/examples/pdca-loop/roadmap.json +1 -1
  68. package/docs/examples/scripts/check-example-bindings.sh +9 -5
  69. package/docs/get-shit-done-strategy-audit.md +4 -4
  70. package/docs/guides/artifact-contract.md +44 -0
  71. package/docs/guides/project-postmortem.md +78 -0
  72. package/lib/skill-runtime/__tests__/planner.tdd.test.js +2 -2
  73. package/lib/skill-runtime/__tests__/schemas.test.js +33 -2
  74. package/lib/skill-runtime/planner.js +1 -2
  75. package/lib/skill-runtime/query.js +1 -1
  76. package/lib/skill-runtime/schemas.js +5 -3
  77. package/package.json +1 -1
@@ -1,5 +1,32 @@
1
1
  # CC-Act Skill Changelog
2
2
 
3
+ ## v1.8.7 - 2026-05-11
4
+
5
+ - add project-level AI postmortem writeback under `devflow/postmortems/` for FIX closeout and recurring AI/process/engineering failures
6
+ - add index, principle, and incident templates with progressive disclosure, Git evidence, verification evidence, and prevention summaries
7
+ - make `cc-act` the default postmortem writer because ship closeout has the verified review range, branch state, commits, PR/handoff, and follow-up truth
8
+ - add a Redaction Guard so project postmortems preserve evidence without copying secrets, customer data, private logs, or personal machine paths
9
+ - make post-merge archive a hard closeout gate instead of a soft next-action suggestion
10
+ - require `cc-devflow archive-change <change-key>` plus archive-path proof for `post-merge-closeout`
11
+ - allow skipping archive only with an explicit `ArchiveSkip` blocker and retry command in handoff material
12
+
13
+ ## v1.8.6 - 2026-05-11
14
+
15
+ - add a language-aware Pull Request Body Contract so `create-pr` and `update-pr` derive PR title/body language from runtime `Output language`
16
+ - render a detailed PR body draft in `pr-brief.md` with summary, problem, changes, validation, review/gate evidence, risk/rollback, docs/writeback, and follow-ups
17
+ - block shallow PR descriptions by requiring current diff/report-card/doc-sync/roadmap facts, real validation evidence, and no leftover placeholders before `gh pr create` or `gh pr edit`
18
+
19
+ ## v1.8.5 - 2026-05-11
20
+
21
+ - expand `references/git-commit-guidelines.md` from title-only guidance into a structured commit-record contract with problem, change, rationale, validation, risk, and refs sections
22
+ - require Chinese commit subjects and body text for Chinese output contexts while keeping the Conventional Commits `type(scope)` prefix machine-readable
23
+ - add type-specific commit body templates so fixes carry root cause, tests carry real seam evidence, and docs/tooling commits explain validation and risk instead of shipping one-line summaries
24
+
25
+ ## v1.8.4 - 2026-05-11
26
+
27
+ - prefer `change-meta.json` for roadmap sync and spec file summaries so `task-manifest.json` stays focused on execution state
28
+ - keep backward-compatible manifest fallback for older change folders while preserving one owner for roadmap/spec status
29
+
3
30
  ## v1.8.3 - 2026-05-11
4
31
 
5
32
  - add `ensure-ship-branch.sh` so detached HEAD closeouts can create a named branch and continue toward `create-pr`
@@ -140,6 +140,7 @@ Ship 必须属于这 4 种模式之一:
140
140
  - QA behavior evidence and feedback-loop quality
141
141
  - readiness dashboard
142
142
  - PR body accuracy check
143
+ - Pull Request Body Draft: 按 `Output language` 生成中文或英文 PR 正文草稿,包含 summary/problem/changes/validation/review-gate/risk-rollback/docs-writeback/follow-ups
143
144
  - Durable follow-up briefs: current behavior、desired behavior、key interfaces、acceptance criteria、out of scope
144
145
 
145
146
  缺这些字段时,可以生成 local handoff,但不能声称 PR body 已经可 review。
@@ -166,15 +167,16 @@ Ship 必须属于这 4 种模式之一:
166
167
  - 如果当前是 detached HEAD,先运行 `scripts/ensure-ship-branch.sh --dir <requirement-dir>`
167
168
  - 推送当前分支
168
169
  - 用 `gh pr create` 创建 PR / MR
169
- - PR body 以 `pr-brief.md` 为真相源,并包含 Summary、Test Coverage、Pre-Landing Review、Readiness Dashboard、Scope Drift、Plan Completion、Verification Results、Documentation、Test plan
170
- - 创建前检查 PR body 是否来自当前 report-card 和当前 diff,不继承旧 body
170
+ - PR body 以 `pr-brief.md` `Pull Request Body Draft` 为真相源,并按 `Output language` 输出中文或英文
171
+ - PR body 必须包含 Summary/摘要、Problem/问题、Changes/变更、Validation/验证、Review/Gate Evidence、Risk/Rollback、Docs/Writeback、Follow-ups
172
+ - 创建前检查 PR body 是否来自当前 report-card、当前 diff、doc sync 和 roadmap writeback,不继承旧 body、不保留 `<placeholder>`、不只写一句泛化摘要
171
173
 
172
174
  ### `update-pr`
173
175
 
174
176
  - 如果有新增提交,先按 `references/git-commit-guidelines.md` 完成 commit / push
175
177
  - 不重新造一个 PR
176
178
  - 刷新已有 PR / MR body
177
- - 确保 body 由本次最新 `cc-check` 结果与 doc sync 状态重建,不沿用旧 body
179
+ - 确保 body 由本次最新 `cc-check` 结果、doc sync 状态和 `Pull Request Body Draft` 重建,不沿用旧 body
178
180
  - PR body 与当前 commits / diff 不一致时,必须先更新 body,再继续交付判断
179
181
 
180
182
  ### `local-handoff`
@@ -187,6 +189,7 @@ Ship 必须属于这 4 种模式之一:
187
189
  - 不做 feature branch PR 动作
188
190
  - 在 merged result 上重跑必要 gate,并记录命令、exit status、关键观察
189
191
  - 完成 release note、文档同步、backlog/roadmap 回写、归档
192
+ - 归档是 exit gate:运行 `cc-devflow archive-change <change-key>`,再用 archive path 或 `cc-devflow list-archived` 证明 active change 已离开 `devflow/changes/<change-key>`
190
193
 
191
194
  ### destructive cleanup
192
195
 
@@ -219,7 +222,7 @@ Ship 必须属于这 4 种模式之一:
219
222
 
220
223
  `cc-act` 结束时必须留下一个明确入口:
221
224
 
222
- - requirement 真闭环:可归档,下一轮入口在 backlog / roadmap
225
+ - requirement 真闭环:已经归档,下一轮入口在 backlog / roadmap
223
226
  - requirement 未完全闭环:`handoff/resume-index.md` 必须告诉下一位从哪里接、怎么验、当前卡点是什么
224
227
 
225
228
  ## Recommendation Test
@@ -236,6 +239,7 @@ Ship 必须属于这 4 种模式之一:
236
239
  8. ship preflight failure 是否有 `ShipPreflightError`、artifact ref 和 rescue action?
237
240
  9. rollback guard 是否足够让下一位维护者不靠聊天记录回退?
238
241
  10. source RM 的 status、REQ/FIX、progress 是否已经和 ship 现实一致?
242
+ 11. `post-merge-closeout` 是否已经跑过 `cc-devflow archive-change <change-key>`,并留下 archive path?如果没有,是否有明确 `ArchiveSkip` blocker 和 retry command?
239
243
 
240
244
  如果第 1 或第 3 题答案不是“能”,说明 `cc-act` 仍然太重或太糊。
241
245
 
@@ -246,6 +250,7 @@ Ship 必须属于这 4 种模式之一:
246
250
  - 更新后的 `handoff/resume-index.md`
247
251
  - 更新后的 `CLAUDE.md` / README / 架构文档(如果结构或行为变了)
248
252
  - 必要时更新后的 `devflow/roadmap.json` / `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
253
+ - `post-merge-closeout` 必须留下 archive path;未归档只能留下 `ArchiveSkip` blocker,不能宣称闭环完成
249
254
 
250
255
  ## Local Kit
251
256
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cc-act
3
- version: 1.8.3
3
+ version: 1.8.7
4
4
  description: 'Use when verified work must be shipped or handed off with a clear landing path: run simplify and required tests, create or update a PR, prepare a local handoff, close out merged work, sync docs, write release notes, and fold follow-ups back into backlog or roadmap.'
5
5
  triggers:
6
6
  - 准备提 PR
@@ -17,6 +17,10 @@ reads:
17
17
  - references/git-commit-guidelines.md
18
18
  - assets/PR_BRIEF_TEMPLATE.md
19
19
  - assets/RELEASE_NOTE_TEMPLATE.md
20
+ - assets/PROJECT_POSTMORTEM_TEMPLATE.md
21
+ - assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md
22
+ - assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md
23
+ - docs/guides/project-postmortem.md
20
24
  - ../cc-roadmap/scripts/locate-roadmap-item.sh
21
25
  - ../cc-roadmap/scripts/sync-roadmap-progress.sh
22
26
  - scripts/ensure-ship-branch.sh
@@ -36,6 +40,18 @@ writes:
36
40
  required: false
37
41
  when: handoff mode is release
38
42
  exclusive_group: handoff
43
+ - path: devflow/postmortems/INDEX.md
44
+ durability: durable
45
+ required: false
46
+ when: closing a FIX or recurring AI/process/engineering failure
47
+ - path: devflow/postmortems/principles.md
48
+ durability: durable
49
+ required: false
50
+ when: an incident yields a generalized model or engineering lesson
51
+ - path: devflow/postmortems/incidents/<date>-<change-key>.md
52
+ durability: durable
53
+ required: false
54
+ when: closing a FIX or recurring AI/process/engineering failure
39
55
  effects:
40
56
  - roadmap progress and backlog follow-up updates when needed
41
57
  entry_gate:
@@ -43,10 +59,14 @@ entry_gate:
43
59
  - Freeze current branch, PR, ship-mode, auth, clean-tree, and rollback facts before writing delivery materials.
44
60
  - If simplify, tests, or act changes code or verification scope, return to cc-check immediately.
45
61
  - Read source roadmap progress from `devflow/roadmap.json`, `devflow/ROADMAP.md`, optional `devflow/BACKLOG.md`, or legacy `devflow/roadmap-tracking.json`; act must not ship against stale RM state.
62
+ - For FIX closeout or recurring AI/process/engineering failures, update the project postmortem under `devflow/postmortems/` before final ship/handoff material is declared complete.
63
+ - 'For `post-merge-closeout`, freeze the archive target and run `cc-devflow archive-change <change-key>` after release note and roadmap writeback; only skip with an explicit `ArchiveSkip` blocker in the handoff.'
46
64
  exit_criteria:
47
65
  - The ship mode is explicit, delivery materials match that mode, and the next maintainer has one clear entry point.
48
66
  - Docs, PR text, release notes, handoff artifacts, review range, readiness dashboard, PR body accuracy check, and test evidence reflect the same proven facts.
49
67
  - Follow-up items are written back to roadmap/backlog instead of lingering in chat memory.
68
+ - FIX closeout and recurring failures have a progressive project postmortem entry with factual Git evidence, prevention summary, and principle extraction decision.
69
+ - '`post-merge-closeout` has archived the closed change under `devflow/changes/archive/YYYY-MM/`, or the handoff records an explicit `ArchiveSkip` blocker with the exact retry command.'
50
70
  - The source roadmap item reflects the latest verified state, ship mode, and follow-up decision, or the handoff records a no-op reason.
51
71
  reroutes:
52
72
  - when: Verification is stale, incomplete, or changed during act.
@@ -92,6 +112,7 @@ tool_budget:
92
112
  2. `CHANGELOG.md`
93
113
  3. `references/closure-contract.md`
94
114
  4. `references/git-commit-guidelines.md`
115
+ 5. `docs/guides/project-postmortem.md`
95
116
 
96
117
  ## Use This Skill When
97
118
 
@@ -126,6 +147,31 @@ tool_budget:
126
147
  - Required evidence: PR briefs, status reports, release notes, resume indexes, and test evidence must summarize already-proven facts only.
127
148
  - Reroute rule: changed verification goes back to `cc-check`; unfinished implementation or new fixes go back to `cc-do`.
128
149
 
150
+ ## Project Postmortem Writeback
151
+
152
+ `cc-act` 是项目级 AI 尸检报告的唯一默认写入者,因为它能看到 verified reality、Git 状态、review range、ship mode 和 follow-up。
153
+
154
+ 固定位置:
155
+
156
+ - `devflow/postmortems/INDEX.md`
157
+ - `devflow/postmortems/principles.md`
158
+ - `devflow/postmortems/incidents/<date>-<change-key>.md`
159
+
160
+ 触发条件:
161
+
162
+ 1. 当前 change key 是 `FIX-*`。
163
+ 2. `cc-check` / `cc-act` 暴露重复的 AI、流程、测试、release、Git 或架构错误。
164
+ 3. 用户明确要求记录一次教训。
165
+
166
+ 写入规则:
167
+
168
+ 1. 先用 `assets/PROJECT_POSTMORTEM_TEMPLATE.md` 写具体 incident;事实必须包含 branch、base/head SHA、review range、相关 commits、PR/handoff、验证命令和关键输出。
169
+ 2. 再更新 `INDEX.md` 的短入口:日期、change、severity、tags、one-line lesson、incident 链接。
170
+ 3. 只有能从 incident 和 Git 证据提炼出可迁移规则时,才更新 `principles.md`;原则必须引用 incident 和 Git 证据。
171
+ 4. 报告使用渐进式披露:默认层只给检索和提醒,深层 incident 才放完整时间线、根因、逃逸原因和验证记录。
172
+ 5. 写入前执行 Redaction Guard:不要复制 secret、token、客户数据、个人机器路径或私密原始日志;必要证据用 `<redacted>` 和 redaction summary 表达。
173
+ 6. 尸检报告不拥有 roadmap、task、review 或 spec 状态;只能引用对应 owner artifact 和 Git 证据。
174
+
129
175
  ## Entry Gate
130
176
 
131
177
  1. 先读 `review/report-card.json`,只接受已通过且有证据的现实。
@@ -185,6 +231,7 @@ tool_budget:
185
231
  - 必须完成 doc sync
186
232
  - 需要对外说明时生成 `handoff/release-note.md`
187
233
  - 必须把 follow-up 回写到 `devflow/roadmap.json`,并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
234
+ - 必须运行 `cc-devflow archive-change <change-key>` 归档已闭环 change;除非存在明确安全阻塞并写入 `ArchiveSkip`
188
235
 
189
236
  不是每次都要把所有文件生成一遍。材料必须服务于当前 ship 模式,而不是为了流程好看。
190
237
 
@@ -269,6 +316,16 @@ PR / handoff 之前必须把 readiness 压成一屏事实:
269
316
 
270
317
  readiness dashboard 有 blocker 时,不能创建或更新 PR,只能 reroute 到 `cc-check` / `cc-do` 或生成 local handoff。
271
318
 
319
+ ## Pull Request Body Template Contract
320
+
321
+ PR body 不是聊天摘要,而是 reviewer 的第一份执行材料。`create-pr` / `update-pr` 必须从当前事实生成一版可直接提交的 PR body draft:
322
+
323
+ 1. Language decision:读取 `Output language`。中文项目输出中文 PR 标题和正文;英文项目输出英文 PR 标题和正文;`type(scope)`、路径、命令、issue key、REQ/FIX/RM ID 保持机器可读。
324
+ 2. Required shape:必须包含 summary、problem、changes、validation、review/gate evidence、risk/rollback、docs/writeback、follow-ups。
325
+ 3. Evidence density:validation 不能只有“tests passed”,必须列命令、退出结果或关键观察;review/gate evidence 必须带 reviewed base/head SHA、finding triage、QA/claim evidence 和 readiness 摘要。
326
+ 4. Freshness:已有 PR body 只能作为远端旧状态参考,不能继承;每次 `gh pr create` / `gh pr edit` 前都用当前 `handoff/pr-brief.md`、当前 diff、当前 report-card、doc sync 和 roadmap writeback 重建。
327
+ 5. Completeness gate:空标题、`<placeholder>`、泛化句子、缺少风险/回滚边界、缺少文档/回写状态时,不准创建或更新 PR。
328
+
272
329
  ## Integration Safety
273
330
 
274
331
  `cc-act` 可以清理交付路径,但不能悄悄做破坏性动作:
@@ -330,7 +387,8 @@ readiness dashboard 有 blocker 时,不能创建或更新 PR,只能 reroute
330
387
  - 被推迟但必须保留的事项
331
388
  - 因本次结果而改变优先级的事项
332
389
  14. 用 `sync-roadmap-progress.sh` 更新 source RM 的 status、REQ/FIX 绑定和 progress:`create-pr` / `update-pr` 通常写 `In review` + `100%`,`local-handoff` 写 `Ready for handoff`,`post-merge-closeout` 写 `Done`;如果无 source RM,必须在 handoff 写 no-op reason。
333
- 15. 如果 requirement 真正闭环,更新状态摘要并归档:运行 `cc-devflow archive-change <change-key>` 将已完成变更移入 `devflow/changes/archive/YYYY-MM/`;否则把下一位接手者的入口写清楚。
390
+ 15. 如果 ship mode `post-merge-closeout`,归档不是建议而是 exit gate:运行 `cc-devflow archive-change <change-key>` 将已完成变更移入 `devflow/changes/archive/YYYY-MM/`,然后用 `cc-devflow list-archived` 或文件路径确认归档成功。
391
+ 16. 只有在归档会丢失未合并证据、用户明确要求保留 active change、或 archive target 已冲突时,才允许跳过;跳过必须在 handoff 写 `ArchiveSkip`、原因、受影响路径、以及精确 retry command。
334
392
 
335
393
  ## Output
336
394
 
@@ -341,8 +399,9 @@ readiness dashboard 有 blocker 时,不能创建或更新 PR,只能 reroute
341
399
  - 必要时更新后的 `devflow/roadmap.json` / `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
342
400
  - 单测 / e2e 的通过证据,或明确记录的 skip / blocker
343
401
  - 必要时创建或更新的 PR / MR
344
- - PR / MR body 中的 Summary、Test Coverage、Pre-Landing Review、Scope DriftPlan CompletionVerification ResultsDocumentation、Test plan
402
+ - PR / MR body 中按 `Output language` 生成的 Summary/摘要、Problem/问题、Changes/变更、Validation/验证、Review/Gate EvidenceRisk/RollbackDocs/WritebackFollow-ups
345
403
  - readiness dashboard 和 PR body accuracy check
404
+ - `post-merge-closeout` 的 archive path,或显式 `ArchiveSkip` blocker
346
405
 
347
406
  ## Good Output
348
407
 
@@ -0,0 +1,30 @@
1
+ # Project Postmortem Index
2
+
3
+ ## How To Search
4
+
5
+ Start here, then open only the incident files whose tags or failure class match
6
+ the current work.
7
+
8
+ ```bash
9
+ rg -n "<capability|module|error|failure-class|model-risk>" devflow/postmortems
10
+ ```
11
+
12
+ ## Latest Entries
13
+
14
+ | Date | Change | Severity | Tags | One-line lesson | Incident |
15
+ | --- | --- | --- | --- | --- | --- |
16
+ | | | low / medium / high | | | `incidents/<date>-<change-key>.md` |
17
+
18
+ ## Recurring Patterns
19
+
20
+ | Pattern | Count | Last seen | Principle |
21
+ | --- | ---: | --- | --- |
22
+ | | 0 | | `principles.md#` |
23
+
24
+ ## Deep-Dive Rules
25
+
26
+ - Open `principles.md` when the current work involves architecture choices,
27
+ test-seam design, model judgment, reliability, release hygiene, or recurring
28
+ review findings.
29
+ - Open a specific incident file when the current task touches the same module,
30
+ failure class, or Git/release workflow.
@@ -0,0 +1,29 @@
1
+ # Project Postmortem Principles
2
+
3
+ This file stores generalized lessons extracted from concrete incidents. Keep each
4
+ principle short enough to scan, but cite the incident file and Git evidence that
5
+ made it real.
6
+
7
+ ## Principles
8
+
9
+ ### PM-P001 <principle title>
10
+
11
+ - Failure class:
12
+ - Model limitation or professional judgment trap:
13
+ - Rule:
14
+ - Countermeasure before planning:
15
+ - Countermeasure before coding:
16
+ - Countermeasure before shipping:
17
+ - Evidence:
18
+ - Incident: `devflow/postmortems/incidents/<date>-<change-key>.md`
19
+ - Git: `<commit-or-range>`
20
+ - Search terms:
21
+
22
+ ## Candidate Principles
23
+
24
+ Use this section for patterns that appeared once but are not yet strong enough to
25
+ be promoted.
26
+
27
+ | Candidate | Evidence | Promotion trigger |
28
+ | --- | --- | --- |
29
+ | | | repeats, high severity, or architecture-wide impact |
@@ -0,0 +1,103 @@
1
+ # <date> <change-key> Postmortem
2
+
3
+ ## Progressive Disclosure Index
4
+
5
+ - Default read: Summary, Search Tags, Prevention Summary, Git Evidence.
6
+ - Open for recurrence: Root Cause, AI Failure Mode, Why It Escaped.
7
+ - Open for audit: Timeline, Verification Evidence, Follow-up Actions.
8
+
9
+ ## Summary
10
+
11
+ - Change:
12
+ - Incident / failure:
13
+ - Severity: low / medium / high
14
+ - Impact:
15
+ - Current status: repaired / mitigated / deferred / monitoring
16
+ - Owner:
17
+
18
+ ## Search Tags
19
+
20
+ - Capabilities:
21
+ - Modules:
22
+ - Failure class:
23
+ - Model-risk tags:
24
+ - Related principles:
25
+
26
+ ## Prevention Summary
27
+
28
+ - Do this next time:
29
+ - Do not do this next time:
30
+ - Planning reminder:
31
+ - Investigation reminder:
32
+ - Execution reminder:
33
+ - Ship reminder:
34
+
35
+ ## Git Evidence
36
+
37
+ - Base branch:
38
+ - Working branch:
39
+ - Base SHA:
40
+ - Head SHA:
41
+ - Review range:
42
+ - Relevant commits:
43
+ - PR / handoff:
44
+ - Dirty-tree notes:
45
+ - Commands used:
46
+ - `git status -sb`
47
+ - `git log --oneline --decorate -n 12`
48
+ - `git diff --stat <base>...HEAD`
49
+
50
+ ## Redaction Guard
51
+
52
+ - Sensitive values copied: yes / no
53
+ - Redacted values:
54
+ - `<redacted>`:
55
+ - Private logs or customer data omitted:
56
+ - Evidence shape preserved without raw sensitive value:
57
+
58
+ ## Timeline
59
+
60
+ | Time | Event | Evidence |
61
+ | --- | --- | --- |
62
+ | | | |
63
+
64
+ ## Root Cause
65
+
66
+ - Confirmed root cause:
67
+ - Broken contract:
68
+ - Rejected near-causes:
69
+ - Why symptom-site fix was insufficient:
70
+
71
+ ## AI Failure Mode
72
+
73
+ - Model limitation:
74
+ - Bad default behavior observed:
75
+ - Missing evidence or professional rule:
76
+ - Countermeasure:
77
+
78
+ ## Why It Escaped
79
+
80
+ - Planning gap:
81
+ - Investigation gap:
82
+ - Execution gap:
83
+ - Review / verification gap:
84
+ - Ship / handoff gap:
85
+
86
+ ## Verification Evidence
87
+
88
+ | Command / artifact | Result | Key observation |
89
+ | --- | --- | --- |
90
+ | | | |
91
+
92
+ ## Follow-up Actions
93
+
94
+ | Type | Action | Owner | Target |
95
+ | --- | --- | --- | --- |
96
+ | root-cause-fix / detection / docs / backlog / principle | | | |
97
+
98
+ ## Principle Extraction
99
+
100
+ - Promote to `principles.md`: yes / no
101
+ - Principle title:
102
+ - Search terms:
103
+ - Incident file linked from `INDEX.md`: yes / no
@@ -66,13 +66,69 @@
66
66
  - Documentation release:
67
67
  - PR body accuracy:
68
68
 
69
+ ## Pull Request Body Contract
70
+
71
+ - Language source: `Output language: <value from report-card>`
72
+ - PR body language: `中文` / `English`
73
+ - Title rule: same language as the PR body after the Conventional Commits `type(scope)` prefix; keep identifiers, paths, commands, and issue keys unchanged.
74
+ - Body source: current `pr-brief.md`, current diff, current `review/report-card.json`, doc sync output, and roadmap/backlog writeback.
75
+ - Required sections: summary, problem, changes, validation, review/gate evidence, risk/rollback, docs/writeback, follow-ups.
76
+ - Completeness gate: no empty headings, no stale inherited PR body, no generic "tests passed" without command or evidence, and no `<placeholder>` text before `gh pr create` or `gh pr edit`.
77
+
78
+ ## Pull Request Body Draft
79
+
80
+ ```markdown
81
+ ## Summary / 摘要
82
+
83
+ - TBD
84
+
85
+ ## Problem / 问题
86
+
87
+ - Requirement / 需求:
88
+ - User-visible gap / 用户可见缺口:
89
+
90
+ ## Changes / 变更
91
+
92
+ - TBD
93
+
94
+ ## Validation / 验证
95
+
96
+ - `report-card.json` verdict / 结论:
97
+ - Commands / 命令:
98
+ - Key observations / 关键观察:
99
+
100
+ ## Review / Gate Evidence
101
+
102
+ - Reviewed base SHA:
103
+ - Reviewed head SHA:
104
+ - Review packet:
105
+ - Finding triage:
106
+ - QA / claim evidence:
107
+ - Readiness:
108
+
109
+ ## Risk And Rollback / 风险与回滚
110
+
111
+ - Main risk / 主要风险:
112
+ - Rollback boundary / 回滚边界:
113
+
114
+ ## Docs And Writeback / 文档与回写
115
+
116
+ - `CLAUDE.md`:
117
+ - `README.md`:
118
+ - Roadmap progress:
119
+
120
+ ## Follow-ups / 后续事项
121
+
122
+ - TBD
123
+ ```
124
+
69
125
  ## Summary
70
126
 
71
- -
127
+ - TBD
72
128
 
73
129
  ## What Changed
74
130
 
75
- -
131
+ - TBD
76
132
 
77
133
  ## Verification Evidence
78
134
 
@@ -125,7 +181,7 @@
125
181
 
126
182
  ## How To Verify
127
183
 
128
- -
184
+ - TBD
129
185
 
130
186
  ## Follow-Ups
131
187
 
@@ -138,4 +194,4 @@
138
194
 
139
195
  ## Risks
140
196
 
141
- -
197
+ - TBD
@@ -12,6 +12,7 @@
12
12
  8. readiness dashboard 必须说明 review freshness、QA coverage、browser evidence、failure ownership、documentation release、PR body accuracy
13
13
  9. behavior handoff 必须带上 QA feedback loop、expected / actual / reproduction steps,以及 durable follow-up brief
14
14
  10. source RM 必须已从 `devflow/roadmap.json` 定位,且 roadmap progress 与 verified reality 一致;没有 source RM 时记录 no-op reason
15
+ 11. `post-merge-closeout` 必须预先冻结 archive target;最终只能是已归档,或带 `ArchiveSkip` blocker 的未完成 closeout
15
16
 
16
17
  ## Ship Decision Contract
17
18
 
@@ -43,6 +44,7 @@ detached HEAD 是分支事实,不是第 5 种 ship 模式。若远端可用且
43
44
  11. PR body accuracy 必须对照当前 report-card、当前 diff、当前 commits;旧 body 不能作为证据源
44
45
  12. follow-up 回写必须用行为契约表达,包含 current behavior、desired behavior、key interfaces、acceptance criteria、out of scope;不能只写文件路径或聊天 TODO
45
46
  13. roadmap 回写只更新 `devflow/roadmap.json`,并通过 `sync-roadmap-progress.sh` 重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
47
+ 14. `post-merge-closeout` 的归档必须真实执行:`cc-devflow archive-change <change-key>`,不能只把“可归档”写进 next action
46
48
 
47
49
  ## Memory Consolidation
48
50
 
@@ -63,5 +65,6 @@ detached HEAD 是分支事实,不是第 5 种 ship 模式。若远端可用且
63
65
  - QA behavior evidence 和 feedback loop 已进入 PR / handoff / release 材料
64
66
  - post-merge closeout 反映 merged result 的验证事实,而不是只反映合并前事实
65
67
  - source RM 的 status、REQ/FIX 绑定、progress 和 follow-up 已经落入 roadmap truth
68
+ - closed change 已经移动到 `devflow/changes/archive/YYYY-MM/<change-key>`;如果没有,必须有 `ArchiveSkip` blocker、原因、受影响路径和 retry command
66
69
  - 下一轮计划入口更清楚
67
70
  - 文档入口可发现,changelog 不丢历史,TODO / backlog 只记录有证据的事项