Intent Authoring
Use this skill when the task is to translate human requirements into intent.scm for elec workflows.
Inputs
- •Requirement text (
spec.md, chat text, ticket text) - •Optional
circuit.scm(recommended for consistency checks)
Output Contract
Produce:
- •
intent.scmin canonical field order - •Short assumptions list
- •Short mismatch report against
circuit.scm(if provided)
Canonical Intent Shape
Use this minimal shape and field order:
lisp
(intent (app <app_name>) (read <sensor_name> (interval_ms <int>)) (rule (if (<predicate>)) (then (<action>))) (telemetry (stdout <true|false>)) )
If a section is unknown, keep it explicit with safe defaults rather than omitting silently.
Workflow
- •Extract requirements into structured slots: app/read/rules/telemetry.
- •Choose deterministic defaults when missing:
- •
interval_ms:1000 - •
telemetry.stdout:true - •No dangerous actuator actions unless explicitly requested.
- •If
circuit.scmexists, verify referenced sensors/actuators are physically present. - •Render
intent.scmin canonical order shown above. - •Run validator commands if available:
- •
elec intent fmt intent.scm - •
elec intent lint intent.scm [--circuit circuit.scm]
- •If validator commands are unavailable, still emit
intent.scmand clearly report validation gap.
Safety Constraints
- •Do not infer destructive behavior (e.g., relay activation) from vague text.
- •Keep thresholds conservative when not specified.
- •Flag contradictions instead of guessing (e.g., "no telemetry" + "send logs").
Reference Files
- •Template:
references/intent-template.scm - •Review checklist:
references/review-checklist.md