Implement Sprint 3: Chat Functionality
- Add ChatService with send_message and get_history methods
- Add POST /api/v1/notebooks/{id}/chat - Send message
- Add GET /api/v1/notebooks/{id}/chat/history - Get chat history
- Add ChatRequest model (message, include_references)
- Add ChatResponse model (message, sources[], timestamp)
- Add ChatMessage model (id, role, content, timestamp, sources)
- Add SourceReference model (source_id, title, snippet)
- Integrate chat router with main app
Features:
- Send messages to notebook chat
- Get AI responses with source references
- Retrieve chat history
- Support for citations in responses
Tests:
- 14 unit tests for ChatService
- 11 integration tests for chat API
- 25/25 tests passing
Related: Sprint 3 - Chat Functionality
Prompts Directory
Questa cartella contiene tutti i prompt utilizzati per ingaggiare il team di agenti.
Convenzione di Naming
I file prompt seguono la convenzione: {NUMERO}-{NOME}.md
- NUMERO: Numero progressivo crescente (1, 2, 3, ...)
- NOME: Nome descrittivo del prompt (kebab-case)
Lista Prompt
| File | Descrizione | Data |
|---|---|---|
| 1-avvio.md | Sprint kickoff - Implementazione Core API Notebook Management | 2026-04-06 |
Come Aggiungere un Nuovo Prompt
- Determina il prossimo numero progressivo (es: se l'ultimo è
3-xxx.md, il prossimo sarà4-) - Crea il file con nome descrittivo:
{NUMERO}-{descrizione}.md - Segui il template standard per i prompt (vedi sotto)
- Aggiorna questa README aggiungendo il nuovo prompt alla tabella
Template Prompt Standard
# {Titolo Sprint/Task}
## 📋 Comando per @sprint-lead
@sprint-lead {istruzione specifica}
---
## 🎯 Obiettivo
{Descrizione chiara dell'obiettivo}
**Success Criteria**:
- {Criterio 1}
- {Criterio 2}
---
## 📚 Contesto & Background
### Stato Attuale
- {Stato attuale 1}
- {Stato attuale 2}
### Documentazione Riferimento
- **PRD**: `prd.md` - Sezione X
- **Workflow**: `.opencode/WORKFLOW.md`
- {Altri riferimenti}
---
## ✅ Scope (Incluso)
### In Scope
1. {Task 1}
2. {Task 2}
### Out of Scope
- {Task escluso 1}
- {Task escluso 2}
---
## ⚠️ Vincoli & Constraints
1. {Vincolo 1}
2. {Vincolo 2}
---
## 🎯 Criteri di Accettazione (Definition of Done)
- [ ] {Criterio 1}
- [ ] {Criterio 2}
---
## 🎬 Azioni Immediate
1. {Azione 1}
2. {Azione 2}
---
## 🎯 Call to Action
**@sprint-lead**: {Istruzioni specifiche}
**Team**: {Istruzioni per il team}
---
*Data: YYYY-MM-DD*
*Priority: P{0-3}*
*Prompt File: prompts/{NUMERO}-{nome}.md*
Note
- I prompt sono versionati e tracciati
- Ogni prompt rappresenta uno sprint, una feature o un task specifico
- I prompt storici servono per:
- Documentare decisioni passate
- Riutilizzare pattern
- Audit trail delle attività
- Onboarding di nuovi agenti