# TRW — Engineering Operating Layer for AI Coding Agents > The methodology layer for AI-assisted development. Persistent memory, > structured workflows, and verification gates that sit above your AI > coding client so context, specs, and quality survive between sessions. ## What TRW Is TRW (The Real Work) is the engineering-discipline layer that sits above AI coding clients — Claude Code, Cursor, OpenCode, Codex, Copilot CLI, Gemini CLI, Aider. It is not itself an IDE, model, or code-completion tool. It integrates with your existing client via the Model Context Protocol (MCP) and adds: persistent memory across sessions, a 6-phase workflow with quality gates, requirements-engineering tooling (AARE-F), and role-based agent-team coordination. Five architectural pillars, integrated in one framework: 1. **Knowledge Compounding** — Learnings persist across sessions with impact scoring and Ebbinghaus-style decay. High-impact discoveries auto-promote into project instructions. 2. **Requirements Engineering (AARE-F)** — 12-dimension PRD validation, EARS-pattern requirements, Given/When/Then acceptance criteria, and FR-by-FR traceability from spec to implementation to test. 3. **Sprint Orchestration** — Parallel agent teams with file-ownership contracts, structured handoffs, and delivery gates. 4. **Phase Gates** — 6-phase lifecycle (Research → Plan → Implement → Validate → Review → Deliver) with build checks and adversarial audit at the gate between Implement and Deliver. 5. **Agent Teams** — Multi-agent coordination with lead, implementer, tester, reviewer, auditor, and PRD-groomer roles. ## Installation ```bash curl -fsSL https://trwframework.com/install.sh | bash ``` The installer detects your coding client, installs `trw-mcp` from PyPI, and writes one MCP config entry plus a project-local `.trw/` directory. Your application source code is not modified. Local workflows run fully offline; the hosted platform is optional for cross-session sync and dashboards. For manual MCP config: ```json { "mcpServers": { "trw": { "command": "uvx", "args": ["trw-mcp"] } } } ``` Supported clients: Claude Code, Cursor, OpenCode, Codex, Aider. GitHub Copilot CLI and Gemini CLI are in beta. ## Architecture Four packages in the monorepo (see docs/evidence for version truth): - **trw-mcp** — Python MCP server (FastMCP, Pydantic v2). Published on PyPI under BSL 1.1. - **trw-memory** — Standalone persistent memory engine (SQLite + sqlite-vec for vector search). Hybrid BM25 + dense retrieval, typed knowledge graph, tiered lifecycle. Published on PyPI under BSL 1.1. - **backend** — FastAPI + SQLAlchemy platform API for optional hosted sync. - **platform** — Next.js 15 frontend for marketing, docs, and dashboard. ## Storage TRW stores state locally under `.trw/` in your project: - Learnings, memory graph, and vector index: SQLite with the `sqlite-vec` extension (under `.trw/memory/`). - Run state, ceremony events, checkpoints: per-run JSONL + YAML files under `.trw/runs/`. - Framework configuration: `.trw/config.yaml`. "Offline-first" means nothing leaves your machine for the core development loop. Hosted-platform sync is opt-in and handles shared memory, cross-project intelligence, and dashboards. ## Dogfooding TRW is used to build TRW. The repo contains the PRDs, sprints, learnings, and tests produced along the way. These are artifacts of the development process, not performance benchmarks. ## How It Works Every task flows through six phases. Each phase has explicit exit criteria and quality gates: 1. **RESEARCH** — Load prior learnings, audit the codebase, register findings. 2. **PLAN** — Design approach, identify dependencies, create execution plan. 3. **IMPLEMENT** — Execute with periodic checkpoints that preserve progress across context compaction. 4. **VALIDATE** — Run tests + type check, verify coverage meets threshold. 5. **REVIEW** — Independent quality audit; fix gaps; record discoveries. 6. **DELIVER** — Sync artifacts, promote high-impact learnings, close run. ## Key Properties - **Application source untouched**: Installation writes only to `.trw/`, a minimal project instruction file (e.g. `CLAUDE.md`), and one `.mcp.json` entry. Your code, tests, and CI pipeline remain unchanged. - **Low lock-in**: Remove those entries and TRW is gone. Your code keeps working. - **Language-agnostic methodology**: The workflow works with Python, TypeScript, Go, Rust, Java, or any language with a test runner. - **Tool-agnostic integration**: MCP-based, so any MCP-compatible client works. ## Related Tools TRW combines knowledge compounding, requirements engineering, sprint orchestration, phase gates, and agent teams into a single framework. Other tools in the AI coding space focus on subsets of this surface: - **Cursor / Windsurf** — IDE editing and completion - **Mem0** — memory storage primitives - **CrewAI / LangGraph** — agent orchestration graphs - **Kiro (AWS) / GitHub Spec Kit** — spec-driven workflow templates - **BMAD** — multi-agent agile pipeline TRW integrates with these tools rather than replacing them. ## Feature Landing Pages - **Memory** (/feature/memory) — BM25 + vector retrieval, typed knowledge graph, Ebbinghaus decay, impact-scored promotion. - **Requirements** (/feature/requirements) — Machine-readable PRDs with FRs, NFRs, acceptance criteria, bidirectional traceability. - **Verification** (/feature/verification) — Build-check, coverage, review, and traceability gates before delivery. - **Workflows** (/feature/workflows) — 6-phase lifecycle with atomic checkpoints and context-compaction recovery. - **Teams** (/feature/teams) — Role-based agent coordination with file ownership and formation selection. - **Cross-Project Sharing** (/feature/sharing) — Validated learnings propagate across repos; offline-first. ## Pages - **Homepage** (/) — Overview, interactive demos, FAQ. - **For Developers** (/for/developers) — Individual-developer workflow. - **For Teams** (/for/teams) — Team governance and coordination. - **Documentation** (/docs) — Getting started, tools, skills, agents, lifecycle, API, configuration. - **Quickstart** (/docs/quickstart) — Install and first-session guide, with local and hosted paths split out. - **About** (/about) — Origin story and direction. - **Pricing** (/pricing) — Free during private beta. - **Waitlist** (/waitlist) — Early-access signup. - **Metrics** (/metrics) — Hosted-platform dogfooding metrics. - **License** (/license) — BSL 1.1 terms. ## Links - Website: https://trwframework.com - Documentation: https://trwframework.com/docs - Full reference: https://trwframework.com/llms-full.txt - Feature pages: /feature/memory, /feature/requirements, /feature/verification, /feature/workflows, /feature/teams, /feature/sharing - Early access: https://trwframework.com/waitlist