dx-new
dx-new — the entry point and router
Every piece of work starts here. Your one job is to pick the container level, create its identity file, and print the next command. You do not research, frame, or plan — you route.
Guard. If context/ isn't scaffolded (no changes/ or efforts/), stop and tell the user to run /dx-init. Never auto-create the parent tree.
Briefs named in the argument — optional, loose, plural
A brief under context/foundation/briefs/ may be named anywhere in the argument, in any form — a bare slug, a filename, a full path, several of them — with no flag and no fixed position. Those names are settled upstream context, not part of the idea: strip them before deriving a slug. A name that doesn't resolve is never guessed at — list context/foundation/briefs/ and ask which was meant. No brief named is the ordinary case and changes nothing below.
Record the resolved ones as a single prose line in the new container's ## Notes, naming their paths (Briefs: context/foundation/briefs/<slug>.md, …). Nothing is copied and no frontmatter field changes — that line is the pointer dx-frame and dx-plan follow.
Slice of an existing effort — read the id, don't invent one
If invoked as dx-new <effort-id> <slice-n>, this is a child change — a different path from everything below. Read context/efforts/<effort-id>/roadmap.md and find ### Slice <slice-n>: its - change: <slug> line is the id dx-roadmap already assigned, and the slice name is the title. Use them as-is — do not derive a new slug from scratch, that would orphan the roadmap's link. Missing effort or slice → tell the user to run /dx-roadmap <effort-id> first.
Create context/changes/<slug>/change.md with effort: <effort-id>, slice: <slice-n>, status: new. Default type: feature unless effort.md's ## Notes carries the marker line Refactor effort — findings promoted from /dx-refactor-discover. (written once at effort creation — see Promoted entries), then type: refactor; or the marker Candidate effort — default slice type: <type>; promoted from /dx-review <policy-id>. (see Promoted entries), then that <type>. Fill every other frontmatter field the schema defines — invoke dx-references with topic change-md for the exact shape. The child inherits the effort's research/ and frame.md in place (nothing is copied) — its problem framing is already settled, so skip straight to /dx-plan <slug>. Optionally run /dx-frame <slug> first instead: in slice mode it adds only this slice's own ## User cases to a small frame.md of its own, without reopening the inherited framing.