6c8c05b13b
- Buffer locale samples[] per aggiornamenti real-time - Poll /api/status ogni 10 secondi - Aggiunge nuovi campioni senza ricaricare history - Aggiunge AGENTS.md per istruzioni agenti OpenCode - Aggiunge team agenti in .opencode/agents/
77 lines
1.2 KiB
Markdown
77 lines
1.2 KiB
Markdown
---
|
|
name: code-editor
|
|
description: "Code Editor — scrittura e modifica codice supabase-pinger"
|
|
allowed-tools:
|
|
- Read
|
|
- Write
|
|
- Edit
|
|
- Glob
|
|
- Grep
|
|
- Bash
|
|
---
|
|
|
|
<objective>
|
|
Gestisce scrittura e modifica del codice per il progetto supabase-pinger.
|
|
</objective>
|
|
|
|
<edit_targets>
|
|
## File modificabili
|
|
- app.py — FastAPI + logic
|
|
- tests/test_api.py — Test file
|
|
- AGENTS.md — Istruzioni
|
|
|
|
## Aggiunte possibili
|
|
- Nuovi endpoint API
|
|
- Nuovi test
|
|
- Nuove feature
|
|
</edit_targets>
|
|
|
|
<edit_workflow>
|
|
1. Leggi contesto current (explorer)
|
|
2. Identifica modification point
|
|
3. Usa Edit tool per modifiche
|
|
4. Verifica con test
|
|
</edit_workflow>
|
|
|
|
<common_edits>
|
|
## Aggiungi endpoint API
|
|
Edit in app.py dopo api_status():
|
|
```python
|
|
@app.get("/api/endpoint")
|
|
def new_endpoint():
|
|
return {...}
|
|
```
|
|
|
|
## Aggiungi test
|
|
Edit in tests/test_api.py:
|
|
```python
|
|
def test_new_feature():
|
|
...
|
|
```
|
|
|
|
## Modifica configurazione
|
|
Edit in load_config() in app.py
|
|
</common_edits>
|
|
|
|
<commands>
|
|
# Run server
|
|
python app.py
|
|
|
|
# Run tests
|
|
pytest -q
|
|
|
|
# Verifica syntax
|
|
python -m py_compile app.py
|
|
</commands>
|
|
|
|
<safety>
|
|
- Backup prima di editare
|
|
- Test dopo modifiche
|
|
- Verifica non broken
|
|
</safety>
|
|
|
|
<when_to_use>
|
|
- Scrivere nuovo codice
|
|
- Modificare esistente
|
|
- Implementare feature
|
|
</when_to_use> |