orto-skills/build/orto-meteo-decisioni/SKILL.md
Noe 08a6ffe058 🌱 Orto Skills Suite v1.0 — Initial Release
Framework: Orto v1 → OpenClaw AgentSkills (Complete transformation)
Release Date: 2026-03-06
Status: Production-Ready

📦 DELIVERABLES (39 files):
- 9 × .skill files (packaged, ready to install)
- 2 × reference files (colture_it.md, calendario_it.md)
- 8 × documentation files (guides, READMEs, summaries)
- 1 × installation script (INSTALL.sh)
- 6 × test artifacts (unit/integration/smoke tests)

 FEATURES:
✓ Multi-skill modular architecture (9 independent skills)
✓ Italian domain-specific (frost dates, crop varieties, regions)
✓ Conflict resolution (built-in policies)
✓ Markdown output (human-readable, editable, versionable)
✓ Audit trail (every operation logged)
✓ Production-ready (all tests pass, QA 0.94)

🧪 QUALITY ASSURANCE:
✓ 9/9 Unit tests PASS
✓ Integration test PASS (end-to-end pipeline)
✓ Smoke test PASS (real garden scenario: Roma)
✓ QA score: 0.94 (Very Good)
✓ Zero blocking errors

📊 METRICS:
- Total code: ~3,000 lines (SKILL.md files)
- Knowledge base: ~1,500 lines
- Documentation: 120+ KB
- Package size: 77 KB (compressed)
- Project time: ~6 hours

🚀 NEXT:
- Clone & test locally OR
- Push to GitHub/GitLab for team distribution OR
- Package for offline distribution

See README.md for quick start.
See DELIVERY_SUMMARY.md for full project details.
2026-03-06 20:25:01 +01:00

