Duration: 3 days (estimated)
Branch: feat/split-phase1
Previous Phase: Phase 0 (Monorepo Infrastructure) ✅
Next Phase: Phase 2 (Extract observability)
Goal: Extract boundary.shared into the independent boundary/core library.
Scope:
src/boundary/shared/ → libs/core/src/boundary/core/boundary.shared.core → boundary.coregit status shows no uncommitted changesgit checkout -b feat/split-phase1clojure -T:build statusclojure -M:dev:repl-clj# List all files in boundary.shared
find src/boundary/shared -type f -name "*.clj" | sort
# Count files
find src/boundary/shared -type f -name "*.clj" | wc -l
Expected directories:
src/boundary/shared/core/validation/src/boundary/shared/core/utils/src/boundary/shared/core/interceptor.cljsrc/boundary/shared/core/protocols/src/boundary/shared/tools/ (may stay for now)Task: Document exact file list in this checklist.
# List test files
find test/boundary/shared -type f -name "*_test.clj" | sort
Task: Document exact test file list.
# Find all references to boundary.shared in codebase
rg "boundary\.shared" src/ test/ --type clojure | wc -l
# Get detailed list
rg "boundary\.shared" src/ test/ --type clojure > /tmp/shared-references.txt
Task: Review reference count and patterns.
# Analyze what boundary.shared depends on
rg "^\s*\(:require" src/boundary/shared -A 20 | rg "boundary\." | grep -v "boundary.shared"
Expected: Should be ZERO dependencies on other boundary namespaces.
Task: Verify independence.
# Create directory structure (if not exists)
mkdir -p libs/core/src/boundary/core/{validation,utils,protocols}
mkdir -p libs/core/test/boundary/core/{validation,utils,protocols}
mkdir -p libs/core/resources
Checklist:
.gitkeep files removed (since we're adding real files)Move validation files:
# Example (adjust based on Step 1.1 findings)
mv src/boundary/shared/core/validation/ libs/core/src/boundary/core/validation/
Move other core files:
mv src/boundary/shared/core/utils/ libs/core/src/boundary/core/utils/
mv src/boundary/shared/core/interceptor.clj libs/core/src/boundary/core/interceptor.clj
mv src/boundary/shared/core/protocols/ libs/core/src/boundary/core/protocols/
Checklist:
src/boundary/shared/core/ directory empty (or only non-core files remain)ls -la src/boundary/shared/core/# Move test files
mv test/boundary/shared/core/validation/ libs/core/test/boundary/core/validation/
mv test/boundary/shared/core/utils/ libs/core/test/boundary/core/utils/
# ... etc for all test files
Checklist:
# Check for resources
ls resources/boundary/shared/ 2>/dev/null
# Move if exists
mv resources/boundary/shared/* libs/core/resources/ 2>/dev/null || echo "No resources"
Checklist:
For each file in libs/core/src/boundary/core/:
;; OLD
(ns boundary.shared.core.validation.engine ...)
;; NEW
(ns boundary.core.validation.engine ...)
Tools to use:
# Find all namespace declarations
rg "^\(ns boundary\.shared\.core\." libs/core/src/ -l
# For each file, use Edit tool to update namespace
Checklist:
ns declarations updated in source filesns declarations updated in test filesrg "boundary\.shared" libs/core/ returns zero matchesWithin moved files, update internal requires:
;; OLD
(:require [boundary.shared.core.validation.engine :as engine])
;; NEW
(:require [boundary.core.validation.engine :as engine])
Checklist:
:require statements updatedclj-paren-repair libs/core/src/**/*.clj to fix any syntax issuesIn test files:
;; OLD
(ns boundary.shared.core.validation.engine-test
(:require [boundary.shared.core.validation.engine :as sut]))
;; NEW
(ns boundary.core.validation.engine-test
(:require [boundary.core.validation.engine :as sut]))
Checklist:
ns declarations updated:require statements updatedrg "boundary\.shared" libs/core/test/ returns zero matches# Get complete list of files referencing boundary.shared
rg "boundary\.shared\.core" src/ test/ -l > /tmp/files-to-update.txt
# Review count
wc -l /tmp/files-to-update.txt
Expected: 50-200 files (estimate)
For each file in main codebase:
;; OLD
(:require [boundary.shared.core.validation.engine :as validation])
;; NEW
(:require [boundary.core.validation.engine :as validation])
Strategy:
Checklist:
rg "boundary\.shared\.core" src/ returns zero matches# Update test file references
rg "boundary\.shared\.core" test/ -l
Checklist:
rg "boundary\.shared\.core" test/ returns zero matchesUpdate main deps.edn (now that core is extracted):
;; Add to :deps
boundary/core {:local/root "libs/core"}
Checklist:
deps.edn includes boundary/core dependency# Fix any parenthesis issues
find libs/core/src -name "*.clj" -exec clj-paren-repair {} \;
# Lint
clojure -M:clj-kondo --lint libs/core/src libs/core/test
Checklist:
# Test core library in isolation
clojure -M:test-core
# Or via build tool
clojure -T:build test-lib :lib core
Expected: All core tests pass (>80% coverage)
Checklist:
# Run user module tests (depends on core)
clojure -M:test:db/h2 --focus-meta :user
# Run platform tests
clojure -M:test:db/h2 --focus-meta :platform
# Run all tests
clojure -M:test:db/h2
Expected: All existing tests still pass
Checklist:
# Start REPL
clojure -M:dev:repl-clj
In REPL:
;; Test loading core namespace
(require '[boundary.core.validation.engine :as validation])
;; Test validation functions work
(validation/validate [:string] "test")
;; Test system startup
(require '[integrant.repl :as ig-repl])
(ig-repl/go)
Checklist:
# Build core library JAR
clojure -T:build jar :lib core
# Verify JAR created
ls -lh libs/core/target/core-*.jar
Checklist:
Update libs/core/README.md:
Update main README.md:
If API docs exist:
Create docs/MIGRATION_SHARED_TO_CORE.md:
# Review all changes
git diff main --stat
git diff main src/boundary/shared/ libs/core/
Checklist:
# Lint entire codebase
clojure -M:clj-kondo --lint src test libs
# Run all tests
clojure -T:build test-all
# Check for references to old namespaces
rg "boundary\.shared\.core" src/ test/ libs/
# Build all jars (smoke test)
clojure -T:build jar-all
Checklist:
Update CHANGELOG.md:
## [Unreleased]
### Added
- New `boundary/core` library with validation, utils, and interceptors
### Changed
- **BREAKING**: Renamed `boundary.shared.core` → `boundary.core`
- See [MIGRATION_SHARED_TO_CORE.md](docs/MIGRATION_SHARED_TO_CORE.md)
### Migration Guide
- Replace all `boundary.shared.core` → `boundary.core` in your requires
Checklist:
# Check status
git status
# Stage all changes
git add libs/core/
git add src/boundary/shared/ # If removing files
git add test/boundary/shared/ # If removing files
git add deps.edn
git add docs/
git add CHANGELOG.md
Checklist:
git commit -m "Phase 1: Extract boundary/core library
- Move boundary.shared.core → boundary/core
- Update namespace declarations across codebase
- Migrate all validation, utils, and interceptor code
- Update all tests to use new namespaces
- Build JAR for core library
- Update documentation and migration guide
Breaking Changes:
- boundary.shared.core.* → boundary.core.*
See docs/MIGRATION_SHARED_TO_CORE.md for details."
Checklist:
# Push to remote
git push origin feat/split-phase1
Checklist:
Title: Phase 1: Extract boundary/core Library
Description:
## Summary
Extracts the `boundary.shared.core` namespace into an independent `boundary/core` library as part of the library split initiative.
## Changes
- **New Library**: `boundary/core` (libs/core/)
- Validation engine and utilities
- Core utilities (case conversion, hashing, etc.)
- Interceptor system
- Protocol definitions
- **Namespace Migration**: `boundary.shared.core.*` → `boundary.core.*`
- Updated 150+ files across codebase
- All tests updated and passing
- **Documentation**:
- Migration guide: `docs/MIGRATION_SHARED_TO_CORE.md`
- Updated library README
- CHANGELOG updated
## Breaking Changes
⚠️ **Namespace rename**: `boundary.shared.core.*` → `boundary.core.*`
See [Migration Guide](docs/MIGRATION_SHARED_TO_CORE.md) for upgrade instructions.
## Testing
- ✅ Core library tests: `clojure -M:test-core` (all passing)
- ✅ Full test suite: `clojure -M:test:db/h2` (all passing)
- ✅ Core JAR builds: `clojure -T:build jar :lib core`
- ✅ Linting: `clojure -M:clj-kondo --lint libs/core` (no errors)
## Checklist
- [x] All files moved to libs/core/
- [x] All namespaces updated
- [x] All references updated in main codebase
- [x] All tests passing
- [x] Documentation updated
- [x] Migration guide created
- [x] CHANGELOG updated
- [x] JAR builds successfully
## Related
- Implements Phase 1 of [Library Split Implementation Plan](docs/LIBRARY_SPLIT_IMPLEMENTATION_PLAN.md)
- See [ADR-001: Library Split](docs/adr/ADR-001-library-split.md) for context
- Previous: Phase 0 (Monorepo Infrastructure)
- Next: Phase 2 (Extract observability)
## Reviewers
@thijs-creemers
Checklist:
library-split, breaking-change, phase-1# Switch to main
git checkout main
# Pull latest
git pull origin main
# Delete phase branch
git branch -d feat/split-phase1
# Verify system still works
clojure -M:dev:repl-clj
# In REPL: (ig-repl/go)
Checklist:
If critical issues discovered:
# Revert the merge commit
git revert <merge-commit-sha>
# Or hard reset (if not pushed)
git reset --hard HEAD~1
# Document issue
echo "Phase 1 rollback: <reason>" >> docs/ROLLBACK_LOG.md
Checklist:
| Task | Estimated | Actual | Notes |
|---|---|---|---|
| Analyze structure | 4h | - | |
| Move files | 2h | - | |
| Update namespaces (core) | 4h | - | |
| Update references (main) | 8h | - | |
| Testing & fixes | 6h | - | |
| Documentation | 2h | - | |
| Code review | 2h | - | |
| PR & merge | 2h | - | |
| Total | 30h (3 days) | - |
Use this section to document any issues encountered:
[Date] [Issue] [Resolution]
[2026-01-19] Example issue: Found circular dependency in validation module
Resolution: Moved shared types to protocols namespace
#!/bin/bash
# find-shared-references.sh
echo "Finding all boundary.shared references..."
rg "boundary\.shared" src/ test/ --type clojure -l | sort > /tmp/shared-refs.txt
echo "Found $(wc -l < /tmp/shared-refs.txt) files"
cat /tmp/shared-refs.txt
#!/bin/bash
# update-namespace.sh
# Usage: ./update-namespace.sh <file>
FILE=$1
sed -i '' 's/boundary\.shared\.core/boundary.core/g' "$FILE"
echo "Updated: $FILE"
#!/bin/bash
# verify-migration.sh
echo "Checking for old namespace references..."
if rg "boundary\.shared\.core" libs/core/ src/ test/ --type clojure; then
echo "❌ Found old namespace references!"
exit 1
else
echo "✅ No old namespace references found"
exit 0
fi
Checklist Version: 1.0
Last Updated: 2026-01-18
Phase Status: 🟡 Ready to Start
Next Phase: Phase 2 - Extract observability
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |