1.7 KiB
Codewalk District
Multi-agent workspace for orchestrating multiple Claude Code agents.
Database
Schema is defined in src/db/schema.ts using drizzle-orm. Migrations are managed by drizzle-kit.
See docs/database-migrations.md for the full migration workflow, rules, and commands.
Key rule: never use raw SQL for schema initialization. Always use drizzle-kit generate and the migration system.
Logging
Structured logging via pino. See docs/logging.md for full details.
Key rule: use createModuleLogger() from src/logger/index.ts for backend logging. Keep console.log for CLI user-facing output only.
Build
After completing any change to server-side code (src/**), rebuild and re-link the cw binary:
npm run build && npm link
Testing
Unit Tests
npm test
E2E Tests (Real CLI)
Real provider integration tests call actual CLI tools and incur API costs. They are skipped by default.
# Claude tests (~$0.50, ~3 min)
REAL_CLAUDE_TESTS=1 npm test -- src/test/integration/real-providers/ --test-timeout=300000
# Codex tests only
REAL_CODEX_TESTS=1 npm test -- src/test/integration/real-providers/codex-manager.test.ts --test-timeout=300000
# Both providers
REAL_CLAUDE_TESTS=1 REAL_CODEX_TESTS=1 npm test -- src/test/integration/real-providers/ --test-timeout=300000
Test files in src/test/integration/real-providers/:
claude-manager.test.ts- Spawn, output parsing, session resumeschema-retry.test.ts- Schema validation, JSON extraction, retry logiccrash-recovery.test.ts- Server restart simulationcodex-manager.test.ts- Codex provider tests