Your AI partner is brilliant in one session and amnesiac by the next. This repository is the fix: a fork-ready methodology that turns documentation into a knowledge graph humans and AI navigate together β so the 50th session is smarter than the 1st.
Quick Start Β· The Idea Β· The Lifecycle Β· The Skills Β· Live Demo Views
β If this changes how you build with AI, star the repo β stars put this method in front of the next team drowning in context drift.
Every era of software solved memory its own way β and broke it its own way:
- Waterfall had Static Memory. Write everything down upfront: certainty, at the cost of change.
- Agile moved fast and created Fragmented Memory. Knowledge scattered across tickets, wikis, and chats; shared understanding evaporated.
- AI-assisted building adds a third failure: Amnesiac Memory. The model that architected your system yesterday has never heard of it today.
The common mistake is treating these as tooling problems. They are memory problems.
PRD-Led Context Engineering builds Shared Memory: it treats AI as a team member, not a tool, and keeps documentation synchronized with code so humans and AI navigate the same truth.
This methodology comes from two converging experiences.
Leading human teams β alignment always followed the same pattern: rally around a single Source-of-Truth artifact and the team moves as one. Without it, even great talent drifts.
Partnering with AI β sometimes the model performs at a senior level, sometimes it hallucinates. The variable was never the model's intelligence. It was the Context Density provided: rich, structured context in; senior-level output out.
The convergence: documentation is not an afterthought. Documentation is the infrastructure of shared memory.
The Golden Rule: If it isn't part of the memory infrastructure, it isn't true.
So every durable decision gets a Unique ID (UJ-101, BR-004, API-045) in a Source-of-Truth file. That ID is a memory node with weight: when the AI references BR-004, it isn't guessing β it's retrieving a specific, validated decision you encoded. The linked network of IDs across files is the Knowledge Graph, and it lives in plain markdown, in your repo, under version control.
- Just-in-Time Context β IDs let you load only what a task needs. No repo-dumps, no noise, fewer hallucinations.
- The Documentation Ecosystem β PRD β EPICs β SoT connected by links, skills, and hooks. When logic changes, both human and AI know.
- Context Validation β context is measured like code. Too sparse, the AI drifts; too dense, it chokes. The repo scores itself (see Readiness Scoring).
- Progressive Documentation β update in place, never copy. No
PRD_v2.md, ever. One document, many versions, single current reality.
This changes how work is measured, not just how it's tooled:
| Traditional Agile | PRD-Led Context Engineering | The Shift |
|---|---|---|
| Sprints | Context Windows | We don't time-box based on dates; we scope-box based on cognitive capacity. |
| User Stories | Prompts | We don't write descriptions; we engineer prompts that deterministically load context. |
| Tribal Knowledge | Source of Truth | If it isn't in the Knowledge Graph (SoT/), it doesn't exist. |
| Standups | Documentation Hooks | No status meetings. Event-driven hooks handle context loading, gate checks, and memory handoffs. |
| Project Management | Context Governance | We don't task-manage people. The system gates execution until context is verified valid. |
Everything below ships in this repo, works offline, and forks in one click:
| Feature | What it gives you |
|---|---|
| π§ The Knowledge Graph | 14 SoT files, 21 ID types, zero databases β durable memory in markdown |
| π The Progressive PRD | A gated v0.1 β v1.0 lifecycle that stops AI from one-shotting your architecture |
| π 47 Skills | Stage playbooks from problem framing to crossing the chasm β Dunford, Hormozi, Moore, Torres built in |
| π Readiness Scoring | The repo computes whether you're ready to advance β and what to fix first |
| π« The Development Graph | @implements tags bridge code to specs; drift surfaces as a verdict, not a surprise |
| π° The Human Review Layer | Every SoT file rendered as a styled, hyperlinked page its reviewer actually wants to read |
| π€ The Agent Squad | Four role agents with persistent memory, coordinated through files instead of meetings |
The pitch: long-term product memory with no database, no SaaS, no lock-in β just files with discipline.
The architecture is 3 + 1 + SoT + Temp, designed to manage Context Density for both human cognitive load and AI context windows:
- Executive Functions β orient attention. Files load stableβvolatile to maximize prompt-cache hits:
README.mdβ the Dashboard (where am I? what is active?)PRD.mdβ the Strategy (why and what)CLAUDE.mdβ the Physics (how the AI must behave)
- Focus Memory β
epics/: the only variable state. An EPIC frames one problem as one context window. - Long-Term Memory β
SoT/SoT.*.md: the immutable facts. Business Rules (BR-), User Journeys (UJ-), API Contracts (API-), and 18 more ID types. Nothing duplicated; everything referenced by ID. - Short-Term Memory β
temp/: the scratch pad. Files attach to the active EPIC and get harvested to SoT before the EPIC closes.
Just-in-Time Context: instead of dumping documentation into the context window, reference specific IDs (
UJ-101,API-002). Fewer input tokens, deeper understanding.
The pitch: the "One-Shot" β asking AI to build the whole app at once β produces generic code and rapid drift. The Progressive PRD makes that impossible by design.
PRD.md is a gated workflow, not a document. The AI focuses on one stage at a time, and no stage advances until its Definition of Done is met:
| Version | Name | Focus | Definition of Done (DoD) |
|---|---|---|---|
| v0.1 | Spark | Problem & Outcomes | Problem defined, Outcomes measurable, Open Questions list. |
| v0.2 | Market Definition | Segments & ICP | Segments sized, "Not For" defined, Business Rules (BR-) created. |
| v0.3 | Commercial Model | Value & Pricing | Competitors profiled, Pricing model, Monetization rules. |
| v0.4 | User Journeys | Personas & Flows | Core journeys mapped (UJ-), Dependencies (API-) noted. |
| v0.5 | Red Team Review | Risks & Feasibility | Risks (Market/Tech) identified, Mitigations linked to tests. |
| v0.6 | Architecture | Technical Strategy | Stack selected, API contracts (API-) drafted, ARC- conformance rules, Cost guardrails. |
| v0.7 | Build Execution | Implementation Loop | Code tested (TEST-), SoT updated, code traced to specs (Development Graph), Epic loop execution. |
| v0.8 | Release & Deployment | Operational Readiness | Runbooks (RUN-), Monitoring (MON-, MON-DRIFT-), Rollback plan, Changelog system, MOPS handoff. |
| v0.9 | Launch | Go-to-Market | Positioning (Dunford), Offer (Hormozi), Channels (ORB), Launch metrics (KPI-), Feedback channels (CFD-), Tactical playbooks (AEO, alternatives, outreach, HN/Reddit). |
| v1.0 | Growth | Market Adoption | Adoption stage (ADO-STAGE-), Beachhead (ADO-BEACHHEAD-), Whole product (ADO-WHOLE-), References (ADO-REF-), Continuous discovery, Case studies, Testimonials. |
Why gates work: constrained focus prevents the AI from guessing the architecture before it understands the users; deep focus produces meaningful IDs; the result is not just a working product but a desirable one.
The paradox that makes it practical: gates provide focus; the ecosystem provides agility. Because documentation is modular and interlocked, you can revisit any stage just-in-time β customer feedback during Build doesn't restart the plan, it updates the BR- rules and lets hooks propagate the change.
The pitch: the lifecycle isn't advice β it's executable. Every stage ships with skills that know what to consume, what IDs to produce, and which gate they feed.
- 41 stage skills (
prd-v01-*βprd-v10-*): problem framing, competitive landscape, pricing, persona definition, journey mapping, risk discovery, architecture design, epic scoping, test planning, release planning, GTM strategy, case studiesβ¦ - 6 methodology operators (
ghm-*): gate checks, SoT building, ID registration, insight harvesting, status sync. - Named frameworks, encoded: April Dunford positioning, Alex Hormozi offer construction, Owned/Rented/Borrowed channel allocation, Geoffrey Moore chasm crossing, Teresa Torres continuous discovery, Rob Fitzpatrick Mom Test interviews.
- Three depth modes β
quick(founder gut-check, <15 min),standard(default),deep(investor-ready, with assumption logs) β so the method scales from solo founder to team.
Every skill emits Consumes / Produces sections in SoT IDs, which is what keeps the knowledge graph connected as you move through stages.
The pitch: before advancing a stage or starting an EPIC, the repo already knows whether you're ready β and why not.
Readiness is a three-layer graph over the artifacts you already author:
- SoT files β scored on entry count, depth, cross-reference density, and orphan rate. A placeholder file scores 0.
- EPICs β inherit the readiness of every SoT file they reference. Dangling refs and unresolved assumptions surface as unmet criteria, each citing the file that caused it.
- PRD stage β answers "can we advance v0.X β v0.Y?" from gate criteria plus the layers below.
All three write to one file β status/readiness.json β with causal links intact: an EPIC's unmet criterion points at its caused_by SoT file; the top blockers are ranked by downstream impact. The highest-leverage fix is rarely the lowest-scoring file β it's the lowest-scoring file blocking the most EPICs. The system tells you which.
python scripts/readiness.py run # compute all layers + print report
python scripts/readiness.py status # print last-computed report
python scripts/readiness.py run --json # machine-readable output for hooks/CIExit codes 0/1/2 map to PASS / WARN / BLOCK (thresholds: warn=70, block=50, overridable per item). The ghm-gate-check skill delegates here for stage-advancement decisions.
Once building starts (v0.7), the code itself joins the knowledge graph. An AST pass extracts code nodes into status/devgraph.json; the @implements / @verifies tags you write under rule 04 become bridge edges linking each code unit to the spec it realizes. Readiness then measures reality, not just spec health:
implementation_coverageβ which scoped specs actually have implementing codearchitecture_conformanceβ do theARC-rules still hold in the as-built system (drift = aviolateverdict, not a surprise in review)
Untagged code shows up as an orphan node β a context leak you can see. The same devgraph.json powers the HeartBeat visualizer: a live pulse of built / unbuilt / drifted. See docs/DEVELOPMENT_GRAPH.md.
Deeper reading: .claude/rules/07-readiness-protocol.md Β· docs/READINESS_PROTOCOL.md
The pitch: markdown SoT files are optimized for agents and diffs. Humans reviewing a gate deserve a better reading surface β so every SoT file ships with a styled, hyperlinked HTML view in the format its natural reviewer already expects. Start at SoT/html/index.html (opens from file://, no build step, no JS).
The contract: markdown stays authoritative; the HTML is a render. Entry anchors equal unique IDs (SoT.BUSINESS_RULES.html#BR-001), and every cross-reference is a hyperlink β a reviewer walks the knowledge graph by clicking, the same way an agent walks it by ID.
Each of the 13 pages serves a different reviewer: policy register for BR-, ADRs + topology diagram for TECH-/ARC-, Storybook-style specimens for DES-, Given/When/Then cards for TEST-, an ops console for DEP-/RUN-/MON-/SEC-, a retro playbook for LL-, a vendor context map for INT-. The full schema-per-ID-type and persona-per-view rationale lives in SoT/html/README.md.
Screenshots are generated β when the pages change, refresh them with
python3 SoT/html/screenshot.py(Playwright + Chromium; seeSoT/html/README.mdfor setup) and commit the regenerated PNGs with the change.
Next direction (concept): these pages render SoT outward for review. A proposed third artifact class β deliverables β would add an input mode where a human contributes judgment (rank, select, acknowledge) and the page emits paste-ready SoT markdown. See
docs/DELIVERABLES_CONCEPT.md.
The pitch: four role agents that remember, coordinate through files, and get smarter every EPIC β no standups required.
- horizon (Strategy, v0.1βv0.5) Β· studio (Design, v0.3βv0.6) Β· devlab (Build, v0.6βv0.8) Β· metro (Ops, v0.9βv1.0)
- Memory that persists: each agent accumulates Feedback, Patterns, Decisions, and Handoff Notes in its
MEMORY.md. ASubagentStophook actively extracts memories from the conversation. During EPIC harvest, cross-EPIC insights are promoted toSoT/SoT.LESSONS_LEARNED.mdas durableLL-entries. - Event-driven hooks instead of meetings:
SessionStartinjects read order,UserPromptSubmitchecks context density,PreToolUseverifies an active EPIC before code writes,Stopreminds on SoT cascade updates. Behavior is standardized byHOOK_CONTRACT.md. - Multi-agent EPICs without the telephone game: a Synthesis Checkpoint forces the coordinator to produce self-contained worker prompts before implementation begins β workers never see degraded second-hand context.
- File-based standups: the Squad Status section below shows agent activity and EPIC state at a glance, updated by
ghm-status-sync.
/
βββ README.md # Dashboard, structure, and status
βββ PRD.md # Product definition (Progressive PRD)
βββ CLAUDE.md # The agent's operating instructions
βββ epics/ # Active Context Windows (Tasks)
βββ SoT/ # Shared Memory Store (SoT.* files + html/ review layer)
βββ temp/ # Scratch Pad for explorations and audits
βββ .claude/ # Methodology runtime (skills, hooks, agents)
βββ skills/ # 41 stage skills (prd-v*) + 6 operators (ghm-*)
βββ hooks/ # Session/user/stop hooks + subagent memory hooks
βββ agents/ # Role agents with persistent MEMORY.md
βββ domain-profile.yaml # ID registry + skill taxonomy
βββ settings.json # Hook wiring and execution config
Agent Note:
.claude/can be replaced with.gemini/,.codex/, or any other agent structure, but the skills, hooks, and agent model here were built with Anthropic's documentation model in mind.
Fork Note: this
README.mdexplains the methodology. When you fork for a product, copyREADME_template.mdtoREADME.mdand customize it.
# 1. Fork this repo for your product, then:
cp README_template.md README.md # your product dashboard replaces this page
# 2. Open the repo in Claude Code β hooks load the read order automatically.
# 3. Start the lifecycle at the beginning:
# "Let's frame the problem" β triggers prd-v01-problem-framing
# The skill produces CFD- evidence IDs and fills PRD.md v0.1.
# 4. Advance only through gates:
python scripts/readiness.py run # are we ready for v0.2?From there, the method drives itself: each stage's skills consume the previous stage's IDs, the readiness score tells you when to advance, and the knowledge graph grows with every decision. No subscriptions, no servers, no lock-in β fork and go.
The methodology is fork-native: everything runs from files in your repo, with no services to stand up.
- Fork it per product β this repo is the template; each product gets its own copy with its own PRD, SoT graph, and EPICs (Quick Start above).
- Or self-install into an existing repo β run the self-install path instead of forking the whole repo (see below).
- Work through the gates β let the stage skills drive: each one tells you what it consumes, what IDs it produces, and which gate it feeds. Run
python scripts/readiness.py runbefore advancing. - Keep the graph honest β decisions land in
SoT/with IDs before or during the change, never after. Review them as humans throughSoT/html/. - Harvest every EPIC β
temp/notes and agent memories get promoted to durableLL-entries at EPIC close, so the next session starts smarter.
You don't have to fork. The self-install path drops the framework into a fresh or
existing repo without clobbering product content β the subscription-native pattern
borrowed from ZQadus/Xantham-system-blueprint:
ship a blueprint a fresh Claude Code session executes, so all cost lands on your Pro/Max
plan, not the metered API.
# Deterministic CLI (from a clone of this repo):
bash install.sh --target /path/to/your/repo --profile product --dry-run # preview
bash install.sh --target /path/to/your/repo --profile product # installOr paste the one-line bootstrap from BLUEPRINT.md into a fresh Claude
Code session and let the ghm-self-install
wizard drive it. Both paths read .claude/install-manifest.yaml
(framework vs. product file classes), are idempotent, and merge into an existing
.claude/settings.json rather than overwriting it.
The self-install path is the foundation β fuller distribution is next:
- MCP server β the knowledge graph as a queryable service: look up any ID, traverse cross-references, and pull readiness scores from any MCP-capable agent, without loading files into context.
- Packaged Claude Code plugin β the skills, hooks, and agent squad as a marketplace one-click, plus Xantham-style hardening (Docker audit sandbox, signed
CHECKSUMS.sha256).
Watch the repo to catch these when they land. The fork and self-install paths both work end-to-end today.
| Agent | Role | Last Active | Current EPIC | Status |
|---|---|---|---|---|
| horizon | Strategy (v0.1-v0.5) | β | β | idle |
| studio | Design (v0.3-v0.6) | β | β | idle |
| devlab | Build (v0.6-v0.8) | β | β | idle |
| metro | Ops (v0.9-v1.0) | β | β | idle |
| EPIC | State | Lead | Last Updated |
|---|---|---|---|
| (no active EPICs) | β | β | β |
Thank you for helping refine PRD-Led Context Engineering. This repository is not just a codebase; it is a living system of Memory as Infrastructure.
Before contributing, read:
README.mdβ this page: the methodology and dashboard.CLAUDE.mdβ the Agent Operating Instructions.
The goal is always Context Density: exactly the right information, at exactly the right time, for humans and AI alike.
Refine the methodology
- Templates: improve
SoT/templates, the HTML review layer, orepics/EPIC_TEMPLATE.md. - Skills & workflows: sharpen a stage skill, suggest automation hooks, or improve Source-of-Truth management.
- Documentation: clarify the rules of the road in this README.
Report friction
- A lifecycle gate that slows you down without adding value? Tell us.
- The AI struggling to find context? Report it as a Context Leak.
- Fork & branch for your feature or fix.
- Follow the lifecycle β even meta-changes respect the spirit of the gated workflow.
- Traceability β durable new concepts get an ID (
BR-XXX,UJ-XXX).
- Terminology: "PRD-Led Context Engineering", "Source of Truth", and "EPICs", consistent with this README.
- Links: relative links to files (e.g.,
[Link](README.md)), never absolute paths. - Tone: professional, prescriptive, rigorous.
Open a GitHub Issue β and if the method earned it, leave a star on the way out. β




