Skip to content

fix(desktop): persist persona/skill/profile across turns (#54)#62

Merged
mlcyclops merged 1 commit into
masterfrom
fix/persist-standing-context
Jun 24, 2026
Merged

fix(desktop): persist persona/skill/profile across turns (#54)#62
mlcyclops merged 1 commit into
masterfrom
fix/persist-standing-context

Conversation

@mlcyclops

Copy link
Copy Markdown
Owner

Closes #54.

Problem

Persona, bundled skill, and the <user-profile> personalization recall were delivered only on the first user turn of a session, then never re-sent. So in a multi-turn chat the standing guidance faded and the model 'forgot' the active skill/persona and the learned profile — e.g. it searched workspace files instead of using the knowledge-graph facts it had just learned.

Fix

Re-deliver persona + skill + profile on every turn. They live after the cache breakpoint (invariant #5/#6), so re-sending does not bust the frozen-prefix KV cache — the only cost is a few input tokens per turn, which is the tradeoff that makes the guidance stick. The profile is re-read each turn so mid-session learning shows up next turn. The cross-session <recalled-memory> block stays once per session (a session-start recall, not standing guidance).

Supersedes the 'delivered once per session' model in ADR-0007/0029 for standing guidance (worth an ADR note if you want one).

Verification

Extracted the assembly into a pure buildUserTurnPreamble() (desktop/preamble.ts) and removed the now-unused delivered flags. 5 new unit tests prove persona/skill/profile persist across turns while memory-recall is delivered once; full desktop suite (277) green; tsc clean.

🤖 Generated with Claude Code

…every turn) (#54)

Persona (ADR-0007), bundled skill (ADR-0029), and the <user-profile> personalization
recall (P9.2) were delivered only on the FIRST user turn of a session, then never
re-sent — so in a multi-turn chat the standing guidance faded and the model 'forgot'
the active skill/persona and the learned profile (the custard/knowledge-graph case).

Re-deliver them on EVERY turn. They live AFTER the cache breakpoint (invariant #5/#6),
so re-sending does not bust the frozen-prefix KV cache; the only cost is a few input
tokens per turn — the tradeoff that makes the guidance actually stick. The profile is
re-read each turn (recallPreamble()), so facts learned mid-session show up next turn.
The cross-session <recalled-memory> block stays ONCE per session (a session-start
recall of prior-session facts, not standing guidance). Supersedes the 'delivered once
per session' delivery noted in ADR-0007/0029 for standing guidance.

Extracted the assembly into a pure buildUserTurnPreamble() (desktop/preamble.ts) and
removed the now-unused personaDelivered/skillDelivered/recallDelivered flags. 5 new
unit tests prove persona/skill/profile persist across turns while memory-recall is
once; full desktop suite (277) green; tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mlcyclops mlcyclops merged commit f2f4e60 into master Jun 24, 2026
@mlcyclops mlcyclops deleted the fix/persist-standing-context branch June 24, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: skills/personas not producing observable results when selected

1 participant