← ClaudeAtlas

ai-native-estimatorlisted

Token 轴工作量估算 (v1)。基于历史 cycle 的 token 消耗 (runtime-truth from transcript) 估算 spec_level 工作量, 替代传统 4-8h 人工时假设。提供 forecast / history / velocity 查询; 采集由 phase-d-closer 收尾自动触发。使用场景: "估算工作量", "token velocity", "这个 Spec 大概多少 token", "历史 cycle 消耗"。
10CG/aria-plugin · ★ 1 · AI & Automation · score 65
Install: claude install-skill 10CG/aria-plugin
# ai-native-estimator ## 用途 让 aria 用 **Token (AI 侧真实工作量, runtime-truth)** 而非传统 4-8h 人工时估算 cycle 工作量 (#18: 1 Human + Claude Code 模式下传统估算失效, 同一小时 AI 可产出 1 行或 1000 行)。 **v1 = Token 轴薄切片**: phase-d 收尾自动采集每 cycle 的 token 消耗 → `.aria/estimator/variance.jsonl`; 按 `spec_level` 聚类, 提供 forecast/history/velocity。Attention 轴 + L1/L2 预估 + task-planner 集成 defer v2 (见 [DEC-20260530-001](../../../.aria/decisions/2026-05-30-ai-native-estimator-v1-architecture.md))。 底层复用 internal skill [aria-token-telemetry](../aria-token-telemetry/SKILL.md) 的 `iter_transcript_usage()`。 --- ## 何时使用 - 用户问"这个 Spec 大概多少 token / 多大工作量" → `forecast` - 查历史 cycle 消耗 / 趋势 → `history` / `velocity` - (采集**自动**发生在 phase-d-closer 收尾, 无需手动调 `capture`) --- ## 查询 ```bash EST="${CLAUDE_PLUGIN_ROOT:-aria}/skills/ai-native-estimator/scripts/estimator.py" python3 "$EST" --project-root . forecast --spec-level 2 # 估算 L2 cycle work_metric python3 "$EST" --project-root . history # 全部 variance 记录 python3 "$EST" --project-root . velocity --window 10 # 最近 10 cycle 趋势 ``` ### forecast 解读 | 响应 | 含义 | |------|------| | `{status:"ok", median_work_metric, n}` | N≥`min_samples`(默认3) 同 spec_level 历史 → median (可信) | | `{status:"insufficient", have, need, bootstrap, uncalibrated:true}` | 样本不足 → 返回 **uncalibrated** bootstrap 种子 (仅参考, 别当真值) | | `{status:"insufficient", reason:"no_spec_level"}` | 无 spec_level (forecast(None) 或无 Spec cycle) | > **cross-level 隔离**: L1 样本不足时即使 L2 充足也返 L1 insufficient, 不混算。 --