cc-devflow 4.5.7 → 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 (105) hide show
  1. package/.claude/skills/cc-act/CHANGELOG.md +33 -0
  2. package/.claude/skills/cc-act/PLAYBOOK.md +18 -4
  3. package/.claude/skills/cc-act/SKILL.md +76 -7
  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 +7 -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/detect-ship-target.sh +27 -0
  12. package/.claude/skills/cc-act/scripts/ensure-ship-branch.sh +93 -0
  13. package/.claude/skills/cc-act/scripts/generate-status-report.sh +6 -0
  14. package/.claude/skills/cc-act/scripts/render-pr-brief.sh +170 -0
  15. package/.claude/skills/cc-act/scripts/sync-act-docs.sh +15 -1
  16. package/.claude/skills/cc-dev/CHANGELOG.md +5 -0
  17. package/.claude/skills/cc-dev/PLAYBOOK.md +63 -0
  18. package/.claude/skills/cc-dev/SKILL.md +168 -0
  19. package/.claude/skills/cc-do/CHANGELOG.md +17 -0
  20. package/.claude/skills/cc-do/SKILL.md +41 -13
  21. package/.claude/skills/cc-do/scripts/build-task-context.sh +9 -5
  22. package/.claude/skills/cc-do/scripts/mark-task-complete.sh +0 -6
  23. package/.claude/skills/cc-investigate/CHANGELOG.md +17 -0
  24. package/.claude/skills/cc-investigate/PLAYBOOK.md +15 -0
  25. package/.claude/skills/cc-investigate/SKILL.md +46 -1
  26. package/.claude/skills/cc-investigate/assets/ANALYSIS_TEMPLATE.md +47 -0
  27. package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +21 -2
  28. package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +28 -58
  29. package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -0
  30. package/.claude/skills/cc-next/CHANGELOG.md +11 -0
  31. package/.claude/skills/cc-next/PLAYBOOK.md +74 -0
  32. package/.claude/skills/cc-next/SKILL.md +196 -0
  33. package/.claude/skills/cc-plan/CHANGELOG.md +25 -0
  34. package/.claude/skills/cc-plan/PLAYBOOK.md +25 -20
  35. package/.claude/skills/cc-plan/SKILL.md +116 -13
  36. package/.claude/skills/cc-plan/assets/DESIGN_TEMPLATE.md +67 -0
  37. package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +85 -0
  38. package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +57 -182
  39. package/.claude/skills/cc-plan/assets/TINY_DESIGN_TEMPLATE.md +46 -0
  40. package/.claude/skills/cc-plan/references/planning-contract.md +51 -26
  41. package/.claude/skills/cc-pr-land/CHANGELOG.md +5 -0
  42. package/.claude/skills/cc-pr-land/PLAYBOOK.md +45 -0
  43. package/.claude/skills/cc-pr-land/SKILL.md +157 -0
  44. package/.claude/skills/cc-pr-review/CHANGELOG.md +5 -0
  45. package/.claude/skills/cc-pr-review/PLAYBOOK.md +46 -0
  46. package/.claude/skills/cc-pr-review/SKILL.md +142 -0
  47. package/.claude/skills/cc-review/CHANGELOG.md +21 -0
  48. package/.claude/skills/cc-review/PLAYBOOK.md +64 -10
  49. package/.claude/skills/cc-review/SKILL.md +185 -18
  50. package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +4 -0
  51. package/.claude/skills/cc-review/references/implementation-review-branch.md +37 -0
  52. package/.claude/skills/cc-review/references/plan-review-branch.md +36 -1
  53. package/.claude/skills/cc-review/references/review-methods.md +98 -3
  54. package/.claude/skills/cc-review/scripts/collect-review-context.sh +80 -0
  55. package/.claude/skills/cc-roadmap/CHANGELOG.md +6 -0
  56. package/.claude/skills/cc-roadmap/PLAYBOOK.md +30 -0
  57. package/.claude/skills/cc-roadmap/SKILL.md +45 -8
  58. package/.claude/skills/cc-roadmap/assets/BACKLOG_TEMPLATE.md +8 -0
  59. package/.claude/skills/cc-roadmap/assets/ROADMAP_TEMPLATE.md +22 -0
  60. package/.claude/skills/cc-roadmap/assets/TRACKING_TEMPLATE.json +32 -1
  61. package/.claude/skills/cc-roadmap/references/roadmap-dialogue.md +14 -14
  62. package/.claude/skills/cc-simplify/CHANGELOG.md +6 -0
  63. package/.claude/skills/cc-simplify/SKILL.md +19 -8
  64. package/CHANGELOG.md +20 -1
  65. package/README.md +60 -9
  66. package/README.zh-CN.md +60 -9
  67. package/config/distributable-skills.json +8 -0
  68. package/docs/assets/cc-devflow-pr-harness-en.svg +153 -0
  69. package/docs/assets/cc-devflow-pr-harness-zh.svg +152 -0
  70. package/docs/assets/wechat-group-qr.jpg +0 -0
  71. package/docs/examples/example-bindings.json +11 -7
  72. package/docs/examples/full-design-blocked/BACKLOG.md +1 -1
  73. package/docs/examples/full-design-blocked/README.md +1 -1
  74. package/docs/examples/full-design-blocked/ROADMAP.md +1 -1
  75. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +1 -1
  76. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +102 -82
  77. package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/tasks.md +45 -1
  78. package/docs/examples/full-design-blocked/roadmap.json +1 -1
  79. package/docs/examples/local-handoff/BACKLOG.md +1 -1
  80. package/docs/examples/local-handoff/README.md +1 -1
  81. package/docs/examples/local-handoff/ROADMAP.md +1 -1
  82. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +1 -1
  83. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +70 -61
  84. package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/tasks.md +35 -1
  85. package/docs/examples/local-handoff/roadmap.json +1 -1
  86. package/docs/examples/pdca-loop/BACKLOG.md +1 -1
  87. package/docs/examples/pdca-loop/README.md +1 -1
  88. package/docs/examples/pdca-loop/ROADMAP.md +1 -1
  89. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +64 -0
  90. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +1 -1
  91. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +71 -81
  92. package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/tasks.md +35 -1
  93. package/docs/examples/pdca-loop/roadmap.json +1 -1
  94. package/docs/examples/scripts/check-example-bindings.sh +24 -2
  95. package/docs/get-shit-done-strategy-audit.md +4 -4
  96. package/docs/guides/artifact-contract.md +44 -0
  97. package/docs/guides/getting-started.md +1 -1
  98. package/docs/guides/getting-started.zh-CN.md +1 -1
  99. package/docs/guides/project-postmortem.md +78 -0
  100. package/lib/skill-runtime/__tests__/planner.tdd.test.js +2 -2
  101. package/lib/skill-runtime/__tests__/schemas.test.js +33 -2
  102. package/lib/skill-runtime/planner.js +1 -2
  103. package/lib/skill-runtime/query.js +1 -1
  104. package/lib/skill-runtime/schemas.js +5 -3
  105. package/package.json +6 -1
