phase-10i-memory-architecture-research — Claude Code prompt
phase-10i-memory-architecture-research — a Claude slash command that researches how Phantom chat should keep user-facing memory apart from the agent's working memory, then writes a report with a plan.
Apache-2.0 ★ 1,497 updated 2026-06-16
.claude/commands/phase-10i-memory-architecture-research.mdWhat phase-10i-memory-architecture-research does
The prompt turns one session into a design study. Claude takes the roles of principal engineer, architect and product manager at once, and works out how two memory surfaces should coexist in Phantom chat: what the operator reads and edits, and what the agent needs to resume work after compaction.
It opens with a reading list of source files: prompt-assembler.ts, working-memory.ts, context-builder.ts, memory/system.ts, memory-files.ts and more, plus the tests that pin down intended behaviour. Then a run of questions: what exists today, what reaches the agent in the prompt, what arrives through phantom_memory_search and phantom_history, where privacy stops. Output goes to research/chat-experience/phase-10i-memory-architecture-research.md, and application code stays untouched.
Every path points at /Users/truffle/work/phantom-murph-hardening, so on another checkout the run stalls until you rewrite them. The constraints are spelled out: no raw chain-of-thought, no whole transcripts pushed into prompts, no base64 or credentials landing in user memory, and a cloud deployment that survives a process restart.
What it helps with
- split memory into a user-facing surface and an agent-facing one
- audit what the agent already gets in its prompt
- trace existing memory code across files and tests
- set privacy boundaries for what users may see
- get a report with the next slice and the tests it needs
Example prompts for the agent
- Run
/phase-10i-memory-architecture-researchagainst the phantom repo and start with the current-state inventory /phase-10i-memory-architecture-research, and keep the report underresearch/chat-experience/- Run the memory architecture research command and name the smallest slice that improves continuity after compaction
How to install phase-10i-memory-architecture-research
Manually: put the files in place
.claude/commands/phase-10i-memory-architecture-research.mdHow to use
Paste the text at the start of a chat or into project instructions
Questions about phase-10i-memory-architecture-research
How to install phase-10i-memory-architecture-research in Claude Code?
Copy the file into your project at .claude/commands/phase-10i-memory-architecture-research.md. Then call it as /phase-10i-memory-architecture-research.
What does phase-10i-memory-architecture-research do?
It casts Claude as engineer, architect and product manager for one research pass over Phantom chat's dual memory, covering both the operator-facing view and agent continuity. The run ends with a written report and leaves application code alone.
Does it need a specific repository layout?
Yes. The prompt reads files under /Users/truffle/work/phantom-murph-hardening by absolute path, so a different checkout means editing those paths before the command finds anything.
Source text
phase-10i-memory-architecture-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 Phase 10I for Phantom on Murph in `/Users/truffle/work/phantom-murph-hardening`. 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. ## Mission Research the correct production architecture for dual memory in Phantom chat: 1. A user-visible memory surface: things the operator can see, understand, edit, and trust. 2. An agent-visible operational memory surface: things the agent needs to continue work after compaction, remember task state, and avoid asking the user to repeat context. The immediate product direction is that post-compaction work should continue naturally. The agent should have enough historical transcript access to recover details that were compacted away, but this must not turn into a giant prompt dump or unsafe leakage of hidden tool internals. Write your report to: `/Users/truffle/work/phantom-murph-hardening/research/chat-experience/phase-10i-memory-architecture-research.md` Do not edit application code. ## Required Reading Read these files directly: 1. `/Users/truffle/.claude/AGENTS.md` 2. `/Users/truffle/.claude/CLAUDE.md` 3. `/Users/truffle/work/murph/QUALITY-BAR.md` 4. `/Users/truffle/work/phantom-murph-hardening/CLAUDE.md` 5. `/Users/truffle/work/phantom-murph-hardening/research/chat-experience/phase-10h-product-direction.md` 6. `/Users/truffle/work/phantom-murph-hardening/research/chat-experience/phase-10h-live-verification.md` 7. `/Users/truffle/work/phantom-murph-hardening/src/agent/prompt-assembler.ts` 8. `/Users/truffle/work/phantom-murph-hardening/src/agent/prompt-blocks/agent-memory-instructions.ts` 9. `/Users/truffle/work/phantom-murph-hardening/src/agent/prompt-blocks/working-memory.ts` 10. `/Users/truffle/work/phantom-murph-hardening/src/agent/chat-query.ts` 11. `/Users/truffle/work/phantom-murph-hardening/src/agent/murph-context.ts` 12. `/Users/truffle/work/phantom-murph-hardening/src/agent/in-process-reflective-tools.ts` 13. `/Users/truffle/work/phantom-murph-hardening/src/memory/context-builder.ts` 14. `/Users/truffle/work/phantom-murph-hardening/src/memory/system.ts` 15. `/Users/truffle/work/phantom-murph-hardening/src/ui/api/memory-files.ts` Also inspect any tests that define the intended behavior. ## Questions To Answer 1. What memory surfaces already exist, by exact file path and behavior? 2. Which surface is currently user-visible, which is agent-visible, and which is both? 3. What does the agent already receive in the prompt before a run? 4. What does the agent already get through tools such as `phantom_memory_search` and `phantom_history`? 5. What should "for-agent memory" mean in product terms, and where should it live? 6. What should "for-user memory" mean in product terms, and where should it render? 7. What should never be shown to users, but may be used by the agent for continuity? 8. What is the smallest safe next builder slice that improves post-compaction continuity without over-building? ## Design Constraints - Keep Murph generic. Phantom-specific memory UI and session history belong in Phantom. - Do not expose raw chain-of-thought. - Do not dump entire transcripts into prompts. - Do not store raw base64, credentials, or unredacted tool full outputs in user memory. - Prefer existing storage and APIs before adding new systems. - A future cloud deployment must be durable across process restarts. ## Deliverable Format Write: 1. Executive recommendation. 2. Current state inventory. 3. Proposed memory taxonomy. 4. Proposed agent prompt/tool contract. 5. Proposed user-visible UI/API contract. 6. Risks and privacy boundaries. 7. Smallest next builder slice with exact files likely touched and tests required. ultrathink. Be specific. Cite exact files and functions. Do not rely on summaries.
© ghostwright · Apache-2.0 · ghostwright/phantom