feature-prompt
Produces the smallest useful handoff for the next step — not an implementation
spec. grill-with-docs will challenge the plan, sharpen domain terms, update
CONTEXT.md, and offer ADRs only for hard decisions.
Output contract
Final prompts use this shape:
Project:
[Full Project Matrix code, repo, path, or context. Use one line.]
What is needed:
[The change to make. One short paragraph or 2-4 bullets.]
Why it is needed:
[The problem, user pain, business reason, or workflow gap — so grill-with-docs
can challenge tradeoffs, not just wording.]
Expected end result:
[Observable done state. Prefer user-visible behavior, passing checks, or a
demo flow; seeds the later acceptance criteria.]
Known limits:
[Conditional. Hard constraints, non-goals, compatibility needs, or exclusions
already known. When intake was split, list the deferred slices as explicit
non-goals so the scoping decision survives in the artifact.]
Open questions:
[Conditional. Real unresolved questions for grill-with-docs to attack.]
Emit Known limits and Open questions only when useful; the other four
sections are always present.
Rules
Zero attribution: never add or leave co-author, AI, or tool attribution in any output. Include this rule in the prompt's Known limits.
Intake and inference
- Start from free-form intake. Infer first; ask only when
What is needed is
unclear or project/context cannot be inferred safely.
- Use repo evidence when cheap: Project Matrix, cwd,
CONTEXT.md,
CONTEXT-MAP.md, and ADR names. Do not run a broad code scan by default.
- If
graphify-out/graph.json exists (project root, else workspace root), query it before raw search; older than ~7 days → suggest graphify update .; missing → skip graphify.
Scope and slicing
- Before drafting, apply the fog test: can you state the destination in one
line and name every open decision as a sharp question, right now? If not,
stop and suggest
/wayfinder — it charts those decisions and resolves them
one per session. Do not write a PR-sized prompt for foggy
work. Fog, not size, is the test: a large mechanical change with nothing left
to decide is not fog.
- Default to one thin vertical slice, small enough to review and merge
independently. Broad intake gets split: draft this prompt for slice 1 only;
Known limits records the deferred slices. A prompt that would force a very
long grilling session → ask to split scope before finalizing; user away →
split it yourself and note the split at the top of the response.
- When the user intends parallel agent threads, split slices to minimize
shared-file coupling.
Context and evidence
- Use the full Project Matrix code verbatim whenever one exists. Never
abbreviate project codes or invent shorthand.
- Reference existing files/modules/seams when known, and keep "reuse existing
seam vs create new seam" under
Open questions explicitly — it is how
duplicate logic gets prevented.
- Include only non-obvious context: constraints, architecture quirks, and
domain rules the model cannot infer cheaply from repo scans. Omit stack
facts the code already shows.
- Dependency internals central and unclear → suggest fetching targeted source
(e.g.
opensrc) as a follow-up context step before deep grilling.
- Keep domain words intact. Ground candidate definitions in evidence and use
the approval flow below; unresolved definitions belong to
grill-with-docs.
Questions and output discipline
- Do not create
Domain terms, Decisions, Dependents, Risks,
Doc anchors, Integration, Constraints, or Acceptance sections. Fold
useful facts into the six contract sections; user-stated hard decisions go
under Known limits.
- All unclear decisions land under
Open questions; ungrillable ones ("needs
to feel/see it") also route to /handoff + /prototype before deep grilling
continues.
- Keep
Open questions to the highest-leverage unknowns (usually 1-5). Drop
trivia that can be decided during implementation.
- A vague answer to a sharp question ("as fast as possible", "all users") is
not an answer — ask once for a number or a named segment; still vague →
park it under
Open questions as written.
- Do not implement the feature, create a spec, or edit ADRs.
CONTEXT.md
changes happen only through the approved candidate-terms flow below.
- Keep the final prompt spartan, direct, plain English — it is a generated
artifact, never compressed shorthand.
Candidate context terms
Only when cheap repo evidence or user-requested exploration reveals domain
terms missing from or stale in CONTEXT.md — never run extra exploration just
to fill this. The shared flow — what qualifies, presentation, the
away-fallback, applying approvals — lives in
references/context-terms.md. Show candidates
before finalizing the prompt, apply only approved updates, and report the
edited path before saving. Terms still needing review stay under
Open questions.
Agent use
Sub-agents: dispatch local lanes automatically for independent work — never cloud agents; announce the lane count at dispatch and report each lane as it completes. Lanes are for fast, independent context checks only — no worker agents, no code edits.
Final output
- Draft the final prompt.
- For non-trivial or inferred prompts, show it once for correction. User
away → save as drafted and note at the top that it is unconfirmed.
- If candidate context terms were found, run the shared approval flow.
- Verify the pre-save checklist and save to the path below, then re-open the
saved file and confirm sections and path match the approved draft, or the
explicitly unconfirmed draft when the user is away, before
reporting.
- Add only:
Context updated: <relative CONTEXT.md path> [only if edited]
Saved to: <relative path written>
Next: pass this final prompt to the `grill-with-docs` skill.
Suggested next skills (optional):
- /grill-with-docs: challenge assumptions, sharpen domain terms, and confirm decisions.
- /handoff + /prototype: when open questions are ungrillable and need a higher-fidelity spike.
- /to-spec: if this needs a formal spec (PRD) after grilling.
File output
Path
<artifacts-root>/specs/prompts/NNNN-<feature-slug>-prompt.md
Resolve <artifacts-root>: the *.code-workspace directory if one exists, else the per-context root (CONTEXT-MAP.md at repo root), else the repo root.
NNNN — scan <artifacts-root>/specs/adr/ and specs/prompts/ for the
highest existing four-digit number and increment, so prompt numbers never
collide with ADRs. ADRs are numbered independently from specs/adr/ alone;
the prompt path recorded in the ADR is the link, not the number.
<feature-slug> — kebab-case from What is needed, max 4 words, ASCII.
-prompt — fixed suffix marking the artifact type.
Conflict handling
- Create
specs/prompts/ lazily. Never overwrite a number already used by
another artifact. Never delete unrelated files.
- A prior same-slug prompt counts as hand-edited when git shows commits or
working-tree changes to it that this session didn't make; if git can't tell
(untracked file), assume hand-edited.
- A same-slug prompt created in this session and unchanged since → update in place. Hand-edited → show
the diff and ask: overwrite, new numbered revision, or abort. If the user is
away, write a new numbered revision — never overwrite hand edits unconfirmed.
File body
Write exactly the final prompt body — no preface, no generated-by header —
drop-in usable as input to grill-with-docs.
Pre-save checklist
1---2name: feature-prompt3description: Use when the user wants to turn a feature idea, change request, or rough requirement into a small prompt for grill-with-docs. When cheap repo exploration reveals domain terms missing from or stale in CONTEXT.md, surface those candidate terms for user approval before any context update. Post-decision artifacts route onward instead: turning an ADR into a spec (PRD) is /to-spec, and investigating how existing behaviour works is /feature-discovery.4---56# feature-prompt78Produces the smallest useful handoff for the next step — not an implementation9spec. `grill-with-docs` will challenge the plan, sharpen domain terms, update10`CONTEXT.md`, and offer ADRs only for hard decisions.1112## Output contract1314Final prompts use this shape:1516```markdown17Project:18[Full Project Matrix code, repo, path, or context. Use one line.]1920What is needed:21[The change to make. One short paragraph or 2-4 bullets.]2223Why it is needed:24[The problem, user pain, business reason, or workflow gap — so grill-with-docs25can challenge tradeoffs, not just wording.]2627Expected end result:28[Observable done state. Prefer user-visible behavior, passing checks, or a29demo flow; seeds the later acceptance criteria.]3031Known limits:32[Conditional. Hard constraints, non-goals, compatibility needs, or exclusions33already known. When intake was split, list the deferred slices as explicit34non-goals so the scoping decision survives in the artifact.]3536Open questions:37[Conditional. Real unresolved questions for grill-with-docs to attack.]38```3940Emit `Known limits` and `Open questions` only when useful; the other four41sections are always present.4243## Rules4445Zero attribution: never add or leave co-author, AI, or tool attribution in any output. Include this rule in the prompt's `Known limits`.4647### Intake and inference4849- Start from free-form intake. Infer first; ask only when `What is needed` is50 unclear or project/context cannot be inferred safely.51- Use repo evidence when cheap: Project Matrix, cwd, `CONTEXT.md`,52 `CONTEXT-MAP.md`, and ADR names. Do not run a broad code scan by default.53- If `graphify-out/graph.json` exists (project root, else workspace root), query it before raw search; older than ~7 days → suggest `graphify update .`; missing → skip graphify.5455### Scope and slicing5657- Before drafting, apply the fog test: can you state the destination in one58 line *and* name every open decision as a sharp question, right now? If not,59 stop and suggest `/wayfinder` — it charts those decisions and resolves them60 one per session. Do not write a PR-sized prompt for foggy61 work. Fog, not size, is the test: a large mechanical change with nothing left62 to decide is not fog.63- Default to one thin vertical slice, small enough to review and merge64 independently. Broad intake gets split: draft this prompt for slice 1 only;65 `Known limits` records the deferred slices. A prompt that would force a very66 long grilling session → ask to split scope before finalizing; user away →67 split it yourself and note the split at the top of the response.68- When the user intends parallel agent threads, split slices to minimize69 shared-file coupling.7071### Context and evidence7273- Use the full Project Matrix code verbatim whenever one exists. Never74 abbreviate project codes or invent shorthand.75- Reference existing files/modules/seams when known, and keep "reuse existing76 seam vs create new seam" under `Open questions` explicitly — it is how77 duplicate logic gets prevented.78- Include only non-obvious context: constraints, architecture quirks, and79 domain rules the model cannot infer cheaply from repo scans. Omit stack80 facts the code already shows.81- Dependency internals central and unclear → suggest fetching targeted source82 (e.g. `opensrc`) as a follow-up context step before deep grilling.83- Keep domain words intact. Ground candidate definitions in evidence and use84 the approval flow below; unresolved definitions belong to `grill-with-docs`.8586### Questions and output discipline8788- Do not create `Domain terms`, `Decisions`, `Dependents`, `Risks`,89 `Doc anchors`, `Integration`, `Constraints`, or `Acceptance` sections. Fold90 useful facts into the six contract sections; user-stated hard decisions go91 under `Known limits`.92- All unclear decisions land under `Open questions`; ungrillable ones ("needs93 to feel/see it") also route to `/handoff` + `/prototype` before deep grilling94 continues.95- Keep `Open questions` to the highest-leverage unknowns (usually 1-5). Drop96 trivia that can be decided during implementation.97- A vague answer to a sharp question ("as fast as possible", "all users") is98 not an answer — ask once for a number or a named segment; still vague →99 park it under `Open questions` as written.100- Do not implement the feature, create a spec, or edit ADRs. `CONTEXT.md`101 changes happen only through the approved candidate-terms flow below.102- Keep the final prompt spartan, direct, plain English — it is a generated103 artifact, never compressed shorthand.104105## Candidate context terms106107Only when cheap repo evidence or user-requested exploration reveals domain108terms missing from or stale in `CONTEXT.md` — never run extra exploration just109to fill this. The shared flow — what qualifies, presentation, the110away-fallback, applying approvals — lives in111[`references/context-terms.md`](references/context-terms.md). Show candidates112before finalizing the prompt, apply only approved updates, and report the113edited path before saving. Terms still needing review stay under114`Open questions`.115116## Agent use117118Sub-agents: dispatch local lanes automatically for independent work — never cloud agents; announce the lane count at dispatch and report each lane as it completes. Lanes are for fast, independent context checks only — no worker agents, no code edits.119120## Final output1211221. Draft the final prompt.1232. For non-trivial or inferred prompts, show it once for correction. User124 away → save as drafted and note at the top that it is unconfirmed.1253. If candidate context terms were found, run the shared approval flow.1264. Verify the pre-save checklist and save to the path below, then re-open the127 saved file and confirm sections and path match the approved draft, or the128 explicitly unconfirmed draft when the user is away, before129 reporting.1305. Add only:131132```markdown133Context updated: <relative CONTEXT.md path> [only if edited]134Saved to: <relative path written>135Next: pass this final prompt to the `grill-with-docs` skill.136Suggested next skills (optional):137138- /grill-with-docs: challenge assumptions, sharpen domain terms, and confirm decisions.139- /handoff + /prototype: when open questions are ungrillable and need a higher-fidelity spike.140- /to-spec: if this needs a formal spec (PRD) after grilling.141```142143## File output144145### Path146147```text148<artifacts-root>/specs/prompts/NNNN-<feature-slug>-prompt.md149```150151Resolve `<artifacts-root>`: the `*.code-workspace` directory if one exists, else the per-context root (`CONTEXT-MAP.md` at repo root), else the repo root.152153- **`NNNN`** — scan `<artifacts-root>/specs/adr/` and `specs/prompts/` for the154 highest existing four-digit number and increment, so prompt numbers never155 collide with ADRs. ADRs are numbered independently from `specs/adr/` alone;156 the prompt path recorded in the ADR is the link, not the number.157- **`<feature-slug>`** — kebab-case from `What is needed`, max 4 words, ASCII.158- **`-prompt`** — fixed suffix marking the artifact type.159160### Conflict handling161162- Create `specs/prompts/` lazily. Never overwrite a number already used by163 another artifact. Never delete unrelated files.164- A prior same-slug prompt counts as **hand-edited** when git shows commits or165 working-tree changes to it that this session didn't make; if git can't tell166 (untracked file), assume hand-edited.167- A same-slug prompt created in this session and unchanged since → update in place. Hand-edited → show168 the diff and ask: overwrite, new numbered revision, or abort. If the user is169 away, write a new numbered revision — never overwrite hand edits unconfirmed.170171### File body172173Write exactly the final prompt body — no preface, no generated-by header —174drop-in usable as input to `grill-with-docs`.175176### Pre-save checklist177178- [ ] Only the six allowed section headers appear, in contract order179- [ ] `Project:` names the full Project Matrix code verbatim (when one exists)180- [ ] For a new file, `NNNN` unique across `specs/adr/` and `specs/prompts/`; an in-place update retains its own number; slug ≤ 4 words,181 kebab-case ASCII, `-prompt` suffix182- [ ] Split intake: deferred slices recorded under `Known limits`183- [ ] File body is the prompt only — drop-in, no preface