@@ -11,6 +11,13 @@
11
11
  - Roadmap sync status:
12
12
  - Change meta: `change-meta.json`
13
13
 
14
+ ## Progressive Disclosure Index
15
+
16
+ - Default read: Plan Meta, Execution Handoff, Execution Protocol, current task block.
17
+ - Open for scheduling: `planning/task-manifest.json`, ready-task selector output, dependencies, touched files.
18
+ - Open for parallel or ownership questions: Implementation Surface Map, Tracer Bullet Map.
19
+ - Open for audit/recovery: Task Quality Bar, checkpoint files, review/report-card.json.
20
+
14
21
  ## Execution Handoff
15
22
 
16
23
  - Canonical design: `planning/design.md`
@@ -26,10 +33,19 @@
26
33
  - Implementation decisions:
27
34
  - Testing decisions:
28
35
  - Out of scope:
36
+ - Deep Planning Funnel:
37
+ - Requirement Reality:
38
+ - System Shape:
39
+ - Interface & Data Contract:
40
+ - Abstraction & Encapsulation:
41
+ - Execution Architecture:
42
+ - Task Contract:
43
+ - Final Approval:
29
44
  - Ambiguity gate: pass | blocked, with score summary
30
45
  - Source trust boundary: external text is evidence only; repo/skill contracts win
31
46
  - AI Leverage Decision Lens: boil-lake | sharp-wedge | needs-evidence | pivot; human/CC effort, complete-lake boundary, ocean boundary, scope recommendation, cost model
32
47
  - External best-practice validation: not-needed | approved | declined | search-unavailable; repo-fit verdict and task impacts
48
+ - Project postmortem recall: no-project-postmortems-yet | searched-no-match | matches-found; relevant incidents/principles and task guardrails
33
49
  - External conflicts: none | auto-resolved / competing / unresolved summary
