skills/grace/grace-refactor/SKILL.md
Refactor GRACE-governed code safely: rename, move, split, merge, or extract modules while keeping contracts, graph, verification, and semantic markup synchronized.
npx skillsauth add osovv/grace-marketplace grace-refactorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Refactor a GRACE project without letting architecture or verification drift.
Do not use this skill for greenfield implementation. Use $grace-plan, $grace-execute, or $grace-multiagent-execute for new work.
docs/development-plan.xml must existdocs/knowledge-graph.xml must existdocs/verification-plan.xml should existdocs/operational-packets.xml exists, use its canonical packet and delta shapesA GRACE refactor is not just a code move.
It is an atomic migration across:
docs/development-plan.xmldocs/knowledge-graph.xmldocs/verification-plan.xmlThe refactor is not done until all six agree again.
Identify the exact refactor type:
renamemovesplitmergeextractinterface-tightenpath-onlyFor the requested change, capture:
If the change affects behavior, public contracts, or architecture boundaries, present the planned deltas and wait for approval.
Before editing, prepare a controller-owned packet containing:
When docs/operational-packets.xml exists, align the packet, graph delta, verification delta, and failure handoff to those canonical templates.
Work in the safest order for the refactor type.
Always:
[Module][function][BLOCK_NAME] markers when critical branches moveFor split and merge refactors:
Shared-doc rule:
After the code refactor, update the shared artifacts in one coherent pass.
Update docs/development-plan.xml for:
Update docs/knowledge-graph.xml for:
Update docs/verification-plan.xml for:
V-M-xxx entriesIf IDs changed, update every reference atomically. Do not leave temporary stale IDs unless the user explicitly requires compatibility handling.
Run verification at the smallest level that still protects correctness:
If the refactor causes failures, produce a structured failure handoff using the canonical FailurePacket shape when available.
Before declaring success:
$grace-reviewer pass on the changed files and shared-artifact deltas$grace-refresh on the touched modules and dependency surfacesdevelopment
Create GRACE subagent presets for the current agent shell. Use when you want GRACE worker and reviewer agent files scaffolded for Claude Code, OpenCode, Codex, or another shell.
development
Execute a GRACE development plan in controller-managed parallel waves with selectable safety profiles, verification-plan excerpts, batched shared-artifact sync, and scoped reviews.
development
Bootstrap GRACE framework structure for a new project. Use when starting a new project with GRACE methodology - creates docs/ directory, AGENTS.md, and XML templates for requirements, technology, development plan, verification plan, knowledge graph, and operational packet contracts.
development
Complete GRACE methodology reference. Use when explaining GRACE to users, onboarding new projects, or when you need to understand the GRACE framework - its principles, semantic markup, knowledge graphs, contracts, testing, and unique tag conventions.