Repository navigation
Commit 7f2a10f
committed
✨ Make the approved Plan the result, and the workflow readable end to end (#260)
The command document is now a workflow somebody can read straight through. It
opens by saying what `xmd prompt` is for — a Prompt describes steps, the
components carry them out, and the coding agent turns both into one document
that explains and executes the sequence — and every stage after that is a
heading: creating the first draft, checking and repairing it, reviewing it,
continuing from the decision, returning the approved Plan.
Every Plan now begins with one descriptive level-one title, and the generation,
repair and revision turns each ask for it alongside the steps-beside-components
structure, so a replacement cannot quietly drop either. The worked example is a
titled Plan itself. This is an authorship and human-review requirement, not a
rule hidden in the checker: `<CheckDraft>` reports structural facts and would
accept a titleless Plan that a person would send back.
`<ValidateCandidate>` is `<CheckDraft>` throughout. It checks a draft rather than
validating a candidate, and nothing about what it does changed.
The review choices are the words a person reads — Approve, Request changes,
Stop — with no internal spelling behind them. A tenth draft that still has
problems now offers something better than only stopping: Explain what went
wrong makes one more ordinary turn in the same Session, carrying only the final
diagnostics, because the conversation already holds the Prompt, the catalog and
every draft. It asks for an explanation and explicitly not another Plan; its
answer is inert text, reopens no draft limit, is reported as the coding agent's
own words, and ends the command. So the host's instruction layer no longer
demands that every answer be document source — it says only that an answer
belongs to the message that asked for it, and each authored turn owns its own
shape.
The approved Plan is the command's result. By default it goes to stdout, byte
for byte, with nothing this command added, so it can be piped, diffed or read
before anybody commits to it. `--output` puts those bytes in a file instead,
exclusively created. `--run` runs it. With both, the file is written first and
only a successful write is followed by the run. `--save` is gone rather than
aliased; nothing has been released to keep compatible with.
That makes most execution flags conditional, so they are refused rather than
ignored: a caller who asks for a journal, a permission mode or an exec deadline
from a command that runs nothing has not been answered. `--include`,
`--agent-provider`, `--default-agent`, `--session` and `--timeout` keep working
always — they build the catalog, settle the agent, name the conversation, admit
properties and bound the command. A journal exists only when `--run` begins.
Claude-Session: https://claude.ai/code/session_015HcqB9kJM9KFnMNToAuZF61 parent 1e44987 commit 7f2a10f
15 files changed
Lines changed: 792 additions & 290 deletions
File tree
- packages/cli
- src
- documents
- tests
- support
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3545 | 3545 | | |
3546 | 3546 | | |
3547 | 3547 | | |
3548 | | - | |
| 3548 | + | |
3549 | 3549 | | |
3550 | 3550 | | |
3551 | 3551 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
113 | 119 | | |
114 | 120 | | |
115 | 121 | | |
| |||
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
242 | | - | |
243 | | - | |
| 248 | + | |
244 | 249 | | |
245 | 250 | | |
246 | 251 | | |
| |||
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
252 | | - | |
| 257 | + | |
253 | 258 | | |
254 | 259 | | |
255 | | - | |
256 | | - | |
| 260 | + | |
| 261 | + | |
257 | 262 | | |
258 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
259 | 268 | | |
260 | 269 | | |
261 | 270 | | |
| |||
1659 | 1668 | | |
1660 | 1669 | | |
1661 | 1670 | | |
1662 | | - | |
1663 | | - | |
| 1671 | + | |
| 1672 | + | |
1664 | 1673 | | |
1665 | 1674 | | |
1666 | | - | |
1667 | | - | |
1668 | | - | |
1669 | | - | |
1670 | | - | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
1671 | 1680 | | |
1672 | | - | |
1673 | | - | |
1674 | | - | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
1675 | 1687 | | |
1676 | 1688 | | |
1677 | 1689 | | |
1678 | 1690 | | |
1679 | 1691 | | |
1680 | | - | |
1681 | | - | |
1682 | | - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
1683 | 1699 | | |
1684 | 1700 | | |
1685 | 1701 | | |
1686 | 1702 | | |
1687 | | - | |
1688 | | - | |
1689 | | - | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
1690 | 1712 | | |
1691 | 1713 | | |
1692 | 1714 | | |
| |||
1935 | 1957 | | |
1936 | 1958 | | |
1937 | 1959 | | |
1938 | | - | |
| 1960 | + | |
| 1961 | + | |
1939 | 1962 | | |
1940 | 1963 | | |
1941 | 1964 | | |
| |||
0 commit comments