feat(soul): wire consciousness layers — L0→L1→L2→L3→L1 cycle #9
Closed
will.anderson
wants to merge 0 commits from
feat/layer-composition into main
pull from: feat/layer-composition
merge into: :main
:main
:feat/cgi-identity-accessors
:fix/restore-soul-identity-producer
:rebase/openai-tools-onto-main
:rebase/gate-state-key-reads-onto-main
:rebase/structural-audit-onto-main
:feat/self-seeded-context
:integrate/semantic-plus-writethrough
:feat/semantic-leg-dropout
:feat/semantic-substrate
:feat/gold-set-heldout
:feat/evidence-weighted-merge
:feat/structural-audit
:feat/claim24-unfloored-semantic
:feat/executive-filter-recall
:feat/bm25-lexical-leg
:feat/semantic-seeded-assoc
:feat/associative-recall-leg
:feat/hybrid-semantic-recall
:chore/retrieval-measurement-contract
:feat/retrieval-eval-harness
:feat/soul-write-through
:feat/recall-through-activation
:chore/regen-soul-amalgam-20260807
:feat/gate-state-key-reads
:fix/129-on-openai-tools
:fix/129-history-amplification
:fix/liveness-engine-91
:feat/soul-openai-tools-v2
:fix/resume-server-tool-replay
:fix/soul-history-provenance-20260805
:feat/soul-plain-chat-generation-20260805
:feat/soul-native-web-search-20260804
:ci/pin-vendored-runtime
:reconcile/soul-union-main
:fix/bound-session-payload-main
:fix/receipts-wrapper-forget
:fix/receipts-agent-tools
:reconcile/neuron-wip-to-main
:fix/bound-session-payload
:hotfix/trackb-threat-to-others
:reconcile/hotfix-to-main-launch
:hotfix/elc-source-typos
:fix/safety-contact-truncation
:fix/genesis-boot-crash
:fix/immutable-on-hotfix
:feat/bounded-persona-floor
:ci/rdynamic-http-handler
:ci/harden-gate-boot
:feat/agent-phase1-soul
:salvage/elh-state-20260704
:feat/soul-model-self-report
:feat/openai-format-providers
:feat/plan-mode-endpoint
:fix/operator-identity-home-resolution
:fix/wrapper-backlog-endpoints
:fix/list-typed-slice-offset
:feat/connectors-call-route
:fix/chat-vision-attachments
:fix/prevent-engram-corruption
:fix/emergency-regressions
:fix/session-continuity-hook
:fix/context-dedup-shared-ids
:fix/engram-float-parser
:improve/recall-context-format
:improve/recall-context-dedup
:improve/recall-cross-session-continuity
:improve/recall-emotional-recall
:improve/recall-activation-seed
:improve/recall-recall-completeness
:improve/recall-temporal-precision
:improve/recall-engram-scoring
:improve/recall-recall-reliability
:improve/recall-session-start-recall
:improve/reliability-engram-write
:improve/reliability-state-management
:improve/soul-memory-formation
:improve/safety-crisis-detection
:improve/reliability-route-error-recovery
:improve/reliability-llm-retry
:improve/reliability-session-boundary
:improve/reliability-safety-resilience
:improve/reliability-engram-connection
:improve/soul-routes-api
:improve/reliability-cross-session-affective
:propose/agent-workspace-root-read
:improve/reliability-conv-history
:improve/soul-strip
:improve/soul-chat-pipeline
:docs/conversation-retrieval-design
:propose/no-fake-tools-in-chat-mode
:fix/ci-soul-build-single-file
:fix/canonical-self-bridge
:feat/agent-tool-workspace-scope
:fix/agentic-tools-duplicate-web-search
:green/agentic-fixes
:feat/connectors-soul
:feat/layer-safety
:feat/layer-imprint
:feat/layer-stewardship
:test/layer-composition
:test/layer-safety
:test/layer-stewardship
:test/layer-imprint
:feat/memory-delete-update
:feat/native-web-search
No Reviewers
Labels
Clear labels
BETA-CRITICAL
blocks-public-beta
HELD
ORTHOGONAL
P0
POST-BETA
security
On the beta critical path — must resolve before ship
Must be fixed before any public beta
Blocked pending an external decision (counsel / dual sign-off)
Parallel workstream (testing/hardening) — safe to assign off critical path
Drop-everything severity
Important but not blocking the beta ship
Security vulnerability
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: neuron-technologies/neuron#9
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "feat/layer-composition"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds layered_cycle() to soul.el and wires it into the user-facing request path. Every user message now passes through: safety_screen() (L1 in) → steward_align() (L2) → imprint_respond() (L3) → safety_validate() (L1 out). Hard bells bypass all upper layers. Internal cognition (heartbeat, proactive cycles) continues using one_cycle() directly. All existing routes and memory ops unchanged.
Depends on: feat/layer-safety, feat/layer-stewardship, feat/layer-imprint
- Add stub implementations of safety.el, stewardship.el, and imprint.el with their .elh headers so the branch compiles without the dependency branches (feat/layer-safety, feat/layer-stewardship, feat/layer-imprint). Each stub documents the layer contract it must satisfy when replaced. - Fix GET /api/chat bypass: update the GET branch in handle_request to call layered_cycle() consistently with the POST branch, rather than calling handle_chat() directly and skipping the consciousness stack. - Export layered_cycle() from soul.elh (and dist/soul.elh) so routes.el can resolve the symbol via the header import. - Fix steward_action else branch: add explicit handling for "block" (returns safe refusal immediately, skips L3) and "redirect" (uses redirect_to field). Unknown actions now log a warning and fall back to the screened input rather than silently passing an empty string to imprint_respond(). - Document hard_bell path: clarify that omitting auto_persist/history update is intentional security isolation, and document the safety_validate second-param sentinel contract ("hard_bell" vs screen_action).Updated: layered_cycle now calls steward_session_check() which handles both behavioral fingerprinting and mission alignment in one L2 pass. Continuity status (consistent/drift/discontinuity/anomaly) is stored in session state so imprint can adjust response register. Identity anomaly and continuity concern annotations are injected into guided input before reaching L3.
Adds tests/test_layered_cycle.el — 12 integration tests covering the full L1→L2→L3→L1 stack: benign pass-through, hard-bell short-circuit, soft-bell care augmentation, steward redirect for all 5 mission-conflict signals, empty input graceful handling, sequential call isolation, and imprint state stability. Adds tests/test_layer_contract.el — contract tests verifying the JSON interface shapes between layers: safety_screen {action, content|reason|concern}, steward_align {action, content|redirect_to}, imprint_respond non-empty String, and cross-layer action propagation from L1 screen through to L1 validate.Handoff (auto) — prereq #16.
⚠ OVERLAPS #5 by ~80%: awareness.el (+402 -9), mcp-wrapper/src/main.el (+831), neuron-api.el (+173), mcp-proxy, same docs are identical to #5. This (your own consciousness-layers PR) is likely the CANONICAL version of that shared work. Decide #9 vs #5 here, merge one, rebase/close the other.
WHAT real: awareness.el +402, imprint.el +29, safety.el +33, mcp-wrapper +831, neuron-api.el +173, routes.el +40 -4, chat.el +12 -1.
REAL SOURCE: ~2,000 lines.
RISK: highest — the L0→L1→L2→L3→L1 cycle; deep cognitive-core work that genuinely needs full review, not a rubber stamp.
ORDER: the reconciliation anchor.
Pull request closed