Activation Contract
Use only for /odf-agent-new or an explicit request to create a new ODF
specialist. Do not use it to repair an existing skill; use skill-improver.
When to Use
Use when user describes a specialized Odoo domain expert (accounting, inventory, manufacturing) that should be a dedicated sub-agent. The builder generates SKILL.md + AGENT.md, installs to skills/odoo_{name}/ and agent/odoo_{name}.md, and registers in the registry.
Hard Rules
| Rule | Requirement |
|------|-------------|
| Check duplicates first | Search registry + Engram before generating. Ask user if similar exists. |
| Never overwrite without confirm | If agent name exists, ask before overwriting |
| Validate output | Generated SKILL.md + AGENT.md must have all required sections |
| Register in both places | odf-registry.json AND Engram |
| NotebookLM enrichment | Query official docs for the domain before generating |
Decision Gates
| Condition | Action |
|-----------|--------|
| Duplicate agent found with overlapping triggers | Ask user: "Create anyway?" |
| NotebookLM unavailable | Proceed without enrichment, flag warning |
| Generation timeout (120s) | Retry once with shorter prompt |
| Parsed output missing required sections | Show error, ask user to edit or regenerate |
Execution Steps
- Parse input: Extract Domain, Specific expertise, Trigger context, Target phase
- Check duplicates: Search registry + Engram for overlapping triggers
- Enrich: Query NotebookLM for the domain — extract models, fields, workflows, version diffs
- Compose prompt: Build generation prompt with ODF context + NotebookLM data + required sections
- Generate:
opencode run "{prompt}"(120s timeout) - Parse result: Split on
---AGENT---→ SKILL.md + AGENT.md. Validate required sections. - Preview: Show user Name, Title, Description, Trigger, files to create
- Install: On approval → write SKILL.md + AGENT.md → update registry.json → persist to Engram
Output Contract
Return the complete shared ODF Result envelope, including every required common field (especially strategy and skill_resolution), plus any agent-builder findings. Use canonical artifact_ref entries in artifacts_saved.
References
../_shared/result-contract.md— ODF Result envelopeodf-registry.json— Registry to update (resolved by the plugin)