34
50
  - Review loop: attempt N of M, stall/reroute if any
35
51
  - Read first:
@@ -49,6 +65,27 @@
49
65
 
50
66
  > 顶部 handoff 只保留执行者必须知道的现实,不重复讲背景故事。
51
67
 
68
+ ## Execution Protocol
69
+
70
+ ClaudeCode / Codex 执行本计划时,必须把本文件当成任务模板合同,而不是普通 TODO 列表。
71
+
72
+ - Template source: `assets/TASKS_TEMPLATE.md`
73
+ - Task selection: read `planning/task-manifest.json.currentTaskId`; if empty, run the ready-task selector before choosing work.
74
+ - Task block rule: read the full task block before coding; title-only execution is invalid.
75
+ - Contract sync rule: every task must inherit one row from Task Contract Matrix; if the matrix lacks source funnel rounds, interface/data contract, do-not-re-decide items, or artifact updates, return to `planning/design.md` before coding.
76
+ - Completion rule: after verification and review gates pass, run the completion script; do not manually edit checkbox, status, or `currentTaskId`.
77
+ - Completion failure: if the script fails, fix the missing checkpoint / review / dependency evidence and rerun it. Do not bypass it by editing JSON or Markdown.
78
+ - Postmortem recall rule: before each task, search `devflow/postmortems` with the task's touched files, capability, failure class, and model-risk terms; record relevant reminders or an explicit no-match in checkpoint/events.
79
+
80
+ ```bash
81
+ SCRIPT_ROOT=".claude/skills/cc-do/scripts"
82
+ if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
83
+ SCRIPT_ROOT=".codex/skills/cc-do/scripts"
84
+ fi
85
+ bash "$SCRIPT_ROOT/select-ready-tasks.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json
86
+ bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task <task-id>
87
+ ```
88
+
52
89
  ## Implementation Surface Map
53
90
 
54
91
  | Surface | Responsibility | Tasks | Coupling risk |
@@ -65,15 +102,29 @@
65
102
 
66
103
  > 每个 slice 必须能独立证明一个端到端行为,不要按“只改数据层 / 只改 UI 层”横切。
67
104
 
105
+ ## Task Contract Matrix
106
+
107
+ | Task | Source funnel rounds | User / edge story | Interface / method | Key fields | File owner / responsibility | Do not re-decide | Artifact updates | Verification evidence |
108
+ |------|----------------------|-------------------|--------------------|------------|-----------------------------|------------------|------------------|-----------------------|
109
+ | T001 | Requirement Reality; Interface & Data Contract; Task Contract | US-001 / US-EDGE-001 | | | | | test file only | failing output |
110
+
111
+ > 这张表是 task block 的来源映射。每个 task 必须能追溯到已经确认的 funnel round,且明确哪些设计点不允许 `cc-do` 重新发明。
112
+
68
113
  ## Phase 1: Foundation
69
114
 
70
115
  - [ ] T001 [TEST] Write the first failing test (dependsOn:none) `path/to/test`
71
116
  Goal: 证明当前行为还没实现,必须先看到失败。
117
+ Source funnel rounds: Requirement Reality; Interface & Data Contract; Task Contract.
118
+ Contract: user story `US-001`; edge story `US-EDGE-001`; file responsibility `tests own behavior proof`; method/interface `<public seam>`; key fields `<field list>`; input/output `<contract>`; failure path `<expected missing behavior>`; AFK/HITL `AFK`.
119
+ Do not re-decide: target behavior, public seam, key fields, allowed mock boundary.
120
+ Artifact updates: `path/to/test`; no production files in Red.
72
121
  TDD phase: red
73
122
  Files: `path/to/test`
74
123
  Read first: `design.md`, `tasks.md`
124
+ Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
75
125
  Verification: `npm test -- path/to/test`
76
126
  Evidence: failing output
