<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Dave</title>
    <description>The latest articles on DEV Community by Dave (@dr_data).</description>
    <link>https://dev.to/dr_data</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3817477%2F908d5d27-983c-4c26-8009-ab194d4a8035.jpeg</url>
      <title>DEV Community: Dave</title>
      <link>https://dev.to/dr_data</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dr_data"/>
    <language>en</language>
    <item>
      <title>AgentScaffold 0.15</title>
      <dc:creator>Dave</dc:creator>
      <pubDate>Wed, 11 Nov 2026 21:34:16 +0000</pubDate>
      <link>https://dev.to/dr_data/agentscaffold-015-2539</link>
      <guid>https://dev.to/dr_data/agentscaffold-015-2539</guid>
      <description>&lt;p&gt;I wrote a good operating manual for my agent. It had hard prohibitions, approval gates, a review process, the lot. The agent, on a busy afternoon, did not read it.&lt;/p&gt;

&lt;p&gt;That was the uncomfortable discovery of the last couple of months. Everything I had built assumed a rules file in the repo would be loaded, read, and followed. Sometimes it was. Sometimes the editor skipped it, or the project lived in a folder the editor didn't treat as the workspace root, or the file belonged to another team and I wasn't allowed to touch it. A process that depends on the agent happening to read a file is a suggestion, not a process.&lt;/p&gt;

&lt;p&gt;This post covers what came after that, between 0.12 and 0.15. I'll start with a short version of what AgentScaffold is for anyone new, then go through what changed and what each change was solving.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What AgentScaffold is, for new readers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The shortest way I can put it: AgentScaffold is the project manager your coding agent doesn't have.&lt;/p&gt;

&lt;p&gt;Picture asking an agent to change how a service retries failed jobs. On its own, it reads a few files, settles on a theory, and starts editing. It will be fluent and confident the whole way, and it won't tell you where it was guessing.&lt;/p&gt;

&lt;p&gt;Now put AgentScaffold underneath. Before touching anything, the agent asks the project where things stand: what's in flight, what's blocked, whether a plan already covers this. The change gets written down as a plan, and the plan gets challenged by a reviewer that can see the project's graph, so the objection is specific. This function has callers in three modules the plan never mentions. A finding from two months ago says the last retry change broke the nightly job. Then the code is written and checked against the plan, and a retrospective records what surprised everyone. The lessons go into the rules the next review runs against, so the same mistake gets harder to make twice.&lt;/p&gt;

&lt;p&gt;All of that lives in the project itself. Code, plans, decisions, review findings and learnings sit in one knowledge graph that the agent queries through MCP tools. It's a Python package (pip install agentscaffold) that works with Cursor, Claude Code, Windsurf, or anything else that speaks the protocol, with a CLI for the parts that should be deterministic.&lt;/p&gt;

&lt;p&gt;I don't think the weak link in agent-assisted development is the model. It's that nothing around the model remembers, reviews, or learns. I made that argument at length &lt;a href="https://dev.to/dr_data/agentscaffold-memory-peer-review-and-continuous-improvement-for-ai-coding-agents-43fb"&gt;in the first post&lt;/a&gt;, so I won't repeat it here. This one is about what's changed since.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Making sure the process reaches the agent&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This was the biggest change, and it came from the problem I opened with.&lt;/p&gt;

&lt;p&gt;The server now hands the agent the working procedure itself, in the connection handshake: start a session, orient, route by intent, close the session. It doesn't matter whether any rules file reached the editor. If the agent connects, it gets the procedure.&lt;/p&gt;

&lt;p&gt;The governance manual, the part of AGENTS.md that you write and own, gets the same treatment. Instead of hoping the agent read all of it, the server delivers the sections that apply at the moment they apply. Ask to review a plan and the review rules come back with the review. Start implementing and the approval gates come back with the implementation. And approval is now enforced, not just documented: a plan that needs sign-off will not start until one is recorded.&lt;/p&gt;

&lt;p&gt;Two smaller pieces support this. You can install guidance and hooks from your home directory, with nothing written into the repository, which matters when the project sits inside a monorepo you don't control. And edit hooks now refuse changes to paths you've marked read-only, so "don't touch the architecture doc" is something the environment enforces.&lt;/p&gt;

&lt;p&gt;The same instinct fixed some quieter problems. Working sessions used to live forever, so one session had quietly collected seven weeks of decisions from unrelated chats. Now they expire after a stretch of idleness. Orient also stopped trusting the workflow diary over the plans themselves, and it tells you when the diary is stale or contradicts a plan file. A status report that is confidently out of date is worse than none, which is exactly the failure this tool exists to prevent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reviews that remember&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Memory is only useful if the review can see it. The graph already held earlier findings, learnings, and architecture decisions, but a review of a plan didn't go looking for the ones about the same files.&lt;/p&gt;

