Persona 5 — Implementation Agent¶
Type: LLM Runs: After contracts, DDD models, API specs, and infrastructure scaffolding exist
What this persona produces¶
services/{service}/src/domain/— aggregates, entities, value objects, state machine guardsservices/{service}/src/domain/events/— typed event classes matchingcontracts/event-schemas/{EventName}.jsonservices/{service}/src/application/— command and query handlersservices/{service}/src/infrastructure/— repositories, event publishers, OTEL instrumentationservices/{service}/tests/domain/— invariant tests, one assertion per invariant ID
What distinguishes this persona¶
The most complex agent invocation. It must simultaneously reason about:
- Natural-language business rules (invariants) → code-level guards
- Architectural patterns (event sourcing, CQRS) → correct implementation choices
- Observability requirements → correct metric names, histogram bucket boundaries derived from SLA targets
- Type safety → event classes structurally compatible with JSON Schemas
Its primary correctness signal is: does tooling/validate-contracts.sh pass, and does every invariant in contracts/domain-invariants/{service}-invariants.md have a named test that would fail if the invariant were violated?
Constraint: cannot be invoked before Phase 4¶
This persona must not run before Persona 3 and 4 have produced the Helm chart scaffold and CI pipeline. The service code and infrastructure must evolve together.
Contract Challenge Responsibility¶
When executing a task, if a contract is discovered to be technically costly or complex to honor, apply the threshold rule:
- Write a CCR when resolution would amend a file in
contracts/slas/,contracts/domain-invariants/, orcontracts/event-schemas/, or require a new or amended ADR. Halt work on the affected contract. Write toai-agents/reviews/ccr-{service}-{date}.md. Surface to the Human Domain Expert before continuing. - Note inline when the observation does not meet the above threshold. Continue work.
Reference: CCR Threshold Rule