Back to Research

Boffin Routes Constraints for Coding Agents

Boffin adds file-scoped constraints before an agent edits code, then asks for verification you can review.

A View from Hampstead Heath (?), landscape painting by John Constable (1825).
Rogier MullerJuly 27, 20269 min read

Boffin is MicSm’s MIT-licensed open-source control layer for AI coding agents. It deals with a very familiar failure mode: you ask for a small fix, and the agent returns a broad rewrite that still compiles. The takeaway is simple: implement code review habits for ai-generated code by narrowing what the agent sees before the edit, then making verification part of the edit itself. For Cursor users thinking about ai coding training for teams, Boffin is interesting because it treats review safety as a workflow shape, not a motivational poster.

What Boffin actually adds

Boffin is not another static repository instruction file. Its README says it routes architectural constraints for the exact file an agent is about to edit, then requires verification proportional to the change.

A staff-engineer layer is a small control surface that gives an agent local design judgment before it writes code and asks for proof after it changes code.

That sounds modest, but the distinction matters. A root AGENTS.md, CONTRIBUTING.md, or broad Cursor rule can explain the whole repo. Boffin’s bet is that the agent usually needs less global context and more precise context: the constraint that applies to src/parser/tokenizer.cpp, not a five-page philosophy of the codebase.

As of July 26, 2026, the repository had 28 GitHub stars, was mainly JavaScript, used the MIT license, and described itself as powered by ParselFire Core. The README points to a DuckDB case study where a guided refactor landed at +17 / -17 lines with 2,104 assertions passing. Treat that as a project claim, not a universal benchmark.

The project also names its lane carefully. It says Boffin is not a linter, not a CI gate, not a prompt pack, and not a speed tool. That positioning is the most useful part: it acts before and after the edit, while review still belongs to a human.

Why the Show HN thread cared

The Hacker News reaction centered on a real annoyance, not novelty. Agentic coding often fails in a boring way: the output is plausible, tests pass, and the diff is much larger than the request.

Boffin tries to reduce that by turning “how we do things here” into routed context. If an agent is editing a storage-layer file, it should see storage-layer constraints. If it is editing a test helper, it should not be dragged through the whole architecture handbook.

The fair objection is also obvious: can an AI slop plugin make AI less sloppy? Only partly. Boffin can shape the edit request and force a verification loop, but it cannot prove semantic correctness by itself. A confident agent can still misunderstand a constraint, skip an edge case, or pass the wrong tests.

That is why the project is more interesting as a review-safety experiment than as a magic guardrail. It sits near the same family of patterns as scoped Cursor rules, nested repo instructions, and reviewable agent receipts. If you want a neighboring example, see how claude-code-survival-kr Guards Working Code frames guardrails around existing behavior.

Boffin vs repo rules vs CI

The useful comparison is not “Boffin or nothing.” Most serious repos already have some mix of repo rules, local docs, tests, and CI. Boffin is another point in that chain.

Criteria Boffin Repo-wide rules such as AGENTS.md or Cursor rules Linters and CI gates
When it acts Before the edit and after the edit Mostly before or during the agent session After code is written
Scope of guidance File-specific architectural constraints Broad repo or directory instructions Mechanical checks, tests, builds, policy gates
Best use Preventing broad rewrites and asking for proportional verification Teaching stable conventions once Catching regressions that can be expressed as checks
Main weakness Depends on constraint quality and agent compliance Easy to overstuff until agents ignore the important parts Often too late to prevent a messy diff
Human review role Still required Still required Still required

Verdict: Boffin wins when the risky part is architectural drift in a specific file or subsystem. Repo-wide rules win when the guidance is durable and simple, like “do not edit generated files.” CI wins when the rule can be tested deterministically. The sane path is usually all three, with the smallest possible instruction surface at each point.

Try it safely in Cursor

Cursor, Anysphere’s AI code editor, already gives developers a reviewable Agent workflow. Boffin’s idea maps well to Cursor because you can make the agent work from a smaller boundary, inspect the diff, and ask for a verification receipt before accepting changes.

