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.
- package/.claude/skills/cc-act/CHANGELOG.md +18 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
- package/.claude/skills/cc-act/SKILL.md +38 -425
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md +2 -13
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_TEMPLATE.md +1 -9
- package/.claude/skills/cc-act/assets/PR_BRIEF_TEMPLATE.md +21 -177
- package/.claude/skills/cc-act/references/closure-contract.md +12 -63
- package/.claude/skills/cc-act/references/git-commit-guidelines.md +5 -5
- package/.claude/skills/cc-act/scripts/cc-act-common.sh +5 -322
- package/.claude/skills/cc-act/scripts/detect-ship-target.sh +11 -2
- package/.claude/skills/cc-act/scripts/inspect-git-index.sh +58 -0
- package/.claude/skills/cc-act/scripts/render-pr-brief.sh +40 -440
- package/.claude/skills/cc-act/scripts/verify-act-gate.sh +10 -50
- package/.claude/skills/cc-check/CHANGELOG.md +18 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
- package/.claude/skills/cc-check/SKILL.md +33 -456
- package/.claude/skills/cc-check/references/review-contract.md +12 -147
- package/.claude/skills/cc-dev/CHANGELOG.md +15 -0
- package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-dev/SKILL.md +52 -137
- package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
- package/.claude/skills/cc-do/CHANGELOG.md +11 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
- package/.claude/skills/cc-do/SKILL.md +39 -245
- package/.claude/skills/cc-do/references/execution-recovery.md +15 -109
- package/.claude/skills/cc-do/scripts/cc-do-common.sh +5 -57
- package/.claude/skills/cc-do/scripts/check-task-status.sh +35 -65
- package/.claude/skills/cc-do/scripts/mark-task-complete.sh +9 -46
- package/.claude/skills/cc-do/scripts/select-ready-tasks.sh +29 -97
- package/.claude/skills/cc-investigate/CHANGELOG.md +16 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
- package/.claude/skills/cc-investigate/SKILL.md +64 -246
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -98
- package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -218
- package/.claude/skills/cc-next/CHANGELOG.md +6 -0
- package/.claude/skills/cc-next/PLAYBOOK.md +12 -8
- package/.claude/skills/cc-next/SKILL.md +34 -140
- package/.claude/skills/cc-plan/CHANGELOG.md +16 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
- package/.claude/skills/cc-plan/SKILL.md +45 -295
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -228
- package/.claude/skills/cc-plan/references/planning-contract.md +24 -161
- package/.claude/skills/cc-plan/scripts/next-change-key.sh +8 -44
- package/.claude/skills/cc-plan/scripts/parse-task-dependencies.js +2 -2
- package/.claude/skills/cc-plan/scripts/validate-scope.sh +1 -1
- package/.claude/skills/cc-pr-land/SKILL.md +14 -114
- package/.claude/skills/cc-pr-review/CHANGELOG.md +4 -0
- package/.claude/skills/cc-pr-review/SKILL.md +20 -103
- package/.claude/skills/cc-review/CHANGELOG.md +17 -0
- package/.claude/skills/cc-review/PLAYBOOK.md +13 -86
- package/.claude/skills/cc-review/SKILL.md +53 -241
- package/.claude/skills/cc-review/references/e2e-and-plugin-verification.md +2 -2
- package/.claude/skills/cc-review/references/implementation-review-branch.md +7 -147
- package/.claude/skills/cc-review/references/plan-review-branch.md +5 -147
- package/.claude/skills/cc-review/references/review-methods.md +10 -218
- package/.claude/skills/cc-review/scripts/collect-review-context.sh +4 -63
- package/.claude/skills/cc-roadmap/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-roadmap/SKILL.md +3 -3
- package/.claude/skills/cc-simplify/CHANGELOG.md +7 -0
- package/.claude/skills/cc-simplify/SKILL.md +26 -21
- package/.claude/skills/cc-spec-init/PLAYBOOK.md +12 -48
- package/.claude/skills/cc-spec-init/SKILL.md +29 -132
- package/.claude/skills/cc-spec-init/references/spec-contract.md +8 -17
- package/CHANGELOG.md +13 -0
- package/bin/cc-devflow-cli.js +20 -260
- package/bin/cc-devflow.js +44 -7
- package/docs/commands/README.md +1 -1
- package/docs/commands/README.zh-CN.md +1 -1
- package/docs/examples/README.md +1 -1
- package/docs/examples/START-HERE.md +14 -15
- package/docs/examples/example-bindings.json +11 -11
- package/docs/examples/full-design-blocked/README.md +4 -6
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/{planning/tasks.md → task.md} +20 -15
- package/docs/examples/local-handoff/README.md +8 -11
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/pr-brief.md +31 -0
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/{planning/tasks.md → task.md} +18 -13
- package/docs/examples/pdca-loop/README.md +6 -9
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/pr-brief.md +9 -11
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/{planning/tasks.md → task.md} +18 -13
- package/docs/examples/scripts/check-example-bindings.sh +11 -62
- package/docs/guides/artifact-contract.md +10 -40
- package/docs/guides/getting-started.md +8 -8
- package/docs/guides/getting-started.zh-CN.md +8 -8
- package/docs/guides/minimize-artifacts.md +16 -130
- package/docs/guides/project-postmortem.md +14 -71
- package/lib/compiler/__tests__/skills-registry.test.js +9 -8
- package/lib/compiler/resource-copier.js +29 -0
- package/lib/skill-runtime/__tests__/archive-change.test.js +2 -2
- package/lib/skill-runtime/__tests__/benchmark-skills.test.js +3 -3
- package/lib/skill-runtime/__tests__/cli-bootstrap.integration.test.js +14 -4
- package/lib/skill-runtime/errors.js +3 -3
- package/lib/skill-runtime/index.js +5 -23
- package/lib/skill-runtime/paths.js +5 -52
- package/lib/skill-runtime/query-registry.js +4 -4
- package/lib/skill-runtime/query.js +89 -201
- package/lib/skill-runtime/store.js +4 -40
- package/lib/skill-runtime/trace.js +2 -2
- package/package.json +2 -5
- package/.claude/skills/cc-act/assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md +0 -29
- package/.claude/skills/cc-act/assets/RELEASE_NOTE_TEMPLATE.md +0 -54
- package/.claude/skills/cc-act/scripts/generate-status-report.sh +0 -92
- package/.claude/skills/cc-act/scripts/sync-act-docs.sh +0 -355
- package/.claude/skills/cc-check/assets/REPORT_CARD_TEMPLATE.json +0 -234
- package/.claude/skills/cc-check/scripts/render-report-card.js +0 -438
- package/.claude/skills/cc-check/scripts/verify-gate.sh +0 -85
- package/.claude/skills/cc-do/scripts/build-task-context.sh +0 -175
- package/.claude/skills/cc-do/scripts/record-review-decision.sh +0 -88
- package/.claude/skills/cc-do/scripts/recover-workflow.sh +0 -82
- package/.claude/skills/cc-do/scripts/run-problem-analysis.sh +0 -70
- package/.claude/skills/cc-do/scripts/verify-task-gates.sh +0 -109
- package/.claude/skills/cc-do/scripts/write-task-checkpoint.sh +0 -92
- package/.claude/skills/cc-investigate/assets/TASK_MANIFEST_TEMPLATE.json +0 -224
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -178
- package/.claude/skills/cc-spec-init/assets/CHANGE_META_TEMPLATE.json +0 -28
- package/.claude/skills/cc-spec-init/scripts/validate-spec-links.sh +0 -45
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/design.md +0 -234
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/planning/task-manifest.json +0 -488
- package/docs/examples/full-design-blocked/changes/REQ-002-bulk-invite-import/review/report-card.json +0 -189
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/resume-index.md +0 -39
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/handoff/status.md +0 -29
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/design.md +0 -123
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/planning/task-manifest.json +0 -292
- package/docs/examples/local-handoff/changes/REQ-003-audit-log-export/review/report-card.json +0 -136
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/handoff/status.md +0 -29
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/design.md +0 -124
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/planning/task-manifest.json +0 -292
- package/docs/examples/pdca-loop/changes/REQ-001-copy-invite-link/review/report-card.json +0 -136
- package/docs/get-shit-done-strategy-audit.md +0 -518
- package/docs/skill-runtime-migration.md +0 -46
- package/lib/skill-runtime/__tests__/approve.test.js +0 -92
- package/lib/skill-runtime/__tests__/autopilot.test.js +0 -253
- package/lib/skill-runtime/__tests__/benchmark-artifacts.test.js +0 -165
- package/lib/skill-runtime/__tests__/delegation.test.js +0 -97
- package/lib/skill-runtime/__tests__/dispatch.test.js +0 -237
- package/lib/skill-runtime/__tests__/intent.test.js +0 -203
- package/lib/skill-runtime/__tests__/lifecycle.test.js +0 -169
- package/lib/skill-runtime/__tests__/planner.tdd.test.js +0 -331
- package/lib/skill-runtime/__tests__/prepare-pr.test.js +0 -126
- package/lib/skill-runtime/__tests__/query.test.js +0 -860
- package/lib/skill-runtime/__tests__/readiness.test.js +0 -53
- package/lib/skill-runtime/__tests__/release.test.js +0 -85
- package/lib/skill-runtime/__tests__/review-check-integration.test.js +0 -148
- package/lib/skill-runtime/__tests__/review-records.test.js +0 -619
- package/lib/skill-runtime/__tests__/runtime.integration.test.js +0 -351
- package/lib/skill-runtime/__tests__/schemas.test.js +0 -337
- package/lib/skill-runtime/__tests__/task-contract-migrate.test.js +0 -137
- package/lib/skill-runtime/__tests__/task-contract.test.js +0 -874
- package/lib/skill-runtime/__tests__/team-state.test.js +0 -51
- package/lib/skill-runtime/__tests__/verify-artifacts.test.js +0 -203
- package/lib/skill-runtime/__tests__/worker-run.test.js +0 -275
- package/lib/skill-runtime/__tests__/worker.test.js +0 -56
- package/lib/skill-runtime/__tests__/workflow-context-legacy-fallback.test.js +0 -31
- package/lib/skill-runtime/__tests__/workflow-context.test.js +0 -98
- package/lib/skill-runtime/artifacts.js +0 -88
- package/lib/skill-runtime/context-index.js +0 -545
- package/lib/skill-runtime/delegation.js +0 -533
- package/lib/skill-runtime/intent.js +0 -309
- package/lib/skill-runtime/lifecycle.js +0 -294
- package/lib/skill-runtime/operations/CLAUDE.md +0 -19
- package/lib/skill-runtime/operations/approve.js +0 -81
- package/lib/skill-runtime/operations/autopilot-core.js +0 -337
- package/lib/skill-runtime/operations/autopilot-execution.js +0 -307
- package/lib/skill-runtime/operations/autopilot-shared.js +0 -48
- package/lib/skill-runtime/operations/autopilot.js +0 -163
- package/lib/skill-runtime/operations/dispatch.js +0 -416
- package/lib/skill-runtime/operations/init.js +0 -60
- package/lib/skill-runtime/operations/janitor.js +0 -61
- package/lib/skill-runtime/operations/plan.js +0 -59
- package/lib/skill-runtime/operations/prepare-pr.js +0 -25
- package/lib/skill-runtime/operations/release.js +0 -99
- package/lib/skill-runtime/operations/resume.js +0 -126
- package/lib/skill-runtime/operations/review-records.js +0 -265
- package/lib/skill-runtime/operations/snapshot.js +0 -45
- package/lib/skill-runtime/operations/task-contract.js +0 -593
- package/lib/skill-runtime/operations/verify.js +0 -170
- package/lib/skill-runtime/operations/worker-run.js +0 -531
- package/lib/skill-runtime/operations/worker.js +0 -33
- package/lib/skill-runtime/planner.js +0 -539
- package/lib/skill-runtime/readiness.js +0 -84
- package/lib/skill-runtime/review-records.js +0 -123
- package/lib/skill-runtime/review.js +0 -855
- package/lib/skill-runtime/schemas.js +0 -746
- package/lib/skill-runtime/task-contract.js +0 -188
- package/lib/skill-runtime/team-state.js +0 -122
- package/lib/skill-runtime/workflow-context.js +0 -748
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-act
|
|
3
|
-
version: 1.
|
|
4
|
-
description:
|
|
3
|
+
version: 1.9.1
|
|
4
|
+
description: Use when verified work must be committed, handed off, pushed, or turned into a PR with the smallest durable delivery surface.
|
|
5
5
|
triggers:
|
|
6
6
|
- 准备提 PR
|
|
7
7
|
- 帮我发版
|
|
@@ -9,79 +9,49 @@ triggers:
|
|
|
9
9
|
- ship this
|
|
10
10
|
- handoff
|
|
11
11
|
- close this requirement
|
|
12
|
-
- merge 之后怎么收口
|
|
13
12
|
reads:
|
|
14
13
|
- PLAYBOOK.md
|
|
15
|
-
- CHANGELOG.md
|
|
16
14
|
- references/closure-contract.md
|
|
17
15
|
- references/git-commit-guidelines.md
|
|
18
16
|
- assets/PR_BRIEF_TEMPLATE.md
|
|
19
|
-
- assets/RELEASE_NOTE_TEMPLATE.md
|
|
20
17
|
- assets/PROJECT_POSTMORTEM_TEMPLATE.md
|
|
21
18
|
- assets/PROJECT_POSTMORTEM_INDEX_TEMPLATE.md
|
|
22
|
-
- assets/PROJECT_POSTMORTEM_PRINCIPLES_TEMPLATE.md
|
|
23
19
|
- docs/guides/project-postmortem.md
|
|
24
|
-
- ../cc-
|
|
25
|
-
- ../cc-roadmap/scripts/sync-roadmap-progress.sh
|
|
20
|
+
- ../cc-dev/scripts/resolve-cc-devflow.sh
|
|
26
21
|
- scripts/ensure-ship-branch.sh
|
|
27
22
|
writes:
|
|
28
23
|
- path: devflow/changes/<change-key>/handoff/pr-brief.md
|
|
29
24
|
durability: durable
|
|
30
25
|
required: false
|
|
31
|
-
when:
|
|
32
|
-
exclusive_group: handoff
|
|
33
|
-
- path: devflow/changes/<change-key>/handoff/resume-index.md
|
|
34
|
-
durability: durable
|
|
35
|
-
required: false
|
|
36
|
-
when: handoff mode is local resume
|
|
37
|
-
exclusive_group: handoff
|
|
38
|
-
- path: devflow/changes/<change-key>/handoff/release-note.md
|
|
39
|
-
durability: durable
|
|
40
|
-
required: false
|
|
41
|
-
when: handoff mode is release
|
|
42
|
-
exclusive_group: handoff
|
|
26
|
+
when: creating or updating a PR
|
|
43
27
|
- path: devflow/postmortems/INDEX.md
|
|
44
28
|
durability: durable
|
|
45
29
|
required: false
|
|
46
30
|
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
31
|
- path: devflow/postmortems/incidents/<date>-<change-key>.md
|
|
52
32
|
durability: durable
|
|
53
33
|
required: false
|
|
54
34
|
when: closing a FIX or recurring AI/process/engineering failure
|
|
55
35
|
effects:
|
|
56
|
-
-
|
|
36
|
+
- final Git commits
|
|
37
|
+
- optional push or PR creation
|
|
38
|
+
- archive completed change after merge when requested
|
|
57
39
|
entry_gate:
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
- If simplify, tests, or act changes code or verification scope, return to cc-check immediately.
|
|
63
|
-
- 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.
|
|
64
|
-
- For FIX closeout or recurring AI/process/engineering failures, update the project postmortem under `devflow/postmortems/` before final ship/handoff material is declared complete.
|
|
65
|
-
- '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.'
|
|
40
|
+
- "Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require query workflow-context config`."
|
|
41
|
+
- "Read `task.md`, Git status, latest commits, validation evidence, and current PR state when relevant."
|
|
42
|
+
- "If verification changed during Act, return to `cc-check`."
|
|
43
|
+
- "Pick one mode: `create-pr`, `update-pr`, `local-handoff`, or `post-merge-closeout`."
|
|
66
44
|
exit_criteria:
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
- The source roadmap item reflects the latest verified state, ship mode, and follow-up decision, or the handoff records a no-op reason.
|
|
45
|
+
- "All completed work is committed with coherent Conventional Commit messages."
|
|
46
|
+
- "PR mode writes or refreshes only `handoff/pr-brief.md`."
|
|
47
|
+
- "FIX or recurring failure closeout writes incident postmortem only when needed."
|
|
48
|
+
- "No process file is created beyond the allowed durable outputs."
|
|
49
|
+
- "Push, PR, or local handoff status is explicit."
|
|
73
50
|
reroutes:
|
|
74
|
-
- when: Verification is stale, incomplete, or changed during
|
|
51
|
+
- when: Verification is stale, incomplete, or changed during Act.
|
|
75
52
|
target: cc-check
|
|
76
|
-
- when: Act reveals unfinished implementation or unresolved
|
|
53
|
+
- when: Act reveals unfinished implementation or unresolved findings.
|
|
77
54
|
target: cc-do
|
|
78
|
-
recovery_modes:
|
|
79
|
-
- name: memory-consolidation
|
|
80
|
-
when: Delivery evidence is scattered across task state, reviews, CLI logs, and prior handoff notes.
|
|
81
|
-
action: Compress the current truth into handoff/pr-brief.md, handoff/resume-index.md, and handoff/release-note.md before any ship action continues.
|
|
82
|
-
- name: local-handoff-refresh
|
|
83
|
-
when: Remote push or PR tooling is unavailable but the requirement is otherwise ready to land.
|
|
84
|
-
action: Switch to local-handoff mode, refresh handoff/resume-index.md, and leave a verified next entry for the maintainer.
|
|
85
55
|
tool_budget:
|
|
86
56
|
read_files: 8
|
|
87
57
|
search_steps: 5
|
|
@@ -90,398 +60,41 @@ tool_budget:
|
|
|
90
60
|
|
|
91
61
|
# CC-Act
|
|
92
62
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
## Role
|
|
96
|
-
|
|
97
|
-
`cc-act` 是 PDCA 里的 `Act + Ship`。
|
|
98
|
-
|
|
99
|
-
它不再只是“写收尾文档”,而是负责把已经通过验证的现实推进到真正可接手、可 review、可发布、可回写的状态。
|
|
100
|
-
|
|
101
|
-
一句话:`cc-check` 证明“东西已经好”,`cc-act` 负责把“已经好”变成“已经落地”。
|
|
102
|
-
|
|
103
|
-
## Runtime Output Policy
|
|
104
|
-
|
|
105
|
-
写入任何 durable Markdown 或 JSON metadata 前,先运行 `cc-devflow config resolve --format policy`。
|
|
106
|
-
|
|
107
|
-
- `Output language` 是机器约束,PR brief、resume index、release note 和 status handoff 必须记录并遵守它。
|
|
108
|
-
- `agent_preferences` 是用户偏好建议,只影响表达方式和结构选择,不覆盖本 Skill 的工作流边界。
|
|
109
|
-
- 如果配置解析失败,先修配置或向用户说明阻塞,不要用默认语言继续生成正式文档。
|
|
110
|
-
|
|
111
|
-
## Read First
|
|
112
|
-
|
|
113
|
-
1. `PLAYBOOK.md`
|
|
114
|
-
2. `CHANGELOG.md`
|
|
115
|
-
3. `references/closure-contract.md`
|
|
116
|
-
4. `references/git-commit-guidelines.md`
|
|
117
|
-
5. `docs/guides/project-postmortem.md`
|
|
118
|
-
|
|
119
|
-
## Use This Skill When
|
|
120
|
-
|
|
121
|
-
- `cc-check` 已通过
|
|
122
|
-
- 需要决定这次是 `create-pr`、`update-pr`、`local-handoff`,还是 `post-merge-closeout`
|
|
123
|
-
- 需要在 ship 前再做一次 `cc-simplify`、单测、以及按协调器要求执行的 e2e
|
|
124
|
-
- 需要同步最终文档、handoff、release note
|
|
125
|
-
- 需要把遗留 follow-up / 优先级变化回写 `devflow/roadmap.json`,并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
|
|
126
|
-
- 需要把已验证的 spec delta 正式回写 capability spec 与 `devflow/specs/INDEX.md`
|
|
127
|
-
- 需要让下一轮入口比现在更清楚
|
|
128
|
-
|
|
129
|
-
如果 `review/report-card.json` 不是 `pass`,或 `specSyncReady` 不是 `true`,或者仍指向 `cc-do` / `cc-plan`,停止在这里,不准 ship。
|
|
130
|
-
|
|
131
|
-
## Quick Start
|
|
63
|
+
`cc-act` 把已经验证的现实落地。它不再制造收尾文档农场。
|
|
132
64
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
| 现实状态 | 直接选用模式 |
|
|
136
|
-
| --- | --- |
|
|
137
|
-
| 在 feature branch,远端可用,还没有 PR / MR | `create-pr` |
|
|
138
|
-
| 在 feature branch,已经有打开的 PR / MR | `update-pr` |
|
|
139
|
-
| 在 detached HEAD,用户要求继续 / 提交远程 PR,且远端可用 | 先 `ensure-ship-branch.sh`,再按 `create-pr` |
|
|
140
|
-
| 在 feature branch,但现在不推远端或工具不可用 | `local-handoff` |
|
|
141
|
-
| 已在 base branch,或 requirement 已合并完成 | `post-merge-closeout` |
|
|
142
|
-
|
|
143
|
-
如果 10 秒内还说不清属于哪一类,先停下,重新跑 `scripts/detect-ship-target.sh`。`cc-act` 不是猜模式的地方。
|
|
144
|
-
|
|
145
|
-
## Harness Contract
|
|
146
|
-
|
|
147
|
-
- Allowed actions: freeze ship facts, run simplify and required tests, sync docs, prepare landing materials, and execute the matching ship mode.
|
|
148
|
-
- Forbidden actions: shipping with a stale report card, claiming readiness without simplify/test evidence or explicit skip evidence, inventing a fifth ambiguous mode, or continuing feature development inside act.
|
|
149
|
-
- Required evidence: PR briefs, status reports, release notes, resume indexes, and test evidence must summarize already-proven facts only.
|
|
150
|
-
- Reroute rule: changed verification goes back to `cc-check`; unfinished implementation or new fixes go back to `cc-do`.
|
|
151
|
-
|
|
152
|
-
## Closure Discipline
|
|
153
|
-
|
|
154
|
-
- Ship materials summarize verified facts only; do not use `cc-act` to finish implementation or reinterpret scope.
|
|
155
|
-
- Every handoff records done, verified, remaining/blocker, and next entry.
|
|
156
|
-
- Skipped tests, skipped archive, unavailable auth, stale PR state, or release uncertainty must be explicit blockers or explicit skip records.
|
|
157
|
-
|
|
158
|
-
## Project Postmortem Writeback
|
|
159
|
-
|
|
160
|
-
`cc-act` 是项目级 AI 尸检报告的唯一默认写入者,因为它能看到 verified reality、Git 状态、review range、ship mode 和 follow-up。
|
|
161
|
-
|
|
162
|
-
固定位置:
|
|
65
|
+
允许保留的 durable 输出只有:
|
|
163
66
|
|
|
67
|
+
- `devflow/changes/<change-key>/handoff/pr-brief.md`
|
|
164
68
|
- `devflow/postmortems/INDEX.md`
|
|
165
|
-
- `devflow/postmortems/principles.md`
|
|
166
69
|
- `devflow/postmortems/incidents/<date>-<change-key>.md`
|
|
167
70
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
1. 当前 change key 是 `FIX-*`。
|
|
171
|
-
2. `cc-check` / `cc-act` 暴露重复的 AI、流程、测试、release、Git 或架构错误。
|
|
172
|
-
3. 用户明确要求记录一次教训。
|
|
173
|
-
|
|
174
|
-
写入规则:
|
|
175
|
-
|
|
176
|
-
1. 先用 `assets/PROJECT_POSTMORTEM_TEMPLATE.md` 写具体 incident;事实必须包含 branch、base/head SHA、review range、相关 commits、PR/handoff、验证命令和关键输出。
|
|
177
|
-
2. 再更新 `INDEX.md` 的短入口:日期、change、severity、tags、one-line lesson、incident 链接。
|
|
178
|
-
3. 只有能从 incident 和 Git 证据提炼出可迁移规则时,才更新 `principles.md`;原则必须引用 incident 和 Git 证据。
|
|
179
|
-
4. 报告使用渐进式披露:默认层只给检索和提醒,深层 incident 才放完整时间线、根因、逃逸原因和验证记录。
|
|
180
|
-
5. 写入前执行 Redaction Guard:不要复制 secret、token、客户数据、个人机器路径或私密原始日志;必要证据用 `<redacted>` 和 redaction summary 表达。
|
|
181
|
-
6. 尸检报告不拥有 roadmap、task、review 或 spec 状态;只能引用对应 owner artifact 和 Git 证据。
|
|
182
|
-
|
|
183
|
-
## Entry Gate
|
|
184
|
-
|
|
185
|
-
1. 先运行 `cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --data-only --no-trace --compact`,确认 context index 的 `nextAction.skill == "cc-act"`。
|
|
186
|
-
2. 再读 `review/report-card.json`,只接受已通过且有证据的现实。
|
|
187
|
-
3. 默认只使用 workflow context 的 `packetOnly`、`mustNotForget` 和 `sourceHashes`;必要时打开 `progressiveDisclosure.defaultOpen` 的 section / JSON refs;只有 ship mode、roadmap sync、rollback、hash mismatch 或 postmortem 触发时,再读 `deepOpen` 里的完整 `planning/tasks.md`、manifest、change-meta、相关 capability spec、handoff 或 legacy fallback。
|
|
188
|
-
4. 运行 `scripts/verify-act-gate.sh --dir <requirement-dir>`,确认 gate 真的闭合。
|
|
189
|
-
5. 运行 `scripts/detect-ship-target.sh`,识别当前分支、base branch、PR 状态与推荐 ship 路径。
|
|
190
|
-
- 如果输出 `BRANCH_STATE=detached` 且 `BRANCH_RESCUE=create-branch-before-pr`,这不是阻塞;立即运行 `scripts/ensure-ship-branch.sh --dir <requirement-dir>`,然后重跑最终验证与 `detect-ship-target.sh`。
|
|
191
|
-
- 用户已经表达“继续 / 提交远程 PR / 推进”的场景下,detached HEAD 只能触发分支锚定,不能把 `create-pr` 降级成 `local-handoff`。
|
|
192
|
-
6. 检查 `review.freshness`、`runtime.failureOwnership`、`qa.coverageAudit`、`qa.browserEvidence`,确认 readiness dashboard 没有 blocker。
|
|
193
|
-
7. 检查 `qa.feedbackLoop`、`qa.behaviorEvidence`、`qa.architectureFollowUps` 和 follow-up brief,确认交付材料继承的是行为证据,不是聊天记忆或易腐烂 TODO。
|
|
194
|
-
8. 定位 source RM:优先读 `change-meta.json` / `task-manifest.json` 的 `sourceRoadmap.itemId`,再用 `locate-roadmap-item.sh` 对照 `devflow/roadmap.json`、`devflow/ROADMAP.md` 和 optional `devflow/BACKLOG.md`;如果 roadmap 状态和 verified reality 冲突,先同步或 reroute,不能继续 ship。
|
|
195
|
-
9. 如果在 `cc-act` 期间因为 `cc-simplify`、单测、e2e、review 修复而改了代码,必须回 `cc-check`,不能带着旧证明继续 ship。
|
|
71
|
+
其余状态和历史交给 Git。不要写额外过程文件或 JSON 文档。
|
|
196
72
|
|
|
197
73
|
## Ship Modes
|
|
198
74
|
|
|
199
|
-
`
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
- 或当前在 detached HEAD 但可以通过 `ensure-ship-branch.sh` 在 HEAD 上创建命名分支
|
|
204
|
-
- 远端存在
|
|
205
|
-
- 当前没有 PR / MR
|
|
206
|
-
2. `update-pr`
|
|
207
|
-
- 当前在 feature branch
|
|
208
|
-
- 已存在打开的 PR / MR
|
|
209
|
-
- 需要刷新 body、补文档、同步最新状态
|
|
210
|
-
3. `local-handoff`
|
|
211
|
-
- 当前在 feature branch
|
|
212
|
-
- 暂不推远端,或远端工具不可用
|
|
213
|
-
- 但要把 handoff 与下一步写清楚
|
|
214
|
-
4. `post-merge-closeout`
|
|
215
|
-
- 当前已在 base branch,或 requirement 已完成合并
|
|
216
|
-
- 重点是 merged-result verification、release note、doc sync、backlog writeback、归档
|
|
217
|
-
|
|
218
|
-
不要发明第五种模糊模式。
|
|
219
|
-
|
|
220
|
-
## Minimum Output By Mode
|
|
221
|
-
|
|
222
|
-
先做最小必要交付,再补充可选材料:
|
|
223
|
-
|
|
224
|
-
1. `create-pr`
|
|
225
|
-
- 必须有 `handoff/pr-brief.md`
|
|
226
|
-
- 必须完成需要同步的 doc updates
|
|
227
|
-
- 如果 `CURRENT_BRANCH` 为空但 `BRANCH_RESCUE=create-branch-before-pr`,必须先运行 `scripts/ensure-ship-branch.sh --dir <requirement-dir>`,再继续 commit / push / PR
|
|
228
|
-
- 新增提交必须遵守 `references/git-commit-guidelines.md`
|
|
229
|
-
- 远端可用时必须完成 commit、push、`gh pr create`
|
|
230
|
-
2. `update-pr`
|
|
231
|
-
- 必须有更新后的 `handoff/pr-brief.md`
|
|
232
|
-
- 必须说明这次新增了什么验证或文档同步
|
|
233
|
-
- 必须避免重复创建 PR / MR
|
|
234
|
-
- 新增提交必须遵守 `references/git-commit-guidelines.md`
|
|
235
|
-
- 如果有新增提交,必须 push 并刷新 PR / MR 内容
|
|
236
|
-
3. `local-handoff`
|
|
237
|
-
- 必须有更新后的 `handoff/resume-index.md`
|
|
238
|
-
- 必须写清接手入口、验证方式、当前阻塞
|
|
239
|
-
4. `post-merge-closeout`
|
|
240
|
-
- 必须完成 doc sync
|
|
241
|
-
- 需要对外说明时生成 `handoff/release-note.md`
|
|
242
|
-
- 必须把 follow-up 回写到 `devflow/roadmap.json`,并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
|
|
243
|
-
- 必须运行 `cc-devflow archive-change <change-key>` 归档已闭环 change;除非存在明确安全阻塞并写入 `ArchiveSkip`
|
|
244
|
-
|
|
245
|
-
不是每次都要把所有文件生成一遍。材料必须服务于当前 ship 模式,而不是为了流程好看。
|
|
246
|
-
|
|
247
|
-
## Pre-Ship Validation
|
|
248
|
-
|
|
249
|
-
在真正写交付材料或推远端之前,先把这 4 件事做完:
|
|
250
|
-
|
|
251
|
-
1. `Simplify`
|
|
252
|
-
- 通过当前运行时可用的 skill 调用器调用 `cc-simplify`
|
|
253
|
-
- 如果桥接环境暴露为 `${JM}`,就按 `${JM}` + `skill: "cc-simplify"` 执行
|
|
254
|
-
- 目标不是再开发新范围,而是清理重复、坏味道、低效实现
|
|
255
|
-
2. `Run unit tests`
|
|
256
|
-
- 先检查项目的标准测试入口,例如 `package.json` scripts、`Makefile`、`bun test`、`pytest`、`go test`
|
|
257
|
-
- 选择该项目实际存在的单测入口执行
|
|
258
|
-
- 失败就修,但修完必须回 `cc-check` 刷新证明
|
|
259
|
-
3. `Test end-to-end`
|
|
260
|
-
- 严格按协调器 prompt 里的 e2e recipe 执行
|
|
261
|
-
- 如果 recipe 明确要求跳过,记录 skip 原因,不要伪造执行
|
|
262
|
-
- e2e 失败并导致代码修改时,同样回 `cc-check`
|
|
263
|
-
4. `Commit and push`
|
|
264
|
-
- 只对 `create-pr` / `update-pr` 模式生效
|
|
265
|
-
- 所有验证通过后再 commit,并遵守 `references/git-commit-guidelines.md`
|
|
266
|
-
- push 当前分支,并用 `gh pr create` 创建 PR;已有 PR 时只更新,不重复创建
|
|
267
|
-
- `gh` 不可用、push 失败、远端不可达时,切到 `local-handoff` 并把阻塞写清楚
|
|
268
|
-
|
|
269
|
-
这 4 步只接受两种结果:`全部完成` 或 `明确 reroute / handoff`。不要停在“差不多已经好了”。
|
|
270
|
-
|
|
271
|
-
## Ship Discipline
|
|
272
|
-
|
|
273
|
-
`cc-act` 的 ship 动作必须是幂等、可审计、可复跑的:
|
|
274
|
-
|
|
275
|
-
1. Base and branch:识别 base branch、当前 branch、远端状态、已有 PR / MR,所有 diff/log/push 都基于同一个 base。
|
|
276
|
-
- detached HEAD 是可恢复的分支事实,不是交付模式;能创建分支时,先锚定命名分支再继续。
|
|
277
|
-
2. Scope completion:PR 简报必须包含 `cc-check` 的 plan completion、scope drift、review finding、验证结果摘要。
|
|
278
|
-
3. Version and changelog:如果项目有 `VERSION`、`package.json`、`CHANGELOG.md`,先判断是否已 bump / 是否漂移;不要重复 bump,也不要覆盖 changelog。
|
|
279
|
-
4. Bisectable commits:提交按逻辑单元拆分,顺序保证每个 commit 独立可理解、尽量可验证;小于 50 行且少于 4 文件可单 commit。
|
|
280
|
-
5. Fresh final verification:每次进入 `cc-act` 都要重跑 entry gate、simplify、单测、e2e 或记录 skip;只有 push、PR 更新、doc 生成这类动作可以幂等跳过。以前跑过不等于现在仍然可信。
|
|
281
|
-
6. Push idempotency:push 前比较 local/remote HEAD;已同步就不重复 push,不可用就切 `local-handoff`。
|
|
282
|
-
7. PR idempotency:已有打开的 PR / MR 只更新 body,不重复创建。
|
|
283
|
-
8. Review range:PR brief / PR body 必须写清 `cc-check` 审过的 base/head SHA、review packet、finding triage 摘要。
|
|
284
|
-
9. Post-integration verification:本地合并或 post-merge closeout 后,必须在 merged result 上跑必要 gate;不能只继承合并前绿色。
|
|
285
|
-
10. Follow-up durability:PR brief / release note / backlog writeback 里的 follow-up 必须写成行为契约,包含 current behavior、desired behavior、key interfaces、acceptance criteria、out of scope;不要把当前文件路径或行号当成长期计划。
|
|
286
|
-
11. Remote state consistency:如果本次 closeout 触碰 GitHub issue / PR / tracker,必须记录当前 state、目标 state、允许转换、已保留事实和下一位 owner;`needs-info` 必须保留已确认事实和具体问题,`ready-for-agent` 必须有可执行 brief。
|
|
287
|
-
12. Tooling smoke:如果本次改动影响 hook、pre-commit、lint、publish、adapt 或验证脚本,必须跑真实入口或最接近真实入口的 smoke;只读配置文件不等于工具链可用。
|
|
288
|
-
|
|
289
|
-
## Ship Preflight And Rescue
|
|
290
|
-
|
|
291
|
-
ship preflight 必须结构化记录:
|
|
292
|
-
|
|
293
|
-
- `branch`: 当前分支、base、remote、local/remote HEAD 关系
|
|
294
|
-
- `auth`: `gh` / registry / deploy / package publish 等权限是否可用
|
|
295
|
-
- `workspace`: clean tree、staged files、未跟踪文件和相关 stash
|
|
296
|
-
- `reviewFreshness`: `cc-check` 审查范围是否仍绑定当前 HEAD
|
|
297
|
-
- `shipMode`: `create-pr` / `update-pr` / `local-handoff` / `post-merge-closeout`
|
|
298
|
-
|
|
299
|
-
任何 preflight failure 都必须命名为 `ShipPreflightError`,并写清 rescue action。
|
|
300
|
-
不能用“工具不可用”当作模糊失败;要明确切 `local-handoff`、补 auth、刷新 review,
|
|
301
|
-
还是返回 `cc-check`。
|
|
302
|
-
|
|
303
|
-
rollback guard 必须在 publish、merge、PR 更新或 release note 前写清:
|
|
304
|
-
|
|
305
|
-
- safe state
|
|
306
|
-
- rollback command 或人工回退步骤
|
|
307
|
-
- data / migration / package / remote side effect
|
|
308
|
-
- owner
|
|
309
|
-
|
|
310
|
-
没有 rollback guard 的 release 只能停在 handoff,不准发布。
|
|
311
|
-
|
|
312
|
-
## Readiness Dashboard
|
|
313
|
-
|
|
314
|
-
PR / handoff 之前必须把 readiness 压成一屏事实:
|
|
315
|
-
|
|
316
|
-
1. Review freshness:`review.freshness.status` 必须是 `fresh` 或 `not-applicable`。
|
|
317
|
-
2. Review quality:记录 `review.qualityScore`、specialist facet 覆盖、finding triage 摘要。
|
|
318
|
-
3. QA coverage:记录 `qa.coverageAudit` 的 coverage、gaps、e2e/eval requirement。
|
|
319
|
-
4. Browser QA:UI / 用户路径变更必须有 `qa.browserEvidence`,否则要有 skip reason。
|
|
320
|
-
5. Feedback loop:bugfix / 行为变更必须有 `qa.feedbackLoop`,否则要有不可复现或不适用原因。
|
|
321
|
-
6. Behavior evidence:expected / actual / reproduction steps 必须能被 reviewer 独立理解。
|
|
322
|
-
7. Failure ownership:`runtime.failureOwnership` 不能有未解释的 `in-branch` 或 `ambiguous` failure。
|
|
323
|
-
8. Documentation release:README / CLAUDE / architecture / handoff / changelog 的同步状态必须可审计。
|
|
324
|
-
9. PR body accuracy:PR body 必须从当前 `pr-brief.md`、当前 diff、当前 report-card 重建;已有 PR body 只能被刷新,不能被继承。
|
|
325
|
-
|
|
326
|
-
readiness dashboard 有 blocker 时,不能创建或更新 PR,只能 reroute 到 `cc-check` / `cc-do` 或生成 local handoff。
|
|
327
|
-
|
|
328
|
-
## Pull Request Body Template Contract
|
|
329
|
-
|
|
330
|
-
PR body 不是聊天摘要,而是 reviewer 的第一份执行材料。`create-pr` / `update-pr` 必须从当前事实生成一版可直接提交的 PR body draft:
|
|
331
|
-
|
|
332
|
-
1. Language decision:读取 `Output language`。中文项目输出中文 PR 标题和正文;英文项目输出英文 PR 标题和正文;`type(scope)`、路径、命令、issue key、REQ/FIX/RM ID 保持机器可读。
|
|
333
|
-
2. Required shape:必须包含 summary、problem、changes、validation、review/gate evidence、risk/rollback、docs/writeback、follow-ups。
|
|
334
|
-
3. Evidence density:validation 不能只有“tests passed”,必须列命令、退出结果或关键观察;review/gate evidence 必须带 reviewed base/head SHA、finding triage、QA/claim evidence 和 readiness 摘要。
|
|
335
|
-
4. Freshness:已有 PR body 只能作为远端旧状态参考,不能继承;每次 `gh pr create` / `gh pr edit` 前都用当前 `handoff/pr-brief.md`、当前 diff、当前 report-card、doc sync 和 roadmap writeback 重建。
|
|
336
|
-
5. Completeness gate:空标题、`<placeholder>`、泛化句子、缺少风险/回滚边界、缺少文档/回写状态时,不准创建或更新 PR。
|
|
337
|
-
|
|
338
|
-
## Integration Safety
|
|
339
|
-
|
|
340
|
-
`cc-act` 可以清理交付路径,但不能悄悄做破坏性动作:
|
|
341
|
-
|
|
342
|
-
1. 删除 feature branch、删除 worktree、丢弃提交、归档 requirement 前,必须列出受影响对象。
|
|
343
|
-
2. 丢弃未合并工作必须要求用户显式确认;没有确认时只能转 `local-handoff`。
|
|
344
|
-
3. branch cleanup 只发生在 merge / PR / discard 语义已经清楚之后。
|
|
345
|
-
4. `post-merge-closeout` 必须记录 merged-result verification:命令、exit status、关键观察、失败时 reroute。
|
|
346
|
-
5. 危险 Git 动作必须有明确 ship 语义:`git push` 只在 `create-pr` / `update-pr` / release lane 执行,`git reset --hard`、`git clean -f`、`git branch -D`、整树 restore/checkout 必须先列出对象并取得用户确认;没有确认时写 handoff,不执行。
|
|
347
|
-
|
|
348
|
-
## Documentation Release
|
|
349
|
-
|
|
350
|
-
文档同步要作为发布链路的一部分,而不是 PR 后的人工补丁:
|
|
351
|
-
|
|
352
|
-
1. Diff audit:按最终 diff/log 识别新增能力、行为变化、删除项、基础设施变化。
|
|
353
|
-
2. Per-file audit:检查 README、CLAUDE、ARCHITECTURE、CONTRIBUTING、docs、handoff 是否与 diff 矛盾。
|
|
354
|
-
3. Auto-update facts:路径、命令、计数、skill 列表、入口链接、明显过期事实可以直接更新。
|
|
355
|
-
4. Risky narrative gate:产品定位、安全模型、架构哲学、大段删除、含义改变的 changelog 改写必须停下说明。
|
|
356
|
-
5. Changelog protection:只允许润色既有条目或新增由当前 diff 支撑的条目,不能重写历史、删除已有发布说明。
|
|
357
|
-
6. Discoverability:新增文档必须能从 README、CLAUDE 或 handoff 入口找到。
|
|
358
|
-
7. TODO/backlog cleanup:只把有 diff 证据完成的事项移到 completed;新 follow-up 写回 backlog/roadmap。
|
|
359
|
-
|
|
360
|
-
## Issue And Follow-Up Handoff
|
|
361
|
-
|
|
362
|
-
当本次交付产生或更新 issue / PR / backlog follow-up 时,文案必须耐 refactor:
|
|
363
|
-
|
|
364
|
-
- 先写用户可观察行为:what happened / expected / reproduction 或 desired behavior。
|
|
365
|
-
- 再写 agent 可执行 contract:acceptance criteria、allowed scope、blocked by、verification command。
|
|
366
|
-
- 不把短期文件路径、行号、函数名写成长期事实;只有当前 reviewer 需要定位时才放进 PR brief 的实现备注。
|
|
367
|
-
- 多个 follow-up 必须按独立可验证切片拆开,并标明 `AFK` / `HITL`、blocked-by 和 owner。
|
|
368
|
-
- 已经问过或确认过的信息不能在 `needs-info` 里丢失;问题必须具体到 reporter 能直接补证据。
|
|
369
|
-
|
|
370
|
-
## Loop
|
|
371
|
-
|
|
372
|
-
1. 先锁定 ship 事实:当前分支、base branch、PR 状态、requirement 状态。
|
|
373
|
-
2. 调用 `cc-simplify`,清理重复、坏味道、低效实现;如果因此改了代码,回 `cc-check`。
|
|
374
|
-
3. 运行项目单测;失败就修,修完回 `cc-check`。
|
|
375
|
-
4. 按协调器 recipe 执行 e2e;如果 recipe 允许 skip,记录 skip 理由;如果失败并修复,回 `cc-check`。
|
|
376
|
-
5. 先把 `change-meta.json.spec.syncStatus` 从 `planned/verified` 推进到 `synced`,并正式回写 capability spec 与 `devflow/specs/INDEX.md`;只在 spec truth 更新后继续交付材料。
|
|
377
|
-
6. 只使用 `cc-check` 已经证明过的事实写交付材料,不编故事,不补脑。
|
|
378
|
-
7. 同步文档:
|
|
379
|
-
- 结构变了,更新对应目录的 `CLAUDE.md`
|
|
380
|
-
- 用户可感知行为变了,更新 `README.md` / `handoff/release-note.md`
|
|
381
|
-
- handoff 变了,更新 `handoff/resume-index.md`
|
|
382
|
-
8. 执行 documentation release audit:保护 changelog,检查 discoverability,记录 doc sync 结果。
|
|
383
|
-
9. 生成 `handoff/pr-brief.md`,把需求、变更、验证证据、风险、文档同步状态一次写清。
|
|
384
|
-
- 优先运行 `scripts/sync-act-docs.sh --dir <requirement-dir>`
|
|
385
|
-
- 再运行 `scripts/render-pr-brief.sh --dir <requirement-dir>`
|
|
386
|
-
10. 执行分支集成动作:
|
|
387
|
-
- `create-pr`:按 `references/git-commit-guidelines.md` 完成提交并推分支,再优先使用 `gh pr create` 创建 PR / MR
|
|
388
|
-
- detached HEAD 且远端可用时,先运行 `scripts/ensure-ship-branch.sh --dir <requirement-dir>`;创建分支成功后,不再停在 `local-handoff`
|
|
389
|
-
- `update-pr`:如果有新提交,先按 `references/git-commit-guidelines.md` 完成 commit / push,再刷新 PR / MR body,不沿用陈旧内容
|
|
390
|
-
- `local-handoff`:不假装已经发出,只生成可接手材料
|
|
391
|
-
- `post-merge-closeout`:跳过 PR,完成发布与闭环回写
|
|
392
|
-
11. 处理 PR / MR body:从当前 `pr-brief.md`、最新验证、review、doc sync、TODO/backlog 结果重新渲染,不复用旧 body。
|
|
393
|
-
12. 在 `handoff/pr-brief.md` 写入 readiness dashboard 与 PR body accuracy check;已有 PR body 与当前事实不一致时先刷新再继续。
|
|
394
|
-
13. 回写 `devflow/roadmap.json` 并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`:
|
|
395
|
-
- 新发现的 follow-up
|
|
396
|
-
- 被推迟但必须保留的事项
|
|
397
|
-
- 因本次结果而改变优先级的事项
|
|
398
|
-
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。
|
|
399
|
-
15. 如果 ship mode 是 `post-merge-closeout`,归档不是建议而是 exit gate:运行 `cc-devflow archive-change <change-key>` 将已完成变更移入 `devflow/changes/archive/YYYY-MM/`,然后用 `cc-devflow list-archived` 或文件路径确认归档成功。
|
|
400
|
-
16. 只有在归档会丢失未合并证据、用户明确要求保留 active change、或 archive target 已冲突时,才允许跳过;跳过必须在 handoff 写 `ArchiveSkip`、原因、受影响路径、以及精确 retry command。
|
|
401
|
-
|
|
402
|
-
## Output
|
|
403
|
-
|
|
404
|
-
- `handoff/pr-brief.md`
|
|
405
|
-
- `handoff/release-note.md`(需要对外发布时)
|
|
406
|
-
- 更新后的 `handoff/resume-index.md`
|
|
407
|
-
- 同步后的 `CLAUDE.md` / README / 架构文档
|
|
408
|
-
- 必要时更新后的 `devflow/roadmap.json` / `devflow/ROADMAP.md` / `devflow/BACKLOG.md`
|
|
409
|
-
- 单测 / e2e 的通过证据,或明确记录的 skip / blocker
|
|
410
|
-
- 必要时创建或更新的 PR / MR
|
|
411
|
-
- PR / MR body 中按 `Output language` 生成的 Summary/摘要、Problem/问题、Changes/变更、Validation/验证、Review/Gate Evidence、Risk/Rollback、Docs/Writeback、Follow-ups
|
|
412
|
-
- readiness dashboard 和 PR body accuracy check
|
|
413
|
-
- `post-merge-closeout` 的 archive path,或显式 `ArchiveSkip` blocker
|
|
414
|
-
|
|
415
|
-
## Good Output
|
|
416
|
-
|
|
417
|
-
一个好的 `cc-act` 结果应该让 reviewer 或下一位接手者不用追问:
|
|
418
|
-
|
|
419
|
-
- 这次到底选了哪种 ship 模式,为什么不是另外三种
|
|
420
|
-
- 哪些材料已经准备好,哪些刻意不需要
|
|
421
|
-
- 现在谁都可以顺着 `handoff/pr-brief.md` 或 `handoff/resume-index.md` 继续往前走
|
|
422
|
-
- 文档、PR 描述、release note 说的是同一套现实
|
|
423
|
-
- `cc-simplify`、单测、e2e、commit/push 的结果都能被接手者追溯
|
|
424
|
-
- source RM 的 status、REQ/FIX 绑定、progress 和 follow-up 已经和 ship 现实一致
|
|
75
|
+
- `create-pr`: feature branch 可推送且没有现有 PR。
|
|
76
|
+
- `update-pr`: 已有 PR,需要更新提交或 body。
|
|
77
|
+
- `local-handoff`: 不推远端,但本地 commit 和下一步清楚。
|
|
78
|
+
- `post-merge-closeout`: 已合并后的验证、归档、尸检。
|
|
425
79
|
|
|
426
|
-
##
|
|
80
|
+
## PR Brief
|
|
427
81
|
|
|
428
|
-
-
|
|
429
|
-
- 契约:`references/closure-contract.md`
|
|
430
|
-
- 模板:`assets/PR_BRIEF_TEMPLATE.md`
|
|
431
|
-
- 模板:`assets/RELEASE_NOTE_TEMPLATE.md`
|
|
432
|
-
- 提交规范:`references/git-commit-guidelines.md`
|
|
433
|
-
- 状态摘要:`scripts/generate-status-report.sh`
|
|
434
|
-
- Gate 校验:`scripts/verify-act-gate.sh`
|
|
435
|
-
- Ship 目标识别:`scripts/detect-ship-target.sh`
|
|
436
|
-
- detached HEAD 分支锚定:`scripts/ensure-ship-branch.sh`
|
|
437
|
-
- 文档同步:`scripts/sync-act-docs.sh`
|
|
438
|
-
- PR 简报生成:`scripts/render-pr-brief.sh`
|
|
439
|
-
- 变更归档:`scripts/archive-change.sh`
|
|
440
|
-
- Roadmap 定位:`../cc-roadmap/scripts/locate-roadmap-item.sh`
|
|
441
|
-
- Roadmap 回写:`../cc-roadmap/scripts/sync-roadmap-progress.sh`
|
|
82
|
+
`pr-brief.md` 只服务 PR / handoff,内容来自当前 Git diff、commits、`task.md` 和验证命令。不要继承旧 PR body;每次创建或更新 PR 前重建。
|
|
442
83
|
|
|
443
|
-
##
|
|
84
|
+
## Postmortem
|
|
444
85
|
|
|
445
|
-
|
|
446
|
-
2. 没有新鲜证据的完成结论,不准进入交付材料。
|
|
447
|
-
3. 交付材料只总结现实,不重写历史。
|
|
448
|
-
4. 文档必须与最终代码和 ship 状态同构。
|
|
449
|
-
5. 分支决策必须明确属于 4 种模式之一,不要含糊。
|
|
450
|
-
6. 已存在 PR / MR 时,优先更新,不重复创建。
|
|
451
|
-
7. `cc-simplify`、单测、e2e 任何一步只要导致代码变化或验证口径变化,必须回 `cc-check`。
|
|
452
|
-
8. `devflow/roadmap.json` 只回写真正改变优先级或产生 follow-up 的事项,并用 `sync-roadmap-progress.sh` 重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`,不写噪音。
|
|
453
|
-
9. `local-handoff` 不是偷懒模式,它仍然必须让下一位接手者知道做什么、怎么验证、卡在哪。
|
|
454
|
-
10. `create-pr` / `update-pr` 模式默认要求提交历史符合 `references/git-commit-guidelines.md`,并完成正确的 push、PR 创建或更新动作。
|
|
455
|
-
11. detached HEAD 不是小问题停下来的理由;当用户目标是继续或提交远程 PR,先创建命名分支并重跑验证,再推进 `create-pr`。
|
|
456
|
-
12. CHANGELOG 只能基于当前 diff / commit history / release truth 更新,不允许覆盖既有历史条目。
|
|
457
|
-
13. PR / MR body 每次都从当前事实重建,不沿用旧 body 或旧测试输出。
|
|
458
|
-
14. Verification 每次执行 `cc-act` 都必须重新运行;只有已完成且可证明幂等的动作可以跳过。
|
|
459
|
-
15. source RM 找不到时不能编造新 RM;写 no-op reason。如果 follow-up 改变阶段顺序或优先级,reroute 到 `cc-roadmap`。
|
|
86
|
+
只在这些情况写 incident postmortem:
|
|
460
87
|
|
|
461
|
-
|
|
88
|
+
1. change key 是 `FIX-*`。
|
|
89
|
+
2. 暴露重复 AI、流程、测试、release、Git 或架构错误。
|
|
90
|
+
3. 用户明确要求记录教训。
|
|
462
91
|
|
|
463
|
-
|
|
464
|
-
- ship 模式已明确并执行到位
|
|
465
|
-
- reviewer / maintainer 能直接接手
|
|
466
|
-
- 需要同步的文档已经同步
|
|
467
|
-
- `cc-simplify`、单测、e2e 已执行完毕,或 skip / blocker 已被明确记录
|
|
468
|
-
- source RM 已回写最新进度,follow-up 已回写到正确的 backlog / roadmap 位置
|
|
469
|
-
- 下一轮该怎么继续已经写清楚
|
|
470
|
-
- requirement 不是“看起来结束”,而是真正闭环
|
|
92
|
+
尸检报告必须基于 Git 证据和验证命令。不要把教训拆成额外原则文件。
|
|
471
93
|
|
|
472
|
-
##
|
|
94
|
+
## Commit Rule
|
|
473
95
|
|
|
474
|
-
|
|
475
|
-
- 不拿旧测试输出冒充当前事实
|
|
476
|
-
- 不跳过 `cc-simplify`、单测、e2e 却声称 ready
|
|
477
|
-
- 不重复创建 PR / MR
|
|
478
|
-
- 不让 handoff 只停留在口头描述
|
|
479
|
-
- 不留“下次再说”的关键空洞
|
|
480
|
-
- 不在 `cc-act` 阶段继续偷偷开发新范围
|
|
96
|
+
PDCA / IDCA 每个阶段或执行环境完成后都提交 Git commit。Git history 是过程记录,不再用过程文件模拟状态机。
|
|
481
97
|
|
|
482
|
-
##
|
|
98
|
+
## Exit
|
|
483
99
|
|
|
484
|
-
|
|
485
|
-
- 变更记录:`CHANGELOG.md`
|
|
486
|
-
- 收尾契约:`references/closure-contract.md`
|
|
487
|
-
- 提交规范:`references/git-commit-guidelines.md`
|
|
100
|
+
最终响应说明 commit、验证、PR 或本地 handoff 状态,以及是否写了 incident postmortem。
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
## How To Search
|
|
4
4
|
|
|
5
|
-
Start here, then open only the incident files whose tags or failure class match
|
|
6
|
-
the current work.
|
|
7
|
-
|
|
8
5
|
```bash
|
|
9
6
|
rg -n "<capability|module|error|failure-class|model-risk>" devflow/postmortems
|
|
10
7
|
```
|
|
@@ -17,14 +14,6 @@ rg -n "<capability|module|error|failure-class|model-risk>" devflow/postmortems
|
|
|
17
14
|
|
|
18
15
|
## Recurring Patterns
|
|
19
16
|
|
|
20
|
-
| Pattern | Count | Last seen |
|
|
17
|
+
| Pattern | Count | Last seen | Incident |
|
|
21
18
|
| --- | ---: | --- | --- |
|
|
22
|
-
| | 0 | | `
|
|
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.
|
|
19
|
+
| | 0 | | `incidents/<date>-<change-key>.md` |
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
- Modules:
|
|
22
22
|
- Failure class:
|
|
23
23
|
- Model-risk tags:
|
|
24
|
-
- Related principles:
|
|
25
24
|
|
|
26
25
|
## Prevention Summary
|
|
27
26
|
|
|
@@ -93,11 +92,4 @@
|
|
|
93
92
|
|
|
94
93
|
| Type | Action | Owner | Target |
|
|
95
94
|
| --- | --- | --- | --- |
|
|
96
|
-
| root-cause-fix / detection / docs / backlog
|
|
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
|
|
95
|
+
| root-cause-fix / detection / docs / backlog | | | |
|