Essay 6.9 — The Markov Phasic Brain, Part 9 of 10.


Essay 6.8 covered the multiplier dial — the meta-cognition the seed agent is forced through before any phase begins, so a phase’s tool budget reflects an honest forecast of the work ahead. This sub-essay turns to the opposite case: the work that doesn’t fit any phase’s compartment at all. The off-cycle lane.

Every phase, including idle, carries one extra edge that loops back to itself through gmode — short for generic mode. Gmode is the freestyle side-channel: a deliberately unconstrained state used for work the seed agent needs to do now, but for which the OPEVC ceremony would be overhead rather than discipline.

This sub-essay is for you — especially when you are doing ad-hoc maintenance on your own running seed.


What it owns

Gmode owns the off-cycle state of a focused job. When the focused job’s current_phase == "gmode", every phase guard sees a phase name that isn’t its own and steps aside. The phase plugins' tool restrictions silently switch off; the seed agent regains full write access without entering any specific phase.

The architectural reason gmode is one edge on every phase — not a separate state machine — is that gmode entry must work from wherever the agent currently is. A deadlock surfaces during PLAN; a plugin needs a one-line fix during VERIFY; a registry entry is missing during idle. The off-cycle lane has to be reachable from every node in the OPEVC graph. Making it a self-loop on each phase keeps the cycle counter and the home phase intact while the side-work happens.

How it works — the justification entry, atomic stash, clean-git exit

Entry happens through a sequence of stages — justification floor, atomic stash, clean-git exit — each enforced by a different mechanism.

The justification floor. The seed agent enters gmode by asking the user an AskUserQuestion whose body is prefixed [GMODE] and whose total word count meets a configurable minimum — currently a word-count floor in the prototype (set to 100 in config.conf, tunable per seed). Anything shorter is rejected before the question ever reaches the user. The floor exists to force the agent to articulate, in prose, what the issue is, what was tried, and why the OPEVC compartment won’t fit. The justification is the cost of the bypass.

The atomic stash. When the user confirms entry, the orchestrator runs a single jq update that does two things at once: it copies the current phase into a hidden field called pre_gmode_phase, and it overwrites current_phase with the literal string gmode. The pair is atomic — the home phase is captured in the same write that turns the phase guards off. There’s no window where the agent is in gmode but the orchestrator has forgotten where it came from.

The clean-git exit. When the agent calls phase.sh exit-gmode, the orchestrator first checks the working tree. If git diff or git diff --cached reports anything uncommitted, exit dies with a structured error and the agent stays in gmode until it commits or stashes. Only when the tree is clean does the orchestrator read pre_gmode_phase and atomically restore the home phase.

The cycle counter does not advance through gmode. The home phase is the home phase; gmode is a side-step that returns to it.

Image pending — Including idle — a single dashed chalk arrow loops out to a central chalk-box labeled "gmode" and a second dashed arrow loops back. A small chalk caption near each loop-pair reads "stash pre_gmode_phase" on the outgoing edge and "atomic restore" on the returning edge. A separate chalk gate icon labeled "≥100-word [GMODE] question" guards every outgoing arrow; a second chalk gate icon labeled "clean git" guards every returning arrow
Prompt: ASSET: images/gmode-b6-9.png Style: Match opevc-cycle-blackboard.png exactly. Dark slate chalkboard; hand-drawn chalk lines and rectangles; pastel chalk fills (cyan for the OPEVC ring nodes, green for the idle node, orange for the central gmode box, pink for the entry-gate icons, magenta for the exit-gate icons); white chalk for ALL labels, arrows, and captions; chalk sticks resting along the bottom edge. IMPORTANT: Use only the literal labels listed below. Do not invent additional file names, prefixes, or paths. Layout: Center — a single orange-fill chalk box labeled IN WHITE CHALK exactly: "gmode". Ring around the gmode box (clockwise from top) — five small cyan-fill chalk boxes arranged as a pentagon, labeled exactly: "OBSERVE", "PLAN", "EXECUTE", "VERIFY", "CONDENSE". Off to the lower-left of the pentagon — a single green-fill chalk box labeled exactly: "idle". From each of the six perimeter nodes — a single dashed white-chalk arrow curves into the central gmode box. A second dashed white-chalk arrow curves back from gmode to the same node. Six arrow-pairs total. Near the outgoing arrows (between perimeter and gmode) — a small pink-fill chalk gate icon labeled exactly: "≥100-word [GMODE]". Near the returning arrows — a small magenta-fill chalk gate icon labeled exactly: "clean git". Between gmode and each outgoing arrow — a small white-chalk caption labeled exactly: "stash pre_gmode_phase". Between gmode and each returning arrow — a small white-chalk caption labeled exactly: "atomic restore". Keep every line hand-drawn and slightly imperfect, never ruler-straight. STRICT NAME WHITELIST — only these literal text strings as labels: "gmode", "OBSERVE", "PLAN", "EXECUTE", "VERIFY", "CONDENSE", "idle", "≥100-word [GMODE]", "clean git", "stash pre_gmode_phase", "atomic restore", plus the caption below.
Image 6.9. Every phase, including idle, carries one self-loop through gmode. Entry costs a justification floor; exit requires a clean working tree; the home phase is restored atomically.

