engineering note / Agentic Engineering
A two-role Codex workflow from specification to CI
Separating implementation from verification
Controlled agent work starts with a contract, role separation, and an external gate—not with the number of agents.
In brief
- The specification is a contract.
- Review should not be the implementer’s self-assessment.
- CI closes the loop with external evidence.
Why use two roles
An agent that wrote a change carries the same context and assumptions into self-review. A second role does not guarantee correctness, but it creates a separate critical step grounded in the specification and observable artifacts.
The split only works when the roles have different contracts. Two sessions following the same broad instruction do not create quality control.
The working contract
The implementation role receives scope, acceptance criteria, and allowed changes. The verification role receives the same criteria without the author's internal assumptions. It must point to evidence: a test, diff, log, or reproducible scenario.
specification → implementation → independent review → CI → human decisionWhat CI should cover
- formatting, lint, and types;
- unit tests for critical behaviour;
- data-contract validation;
- a browser test of the user journey;
- version and limitation records.
CI does not judge product value. It provides repeatable external evidence that one version satisfies its technical contract.
Common failure modes
The first is scope expansion during implementation. The second appears when review comments on style but never executes the acceptance scenario. The third is green CI backed by tests that do not touch the changed path.
Where the pattern helps
This workflow is useful for tasks with an explicit contract and testable outputs. When product direction remains unresolved, an owner decision is needed before more agents are added.
LIM
Limitations and scope
One experiment does not prove an advantage for every repository or type of work.
SRC
Sources and external edition
Original or earlier Medium material
AI tools assisted with structure and editing. The author must review the facts, sources, conclusions, and final text before production publication.
LOG
Change history
- First expanded edition in the owned archive.
- Review of structure, limitations, and evidence links.