{"slug": "prestashop-added-an-ai-onboarding-system-directly-to-its-repo", "title": "PrestaShop Added an AI Onboarding System Directly to Its Repo", "summary": "PrestaShop added a hierarchical `.ai/` folder to its core repository, creating an AI agent onboarding system versioned directly alongside the code. The system includes 57 domain contexts, 22 component contexts, pre-computed indexes for CQRS queries, routes, entities, and hooks, plus pointer files for tools like Claude Code, Cursor, and GitHub Copilot that auto-load the context with zero developer configuration. The project requires that any AI-generated code contributions meet the same quality standards as human-written code.", "body_md": "The PrestaShop core README now contains an instruction you'd never seen in an open source project of this scale: \"If using AI tools to write code, make sure your agent has read the `.ai/CONTEXT.md`\n\nfile.\"\n\nTL;DR— If you only have 30 seconds: PrestaShop added a`.ai/`\n\nfolder to its core repo with 57 domain contexts, 22 component contexts, pre-generated indexes, and reusable skills. It's an AI agent onboarding system, versioned directly alongside the code. It's an approach I should have adopted earlier on my own modules.\n\n`.ai/`\n\nFolder Actually Is\nThe first time I saw this folder on the [PrestaShop develop branch](https://github.com/PrestaShop/PrestaShop/tree/develop/.ai), I assumed it was an experiment. It's far more structured than that.\n\nThe `.ai/`\n\nis a **hierarchical context system** for AI agents. The full structure:\n\n```\n.ai/\n├── CONTEXT.md        ← global entry point\n├── STRUCTURE.md      ← canonical template for writing new contexts\n├── GOTCHAS.md        ← common pitfalls and tricky patterns\n├── MULTISTORE.md     ← multistore-specific guidance\n├── Domain/           ← 57 domain contexts (Cart, Order, Product...)\n├── Component/        ← 22 component contexts (CQRS, Grid, Form...)\n├── skills/           ← reusable task templates\n└── generated/        ← pre-computed indexes (CQRS, routes, entities, hooks)\n```\n\nThis isn't extra documentation. It's a context-feeding system designed for agents that will actually modify the code.\n\nThe classic problem with AI agents on a large repo: they don't know what to read first. PrestaShop solves this with **pointer files** at the repository root.\n\nEach tool reads its own entry file, which redirects to `.ai/CONTEXT.md`\n\n:\n\n| Tool | Auto-read file |\n|---|---|\n| Claude Code | `CLAUDE.md` |\n| Cursor | `.cursor/rules/prestashop-context.mdc` |\n| GitHub Copilot | `.github/copilot-instructions.md` |\n| Windsurf | `.windsurfrules` |\n| Gemini CLI | `GEMINI.md` |\nVerdict |\n✅ Zero config for the developer |\n\nThe navigation flow:\n\n```\nTool reads CLAUDE.md\n  → CLAUDE.md points to .ai/CONTEXT.md\n    → CONTEXT.md lists available domains and components\n      → Agent loads .ai/Domain/Cart/CONTEXT.md when relevant\n```\n\nNo manual setup. You open the project, and the agent automatically reads the right context based on which files are open.\n\nEach domain `CONTEXT.md`\n\nfollows a standardized template defined in `.ai/STRUCTURE.md`\n\n. For the Cart domain, for example:\n\nThis is exactly what you'd put in a system prompt when configuring an agent to work on a module. The difference: here it's versioned, shared, and maintained by the core team.\n\nThe 22 component contexts cover cross-cutting infrastructure: CQRS, Grid, Form, Hooks. These are the areas where an agent mistake propagates across the entire codebase — hence the extra care put into these files.\n\nThe `generated/`\n\nsubfolder contains four pre-computed indexes:\n\n`cqrs.md`\n\n— all existing CQRS commands and queries`routes.md`\n\n— routes index`entities.md`\n\n— entities index`hooks.md`\n\n— hooks indexWhy does this matter? An agent adding an Admin API endpoint needs to know which CQRS queries already exist. Without this index, it hallucinates class names or re-proposes things that already exist. With the pre-computed index, it can check what's already there before proposing anything.\n\nIt's the same principle as the `context-memory`\n\nagent I built for my own projects — except here the PrestaShop team maintains these indexes as part of the project's normal development workflow.\n\nThe [usage documentation](https://devdocs.prestashop-project.org/9/development/ai-assisted-development/using-ai-tools/) is clear on this point: AI-generated code submitted as a contribution must meet the **same quality standards as any other contribution**.\n\nConcretely, that means verifying the generated code:\n\n`ObjectModel`\n\nin new codeThis isn't a free pass. It's accelerated onboarding. The difference matters.\n\nLet me be direct: PrestaShop's `.ai/`\n\nfolder looks like what technical documentation for agents should always have been — hierarchical, versionable, tool-agnostic. Does it replace a solid understanding of the codebase? No. Does it make an AI agent significantly more reliable on a project of this complexity? Absolutely.\n\nI'll be adapting this approach on my own commercial modules. If you contribute to the PrestaShop core or build AI tooling on top of the ecosystem, read the [CONTEXT.md](https://github.com/PrestaShop/PrestaShop/blob/develop/.ai/CONTEXT.md) before letting your agent touch the code.\n\n*Nicolas Dabène — PrestaShop & Laravel developer, custom solutions.*", "url": "https://wpnews.pro/news/prestashop-added-an-ai-onboarding-system-directly-to-its-repo", "canonical_source": "https://dev.to/ndabene/prestashop-added-an-ai-onboarding-system-directly-to-its-repo-26md", "published_at": "2026-05-28 17:07:21+00:00", "updated_at": "2026-05-28 17:25:31.992759+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-infrastructure", "generative-ai", "large-language-models"], "entities": ["PrestaShop", "AI", "CONTEXT.md", "Domain", "Component", "skills", "generated"], "alternates": {"html": "https://wpnews.pro/news/prestashop-added-an-ai-onboarding-system-directly-to-its-repo", "markdown": "https://wpnews.pro/news/prestashop-added-an-ai-onboarding-system-directly-to-its-repo.md", "text": "https://wpnews.pro/news/prestashop-added-an-ai-onboarding-system-directly-to-its-repo.txt", "jsonld": "https://wpnews.pro/news/prestashop-added-an-ai-onboarding-system-directly-to-its-repo.jsonld"}}