&lt;p&gt;Now it does. When you review a plan, the review surfaces what the project has already said about the files that plan touches: findings that were raised, lessons that were learned, decisions that govern the area. Impact analysis shows the same history next to the callers. The question "have we been here before?" gets answered at the moment it matters, which is before the code exists.&lt;/p&gt;

&lt;p&gt;I did try something clever here, and it didn't work. The obvious next step was semantic search over that history, matching findings by meaning instead of by file. I ran a study on it before deciding whether to turn it on. Semantic retrieval found things the structural matching missed, so recall went up sharply. But the precision wasn't good enough, which means a reviewer would be handed a lot of plausible-looking noise. So it stays off by default. I'd rather ship the boring version that is right than the impressive version that makes people stop reading the list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Working where you don't own the root&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A lot of real code lives in repositories shared with other teams. Several changes in this stretch were about that.&lt;/p&gt;

&lt;p&gt;A project in a subfolder of a large repository now resolves imports written from the repository root, which previously showed up as unresolved edges. If part of your project lives elsewhere in the repo, you can point at it with a glob and it gets indexed as yours. And the generators no longer write a router into a workspace file you don't control. Each of these started as a small paper cut from one user's setup and would have been invisible to me on a single-repo project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Knowing what you actually run&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the part I find most interesting, because it extends the graph from "what the code is" to "what the project runs."&lt;/p&gt;

&lt;p&gt;Most projects past a certain age have jobs, services, and workflows that nobody can fully list. Something is paused and everyone has forgotten. Something is deprecated and still scheduled. Something has no owner because the person who wrote it moved on. A plan changes a file and nobody realizes three jobs read it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0.13 added a system inventory.&lt;/strong&gt; It is a file that lists the runtime components, with an owner plan, a layer, and a lifecycle: experimental, active, paused, deprecated. Collectors build it from the files that already exist, Prefect deployments, compose files, CI workflows, so you aren't typing a spreadsheet. The components go into the graph, so asking what a file touches now includes the jobs that run it. A plan that touches a paused or deprecated component gets challenged in review, and orient reports lifecycle debt: reviews that expired, deprecations that dragged on.&lt;/p&gt;

&lt;p&gt;That version was too much work to keep true, and I found out by using it. I turned it on for the first real project I had. The first pass missed 39 of its 103 components until I fixed a collector path by hand, and then it reported 103 errors, because nothing had an owner, a layer, or a real start date. Getting it running took four hand-made changes the package should have made for me. A tool that asks you to fill in a form for every component is a tool that gets abandoned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;0.14 is the fix, and the idea behind it is simple:&lt;/strong&gt; declare by exception. You write only decisions, such as pausing a job or deprecating a service. Everything else is derived. Start dates come from git history. Owners come from the plan whose file list created the component, or from a one-line label you put on the service itself. Layers come from the owning plan. The derived values live in a machine-owned file, like a lockfile next to a manifest, so the file you review stays quiet.&lt;/p&gt;

&lt;p&gt;Adoption is one command, scaffold inventory enable. It edits the config, writes the files that are missing, runs the first pass, and tells you what it did. A scheduled workflow runs a monthly architecture review and keeps one issue open while there is debt, so the review happens whether or not someone remembers it.&lt;/p&gt;

&lt;p&gt;On the same project, starting from scratch, it now finds 104 components, zero errors from missing fields, a real start date for every one, and an owner for every scheduled job. It also flags the 30 components it still can't place, with a one-line fix for each. I like that it says so. That list is the honest edge of what can be derived, and clearing it is how "everything maps" becomes true instead of assumed.&lt;/p&gt;

&lt;p&gt;A note on what went wrong while building this: my own test suite was green while the real project found two bugs those tests never would have. One was a service whose command was only flags, reported as a missing file. The other was a mismatch between what the review packet returned and what the contract said it would. The lesson is the one I keep relearning: run the thing on a real project early, not last.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code was told to use tools it did not have&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;0.15 is a smaller release than 0.14, and it came from the same kind of miss. I had a user on Claude Code who followed the install steps. The hooks landed. The session text told the agent to start a session, orient, and read the routing policy. Then the agent either reported missing tools or quietly went back to grep. Nothing had registered the MCP server with Claude. scaffold mcp install wrote Cursor's config and stopped. scaffold doctor looked at that file, saw one healthy entry, and said the registration was fine.&lt;/p&gt;

