KB Structure
Reference for the .pair/ directory structure, the Knowledge Base layout and purpose of each directory.
The .pair/ directory is the root of pair's Knowledge Base. It contains all guidelines, adoption decisions, and project context that AI coding assistants use to understand your project.
Directory Tree
Directory Purposes
knowledge/: Upstream Guidelines
Contains all opinionated defaults from the pair KB. These files are updated by pair-cli update and should not be edited directly, your changes would be overwritten.
how-to/: Step-by-step guides for each phase of the development lifecycle (PRD creation through code review)guidelines/: Technical standards organized by domain (collaboration, quality, code design)assets/: Templates used by skills and how-to guides
adoption/: Your Decisions
Contains project-specific decisions that override knowledge-layer defaults. These files are never overwritten by pair-cli update.
product/PRD.md: Your Product Requirements Documentproduct/subdomain/: DDD subdomain definitions for your domainproduct/ddr/: Domain Decision Records (why a domain rule was decided; the domain context file holds the current state)tech/architecture.md: Your chosen architecture patterntech/tech-stack.md: Your approved libraries with pinned versionstech/way-of-working.md: Your development process, quality gates, PM tooltech/adr/: Architecture Decision Records documenting significant choicestech/boundedcontext/: DDD bounded context definitions
working/: Operational Area (D14)
Holds state produced during execution (checkpoints and reports) not knowledge. Outside every asset registry by design: pair-cli install and pair-cli update never create, modify, or delete anything under it.
checkpoints/: Resumable state for multi-task flows (e.g. an interrupted/implementrun)reports/<category>/: Generated reports, grouped by category (e.g. quality, monitoring)
Neither subdirectory is scaffolded by pair-cli install: a skill creates them on demand the first time it writes a checkpoint or report. The path defaults to .pair/working and can be overridden with working_path in config.json (see Configuration Reference); pair-cli validate-config rejects any registry whose target overlaps with it, default or overridden.
Reports come in two shapes. A one-shot audit is keyed by its run date (reports/security/<YYYY-MM-DD>-audit.md). A panel is a recurring, period-scoped report (reports/cost/2026-07-cost-panel.md) whose filename carries a period key, YYYY-MM, YYYY-Wnn, or YYYY-MM-DD_YYYY-MM-DD: re-running for the same period updates that one file in place (one file per period, no duplicates), a headline sits at the top with breakdowns collapsed, an empty period still produces a panel saying so, and an unwritable reports area degrades to presenting the panel inline. The in-place update has one exception, coverage never regresses: if the panel already on disk processed more items than the current run did, it is kept (the run reports its shortfall in its own output instead), so a partial re-run can never overwrite a fuller panel's figures. One convention for every periodic report, see working-area.md.
Precedence Rule
Adoption always wins over knowledge. When a skill reads guidelines, it checks adoption files first. If a decision is recorded there, it takes precedence over the corresponding knowledge-layer guideline.
Update Behavior
| Directory | pair-cli update behavior | Safe to edit? |
|---|---|---|
knowledge/ | Mirror (overwritten) | No |
adoption/ | Add (new files only) | Yes |
adoption/tech/adr/ | Preserved | Yes |
adoption/decision-log/ | Preserved | Yes |
adoption/product/ddr/ | Preserved | Yes |
working/ | Never touched (excluded) | Yes |
Related
- Customize the Knowledge Base for your team: How to override guidelines
- Configuration Reference: config.json options
- Skills Catalog: All 51 pair skills
- llms.txt: How pair makes docs and project context consumable by AI assistants
- knowledge-hub README: KB package operations, scripts, and maintainer guide
- content-ops README: File operations API, copy behaviors, and transform configuration