Projector (C3a): Select stage, Projector narration, persona-tuning.toml, mind-persona project #76

Merged
eureka merged 23 commits from hands/persona-projector into main 2026-11-20 00:04:06 +00:00
Owner

C3a of the Persona-only heartbeat map (docs/persona-only-heartbeat-map.md at d861574, sections 2, 3 and 9). Session eureka-self-persona-only-2026-11-19.

Stacked on #75 (C2). Until #75 merges, this diff also shows C2's three commits. Mine are the four on top of 7b9fa7d.

What lands:

  • mind_body::projection, a new module. The Select stage (select.rs) is code and deterministic for a seed. It fills the fixed slots (identity, the hour, the stimulus by turn kind, a bond line in words for each person present, mood as movement), then samples the scored remainder (salience x recency x touch x unresolved x freshness) without replacement from softmax(log score / T), using Gumbel-top-k. Each pool is capped and the context budget bounds the whole. Select never reads agencyPressure, candidateActions, privateNotes or provenance. A memory tagged room:!dm is selectable only in that DM. Mind recall comes from recall.rs, with follow-ups excluded.
  • Projector narration (narrate.rs): Ghostlight's build_projector_prompt with the lens as "Begin from ...". It is one tool-less connector call (KitModel, copied from the parked stream's KitProjector), and the output is cut at the word budget: 150 words, 90 on a beat. A deterministic guard (field_names) checks the output for leaked identifiers.
  • persona-tuning.toml (tuning.rs): every Select and Projector knob. An absent file means the defaults, and an unknown key refuses the file. The SHA-256 is carried with every packet.
  • mind-persona project with --select-only, --renders K (K successive turns under freshness), --judge <state> (distinct-2 plus a model judge, which passes at 0.8), --state, --kind and --room. It has no port that writes and reads no brake.
  • recall.rs: each Entry carries kind, salience, admission time and the daemon's nearness. The old prompt's recall section (render, lane headings) is cut.
  • The ghostlight-persona-projection dependency is back (C2 dropped it), toml 0.9 is added, and the public surface is regenerated on top of C2's.

Verified on Yggdrasil (rust 1.95 container): cargo clippy -p mind-body --all-targets -D warnings is clean, and cargo test -p mind-body passes 492 lib tests plus every integration binary, public_surface included. There are 29 projection tests, including:

  • the golden packet;
  • the budget caps;
  • verbatim heard lines;
  • the field-name guard;
  • rotation and freshness;
  • the judge with recorded models;
  • KitModel against a real kit server;
  • the negative check that project in every mode admits nothing, changes no mind document, leaves the trace bytes alone and only reads the mouth.

Live on Yggdrasil as mind-eureka, through systemd-run:

  • --select-only against her stored state succeeded.
  • The persona receipt mind-commit-b8c818aa... and the trace sha256 0d203224... were the same before and after.
  • --renders is blocked by the mind fence. Her uid is rejected on loopback TCP 4110 (the connector), so the map's assumption that project reaches the connector as her uid does not hold yet. That needs a fence decision; this PR does not work around it.

Not merged, not deployed. The brake stays held.

🤖 Generated with Claude Code

C3a of the Persona-only heartbeat map (`docs/persona-only-heartbeat-map.md` at d861574, sections 2, 3 and 9). Session `eureka-self-persona-only-2026-11-19`. **Stacked on #75 (C2).** Until #75 merges, this diff also shows C2's three commits. Mine are the four on top of 7b9fa7d. What lands: - `mind_body::projection`, a new module. The **Select stage** (`select.rs`) is code and deterministic for a seed. It fills the fixed slots (identity, the hour, the stimulus by turn kind, a bond line in words for each person present, mood as movement), then samples the scored remainder (salience x recency x touch x unresolved x freshness) without replacement from softmax(log score / T), using Gumbel-top-k. Each pool is capped and the context budget bounds the whole. Select never reads `agencyPressure`, `candidateActions`, `privateNotes` or `provenance`. A memory tagged `room:!dm` is selectable only in that DM. Mind recall comes from `recall.rs`, with follow-ups excluded. - **Projector narration** (`narrate.rs`): Ghostlight's `build_projector_prompt` with the lens as "Begin from ...". It is one tool-less connector call (`KitModel`, copied from the parked stream's `KitProjector`), and the output is cut at the word budget: 150 words, 90 on a beat. A deterministic guard (`field_names`) checks the output for leaked identifiers. - `persona-tuning.toml` (`tuning.rs`): every Select and Projector knob. An absent file means the defaults, and an unknown key refuses the file. The SHA-256 is carried with every packet. - `mind-persona project` with `--select-only`, `--renders K` (K successive turns under freshness), `--judge <state>` (distinct-2 plus a model judge, which passes at 0.8), `--state`, `--kind` and `--room`. It has no port that writes and reads no brake. - `recall.rs`: each `Entry` carries kind, salience, admission time and the daemon's nearness. The old prompt's recall section (`render`, lane headings) is cut. - The `ghostlight-persona-projection` dependency is back (C2 dropped it), `toml` 0.9 is added, and the public surface is regenerated on top of C2's. Verified on Yggdrasil (rust 1.95 container): `cargo clippy -p mind-body --all-targets -D warnings` is clean, and `cargo test -p mind-body` passes 492 lib tests plus every integration binary, `public_surface` included. There are 29 projection tests, including: - the golden packet; - the budget caps; - verbatim heard lines; - the field-name guard; - rotation and freshness; - the judge with recorded models; - KitModel against a real kit server; - the negative check that `project` in every mode admits nothing, changes no mind document, leaves the trace bytes alone and only reads the mouth. Live on Yggdrasil as `mind-eureka`, through `systemd-run`: - `--select-only` against her stored state succeeded. - The persona receipt `mind-commit-b8c818aa...` and the trace sha256 `0d203224...` were the same before and after. - `--renders` is **blocked by the mind fence**. Her uid is rejected on loopback TCP 4110 (the connector), so the map's assumption that `project` reaches the connector as her uid does not hold yet. That needs a fence decision; this PR does not work around it. Not merged, not deployed. The brake stays held. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Deletes stream.rs, its tests, the mind-stream binary and its integration
tests, and the dependencies only it used (ghostlight-persona-projection,
ureq, the model-connector daemon dev feature). The organ is kept at tag
parked/divergence-stream, whose note names the ruling's return condition.
A brake hold still stops mind-stream@ units a host has installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Map: docs/persona-only-heartbeat-map.md (imagination/persona-only-heartbeat,
d861574), cut C2. Rulings: eureka-body:ruling:persona-only-heartbeat (she
reads the Mind and never writes it; no Self runs from the Persona).

Persona organ (persona.rs 3983 -> ~420 lines): deleted the live session
organ whole: TURN_INSTRUCTION, TURN_REMINDER, MESSAGES_HEADER, WORK_QUESTION,
ANSWER_MESSAGES, WAKE_ASK, WORK_TAIL; PersonaReply with intent, remember,
rule, settle, start_self_run, tempo vote and urgency, and reply_schema; the
doctrine and persona-JSON system prompt (read_doctrine, render_instructions,
campaigns); start_session, persona_args, PersonaInbox; act, decode_reply and
every admission (memories, rulings, settles, pulses, follow-ups, run closure);
start_self_run; the responsibilities, recent-runs and wear renderers;
render_input and render_tempo. carry reads the brakes and answers Dead or
NoOrgan; a start writes nothing and records no run. Kept per the map's keep
list for C3: Config (doctrine, image store and fetch fields cut with their
consumers), the brake read, the chat-addressing helpers, the tail renderer
and FileTrace; uncalled ones carry allow(dead_code) naming C3.

Night: sleep.rs is deleted. It was a Mind-writing session built on the
deleted prelude; C4 retargets its contract from history.
attachment.rs is deleted with the reply's save_attachment, its one caller.
chat_image's loader and recall.rs stay for C3 under allow(dead_code).

Heartbeat: no Mind writes. A wake is a plain unit start through the
Launcher (brake, then alive, then start); busy is the unit's own state.
Deleted the Self-run branch (claimable briefs), the self-ended wake, tempo
votes and declared urgency (standing_vote, pending_urgency, last_self_end)
and the run-based last_turn and last_sleep reads; HeartbeatState gains
last_turn_at and last_night_at (default slots, so a state written before
this cut still decodes). The beat is HEARTBEAT_BEAT_S, default 1800 s.
InstanceTrace.vote_beat_s stays as an always-none slot so heartbeat.cc's
older trace records still decode. HeartbeatView loses latest; the
timeline reads FileStore::latest.

tempo.rs: tally, fallback_beat and the PID controller and its sim are
deleted; pick and score stay, without self_permille.