&lt;p&gt;That is the failure I keep writing about. The process was present as instructions and absent as tools.&lt;/p&gt;

&lt;p&gt;0.15 registers the server for the client you actually have. scaffold mcp install still writes Cursor's ~/.cursor/mcp.json. When Claude Code is installed it also runs claude mcp add --scope user, which is Claude's own way of recording a server for every project. It does not open ~/.claude.json, and it does not drop a project .mcp.json into the repo. A project file would hide the user-level server. --client cursor or --client claude picks one client when you do not want both.&lt;/p&gt;

&lt;p&gt;Doctor now checks each client. A healthy Cursor file no longer hides a missing Claude server. If a local or project entry of the same name outranks the user one, it says so.&lt;/p&gt;

&lt;p&gt;The session text had a second problem. Cursor gets a long always-on routing rule. Claude Code will not take that much text from a session hook. Past a limit it saves the text to a file and shows the agent a short preview, which would have dropped the part that says what to do. So Claude gets a shorter routing body, the project pointer, and a plain note about what a missing tool list means. Five tools stay loaded even when Claude defers the rest: start a session, orient, end the session, callers, and blast radius. On each prompt, if your wording matches a known request, the hook names the tool to call before grep. The other tools are still there. Claude finds them by search instead of carrying every schema on every turn.&lt;/p&gt;

&lt;p&gt;One difference I left on purpose: the tools that write to the graph still ask permission in Claude Code, including starting and ending a session. The read-only tools do not. I would rather a finding get a prompt than have every graph write run silently.&lt;/p&gt;

&lt;p&gt;If you have both editors open on the same project, you now have two server processes on one graph file. A read during an index waits a moment and then asks you to retry. That is the honest limit of the file. It is not a second database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Whether it is worth the overhead&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I run an eval harness that compares an agent using AgentScaffold with one that reads files and greps. The latest run covers 125 scenarios. When the agent routes through the tools, I see about 39% fewer tokens and 84% fewer calls. Agents don't always take the tool, so the replay-adjusted view is closer to 31% and 68%, and about 28% and 61% if you also require the answer to stay as good. I'd quote the lower pair.&lt;/p&gt;

&lt;p&gt;Token savings dropped from the 43% I quoted in the last release post to 39%, and it's worth saying why. Responses carry more now: the earlier findings, learnings, and decisions about a file. A baseline that reads files would never find those at all. I'll take a response that costs a little more and includes the thing you needed.&lt;/p&gt;

&lt;p&gt;If your project is small and the work is a weekend, a good rules file is enough and you shouldn't take on a graph. This starts to pay off when grep stops being a plan, when the work outlives one chat, and when more than one person or agent has to share the same memory. It is still early and it will push back on "we'll figure out the process later." That is on purpose.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;New project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip install &lt;span class="s2"&gt;"agentscaffold[all]”
cd my-project
scaffold init
scaffold index —embeddings

scaffold mcp install                       # Cursor &amp;amp; Claude Code when it is installed
scaffold mcp install --client cursor       # Cursor only
scaffold mcp install --client claude       # Claude Code only
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Upgrading an existing install:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install --upgrade "agentscaffold[all]”
# uv tool users: uv tool install -U "agentscaffold[all]”
scaffold agents hooks                      # regenerate hooks, once per project
scaffold agents generate-all               # refresh routing so agents see the new tools
scaffold index
scaffold mcp install                       # Cursor, and Claude Code when it is installed
scaffold mcp install --client cursor       # Cursor only
scaffold mcp install --client claude       # Claude Code only
scaffold inventory enable                  # optional: turn on the system inventory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;With no --client, the install registers every client it finds. Pass --client when you want one of them. Then restart the editor, not just the MCP server. No graph rebuild for 0.15.&lt;/p&gt;

&lt;p&gt;If you'd rather watch than read, here is a tour of a fresh project and a longer walkthrough of orientation, review, and a first implementation step:&lt;/p&gt;


&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/4209184f1bb84c259990cdc43f81df5c" width="100%" height="400"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;




