Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ will not run under Ray.Di or will break framework expectations.
7. **Semantic validators**: one class per concept, one `#[Validate]` method,
throw a domain exception from `src/Exception/`. Link to schema.org in the
docblock when a standard term exists (`@link https://schema.org/…`).
8. **Reason services**: always define an `…Interface` and depend on the
interface, never the concrete class. Ray.Di binds the implementation.
8. **Reason services**: Reasons sitting at an **external I/O boundary**
(HTTP, DB, payment gateway, third-party API, filesystem, clock, randomness)
MUST define an `…Interface`; consumers depend on the interface and Ray.Di
binds the implementation — so tests can swap in a Fake. Reasons that are
**pure in-process policies or calculators** (rule-book classes with no
I/O) MAY be injected as concrete classes; no interface is required.
Examples: `PaymentGatewayInterface` and `CreditBureauInterface` (boundary);
`IncomePolicy` and `JTASProtocol` (pure policy).
9. **Namespaces**: follow the existing per-demo pattern
(`Be\Pattern\<Name>\<Layer>\…` or `Be\App\<Layer>\…`). Never invent a new
root namespace.
Expand Down
Loading