feat(prompt): introduce core/soul.md with five Prime Axioms#147
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
core/soul.md(priority 110, immediately afteridentity.md) as the meta-cognition layer encoding 5 Prime Axioms that govern how every goal is evaluated.memory-maintainer.mdto reference root soul instead of duplicating Prime Axioms; retain only memory-specific operational tests and the memory-only Latent Structure axiom.The Three-Layer Architecture
core/identity.mdcore/soul.md(new)core/*/tasks/*/tools/*/modes/*The Five Prime Axioms
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 testscrates/loopal-prompt-system/tests/suite/fragments_test.rs— assertcore/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 existingFragmentRegistry::add_overrides_from_pathmechanism matches by fragment id.Token cost
Test plan
bazel test //crates/loopal-prompt-system:loopal-prompt-system_test(8/8)bazel test //crates/loopal-context:loopal-context_testbazel test //crates/loopal-memory/...+bazel test //crates/loopal-agent-server/...