peppa/openspec/changes/archive/2026-11-14-pep-3-live-claude/tasks.md
Асель 1e8d9e0327 PEP-3: hooks, statusLine and the permission dialog checked against live Claude Code 2.1.323
- permission dialog menus vary (3-4 items, "2" may be "switch to auto mode"): the late PM answer
  reads the key off the screen (permissionKey); after "No" Claude interrupts the turn without a
  Stop hook, so Peppa types PERMISSION_DENIED_NOTE
- statusLine total_*_tokens are the last request, not session totals: tokens only from transcript
- mcp__peppa allowed in run settings (connected repos have no template .claude/settings.json)
- peppa-hook: PEPPA_HOOK_CAPTURE_DIR saves raw payloads; live fixtures in testkit/fixtures/claude-live
- mock-claude follows the live contract (menu, interrupt on No, statusLine, transcript blocks, suggestions)
- peppa-dev: watchdog (runner service) on the stand, mock PEPPA_SECRET without .env
- e2e claude-live.test.ts: fixtures parsing, real peppa-hook on live payloads, terminal fallback keys

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

16 lines
1014 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.

## 1. Снять контракт
- [x] 1.1 `PEPPA_HOOK_CAPTURE_DIR` в peppa-hook: сырые payload'ы событий и statusLine
- [x] 1.2 Живой прогон на dev-стенде: PermissionRequest, AskUserQuestion, откат в терминал, Stop/nudge, SessionEnd, правила, statusLine
- [x] 1.3 Фикстуры `packages/testkit/fixtures/claude-live/`
## 2. Сверить и исправить
- [x] 2.1 Сверить payload'ы хуков с `HookInput` и mock-claude
- [x] 2.2 Сверить statusLine с `parseStatusLine`, transcript с `transcriptUsage`
- [x] 2.3 Сверить клавиши диалога разрешений и bracketed paste
- [x] 2.4 StopFailure — по документации, описать непроверенное
- [x] 2.5 Исправить расхождения в коде и моке
## 3. Тесты
- [x] 3.1 e2e на моках по найденным расхождениям (и разбор фикстур)
- [x] 3.2 `pnpm run ci`