cc-devflow 4.5.10 → 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 +23 -0
- package/.claude/skills/cc-act/PLAYBOOK.md +17 -269
- package/.claude/skills/cc-act/SKILL.md +38 -418
- 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 +24 -0
- package/.claude/skills/cc-check/PLAYBOOK.md +19 -273
- package/.claude/skills/cc-check/SKILL.md +33 -454
- package/.claude/skills/cc-check/references/review-contract.md +12 -147
- package/.claude/skills/cc-dev/CHANGELOG.md +20 -0
- package/.claude/skills/cc-dev/PLAYBOOK.md +1 -1
- package/.claude/skills/cc-dev/SKILL.md +52 -130
- package/.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh +181 -0
- package/.claude/skills/cc-do/CHANGELOG.md +17 -0
- package/.claude/skills/cc-do/PLAYBOOK.md +19 -113
- package/.claude/skills/cc-do/SKILL.md +39 -236
- 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 +23 -0
- package/.claude/skills/cc-investigate/PLAYBOOK.md +20 -180
- package/.claude/skills/cc-investigate/SKILL.md +65 -513
- package/.claude/skills/cc-investigate/assets/TASKS_TEMPLATE.md +48 -95
- package/.claude/skills/cc-investigate/references/investigation-contract.md +14 -217
- 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 +29 -0
- package/.claude/skills/cc-plan/PLAYBOOK.md +22 -161
- package/.claude/skills/cc-plan/SKILL.md +47 -640
- package/.claude/skills/cc-plan/assets/TASKS_TEMPLATE.md +30 -225
- package/.claude/skills/cc-plan/references/planning-contract.md +24 -160
- 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 +27 -0
- package/README.md +5 -3
- package/README.zh-CN.md +5 -3
- 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 -14
- 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 -36
- package/docs/guides/getting-started.md +8 -7
- package/docs/guides/getting-started.zh-CN.md +8 -7
- package/docs/guides/minimize-artifacts.md +16 -116
- 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 +109 -0
- 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 +5 -7
- 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 -225
- package/.claude/skills/cc-plan/assets/TASK_MANIFEST_TEMPLATE.json +0 -179
- 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 -783
- 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 -524
- 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 -187
- package/lib/skill-runtime/team-state.js +0 -122
- package/lib/skill-runtime/workflow-context.js +0 -748
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
set -euo pipefail
|
|
4
4
|
|
|
5
|
-
# ------------------------------------------------------------
|
|
6
|
-
# cc-act: 校验 Check 阶段是否真的闭合
|
|
7
|
-
# ------------------------------------------------------------
|
|
8
|
-
|
|
9
5
|
usage() {
|
|
10
6
|
cat <<'EOF'
|
|
11
7
|
Usage: verify-act-gate.sh --dir path/to/change
|
|
@@ -28,58 +24,22 @@ fi
|
|
|
28
24
|
|
|
29
25
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
30
26
|
source "$script_dir/cc-act-common.sh"
|
|
31
|
-
CHANGE_DIR="$(req_act_change_dir "$REQ_DIR")"
|
|
32
|
-
report_card="$(req_act_report_path "$CHANGE_DIR")"
|
|
33
|
-
tasks_file="$(req_act_tasks_path "$CHANGE_DIR")"
|
|
34
|
-
|
|
35
|
-
[[ -f "$report_card" ]] || { echo "Gate open: missing report-card.json" >&2; exit 1; }
|
|
36
27
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
spec_sync_ready="$(jq -r '.specSyncReady // false' "$report_card" 2>/dev/null || echo false)"
|
|
40
|
-
evidence_count="$(jq -r '((.evidence // []) + (.claimEvidence // []) + (.quickGates // []) + (.strictGates // [])) | length' "$report_card" 2>/dev/null || echo 0)"
|
|
41
|
-
gap_count="$(jq -r '(.gaps // []) | length' "$report_card" 2>/dev/null || echo 0)"
|
|
42
|
-
review_freshness="$(jq -r '.review.freshness.status // "unknown"' "$report_card" 2>/dev/null || echo unknown)"
|
|
43
|
-
failure_ownership_open="$(jq -r '
|
|
44
|
-
(.runtime.failureOwnership? // [])
|
|
45
|
-
| map(select(((.classification? // "") | IN("in-branch", "ambiguous")) and ((.status? // "open") | IN("open", "pending"))))
|
|
46
|
-
| length
|
|
47
|
-
' "$report_card" 2>/dev/null || echo 0)"
|
|
48
|
-
coverage_status="$(jq -r '.qa.coverageAudit.status // "unknown"' "$report_card" 2>/dev/null || echo unknown)"
|
|
49
|
-
browser_status="$(jq -r '.qa.browserEvidence.status // "unknown"' "$report_card" 2>/dev/null || echo unknown)"
|
|
50
|
-
feedback_loop_status="$(jq -r '.qa.feedbackLoop.status // "skipped"' "$report_card" 2>/dev/null || echo skipped)"
|
|
51
|
-
behavior_evidence_status="$(jq -r '.qa.behaviorEvidence.status // "skipped"' "$report_card" 2>/dev/null || echo skipped)"
|
|
28
|
+
change_dir="$(req_act_change_dir "$REQ_DIR")"
|
|
29
|
+
task_file="$(req_act_tasks_path "$change_dir")"
|
|
52
30
|
|
|
53
|
-
|
|
54
|
-
if [[ -f "$tasks_file" ]]; then
|
|
55
|
-
remaining_tasks="$(awk '/^- \[ \]/{c++} END{print c+0}' "$tasks_file" 2>/dev/null || echo 0)"
|
|
56
|
-
fi
|
|
31
|
+
[[ -f "$task_file" ]] || { echo "Gate open: missing task.md" >&2; exit 1; }
|
|
57
32
|
|
|
58
|
-
|
|
59
|
-
[[ "$reroute" == "none" ]] || { echo "Gate open: reroute=$reroute" >&2; exit 1; }
|
|
60
|
-
[[ "$spec_sync_ready" == "true" ]] || { echo "Gate open: spec_sync_ready=$spec_sync_ready" >&2; exit 1; }
|
|
61
|
-
[[ "$evidence_count" -gt 0 ]] || { echo "Gate open: evidence is empty" >&2; exit 1; }
|
|
62
|
-
[[ "$gap_count" -eq 0 ]] || { echo "Gate open: gaps=$gap_count" >&2; exit 1; }
|
|
63
|
-
[[ "$review_freshness" == "fresh" || "$review_freshness" == "not-applicable" ]] || { echo "Gate open: review_freshness=$review_freshness" >&2; exit 1; }
|
|
64
|
-
[[ "$failure_ownership_open" -eq 0 ]] || { echo "Gate open: failure_ownership_open=$failure_ownership_open" >&2; exit 1; }
|
|
65
|
-
[[ "$coverage_status" != "blocked" && "$coverage_status" != "fail" && "$coverage_status" != "pending" ]] || { echo "Gate open: coverage_status=$coverage_status" >&2; exit 1; }
|
|
66
|
-
[[ "$browser_status" != "blocked" && "$browser_status" != "fail" && "$browser_status" != "pending" ]] || { echo "Gate open: browser_status=$browser_status" >&2; exit 1; }
|
|
67
|
-
[[ "$feedback_loop_status" != "blocked" && "$feedback_loop_status" != "fail" && "$feedback_loop_status" != "pending" ]] || { echo "Gate open: feedback_loop_status=$feedback_loop_status" >&2; exit 1; }
|
|
68
|
-
[[ "$behavior_evidence_status" != "blocked" && "$behavior_evidence_status" != "fail" && "$behavior_evidence_status" != "pending" ]] || { echo "Gate open: behavior_evidence_status=$behavior_evidence_status" >&2; exit 1; }
|
|
33
|
+
remaining_tasks="$(awk '/^- \[ \]/{c++} END{print c+0}' "$task_file" 2>/dev/null || echo 0)"
|
|
69
34
|
[[ "$remaining_tasks" -eq 0 ]] || { echo "Gate open: remaining_tasks=$remaining_tasks" >&2; exit 1; }
|
|
70
35
|
|
|
36
|
+
if ! git diff --quiet -- "$task_file" 2>/dev/null; then
|
|
37
|
+
echo "Gate open: task.md has unstaged or uncommitted edits" >&2
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
|
|
71
41
|
cat <<EOF
|
|
72
42
|
GATE=closed
|
|
73
|
-
|
|
74
|
-
REROUTE=$reroute
|
|
75
|
-
SPEC_SYNC_READY=$spec_sync_ready
|
|
76
|
-
EVIDENCE_COUNT=$evidence_count
|
|
77
|
-
GAP_COUNT=$gap_count
|
|
78
|
-
REVIEW_FRESHNESS=$review_freshness
|
|
79
|
-
FAILURE_OWNERSHIP_OPEN=$failure_ownership_open
|
|
80
|
-
COVERAGE_STATUS=$coverage_status
|
|
81
|
-
BROWSER_STATUS=$browser_status
|
|
82
|
-
FEEDBACK_LOOP_STATUS=$feedback_loop_status
|
|
83
|
-
BEHAVIOR_EVIDENCE_STATUS=$behavior_evidence_status
|
|
43
|
+
TASK_FILE=$task_file
|
|
84
44
|
REMAINING_TASKS=$remaining_tasks
|
|
85
45
|
EOF
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# CC-Check Skill Changelog
|
|
2
2
|
|
|
3
|
+
## v1.12.1 - 2026-05-13
|
|
4
|
+
|
|
5
|
+
- compress the visible output contract to `Verdict / Evidence / Review / Route`
|
|
6
|
+
- explicitly forbid `review/report-card.json`, JSON, Markdown reports, and other process files
|
|
7
|
+
- keep review and reroute conclusions in the current response instead of durable process documents
|
|
8
|
+
|
|
9
|
+
## v1.11.4 - 2026-05-13
|
|
10
|
+
|
|
11
|
+
- require the shared `resolve-cc-devflow.sh` CLI resolver before reading workflow context or review truth
|
|
12
|
+
- block verification when the available CLI cannot prove `query workflow-context` and `review` support
|
|
13
|
+
- forbid replacing missing review truth or report-card generation with simulated adapter output or handwritten artifacts
|
|
14
|
+
|
|
15
|
+
## v1.11.3 - 2026-05-13
|
|
16
|
+
|
|
17
|
+
- make `review/report-card.json` script-owned: agents must regenerate it through `scripts/render-report-card.js` and validate it with `scripts/verify-gate.sh`
|
|
18
|
+
- forbid direct manual edits to report-card fields such as timestamp, summary, QA/browser evidence, UAT, claim evidence, or reroute
|
|
19
|
+
- route unsupported evidence shapes back into renderer/schema changes instead of allowing one-off JSON patching
|
|
20
|
+
|
|
21
|
+
## v1.11.2 - 2026-05-13
|
|
22
|
+
|
|
23
|
+
- internalize verification operating rules so conflicting proof sources must be resolved explicitly instead of averaged
|
|
24
|
+
- block `pass` when gates are skipped, evidence is stale, ownership is ambiguous, or tests prove implementation shape instead of user intent
|
|
25
|
+
- retarget investigated bug verification to `planning/tasks.md#Root Cause Contract`
|
|
26
|
+
|
|
3
27
|
## v1.11.1 - 2026-05-13
|
|
4
28
|
|
|
5
29
|
- treat `passed`, `done`, `completed`, and `verified` task statuses as complete when rendering the `requirements-met` claim evidence
|
|
@@ -1,285 +1,31 @@
|
|
|
1
1
|
# CC-Check Playbook
|
|
2
2
|
|
|
3
|
-
## Iron Law
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
NO PASS WITHOUT FRESH EVIDENCE
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
只要 gate、review、spec truth 里任一层没有本轮新鲜证据,`pass` 就不成立。
|
|
10
|
-
|
|
11
3
|
## Visible State Machine
|
|
12
4
|
|
|
13
|
-
`cc-do -> cc-check -> cc-act`
|
|
14
|
-
|
|
15
|
-
- Enter from: closed implementation work with fresh runtime evidence.
|
|
16
|
-
- Stay in: `cc-check` while verdict is being rebuilt from current commands and review proof.
|
|
17
|
-
- Exit to: `cc-act` only when the verdict is `pass` with `reroute=none`.
|
|
18
|
-
- Reroute to: `cc-do` for code fixes, `cc-investigate` for root-cause invalidation, or `cc-plan` for design invalidation.
|
|
19
|
-
|
|
20
|
-
## First Verdict Test
|
|
21
|
-
|
|
22
|
-
开始前只问 3 件事:
|
|
23
|
-
|
|
24
|
-
1. 我手里有没有本次新鲜证据?
|
|
25
|
-
2. 这些证据是在证明失败,还是只是在暴露缺件?
|
|
26
|
-
3. 如果现在不能 `pass`,下一步应该回 `cc-do`、`cc-investigate` 还是 `cc-plan`?
|
|
27
|
-
|
|
28
|
-
先答完这三题,再跑完整 gate;不要一边验证一边发明 verdict。
|
|
29
|
-
|
|
30
|
-
## Four Verification Phases
|
|
31
|
-
|
|
32
|
-
1. **Reset Contract**
|
|
33
|
-
- 重新读取 `planning/design.md` 或 `planning/analysis.md`
|
|
34
|
-
- 重新读取 `planning/tasks.md`、`planning/task-manifest.json`
|
|
35
|
-
- 按 `review-findings.json` -> `review-ledger.jsonl` -> legacy `cc-review-report.md` 的顺序读取 review truth
|
|
36
|
-
- 明确本轮验收对象和 spec delta
|
|
37
|
-
2. **Re-run Reality**
|
|
38
|
-
- 重新跑 gate
|
|
39
|
-
- 读取退出码、关键输出、skip 原因
|
|
40
|
-
3. **Check Every Boundary**
|
|
41
|
-
- runtime gate
|
|
42
|
-
- task review proof
|
|
43
|
-
- requirement diff review
|
|
44
|
-
- claim evidence matrix
|
|
45
|
-
- QA feedback loop and behavior evidence
|
|
46
|
-
- QA regression / test-quality proof
|
|
47
|
-
- QA coverage and browser evidence
|
|
48
|
-
- review freshness and finding confidence
|
|
49
|
-
- failure ownership
|
|
50
|
-
- spec sync readiness
|
|
51
|
-
4. **Freeze Verdict**
|
|
52
|
-
- 只允许 `pass` / `fail` / `blocked`
|
|
53
|
-
- 只允许诚实 reroute
|
|
54
|
-
|
|
55
|
-
## Gate Function
|
|
56
|
-
|
|
57
|
-
在宣称任何“完成、通过、ready”之前,必须做 4 件事:
|
|
58
|
-
|
|
59
|
-
1. 找到证明这个结论的命令
|
|
60
|
-
2. 重新运行完整命令
|
|
61
|
-
3. 读取真实输出和退出码
|
|
62
|
-
4. 把证据写进 `report-card.json`
|
|
63
|
-
5. 把任务级 review 与需求级 diff review 分开写清楚
|
|
64
|
-
6. 把每个成功声明映射到 `claimEvidence[]`
|
|
65
|
-
7. 行为变更必须补 `qa` 证据或例外理由
|
|
66
|
-
8. 失败输出必须写入 `runtime.failureOwnership[]`
|
|
67
|
-
9. failure ownership 必须包含 named error、artifact refs 和 rescue action
|
|
68
|
-
10. human UAT 必须 pass、fail、blocked 或带 skip reason;失败不能被测试绿灯覆盖
|
|
69
|
-
|
|
70
|
-
## Verification Layers
|
|
71
|
-
|
|
72
|
-
1. Runtime reality
|
|
73
|
-
2. Task review proof
|
|
74
|
-
3. Requirement diff truth
|
|
75
|
-
4. Claim evidence matrix
|
|
76
|
-
5. QA feedback loop and behavior evidence
|
|
77
|
-
6. QA regression and test quality
|
|
78
|
-
7. QA coverage and browser evidence
|
|
79
|
-
8. Review freshness and confidence calibration
|
|
80
|
-
9. Failure ownership
|
|
81
|
-
10. Spec alignment and sync readiness
|
|
82
|
-
11. Human UAT
|
|
83
|
-
12. Named runtime errors and rescue actions
|
|
84
|
-
|
|
85
|
-
## Claim Evidence Matrix
|
|
86
|
-
|
|
87
|
-
每个“通过”声明都要回答:这条声明由哪条命令或 artifact 证明?
|
|
88
|
-
|
|
89
|
-
- `tests-pass`:本轮 test command、exit 0、0 failures
|
|
90
|
-
- `lint-clean` / `typecheck-clean` / `build-succeeds`:对应 gate 的本轮输出
|
|
91
|
-
- `bug-fixed`:原始症状或回归测试通过
|
|
92
|
-
- `regression-test-works`:red -> green 证据,而不是只绿一次
|
|
93
|
-
- `requirements-met`:逐项 plan / manifest checklist
|
|
94
|
-
- `agent-completed`:VCS diff 或 artifact 证明实际变化
|
|
95
|
-
|
|
96
|
-
缺少必要 claim 的证据时,verdict 至少是 `blocked`。不要把没有证据的 claim 写进 summary。
|
|
97
|
-
|
|
98
|
-
## Requirement Diff Review
|
|
99
|
-
|
|
100
|
-
需求级 review 至少分 5 步:
|
|
101
|
-
|
|
102
|
-
1. `base truth`:确认 base branch、当前 branch、PR 状态。
|
|
103
|
-
2. `plan completion`:逐项核对 tasks / manifest 是否真的由 diff 或 runtime proof 兑现。
|
|
104
|
-
3. `scope drift`:识别多做、少做、做偏。
|
|
105
|
-
4. `critical pass`:检查数据安全、并发、shell、LLM trust boundary、枚举覆盖、静默失败、文档漂移。
|
|
106
|
-
5. `adversarial synthesis`:合并外部 review / codex / subagent /人工 finding,去重并标置信度。
|
|
107
|
-
6. `specialist facets`:按风险记录 testing / security / performance / api-contract / data-migration / design 等审查面;没有覆盖必须写 skip reason。
|
|
108
|
-
7. `freshness`:确认 review 对应当前 head;review 后新增 commit 时不能继续拿旧审查支撑 `pass`。
|
|
109
|
-
|
|
110
|
-
这些结论进入 `review.diffReview`,不能只写在口头总结里。
|
|
111
|
-
|
|
112
|
-
每层 review 都要带 `reviewPacket`:`baseSha`、`headSha`、`requirements`、`implemented`、`reviewerContext`。缺少审查范围时,review 不能支撑 `pass`。
|
|
113
|
-
|
|
114
|
-
review 还要带 `freshness`:`status`、`reviewedCommit`、`currentCommit`、`commitsSinceReview`、`staleReason`。`status=stale` 或缺失 freshness 时,`pass` 不成立。
|
|
115
|
-
|
|
116
|
-
每条 finding 都要带 `triageStatus`:
|
|
117
|
-
|
|
118
|
-
- `accepted-fixed`
|
|
119
|
-
- `rejected-with-evidence`
|
|
120
|
-
- `deferred-minor`
|
|
121
|
-
- `clarification-needed`
|
|
122
|
-
|
|
123
|
-
`critical` / `important` finding 未闭环或仍是 `clarification-needed`,不能进入 `cc-act`。
|
|
124
|
-
|
|
125
|
-
每条 finding 还要带 `confidenceScore`、`fingerprint`、`displayTier`、`suppressionReason`。低置信 finding 只能作为 warning 或 gap,不能伪装成 blocking fact。
|
|
126
|
-
|
|
127
|
-
## QA Test Quality
|
|
128
|
-
|
|
129
|
-
行为变化、bugfix、边界条件、用户可见流程必须补 `qa`:
|
|
130
|
-
|
|
131
|
-
- `feedbackLoop`:用什么 loop 证明现实,速度、确定性、信号锋利度、复现率如何
|
|
132
|
-
- `behaviorEvidence`:用户边界、expected / actual、复现步骤、稳定性、领域语言
|
|
133
|
-
- `regressionProof`:red command、red failure reason、green command、是否恢复最终状态
|
|
134
|
-
- `testQuality`:是否经公共接口验证真实行为、mock 是否只停在系统边界、是否存在 test-only production API
|
|
135
|
-
- `architectureFollowUps`:没有正确 test seam 时记录 seam / hidden coupling / shallow module 的后续改造
|
|
136
|
-
- `tddException`:纯配置、生成文件、throwaway prototype 等例外和替代验证
|
|
137
|
-
- `coverageAudit`:覆盖率、codepath / user-flow map、缺口、是否需要 e2e / eval、测试质量星级
|
|
138
|
-
- `browserEvidence`:UI / 用户路径变更的 affected routes、截图、console、health score、issues,或明确 skip reason
|
|
139
|
-
|
|
140
|
-
测试只绿过一次,不能证明 regression test 有效;断言 mock 本身,不能证明真实行为。没有可信反馈环时,`pass` 不成立。
|
|
141
|
-
|
|
142
|
-
## Failure Ownership
|
|
143
|
-
|
|
144
|
-
失败要先归属,再下结论:
|
|
145
|
-
|
|
146
|
-
- `in-branch`:当前分支引入,默认回 `cc-do`
|
|
147
|
-
- `pre-existing`:base branch 也存在,必须有复验证据
|
|
148
|
-
- `environment`:依赖、权限、服务、密钥、平台缺失,通常是 `blocked`
|
|
149
|
-
- `ambiguous`:无法证明归属,默认不能 `pass`
|
|
150
|
-
|
|
151
|
-
不要把环境红灯、基线红灯、本分支红灯混成一句“测试失败”。
|
|
152
|
-
|
|
153
|
-
## Verdict
|
|
154
|
-
|
|
155
|
-
只允许 3 种结论:
|
|
156
|
-
|
|
157
|
-
- `pass`
|
|
158
|
-
- `fail`
|
|
159
|
-
- `blocked`
|
|
160
|
-
|
|
161
|
-
速判规则:
|
|
162
|
-
|
|
163
|
-
1. 命令或 review 明确失败 => `fail`
|
|
164
|
-
2. 条件缺失、证据不足、review 缺件 => `blocked`
|
|
165
|
-
3. 只有当 gate 和 review 都过,才是 `pass`
|
|
166
|
-
|
|
167
|
-
如果已经证明根因故事失效,别用 `blocked` 糊过去,直接 reroute 到 `cc-investigate`。
|
|
168
|
-
|
|
169
|
-
## Minimum `report-card.json`
|
|
170
|
-
|
|
171
|
-
```json
|
|
172
|
-
{
|
|
173
|
-
"changeId": "REQ-123",
|
|
174
|
-
"verdict": "pass",
|
|
175
|
-
"overall": "pass",
|
|
176
|
-
"summary": "one-line reality",
|
|
177
|
-
"claimEvidence": [],
|
|
178
|
-
"runtime": {
|
|
179
|
-
"status": "pass",
|
|
180
|
-
"failureOwnership": []
|
|
181
|
-
},
|
|
182
|
-
"qa": {
|
|
183
|
-
"status": "pass",
|
|
184
|
-
"feedbackLoop": {
|
|
185
|
-
"status": "pass",
|
|
186
|
-
"mode": "targeted-test",
|
|
187
|
-
"commandOrArtifact": "npm test -- src/feature/feature.test.ts",
|
|
188
|
-
"speed": "fast",
|
|
189
|
-
"determinism": "high",
|
|
190
|
-
"signalSharpness": "fails only when the target behavior is absent",
|
|
191
|
-
"reproductionRate": "1/1",
|
|
192
|
-
"attempts": [],
|
|
193
|
-
"blockedReason": ""
|
|
194
|
-
},
|
|
195
|
-
"behaviorEvidence": {
|
|
196
|
-
"status": "pass",
|
|
197
|
-
"userFacingBoundary": "feature action",
|
|
198
|
-
"expectedBehavior": "the user-visible behavior succeeds",
|
|
199
|
-
"actualBehavior": "verified by targeted test",
|
|
200
|
-
"reproductionSteps": [],
|
|
201
|
-
"consistency": "deterministic",
|
|
202
|
-
"domainLanguage": []
|
|
203
|
-
},
|
|
204
|
-
"regressionProof": [],
|
|
205
|
-
"testQuality": [],
|
|
206
|
-
"coverageAudit": {
|
|
207
|
-
"status": "pass",
|
|
208
|
-
"coveragePct": 80,
|
|
209
|
-
"pathMap": [],
|
|
210
|
-
"gaps": [],
|
|
211
|
-
"testsAdded": [],
|
|
212
|
-
"e2eRequired": false,
|
|
213
|
-
"evalRequired": false,
|
|
214
|
-
"qualityStars": "★★"
|
|
215
|
-
},
|
|
216
|
-
"browserEvidence": {
|
|
217
|
-
"status": "skipped",
|
|
218
|
-
"mode": "not-applicable",
|
|
219
|
-
"affectedRoutes": [],
|
|
220
|
-
"screenshots": [],
|
|
221
|
-
"consoleErrors": [],
|
|
222
|
-
"healthScore": null,
|
|
223
|
-
"issues": [],
|
|
224
|
-
"skipReason": "not a UI or user-path change"
|
|
225
|
-
},
|
|
226
|
-
"architectureFollowUps": [],
|
|
227
|
-
"tddException": null
|
|
228
|
-
},
|
|
229
|
-
"quickGates": [],
|
|
230
|
-
"strictGates": [],
|
|
231
|
-
"review": {
|
|
232
|
-
"status": "pass",
|
|
233
|
-
"summary": "",
|
|
234
|
-
"details": "",
|
|
235
|
-
"freshness": { "status": "fresh", "reviewedCommit": "example-head", "currentCommit": "example-head", "commitsSinceReview": 0, "staleReason": "" },
|
|
236
|
-
"qualityScore": 9,
|
|
237
|
-
"specialistReviews": [],
|
|
238
|
-
"taskReviews": { "status": "pass", "required": true, "summary": "", "reviewers": [], "findings": [] },
|
|
239
|
-
"diffReview": { "status": "skipped", "required": false, "summary": "", "reviewers": [], "findings": [] },
|
|
240
|
-
"findings": []
|
|
241
|
-
},
|
|
242
|
-
"blockingFindings": [],
|
|
243
|
-
"reroute": "none",
|
|
244
|
-
"timestamp": "2026-04-15T12:00:00.000Z"
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
`reroute` 只能是 `none`、`cc-do`、`cc-investigate`、`cc-plan`。
|
|
249
|
-
|
|
250
|
-
## Reroute Rules
|
|
251
|
-
|
|
252
|
-
- 实现没做完、测试没过、review 提出明确修复项 => `cc-do`
|
|
253
|
-
- 根因站不住、复现链断了、当前修复只是症状补丁 => `cc-investigate`
|
|
254
|
-
- 范围错了、设计前提失效、当前计划已经不可信 => `cc-plan`
|
|
255
|
-
- 只有 `pass` 才能写 `none`
|
|
5
|
+
`cc-do -> cc-check -> cc-act | cc-do | cc-investigate | cc-plan`
|
|
256
6
|
|
|
257
|
-
##
|
|
7
|
+
## Core Rules
|
|
258
8
|
|
|
259
|
-
|
|
9
|
+
1. Fresh evidence or no pass.
|
|
10
|
+
2. Read `task.md`, current diff, and the smallest relevant source files.
|
|
11
|
+
3. Re-run commands; do not inherit green claims from chat.
|
|
12
|
+
4. Do not generate process files.
|
|
13
|
+
5. Separate missing evidence from proven failure.
|
|
14
|
+
6. Commit the completed Check stage when the environment finishes.
|
|
260
15
|
|
|
261
|
-
|
|
262
|
-
- “测试绿了,review 应该也没问题”
|
|
263
|
-
- “先给 blocked,省得解释 reroute”
|
|
264
|
-
- “manifest proof 以后再补”
|
|
265
|
-
- “spec truth 应该没漂”
|
|
16
|
+
## Verdict Shape
|
|
266
17
|
|
|
267
|
-
|
|
18
|
+
- `pass`: all required behavior and quality claims have fresh evidence.
|
|
19
|
+
- `fail`: a command, review, or behavior check proves a defect.
|
|
20
|
+
- `blocked`: required evidence, dependency, auth, input, or environment is unavailable.
|
|
268
21
|
|
|
269
|
-
|
|
270
|
-
- `scripts/run-quality-gates.sh` 跑真实命令
|
|
271
|
-
- `scripts/render-report-card.js` 根据 gate 结果、review 结果和 manifest 生成 `report-card.json`
|
|
272
|
-
- `scripts/verify-gate.sh` 检查证据和文件是否齐全
|
|
273
|
-
- `references/review-contract.md` 说明任务级 / 需求级审查责任边界
|
|
22
|
+
## Required Output
|
|
274
23
|
|
|
275
|
-
|
|
24
|
+
Short response only:
|
|
276
25
|
|
|
277
|
-
|
|
26
|
+
- Verdict: `pass` / `fail` / `blocked`
|
|
27
|
+
- Evidence: commands, exit status, and proven claims
|
|
28
|
+
- Review: clean, findings remain, or not reviewed
|
|
29
|
+
- Route: `cc-act` / `cc-do` / `cc-investigate` / `cc-plan` / `stop`
|
|
278
30
|
|
|
279
|
-
|
|
280
|
-
2. `blockingFindings` 是不是具体到可行动?
|
|
281
|
-
3. `reroute` 是不是和失败类型一致?
|
|
282
|
-
4. `review.status` 是真实现实,还是我脑补的绿色?
|
|
283
|
-
5. 如果把这份 `report-card.json` 给下一位接手者,他知道接下来去哪吗?
|
|
284
|
-
6. diff review 是否同时覆盖了 plan completion、scope drift、critical pass、doc staleness?
|
|
285
|
-
7. feedback loop 是否真的证明了用户描述的行为,而不是只证明附近代码能跑?
|
|
31
|
+
Do not write process files.
|