Fix bugs, add features to completed plugins. Includes versioning, backups, regression testing, changelog automation. Auto-detects deep-research handoffs to preserve investigation context. Trigger terms - improve, fix, add feature, modify plugin, version bump, rollback
Purpose: Make changes to completed plugins with versioning, backups, changelog automation, and root cause investigation.
Integration with deep-research:
<handoff_protocol> Trigger: deep-research invokes plugin-improve via Skill tool Detection: Phase 0.45 scans conversation history for research findings (MANDATORY) Action: Extract research findings, skip investigation (Phase 0.5) Benefits: Preserve expensive research context (Opus + extended thinking) </handoff_protocol>
Detection mechanism is implemented in Phase 0.45 below. See references/handoff-protocols.md for additional workflow documentation.
Phase 0: Specificity Detection (assess request clarity)
↓
[Specific?] ─NO→ Present menu (brainstorm OR investigate)
↓ YES
Phase 0.3: Clarification Questions (4 targeted questions)
↓
Phase 0.4: Decision Gate (confirm understanding)
↓
Phase 0.45: Research Detection (MANDATORY - scan conversation history)
↓
[Research found?] ─YES→ Skip to Phase 0.9
↓ NO
Phase 0.5: Investigation (Tier 1/2/3 auto-detected)
↓
Phase 0.9: Backup Verification (CRITICAL GATE - must pass to proceed)
↓
Phase 1: Pre-Implementation Checks (version, state, commits)
↓
Phase 2: Verify Rollback Path (confirm backup ready)
↓
Phase 3: Implementation (make changes)
↓
Phase 4: CHANGELOG Update (document changes)
↓
Phase 5: Build and Test (delegate to build-automation)
↓
Phase 5.5: Regression Testing (conditional: if plugin-testing + baseline exist)
↓
Phase 6: Git Workflow (stage changes, prepare commit)
↓
Phase 7: Installation (optional, delegate to plugin-lifecycle)
↓
Phase 8: Completion (decision menu)
Key:
Copy this checklist and check off phases as you complete them:
Improvement Progress:
- [ ] Phase 0: Assessed request specificity
- [ ] Phase 0.3: Asked clarification questions (if needed)
- [ ] Phase 0.4: Confirmed understanding with user
- [ ] Phase 0.45: ✓ MANDATORY - Scanned conversation history for research
- [ ] Phase 0.5: Investigated root cause (if no handoff)
- [ ] Phase 0.9: ✓ CRITICAL - Backup verified (blocks if fails)
- [ ] Phase 1: Loaded current state, determined version bump
- [ ] Phase 2: Confirmed rollback path ready
- [ ] Phase 3: Implemented changes
- [ ] Phase 4: Updated CHANGELOG
- [ ] Phase 5: Built and tested (delegated to build-automation)
- [ ] Phase 5.5: Ran regression tests (if available)
- [ ] Phase 6: Staged git changes
- [ ] Phase 7: Installed plugin (if requested)
- [ ] Phase 8: Presented completion menu
<gate_preconditions enforcement="strict">
MUST execute before any other phase. BLOCK if conditions not met.
Before starting, verify:
grep "^### $PLUGIN_NAME$" PLUGINS.md
[PluginName] is still in development (Stage [N]).
Complete the workflow first with /continue [PluginName].
Cannot use /improve on in-progress plugins.
Note: The workflow now has 3 stages with automatic validation.
Stage 1-3 complete = plugin ready for improvement.
[PluginName] is not implemented yet (Status: 💡 Ideated).
Use /implement [PluginName] to build it first.
Plugin [PluginName] not found in PLUGINS.md.
</gate_preconditions>
Check if request is specific:
Request IS specific if it has:
Request IS vague if lacking above:
Assess specificity:
Your request needs more detail. How should I proceed?
1. Brainstorm approaches together - I'll ask questions to explore options
2. Implement something reasonable - I'll investigate and propose a solution
3. Other
Choose (1-3): _
Handle responses:
Purpose: Detect headless plugins and offer "Create custom UI" option before proceeding to normal improvement flow.
Workflow:
gui_type fieldgui_type: headless OR WebView UI files don't exist → Plugin is headlessSee: references/headless-ui-workflow.md for complete detection logic, menu flows, gui-agent invocation, state updates, and completion protocol.
If NOT headless: Skip to Phase 0.3 (normal flow)
See: references/clarification-protocol.md for 4 targeted questions (what to change, scope, version bump, testing approach). Collect all responses before proceeding to Phase 0.4.
Show user what you understand, ask for confirmation:
I understand you want to:
- [Summary of change from Question 1]
- Scope: [Answer from Question 2]
- Version bump: [Answer from Question 3]
- Regression testing: [Answer from Question 4]
Is this correct?
1. Yes, proceed - Continue to Phase 0.45 (Research Detection)
2. No, refine - Ask me follow-up questions
3. No, cancel - Stop the workflow
4. Other
Choose (1-4): _
Handle responses:
MANDATORY: Scan conversation history for deep-research findings to avoid duplicate investigation.
See: references/research-detection.md for complete detection algorithm, extraction logic, and decision trees.
Decision: If research detected → Skip to Phase 0.9 | If not detected → Continue to Phase 0.5
Purpose: Find root causes, prevent band-aid fixes
Workflow:
See: references/investigation-tiers.md for complete tier detection algorithm and protocols for each tier (1: Basic Code Inspection, 2: Root Cause Analysis, 3: Deep Research Delegation).
<critical_sequence phase="backup-verification" enforcement="strict">
CRITICAL INVARIANT: Phase 1 MUST NOT execute until backup verified. ENFORCEMENT: Block execution, halt workflow if backup fails. VIOLATION CONSEQUENCE: Data loss, no rollback path.
Goal: Ensure rollback is possible if improvement fails
Process:
backups/[PluginName]/v[CurrentVersion]/./scripts/verify-backup.sh [PluginName] [CurrentVersion]See: assets/backup-template.sh for complete backup creation script.
</critical_sequence>
<phase id="1" name="pre-implementation" dependencies="backup-verification"> ## Phase 1: Pre-Implementation ChecksDEPENDENCY: MUST NOT execute until Phase 0.9 (Backup Verification) completes.
Load current state (parallelize file reads):
Read these files in parallel using multiple Read tool calls:
git log --oneline plugins/[PluginName]/ -10Determine version bump:
Present choice:
Current version: v[X.Y.Z]
What type of change is this?
1. PATCH (v[X.Y.Z] → v[X.Y.Z+1]) - Bug fixes, cosmetic changes
2. MINOR (v[X.Y] → v[X.Y+1]) - New features, enhancements
3. MAJOR (v[X] → v[X+1]) - Breaking changes (presets won't load, parameters changed)
Choose (1-3): _
If Major version selected, warn:
⚠️ Major version bump will break compatibility.
Breaking changes include:
- Changed parameter IDs (presets won't load)
- Removed parameters (sessions will have missing automation)
- Changed state format (existing sessions corrupted)
Are you sure? This should be rare. (y/n): _
Calculate new version based on selection.
Check for breaking changes BEFORE confirming version bump:
Breaking if:
If breaking changes detected: Force MAJOR version bump, warn user, require confirmation.
See: references/breaking-changes.md for detailed detection criteria and edge cases.
</phase><critical_sequence phase="backup-creation" enforcement="strict">
Baseline backup verified in Phase 0.9. Confirm ready to proceed:
✓ Backup verified: backups/[PluginName]/v[CurrentVersion]/
Ready to implement changes for v[NewVersion]
</critical_sequence>
<phase id="3" name="implementation" dependencies="backup-creation"> ## Phase 3: ImplementationDEPENDENCY: MUST NOT execute until Phase 2 (Backup Creation) completes. SAFETY: If implementation fails, rollback path guaranteed by Phase 2 backup.
Execute the change:
Follow best practices:
Log changes as you go for CHANGELOG.
</phase>Add version entry at top of CHANGELOG.md with technical details:
Required fields:
Sections by version type:
See: references/changelog-format.md for complete template structure, section usage guide, and examples by version type (PATCH/MINOR/MAJOR).
<delegation_rule target="build-automation" required="true">
DELEGATION: MUST invoke build-automation skill for all build operations. REASON: Centralized build logic, 7-phase pipeline with verification.
1. Build: Invoke build-automation skill - handles full build pipeline, installation, cache clearing, and failure protocol.
2. Test: After build succeeds, invoke plugin-testing skill - present 4-option menu (automated tests, pluginval, manual DAW testing, skip).
</delegation_rule>
<validation_gate gate="regression-tests" required="conditional">
GATE CONDITION: Conditional - only runs if both conditions met GATE FAILURE: Present rollback options, require user decision
Conditions required:
backups/[Plugin]/v[baseline]/If conditions not met: Skip regression tests, warn user, add note to CHANGELOG, continue to Phase 6.
If conditions met:
See: references/regression-testing.md for complete RegressionReport interface, comparison logic, and rollback decision trees.
</validation_gate>
Stage changes: git add plugins/[PluginName]/ backups/[PluginName]-v[X.Y.Z]-[timestamp]/
Commit format: improve: [PluginName] v[X.Y.Z] - [description]
Tag release: git tag -a "v[X.Y.Z]" -m "[PluginName] v[X.Y.Z]"
Note: Display git commands for user to run manually. Do not execute git commit or git push.
<delegation_rule target="plugin-lifecycle" required="false">
If user requested installation: Invoke plugin-lifecycle skill, then update PLUGINS.md and NOTES.md (version, status, timeline entry).
</delegation_rule>
<checkpoint_protocol>
Present numbered decision menu (inline format, NOT AskUserQuestion tool):
Options: Test in DAW, Make another improvement, Create new plugin, Document this change, Other
</checkpoint_protocol>
Phase 7 enhancements (2025-11):
See: architecture/17-testing-strategy.md, scripts/verify-backup.sh, references/regression-testing.md
Invoked by:
/improve commandplugin-ideation skill (after improvement brief)Invokes:
plugin-ideation skill (if vague request, user chooses brainstorm)deep-research skill (Tier 3 investigation) - Phase 7build-automation skill (building) - Phase 4plugin-testing skill (validation)plugin-lifecycle skill (installation)Updates:
Creates:
backups/[PluginName]-v[X.Y.Z]-[timestamp]/v[X.Y.Z]Build failure: Present investigation menu, wait for user decision.
Test failure: Present investigation menu, don't proceed to installation.
Breaking change detected: Warn user, require confirmation, force MAJOR version.
Backup creation fails: STOP immediately, don't proceed with changes.
Git operations fail: Log warning, continue (non-critical).
Improvement is successful when:
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer