phase-10m-artifact-memory-architecture — промпт для Claude Code
Промпт phase-10m-artifact-memory-architecture для Claude Code проектирует память агента, хранение артефактов и непрерывность долгих сессий после сжатия контекста без правки файлов.
Apache-2.0 ★ 1 497 обновлён 2026-06-16
.claude/commands/phase-10m-artifact-memory-architecture.mdЧто делает phase-10m-artifact-memory-architecture
Промпт переводит Claude Code в режим главного архитектора и инженера для проектирования работы агента в долгих сессиях. Основная задача — продумать поведение системы после сжатия контекста (compaction), чтобы модель не теряла ссылки на файлы, пути и созданные страницы. Анализ выполняется строго в режиме чтения без редактирования файлов проекта.
В тексте заложено разделение данных на три слоя: долговечные факты о пользователе, операционная память текущего прогона и поиск по истории транскрипта. Модели предстоит решить, нужна ли отдельная таблица chat_artifacts, как пробрасывать артефакты через MCP-инструменты или инъекцию контекста, и какой минимальный шаг внедрить в первую очередь.
Промпт требует прямого доступа к файлам проекта по указанным путям, включая src/memory/system.ts и schema.ts. Без этих исходников модель не сможет сослаться на конкретные строки и составить обоснованный план.
Какие задачи решает
- спроектировать архитектуру сессий агента после сжатия контекста
- разделить память пользователя, операционный контекст и историю транскриптов
- определить схему таблицы
chat_artifactsи способ её передачи через MCP - составить план тестирования и определить минимальный рабочий этап архитектуры
Примеры запросов агенту
- Выполни архитектурный анализ памяти агента по промпту phase-10m-artifact-memory-architecture
- /phase-10m-artifact-memory-architecture
Как установить phase-10m-artifact-memory-architecture
Вручную: положить файлы
.claude/commands/phase-10m-artifact-memory-architecture.mdКак использовать
Вставьте текст в начало диалога или в инструкции проекта
Вопросы о phase-10m-artifact-memory-architecture
Как установить phase-10m-artifact-memory-architecture в Claude Code?
Сохраните файл промпта по пути .claude/commands/phase-10m-artifact-memory-architecture.md в каталоге проекта. После этого команду можно запускать прямо в Claude Code.
Что делает этот промпт?
Он инициирует аудит архитектуры памяти агента, требуя разобрать разделение между долговременными фактами пользователя и операционными данными сессии.
Разрешает ли промпт вносить изменения в кодовую базу?
Нет, в инструкциях задан строгий запрет на редактирование файлов. Вывод ограничен рекомендациями, анализом компромиссов и планом тестов.
Исходный текст
phase-10m-artifact-memory-architecture.md · Apache-2.0
ultrathink. ultrathink. ultrathink. # Phase 10M Architecture Prompt: Artifacts, User Memory, Agent Continuity You are a principal engineer, principal architect, and principal product manager at Anthropic, all three at once. This is read-only architecture work. Do not edit files. 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. ## Context Cheema wants Phantom on Murph to handle long-running sessions like a serious agent product. After compaction, the agent should continue smoothly. It should not forget created pages, confuse magic-login links with artifacts, lose file paths, or make the user repeat prior context. He also raised an architectural split: - User memory: durable user-visible facts and preferences. - Agent continuity: operational facts for the current or recent runs, such as created files, page URLs, task status, failures, and transcript-search pointers. - Historical transcript: searchable prior chat records for recovery after compaction. Your job is to decide what should exist in Phantom versus Murph, what should be MCP tools versus built-in server state, and what the next shippable slice is. ## Required Reading Read: 1. `/Users/truffle/.claude/AGENTS.md` 2. `/Users/truffle/.claude/CLAUDE.md` 3. `/Users/truffle/work/murph/AGENTS.md` 4. `/Users/truffle/work/murph/VISION.md` 5. `/Users/truffle/work/murph/ARCHITECTURE.md` 6. `/Users/truffle/work/murph/PROGRESS.md` 7. `/Users/truffle/work/phantom-murph-hardening/CLAUDE.md` 8. `/Users/truffle/work/phantom-murph-hardening/docs/memory.md` 9. `/Users/truffle/work/phantom-murph-hardening/src/memory/system.ts` 10. `/Users/truffle/work/phantom-murph-hardening/src/chat/continuity-context.ts` 11. `/Users/truffle/work/phantom-murph-hardening/src/chat/transcript-search.ts` 12. `/Users/truffle/work/phantom-murph-hardening/src/chat/run-timeline.ts` 13. `/Users/truffle/work/phantom-murph-hardening/src/agent/in-process-reflective-tools.ts` 14. `/Users/truffle/work/phantom-murph-hardening/src/ui/tools.ts` 15. `/Users/truffle/work/phantom-murph-hardening/src/db/schema.ts` 16. Relevant notes under `/Users/truffle/work/notes-main`. ## Questions 1. Should created pages/files become a durable `chat_artifacts` table, or can run timelines plus stream events carry enough for now? 2. If we add artifacts, what exact schema is minimal but future-proof: type, title, URL, path, MIME, size, preview kind, safety metadata, retention, source tool, source message, source run? 3. Should artifacts be exposed to the agent through an MCP tool, injected continuity context, or both? 4. How should user memory stay separate from operational run continuity? 5. How should historical transcript search be presented to the agent after compaction without raw replay bloat? 6. What is the smallest next slice that improves real post-compaction behavior and user-visible UI without prematurely building a full artifact system? ## Acceptance Criteria - Cite file paths and line references. - Make a clear recommendation. - Include tradeoffs for MCP tool versus built-in server state versus UI-only. - Identify migration and testing requirements if a schema change is proposed. - Explicitly state what belongs in Murph and what belongs in Phantom. ## Anti-Patterns - Do not put Phantom-specific artifact logic into Murph. - Do not make TypeScript reason about user intent when an agent prompt/tool can do it better. - Do not store secrets, magic-login tokens, raw screenshots, or giant payloads as continuity facts. - Do not replace transcript search with raw transcript injection. ## Final Output Return: 1. Recommended architecture. 2. Minimal next slice. 3. Schema or no-schema decision. 4. Agent-facing tool/context decision. 5. Test plan. 6. Risks and non-goals. ultrathink. ultrathink. ultrathink.
© ghostwright · Apache-2.0 · ghostwright/phantom