MEGA It's Time · The Work Changed

MEGA · It's Time

Thinking in Primitives

How to make your agents produce better results with looser specs

Kent C. Dodds Aug 25, 2026

This morning · Cursor · kody#1595

A spec you can say in one breath

I want people to be able to connect their Kody account to Discord so we can give them a special role in the Kody discord and they can use discord to login.

Then: “Ok, do whatever you can autonomously.”

Same job · two playgrounds

The spec did not change

Invent

  • Bot token in a random worker
  • One-off webhook script
  • God-mode invite links
  • No audit trail

Compose

  • OAuth login primitive
  • Official guild member role
  • Existing auth + grants
  • PR you can actually review

github.com/kentcdodds/kody/pull/1595

Thesis

The tighter you have to specify, the worse or less findable your primitives are.

A good playground lets you give a job, not a recipe.

What is a primitive?

Smallest unit of meaning

A named capability the system exposes — composable without reimplementing how it works.

Not every function. Not a 400-line AGENTS.md. If the agent has to reinvent it, it was not a primitive they could use.

Without it, they invent

System Looks like Without it
Auth / trust OAuth, RBAC, guild role Shared secrets, no audit trail
Agent capability search, execute, /ship-pr One-off bash and browser glue
Events / workflows email.received, listing.published Polling and tight coupling

How do you design them?

One design test

Can a junior agent take a one-sentence job and produce a compose?

If it invents, the primitive is missing, hidden, or worse than a one-off.

Moves · not a process

Create · combine · delete · expand

Create Combine Delete Expand

Apply them when a loose spec fails. Do not collect primitives.

Create · kody#184

Redeem on another device

There's an email from John about redeeming an existing purchase on another device. Fix it for John immediately and draft a reply as if you are me.

Inbox + writing skill + a new restore-code primitive. The next “John lost his laptop” can stay this loose.

Don't create · this morning

Talk before you grow the surface

I want one-off blocks of code that subscribe to events and aren't part of packages… I think… Don't do it. Let's talk about it first.

A new primitive is a thing every future agent might call. Design the playground. Don't let the agent invent a second event system.

Delete · kody#1532

We love to get rid of primitives

I kinda want to get rid of the values primitive in exchange for package storage and memory and repos. Look at production data. We love to get rid of primitives that are unnecessary.

Then: use Kody MCP to see if anyone but me still has values.

Delete or constrain · services

A primitive that can bankrupt you

$4 per user per month… They could denial of wallet me by just using their full entitlement of persisted services. Why shouldn't I just kill this primitive?

Always-on Cloudflare services overlapped apps, jobs, and webhooks. Overlap is a combine or a delete.

Combine · Devin fleet

One upgrade, five repos

Cursor

One agent, one repo, one PR.

Devin · same week

  • kody
  • kody-video
  • kody-home-connector
  • mediarss · kids-ledger

Remix v3 beta.10 — one primitive, many compositions.

How agents actually use them

Three failure modes

  1. Can't find it Routing, not more always-on rules. Root file is a map. Leaves load on demand.
  2. Inventing is easier Hidden, rigid, or worse than a one-off. Fix the primitive. Don't write a tighter spec.
  3. You can't tell Review as compose / extend / add. Most good PRs should be composes.

Find · kody#1605

A veto list, not a museum

Clean up Kody ADRs so they steer agents as a short veto list — not a museum, UI diary, or ADR-per-PR habit.

Linked from AGENTS.md: check before proposing something already decided against. Agents skip indexes. Give them a leaf they can use.

Use · last 48 hours

Loose jobs that already compose

Inbox
Webinar with Joe Eames — look it up, make slides.
Discord
“Look this up with Kody (official discord) and make a recommendation.”
Ship
/ship-pr deploy on status-page and visual-recap PRs.
Triage
Sentry issue → kody#1602. The automation is the primitive.

Homework

One sentence. Tonight.

Give your agent a one-sentence job in your real repo.

It composes → playground is working. It invents → you found the next create, combine, delete, or expand.

MEGA

Looser specs are the scoreboard

Not laziness. Proof the playground is designed — and that agents can find it.

mega.dev · @kentcdodds