peppa/openspec/changes/archive/2026-11-14-pep-33-agent-steps/proposal.md
Асель 4a80d9dc6b PEP-32/33/37: story page tabs, live agent step feed, SSE live updates instead of 5 s polling
- PEP-37: change hub (runner/live.ts) woken by notify() (new 'web' subscriber) and
  PRAGMA data_version; per-scope fingerprints; GET /api/live SSE (no-transform, ping 15 s);
  LiveRefresh replaces AutoRefresh with a connection indicator and polling fallback
- PEP-33: async PostToolUse/PostToolUseFailure hook -> 'step' events (last 200 per
  session), AgentSteps live feed on the story page and runner panel, tasks.md progress
  on board cards and the story header
- PEP-32: story page header + tabs Proposal/Design/Specs/Tasks/Comments/Tests/Merge
  request/Activity, safe Markdown renderer, PM comments visible in get_task, edit
  title/description/epic, accept-and-merge (acceptStory)
- OpenSpec changes archived; specs live-updates, agent-steps, story-page

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

32 lines
2.3 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.

## Why
Про работающего агента видно только «работает»: чтобы понять, что он делает, PM открывает
терминал. PEP-33: лента последних действий агента (команда, файл, тест), текущий пункт
tasks.md и прогресс x/y на карточке, странице стори и доске.
## What Changes
- Хук Claude `PostToolUse` / `PostToolUseFailure` (асинхронный, `async: true` — не тормозит
агента) → `peppa-hook tool-use` → событие сессии `step` `{tool, kind, text, ok}`: kind —
`command` | `test` | `edit` | `read` | `search` | `web` | `agent` | `mcp` | `other`; тест —
команда, похожая на запуск тестов. Хранятся последние 200 шагов сессии (старые удаляются),
`last_activity_at` обновляется. `AskUserQuestion` и чтение задач Пеппы не пишутся.
- Шаги не засоряют журнал: «События»/Activity, `get_task` и отпечатки PEP-37 их пропускают.
- `taskProgress(project, change)` (core): пункты tasks.md change из рабочей копии — `done/total`
и текущий (первый незакрытый) пункт; на доске (карточки в работе), в шапке стори и у сессии.
- Живая лента `components/AgentSteps.tsx` у активной сессии на странице стори и в панели
раннера: начальные шаги с сервера, новые — событием `step` канала PEP-37
(`/api/live?scope=steps:<sessionId>`), рядом с терминалом PEP-9.
- Codex и OpenCode хуков на шаги не имеют — лента у них пустая с пояснением.
## Capabilities
### New Capabilities
- `agent-steps`: лента шагов агента и прогресс tasks.md.
## Impact
- `runner/run-settings.ts`, `runner/hook.ts`, `core/steps.ts` (классификация, хранение,
прогресс), `runner/live.ts` (поток шагов), веб: `AgentSteps`, `Board`, страница стори,
`RunnerConsole`. Миграций нет (таблица `events`).