OpenParable
Skip to content
← Back to skills

Audit Object Model

Development
audit-object-model

Audit 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.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. 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

  1. Open classes/{Domain}.php — read the $definition array fully.
  2. Extract the table name — this is the primary DB table.
  3. List every field in $definition['fields']: field name, type, validate rule, required flag, lang flag, shop flag.
  4. Identify multilingual fields ('lang' => true) — these need TranslatableType in the form and multilingual handling in handlers.
  5. Identify shop-scoped fields ('shop' => true) — these require multistore-aware repository methods.
  6. If classes/lang/{Domain}Lang.php exists, read it and confirm the lang table structure.
  7. Note any hasMany or hasManyToMany relations defined — these become sub-resources (handled by dedicated commands and repositories when the domain is non-trivial).
  8. Record every $validateFields() rule — these inform ValueObject validation.
  9. 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 $identifier field name — it becomes the {Domain}Id ValueObject
  • Relations declared in ObjectModel that link to another entity's table are sub-resource candidates