Customize for Your Team
Adjust an adopted Knowledge Base for your team — override guidelines, set quality gates, and preserve customizations across updates.
You've adopted a Knowledge Base and it works. Now you want to adjust it — different testing framework, stricter quality gates, team-specific conventions. This guide shows how to customize without losing the ability to pull upstream updates.
When to Customize
Customize when the default KB doesn't match your team's context:
- Your tech stack differs from the KB defaults (e.g., Jest instead of Vitest)
- Your team follows a different methodology (e.g., Scrum with 2-week sprints)
- You need stricter or different quality gates
- Your architecture pattern isn't covered by the KB defaults
If you just need to use the KB as-is, see Adopt a Knowledge Base.
How the Layered Architecture Works
The .pair/ directory has two layers:
| Layer | Directory | Updated by | Your changes |
|---|---|---|---|
| Knowledge | .pair/knowledge/ | pair-cli update | Overwritten — don't edit |
| Adoption | .pair/adoption/ | You | Preserved — never overwritten |
Adoption always wins. When both layers have an opinion on the same topic, the AI reads adoption files first. This means you can override any guideline by recording a decision in the adoption layer.
Customize Guidelines
Override the Tech Stack
Edit .pair/adoption/tech/tech-stack.md to declare your team's choices:
The AI will now use Jest in all generated code, ignoring the KB's default recommendation.
Change the Architecture Pattern
Edit .pair/adoption/tech/architecture.md:
Set Your Methodology
Edit .pair/adoption/tech/way-of-working.md:
Adjust Quality Gates
Quality gates run before every commit. Customize them in .pair/adoption/tech/way-of-working.md:
Record Significant Decisions
For decisions that need rationale and context — "why did we choose this?" — record an Architecture Decision Record:
Or create a file manually in .pair/adoption/tech/adr/ following the ADR template.
ADRs help future team members (and AI assistants) understand not just what you decided, but why.
Stay Updated
Pull upstream KB changes without losing your customizations:
What happens during update:
.pair/knowledge/is replaced with the latest upstream content.pair/adoption/is untouched — all your decisions survive- New guidelines appear automatically; removed guidelines disappear
- Your adoption overrides continue to take precedence
See CLI Commands for the full update reference.
Handling Conflicts
Occasionally an upstream update changes something your adoption files reference. When this happens:
- The AI assistant will notice the inconsistency during the next session
- Review the updated guidelines in
.pair/knowledge/ - Update your adoption files if needed to stay aligned
Add Project-Specific Content
Create files in .pair/adoption/ for guidelines that don't exist in the upstream KB:
The AI assistant reads all files in .pair/adoption/ — custom files are treated the same as overrides.
Verify Your Customizations
After customizing, verify everything is consistent:
Next Steps
- Want to distribute your customized KB? Publish a Knowledge Base — package and distribute for other teams.
- Need the directory reference? KB Structure — every directory and file explained.
- Quick override guide? Customize the Knowledge Base — concise override patterns.