Odf design

From antoniodavid/odf-agent-team · View interactive version

Odf design is an AI agent skill from the GitHub repository antoniodavid/odf-agent-team. Use when turning approved requirements into a closed Odoo design: source evidence, field and view tables, tasks, and design_closed.

How to use this skill

Skill file

Activation Contract

Use only for Phase 2 (DESIGN) after ASSESS is approved and its REQ-XX plus the

approved human EXP-XX artifact are available. Return a closed design or block.

When to Use

Use after ASSESS returns strategy: custom. Produce a closed design document

per docs/design-contract.md that resolves EVERYTHING IMPLEMENT will need (module

destination, models, views, security, EXP-XX), then derive the IMPLEMENT task

plan from it. The orchestrator will approve before IMPLEMENT.

Phase Boundary

implementation templates, or implementation-file edits.

source of truth. A missing, stale, or unresolved decision or seam returns

blocked and reopens PLAN with the exact missing decision; never ask for

confirmation or improvise.

does not apply: do not require or create a DESIGN artifact just to start BUILD.

IMPLEMENT follows the persisted route, approved Expectations, and bounded

inline task/QA plan; escalate to formal PLAN only if scope or risk requires it.

Precision Invariants

refactors or features.

it could change product behavior, return blocked with the exact missing product

decision instead of silently choosing, asking, or guessing.

Source Authority

Use evidence in this order: target repository/source first; approved ODF artifacts

and project conventions next; external references only when needed; model memory

last. Resolve Odoo, OWL, and API behavior from target-version source rather than

hardcoding versions in this skill. Keep the existing odf-toolkit verification

requirements for source-dependent claims.

Hard Rules

| Rule | Requirement |

|------|-------------|

| Read source first | Read the real Odoo module source being extended/inherited BEFORE designing |

| Read EXP-XX | Read the expectations artifact (EXP-XX, from docs/expectations-contract.md and the store) as input |

| Resolve all EXP-XX | Every EXP-XX must have a concrete resolution row; a design missing any is NOT closed |

| No code | Use the contract's TABLES (fields, views, tasks). Do NOT write Python/XML in the design — IMPLEMENT writes the code |

| Reference by ID | Reference EXP-XX/REQ-XX by ID; do not restate the full expectation statement (it lives in expectations.yaml) |

| Fix the module | Decide the exact target module (new vs inherit) in DESIGN — never leave it to IMPLEMENT |

| Traceability | Every task links to a REQ-XX and the EXP-XX it resolves |

| Decisions (ADR-lite) | Record a decision only when ALL three hold: hard to reverse, surprising without context, and the result of a real trade-off (real options existed). Format: decision / options / choice / consequence. Omit decisions failing any condition — no ADR spam. A qualifying decision that outlives the change MAY be promoted to docs/adr/ in the worktree on user request |

| Project context | Use project_context.glossary terms for module/model/field names and honor project_context.principles (from odf-init/{project}); when a design choice conflicts with a principle, resolve it explicitly or return blocked — never silently violate it |

| Security required | Every new model MUST have ir.model.access.csv (per group) + ir.rule if applicable |

| Tests required | Every feature MUST have at least one test task |

| OCA conventions | File structure, naming, manifest follow OCA standards |

| Deep modules | Design interfaces as deep modules — much behaviour behind a small interface (module / interface / depth / seam / adapter). Apply the deletion test: if deleting it merely moves complexity, cut it; if complexity concentrates, keep it. The interface is the test surface — a test that must reach past it signals the wrong shape. When an interface is genuinely in question, sketch 2-3 radically different options (design-it-twice) and compare depth, locality, and seam placement before choosing |

Decision Gates

| Condition | Action |

|-----------|--------|

| Single module | One module, 3 phases: Foundation → Views → Tests |

| Multi-module (2+) | Design per module: Primary first (all phases), then secondary. Prefix task IDs (A1.1, B1.1) |

| Complex architecture | Record qualifying decisions under ### Architecture Decisions per the ADR-lite rule (decision / options / choice / consequence) |

Execution Steps

  1. Retrieve the assess artifact (REQ-XX) and expectations artifact

(EXP-XX) through the selected store.

  1. Read the module: Read the real Odoo source module being extended/inherited.
  2. Produce the design document per docs/design-contract.md (ALL sections):

Context (module + manifest_depends), EXP-XX resolution table, data model

(_name/_inherit, fields/types/constraints, computed/onchange), views + UI

(actions + menus + wizard), security, data/migration, IMPLEMENT plan, plus

### Architecture Decisions when a decision meets the ADR-lite three-condition test (§9).

  1. Fix the module destination exactly (new vs inherit) — do not leave it open.
  2. Derive the IMPLEMENT plan from the document: each task links to exact

file(s) + the EXP-XX it resolves.

  1. Verify closure internally using docs/design-contract.md §8 — do NOT

copy the checklist into the document as a section. If not closed, iterate

before returning; if a decision genuinely cannot be resolved, return blocked

listing the open decisions.

  1. Persist in the selected store with artifact_ref, design_path,

design_closed, and design_meta. Derive design_meta from the closed

document per docs/design-contract.md §"design_meta": count models, fields,

views, tasks, EXP-XX rows; module_type from the "Fix the module" decision;

manifest_depends/odoo_version from the context. Include design_meta in

the envelope and as part of the persisted artifact. If it cannot be derived

(empty document / no data), return design_meta: null with reason — never

invent values.

Completion Criteria

The design is DONE (closed) only when ALL hold:

Output Contract

Return the complete shared ODF Result envelope, including every required common field (especially strategy and skill_resolution), with executive_summary ("N modules, M

models, V views, K tasks in M phases — design closed"), design_closed (true|false),

design_path (path of the persisted design.md), design_meta (structured summary

for estimation — see docs/design-contract.md). If

design_closed: false, do NOT return ok — iterate or return blocked.

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.