create-ccc-tutor 0.1.0

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.
Files changed (106) hide show
  1. package/README.md +41 -0
  2. package/bin/cli.js +76 -0
  3. package/package.json +28 -0
  4. package/template/.claude/commands/abandon.md +7 -0
  5. package/template/.claude/commands/add-anti-flag.md +7 -0
  6. package/template/.claude/commands/add-constitution-clause.md +7 -0
  7. package/template/.claude/commands/audit-spec.md +7 -0
  8. package/template/.claude/commands/commit.md +7 -0
  9. package/template/.claude/commands/constitution-edit.md +7 -0
  10. package/template/.claude/commands/db-schema.md +7 -0
  11. package/template/.claude/commands/exam.md +66 -0
  12. package/template/.claude/commands/execution-plan.md +7 -0
  13. package/template/.claude/commands/feature-draft.md +7 -0
  14. package/template/.claude/commands/handoff.md +7 -0
  15. package/template/.claude/commands/implement.md +7 -0
  16. package/template/.claude/commands/init.md +7 -0
  17. package/template/.claude/commands/next.md +7 -0
  18. package/template/.claude/commands/offload.md +7 -0
  19. package/template/.claude/commands/pickup.md +7 -0
  20. package/template/.claude/commands/recall.md +7 -0
  21. package/template/.claude/commands/remember.md +7 -0
  22. package/template/.claude/commands/slide.md +87 -0
  23. package/template/.claude/commands/spec-finalize.md +7 -0
  24. package/template/.claude/commands/test-fix.md +7 -0
  25. package/template/.claude/commands/uninstall.md +7 -0
  26. package/template/.claude/settings.json +161 -0
  27. package/template/.claude-plugin/plugin.json +41 -0
  28. package/template/.codex/config.toml +24 -0
  29. package/template/.codex/hooks.json +4 -0
  30. package/template/.codex/install-skills.sh +18 -0
  31. package/template/.codex/skills/exam/SKILL.md +61 -0
  32. package/template/.codex/skills/slide/SKILL.md +69 -0
  33. package/template/.harness/agents/README.md +70 -0
  34. package/template/.harness/agents/_template/junior-agent-template.md +116 -0
  35. package/template/.harness/agents/backend-reviewer.md +153 -0
  36. package/template/.harness/agents/frontend-reviewer.md +158 -0
  37. package/template/.harness/agents/security-reviewer.md +148 -0
  38. package/template/.harness/agents/test-fixer.md +147 -0
  39. package/template/.harness/docs/doc-sync.md +29 -0
  40. package/template/.harness/docs/git-hygiene.md +56 -0
  41. package/template/.harness/docs/spec-model.md +47 -0
  42. package/template/.harness/docs/tool-map.md +120 -0
  43. package/template/.harness/docs/workflow.md +59 -0
  44. package/template/.harness/scripts/README.md +70 -0
  45. package/template/.harness/scripts/auditor-gate.sh +388 -0
  46. package/template/.harness/scripts/bootstrap-check.sh +103 -0
  47. package/template/.harness/scripts/budget-monitor.sh +223 -0
  48. package/template/.harness/scripts/check-prereqs.sh +165 -0
  49. package/template/.harness/scripts/checkpoint-recall.sh +136 -0
  50. package/template/.harness/scripts/checkpoint-write.sh +281 -0
  51. package/template/.harness/scripts/decision-log-append.sh +90 -0
  52. package/template/.harness/scripts/env-check.sh +286 -0
  53. package/template/.harness/scripts/format-edit.sh +80 -0
  54. package/template/.harness/scripts/lint-bans.sh +110 -0
  55. package/template/.harness/scripts/memory-archive.sh +129 -0
  56. package/template/.harness/scripts/memory-recall.sh +197 -0
  57. package/template/.harness/scripts/memory-snapshot.sh +124 -0
  58. package/template/.harness/scripts/post-migration.sh +58 -0
  59. package/template/.harness/scripts/precommit-cycles.sh +74 -0
  60. package/template/.harness/scripts/precommit-typecheck.sh +69 -0
  61. package/template/.harness/scripts/scratchpad-recall.sh +83 -0
  62. package/template/.harness/scripts/scratchpad-update.sh +39 -0
  63. package/template/.harness/scripts/standalone-bootstrap.md +443 -0
  64. package/template/.harness/skills/abandon/SKILL.md +157 -0
  65. package/template/.harness/skills/add-anti-flag/SKILL.md +205 -0
  66. package/template/.harness/skills/add-constitution-clause/SKILL.md +244 -0
  67. package/template/.harness/skills/audit-spec/SKILL.md +395 -0
  68. package/template/.harness/skills/commit/SKILL.md +270 -0
  69. package/template/.harness/skills/constitution-edit/SKILL.md +292 -0
  70. package/template/.harness/skills/db-schema/SKILL.md +145 -0
  71. package/template/.harness/skills/db-schema/references/methodology.md +202 -0
  72. package/template/.harness/skills/execution-plan/SKILL.md +346 -0
  73. package/template/.harness/skills/feature-draft/SKILL.md +426 -0
  74. package/template/.harness/skills/handoff/SKILL.md +211 -0
  75. package/template/.harness/skills/implement/SKILL.md +355 -0
  76. package/template/.harness/skills/init/SKILL.md +805 -0
  77. package/template/.harness/skills/next/SKILL.md +245 -0
  78. package/template/.harness/skills/offload/SKILL.md +134 -0
  79. package/template/.harness/skills/pickup/SKILL.md +213 -0
  80. package/template/.harness/skills/recall/SKILL.md +159 -0
  81. package/template/.harness/skills/remember/SKILL.md +205 -0
  82. package/template/.harness/skills/spec-finalize/SKILL.md +196 -0
  83. package/template/.harness/skills/test-fix/SKILL.md +363 -0
  84. package/template/.harness/skills/uninstall/SKILL.md +370 -0
  85. package/template/.harness/state/install.json +83 -0
  86. package/template/AGENTS.md +262 -0
  87. package/template/CCC_MAGI_LICENSE +201 -0
  88. package/template/CCC_MAGI_README.md +986 -0
  89. package/template/CLAUDE.md +658 -0
  90. package/template/codex.md +39 -0
  91. package/template/constitution.md +164 -0
  92. package/template/course/README.md +15 -0
  93. package/template/course/course_code(example)/exam/README.md +2 -0
  94. package/template/course/course_code(example)/slide/slide_example-1.pdf +40 -0
  95. package/template/course/course_code(example)/slide/slide_example-2.pdf +40 -0
  96. package/template/docs/features/slide-query-implementation.md +79 -0
  97. package/template/docs/features/slide-query.md +211 -0
  98. package/template/docs-harness/README.md +42 -0
  99. package/template/docs-harness/adoption-playbook.md +373 -0
  100. package/template/docs-harness/ccc-step1-driver-template.md +288 -0
  101. package/template/docs-harness/cli-configs-README.md +78 -0
  102. package/template/docs-harness/context-architecture-v2.md +249 -0
  103. package/template/docs-harness/design-spec.md +437 -0
  104. package/template/docs-harness/memory-layer.md +135 -0
  105. package/template/docs-harness/retrospective-notes.md +204 -0
  106. package/template/gitignore +106 -0
