| name | plugin-planning |
| description | Interactive research and planning (Stages 0-1) for JUCE plugin development |
| allowed-tools | Read, Write, Edit, Bash, WebSearch, Grep, Glob |
| preconditions | creative-brief.md must exist in plugins/[Name]/.ideas/, Plugin must NOT already be past Stage 1 |
plugin-planning Skill
Purpose: Handle Stages 0-1 (Research and Planning) through interactive contract creation without subagents. This skill creates the foundation contracts (architecture.md, plan.md) that guide implementation.
Invoked by: /plan command (to be created) or as first step of /implement workflow
Entry Point
Check preconditions first:
- Verify creative brief exists:
if [ ! -f "plugins/${PLUGIN_NAME}/.ideas/creative-brief.md" ]; then
echo "✗ creative-brief.md not found - SKILL BLOCKED"
cat assets/precondition-failed.md
exit 1
fi
- Check plugin status in PLUGINS.md:
STATUS=$(grep -A 2 "^### ${PLUGIN_NAME}$" PLUGINS.md | grep "Status:" | awk '{print $2}')
- Check for existing contracts:
# Check what already exists
test -f "plugins/${PLUGIN_NAME}/.ideas/architecture.md" && echo "✓ architecture.md exists"
test -f "plugins/${PLUGIN_NAME}/.ideas/plan.md" && echo "✓ plan.md exists"
Resume logic:
Stage 0: Research
Goal: Create DSP architecture specification (architecture.md)
Duration: 5-10 minutes
Process:
- Read creative brief:
cat plugins/${PLUGIN_NAME}/.ideas/creative-brief.md
Identify plugin technical approach:
- Audio effect, MIDI effect, synthesizer, or utility?
- Input/output configuration (mono, stereo, sidechain)
- Processing type (time-domain, frequency-domain, granular)
Research JUCE DSP modules:
- Search for relevant juce::dsp classes for the identified plugin type
- Use WebSearch for JUCE documentation and examples
- Document specific classes (e.g., juce::dsp::Gain, juce::dsp::IIR::Filter)
Research professional plugin examples:
- Search web for industry leaders (FabFilter, Waves, UAD, etc.)
- Document 3-5 similar plugins
- Note sonic characteristics and typical parameter ranges
Research parameter ranges:
- Industry-standard ranges for plugin type
- Typical defaults (reference professional plugins)
- Skew factors for nonlinear ranges
Check design sync (if mockup exists):
- Look for
plugins/${PLUGIN_NAME}/.ideas/mockups/v*-ui.yaml - If exists: Compare mockup parameters with creative brief
- If conflicts found: Invoke design-sync skill to resolve
- Document sync results
- Look for
Output:
Create plugins/${PLUGIN_NAME}/.ideas/architecture.md using the template from assets/architecture-template.md.
Required sections:
- Title:
# DSP Architecture: [PluginName] - Contract header (immutability statement)
## Core Components- Each DSP component with structured format## Processing Chain- ASCII diagram showing signal flow## Parameter Mapping- Table mapping parameter IDs to components## Algorithm Details- Implementation approach for each algorithm## Special Considerations- Thread safety, performance, denormals, sample rate## Research References- Professional plugins, JUCE docs, technical resources
State management:
- Create/update
.continue-here.md:
Create .continue-here.md using template from assets/continue-stage-0-template.md with variables:
${PLUGIN_NAME}- Plugin name${TIMESTAMP}- Current timestamp
Update PLUGINS.md status to
🚧 Stage 0and add timeline entryGit commit:
git add plugins/${PLUGIN_NAME}/.ideas/architecture.md plugins/${PLUGIN_NAME}/.continue-here.md PLUGINS.md
git commit -m "$(cat <<'EOF'
feat: [PluginName] Stage 0 - research complete
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Decision menu (numbered format):
Display menu from assets/decision-menu-stage-0.md
Stage 1: Planning
Goal: Calculate complexity and create implementation plan (plan.md)
Duration: 2-5 minutes
Preconditions:
Check for required contracts:
PARAM_SPEC_EXISTS=$(test -f "plugins/${PLUGIN_NAME}/.ideas/parameter-spec.md" && echo "true" || echo "false")
ARCH_EXISTS=$(test -f "plugins/${PLUGIN_NAME}/.ideas/architecture.md" && echo "true" || echo "false")
echo "Parameter spec: ${PARAM_SPEC_EXISTS}"
echo "Architecture: ${ARCH_EXISTS}"
Exit skill and wait for user to create contracts.
Process (contracts confirmed present):
- Read all contracts:
cat plugins/${PLUGIN_NAME}/.ideas/parameter-spec.md
cat plugins/${PLUGIN_NAME}/.ideas/architecture.md
- Calculate complexity score:
Formula:
score = min(param_count / 5, 2.0) + algorithm_count + feature_count
Cap at 5.0
Extract metrics:
From parameter-spec.md:
- Count parameters (each parameter definition = 1)
- param_score = min(param_count / 5, 2.0)
From architecture.md:
- Count distinct DSP algorithms/components
- algorithm_count = number of juce::dsp classes or custom algorithms
Features to identify (from architecture.md):
- Feedback loops present? (+1)
- FFT/frequency domain processing? (+1)
- Multiband processing? (+1)
- Modulation systems (LFO, envelope)? (+1)
- External MIDI control? (+1)
- feature_count = sum of above
Display breakdown:
Complexity Calculation:
- Parameters: [N] parameters ([N/5] points, capped at 2.0) = [X.X]
- Algorithms: [N] DSP components = [N]
- Features: [List features] = [N]
Total: [X.X] / 5.0
Determine implementation strategy:
- Simple (score ≤ 2.0): Single-pass implementation
- Complex (score ≥ 3.0): Phase-based implementation with staged commits
For complex plugins, create phases:
Stage 4 (DSP) phases:
- Phase 4.1: Core processing (essential audio path)
- Phase 4.2: Parameter modulation (APVTS integration)
- Phase 4.3: Advanced features (if applicable)
Stage 5 (GUI) phases:
- Phase 5.1: Layout and basic controls
- Phase 5.2: Advanced UI elements
- Phase 5.3: Polish and styling (if applicable)
Each phase needs description, test criteria, estimated duration.
Output:
Create plugins/${PLUGIN_NAME}/.ideas/plan.md using the template from assets/plan-template.md.
State management:
- Update
.continue-here.md:
Create .continue-here.md using template from assets/continue-stage-1-template.md with variables:
${PLUGIN_NAME}- Plugin name${TIMESTAMP}- Current timestamp${COMPLEXITY_SCORE}- Calculated complexity score${PHASED_IMPLEMENTATION}- true/false${IMPLEMENTATION_STRATEGY}- "Single-pass" or "Phased implementation"
Update PLUGINS.md status to
🚧 Stage 1and add timeline entryGit commit:
git add plugins/${PLUGIN_NAME}/.ideas/plan.md plugins/${PLUGIN_NAME}/.continue-here.md PLUGINS.md
git commit -m "$(cat <<'EOF'
feat: [PluginName] Stage 1 - planning complete
Complexity: [X.X]
Strategy: [Single-pass | Phased implementation]
🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
Decision menu (numbered format):
Display menu from assets/decision-menu-stage-1.md
Handoff to Implementation
When user chooses to proceed to Stage 2:
- Create implementation handoff at plugin root:
# IMPORTANT: Create at plugins/${PLUGIN_NAME}/.continue-here.md (NOT in .ideas/)
# Use template from assets/implementation-handoff-template.md
cat > plugins/${PLUGIN_NAME}/.continue-here.md <<'EOF'
[template content from assets/implementation-handoff-template.md]
EOF
- Verify handoff:
test ! -f "plugins/${PLUGIN_NAME}/.ideas/.continue-here.md" || { echo "✗ Old handoff still exists"; exit 1; }
test -f "plugins/${PLUGIN_NAME}/.continue-here.md" || { echo "✗ New handoff not created"; exit 1; }
echo "✓ Handoff verified"
Display to user:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✓ Planning Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Plugin: [PluginName]
Complexity: [X.X] ([Simple/Complex])
Strategy: [Single-pass | Phased implementation]
Contracts created:
✓ creative-brief.md
✓ parameter-spec.md
✓ architecture.md
✓ plan.md
Ready to build. Run: /implement [PluginName]
Reference Files
Detailed stage implementations are in:
references/stage-0-research.md- Research stage detailsreferences/stage-1-planning.md- Planning stage details
Templates are in:
assets/architecture-template.md- DSP architecture contract templateassets/plan-template.md- Implementation plan template