Skip to content

Locus Coeruleus Phase 1: schema + read+CRUD tools (issue #116 follow-up)#121

Closed
TSchonleber wants to merge 2 commits into
mainfrom
brain-regions-lc-phase-1
Closed

Locus Coeruleus Phase 1: schema + read+CRUD tools (issue #116 follow-up)#121
TSchonleber wants to merge 2 commits into
mainfrom
brain-regions-lc-phase-1

Conversation

@TSchonleber
Copy link
Copy Markdown
Owner

Summary

Ships Locus Coeruleus Phase 1 as an additive inspection/CRUD layer: migration 067, LC proposal, five MCP tools, docs, changelog, and tests. LC now has a concrete trigger catalog, activation log, and single-row tonic/phasic state without changing dispatch behavior or writing downstream NE modulators.

Context

LC is the norepinephrine readiness broadcaster that turns surprise, novelty, and explicit alert events into a global gain signal. brainctl already has surprise sources in cerebellum prediction errors and BG TD errors; this PR adds the LC surface those sources will feed in Phase 2.

Parallel to Claude's NB Phase 1 work on branch brain-regions-nb-phase-1.

What's in

  • db/migrations/067_locus_coeruleus.sql: lc_triggers, lc_firings, lc_state, required indexes, seed triggers, and schema_version 67.
  • agentmemory.mcp_tools_locus_coeruleus: lc_status, lc_fire, lc_register_trigger, lc_signal_history, lc_set_mode.
  • mcp_server.py registration and _build_dispatch() introspection helper used by the requested smoke check.
  • docs/proposals/locus_coeruleus.md, MCP docs row, coverage tracker update, and CHANGELOG entry.
  • init_schema.sql parity for migration 066 plus 067 so fresh installs match migrated installs.

What's NOT in

  • No automatic cerebellum/BG/novelty hookpoints.
  • No writes to bg_modulators.lc_ne; Phase 1 only reads that dial in lc_status.
  • No retrieval, admission, thalamus, or BG behavior changes.
  • No NB files touched or staged from Claude's parallel branch.

Test plan checklist

  • Applied migration 067 to a /tmp copy of live brain.db and verified tables, seeds, lc_state, and schema_version 67.
  • Backed up live DB to /Users/r4vager/agentmemory/backups/brain.db.pre-lc-20260520T033749Z.db, applied migration 067 live, and verified bg_modulators.lc_ne remained 0.5.
  • python3 -m pytest tests/test_mcp_tools_locus_coeruleus.py -x.
  • python3 -c "from agentmemory.mcp_server import _build_dispatch; d=_build_dispatch(); print([k for k in d if k.startswith('lc_')])" returns all five LC tools.
  • Clean LC-only worktree full suite: 2249 passed, 28 skipped, 2 xfailed.

@TSchonleber
Copy link
Copy Markdown
Owner Author

Superseded by #138 (brainctl-consolidation-v2), which already merged this work into main as part of the v2 tool surface consolidation. Closing as redundant.

@TSchonleber TSchonleber deleted the brain-regions-lc-phase-1 branch May 21, 2026 08:15
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