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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cc-plan
|
|
3
|
-
version: 3.
|
|
3
|
+
version: 3.10.1
|
|
4
4
|
description: Use when a requirement, roadmap item, or bug needs scope clarification, design decisions, and executable task breakdown before coding starts.
|
|
5
5
|
triggers:
|
|
6
6
|
- 帮我规划这个需求
|
|
@@ -13,51 +13,34 @@ triggers:
|
|
|
13
13
|
reads:
|
|
14
14
|
- PLAYBOOK.md
|
|
15
15
|
- assets/TASKS_TEMPLATE.md
|
|
16
|
-
- assets/TASK_MANIFEST_TEMPLATE.json
|
|
17
16
|
- references/planning-contract.md
|
|
18
|
-
- ../cc-
|
|
19
|
-
- ../cc-do/scripts/mark-task-complete.sh
|
|
17
|
+
- ../cc-dev/scripts/resolve-cc-devflow.sh
|
|
20
18
|
- ../cc-roadmap/scripts/locate-roadmap-item.sh
|
|
21
19
|
- ../cc-roadmap/scripts/sync-roadmap-progress.sh
|
|
22
20
|
writes:
|
|
23
|
-
- path: devflow/changes/<change-key>/
|
|
24
|
-
durability: durable
|
|
25
|
-
required: true
|
|
26
|
-
- path: devflow/changes/<change-key>/planning/task-manifest.json
|
|
27
|
-
durability: durable
|
|
28
|
-
required: true
|
|
29
|
-
- path: devflow/changes/<change-key>/change-meta.json
|
|
21
|
+
- path: devflow/changes/<change-key>/task.md
|
|
30
22
|
durability: durable
|
|
31
23
|
required: true
|
|
32
24
|
effects:
|
|
33
|
-
-
|
|
25
|
+
- roadmap progress sync when a source item exists
|
|
26
|
+
- Git commit after the Plan stage is complete
|
|
34
27
|
entry_gate:
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- Default to `tiny-design`; escalate to `full-design` only for cross-module, state/data/interface, migration, security, rollback, or high-ambiguity work.
|
|
41
|
-
- Ask at most one blocking decision at a time, using the fixed D<N> Decision Question Protocol when the answer changes design or task boundaries.
|
|
42
|
-
- Compare minimal viable and ideal architecture for non-trivial plans, but do not force that comparison for obvious tiny-design patches.
|
|
43
|
-
- "Keep machine records CLI-owned: `task-manifest.json` and `change-meta.json` must be generated or refreshed by `cc-devflow task-contract compile`, not handwritten by the AI."
|
|
44
|
-
- Generate durable artifacts only after the recommended design is approved.
|
|
45
|
-
- Before exit, sync or explicitly no-op the source roadmap item.
|
|
28
|
+
- Resolve the CLI with `../cc-dev/scripts/resolve-cc-devflow.sh require query workflow-context next-change-key config` before workflow commands.
|
|
29
|
+
- Assign a canonical REQ/FIX change key through `next-change-key` before writing `task.md`.
|
|
30
|
+
- Enforce the Worktree Branch Contract immediately after the change key exists.
|
|
31
|
+
- Read only the repo evidence needed to decide scope, existing leverage, task boundaries, and verification.
|
|
32
|
+
- Ask only when the answer changes scope, design, implementation boundary, or verification.
|
|
46
33
|
exit_criteria:
|
|
47
|
-
- "`
|
|
48
|
-
- "`
|
|
49
|
-
- "
|
|
50
|
-
- "
|
|
51
|
-
- "
|
|
34
|
+
- "`task.md#Contract Summary` states the approved solution, non-goals, frozen decisions, work branch, verification expectations, and open assumptions."
|
|
35
|
+
- "`task.md` contains executable task blocks generated from `assets/TASKS_TEMPLATE.md`."
|
|
36
|
+
- "No process file is created beyond `task.md`."
|
|
37
|
+
- "Source roadmap progress is synced or explicitly skipped in the final response."
|
|
38
|
+
- "Plan-stage changes are committed to Git before handing off to `cc-do`."
|
|
52
39
|
reroutes:
|
|
53
|
-
- when: The discussion is still
|
|
40
|
+
- when: The discussion is still project direction or stage order instead of one requirement.
|
|
54
41
|
target: roadmap
|
|
55
|
-
- when: The plan is already approved and tasks are
|
|
42
|
+
- when: The plan is already approved and tasks are frozen.
|
|
56
43
|
target: cc-do
|
|
57
|
-
recovery_modes:
|
|
58
|
-
- name: re-open-design
|
|
59
|
-
when: Execution feedback, review findings, or user correction invalidates the current design contract.
|
|
60
|
-
action: Return to planning/tasks.md#Contract Summary, reopen the approved decision explicitly, then rerun CLI generation only after the contract is stable again.
|
|
61
44
|
tool_budget:
|
|
62
45
|
read_files: 8
|
|
63
46
|
search_steps: 5
|
|
@@ -66,278 +49,45 @@ tool_budget:
|
|
|
66
49
|
|
|
67
50
|
# CC-Plan
|
|
68
51
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## Role
|
|
72
|
-
|
|
73
|
-
`cc-plan` 是 PDCA 里的 `Plan`。它把一个明确 requirement 压成最少但足够强的执行合同,让 `cc-do` 不需要继承当前聊天上下文也能继续。
|
|
74
|
-
|
|
75
|
-
它不是完整产品路线图,不写生产代码,也不制造规划文档农场。
|
|
76
|
-
|
|
77
|
-
## Thin Harness Rule
|
|
78
|
-
|
|
79
|
-
默认相信顶级模型的工程判断。Harness 只做三件事:
|
|
80
|
-
|
|
81
|
-
1. 防止并发开发写错分支、写错真相源、跳过验证。
|
|
82
|
-
2. 把关键决策落到可恢复 artifact,而不是留在聊天里。
|
|
83
|
-
3. 在复杂度真的出现时才打开深层检查。
|
|
84
|
-
4. 机器态 JSON 必须由 CLI / 模板生成或更新,AI 不手写过程 JSON。
|
|
85
|
-
|
|
86
|
-
不要为了“流程完整”读取所有 reference。先用本文件闭合常规路径;只有触发升级条件时,才打开 `PLAYBOOK.md` 或 `references/planning-contract.md` 的对应段落。
|
|
87
|
-
|
|
88
|
-
## Harness Contract
|
|
89
|
-
|
|
90
|
-
- Allowed actions: clarify scope, compare approaches, freeze decisions, write the 3 default planning artifacts, and sync or no-op the source roadmap item.
|
|
91
|
-
- Forbidden actions: production code, extra planning side-docs, task generation before approval, or default-loading every deep planning reference.
|
|
92
|
-
- Required evidence: decisions, task boundaries, work branch, and verification commands point to repo facts or explicit user approval.
|
|
93
|
-
- Reroute rule: broad strategy returns to `roadmap`; already frozen work goes to `cc-do`.
|
|
94
|
-
|
|
95
|
-
## Planning Discipline
|
|
96
|
-
|
|
97
|
-
- Prefer the smallest reversible scope; if a simpler plan solves the requirement, push back on broader work.
|
|
98
|
-
- Do not add speculative features or single-use abstractions.
|
|
99
|
-
- When repo patterns conflict, choose the newer or better-verified pattern and mark the other as cleanup, not a blended design.
|
|
100
|
-
- Verification must encode the user's intent and why the behavior matters, not only implementation shape.
|
|
101
|
-
- Deterministic numbering, routing, and JSON generation belong to CLI commands, not model judgment.
|
|
102
|
-
|
|
103
|
-
## Runtime Output Policy
|
|
104
|
-
|
|
105
|
-
写入任何 durable Markdown 或 JSON metadata 前,先运行:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
cc-devflow config resolve --format policy
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
- `Output language` 是机器约束,`planning/tasks.md` 和 `change-meta.json` 必须记录并遵守。
|
|
112
|
-
- `agent_preferences` 只影响表达方式,不覆盖 workflow 边界。
|
|
113
|
-
- 配置解析失败时先修配置或报告阻塞,不用默认语言偷跑。
|
|
52
|
+
`cc-plan` 是 PDCA 的 `Plan`。它只产出一份 durable 任务合同:
|
|
114
53
|
|
|
115
|
-
|
|
54
|
+
- `devflow/changes/<change-key>/task.md`
|
|
116
55
|
|
|
117
|
-
|
|
56
|
+
不要生成额外过程文件或 JSON 文档。Git commit 是阶段历史,`task.md` 是任务真相。
|
|
118
57
|
|
|
119
|
-
|
|
120
|
-
2. 当前 repo 指令:`CLAUDE.md` / `AGENTS.md` / README 中和本需求直接相关的部分
|
|
121
|
-
3. 相关代码、测试、docs 的最小证据集
|
|
122
|
-
4. `assets/TASKS_TEMPLATE.md` 和 `assets/TASK_MANIFEST_TEMPLATE.json`
|
|
58
|
+
## Operating Contract
|
|
123
59
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- `
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
- `../cc-roadmap/scripts/*`:定位或回写 source RM 时打开。
|
|
131
|
-
|
|
132
|
-
## Change Key And Branch
|
|
133
|
-
|
|
134
|
-
新计划必须先分配 change key:
|
|
60
|
+
1. 先用 resolver 找到当前仓库的 `cc-devflow`,并确认支持 `query workflow-context`、`next-change-key`、`config`。
|
|
61
|
+
2. 用 `next-change-key --prefix REQ|FIX --description "..."` 生成 `changeId` 和完整 `changeKey`,不要手动扫描编号。
|
|
62
|
+
3. 分配 change key 后立刻锚定分支:`REQ-003-copy-link` 对应 `REQ/003-copy-link`,`FIX-014-auth-race` 对应 `FIX/014-auth-race`。当前在 default branch 时停止并报告 setup blocker。
|
|
63
|
+
4. 写 `task.md` 前先确认方案。tiny 计划仍要被批准,只是更短。
|
|
64
|
+
5. `task.md` 必须包含 `Contract Summary`、任务列表、验证命令、完成证据、禁止重决策事项和阶段 commit 要求。
|
|
65
|
+
6. 完成 Plan 后提交 Git commit。下一阶段从 Git history 和 `task.md` 恢复,不靠过程文件。
|
|
135
66
|
|
|
136
67
|
```bash
|
|
137
|
-
cc-
|
|
68
|
+
DEVFLOW=".claude/skills/cc-dev/scripts/resolve-cc-devflow.sh"
|
|
69
|
+
bash "$DEVFLOW" config resolve --format policy
|
|
138
70
|
```
|
|
139
71
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
分支锚定规则:
|
|
143
|
-
|
|
144
|
-
1. `REQ-003-copy-link` 对应 `REQ/003-copy-link`。
|
|
145
|
-
2. `FIX-014-auth-race` 对应 `FIX/014-auth-race`。
|
|
146
|
-
3. 当前 detached 时,立刻 `git switch -c <canonical-work-branch>`。
|
|
147
|
-
4. 当前是 `main` / `master` / default branch 时停止,报告 setup blocker。
|
|
148
|
-
5. 当前是其它分支时,只有它已明确绑定同一个 change key 才继续。
|
|
149
|
-
|
|
150
|
-
`planning/tasks.md` 和 `change-meta.json` 必须记录 work branch。
|
|
151
|
-
|
|
152
|
-
## Machine Artifact Rule
|
|
153
|
-
|
|
154
|
-
AI 只手写默认人类合同:`planning/tasks.md#Contract Summary` 和后面的 task blocks。
|
|
155
|
-
|
|
156
|
-
机器态文件必须由命令生成或更新:
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
cc-devflow task-contract compile --change <changeId> --change-key <changeKey>
|
|
160
|
-
cc-devflow task-contract validate --change <changeId> --change-key <changeKey>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
硬规则:
|
|
164
|
-
|
|
165
|
-
- 不手写 `planning/task-manifest.json`。
|
|
166
|
-
- 不手写 `change-meta.json`。
|
|
167
|
-
- 不生成 `planning/design.md`、`planning/analysis.md`、task `context.md`、`checkpoint.json`、review Markdown 或其它 AI 手写过程文件。
|
|
168
|
-
- 需要修机器态结构时,改 CLI / 模板 / validator,再重新生成;不要在项目 change 目录里补 JSON。
|
|
169
|
-
- legacy `planning/design.md` / `planning/analysis.md` 只能作为读取或 migration 输入。
|
|
170
|
-
|
|
171
|
-
## Density Switch
|
|
172
|
-
|
|
173
|
-
先决定计划密度,再写计划。
|
|
174
|
-
|
|
175
|
-
`tiny-design` 是默认:
|
|
176
|
-
|
|
177
|
-
- 单一功能点
|
|
178
|
-
- 通常触达 1-3 个文件
|
|
179
|
-
- 不涉及 migration、权限、安全、复杂状态流或高代价回滚
|
|
180
|
-
- 执行者看完冻结卡片即可落地
|
|
181
|
-
|
|
182
|
-
`full-design` 只在这些条件出现时升级:
|
|
183
|
-
|
|
184
|
-
- 跨模块协调或多阶段落地
|
|
185
|
-
- 新增/改变接口、数据字段、状态机、迁移或兼容性
|
|
186
|
-
- 安全、权限、计费、同步一致性、发布物分发等高代价边界
|
|
187
|
-
- 不先讲清边界就会逼 `cc-do` 二次设计
|
|
188
|
-
|
|
189
|
-
`tiny-design` 仍然需要批准;它删的是冗长文档,不是删设计。
|
|
72
|
+
## Planning Standard
|
|
190
73
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
5. **Ask Only If Blocking**:用户答案会改变设计、任务或交付边界时才问;一次只问一个。
|
|
198
|
-
6. **Approve**:推荐方案获批前不写执行 task blocks。
|
|
199
|
-
7. **Freeze Tasks**:写稳 `planning/tasks.md#Contract Summary` 和 task blocks。
|
|
200
|
-
8. **Compile**:运行 `cc-devflow task-contract compile` 生成/刷新 manifest 和 meta,再 validate。
|
|
201
|
-
9. **Sync Roadmap**:source RM 存在就回写;不存在就记录 no-op reason。
|
|
202
|
-
|
|
203
|
-
## Decision Questions
|
|
204
|
-
|
|
205
|
-
只在这些 gate 问用户:
|
|
206
|
-
|
|
207
|
-
- `planning-mode`:tiny/full/design route 无法由证据决定
|
|
208
|
-
- `ambiguity-blocker`:WHAT/WHY 缺口会改变任务
|
|
209
|
-
- `approach-approval`:需要批准方案
|
|
210
|
-
- `external-best-practice`:外部资料可能改变设计或验证
|
|
211
|
-
- `taste-or-user-challenge`:推荐方案挑战用户原方向
|
|
212
|
-
- `final-design-approval`:准备冻结执行任务
|
|
213
|
-
|
|
214
|
-
格式固定:
|
|
215
|
-
|
|
216
|
-
```text
|
|
217
|
-
D<N> - <decision title>
|
|
218
|
-
Planning object: <REQ/FIX/RM id, branch, or change key>
|
|
219
|
-
Known evidence: <repo / roadmap / code / test facts>
|
|
220
|
-
Decision needed: <what this changes downstream>
|
|
221
|
-
Recommendation: <A/B/C> because <one concrete reason>
|
|
222
|
-
Completeness: A=<score>/10, B=<score>/10, C=<score>/10
|
|
223
|
-
Options:
|
|
224
|
-
A) <label> (recommended)
|
|
225
|
-
Good: <concrete upside>
|
|
226
|
-
Cost/Risk: <honest cost or what it leaves out>
|
|
227
|
-
B) <label>
|
|
228
|
-
Good: <concrete upside>
|
|
229
|
-
Cost/Risk: <honest cost or what it leaves out>
|
|
230
|
-
Impact: <what cc-do will do differently>
|
|
231
|
-
STOP: wait for the user answer before continuing.
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
选项必须是 `A/B/C`,不能用 `1/2/3`。机械选择可以 auto-decide,但必须写进 `Decision Questions` 记录。
|
|
235
|
-
|
|
236
|
-
## Output Model
|
|
237
|
-
|
|
238
|
-
默认只允许 3 个主文件:
|
|
239
|
-
|
|
240
|
-
1. `planning/tasks.md`
|
|
241
|
-
- 唯一默认 human-authored Markdown
|
|
242
|
-
- `## Contract Summary` 放批准方案、边界、冻结决策、验证、review 结论
|
|
243
|
-
- task blocks 放执行步骤和 completion command
|
|
244
|
-
2. `planning/task-manifest.json`
|
|
245
|
-
- CLI 生成的执行图真相源
|
|
246
|
-
- 保留 `currentTaskId`、依赖、触点、命令、验证、证据和 review 状态
|
|
247
|
-
- 不复制 PRD、review prose、source-trust prose、completion shell 命令、roadmap progress 或 spec sync 状态
|
|
248
|
-
3. `change-meta.json`
|
|
249
|
-
- CLI 生成/更新的 capability/spec sync、source RM、roadmap sync、work branch metadata
|
|
250
|
-
|
|
251
|
-
新计划默认不写:
|
|
252
|
-
|
|
253
|
-
- `planning/design.md`
|
|
254
|
-
- `planning/analysis.md`
|
|
255
|
-
- `BRAINSTORM.md`
|
|
256
|
-
- `PLAN_REVIEW.md`
|
|
257
|
-
- `context-package.md`
|
|
258
|
-
- `handoff/resume-index.md`
|
|
259
|
-
- AI 手写的 `execution/tasks/<task-id>/context.md` 或 `checkpoint.json`
|
|
260
|
-
|
|
261
|
-
历史文件只能作为 legacy fallback 读取;有效内容吸收进 `planning/tasks.md#Contract Summary`。
|
|
262
|
-
|
|
263
|
-
## Progressive Disclosure
|
|
264
|
-
|
|
265
|
-
`planning/tasks.md` 第一屏必须能回答:做什么、不做什么、为什么现在做、当前批准状态、下一步读哪个 task。
|
|
266
|
-
|
|
267
|
-
后续阶段默认从这里恢复:
|
|
268
|
-
|
|
269
|
-
```bash
|
|
270
|
-
cc-devflow query workflow-context --change <changeId> --change-key <changeKey> --cwd <repo-root> --data-only --no-trace --compact
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
`workflow-context` 是 context index,不是语义裁决者。它负责路由和打开引用;源 artifact 负责事实裁决。
|
|
274
|
-
|
|
275
|
-
## Task Contract
|
|
276
|
-
|
|
277
|
-
行为变更默认测试先行:
|
|
278
|
-
|
|
279
|
-
```text
|
|
280
|
-
[TEST] Red -> [IMPL] Green -> [REFACTOR] cleanup
|
|
281
|
-
```
|
|
282
|
-
|
|
283
|
-
每个 task 至少写清:
|
|
284
|
-
|
|
285
|
-
- Goal
|
|
286
|
-
- TDD phase 或 exception
|
|
287
|
-
- Files / touches
|
|
288
|
-
- Read first
|
|
289
|
-
- Verification
|
|
290
|
-
- Evidence
|
|
291
|
-
- Public test seam 或替代验证
|
|
292
|
-
- Mock boundary
|
|
293
|
-
- Completion command
|
|
294
|
-
|
|
295
|
-
完成命令必须调用 `mark-task-complete.sh`,禁止手工勾 checkbox 或只改 manifest:
|
|
296
|
-
|
|
297
|
-
```bash
|
|
298
|
-
SCRIPT_ROOT=".claude/skills/cc-do/scripts"
|
|
299
|
-
if [[ ! -d "$SCRIPT_ROOT" && -d ".codex/skills/cc-do/scripts" ]]; then
|
|
300
|
-
SCRIPT_ROOT=".codex/skills/cc-do/scripts"
|
|
301
|
-
fi
|
|
302
|
-
bash "$SCRIPT_ROOT/mark-task-complete.sh" --manifest devflow/changes/<change-key>/planning/task-manifest.json --tasks devflow/changes/<change-key>/planning/tasks.md --task <task-id>
|
|
303
|
-
```
|
|
304
|
-
|
|
305
|
-
纯文档、纯配置、纯生成文件、throwaway prototype 可以写 TDD exception,但必须写清替代验证。
|
|
306
|
-
|
|
307
|
-
## Escalation Packs
|
|
308
|
-
|
|
309
|
-
只在触发时打开深层规则:
|
|
310
|
-
|
|
311
|
-
| Pack | Trigger | Open |
|
|
312
|
-
| --- | --- | --- |
|
|
313
|
-
| Deep Planning Funnel | 新接口、字段、状态流、多文件协作、需求仍模糊 | `PLAYBOOK.md#Planning Standard`, `references/planning-contract.md#Review Gate` |
|
|
314
|
-
| AI Leverage Lens | 范围可能太小或太大,用户担心 AI 被流程绑住 | `PLAYBOOK.md#Core Rules`, `references/planning-contract.md#Decision Log` |
|
|
315
|
-
| External Best Practice | 新平台、外部 API、安全、分发、性能、UI/DX 且 repo 无先例 | `references/planning-contract.md#Decision Question Fields` |
|
|
316
|
-
| Postmortem Recall | `devflow/postmortems/` 存在且匹配模块/失败类 | `docs/guides/project-postmortem.md` |
|
|
317
|
-
| Full Engineering Review | 跨模块、高风险、实现者会二次设计 | `PLAYBOOK.md#Review Shape` |
|
|
318
|
-
| UI/DX Review | UI / API / CLI / operator-facing scope | `PLAYBOOK.md#Planning Standard` |
|
|
319
|
-
|
|
320
|
-
如果没有触发条件,不要打开这些包。
|
|
321
|
-
|
|
322
|
-
## Roadmap Sync
|
|
323
|
-
|
|
324
|
-
退出前定位 source RM:
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
bash .claude/skills/cc-roadmap/scripts/locate-roadmap-item.sh --id <RM-or-REQ>
|
|
328
|
-
```
|
|
74
|
+
- 用最小可逆方案解决真实需求,不扩张到假想未来。
|
|
75
|
+
- 缺证据就写 assumption,不伪装成事实。
|
|
76
|
+
- 非 trivial 方案比较 `minimal viable` 和 `ideal architecture`,但推荐必须落到当前仓库可执行边界。
|
|
77
|
+
- 行为变更任务按 tracer bullet 写:`[TEST] -> [IMPL] -> [REFACTOR]`,不要水平切层。
|
|
78
|
+
- 每个任务写清目标、文件、依赖、TDD phase、读什么、怎么验证、完成证据。
|
|
79
|
+
- 回归测试不能 defer;缺 seam 时先计划 spike 或设计修正。
|
|
329
80
|
|
|
330
|
-
|
|
81
|
+
## Required Output
|
|
331
82
|
|
|
332
|
-
|
|
83
|
+
`task.md` 的结构由 `assets/TASKS_TEMPLATE.md` 提供。模板外只允许补充对当前需求必要的事实,不允许新建额外过程文件。
|
|
333
84
|
|
|
334
|
-
|
|
85
|
+
## Handoff
|
|
335
86
|
|
|
336
|
-
|
|
337
|
-
- 推荐方案已批准
|
|
338
|
-
- 任务顺序和验证方式没有歧义
|
|
339
|
-
- machine artifacts 由 CLI 生成并通过 validate
|
|
340
|
-
- `workflow-context --compact` 能恢复下一步
|
|
341
|
-
- `cc-do` 不需要靠聊天记忆补设计
|
|
87
|
+
退出时只说清:
|
|
342
88
|
|
|
343
|
-
|
|
89
|
+
- change key 和分支
|
|
90
|
+
- `task.md` 路径
|
|
91
|
+
- 已运行或跳过的验证
|
|
92
|
+
- Plan commit hash
|
|
93
|
+
- 下一步 `cc-do`
|