自適應流程:讓程式碼決定變更需要多繁複的流程
Adaptive process: let the code decide how much ceremony a change needs
作者提出由 SuperSmall 按變更涉及的檔案、函式、影響範圍及歷史紀錄,預先推薦 Light、Standard 或 Full 流程,並在工作完成後按實際改動檢查是否需要提升級別。現有流程中,22 個有評分紀錄的 issue 涉及 362 項評分,Agent 只在程式碼中修正了 1 項;新方案讓 Light 流程的評分只供審閲者參考,不會阻擋合併。
Part of the write-ups behind my Build Stuff 2026 talk, Control Your Fate at the Metal, Vilnius, 2 December.
Every agent in my projects works through the same SDLC: an acceptance plan, a spec, spec review rounds,
a review team, evidence, a SuperSmall ranking to answer, and a pull request. That process is why I can run
many agents at once and still trust what merges. It's also, on a small change, most of the cost.
On 4 November I watched it happen on a dashboard fix. The change added one read-only endpoint and some panels.
To merge it I had to record five waivers in my own words: the acceptance plan, the spec review, the review
team, the evidence run, and finally the ranking gate. That gate had refused the push on ten "high" items:
three function-complexity counts, "231 complexity in all", a "27 functions changed", three files' fix history, and a
variable named token flagged twice as a password in a properties file.
The tool's own report on that pull request says it best:
measured_tier: 1 level: low
tier_reason: "complexity 1, risk missing (counts as high) -> derived tier 3"
pm_required: true
SuperSmall measured the change as low risk. The process ran it as the highest tier anyway, because the spec
didn't say otherwise.
Fail-safe became fail-heavy
That rule is written down on purpose. The tier code says: everything that could lower rigor fails toward
tier 3. A spec with no risk counts as high. A missing complexity counts as 5. A declared tier may raise the
derived tier, never lower it. The measured risk at the end may raise the tier, never lower it.
Each of those rules was right when we wrote it. Agents underestimate their changes. A process that trusts
the author's own estimate gets gamed by accident. So we built one that couldn't be talked down.
The cost shows up in the numbers. Across the 22 issues with ranking records in our store, agents answered
362 ranked items and fixed 1 of them in code. Every change got the heavy path, and the heavy path's
items were mostly defended, not fixed. The escape hatch is the owner's waiver, so the process that was
meant to save my attention now spends it: on a small change I'm the one clicking through every gate.
The idea: decide the path first, from the code
The process isn't wrong. It's just one size. What I want is a path chosen per item, before the work
starts, from what the change will actually touch, and checked again at the end against what it did touch.
I'm calling it the process steer, and it's SuperSmall's job, because SuperSmall already knows the
things that matter:
- Which files and functions an item is likely to touch: the same ranking that already answers "where does this change go?"
- How far they reach: callers, public signatures, other repositories in the project.
- Their history: fixes after merge, past defects, recorded dead ends and decisions.
- What's in flight: the shadow merger's overlaps with other agents' branches.
From those it recommends one of three paths, with its reasons:
| Path | When | What runs |
|---|---|---|
| Light (tier 1) | a contained change in files with clean history, no public surface | a short spec the author finalizes after the mechanical check, one reviewer with at most one fix round, the suite run once, the SuperSmall ranking advisory |
| Standard (tier 2) | moderate reach, or files that have needed fixes | one Architect round (PM only for user-visible changes), reviewers block only on design defects, the ranking gate |
| Full (tier 3) | public contracts, cross-repo reach, auth, IPC, data migrations, wide reach | everything we run today |
The surprise when I went to build it: the process already had these three paths. Our tier table has scaled
spec size, review and QA by tier for weeks. Almost nothing ever ran below tier 3, because the tier comes from
the spec's <complexity> and <risk>, agents don't know what to write there before they've read the code,
and a missing risk counts as high. So the steer doesn't add a new process. It gives the author the
<complexity> and <risk> for the recommended path, with SuperSmall's reasons, at the moment the item is
filed and again when the work starts. The spec carries it, and the existing tier rules do the rest. The one
new rule is that at tier 1 the SuperSmall ranking is advisory: what it would have refused on goes into the
pull request for the reviewer, and nothing is refused.
Three things keep it honest
Hard floors. Some changes are full path no matter what the prediction says: auth, IPC, a data
migration, a public contract (a tool, API or schema). The steer can't recommend below them.
The finish still checks. When the agent finishes, the measured risk of the real diff is compared with
the path. A change that grew past its prediction is raised then, and the raise is recorded. A prediction
that was too heavy doesn't silently drop at the end. Going lighter is a decision made up front, in the open.
It learns from what followed. Every recommendation is a prediction, and we already record the
outcomes: fixes needed after merge, the referee sending an answer back, my corrections. The steward will compare
each path with what happened next and tune the steer only when a replay says the new rule predicts better.
Light-path items that later needed a fix are the number to watch.
What changes for the agent
Nothing to remember. The first step of every workflow already calls the tool that starts the issue; that
call now returns the path. The rest of the workflow is the same steps, scaled by the tier the path gives. It works the same in every runtime we support, because it lives in the MCP and the
process reference, not in one agent's prompt.
What I'll measure
- Waivers per merged change. Today a small change needs me to waive its way through. That should fall to zero for light-path items.
- Time from start to merge, by path.
- Fixes after merge, by path. If light-path changes need more fixes than standard ones, the steer is wrong and the replay will say so.
- Ranked items fixed vs answered, now on the SuperSmall Overview. A light path shouldn't make agents defend counts at all.
The process exists to spend rigor where it pays. Spending the same rigor everywhere was the safe first
version. The next version lets the code say where rigor pays.
Talking about this at Build Stuff 2026
This is one of the write-ups behind my talk at Build Stuff in Vilnius this December, the 15th edition, under the theme The Age of Agency.
Control Your Fate at the Metal
Wednesday 2 December, 15:00, Zeta 2. 45 minutes.
If you're coming, say hello. If you're not yet, 2026SPEAKER_20 takes 20% off a ticket.
#BuildStuff15 #buildstuffconf #AgeOfAgency @buildstuffconf https://buildstuff.events
I'm Kent Alstad. I build KandiForge, a toolchain for running software projects with AI agents under an
evidence-based process. If you've tuned how much process a change gets by its size or risk, I'd like to
hear what signal you trusted.
來源:DEV Community · dev.to