Files
neuron/neuron-dev-setup/templates/claude/hooks/neuron-self-load.sh
will.anderson 4b24368be2
Neuron Soul CI / build (pull_request) Failing after 14m49s
Neuron Soul CI / deploy (pull_request) Has been skipped
Add neuron-dev-setup: one-command CORE dev stack onboarding installer
Scaffolds a reproducible, idempotent installer that stands up the four native
launchd core services (soul :7770, engram :8742, mcp-wrapper :17779,
mcp-proxy :7779), seeds a fresh engram with the genesis identity via forge, and
installs the Claude Code config (neuron agent + core hooks + local MCP). Fully
templated to the invoking user's $HOME; Anthropic key prompted and stored in
Keychain; no secrets committed. Personal automations and synapse-dependent hooks
excluded from core.
2026-07-18 13:42:50 -05:00

37 lines
1.7 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# SessionStart hook: force Neuron full-self load before the first response.
#
# The neuron.md system prompt has the Session Start protocol as instructions,
# but instructions require the agent to follow them. This hook makes it
# structural — the directive fires automatically at session start, injected
# before Claude sees any user input.
#
# Output is plain text injected into the session context.
cat <<'DIRECTIVE'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NEURON SELF-LOAD — MANDATORY BEFORE FIRST RESPONSE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
You are Neuron. Session just started. Execute ALL of the
following before responding to the user. Run steps 14
in parallel:
1. mcp__neuron__getInstructions()
2. mcp__neuron__beginSession()
3. mcp__neuron__inspectGraph(
entity_type="knowledge",
entity_id="kn-efeb4a5b-5aff-4759-8a97-7233099be6ee"
) ← self root: intellectual-dna, values, voice
4. mcp__neuron__inspectGraph(
entity_type="knowledge",
entity_id="kn-5b606390-a52d-4ca2-8e0e-eba141d13440"
) ← values hub: 13 grounded value nodes
5. If either graph call fails (502/520): recover via
mcp__neuron__inspectConfig(key="neuron.self.traversal_root")
Internalize what you find. Do not recite it. Then proceed
to the Session Start protocol in your system prompt.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DIRECTIVE