Expert agent for developing the Chain Workspace application - a document processing platform with AI agents. Follows TDD, event-sourcing patterns, and Memory Bank workflow for React/Node.js/PostgreSQL stack.
An expert development agent for the Chain Workspace application - a lightweight, modular workspace platform for creating and managing document processing chains with AI agents.
This agent specializes in developing the Chain Workspace application using:
The agent follows these core patterns:
1. **Event-Sourced State**: Immutable event log with undo/redo capabilities
2. **Schema-Driven Development**: Zod schemas as single source of truth for data contracts
3. **Test-Driven Development (TDD)**: Write failing tests first, then implement
4. **Memory Bank**: Maintains long-term knowledge base in `.memri/` directory
5. **Sub-Agent Workflow**: Specialized agents for different development phases
6. **Task-Based Commits**: Every step committed with task references
Start by ensuring the development environment is ready:
```bash
docker-compose -f docker-compose.dev.yml up -d
npm install
npm run db:migrate
npm run db:seed
```
**Verify**: Check that PostgreSQL is running on port 5432 and Adminer is accessible at http://localhost:8080
Follow this sequence for feature development:
**Phase 1: test-runner**
**Phase 2: schema-keeper**
**Phase 3: ui-developer**
**Phase 4: backend-developer**
**Phase 5: commit-bot**
**Always run tests before committing:**
```bash
npm run test:unit
npm run test:integration
npm run test:e2e
npm run test:coverage
```
**Test file patterns:**
**Creating migrations:**
```bash
npm run db:migrate:create
npm run db:migrate:deploy
npm run db:reset
```
**Prisma workflow:**
1. Edit schema in `prisma/schema.prisma`
2. Generate migration: `npm run db:migrate:create`
3. Apply migration: `npm run db:migrate:deploy`
4. Regenerate Prisma client: `npx prisma generate`
**Every completed step MUST be committed immediately with proper task references.**
**Commit message format:**
```bash
git commit -m "feat(task-X): implement [description]"
git commit -m "fix(task-X): resolve [description]"
git commit -m "test(task-X): add [test type] for [feature]"
git commit -m "refactor(task-X): optimize [description]"
```
**Task completion commit (via commit-bot):**
```bash
feat(task-X): complete [task title]
Closes task-X
```
**When to commit:**
**Update these files in `.memri/` directory:**
**When to update:**
**Key directories:**
```
COD_V01/
├── .claude/agents/ # Sub-agent definitions
├── .memri/ # Memory Bank knowledge files
├── src/ # React frontend
│ ├── components/ # Reusable UI components
│ ├── pages/ # Route components
│ └── lib/ # Utilities and hooks
├── api/ # Node.js backend
│ ├── routes/ # Fastify route handlers
│ ├── services/ # Business logic
│ └── db/ # Database utilities
├── schemas/ # Shared Zod schemas
├── tests/ # Test suites
├── migrations/ # Database migrations
└── docker/ # Container configurations
```
1. **Always write tests first** (TDD methodology)
2. **Never skip commits** - commit after every completed step
3. **Use Zod schemas** for all data validation (frontend and backend)
4. **Follow event-sourcing patterns** for state management
5. **Update Memory Bank** when making significant changes
6. **Run full test suite** before pushing to repository
7. **Use Docker Compose** for local development (no direct PostgreSQL installations)
8. **Reference task numbers** in all commits for traceability
**Required environment variables:**
```bash
DATABASE_URL=postgresql://user:password@localhost:5432/chainworkspace
OPENAI_API_KEY=your_openai_key_here
JWT_SECRET=your_jwt_secret_here
NODE_ENV=development
```
**Service ports:**
```bash
npm run lint
npm run lint:fix
npm run typecheck
npm run format
```
1. **Read Task Master instructions** (if available in `.taskmaster/CLAUDE.md`)
2. **Start development environment**: `docker-compose -f docker-compose.dev.yml up -d`
3. **Install dependencies**: `npm install`
4. **Run migrations**: `npm run db:migrate`
5. **Start servers**: `npm run dev` (runs both frontend and backend)
6. **Follow sub-agent workflow**: test-runner → schema-keeper → ui-developer → backend-developer → commit-bot
7. **Commit every step**: Use task-based commit format
8. **Update Memory Bank**: Maintain project knowledge in `.memri/`
```bash
docker-compose -f docker-compose.dev.yml up -d
git checkout -b feat/task-42-user-authentication
npm run test:unit -- --watch
npm run dev:ui
npm run dev:api
npm test
git add .
git commit -m "feat(task-42): implement user authentication
Closes task-42"
git push origin feat/task-42-user-authentication
```
This agent ensures consistent, test-driven development following the Chain Workspace project's architectural patterns and Memory Bank methodology.
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/chain-workspace-development-agent/raw