KB Structure Migration Guide
Task: E1:S03:T03 – Create KB structure migration guide
Date: 2025-12-02
Status: ✅ COMPLETE
Version: v0.1.3.3+1
1. Overview
This guide describes the phased migration plan for evolving the ai-dev-kit KB structure from its current state to the target structure defined in the KB structure analysis and principles documents. It also provides guidance for other projects adopting the canonical KB pattern documented in T006.
For dev-kit: Migration is performed in four phases (Phase 1 implemented).
For other projects: See Section 5 for guidance on adopting the canonical KB pattern.
Migration phases:
- Phase 1: Add Navigation (Low Risk) ✅ IMPLEMENTED
- Phase 2: Create Guides Structure (Low Risk)
- Phase 3: Enhance Governance Structure (Low Risk)
- Phase 4: Update Cross-References (Medium Risk)
2. Phases and Steps
2.1 Phase 1: Add Navigation (Low Risk)
Objective: Provide clear navigation and entry points into the KB without moving existing content.
Steps:
- Create
docs/README.mdwith overview and navigation - Create section-level READMEs:
docs/architecture/README.mddocs/changelog-and-release-notes/README.mddocs/project-management/README.md
- Create
docs/changelog-and-release-notes/changelog-archive/README.mdwith index and navigation - Create
docs/project-management/rituals/README.mdanddocs/project-management/rituals/policy/README.mdfor governance navigation
Status: ✅ IMPLEMENTED (v0.1.3.3+1)
Risk: Low – Only adds files, no file moves
2.2 Phase 2: Create Guides Structure (Low Risk)
Objective: Introduce a dedicated structure for user-facing guides.
Steps:
- Create
docs/guides/directory - Create
docs/guides/README.mdwith overview - Create
docs/guides/getting-started/anddocs/guides/framework-consumption/directories - Create placeholder
README.mdfiles in guide directories
Status: ⏳ Planned (not yet implemented)
Risk: Low – Adds new structure only
2.3 Phase 3: Enhance Governance Structure (Low Risk)
Objective: Improve discoverability and organization of governance policies.
Steps:
- Ensure
docs/project-management/rituals/README.mdanddocs/project-management/rituals/policy/README.mdare up to date - Add policy overview and navigation
- Document policy organization principles
Status: ⏳ Partially implemented (initial READMEs created in Phase 1)
Risk: Low – Primarily documentation updates
2.4 Phase 4: Update Cross-References (Medium Risk)
Objective: Update all cross-references to use the new navigation structure.
Steps:
- Update all documentation to reference new READMEs (Architecture, Project Management, Changelog)
- Update package READMEs to link to KB structure (e.g.,
packages/frameworks/*/README.md) - Update framework documentation to reference KB guides
- Validate all links (manual and/or scripted checks)
Status: ⏳ Planned (not yet implemented)
Risk: Medium – Requires careful cross-reference updates
3. Execution Order
- Phase 1 (Navigation) – Already implemented in v0.1.3.3+1
- Phase 2 (Guides Structure) – Next logical step
- Phase 3 (Governance Enhancements) – After basic guides structure
- Phase 4 (Cross-References) – Last, once structure is stable
4. Rollback Procedures
Navigation Files:
- To roll back Phase 1, delete the following files:
docs/README.mddocs/architecture/README.mddocs/changelog-and-release-notes/README.mddocs/changelog-and-release-notes/changelog-archive/README.mddocs/project-management/README.mddocs/project-management/rituals/README.mddocs/project-management/rituals/policy/README.md
Future Phases:
- For Phases 2–4, rollback procedures will include:
- Removing or reverting created directories
- Reverting cross-reference changes
- Restoring previous documentation versions from git history
5. Verification Checklist
After each phase, verify:
- All new READMEs exist and render correctly
- Navigation links work
- No broken links introduced
- Documentation structure matches principles in T002
6. Related Documents
T001-kb-structure-analysis.md– Current and target structure analysisT002-kb-structure-principles.md– Principles and conventionsT003-canonical-kb-structure-research.md– Research on canonical KB patternsT006-scalable-kb-pattern.md– Canonical scalable KB pattern for large codebases
7. Migration for Other Projects (Canonical Pattern Adoption)
For projects adopting the canonical KB pattern (see T006), use this migration approach:
7.1 Step 1: Map Current Structure
- List all current KB top-level directories
- Map each to canonical section (see T006 Section 3.2)
- Identify consolidations needed (e.g., merge duplicate sections)
7.2 Step 2: Plan Migration
- Identify which canonical sections you need (core + optional)
- Plan file movements to target locations
- Update cross-references
- Validate structure (3-level default depth)
7.3 Step 3: Execute Migration
- Create canonical section directories
- Move files to target locations
- Update all cross-references
- Create READMEs for navigation
- Validate links and structure
7.4 Step 4: Document Decisions
- Document which canonical sections you're using
- Document any deviations (with rationale)
- Update
docs/README.mdwith structure overview
End of Migration Guide