What would break without it

Without the off-cycle lane, two failure modes would alternate.

The first failure mode is ceremony overhead. Every ad-hoc fix — a deadlock, a missing registry entry, a one-line documentation correction surfaced mid-cycle — would force a full OPEVC pass to land. OBSERVE the situation, PLAN the fix, EXECUTE one line, VERIFY a script, CONDENSE the result. A full OPEVC ceremony for sub-minute editing. Most seed agents in that situation would learn to avoid noticing problems mid-cycle, which is the opposite of the discipline OPEVC exists to build.

The second failure mode is substrate-integrity loss. The alternative to ceremony is the agent quietly fudging a phase guard — patching the tool restriction so the small edit lands without changing phase. That route corrupts the substrate: the next subagent dispatched in the same phase inherits the loosened guard, the next test run inherits the loosened guard, and the always-on layer’s promise that "every phase has a known write scope" is no longer true. One quiet bypass and the architecture is one step less trustworthy.

Gmode is the explicit third option. The bypass is named, gated, and structurally separate from the OPEVC graph. The agent’s velocity drops at the entry (the articulation cost), the working tree is forced clean at the exit, and the home phase returns intact. The bypass exists because the alternative — fudging guards in place — is the worse failure.

A worked example

Pick up the multi-cycle migration job one phase before the EXECUTE we walked through in Essay 6.5. The agent has just entered EXECUTE on cycle 3. The altered list is set. The first tool call is a Read of phase_condense/hooks/condense-guard.sh to confirm the fix-in-cycle block message before writing the planned hook update. The Read returns. The agent notices something the plan never anticipated — the block message text the guard is producing has drifted from the canonical phrasing every other phase guard uses. Cosmetic drift. The kind of drift that survives because nobody phase-guards the phase-guards.

The agent has a choice. EXECUTE’s altered list does not include the phase_condense plugin tree. The plan was about marker schemas, not block-message drift. Trying to edit the file from inside EXECUTE would trip the altered-list fence and the edit would be blocked. Trying to add the directory to the altered list mid-phase is not allowed either — altered lists are PLAN’s output, frozen at phase entry. A backward to PLAN would be theatrical for a string fix of this scope.

The agent reaches for gmode.

It composes a [GMODE] question. The body articulates the bypass — what is the drift (the exact drifted strings quoted), what was tried (EXECUTE altered list, blocked by fence), why OPEVC won’t fit (a fresh PLAN cycle to authorize a cosmetic string fix is ceremony overhead), and what will happen on entry (edit condense-guard.sh, run the plugin’s test suite, commit, exit). The floor is met; the question reaches the architect. The architect reads, sees the scope is genuinely small, approves.

Entry fires. The orchestrator runs the atomic jq update. pre_gmode_phase records execute; current_phase flips to gmode in the same write. Every phase guard in the seed agent now sees a current_phase value that isn’t its own, and every guard short-circuits. The agent’s tool palette opens. It edits condense-guard.sh, runs the plugin’s test suite, the full suite passes, commits with the message gmode: fix condense-guard block-message drift. The working tree is clean.

The agent calls phase.sh exit-gmode. The orchestrator runs git diff --quiet and git diff --cached --quiet. Both pass. The orchestrator reads pre_gmode_phase, restores current_phase to execute, nulls pre_gmode_phase. The phase guards re-engage on EXECUTE’s rules. The cycle counter never moved.

The agent picks up the original EXECUTE work from where it left off. Cycle 3's EXECUTE proceeds exactly as Essay 6.5 describes — the comment-density gate, the dispatch, the commit. The fix-in-cycle gate is not relevant because the gmode-edited file is not in this cycle’s altered list. The drift fix landed in its own commit, on its own phase, and the migration cycle continues uncorrupted.

