---
name: cad-goal-alignment
description: >
  Elicit CAD model requirements from the user. Clarify intent, constraints,
  and success criteria. Push back on impossible or oversized requests.
  Converge to an approved plan.md with goals, constraints, and open questions.
  Use when a new model request arrives and no approved plan.md exists.
---

# CAD Goal Alignment

## Purpose

Gather user intent and design constraints before any build123d-specific work begins.
This stage produces `plans/<model_slug>/plan.md` — the single source of truth for the model request.

## Interview Guidance

- Interview relentlessly until you and the user reach shared understanding of the model intent.
- Walk the design tree branch-by-branch and resolve dependencies between decisions before moving on.
- Ask one targeted question at a time, then wait for the answer before asking the next one.
- For each question, provide your recommended answer and a short rationale.
- If a question can be answered by exploring repository artifacts or earlier workflow outputs, inspect first instead of asking the user.
- Cover the core requirement buckets: intent/context, dimensions/tolerances, material intent, parameterization, export requirements, and success criteria.
- Treat only blocking ambiguity as a reason for more questioning. Carry non-blocking uncertainty into explicit open questions in the plan.
- If scope is too large for one script, propose decomposition.
- If a request is genuinely impossible in build123d scope (for example fluid simulation or FEA), state that clearly and reset scope.

## Plan Synthesis Guidance

- Do not draft `plans/<model_slug>/plan.md` while blocking ambiguities remain.
- Draft the plan only after shared understanding is explicitly confirmed.
- Keep plan structure flexible, but include at minimum:
  - model description
  - dimensions and constraints
  - configurable parameters
  - export requirements (including units)
  - success criteria
  - notes/open questions
- Keep `plan.md` as a clean synthesis of decisions and unresolved questions, not a transcript of the interview.
- Present the draft for approval and iterate until approved.
- Commit approved plan: `git add plans/<model_slug>/plan.md && git commit -m "docs: add plan.md for <name>"`

## Outputs

- `plans/<model_slug>/plan.md` (goals, constraints, and open questions only — no build123d API specifics)

## Hard Boundaries

- Do NOT write any build123d code during this stage.
- Do NOT spawn subagents during this stage.
- Do NOT research build123d APIs during this stage.
