domain-context-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited domain-context-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate a minimal, accurate CONTEXT.md for a PrestaShop business domain (src/Core/Domain/{Name}/). The goal is the smallest file that gives an AI agent enough orientation to work in the domain — not an inventory of every class.
# {Domain} Domain
> **Status:** Draft — this context file is a starting point and should be refined by domain experts.
## Purpose
{1–2 sentences: what this domain does and what it does NOT do}
## Layers
| Layer | Path |
|-------|------|
| Core CQRS | `src/Core/Domain/{Name}/` — Commands, Queries, QueryResults, ValueObjects, Exceptions |
| Adapter | `src/Adapter/{Name}/` — handler implementations, repositories |
| Legacy ObjectModel | `classes/{Name}.php` ({N} lines) — do not add logic here |
| Back-office UI | controller path, grid factory name, TS frontend path |
## Non-obvious patterns
- {Things that aren't discoverable by reading the directory structure}
- {Surprising abstractions, delegation chains, cross-domain flows, legacy gotchas}
## Canonical examples
- `path/to/Command.php` + `path/to/Handler.php`
- `path/to/Query.php` + `path/to/ResultDTO.php`
## Skills
- [`skill-name`](../../skills/skill-name/SKILL.md) — one-line description
## Related
- [Component/Domain](path) — one-line reason`## Skills` is optional — only include it if a skill in .ai/skills/ targets this domain. Omit the section entirely if no relevant skill exists.
Do NOT include: class name inventories (command names, exception names, value object names, handler names). These are greppable on demand and waste context tokens.
Do NOT include: ## Coding standards, ## Do, ## Don't, ## Testing expectations — project-wide, live in .ai/CONTEXT.md.
Check that src/Core/Domain/{Name}/ exists and contains a CQRS structure (Command/, Query/, or handler interfaces). If you don't find a dedicated CQRS layer or a Controller for this domain, it is probably a Component — use the component-context-generator skill instead.
Use the Explore agent to map:
src/Core/Domain/{Name}/ — subdirectory names (Command/, Query/, ValueObject/, Exception/, sub-domains)src/Adapter/{Name}/ — subdirectory names (CommandHandler/, QueryHandler/, Repository/, any unusual patterns)classes/{Name}.php — does it exist? approximate line countsrc/PrestaShopBundle/Controller/Admin/**/{Name}Controller.php — exists?src/Core/Domain/{Name}/ with their own CQRS structure{Name}Id or {Name}Command)Do NOT enumerate every file — just note what layers/patterns exist and what's non-obvious.
One row per layer that actually exists. Path only — no class names.
Ask: what would surprise a developer reading this domain for the first time?
src/Core/Cart/)Skip anything obvious from the directory structure.
2 file path pairs maximum:
List the contents of .ai/skills/ and check if any skill targets this domain (e.g. a create-{entity} or add-{domain}-form skill). If one exists, include a ## Skills section before ## Related linking to it.
Every cross-reference is a potential cascade: an AI agent reads domain A, follows a link to domain B, follows B's link to component C... and loads everything. This defeats the purpose of the split.
Include a link when:
Do NOT include a link when:
When in doubt, omit the link. An agent can always find related contexts via the index in .ai/CONTEXT.md.
# Cart Domain
> **Status:** Draft — this context file is a starting point and should be refined by domain experts.
## Purpose
Manages the shopping cart lifecycle: creation, product additions/removals, quantity updates,
cart rule application, address/carrier/currency settings, and price computation.
Does not handle order creation — that is the Order domain's responsibility.
## Layers
| Layer | Path |
|-------|------|
| Core CQRS | `src/Core/Domain/Cart/` — Commands, Queries, QueryResults, ValueObjects, Exceptions |
| Adapter | `src/Adapter/Cart/` — handler implementations, `CartRepository`, `CartProductsComparator` |
| Calculation engine | `src/Core/Cart/` — pure price/tax/discount computation, independent of persistence |
| Legacy ObjectModel | `classes/Cart.php` (5 000+ lines), `classes/CartRule.php` — do not add logic here |
| Presenter | `src/Adapter/Presenter/Cart/` — lazy-loading Smarty presentation layer |
| Back-office UI | `CartController.php`, `CartGridDefinitionFactory`, `CartSummaryType`, `cart-editor.ts` |
## Non-obvious patterns
- The **calculation engine** (`src/Core/Cart/`) is separate from the CQRS domain layer —
`Calculator` orchestrates totals purely in memory; adapter handlers call it before persisting
- Cart→Order conversion happens via `AddOrderFromBackOfficeCommand` in the **Order domain**,
which takes a `CartId`; the Cart domain has no knowledge of this
- `AbstractCartHandler` in Adapter provides shared cart-loading and validation used by all handlers
## Canonical examples
- `src/Core/Domain/Cart/Command/AddProductToCartCommand.php` + `src/Adapter/Cart/CommandHandler/AddProductToCartHandler.php`
- `src/Core/Cart/Calculator.php` — calculation engine entry point
## Related
- [Order Domain](../Order/CONTEXT.md) — Cart→Order conversion happens in the Order domain via `AddOrderFromBackOfficeCommand`
- [DevDocs](https://devdocs.prestashop-project.org/9/development/architecture/domain/references/cart/#cart-domain/)Write to .ai/Domain/{Name}/CONTEXT.md. Create the directory if needed. Confirm the file path to the user when done.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.