Compare commits

...

1 Commits

Author SHA1 Message Date
Claude
4ffa4f07ff Add plan-auto-show plugin to display plan after updates
When in plan mode, users couldn't see the plan without typing /plan,
but they also couldn't type /plan while being asked follow-up questions.

This plugin adds a SessionStart hook that instructs Claude to
automatically display the plan content after updating the plan file,
showing it before any follow-up questions.

Fixes the UX issue where users need to answer questions about a plan
they can't see.
2025-12-15 17:56:08 +00:00
3 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
# Plan Auto-Show Plugin
Automatically displays the plan content when it's updated in plan mode, eliminating the need to type `/plan` to preview changes.
## Problem
When in plan mode, Claude updates the plan file and may ask follow-up questions. Users can't see the plan without typing `/plan`, but they also can't type `/plan` while being asked questions - they need to respond to the questions first.
## Solution
This plugin instructs Claude to automatically display the plan content in its response whenever it updates the plan file. The plan is shown before any follow-up questions, giving users the context they need to answer.
## Installation
1. Enable the plugin in your Claude Code settings
2. The SessionStart hook will automatically add instructions for plan auto-display
## How It Works
The plugin adds a SessionStart hook that provides additional context to Claude:
- After updating the plan file, Claude will display the full plan content
- The plan is shown in a markdown code block
- The plan appears before any follow-up questions
## Example
Before this plugin:
```
Claude: I've updated the plan file. Would you prefer approach A or B?
User: (Can't see the plan without typing /plan, but needs to answer the question)
```
After this plugin:
```
Claude: I've updated the plan file:
## Current Plan
1. Implement feature X
2. Add tests
3. Deploy
Would you prefer approach A or B?
User: (Can see the plan and answer the question)
```

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
# Auto-show plan content after updates in plan mode
# This hook adds instructions to automatically display the plan when updated
cat << 'EOF'
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"additionalContext": "## Plan Mode Auto-Display\n\nWhen you are in plan mode and you update the plan file:\n\n1. After writing or editing the plan file, ALWAYS display the full plan content in a markdown code block in your response\n2. Use the format:\n ```markdown\n ## Current Plan\n [full plan content here]\n ```\n3. This ensures the user can see the plan without needing to run `/plan`, which is especially important when you're asking follow-up questions\n4. Show the plan BEFORE asking any clarifying questions, so the user has context for their answers\n\nThis improves the user experience by making the plan visible immediately after updates, without requiring separate commands."
}
}
EOF
exit 0

View File

@@ -0,0 +1,15 @@
{
"hooks": {
"SessionStart": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-start.sh"
}
]
}
]
}
}