&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/7b7a5dca86164d818e5517ed6e0114a5" width="100%" height="400"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;Code and docs are at &lt;a href="//www.github.com/drobbster/agentscaffold"&gt;github.com/drobbster/agentscaffold&lt;/a&gt;. If I'm aiming at the wrong problem, I'd rather hear that than guess.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>devtools</category>
      <category>productivity</category>
    </item>
    <item>
      <title>AgentScaffold 0.10.5: One MCP Server To Rule Them All (Or Just Your Workspace)</title>
      <dc:creator>Dave</dc:creator>
      <pubDate>Thu, 13 Aug 2026 17:36:54 +0000</pubDate>
      <link>https://dev.to/dr_data/agentscaffold-0105-one-mcp-server-to-rule-them-all-or-just-your-workspace-2pge</link>
      <guid>https://dev.to/dr_data/agentscaffold-0105-one-mcp-server-to-rule-them-all-or-just-your-workspace-2pge</guid>
      <description>&lt;p&gt;Before 0.10, AgentScaffold treated every project as its own MCP universe. A monorepo with five services meant five server entries, five processes, five graph handles, and five copies of the generated guidance — and it put the agent in the position of choosing which server to ask. That is not a decision an agent should be making. Plan numbers and file paths are not unique across projects; answering from the wrong one looks exactly like answering from the right one.&lt;/p&gt;

&lt;p&gt;0.10 collapses that topology into a single project-aware server. You register the roots you care about, install one MCP entry, and each call resolves its own project from the path being worked on. Alongside that, generated guidance and mutable graph state stop being copied into every project root, and the diagnostics that tell you whether the migration actually worked ship in the same release rather than the next one.&lt;/p&gt;

&lt;p&gt;Concretely:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--upgrade&lt;/span&gt; &lt;span class="s2"&gt;"agentscaffold[all]"&lt;/span&gt;
scaffold project register ~/work/api
scaffold project register ~/work/web
scaffold mcp &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--migrate&lt;/span&gt;
scaffold doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  One server that resolves the project for you
&lt;/h3&gt;

&lt;p&gt;A single MCP server now serves the whole workspace. Register each root with &lt;code&gt;scaffold project register&lt;/code&gt;; install the client entry once with &lt;code&gt;scaffold mcp install&lt;/code&gt;. The call carries a working path, the server resolves which registered project owns it, and governance and graph reads scope to that project by default. Widen explicitly with &lt;code&gt;--project&lt;/code&gt; or &lt;code&gt;--all-projects&lt;/code&gt; when the task is genuinely cross-cutting.&lt;/p&gt;

&lt;p&gt;A few design choices that are easy to miss and expensive to get wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Registering a root and installing the server are separate commands.&lt;/strong&gt; Widening what a server is allowed to read should never be a side effect of onboarding a project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When a call cannot be attributed to a project, the server refuses rather than guessing.&lt;/strong&gt; A wrong project's answer is worse than no answer, because nothing about it looks wrong — your plan 12 and my plan 12 are both plausible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--migrate&lt;/code&gt; collapses legacy per-project entries&lt;/strong&gt; in the shared client config and leaves unrelated servers alone. Per-repo &lt;code&gt;.cursor/mcp.json&lt;/code&gt; files are not touched, because those are often committed; delete any carrying an &lt;code&gt;agentscaffold&lt;/code&gt; entry — &lt;code&gt;scaffold doctor&lt;/code&gt; lists them for you — then restart the client. Do that on 0.10.2 or newer: before that, &lt;code&gt;scaffold agents generate-all&lt;/code&gt; would write the file straight back, so the last step of this upgrade quietly undid the first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you are upgrading from 0.9.x across several repos, the path is: register each repo, run &lt;code&gt;scaffold mcp install --migrate&lt;/code&gt;, clean up leftover per-repo entries, restart the client, and re-index. Findings, backlog items, and sessions survive the schema rebuild.&lt;/p&gt;

&lt;h3&gt;
  
  
  Graph state moves out of the source tree
&lt;/h3&gt;

&lt;p&gt;For registered workspaces, the graph now resolves under your platform state directory, keyed by workspace id, instead of accumulating as &lt;code&gt;.scaffold/graph.duckdb&lt;/code&gt; inside every checkout. An unregistered lone repo keeps the historical in-tree location; nothing forces a layout change on you.&lt;/p&gt;

&lt;p&gt;Upgrading never relocates an existing database. An in-tree graph always wins over an empty state directory, because flipping a default is not a migration — silently re-resolving would index from scratch and orphan the populated database. Move it deliberately with &lt;code&gt;scaffold workspace migrate-state --apply&lt;/code&gt;, which copies, verifies by hash, and only then removes. Dry run is the default. Quit the MCP client first; the command refuses to start while another process holds the database.&lt;/p&gt;

&lt;h3&gt;
  
  
  Diagnostics that ship with the change they diagnose
&lt;/h3&gt;

