chore: full technical rename planarchy → capakraken

Complete rename of all technical identifiers across the codebase:

Package names (11 packages):
- @planarchy/* → @capakraken/* in all package.json, tsconfig, imports

Import statements: 277 files, 548 occurrences replaced

Database & Docker:
- PostgreSQL user/db: planarchy → capakraken
- Docker volumes: planarchy_pgdata → capakraken_pgdata
- Connection strings updated in docker-compose, .env, CI

CI/CD:
- GitHub Actions workflow: all filter commands updated
- Test database credentials updated

Infrastructure:
- Redis channel: planarchy:sse → capakraken:sse
- Logger service name: planarchy-api → capakraken-api
- Anonymization seed updated
- Start/stop/restart scripts updated

Test data:
- Seed emails: @planarchy.dev → @capakraken.dev
- E2E test credentials: all 11 spec files updated
- Email defaults: @planarchy.app → @capakraken.app
- localStorage keys: planarchy_* → capakraken_*

Documentation: 30+ .md files updated

Verification:
- pnpm install: workspace resolution works
- TypeScript: only pre-existing TS2589 (no new errors)
- Engine: 310/310 tests pass
- Staffing: 37/37 tests pass

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
2026-03-27 13:18:09 +01:00
parent f46b38f457
commit cd78f72f33
303 changed files with 938 additions and 878 deletions
+16 -16
View File
@@ -35,10 +35,10 @@ PR opened / pushed
| Job | Command | What it catches |
|-----|---------|----------------|
| **typecheck** | `pnpm --filter @planarchy/web exec tsc --noEmit` | Type errors across the full web app |
| **typecheck** | `pnpm --filter @capakraken/web exec tsc --noEmit` | Type errors across the full web app |
| **lint** | `pnpm lint` | Code style violations, unused imports, etc. |
| **test** | `pnpm test:unit` | Unit test failures in engine, staffing, API, shared |
| **build** | `pnpm --filter @planarchy/web exec next build` | SSR errors, dynamic import issues, bundle problems |
| **build** | `pnpm --filter @capakraken/web exec next build` | SSR errors, dynamic import issues, bundle problems |
| **e2e** | `pnpm test:e2e` | End-to-end user flow regressions |
### Required status checks
@@ -63,13 +63,13 @@ Run these before pushing to catch issues early:
```bash
# Quick check (< 2 min)
pnpm --filter @planarchy/web exec tsc --noEmit && pnpm lint
pnpm --filter @capakraken/web exec tsc --noEmit && pnpm lint
# Full check (< 3 min)
pnpm test:unit
# Full check including build (< 5 min)
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
```
### Pre-commit hook (optional)
@@ -78,7 +78,7 @@ You can add a Git pre-commit hook to run the quick check automatically:
```bash
# .husky/pre-commit
pnpm --filter @planarchy/web exec tsc --noEmit
pnpm --filter @capakraken/web exec tsc --noEmit
pnpm lint
```
@@ -184,20 +184,20 @@ docker compose -f docker-compose.prod.yml exec app \
### Manual deployment (current setup)
Since `planarchy.hartmut-noerenberg.com` runs behind nginx:
Since `capakraken.hartmut-noerenberg.com` runs behind nginx:
```bash
# On the server
cd /home/hartmut/Documents/Copilot/planarchy
git pull origin main
pnpm install
pnpm --filter @planarchy/db exec prisma generate
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/db exec prisma generate
pnpm --filter @capakraken/web exec next build
rm -rf apps/web/.next/cache # clear stale cache
# Restart the app (systemd, pm2, or manual)
fuser -k 3100/tcp 2>/dev/null
PORT=3100 pnpm --filter @planarchy/web start &
PORT=3100 pnpm --filter @capakraken/web start &
```
### nginx configuration
@@ -206,7 +206,7 @@ The existing nginx reverse proxy should forward to port 3100:
```nginx
server {
server_name planarchy.hartmut-noerenberg.com;
server_name capakraken.hartmut-noerenberg.com;
location / {
proxy_pass http://127.0.0.1:3100;
@@ -244,7 +244,7 @@ Errors are automatically captured by the Sentry integration in Next.js.
Point an external monitor (UptimeRobot, Better Stack, etc.) at:
```
https://planarchy.hartmut-noerenberg.com/api/health
https://capakraken.hartmut-noerenberg.com/api/health
```
Alert if status code != 200 for more than 2 consecutive checks.
@@ -257,7 +257,7 @@ Alert if status code != 200 for more than 2 consecutive checks.
TypeScript error in the web app. Run locally:
```bash
pnpm --filter @planarchy/web exec tsc --noEmit
pnpm --filter @capakraken/web exec tsc --noEmit
```
### CI job fails: "test:unit"
@@ -271,7 +271,7 @@ pnpm test:unit
Build error (often `ssr: false` in Server Components, missing exports). Run locally:
```bash
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
```
### CI job fails: "e2e"
@@ -296,9 +296,9 @@ pnpm dev & # or pnpm start for production mode
Usually a stale Prisma client after schema changes:
```bash
pnpm --filter @planarchy/db exec prisma generate
pnpm --filter @capakraken/db exec prisma generate
rm -rf apps/web/.next
pnpm --filter @planarchy/web exec next build
pnpm --filter @capakraken/web exec next build
# Restart the server
```
@@ -306,7 +306,7 @@ pnpm --filter @planarchy/web exec next build
Check the `/api/ready` endpoint:
```bash
curl -s https://planarchy.hartmut-noerenberg.com/api/ready | jq .
curl -s https://capakraken.hartmut-noerenberg.com/api/ready | jq .
```
If `postgres: "error"`, verify:
+5 -5
View File
@@ -24,9 +24,9 @@ pnpm db:readiness:demand-assignment --write-artifacts
Supporting commands:
```bash
pnpm --filter @planarchy/db db:audit:demand-assignment --json --fail-on-blockers
pnpm --filter @planarchy/db db:backfill:demand-assignment --json --fail-on-blockers
pnpm --filter @planarchy/db db:backfill:demand-assignment --apply
pnpm --filter @capakraken/db db:audit:demand-assignment --json --fail-on-blockers
pnpm --filter @capakraken/db db:backfill:demand-assignment --json --fail-on-blockers
pnpm --filter @capakraken/db db:backfill:demand-assignment --apply
```
`pnpm db:readiness:demand-assignment` fails with a non-zero exit code when the workspace is not ready for `--apply`. Use `--allow-blockers` only when collecting review artifacts before remediation.
@@ -86,7 +86,7 @@ No production backfill should run from an ad hoc shell session without the saved
### Stage 3: Apply Backfill
- run `pnpm --filter @planarchy/db db:backfill:demand-assignment --apply`
- run `pnpm --filter @capakraken/db db:backfill:demand-assignment --apply`
- immediately rerun `pnpm db:readiness:demand-assignment --write-artifacts`
- require the post-apply readiness report to remain `go`
@@ -129,7 +129,7 @@ The latest workspace readiness run on `2026-03-13T20:10:43.050Z` reported:
- dry-run creates: `0` demand, `0` assignment
- `goNoGo: "go"`
The first real `pnpm --filter @planarchy/db db:backfill:demand-assignment --apply --json` was executed on `2026-03-13` and completed as a no-op:
The first real `pnpm --filter @capakraken/db db:backfill:demand-assignment --apply --json` was executed on `2026-03-13` and completed as a no-op:
- `demandCreates: 0`
- `assignmentCreates: 0`
+3 -3
View File
@@ -546,11 +546,11 @@ Required checks:
For the clean-slate import workflow, use dedicated DB scripts instead of ad-hoc SQL:
- reset and bootstrap a disposable environment:
- `pnpm --filter @planarchy/db db:reset:dispo -- --force`
- `pnpm --filter @capakraken/db db:reset:dispo -- --force`
- reset without `pg_dump` backup only in an intentionally disposable environment:
- `pnpm --filter @planarchy/db db:reset:dispo -- --force --skip-backup`
- `pnpm --filter @capakraken/db db:reset:dispo -- --force --skip-backup`
- seed Dispo v2 reference vocabulary after reset:
- `pnpm --filter @planarchy/db db:seed:dispo-v2`
- `pnpm --filter @capakraken/db db:seed:dispo-v2`
The reset command:
+8 -8
View File
@@ -35,7 +35,7 @@
**Acceptance criteria:**
- [x] `formatMoney` exported from `~/lib/format.ts`
- [x] All 7 local copies removed, replaced by import from `~/lib/format.ts`
- [x] `pnpm --filter @planarchy/web exec tsc --noEmit` passes
- [x] `pnpm --filter @capakraken/web exec tsc --noEmit` passes
- [x] Visual output unchanged (same `de-DE` locale, same `maximumFractionDigits: 0`)
---
@@ -64,8 +64,8 @@ export async function findUniqueOrThrow<T>(
**Acceptance criteria:**
- [x] Helper exported from `packages/api/src/db/helpers.ts`
- [x] At least 15 router files migrated to use the helper (19 files migrated)
- [x] `pnpm --filter @planarchy/api exec vitest run` passes (191 tests)
- [x] `pnpm --filter @planarchy/api exec tsc --noEmit` passes
- [x] `pnpm --filter @capakraken/api exec vitest run` passes (191 tests)
- [x] `pnpm --filter @capakraken/api exec tsc --noEmit` passes
---
@@ -428,11 +428,11 @@ export async function paginate<T extends { id: string }>(
## Verification Checklist (Per Phase)
- [ ] `pnpm --filter @planarchy/engine exec vitest run` — 254+ tests pass
- [ ] `pnpm --filter @planarchy/api exec vitest run` — 187+ tests pass
- [ ] `pnpm --filter @planarchy/application exec vitest run` — 67+ tests pass
- [ ] `pnpm --filter @planarchy/web exec tsc --noEmit` — zero errors
- [ ] `pnpm --filter @planarchy/api exec tsc --noEmit` — zero errors (excluding pre-existing dispo-import issues if Phase 5.2 not yet done)
- [ ] `pnpm --filter @capakraken/engine exec vitest run` — 254+ tests pass
- [ ] `pnpm --filter @capakraken/api exec vitest run` — 187+ tests pass
- [ ] `pnpm --filter @capakraken/application exec vitest run` — 67+ tests pass
- [ ] `pnpm --filter @capakraken/web exec tsc --noEmit` — zero errors
- [ ] `pnpm --filter @capakraken/api exec tsc --noEmit` — zero errors (excluding pre-existing dispo-import issues if Phase 5.2 not yet done)
- [ ] Dev server starts and serves pages without 500 errors
- [ ] Manual smoke test: timeline renders, estimate workspace tabs work, allocation CRUD works
+1 -1
View File
@@ -193,7 +193,7 @@ The caller is limited to their linked resource, which is good, but the endpoint
**Evidence**
- `packages/db/src/reset-dispo-import.ts:24-31` defaults to `admin@planarchy.dev` / `admin123`
- `packages/db/src/reset-dispo-import.ts:24-31` defaults to `admin@capakraken.dev` / `admin123`
- `packages/db/src/reset-dispo-import.ts:107-115` uses `prisma.$executeRawUnsafe(...)`
**Impact**