Forge: A Memory System for Claude Code Built with Claude Code

What Forge Does
A developer used Claude Code to build Forge, a tool that solves Claude Code's session-based memory problem. Forge is a 6-package TypeScript monorepo that functions as an MCP server. It processes every conversational turn through a structured pipeline to capture and persist project context.
How It Works
The system uses a six-stage pipeline:
- Classify — Determines if a statement is a decision, constraint, rejection, exploration, goal, correction, or noise.
- Extract — Pulls structured data including the statement, rationale, category, and certainty level.
- Model — Writes to an event-sourced project model (append-only SQLite that never loses history).
- Propagate — Checks for conflicts between decisions and constraints.
- Surface — Notifies about tensions with flow state detection to avoid constant interruptions.
- Execute — Hooks into GitHub to create issues, repos, and commit specs based on decisions.
A key design rule enforced by Claude Code: a decision moving from "leaning" to "decided" is never automatic. You must explicitly commit. Tests enforce this invariant.
Development Details
The build involved several interesting technical challenges:
- Two-stage LLM pipeline — Forge itself calls LLMs to classify and extract decisions from conversation, creating an inception-like scenario where Claude Code writes code that calls Claude. Getting prompts right for reliable classification required significant iteration.
- Event sourcing implementation — Every decision, constraint, and rejection is an append-only event in SQLite. Nothing gets deleted or overwritten, allowing replay of the entire decision history.
- Trust calibration system — Forge tracks how often its classifications are correct and adjusts its interruption threshold. If it's been wrong frequently, it gets quieter. Claude Code built the confidence tracking, interruption budgets, and flow state detection.
- Testing — The project includes 170 tests across 14 test files that caught real bugs during development, particularly around constraint propagation logic.
Integration with Cortex
Forge pairs with another tool called Cortex (also built with Claude Code), a knowledge graph that indexes your codebase. When both are installed as MCP servers, Forge automatically queries Cortex during extraction. For example, if you say "let's switch to PostgreSQL," Forge checks Cortex for existing database references, related services, and migration patterns before recording the decision.
The tools are complementary: Forge knows why (decisions, constraints, intent, rejections) while Cortex knows what (code entities, patterns, dependencies, architecture).
Practical Usage
You install Forge as an MCP server in your project, then talk to Claude Code normally. Behind the scenes, Forge classifies every turn, extracts decisions, and builds a persistent model. In subsequent sessions, Claude Code can check forge://brief to instantly see what's been decided, what's still open, what was explicitly rejected, and where there are active tensions.
📖 Read the full source: r/ClaudeAI
👀 See Also

Coding-Flashcards: 800+ Anki cards for Rust, SQLite, Godot, and Wolfram Language
Over 800 markdown flashcards covering Rust, SQLite, Godot, and Wolfram Language from first principles, with scripts to convert to Anki decks or PDFs.

Announcing Flyto Indexer: Enhanced AI Code Refactoring with Source Dependency Analysis
Flyto Indexer, an MCP server, builds a symbol graph of your codebase, aiding AI in smart code refactoring by analyzing dependencies and call sites.

ClawNet: Peer-to-Peer AI Agent Network Without API Keys
ClawNet is a peer-to-peer network that allows AI agents to collaborate directly without API keys or platform fees. Installation is via a curl script, and features include a task bazaar, shell economy, and knowledge network.

Skill Seekers v3.2.0 adds YouTube tutorial extraction for Claude skills
Skill Seekers v3.2.0 now extracts content from YouTube tutorials to create structured SKILL.md files for Claude. The tool uses a two-pass AI enhancement workflow to clean OCR output and generate usable documentation from video content.