design_validate_requirement
Checks a structured design requirement for unresolved questions, missing power or outputs, invalid ranges and voltage mismatches before planning and part selection.
Instructions
Validate a structured DesignRequirement before planning starts.
Stage 1 of the autonomous flow (requirement capture & architecture,
reference/autonomy-roadmap.md): capture what the board must do as a
DesignRequirement dict, run this gate, and only move on to part
selection / DesignPlan construction when it returns ok. Every fact
the requirement does NOT state goes into open_questions as a
question for the user -- it is never guessed -- and validation fails
while any question remains unresolved.
Checks beyond the schema: unresolved open questions, no outputs, no power source, inverted temperature / IO-voltage ranges, comms IO without a protocol, and supply rails or power outputs whose magnitude exceeds every stated power input (a boost / inverting stage the user must confirm). Pure Python, no Altium.
board_intent (stackup, impedance targets, peak currents,
fastest edge, enclosure, assembly, finish, test strategy) is all
optional and never fails validation. Where the rest of the
requirement makes one of them matter and it is missing, notes
carries a suggested question to ask the user.
Args:
requirement: DesignRequirement as a JSON object/dict. Units are
SI with the unit in the field name (voltage_v,
current_a, temp_min_c); mechanical dimensions are
MILLIMETRES (board_size_mm, height_max_mm).
Returns:
{"ok": True, "issues": [], "notes": [...], "summary": "..."}
when the requirement is planning-ready (summary is the
labelled-line block to embed in DesignPlan.summary), or
{"ok": False, "issues": [...]} / {"ok": False, "errors": [...]} (schema problems) listing what to resolve.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| requirement | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||