A System for Claude Code to Learn Your Project Over Time

A developer on r/ClaudeAI shared a system to address Claude Code's lack of persistent context between sessions. Instead of starting from scratch each time, this setup helps Claude learn your project's conventions, architecture, and past mistakes.
The Problem and Solution
When using Claude Code, each new session loses all previous context. Claude re-reads files it already understood, repeats corrected mistakes, and ignores established patterns, requiring constant re-explanation.
The solution involves adding a few files to any repository:
CLAUDE.md- A short set of rules telling Claude how to behave. Examples include "ask before proceeding if something is unclear" and "don't run tests yourself, tell me what to run instead" (which saves money by avoiding token waste on error chasing).docs/folder - Contains short files (5-10 lines each) capturing project conventions, patterns, and architecture, organized into subfolders. An index file (docs/README.md) helps Claude quickly find the right document instead of guessing.
Three Key Prompts
- bootstrap - Pasted once when adopting an existing codebase. Claude reads your code and writes the initial documentation.
- refine - Pasted at the end of a session. Claude reflects on what happened and updates the documentation with new learnings.
- factory - Pasted when Claude does something you want to repeat. It captures the pattern as a reusable prompt.
The Workflow Loop
The process creates a continuous learning cycle: You code with Claude → session ends → you paste the refine prompt → Claude updates the docs → you commit → next session starts smarter. Since the documentation lives in git, everyone on your team benefits from it, and it works with any tech stack.
Practical Tips from Implementation
- Explicitly tell Claude not to run build/test commands to avoid burning tokens chasing errors. Instead, have it tell you what commands to run.
- Use specific numbers in rules (e.g., "pause if changing 3+ files") rather than vague terms like "pause for complex tasks," as Claude wastes time interpreting ambiguity.
- An index file for your docs folder pays off immediately by preventing Claude from opening random files hoping to find relevant information.
The system is free and open source, available at saas-vibe.
📖 Read the full source: r/ClaudeAI
👀 See Also

molequla: Continual Learning AI Organism Built from Scratch with ClaudeCode
molequla is a continual learning AI organism implemented from scratch in Go, C, JavaScript, and Rust with a Python orchestrator. Each element is a full transformer implementation with vector autograd, trained on raw text, that grows and develops a personality over time.

Local Code Index for Coding Agents: Resolves Imports Without Language Server
Basemind is an MIT-licensed Rust tool that indexes local code and resolves imports without a language server, supporting real resolution for JS/TS, Python, and Java.

DAUB MCP Server Lets Claude Generate and Render UIs via JSON Specs
DAUB is an MCP server that enables Claude to generate UI interfaces directly from natural language prompts, producing structured JSON specs that render as live interfaces without code generation or compilation. It exposes four tools including generate_ui, render_spec, validate_spec, and get_component_catalog.

GuppyLM: A 9M Parameter LLM Built from Scratch for Educational Purposes
GuppyLM is a ~9M parameter language model trained from scratch on 60K synthetic conversations, using a vanilla transformer architecture with 6 layers, 384 hidden dimensions, and 6 attention heads. It trains in about 5 minutes on a free Colab T4 GPU and speaks with a fish personality focused on water, food, and tank life.