Claude Implementation Guide
Projects, Code CLI, and MCP — giving Claude a brain that persists
Claude (Projects + Code CLI + MCP) can absolutely run a proper three-layer brain. The trick is not "use more prompts" — it's giving the agent a pantry (knowledge), countertop (daily notes), and recipe book (tacit knowledge) that survive context resets.
What We'll Build
We combine Claude Projects for durable reference context, Claude Code for filesystem-native memory, and MCP for semantic recall when markdown is not enough.
Claude Project files + PARA markdown + optional MCP index.
memory/YYYY-MM-DD.md + Claude Code auto-memory notes.
.claude rules + user-level CLAUDE.md + tacit.md.
Step 0: Baseline Setup
Start from a clean baseline and make persistence explicit. Hidden defaults are how agents "forget" things and then gaslight you about it.
#!/usr/bin/env bash
mkdir -p .claude/rules knowledge/{projects,areas,resources,archives} memory
cat > .claude/CLAUDE.md <<'EOF'
# Project Memory Policy
- Read knowledge/tacit.md at session start
- Read memory/$(date +%F).md and previous day
- Update daily note after each major task
- Consolidate nightly into knowledge/
EOF
Layer 1 — Knowledge Base (PARA)
Build a simple PARA structure and keep each file scannable. Your future self and your agent both hate giant walls of text.
# Knowledge Base (PARA) ## projects/ Active initiatives with goals, scope, architecture, and open questions. ## areas/ Ongoing responsibilities (ops, growth, support, engineering quality). ## resources/ Reusable references: templates, API docs, snippets, checklists. ## archives/ Completed or paused work. Keep for context, exclude from default scans. ## writing rules - One topic per file - Start with a 5-line executive summary - Add "Last updated" and owner - Prefer bullets over prose
# Project: Memory OS Rollout Last updated: 2026-02-25 Owner: Operator Status: active ## Outcome Ship reliable agent memory across channels with <2% context-loss incidents. ## Architecture - Layer 1: PARA docs in markdown - Layer 2: daily notes by date - Layer 3: tacit rules/preferences ## Current Milestones - [x] Baseline structure - [ ] Add retrieval hooks - [ ] Add nightly consolidation ## Known Risks - Files too long become expensive to load - Stale notes pollute retrieval
Layer 2 — Daily Notes
Treat daily notes as volatile working memory that gets summarized into durable knowledge. That's how you avoid a 700-file graveyard.
# 2026-02-25 ## Focus - What matters today ## Inputs - Meetings, incidents, user requests ## Decisions - Why we chose approach A over B ## Open loops - Blockers and dependencies ## End-of-day summary - 3 bullets max
# Consolidation Protocol 1) Read today's and yesterday's notes. 2) Extract durable insights (patterns, decisions, SOP updates). 3) Append to knowledge/projects or knowledge/resources. 4) Update tacit rules if behavior preference changed. 5) Leave a short "what changed" audit trail.
Layer 3 — Tacit Knowledge
This is where your style and preferences live. Not project facts. Not today's TODOs. Tacit rules should survive project changes.
# Tacit Knowledge ## Communication - Be direct; skip motivational fluff - For Discord/WhatsApp: no markdown tables - Give action-first summaries ## Engineering - Prefer reversible changes - Add verification command after edits - If unsure, propose two viable options ## Safety - Ask before external sends - trash > rm - Never reveal private context in group channels
Platform-Specific Implementation
{
"mcpServers": {
"memory": {
"command": "npx",
"args": ["-y", "mcp-memory-service"],
"env": { "MEMORY_DIR": "./memory-store" }
}
}
}
0 2 * * * cd /workspace && claude --print "Consolidate daily notes into PARA docs"
Automation Patterns
- •Morning brief at 08:30: read Layer 2 + fetch urgent Layer 1 docs.
- •Midday checkpoint: append progress and blockers.
- •Nightly consolidation: compress daily notes into durable knowledge.
- •Weekly pruning: archive stale docs and remove contradictory tacit rules.
Copy-Paste Runbook
#!/usr/bin/env bash
set -euo pipefail
mkdir -p knowledge/{projects,areas,resources,archives} memory
[ -f knowledge/tacit.md ] || cat > knowledge/tacit.md <<'EOF'
# Tacit Knowledge
- Be concise
- Prefer concrete examples
EOF
today=$(date +%F)
[ -f "memory/$today.md" ] || cat > "memory/$today.md" <<EOF
# $today
## Focus
## Decisions
## Open loops
EOF
echo "Memory skeleton ready: $today"
Failure Modes (and Fixes)
Fix: Split into PARA + daily logs; cap file size and add summaries.
Fix: Weekly archive pass and explicit retrieval filters.
Fix: Keep a single canonical tacit file + changelog entries.
Practical Limits
Claude Projects are not API-first. For full automation, run Claude Code with scheduler and keep Projects as curated references.
30-60-90 Day Plan
## Day 0-30 - Stand up three-layer memory - Add one scheduled consolidation - Track context-loss incidents ## Day 31-60 - Add semantic retrieval or scoped memory - Add guardrails + trust ladder - Instrument latency and token costs ## Day 61-90 - Add cross-channel automation - Delegate repeat workflows to subagents - Create weekly memory quality review
Your First 30 Minutes (Fresh Start)
If you're starting from zero on Claude, follow this exact timer-based sequence. Don't optimize yet — just establish a working baseline you can trust.
- Minute 0-5: Create folders for knowledge, daily memory, and tacit rules. Keep names boring and predictable.
- Minute 5-10: Add one "project snapshot" file with outcomes, constraints, and open questions.
- Minute 10-15: Configure a daily note write path (file or database table) and test one write/read cycle.
- Minute 15-20: Add your tacit preferences: communication style, safety boundaries, and formatting defaults.
- Minute 20-25: Run one end-to-end prompt: retrieve context → perform task → append summary to daily notes.
- Minute 25-30: Schedule one nightly consolidation job and capture a rollback plan.
Architecture Diagram (Claude)
User/Trigger | v [Agent Runtime: Claude] | +--> [Layer 1: Knowledge Base] ----> PARA docs / vector index | +--> [Layer 2: Daily Notes] -------> date-based logs / SQL rows | +--> [Layer 3: Tacit Rules] -------> behavior + safety defaults | v [Consolidation Job @ 02:00] | +--> Promote durable insights to Layer 1 +--> Prune stale items + update change log
Step-by-Step Walkthrough (Production Baseline)
- Create the platform config. Keep keys in environment variables and commit only templates..claude/settings.json
{ "mcpServers": { "memory": { "command": "npx", "args": ["-y", "mcp-memory-service"], "env": { "MEMORY_DIR": "./memory/mcp" } } }, "permissions": { "allow": ["Read", "Write", "Bash(npm run build)"] } } - Create one daily runner script. This is the backbone for your heartbeat/nightly memory behavior.scripts/claude-daily-sync.sh
#!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." today=$(date +%F) mkdir -p memory logs claude --print "Read memory/${today}.md and summarize top 3 decisions + blockers. Append summary to knowledge/projects/current-status.md" >> logs/claude-sync.log 2>&1 echo "Daily sync complete: ${today}" - Dry run locally. Execute the script once and verify it writes a deterministic artifact (file row, markdown update, or DB insert).
- Add observability. Log runtime, token use, and failures. If a run fails silently, it's already broken.
- Add backup + rollback. Take snapshots before consolidation; keep last 7 days restorable.
Troubleshooting: Common Failures and Fixes
Fix: force retrieval order (today → yesterday → project snapshot) and cap each file to concise summaries.
Fix: nightly dedupe + weekly archive pass. Delete contradictory stale notes instead of endlessly appending.
Fix: route simple tasks to cheaper models, shrink retrieval chunks, and cache static project context.
Migration Guide
Coming from ChatGPT / OpenAI Assistants? The biggest shift in Claude is operational discipline: explicit memory IO, explicit scheduling, explicit safety rules. Assume nothing is implicit.
- •Context model: define where long-term facts live before you write prompts.
- •Automation model: decide who triggers runs (cron, scheduler, workflow trigger) and who logs outcomes.
- •Failure model: implement retries and dead-letter behavior for failed memory writes.
Cost Analysis (Monthly Estimate)
Assumptions - 3 scheduled runs/day + 20 interactive requests/day - Moderate retrieval (2-6 docs/request) - One nightly consolidation job Estimated monthly spend - Model/API usage: $25 - $180 - Storage (files/DB): $0 - $25 - Scheduler/hosting: $0 - $40 - Observability: $0 - $30 --------------------------------- Total: $25 - $275 / month Optimization levers 1) Use smaller models for extraction/summarization 2) Keep memory files concise and chunked 3) Run consolidation once nightly, not continuously
Pro Tips for Power Users
- •Tag durable facts with
decision:,constraint:, andowner:metadata for faster retrieval. - •Promote only proven patterns from daily notes into Layer 1 — avoid polluting your durable memory with temporary noise.
- •Keep a "known-failures" file and inject it before risky operations to reduce repeated mistakes.
Operational Readiness Checklist
Before trusting this in production, run one rehearsal day where you deliberately inject small failures and verify your system self-recovers.
# Daily reliability checklist - [ ] Morning run completed before 09:00 - [ ] Retrieval quality check passed (top 3 references relevant) - [ ] Daily notes appended with decisions + blockers - [ ] Consolidation wrote a diff summary - [ ] Cost budget still under monthly threshold - [ ] Alert channel received success heartbeat # Weekly checks - [ ] Archive stale memory documents - [ ] Remove contradictory tacit rules - [ ] Update one SOP based on real failures - [ ] Restore test from latest backup
Failure Drill (Run This Once Per Week)
- Temporarily disable retrieval and confirm the agent reports degraded context instead of pretending confidence.
- Block memory writes and verify failed writes trigger alerts with retry metadata.
- Simulate token budget pressure and validate fallback to smaller models.
- Restore from backup snapshot and compare output quality with yesterday's baseline.
{
"metrics": [
"context_loss_incidents",
"avg_retrieval_relevance",
"daily_note_write_success_rate",
"monthly_model_spend",
"time_to_recover_minutes"
],
"targets": {
"context_loss_incidents": "< 3 per month",
"avg_retrieval_relevance": "> 0.75",
"daily_note_write_success_rate": "> 99%",
"monthly_model_spend": "< budget",
"time_to_recover_minutes": "< 15"
}
}That's the full pattern for Claude (Projects + Code CLI + MCP). Same brain architecture, different plumbing. Once this is stable, your agent stops being a clever intern and starts acting like an operator.
Share this chapter
Chapter navigation
29 of 36