&lt;p&gt;The registration change and the state migration are the kind of work that fails quietly if you ship them without a way to ask whether they worked. &lt;code&gt;scaffold doctor&lt;/code&gt; lands in the same release for that reason.&lt;/p&gt;

&lt;p&gt;It only reads. It never repairs, creates, or migrates, so it is safe to run against a setup you already believe is broken. It exits zero whatever it finds, which makes it safe in a shell profile or a git hook; &lt;code&gt;--strict&lt;/code&gt; is the gate to put in CI. &lt;code&gt;--tools&lt;/code&gt; calls every MCP tool once and reports how each behaved, answering a different question from the configuration checks: not whether the wiring looks right, but whether the tools respond. Write tools are skipped unless you pass &lt;code&gt;--include-writes&lt;/code&gt;, which runs them against a disposable scratch project so your real graph is never touched. A graph held by another process reports as &lt;code&gt;busy&lt;/code&gt; rather than as a failure — an index running in the next terminal is routine, and a diagnostic that treats that as a defect stops being trusted.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;scaffold gc&lt;/code&gt; reclaims state left behind by workspaces that no longer exist. Dry run by default; &lt;code&gt;--apply&lt;/code&gt; is the deliberate act.&lt;/p&gt;

&lt;h3&gt;
  
  
  What else landed
&lt;/h3&gt;

&lt;p&gt;A few changes that would otherwise get buried under the headline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Relative Python imports now produce &lt;code&gt;IMPORTS&lt;/code&gt; edges.&lt;/strong&gt; Impact analysis walks those edges to answer what else a change affects; missing ones make the blast radius look smaller than it is. The graph schema version moves from 9 to 10 so existing graphs heal through the normal preserving rebuild on the next index rather than staying quietly incomplete.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finding extraction anchors &lt;code&gt;[CATEGORY]&lt;/code&gt; tokens to the start of a line&lt;/strong&gt;, where a real finding marker sits. Ordinary prose that happened to mention one no longer manufactures garbled rows. &lt;code&gt;scaffold graph prune --malformed-findings&lt;/code&gt; clears rows already written, from both the graph and the artifact re-indexing restores from.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;scaffold_validate&lt;/code&gt; with &lt;code&gt;check="layers"&lt;/code&gt; is implemented.&lt;/strong&gt; It enforces the layering rule your &lt;code&gt;AGENTS.md&lt;/code&gt; states — a component consumes the layer below it and does not bypass intermediate ones — and returns &lt;code&gt;not_evaluable&lt;/code&gt; when the graph does not contain enough to answer, rather than reporting a clean bill of health on the strength of having looked at nothing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;All 31 MCP tools are specified in the interface contract&lt;/strong&gt;, including the begin/complete lifecycle pair and the five write tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The point releases through 0.10.5 hardened the upgrade path and the write tools.&lt;/strong&gt; The &lt;code&gt;generate-all&lt;/code&gt; collision above, graph locks stranded by processes that died holding them, and resolve tools that reported a miss as a success. The CHANGELOG has the specifics; none of it changes the shape of anything described here.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The first &lt;code&gt;scaffold index&lt;/code&gt; after upgrading rebuilds rather than incrementally updating. Governance data is exported before the rebuild and re-imported after; if the export fails, the rebuild aborts and the existing graph is left intact.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="s2"&gt;"agentscaffold[all]”
cd my-project
scaffold init
scaffold index —embeddings
scaffold mcp install
scaffold doctor
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multi-repo upgrade notes are in the docs. If your preferred workflow is "figure it out as we go," the gates will feel like friction — which is the point, not a bug I haven't gotten around to fixing.&lt;/p&gt;

&lt;p&gt;To learn more about Agentscaffold check out this article: &lt;a href="https://dev.to/dr_data/agentscaffold-memory-peer-review-and-continuous-improvement-for-ai-coding-agents-43fb"&gt;https://dev.to/dr_data/agentscaffold-memory-peer-review-and-continuous-improvement-for-ai-coding-agents-43fb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repo, with full docs, is at github.com/drobbster/agentscaffold. If you've got design suggestions, start a conversation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>productivity</category>
      <category>devex</category>
    </item>
    <item>
      <title>AgentScaffold: Memory, Peer Review, and Continuous Improvement for AI Coding Agents</title>
      <dc:creator>Dave</dc:creator>
      <pubDate>Thu, 23 Jul 2026 05:38:36 +0000</pubDate>
      <link>https://dev.to/dr_data/agentscaffold-memory-peer-review-and-continuous-improvement-for-ai-coding-agents-43fb</link>
      <guid>https://dev.to/dr_data/agentscaffold-memory-peer-review-and-continuous-improvement-for-ai-coding-agents-43fb</guid>
      <description>&lt;p&gt;An AI coding agent will never tell you it's guessing. It doesn't hedge before a wrong answer, doesn't slow down when it's about to break something three modules away, doesn't leave a nervous comment admitting it isn't sure about this part. Right or catastrophically wrong, it hands you the same clean, confident, well-commented code at the same steady cadence — because in a language model, confidence tracks how plausible the next token looks, not whether the design actually holds up. There's no tell. That single property — fluent output with nothing calibrated underneath it — is what makes a capable agent genuinely dangerous on a real codebase, and it's the problem I built AgentScaffold to manage.&lt;/p&gt;