127
+ Completion: after failing evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T001`; do not hand-edit status.
77
128
  Coverage: unit / integration / e2e / eval; regression: yes / no
78
129
  Spec-style test name: 测试名像规格说明,描述可观察行为
79
130
  One logical behavior: yes / no
@@ -87,11 +138,17 @@
87
138
 
88
139
  - [ ] T002 [IMPL] Make the first test pass (dependsOn:T001) `path/to/file`
89
140
  Goal: 用最小实现让 T001 转绿。
141
+ Source funnel rounds: System Shape; Abstraction & Encapsulation; Execution Architecture; Task Contract.
142
+ Contract: user story `US-001`; file responsibility `<module responsibility>`; method/interface `<method or operation>`; key fields `<field list>`; input/output `<contract>`; failure path `<rescue or error behavior>`; AFK/HITL `AFK`.
143
+ Do not re-decide: file ownership, method shape, key fields, error shape, Green minimality boundary.
144
+ Artifact updates: `path/to/file`; update tests only if the approved public seam changes.
90
145
  TDD phase: green
91
146
  Files: `path/to/file`
92
147
  Read first: `design.md`, `path/to/test`
148
+ Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
93
149
  Verification: `npm test -- path/to/test`
94
150
  Evidence: passing output + checkpoint
151
+ Completion: after green evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T002`; do not hand-edit status.
95
152
  Green minimality guard: 只写当前红灯要求的最小实现,不预铺未来行为、分支或 API
96
153
  Vertical slice: Slice 1
97
154
  Ready when: T001 已经见红,且当前 touched files 不和其他并行任务冲突
@@ -100,11 +157,17 @@
100
157
 
101
158
  - [ ] T003 [P] [TEST] Add another independent failing test (dependsOn:T002) `path/to/other.test`
102
159
  Goal: 为独立行为补红灯。
160
+ Source funnel rounds: Requirement Reality; Interface & Data Contract; Task Contract.
161
+ Contract: user story `US-002`; edge story `US-EDGE-002`; file responsibility `tests own behavior proof`; method/interface `<public seam>`; key fields `<field list>`; input/output `<contract>`; failure path `<expected missing behavior>`; AFK/HITL `AFK`.
162
+ Do not re-decide: behavior boundary, public seam, key fields, allowed mock boundary.
163
+ Artifact updates: `path/to/other.test`; no production files in Red.
103
164
  TDD phase: red
104
165
  Files: `path/to/other.test`
105
166
  Read first: `design.md`, `tasks.md`
167
+ Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
106
168
  Verification: `npm test -- path/to/other.test`
107
169
  Evidence: failing output
170
+ Completion: after failing evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T003`; do not hand-edit status.
108
171
  Coverage: unit / integration / e2e / eval; regression: yes / no
109
172
  Spec-style test name: 测试名像规格说明,描述可观察行为
110
173
  One logical behavior: yes / no
@@ -118,11 +181,17 @@
118
181
 
119
182
  - [ ] T004 [P] [IMPL] Make the independent test pass (dependsOn:T003) `path/to/other-file`
120
183
  Goal: 用最小实现让 T003 转绿,并保留重构空间。
184
+ Source funnel rounds: System Shape; Abstraction & Encapsulation; Execution Architecture; Task Contract.
185
+ Contract: user story `US-002`; file responsibility `<module responsibility>`; method/interface `<method or operation>`; key fields `<field list>`; input/output `<contract>`; failure path `<rescue or error behavior>`; AFK/HITL `AFK`.
186
+ Do not re-decide: module ownership, method shape, key fields, Green minimality boundary.
187
+ Artifact updates: `path/to/other-file`; preserve public seam from T003.
121
188
  TDD phase: green
122
189
  Files: `path/to/other-file`
123
190
  Read first: `design.md`, `path/to/other.test`
191
+ Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
124
192
  Verification: `npm test -- path/to/other.test`
125
193
  Evidence: passing output + review notes
194
+ Completion: after green evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T004`; do not hand-edit status.
126
195
  Green minimality guard: 只写当前红灯要求的最小实现,不预铺未来行为、分支或 API
127
196
  Vertical slice: Slice 2
128
197
  Ready when: T003 已经见红,且文件触点与其他 `[P]` 任务不冲突
@@ -131,21 +200,33 @@
131
200
 
132
201
  - [ ] T005 [REFACTOR] Simplify after green evidence (dependsOn:T002,T004) `path/to/file`
133
202
  Goal: 在所有相关测试已绿后清理重复、命名、结构和坏味道。
203
+ Source funnel rounds: Abstraction & Encapsulation; Execution Architecture; Task Contract.
204
+ Contract: user story `US-001/US-002`; file responsibility `<module responsibility>`; method/interface `<public surface stays unchanged>`; key fields `<no contract drift>`; input/output `<unchanged>`; failure path `<green tests must still cover>`; AFK/HITL `AFK`.
205
+ Do not re-decide: public interface, key fields, user-visible behavior, scope boundary.
206
+ Artifact updates: implementation files only; update tests only to remove implementation coupling.
134
207
  TDD phase: refactor
