peppa/openspec/changes/archive/2026-11-14-pep-5-usage/tasks.md
Асель 14916079bc PEP-5/43/47/48: usage and limits, story budgets, factory metrics, audit journal
- PEP-5: statusLine hook (cost, context, 5h/7d limit windows), transcript tokens,
  sessions.usage, usage strip over every page, runner usage, bot /status, MCP get_usage
- PEP-43: project/story budgets in settings, watchdog pause (Escape, question to the PM:
  extend x2 / remove limit / stop), start/resume guard, budget on the story card
- PEP-47: project metrics tab (cycle time, first pass, review returns, questions, runner
  hours, PM wait, limits, spend by week/agent/epic), MCP get_metrics
- PEP-48: event authors (actor columns, AsyncLocalStorage context), question_answered,
  /journal for superadmins, project journal tab, authors in the story feed
- Migration 0007_usage_audit; OpenSpec changes archived

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 06:52:13 +05:00

18 lines
881 B
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.

# Tasks: PEP-5
## 1. Данные
- [x] 1.1 Колонка `sessions.usage` + миграция 0010 (вместе с PEP-48)
- [x] 1.2 core/usage.ts: разбор statusLine и transcript, итоги сессии, окна аккаунтов, оценка по прайсу
## 2. Раннер
- [x] 2.1 run-settings: statusLine → `peppa-hook statusline`; хук statusline (строка статуса + запись с троттлингом)
- [x] 2.2 Stop/SessionEnd: токены из transcript
## 3. Интерфейсы
- [x] 3.1 Веб: полоса использования в layout, расход на карточке раннера
- [x] 3.2 Бот `/status`, MCP `get_usage`, расход в `get_task`, помощь
## 4. Тесты
- [x] 4.1 mock-agent: действие `usage` (transcript + statusLine)
- [x] 4.2 usage.test.ts: сценарии спеки