Tests that pinned deleted behaviour are deleted with it; surviving ones are
kept, and two heartbeat tests pin the cut: a Mind with claimable briefs gets
a Persona wake and no Self run, and no poll admits anything to any mind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Taken from the test's printed full current surface. Two lines are main's
drift, not this cut (chat_client's Basis gained FollowUp, and
FOLLOW_UP_BASIS); the rest is the subtraction: 83 lines removed (persona's
reply and session organ, stream, sleep's inbox, tempo's tally and PID,
heartbeat's AGENT and HeartbeatView::latest) and 11 changed or added
(persona Outcome/carry/Config, heartbeat Config.beat_s, DEFAULT_BEAT_S,
HeartbeatState's turn and night maps, FileStore::latest, Organs without
host, Standing without self_permille).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recall now reads only memories of the cued sorts: follow-ups, rulings and the
open-item filter leave it, with the tests that pinned them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Self's ruling on recall, pushed as 5a75b54, e9a15f4 and 686639b:

  • persona-tuning.toml [select] recall_sorts is now a field. It defaults to Learned, Idea, Decided and Rapport; Committed, Did and Asked stay out. A sort the mind does not know refuses the file.
  • [select.caps] recall defaults to 1 item per packet.
  • project reports the sorts it used under recall.sorts.
  • recall.rs now offers only memories of the cued sorts. Follow-ups, rulings, listed and the open-item filter are gone, along with the tests that pinned them.
  • New tests:
    • the default excludes Committed, Did and Asked;
    • a tuning override admits Committed and Did, and only them;
    • the cap holds at 1 and a raised cap admits more, never past it;
    • an unknown sort refuses the tuning.
  • On Yggdrasil, clippy -D warnings is clean and all of cargo test -p mind-body passes: 491 lib tests plus the integration binaries, public_surface regenerated.
  • Live project --select-only as mind-eureka used sorts [Learned, Idea, Decided, Rapport]. The packet holds one recall item, a Decided memory. The receipt and the trace sha were unchanged.

🤖 Generated with Claude Code

Self's ruling on recall, pushed as `5a75b54`, `e9a15f4` and `686639b`: - `persona-tuning.toml` `[select] recall_sorts` is now a field. It defaults to Learned, Idea, Decided and Rapport; Committed, Did and Asked stay out. A sort the mind does not know refuses the file. - `[select.caps] recall` defaults to 1 item per packet. - `project` reports the sorts it used under `recall.sorts`. - `recall.rs` now offers only memories of the cued sorts. Follow-ups, rulings, `listed` and the open-item filter are gone, along with the tests that pinned them. - New tests: - the default excludes Committed, Did and Asked; - a tuning override admits Committed and Did, and only them; - the cap holds at 1 and a raised cap admits more, never past it; - an unknown sort refuses the tuning. - On Yggdrasil, clippy `-D warnings` is clean and all of `cargo test -p mind-body` passes: 491 lib tests plus the integration binaries, `public_surface` regenerated. - Live `project --select-only` as `mind-eureka` used sorts [Learned, Idea, Decided, Rapport]. The packet holds one recall item, a **Decided** memory. The receipt and the trace sha were unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
eureka force-pushed hands/persona-projector from 9bd39504e8 to a985737e7e 2026-11-19 22:04:49 +00:00 Compare
eureka force-pushed hands/persona-projector from a985737e7e to eadef8e0fd 2026-11-19 22:42:43 +00:00 Compare
eureka force-pushed hands/persona-projector from eadef8e0fd to 33b42226f5 2026-11-19 22:45:48 +00:00 Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
T1: address.rs names_whole_word: a name is glued only by a letter or digit, or
a single hyphen with one beyond it; every other character is a boundary, so
_Eureka_, Eureka/Libby, ok...Eureka? and Huginn.toml name her again and
mind-eureka does not. Soul's 72 forms pinned.
T2: said_to_her decides once; stimulus and heard both carry the count.
T4: Model::ask fails with Failed { reason, usage }; a failed render or judge
call is recorded with its usage and the report goes on.
T5: the sentence cut keeps at least 60% of the budget; 。!? end sentences;
CJK characters are words. T6/T7: spoken is a JSON string; a display name is
quoted, capped at 80 bytes and followed by its Matrix id. T8: the addressing
report gives the table's age and why it was not used. T9: own beat lines
excluded (tested); words, stimulus, item and the other parts bounded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eureka merged commit c4bd83b026 into main 2026-11-20 00:04:06 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Huginn!76
No description provided.