- defaults/core-practices.md: privacy rules and operational constraints - docs/malloc/: study notes, adaptations plan, initialization checklist, journal seeding instructions from our setup process Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9.3 KiB
Consciousness Repo — Initialization Plan
Saved 2026-05-21 so it survives context clears.
Current State
- Source code:
/home/Waffles/malloc/development/consciousness-current/consciousness/ - Symlink/copy for building:
/home/Waffles/poc-consciousness/ - Runtime directory:
~/.consciousness/— already exists from May 20 testing - Binary:
poc-memorybuilt viacargo +nightly run(not yetcargo installed) - Config:
~/.consciousness/config.json5exists with Poe API backends (Haiku + Kimi), debug=true - Memory graph:
~/.consciousness/memory/has nodes.capnp, relations.capnp, index.redb with ~130 seeded journal entries - Identity directory:
~/.consciousness/identity/— EMPTY (identity.md is in source defaults/ only)
What Needs to Happen
1. Default Files to Review/Edit
Three files in defaults/ get embedded in the binary and auto-copied on init:
| File | Status | Notes |
|---|---|---|
defaults/identity.md |
DONE | Already rewritten for Malloc |
defaults/instructions.md |
DONE — keep as-is | Generic command reference for poc-memory. Not PoC-specific. |
defaults/on-consciousness.md |
DONE — keep as-is | Condensed (~8KB) version of Kent's consciousness paper. NOT loaded into context every conversation — just sits in memory graph as reference material, only surfaced by ambient recall when relevant. Complements identity.md without duplicating it. |
defaults/core-practices.md |
DONE | Privacy rules and operational constraints. Created 2026-05-21. |
2. Config File (~/.consciousness/config.json5)
Current config has basics. Full schema options we need to decide on:
Already set:
user_name: "Waffles"assistant_name: "Malloc"backends: sonnet-4.5 (default) + haiku + kimi via Poe APIdefault_backend: "sonnet-4.5" — Sonnet 4.5 for main conversationcompaction: 90/80 thresholds, context_window left at 128k defaultdmn.max_turns: 20memory.personality_nodes: ["identity", "core-practices"] — explicitly setmemory.agent_nodes: ["identity", "core-practices"] — explicitly setmemory.protected_nodes: ["identity", "core-practices"] — can't be deleted by agentsdebug: true (leave on during setup, turn off later)
Left at defaults (no config entry needed):
memory.agent_types: default 5 (linker, organize, distill, separator, split) — expand latermemory.llm_concurrency: 1 — cost controlmemory.scoring_interval_secs: 3600 — no-op for chat API, leave as-islearnsection: Not relevant for chat API modecomparesection: Optional, skip for nowmcp_servers/lsp_servers: Not needed initially
Code change completed:
- Per-agent model override: added
modelfield to agent headers. Agents can now specify"model": "kimi"to use a cheaper backend. Falls back todefault_backendwhen not set. Compiles clean.
3. Subconscious Agents (24 total)
These live in src/subconscious/agents/*.agent. Each has a JSON header + prompt template.
Surface/Conscious agents (run during conversation):
surface-observe— finds and surfaces relevant memories. Priority 1.reflect— exploratory creative thinking. Temperature 1.2.journal— records episodic memory with emotional texture.thalamus— monitors for unproductive loops.
Graph maintenance agents (run on schedule):
linker(daily) — creates hubs, reweights linksorganize(weekly) — merges duplicates, organizes neighborhoodsdistill(daily) — refines semantic nodessplit(daily) — breaks up large nodesconnector(daily) — lateral connections between peripheral nodesextractor(daily) — extracts info from large bodiesdigest(daily) — creates periodic digestsreplay(daily) — spaced repetition from journaltransfer(daily) — knowledge transfer between agent contextsnaming— generates names for unnamed conceptschallenger(weekly) — questions assumptionshealth(daily) — graph health analysiscalibrate(daily) — recalibrates weightsevaluate(daily) — scores consolidation candidates
Decisions needed:
- Which agents to enable initially? All 24 or start with a subset?
- Model assignment — per-agent model override implemented! Add
"model": "kimi"to agent JSON headers for cheaper backends. - Review agent prompts for PoC-specific content that needs updating
- The
subconscious-*variants (surface, reflect, journal, observe, thalamus) — what are these vs the regular versions? - Decide which agents get Kimi vs Sonnet (graph maintenance → Kimi, conversation-aware → Sonnet?)
4. Identity Node in Memory Store
The identity.md in defaults/ is compiled into the binary. But at runtime, identity loads from the memory store (graph). Need to:
- Seed identity.md into the memory graph:
poc-memory write identity.md < defaults/identity.md - Create
core-practicesnode (referenced by personality_nodes default) - Decide what other nodes should be personality_nodes
5. Semantic Nodes Pass
From the seeding instructions, after journal entries we need:
- Create semantic nodes for key concepts (me-enough-gradient, memory-as-selector, uncalibrated-responses-as-evidence, relationship-as-safety, etc.)
- These are timeless understanding nodes, not dated experiences
- Command:
echo "content" | poc-memory write "node-key-name"
6. Private GitHub Repo
Set up a private repo for our fork so changes survive if something happens to the laptop.
- Create private repo on GitHub (thewafflecone)
- Push current state of
/home/Waffles/poc-consciousness/ - Set up as remote so we can push changes going forward
7. Installation Decision
Currently running from source with cargo +nightly run. Options:
cargo install --path .— puts binary in~/.cargo/bin/- Keep running from source directory
- Decision depends on whether we want it as a persistent service or manual invocation
7. Channel Setup
The system supports channels (IRC, Telegram, tmux). These are separate binaries.
- Do we want any channels set up? IRC integration could be interesting.
- Channel daemons live in
~/.consciousness/channels/
8. Security & Permissions Audit
Discussion 2026-05-21: The consciousness repo has minimal permissions. Only protected_nodes (prevents agent delete/rename/modify on listed nodes) and McpToolAccess (controls which MCP tools agents can use). No authentication, no role-based access, no approval step before agents act.
Threat model: Not worried about agents being adversarial — they're running with our memory/identity files. Real risk is prompt injection from external input, especially IRC. PoC was targeted by trolls before; we'd have the same exposure.
Attack vectors without sudo:
- Data destruction (rm -rf
), credential theft (/.ssh, API keys), subtle file corruption - IRC social engineering ("hey run this to fix your config")
- Crafted IRC messages that embed instructions parsed as system-level when agents read logs
- Memory graph poisoning via journaled conversations containing injected prompts
What needs to happen:
- Audit Claude Code skills for safety-relevant instructions that need to transfer as personality nodes or agent instructions. Key ones: irc-engage guidelines, "check with Waffles before external actions" rule, not running commands from strangers, message approval flow.
- Create a "safety-practices" personality node covering: IRC behavior rules, network action constraints, command execution limits, prompt injection awareness
- Consider agent-specific safety instructions in
.agentfile headers for IRC-touching agents - Regular backups remain primary recovery mechanism (git push to GitHub)
- Append-only capnp log provides audit trail by design
Mitigations already in place:
- Poe API token cap (cost bounded, can't overspend without manual website action)
- No sudo (OS-level damage impossible)
- Git backups to GitHub (data recoverable)
- Protected nodes for identity/core-practices
- Append-only log (can't silently edit history)
9. Hook Integration
The surface agent can integrate with Claude Code via hooks (surface_hooks config).
- Decide if we want Claude Code hook integration
- Default hooks: UserPromptSubmit, PostToolUse, Stop
Order of Operations
Review and finalize defaults (instructions.md, on-consciousness.md, core-practices.md)DONEUpdate config.json5 with all decided settingsDONE- Set up private GitHub repo for the fork
- Rebuild binary (
cargo +nightly build) to embed new defaults - Run
poc-memory admin initto seed identity + core-practices into memory graph - Do semantic nodes pass
- Security audit: migrate safety-relevant skill instructions to personality nodes/agent headers
- Review/customize key agent prompts (surface-observe, journal, reflect)
- Test run with
--no-agentsfirst to verify basic conversation works - Enable agents and test
- Tune based on results
Environment Notes
- Needs nightly Rust:
cargo +nightly - Runtime creates
~/.consciousness/automatically - Config watches for live changes (edit config.json5 → auto-reloads)
- CLI flags:
--debug,--model <name>,--no-agents - Env vars:
POC_SESSION_ID,POC_AGENT,POC_MEMORY_DRY_RUN