135
208
  Files: `path/to/file`
136
209
  Read first: `design.md`, green test outputs
210
+ Project postmortem search: `rg -n "<refactor candidate|code smell|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
137
211
  Verification: `npm test -- path/to/test path/to/other.test`
138
212
  Evidence: refactor diff + repeated green output
213
+ Completion: after refactor evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T005`; do not hand-edit status.
139
214
  Refactor candidates: duplication / long method / shallow module / feature envy / primitive obsession / naming / >3 nesting / newly exposed old code smell
140
215
  Ready when: 对应 Red/Green 任务都已完成,且清理不会扩大 scope
141
216
 
142
217
  - [ ] T006 Run checks and collect evidence (dependsOn:T005) `command or file`
143
218
  Goal: 为 `cc-check` 准备新鲜证据。
219
+ Source funnel rounds: Execution Architecture; Task Contract; Final Approval.
220
+ Contract: user story `all planned stories`; file responsibility `verification evidence`; method/interface `all changed public seams`; key fields `all contract fields`; input/output `not applicable`; failure path `gate failure blocks completion`; AFK/HITL `AFK`.
221
+ Do not re-decide: scope, test framework, gate set, completion protocol.
222
+ Artifact updates: review evidence / checkpoint only; no behavior changes.
144
223
  TDD phase: evidence
145
224
  Files: `command or file`
146
225
  Read first: `tasks.md`, `task-manifest.json`
226
+ Project postmortem search: `rg -n "<verification|release|tooling|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
147
227
  Verification: `npm test && npm run lint`
148
228
  Evidence: gate output
229
+ Completion: after gate evidence and required checkpoint/review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T006`; do not hand-edit status.
149
230
  Ready when: 当前 requirement 的实现任务都已收口
150
231
 
151
232
  > `[P]` 只表示“依赖满足后有资格并行”,不表示可以无脑同时开发。
@@ -160,6 +241,8 @@
160
241
  - 要留下什么证据给 `cc-check`
161
242
  - 它处于 Red、Green、Refactor,还是明确的 TDD exception
162
243
  - 它覆盖哪条 user story 或 edge / recovery story
244
+ - 它继承了 Deep Planning Funnel 里确认的哪个接口、方法、字段、分类、输入输出和失败路径
245
+ - 它来自哪几轮 funnel,哪些设计点不允许重决策,哪些 artifact 可以改、哪些不能改
163
246
  - 测试框架依据来自哪里,回归测试是否被明确处理
164
247
  - Red task 通过哪个公共 seam 证明行为缺失,允许 mock 的边界是什么
165
248
  - Red task 的测试名是否像规格,一个测试是否只证明一个逻辑行为,结果是否从公共入口读回
@@ -167,3 +250,5 @@
167
250
  - Refactor task 要清理哪些具体坏味道,且只在相关测试已绿后执行
168
251
  - 测试是否会在内部重构后继续成立,而不是绑定私有函数、调用次数或临时结构
169
252
  - 它属于哪个 tracer bullet 垂直切片,完成后哪个可观察行为被证明
