Odf implement

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

Odf implement is an AI agent skill from the GitHub repository antoniodavid/odf-agent-team. Use when building approved Odoo tasks: follow the persisted route, write code and tests, and close batches with verified evidence.

How to use this skill

Skill file

Activation Contract

Use only for a route whose next canonical stage is BUILD (legacy IMPLEMENT),

using the persisted work_type and authoritative route context supplied by the

orchestrator. Never infer the plan mode from triage labels or missing artifacts.

DESIGN with design_closed: true, and its closed task breakdown. Missing,

false, stale, or unverifiable design is a hard block that reopens PLAN.

bugfix), require its completed DECIDE/FIX entry evidence, approved

Expectations, the forwarded Context Manifest, and the bounded inline

implementation tasks and QA plan forwarded by the orchestrator. Formal

ASSESS, QA-PLAN, DESIGN, and task artifacts are not prerequisites for this

route. Do not invent REQ-XX or pretend a formal design exists.

context is a hard block; do not choose a route to make implementation eligible.

When to Use

Implement only the approved work for the persisted route. On formal-plan routes,

follow the approved functional spec and closed design. On inline-plan routes,

follow the approved Expectations and inline task/QA plan; do not silently expand

scope or promote inline notes into formal artifacts.

Hard Rules

| Rule | Requirement |

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

| Route-specific acceptance criteria | On plan: required, read REQ-XX from ASSESS for each task; on plan: inline, trace each task directly to approved EXP-XX and the inline task/QA plan |

| Follow approved decisions | On formal-plan routes follow DESIGN; on inline routes follow the approved inline plan. If either is wrong, NOTE IT and stop for orchestrator disposition |

| Project context | Name per project_context.glossary and follow project_context.principles from odf-init/{project}; a conflict with the approved route plan or a principle is reported and blocked — never silently deviated |

| Context Manifest | Consume the forwarded manifest unchanged: references, source roots, CodeGraph reference, redundancy counts, and Expectations ref. Never paste source content; do not re-run project discovery or redundancy while it is fresh. Missing or stale → bounded discovery + manifest-stale |

| Tests with code | Tests belong in the same commit as the behavior they verify |

| Smoke tests per batch | Run pre-commit + pylint-odoo on changed files after each batch |

| Stop-validation evidence | Settle all candidate-affecting files (including merged progress/task artifacts), run the tier's stop-validation commands, then write <worktree>/.odf/validation-evidence-{change}.json last — a batch WITHOUT verified evidence does NOT close |

| Candidate digest | Ordinary IMPLEMENT policy gates currently return candidate_digest: null; omit/null that optional evidence field. Targeted fast-lane and VERIFY evidence must use the authoritative digest their route requires; never guess or reuse a stale value. |

| Mark tasks as you go | Update task status immediately, not at the end |

Decision Gates

| Condition | Action |

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

| Task blocked by unexpected issue | Stop batch, report status: blocked to orchestrator |

| Required formal plan is not closed (design_closed !== true) | Block IMPLEMENT, persist the reason, and re-open PLAN before any code change or task update |

| Inline-plan inputs are missing, ambiguous, or exceed the approved route scope | Block IMPLEMENT and ask the orchestrator to resolve scope or escalate to formal PLAN before editing |

| Pre-commit or pylint errors | Fix immediately before proceeding |

| Stop-validation evidence not verified (validation.status !== "verified") | Do NOT close the batch — fix the cause, settle candidate-affecting artifacts, re-run the required commands, and rewrite evidence with the route-appropriate digest |

| All tasks in batch complete | Persist progress, return for next batch or VERIFY |

Execution Steps

  1. Retrieve route-specific inputs from the selected store and forwarded workflow context. Require the persisted work_type, route plan mode, completed entry stage, approved Expectations, the forwarded ## Context Manifest when the route supplies one, and exact approved scope. Consume the manifest unchanged; do not re-run project discovery or redundancy while it is fresh. If it is missing or stale, do bounded discovery and report manifest-stale. For plan: required, also read ASSESS and DESIGN/tasks and verify design_closed === true; otherwise stop with blocked, next_recommended: ["design"], and no code/task edits. For plan: inline, use the approved Expectations and forwarded inline tasks/QA plan; do not require formal ASSESS/DESIGN/task artifacts. If required inputs are absent or conflict with the persisted route, stop and ask the orchestrator to resolve or escalate.
  2. Read patterns: Check existing Odoo source for the module being extended
  3. Implement tasks: For each task, read its REQ-XX on plan: required routes or its approved EXP-XX trace on plan: inline routes → read source patterns → write code (OCA standards) → run focused tests; mark [x] only after the behavior is verified
  4. Smoke test: run pre-commit --files {changed} + pylint-odoo on changed files; finish any source/test fixes before proceeding
  5. Finalize progress and task artifacts: merge progress into the existing canonical artifact and update task status only from actual verification results. These files can be part of the Git candidate, so complete all such edits before final validation evidence/digest capture.
  6. Run stop-validation and write evidence last: run the tier's required stop-validation commands against the settled candidate, capture their real outputs, then write <worktree>/.odf/validation-evidence-{change}.json as the final candidate-related write. .odf/ evidence is excluded from the candidate manifest; do not edit code, tests, progress, or other candidate files after capturing any required digest. The Policy Gate supplies the authoritative risk_tier and frozen_diff_ref; its candidate_digest is null for ordinary IMPLEMENT, so omit/null that optional field. Targeted fast-lane or VERIFY evidence must carry the exact digest required by that route; if it is unavailable, stop as blocked rather than guess or reuse a stale digest. Minimum commands per tier (use the project's real commands from odf-init/{project}; no fabricated exit codes):

```json

{

"change": "my-change", "phase": "IMPLEMENT", "batch": 1,

"risk_tier": "MEDIUM", "frozen_diff_ref": "<same ref as the policy gate>",

"resolved_at": "<ISO-8601>",

"commands": [

{ "name": "git-diff-check", "command": "git diff --check", "exit_code": 0, "output_tail": "..." },

{ "name": "odoo-tests", "command": "docker compose run --rm odoo odoo -d {test_db} -i {module} --test-enable --stop-after-init", "database": "{test_db}", "exit_code": 0, "output_tail": "... 0 failed ..." }

]

}

```

  1. Return evidence and progress refs in the ODF Result. Do not make further

candidate-file edits after writing validation evidence; all canonical design,

task, and progress updates must already be persisted.

Test Discipline

Completion Criteria

A task is DONE only when ALL hold:

Output Contract

Return the complete shared ODF Result envelope, including every required common field (especially strategy and skill_resolution), plus: status (ok|warning|blocked), executive_summary ("N/M tasks done. Smoke: pass/warn."), batch_summary (completed tasks, files changed, deviations from the approved route plan, smoke test results), validation_evidence (path to the evidence file + command/exit_code summary — REQUIRED for IMPLEMENT batches). artifacts_saved, next_recommended (["implement"] or ["verify"]), risks, and modules_affected remain part of the shared envelope.

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.