Skip to content

feat(skills): add refactor skill and plugin manifest - #13

Merged
ms-shashank merged 1 commit into
Oxcode-ai:mainfrom
h30s:feat/refactor-skill
Aug 24, 2026
Merged

feat(skills): add refactor skill and plugin manifest#13
ms-shashank merged 1 commit into
Oxcode-ai:mainfrom
h30s:feat/refactor-skill

Conversation

@h30s

@h30s h30s commented Aug 24, 2026

Copy link
Copy Markdown
Member

Closes #6

What this adds

Adds the refactor skill to OxCode (plugins/refactor/skills/refactor/SKILL.md) and registers it in marketplace.json and plugin.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: full as the skill requires running tests in the workspace and applying atomic code transformations.

@h30s
h30s requested a review from ms-shashank August 24, 2026 13:02
@ms-shashank
ms-shashank merged commit aeef611 into Oxcode-ai:main Aug 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New skill: refactor, behaviour-preserving and proven rather than asserted

2 participants