refactoring-discipline
Skill1 starsChanged 6 months agoMITView on GitHub
Use when intentionally restructuring, splitting, renaming, replacing, or reducing complexity in this POC/WIP repo, especially when choosing a clean single path over compatibility, stale aliases, or parallel implementations.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- goonobu-dot/dev-skills-librarytheir own version, first seen Jul 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- goonobu-dot/dev-skills-library★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-self-checkSkill
- biome-grit-rulesSkill
- biome-toolingSkill
- bun-testSkill
- bun-workspaceSkill
- cleanup-auditSkill
- code-reviewSkill
- dispatch-satelliteSkill
- docs-managementSkill
- docs-readingSkill
- effect-concurrency-lifecycleSkill
- effect-errors-schemaSkill
- effect-observability-timeSkill
- effect-services-layersSkill
- effect-testing-runtimeSkill
- effect-v4Skill
- jsx-md-authoringSkill
- monorepo-maintenanceSkill
- roadmap-managementSkill
- runtime-engineSkill
- server-runtimeSkill
- testing-patternsSkill
- theseus-designSkill
- tool-authoringSkill
- typescript-strictSkill
- ui-layout-disciplineSkill
- theseus-designSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill for authorized restructure and replacement work in this POC/WIP repo.
- Distinctive: line 16
Prefer replacing bad or obsolete structure over preserving it.
- Distinctive: line 19
If current behavior is accidental or WIP, improve it directly and say what changed.
- Distinctive: line 24
Search current callers and tests so the blast radius is known.
- Distinctive: line 27
Update tests to the intended behavior, or add tests for the new boundary when behavior matters.
- Distinctive: line 28
Run the narrowest useful test/typecheck, then broader verification when public signatures changed.
- Distinctive: line 33
Do not preserve obsolete APIs just because tests or local callers use them.
- Distinctive: line 34
Do not add migration shims unless the user explicitly says back compatibility is required.
- Distinctive: line 35
Keep diffs reviewable: one conceptual replacement per pass is better than several unrelated cleanups.
- Distinctive: line 36
If the work reveals an unrelated design problem, report it or make it a separate pass.
- Distinctive: line 59
Prefer package-local tests while iterating.
- Distinctive: line 60
Run root typecheck when public signatures, package exports, schemas, or Effect requirements change.
- Distinctive: line 61
Use lint/format tooling for mechanical formatting.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Refactoring Discipline
Use this skill for authorized restructure and replacement work in this POC/WIP repo. We are the only expected consumers unless the user says otherwise, so prefer clean one-way changes over compatibility-preserving migrations.
For package boundaries and public export shape, also use monorepo-maintenance. For tests, also use testing-patterns. After substantial edits, use cleanup-audit as a finishing pass to remove confirmed non-behavioral leftovers and report risky compatibility cleanup before changing it.
Ground Rule
This repo optimizes for a clean golden path, not compatibility layers.
- Prefer replacing bad or obsolete structure over preserving it.
- During an authorized refactor/replacement, delete stale aliases, compatibility exports, comments, tests, docs, and duplicate paths when the new boundary supersedes them.
- Preserve behavior only when that behavior is still part of the intended model.
- If current behavior is accidental or WIP, improve it directly and say what changed.
Workflow
- Identify the intended model, not just the current behavior.
- Search current callers and tests so the blast radius is known.
- Choose the clean target shape before patching.
- Replace in one coherent direction; avoid old/new parallel paths.
- Update tests to the intended behavior, or add tests for the new boundary when behavior matters.
- Run the narrowest useful test/typecheck, then broader verification when public signatures changed.
Scope Control
- It is fine to combine renames, moves, and behavior correction when they are all part of an authorized replacement of one bad model with one better model.
- Do not preserve obsolete APIs just because tests or local callers use them. Update the callers/tests.
- Do not add migration shims unless the user explicitly says back compatibility is required.
- Keep diffs reviewable: one conceptual replacement per pass is better than several unrelated cleanups.
- If the work reveals an unrelated design problem, report it or make it a separate pass.
Good Targets
- duplicated protocol construction
- large modules with unrelated reasons to change
- hidden dependencies or ambient state
- repeated validation/stringification inside domain code
- unclear names that force readers to inspect implementation
- tests that only assert legacy shape instead of intended behavior
- old aliases, stale barrels, and compatibility re-exports during authorized replacement work
- parallel implementations of the same concept
Poor Targets
- style-only churn in unrelated files
- mechanical renames without a clearer model
- abstractions created for one caller
- preserving a second path "just in case"
- characterization tests that freeze known-bad WIP behavior
Verification
- Prefer package-local tests while iterating.
- Run root typecheck when public signatures, package exports, schemas, or Effect requirements change.
- Use lint/format tooling for mechanical formatting; do not hand-normalize formatting across unrelated files.
- In the final report, say whether behavior was intentionally changed, which stale paths were removed, and what verification covered.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

