[codex] add autonomous plan and todo runbooks for local hardware loops #8
+124
-12
@@ -1,16 +1,128 @@
|
||||
# Easter Egg musique expérimentale
|
||||
# Plan d'execution autonome local (RTC + Zacus)
|
||||
|
||||
_« Le plan du projet se transforme, comme un evidence pack modulé par Daphne Oram. »_
|
||||
# Plan
|
||||
Last updated: 2026-02-21
|
||||
|
||||
## Étapes
|
||||
1) ...
|
||||
2) ...
|
||||
## Objectif
|
||||
|
||||
## Validation à chaque étape
|
||||
- Build
|
||||
- Tests
|
||||
- Gates hardware (ERC/DRC)
|
||||
Atteindre une boucle autonome locale stable sur les deux repos branches au hardware:
|
||||
|
||||
## Evidence pack
|
||||
- artifacts/...
|
||||
- `RTC_BL_PHONE`
|
||||
- `le-mystere-professeur-zacus`
|
||||
|
||||
avec:
|
||||
|
||||
- stack ZeroClaw local operationnel (`3000`, `8788`, `9090`),
|
||||
- dev/test reproductible sur chaque repo,
|
||||
- preflight hardware systematique avant toute action firmware,
|
||||
- traces et preuves dans `artifacts/zeroclaw/`.
|
||||
|
||||
## Criteres de succes
|
||||
|
||||
- `tools/ai/zeroclaw_stack_up.sh` lance gateway + follow + Prometheus (binary ou docker fallback).
|
||||
- `http://127.0.0.1:8788/` affiche les conversations et logs en live.
|
||||
- `http://127.0.0.1:9090/targets` est reachable (Prometheus up).
|
||||
- `tools/ai/zeroclaw_dual_chat.sh rtc --provider-check` et `... zacus --provider-check` passent.
|
||||
- Au moins une boucle dev/test complete par repo est executee et tracee.
|
||||
|
||||
## Contraintes
|
||||
|
||||
- Local only (loopback `127.0.0.1`), pas d'exposition publique.
|
||||
- Secrets hors git (`~/.zeroclaw/env`, mode `600`).
|
||||
- Cout modele borne par quotas webhook locaux.
|
||||
- Pas de flash/upload firmware sans detection hardware prealable.
|
||||
|
||||
## Plan par phases
|
||||
|
||||
## Phase 0 - Preflight (auth + outils)
|
||||
|
||||
Actions:
|
||||
|
||||
1. Verifier `gh auth status`.
|
||||
2. Verifier `zeroclaw auth status`.
|
||||
3. Verifier `~/.zeroclaw/env` contient `OPENROUTER_API_KEY=...` et permissions `600`.
|
||||
4. Verifier backend Prometheus local:
|
||||
- binaire `prometheus`, sinon docker daemon.
|
||||
|
||||
Sortie attendue:
|
||||
|
||||
- environnement provider OK,
|
||||
- fallback Prometheus disponible.
|
||||
|
||||
## Phase 1 - Stack local ZeroClaw
|
||||
|
||||
Actions:
|
||||
|
||||
1. `tools/ai/zeroclaw_stack_down.sh`
|
||||
2. `ZEROCLAW_PROM_MODE=auto tools/ai/zeroclaw_stack_up.sh`
|
||||
3. Verifs:
|
||||
- `curl -fsS http://127.0.0.1:3000/health`
|
||||
- `curl -fsS http://127.0.0.1:8788/`
|
||||
- `curl -fsS http://127.0.0.1:9090/-/ready`
|
||||
|
||||
Sortie attendue:
|
||||
|
||||
- gateway healthy,
|
||||
- dashboard live actif,
|
||||
- Prometheus ready.
|
||||
|
||||
## Phase 2 - Boucle autonome RTC
|
||||
|
||||
Actions:
|
||||
|
||||
1. Provider check: `tools/ai/zeroclaw_dual_chat.sh rtc --provider-check`
|
||||
2. Hardware discover: `tools/ai/zeroclaw_dual_chat.sh rtc --hardware`
|
||||
3. Build/test firmware repo RTC:
|
||||
- `cd /Users/cils/Documents/Lelectron_rare/RTC_BL_PHONE`
|
||||
- `pio run`
|
||||
- `pio test -e native` (si environnement present)
|
||||
4. Trace webhook:
|
||||
- `tools/ai/zeroclaw_webhook_send.sh --repo-hint rtc "rtc loop status ..."`
|
||||
|
||||
Sortie attendue:
|
||||
|
||||
- build RTC passe ou echec documente avec logs,
|
||||
- ligne JSONL enrichie pour la boucle RTC.
|
||||
|
||||
## Phase 3 - Boucle autonome Zacus
|
||||
|
||||
Actions:
|
||||
|
||||
1. Provider check: `tools/ai/zeroclaw_dual_chat.sh zacus --provider-check`
|
||||
2. Hardware discover: `tools/ai/zeroclaw_dual_chat.sh zacus --hardware`
|
||||
3. Build/test firmware repo Zacus:
|
||||
- `cd /Users/cils/Documents/Lelectron_rare/le-mystere-professeur-zacus/hardware/firmware`
|
||||
- `pio run`
|
||||
- `pio test -e native` (si environnement present)
|
||||
4. Trace webhook:
|
||||
- `tools/ai/zeroclaw_webhook_send.sh --repo-hint zacus "zacus loop status ..."`
|
||||
|
||||
Sortie attendue:
|
||||
|
||||
- build Zacus passe ou echec documente avec logs,
|
||||
- ligne JSONL enrichie pour la boucle Zacus.
|
||||
|
||||
## Phase 4 - Stabilisation autonomie
|
||||
|
||||
Actions:
|
||||
|
||||
1. Dry-run budget: `tools/ai/zeroclaw_webhook_send.sh --dry-run "budget probe"`
|
||||
2. Verifier quota state: `artifacts/zeroclaw/webhook_budget.json`
|
||||
3. Verifier logs:
|
||||
- `artifacts/zeroclaw/gateway.log`
|
||||
- `artifacts/zeroclaw/conversations.jsonl`
|
||||
4. Mettre a jour TODO (`specs/04_tasks.md` + `specs/zeroclaw_dual_hw_todo.md`).
|
||||
|
||||
Sortie attendue:
|
||||
|
||||
- boucles previsibles,
|
||||
- cout controle,
|
||||
- preuves a jour.
|
||||
|
||||
## Cadence autonome quotidienne
|
||||
|
||||
1. Preflight auth + hardware.
|
||||
2. Stack up + smoke endpoints.
|
||||
3. RTC loop (dev/test + webhook trace).
|
||||
4. Zacus loop (dev/test + webhook trace).
|
||||
5. Review logs + correction ciblée.
|
||||
6. Commit/PR petit lot.
|
||||
|
||||
+87
-22
@@ -1,28 +1,93 @@
|
||||
# Axe d’amélioration : badge & conformité
|
||||
# Tasks autonomie locale (execution)
|
||||
|
||||
- Automatiser la génération, vérification et publication des badges (sécurité, SBOM, doc, qualité, communauté, coverage)
|
||||
- Centraliser guides badge dans docs/badges/
|
||||
- Vérifier la fraîcheur des badges à chaque commit (timestamp ≥ commit)
|
||||
- Inclure badges et rapports dans l’evidence pack
|
||||
- Ajouter checklist badge en tête du README
|
||||
- Documenter la politique badge & conformité (docs/COMPLIANCE.md)
|
||||
- Planifier un audit badge à chaque release majeure
|
||||
Last updated: 2026-02-21
|
||||
|
||||
## Planification audit badge
|
||||
Format:
|
||||
|
||||
- À chaque release majeure, exécuter un audit badge :
|
||||
- Vérifier la couleur et l’actualisation de chaque badge
|
||||
- Vérifier la présence des rapports JSON
|
||||
- Vérifier l’inclusion dans l’evidence pack
|
||||
- Documenter les résultats dans docs/badges/audit_<release>.md
|
||||
# Easter Egg musique concrète
|
||||
- `[ ]` non fait
|
||||
- `[x]` fait
|
||||
- `AC` = acceptance criteria
|
||||
- `Evidence` = fichier/commande de preuve
|
||||
|
||||
_« Les tâches sont des sons trouvés : chaque action, chaque gate, est une pièce du puzzle acousmatique. »_ — Pierre Schaeffer
|
||||
# Tasks (Backlog exécutable)
|
||||
## Sprint actuel
|
||||
|
||||
Format conseillé (copiable en GitHub Issues) :
|
||||
- [x] T-001 - Merger la PR autonomie ZeroClaw
|
||||
- AC: PR mergee sur `main`.
|
||||
- Evidence: `https://github.com/electron-rare/Kill_LIFE/pull/5`
|
||||
|
||||
- [ ] T1 — ...
|
||||
- AC: ...
|
||||
- Evidence: ...
|
||||
- [ ] T2 — ...
|
||||
- [x] T-002 - Fermer ou merger la PR miroir restante
|
||||
- AC: plus de PR redondante ouverte pour le meme scope.
|
||||
- Evidence: `gh pr list --state open`
|
||||
|
||||
- [x] T-003 - Configurer secret fallback OpenRouter local
|
||||
- AC: `~/.zeroclaw/env` present avec `OPENROUTER_API_KEY` et mode `600`.
|
||||
- Evidence: `ls -l ~/.zeroclaw/env`
|
||||
|
||||
- [x] T-004 - Installer backend Prometheus local
|
||||
- AC: commande `prometheus --version` disponible.
|
||||
- Evidence: sortie shell `prometheus, version ...`
|
||||
|
||||
- [ ] T-005 - Stabiliser pairing bearer auto
|
||||
- AC: `artifacts/zeroclaw/pair_token.txt` utilisable pour webhook sans override manuel.
|
||||
- Evidence: `tools/ai/zeroclaw_webhook_send.sh --repo-hint rtc "pairing check"`
|
||||
|
||||
## Boucle hardware RTC
|
||||
|
||||
- [ ] T-101 - Discover hardware RTC
|
||||
- AC: au moins un port detecte pour carte RTC.
|
||||
- Evidence: `tools/ai/zeroclaw_dual_chat.sh rtc --hardware`
|
||||
|
||||
- [ ] T-102 - Build firmware RTC
|
||||
- AC: `pio run` termine sans erreur bloquante.
|
||||
- Evidence: logs build RTC.
|
||||
|
||||
- [ ] T-103 - Test firmware RTC
|
||||
- AC: `pio test` (ou fallback test local) execute.
|
||||
- Evidence: rapport test RTC.
|
||||
|
||||
- [ ] T-104 - Trace webhook RTC
|
||||
- AC: une ligne JSONL avec `repo_hint=rtc` apparait.
|
||||
- Evidence: `artifacts/zeroclaw/conversations.jsonl`
|
||||
|
||||
## Boucle hardware Zacus
|
||||
|
||||
- [ ] T-201 - Discover hardware Zacus
|
||||
- AC: au moins un port detecte pour carte Zacus.
|
||||
- Evidence: `tools/ai/zeroclaw_dual_chat.sh zacus --hardware`
|
||||
|
||||
- [ ] T-202 - Build firmware Zacus
|
||||
- AC: `pio run` (dans `hardware/firmware`) termine sans erreur bloquante.
|
||||
- Evidence: logs build Zacus.
|
||||
|
||||
- [ ] T-203 - Test firmware Zacus
|
||||
- AC: `pio test` (ou fallback test local) execute.
|
||||
- Evidence: rapport test Zacus.
|
||||
|
||||
- [ ] T-204 - Trace webhook Zacus
|
||||
- AC: une ligne JSONL avec `repo_hint=zacus` apparait.
|
||||
- Evidence: `artifacts/zeroclaw/conversations.jsonl`
|
||||
|
||||
## Observabilite et cout
|
||||
|
||||
- [ ] T-301 - Stack endpoints smoke
|
||||
- AC: `3000/health`, `8788`, `9090/-/ready` tous OK.
|
||||
- Evidence: captures `curl`.
|
||||
|
||||
- [ ] T-302 - Dry-run webhook budget
|
||||
- AC: `--dry-run` passe sans ecriture execution JSONL.
|
||||
- Evidence: sortie script + diff JSONL.
|
||||
|
||||
- [ ] T-303 - Quota call limiter
|
||||
- AC: depassement quota bloque avec code non-zero.
|
||||
- Evidence: message `[budget] hourly call limit reached`.
|
||||
|
||||
- [ ] T-304 - Quota chars limiter
|
||||
- AC: message trop long bloque avec code non-zero.
|
||||
- Evidence: message `[budget] message length ... exceeds ...`.
|
||||
|
||||
## Definition of done
|
||||
|
||||
- [ ] Au moins une boucle complete RTC + Zacus executee en local.
|
||||
- [ ] Dashboard live exploitable pour suivi continu.
|
||||
- [ ] Prometheus disponible avec target gateway scrapee.
|
||||
- [ ] Logs et preuves archives dans `artifacts/zeroclaw/`.
|
||||
|
||||
@@ -1,36 +1,48 @@
|
||||
# TODO: Dual Hardware Autonomy (RTC + Zacus)
|
||||
# TODO: Dual hardware autonomy runbook (RTC + Zacus)
|
||||
|
||||
Last updated: 2026-02-21
|
||||
|
||||
## Phase A: Local Baseline
|
||||
## Immediate now
|
||||
|
||||
- [ ] Run `tools/ai/zeroclaw_dual_bootstrap.sh` and capture hardware snapshot.
|
||||
- [ ] Validate `tools/ai/zeroclaw_dual_chat.sh rtc -m "<diagnostic prompt>"`.
|
||||
- [ ] Validate `tools/ai/zeroclaw_dual_chat.sh zacus -m "<diagnostic prompt>"`.
|
||||
- [ ] Record detected ports and map preferred role per board.
|
||||
- [x] I-001 - Merge autonomie stack into `main` (`PR #5`).
|
||||
- [x] I-002 - Configure local secret file `~/.zeroclaw/env` (`OPENROUTER_API_KEY` placeholder + mode `600`).
|
||||
- [x] I-003 - Ensure local Prometheus backend exists (`prometheus` binary installed).
|
||||
- [x] I-004 - Resolve open mirror PR redundancy (`PR #7` merge/close decision).
|
||||
|
||||
## Phase B: Repo Specs and PR Cadence
|
||||
## Daily autonomous sequence
|
||||
|
||||
- [ ] Create/refresh one issue in `RTC_BL_PHONE` for ZeroClaw-assisted hardware loop.
|
||||
- [ ] Create/refresh one issue in `le-mystere-professeur-zacus` for ZeroClaw-assisted hardware loop.
|
||||
- [ ] Open one small PR per repo focused on one gate (build, tests, hardware smoke, docs).
|
||||
- [ ] Require code review pass before merge (`gh pr review --approve` only after checks).
|
||||
- [ ] D-001 - `tools/ai/zeroclaw_stack_down.sh` then `ZEROCLAW_PROM_MODE=auto tools/ai/zeroclaw_stack_up.sh`.
|
||||
- [ ] D-002 - Smoke endpoints:
|
||||
- `curl -fsS http://127.0.0.1:3000/health`
|
||||
- `curl -fsS http://127.0.0.1:8788/`
|
||||
- `curl -fsS http://127.0.0.1:9090/-/ready`
|
||||
- [ ] D-003 - RTC loop:
|
||||
- `tools/ai/zeroclaw_dual_chat.sh rtc --provider-check`
|
||||
- `tools/ai/zeroclaw_dual_chat.sh rtc --hardware`
|
||||
- repo build/test
|
||||
- webhook trace with `--repo-hint rtc`
|
||||
- [ ] D-004 - Zacus loop:
|
||||
- `tools/ai/zeroclaw_dual_chat.sh zacus --provider-check`
|
||||
- `tools/ai/zeroclaw_dual_chat.sh zacus --hardware`
|
||||
- repo build/test
|
||||
- webhook trace with `--repo-hint zacus`
|
||||
- [ ] D-005 - Review `artifacts/zeroclaw/gateway.log` + `conversations.jsonl`.
|
||||
|
||||
## Phase C: Autonomy + Cost Optimization
|
||||
## Hardware safety gates
|
||||
|
||||
- [ ] Keep prompts short, target one repo at a time.
|
||||
- [ ] Use provider auto-fallback (`copilot` -> `openai-codex` -> `openrouter`) to avoid dead sessions.
|
||||
- [ ] Add repo-level path filters in workflows to avoid expensive irrelevant runs.
|
||||
- [ ] Use `workflow_dispatch` for hardware-required jobs to avoid noisy CI failures.
|
||||
- [ ] H-001 - No flash/upload if `--hardware` detect returns no board.
|
||||
- [ ] H-002 - Resolve stable serial target before upload.
|
||||
- [ ] H-003 - Keep per-run logs under `artifacts/zeroclaw/`.
|
||||
|
||||
## Phase D: Hardware Robustness
|
||||
## Cost/control gates
|
||||
|
||||
- [ ] Add serial-port resolver step before every upload/flash action.
|
||||
- [ ] Fail fast if no expected USB device is detected.
|
||||
- [ ] Archive logs per run for replayability (`artifacts/<timestamp>/...`).
|
||||
- [ ] C-001 - Validate `tools/ai/zeroclaw_webhook_send.sh --dry-run`.
|
||||
- [ ] C-002 - Validate hourly quota guard (`ZEROCLAW_WEBHOOK_MAX_CALLS_PER_HOUR`).
|
||||
- [ ] C-003 - Validate message length guard (`ZEROCLAW_WEBHOOK_MAX_CHARS`).
|
||||
|
||||
## Exit Criteria
|
||||
## Exit criteria
|
||||
|
||||
- [ ] Both repos can be targeted with one command (`rtc` or `zacus`) without workspace leakage.
|
||||
- [ ] Hardware discovery passes before action on connected boards.
|
||||
- [ ] At least one successful PR cycle completed per repo with this orchestration path.
|
||||
- [ ] E-001 - One successful complete loop RTC in local hardware.
|
||||
- [ ] E-002 - One successful complete loop Zacus in local hardware.
|
||||
- [ ] E-003 - Dashboard live usable for continuous supervision.
|
||||
- [ ] E-004 - Prometheus target scrape confirmed on gateway metrics.
|
||||
|
||||
Reference in New Issue
Block a user