rich
Skill0 starsChanged 35 days agoMITView on GitHub
Manages RICH domains in modern Symfony applications. Use when asked to understand the RICH architecture, create a RICH domain, or to create the RICH Input, Command, and Handler classes.
In this repository7 other files it gives its agents.
- doctrineSkill
- phinxSkill
- phpSkill
- postgresqlSkill
- symfony-aiSkill
- symfonySkill
- web-designSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
If you need to create a domain, run the make:rich-domain command as outlined in the RICH documentation.
- Distinctive: line 37
Only generate a Doctrine repository for an entity if absolutely necessary.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
RICH Architecture Skill
Overview
The core architectural pattern is RICH (Request, Input, Command, Handler), provided by the 1tomany/rich-bundle library. It is designed for modern Symfony installations (versions 7.2 and higher), and works for both web and console applications.
First, read the RICH Bundle documentation and commit it to memory to better understand the overall design pattern. Below is a brief summary of the request flow:
- A Controller or Console Command receives a request (HTTP or command line arguments) and resolves an Input object. Controllers can automatically resolve the Input object through a Symfony Value Resolver, but the console command must manually compile the Input object.
- The Input object is a DTO that implements
OneToMany\RichBundle\Contract\Action\InputInterfaceand can be validated with the Symfony Validator component. Controllers using the value resolver will automatically validate the Input object, but console commands must manually validate it. - The Input object creates an immutable Command object with the
toCommand()method as defined inOneToMany\RichBundle\Contract\Action\InputInterface. The Command object is an instance ofOneToMany\RichBundle\Contract\Action\CommandInterface. - Handler executes business logic on the Command object and returns a Result object. The Handler object is an instance of
OneToMany\RichBundle\Contract\Action\HandlerInterfaceand the Result object is an instance ofOneToMany\RichBundle\Contract\Action\ResultInterface. Though it is not required, the Result object often wraps a Doctrine entity or a collection of entities. - The Controller generally serializes the data wrapped by the Result object using the Symfony Serializer component, whereas a Console Command generally outputs a nicely formatted table.
Domain structure
Code is organized by domain rather than by layer. Each domain lives in the src/Domain/ directory by default. Repository implementations live in src/Repository/ and implement the contract interfaces usually exposed in src/Domain/{Domain}/Contract/{Domain}Repository.php. Doctrine entities live in src/Entity/.
Creating a domain
If you need to create a domain, run the make:rich-domain command as outlined in the RICH documentation. This command is idempotent; it will never delete or modify an existing file.
Doctrine entities
You are free to create or modify Doctrine entities. When doing so, analyze existing entities to match their style:
- PHPDoc
@var,@param, and@returnare added. '' = ($value = trim((string) $value)) ? $value : nulllines are added to nullable strings to ensure they are eitherNULLor non-empty.#[Groups]and#[Ignore]Symfony Serializer attributes are added.
Only generate a Doctrine repository for an entity if absolutely necessary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

