Martin Kuai中文

How I work

How I organize agents and control quality when I deliver projects with AI.

Three ways to organize the work

strong modelplanbuildtestfix

Single-Agent Loop

For well-bounded tasks that can be fully described up front. One strong model takes the whole task and plans, builds, tests and fixes on its own, looping until it meets the acceptance criteria.

Seen in The previous version of this site

splitin parallelaccept

Multi-Node Graph

For large tasks that can be broken down. The work is split into a DAG by dependency, and each node gets its own Task Spec. Nodes with no dependencies and no conflicting changes run in parallel, each in its own worktree.

Seen in Operations back office

Coordinatorsub-agentsub-agentsub-agentsub-agentindependent review

Coordinator + Sub-agents

For high-volume work that needs consistent judgment. A strong model acts as the Coordinator: it plans, splits, integrates and makes the final call. Well-bounded execution goes to low-cost sub-agents, and key nodes are reviewed independently by a model that did not build them.

Seen in Australian fashion research

Six principles

Layered selectionLayered selection

Rule → Low-code → Code → LLM

If rules can solve it, don't hand it to a model.

Rules first; low-code before code; code only when something must run long-term or needs fine control. LLMs go only where judgment or generation is required.

Seen in Daily Chip News

Context isolationContext isolation

Context Isolation

Each role sees only what its job requires.

Each role receives only the input its job needs: the Writer reads the Researcher's notes, and the Reviewer reads the draft and its sources. Structured output and schemas keep results from drifting.

Seen in Daily Chip News

Task specs and state in GitTask specs

Task Spec & Handoff

Write the spec, keep state in Git, resume anytime.

Every node states its starting version, its dependencies, which files it may and may not touch, its deliverables and its acceptance criteria. Progress, changes, test results and next steps go into Git, so any model or session can pick up where the last one stopped.

Seen in Operations back office

Quality gatesQuality gates

Quality Gate

Rework has a limit; rules decide what ships.

A rejected draft goes back for rework up to a set limit; past it, the work is put on HOLD for a person. Rules, not a model, decide what gets published. Failures are graded: a single bad item is skipped fail-soft, while config, key or data-source failures are fail-fast and stop the run with an alert.

Seen in Daily Chip News

Evidence-based acceptanceEvidence

Evidence-based Acceptance

Results decide, not a report that says “done”.

Code changes, run results, the database and the live page decide whether work is accepted, not an agent's own claim that it is done. Each type of user gets a Persona Walkthrough, and several models review independently, with their conclusions kept separate.

Seen in Operations back office

Human-in-the-loop boundariesHuman in the loop

Human-in-the-loop

High-risk actions stop for confirmation.

Reversible routine work runs on its own. Deletions, money, credentials, or anything with unclear business meaning pauses for confirmation. If the direction is wrong, work stops immediately.

Seen in Operations back office