Odf verify

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

Odf verify is an AI agent skill from the GitHub repository antoniodavid/odf-agent-team. Use when verifying an Odoo implementation: classify risk, run the real suite, build the compliance matrix, and issue PASS, FAIL, or BLOCKED.

How to use this skill

Skill file

Activation Contract

Use only for Phase 4 (VERIFY) after IMPLEMENT reports completed work and its

validation evidence. VERIFY is the final verdict owner; it never fixes code.

When to Use

Use as the final phase of /odf-new after IMPLEMENT is complete. Run real tests and linting — static analysis alone is NOT verification. Review effort scales with the RISK TIER of the frozen diff, never with diff size.

Risk Tier Classification

The tier is decided by the EVIDENCE in the frozen diff, NEVER by the number of lines. A 300-line rename is LOW; 2 lines in ir.model.access.csv are HIGH.

| Tier | Evidence signals (any match → that tier) | Lenses |

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

| HIGH | ir.model.access.csv, record rules, groups= assignments, permission changes, security inheritance, compute/related fields that WRITE, security onchange, raw SQL (env.cr.execute with interpolation), payments/money, data loss (unlink/archive), subprocess/os.system, public endpoints | 4 lenses: risk, resilience, readability, reliability |

| MEDIUM | Everything not explicitly HIGH or LOW | 1 lens (focus configurable, default readability) |

| LOW | Passive byte-proven: XML view/form/tree/action/menu, manifest metadata, renames/moves, docs | 0 lenses: structural readback + native tool verification |

Lens Selection Policy

| Tier | Lenses | Mechanism |

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

| HIGH | 4 (risk, resilience, readability, reliability) | Judgment Day 3-pass review (reviewer → maintainer → attacker). The risk lens covers the attacker perspective |

| MEDIUM | 1 (focus configurable, default readability) | Single focused review pass |

| LOW | 0 | Structural readback (file exists, parses, breaks nothing) + native tool verification (pre-commit/lint if applicable). Launch NO reviewers |

Hard Rules

| Rule | Requirement |

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

| Classify first | Classify the tier from the frozen diff BEFORE any verification work |

| Execute tests | Run the real module test suite — static analysis and manual browser checks are not substitutes |

| Compare against specs | Every REQ-XX from assess must have a PASSING test |

| Judgment Day | HIGH tier ONLY: 3 review passes (reviewer, maintainer, attacker). NEVER run for LOW/MEDIUM |

| Never fix issues | Only report them — the orchestrator decides what to do |

| Test evidence | Record the exact command, exact database, exit code, and output evidence; a command without exact -d {test_db} is invalid. Disposable databases are preferred. A non-isolated development database is allowed only when the current user-approved scope names that exact database and authorizes its use; the stage role result/evidence must state database_isolation: non-isolated, database_authorization: current-user-approved, and warn that tests may mutate module, schema, and test data. The receipt must also carry candidate_digest (from the injected Policy Gate decision), executor (e.g. "odoo_qa_engineer"), and test_identity (e.g. "{module} test suite") — evidence missing those fields, or outside the freshness window, is rejected by the harness |

| Deferred tests | Skipped, deferred, unavailable, or unrecorded tests yield blocked with verification-deferred; they never yield PASS or PASS WITH WARNINGS |

Decision Gates

| Condition | Verdict |

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

| Required module test command ran with exact database, exit code 0, output evidence, all specs covered, no CRITICAL issues | PASS |

| Required module test command ran and passed, and only non-blocking warnings exist | PASS WITH WARNINGS |

| Any test fails or a spec is UNTESTED | FAIL |

| Tests skipped, deferred, unavailable, or missing the required result record | BLOCKED (verification-deferred) |

Execution Steps

  1. Retrieve artifacts: assess (specs), design (tasks), and implement-progress

(what was built) from the selected store

  1. Freeze the candidate diff: record the base tree/reference and count original_changed_lines
  2. Classify risk tier from the frozen diff (Risk Tier Classification table)
  3. Check completeness: Count total vs completed tasks. Flag CRITICAL if core tasks incomplete
  4. Check OCA compliance: Manifest (version, license, author, depends), security (ir.model.access.csv), code quality (imports, SQL injection, translations), tests
  5. Run pre-commit: pre-commit run -a. Flag CRITICAL on non-auto-fixable failures
  6. Run tests: Use the project's testing.test_command from odf-init/{project} with {module} substituted. The persisted Docker template is docker compose run --rm odoo odoo -d {test_db} -i {module} --test-enable --stop-after-init; the local template is odoo-bin -d {test_db} -i {module} --test-enable --stop-after-init. Read the project config and current user-approved scope first — never guess a runner or database. Disposable databases remain preferred; a named non-isolated development database is allowed only when that scope names the exact {test_db} and authorizes its use. If the exact database or authorization is absent, return blocked with verification-deferred and ask the user. Never generate or run dropdb, createdb/reset/restore, DROP DATABASE, DROP TABLE, TRUNCATE, DROP SCHEMA, or destructive re-initialization as test setup; consent to use a non-isolated database is not consent for those operations, which require separate current consent for the exact operation and database.
  1. Run pylint-odoo: pylint --load-plugins=pylint_odoo -d all -e odoolint {module}
  2. Build spec compliance matrix: Cross-reference EVERY REQ-XX scenario against test results. COMPLIANT = test exists AND passed. UNTESTED = CRITICAL
  3. Review by tier:
  1. Persist the verify report in the selected store with its canonical

artifact_ref (see Correction Budget & Single Attempt)

Correction Budget & Single Attempt

Completion Criteria

VERIFY 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 executive_summary ("PASS/FAIL/BLOCKED: X/Y specs compliant, Z critical issues"), the compliance matrix (table: requirement, scenario, test, result), test_results (including command, database, exit_code, output_evidence, and, for non-isolated databases, database_isolation, database_authorization, and the mutation warning), lint_results, review_summary, judgment_day_discrepancies (HIGH tier only), and frozen_diff_ref. Use blocked with verification-deferred when required tests are skipped, deferred, unavailable, or lack valid evidence; never report PASS or PASS WITH WARNINGS in that case.

On FAIL: include the failure disposition fields so the orchestrator can write the receipt — cause (validation-failed), evidence.failing (the commands/tests that failed), and evidence.refs (verify-report topic key + frozen ref). The orchestrator records them via odf_receipt before escalating.

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.