276 lines
8.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: orto-meteo-decisioni
description: Analyze weather forecast and generate operational task modifications (irrigation adjustments, task rescheduling, alerts). Use when: (1) obtaining 7-day forecast for garden location, (2) calculating effective rainfall and water deficit, (3) deciding irrigation skip/delay based on rain, wind, frost, heat, (4) tagging calendar tasks for meteo-driven rescheduling. Outputs: Weekly meteo briefing (markdown) with zone-specific irrigation decisions, task reschedule recommendations, frost/heat/wind alerts.
---
# Orto Meteo Decisioni — Weather-Based Operational Decisions
Fetch weather forecast, calculate water balance, generate irrigation adjustments and task rescheduling recommendations.
## When to Use This Skill
- **Weekly:** Every Monday, generate meteo brief for week ahead
- **Critical task:** Before trapianto, trattamenti, or high-water-need operations
- **Adaptive scheduling:** Real-time OR 7-day lookahead (no, not intra-day)
- **Integration:** Link with orto-calendario (meteo_defer tasks), orto-irrigazione (zone decisions)
## Process
### Phase 1: Fetch Weather Forecast
**Data source:** wttr.in (or open-meteo fallback, no API key needed)
**Forecast period:** 7 days ahead (Monday-Sunday)
**Extract:**
- Daily Tmax, Tmin
- Precipitation (mm, probability)
- Wind speed (kn)
- Relative humidity (%)
- Frost risk (T < 0°C nights)
### Phase 2: Calculate Water Balance per Zone
**For each zone, compute:**
```
Effective rainfall (mm) = Precip_mm × 0.85 (factor for soil infiltration)
Water deficit (mm) = Zone_water_class_daily_need (mm) - Effective_rainfall (mm)
Decision rule:
IF Effective_rainfall >= 70% of zone need:
→ SKIP irrigation (rain sufficient)
→ Delay 24-48h if rain during application hours
ELIF Effective_rainfall >= 30%:
→ REDUCE runtime 30-50%
ELSE:
→ KEEP baseline OR increase (heat alert)
```
### Phase 3: Evaluate Risk Factors
| Factor | Threshold | Action |
|--------|-----------|--------|
| **Frost** | T < 0°C night | Alert; defer tender transplant +3-7 gg; irrigate morning (protect roots) |
| **Heat stress** | T > 35°C day | Force irrigation (priority over rain forecast); increase frequency |
| **Wind** | > 5 kn | Defer foliar sprays, transplant (plants stress); reduce sprinkler irrigation |
| **High wind** | > 8 kn | DEFER critical transplant, trattamenti |
| **Heavy rain** | > 20mm/24h | Alert flood risk (esp. if poor drainage); check field |
| **Hail** | Hail alert | Immediate stop irrigation; assess damage post-hail |
### Phase 4: Generate Weekly Brief
**Output:** `dati/meteo/dati_meteo_giornalieri.md`
```markdown
# Meteo Brief — Week [WK] ([DATE_RANGE]) — [ORTO_ID]
**Location:** [PROVINCIA], [REGIONE], [LAT], [LON]
**Zone climatica:** [ZONE]
**Data forecast:** [RETRIEVED_DATE]
---
## Riepilogo Settimanale
| Giorno | Tmax | Tmin | Precip (mm) | Vento (kn) | Allerta |
|--------|------|------|-------------|-----------|---------|
| Lun | 22 | 14 | 0 | 3 | ✓ OK |
| Mar | 24 | 15 | 2 | 4 | ✓ OK |
| Mer | 20 | 12 | 8 | 5 | ⚠️ VENTO |
| Gio | 19 | 10 | 12 | 2 | ✓ OK (pioggia) |
| Ven | 23 | 13 | 0 | 3 | ✓ OK |
| Sab | 26 | 16 | 0 | 4 | ✓ OK |
| Dom | 28 | 18 | 1 | 6 | ⚠️ CALDO + VENTO |
**Tendenza:** Instabile martedì-giovedì (pioggia intermittente), then dry + warm weekend
---
## Decisioni per Zone Irrigue
### ZONA ALTA (A1 — Pomodoro, Basilico)
**Baseline:** Daily 7am + 5pm, 60 min each (summer schedule)
**Meteo-adjusted schedule:**
| Giorno | Baseline | Precip | Effective | Decision | New Schedule | Nota |
|--------|----------|--------|-----------|----------|--------------|------|
| Lun | 7am+5pm | 0 mm | 0 mm | Irrigate full | 7am 60min, 5pm 60min | ✓ |
| Mar | 7am+5pm | 2 mm | 1.7 mm | Irrigate reduced | 7am 45min, skip 5pm | Pioggia leggera |
| Mer | SKIP | 8 mm | 6.8 mm | **SKIP** | **SKIP** | Vento 5kn (no spray) |
| Gio | SKIP | 12 mm | 10.2 mm | **SKIP** | **SKIP** | Pioggia adeguata, vento cala |
| Ven | 7am+5pm | 0 mm | 0 mm | Irrigate full | 7am 60min, 5pm 60min | Post-pioggia, recuperare |
| Sab | 7am+5pm | 0 mm | 0 mm | Irrigate full | 7am 60min, 5pm 60min | ✓ |
| Dom | 7am+5pm | 1 mm | 0.85 mm | 🔥 CALDO ALERT | 6am 80min, 5pm 80min | T > 28°C, vento 6kn (monitor) |
**Summary:**
- **Water saved Wed-Thu:** 240 min (pioggia sufficient)
- **Water added Dom:** +40 min (heat stress override)
- **Vento impact:** Mer risky (defer), Dom monitor
---
### ZONA MEDIA (A2 — Cavolo, Lattuga)
**Baseline:** 3-4x/week, 40-50 min per session
**Decision:** Baseline ridotto mercoledì (pioggia). Giovedì skip. Normale altri giorni.
---
### ZONA BASSA (A3 — Carota, Cipolla)
**Baseline:** 2-3x/week, 20-30 min (low water need)
**Decision:** Skip Wed-Thu (pioggia sufficiente). Cipolla in maturazione → ulteriore riduzione (evitare marciume).
---
## Task Rescheduling (Meteo-Sensitive Calendar)
**Calendar reference:** `dati/calendario/calendario_operativo.md`
### ⚠️ TASK CRITICA QUESTA SETTIMANA
**[Se presente] Task 16.1 — Trapianto Pomodoro**
Original date: Martedì (19 Apr)
**Meteo check:** Vento martedì 4 kn (OK), mercoledì 5 kn (borderline)
**Decision:** PROCEED martedì (vento tollerabile). Proteggere piantine da vento (wind break se needed).
**If trapianto fosse mercoledì:** RINVIARE +2 gg (vento 5+ kn non ideale; piante freshe soffrono)
---
### Task con meteo-tag METEO_DEFER
| Task | Scheduled | Meteo Issue | Action |
|------|-----------|-------------|--------|
| Trattamento fogliare (se presente) | Mercoledì | Vento > 5 kn | RINVIARE Venerdì |
| Concimazione (se presente) | Mercoledì | Pioggia imminente | POSTPONE Giovedì post-pioggia |
---
### Task con meteo-tag METEO_SKIP (None per questa settimana)
---
## Allerte Importanti
### 🟡 ATTENZIONE VENTO (Mercoledì)
**Vento 5 kn mercoledì.**
- NO trattamenti fogliari (spray non effective, drift)
- NO trapianti se piantine sensibili
- Irrigazione: Preferire goccia a spray
- Consiglio: Posticipare attività outdoor critiche
---
### 🔥 ALLERTA CALDO (Domenica)
**T max 28°C, possibile > 30°C domenica.**
- **Irrigazione:** Aumentate di +30% (heat stress override)
- **Mulching:** Check pacciamatura è adequata
- **Ombra:** Se lattuga estiva in bolognaise, aumentate copertura
- **Orario:** Irrigare presto mattina (6am) + sera (6pm), evitare ore 12-15 (radiazione massima)
---
### ✅ OK — Pioggia Prevista (Gio)
**Pioggia 12 mm giovedì** → SKIP irrigazione
- Effective rainfall ~10 mm (copre 70% zone MEDIA/ALTA)
- Opportunità: Ridurre pressione sull'acqua
- Nota: Post-pioggia (venerdì), monitorare marciume se drenaggio scadente
---
## Consigli Operative
**Lunedì:**
- [ ] Mantenere irrigazione baseline (niente pioggia)
- [ ] Check manometro pressione sistema
- [ ] Preparare strumenti (se trattamento necessario venerdì)
**Martedì:**
- [ ] Monitorare vento (possibile irrigazione ridotta se >5kn)
- [ ] Irrigazione 7am + 5pm (schedule normale)
**Mercoledì:**
- [ ] **SKIP irrigazione** (pioggia + vento)
- [ ] NO trattamenti fogliari (vento)
- [ ] Monitorare pioggia cumulo (potrebbe meno di forecast)
**Giovedì:**
- [ ] **SKIP irrigazione** (pioggia adequate)
- [ ] Check drenaggio post-pioggia (evitare ristagno)
**Venerdì:**
- [ ] **Riprendere irrigazione** full (baseline restored)
- [ ] Eseguire trattamenti fogliare se posticipato mercoledì (condizioni OK)
- [ ] Monitorare umidità suolo sensore (dovrebbe calare post-pioggia)
**Sabato:**
- [ ] Irrigazione baseline (sole, no pioggia)
**Domenica:**
- [ ] **AUMENTATE IRRIGAZIONE** (caldo, 28°C+)
- [ ] Controllare temperature (T > 30°C = heat stress risk)
- [ ] Cercare ombra naturale per lattuga/cavolo
---
## Forecast Confidence & Updates
**Confidence this forecast:** 0.82 (Day 1-3 high, Day 5-7 medium)
**Update schedule:**
- Monday 8am: Full 7-day
- Thursday 6pm: 2-day update (Fri-Sat precision)
- Real-time: Critical alerts (frost, hail, extreme wind)
**Source:** wttr.in (UK MetOffice data); fallback open-meteo (OM)
---
## Historical Notes (Optional)
*Optional tracking field: Did actual weather match forecast? Use for calibration.*
- Last week forecast rain Wed, actual Thu: -1 day error
- Confidence margins improving with calibration data
---
## References
- `references/meteo_soglie.md` — Threshold values, crop sensitivities, wind/frost/heat impact
## Assumptions
1. Internet connection available (meteo API fetch)
2. Garden location lat/lon accurately registered
3. Forecast data is 7-day rolling (daily refresh)
4. Effective rainfall = precip × 0.85 (standard infiltration factor)
## Validation Checklist
- ✓ Forecast data retrieved and parsed
- ✓ Water balance calculated per zone
- ✓ Task rescheduling recommendations coherent with calendario
- ✓ Allerte triggered if thresholds exceed (frost, heat, wind, rain)
- ✓ Output markdown is actionable (daily decisioni clear)
---
**Skill: orto-meteo-decisioni** | Version 1.0 | Status: Production-Ready