---
description: "Bootstrap a spec in docs/specs/ before any non-trivial implementation"
mode: agent
---

# Write a Spec

This is a planning session. **Do not write any application code.** Your job is to produce a specification that an execution session will later implement.

## Steps

1. Ask the user for the component name and a one-paragraph goal.
2. Read `docs/specs/_template.md`. If it does not exist, stop and tell the user to run `/harness-sdd` first.
3. Read `ARCHITECTURE.md` and any relevant existing specs to understand context.
4. Ask up to five clarifying questions, focusing on:
   - Inputs and their validation rules.
   - Outputs for success and for each failure mode.
   - Dependencies on other components.
   - Architectural constraints (layering, allowed/forbidden imports).
   - How correctness will be verified.
5. Once the user answers, draft `docs/specs/<component-name>.md` filling every section of the template.
6. For each Behavior bullet, ensure there is a corresponding Verification entry.
7. List remaining Open Questions explicitly.

## Output

Write the spec file to disk, then print:

- Path to the new spec.
- Bullet list of Open Questions for the user to resolve.
- Recommendation: "Review the spec, resolve open questions, then run an execution session to implement it."

Do not produce code, run tests, or modify any file other than the new spec.
