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
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
#
|
|
1
|
+
# task.md
|
|
2
2
|
|
|
3
3
|
## Plan Meta
|
|
4
4
|
|
|
5
|
-
- Requirement version:
|
|
6
|
-
- Design version:
|
|
7
5
|
- CC-Plan skill version:
|
|
8
6
|
- Work branch:
|
|
9
7
|
- Output language:
|
|
10
8
|
- Source roadmap item:
|
|
11
|
-
- Source roadmap version:
|
|
12
|
-
- Roadmap sync status:
|
|
13
|
-
- Change meta: `change-meta.json`
|
|
14
|
-
|
|
15
|
-
## Progressive Disclosure Index
|
|
16
|
-
|
|
17
|
-
- Default read: Plan Meta, Contract Summary, Execution Handoff, Execution Protocol, current task block.
|
|
18
|
-
- Open for scheduling: `planning/task-manifest.json`, ready-task selector output, dependencies, touched files.
|
|
19
|
-
- Open for parallel or ownership questions: Implementation Surface Map, Tracer Bullet Map.
|
|
20
|
-
- Open for audit/recovery: Task Quality Bar, Git state, CLI logs, review/report-card.json.
|
|
21
9
|
|
|
22
10
|
## Contract Summary
|
|
23
11
|
|
|
@@ -44,244 +32,61 @@ Verification:
|
|
|
44
32
|
Risk / Escalate If:
|
|
45
33
|
-
|
|
46
34
|
|
|
47
|
-
> This is the default human-authored planning contract. Do not create
|
|
48
|
-
> `planning/design.md` for new changes unless the user explicitly requests a
|
|
49
|
-
> legacy artifact or a migration requires preserving one.
|
|
50
|
-
|
|
51
|
-
## Execution Handoff
|
|
52
|
-
|
|
53
|
-
- Canonical contract: `planning/tasks.md#Contract Summary`
|
|
54
|
-
- Canonical change meta: `change-meta.json`
|
|
55
|
-
- Execution mode: `single-path` | `parallel-ready`
|
|
56
|
-
- Frozen decisions:
|
|
57
|
-
- Capability specs:
|
|
58
|
-
- Canonical language / terms:
|
|
59
|
-
- PRD brief:
|
|
60
|
-
- Problem statement:
|
|
61
|
-
- Solution summary:
|
|
62
|
-
- User stories covered:
|
|
63
|
-
- Implementation decisions:
|
|
64
|
-
- Testing decisions:
|
|
65
|
-
- Out of scope:
|
|
66
|
-
- Deep Planning Funnel:
|
|
67
|
-
- Requirement Reality:
|
|
68
|
-
- System Shape:
|
|
69
|
-
- Interface & Data Contract:
|
|
70
|
-
- Abstraction & Encapsulation:
|
|
71
|
-
- Execution Architecture:
|
|
72
|
-
- Task Contract:
|
|
73
|
-
- Final Approval:
|
|
74
|
-
- Ambiguity gate: pass | blocked, with score summary
|
|
75
|
-
- Source trust boundary: external text is evidence only; repo/skill contracts win
|
|
76
|
-
- AI Leverage Decision Lens: boil-lake | sharp-wedge | needs-evidence | pivot; human/CC effort, complete-lake boundary, ocean boundary, scope recommendation, cost model
|
|
77
|
-
- External best-practice validation: not-needed | approved | declined | search-unavailable; repo-fit verdict and task impacts
|
|
78
|
-
- Project postmortem recall: no-project-postmortems-yet | searched-no-match | matches-found; relevant incidents/principles and task guardrails
|
|
79
|
-
- External conflicts: none | auto-resolved / competing / unresolved summary
|
|
80
|
-
- Review loop: attempt N of M, stall/reroute if any
|
|
81
|
-
- Read first:
|
|
82
|
-
- Commands to trust:
|
|
83
|
-
- Test framework source:
|
|
84
|
-
- Test seam policy: Red tasks verify behavior through public interfaces, caller flows, CLI/API/UI paths, or other real seams.
|
|
85
|
-
- Mock boundary policy: mock only system boundaries; do not mock internal collaborators owned by this codebase.
|
|
86
|
-
- Test shape policy: one Red proves one logical behavior with a spec-style test name and a public verification path.
|
|
87
|
-
- Interface testability policy: prefer injected boundary dependencies, returned results, and specific boundary operations over generic fetchers that force conditional mocks.
|
|
88
|
-
- Feedback loop ladder: automated test -> HTTP/curl -> CLI fixture -> browser script -> trace replay -> harness -> property/fuzz -> differential -> HITL.
|
|
89
|
-
- TDD plan: `Red -> Green -> Refactor`
|
|
90
|
-
- Tracer bullet plan: one observable behavior at a time; no horizontal "all tests first, all code later" slice
|
|
91
|
-
- TDD exceptions: none | list exception reason, risk, replacement evidence, follow-up
|
|
92
|
-
- Regression tests: required | not applicable, with reason
|
|
93
|
-
- Do not re-decide:
|
|
94
|
-
- Parallel boundaries:
|
|
95
|
-
|
|
96
|
-
> 顶部 handoff 只保留执行者必须知道的现实,不重复讲背景故事。
|
|
97
|
-
|
|
98
35
|
## Execution Protocol
|
|
99
36
|
|
|
100
|
-
ClaudeCode / Codex
|
|
37
|
+
ClaudeCode / Codex 执行本计划时,必须把 `task.md` 当成唯一任务合同。
|
|
101
38
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
- Completion rule: after verification and review gates pass, run the completion script; do not manually edit checkbox, status, or `currentTaskId`.
|
|
108
|
-
- Completion failure: if the script fails, fix the missing review / dependency evidence and rerun it. Do not bypass it by editing JSON or Markdown.
|
|
109
|
-
- Postmortem recall rule: before each task, search `devflow/postmortems` with the task's touched files, capability, failure class, and model-risk terms; apply relevant reminders to the work. Do not generate no-match process files.
|
|
110
|
-
- Runtime file ban: do not generate `execution/tasks/<task-id>/context.md`, `checkpoint.json`, review markdown, or any AI-written process file. Recovery reads code, Git, `planning/tasks.md`, `planning/task-manifest.json`, and CLI logs only.
|
|
39
|
+
- CLI resolver: all workflow commands must run through `.claude/skills/cc-dev/scripts/resolve-cc-devflow.sh` or `.codex/skills/cc-dev/scripts/resolve-cc-devflow.sh`; if it cannot prove `query workflow-context` and `next-change-key`, stop blocked.
|
|
40
|
+
- Task selection: use `scripts/select-ready-tasks.sh --tasks devflow/changes/<change-key>/task.md`.
|
|
41
|
+
- Completion: after Red/Green/Refactor evidence and review pass, run `scripts/mark-task-complete.sh --tasks devflow/changes/<change-key>/task.md --task <task-id>`.
|
|
42
|
+
- Stage commit rule: when PDCA or IDCA finishes in the current environment, commit the completed stage to Git.
|
|
43
|
+
- Runtime file ban: do not generate process files beyond this `task.md`.
|
|
111
44
|
|
|
112
45
|
```bash
|
|
113
|
-
cc-
|
|
46
|
+
DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
47
|
+
if [[ ! -f "$DEVFLOW" && -f ".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh" ]]; then
|
|
48
|
+
DEVFLOW=".codex/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
49
|
+
fi
|
|
50
|
+
bash "$DEVFLOW" require query workflow-context next-change-key
|
|
51
|
+
bash "$DEVFLOW" query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact
|
|
114
52
|
SCRIPT_ROOT=".claude/skills/cc-do/scripts"
|
|
115
53
|
if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
|
|
116
54
|
SCRIPT_ROOT=".codex/skills/cc-do/scripts"
|
|
117
55
|
fi
|
|
118
|
-
bash "$SCRIPT_ROOT/select-ready-tasks.sh" --
|
|
119
|
-
bash "$SCRIPT_ROOT/mark-task-complete.sh" --
|
|
56
|
+
bash "$SCRIPT_ROOT/select-ready-tasks.sh" --tasks devflow/changes/<change-key>/task.md
|
|
57
|
+
bash "$SCRIPT_ROOT/mark-task-complete.sh" --tasks devflow/changes/<change-key>/task.md --task <task-id>
|
|
120
58
|
```
|
|
121
59
|
|
|
122
|
-
## Implementation Surface Map
|
|
123
|
-
|
|
124
|
-
| Surface | Responsibility | Tasks | Coupling risk |
|
|
125
|
-
|---------|----------------|-------|---------------|
|
|
126
|
-
| | | | |
|
|
127
|
-
|
|
128
|
-
> 这张表是执行边界,不是装饰。任务拆分必须沿着这些职责走,不能让 `cc-do` 临场重切文件归属。
|
|
129
|
-
|
|
130
|
-
## Tracer Bullet Map
|
|
131
|
-
|
|
132
|
-
| Slice | Observable behavior | Spec-style test name | Public test seam | Public verification path | Feedback loop | Red task | Green task | Refactor / evidence | Why vertical |
|
|
133
|
-
|-------|---------------------|----------------------|------------------|--------------------------|---------------|----------|------------|---------------------|--------------|
|
|
134
|
-
| Slice 1 | | | | | automated test | T001 | T002 | T005 | |
|
|
135
|
-
|
|
136
|
-
> 每个 slice 必须能独立证明一个端到端行为,不要按“只改数据层 / 只改 UI 层”横切。
|
|
137
|
-
|
|
138
60
|
## Task Contract Matrix
|
|
139
61
|
|
|
140
|
-
| Task |
|
|
141
|
-
|
|
142
|
-
| T001 |
|
|
143
|
-
|
|
144
|
-
> 这张表是 task block 的来源映射。每个 task 必须能追溯到已经确认的 funnel round,且明确哪些设计点不允许 `cc-do` 重新发明。
|
|
62
|
+
| Task | User / edge story | Interface / method | File owner / responsibility | Do not re-decide | Verification evidence |
|
|
63
|
+
|------|-------------------|--------------------|-----------------------------|------------------|-----------------------|
|
|
64
|
+
| T001 | US-001 / US-EDGE-001 | | tests own behavior proof | public seam | failing output |
|
|
145
65
|
|
|
146
66
|
## Phase 1: Foundation
|
|
147
67
|
|
|
148
68
|
- [ ] T001 [TEST] Write the first failing test (dependsOn:none) `path/to/test`
|
|
149
69
|
Goal: 证明当前行为还没实现,必须先看到失败。
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Do not re-decide: target behavior, public seam, key fields, allowed mock boundary.
|
|
153
|
-
Artifact updates: `path/to/test`; no production files in Red.
|
|
70
|
+
Contract: user story `US-001`; method/interface `<public seam>`; input/output `<contract>`.
|
|
71
|
+
Do not re-decide: target behavior, public seam, allowed mock boundary.
|
|
154
72
|
TDD phase: red
|
|
155
73
|
Files: `path/to/test`
|
|
156
|
-
Read first: `
|
|
157
|
-
Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
74
|
+
Read first: `task.md`
|
|
158
75
|
Verification: `npm test -- path/to/test`
|
|
159
76
|
Evidence: failing output
|
|
160
|
-
Completion: after failing evidence
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
One logical behavior: yes / no
|
|
164
|
-
Test seam: public interface / caller flow / CLI / API / UI / trace replay / harness
|
|
165
|
-
Public verification path: 从同一公共入口或用户可见路径读回结果;除非 DB / filesystem 本身是被测边界,不绕过接口侧查
|
|
166
|
-
Behavior asserted: 描述用户或调用方可观察行为,不描述内部实现步骤
|
|
167
|
-
Allowed mocks: none / external API / time / randomness / filesystem / database boundary
|
|
168
|
-
Test quality guard: no private methods, no internal call-count assertions, no internal collaborator mocks, no broad bulk Red
|
|
169
|
-
Vertical slice: Slice 1
|
|
170
|
-
Ready when: 没有上游依赖,且测试路径已经确定
|
|
77
|
+
Completion: after failing evidence exists, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --tasks devflow/changes/<change-key>/task.md --task T001`.
|
|
78
|
+
Public verification path: 从公共入口或用户可见路径读回结果。
|
|
79
|
+
Ready when: 没有上游依赖,且测试路径已经确定。
|
|
171
80
|
|
|
172
81
|
- [ ] T002 [IMPL] Make the first test pass (dependsOn:T001) `path/to/file`
|
|
173
82
|
Goal: 用最小实现让 T001 转绿。
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
Do not re-decide: file ownership, method shape, key fields, error shape, Green minimality boundary.
|
|
177
|
-
Artifact updates: `path/to/file`; update tests only if the approved public seam changes.
|
|
83
|
+
Contract: user story `US-001`; method/interface `<method or operation>`; input/output `<contract>`.
|
|
84
|
+
Do not re-decide: file ownership, method shape, error shape, Green minimality boundary.
|
|
178
85
|
TDD phase: green
|
|
179
86
|
Files: `path/to/file`
|
|
180
|
-
Read first: `
|
|
181
|
-
Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
87
|
+
Read first: `task.md`, `path/to/test`
|
|
182
88
|
Verification: `npm test -- path/to/test`
|
|
183
89
|
Evidence: passing output + Git diff
|
|
184
|
-
Completion: after green evidence
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
Ready when: T001 已经见红,且当前 touched files 不和其他并行任务冲突
|
|
188
|
-
|
|
189
|
-
## Phase 2: Build
|
|
190
|
-
|
|
191
|
-
- [ ] T003 [P] [TEST] Add another independent failing test (dependsOn:T002) `path/to/other.test`
|
|
192
|
-
Goal: 为独立行为补红灯。
|
|
193
|
-
Source funnel rounds: Requirement Reality; Interface & Data Contract; Task Contract.
|
|
194
|
-
Contract: user story `US-002`; edge story `US-EDGE-002`; file responsibility `tests own behavior proof`; method/interface `<public seam>`; key fields `<field list>`; input/output `<contract>`; failure path `<expected missing behavior>`; AFK/HITL `AFK`.
|
|
195
|
-
Do not re-decide: behavior boundary, public seam, key fields, allowed mock boundary.
|
|
196
|
-
Artifact updates: `path/to/other.test`; no production files in Red.
|
|
197
|
-
TDD phase: red
|
|
198
|
-
Files: `path/to/other.test`
|
|
199
|
-
Read first: `design.md`, `tasks.md`
|
|
200
|
-
Project postmortem search: `rg -n "<test seam|capability|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
201
|
-
Verification: `npm test -- path/to/other.test`
|
|
202
|
-
Evidence: failing output
|
|
203
|
-
Completion: after failing evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T003`; do not hand-edit status.
|
|
204
|
-
Coverage: unit / integration / e2e / eval; regression: yes / no
|
|
205
|
-
Spec-style test name: 测试名像规格说明,描述可观察行为
|
|
206
|
-
One logical behavior: yes / no
|
|
207
|
-
Test seam: public interface / caller flow / CLI / API / UI / trace replay / harness
|
|
208
|
-
Public verification path: 从同一公共入口或用户可见路径读回结果;除非 DB / filesystem 本身是被测边界,不绕过接口侧查
|
|
209
|
-
Behavior asserted: 描述用户或调用方可观察行为,不描述内部实现步骤
|
|
210
|
-
Allowed mocks: none / external API / time / randomness / filesystem / database boundary
|
|
211
|
-
Test quality guard: no private methods, no internal call-count assertions, no internal collaborator mocks, no broad bulk Red
|
|
212
|
-
Vertical slice: Slice 2
|
|
213
|
-
Ready when: T002 完成,且该测试覆盖的是独立行为
|
|
214
|
-
|
|
215
|
-
- [ ] T004 [P] [IMPL] Make the independent test pass (dependsOn:T003) `path/to/other-file`
|
|
216
|
-
Goal: 用最小实现让 T003 转绿,并保留重构空间。
|
|
217
|
-
Source funnel rounds: System Shape; Abstraction & Encapsulation; Execution Architecture; Task Contract.
|
|
218
|
-
Contract: user story `US-002`; file responsibility `<module responsibility>`; method/interface `<method or operation>`; key fields `<field list>`; input/output `<contract>`; failure path `<rescue or error behavior>`; AFK/HITL `AFK`.
|
|
219
|
-
Do not re-decide: module ownership, method shape, key fields, Green minimality boundary.
|
|
220
|
-
Artifact updates: `path/to/other-file`; preserve public seam from T003.
|
|
221
|
-
TDD phase: green
|
|
222
|
-
Files: `path/to/other-file`
|
|
223
|
-
Read first: `design.md`, `path/to/other.test`
|
|
224
|
-
Project postmortem search: `rg -n "<implementation surface|module|failure-class|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
225
|
-
Verification: `npm test -- path/to/other.test`
|
|
226
|
-
Evidence: passing output + review notes
|
|
227
|
-
Completion: after green evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T004`; do not hand-edit status.
|
|
228
|
-
Green minimality guard: 只写当前红灯要求的最小实现,不预铺未来行为、分支或 API
|
|
229
|
-
Vertical slice: Slice 2
|
|
230
|
-
Ready when: T003 已经见红,且文件触点与其他 `[P]` 任务不冲突
|
|
231
|
-
|
|
232
|
-
## Phase 3: Verify
|
|
233
|
-
|
|
234
|
-
- [ ] T005 [REFACTOR] Simplify after green evidence (dependsOn:T002,T004) `path/to/file`
|
|
235
|
-
Goal: 在所有相关测试已绿后清理重复、命名、结构和坏味道。
|
|
236
|
-
Source funnel rounds: Abstraction & Encapsulation; Execution Architecture; Task Contract.
|
|
237
|
-
Contract: user story `US-001/US-002`; file responsibility `<module responsibility>`; method/interface `<public surface stays unchanged>`; key fields `<no contract drift>`; input/output `<unchanged>`; failure path `<green tests must still cover>`; AFK/HITL `AFK`.
|
|
238
|
-
Do not re-decide: public interface, key fields, user-visible behavior, scope boundary.
|
|
239
|
-
Artifact updates: implementation files only; update tests only to remove implementation coupling.
|
|
240
|
-
TDD phase: refactor
|
|
241
|
-
Files: `path/to/file`
|
|
242
|
-
Read first: `design.md`, green test outputs
|
|
243
|
-
Project postmortem search: `rg -n "<refactor candidate|code smell|module|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
244
|
-
Verification: `npm test -- path/to/test path/to/other.test`
|
|
245
|
-
Evidence: refactor diff + repeated green output
|
|
246
|
-
Completion: after refactor evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T005`; do not hand-edit status.
|
|
247
|
-
Refactor candidates: duplication / long method / shallow module / feature envy / primitive obsession / naming / >3 nesting / newly exposed old code smell
|
|
248
|
-
Ready when: 对应 Red/Green 任务都已完成,且清理不会扩大 scope
|
|
249
|
-
|
|
250
|
-
- [ ] T006 Run checks and collect evidence (dependsOn:T005) `command or file`
|
|
251
|
-
Goal: 为 `cc-check` 准备新鲜证据。
|
|
252
|
-
Source funnel rounds: Execution Architecture; Task Contract; Final Approval.
|
|
253
|
-
Contract: user story `all planned stories`; file responsibility `verification evidence`; method/interface `all changed public seams`; key fields `all contract fields`; input/output `not applicable`; failure path `gate failure blocks completion`; AFK/HITL `AFK`.
|
|
254
|
-
Do not re-decide: scope, test framework, gate set, completion protocol.
|
|
255
|
-
Artifact updates: review evidence only; no behavior changes and no execution process files.
|
|
256
|
-
TDD phase: evidence
|
|
257
|
-
Files: `command or file`
|
|
258
|
-
Read first: `tasks.md`, `task-manifest.json`
|
|
259
|
-
Project postmortem search: `rg -n "<verification|release|tooling|model-risk>" devflow/postmortems` or record `no-project-postmortems-yet`
|
|
260
|
-
Verification: `npm test && npm run lint`
|
|
261
|
-
Evidence: gate output
|
|
262
|
-
Completion: after gate evidence and required review records exist, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task T006`; do not hand-edit status.
|
|
263
|
-
Ready when: 当前 requirement 的实现任务都已收口
|
|
264
|
-
|
|
265
|
-
> `[P]` 只表示“依赖满足后有资格并行”,不表示可以无脑同时开发。
|
|
266
|
-
|
|
267
|
-
## Task Quality Bar
|
|
268
|
-
|
|
269
|
-
一个好的 task block 至少让执行者立刻知道:
|
|
270
|
-
|
|
271
|
-
- 现在为什么轮到它做
|
|
272
|
-
- 做完后现实会发生什么变化
|
|
273
|
-
- 用哪条命令证明它完成
|
|
274
|
-
- 要留下什么证据给 `cc-check`
|
|
275
|
-
- 它处于 Red、Green、Refactor,还是明确的 TDD exception
|
|
276
|
-
- 它覆盖哪条 user story 或 edge / recovery story
|
|
277
|
-
- 它继承了 Deep Planning Funnel 里确认的哪个接口、方法、字段、分类、输入输出和失败路径
|
|
278
|
-
- 它来自哪几轮 funnel,哪些设计点不允许重决策,哪些 artifact 可以改、哪些不能改
|
|
279
|
-
- 测试框架依据来自哪里,回归测试是否被明确处理
|
|
280
|
-
- Red task 通过哪个公共 seam 证明行为缺失,允许 mock 的边界是什么
|
|
281
|
-
- Red task 的测试名是否像规格,一个测试是否只证明一个逻辑行为,结果是否从公共入口读回
|
|
282
|
-
- Green task 如何保证只写当前红灯要求的最小代码
|
|
283
|
-
- Refactor task 要清理哪些具体坏味道,且只在相关测试已绿后执行
|
|
284
|
-
- 测试是否会在内部重构后继续成立,而不是绑定私有函数、调用次数或临时结构
|
|
285
|
-
- 它属于哪个 tracer bullet 垂直切片,完成后哪个可观察行为被证明
|
|
286
|
-
- 它完成后要运行哪条 `mark-task-complete.sh` 命令,以及为什么不能手工改状态
|
|
287
|
-
- 开工前查过哪些项目尸检报告,相关原则如何转成当前 task guardrail
|
|
90
|
+
Completion: after green evidence exists, run `bash "$SCRIPT_ROOT/mark-task-complete.sh" --tasks devflow/changes/<change-key>/task.md --task T002`.
|
|
91
|
+
Public verification path: same as T001.
|
|
92
|
+
Ready when: T001 has failing evidence.
|
|
@@ -2,166 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## Hard Rules
|
|
4
4
|
|
|
5
|
-
1. `cc-plan`
|
|
6
|
-
2.
|
|
7
|
-
3.
|
|
8
|
-
4.
|
|
9
|
-
5. `
|
|
10
|
-
6.
|
|
11
|
-
7.
|
|
12
|
-
8.
|
|
13
|
-
9.
|
|
14
|
-
10.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
24. 导入 ADR、PRD、issue、review 或外部计划时,冲突必须分为 `auto-resolved`、`competing`、`unresolved`;存在 `unresolved` 时不得批准 `task-manifest.json`。
|
|
29
|
-
25. 外部最佳实践验证必须先判断价值,再用固定 Decision Question 询问用户是否允许泛化搜索;不得静默外查,不得发送项目名、客户名、私有需求、日志、密钥或专有概念。
|
|
30
|
-
26. 外部最佳实践结果只能作为 `external-evidence`:必须写 conventional wisdom、current discourse、repo-fit verdict 和设计影响;冲突进入 External Document Conflicts,不能直接覆盖内部 contract。
|
|
31
|
-
27. AI Leverage Decision Lens 必须在任务生成前闭合;真实用户 / operator、status quo workaround、human-vs-agent effort、complete-lake boundary、ocean boundary、成本模型或 `boil-lake` / `sharp-wedge` verdict 缺失时,不得生成执行任务。`boil-lake` verdict 下不得退缩成 happy-path MVP。
|
|
32
|
-
28. review loop 必须有 attempt 上限和 stall reroute;不能靠无限 review 掩盖需求仍不清楚。
|
|
33
|
-
29. Roadmap Sync Gate 必须在退出前闭合:source RM 存在就回写 `devflow/roadmap.json` 并重新生成 `devflow/ROADMAP.md` / `devflow/BACKLOG.md`;不存在就记录 no-op reason。
|
|
34
|
-
30. PRD-grade requirement brief 必须并入 `planning/tasks.md#Contract Summary`:用户视角问题、用户视角方案、actor / user stories、实现决策、测试决策、out-of-scope 和 further notes。默认不得额外产出 `PRD.md`。
|
|
35
|
-
31. 需要用户判断时必须使用固定 Decision Question:`D<N>`、证据、推荐、2-3 个互斥的 `A/B/C` 字母选项、影响和 STOP 都必须出现;禁止用自由问句或 `1/2/3` 数字选项代替审批 gate。
|
|
36
|
-
32. 所有用户决策必须写入 `planning/tasks.md#Contract Summary` 的 `Decision Questions`,并同步到 `task-manifest.json.planningMeta.decisionQuestions`,不能只留在聊天里。
|
|
37
|
-
33. Deep Planning Funnel 必须在任务生成前闭合:requirement reality、system shape、interface/data contract、abstraction/encapsulation、execution architecture、task contract、final approval 都要记录状态、证据和 artifact impact。
|
|
38
|
-
34. 每个任务必须继承 funnel 结论形成 task contract:user story / edge story、文件职责、方法或接口、关键字段、输入输出、失败路径、验证方式和 AFK/HITL。没有 task contract 的任务不允许交给 `cc-do`。
|
|
39
|
-
|
|
40
|
-
## Design Modes
|
|
41
|
-
|
|
42
|
-
- `tiny-design`:超小需求的冻结设计卡片,不是跳过设计。
|
|
43
|
-
- `full-design`:涉及跨模块、复杂数据流、迁移或高风险约束的完整设计。
|
|
44
|
-
|
|
45
|
-
默认优先 `tiny-design`,但一旦需要解释复杂边界,就升级到 `full-design`。
|
|
46
|
-
|
|
47
|
-
## Placeholder Ban
|
|
48
|
-
|
|
49
|
-
- TODO later
|
|
50
|
-
- implement later
|
|
51
|
-
- handle edge cases
|
|
52
|
-
- write tests later
|
|
53
|
-
- similar to task N
|
|
54
|
-
- TBD
|
|
55
|
-
- 待定
|
|
56
|
-
- 之后再补
|
|
57
|
-
- 后面再想
|
|
58
|
-
|
|
59
|
-
## Task Fields
|
|
60
|
-
|
|
61
|
-
每个任务至少写清:
|
|
62
|
-
|
|
63
|
-
- 目标
|
|
64
|
-
- source funnel rounds
|
|
65
|
-
- 对应 user story / edge story
|
|
66
|
-
- 文件职责
|
|
67
|
-
- 方法或接口
|
|
68
|
-
- 关键字段
|
|
69
|
-
- 输入输出
|
|
70
|
-
- 失败路径
|
|
71
|
-
- AFK / HITL
|
|
72
|
-
- do-not-re-decide items
|
|
73
|
-
- artifact updates
|
|
74
|
-
- TDD phase:`red` / `green` / `refactor` / `exception`
|
|
75
|
-
- Vertical slice / tracer bullet
|
|
76
|
-
- Spec-style test name
|
|
77
|
-
- One logical behavior
|
|
78
|
-
- Test seam / public interface
|
|
79
|
-
- Public verification path
|
|
80
|
-
- Behavior asserted
|
|
81
|
-
- Mock boundary
|
|
82
|
-
- Feedback loop type
|
|
83
|
-
- Green minimality guard
|
|
84
|
-
- Refactor candidates
|
|
85
|
-
- 涉及文件
|
|
86
|
-
- 验证方式
|
|
87
|
-
- 完成证据
|
|
88
|
-
- Completion command:调用 `mark-task-complete.sh`,同步 `planning/task-manifest.json` 与 `planning/tasks.md`
|
|
89
|
-
- Forbidden shortcuts:禁止手工改 checkbox、manifest status 或 `currentTaskId`
|
|
90
|
-
|
|
91
|
-
行为变更任务必须先有 `[TEST]` 红灯任务,再有 `[IMPL]` 绿灯任务,最后有 `[REFACTOR]` 或明确 refactor gate。纯文档、纯配置、纯生成文件、throwaway prototype 可以例外,但必须写明原因、风险和替代验证。
|
|
92
|
-
不要把计划拆成水平层:一批测试、一批服务、一批 UI。每个切片完成后都应该能证明一个真实行为。
|
|
93
|
-
也不要把一批 Red 一次性写完再批量实现。每条 tracer bullet 只证明一个可观察行为,Green 只做当前红灯要求的最小实现;下一条 Red 可以吸收上一轮学到的事实,但不能越过冻结边界。
|
|
94
|
-
|
|
95
|
-
## Execution Protocol Fields
|
|
96
|
-
|
|
97
|
-
`planning/tasks.md` 必须有 `Execution Protocol` 区块。`planning/task-manifest.json` 不再复制这段协议;它只保留执行图和调度状态,避免把同一条 shell 命令复制进全局 metadata 和每个 task。
|
|
98
|
-
|
|
99
|
-
- task 选择来自 `currentTaskId` 或 `select-ready-tasks.sh`
|
|
100
|
-
- 每个 task 必须按模板字段完整展开,不能退化成标题清单
|
|
101
|
-
- 完成 task 必须调用 `mark-task-complete.sh`
|
|
102
|
-
- 脚本失败时修 evidence / review gate / dependency state 后重跑,禁止手工绕过
|
|
103
|
-
- 禁止规划或要求生成执行过程文件:`execution/tasks/<task-id>/context.md`、`checkpoint.json`、review markdown 或其它 AI 手写过程文件都不是默认真相源;恢复只看代码、Git、`planning/tasks.md`、`task-manifest.json` 和 CLI 自动日志。
|
|
104
|
-
- completion command、required-before-completion 和 forbidden-shortcuts 写在 `planning/tasks.md` 的 task block;不得再写入 `task-manifest.json.executionProtocol` 或 `tasks[].completion`
|
|
105
|
-
- `task-manifest.json` 不写顶层 `status`、`activePhase`、`sourceRoadmap` 或 `spec`;整体完成度从 `tasks[].status` 派生,phase 从任务图派生,roadmap/spec 状态从 `change-meta.json` 和 `devflow/roadmap.json` 读取。
|
|
106
|
-
|
|
107
|
-
## Decision Question Fields
|
|
108
|
-
|
|
109
|
-
每个需要用户判断的 gate 至少记录:
|
|
110
|
-
|
|
111
|
-
- questionId:`D1` / `D2` / ...
|
|
112
|
-
- gate:`planning-mode` / `ambiguity-blocker` / `external-best-practice` / `approach-approval` / `taste-or-user-challenge` / `final-design-approval`
|
|
113
|
-
- knownEvidence
|
|
114
|
-
- recommendation
|
|
115
|
-
- options:只能使用 `A` / `B` / `C` 作为 option id
|
|
116
|
-
- userChoice
|
|
117
|
-
- impact
|
|
118
|
-
- status:`asked` / `answered` / `auto-decided`
|
|
119
|
-
|
|
120
|
-
如果选项不是覆盖度差异,completeness 使用 `different-kind`,并写清不能打分的原因。
|
|
5
|
+
1. `cc-plan` writes only `task.md`.
|
|
6
|
+
2. Git commit records Plan completion.
|
|
7
|
+
3. Clarification, approval, review notes, and execution protocol live inside `task.md`.
|
|
8
|
+
4. No process file beyond `task.md`.
|
|
9
|
+
5. New change keys come from `cc-devflow next-change-key`.
|
|
10
|
+
6. Branch binds to the full change key before durable output.
|
|
11
|
+
7. User decisions that affect scope, design, or verification are written into `task.md#Contract Summary`.
|
|
12
|
+
8. Placeholder tasks are invalid.
|
|
13
|
+
9. Behavior work uses tracer bullets and TDD unless an exception is recorded.
|
|
14
|
+
10. Roadmap sync, when needed, happens through roadmap files and Git commit, not change metadata.
|
|
15
|
+
|
|
16
|
+
## Required Task Fields
|
|
17
|
+
|
|
18
|
+
- goal
|
|
19
|
+
- user or edge story
|
|
20
|
+
- files
|
|
21
|
+
- dependencies
|
|
22
|
+
- TDD phase
|
|
23
|
+
- public verification path
|
|
24
|
+
- verification command
|
|
25
|
+
- completion evidence
|
|
26
|
+
- completion command
|
|
27
|
+
- commit point
|
|
121
28
|
|
|
122
29
|
## Review Gate
|
|
123
30
|
|
|
124
|
-
`
|
|
125
|
-
|
|
126
|
-
1. Placeholder scan
|
|
127
|
-
2. Consistency scan
|
|
128
|
-
3. Scope scan
|
|
129
|
-
4. Ambiguity scan
|
|
130
|
-
5. Feasibility scan
|
|
131
|
-
6. Source alignment
|
|
132
|
-
7. Existing leverage map
|
|
133
|
-
8. Scope / complexity challenge
|
|
134
|
-
9. Test diagram and failure modes
|
|
135
|
-
10. Domain language / spec decision conflict scan
|
|
136
|
-
11. Interface depth scan
|
|
137
|
-
12. Interface testability scan
|
|
138
|
-
13. Test seam / mock boundary scan
|
|
139
|
-
14. Public verification path scan
|
|
140
|
-
15. Tracer bullet scan
|
|
141
|
-
16. Green minimality / refactor candidate scan
|
|
142
|
-
17. PRD brief scan
|
|
143
|
-
18. Source trust boundary scan
|
|
144
|
-
19. External best-practice validation scan
|
|
145
|
-
20. AI Leverage Decision Lens scan
|
|
146
|
-
21. External conflict scan
|
|
147
|
-
22. Ambiguity gate
|
|
148
|
-
23. Bounded review loop
|
|
149
|
-
23. NOT in scope
|
|
150
|
-
24. Test-first readiness
|
|
151
|
-
25. Decision questions recorded
|
|
152
|
-
26. Final recommendation
|
|
153
|
-
|
|
154
|
-
如有 UI scope,再补 design review 结论。
|
|
155
|
-
如有 developer-facing scope,再补 DX review 结论。
|
|
156
|
-
|
|
157
|
-
## Decision Log
|
|
158
|
-
|
|
159
|
-
每个非平凡决策至少记录:
|
|
160
|
-
|
|
161
|
-
- decision
|
|
162
|
-
- classification:`mechanical` / `taste` / `user challenge`
|
|
163
|
-
- principle:completeness / pragmatic / DRY / explicit / action
|
|
164
|
-
- rationale
|
|
165
|
-
- rejected alternative
|
|
166
|
-
|
|
167
|
-
机械选择可以自动落盘。taste decision 和 user challenge 必须在最终 gate 里显式出现。
|
|
31
|
+
Before exit, check scope, existing leverage, non-goals, ambiguity, test seam, mock boundary, and failure modes. If the plan is not executable from `task.md`, it is not done.
|
|
@@ -28,51 +28,15 @@ fi
|
|
|
28
28
|
|
|
29
29
|
REPO_ROOT="${CWD:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"
|
|
30
30
|
|
|
31
|
-
#
|
|
31
|
+
# 通过共享 resolver 找到可证明支持 next-change-key 的真实 CLI。
|
|
32
|
+
# 不再用 PATH 裸命令或 bash 扫目录兜底;缺 CLI 时必须 fail closed。
|
|
32
33
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
33
|
-
|
|
34
|
+
RESOLVER="$SCRIPT_DIR/../../cc-dev/scripts/resolve-cc-devflow.sh"
|
|
34
35
|
|
|
35
|
-
if [[ -f "$
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if command -v cc-devflow >/dev/null 2>&1; then
|
|
41
|
-
cc-devflow next-change-key --prefix "$PREFIX" --description "$DESCRIPTION" --cwd "$REPO_ROOT"
|
|
42
|
-
exit $?
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
# 纯 bash 兜底:扫描 devflow/changes/ 取 max+1
|
|
46
|
-
CHANGES_DIR="$REPO_ROOT/devflow/changes"
|
|
47
|
-
PREFIX_UPPER="$(echo "$PREFIX" | tr '[:lower:]' '[:upper:]')"
|
|
48
|
-
|
|
49
|
-
MAX_NUM=0
|
|
50
|
-
PAD_WIDTH=3
|
|
51
|
-
|
|
52
|
-
if [[ -d "$CHANGES_DIR" ]]; then
|
|
53
|
-
for dir in "$CHANGES_DIR/${PREFIX_UPPER}-"*; do
|
|
54
|
-
[[ -d "$dir" ]] || continue
|
|
55
|
-
basename="$(basename "$dir")"
|
|
56
|
-
num_part="$(echo "$basename" | sed -E "s/^${PREFIX_UPPER}-([0-9]+).*/\1/")"
|
|
57
|
-
if [[ "$num_part" =~ ^[0-9]+$ ]]; then
|
|
58
|
-
num=$((10#$num_part))
|
|
59
|
-
if (( num > MAX_NUM )); then
|
|
60
|
-
MAX_NUM=$num
|
|
61
|
-
fi
|
|
62
|
-
if (( ${#num_part} > PAD_WIDTH )); then
|
|
63
|
-
PAD_WIDTH=${#num_part}
|
|
64
|
-
fi
|
|
65
|
-
fi
|
|
66
|
-
done
|
|
36
|
+
if [[ ! -f "$RESOLVER" ]]; then
|
|
37
|
+
echo "Missing cc-devflow CLI resolver: $RESOLVER" >&2
|
|
38
|
+
echo "Do not compute change keys manually; install/update cc-devflow skills." >&2
|
|
39
|
+
exit 1
|
|
67
40
|
fi
|
|
68
41
|
|
|
69
|
-
|
|
70
|
-
PADDED_NUM="$(printf "%0${PAD_WIDTH}d" "$NEXT_NUM")"
|
|
71
|
-
CHANGE_ID="${PREFIX_UPPER}-${PADDED_NUM}"
|
|
72
|
-
|
|
73
|
-
SLUG="$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed -E 's/[[:space:]_]+/-/g; s/^-+|-+$//g')"
|
|
74
|
-
[[ -z "$SLUG" ]] && SLUG="change"
|
|
75
|
-
|
|
76
|
-
CHANGE_KEY="${CHANGE_ID}-${SLUG}"
|
|
77
|
-
echo "$CHANGE_ID"
|
|
78
|
-
echo "$CHANGE_KEY"
|
|
42
|
+
bash "$RESOLVER" next-change-key --prefix "$PREFIX" --description "$DESCRIPTION" --cwd "$REPO_ROOT"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'use strict';
|
|
4
4
|
|
|
5
5
|
// ------------------------------------------------------------
|
|
6
|
-
// 解析
|
|
6
|
+
// 解析 task.md 里的 phase / [P] / 文件触点
|
|
7
7
|
// ------------------------------------------------------------
|
|
8
8
|
|
|
9
9
|
const fs = require('fs');
|
|
@@ -57,7 +57,7 @@ function parse(content) {
|
|
|
57
57
|
function main() {
|
|
58
58
|
const file = process.argv[2];
|
|
59
59
|
if (!file) {
|
|
60
|
-
console.error('Usage: parse-task-dependencies.js
|
|
60
|
+
console.error('Usage: parse-task-dependencies.js task.md');
|
|
61
61
|
process.exit(1);
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -61,7 +61,7 @@ for file in "${sources[@]}"; do
|
|
|
61
61
|
echo "[FAIL] $file contains an empty field bullet"
|
|
62
62
|
fail=1
|
|
63
63
|
fi
|
|
64
|
-
if [[ "$file" != *"
|
|
64
|
+
if [[ "$file" != *"task template" ]]; then
|
|
65
65
|
for marker in "${required_markers[@]}"; do
|
|
66
66
|
if ! rg -n --fixed-strings "$marker" "$file" >/dev/null 2>&1; then
|
|
67
67
|
echo "[FAIL] $file is missing marker: $marker"
|