253
+ - 它完成后要运行哪条 `mark-task-complete.sh` 命令,以及为什么不能手工改状态
254
+ - 开工前查过哪些项目尸检报告,相关原则如何转成当前 task guardrail
@@ -1,57 +1,18 @@
1
1
  {
2
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",
3
6
  "requirementId": "REQ-XXX",
4
7
  "requirementVersion": "REQ-XXX.v1",
5
8
  "outputPolicy": {
6
9
  "documentLanguage": ""
7
10
  },
8
- "sourceRoadmap": {
9
- "itemId": "RM-001",
10
- "roadmapVersion": "1.0",
11
- "roadmapSkillVersion": "5.2.0",
12
- "syncStatus": "pending",
13
- "syncCommand": ".claude/skills/cc-roadmap/scripts/sync-roadmap-progress.sh --rm RM-001 --status Planned --req REQ-XXX --progress 0%",
14
- "updatedFiles": [
15
- "devflow/roadmap.json",
16
- "devflow/ROADMAP.md",
17
- "devflow/BACKLOG.md"
18
- ],
19
- "noOpReason": "",
20
- "sourceStage": "Stage 1",
21
- "successSignal": "User can complete the new flow without manual workaround",
22
- "killSignal": "Implementation requires reworking unrelated modules",
23
- "dependencies": [
24
- "Existing auth/session contract stays unchanged"
25
- ],
26
- "nonGoals": [
27
- "No redesign of unrelated settings screens"
28
- ]
29
- },
30
11
  "planningMeta": {
31
- "reqPlanSkillVersion": "3.8.1",
12
+ "reqPlanSkillVersion": "3.8.5",
32
13
  "designVersion": "design.v1",
33
14
  "approvedAt": "2026-04-15T12:00:00.000Z",
34
- "approvedBy": "user",
35
15
  "basedOnOption": "Option A",
36
- "requirementBrief": {
37
- "problemStatement": "The user-perspective problem this requirement solves.",
38
- "solutionSummary": "The user-perspective solution after the requirement lands.",
39
- "actors": [],
40
- "userStories": [
41
- {
42
- "id": "US-001",
43
- "actor": "",
44
- "want": "",
45
- "benefit": "",
46
- "acceptance": []
47
- }
48
- ],
49
- "edgeOrRecoveryStories": [],
50
- "implementationDecisions": [],
51
- "testingDecisions": [],
52
- "outOfScope": [],
53
- "furtherNotes": []
54
- },
55
16
  "aiLeverageDecisionLens": {
56
17
  "realUserOrOperator": "",
57
18
  "statusQuoWorkaround": "",
@@ -73,21 +34,6 @@
73
34
  "missingEvidenceOrPivotReason": "",
74
35
  "impactOnApprovedDirection": ""
75
36
  },
76
- "ambiguityGate": {
77
- "whatScore": 0,
78
- "whyScore": 0,
79
- "blockingThreshold": 3,
80
- "status": "pass",
81
- "assumptionsPreview": [],
82
- "blockedQuestions": []
83
- },
84
- "reviewLoop": {
85
- "attempt": 1,
86
- "maxAttempts": 3,
87
- "repeatedConcernFingerprints": [],
88
- "stallReason": "",
89
- "rerouteIfStalled": "ask-user"
90
- },
91
37
  "externalBestPractice": {
92
38
  "needed": false,
93
39
  "decisionStatus": "not-needed",
@@ -131,133 +77,39 @@
131
77
  }
132
78
  ]
133
79
  },
134
- "sourceEvidence": [
135
- {
136
- "source": "planning/design.md",
137
- "trust": "internal-contract",
138
- "useAs": "contract",
139
- "instructionRisk": "low",
140
- "decision": "authoritative for this requirement"
141
- }
142
- ],
143
- "languageAndDecisions": {
144
- "languageSources": [],
145
- "canonicalTerms": [],
146
- "languageConflicts": [],
147
- "decisionDocs": [],
148
- "adrOrSpecConflicts": [],
149
- "externalDocConflicts": {
150
- "autoResolved": [],
151
- "competing": [],
152
- "unresolved": []
153
- }
154
- },
155
- "executionDiscipline": {
156
- "default": "red-green-refactor",
157
- "taskShape": "vertical-tracer-bullets",
158
- "testFirstRequired": true,
159
- "testFrameworkSource": "",
160
- "testQualityPolicy": {
161
- "publicInterfaceRequired": true,
162
- "behaviorAssertionRequired": true,
163
- "specStyleTestNameRequired": true,
164
- "oneLogicalBehaviorPerRed": true,
165
- "publicVerificationPathRequired": true,
166
- "mockBoundary": "system-boundaries-only",
167
- "implementationDetailTests": "blocked",
168
- "bulkRedTests": "blocked",
169
- "boundaryAdapterShape": "specific-operations-preferred",
170
- "feedbackLoopPreference": [
171
- "automated-test",
172
- "http-curl",
173
- "cli-fixture",
174
- "browser-script",
175
- "trace-replay",
176
- "throwaway-harness",
177
- "property-fuzz",
178
- "differential-loop",
179
- "hitl-script"
180
- ]
181
- },
182
- "regressionTestsRequired": [],
183
- "tddExceptions": []
184
- },
185
- "status": "planned",
186
- "designMode": "tiny-design",
187
- "approvedOption": "Option A",
188
- "designStatus": "approved",
189
- "reviewStatus": "approved",
190
- "spec": {
191
- "primaryCapability": "cap-example",
192
- "secondaryCapabilities": [],
193
- "expectedDelta": [
194
- "Tighten current truth for the capability"
195
- ],
196
- "affectedInvariants": [],
197
- "gapsClosed": [],
198
- "newGaps": [],
199
- "specFiles": [
200
- "devflow/specs/capabilities/cap-example.md"
201
- ],
202
- "syncStatus": "planned"
203
- },
204
- "tasteDecisions": [],
205
- "userChallenges": [],
206
80
  "currentTaskId": "T001",
