Skip to content

feat: add refactoring advisor skill - #424

Open
wusuiling-if wants to merge 2 commits into
OpenHands:mainfrom
wusuiling-if:codex/refactoring-advisor
Open

feat: add refactoring advisor skill#424
wusuiling-if wants to merge 2 commits into
OpenHands:mainfrom
wusuiling-if:codex/refactoring-advisor

Conversation

@wusuiling-if

@wusuiling-if wusuiling-if commented Jul 28, 2026

Copy link
Copy Markdown

Summary

Add the refactoring-advisor skill requested in #85. The skill audits functions, classes, modules/packages, and cross-cutting dependencies, then produces evidence-backed refactoring proposals without modifying implementation code.

The workflow:

  • separates discovery, root-cause diagnosis, proposal design, and prioritization
  • requires exact paths, symbols, and line ranges for findings
  • requires an explicit dependency injection decision for every proposal
  • prefers explicit dependency injection when otherwise-comparable designs exist
  • includes language-specific discovery guidance for Java, Python, TypeScript, and C#
  • provides a named smell and strategy catalog plus a fixed implementation-handoff report template
  • registers the skill in the large-codebase marketplace and generated skills catalog
  • blocks executable pseudocode and implementation-ready replacements

Closes #85

Validation

  • npm run build:skills
  • python3 scripts/sync_extensions.py --check
  • python3 -m pytest -q tests/test_refactoring_advisor.py tests/test_skills_catalog.py tests/test_sync_extensions.py tests/test_plugin_manifest.py tests/test_skill_plugin_loading.py tests/test_skills_have_readme.py -k 'not iterate_loads_as_sdk_plugin' (169 passed, 1 deselected)
  • focused acceptance checks for trigger coverage, language coverage, output-only behavior, required references, DI evaluation, report structure, and the under-500-line requirement

The full Python suite was not available locally because this machine has Python 3.10 and no uv, while the project requires Python 3.12 and the test group includes openhands-sdk, mcp, and other unavailable dependencies. The repository sync check also reports the pre-existing non-blocking marketplace warning for plugins/issue-duplicate-checker.

HUMAN: No separate manual runtime test was performed. The contributor validated the change with npm run build:skills, the repository synchronization check, and the focused Python test suite (169 passed, 1 deselected); the exact commands and environment limitations are documented above.

@wusuiling-if wusuiling-if changed the title [codex] add refactoring advisor skill feat: add refactoring advisor skill Jul 28, 2026
@github-actions github-actions Bot added the type: feat A new feature label Jul 28, 2026
@wusuiling-if
wusuiling-if force-pushed the codex/refactoring-advisor branch from 1db2c6a to 6c0a106 Compare July 28, 2026 05:34
@wusuiling-if
wusuiling-if marked this pull request as ready for review July 30, 2026 01:47
@all-hands-bot

Copy link
Copy Markdown
Contributor

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

2 similar comments
@all-hands-bot

Copy link
Copy Markdown
Contributor

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

@all-hands-bot

Copy link
Copy Markdown
Contributor

👋 This PR needs a couple of things fixed before OpenHands can review it:

  • the PR description's HUMAN: section needs at least 20 characters describing what you tested, not just the template placeholder

Push an update once this is addressed and this check re-runs automatically.

This is an automated check - no AI was used to generate this comment.

@neubig neubig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @wusuiling-if !

The HUMAN section is not sufficient here, given that this is adding a skill I'd expect a manual test to demonstrate that this actually works on a reasonably large-scale codebase. Could you demonstrate this with a before-after example of the codebase that you refactored?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feat A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Skill] Create refactoring-advisor skill for analyzing codebases and proposing refactoring plans

3 participants