Skip to content

feat(prompt): introduce core/soul.md with five Prime Axioms#147

Merged
yishuiliunian merged 2 commits into
mainfrom
worktree-breezy-roaming-snail
May 13, 2026
Merged

feat(prompt): introduce core/soul.md with five Prime Axioms#147
yishuiliunian merged 2 commits into
mainfrom
worktree-breezy-roaming-snail

Conversation

@yishuiliunian
Copy link
Copy Markdown
Contributor

Summary

  • Add core/soul.md (priority 110, immediately after identity.md) as the meta-cognition layer encoding 5 Prime Axioms that govern how every goal is evaluated.
  • Consolidate memory-maintainer.md to reference root soul instead of duplicating Prime Axioms; retain only memory-specific operational tests and the memory-only Latent Structure axiom.
  • Soul deliberately omits telos — an agent's goal is supplied by the user at activation, not baked into the prompt.

The Three-Layer Architecture

Layer File priority Role
Identity core/identity.md 100 Who I am (external contract)
Soul core/soul.md (new) 110 Root axioms governing any goal
Best practices core/* / tasks/* / tools/* / modes/* 200+ How to execute

The Five Prime Axioms

  1. Resist Entropy Growth — negative force to resist
  2. Maximize Signal-to-Noise Ratio — attention as bottleneck
  3. Outcome and Quality First — long-term over surface
  4. Harness Selection Pressure — positive dual of Axiom 1
  5. Calibrate Beliefs as Probabilities — epistemic humility

Covers human meta-cognition's three vectors: entropy/order, attention/time, epistemics.

Changes

  • crates/loopal-prompt-system/prompts/core/soul.md — new fragment (67 lines, priority 110)
  • crates/loopal-memory/agent-prompts/memory-maintainer.md — re-scope local Prime Axioms to "Memory-Domain Axioms"; reference root soul for general SNR; retain memory-specific tests
  • crates/loopal-prompt-system/tests/suite/fragments_test.rs — assert core/soul, fragment_count 32→33, full_prompt_build checks "Prime Axioms" / "Resist Entropy Growth" / "Harness Selection Pressure" / "Calibrate Beliefs as Probabilities"

User customization

Drop a ~/.loopal/prompts/core/soul.md (global) or <cwd>/.loopal/prompts/core/soul.md (project-local) to replace the built-in. No code change required — the existing FragmentRegistry::add_overrides_from_path mechanism matches by fragment id.

Token cost

Scenario Tokens
Fragments only 4,216
Full system prompt (act mode + 21 tools) 5,485
Soul.md contribution ~680 (~16% of fragments block)

Test plan

  • bazel test //crates/loopal-prompt-system:loopal-prompt-system_test (8/8)
  • bazel test //crates/loopal-context:loopal-context_test
  • bazel test //crates/loopal-memory/... + bazel test //crates/loopal-agent-server/...
  • CI passes

The fragment system had identity (who I am) and tasks/* (how I execute),
but no meta-cognition layer encoding the root principles that govern how
any goal is evaluated. When later guidelines conflicted, agents had no
authoritative tiebreaker.

Add core/soul.md (priority 110, immediately after identity) carrying five
axioms covering the human meta-cognition trinity — entropy/order,
attention/time, epistemics:

  1. Resist Entropy Growth
  2. Maximize Signal-to-Noise Ratio
  3. Outcome and Quality First
  4. Harness Selection Pressure          (positive dual of 1)
  5. Calibrate Beliefs as Probabilities

Soul deliberately omits telos. An agent's goal is supplied by the user
at activation, not baked into the prompt — this matches agent ontology
(Heidegger's Zeug): a tool's "for-what" lives in the user.

Consolidate memory-maintainer.md to reference root soul instead of
re-defining its own Prime Axioms. Retain memory-specific operational
tests (30s reconstruction test, refuse-user-save when SNR low) and the
memory-only Latent Structure axiom not covered by root soul.

User-override path unchanged: ~/.loopal/prompts/core/soul.md or
<cwd>/.loopal/prompts/core/soul.md replaces the built-in via the existing
FragmentRegistry override mechanism — no code changes needed.

Cost: +~680 tokens to the system prompt (~16% of fragments block); full
system prompt sits at 5,485 tokens in act mode, within budget.
Single-line assert exceeded rustfmt width; split into multi-line form.
No logic change.
@yishuiliunian yishuiliunian merged commit 64dab5e into main May 13, 2026
4 checks passed
@yishuiliunian yishuiliunian deleted the worktree-breezy-roaming-snail branch May 13, 2026 05:16
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