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 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 update.
product/PRD.md— Your Product Requirements Documentproduct/subdomain/— DDD subdomain definitions for your domaintech/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
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 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 |
Related
- Customize the Knowledge Base — How to override guidelines
- Configuration Reference — config.json options
- Skills Catalog — All 31 pair skills
- knowledge-hub README — KB package operations, scripts, and maintainer guide
- content-ops README — File operations API, copy behaviors, and transform configuration