Add prompt-refactor meta-skill and SWE-Bench modular skills#42
Draft
juanmichelini wants to merge 1 commit intomainfrom
Draft
Add prompt-refactor meta-skill and SWE-Bench modular skills#42juanmichelini wants to merge 1 commit intomainfrom
juanmichelini wants to merge 1 commit intomainfrom
Conversation
This PR adds 7 new skills for decomposing monolithic prompts into modular, reusable components: 1. **prompt-refactor** - Meta-skill for analyzing and refactoring prompts - Includes analyze_prompt.py script for automated prompt analysis - Includes skill-design-patterns.md reference documentation 2. **code-issue-analysis** - Skill for analyzing bug reports and issue descriptions 3. **code-exploration** - Skill for exploring codebases to understand structure 4. **test-reproduction** - Skill for creating reproduction scripts 5. **fix-analysis** - Skill for analyzing problems and planning fixes 6. **code-implementation** - Skill for implementing fixes with best practices 7. **code-verification** - Skill for thorough testing and verification These skills were created by refactoring the SWE-Bench prompt template, transforming a monolithic 3874-character prompt into modular, reusable skills. Each skill contains: - Frontmatter metadata with name and description - Clear overview and when to use guidance - Step-by-step workflow - Best practices and examples Benefits: - Reusable across different benchmarks and use cases - More maintainable than monolithic prompts - Better context window management through progressive disclosure - Easier to test and iterate on individual components Co-authored-by: openhands <openhands@all-hands.dev>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a new approach to managing prompt complexity by decomposing monolithic prompts into modular, reusable skills.
What's Added
1. prompt-refactor (Meta-Skill)
A meta-skill that helps decompose monolithic prompts into modular, reusable components:
2. SWE-Bench Modular Skills (6 skills)
Six specialized skills created by refactoring the SWE-Bench prompt template:
Why This Matters
Before (Monolithic Prompt)
After (Modular Skills)
Benefits
Example Usage
The prompt-refactor meta-skill can be used to refactor other monolithic prompts:
The SWE-Bench skills can be referenced in new prompt templates or used directly by OpenHands when solving coding issues.
Testing
All skills follow the established SKILL.md format with:
Related Work
This is part of a larger effort to transform the SWE-Bench benchmark prompt architecture. A corresponding PR will be created for the benchmarks repository with a new
skills.j2template that references these modular skills.Files Changed
skills/prompt-refactor/SKILL.md- Meta-skill documentationskills/prompt-refactor/scripts/analyze_prompt.py- Prompt analysis toolskills/prompt-refactor/references/skill-design-patterns.md- Design patternsskills/code-issue-analysis/SKILL.md- Issue analysis skillskills/code-exploration/SKILL.md- Code exploration skillskills/test-reproduction/SKILL.md- Test reproduction skillskills/fix-analysis/SKILL.md- Fix analysis skillskills/code-implementation/SKILL.md- Implementation skillskills/code-verification/SKILL.md- Verification skillTotal: 1101 lines added across 9 files
Co-authored-by: openhands openhands@all-hands.dev