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,25 +1,24 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-pr-land
|
|
3
|
-
version: 1.
|
|
4
|
-
description: Use in a separate session to land
|
|
3
|
+
version: 1.1.0
|
|
4
|
+
description: Use in a separate session to land reviewed GitHub PRs into main with review-first, rebase-first discipline.
|
|
5
5
|
triggers:
|
|
6
6
|
- 合并这个 PR
|
|
7
7
|
- 单独会话合并 PR
|
|
8
8
|
- land this PR
|
|
9
9
|
- merge reviewed PRs
|
|
10
|
-
- review and land open PRs
|
|
11
|
-
- rebase PRs onto main
|
|
12
10
|
reads:
|
|
13
11
|
- ../cc-pr-review/SKILL.md
|
|
14
12
|
- ../cc-review/SKILL.md
|
|
15
13
|
- ../cc-check/SKILL.md
|
|
16
14
|
- GitHub pull requests
|
|
17
|
-
- devflow/changes/<change-key>/
|
|
15
|
+
- devflow/changes/<change-key>/task.md
|
|
16
|
+
- devflow/changes/<change-key>/handoff/pr-brief.md
|
|
18
17
|
writes:
|
|
19
18
|
- path: GitHub pull request head branch
|
|
20
19
|
durability: remote
|
|
21
20
|
required: false
|
|
22
|
-
when:
|
|
21
|
+
when: rebase or conflict fixes must be pushed
|
|
23
22
|
- path: origin/main
|
|
24
23
|
durability: remote
|
|
25
24
|
required: true
|
|
@@ -29,34 +28,22 @@ effects:
|
|
|
29
28
|
- rebase-first mainline integration
|
|
30
29
|
- local and remote main parity proof
|
|
31
30
|
entry_gate:
|
|
32
|
-
- Fetch live GitHub PR truth; do not rely on stale
|
|
33
|
-
- Require prior review
|
|
34
|
-
-
|
|
35
|
-
- Rebase onto the evolving integration mainline, not stale origin/main.
|
|
31
|
+
- Fetch live GitHub PR truth; do not rely on stale refs.
|
|
32
|
+
- Require prior review or perform a review pass before landing.
|
|
33
|
+
- Rebase onto the evolving integration mainline.
|
|
36
34
|
- Stop when conflict resolution would require product intent guessing.
|
|
37
35
|
exit_criteria:
|
|
38
36
|
- Each landed PR was reviewed before landing and re-reviewed after material rebase or conflict resolution.
|
|
39
|
-
- Requirement shrinkage
|
|
40
|
-
- Remote main, local main, and
|
|
41
|
-
-
|
|
42
|
-
- Temporary branches or integration worktrees created by cc-pr-land are cleaned up or reported.
|
|
37
|
+
- Requirement shrinkage is rejected or ruled out.
|
|
38
|
+
- Remote main, local main, and active main worktree parity are verified.
|
|
39
|
+
- No process file is created for landing state.
|
|
43
40
|
reroutes:
|
|
44
41
|
- when: The PR has unreviewed implementation risk or stale review evidence.
|
|
45
42
|
target: cc-pr-review
|
|
46
43
|
- when: Conflict resolution reveals missing implementation or broken requirements.
|
|
47
44
|
target: cc-dev
|
|
48
|
-
- when: Mainline parity cannot be proven
|
|
45
|
+
- when: Mainline parity cannot be proven.
|
|
49
46
|
target: stop
|
|
50
|
-
recovery_modes:
|
|
51
|
-
- name: queue-changed
|
|
52
|
-
when: The live open PR set changes during landing.
|
|
53
|
-
action: Stop, refresh the queue, and recalculate the landing order before continuing.
|
|
54
|
-
- name: requirement-shrinkage-risk
|
|
55
|
-
when: A conflict resolution makes the PR smaller or removes user-facing behavior, tests, or docs.
|
|
56
|
-
action: Re-review the resolved diff and stop for user decision if intent is unclear.
|
|
57
|
-
- name: parity-failure
|
|
58
|
-
when: local main, active main worktree, and origin/main do not match after landing.
|
|
59
|
-
action: Diagnose without force reset; preserve local work and repair through fetch/rebase/ff-only sync.
|
|
60
47
|
tool_budget:
|
|
61
48
|
read_files: 12
|
|
62
49
|
search_steps: 8
|
|
@@ -65,93 +52,6 @@ tool_budget:
|
|
|
65
52
|
|
|
66
53
|
# CC-PR-Land
|
|
67
54
|
|
|
68
|
-
|
|
55
|
+
Land reviewed PRs. Do not implement new feature scope.
|
|
69
56
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
`cc-pr-land` 是远程 PR 的落主干入口。它回答:
|
|
73
|
-
|
|
74
|
-
```text
|
|
75
|
-
这些已经 review 的 PR 是否可以线性落到 main,并证明本地远程一致?
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
它不做新需求开发。发现需要新代码,回 `cc-dev`。
|
|
79
|
-
|
|
80
|
-
## Read First
|
|
81
|
-
|
|
82
|
-
1. Live GitHub PR truth
|
|
83
|
-
2. `../cc-pr-review/SKILL.md`
|
|
84
|
-
3. `../cc-review/SKILL.md`
|
|
85
|
-
4. `../cc-check/SKILL.md`
|
|
86
|
-
5. Linked change artifacts when available
|
|
87
|
-
|
|
88
|
-
## Use This Skill When
|
|
89
|
-
|
|
90
|
-
- 一个或多个 PR 已 review,准备合并。
|
|
91
|
-
- 用户要求 review-first / rebase-first 落主干。
|
|
92
|
-
- 用户要求清空 open PR 队列并证明 main parity。
|
|
93
|
-
|
|
94
|
-
如果 PR 还没 review,先去 `cc-pr-review`。
|
|
95
|
-
|
|
96
|
-
## Harness Contract
|
|
97
|
-
|
|
98
|
-
- Allowed actions: refresh PR truth, verify prior review, rebase PR branches, resolve conflicts, re-review resolved diffs, push cleaned PR heads, fast-forward main, verify parity, and clean temporary integration state.
|
|
99
|
-
- Forbidden actions: implement new feature scope, silently drop requirements, force-push main, rely on stale PR refs, or declare parity without remote proof.
|
|
100
|
-
- Required evidence: PR list, review status, commit ranges, conflict resolutions, validation commands, remote main SHA, local main SHA, and active main worktree SHA when available.
|
|
101
|
-
- Reroute rule: unreviewed PRs go to `cc-pr-review`; requirement or implementation gaps go to `cc-dev`; unavailable GitHub truth stops landing.
|
|
102
|
-
|
|
103
|
-
## Landing Order
|
|
104
|
-
|
|
105
|
-
1. Fetch live PR truth.
|
|
106
|
-
2. Record PR number, title, head, base, review state, checks, and linked change.
|
|
107
|
-
3. For each PR:
|
|
108
|
-
- confirm review exists or run/re-route to `cc-pr-review`
|
|
109
|
-
- separate true PR commits from base drift
|
|
110
|
-
- rebase onto the evolving integration mainline
|
|
111
|
-
- resolve conflicts without shrinking requirements
|
|
112
|
-
- re-review if the rebase or conflict resolution changed behavior
|
|
113
|
-
- push cleaned PR head with `--force-with-lease` when the PR branch changed
|
|
114
|
-
- fast-forward the integration branch
|
|
115
|
-
4. Validate integrated result.
|
|
116
|
-
5. Push or fast-forward main.
|
|
117
|
-
6. Verify parity.
|
|
118
|
-
7. Clean temporary state.
|
|
119
|
-
|
|
120
|
-
## Conflict Rule
|
|
121
|
-
|
|
122
|
-
Conflict resolution is not a place to redesign the product.
|
|
123
|
-
|
|
124
|
-
After every conflict:
|
|
125
|
-
|
|
126
|
-
- compare before vs after intent
|
|
127
|
-
- check tests and docs were not silently dropped
|
|
128
|
-
- rerun targeted verification
|
|
129
|
-
- re-review resolved files
|
|
130
|
-
|
|
131
|
-
If you cannot distinguish better upstream implementation from accidental requirement loss, stop and ask.
|
|
132
|
-
|
|
133
|
-
## Parity Proof
|
|
134
|
-
|
|
135
|
-
Do not declare done until these are true or explicitly blocked:
|
|
136
|
-
|
|
137
|
-
```text
|
|
138
|
-
origin/main SHA: <sha>
|
|
139
|
-
local main SHA: <sha>
|
|
140
|
-
active main worktree SHA: <sha or not-applicable>
|
|
141
|
-
open PR queue: <empty or remaining list>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
Use ff-only sync. Do not force reset user work.
|
|
145
|
-
|
|
146
|
-
## Output
|
|
147
|
-
|
|
148
|
-
Report:
|
|
149
|
-
|
|
150
|
-
- PRs landed
|
|
151
|
-
- PRs skipped and why
|
|
152
|
-
- review evidence used
|
|
153
|
-
- conflicts and requirement-shrinkage verdict
|
|
154
|
-
- validation commands
|
|
155
|
-
- final remote/local main SHA
|
|
156
|
-
- open PR queue state
|
|
157
|
-
- cleanup actions
|
|
57
|
+
Evidence lives in GitHub, Git history, command output, and final response. Do not create local process files for landing state.
|
|
@@ -1,57 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-pr-review
|
|
3
|
-
version: 1.
|
|
4
|
-
description: Use in a separate session to review one remote GitHub PR before landing. It
|
|
3
|
+
version: 1.1.1
|
|
4
|
+
description: Use in a separate session to review one remote GitHub PR before landing. It reports findings from PR truth and current diff without writing process files.
|
|
5
5
|
triggers:
|
|
6
6
|
- review 这个 PR
|
|
7
7
|
- 单独会话 review PR
|
|
8
|
-
- 审这个远程 PR
|
|
9
8
|
- review remote PR
|
|
10
9
|
- pre-landing PR review
|
|
11
|
-
- check this PR before merge
|
|
12
10
|
reads:
|
|
13
11
|
- ../cc-review/SKILL.md
|
|
14
12
|
- ../cc-check/SKILL.md
|
|
15
13
|
- GitHub pull request
|
|
16
|
-
- devflow/changes/<change-key>/
|
|
14
|
+
- devflow/changes/<change-key>/task.md
|
|
15
|
+
- devflow/changes/<change-key>/handoff/pr-brief.md
|
|
17
16
|
writes:
|
|
18
|
-
- path: devflow/changes/<change-key>/review/cc-pr-review.md
|
|
19
|
-
durability: durable
|
|
20
|
-
required: false
|
|
21
|
-
when: the PR maps to a local cc-devflow change
|
|
22
17
|
- path: GitHub pull request comments or review
|
|
23
18
|
durability: remote
|
|
24
19
|
required: false
|
|
25
20
|
when: remote review feedback is posted
|
|
26
21
|
effects:
|
|
27
|
-
- remote PR review
|
|
22
|
+
- remote PR review
|
|
28
23
|
- finding triage
|
|
29
24
|
- fix or landing recommendation
|
|
30
25
|
entry_gate:
|
|
31
26
|
- Freeze PR title, body, commits, head branch, base branch, checks, linked issues, and current diff from GitHub.
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- Build a review packet before producing findings.
|
|
35
|
-
- Do not merge, push main, or mark the PR landed.
|
|
27
|
+
- Read local `task.md` and `pr-brief.md` when the PR links to a change key.
|
|
28
|
+
- Do not merge, push main, or write local process files.
|
|
36
29
|
exit_criteria:
|
|
37
|
-
- Review result is
|
|
38
|
-
- Findings cite concrete PR diff,
|
|
39
|
-
-
|
|
40
|
-
- No
|
|
30
|
+
- Review result is approved-for-landing, changes-requested, needs-clarification, or blocked.
|
|
31
|
+
- Findings cite concrete PR diff, command output, checks, local task facts, or missing evidence.
|
|
32
|
+
- Required fixes route back to cc-dev or cc-do; clean PRs route to cc-pr-land.
|
|
33
|
+
- No local process file is created.
|
|
41
34
|
reroutes:
|
|
42
35
|
- when: Required fixes are inside the PR implementation scope.
|
|
43
36
|
target: cc-dev
|
|
44
37
|
- when: The PR is clean and ready to land.
|
|
45
38
|
target: cc-pr-land
|
|
46
|
-
- when: The review needs deeper local
|
|
39
|
+
- when: The review needs deeper local diff review.
|
|
47
40
|
target: cc-review
|
|
48
|
-
recovery_modes:
|
|
49
|
-
- name: stale-pr-refresh
|
|
50
|
-
when: PR head, checks, comments, or base branch changed during review.
|
|
51
|
-
action: Refresh GitHub PR truth and rebuild the review packet before continuing.
|
|
52
|
-
- name: base-drift-confusion
|
|
53
|
-
when: The raw PR diff appears to delete or rewrite unrelated base work.
|
|
54
|
-
action: Use commit and cherry inspection to separate true PR changes from stale-base perspective.
|
|
55
41
|
tool_budget:
|
|
56
42
|
read_files: 10
|
|
57
43
|
search_steps: 6
|
|
@@ -60,83 +46,14 @@ tool_budget:
|
|
|
60
46
|
|
|
61
47
|
# CC-PR-Review
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Role
|
|
66
|
-
|
|
67
|
-
`cc-pr-review` 是远程 PR 的独立审查入口。它回答:
|
|
68
|
-
|
|
69
|
-
```text
|
|
70
|
-
这个 PR 是否可以交给 cc-pr-land 合并?
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
它只 review,不合并。
|
|
74
|
-
|
|
75
|
-
## Read First
|
|
76
|
-
|
|
77
|
-
1. GitHub PR snapshot
|
|
78
|
-
2. `../cc-review/SKILL.md`
|
|
79
|
-
3. `../cc-check/SKILL.md`
|
|
80
|
-
4. Linked `devflow/changes/<change-key>/` artifacts when available
|
|
81
|
-
|
|
82
|
-
## Use This Skill When
|
|
83
|
-
|
|
84
|
-
- PR 已经由 `cc-dev` 创建或更新。
|
|
85
|
-
- 用户想在独立会话 review PR。
|
|
86
|
-
- 合并前需要证明 diff、测试、门禁和需求没有漂移。
|
|
87
|
-
|
|
88
|
-
如果用户要求合并,进入 `cc-pr-land`,不要把 review 和 landing 混成一个动作。
|
|
89
|
-
|
|
90
|
-
## Harness Contract
|
|
91
|
-
|
|
92
|
-
- Allowed actions: fetch PR truth, build review packet, inspect diffs/artifacts/checks, run safe verification, dispatch read-only reviewers when available, record review findings, and recommend fix or landing.
|
|
93
|
-
- Forbidden actions: merge PRs, push main, rewrite unrelated PR scope, or accept findings without evidence.
|
|
94
|
-
- Required evidence: every accepted finding must cite PR diff, local artifact, command output, check result, issue/PR text, or explicit missing evidence.
|
|
95
|
-
- Reroute rule: required implementation fixes go back to `cc-dev` or `cc-do`; clean PRs go to `cc-pr-land`.
|
|
49
|
+
Review remote PR reality. Do not merge.
|
|
96
50
|
|
|
97
|
-
|
|
51
|
+
Build the review from:
|
|
98
52
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```text
|
|
102
|
-
PR Review Packet
|
|
103
|
-
- PR: #<number> <title>
|
|
104
|
-
- Base/head: <base> <- <head>
|
|
105
|
-
- Intended behavior: <from PR body, issue, commits, artifacts>
|
|
106
|
-
- Must remain unchanged: <known invariants>
|
|
107
|
-
- True PR commits: <commit range>
|
|
108
|
-
- Drift ruled out: <yes/no and evidence>
|
|
109
|
-
- Checks: <latest status>
|
|
110
|
-
- Local artifacts: <change key and report-card if found>
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Review Lanes
|
|
114
|
-
|
|
115
|
-
Use `cc-review` methods. For broad diffs, cover:
|
|
116
|
-
|
|
117
|
-
- intent and regression
|
|
118
|
-
- security and privacy
|
|
119
|
-
- performance and reliability
|
|
120
|
-
- contracts and coverage
|
|
121
|
-
|
|
122
|
-
Small diffs may combine lanes, but the report must state what was covered or skipped.
|
|
123
|
-
|
|
124
|
-
## Verdicts
|
|
125
|
-
|
|
126
|
-
- `approved-for-landing`: no blocking findings; route to `cc-pr-land`.
|
|
127
|
-
- `changes-requested`: PR needs fixes; route to `cc-dev` or `cc-do`.
|
|
128
|
-
- `needs-clarification`: product intent or requirement shrinkage is unclear.
|
|
129
|
-
- `blocked`: GitHub, auth, checks, dependencies, or local artifacts are unavailable.
|
|
130
|
-
|
|
131
|
-
## Output
|
|
132
|
-
|
|
133
|
-
Report:
|
|
134
|
-
|
|
135
|
-
- PR number and URL
|
|
136
|
-
- review packet summary
|
|
137
|
-
- lanes covered or skipped
|
|
138
|
-
- accepted findings
|
|
139
|
-
- rejected or downgraded raw findings when reviewers were used
|
|
53
|
+
- live PR metadata
|
|
54
|
+
- true PR commits
|
|
140
55
|
- latest checks
|
|
141
|
-
-
|
|
142
|
-
-
|
|
56
|
+
- PR diff
|
|
57
|
+
- `task.md` and `handoff/pr-brief.md` when available
|
|
58
|
+
|
|
59
|
+
Output findings in the response or GitHub review only. Do not write local process files.
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# CC-Review Changelog
|
|
2
2
|
|
|
3
|
+
## 2.1.2 - 2026-05-13
|
|
4
|
+
|
|
5
|
+
- remove `no-op` routing from review output and use `stop` for clean/no-action endings
|
|
6
|
+
- simplify review persistence language to a single no-process-files rule
|
|
7
|
+
|
|
8
|
+
## 2.1.1 - 2026-05-13
|
|
9
|
+
|
|
10
|
+
- compress default output to findings, blocking questions, residual risk, and route
|
|
11
|
+
- explicitly keep review output in the response or GitHub review only
|
|
12
|
+
- forbid JSON/JSONL/Markdown review process files in the output contract
|
|
13
|
+
|
|
14
|
+
## 2.0.1 - 2026-05-13
|
|
15
|
+
|
|
16
|
+
- require the shared `resolve-cc-devflow.sh` CLI resolver before writing review lifecycle events
|
|
17
|
+
- make missing `review` CLI capability a blocker instead of allowing manual ledger or report-card substitutes
|
|
18
|
+
- update review command examples to call `bash "$DEVFLOW" review ...`
|
|
19
|
+
|
|
3
20
|
## 2.0.0 - 2026-05-13
|
|
4
21
|
|
|
5
22
|
- break default review output away from Markdown plan/report files and make `review-ledger.jsonl` the required durable record
|
|
@@ -1,88 +1,19 @@
|
|
|
1
1
|
# CC-Review Playbook
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## State Machine
|
|
4
4
|
|
|
5
|
-
`cc-plan / cc-investigate -> cc-review -> cc-plan | cc-do`
|
|
6
|
-
|
|
7
|
-
`cc-do -> cc-review -> cc-do | cc-check`
|
|
8
|
-
|
|
9
|
-
- Enter from: a complex plan, investigated bug, implementation diff, review comment, or user request for deep review.
|
|
10
|
-
- Stay in: `cc-review` until the branch type, scope, findings, plugin/E2E evidence needs, and next route are explicit.
|
|
11
|
-
- Exit to: `cc-plan` for broken plan contracts, `cc-do` for implementation fixes, or `cc-check` for fresh verification.
|
|
12
|
-
- Reroute to: `cc-act` only if `cc-check` is already fresh and clean.
|
|
5
|
+
`cc-plan / cc-investigate / cc-do / PR -> cc-review -> cc-plan | cc-do | cc-check | cc-act | stop`
|
|
13
6
|
|
|
14
7
|
## Core Rules
|
|
15
8
|
|
|
16
|
-
1. 先判断 review
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
21
|
-
6.
|
|
22
|
-
7.
|
|
23
|
-
8.
|
|
24
|
-
9. `cc-check` 是证据验收,`cc-review` 是深度诊断,两者不要混成一个门。
|
|
25
|
-
10. 计划分支按 strategy / design / engineering / DX 选择节点,不把所有方法一次塞进上下文,但不能因为渐进加载而跳过未审节点。
|
|
26
|
-
11. 实现分支先读 diff 和意图,再读周边代码;每个 changed surface 都要 checked、skipped 或 blocked。
|
|
27
|
-
12. UI 或运行时链路有风险时,必须用 Browser / Computer Use / CLI / logs 做端到端证明或写清阻塞原因。
|
|
28
|
-
13. 每个坏味道必须有 evidence、scope、recommendation 和 route。
|
|
29
|
-
14. 没有证据就写 unknown,不准把审美判断伪装成缺陷。
|
|
30
|
-
15. 不允许固定只列 3 个问题;finding 数量由节点遍历和证据决定。
|
|
31
|
-
16. 输出前必须聚合 raw findings:合并重复,降级弱证据,拒收 speculative / out-of-scope / stale findings。
|
|
32
|
-
17. 发现计划合同错误,回 `cc-plan`;发现代码错误,回 `cc-do`;只差验收,进 `cc-check`。
|
|
33
|
-
18. 输出必须落到 `review/review-ledger.jsonl`,必要时补 `review/review-findings.json` / `review/review-agent-results.jsonl`;Markdown 报告只通过 `cc-devflow review render` 按需生成。
|
|
34
|
-
|
|
35
|
-
## Required Outputs
|
|
36
|
-
|
|
37
|
-
- `review/review-ledger.jsonl`
|
|
38
|
-
- `review/review-agent-results.jsonl` when subagent reviewers are used
|
|
39
|
-
- `review/review-findings.json` when later agents need structured findings
|
|
40
|
-
|
|
41
|
-
## Local Kit
|
|
42
|
-
|
|
43
|
-
- `references/review-methods.md`: TOC / logic tree / smells / severity rules
|
|
44
|
-
- `references/plan-review-branch.md`: plan-stage deep review
|
|
45
|
-
- `references/implementation-review-branch.md`: diff and code-stage deep review
|
|
46
|
-
- `references/e2e-and-plugin-verification.md`: Browser / Computer Use / logs evidence
|
|
47
|
-
- `scripts/collect-review-context.sh`: git delta and prior-review state helper
|
|
48
|
-
|
|
49
|
-
## Stateful Review Plan
|
|
50
|
-
|
|
51
|
-
`review-started` ledger event 必须至少包含:
|
|
52
|
-
|
|
53
|
-
- review mode:plan / implementation / mixed
|
|
54
|
-
- previous review state:上次 report、ledger、findings 是否存在
|
|
55
|
-
- delta:本次相对哪个 SHA、哪些文件、哪些 artifacts 变了
|
|
56
|
-
- selected tools:CEO/strategy、engineering、design、DX、TOC、code smell、cc-simplify、E2E/plugin/logs
|
|
57
|
-
- skipped tools:为什么不需要
|
|
58
|
-
- reviewer dispatch:哪些节点交给 subAgent、哪些主线程执行、为什么
|
|
59
|
-
- risk lanes:implementation / mixed review 是否覆盖 intent-regression、security-privacy、performance-reliability、contracts-coverage
|
|
60
|
-
- node list:`R001`、`R002` ...,每个节点有 target、method、owner、evidence source、status
|
|
61
|
-
|
|
62
|
-
Review 过程中每完成一个节点,就用 `cc-devflow review record-node` 追加一条 ledger;不要等最后一次性补记。
|
|
63
|
-
|
|
64
|
-
## SubAgent Review
|
|
65
|
-
|
|
66
|
-
触发 `cc-review` 本身就授权只读 reviewer subAgent。主线程不要为了“再确认是否能用 subAgent”打断用户。
|
|
67
|
-
|
|
68
|
-
调度规则:
|
|
69
|
-
|
|
70
|
-
- 大范围 / 多文件 / 多 facet review:至少尝试两个独立 reviewer。
|
|
71
|
-
- 小范围 review:至少尝试一个 combined reviewer,除非 `review-ledger.jsonl` 写明不需要。
|
|
72
|
-
- Plan 节点可分配 strategy、engineering、design、DX、TOC reviewer。
|
|
73
|
-
- Implementation 节点可分配 contract、smell、test、runtime reviewer。
|
|
74
|
-
- 复杂 implementation 节点优先按四类风险 lane 派发 reviewer:intent/regression、security/privacy、performance/reliability、contracts/coverage。
|
|
75
|
-
- Codex 环境优先用 `explorer`;ClaudeCode 环境用可用的 `Task` / subAgent。
|
|
76
|
-
- reviewer 只读,不编辑文件,不改计划,不直接决定最终 route。
|
|
77
|
-
- reviewer 的上下文应独立,只给 review packet,不给完整聊天历史。
|
|
78
|
-
- 主线程负责合并、验证、去重和降级 false positive。
|
|
79
|
-
|
|
80
|
-
如果没有 subAgent 工具,报告必须写:
|
|
81
|
-
|
|
82
|
-
```text
|
|
83
|
-
Agents used: no (subagent tool unavailable)
|
|
84
|
-
Fallback: main-thread node-by-node review
|
|
85
|
-
```
|
|
9
|
+
1. 先判断 review 对象是计划、实现、PR,还是混合。
|
|
10
|
+
2. 只读当前范围需要的 `task.md`、PR 文本、diff、代码、测试、日志和运行证据。
|
|
11
|
+
3. 不读取、不生成、不维护过程文件。
|
|
12
|
+
4. Git history 是唯一持久 review 记忆;重复 review 时用 `git diff <old>...HEAD` 缩小范围。
|
|
13
|
+
5. 可用 subagent 时可以派发只读 reviewer;raw output 留在会话里,主线程验证后再进入最终 findings。
|
|
14
|
+
6. 不固定 finding 数量。证据决定输出。
|
|
15
|
+
7. 每条 finding 必须有 evidence、impact、recommendation 和 route。
|
|
16
|
+
8. 发现计划合同错误,回 `cc-plan`;发现代码错误,回 `cc-do`;只差验收,进 `cc-check`。
|
|
86
17
|
|
|
87
18
|
## Review Standard
|
|
88
19
|
|
|
@@ -90,17 +21,13 @@ Fallback: main-thread node-by-node review
|
|
|
90
21
|
|
|
91
22
|
- 这次 Review 的对象是什么?
|
|
92
23
|
- 当前 scope 的真实意图是什么?
|
|
93
|
-
-
|
|
24
|
+
- 现有代码或计划解决了哪些子问题?
|
|
94
25
|
- 哪些设计约束会让实现变脆?
|
|
95
26
|
- 哪些代码坏味道在当前 blast radius 内?
|
|
96
27
|
- 哪些测试、日志、UI 操作或端到端证据缺失?
|
|
97
28
|
- 哪些 finding 必须修,哪些可以 defer,哪些只是 advisory?
|
|
98
|
-
-
|
|
99
|
-
- 哪些节点没有审,为什么 skip 或 blocked?
|
|
100
|
-
- 哪些 reviewer 被派发,哪些 findings 被接受、合并、降级或拒绝?
|
|
101
|
-
- 四类风险 lane 哪些覆盖了,哪些因为 scope 小或工具不可用而跳过?
|
|
102
|
-
- 下一步为什么是 `cc-plan` / `cc-do` / `cc-check`?
|
|
29
|
+
- 下一步为什么是 `cc-plan` / `cc-do` / `cc-check` / `cc-act` / `stop`?
|
|
103
30
|
|
|
104
31
|
## Decision Rule
|
|
105
32
|
|
|
106
|
-
一个 finding 如果会改变范围、架构、用户可见行为、公共 API、测试策略或超过机械局部清理,必须进入用户决策队列或 reroute 到上游 skill
|
|
33
|
+
一个 finding 如果会改变范围、架构、用户可见行为、公共 API、测试策略或超过机械局部清理,必须进入用户决策队列或 reroute 到上游 skill。机械且低风险的问题可以作为 `cc-do` 的明确修复项,但 `cc-review` 自身不偷偷改代码。
|