@@ -0,0 +1,346 @@
1
+ ---
2
+ name: execution-plan
3
+ description: This skill should be used after a feature spec is finalized (stage 2) and (if applicable) the data-layer schema is approved (stage 3), to produce a per-file implementation checklist before writing any feature code. It is stage 4 of the feature workflow and produces {{spec_dir}}<name>-plan.md. Use this always — do not start writing feature code without a plan. Trigger when the user invokes /execution-plan, says "write the plan", "plan how to implement", "plan the implementation", "what files need to change for X", or when moving from schema to feature code.
4
+ argument-hint: [feature-name]
5
+ ---
6
+
7
+ # /execution-plan
8
+
9
+ Drive stage 4 of the feature workflow: produce a per-file implementation checklist that the user can review before implementation starts.
10
+
11
+ ## Invocation
12
+
13
+ - Typical: `/execution-plan <feature-name>` (e.g., `/execution-plan messaging`)
14
+ - `$ARGUMENTS` identifies the feature; reads `{{spec_dir}}$ARGUMENTS.md` and produces `{{spec_dir}}$ARGUMENTS-plan.md`.
15
+
16
+ ## Authoritative sources
17
+
18
+ Load before planning:
19
+
20
+ 1. **`{{spec_dir}}$ARGUMENTS.md`** — finalized **CEO spec** from Stage 2 (plain language)
21
+ 2. **`{{implementation_dir}}$ARGUMENTS-implementation.md`** — manager-domain implementation notes from Stage 1/2 (when present); contains routing tables, state keys, library decisions, etc. that the plan should respect
22
+ 3. **Stage 3 migration** (if this feature touches the data layer and `backend_db_type` is configured) — produced under `{{migration_dir}}` by `/db-schema`
23
+ 4. **Root `CLAUDE.md`** — repo structure, dependency flow, tool map, two-file model, lanes
24
+ 5. **`constitution.md`** — universal core (audit invariant, spec-reality sync, smoke-test mandate)
25
+ 6. **`{{rule_sources}}`** — scoped rule docs (pinned versions, design tokens, area-specific conventions)
26
+
27
+ ## Version verification rule (context7)
28
+
29
+ Claude's training data has an effective cutoff. For libraries that have moved past it with breaking API changes, Claude confidently suggests stale APIs — sometimes with plausible-looking method names that no longer exist. This catches plan-time staleness before it cascades into Stage 5 implementation.
30
+
31
+ ### When to verify via `context7`
32
+
33
+ **Always verify** when the plan references the API surface of any library in `{{high_trap_libraries}}` (filled at /init based on the project's stack — typically frameworks / SDKs / libraries with frequent breaking changes).
34
+
35
+ **Also verify** any other external library / SDK / platform API where version-specific behavior is load-bearing for the decision (a native module's TS API surface, a CLI tool's flag set, etc.).
36
+
37
+ ### When to skip
38
+
39
+ - Language primitives (`useState`, `Array.map`, `Promise.all`, `Object.entries`, etc., per the project's primary language)
40
+ - Stable, long-lived framework patterns
41
+ - Project-internal code
42
+ - Patterns where a recent commit or test in this codebase already exercises them correctly — that's stronger evidence than docs
43
+
44
+ ### Inline annotation
45
+
46
+ Each verified decision gets a bullet attached to its file or step in the plan:
47
+
48
+ ```
49
+ - [ ] `<path>/<file>` — <one-line purpose>
50
+ • verified: <library> <version> — <key facts>. (context7)
51
+ ```
52
+
53
+ Inline annotations make verification auditable later — future-you (or the implementer) can see which decisions were checked and which weren't.
54
+
55
+ ### When `context7` fails
56
+
57
+ If `context7` is unreachable or returns nothing useful for a library, do NOT guess. Annotate `• unverified: <library> — recommend manual check before implementation` and surface to the user before finalizing the plan.
58
+
59
+ ### Canonical-source escalation
60
+
61
+ `context7` is a third-party docs mirror. Its snapshots can be incomplete. The rule above is sufficient for **additive** lookups (verifying an API before using it). For two cases the bar is higher:
62
+
63
+ **Destructive findings.** When a lookup conclusion would drive a _removal_, _deletion_, _rename_, or contradicts working code already in the repo, you MUST also fetch the canonical source — official docs site or upstream GitHub README — via WebFetch, and cite the URL. `context7` alone is not enough.
64
+
65
+ **Negative findings.** Concluding "feature X is unsupported" or "field Y doesn't exist" requires positive citation of an exhaustive reference (e.g., a "supported fields" table on the canonical doc page) that demonstrably omits it. "I queried `context7` and didn't see it" is NOT a valid basis for action — the mirror's snapshot may be incomplete.
66
+
67
+ **Asymmetric burden.** Adding new code based on a lookup needs one source. Removing or contradicting working code based on a lookup needs canonical confirmation. Working configuration is its own evidence; deleting it needs stronger proof than confirming a missing line in one mirror.
68
+
69
+ **URL in annotation.** When the citation is canonical, format the annotation as `(canonical: <URL>)` instead of `(context7)` so the source is auditable later. Both forms are valid; the format makes the strength of the citation visible.
70
+
71
+ ## Workflow
72
+
73
+ 1. **Read the spec** — extract every screen, user action, data dependency, and external integration.
74
+
75
+ 2. **Walk the feature folder structure** — for this feature, decide which subfolders are needed based on `{{feature_folder_pattern}}`. Typical shapes (adapt to the project's actual structure):
76
+
77
+ - `<feature_root>/screens/` or equivalent entry layer
78
+ - `<feature_root>/components/` (UI building blocks)
79
+ - `<feature_root>/hooks/` or `<feature_root>/composables/` (behavior)
80
+ - `<feature_root>/queries/` or `<feature_root>/api/` (data access)
81
+ - `<feature_root>/utils/` (optional)
82
+ - `<feature_root>/contexts/` or `<feature_root>/store/` (optional)
83
+ - Route / entry-point wiring (if the project has a router)
84
+
85
+ 3. **Identify cross-layer work** — does this feature need:
86
+
87
+ - New shared UI primitives? (If yes, list each with a note on platform-divergence needs.)
88
+ - New shared helpers? (Only if another feature will reuse.)
89
+ - New i18n keys for any of `{{supported_locales}}`? (List them by namespace.)
90
+ - Backend changes (only if `backend_code_paths` is configured)?
91
+ - Other integrations (search index, queue, etc.)?
92
+
93
+ 4. **Build the file-by-file checklist** using the template below. As you write each entry whose correctness depends on a specific library version's behavior, **verify against current docs via `context7`** (see "Version verification rule" above) and add the inline `• verified:` annotation.
94
+
95
+ 5. **Flag any open design decisions** that surfaced while planning. Do not resolve them unilaterally — stop and ask the user.
96
+
97
+ 6. **Present the plan AS A VISIBLE TODOLIST** — see Step 6a below. The user reviews and approves before auditor judgment audit (Step 7). **Wait for user response before continuing.**
98
+
99
+ ### Step 6a — Surface plan as a visible TodoList (MANDATORY)
100
+
101
+ After writing the plan markdown but before asking for CEO approval, materialize the plan as a **user-visible todolist**. This is the most important UX moment in the workflow — CEO needs to SEE what's about to be changed before any code is written.
102
+
103
+ **Branch on host CLI:**
104
+
105
+ ```bash
106
+ # Detect which CLI is currently running this skill
107
+ # Claude Code sets CLAUDE_PROJECT_DIR; absence suggests non-Claude
108
+ if [ -n "$CLAUDE_PROJECT_DIR" ]; then
109
+ HOST_CLI="claude"
110
+ else
111
+ HOST_CLI="other"
112
+ fi
113
+ ```
114
+
115
+ **For Claude Code** (`HOST_CLI=claude`): use the built-in **TodoWrite tool**. Call it ONCE with all plan files as Task entries:
116
+
117
+ ```
118
+ For each file in the plan, create a Task with:
119
+ - subject: <file path> (e.g., "src/auth/login.ts")
120
+ - description: <1-line summary> (from the plan entry)
121
+ - activeForm: "Writing <file path>"
122
+ - status: pending
123
+ ```
124
+
125
+ This populates Claude Code's sidebar todolist — CEO sees it immediately.
126
+
127
+ **For other CLIs** (Codex / Cursor / Gemini / etc.): write a markdown todolist to `.harness/state/workflow-checkpoints/<feature>.todo.md`:
128
+
129
+ ```markdown
130
+ # <feature> — Execution Plan TodoList
131
+
132
+ Generated: <ISO timestamp>
133
+ Source plan: docs/features/<feature>-plan.md
134
+
135
+ ## Files to create/modify (N total)
136
+
137
+ - [ ] **1.** `src/auth/types.ts` — Type definitions for login flow
138
+ - [ ] **2.** `src/auth/login.ts` — OTP verification + session creation
139
+ - [ ] **3.** `src/auth/session.ts` — Session lifecycle
140
+ - [ ] **4.** `src/auth/middleware.ts` — Route protection
141
+ - ...
142
+
143
+ Status legend:
144
+ - [ ] = pending
145
+ - [~] = in progress (currently being written)
146
+ - [x] = completed
147
+ ```
148
+
149
+ `/implement` reads/updates this file in real time.
150
+
151
+ **Display to CEO** (locale-appropriate):
152
+
153
+ ```
154
+ 📋 Stage 4 计划写完了 (`docs/features/<feature>-plan.md`)
155
+ 要改 N 个文件 — 完整清单已经在<todolist|.harness/state/workflow-checkpoints/<feature>.todo.md>给你看了
156
+
157
+ 快速过一下 — 看起来合理吗?
158
+ 👉 「OK」/「合理」/「approve」 — 继续做 audit + 进 Stage 5 编程
159
+ 👉 「改一下」+ 说改哪个/加哪个 — 我修改 plan + todolist
160
+ 👉 「跳过文件 X」 — 我把那个文件从计划里删
161
+ 👉 「先停一下」 — 我等你看完
162
+ 👉 「放弃」 — 不做这个功能了
163
+
164
+ (我会等你确认 — Stage 5 一开始就改真实文件了,确认后再走)
165
+ ```
166
+
167
+ Do NOT proceed to Step 7 (auditor audit) without CEO approval of the plan.
168
+
169
+ 7. **Auditor judgment audit on the plan.** Run after the user approves the file list and any open decisions are resolved:
170
+
171
+ ```bash
172
+ bash .harness/scripts/auditor-gate.sh review <feature> 4 \
173
+ "Review this execution plan against the CEO spec at {{spec_dir}}<feature>.md, the implementation notes (if present) at {{implementation_dir}}<feature>-implementation.md, the migration at {{migration_dir}} (if applicable), and the project's pinned-versions doc (if any). Your job: catch what shared-model planning may miss before any code is written. Look for: false assumptions in library API surface (a planned call that doesn't exist in the pinned version, a method signature that changed); dependency-flow violations (per the project's declared {{dependency_flow}}, if non-empty); plan-spec contradictions (the plan implements scenario X.Y differently from how the CEO spec describes it; a scenario classified as [Required automated test] in the spec has no test entry in the plan); missing files (a referenced new component / hook / query has no corresponding 'Files to create' entry; an i18n key set used by the plan isn't listed); risk areas the plan glosses over (a complex async flow with no explicit error/timeout strategy; a long list view with no memoization plan); whether the implementation order will compile cleanly at each step (e.g., a hook that imports from a query that doesn't yet exist). Do NOT flag: project conventions already in scoped CLAUDE.md files or {{anti_flag_rules}} (those are reviewer territory at Stage 5); formatting; naming preferences; refactor opinions; speculative future-proofing." \
174
+ {{spec_dir}}<feature>-plan.md
175
+ ```
176
+
177
+ Read the gate's exit code:
178
+
179
+ - **Exit 0 (PASS / CONCERNS / WAIVED)** — surface any advisory items. For CONCERNS, also surface the logged warning path (`.harness/audits/concerns-*.json`) and remind the CEO to review before commit. For WAIVED, surface the `waiver_reason`. Stage 4 complete; user may proceed to `/implement <feature>`.
180
+ - **Exit 2 (FAIL)** — surface every blocking item verbatim. Halt. Update the plan to address findings, re-invoke `/execution-plan` (or have the gate re-run manually after edits).
181
+ - **Exit 1 (script error / Universal Core WAIVED rejected / missing waiver_reason / legacy verdict)** — surface stderr, halt.
182
+
183
+ The gate writes `.harness/state/auditor-approvals/<feature>-stage4.json`. Stage 5 (`/implement`) checks for this file's existence.
184
+
185
+ ## Plan template
186
+
187
+ Write the plan to `{{spec_dir}}$ARGUMENTS-plan.md`:
188
+
189
+ ```markdown
190
+ # Execution plan: <Feature Name>
191
+
192
+ Spec: `{{spec_dir}}$ARGUMENTS.md`
193
+ Migration: `{{migration_dir}}<timestamp>_$ARGUMENTS.<ext>` (or N/A — no backend changes)
194
+
195
+ ## Scope of this plan
196
+
197
+ One paragraph. What this plan covers and what it defers.
198
+
199
+ ## Files to create
200
+
201
+ ### Feature code (under <feature_root>)
202
+
203
+ - [ ] `screens/<Name>Screen.<ext>` — <one line>
204
+ - [ ] `queries/use<Entity>.<ext>` — <one line>
205
+ • verified: <library> <version> — <key facts> (context7) ← only when API-surface depends on version
206
+ - [ ] `components/<Component>.<ext>` — <one line>
207
+ - [ ] `hooks/use<Behavior>.<ext>` — <one line>
208
+ - ...
209
+
210
+ ### Route / entry wiring (if applicable)
211
+
212
+ - [ ] `<route-path>` — re-export or mount the screen
213
+
214
+ ### New shared UI primitives — only if existing ones don't cover
215
+
216
+ - [ ] `<Primitive>` — <why needed, including platform divergence notes if any>
217
+
218
+ ### Shared helpers — only if multi-feature reuse is required
219
+
220
+ - [ ] `<helper>` — <why shared>
221
+
222
+ ### Backend (only if `backend_code_paths` is configured)
223
+
224
+ - [ ] Migration already produced in Stage 3
225
+ - [ ] Function / endpoint `<path>` — <purpose> (if applicable)
226
+
227
+ ### i18n keys (for each locale in `{{supported_locales}}`)
228
+
229
+ - [ ] `$ARGUMENTS.title`
230
+ - [ ] `$ARGUMENTS.<key>`
231
+ - ...
232
+
233
+ ## Files to modify
234
+
235
+ - [ ] `<path>` — <what changes>
236
+
237
+ ## Tests
238
+
239
+ Per the project's testing convention. Co-locate or follow `{{test_framework}}`'s convention.
240
+
241
+ - [ ] `queries/use<Entity>.test.<ext>` — <scenarios>
242
+ - [ ] `components/<Component>.test.<ext>` — <scenarios>
243
+ - [ ] `hooks/use<Behavior>.test.<ext>` — <scenarios>
244
+
245
+ ## Implementation order
246
+
247
+ A numbered sequence that minimizes integration pain. Typically:
248
+
249
+ 1. Queries and hooks (data layer)
250
+ 2. Components (pure UI)
251
+ 3. Screens (compose components + hooks)
252
+ 4. Route / entry wiring
253
+ 5. Tests alongside each of the above
254
+ 6. i18n keys (can run in parallel with earlier steps)
255
+
256
+ ## Open decisions
257
+
258
+ Numbered list of things surfaced during planning that the user must decide.
259
+
260
+ ## Review gates
261
+
262
+ - [ ] Junior reviewers from `{{junior_reviewers}}` (mechanically selected from diff paths at Stage 5)
263
+ - [ ] Auditor ({{auditor_model}}) judgment audit at Stage 5
264
+ ```
265
+
266
+ ## Completion criteria
267
+
268
+ Stage 4 is complete when:
269
+
270
+ - `{{spec_dir}}$ARGUMENTS-plan.md` exists
271
+ - User has reviewed and approved the file list and order
272
+ - All open decisions surfaced during planning are resolved or explicitly deferred
273
+ - Every plan entry whose correctness depends on a versioned library API has a `• verified:` annotation (or an explicit `• unverified:` with reason)
274
+ - `.harness/scripts/auditor-gate.sh` returned exit 0 for stage 4 (`PASS`, `CONCERNS`, or `WAIVED`) — `.harness/state/auditor-approvals/<feature>-stage4.json` exists with a non-FAIL `verdict`. CONCERNS advances but the logged warning must be surfaced to the CEO before commit.
275
+
276
+ Do not start writing feature code during Stage 4. The plan is the Stage 4 artifact; code is Stage 5.
277
+
278
+ ---
279
+
280
+ ## Checkpoint + decision-log integration (MAGI Archivist)
281
+
282
+ After auditor-gate passes for Stage 4:
283
+
284
+ ```bash
285
+ .harness/scripts/checkpoint-write.sh \
286
+ --feature <feature-slug> \
287
+ --stage 5 \
288
+ --stage-complete 4 \
289
+ --artifact-plan docs/features/<feature-slug>-plan.md \
290
+ --append-audit "$(jq -c '{stage:4, verdict, risk:.risk_score, at:now|todate}' .harness/state/auditor-approvals/<feature>-stage4.json)"
291
+
292
+ # Log any material trade-off the plan made (e.g., chose technique X over Y):
293
+ .harness/scripts/decision-log-append.sh \
294
+ --feature <feature-slug> --stage 4 --by "CEO" \
295
+ --decision "<e.g. 'chose pessimistic lock over optimistic; reads are 10x more common'>"
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Final message to CEO (with TodoWrite — Stage 4 → Stage 5)
301
+
302
+ After Stage 4 completes (execution plan written + auditor verdict), this is the **MOST important UX moment in the workflow**: CEO needs to SEE what's about to be changed before any code is written.
303
+
304
+ **MANDATORY step**: Before printing the final message, **call the TodoWrite tool** (Claude Code internal) with one Task entry per file in the execution plan:
305
+
306
+ For each file in `docs/features/<feature>-plan.md`:
307
+ - `subject`: the file path (e.g., "src/auth/login.ts")
308
+ - `description`: 1-line summary from the plan (e.g., "OTP verification + session creation")
309
+ - `activeForm`: "Writing src/auth/login.ts"
310
+ - `status`: pending
311
+
312
+ This populates Claude Code's user-visible todolist sidebar. CEO can SEE the planned changes.
313
+
314
+ **For non-Claude CLIs** (Codex / Cursor / Gemini etc): TodoWrite tool may not exist. Fallback: write a markdown todolist to `.harness/state/workflow-checkpoints/<feature>.todo.md`:
315
+
316
+ ```markdown
317
+ # <feature> — Execution Plan TodoList
318
+
319
+ - [ ] src/auth/types.ts — Type definitions
320
+ - [ ] src/auth/login.ts — OTP verification + session creation
321
+ - [ ] src/auth/session.ts — Session lifecycle
322
+ - ...
323
+ ```
324
+
325
+ Then surface to CEO either way (locale-appropriate):
326
+
327
+ ```
328
+ ✅ Stage 4 完成 — <feature> 的执行计划写好了
329
+ 计划文档: docs/features/<feature>-plan.md
330
+ 要改 N 个文件 (已经显示在 todolist 里给你看)
331
+ MAGI Verdict: <PASS/CONCERNS>, risk = M
332
+
333
+ 📋 请快速过一下要改的文件,确认计划合理:
334
+ [打开 Claude Code 的 todolist 看完整列表]
335
+
336
+ 接下来可以:
337
+ 👉 「开始」/「继续」/「写吧」/「OK」 — 我开始编程 (Stage 5)
338
+ 👉 「改一下计划」+ 说改啥 — 重做 Stage 4
339
+ 👉 「跳过文件 X」 — 我把那个文件从计划里删掉
340
+ 👉 「先停一下我想想」 — 等你
341
+ 👉 「放弃」 — 不做这个功能了
342
+
343
+ (写代码前我要你确认 — 一旦开始 Stage 5 就会创建/修改真实文件)
344
+ ```
345
+
346
+ On "开始" / "继续" / "写吧" → invoke `/implement <feature>` silently.