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

@@ -1,141 +1,216 @@
# Prompt Zero: [NOME_PROGETTO] - Project Kickoff
# Prompt Zero: mockupAWS - Project Kickoff
## 🎯 Missione
Sviluppare **[NOME_PROGETTO]**, [descrizione breve del progetto - da personalizzare].
Sviluppare **mockupAWS**, un ambiente di simulazione locale per profilare traffico log e calcolare i driver di costo AWS (SQS, Lambda, Bedrock/LLM) prima del deploy in produzione.
**Repository:** `[ROOT_PROGETTO]`
**PRD:** `[ROOT_PROGETTO]/export/prd.md`
**Repository:** `/home/google/Sources/LucaSacchiNet/mockupAWS`
**PRD:** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/prd.md`
---
## 📊 Stato Attuale
-**PRD Completo**: Requisiti funzionali e non funzionali definiti
-**Team Configurato**: Agenti specializzati pronti
- **Nessun Codice**: Progetto da zero
-**Nessuna Specifica Tecnica**: Da creare
-**PRD Completo**: Requisiti funzionali e non funzionali definiti (v0.2.0)
-**Team Configurato**: 6 agenti specializzati pronti
- ⚠️ **Codice Base Parziale**: API base implementata (v0.1), manca database e persistenza
-**Database**: Schema da creare (PostgreSQL)
-**Frontend**: Dashboard React da implementare
-**Docker**: Configurazione da creare
### Cosa è già fatto:
- FastAPI base con endpoint `/ingest`, `/metrics`, `/reset`, `/flush`
- Calcolo metriche: SQS blocks, token count (tiktoken), PII detection
- Test suite pytest (5 test passanti)
- Documentazione: README, PRD, architettura
- Struttura progetto e configurazione uv
### Cosa manca (Priorità):
1. Database PostgreSQL con tabelle scenarios, logs, metrics, pricing
2. Alembic migrations
3. API CRUD scenari complete
4. Calcolo costi con prezzi AWS reali
5. Frontend React con dashboard
6. Docker Compose setup
---
## 👥 Team di Sviluppo
| Agente | Ruolo | File Config |
|--------|-------|-------------|
| `@spec-architect` | Definisce specifiche e architettura | `.opencode/agents/spec-architect.md` |
| `@tdd-developer` | Implementazione TDD | `.opencode/agents/tdd-developer.md` |
| `@git-manager` | Gestione commit Git | `.opencode/agents/git-manager.md` |
| Agente | Ruolo | Config | Responsabilità |
|--------|-------|--------|----------------|
| `@spec-architect` | Software Architect | `.opencode/agents/spec-architect.md` | Specifiche tecniche, architettura, coordinamento |
| `@db-engineer` | Database Engineer | `.opencode/agents/db-engineer.md` | Schema DB, Alembic migrations, queries |
| `@backend-dev` | Backend Developer | `.opencode/agents/backend-dev.md` | FastAPI endpoints, services, tests |
| `@frontend-dev` | Frontend Developer | `.opencode/agents/frontend-dev.md` | React dashboard, UI components |
| `@devops-engineer` | DevOps Engineer | `.opencode/agents/devops-engineer.md` | Docker, CI/CD, deployment |
| `@qa-engineer` | QA Engineer | `.opencode/agents/qa-engineer.md` | Testing strategy, E2E tests |
---
## 🔄 Workflow Obbligatorio
```
┌─────────────────────────────────────────────────────────────┐
│ FASE 1: SPECIFICA
│ @spec-architect
│ └── Legge PRD → Crea architecture.md, kanban.md
│ │
│ ↓ │
│ │
│ FASE 2: IMPLEMENTAZIONE
│ @tdd-developer
│ └── RED → GREEN → REFACTOR per ogni task
│ │
│ ↓ │
│ │
│ FASE 3: COMMIT
│ @git-manager
│ └── Commit atomico + Conventional Commits
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────
│ FASE 1: ARCHITETTURA & DATABASE
│ @spec-architect + @db-engineer
│ └── Finalizza architecture.md + Crea schema DB + Migrations
│ ↓
│ FASE 2: BACKEND API
│ @backend-dev + @db-engineer
│ └── Implementa API CRUD scenari + Persistenza metriche
│ ↓
│ FASE 3: FRONTEND
│ @frontend-dev
│ └── Dashboard React + Forms + Visualizzazione dati
│ │
│ ↓ │
│ │
│ FASE 4: DEVOPS & QA │
│ @devops-engineer + @qa-engineer │
│ └── Docker Compose + CI/CD + Testing E2E │
└─────────────────────────────────────────────────────────────────┘
```
---
## 🚀 Task Iniziale: Fase 1 - Specifica
## 🚀 Task Iniziale: Fase 1 - Architettura e Database
**AGENTE:** `@spec-architect`
**AGENTE:** `@spec-architect` + `@db-engineer`
**OBIETTIVO:** Analizzare il PRD e creare le specifiche tecniche dettagliate.
**OBIETTIVO:** Completare le specifiche tecniche e creare il database schema.
### Azioni Richieste
1. **Leggere** `[ROOT_PROGETTO]/export/prd.md`
#### 1. @spec-architect - Analisi e Specifiche
2. **Creare** la struttura di output:
```
[ROOT_PROGETTO]/export/
├── prd.md # Requisiti prodotti (estratto/dettaglio)
├── architecture.md # Architettura sistema
├── kanban.md # Task breakdown
└── progress.md # Tracciamento progresso
```
1. **Leggere** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/prd.md`
3. **Produrre** `architecture.md` con:
- Stack tecnologico dettagliato
- Struttura cartelle progetto
- Diagrammi flusso dati
- Schema database completo (DDL)
- Interfacce API (OpenAPI specs)
- Sicurezza (cifratura, autenticazione)
2. **Analizzare** il codice esistente in `/home/google/Sources/LucaSacchiNet/mockupAWS/src/`
4. **Produrre** `kanban.md` con:
- Task breakdown per Fase 1 (MVP)
- Stima complessità
3. **Aggiornare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/architecture.md` con:
- Stack tecnologico dettagliato (conferma FastAPI + PostgreSQL + React)
- Struttura cartelle progetto finale
- Diagrammi flusso dati (Mermaid o ASCII)
- API specifications complete (OpenAPI specs)
- Piano di sicurezza (JWT, API keys)
4. **Creare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/kanban.md` con:
- Task breakdown per Fase 1 (Database + Backend API)
- Task breakdown per Fase 2 (Frontend)
- Stima complessità (XS/S/M/L)
- Dipendenze tra task
- Regola "little often": task < 2 ore
5. **Inizializzare** `progress.md` con:
- Feature corrente: "Fase 1 - MVP"
5. **Inizializzare** `/home/google/Sources/LucaSacchiNet/mockupAWS/export/progress.md` con:
- Feature corrente: "Fase 1 - Database e Backend API"
- Stato: "🔴 Pianificazione"
- Percentuale: 0%
- Percentuale: 10%
### Criteri di Accettazione
#### 2. @db-engineer - Schema Database
- [ ] Architecture.md completo con tutte le sezioni
- [ ] Kanban.md con task pronti per @tdd-developer
- [ ] Progress.md inizializzato
- [ ] Tutti i path usano `[ROOT_PROGETTO]/`
1. **Progettare** schema PostgreSQL completo:
```sql
-- Tabelle richieste:
- scenarios (metadata scenario)
- scenario_logs (log ricevuti con hash)
- scenario_metrics (metriche aggregate)
- aws_pricing (prezzi AWS per regione)
- reports (report generati)
```
2. **Creare** Alembic setup:
- `alembic init alembic`
- Configurare `alembic.ini`
- Creare `migrations/env.py` con async support
3. **Creare** migrazioni iniziali:
- `001_create_scenarios_table.py`
- `002_create_scenario_logs_table.py`
- `003_create_scenario_metrics_table.py`
- `004_create_aws_pricing_table.py`
- `005_create_reports_table.py`
- `006_seed_aws_pricing_data.py`
4. **Documentare** in `docs/database_schema.md`:
- Schema ER completo
- Indici creati
- Constraints e foreign keys
### Criteri di Accettazione Fase 1
- [ ] `architecture.md` completo con tutte le sezioni
- [ ] `kanban.md` con task pronti per sviluppo
- [ ] `progress.md` inizializzato con stato attuale
- [ ] Schema database progettato e documentato
- [ ] Migrazioni Alembic create e testate
- [ ] Tabelle create correttamente in PostgreSQL
---
## 📋 Requisiti Chiave (Dal PRD)
### Funzionalità MVP (Fase 1)
### Priorità Alta (MVP v0.2.0)
[DA PERSONALIZZARE - Inserire le funzionalità principali del progetto]
1. **Database & Persistenza**
- PostgreSQL con tabelle scenarios, logs, metrics, pricing
- Alembic migrations
- Seed dati prezzi AWS reali
1. **[Feature 1]**
- [Dettaglio 1]
- [Dettaglio 2]
2. **API Scenari**
- CRUD completo: GET/POST/PUT/DELETE /api/v1/scenarios
- Gestione stati: draft → running → completed → archived
- Associazione log a scenario via X-Scenario-ID header
2. **[Feature 2]**
- [Dettaglio 1]
- [Dettaglio 2]
3. **Calcolo Costi**
- Formula SQS: blocks × price_per_million / 1000000
- Formula Lambda: invocations × price + gb_seconds × price
- Formula Bedrock: tokens × price_per_1k / 1000
- Prezzi per regione (us-east-1, eu-west-1)
### Stack Tecnologico (Esempio)
4. **Testing**
- Test coverage > 80%
- Unit tests per services
- Integration tests per API
- **Backend:** [Linguaggio/Framework]
- **Database:** [Tipo database]
- **Frontend:** [Tecnologia frontend]
- **Auth:** [Metodo autenticazione]
- **Task Background:** [Scheduler]
### Priorità Media (v0.3.0)
5. **Dashboard Web**
- React + TypeScript + Tailwind
- Lista scenari con filtri
- Form creazione scenario
- Vista dettaglio con metriche
6. **Report**
- Export CSV
- Visualizzazione grafici
### Priorità Bassa (v0.4.0)
7. **Report PDF**
8. **Confronto scenari**
9. **Autenticazione**
---
## 🛡️ Vincoli e Best Practices
### Sicurezza (Critico)
- [Requisito sicurezza 1]
- [Requisito sicurezza 2]
- SQL injection prevention
- XSS prevention
- SQL injection prevention (SQLAlchemy ORM)
- XSS prevention (React escaping)
- CSRF protection
- Rate limiting
- Rate limiting (slowapi)
- Hashing messaggi per privacy
- No PII in logs persistenti
### Qualità
- Test coverage ≥ 90%
- TDD obbligatorio
- Test coverage ≥ 80%
- TDD obbligatorio per backend
- Type hints obbligatori (Python + TypeScript)
- Conventional commits
- Commit atomici
@@ -143,38 +218,62 @@ Sviluppare **[NOME_PROGETTO]**, [descrizione breve del progetto - da personalizz
- Task "little often" (< 2 ore)
- Documentazione in `/export/`
- Bug complessi in `/docs/bug_ledger.md`
- PR con code review
---
## 📁 Struttura Progetto Attesa
## 📁 Struttura Progetto Finale
```
[ROOT_PROGETTO]/
├── prd.md # Product Requirements
/home/google/Sources/LucaSacchiNet/mockupAWS/
├── export/ # Output spec-driven
│ ├── prd.md # Product Requirements
│ ├── architecture.md # Architettura sistema
│ ├── kanban.md # Task breakdown
│ └── progress.md # Tracciamento progresso
├── docs/
│ ├── architecture.md # ADR (Architecture Decision Records)
│ ├── bug_ledger.md # Bug tracking
│ └── database_schema.md # Schema DB documentazione
├── prompt/
│ └── prompt-zero.md # Questo file
├── .opencode/
── agents/ # Configurazioni agenti
└── skills/ # Skill condivise
├── export/ # Output spec-driven (da creare)
├── prd.md
├── architecture.md
├── kanban.md
└── progress.md
├── docs/ # Documentazione (da creare)
│ ├── bug_ledger.md
└── architecture.md
├── src/ # Codice sorgente (da creare)
└── [nome_package]/
├── __init__.py
├── main.py
├── config.py
── ...
├── tests/ # Test suite (da creare)
│ ├── unit/
├── integration/
└── conftest.py
├── requirements.txt / package.json
── agents/ # Configurazioni agenti
├── spec-architect.md
│ ├── backend-dev.md
├── db-engineer.md
├── frontend-dev.md
├── devops-engineer.md
└── qa-engineer.md
├── backend/ # FastAPI application
│ ├── src/
│ ├── __init__.py
├── main.py # Entry point
│ ├── config.py # Configuration
├── models/ # SQLAlchemy models
├── schemas/ # Pydantic schemas
├── api/ # API endpoints
── services/ # Business logic
└── core/ # Utils, auth, etc.
│ ├── tests/
│ ├── unit/
│ ├── integration/
│ │ └── conftest.py
│ ├── alembic/ # Database migrations
│ ├── Dockerfile
│ └── pyproject.toml
├── frontend/ # React application
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── pages/ # Page components
│ │ ├── hooks/ # Custom hooks
│ │ ├── services/ # API clients
│ │ └── types/ # TypeScript types
│ ├── public/
│ ├── Dockerfile
│ └── package.json
├── docker-compose.yml # Full stack orchestration
├── nginx.conf # Reverse proxy config
└── README.md
```
@@ -182,43 +281,55 @@ Sviluppare **[NOME_PROGETTO]**, [descrizione breve del progetto - da personalizz
## ✅ Checklist Pre-Sviluppo
- [ ] @spec-architect ha letto questo prompt
- [ ] Cartella `export/` creata
- [ ] `architecture.md` creato con schema DB
- [ ] `kanban.md` creato con task Fase 1
- [ ] `progress.md` inizializzato
- [ ] @spec-architect ha letto questo prompt e il PRD
- [ ] @db-engineer ha revisionato il PRD sezione database
- [ ] Team allineato sulle priorita (MVP v0.2.0)
- [ ] Architettura approvata
- [ ] Schema database pronto
---
## 🎬 Prossima Azione
**@spec-architect**: Inizia analizzando il PRD in `export/prd.md` e crea le specifiche tecniche in `export/`.
**@spec-architect**: Inizia analizzando il PRD e il codice esistente, poi aggiorna `architecture.md` e `kanban.md`.
**NON iniziare l'implementazione** finché le specifiche non sono approvate.
**@db-engineer**: Inizia progettando lo schema database e le migrazioni Alembic.
**NON iniziare l'implementazione del codice di business logic** finché architettura e schema DB non sono completati e revisionati.
---
## 📞 Note per il Team
- **Domande sul PRD?** Leggi prima `export/prd.md` completamente
- **Codice esistente?** Esamina `/home/google/Sources/LucaSacchiNet/mockupAWS/src/` prima di iniziare
- **Ambiguità?** Chiedi prima di procedere
- **Vincoli tecnici?** Documentali in `architecture.md`
- **Task troppo grandi?** Spezza in task più piccoli
- **Task troppo grandi?** Spezza in task più piccoli seguendo "little often"
---
**Data Creazione:** YYYY-MM-DD
**Versione:** 1.0
**Stato:** Pronto per kickoff
**Data Creazione:** 2026-04-07
**Versione:** 2.0
**Stato:** Pronto per kickoff - Fase 1: Architettura e Database
---
## 📝 Note per l'Utente
## 📝 Note sullo Stato Attuale
Questo è un template. Per usarlo:
Il progetto ha già una base solida con:
- API FastAPI funzionante con metriche base
- Test suite completa (pytest)
- Documentazione PRD dettagliata
1. **Sostituisci** `[NOME_PROGETTO]` con il nome reale
2. **Descrivi** il progetto nella sezione Missione
3. **Personalizza** la sezione "Requisiti Chiave" con i tuoi requisiti
4. **Aggiorna** lo stack tecnologico
5. **Definisci** gli scope dei commit pertinenti al tuo progetto
Il team deve ora:
1. Completare l'architettura tecnica
2. Implementare il database layer
3. Evolvere l'API esistente per supportare scenari
4. Costruire il frontend
5. Containerizzare tutto
Il lavoro può procedere in parallelo dopo la fase di architettura:
- Backend e DB possono procedere insieme
- Frontend può iniziare con mock data
- DevOps può preparare l'infrastruttura