Audit Object Model
Developmentaudit-object-modelAudit Object Model is an Agent Skill for development published in the PrestaShop/PrestaShop repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Read the legacy ObjectModel class for the domain and extract its database schema, field definitions, multilingual fields, and validation rules. This is the authoritative source for what columns the Doctrine repository must handle.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/PrestaShop/PrestaShop/blob/HEAD/.ai/Component/Migration/skills/audit-object-model/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/audit-object-model, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
audit-object-model
Instructions
- Open
classes/{Domain}.php— read the$definitionarray fully. - Extract the
tablename — this is the primary DB table. - List every field in
$definition['fields']: field name, type, validate rule, required flag, lang flag, shop flag. - Identify multilingual fields (
'lang' => true) — these needTranslatableTypein the form and multilingual handling in handlers. - Identify shop-scoped fields (
'shop' => true) — these require multistore-aware repository methods. - If
classes/lang/{Domain}Lang.phpexists, read it and confirm the lang table structure. - Note any
hasManyorhasManyToManyrelations defined — these become sub-resources (handled by dedicated commands and repositories when the domain is non-trivial). - Record every
$validateFields()rule — these inform ValueObject validation. - Output: structured schema map (table, columns, lang columns, shop columns, relations, validation rules).
Rules
- Never modify ObjectModel files — read-only audit
- Flag any field with a custom validate method (
Validate::isXxx) — these need a custom ValueObject - Note
$identifierfield name — it becomes the{Domain}IdValueObject - Relations declared in ObjectModel that link to another entity's table are sub-resource candidates