@@ -6,6 +6,7 @@ to align with the human before touching code, not to produce a 50-step document.
66## When to write a plan
77
88Before any task that:
9+
910- touches more than one file,
1011- changes a public interface, or
1112- involves a non-obvious design decision.
@@ -16,7 +17,7 @@ Write the plan, share it, wait for confirmation before starting.
1617
1718## Template
1819
19- ```
20+ ```` markdown
2021# Plan: <short title >
2122
2223## What and why
@@ -34,32 +35,74 @@ Write the plan, share it, wait for confirmation before starting.
3435Steps:
35361 . …
36372 . …
37- Checkpoint: run `test/suite/<group>` via MCP. All green before moving on.
38+ Checkpoint:
39+
40+ ``` bash
41+ # MCP (preferred)
42+ get_test_command test_args=[" suite/<group>" ]
43+ then generate_report
44+
45+ # Fallback
46+ julia --project=@. -e ' using Pkg; Pkg.test(; test_args=["suite/<group>"])' 2>&1 | tee /tmp/< branch> _phaseA.log
47+ grep -E " Error|Fail|Test Summary" /tmp/< branch> _phaseA.log
48+ ```
49+
50+ All green before moving on.
3851
3952### Phase B — <name >
53+
4054Steps:
41551 . …
42- Checkpoint: run `test/suite/<group>` + full suite.
56+ Checkpoint:
57+
58+ ``` bash
59+ # MCP (preferred)
60+ get_test_command test_args=[" suite/<group1>" , " suite/<group2>" ]
61+ then generate_report
62+
63+ # Final phase only: full suite
64+ julia --project=@. -e ' using Pkg; Pkg.test()' 2>&1 | tee /tmp/< branch> _final.log
65+ grep -E " Error|Fail|Test Summary" /tmp/< branch> _final.log
66+ ```
4367
4468…
4569
4670## Human checkpoints
71+
4772- ⛔ Ask before first commit.
4873- ⛔ Ask before pushing to a shared branch.
4974- ⛔ Ask before deleting files that were not created in this task.
5075- ⛔ Ask if a design decision arises that was not in the plan.
5176
5277## Out of scope
78+
5379<List things explicitly not done in this task. >
54- ```
80+ ````
5581
5682---
5783
5884## Rules for filling in the template
5985
6086** Phases** — one phase = one coherent unit that can be tested independently. A phase
61- ends with a test checkpoint (run the affected test suite via the MCP ` get_test_command `
62- tool, then ` generate_report ` ). Never skip the checkpoint.
87+ ends with a test checkpoint. Never skip the checkpoint.
88+
89+ ** Test checkpoints** — always use the MCP ` get_test_command ` tool with ` test_args ` to
90+ run only the affected test groups, then ` generate_report ` to parse the result. If MCP
91+ is unavailable, fall back to:
92+
93+ ``` bash
94+ # Phase-specific (preferred during intermediate phases)
95+ julia --project=@. -e ' using Pkg; Pkg.test(; test_args=["suite/<group>"])' \
96+ 2>&1 | tee /tmp/< branch> _< phase> .log
97+ grep -E " Error|Fail|Test Summary" /tmp/< branch> _< phase> .log
98+
99+ # Full suite (mandatory for the last phase only)
100+ julia --project=@. -e ' using Pkg; Pkg.test()' \
101+ 2>&1 | tee /tmp/< branch> _final.log
102+ grep -E " Error|Fail|Test Summary" /tmp/< branch> _final.log
103+ ```
104+
105+ Never run the full suite for intermediate phases — it is too slow and hides errors.
63106
64107** Steps** — file-level granularity. "Edit ` src/X/y.jl ` to add method ` f ` " not "implement
65108the feature". Concrete enough that a step is either done or not.
@@ -70,14 +113,23 @@ missed.
70113
71114** Docstrings** — always the last step of the last phase, once the API is stable.
72115
116+ ** Code snippets** — include short code snippets directly in the plan to guide the
117+ implementer. This applies to:
118+
119+ - * Source changes* : show the before/after signature or struct definition.
120+ - * Call-site updates* : show the exact old and new lines when renaming symbols.
121+ - * Test patterns* : show the test structure (fake type + testset skeleton) when the
122+ test pattern is non-obvious.
123+ Snippets should be * concise shapes* , not full implementations.
124+
73125** Out of scope** — explicit. Prevents scope creep and clarifies what the human should
74126not expect after the plan is executed.
75127
76128---
77129
78130## Concrete example structure (abbreviated)
79131
80- ```
132+ ```` markdown
81133# Plan: rename content → dynamics trait
82134
83135## What and why
@@ -97,23 +149,43 @@ names the axis. Purely mechanical, no behavior change.
97149Steps:
981501 . Rename src/Traits/content.jl → dynamics.jl; update all names inside.
991512 . Update include path in src/Traits/Traits.jl; update exports.
100- Checkpoint: test/suite/traits — all green.
152+ Checkpoint:
153+
154+ ``` bash
155+ get_test_command test_args=[" suite/traits" ] # MCP
156+ # fallback: julia --project=@. -e 'using Pkg; Pkg.test(; test_args=["suite/traits"])' 2>&1 | tee /tmp/rename_traits.log
157+ ```
101158
102159### Phase B — Adapt consumers (Configs, Solutions)
160+
103161Steps:
162+
1041631 . Update src/Configs/* (content_trait → dynamics_trait, value names).
1051642 . Update src/Solutions/building.jl.
106- Checkpoint: test/suite/configs + test/suite/solutions — all green.
165+ Checkpoint:
166+
167+ ``` bash
168+ get_test_command test_args=[" suite/configs" , " suite/solutions" ] # MCP
169+ ```
107170
108171### Phase C — Tests + docs
172+
109173Steps:
174+
1101751 . Rename and update test/suite/traits/test_content.jl → test_dynamics.jl.
1111762 . Update docs/api_reference.jl file list.
112- Checkpoint: full suite green.
177+ Checkpoint (full suite — last phase):
178+
179+ ``` bash
180+ get_test_command # MCP, no test_args = full suite
181+ # fallback: julia --project=@. -e 'using Pkg; Pkg.test()' 2>&1 | tee /tmp/rename_final.log
182+ ```
113183
114184## Human checkpoints
185+
115186- ⛔ Ask before commit after Phase C.
116187
117188## Out of scope
189+
118190Parametrizing AbstractSystem/AbstractFlow by the dynamics trait (see action_plan.md Phase C/D).
119- ```
191+ ````
0 commit comments