Skip to content

refactor: project restructure — cli/ + crp/ + .ai4x/#71

Merged
normenmueller merged 4 commits into
trunkfrom
refactor/66-project-restructure
May 8, 2026
Merged

refactor: project restructure — cli/ + crp/ + .ai4x/#71
normenmueller merged 4 commits into
trunkfrom
refactor/66-project-restructure

Conversation

@normenmueller
Copy link
Copy Markdown
Owner

Epic #66 — Project Restructure

Restructures the repository from dev/-centric layout to the target structure with clear top-level boundaries.

Changes

Commit Story Scope
1a040cb S1 #67 dev/cli/cli/
ccc04a9 S2 #68 dev/cap/crp/cap/, adm/gdl/dev/contracts/crp/gov/qlt/, adm/gdl/dev/protocols/crp/gov/prc/, crp/agn/ + crp/gov/top/ created
9005209 S3 #69 adm/gdl/pln/ + adm/gdl/shr/ flattened into adm/gdl/, .ai4x/ skeleton created
32d326d S4 #70 Glossary Corpus entry, final reference sweep

New Structure

ai4x/
├── .ai4x/          config.yaml (tracked), team/ (tracked), ana/ (gitignored)
├── .github/agents/  spawn-output (unchanged)
├── cli/             CLI source (src/{app,lib}/, tst/)
├── crp/             Product corpus
│   ├── cap/         Cognitive capabilities
│   ├── agn/         Agent catalog (placeholder)
│   └── gov/         Governance templates
│       ├── qlt/     Quality contracts
│       ├── prc/     Process protocols
│       └── top/     Collaboration topologies (placeholder)
├── adm/gdl/         Planning governance (flat)
└── ...              acc/, doc/, utl/ (unchanged)

Verification

  • AC-2.1: git grep for all 6 old path fragments → zero matches
  • AC-3.1: make doctor → exit 0
  • AC-3.2: make verify → exit 0
  • All moves via git mv for history preservation (AC-4.1)
  • Every commit results in a consistent state (AC-6.1)

Critical Review

  • Architect: conditional-approve — all ACs verified, non-blocking: extend verify.sh for crp/ assertions
  • AI Strategist: conditional-approve — corpus structure supports curate/spawn lifecycle, 3-zone boundary clean

Follow-up Items (separate Stories)

  1. Extend verify.sh/doctor.sh with crp/ and .ai4x/ assertions
  2. Define crp/agn/ naming convention before first curate implementation

Closes #66, closes #67, closes #68, closes #69, closes #70

Move CLI source code one level up. Update all path references in
Makefile, INSTALL, doctor.sh, verify.sh, agent definitions, and
quality contracts.

Part of #66, addresses S1 #67.
- git mv dev/cap → crp/cap (capabilities)
- git mv adm/gdl/dev/contracts → crp/gov/qlt (quality contracts)
- git mv adm/gdl/dev/protocols → crp/gov/prc (process protocols)
- Create crp/gov/top/.gitkeep, crp/agn/.gitkeep
- Remove empty dev/ and adm/gdl/dev/ directories
- Update all path references across 30+ files:
  agent definitions, copilot-instructions, index.yaml,
  README, INSTALL, CONTRIBUTING, Makefile, glossary, ADRs,
  PBL entries, utility check scripts
- index.yaml paths now repo-root-relative
- adm/gdl/README.md updated for new structure

Part of Epic #66
- git mv adm/gdl/pln/protocols/workflow.md → adm/gdl/planning-workflow.md
- git mv adm/gdl/pln/protocols/planning-conformance.md → adm/gdl/planning-conformance.md
- git mv adm/gdl/shr/protocols/board-policy.md → adm/gdl/board-policy.md
- Remove empty pln/ and shr/ subdirectories
- Create .ai4x/config.yaml (tracked placeholder)
- Create .ai4x/team/.gitkeep (tracked)
- Create .ai4x/.gitignore with ana/ entry
- Update root .gitignore: remove blanket .ai4x/ exclusion
- Update all references in agent definitions, governance docs,
  and protocol cross-references (17 path updates across 6 files)

Part of Epic #66
- Add Corpus (crp/) definition to glossary Architecture Terms
- Fix last stale dev/src/ reference in completions.test.ts
- AC-2.1: zero matches for all 6 old path fragments (verified)
- AC-3.1: make doctor → exit 0
- AC-3.2: make verify → exit 0
- AC-5.1: Corpus definition added
- AC-5.2: CCC references already correct (crp/cap/)

Closes #70, closes #66
@normenmueller normenmueller merged commit 00c3c54 into trunk May 8, 2026
1 check passed
@normenmueller normenmueller deleted the refactor/66-project-restructure branch May 8, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant