Skip to content

feat(memory): codify SNR + latent structure as Prime Axioms#142

Merged
yishuiliunian merged 1 commit into
mainfrom
worktree-witty-cuddling-panda
May 12, 2026
Merged

feat(memory): codify SNR + latent structure as Prime Axioms#142
yishuiliunian merged 1 commit into
mainfrom
worktree-witty-cuddling-panda

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • Introduce a ## Prime Axioms section in the memory-maintainer agent prompt
  • Axiom 1 — SNR per entry: refuse anything reconstructible from code + git log + LOOPAL.md in ~30s
  • Axiom 2 — Latent structure across entries: the index encodes latent causes, not surface symptoms; sharpen / merge / revise instead of accumulating exception entries

Changes

  • crates/loopal-memory/agent-prompts/memory-maintainer.md (+41)

Motivation

The existing prompt leaned on an unnamed heuristic ("you are not a note-taker") plus a flat What Belongs / Does NOT Belong list. The agent had:

  • No authoritative tiebreaker when later workflow steps appeared to permit noise.
  • No macro-level rule connecting multiple surface observations to a shared latent cause — so the index tended to accumulate as a flat log of symptoms.

Promoting the heuristic to two named axioms gives the agent:

  • A refusal criterion that overrides explicit user save requests when SNR would drop.
  • A three-step decision tree (sharpen → merge → revise) that forces the index toward an orthogonal factorization of project knowledge.

Axioms apply recursively to MEMORY.md itself.

Test plan

  • CI passes (only prompt markdown changed; no rust code touched)
  • Memory-maintainer agent behavior validated in next live consolidation session

memory-maintainer.md previously leaned on an unnamed heuristic
("you are not a note-taker", "every line must be high-value")
backed by a flat What Belongs / Does NOT Belong list. The agent
had no authoritative tiebreaker when workflow steps appeared to
permit noise, and no macro-level rule connecting multiple surface
observations to a single latent cause.

Promote the heuristic into two named axioms above Workflow:

- Axiom 1 (SNR per entry) — refuse entries reconstructible from
  code / git log / LOOPAL.md in ~30s; SNR overrides explicit
  user save requests.
- Axiom 2 (latent structure across entries) — the index encodes
  latent causes, not surface symptoms; sharpen / merge / revise
  instead of accumulating exception entries. The index should
  read as an orthogonal factorization of project knowledge.

Axioms apply recursively to MEMORY.md itself.

Why: gives the agent an authoritative tiebreaker when later
workflow steps seem to permit noise, and a macro-level rule
that the negative-exemplar list alone could not express.
@yishuiliunian yishuiliunian merged commit acb3acf into main May 12, 2026
4 checks passed
@yishuiliunian yishuiliunian deleted the worktree-witty-cuddling-panda branch May 12, 2026 02:50
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.

1 participant