odf-init
Detect + persist Odoo project context: version, modules, test runner, lint tools, conventions. Trigger: /odf-init, first time in a project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Detect + persist Odoo project context: version, modules, test runner, lint tools, conventions. Trigger: /odf-init, first time in a project.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Implement Odoo tasks from design artifact. Write code following spec + design. Trigger: Phase 3 (IMPLEMENT) of /odf-new after DESIGN approved.
Quality gate for ODF: evidence-based risk tiers (0/1/4 lenses), spec compliance matrix, single-attempt correction budget. Trigger: Phase 4 (VERIFY) of /odf-new.
Create an ODF change proposal with business context, scope, and approach. Trigger: Phase 0 (PROPOSE) of /odf-new.
Strict TDD mode for ODF: tests before code. Two-source kill switch (global + local), any off wins, fail-closed. Trigger: /odf-tdd on, effective TDD mode active, or when strict TDD enforcement is needed.
Deep investigation of Odoo codebase to understand patterns before proposing solutions. Trigger: /odf-explore, 'how does Odoo handle X', research, investigation.
Assess Odoo requirement: determine standard vs custom strategy, analyze functional feasibility, produce functional spec. Trigger: Phase 1 (ASSESS) of /odf-new.
| name | odf-init |
| description | Detect + persist Odoo project context: version, modules, test runner, lint tools, conventions. Trigger: /odf-init, first time in a project. |
| license | MIT |
| metadata | {"author":"adruban","version":"2.0"} |
Use when entering a new Odoo project, or when project tooling changes (new test runner, new dependencies). Persists to Engram so all ODF phases reuse the config without re-detecting.
| Rule | Requirement |
|---|---|
| Never ask what can be detected | Try all detection methods before asking the user |
| Never guess | If detection fails for a field, set it to null — don't invent |
| Partial is better than none | Persist even partial detection |
| Upsert | Running /odf-init again updates the existing config |
| Condition | Action |
|---|---|
| Version in prompt | Use it directly |
| No version in prompt | Try: manifest.py → odoo-bin --version → Dockerfile → ask user |
| Test runner found via detection | Use detected command template with {module} placeholder |
| Docker Compose present (docker-compose.yml / compose.yml / compose.yaml with an odoo service) | Build template docker compose run --rm <service> odoo -d {test_db} -i {module} --test-enable --stop-after-init; require an explicit disposable {test_db} |
| Local odoo-bin found with a disposable database detected | Build template odoo-bin -d {test_db} -i {module} --test-enable --stop-after-init |
| No disposable test database name/config detected | Block and ask the user; never guess a database or use a developer/production database |
| No test runner detected | Flag WARNING, set runner: none |
docker-compose.yml/compose.yml/compose.yaml exists at the project root and defines an odoo service (or web/odoo-<name>), the canonical run command is:
docker compose run --rm odoo odoo -d {test_db} -i {module} --test-enable --stop-after-init
Replace {module} with the module under test and odoo with the real service name if it differs. This is the test_command to persist — do NOT persist a bare odoo-bin invocation for a Docker Compose project.odoo-bin is on PATH (or in the repo) and a disposable database name/config is detected, persist odoo-bin -d {test_db} -i {module} --test-enable --stop-after-init.-d {test_db} is invalid for Odoo DB tests. Never document or generate dropdb, DROP DATABASE, TRUNCATE, or destructive re-initialization as automatic setup. If no disposable test database can be detected, return blocked and ask the user for the exact isolated database.pytest.ini/setup.cfg configures pytest-odoo.mem_save(title: "odf-init/{project}", topic_key: "odf-init/{project}", type: "config", ...)
testing.test_command with literal {test_db} and {module} placeholders so IMPLEMENT/VERIFY can substitute the exact isolated database and module under test.Return ODF Result envelope with: status (ok|warning|blocked), executive_summary ("{project}: Odoo {ver}, {N} modules, {env}, {runner} tests"), artifacts_saved, risks (missing tooling warnings), odoo_version, modules_affected. Use blocked when no disposable test database name/config can be detected for DB tests.
/home/adruban/.config/opencode/skills/_shared/result-contract.md — ODF Result envelope/home/adruban/.config/opencode/skills/_shared/odoo-sources.md — Local source paths