Skip to content

cedricfarinazzo/deep-refactor

v0.11.3MIT

Deep code, test, and documentation refactoring workflows with disciplined proof and delivery.

deep-refactor

Out-of-cycle cleanup in three skills that share one loop: audit deeply, prove every claim, ship the result as a sequenced PR train. Each skill freezes a different side of the repo as its proof.

Part of agile-skills. Needs gh, git, a CI you can query, and your tracker of choice. No Jira or Confluence required.

What you get

SkillChangesFrozenSay
deep-refactorProduction code, codebase-wideThe test suite, as the contract (only enumerated fixture and guard edits in the correctness and structural tickets)"deep refactor", "refactor audit", "clean the codebase", "DRY pass", "audit and fix everything"
test-refactorOne test suite at a timeProduction code (a defect found goes in its own PR)"test refactor", "clean the tests", "refactor the tests", "test suite audit", "DRY the tests", "parallelize the test suite", "speed up the tests"
test-refactor characterize <scope>Adds a minimal behavior testProduction code"characterize before refactor", "characterization tests"
doc-refactorEvery markdown file (.md)Source code"doc refactor", "refactor the docs", "clean the docs", "documentation audit", "README audit", "docs are stale", "DRY the docs", "audit every markdown file"
doc-refactor rulesThe standing instruction corpus, in addition to the markdown auditSource code(a mode of doc-refactor)
flowchart LR
  a["Audit<br/>parallel read-only agents,<br/>until a pass is empty"] --> r["Report<br/>every row has proof"] --> t["Ticket<br/>one ticket, one PR,<br/>sequenced train"] --> d["Drain<br/>sequential merges<br/>on green CI"]
  d -. "reconcile against main<br/>before every PR" .-> t

Every proposal carries its evidence (instrumented counts, mutation probes, real diffs, executed commands). Nothing merges without a self-verified green run.

Install

/plugin marketplace add cedricfarinazzo/agile-skills
/plugin install deep-refactor@agile-skills
/reload-plugins

Run /deep-refactor:deep-refactor, /deep-refactor:test-refactor or /deep-refactor:doc-refactor. On Codex, install with codex plugin add deep-refactor@agile-skills and run $deep-refactor, $test-refactor or $doc-refactor; see the compatibility guide.

Scope

  • deep-refactor audits the whole codebase.
  • test-refactor takes one suite at a time; you name it, for example "backend unit tests".
  • doc-refactor inventories every markdown file.

Findings that can't be proven safe land on the report's blocked list, not in a PR. Recorded "deliberate: do not fix" decisions are not relitigated.

More

PageCovers
The loopAudit, report, ticket, drain, and the discipline of each
deep-refactorCodebase audit with the tests frozen
test-refactorPer-suite test audit, characterize mode
doc-refactorMarkdown audit, rules mode
ReferenceNon-vacuity proofs, per-file token diff, ticket order per skill

Where it fits

Independent of the product-to-sprint cycle; it needs no Jira or Confluence. Where agile-execution and agile-merge-review are installed, the PR drain runs through them. See the root README.