Instruction file imported from GOODBOY008/cloudatlas (
.github/instructions/task-execution.instructions.md). Copyright stays with the author.
Task Execution Protocol
Overview
CloudAtlas has 56 tasks across 7 phases in ../../docs/TASKS.md. Detailed implementation specs are in AGENTS.md.
| Phase | Label | Scope |
|---|---|---|
| A | db-* |
Database schema migrations |
| B | be-* |
Backend core services |
| C | be-cmdb-* |
CMDB full implementation |
| D | fe-* |
Frontend complete |
| E | docker-* / ci-* / env-* |
DevOps & infrastructure |
| F | be-tests-* / fe-tests-* |
Testing |
| G | Validation | Build, run, smoke test |
Task Execution Loop
- Read current state: check
AGENTS.mdsection "What Is Already Implemented" and "Remaining Task List" - Pick next task: find the first 📋 task (respecting dependencies)
- Implement it completely: code + migration + test — all steps in the task spec
- Verify: run the task's acceptance criteria command
- Update AGENTS.md: change
📋to✅for the completed task - Continue: automatically proceed to the next task without stopping
Dependency Order
Phase A (DB) → Phase B (Backend) → Phase C (CMDB) → Phase D (Frontend)
↘ Phase E (DevOps) can run in parallel with C/D
Phase B + C + D → Phase F (Tests) → Phase G (Validation)
Always complete all Phase A tasks before starting Phase B.
Acceptance Criteria Commands
# After any migration
cargo sqlx migrate run --source backend/migrations
# Compile check (fast, no test execution)
cd backend && cargo check
# Full test run
cd backend && cargo test
# Docker smoke test
docker compose up --build -d
sleep 10
curl -f http://localhost:3000/api/v1/health
curl -f http://localhost:3000/api/v1/health/ready
# Frontend build check
cd frontend && npm run build
Per-Task Checklist
Before marking a task ✅, verify:
- All files mentioned in the task spec are created/modified
- The task's acceptance criteria command passes
-
cargo checkpasses with no warnings - No
unwrap()in new production paths - New DB tables follow the migration conventions (deleted_at, created_at, UUID PK)
- New handlers have
#[utoipa::path(...)]annotations - New handlers call
require_permission(...)for mutating operations
Validation Phase (Phase G)
After all phases A–F:
docker compose build— all images build successfullydocker compose up -d— all containers start- Wait for health checks:
until curl -sf http://localhost:3000/api/v1/health/ready; do sleep 2; done - Run smoke tests:
# Register curl -X POST http://localhost:3000/api/v1/auth/register \ -H "Content-Type: application/json" \ -d '{"email":"test@example.com","password":"Test1234!","name":"Test User"}' # Login TOKEN=$(curl -sX POST http://localhost:3000/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"email":"test@example.com","password":"Test1234!"}' | jq -r '.access_token') # Create org ORG_ID=$(curl -s http://localhost:3000/api/v1/orgs \ -H "Authorization: Bearer $TOKEN" | jq -r '.data[0].id') # List expenses curl -s "http://localhost:3000/api/v1/orgs/$ORG_ID/expenses/summary" \ -H "Authorization: Bearer $TOKEN" # List CIs curl -s "http://localhost:3000/api/v1/orgs/$ORG_ID/cis" \ -H "Authorization: Bearer $TOKEN" - Check Swagger UI at
http://localhost:3000/swagger-ui - Produce final report: passed features, known limitations, next improvements
Auto-Fix Protocol
If docker compose up fails:
- Check container logs:
docker compose logs api - Fix the root cause (migration error, missing env var, port conflict)
- Rebuild:
docker compose up --build -d - Repeat until all containers are healthy
If cargo build fails:
- Read the full error
- Fix compilation errors (type mismatch, missing imports, lifetime issues)
- Never comment out failing code — fix it properly
- Re-run
cargo checkbefore moving on