From Repetition to Reuse: Refinement, Skills, and Bounded Autonomy

Prime Agent's durable sessions can preserve what happened, but a recurring repository task raises a different question: what should be carried forward as a useful way of working? This chapter focuses on that transition. It explains how a repeated failure or procedure can become scoped harness state, a callable skill, or a host-level extension, and how goals and autonomous gates continue work without pretending to verify more than they actually check. The practical outcome is a way to choose the smallest reusable layer and keep its permissions and limits visible.

A lesson needs a home

Suppose the repository review has now exposed the same operational lesson twice. After a certain kind of change, the project needs a particular check. The first time, the model discovers the requirement through trial and error. The session transcript preserves the discovery, and a project artifact may record the command. But if the lesson remains only in that history, a later task still has to find and interpret it again. If it is promoted too broadly, a temporary observation can become an instruction that affects unrelated work.

Prime Agent's continual harness is designed for this middle layer between conversation and source code. The rlm.harness state ledger can hold supplemental prompt notes, memories, Python-backed skill descriptions, and reusable subagent specifications, as well as records of refinement events. It is not another agent loop. It is a place to store a selected lesson or operating pattern so the RLM runtime can use it in later work.

The selection should begin with evidence. A single surprising command result may be a one-time fact, not a reusable rule. A failure that recurs under the same condition is stronger evidence for a focused memory or prompt note. A procedure that has a stable input and output may justify a Python-backed skill. A recurring division of labor—such as asking one child to inspect API effects and another to inspect regression behavior—may be better represented as a subagent specification. The distinction is not about which label sounds most sophisticated; it is about the smallest state type that matches what has actually been observed.

Scope is part of correctness. Prime Agent keeps session-local harness state separate from explicitly global state. A local entry can preserve a fact about the current task, active blockers, or a project situation that should not influence every future session. A global refinement is an explicit decision to preserve a cross-session lesson, reusable skill, delegation role, or durable preference. The wider scope increases the value if the lesson is sound, but it also increases the blast radius if the lesson is wrong or too narrow.

The /refine workflow is built around that caution. It reviews the current trajectory and applies small create, update, or delete edits to supplemental state. It does not rewrite the immutable base system prompt. Refinement runs when the current turn ends rather than in the middle of a Python cell, and recorded snapshots support rollback. The host-side planner asks for a rationale and expected outcome, while the harness state records evidence and the changes made. This makes a refinement inspectable as a change to a working environment rather than as an invisible adjustment to the model's identity.