agentleFS
motao123motao123/dev-workflow-kit/architecture-refactor-guidance/SKILL.md

architecture-refactor-guidance

Skill1 starsChanged 5 months agoMITView on GitHub

Use when the core problem is structural change: boundaries, coupling, module seams, interface extraction, or safe refactor sequencing. This skill helps decide how to reshape code without turning implementation into guesswork.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the main uncertainty is structural rather than purely functional.

    line 9
  2. Distinctive:

    Use this skill when:

    line 13
  3. Distinctive:

    Do not use this skill for generic feature planning, direct implementation, or root-cause debugging.

    line 20
  4. Distinctive:

    Read the current structure and identify the relevant boundaries.

    line 24
  5. Very specific:

    use planning if broader scope or acceptance is still unclear

    line 45
  6. Very specific:

    use ship-readiness before merging large structural changes

    line 46

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Refactor Guidance

Use this skill when the main uncertainty is structural rather than purely functional.

Trigger Conditions

Use this skill when:

  • the user asks how to split, extract, or reorganize a module
  • a refactor needs safer sequencing before implementation starts
  • coupling, boundaries, ownership, or interfaces are the real issue
  • a migration or structural cleanup should be staged carefully
  • the code works today, but the structure is becoming the bottleneck

Do not use this skill for generic feature planning, direct implementation, or root-cause debugging.

Workflow

  1. Read the current structure and identify the relevant boundaries.
  2. Find the main structural pain points: coupling, leakage, unstable contracts, or oversized modules.
  3. Identify seams where change can happen safely.
  4. Choose the safest staging order for the refactor.
  5. Define how behavior preservation will be verified.
  6. Recommend the next implementation path.

Output

For non-trivial work, provide:

  • current structural assessment
  • pain points and risks
  • proposed boundaries or seams
  • staged refactor order
  • preservation and verification strategy
  • recommended next step

Coordination

After structural guidance:

  • continue in the active implementation workflow for the implementation itself
  • use planning if broader scope or acceptance is still unclear
  • use ship-readiness before merging large structural changes

Invocation Examples

  • "Use architecture-refactor-guidance before we split this module into cleaner boundaries."
  • "Use architecture-refactor-guidance to decide how to stage this refactor safely."
  • "Use architecture-refactor-guidance to reduce coupling here without changing behavior."

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.