&lt;p&gt;Three structural gaps make that dangerous in practice. First, an agent has no durable memory across the boundaries that matter: a new session, a compacted context window, a teammate's agent picking up the same repo tomorrow. Inside a single conversation it holds context fine; cross one of those seams and it starts over, cheerfully re-deriving everything it worked out yesterday. Second, left to its own devices it approaches each plan a little differently, with none of the consistent rigor a seasoned engineer brings — not out of laziness, but because nothing in the loop requires it. Third, it doesn't learn: catch a mistake on plan 12 and the same class of mistake turns up, refreshed and just as confident, on plan 40. Nothing carries the lesson forward.&lt;/p&gt;

&lt;p&gt;My career spans thirteen years as an industrial engineer at Boeing and the last eight-plus years as a data scientist in capacity engineering at Salesforce and Dropbox. A mindset that I learned as an industrial engineer that has persisted across the arc of my career is a systems-level mindset — the habit of spotting poorly designed processes and the toll they take on a system's time and resources, how the absence of standards lets variation creep in, and how, without a governance framework, mistakes accumulate both visibly and invisibly until they erode the outcome the original design was meant to deliver. Building software with an AI agent is just another process, and today's agentic tools run it without standards or a governance framework — failing in all three of those ways at once. AgentScaffold is a governance framework built to solve for them: memory so the agent stops losing state, peer review so mistakes are caught before they ship, and a continuous improvement loop so the standards tighten over time instead of slipping.&lt;/p&gt;

&lt;p&gt;Concretely, it's a Python package (&lt;code&gt;pip install agentscaffold&lt;/code&gt;). It runs as an MCP server, so it works with Cursor, Claude Code, Windsurf, or anything else that speaks the protocol, and it ships a CLI for the parts that should be deterministic and boring.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 1: Memory — a knowledge graph, not a scrollback buffer
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;scaffold index&lt;/code&gt; parses your repository into a DuckDB + DuckPGQ property graph. Tree-sitter handles eight languages — Python, TypeScript, JavaScript, Go, Rust, Java, C, and C++ — pulling out functions, classes, methods, and interfaces along with the IMPORTS and CALLS edges between them. It's a real graph, not a glorified tag file: on the order of twenty node types and forty edge types, because it doesn't stop at code.&lt;/p&gt;

&lt;p&gt;What makes it more than a fancy ctags is that the same index ingests your governance artifacts — plans, interface contracts, ADRs, spikes, studies, review findings, backlog items — and wires them to the code they describe. A review finding isn't a sentence buried in a chat log nobody will scroll back to; it's a node attached to the exact file and function it concerns. Ask "where did we leave off, and what's blocked?" and the agent pulls recent plans, open findings, and next steps in a single MCP call — instead of reading three dozen files to reconstruct the state it had yesterday and then lost.&lt;/p&gt;

&lt;p&gt;A few graph engineering details:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Incremental indexing is honest about cost. Every file carries a SHA-256 content hash, and a (mtime, size) prefilter skips unchanged files without bothering to re-hash them. Edge re-resolution is scoped to the files that changed plus their direct importers — not a full-repo rebuild every time you hit save.&lt;/li&gt;
&lt;li&gt;Search degrades gracefully. Hybrid search fuses structural matches with semantic ones (all-MiniLM-L6-v2, 384-dim, merged by reciprocal rank fusion). Skip the embeddings extra and it falls back to keyword search — and says so, rather than quietly handing you worse results and letting you assume they're good.&lt;/li&gt;
&lt;li&gt;It refuses to confuse "unknown" with "no." Call and import edges exist only for the parsed languages, so Markdown, YAML, and shell are structurally invisible. When an impact query comes back empty, the tools label it unconfirmed, not unused, and hand you a grep fallback. Zero callers means "I didn't find any," not "there are none." A product that exists because agents are overconfident does not get to be overconfident about what's safe to delete.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Module structure comes from the Leiden algorithm (via graspologic), which clusters tightly-coupled files so you can see where your real boundaries are instead of guessing at them from the directory tree.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 2: Peer review — your digital sprint team ready to call BS, before the code exists
&lt;/h3&gt;