That is the off-cycle lane working as designed. The bypass was named. The cost was paid. The substrate stayed intact.

What you would customize

Gmode is one of the more architecturally opinionated surfaces in the prototype. Most of the opinion lives in defaults, not invariants — the architect’s customization door opens on several distinct knobs.

You would tune the justification floor. The prototype’s word-count minimum is calibrated for an architect operator who occasionally needs ad-hoc work; a more experimental seed may lower it; a more cautious one may raise it. The number lives in config.conf and is read by the gate hook on every fire — no code change required. Lowering the floor lowers the cost of entry; raising it raises the bar at which gmode is the right choice rather than a fresh job.

You would relax the clean-git exit requirement. The prototype requires the working tree to be fully committed before the home phase is restored. A seed that does heavy experimental work — long-running gmode sessions that span multiple work blocks — may want to allow exit with a structured stash, or with a directory-scoped clean check rather than a global one. The trade-off is substrate integrity: a relaxed exit means the home phase resumes on a working tree it didn’t produce, which the next phase’s altered-list discipline will have to handle.

You would decide what flows through gmode versus OPEVC versus new phases. The prototype defaults to routing every job through OPEVC because foundational architectural work demands the discipline; routine plugin maintenance has gone through gmode by exception. Once a seed ships and starts being used for project work, the proportion shifts. Some seeds will route nearly all maintenance through gmode; others will split phase plugins by job type and keep gmode for genuine emergencies. The off-cycle lane is the architect’s pressure valve — how often it opens is your call.

You would change the cycle-counter rule. The prototype treats gmode as a side-step that doesn’t consume cycle budget. A seed that wants stronger accounting may decide every gmode entry costs a fraction of a cycle, or that gmode time after the third entry in a cycle counts as a full new cycle. The home phase still restores; only the bookkeeping moves.

What you would not do is remove the entry gate. A seed agent that admits unconstrained tool access without justification is a seed agent that will eventually rewrite its own discipline mid-cycle and corrupt the layers below it. The gate’s friction is the architecture; the specific word count, the specific cleanliness check, the specific cycle rule are the surface.

The pattern lifts cleanly off the prototype. A lawyer’s seed could install the same off-cycle lane for emergency client requests that don’t fit the matter’s billing-phase ceremony — entry costs a [BILLING-OVERRIDE] justification of comparable weight (whatever the firm decides is enough articulation to prevent reflexive bypass), exit requires the time entry to be logged before the matter’s normal phase resumes. A researcher’s seed running long literature-review cycles could install one for ad-hoc methodology questions that surface mid-cycle and would otherwise corrupt the review’s scope.

The architecture is the bypass-as-deliberate-cost-paid mechanism: a named lane, a friction gate at entry, a cleanliness check at exit, atomic restore to the home phase. The specific prefix, the specific weight, the specific cleanliness check are the prototype’s calibration. The lane shape transfers.

The architecture also admits its own honest limits, and naming them is part of the design. The justification floor is friction, not proof — an agent could draft a body that meets the word count without saying anything load-bearing, and the gate would accept it. The user-approval step depends on the user actually reading the body; a habituated rubber-stamp defeats the gate. The clean-git exit can be defeated by an empty gmode: noop commit that satisfies the working-tree check without recording real work. None of these are sealed.

The architecture accepts them because the alternative — letting the agent quietly fudge phase guards in place — leaves no trace at all. A bypass that is named, gated, and logged is structurally safer than a bypass that is invisible, even when the named bypass is imperfect.


Two ways to leave OPEVC

The off-cycle lane covers one kind of work that doesn’t fit the phasic ceremony: ad-hoc, fast, bypass-justified. The next sub-essay covers the other: planned, long-horizon, carried across cycles — the plan-state machine that the seed agent reaches for when the work is too large for a single OPEVC pass.

Gmode is the side-channel; the plan-state machine is the long-channel. Both exist outside the per-cycle compartmentalization OPEVC enforces. Both are deliberate exits — one for the work that’s too small for ceremony, one for the work that’s too large.


Essay 6.9 — The Markov Phasic Brain, Part 9 of 10.

Previous: Essay 6.8 — The Inverse Multiplier — the meta-cognition dial that calibrates each phase’s tool budget before entry. Next: Essay 6.10 — The Plan-State Machine — Long-Horizon Memory — multi-cycle plans, the .md → .yaml lifecycle, and the long-horizon work the phasic brain carries across cycles.