feat(skills): add refactor skill and plugin manifest - #13
Merged
Conversation
ms-shashank
force-pushed
the
feat/refactor-skill
branch
from
August 24, 2026 18:10
beccf03 to
3681ef1
Compare
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.
Closes #6
What this adds
Adds the
refactorskill to OxCode (plugins/refactor/skills/refactor/SKILL.md) and registers it inmarketplace.jsonandplugin.json.A refactor is the one change where "it still works" is the entire acceptance criterion. This skill enforces proving behaviour preservation rather
than asserting it:
- Requires a recorded green test baseline before touching any source code.
- Enforces atomic transformations with the test suite run between changes.
- Forbids folding bug fixes into a refactor (
"I noticed X and did not change it").- Requires stating test coverage gaps when touched code is untested.
- Reports the diff by structural intent (what moved, renamed, extracted, simplified, and stayed identical) rather than raw file lines.
Task tested
Refactoring a user authentication and session token handler module with mixed validation and token decoding logic.
Without skill:
The model rewrote large chunks of the file at once, silently bundled an off-by-one expiry fix that was not in the test suite, declared "all tests pass" despite the token decoding branch having zero unit tests, and outputted a massive unified diff without explaining structural transformations.
With skill:
The model ran the test suite first, recorded 18/18 passing tests as the baseline, executed three atomic extractions (
verifyTokenSignature,decodeClaims,validateUserSession) running the test suite after each step, flagged"I noticed that expired tokens within a 5-second skew are rejected rather than allowed in auth.ts:42 and did not change it", explicitly noted the coverage gap for custom header decoding, and structured the final report by intent.What was deliberately left out
Did not allow automatic test generation inside this skill; refactoring relies on existing test baselines and inspection rather than generating untested assertions.
Did not allow inline bug fixes during a refactor to preserve strict behavioural equivalence.
Tools value
Set to
tools: fullas the skill requires running tests in the workspace and applying atomic code transformations.