← Public packages
@kentcdodds/closing-the-agentic-loop
Closing the Agentic Loop: Kent C. Dodds's talk and workshop deck. Default short talk; ?event=aie-2026 is the AIE hour cut with a Podium QR; ?format=full adds labs.
Files
<section id="primitives" data-title="Primitives: what exists, where it lives">
<style>
@scope {
h2 { margin-bottom: 32px; }
.groups { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 44px; }
.groups .pill { font-size: 46px; }
.cat { display: grid; grid-template-columns: auto 1fr; column-gap: 64px; row-gap: 24px; align-items: baseline; }
.cat .b { font-family: var(--font-display); font-weight: 700; font-size: 60px; color: var(--ink); white-space: nowrap; }
.cat .p { font-family: var(--font-mono); font-size: 50px; color: var(--green); white-space: nowrap; }
.short { margin-top: 44px; font-size: 60px; color: var(--muted); }
.short strong { color: var(--ink); font-family: var(--font-display); }
.src { margin-top: auto; font: 700 44px var(--font-mono); color: var(--muted); }
}
</style>
<h2><a class="quiet" href="https://github.com/kody-hq/kody/blob/main/docs/contributing/architecture/primitives.yaml" target="_blank" rel="noopener">Primitives: what exists, where it lives</a></h2>
<div class="groups"><span class="pill">Entry points</span><span class="pill">Identity + auth</span><span class="pill">Assistant</span><span class="pill">Runtime</span><span class="pill">Storage</span></div>
<div class="cat">
<span class="b">Feature flags</span><span class="p">packages/worker/src/feature-flags/</span>
<span class="b">Scheduled jobs</span><span class="p">packages/worker/src/jobs/</span>
<span class="b">Email</span><span class="p">packages/worker/src/email/</span>
</div>
<p class="short"><strong>Building blocks, not features.</strong> Kept short.</p>
<p class="src"><a class="quiet" href="https://github.com/kody-hq/kody/blob/main/docs/contributing/architecture/primitives.yaml" target="_blank" rel="noopener">kody-hq/kody · primitives.yaml</a></p>
<aside class="notes">
<p>Rung 3 of the autopilot skill (kcd-skills 1.5.0), word for word: "Primitives catalog: building blocks, code roots, and an adrs list per entry (current records that shape it, [] when none), kept short. A PR that adds or reshapes a primitive, or writes or supersedes an ADR, updates the matching adrs lists in the same PR." It sits in P1, Good PRs: the repo tells agents what to build with. The skill's AGENTS.md template links "Architecture and primitives", and its PR template's System recap names the primitive a change touches: composes (uses existing pieces as designed, low risk), extends (changes a piece's behavior or contract, medium), or adds (a new piece, data store, external service, or trust boundary, high).</p>
<p>Why it helps agents: (1) reuse instead of reinventing. An agent that can see "Feature flags" already exists uses it instead of writing a second flag system. (2) Knowing where code lives. Each building block names its code roots, so an agent opens the right directory first instead of grepping the whole repo. (3) Risk in one word. Touching a primitive's code root tells the agent and the reviewer whether the change composes, extends, or adds.</p>
<p>The Kody example: <a href="https://github.com/kody-hq/kody/blob/main/docs/contributing/architecture/primitives.yaml" target="_blank" rel="noopener">docs/contributing/architecture/primitives.yaml</a>, linked from the architecture index. Each entry is an id, a group, a name, a one-line summary, code roots and docs. The slide shows the name and the first code root for four real entries: MCP endpoint (/mcp) → packages/worker/src/mcp/, Feature flags → packages/worker/src/feature-flags/ (plus packages/worker/universal/feature-flags/), Scheduled jobs → packages/worker/src/jobs/, Email → packages/worker/src/email/ (plus the email MCP capabilities).</p>
<p>"Kept short" in the file's own words: "Prefer directories over file lists. Keep the map small." Its header also says it changes only when a primitive is added, removed or reshaped, not for ordinary feature work. Kody has 73 entries in five groups (entry points, identity and auth, assistant primitives, execution runtimes, storage and infrastructure; counted Nov 1); don't claim it's tiny. Every entry now also lists its adrs, the decision records that shape it (Feature flags links the keep-in-house feature flags decision), and primitives:check fails on missing, superseded, or misplaced paths.</p>
<p>Checked in CI: Validate runs npm run primitives:check (the "Primitives" step) on every PR. The visual-recap skill classifies a PR's changed paths against the code roots (longest-prefix match) to fill in the recap.</p>
<p>Any stack: a primitives catalog is a short file of building blocks and where they live, in YAML, Markdown, or a section of the architecture doc. Kody is one example, not a requirement.</p>
<p>The pills are the five groups in the file (entry points, identity and auth, assistant primitives, execution runtimes, storage and infrastructure). In my words at BIOS SPHERE: "These are not features of the code base... the base primitive that the features use." The MCP endpoint entry (packages/worker/src/mcp/) moved to these notes to make room.</p>
<p>How agents find it (checked Nov 4 on kody-hq/kody main): AGENTS.md links the contributing docs map; that page's Architecture section links the primitives map. The PR template's System changes section and the visual-recap skill also point at it, and the system recap grades reuse of existing primitives. In practice my Grok Bot often names the primitives when it starts the cloud agent.</p>
<p>Who wrote it: "I did not craft it. I instructed it to be crafted." It came out of the visual recap and grew from there. Not for onboarding users; it onboards agents (and human contributors' agents).</p>
<p>Use it or drop it: at BIOS SPHERE I walked the live file instead. If the live walk happens, skip this slide.</p>
<p>Timing: about 2 minutes while the audit runs; the mediarss audit scores rung 3 too.</p>
</aside>
</section>