Implement approved technical plans from thoughts/shared/plans/
Executes approved technical plans from thoughts/shared/plans/ with phase-by-phase implementation and verification
/plugin marketplace add coalesce-labs/catalyst/plugin install catalyst-dev@catalystinheritYou are tasked with implementing an approved technical plan from thoughts/shared/plans/. These
plans contain phases with specific changes and success criteria.
Before executing, verify required tools are installed:
if [[ -f "${CLAUDE_PLUGIN_ROOT}/scripts/check-prerequisites.sh" ]]; then
"${CLAUDE_PLUGIN_ROOT}/scripts/check-prerequisites.sh" || exit 1
fi
STEP 1: Auto-discover recent plan (REQUIRED)
IMMEDIATELY run this bash script BEFORE any other response:
# Auto-discover most recent plan from workflow context
if [[ -f "${CLAUDE_PLUGIN_ROOT}/scripts/workflow-context.sh" ]]; then
RECENT_PLAN=$("${CLAUDE_PLUGIN_ROOT}/scripts/workflow-context.sh" recent plans)
if [[ -n "$RECENT_PLAN" ]]; then
echo "š Auto-discovered recent plan: $RECENT_PLAN"
echo ""
fi
fi
STEP 2: Determine which plan to implement
After running the auto-discovery script, follow this logic:
If user provided a plan path as parameter:
If no parameter provided AND RECENT_PLAN was found:
If no parameter AND no RECENT_PLAN found:
thoughts/shared/plans/STEP 3: Read and prepare
Once you have a plan path:
Plans are carefully designed, but reality can be messy. Your job is to:
When things don't match the plan exactly, think about why and communicate clearly. The plan is your guide, but your judgment matters too.
If you encounter a mismatch:
STOP and think deeply about why the plan can't be followed
Present the issue clearly:
Issue in Phase [N]:
Expected: [what the plan says]
Found: [actual situation]
Why this matters: [explanation]
How should I proceed?
After implementing a phase:
make check test covers everything)Don't let verification interrupt your flow - batch it at natural stopping points.
Monitor context proactively throughout implementation:
After Each Phase:
ā
Phase {N} complete!
## š Context Status
Current usage: {X}% ({Y}K/{Z}K tokens)
{If >60%}:
ā ļø **Context Alert**: We're at {X}% usage.
**Recommendation**: Create a handoff before continuing to Phase {N+1}.
**Why?** Implementation accumulates context:
- File reads
- Code changes
- Test outputs
- Error messages
- Context clears ensure continued high performance
**Options**:
1. ā
Create handoff and clear context (recommended)
- Use `/create-handoff` to generate properly formatted handoff
- Format: `thoughts/shared/handoffs/{ticket}/YYYY-MM-DD_HH-MM-SS_description.md`
- Includes timestamp for lexical sorting by recency
2. Continue to next phase (if close to completion)
**To resume**: Start fresh session, run `/implement-plan {plan-path}`
(The plan file tracks progress with checkboxes - you'll resume automatically)
{If <60%}:
ā
Context healthy. Ready for Phase {N+1}.
When to Warn:
Educate About Phase-Based Context:
Creating a Handoff:
When recommending a handoff, guide the user:
/create-handoffthoughts/shared/handoffs/{ticket}/YYYY-MM-DD_HH-MM-SS_description.mdWhen something isn't working as expected:
Use sub-tasks sparingly - mainly for targeted debugging or exploring unfamiliar territory.
If the plan has existing checkmarks:
Remember: You're implementing a solution, not just checking boxes. Keep the end goal in mind and maintain forward momentum.