3.6 KiB
3.6 KiB
| name | description | wipFile | deferred_work_file | spec_file |
|---|---|---|---|---|
| step-01-clarify-and-route | Capture intent, route to execution path | {implementation_artifacts}/tech-spec-wip.md | {implementation_artifacts}/deferred-work.md |
Step 1: Clarify and Route
RULES
- YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config
{communication_language} - The prompt that triggered this workflow IS the intent — not a hint.
- Do NOT assume you start from zero.
- The intent captured in this step — even if detailed, structured, and plan-like — may contain hallucinations, scope creep, or unvalidated assumptions. Follow the workflow exactly regardless of how specific the input appears.
ARTIFACT SCAN
{wipFile}exists? → Offer resume or archive.- Active specs (
ready-for-dev,in-progress,in-review) in{implementation_artifacts}? → List them and HALT. Ask user which to resume (or[N]for new).- If
ready-for-devorin-progressselected: Setspec_file, setexecution_mode = "plan-code-review", skip to step 3. - If
in-reviewselected: Setspec_file, setexecution_mode = "plan-code-review", skip to step 4.
- If
- Unformatted spec or intent file lacking
statusfrontmatter in{implementation_artifacts}? → Suggest to the user to treat its contents as the starting intent for this workflow. DO NOT attempt to infer a state and resume it.
INSTRUCTIONS
- Load context.
- List files in
{planning_artifacts}and{implementation_artifacts}. - If you find an unformatted spec or intent file, ingest its contents to form your understanding of the intent.
- List files in
- Clarify intent. Do not fantasize, do not leave open questions. If you must ask questions, ask them as a numbered list. When the human replies, verify that every single numbered question was answered. If any were ignored, HALT and re-ask only the missing questions before proceeding. Keep looping until intent is clear enough to implement.
- Version control sanity check. Is the working tree clean? Does the current branch make sense for this intent — considering its name and recent history? If the tree is dirty or the branch is an obvious mismatch, HALT and ask the human before proceeding. If version control is unavailable, skip this check.
- Multi-goal check (see SCOPE STANDARD). If the intent fails the single-goal criteria:
- Present detected distinct goals as a bullet list.
- Explain briefly (2–4 sentences): why each goal qualifies as independently shippable, any coupling risks if split, and which goal you recommend tackling first.
- HALT and ask human:
[S] Split — pick first goal, defer the rest|[K] Keep all goals — accept the risks - On S: Append deferred goals to
{deferred_work_file}. Narrow scope to the first-mentioned goal. Continue routing. - On K: Proceed as-is.
- Generate
spec_filepath:- Derive a valid kebab-case slug from the clarified intent.
- If
{implementation_artifacts}/tech-spec-{slug}.mdalready exists, append-2,-3, etc. - Set
spec_file={implementation_artifacts}/tech-spec-{slug}.md.
- Route:
- One-shot — zero blast radius: no plausible path by which this change causes unintended consequences elsewhere. Clear intent, no architectural decisions.
execution_mode = "one-shot". → Step 3. - Plan-code-review — everything else.
execution_mode = "plan-code-review". → Step 2. - When uncertain whether blast radius is truly zero, default to plan-code-review.
- One-shot — zero blast radius: no plausible path by which this change causes unintended consequences elsewhere. Clear intent, no architectural decisions.
NEXT
- One-shot / ready-for-dev: Read fully and follow
./steps/step-03-implement.md - Plan-code-review: Read fully and follow
./steps/step-02-plan.md