GitHub - spotcircuit/rebar: Rebar — structural memory framework… by Brian PyattGitHub - spotcircuit/rebar: Rebar — structural memory framework… by Brian Pyatt

GitHub - spotcircuit/rebar: Rebar — structural memory framework…

Brian Pyatt

Brian Pyatt

Overview

Rebar is an open-source structural memory framework I built for Claude Code and any MCP-compatible AI editor. It solves one of the biggest productivity killers in AI-assisted development: Claude forgetting everything between sessions. With 26 slash commands, 6 tactical skills, and a self-learning close-loop harness, Rebar captures, validates, and compounds project knowledge so every new session starts with full context — automatically.

The Problem

Claude Code resets between every session. You explain your architecture, stack, and conventions on Day 1 — and repeat it all on Day 2. On a solo project that's annoying. On a client project juggling multiple codebases, it's a real cost in time, tokens, and consistency. I needed a system that would let Claude remember and improve over time, not start from scratch each run.

What I Built

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.

1. Project Context Commands

Commands like /create, /discover, /brief, /check, /improve, and /meeting scaffold a client project from scratch, auto-generate expertise.yaml from the codebase, produce a standup brief in seconds, validate compliance, and promote validated observations into persistent memory. /brief before switching clients gives full context in under 10 seconds.

2. 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.

3. 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. 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.

Key Features & Capabilities

26 slash commands covering project context, development workflow, knowledge management, and advanced compound flows
Self-learning close-loop harness that optimizes its own templates over time — token cost per run goes DOWN as the system learns
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
MIT licensed, open-source, and built for freelancers and agencies managing multiple client codebases simultaneously

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, 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 20, 2026

Rebar — structural memory framework for Claude Code. 23 slash commands, self-learn loop, evaluator quality gate, wiki integration. - spotcircuit/rebar