跪拜 Guibai
← All articles
iOS · AI Programming

After the Chat: Spec, Tickets, Implement, and the Code Review That Keeps AI Coding Honest

By season_zhu ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

AI agents lose decisions made across long chats, and this pipeline freezes them into a spec and task list that both the agent and a human can audit. The required code-review against a fixed spec catches scope creep and missed requirements before a single line is committed.

Summary

to-spec takes a finished requirement discussion and writes a spec without re-interviewing you. It pins down test seams, then produces a document that records the problem, confirmed decisions, acceptance criteria, and out-of-scope items. to-tickets splits that spec into tracer-bullet tasks, each with its own acceptance criteria and blocker relationships, and asks for confirmation on granularity before publishing.

implement works a ticket with tdd, type checks, and a full test run, then calls code-review. That review runs two parallel checks, one for standards and one for spec, against a fixed git diff base. Context guidance says keep the discussion, spec, and ticket breakdown in one chat, but start each implement in a fresh session. Small single-session tasks skip the whole routine, and large migrations get an expand-contract exception instead of forced slices.

Takeaways
— to-spec opens with "Do NOT interview the user; just synthesize what you already know."
— Test seams choose where behavior is verified (e.g., check the exported ZIP and errors, not private function call counts).
— A spec records problem, delivery requirements, confirmed decisions, test decisions, and out-of-scope items.
— to-tickets requires tracer bullets: each task runs from entry to verifiable result, not just isolated components.
— Each ticket lists acceptance criteria and blockers; granularity and dependencies are confirmed before publishing.
— implement mandates tdd, type checks, single-file tests, a full suite, code-review, then a commit to the current branch.
— code-review runs two parallel sub-agents (Standards and Spec) over `git diff <fixed-point>...HEAD`, not uncommitted changes.
— ask-matt keeps discussion, spec, and tickets in one context, but each implement starts fresh; small tasks skip spec and tickets.
Conclusions

The workflow's value is the written record of decisions, not the skills' code; it turns a chat's implicit agreements into artifacts a human can audit after the agent forgets.

A fixed review base and explicit scope confirmation prevent code-review from being a formality; the warning about empty diffs and uncommitted changes points to a real failure mode in AI-assisted commits.

The expand-contract exception for large migrations shows tracer-bullet slicing is a default, not a law; some changes need coexistence periods to keep every batch green.

Concepts & terms
Seam
A testing seam is the interface through which behavior is verified from outside the system, such as calling an export API and checking the resulting ZIP, rather than asserting internal implementation details.
Tracer bullet
A vertical slice of functionality that is narrow in scope but runs from user entry to a demonstrable result, so each ticket produces something verifiable.
Expand-contract
A migration pattern that introduces a new form alongside the old one, migrates consumers batch by batch, and deletes the old form only after all batches complete; used when a change affects many call sites at once.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