Skip to main content
prompt GP ChatGPT

phase-10j-tool-card-collapse-research — Claude Code prompt

phase-10j-tool-card-collapse-research is a prompt for Claude Code and ChatGPT that examines Phantom tool cards: collapsing completed calls while keeping errors and blocked work visible.

Apache-2.0 ★ 1,497 updated 2026-06-16

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/commands/phase-10j-tool-card-collapse-research.md
Open on GitHub

What phase-10j-tool-card-collapse-research does

This is a focused research prompt designed to examine one specific UI problem. It asks you to act as engineer, architect, and product manager simultaneously and answer five concrete questions about tool card behavior: should cards start open or closed, where does that logic belong in the codebase, and how should it be tested.

The prompt requires reading ten files from your workspace—agent docs, quality standards, UI research notes, and component source (ToolCallCard, RunActivityRow, AssistantMessage). From that foundation, you produce a report with source-level recommendations, a behavioral specification, and a test plan ready to add.

Install the prompt into Claude Code's command directory; it will become available as .claude/commands/phase-10j-tool-card-collapse-research.md.

What it helps with

  • determine whether completed tool cards open by default on first load
  • identify state transitions that leave a card unexpectedly open
  • decide where the collapse logic should live in the component tree
  • define focused tests for card visibility behavior
  • ensure errors and blocked work remain visible

Example prompts for the agent

  • Run this research prompt in Claude Code to analyze tool card behavior in long chat sessions
  • Use the findings to guide changes to your ToolCallCard and AssistantMessage components
  • Apply the recommended tests to your existing test suite

How to install phase-10j-tool-card-collapse-research

Manually: put the files in place

.claude/commands/phase-10j-tool-card-collapse-research.md

Questions about phase-10j-tool-card-collapse-research

How do I install phase-10j-tool-card-collapse-research in Claude Code?

Place the prompt file at .claude/commands/phase-10j-tool-card-collapse-research.md. It will then be available as a Claude Code command.

What does this prompt do?

It reads your project files—component source, documentation, and research notes—and produces a focused report on how tool card collapse behavior should work, where to implement it, and what tests to add.

Who should use this prompt?

Developers working on Phantom's chat UI, specifically the ToolCallCard component, who need to understand the right approach to collapsing completed tool cards and testing that behavior.

Source text

phase-10j-tool-card-collapse-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.

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 one narrow Phantom chat UI behavior: completed tool cards should be collapsed by default, while active, blocked, or errored tool work should remain useful and inspectable. Do not edit files. Produce a concise report with the exact source-level recommendation and tests the builder should add.

# Required Reading

Read these files from the current workspace:

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-10d-chat-ui-polish-research.md`
7. `/Users/truffle/work/phantom-murph-hardening/chat-ui/src/components/tool-call-card.tsx`
8. `/Users/truffle/work/phantom-murph-hardening/chat-ui/src/components/run-activity-row.tsx`
9. `/Users/truffle/work/phantom-murph-hardening/chat-ui/src/components/assistant-message.tsx`
10. `/Users/truffle/work/phantom-murph-hardening/chat-ui/src/lib/chat-types.ts`
11. Existing chat UI tests under `/Users/truffle/work/phantom-murph-hardening/chat-ui/src/lib/__tests__/`

# Context

The user observed that completed tool cards look excellent but are too open by default in long sessions. The desired product behavior is:

1. Completed successful tool cards are collapsed by default.
2. Error, blocked, or attention-needed tool cards may auto-open.
3. Active tool cards may remain readable while the agent is working, but should not leave every completed tool expanded forever.
4. If the user explicitly expands a completed tool, that preference should not be immediately overridden.
5. The implementation should be small, explicit, accessible, and testable.

# Questions To Answer

1. Does `ToolCallCard` currently default completed tools closed on first mount?
2. What state transition could still leave a completed card open?
3. What is the smallest source-level policy that makes the behavior deterministic without making active tools feel dead?
4. Should the policy live inside `ToolCallCard`, in parent components, or in store state?
5. What focused tests should be added, given the current test setup?
6. Are there any accessibility details the implementation must preserve?

# Anti-patterns

- Do not propose a broad chat redesign in this report.
- Do not move UI disclosure state into the global chat store unless there is a strong reason.
- Do not hide error, blocked, or security-relevant tool details by default.
- Do not expose provider private thinking or raw internal protocol details.
- Do not add a dependency just for this.

# Deliverable

Write a report to:

`/Users/truffle/work/phantom-murph-hardening/research/chat-experience/phase-10j-tool-card-collapse-research.md`

Use this structure:

1. Findings
2. Recommended behavior policy
3. Recommended implementation
4. Recommended tests
5. Risks and non-goals

Keep it concise but precise. Cite file paths and function names. End with a verdict.

ultrathink. ultrathink. ultrathink.

© ghostwright · Apache-2.0 · ghostwright/phantom

Similar prompts

All prompts for Frontend and UI →

From the same set38

The whole set →
phase-10i-transcript-recovery-re-review The phase-10i-transcript-recovery-re-review prompt guides Claude Code through a second review of transcript-recovery fixes, including project file inspection, required checks, and a written report. GP ChatGPT ★ 1,497repo stars phase-10k-page-artifact-ui-builder phase-10k-page-artifact-ui-builder is a Claude Code prompt for extracting page artifacts from tool results and displaying them in a compact chat card. GP ChatGPT ★ 1,497repo stars phase-10l-phantom-continuity-researcher phase-10l-phantom-continuity-researcher is a Claude Code prompt for diagnosing session continuity in Phantom, including context compaction, transcript recovery, and SQLite state analysis. GP ChatGPT ★ 1,497repo stars phase-10l-murph-continuity-researcher phase-10l-murph-continuity-researcher investigates how Murph handles context compaction and interrupted turns, then produces a code-backed fix and test plan. It expects local Murph and Phantom repositories. GP ChatGPT ★ 1,497repo stars phase-10i-transcript-search-research phase-10i-transcript-search-research guides an architectural study for historical chat transcript search in Phantom after Murph compaction. Useful when planning agent context retrieval. GP ChatGPT ★ 1,497repo stars phase-10a-activity-correctness-reviewer The phase-10a-activity-correctness-reviewer prompt asks Claude Code to review Phantom’s Phase 10A patch and report concrete findings with file and line references. It targets changes in the named project. GP ChatGPT ★ 1,497repo stars phase-10m-chat-ui-polish-review phase-10m-chat-ui-polish-review — a read-only review prompt for Phantom's Murph chat UI: it walks the components, the run timeline and artifact cards, then ranks what to fix next. GP ChatGPT ★ 1,497repo stars phase-10m-artifact-memory-architecture phase-10m-artifact-memory-architecture is a Claude Code prompt for designing agent memory, artifact storage, and continuity across long sessions after context compaction, without editing files. GP ChatGPT ★ 1,497repo stars

Project sponsors

Companies that keep this analytics open