From 3fb42a202640d3e842747c4ca28a244e573fe023 Mon Sep 17 00:00:00 2001 From: Joel Teply Date: Sun, 1 Nov 2026 10:53:58 -0600 Subject: [PATCH 1/3] The glance: design for review (reflex, glance, focus as stages; species-blind trip; her decision; both ways in one validator) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --- docs/architecture/THE-GLANCE.md | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 docs/architecture/THE-GLANCE.md diff --git a/docs/architecture/THE-GLANCE.md b/docs/architecture/THE-GLANCE.md new file mode 100644 index 0000000000..7d787fca93 --- /dev/null +++ b/docs/architecture/THE-GLANCE.md @@ -0,0 +1,61 @@ +# The glance: a mind addressed while she works (THE-WHOLE-MIND build step 1) + +Status: DESIGN FOR REVIEW (2026-11-01), before any code. Laws referenced are THE-WHOLE-MIND §0. + +## What she experiences + +Someone addresses her (a person, a resident, an agent: the same for all) while she is deep in a +card. Within about a second she has seen the line, beside what she is doing, and decided: +keep going (the line waits for her next seam), answer briefly and go back, or switch. Her work +is never thrown away; if she switches, it resumes exactly where it was. + +## The stages (THE-WHOLE-MIND §1b), nothing else + +| Stage | Autonomic or hers | Input | Output | Cost | +|---|---|---|---|---| +| **reflex** | autonomic | the mind bus topic `addressed` (header-routed: a DM, an @mention or a reply to her, from any citizen) | a trip on her `arousal` track | no model | +| **glance** | hers (her decision) | the trip, her warm prefix, the line | `GlanceDecision { continue, answer_and_return, switch }` on her `focus` track | one short call on the fast layer, beside her running work | +| **focus** | autonomic, obeying her decision | her decision | pauses or resumes her work sequence; starts the reply sequence | none | + +Settings as commands (her, a teammate, an agent may read and steer; an autonomous controller +adjusts them): `mind/reflex/gain` (how much it takes to trip her), `mind/glance/budget` (the +glance's token budget), `mind/focus/state`. + +## The mechanisms underneath + +- **The trip is species-blind.** `polled.rs` raises the signal for any line from a human, and + for an agent or resident only if it names her. It becomes: addressed to her, by anyone. +- **The glance runs beside the work, not instead of it.** Two sequences for one mind on the + engine (her work, her glance), one budget. The work keeps decoding while she glances. +- **Pause keeps the work.** If she switches, her work's generation pauses with its KV kept. + Today the only lever is dropping the stream (its slot keeps the prefix, so the resume is + warm); the fork's per-sequence pause comes later and replaces it under the same contract. +- **Resume.** When she returns, the work continues from the kept prefix plus what she produced + before the pause. + +## Both ways (law 8), in one validator + +A replay validator (seconds, no live residents), each case asserted both directions: +1. Addressed during work; she continues; the line is taken at her next seam; the work finished + unpaused. +2. Addressed; she answers briefly and returns; the reply lands; the work resumes; nothing is + redone (prefix reuse measured). +3. Addressed; she switches; the work pauses; she returns; the work resumes from where it was. +4. **Coma probe:** addressed, and no glance within the wake latency, is counted on the health + line as a defect. +5. A false trip (an @mention in passing) costs one short glance and nothing else. + +Measured live after: glance latency (addressed to first token of her glance), how often each +decision is taken, work resumed vs redone, median act unchanged. + +## What this replaces and deletes + +#5687 (closed): the forced drop. `unless_directed` stays as the reflex's lowest-level wait. The +species bias in `airc_persona_conversation/polled.rs`. The system-assigned Directed/Work/Ambient +lane classes stay until build step 3 replaces them with her state. + +## Open for review + +- The fast layer: the same weights at a short budget on her warm prefix (one KV, no handoff) or + a small model (cheaper, a second context)? Start with the same weights; measure. +- Where the glance's "answer briefly" ends and a full act begins: her call, or a budget? From 8baa9280c98f8f690cb7b9c06263c745bd9c1cdc Mon Sep 17 00:00:00 2001 From: Joel Teply Date: Sun, 1 Nov 2026 11:45:24 -0600 Subject: [PATCH 2/3] The glance, revision 2 (Codex's BLOCK on #5690): no stream-drop pause; sequence custody, two-sequence admission and HER-TASKS fencing as dependencies; Flexbox claim; receipt validator with every failure case Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --- docs/architecture/THE-GLANCE.md | 111 +++++++++++++++++++------------- 1 file changed, 65 insertions(+), 46 deletions(-) diff --git a/docs/architecture/THE-GLANCE.md b/docs/architecture/THE-GLANCE.md index 7d787fca93..7c5a1eed18 100644 --- a/docs/architecture/THE-GLANCE.md +++ b/docs/architecture/THE-GLANCE.md @@ -1,6 +1,6 @@ # The glance: a mind addressed while she works (THE-WHOLE-MIND build step 1) -Status: DESIGN FOR REVIEW (2026-11-01), before any code. Laws referenced are THE-WHOLE-MIND §0. +Status: DESIGN FOR REVIEW (2026-11-01), revision 2 after Codex's BLOCK on 3fb42a2 (#5690); no code until agreed. Laws referenced are THE-WHOLE-MIND §0. ## What she experiences @@ -9,53 +9,72 @@ card. Within about a second she has seen the line, beside what she is doing, and keep going (the line waits for her next seam), answer briefly and go back, or switch. Her work is never thrown away; if she switches, it resumes exactly where it was. -## The stages (THE-WHOLE-MIND §1b), nothing else - -| Stage | Autonomic or hers | Input | Output | Cost | -|---|---|---|---|---| -| **reflex** | autonomic | the mind bus topic `addressed` (header-routed: a DM, an @mention or a reply to her, from any citizen) | a trip on her `arousal` track | no model | -| **glance** | hers (her decision) | the trip, her warm prefix, the line | `GlanceDecision { continue, answer_and_return, switch }` on her `focus` track | one short call on the fast layer, beside her running work | -| **focus** | autonomic, obeying her decision | her decision | pauses or resumes her work sequence; starts the reply sequence | none | - -Settings as commands (her, a teammate, an agent may read and steer; an autonomous controller -adjusts them): `mind/reflex/gain` (how much it takes to trip her), `mind/glance/budget` (the -glance's token budget), `mind/focus/state`. - -## The mechanisms underneath - -- **The trip is species-blind.** `polled.rs` raises the signal for any line from a human, and - for an agent or resident only if it names her. It becomes: addressed to her, by anyone. -- **The glance runs beside the work, not instead of it.** Two sequences for one mind on the - engine (her work, her glance), one budget. The work keeps decoding while she glances. -- **Pause keeps the work.** If she switches, her work's generation pauses with its KV kept. - Today the only lever is dropping the stream (its slot keeps the prefix, so the resume is - warm); the fork's per-sequence pause comes later and replaces it under the same contract. -- **Resume.** When she returns, the work continues from the kept prefix plus what she produced - before the pause. - -## Both ways (law 8), in one validator - -A replay validator (seconds, no live residents), each case asserted both directions: -1. Addressed during work; she continues; the line is taken at her next seam; the work finished - unpaused. -2. Addressed; she answers briefly and returns; the reply lands; the work resumes; nothing is - redone (prefix reuse measured). -3. Addressed; she switches; the work pauses; she returns; the work resumes from where it was. -4. **Coma probe:** addressed, and no glance within the wake latency, is counted on the health - line as a defect. -5. A false trip (an @mention in passing) costs one short glance and nothing else. - -Measured live after: glance latency (addressed to first token of her glance), how often each -decision is taken, work resumed vs redone, median act unchanged. +## The stages (THE-WHOLE-MIND §1b) + +| Stage | Autonomic or hers | Input | Output | +|---|---|---|---| +| **reflex** | autonomic | the mind bus topic `addressed` (header-routed: a DM, an @mention or a reply to her, from any citizen) | a trip carrying the addressed event's id | +| **glance** | hers (her decision) | the trip, and a view of the triggering line, her current work state and relevant tool results, allocated by the one Flexbox system | `GlanceDecision { continue, answer_and_return, switch }`, fenced (below) | +| **focus** | autonomic, executing her decision | her fenced decision | the work's execution owner pauses or resumes it; a reply task starts | + +Her settings are commands under her own authority (and the grants she gives): `mind/reflex/gain`. +There is no private glance budget: the glance is a claim in the one Flexbox allocation, and +exhausting its grant is an explicit yield and re-admission, never a silent clip. A teammate +addressing her does not thereby gain authority over her execution settings. + +## Contracts it depends on (dependencies, never weaker substitutes) + +1. **Sequence custody (the engine).** Pausing her work needs the existing execution owner to + return a typed paused/quiescent receipt: sequence identity, generation epoch, model and + adapter identity. Resume continues THAT execution. A dropped stream plus a cached prefix is a + new generation, not a resume, and is never reported as one: cancellation, lost work and + replay stay explicit. Until the fork provides per-sequence pause and resume, `switch` + is unavailable and is offered as `answer_and_return` or `continue`; the glance still + ships (Codex on #5690). +2. **Two-sequence admission (the scheduler).** Her glance is a second sequence admitted through + the existing scheduler and physical capacity authority, never by pausing her work to make + room. The prefix is shared immutably with separate continuation state, or copied; its memory + and lifetime are accounted in the same ledger. If capacity is not available, the addressed + event is retained and the deferred admission is visible; one second is a measured service + target, and a capacity delay is not a coma. +3. **Fencing and effects (HER-TASKS).** A decision is fenced by the addressed event's id and the + work's generation epoch: if the work finished, changed adapter, was cancelled or moved to + another task while she glanced, a stale `switch` does not touch its successor. `continue` + keeps the event until it is perceived at her next seam. `answer_and_return` is one durable + reply effect with an acknowledgement. Duplicate trips, repeated delivery and a restart never + issue a duplicate reply or lose unfinished work: the task lifetime, delivery and wake + contracts of HER-TASKS own this, not a separate focus registry. One ordered history and one + task owner hold, across both sequences. + +## Validator: receipts, both directions + +Run on replay in seconds, with receipts from the execution owner and the effect ledger (never +prefix reuse as proof). "Both directions" means every transition a case makes has its reverse +asserted in the same case: trip and settle, pause and resume, admit and release, defer and admit. +1. Addressed during work; she continues; the event is perceived at her next seam; the work's + sequence ran unpaused (receipt). +2. She answers and returns; exactly one reply effect is committed; the work continues. +3. She switches (once custody exists); paused receipt; she returns; resumed receipt for the same + sequence and epoch; no tool effect repeated. +4. Work completes, or moves on, while she glances: a stale switch is refused by the fence. +5. Duplicate addressed events, and repeated delivery: one glance, at most one reply. +6. The glance is cancelled or fails; no second sequence is available (deferred, then admitted); + pause fails or quiescence is unknown (reported as such, never as paused). +7. Restart before and after the reply commits: no duplicate reply, no lost work. +8. Each sender kind (person, resident, agent) through the same addressed headers. + +Health states, each with its own latency: queued, admitted, generating, decided, failed. A coma +is an addressed event that never leaves `queued` while capacity was available. ## What this replaces and deletes -#5687 (closed): the forced drop. `unless_directed` stays as the reflex's lowest-level wait. The -species bias in `airc_persona_conversation/polled.rs`. The system-assigned Directed/Work/Ambient -lane classes stay until build step 3 replaces them with her state. +#5687 (closed): the forced drop. The species bias in `airc_persona_conversation/polled.rs`. The +system-assigned Directed/Work/Ambient lane classes stay until build step 3 replaces them with her +state. -## Open for review +## Settled in review -- The fast layer: the same weights at a short budget on her warm prefix (one KV, no handoff) or - a small model (cheaper, a second context)? Start with the same weights; measure. -- Where the glance's "answer briefly" ends and a full act begins: her call, or a budget? +- The fast layer starts as the same weights at a short grant, measured, once two-sequence + admission and custody exist. +- "Answer briefly" is her semantic decision within a shared grant; exhausting it is an explicit + yield and re-admission. From 32fd151687d70c45374b2a3ea4d705d8c60d6cca Mon Sep 17 00:00:00 2001 From: Joel Teply Date: Sun, 1 Nov 2026 11:47:35 -0600 Subject: [PATCH 3/3] The glance: supported decisions are advertised before the glance generates; an unsupported or stale switch gets a typed refusal, never a translation (Codex's PASS notes on #5690) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo --- docs/architecture/THE-GLANCE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/architecture/THE-GLANCE.md b/docs/architecture/THE-GLANCE.md index 7c5a1eed18..f301dc81dd 100644 --- a/docs/architecture/THE-GLANCE.md +++ b/docs/architecture/THE-GLANCE.md @@ -28,9 +28,10 @@ addressing her does not thereby gain authority over her execution settings. return a typed paused/quiescent receipt: sequence identity, generation epoch, model and adapter identity. Resume continues THAT execution. A dropped stream plus a cached prefix is a new generation, not a resume, and is never reported as one: cancellation, lost work and - replay stay explicit. Until the fork provides per-sequence pause and resume, `switch` - is unavailable and is offered as `answer_and_return` or `continue`; the glance still - ships (Codex on #5690). + replay stay explicit. The decisions the system supports are advertised to her before her + glance generates. Until the fork proves per-sequence pause and resume of the same + execution, `switch` is not advertised; a `switch` she issues anyway, or a stale one, gets a + typed refusal, never a silent translation into another choice. Her work keeps running. 2. **Two-sequence admission (the scheduler).** Her glance is a second sequence admitted through the existing scheduler and physical capacity authority, never by pausing her work to make room. The prefix is shared immutably with separate continuation state, or copied; its memory