Start with one small repo boundary. For example, choose a hook file like apps/web/src/hooks/useBillingPlan.ts. Before asking the agent to edit it, write down the constraints that actually matter:

  • Do not change the public hook signature.
  • Do not move billing state into a component.
  • Keep network calls behind the existing client wrapper.
  • Add or update tests only for the changed branch.
  • Show the exact command used to verify the change.

That is the Boffin-shaped habit. The trap is turning it into a second architecture document. If the constraint is not relevant to this edit, keep it out of the agent’s working context.

This is also where the related training topic becomes practical. Good engineering team ai adoption is not “let every agent touch everything.” It is deciding which files deserve local rules, which diffs require receipts, and which edits should stay human-only.

Copy this Cursor review checklist

Use this as a lightweight review checklist for a Boffin-style experiment in Cursor. It is intentionally small. The goal is to make the agent’s edit easier to review, not to build a parallel process around it.

# Cursor review checklist for a constrained agent edit

Target file or directory:
- 

Local constraints the agent must follow:
- 
- 
- 

Allowed change size:
- Expected diff: small / medium / large
- Files the agent may edit:
- Files the agent must not edit:

Verification required before review:
- Test command:
- Typecheck/build command:
- Manual check, if any:

Reviewer questions:
- Did the diff stay inside the requested boundary?
- Did the agent preserve the public API or explain the change?
- Did verification match the risk of the edit?
- Are unrelated cleanups removed from the diff?
- Would this same constraint help the next edit in this file?

Use it when you want to implement code review habits for ai-generated code without freezing the whole repo. Skip it for trivial edits like spelling fixes, generated snapshots, or changes where CI already gives a crisp yes/no answer.

Common questions

  • What are the best ways to implement code review habits for ai-generated code?

    The best way is to review the boundary before the diff, then review the proof after the diff. For a small agent edit, name the allowed files, list three to five local constraints, require the test command, and reject unrelated rewrites. That habit works better than asking reviewers to reconstruct the chat afterward.

  • Is Boffin just another AGENTS.md?

    No, Boffin’s stated difference is routing constraints per edit rather than sending one static instruction block for the whole repository. AGENTS.md-style files are still useful for durable rules. Boffin is aimed at the narrower moment when an agent is about to touch a particular file and needs local architectural judgment.

  • Does Boffin replace CI or human review?

    No, Boffin does not replace CI or human review. Its README explicitly frames it as acting before and after the edit, not as a linter or CI gate. The practical value is reducing messy diffs and asking for proportional verification; the final call still belongs in code review.

  • Where does MCP fit with this kind of tool?

    MCP, the Model Context Protocol, is the integration layer that can connect coding agents to external systems such as GitHub, docs, databases, and internal knowledge. Boffin’s core idea is not “add more tools.” It is route the right constraints at the right moment, then verify the result.

  • Is this useful for ai coding training for teams?

    Yes, but only if training stays close to real diffs. A good exercise is to take one recurring agent failure, write the smallest file-scoped constraint that would have prevented it, and run the same edit again. Avoid broad lectures about agent behavior; reviewers learn faster from one constrained pull request.

Best ways to use this research

  • Best for: Repos where coding agents make correct-looking but oversized diffs, especially around architecture-sensitive files.
  • Best first artifact: A one-page Cursor review checklist for a single directory, not a repo-wide policy document.
  • Best comparison angle: Compare Boffin against AGENTS.md and CI by timing: before-edit guidance, during-edit context, and after-edit verification.
  • Best caveat: Do not treat routed constraints as proof. They are review guardrails, and weak tests still leave weak confidence.

Further reading

Next step

Pick one file where agents keep over-editing, write five local constraints, and run one constrained Cursor Agent edit. If the diff gets smaller and the verification receipt gets clearer, you have found the part of Boffin worth copying.

One methodology lens

One useful way to read this through our methodology is the Plan step: delegate first-pass decomposition and dependency mapping, review the sequencing and assumptions, and keep ownership of scope and priorities. If that split is still fuzzy, the workflow usually is too.

Related training topics

Related research

Ready to start?

Transform how your team builds software.

Book a 15-minute sync