&lt;p&gt;Here's the part people skip when they run agents without any governance around them. An agent reviewing its own implementation plan isn't a review — it's the same model grading its own homework, with the exact blind spots that wrote the homework, and it awards itself full marks every time. What a plan needs before implementation is what any decent design review needs: someone else in the room poking at the assumptions, the edge cases, the error paths, and the integration points — not to win an argument, but to catch the thing you can't see precisely because you're the one who wrote it.&lt;/p&gt;

&lt;p&gt;AgentScaffold runs two such reviews before a line of code exists. A devil's-advocate review goes after the riskiest assumptions and the ways the plan could fail quietly. An expansion review hunts the missing edge cases, the undocumented error paths, and the consumers the file-impact map conveniently forgot. Install a domain pack — there are ten: trading, mlops, data-engineering, infrastructure, api-services, webapp, mobile, embedded, game-dev, research — and a specialist reviewer shows up with standards and prompts tuned to the field. The trading pack's quant architect review catches the look-ahead bias in a backtest that trains on data the strategy wouldn't have had at trade time; the webapp reviewer flags the accessibility and performance problems everyone plans to fix later. And because the reviews are grounded in the graph, a challenge reads "src/data/router.py has 5 importers not in your impact map," not "consider possible downstream effects."&lt;/p&gt;

&lt;p&gt;Then the findings stick around. Record one and it becomes a ReviewFinding node linked to the plan and the file, ranked by severity, resurfacing in every future review of that plan until someone actually resolves it. The next session — different agent, fresh window, no memory of this morning — starts from "this risk is known and open" instead of rediscovering it the hard way. A caught risk should only cost you once.&lt;/p&gt;

&lt;h3&gt;
  
  
  Layer 3: Continuous improvement — the loop that sharpens the reviewer
&lt;/h3&gt;

&lt;p&gt;This is the layer I'd keep if I had to throw out the other two, and it comes straight out of the industrial-engineering playbook: you don't just fix the defect, you fix the process that let the defect through, so the same class of mistake can't walk in the same way twice.&lt;/p&gt;

&lt;p&gt;After implementation, a post-implementation review compares what got built against what was planned — an actual diff, not a satisfied nod. A retrospective records what worked, what took longer than the plan assumed, and what nobody saw coming, into a learnings_tracker. Then the part that actually matters: those learnings get folded back into the artifacts the next plan's review runs against. A recurring process mistake becomes a line in AGENTS.md. A structural gap becomes a change to the plan template. A risk pattern that keeps reappearing becomes a new question in the devil's-advocate prompt itself. A coding mistake becomes a line in an implementation standard.&lt;/p&gt;

&lt;p&gt;In full transparency, the loop is process-driven, not a magic self-rewriter. The lifecycle tools own the graph state — they write the findings, stamp the plan as reviewed, hand back a structured retro — and the agent, with you in the loop, updates the files. The framework supplies the ratchet and the checklist; it does not quietly rewrite your rulebook behind your back. Plan, do, check, act — where "act" lands as a concrete diff against the agent's own operating rules instead of a good intention nobody revisits. You do have to build the habit: read the learnings tracker every week and actually integrate what's in it. It's a process, but it works.&lt;/p&gt;

&lt;h3&gt;
  
  
  What actually lands in your repo
&lt;/h3&gt;

