Rebar — Structural Memory for Claude Code by Brian PyattRebar — Structural Memory for Claude Code by Brian Pyatt

Rebar — Structural Memory for Claude Code

Brian Pyatt

Brian Pyatt

Overview

Rebar is a structural memory framework for Claude Code — a solo-built open-source tool that solves one of the most frustrating problems in AI-assisted development: context loss between sessions. As the sole architect and engineer, I designed and built a system of 26 slash commands, 4 knowledge systems, and 6 background agents that give Claude Code persistent, compounding project knowledge across every session.
Rebar
Rebar
Rebar is not a CLI tool, SDK, or plugin — it's a set of markdown files in .claude/commands/ that Claude Code reads as native instructions. Clone the repo and the commands just work. Each session starts by reading expertise.yaml, your project's structured memory file, so Claude has full context from line one. Combined with an MCP server (@spotcircuit/rebar-mcp), the same expertise, wiki, and close-loop state is accessible from Cursor, Windsurf, VS Code Copilot, and Claude Desktop.

The Challenge

Claude Code is a powerful AI coding tool, but it forgets everything between sessions. Every time you start a new session, you have to re-explain your architecture, your conventions, your in-progress work, and your project context — from scratch. On a solo project that's annoying. On a client project juggling multiple codebases, it's a real cost in time, tokens, and consistency. The challenge: build a persistent memory layer that captures, validates, and compounds project knowledge automatically.

What I Built

I built Rebar as a fully solo project — architecture, engineering, documentation, and deployment. The system gives Claude Code a structured memory layer through four interlocking components.

Slash Commands

26 slash commands covering project context capture, dev workflow management, wiki operations, and advanced agent orchestration. Commands like /create, /discover, /improve, /brief, /check, and /sync give developers immediate, intuitive control over their project's memory — no configuration required. Clone the repo and they just work. /brief before switching clients gives full context in under 10 seconds.

Knowledge Systems

Four specialized knowledge stores that give Claude Code structured, queryable memory: expertise.yaml tracks project state and architecture decisions; .claude/skills/ holds tactical playbooks for recurring workflows; wiki/ stores durable long-form knowledge; and meta-improve-log manages template patch history. Each system is designed to be read and updated by Claude automatically during sessions.

Background Agents

Six Paperclip-powered background agents that run autonomously to keep project knowledge current: validating expertise entries against live code, processing wiki intake, routing issues to the right owners, and running scheduled freshness checks. The agents ensure Rebar's knowledge stays accurate over time without manual maintenance.

Self-Learning Close-Loop Harness

After every shipped feature, /close-loop runs a 4-gate cycle: an evaluator validates the diff, a release gate blocks deploy-blocker language, /improve promotes validated observations into expertise.yaml, and /meta-improve scans for recurring failure patterns across cycles and queues template patches for human review via /meta-apply. The system literally optimizes its own workflow — shorter templates, sharper behavior, fewer tokens per run over time.

Wiki & Knowledge System

/wiki-ingest, /wiki-file, and /wiki-lint process raw conversation insights into structured wiki pages, file permanent learnings, and health-check for orphans, broken links, and stale pages. This turns every session into a permanent institutional knowledge base that grows with the project.

Key Features & Capabilities

26 slash commands covering project context, development workflow, knowledge management, and advanced compound flows
4 structured knowledge systems (expertise.yaml, skills, wiki, meta-improve-log)
6 Paperclip-powered background agents for automated knowledge validation and maintenance
Self-learning close-loop harness that optimizes its own templates over time — token cost per run goes DOWN as the system learns
Self-validating /improve loop that promotes accurate context and discards stale knowledge
Works with ANY MCP-compatible editor: Claude Code, Cursor, Windsurf, VS Code Copilot, and Claude Desktop
Persistent wiki system turns every session into growing institutional knowledge — /takeover can understand 200K lines of legacy code in a single session
Zero-config installation: clone the repo and commands work immediately
Fully open source (MIT License) — solo-built: architecture, engineering, and documentation

Tools & Technologies

Built with Python (74.8%) and Shell (25.2%), Rebar leverages the Claude Code MCP protocol, YAML-based structured memory (expertise.yaml), markdown command files, Paperclip agent orchestration, and the @spotcircuit/rebar-mcp server package. The framework integrates with GitHub for version control and is designed to work natively inside any editor that supports MCP — no additional software installation required beyond cloning the repo.
Like this project

Posted Apr 21, 2026

Solo-built OSS framework for Claude Code: 26 slash commands, 4 knowledge systems, 6 background agents. Persistent context that compounds across every session.