Skip to content

Latest commit

 

History

History
162 lines (121 loc) · 7.38 KB

File metadata and controls

162 lines (121 loc) · 7.38 KB

Goal: Keep the brain healthy, linked, and compounding

A personal intelligence system that learns, connects, anticipates, and acts. Every capture, session, and decision should make it smarter.

Fitness Function

./scripts/brain-score.sh          # human-readable
./scripts/brain-score.sh --json   # machine-readable

Metric Definition

score = inbox_health + link_density + source_health + action_backlog + session_currency
Component Max What it measures How
Inbox health 25 Unprocessed captures 25 − (2 × unprocessed files in vault/inbox/)
Link density 25 Wiki-link connectedness avg links/note across domain folders × 5, capped at 25
Source health 25 Tracked sources not going stale % active in vault/library/SOURCES.md × 25
Action backlog 15 Pending high-priority actions 15 − (3 × undone high-priority items in actions.yaml)
Session currency 10 Recency of last /evolve commit 10 − days since last evolve commit, floor 0 (score reaches 0 at 10 days; ≥14 days = early exit)

Metric Mutability

  • Split — Agent can improve measurement tools (update SOURCES.md, fix vault queries) but cannot change component definitions or weights.

Concretely:

  • Mutable: vault notes, actions.yaml (completing items), SOURCES.md, source checks, git commits
  • Immutable: scripts/brain-score.sh formula, component weights, this GOAL.md's stopping conditions

Operating Mode

  • Continuous — The brain is always-on. No convergence target — maintain health above 80.

Stopping Conditions (per autonomous run)

Stop and report after one autonomous session when ANY of:

  • Score ≥ 90 (all components above 80% of their max)
  • 5 improvement iterations with no score change
  • 20 iterations completed
  • External service unavailable (OpenAI embeddings, GitHub API)

Bootstrap

cd ~/brain
./scripts/brain-score.sh     # verify baseline — current: 69/100

No install needed. Script uses bash + python3 + git (all present).

Baseline (2026-03-17): 69/100

Improvement Loop

repeat:
  0. Read iterations.jsonl if it exists — note what's been tried and what worked
  1. ./scripts/brain-score.sh --json > /tmp/before.json
  2. Read component breakdowns — find the lowest scoring component
  3. Pick highest-impact action from Action Catalog
  4. Make the change (vault note, consolidation, action completion, etc.)
  5. ./scripts/brain-score.sh --json > /tmp/after.json
  6. Compare: if score improved, commit (brain-auto branch for auto runs)
  7. If unchanged or decreased, revert
  8. Append to iterations.jsonl: before/after scores, action taken, result, note
  9. Continue

Commit convention: [S:NN→NN] component: what changed

Action Catalog

Inbox Health (target: 25/25)

Action Impact How
Run /consolidate +2-6 pts Processes all unprocessed inbox items into permanent notes. One run clears the inbox.
Manually process a capture +2 pts Move vault/inbox/YYYYMMDD.md → appropriate domain folder; set processed: true in frontmatter.

Link Density (target: 25/25)

Action Impact How
Add wiki-links to an orphan note +1-2 pts Find notes with no [[links]] (grep -rL "\[\[" vault/ai-workflows/). Add 2-3 contextual wiki-links in body + related: frontmatter.
Run brain-knowledge-linker on recent notes +2-4 pts For any note created in the last 7 days, search for related notes and add wiki-links.
Create a map-of-content note for a domain +5-8 pts An MOC note in vault/ai-workflows/ with links to all major notes in that domain lifts the whole domain's avg.

Source Health (target: 25/25)

Action Impact How
Run /pulse Maintains Checks all sources in sources.yaml, updates SOURCES.md with health status.
Remove a dead source +1-3 pts In vault/library/sources.yaml, set source to disabled or remove it. Dead source dragging down health.
Add a fresh source +0-2 pts In sources.yaml, add a new active feed or repo. Run /pulse to verify it checks.

Action Backlog (target: 15/15)

Action Impact How
Complete a high-priority action +3 pts In vault/library/actions.yaml, set done: true on a high-priority item after completing the work.
Demote stale high-priority to medium +3 pts If a high-priority item is 30+ days old and no longer relevant, change priority: medium.
Import artifact from actions.yaml +3 pts Many high-priority actions are artifact imports — run /import-artifact <url> to complete them.

Current high-priority pending (2026-03-17):

  1. Import claude-api skill from anthropics/skills
  2. Update context-window-mgmt for 1M context
  3. Evaluate superpowers ecosystem tools
  4. (2 more — check actions.yaml)

Session Currency (target: 10/10)

Action Impact How
Run /evolve after any significant work Maintains 10/10 Updates session-learnings.md and reference docs after implementing a feature.
Write a session-learnings entry manually +3-5 pts If /evolve wasn't run, add a learning to docs/reference/session-learnings.md and commit with message chore: evolve — ....

Constraints

  1. Trust tiers are hard stops — never delete notes, modify CLAUDE.md, push to master, or create GitHub issues without user confirmation. See vault/library/trust.yaml for full tier list.
  2. Search before creating — always check for existing notes on the same topic before writing new ones. Duplicate notes degrade the knowledge graph.
  3. Score must not decrease on commit — every commit must improve at least one component without regressing another. If the net score drops, revert.
  4. No fabricated content — vault notes must reflect real learnings. Never generate plausible-sounding captures. Quality over quantity.
  5. Atomic commits — one improvement per commit so reverts are clean. Don't bundle inbox consolidation with action completion.
  6. brain-auto branch for autonomous runs — cron and OpenClaw runs commit to brain-auto, not master. Only user-initiated sessions push to master.

File Map

Path Role Editable?
vault/inbox/*.md Unprocessed captures Yes (process them)
vault/ai-workflows/*.md AI workflow notes Yes (create, link)
vault/coding/*.md Coding pattern notes Yes (create, link)
vault/industry/*.md Trend/research notes Yes (create, link)
vault/library/actions.yaml Pending action queue Yes (complete items)
vault/library/sources.yaml Tracked sources Yes (add/remove)
vault/library/SOURCES.md Source health dashboard Written by /pulse
docs/reference/session-learnings.md Session corrections Yes (append)
scripts/brain-score.sh Fitness function No

Iteration Log

File: iterations.jsonl (append-only, one JSON object per line)

{"iteration": 1, "before": 69, "after": 72, "action": "Consolidate 3 inbox items", "result": "kept", "note": "inbox_health 19→25, offset by link density still 15"}

When to Stop

Starting score: 69 / 100
Ending score:   NN / 100
Iterations:     N
Changes made:   (list)
Remaining gaps: (list)
Next actions:   (what to do next session)