&lt;p&gt;"Governance framework" sounds like a binder nobody opens. In practice it's a set of templates, standards, and the rules that tell an agent how to use them. A template does for knowledge work exactly what a standard does on a production line: it removes variation. When every plan, decision, and experiment is captured the same way, the agent can't quietly skip the step it finds inconvenient, and the next person — or the next session — always knows where to look and what "done" means. &lt;code&gt;scaffold init&lt;/code&gt; writes into your project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Plan templates&lt;/strong&gt; (feature, bugfix, refactor) — a plan can't leave draft without a file-impact map, a test plan, execution steps, and a rollback plan. This is the standard that quietly ends "I'll figure out testing later."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A spike template&lt;/strong&gt; — for high-uncertainty work: a time-boxed investigation that pressure-tests the risky assumption before you commit to a full plan, and forces an explicit proceed / pivot / defer call instead of a hopeful "seems fine."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A study template&lt;/strong&gt; — for experiments, A/B tests, and ablations: hypothesis, variants, metrics, conclusion. The result becomes a durable Study in the graph instead of a number that scrolls out of a notebook and is never seen again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An ADR template&lt;/strong&gt; — architecture decision records that capture the decision, the alternatives you weighed, and why. Six months later, when someone asks "why on earth did we build it this way," there's an answer — and the graph can trace which ADR governs which plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review prompts&lt;/strong&gt; — the devil's-advocate, expansion, and retrospective scripts the reviewers work from, and the same files the improvement loop sharpens over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Implementation standards&lt;/strong&gt; for errors, logging, config, and testing, so the agent five sessions from now isn't reinventing your logging convention from scratch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent rules and state&lt;/strong&gt; — AGENTS.md plus platform-specific .cursor/rules, CLAUDE.md, and .windsurfrules, so Cursor, Claude Code, and Windsurf all read one operating manual; plus workflow_state.md, backlog.md, and learnings_tracker.md, so context survives a session boundary the same way the code graph does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this clobbers what you've already written: generated content lives in managed blocks, existing files get appended to, and the graph's runtime artifacts are added to .gitignore for you.&lt;/p&gt;

&lt;p&gt;If you'd rather see it than read a file tree, here's a short tour of a freshly initialized project — the folders and files &lt;code&gt;scaffold init&lt;/code&gt; creates, and how the governance layer and the graph backend actually fit together:&lt;/p&gt;


&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/4209184f1bb84c259990cdc43f81df5c"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  The honest numbers, and when this package isn’t for you
&lt;/h3&gt;

&lt;p&gt;The efficiency case is real, with caveats. In the eval harness, when the agent routes through the tools the way it's supposed to, the raw reduction is about 46% fewer tokens and 84% fewer tool calls on tasks like orientation, impact analysis, and full plan review. Adjust for the fact that agents don't always take the paved road — sometimes they grep around a tool that would've answered in one call — and the replay-behavioral view is closer to 37% / 68%. Quality-adjusted, it lands around 33% / 61%. Those lower numbers are the honest ones, and they're the first thing I'd check if someone else were selling me this.&lt;/p&gt;

&lt;p&gt;And it isn't magic. The savings come from the agent reading one structured answer instead of re-grepping and re-reading files to rebuild state it already had — which also means less context burned, and less of the window pressure that triggers the compaction-and-amnesia cycle this whole thing exists to prevent.&lt;/p&gt;

&lt;p&gt;You also might not need it. Solo, on a small, short-lived project, a well-written rules file gets you most of the way there, and the indexing and lifecycle overhead won't pay for itself. The value compounds with scale (impact analysis past the point where grep stops being trustworthy), with time (memory that accumulates instead of resetting), and with teams (shared contracts and findings that per-developer rules can't give you). It's alpha, and it's opinionated about process. If your preferred workflow is "figure it out as we go," the gates will feel like friction — which is the point, not a bug I haven't gotten around to fixing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Try it
&lt;/h3&gt;



&lt;p&gt;&lt;code&gt;bash pip install "agentscaffold[all]" cd my-project scaffold init # templates, standards, agent rules, MCP wiring scaffold index --embeddings # build the knowledge graph (with semantic search) scaffold mcp # start the MCP server (or use the generated mcp.json)&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Commands only tell you so much. Here's a hands-on tour on a fictional app called Appalicious — orientation, impact analysis, a pre-implementation review that records a finding, decision history, and the first implementation step. A quick walkthrough of the core tools and the collaboration protocol that governs the development workflow:&lt;/p&gt;


&lt;div&gt;
  &lt;iframe src="https://loom.com/embed/7b7a5dca86164d818e5517ed6e0114a5"&gt;
  &lt;/iframe&gt;
&lt;/div&gt;


&lt;p&gt;One parting thought: AgentScaffold is designed to be a governance framework that grows with you. If you leverage it correctly, your dev patterns can be learned and the standards and rules can be adapted to your preferences as you use it.&lt;/p&gt;

&lt;p&gt;The repo, with full docs, is at &lt;a href="https://github.com/drobbster/agentscaffold" rel="noopener noreferrer"&gt;https://github.com/drobbster/agentscaffold&lt;/a&gt;. If you have any design suggestions reach out, start a conversation.&lt;/p&gt;

</description>
      <category>python</category>
      <category>devtools</category>
      <category>ai</category>
      <category>agentskills</category>
    </item>
  </channel>
</rss>
