Getting Started
Introduction
REAP (Recursive Evolutionary Autonomous Pipeline) is a development pipeline where AI and humans collaborate to incrementally evolve an Application across successive Generations. Rather than treating each AI session as an isolated task, REAP maintains continuity through a structured lifecycle and a living knowledge base called the Genome.
4-Layer Architecture
Vision
Goals + Memory
.reap/vision/
Knowledge
Genome + Environment
.reap/genome/ + .reap/environment/
Generation
Evolution Cycle
.reap/life/ → .reap/lineage/
Civilization
Source Code
your codebase/
- VisionLong-term goals and direction. Vision drives each generation — it determines what goal to pursue next. Memory is a 3-tier free-form recording system for AI to persist context across sessions.
- KnowledgeGenome (prescriptive — architecture, conventions, constraints) and Environment (descriptive — tech stack, source structure, domain). The basis for each generation's work.
- GenerationA single evolution cycle driven by Vision, grounded in Knowledge. Follows Learning → Planning → Implementation → Validation → Completion.
- CivilizationSource code and all project artifacts outside .reap/. What generations evolve. Lessons feed back into Knowledge.
Why REAP?
| Problem | REAP Solution |
|---|---|
| Context Loss — Agent forgets project context every session | CLAUDE.md + Memory — Every session loads genome, environment, and reap-guide. Memory persists context across sessions. |
| Scattered Development — Code modified with no clear goal | Generation Model — Each generation focuses on one goal with a structured lifecycle |
| Design–Code Drift — Documentation diverges from code | Genome Mutation via Backlog — Design defects logged during implementation, applied at Completion adapt phase |
| Forgotten Lessons — Insights from past work are lost | Lineage & Memory — Lessons accumulate in genome and memory, generations archived and compressed |
| Collaboration Chaos — Parallel work leads to conflicting changes | Distributed Workflow — Genome-first merge reconciles design before code, DAG lineage tracks parallel branches |
Project Structure
text
my-project/
├── src/ # Civilization (your code)
└── .reap/
├── config.yml # Project configuration
├── genome/ # Prescriptive knowledge (how to build)
│ ├── application.md # Project identity, architecture, conventions
│ ├── evolution.md # AI behavior guide, evolution principles
│ └── invariants.md # Absolute constraints (human-only edits)
├── environment/ # Descriptive knowledge (what exists now)
│ ├── summary.md # Always loaded — tech stack, source structure
│ ├── domain/ # Domain knowledge (on-demand)
│ ├── resources/ # External reference docs (on-demand)
│ ├── docs/ # Project reference docs (on-demand)
│ └── source-map.md # Code structure + dependencies (on-demand)
├── vision/ # Long-term goals and direction
│ ├── goals.md # North star objectives
│ └── memory/ # AI memory (longterm/midterm/shortterm)
├── life/ # Current generation
│ ├── current.yml
│ └── backlog/
├── lineage/ # Completed generation archive
└── hooks/ # Lifecycle hooks (.md/.sh)