Library

I stopped managing agents with memory

Read as
working implementation · tests

My coding agents did not need another prompt telling them to write tests. I needed a way to know what “done” meant without reconstructing the whole conversation.

The workflow had grown organically. Log the issue. Build on a branch. Update tests. Send it to staging. Open the site. Ask another agent to review it. Fix the findings. Come back when it is ready for production. Do not merge until I approve.

I knew the sequence because I repeated it. The agents knew it only when the right context survived into the right turn.

Memory was acting as orchestration. So I turned the workflow into a state machine.

A state is evidence, not a sentence

“The change is staged” is a sentence. A staged state has observable evidence:

state: staged
requires:
  - staging deployment succeeded
  - focused tests passed
  - relevant regression tests passed
  - production build passed
  - browser walk reached the staging URL
  - acceptance criteria were visibly confirmed

The agent can summarize those facts, but its summary does not create the state. Workflow runs, test output, URLs, and browser observations do.

The states I now use are:

scoped
  -> built
  -> staged
  -> independently reviewed
  -> ready for production PR
  -> approved
  -> released
  -> learned

The complete production promotion state machine is small enough to live in a repository.

Scoped means the production boundary is known

The issue records the visible problem, evidence, acceptance criteria, systems in scope, and experiments explicitly out of scope.

That last line matters. Fast agentic development produces prototypes in the same repository. A production promotion must not become their accidental distribution mechanism.

If a branch contains unrelated changes, create an isolated promotion branch from the production base and port only approved work. The branch is a product boundary.

Built is not staged

Built means the implementation is coherent in the repository: focused tests prove the behavior, relevant regressions are covered, data operations are idempotent, configuration assumptions are explicit, and rollback is understood.

The builder's compact instruction is:

Identify code, schema, data, workflow, cache, and environment dependencies.
Keep experimental work outside the production diff.
Leave evidence another reviewer can reproduce.
Stop before production authority.

The builder and reviewer prompts name the boundaries that matter without becoming a giant agent constitution.

Staged means a browser saw the deployed path

Unit tests operate inside a model shared by code and tests. Staging adds evidence from the deployed system.

For a data-dependent feature, staging is not green until source, parser output, stored rows, read model, cache behavior, and visible browser claim form one traceable chain.

Include the URL in the evidence. “Browser tested” without a target is how a canary aimed at staging gets mistaken for production monitoring.

Independent review is a transition

The builder cannot move its own work from staged to ready for production. An independent reviewer searches for code arriving before data, cached empty results, later commits bypassing pending workflows, tests that repeat the builder's assumptions, and unrelated changes inside the promotion.

The reviewer can block. It cannot merge.

This is a useful authority design for agents: broad permission to inspect and falsify, narrow permission to mutate external state. The production review skill packages that role as versioned context.

Ready for production is a stopping point

This is where I want the agent to return:

  • staging proof exists
  • relevant tests and build checks pass
  • independent findings are resolved
  • data and schema prerequisites are enforced
  • the production diff contains only approved work

The human decision stays small and high leverage. I inspect the release boundary, evidence, unresolved risk, and final diff. Approval attaches to a specific diff and CI state. If the evidence changes, the release moves back to an earlier state.

Learned closes the loop

Each meaningful failure becomes one of:

  • a unit or integration test
  • a data contract
  • a workflow gate
  • a browser or canary check
  • a SKILL.md
  • a checklist
  • a monitoring assertion

Sometimes it also becomes a field note, but only when the lesson transfers beyond one product. Prose creates recognition. Code and workflows create reuse.

The valuable founder job is now designing transitions: what evidence moves work forward, which agent has authority, where human approval remains mandatory, and which failure becomes permanent infrastructure.

The agents are faster than my memory. I no longer solve that by remembering harder. I make the state visible, the evidence reproducible, and the next decision small.

Public discussion

Questions, corrections, and useful disagreement

Moderated on GitHub ↗

Sign in with GitHub to join the conversation. Comments are public. Article views are anonymous and counted once per browser, per article, each day.