207
- "activePhase": 1,
208
- "frozenDecisions": [
209
- "Keep the existing route and data contract",
210
- "Prefer a minimal patch over a broader refactor"
211
- ],
212
81
  "tasks": [
213
82
  {
214
83
  "id": "T001",
215
84
  "title": "[TEST] Add a failing test for the missing behavior",
85
+ "type": "TEST",
216
86
  "phase": 1,
217
- "status": "pending",
218
- "tddPhase": "red",
219
- "verticalSlice": "Slice 1",
220
- "testSeam": {
221
- "entry": "public interface / caller flow / CLI / API / UI / trace replay / harness",
222
- "behaviorAsserted": "The user or caller observable behavior that should exist",
223
- "specStyleTestName": "caller can observe the required behavior",
224
- "oneLogicalBehavior": true,
225
- "publicVerificationPath": "Read back through the same public interface or user-visible path",
226
- "implementationDetailRisk": "low"
227
- },
228
- "feedbackLoop": {
229
- "type": "automated-test",
230
- "determinism": "deterministic",
231
- "expectedFailure": "Fails because the target behavior is missing"
232
- },
233
- "allowedMocks": [
234
- "external API / time / randomness / filesystem / database boundary"
235
- ],
236
- "testQuality": {
237
- "usesPublicInterface": true,
238
- "describesBehavior": true,
239
- "specStyleName": true,
240
- "oneLogicalBehavior": true,
241
- "verifiesThroughPublicPath": true,
242
- "survivesInternalRefactor": true,
243
- "mocksOnlySystemBoundaries": true,
244
- "noBulkRed": true
245
- },
246
- "greenMinimality": {
247
- "guard": "Implement only the code needed to pass this Red behavior",
248
- "noSpeculativeBranches": true
87
+ "contract": {
88
+ "sourceFunnelRounds": [
89
+ "Requirement Reality",
90
+ "Interface & Data Contract",
91
+ "Task Contract"
92
+ ],
93
+ "userStory": "US-001",
94
+ "edgeOrRecoveryStory": "US-EDGE-001",
95
+ "fileResponsibility": "tests own behavior proof",
96
+ "methodOrInterface": "public interface / caller flow / CLI / API / UI / trace replay / harness",
97
+ "keyFields": [],
98
+ "inputOutput": "",
99
+ "failurePath": "The behavior is currently missing",
100
+ "afkOrHitl": "AFK",
101
+ "doNotRedecide": [
102
+ "target behavior",
103
+ "public seam",
104
+ "key fields",
105
+ "allowed mock boundary"
106
+ ],
107
+ "artifactUpdates": [
108
+ "src/feature/feature.test.ts"
109
+ ]
249
110
  },
250
- "refactorCandidates": [
251
- "duplication",
252
- "long method",
253
- "shallow module",
254
- "feature envy",
255
- "primitive obsession",
256
- "naming",
257
- "more than three nested branches"
258
- ],
259
- "dependsOn": [],
260
111
  "parallel": false,
112
+ "dependsOn": [],
261
113
  "touches": [
262
114
  "tests",
263
115
  "requirement-behavior"
@@ -265,6 +117,9 @@
265
117
  "files": [
266
118
  "src/feature/feature.test.ts"
267
119
  ],
120
+ "run": [
121
+ "npm test -- src/feature/feature.test.ts"
122
+ ],
268
123
  "acceptance": [
269
124
  "The target behavior is reproduced as a failing test",
270
125
  "The failure message points to the missing requirement behavior"
@@ -292,11 +147,31 @@
292
147
  "reviews": {
293
148
  "spec": "pending",
294
149
  "code": "pending"
295
- }
150
+ },
151
+ "status": "pending",
152
+ "tddPhase": "red",
153
+ "verticalSlice": "Slice 1",
154
+ "testSeam": {
155
+ "entry": "public interface / caller flow / CLI / API / UI / trace replay / harness",
156
+ "behaviorAsserted": "The user or caller observable behavior that should exist",
157
+ "specStyleTestName": "caller can observe the required behavior",
158
+ "oneLogicalBehavior": true,
159
+ "publicVerificationPath": "Read back through the same public interface or user-visible path",
160
+ "implementationDetailRisk": "low"
161
+ },
162
+ "feedbackLoop": {
163
+ "type": "automated-test",
164
+ "determinism": "deterministic",
165
+ "expectedFailure": "Fails because the target behavior is missing"
166
+ },
167
+ "checks": [],
168
+ "attempts": 0,
169
+ "maxRetries": 1
296
170
  }
297
171
  ],
298
- "openQuestions": [],
299
- "deferredQuestions": [
300
- "If the patch touches shared contracts, upgrade the design to full-design"
301
- ]
172
+ "metadata": {
173
+ "source": "tasks.md",
174
+ "generatedBy": "skill:cc-plan",
175
+ "planVersion": 1
176
+ }
302
177
  }
@@ -16,6 +16,13 @@
16
16
  - Primary capability:
17
17
  - Secondary capabilities:
18
18
 
19
+ ## Progressive Disclosure Index
20
+
21
+ - Default read: Frozen Design Card, Validation, Main Risk, Approval.
22
+ - Open for scope questions: Source Handoff, Capability Handoff, Implementation Surface Map.
23
+ - Open for trust/conflict questions: Source Trust Boundary, External Document Conflicts, Domain Language & Decisions.
24
+ - Open for audit/recovery: Project Postmortem Recall, Review Gate, Bounded Review Loop, Decision Questions.
25
+
19
26
  ## Source Handoff
20
27
 
21
28
  - Why now:
@@ -42,6 +49,20 @@
42
49
  - Gate verdict: `pass` | `blocked`
43
50
  - Blocked question if any:
44
51
 
52
+ ## Deep Planning Funnel
53
+
54
+ | Round | Confirmed answer | Evidence / user answer | Status | Artifact impact |
55
+ |-------|------------------|------------------------|--------|-----------------|
56
+ | Requirement Reality | | | confirmed / auto-decided / blocked / not-applicable | Frozen Design Card |
57
+ | System Shape | | | confirmed / auto-decided / blocked / not-applicable | Implementation Surface Map |
58
+ | Interface & Data Contract | | | confirmed / auto-decided / blocked / not-applicable | Interface Shape / Validation |
59
+ | Abstraction & Encapsulation | | | confirmed / auto-decided / blocked / not-applicable | Interface Shape |
60
+ | Execution Architecture | | | confirmed / auto-decided / blocked / not-applicable | Validation / Roadmap Sync Gate |
61
+ | Task Contract | | | confirmed / auto-decided / blocked / not-applicable | planning/tasks.md / task-manifest.json |
62
+ | Final Approval | | | confirmed / blocked | Approval |
63
+
64
+ > tiny-design 也必须把关键确认落盘。若出现新接口、字段、状态机或跨模块决策,优先升级 `full-design`。
65
+
45
66
  ## External Document Conflicts
46
67
 
47
68
  - Auto-resolved:
@@ -76,6 +97,19 @@
76
97
  - Changes to frozen design:
77
98
  - Skipped reason:
78
99
 
100
+ ## Project Postmortem Recall
101
+
102
+ - Search status: `no-project-postmortems-yet` | `searched-no-match` | `matches-found`
103
+ - Search command:
104
+ - Search terms:
105
+ - Sources opened:
106
+ - Matching incidents:
107
+ - Matching principles:
108
+ - Planning impact:
109
+ - No-op reason:
110
+
111
+ > tiny-design 也必须查尸检报告。越小的改动越容易让模型凭直觉重复旧错误。
112
+
79
113
  ## Capability Handoff
80
114
 
81
115
  - Canonical capability spec:
@@ -121,9 +155,15 @@
121
155
 
122
156
  - Callers:
123
157
  - Public operations:
158
+ - Methods / operations:
159
+ - Key fields:
160
+ - Input / output:
161
+ - Error shape:
162
+ - Category / type source:
124
163
  - Complexity hidden:
125
164
  - Misuse risk:
126
165
  - Why this stays simple:
166
+ - Rejected abstraction:
127
167
 
128
168
  ## Interface Testability
129
169
 
@@ -161,6 +201,12 @@
161
201
  - Primary check:
162
202
  - Secondary checks:
163
203
 
204
+ ## Task Contract Preview
205
+
206
+ | Task | User / edge story | File responsibility | Method / interface | Key fields | Failure path | Verification | AFK / HITL |
207
+ |------|-------------------|---------------------|--------------------|------------|--------------|--------------|------------|
208
+ | T001 | | | | | | | AFK / HITL |
209
+
164
210
  ## Roadmap Sync Gate
165
211
 
166
212
  - Source RM: