A persistent, self-evolving bias layer that survives session resets. Alfred's "second brain" — quiet, bounded, and strictly governed. It does NOT make decisions. It shapes how Alfred approaches decisions.
Core principle: Every mutation is typed, bounded, and logged. Core identity is untouchable without manual override.
text
Learnings Bridge Pending Queue Live Store Session Context
.learnings/ ─────────────► tick ──────────────► rotate ──────────────► bias inject
(Self-improving agent) (reinforce, (promote eligible, (5 items max,
dedupe, archive stale) ephemeral)
skip duplicates)
Core Store ────────────────────────────────────────────────────────────────► Identity
(Immutable values, (never changes
values/style, guiding principles) without human OK)
Three layers:
core/ — Immutable identity (Alfred's nature, Edward's preferences). Manual-only.live/ — Active learnings from experience. Governed promotion from pending.pending/ — Queue for new items. Bounded reinforcement before promotion eligibility.Five bias types:
KindCategoryExampleVALUEIdentity"Alfred is sharp, calm, direct"LESSONContext"XHS MCP needs QR re-login each cycle"PRIORITYActive"Verify before claiming success"PATTERNInterpretation"Proof discipline failure mode"CONSTRAINTAttention"Don't suggest without trying first"
All commands run from scripts/ directory inside the skill:
bash
cd ~/.openclaw/skills/subconscious/scripts
# Check system health
python3 subconscious_metabolism.py status
python3 subconscious_cli.py verify
# See active biases in session context
python3 subconscious_cli.py bias
# Manual metabolism cycles
python3 subconscious_metabolism.py tick # Light tick (5 min cadence)
python3 subconscious_metabolism.py rotate # Full rotation (hourly)
python3 subconscious_metabolism.py review # Daily health check
bash
python3 subconscious_metabolism.py tick
.learnings/ via learnings bridge → queues new items to pendingbash
python3 subconscious_metabolism.py rotate --enable-promotion
Full maintenance: flush, decay, snapshot rotation
Promotion gate (only with --enable-promotion):
confidence >= 0.75reinforcement >= 3freshness >= 0.3Governance enforces typed mutation bounds on all items
bash
python3 subconscious_metabolism.py review
The learnings bridge connects the self-improving-agent skill to the subconscious:
.learnings/LEARNINGS.md, .learnings/ERRORS.md, .learnings/FEATURES.mdlearnings_bridge_last_seen.jsonpending.jsonl with type candidate_queuedBridge to self-improving agent: The learnings bridge should be called from the metabolism tick so that new learnings flow into the subconscious every 5 minutes automatically.
bash
python3 subconscious_metabolism.py status
Expected output:
text
Core: 3/50 Live: 1/100 Pending: 0/500 Snapshots: 10/10
Status: OK
If Pending: 0/500 and Live: N — system is healthy, items promoting correctly.
If Status: blocked — resource limits hit, run rotate to compact.
bash
# Queue a lesson manually
python3 subconscious_cli.py intake --kind LESSON --text "Remember to verify before claiming success" --confidence 0.8 --source "manual"
# Check what's in pending
python3 subconscious_cli.py pending
FilePurposesubconscious/schema.pyItem dataclasses, validation, kind enumsubconscious/store.pyJSON file ops with atomic writessubconscious/retrieve.pyRelevance scoring, is_duplicate``subconscious/influence.pyConvert items to bias blocks for promptssubconscious/governance.pyMutation types, protection classes, boundssubconscious/evolution.pyPromotion pipeline, reinforcement logicsubconscious/maintenance.pyDecay, snapshot rotation, housekeepingsubconscious/intake.pyConservative item extraction from turnssubconscious/flush.pySnapshot building/loading for session continuitysubconscious/learnings_bridge.pyBridge to self-improving-agent .learnings/
When Claude Code needs to assess or improve the subconscious system, use the claude-cx wrapper:
bash
claude-cx "Run: python3 ~/.openclaw/skills/subconscious/scripts/subconscious_metabolism.py status"
claude-cx "Run: python3 ~/.openclaw/skills/subconscious/scripts/subconscious_cli.py bias"
claude-cx "Read ~/.openclaw/skills/subconscious/subconscious/evolution.py lines 450-525"
After running install.sh, four cron jobs are active:
*/5 * * * * — tick (light metabolism)0 * * * * — rotate (hourly, with promotion)0 6 * * * — review (daily health check)0 9 * * 1 — weekly benchmark (Monday 9am, compares to baseline)Compares current state to the baseline snapshot captured at install time. Reports on:
bash
# Run manually
python3 scripts/subconscious_benchmark.py
# View past benchmarks
ls memory/subconscious/benchmarks/
cat memory/subconscious/benchmarks/benchmark_YYYY-MM-DD.json
To capture a new baseline:
bash
python3 scripts/subconscious_benchmark.py --capture-baseline
To override workspace location:
bash
export SUBCONSCIOUS_WORKSPACE=/path/to/any/workspace