devkit.prompt-optimize
Provides expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement. Use when you need to improve…
Recover from a broken state - diagnose issues, revert if needed, restore working state
> /plugin marketplace add giuseppe-trisciuoglio/developer-kit > /plugin install developer-kit@developer-kit
How it fires
How this command gets triggered: by you, by Claude, or both.
/devkit.lra.recoverContext preview
What this command does when you run it.
Recover from a broken state - diagnose issues, revert if needed, restore working state
description: Recover from a broken state - diagnose issues, revert if needed, restore working state argument-hint: "[issue-description]" allowed-tools: Read, Write, Edit, Bash
Use this command when the project is in a broken state and needs recovery.
First, understand what's broken:
1. **Check for syntax errors**:
# For JS/TS projects npm run lint 2>&1 | head -50 # For Java projects mvn compile 2>&1 | head -50 # For Python projects python -m py_compile main.py
2. **Check for failing tests**:
npm test 2>&1 | tail -50 # or mvn test 2>&1 | tail -50
3. **Try to start the app**:
# Check init script cat .lra/init.sh
4. **Check progress log for context**:
tail -50 .lra/progress.txt
Look at git history to find when things broke:
# See recent changes git log --oneline -10 # See what changed in last commit git show --stat HEAD # See diff of specific file git diff HEAD~1 -- [problematic-file]
Choose the appropriate recovery strategy:
If the issue is small and obvious: 1. Fix the specific issue 2. Test to confirm fix 3. Commit the fix 4. Update progress.txt with what happened
If the last commit broke things:
# See what will be reverted git show HEAD # Revert (creates new commit) git revert HEAD --no-edit # Or soft reset to keep changes staged git reset --soft HEAD~1
If multiple commits are problematic:
# Find last working commit git log --oneline -20 # Reset to that commit (keeps changes) git reset --soft [commit-hash] # Or hard reset (discards changes) git reset --hard [commit-hash]
If you need to investigate without losing work:
git stash # investigate... git stash pop # restore changes
After applying a fix:
1. **Run tests**:
npm test
2. **Start the app**:
source .lra/init.sh
3. **Verify core functionality**:
Update `.lra/progress.txt`:
--- ### Recovery Session - [Date] **Problem**: [What was broken] **Cause**: [Why it broke] **Solution**: [How it was fixed] **Commits Reverted**: [If any] **Lessons Learned**: - [What to avoid in future] ---
If a feature was incorrectly marked as passed:
# Use the mark-feature command /developer-kit:devkit.lra.mark-feature [feature-id] failed [reason for failure]
Provide a recovery report:
═══════════════════════════════════════════════════════════
RECOVERY COMPLETE
═══════════════════════════════════════════════════════════
🔍 Problem Identified
Issue: TypeError in auth middleware
Cause: Undefined variable after refactor
Affected: F022 - User login flow
🔧 Recovery Action
Strategy: Quick Fix
Changes: Fixed undefined check in middleware
Commit: def5678 - fix(auth): handle undefined user object
✅ Verification
Tests: All passing (42/42)
App: Starts successfully
Core functionality: Working
📝 Updated Records
- progress.txt: Recovery documented
- F022 status: Remains passed (fix was minor)
💡 Recommendation
Continue with normal workflow using /developer-kit:devkit.lra.start-session
═══════════════════════════════════════════════════════════**Agent Selection**: To execute this LRA task, use the following approach:
Modular plugin marketplace for Claude Code and agentic CLIs, with validated, spec-driven skills, agents, commands, and workflows for Java, TypeScript, Python, PHP, AWS, and AI.
Repo: giuseppe-trisciuoglio/developer-kit
Provides expert prompt optimization using advanced techniques (CoT, few-shot, constitutional AI) for LLM performance enhancement. Use when you need to improve…
Provides guided feature development capability with codebase understanding and architecture focus. Use when implementing a new feature from scratch.
Provides guided bug fixing and debugging capability with systematic root cause analysis. Use when encountering bugs, errors, or unexpected behavior.
Creates a GitHub pull request with branch creation, commits, and detailed description. Use when you need to submit changes for review.
Provides comprehensive GitHub pull request review with code quality, security, and best practices analysis. Use when reviewing a PR before merging.
Provides guided code refactoring capability with deep codebase understanding, compatibility options, and comprehensive verification. Use when restructuring or…