feat: add complete development team configuration

Add specialized agent configurations for mockupAWS development:
- @spec-architect: Software architect and specification lead
- @db-engineer: PostgreSQL schema and Alembic migrations
- @backend-dev: FastAPI development and services
- @frontend-dev: React dashboard and UI components
- @devops-engineer: Docker and CI/CD setup
- @qa-engineer: Testing strategy and E2E tests

Update prompt-zero.md with complete team and project structure.
Add prompt-team-standup.md for team kickoff and coordination.

Each agent has detailed configuration with:
- Role and responsibilities
- Technical stack
- Scope and constraints
- Output requirements
- Communication style
This commit is contained in:
Luca Sacchi Ricciardi
2026-04-07 12:58:53 +02:00
parent 59e5cf48f0
commit ab4c537c16
8 changed files with 979 additions and 123 deletions

View File

@@ -0,0 +1,421 @@
# Prompt: Team Standup - mockupAWS Development Kickoff
## 🎯 Obiettivo
Ingaggiare il team di sviluppo per verificare lo stato attuale e procedere con l'implementazione della Fase 1 (Database + Backend API) del progetto mockupAWS.
---
## 📊 Stato Progetto
**Progetto:** mockupAWS - Backend Profiler & Cost Estimator
**Versione Target:** v0.2.0
**Data:** 2026-04-07
**Stato:** 🔴 Pianificazione / Architettura iniziale
### Cosa è stato completato ✅
1. **Documentazione:**
- ✅ PRD completo (v0.2.0) in `export/prd.md`
- ✅ README aggiornato con architettura e istruzioni
- ✅ Team configurato in `.opencode/agents/`
2. **Codice Base Iniziale:**
- ✅ FastAPI base con endpoint `/ingest`, `/metrics`, `/reset`, `/flush`
- ✅ Calcolo metriche: SQS blocks, token count (tiktoken), PII detection
- ✅ Test suite pytest con 5 test passanti
- ✅ Struttura progetto e configurazione uv/pyproject.toml
3. **Configurazione:**
- ✅ Configurazione OpenCode (`.opencode/`)
- ✅ Git repository con commit iniziale
### Cosa deve essere fatto 🔴
#### Priorità Alta (Fase 1 - v0.2.0)
- [ ] **Database PostgreSQL:**
- Schema completo (scenarios, scenario_logs, scenario_metrics, aws_pricing, reports)
- Alembic migrations setup
- Migrazioni per tutte le tabelle
- Seed dati prezzi AWS
- [ ] **Backend API:**
- Integrazione SQLAlchemy 2.0 async
- Model SQLAlchemy per tutte le tabelle
- API CRUD scenari (/api/v1/scenarios/*)
- Gestione stati scenario (draft→running→completed→archived)
- Calcolo costi usando prezzi da database
- Persistenza log e metriche
- [ ] **Testing:**
- Integration tests per API scenari
- Test coverage > 80%
#### Priorità Media (Fase 2 - v0.3.0)
- [ ] Frontend React con dashboard
- [ ] Docker Compose setup
---
## 👥 Team Assegnato
| Agente | Ruolo | Priorità Task |
|--------|-------|---------------|
| `@spec-architect` | Software Architect | Completare architecture.md, kanban.md, coordinamento |
| `@db-engineer` | Database Engineer | Schema DB, Alembic migrations, seed dati |
| `@backend-dev` | Backend Developer | API CRUD, integrazione DB, services |
| `@frontend-dev` | Frontend Developer | In attesa Fase 2 (preparare mock data) |
| `@devops-engineer` | DevOps Engineer | In attesa (preparare Docker base) |
| `@qa-engineer` | QA Engineer | Review requisiti, preparare test plan |
---
## 🎬 Azioni Immediate
### Per @spec-architect
**Task:** Completare specifiche tecniche
1. **Leggere attentamente:**
- `/home/google/Sources/LucaSacchiNet/mockupAWS/export/prd.md` (tutto)
- `/home/google/Sources/LucaSacchiNet/mockupAWS/src/main.py` (codice esistente)
- `/home/google/Sources/LucaSacchiNet/mockupAWS/src/profiler.py`
2. **Aggiornare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/architecture.md`:
```markdown
# Da aggiungere:
- Sezione Database: schema dettagliato con tipi SQL
- Sezione API: endpoint completi con request/response
- Sezione Sicurezza: JWT, API keys, rate limiting
- Sezione Deployment: Docker strategy
```
3. **Creare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/kanban.md`:
```markdown
# Struttura richiesta:
## 🔴 TODO (Fase 1 - Database & Backend)
### DB-001: Setup Alembic
- [ ] Configurazione async
- [ ] Test connessione
### DB-002: Migrazione Scenarios
- [ ] Tabella scenarios
- [ ] Indici
### API-001: CRUD Scenari
- [ ] POST /api/v1/scenarios
- [ ] GET /api/v1/scenarios
- ...
```
4. **Aggiornare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/progress.md`:
- Stato attuale: "🔴 Fase 1 - Database setup"
- Percentuale: 10%
- Task in corso: Architettura
### Per @db-engineer
**Task:** Progettare e implementare database
1. **Progettare schema completo**:
```sql
-- scenarios
id: UUID PK
name: VARCHAR(255)
description: TEXT
tags: JSONB
status: ENUM('draft', 'running', 'completed', 'archived')
region: VARCHAR(50)
created_at: TIMESTAMP
updated_at: TIMESTAMP
total_cost_estimate: DECIMAL(10,4)
-- scenario_logs
id: UUID PK
scenario_id: UUID FK
received_at: TIMESTAMP
message_hash: VARCHAR(64) -- SHA256
message_preview: VARCHAR(500)
source: VARCHAR(100)
size_bytes: INTEGER
has_pii: BOOLEAN
token_count: INTEGER
sqs_blocks: INTEGER
-- scenario_metrics
id: UUID PK
scenario_id: UUID FK
timestamp: TIMESTAMP
metric_type: VARCHAR(50)
metric_name: VARCHAR(100)
value: DECIMAL(15,4)
unit: VARCHAR(20)
metadata: JSONB
-- aws_pricing
id: UUID PK
service: VARCHAR(50)
region: VARCHAR(50)
tier: VARCHAR(50)
price_per_unit: DECIMAL(10,8)
unit: VARCHAR(20)
effective_from: DATE
effective_to: DATE
is_active: BOOLEAN
-- reports
id: UUID PK
scenario_id: UUID FK
format: ENUM('pdf', 'csv')
file_path: VARCHAR(500)
generated_at: TIMESTAMP
metadata: JSONB
```
2. **Setup Alembic**:
```bash
cd /home/google/Sources/LucaSacchiNet/mockupAWS
uv add alembic asyncpg
uv run alembic init alembic
# Configurare per async
```
3. **Creare migrazioni**:
- `alembic/versions/001_create_scenarios_table.py`
- `alembic/versions/002_create_scenario_logs_table.py`
- `alembic/versions/003_create_scenario_metrics_table.py`
- `alembic/versions/004_create_aws_pricing_table.py`
- `alembic/versions/005_create_reports_table.py`
- `alembic/versions/006_seed_aws_pricing_data.py`
4. **Documentare** in `docs/database_schema.md`:
- Schema ER
- Indici
- Query principali
### Per @backend-dev
**Task:** Preparare integrazione database
1. **Analizzare** codice esistente:
- Come funziona `/ingest` attualmente (in-memory)
- Come adattarlo per usare database
2. **Preparare** struttura nuova:
```
backend/src/
├── models/
│ ├── __init__.py
│ ├── scenario.py # SQLAlchemy model
│ ├── scenario_log.py
│ ├── scenario_metric.py
│ └── aws_pricing.py
├── schemas/
│ ├── __init__.py
│ ├── scenario.py # Pydantic schemas
│ └── ...
├── api/
│ ├── __init__.py
│ ├── v1/
│ │ ├── __init__.py
│ │ ├── scenarios.py # CRUD endpoints
│ │ ├── ingest.py # Updated /ingest
│ │ └── pricing.py
│ └── deps.py # Dependencies (DB session)
├── services/
│ ├── __init__.py
│ ├── scenario_service.py
│ ├── cost_calculator.py
│ └── ingest_processor.py
└── core/
├── config.py # Settings (DB URL, etc.)
└── database.py # DB connection/session
```
3. **Aspettare** completamento schema DB prima di iniziare implementazione
### Per @qa-engineer
**Task:** Preparare test strategy
1. **Creare** `docs/test_plan.md`:
```markdown
# Test Plan mockupAWS v0.2.0
## Unit Tests
- [ ] ScenarioService.create()
- [ ] ScenarioService.update_status()
- [ ] CostCalculator.calculate_sqs_cost()
- [ ] CostCalculator.calculate_lambda_cost()
- [ ] IngestProcessor.process_log()
## Integration Tests
- [ ] POST /api/v1/scenarios - Crea scenario
- [ ] GET /api/v1/scenarios - Lista scenari
- [ ] POST /ingest with X-Scenario-ID - Ingest log
- [ ] GET /api/v1/scenarios/{id}/metrics - Get metrics
- [ ] State transitions: draft→running→completed
## E2E Tests (preparazione)
- [ ] Flow completo: Crea → Ingest 10 log → Verifica metriche
- [ ] Confronto costi: scenario A vs scenario B
```
2. **Review** requisiti PRD per completezza test coverage
### Per @frontend-dev (preparazione)
**Task:** Preparare ambiente e mock data
1. **Setup** struttura frontend:
```bash
mkdir -p /home/google/Sources/LucaSacchiNet/mockupAWS/frontend
cd /home/google/Sources/LucaSacchiNet/mockupAWS/frontend
npm create vite@latest . -- --template react-ts
npm install
npm install tailwindcss postcss autoprefixer
npx tailwindcss init -p
npm install @tanstack/react-query axios recharts lucide-react
npm install -D @types/node
```
2. **Preparare** mock data per sviluppo UI:
```typescript
// mock/scenarios.ts
export const mockScenarios = [
{
id: "uuid-1",
name: "Produzione Q2",
status: "running",
total_cost_estimate: 125.50,
total_requests: 15000,
created_at: "2026-04-01T10:00:00Z"
},
// ...
];
```
3. **Attendere** completamento API backend
### Per @devops-engineer (preparazione)
**Task:** Preparare Docker base
1. **Creare** `docker-compose.yml` base:
```yaml
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: mockupaws
POSTGRES_USER: app
POSTGRES_PASSWORD: changeme
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
# backend e frontend da aggiungere dopo
volumes:
postgres_data:
```
2. **Preparare** `backend/Dockerfile`:
```dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY pyproject.toml .
RUN pip install uv && uv pip install -r pyproject.toml
COPY . .
CMD ["uv", "run", "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000"]
```
---
## 📋 Checklist Team
### @spec-architect
- [ ] Leggere PRD completo
- [ ] Aggiornare architecture.md con dettagli DB e API
- [ ] Creare kanban.md con task Fase 1
- [ ] Aggiornare progress.md
### @db-engineer
- [ ] Progettare schema completo
- [ ] Setup Alembic
- [ ] Creare migrazioni
- [ ] Documentare schema
### @backend-dev
- [ ] Analizzare codice esistente
- [ ] Preparare struttura nuova
- [ ] In attesa schema DB
### @qa-engineer
- [ ] Creare test_plan.md
- [ ] Review requisiti
### @frontend-dev
- [ ] Setup ambiente React
- [ ] Preparare mock data
### @devops-engineer
- [ ] Creare docker-compose.yml base
- [ ] Preparare Dockerfile backend
---
## 🎯 Success Criteria
La Fase 1 è completata quando:
- [ ] Database PostgreSQL funzionante con tutte le tabelle
- [ ] Migrazioni Alembic funzionanti (upgrade/downgrade)
- [ ] API CRUD scenari complete e testate
- [ ] Endpoint `/ingest` aggiornato per persistere log
- [ ] Calcolo costi usando prezzi da database
- [ ] Test coverage > 80%
- [ ] Documentazione tecnica aggiornata
---
## ⏰ Timeline Suggerita
| Settimana | Focus | Deliverable |
|-----------|-------|-------------|
| Week 1 | Architettura + DB | Schema DB, migrazioni, architettura approvata |
| Week 2 | Backend API | CRUD scenari, persistenza, calcolo costi |
| Week 3 | Testing + Refinement | Test >80%, bug fixing, ottimizzazioni |
| Week 4 | Frontend base | Dashboard lista scenari, form creazione |
---
## 📞 Comunicazione
- **Daily standup:** Aggiornare `export/progress.md`
- **Domande tecniche:** Documentare in `docs/architecture.md`
- **Blocchi:** Aggiungere a `export/kanban.md` colonna BLOCKED
- **Decisioni:** Sempre in Conventional Commits
---
**Prompt creato:** 2026-04-07
**Team Lead:** @spec-architect
**Stato:** Pronto per esecuzione
---
## 🚀 Prossima Azione Concreta
**Tutti gli agenti coinvolti:** Leggete questo prompt e la vostra configurazione in `.opencode/agents/`, poi procedete con i task assegnati.
**Priorità immediata:**
1. @spec-architect completa architecture.md
2. @db-engineer inizia schema DB
3. @backend-dev prepara struttura
Iniziate ora! 💪