phase-10b-durable-timeline-research: промпт для Claude Code
Промпт phase-10b-durable-timeline-research запускает автономное исследование надёжной ленты чата и механизма повторного подключения SSE в проекте Phantom без изменения исходного кода.
Apache-2.0 ★ 1 497 обновлён 2026-06-16
.claude/commands/phase-10b-durable-timeline-research.mdЧто делает phase-10b-durable-timeline-research
Промпт переводит агента в режим старшего инженера, архитектора и продуктового менеджера. Задача — спроектировать сохранение истории выполнения чата и корректную обработку обрывов соединения на базе платформы Murph. Инструкция запрещает править рабочую кодовую базу: агент обязан читать указанные файлы и сформировать документ research/chat-experience/phase-10b-durable-timeline-research.md.
Внутрь зашит строгий порядок изучения 17 исходных файлов: обработчики HTTP, SSE-потоки, логи событий и компоненты интерфейса на React. Агенту предстоит ответить на 10 прикладных вопросов, включая разделение активного стрима и реплея старых событий, поведение при перезагрузке страницы в браузере и выбор схемы хранения данных для таблицы chat_stream_events.
Запрещено сохранять сырые секреты, выводы команд или поток рассуждений модели. В финальном отчёте агент должен зафиксировать только путь к созданному файлу и топ-5 главных выводов исследования.
Какие задачи решает
- спроектировать повторное подключение SSE без потери контекста выполнения
- восстановить историю вызовов инструментов и субагентов после перезагрузки страницы
- разделить в интерфейсе воспроизведение истории и живой стриминг
- составить план реализации и список граничных тестов до написания кода
Примеры запросов агенту
- /phase-10b-durable-timeline-research
- Проведи архитектурный анализ надёжной ленты чата по файлу .claude/commands/phase-10b-durable-timeline-research.md
Как установить phase-10b-durable-timeline-research
Вручную: положить файлы
.claude/commands/phase-10b-durable-timeline-research.mdКак использовать
Вставьте текст в начало диалога или в инструкции проекта
Вопросы о phase-10b-durable-timeline-research
Как установить phase-10b-durable-timeline-research в Claude Code?
Сохраните текст промпта в проект по пути .claude/commands/phase-10b-durable-timeline-research.md. После этого команда станет доступна в сессии Claude Code.
Что делает этот промпт?
Он направляет модель на глубокий анализ архитектуры чата: поиск узких мест в синхронизации SSE, проверку долговечности логов и подготовку рекомендаций для реализации фазы 10B.
Меняет ли промпт исходный код проекта?
Нет, редактирование исходников прямо запрещено условиями задачи. Агент может только читать код, запускать поиск и сохранять результат в файл research/chat-experience/phase-10b-durable-timeline-research.md.
Исходный текст
phase-10b-durable-timeline-research.md · Apache-2.0
ultrathink. ultrathink. ultrathink. You are a principal engineer, principal architect, AND principal product manager at Anthropic, all three at once. You are researching the durable run timeline and reconnect model for Phantom chat on Murph. No context anxiety. No token limits. No time pressure. No cost anxiety. No v2 thinking. There is no v2. Build it right. Take as long as you need. This prompt is your starting point, not your ceiling. Exceed it. You are fully autonomous. You may use code search, shell reads, web research, and your own judgment. Do not edit source code. Your only write target is: `research/chat-experience/phase-10b-durable-timeline-research.md` ## Mission Phantom currently shows a live run activity row during an active stream, but we need production-grade durability: 1. Refresh during an active run should reconnect and show accurate work state. 2. Completed transcripts should retain a trustworthy run timeline. 3. Tool calls, compaction, MCP status, subagent progress, errors, and aborts should be reconstructable from durable events. 4. The UI should not show a dead or misleading state when an SSE connection drops, reconnects, resumes, or is opened after a run completed. Do deep research and produce the design constraints, not code. ## Required Reading Read these files in order: 1. `/Users/truffle/.claude/AGENTS.md` around 70 lines. 2. `/Users/truffle/.claude/CLAUDE.md` around 300 lines. 3. `research/chat-experience/phase-10a-synthesis.md` around 351 lines. 4. `src/chat/http-handlers.ts` around 280 lines. 5. `src/chat/http.ts` around 220 lines. 6. `src/chat/event-log.ts` around 71 lines. 7. `src/chat/writer.ts` around 203 lines. 8. `src/chat/stream-sse.ts` around 80 lines. 9. `src/chat/sse.ts` around 80 lines. 10. `src/chat/__tests__/http-resume.test.ts` around 300 lines. 11. `src/chat/__tests__/sse.test.ts` around 150 lines. 12. `chat-ui/src/lib/client.ts` around 190 lines. 13. `chat-ui/src/hooks/use-chat.ts` around 224 lines. 14. `chat-ui/src/routes/session-route.tsx` around 93 lines. 15. `chat-ui/src/lib/chat-store.ts` around 290 lines. 16. `chat-ui/src/lib/chat-activity.ts` around 272 lines. 17. `chat-ui/src/components/message-list.tsx` around 113 lines. You may read any tests or migrations needed to understand `chat_stream_events`. ## Questions To Answer 1. What state is already durable, exactly? 2. What state is only in memory today? 3. How does `/chat/sessions/:id/resume` work now? 4. Why does the route load path not yet provide durable activity on refresh? 5. Should Phantom reconstruct run timelines from `chat_stream_events`, persist per-message summaries, or both? 6. What is the smallest correct Phase 10B that can ship without blocking the larger redesign? 7. How should the client distinguish: - active stream attached - active writer exists but stream reconnect is pending - active writer disappeared - run completed while the page was gone - replayed historical event 8. What event ordering and idempotency traps matter? 9. What tests must be added before implementation? 10. What browser scenarios must be verified after implementation? ## Acceptance Criteria Your research file must include: 1. A concise current-state map with file references. 2. A data model recommendation for durable run timelines. 3. A reconnect and route-load flow recommendation. 4. A clear Phase 10B implementation plan. 5. A list of edge cases and tests. 6. A list of anti-patterns to avoid. 7. A "builder prompt seed" section that the orchestrator can paste into the next builder prompt. ## Anti-Patterns Do not: 1. Propose a broad rewrite if a smaller durable event model is correct. 2. Treat agent summaries as evidence. Read files. 3. Persist raw secrets, raw command output, or raw chain-of-thought by default. 4. Conflate historical replay with active streaming in UI state. 5. Assume browser refresh is rare. It is a first-class path. 6. Add Phantom-only hacks into Murph. 7. Guess about APIs if current docs or code can answer. ultrathink before writing. Self-review the output against every acceptance criterion. Your final answer should list the output file you wrote and the top five findings only.
© ghostwright · Apache-2.0 · ghostwright/phantom