Enterprise Adoption
Create an org-level Knowledge Base, structure it for multiple teams, distribute via npm, set governance policies, and onboard the first team.
A strategic walkthrough for enterprise architects planning org-wide pair adoption. You'll design a multi-team KB structure, publish it for distribution, and onboard your first team — all in about 60 minutes.
Prerequisites
Before starting, make sure you have:
- Completed the Team Setup tutorial (or equivalent team-level pair experience)
- An npm registry — public npmjs.com or a private registry (GitHub Packages, Artifactory, Verdaccio)
- An organization on GitHub (or equivalent) with at least two teams
- Admin access to create repositories, npm packages, and GitHub Projects at the org level
- pair-cli installed (
pair-cli --versionshould return a version) - An AI coding assistant that supports Agent Skills
What you'll learn
By the end of this tutorial you'll understand how to:
- Create an org-level Knowledge Base repository
- Structure guidelines for shared + team-specific layers
- Define adoption file templates that guide team customization
- Publish the KB as an npm package
- Set governance policies (who can modify what, approval workflows)
- Onboard a team using the published KB
Estimated time
~60 minutes.
Step-by-step instructions
At any step, you can run /pair-next instead of a specific skill. pair reads your project state and suggests the right action — so you never need to remember which skill comes next.
1. Plan your KB structure
Before writing anything, decide on the scope:
| Decision | Options | Recommendation |
|---|---|---|
| Scope | Full SDLC / Specific concern | Start with full SDLC — narrow later |
| Layers | Single KB / Base + overlays | Base + overlays for org → team customization |
| Distribution | npm / GitHub Releases / internal | npm for version management and easy updates |
The recommended approach is a base KB with team overlays:
Teams install the base KB and customize it through adoption files — the same layered architecture from the team setup tutorial, but with a shared, versioned base.
2. Create the org KB repository
Create a new repository for your organization's Knowledge Base:
Install pair to get the default KB as a starting point:
If you installed pair-cli as a dev dependency instead of globally, use npx pair-cli install. See installation options for details.
This gives you the full .pair/ structure to modify. The default KB serves as a scaffold — replace the content with your organization's standards.
3. Customize org-wide guidelines
Edit the knowledge layer (.pair/knowledge/) with your organization's standards. Focus on the guidelines that should be universal across all teams:
Code design (.pair/knowledge/guidelines/code-design/):
Security (.pair/knowledge/guidelines/security/):
Architecture (.pair/knowledge/guidelines/architecture/):
Use the adoption declaration pattern: [thing] is adopted/required for [purpose]. This tells AI assistants the statement is a decision, not a suggestion.
4. Create adoption file templates
Teams need empty but structured adoption templates. These guide them through customization without requiring knowledge of the full directory layout.
Create template files in .pair/adoption/tech/:
These templates serve as guided forms — teams fill them in during their bootstrap process.
5. Define governance policies
Create a governance document that defines who can modify what:
6. Package the KB
Prepare your KB for distribution. Add a package.json:
Then package with pair-cli:
This creates a distributable archive validated against the KB structure requirements.
7. Publish to npm
Publish the package to your npm registry:
For scoped packages on a private registry:
If using GitHub Packages, configure .npmrc in your KB repo:
And ensure the publishing token has write:packages scope.
8. Onboard the first team
Have the first team install your published KB in their project:
Then run the team setup workflow:
- Bootstrap: Run
/pair-next(or/pair-process-bootstrapdirectly) — the AI uses your org KB as the base, team fills in adoption files - Customize: Edit adoption files to override org defaults where needed
- Commit: Push
.pair/to the team's repository - Verify: Run
/pair-nextand confirm the assistant reads both org guidelines and team overrides
The team gets your organization's standards as the foundation. Their adoption files layer on top — customizations without divergence.
9. Set up the update workflow
When you publish a new KB version, teams pull updates:
What happens:
.pair/knowledge/is replaced with the latest org KB content.pair/adoption/is untouched — team decisions survive- New guidelines appear automatically
- Removed guidelines disappear
Use semantic versioning for your KB. Patch versions (1.0.x) for fixes and clarifications, minor (1.x.0) for new guidelines, major (x.0.0) for breaking changes that require team action.
10. Scale to additional teams
For each new team:
- Install:
pair-cli install --source npm --url @your-org/pair-kb - Bootstrap: Run
/pair-next(or/pair-process-bootstrapdirectly) for team-specific configuration - Customize: Fill adoption templates with team choices
- Verify: Run
/pair-next— confirm the assistant reads both org guidelines and team overrides
Each team gets the same org foundation with their own customization layer. The AI assistant reads both layers — org standards plus team decisions — producing code that is simultaneously org-compliant and team-appropriate.
Troubleshooting
npm publish fails with 403: Check that your token has write:packages scope and the package name matches your org scope. For GitHub Packages, the repo must be owned by the same org as the package scope.
Teams override org standards they shouldn't: Governance is advisory — pair doesn't enforce it technically. Use code review and the /pair-process-review skill to catch non-compliant overrides. Consider adding org-level quality gates that verify adoption file compliance.
KB update breaks team workflows: Always publish a changelog with each version. For major versions, provide a migration guide and a notice period. Teams can pin to a specific version until they're ready to upgrade.
What you've learned
- Base + overlay architecture — org KB provides shared standards, teams customize through adoption files
- npm distribution — publish versioned KBs that teams install and update independently
- Governance policies — define who can change what, with approval workflows
- Adoption templates — guide teams through customization with structured templates
- Update workflow —
pair-cli updatereplaces knowledge, preserves adoption — no manual merge - Scalable onboarding — every new team gets the same foundation in one command
Next steps
- Publish a Knowledge Base — Detailed reference for all packaging and distribution options
- KB Structure Reference — Full directory layout and file purposes
- Contributing — Contribute improvements back to the pair project
- Guides — Goal-oriented guides for specific tasks