Claude Code reads mcpServers from ~/.claude.json (global state file),
NOT from ~/.claude/settings.json. The settings.json mcpServers key is
silently ignored for MCP loading. Using claude mcp add --scope user
writes to the correct file.
Also document correct registration commands and scope semantics in
RUNTIME.md so agents and users know how to add MCPs that actually load.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agents consistently ignore written instructions about memory routing
and default to writing local MEMORY.md files regardless of rules in
RUNTIME.md, CLAUDE.md, or MEMORY.md itself. Instructions alone are
insufficient — a technical gate is required.
Changes:
- Add tools/qa/prevent-memory-write.sh — PreToolUse hook that blocks
Write/Edit/MultiEdit to ~/.claude/projects/*/memory/*.md (exit 2)
- Register hook in runtime/claude/settings.json PreToolUse array
- Update runtime/claude/RUNTIME.md: replace soft "Memory Override"
note with hard-gate policy, what-goes-where table, and rationale
- Rewrite guides/MEMORY.md: OpenBrain as primary layer, blocked silos
table, project continuity files, how-the-hook-works section
The correct behavior is now the only possible behavior for Claude Code.
All agent learnings route to OpenBrain where every harness can read them.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Global AGENTS.md: task-type-to-model-tier mapping table with decision
rule — haiku for search/status, sonnet for standard coding/review,
opus only for complex architecture and security.
Claude RUNTIME.md: Task tool model parameter syntax with examples
and quick reference table.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
MEMORY.md was conditionally loaded so agents defaulted to their native
memory locations (e.g. ~/.claude/projects/*/memory/). This caused durable
learnings to be siloed per-runtime instead of shared across agents.
- Move MEMORY.md to mandatory load order in AGENTS.md (position 7)
- Add Memory Override section to all three runtime configs (Claude, Codex,
OpenCode) explicitly forbidding native memory silos for durable data
- Add memory/ directory with .gitkeep to bootstrap source
- Add mkdir -p for memory/ in install.sh post-sync step
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create ~/.config/mosaic/AGENTS.md as the canonical universal agent config
- Runtime adapters (CLAUDE.md, opencode/AGENTS.md, codex/instructions.md) are
now thin pointers that say "READ ~/.config/mosaic/AGENTS.md"
- mosaic claude: injects AGENTS.md via --append-system-prompt
- mosaic opencode/codex: copies AGENTS.md to runtime config path before launch
- mosaic-link-runtime-assets: pushes thin pointers for direct launch fallback
AGENTS.md is runtime-agnostic. All runtimes get the same standards.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SOUL.md.template with {{PLACEHOLDERS}} for interactive generation
- Add mosaic-init (bash + PS1) for interactive SOUL.md creation with flag overrides
- Add mosaic launcher (bash + PS1) — unified CLI for claude/opencode/codex with SOUL.md injection
- Add codex runtime adapter (runtime/codex/instructions.md)
- Update runtime adapters (claude, opencode) with SOUL.md read directive
- Update mosaic-link-runtime-assets to push codex adapter to ~/.codex/
- Update installers to prompt for mosaic init when SOUL.md is missing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>