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

Cursor bc-c8617b04 · 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. How do you recommend we go about doing this?

Then: “Ok, do whatever you can autonomously and when I wake up I'll look at your progress and follow the manual steps you need me to do to finish the work.”

Same Discord ask

That prompt can go two ways

No primitives · invents

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

Has primitives · composes

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

Same one-sentence job. The playground decides the outcome. bc-c8617b04 · kody#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 massive spec.

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
UI / components Button, TextField, spacing scale Improvised styling — the UI looks bad
Data / models User, Order, OrderLineItem Ad-hoc shapes — agents guess the schema
API / backend POST /orders, cancelSubscription(id) Logic in the prompt — drifts from the system
Infra / platform deploy(service), rotateSecret(name) Raw shell instead of deploy + rollback
Agent / tools search, execute, /ship-pr One-off bash and browser glue
Events / workflows email.received, listing.published Polling and tight coupling
Auth / trust OAuth, RBAC, guild role Shared secrets, no audit trail

How do you design them?

One design test

Can a “junior” agent take a one-sentence job and compose primitives to produce a good outcome?

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 · bc-3547232c · kody-video#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 · bc-0651995b

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 or use. Design the playground. Don't let the agent invent a second event system.

Delete · bc-a18e1a6d · 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 · bc-e06ee6bf

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.

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.

Can't tell · kody#1595

Review the system, not the diff

sequenceDiagram
	actor Visitor
	participant UI as app-ui
	participant Auth as app-sessions
	participant DB as d1-app-db
	Visitor->>UI: GET /discord
	UI->>Auth: session?
	Auth->>DB: Discord linked?
	Visitor->>Auth: POST /auth/discord
	Auth->>DB: link provider
	Auth->>Auth: guild role write
							
Stop Reviewing Diffs. Start Reviewing Systems. Better with Kent · Stop Reviewing Diffs

From the Discord PR. Classify compose / extend / add before you open the diff.

Find · bc-8da0b8c3 · kody#1605

ADRs: A veto list, not a museum

Architectural Decision Records

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

Loose jobs that already compose

Inbox
Webinar with Joe Eames — look it up, make slides. bc-58dced08
Discord
“Look this up with Kody (official discord) and make a recommendation.” bc-2632f226
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 system is designed — and that agents can find the primitives they need in it.

mega.dev · @kentcdodds