Agent Collaboration Guide¶
Multi-agent collaboration guide for all development work in this project.
π΄ Critical Rules¶
These rules apply to ALL agents, for ALL work, at ALL times.
Rule 1: NEVER Do Another Agent's Work¶
Each agent has exclusive ownership of their module. You must NOT:
| β Forbidden | Explanation |
|---|---|
| Modify code in another agent's module | Even for "small fixes" or "obvious changes" |
| Create files in another agent's directory | Each agent manages their own files |
| Implement features that belong to another agent | Even if you think you can do it faster |
| Make assumptions about another agent's code | Always request, never assume |
Rule 2: ALWAYS Collaborate via Protocol¶
When you need something from another agent:
## π DEPENDENCY_NEEDED
**From**: [your agent name]
**To**: [target agent name]
**Issue**: #XX (if applicable)
### Need
[Describe what interface/artifact/spec you need]
### Reason
[Why you need it for your work]
### Expected Format
[How you expect to receive it - interface, file, spec]
When you complete work that others depend on:
## β
DEPENDENCY_READY
**From**: [your agent name]
**To**: [comma-separated list of dependent agents]
**Issue**: #XX
### Artifact
[What is now available]
### Location
[File path or import statement]
### Usage
[How to use the provided artifact]
Rule 3: Report Blockers Immediately¶
If you are blocked by another agent:
## β οΈ BLOCKING_ISSUE
**From**: [your agent name]
**Blocked By**: [blocking agent name]
**Issue**: #XX
### Blocker
[What is blocking you]
### Impact
[What you cannot do until this is resolved]
### Urgency
[HIGH/MEDIUM/LOW]
Team Structure¶
Development Agents (Module Ownership)¶
βββββββββββββββββββββββββββββββββββββββ
β π― ORCHESTRATOR β
β (Dependency analysis, assignment, β
β synchronization) β
ββββββββββββββββββββ¬βββββββββββββββββββ
β
ββββββββββββββββ¬ββββββββββββββββΌββββββββββββββββ¬βββββββββββββββ
β β β β β
βΌ βΌ βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β π§ CORE β β π» CLI β β π₯οΈ BACKEND β β π¨ FRONTEND β β π³ DEVOPS β
β β β β β β β β β β
β shared/ β β cli/,scripts/β β mcctl-api/ β β mcctl-consoleβ β Integration β
β β β β β β β β β β
β Domain & β β Commands & β β REST API β β Web UI β β Docker & β
β Interfaces β β Prompts β β Server β β Console β β E2E Tests β
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
Support Agents (Cross-cutting Concerns)¶
βββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
β π TECHNICAL WRITER β β π RELEASE MANAGER β
β β β β
β Invoked by: β β Invoked by: β
β - /write-docs command β β - User request (릴리μ¦, λ°°ν¬) β
β - Release Manager (before release) β β β
β β β Invokes: β
β Module: docs/ β β - Technical Writer (documentation) β
β Output: EN (.md) + KO (.ko.md) β β - Git tagging, Docker deploy β
βββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββ
Agent Definitions¶
π― Orchestrator Agent¶
Role: Overall project coordination and task distribution
| Attribute | Description |
|---|---|
| Responsibilities | Dependency analysis, parallel task identification, sync point management |
| Input | Milestone issue list, agent status reports |
| Output | Work assignments, sync requests, progress reports |
| Tools | GitHub API, Task Management |
orchestrator:
triggers:
- milestone_start
- agent_completion_report
- blocking_dependency_detected
- sync_point_reached
actions:
- analyze_dependencies
- assign_parallel_tasks
- coordinate_sync_points
- generate_progress_report
π§ Core Agent (shared/)¶
Role: Shared library and domain layer development
| Attribute | Description |
|---|---|
| Module | platform/services/shared/ |
| Label | agent:core |
| Documents | shared/prd.md, shared/plan.md |
| Expertise | Hexagonal Architecture, TypeScript, Domain Modeling |
Example Tasks: - Domain entity definitions (Server, World, etc.) - Port interfaces (IUserRepository, IModSourcePort, etc.) - Value objects (ServerName, ServerType, McVersion, etc.) - Infrastructure adapters (YamlUserRepository, etc.)
Provides (β to other agents): - Domain interfaces β CLI, Backend - Repository implementations β CLI - Adapter interfaces β Backend
Requires (β from other agents): - (Often no dependencies - starts first in dependency chains)
π» CLI Agent (cli/)¶
Role: CLI command implementation
| Attribute | Description |
|---|---|
| Module | platform/services/cli/, scripts/ |
| Label | agent:cli |
| Documents | cli/prd.md, cli/plan.md |
| Expertise | @clack/prompts, Commander.js, YAML, Shell scripting |
Example Tasks: - New CLI commands (mcctl create, mcctl console, etc.) - Interactive prompts and wizards - Bash management scripts - Configuration file handling
Provides (β to other agents): - CLI command interface β DevOps - Config file specifications β Backend, Frontend
Requires (β from other agents): - Domain interfaces β Core - Repository implementations β Core
π₯οΈ Backend Agent (mcctl-api/)¶
Role: REST API server development
| Attribute | Description |
|---|---|
| Module | platform/services/mcctl-api/ |
| Label | agent:backend |
| Documents | mcctl-api/prd.md, mcctl-api/plan.md |
| Expertise | Fastify, REST API, Authentication, OpenAPI |
Example Tasks: - API endpoint implementation - Authentication and authorization plugins - OpenAPI/Swagger documentation - Dockerfile and container builds
Provides (β to other agents): - REST API endpoint spec β Frontend - OpenAPI documentation β Frontend, DevOps - Docker image β DevOps
Requires (β from other agents): - Domain adapters β Core - Shared Use Cases β Core
π¨ Frontend Agent (mcctl-console/)¶
Role: Web Management Console development
| Attribute | Description |
|---|---|
| Module | platform/services/mcctl-console/ |
| Label | agent:frontend |
| Documents | mcctl-console/prd.md, mcctl-console/plan.md |
| Expertise | Next.js, React, Tailwind CSS, NextAuth.js |
Example Tasks: - Next.js pages and components - Authentication integration (NextAuth.js) - BFF proxy layer - Dashboard and management UI
Provides (β to other agents): - Docker image β DevOps - UI component specifications β (documentation)
Requires (β from other agents): - API endpoint spec β Backend - Auth plugin spec β Backend
π³ DevOps Agent (Integration)¶
Role: Docker integration and E2E testing
| Attribute | Description |
|---|---|
| Module | platform/ (docker-compose), e2e/ |
| Label | agent:devops |
| Documents | platform/README.md, e2e/README.md |
| Expertise | Docker Compose, Playwright, CI/CD |
Example Tasks: - Docker Compose integration - E2E tests with Playwright - Service orchestration - CI/CD pipeline configuration
Provides (β to other agents): - Integration test results β All - Deployment configurations β All
Requires (β from other agents): - API Dockerfile β Backend - Console Dockerfile β Frontend - CLI service command β CLI
Support Agents¶
Support agents handle cross-cutting concerns and are invoked by commands or other agents.
π Technical Writer Agent (docs/)¶
Role: Bilingual documentation maintenance
| Attribute | Description |
|---|---|
| Module | docs/ |
| Command | /write-docs |
| Documents | MkDocs i18n structure |
| Expertise | MkDocs, Read the Docs, EN/KO translation |
Invocation:
- /write-docs create <path> - Create new document
- /write-docs translate <path> - Translate document
- /write-docs review <path> - Review documentation
- Called by Release Manager before releases
Provides (β to other agents): - Updated documentation β All - Release notes β Release Manager
Rules:
- β Does NOT implement application features
- β Does NOT make architectural decisions
- β
Only modifies files in docs/ directory
- β
Creates both .md and .ko.md versions
π Release Manager Agent¶
Role: Version tagging and deployment
| Attribute | Description |
|---|---|
| Scope | Git tags, Docker images, GitHub releases |
| Trigger | User request (릴리μ¦, λ°°ν¬, release, deploy) |
| Expertise | Semantic Versioning, Git Flow, Docker, CI/CD |
Workflow: 1. Pre-release checks (branch, uncommitted changes) 2. Version determination (MAJOR/MINOR/PATCH) 3. Invoke Technical Writer for documentation update 4. Create Git tag 5. Monitor GitHub Actions 6. Verify Docker deployment
Provides (β to other agents): - Release tags β All - Deployment status β DevOps
Rules: - β Does NOT modify application code - β Does NOT skip documentation update - β Always invokes Technical Writer before tagging - β Follows Semantic Versioning
Communication Protocol¶
Message Types¶
Message types used for inter-agent communication:
interface AgentMessage {
id: string;
type: MessageType;
from: AgentId;
to: AgentId | 'orchestrator' | 'broadcast';
timestamp: string;
payload: MessagePayload;
}
type MessageType =
| 'WORK_REQUEST' // Work assignment
| 'WORK_COMPLETE' // Work completion
| 'DEPENDENCY_READY' // Dependency available
| 'DEPENDENCY_NEEDED' // Dependency required
| 'SYNC_REQUEST' // Synchronization request
| 'STATUS_UPDATE' // Status update
| 'BLOCKING_ISSUE' // Blocking issue occurred
| 'REVIEW_REQUEST' // Review request
| 'REVIEW_COMPLETE'; // Review completion
type AgentId =
| 'core' | 'cli' | 'backend' | 'frontend' | 'devops' // Development
| 'technical-writer' | 'release-manager'; // Support
Message Format Examples¶
Work Request (WORK_REQUEST):
type: WORK_REQUEST
from: orchestrator
to: core
payload:
issue: "#XX"
title: "feat(shared): Add repository interface"
priority: high
deadline: null
context:
milestone: N
phase: "X.Y"
dependencies: []
Dependency Ready (DEPENDENCY_READY):
type: DEPENDENCY_READY
from: core
to: broadcast # to multiple agents
payload:
issue: "#XX"
artifact: "IRepository interface"
location: "shared/src/application/ports/outbound/IRepository.ts"
exports:
- "Entity"
- "IRepository"
usage_example: |
import { IRepository, Entity } from '@minecraft-docker/shared';
Work Complete (WORK_COMPLETE):
type: WORK_COMPLETE
from: core
to: orchestrator
payload:
issue: "#XX"
status: completed
artifacts:
- path: "shared/src/application/ports/outbound/IRepository.ts"
type: "interface"
- path: "shared/src/index.ts"
type: "export"
tests_passed: true
ready_for_merge: true
unblocks: ["#YY", "#ZZ"]
Blocking Issue (BLOCKING_ISSUE):
type: BLOCKING_ISSUE
from: frontend
to: orchestrator
payload:
issue: "#XX"
blocked_by: "#YY"
reason: "Need auth plugin spec to implement BFF proxy"
suggested_action: "Request Backend agent to share auth spec early"
Execution Flow¶
Phase 1: Initialization¶
Orchestrator All Agents
β β
β 1. WORK_REQUEST (#A) β
ββββββββββββββββββββββββββββββββΆβ Core (foundation tasks)
β β
β 2. WORK_REQUEST (#B) β
ββββββββββββββββββββββββββββββββΆβ Backend (parallel - foundation)
β β
β 3. WORK_REQUEST (#C) β
ββββββββββββββββββββββββββββββββΆβ Frontend (parallel - foundation)
β β
Phase 2: Dependency Resolution¶
Core Orchestrator CLI / Backend
β β β
β WORK_COMPLETE (#A) β β
ββββββββββββββββββββββββΆβ β
β β β
β β DEPENDENCY_READY β
β ββββββββββββββββββββββββββΆβ
β β β
β β WORK_REQUEST (next) β
β ββββββββββββββββββββββββββΆβ
β β β
Phase 3: Parallel Execution¶
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PARALLEL EXECUTION WINDOW β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Core Agent CLI Agent Backend Agent β
β βββββββββββ ββββββββββ ββββββββββββββ β
β Repository CLI commands Auth Plugin β
β implementations β API routes β
β β β β β
β βΌ βΌ βΌ β
β Additional More commands More routes β
β adapters β β β
β β β β
β βΌ βΌ β
β Service cmd OpenAPI docs β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Phase 4: Sync Point - API Spec Ready¶
Backend Orchestrator Frontend
β β β
β WORK_COMPLETE β β
β (API Spec Ready) β β
βββββββββββββββββββββββββΆβ β
β β β
β β SYNC: API_SPEC_READY β
β βββββββββββββββββββββββββΆβ
β β β
β β WORK_REQUEST (BFF) β
β βββββββββββββββββββββββββΆβ
β β β
Phase 5: Docker & Integration¶
Backend / Frontend Orchestrator DevOps
β β β
β WORK_COMPLETE β β
β (Dockerfiles) β β
ββββββββββββββββββββββββββΆβ β
β β β
β β DEPENDENCY_READY β
β β (Both Dockerfiles) β
β ββββββββββββββββββββββββΆβ
β β β
β β WORK_REQUEST β
β β (Integration) β
β ββββββββββββββββββββββββΆβ
β β β
Parallel Execution Matrix¶
Identifying Parallelizable Tasks¶
| Criteria | Parallelizable | Sequential |
|---|---|---|
| No shared dependencies | β Yes | - |
| Different modules | β Yes | - |
| Same module, different features | β οΈ Depends | - |
| Explicit dependency exists | - | β Required |
| Output of one is input of another | - | β Required |
Example Parallel Groups¶
| Group | Agents | Can Run In Parallel | Prerequisites |
|---|---|---|---|
| Foundation | Core, Backend, Frontend | Yes | None |
| Feature Development | Core, CLI, Backend, Frontend | Yes | Foundation complete |
| Dockerization | Backend, Frontend, CLI | Yes | Features complete |
| Integration | DevOps | No (sequential) | Dockerfiles ready |
Conceptual Dependency Flow¶
Legend: βββ direct dependency
Β·Β·Β· optional/weak dependency
Foundation: Core ββββββ¬βββ Adapters ββββ¬βββ CLI Commands ββββ
β β β
ββββ Optional β ββββ Service Cmd
β (extensions) β β
β βΒ·Β·Β· Backend βββ Auth ββββ Routes ββββ
β β β β
ββββ Interfaces βββββββββββ ββββ More Routesββββ Swagger βββ Dockerfile
β β
Frontend: Foundation βββ Auth ββββββββββββββββββββββββββββββΌβββ BFF βββ Pages βββ More Pages βββ Dockerfile
β
βΌ
Integration: Backend + Frontend Dockerfiles βββ Compose βββ E2E Tests
Sync Points¶
Defining Sync Points¶
A sync point is required when: 1. One agent's output is needed by another agent 2. Multiple agents must coordinate before proceeding 3. Integration testing requires all components ready
Example Sync Points¶
| Sync ID | Condition | From | To | Purpose |
|---|---|---|---|---|
| SYNC-INTERFACE | Interface complete | Core β All | Share domain interfaces | |
| SYNC-AUTH | Auth spec complete | Backend β Frontend | Share auth configuration | |
| SYNC-API | API docs complete | Backend β Frontend | Share OpenAPI spec | |
| SYNC-DOCKER | Dockerfiles complete | Backend, Frontend β DevOps | Docker images ready | |
| SYNC-INTEGRATION | Integration ready | DevOps β All | Test environment ready |
Information Shared at Sync Points¶
SYNC-INTERFACE: Interface Ready
sync: SYNC-INTERFACE
artifacts:
- file: "shared/src/application/ports/outbound/IRepository.ts"
exports: ["Entity", "IRepository"]
usage:
cli: "Used for repository implementation"
backend: "Used for API integration"
SYNC-AUTH: Auth Spec Ready
sync: SYNC-AUTH
artifacts:
- file: "mcctl-api/src/plugins/auth.ts"
exports: ["AuthPluginOptions"]
- spec: |
Access Modes: internal | api-key | ip-whitelist | api-key-ip | open
Header: X-API-Key
Response: 401 Unauthorized, 403 Forbidden
usage:
frontend: "Set X-API-Key header in BFF proxy"
SYNC-API: API Spec Ready
sync: SYNC-API
artifacts:
- file: "mcctl-api/docs/openapi.json"
- url: "http://localhost:5001/docs"
endpoints:
servers: "GET/POST /api/servers, GET/POST/DELETE /api/servers/:name"
worlds: "GET/POST /api/worlds, GET/DELETE /api/worlds/:name"
players: "GET /api/servers/:name/players, whitelist, bans, ops"
usage:
frontend: "Generate React Query hooks, map BFF routes"
Work Request/Response Protocol¶
Work Request Format¶
When an agent requests work from another agent:
## π WORK_REQUEST
**From**: {requesting_agent}
**To**: {target_agent}
**Issue**: #{issue_number}
**Priority**: {high|medium|low}
### Context
{Background explanation of why this work is needed}
### Requirements
- [ ] {Specific requirement 1}
- [ ] {Specific requirement 2}
### Expected Output
{Expected deliverable format}
### Deadline
{Deadline if any, otherwise "as soon as dependencies met"}
Work Completion Report Format¶
When an agent reports work completion:
## β
WORK_COMPLETE
**From**: {completing_agent}
**To**: orchestrator
**Issue**: #{issue_number}
### Completed Tasks
- [x] {Completed task 1}
- [x] {Completed task 2}
### Artifacts
| File | Type | Description |
|------|------|-------------|
| {path} | {type} | {description} |
### Exports (if applicable)
```typescript
// Usage example
import { ... } from '@minecraft-docker/{package}';
Tests¶
- Unit Tests: β Passed ({n} tests)
- Integration Tests: β Passed ({n} tests)
Unblocks¶
The following issues can now start: - #{issue1} - {title} - #{issue2} - {title}
Notes¶
{Special notes or things subsequent workers should know}
---
## Progress Tracking
### Milestone Progress File
Each agent updates their progress in plan.md:
```markdown
<!-- platform/services/{module}/plan.md -->
# Module Plan
## Progress
| Issue | Title | Status | Agent | Updated |
|-------|-------|--------|-------|---------|
| #XX | Feature A | β
Complete | {agent} | YYYY-MM-DD |
| #YY | Feature B | π In Progress | {agent} | YYYY-MM-DD |
| #ZZ | Feature C | β³ Pending | - | - |
| #WW | Feature D | π« Blocked by #XX | - | - |
## Dependencies Provided
- [x] Interface A β Other agents
- [ ] Interface B β Other agents
## Sync Points
- [x] SYNC-1: Interface shared
- [ ] SYNC-2: Pending
Dashboard View¶
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MILESTONE PROGRESS DASHBOARD β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Overall: ββββββββββββββββββββ 35% (X/Y issues) β
β β
β π§ Core (shared/) ββββββββββββββββββββ 50% (A/B) β
β β
β π» CLI (cli/) ββββββββββββββββββββ 25% (C/D) β
β β
β π₯οΈ Backend (mcctl-api/) ββββββββββββββββββββ 29% (E/F) β
β β
β π¨ Frontend (console/) ββββββββββββββββββββ 33% (G/H) β
β β
β π³ DevOps (integration) ββββββββββββββββββββ 0% (I/J) β
β β
β Legend: β
Complete π In Progress β³ Pending π« Blocked β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Error Handling¶
Handling Blockers¶
scenario: "Frontend blocked by Backend dependency"
resolution_steps:
1. Frontend sends BLOCKING_ISSUE to Orchestrator
2. Orchestrator checks Backend progress
3. Options:
a. If dependency near completion β Wait
b. If dependency delayed β Request early spec sharing
c. If dependency blocked β Escalate and replan
message_flow:
frontend β orchestrator: "BLOCKING_ISSUE: need dependency from backend"
orchestrator β backend: "SYNC_REQUEST: Share spec early"
backend β frontend: "DEPENDENCY_READY: Spec (partial)"
frontend: Proceeds with partial spec, marks for later update
Rollback Handling¶
scenario: "Integration test fails"
resolution_steps:
1. DevOps reports BLOCKING_ISSUE with test results
2. Orchestrator analyzes failure root cause
3. Assigns fix task to responsible agent
4. Re-runs integration after fix
message_flow:
devops β orchestrator: "BLOCKING_ISSUE: Integration failure in E2E"
orchestrator β {responsible_agent}: "REVIEW_REQUEST: Fix issue"
{responsible_agent} β orchestrator: "WORK_COMPLETE: Fix applied"
orchestrator β devops: "WORK_REQUEST: Re-run E2E tests"
Quick Reference¶
Agent Module Mapping¶
| Agent | Module | Label | Primary Focus |
|---|---|---|---|
| π§ Core | platform/services/shared/ |
agent:core |
Domain/Ports |
| π» CLI | platform/services/cli/, scripts/ |
agent:cli |
Commands |
| π₯οΈ Backend | platform/services/mcctl-api/ |
agent:backend |
API Routes |
| π¨ Frontend | platform/services/mcctl-console/ |
agent:frontend |
UI Pages |
| π³ DevOps | platform/, e2e/ |
agent:devops |
Docker/E2E |
| π Docs | docs/ |
agent:docs |
Documentation |
| π Release | Git tags, releases | agent:release |
Releases |
Typical Dependency Flow¶
Core (Foundation)
βββ CLI (Commands, uses Core interfaces)
βββ Backend (API, uses Core interfaces)
β βββ Frontend (UI, uses Backend API)
β βββ DevOps (Integration, uses all Dockerfiles)
βββ DevOps (Service scripts)
Command Reference¶
# Orchestrator commands
/work --milestone N # Start milestone orchestration
/work --issue XX # Work on specific issue
# Agent-specific
/work --agent core --issue XX # Assign to Core agent
/work --agent backend --parallel # Run backend tasks in parallel
# Status
/status --milestone N # Show progress
/status --agent core # Show agent status
/deps --issue XX # Show dependencies for issue
Agent Prompt Files¶
Each agent has its own prompt file in .claude/agents/:
| Agent | Prompt File |
|---|---|
| Orchestrator | .claude/agents/orchestrator-agent.md |
| Core | .claude/agents/core-agent.md |
| CLI | .claude/agents/cli-agent.md |
| Backend | .claude/agents/backend-agent.md |
| Frontend | .claude/agents/frontend-agent.md |
| DevOps | .claude/agents/devops-agent.md |
| Technical Writer | .claude/agents/technical-writer.md |
| Release Manager | .claude/agents/release-manager.md |
Use these prompts to spawn specialized agents for each domain.