chore(freeze): snapshot demo state before Plan-07 hardening work

Freeze current submission/demo baseline:
- casan-next-plans/: full task-level plan set (Plan 00 index + 02/04/06/07/08/09/12, QA, slide deck)
- optimize-docs/video-steps/: per-vector scene breakdown (commands/screen-text/script) + start-tmux
- run-all.sh / scorecard.sh / map-live.sh: REAL=1 live-battery wiring
- regenerated evidence + audit/telemetry logs from live REAL=1 run
- submission README + video recording guide updates
- dry-run pipeline logs for 001-okr-web-app

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
thanhnv
2026-07-03 22:03:44 +09:00
co-authored by Claude Opus 4.8
parent fabd5f8783
commit fbcef967e5
182 changed files with 3865 additions and 341 deletions
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
# D4 — Telemetry TOKEN THẬT từ model (nguồn dữ liệu H6)
# ⚠️ CẦN OLLAMA LIVE (bật tunnel). cwd = thư mục gốc dự án. Dùng lại /tmp/a1.txt.
# Mỗi lời gọi model-router tự ghi provider-usage.jsonl với token THẬT
bash .specify/scripts/bash/model-router.sh /tmp/a1.txt /tmp/v.json --role classify >/dev/null 2>&1
tail -1 .specify/logs/level5/provider-usage.jsonl 2>/dev/null
# Kỳ vọng: dòng JSON có cost_source=ollama_local_real_tokens
# total_tokens = input_tokens + output_tokens (prompt_eval_count + eval_count THẬT của ornith:9b)
@@ -0,0 +1,19 @@
# TEXT HIỂN THỊ — D4 🟢 CẦN OLLAMA
## Title card
```
D4 · TELEMETRY TOKEN THẬT (nguồn dữ liệu H6)
AgentOps · MAESTRO L5
```
## Caption trong khi chạy
```
Gọi model-router → tự ghi provider-usage.jsonl → xem dòng cuối
```
## Caption kết quả
```
✅ cost_source=ollama_local_real_tokens total_tokens=...
Token = prompt_eval_count + eval_count THẬT của ornith:9b (không ước lượng)
Đây là nguồn dữ liệu THẬT nuôi cost-spike (D1) & agent-metrics
```
@@ -0,0 +1,10 @@
# SCRIPT / MÔ TẢ — D4 (🟢 cần Ollama live)
**Mục tiêu:** cho thấy H6 đo **token THẬT**, không bịa. Mỗi lời gọi `model-router` tới ornith:9b **tự ghi** một dòng vào `.specify/logs/level5/provider-usage.jsonl` với nhãn `cost_source=ollama_local_real_tokens`.
**Vai trò AI local:** đây là chỗ **AI local đóng vai nguồn dữ liệu** cho H6 — `total_tokens = input_tokens + output_tokens` (tức `prompt_eval_count + eval_count`) thật của ornith:9b. Chạy pipeline ≥3 step → cost-spike (D1) có dữ liệu đầy đủ để phán đoán trên telemetry thật.
**Ghi chú:** `import-provider-telemetry.sh` chỉ cần khi **nhập telemetry từ provider ngoài** (nó yêu cầu tham số `<provider-usage-json>`). Với ornith:9b local, `model-router` đã ghi trực tiếp nên bước này không cần trong demo.
**Text mô tả (phụ đề):**
> "Token đo được là số thật của ornith:9b, không phải ước lượng. Đây là nguồn dữ liệu nuôi các control deterministic của H6."