Synthesis coding is the craft of building production-grade software through disciplined human–AI collaboration. The human provides architectural authority, judgment and quality standards; AI helps explore designs, implement changes and examine the results. The ambition is better software and more capable engineers. Code remains a durable source of truth: something the team can version, review, test and use to diagnose unexpected behavior.
Five principles
- Human architectural authority. Own the decisions that become expensive to reverse: module boundaries, data flow, where state lives, the security model and how the system fails. Ask AI to research alternatives and challenge assumptions; take responsibility for the commitment.
- Systematic quality standards. Generated code must meet the same standards for review, testing, security and performance as any other code. Faster production makes those standards more consequential. Use AI to help meet them, and examine whether the checks can reject a plausible mistake.
- Active system understanding. Stay close enough to explain what a module does, why it talks to another and what fails when load doubles. Reviewing a change should deepen that understanding. If the team cannot diagnose unexpected behavior under pressure, deepen its understanding or simplify the system.
- A self-improving system. Turn lessons into better project records, reusable skills, instructions and checks. Review how those changes work in subsequent tasks. The project, the team’s shared practices, the practitioner’s judgment and the wider discipline should improve together.
- Transferable knowledge. Leave code, decisions and rationale that another person, another AI tool and your future self can use. Keep project memory in records the project owns, and make the tool-specific loading steps explicit. Share useful methods across projects and crafts.
The principles reinforce each other. Understanding supports architectural judgment; quality checks reveal lessons; recorded lessons travel to the next task and strengthen the next decision. A useful review preserves the features and decisions that already matter while examining what the new code actually does.
Start with an expected result you can explain. Then choose a check capable of rejecting the mistake you are worried about.
Two implementations can agree on the same mistake
The independent-checks exercise uses this constructed front matter, the metadata block at the top of a Markdown document:
---
tags:
- [tag1, tag2]
- [tag3]
---
Body.
Each outer item is itself a sequence. The expected parsed value is:
{"tags": [["tag1", "tag2"], ["tag3"]]}
The exercise compares a library parser with a deliberately faulty producer that turns each inner sequence into a comma-separated string. A second failure case makes both paths return the same wrong value:
{"tags": ["tag1, tag2", "tag3"]}
Agreement cannot decide this case. Both outputs have lost the nested structure. The literal expectation, written from the intended syntax, rejects both.
| Check | What it can establish |
|---|---|
| Compare the two outputs | Whether those implementations agree. |
| Compare each with the reviewed expected value | Whether each preserves the required nested structure. |
| Inspect the trace before and after flattening | Where the inner sequence became a string. |
Run the existing example
Download the offline exercise. It contains the constructed inputs, literal expectations, programs and dependency licenses. From the extracted directory, use Node.js to run:
node exercise.cjs demo
node exercise.cjs parser shared-wrong
The demo shows the intended results. The shared-wrong command exits with status 1 because both outputs fail the expectation.
Put the check into a development task
Before implementation, give the assistant the intended behavior, relevant source and an input that could expose the suspected failure. Inspect the expectation yourself. If the implementation changes, keep the expectation tied to the requirement; do not regenerate it merely to match the new output.
For an existing feature, retain checks for behavior that must survive. For a batch edit, inspect the target files and proposed actions before applying them. A passing dry run still needs to identify the right records and operations.
The ownwords conversion case applies the same question to article boundaries: did the converter preserve the paragraph after a nested box, or did both the converter and checker stop too early?
Articles and next steps
- Verifying AI-Written Code with Independent Checks
- Building ownwords: Design Choices and Conversion Tests
- Five checks for AI-assisted engineering decisions
Browse the full archive or follow the coding feed. The code-planning and implementation-integrity instructions are maintained in the public source repository. Rajiv Pant wrote the methods and cases linked here. A useful contribution includes the failing input, intended result and evidence that the proposed correction addresses it.