You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #260 and PR #657 introduced xmd prompt after the latest published release. The command does substantially more than perform one prompt: it turns a person’s Prompt into an executable Plan, checks and repairs drafts, presents them for human review, and delivers the exact approved source through the selected output mode.
That command name now conflicts with the component vocabulary. <Prompt> means one Agent turn. Prompting is one mechanism inside the larger authorship workflow, while the product the command creates is a Plan.
Because no published release contains xmd prompt, this is a clean rename. There is no compatibility alias, session migration, or deprecated spelling.
Decision
Rename the authorship command from:
xmd prompt "<Prompt>"
to:
xmd plan "<Prompt>"
Describe it as:
Create an executable Plan from a Prompt and review it before writing or running it.
This is a naming change, not a behavioral change. The approved Plan remains the command’s primary result:
Invocation
Result
xmd plan "<Prompt>"
print the exact approved source to stdout; do not run it
xmd plan "<Prompt>" --output <path>
exclusively create the file with the exact source; print no source and do not run it
xmd plan "<Prompt>" --run
run the exact approved source through the ordinary supplied-source path; print no source
xmd plan "<Prompt>" --output <path> --run
exclusively create the file first, then run only if creation succeeds
Approval selects exact source. Complete authorship teardown and final admission still occur before any of these result modes. The unreleased --save spelling remains absent; --output is the file option.
xmd prompt becomes an ordinary unknown command. It does not load the packaged document, build a catalog, start an Agent or Session, elicit an answer, create a file or journal, or execute a Plan. Do not retain an alias or placeholder. A future xmd prompt command may separately expose a thin one-turn equivalent of <Prompt>; that behavior is outside this issue.
<Prompt> remains unchanged.
Canonical terminology
A Prompt is the person’s original natural-language request.
A Plan is the executable XMD program produced from that Prompt. It combines reader-facing prose with the components that carry the prose out.
The plan command document is the exact packaged Markdown document that implements xmd plan generation, checking, repair, review, revision, approval, stopping, explanation, and exhaustion. It is not itself a Plan.
The authorship profile is the constrained trusted-host context in which the plan command document runs. It is not a “plan profile” or “draft profile”: neither a draft nor the approved Plan executes inside it.
A draft is unapproved candidate Plan source. It remains inert data throughout authorship.
Keep prompt in names that genuinely describe the Prompt input, the <Prompt> component, an Agent turn, or Prompt failure semantics. Replace it where it means the renamed CLI command, its packaged command document, its profile, or its delivered-source identity.
Identity and namespace rename
The clean rename includes every identity that represented the unreleased command:
Existing identity
Replacement
CLI command xmd prompt
xmd plan
packaged asset prompt-command.md
plan-command.md
packaged source identity <prompt-command>
<plan-command>
approved supplied-source identity <prompt>
<plan>
generated logical session xmd-prompt:<UUID>
xmd-plan:<UUID>
profile root ~/.xmd/prompt/sessions
~/.xmd/plan/sessions
“prompt command document”
“plan command document”
“prompt profile”
“authorship profile”
An explicit --session <name> still uses the exact supplied logical name. Its directory is now ~/.xmd/plan/sessions/<sha256(name)> and retains the existing continuation and cleanup contract. The command never reads, migrates, aliases, or removes the unreleased .xmd/prompt namespace.
The final Plan runs under <plan> only after authorship-profile teardown. It receives the caller-selected ordinary run permissions and Agent configuration and inherits neither the authorship Session nor its instruction layer.
Required work
Rename the CLI command, selection, fixed scanner, help, diagnostics, configuration, dispatch, and command-specific source/test vocabulary from prompt to plan.
Rename command-specific modules and symbols where prompt names the old command. Use authorship for the constrained profile and preserve Prompt where it names the input, component, turn, or Agent API behavior.
Rename packages/cli/src/documents/prompt-command.md to plan-command.md, including its package-relative loader constant, source identity, compiled-binary includes, npm asset copying evidence, and release specification.
Rename the command specification to specs/plan-command-spec.md and update every reference to it.
Update architecture.md, the executable-MDX, ACP client, root-property and release specifications, CLI documentation, examples, fixtures, tests, comments, and generated help.
Change command-authored failure messages and protected-component origin text from xmd prompt to xmd plan without changing when they win or what effects follow.
Change the packaged document’s title and prose to xmd plan while preserving its approved stages, authored policy, exact return behavior, and complete Plan instructions.
Complete authorship-profile teardown and final admission precede stdout, file output, journal creation, or execution.
Default stdout and --output are byte-exact. --run remains explicit. With --output --run, writing completes before execution.
A journal is created only when final Plan execution begins and contains no authorship activity.
Invocation-unique sessions remain ephemeral; explicitly named sessions retain their existing continuation behavior in the new namespace.
The exact approved bytes are the bytes admitted, printed, written, or executed.
No retry, review, explanation, output, execution, authority, cancellation, teardown, or failure-precedence policy moves between Markdown and TypeScript.
Acceptance criteria
ID
Boundary
Required evidence
N1
Command selection
xmd plan "<Prompt>" reaches the merged #260 workflow; xmd prompt is an unknown command and reaches no authorship or durable effect
N2
Help
xmd plan --help is generic and effect-free and accurately describes the Prompt, approved Plan, default stdout, --output, --run, --session, property ordering, and run-only flags
N3
Result modes
Default stdout, --output, --run, and --output --run retain the exact byte, stdout-ownership, exclusive-create, and write-before-run contracts
N4
Packaged root
The byte-identical plan-command.md is loaded package-relatively and executes under <plan-command> in source runtimes, npm output, and compiled binaries; repository lookup cannot replace it
N5
Final identity
Final admission and optional execution use the exact approved source under <plan>; diagnostics and journals contain no <prompt> identity for this workflow
N6
Session namespace
Defaults use xmd-plan:<UUID> and an invocation-unique directory under .xmd/plan; --session <name> derives the stable new directory and continues normally; .xmd/prompt is never consulted or mutated
N7
Authority and lifecycle
The renamed authorship profile retains the same ceiling, one-Session ownership, cancellation, teardown, final-admission, and failure-precedence behavior
N8
Authored policy
The plan command document retains generation, checking, repair, review, revision, approval, stopping, explanation, and exhaustion in Markdown, with only command-name wording changed
N9
Prompt component
<Prompt>, its one-turn semantics, its Agent API, and genuine Prompt terminology remain unchanged
N10
Terminology sweep
No shipped help, documentation, specification, diagnostic, example, fixture, package asset, or command-specific module describes the Plan authorship workflow as xmd prompt, a prompt command document, or a prompt profile
N11
Related contract
Issue #660 names xmd plan, the plan command document, and the authorship profile without changing its separate architecture questions or scope
N12
Existing evidence
The affected #260 focused suites pass after mechanical renaming and continue to prove the original acceptance boundaries rather than replacing them with rename-only assertions
Out of scope
A new thin xmd prompt command.
An alias, deprecation period, or migration from the unreleased command or session namespace.
Any change to the generated Plan shape, authored workflow, review choices, repair bounds, output defaults, execution permissions, journal behavior, property parsing, or session lifetime.
Context
Issue #260 and PR #657 introduced
xmd promptafter the latest published release. The command does substantially more than perform one prompt: it turns a person’s Prompt into an executable Plan, checks and repairs drafts, presents them for human review, and delivers the exact approved source through the selected output mode.That command name now conflicts with the component vocabulary.
<Prompt>means one Agent turn. Prompting is one mechanism inside the larger authorship workflow, while the product the command creates is a Plan.Because no published release contains
xmd prompt, this is a clean rename. There is no compatibility alias, session migration, or deprecated spelling.Decision
Rename the authorship command from:
xmd prompt "<Prompt>"to:
xmd plan "<Prompt>"Describe it as:
This is a naming change, not a behavioral change. The approved Plan remains the command’s primary result:
xmd plan "<Prompt>"xmd plan "<Prompt>" --output <path>xmd plan "<Prompt>" --runxmd plan "<Prompt>" --output <path> --runApproval selects exact source. Complete authorship teardown and final admission still occur before any of these result modes. The unreleased
--savespelling remains absent;--outputis the file option.xmd promptbecomes an ordinary unknown command. It does not load the packaged document, build a catalog, start an Agent or Session, elicit an answer, create a file or journal, or execute a Plan. Do not retain an alias or placeholder. A futurexmd promptcommand may separately expose a thin one-turn equivalent of<Prompt>; that behavior is outside this issue.<Prompt>remains unchanged.Canonical terminology
xmd plangeneration, checking, repair, review, revision, approval, stopping, explanation, and exhaustion. It is not itself a Plan.Keep
promptin names that genuinely describe the Prompt input, the<Prompt>component, an Agent turn, or Prompt failure semantics. Replace it where it means the renamed CLI command, its packaged command document, its profile, or its delivered-source identity.Identity and namespace rename
The clean rename includes every identity that represented the unreleased command:
xmd promptxmd planprompt-command.mdplan-command.md<prompt-command><plan-command><prompt><plan>xmd-prompt:<UUID>xmd-plan:<UUID>~/.xmd/prompt/sessions~/.xmd/plan/sessionsAn explicit
--session <name>still uses the exact supplied logical name. Its directory is now~/.xmd/plan/sessions/<sha256(name)>and retains the existing continuation and cleanup contract. The command never reads, migrates, aliases, or removes the unreleased.xmd/promptnamespace.The final Plan runs under
<plan>only after authorship-profile teardown. It receives the caller-selected ordinary run permissions and Agent configuration and inherits neither the authorship Session nor its instruction layer.Required work
prompttoplan.promptnames the old command. Useauthorshipfor the constrained profile and preservePromptwhere it names the input, component, turn, or Agent API behavior.packages/cli/src/documents/prompt-command.mdtoplan-command.md, including its package-relative loader constant, source identity, compiled-binary includes, npm asset copying evidence, and release specification.specs/plan-command-spec.mdand update every reference to it.architecture.md, the executable-MDX, ACP client, root-property and release specifications, CLI documentation, examples, fixtures, tests, comments, and generated help.xmd prompttoxmd planwithout changing when they win or what effects follow.xmd planwhile preserving its approved stages, authored policy, exact return behavior, and complete Plan instructions.<Plan>component #660 to refer toxmd plan, the plan command document, and the authorship profile. Do not decide or implement Add the<Plan>component #660’s custom<Plan>authority surface here.xmd prompt: turn a request into an approved executable Plan #260 behavior and evidence with only the command, identity, namespace, and corresponding terminology substitutions defined above.Preserved architecture
The complete #260 contract remains authoritative:
<Session>carries every Agent turn.<CheckDraft>remains the protected internal checker and does not execute a draft.--outputare byte-exact.--runremains explicit. With--output --run, writing completes before execution.No retry, review, explanation, output, execution, authority, cancellation, teardown, or failure-precedence policy moves between Markdown and TypeScript.
Acceptance criteria
xmd plan "<Prompt>"reaches the merged #260 workflow;xmd promptis an unknown command and reaches no authorship or durable effectxmd plan --helpis generic and effect-free and accurately describes the Prompt, approved Plan, default stdout,--output,--run,--session, property ordering, and run-only flags--output,--run, and--output --runretain the exact byte, stdout-ownership, exclusive-create, and write-before-run contractsplan-command.mdis loaded package-relatively and executes under<plan-command>in source runtimes, npm output, and compiled binaries; repository lookup cannot replace it<plan>; diagnostics and journals contain no<prompt>identity for this workflowxmd-plan:<UUID>and an invocation-unique directory under.xmd/plan;--session <name>derives the stable new directory and continues normally;.xmd/promptis never consulted or mutated<Prompt>, its one-turn semantics, its Agent API, and genuine Prompt terminology remain unchangedxmd prompt, a prompt command document, or a prompt profilexmd plan, the plan command document, and the authorship profile without changing its separate architecture questions or scopeOut of scope
xmd promptcommand.<Plan>and the custom-authority decisions owned by Add the<Plan>component #660.Dependencies and delivery
xmd prompt: turn a request into an approved executable Plan #260 / PR ✨ Addxmd prompt: turn a request into an approved executable Plan (#260) #657 supplies the merged behavior being renamed.<Plan>component #660 remains separate and is reconciled only for terminology.Deliver this as one focused rename from current
main; do not build a temporary alias or leave a mixed namespace for a later cleanup.