agentleFS
leekleek/agent-skills/skills/architecture-satisfaction/SKILL.md

architecture-satisfaction

Skill3 starsChanged 2 months agoMITView on GitHub

Run a bounded architectural refactor loop toward a stated design.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 16 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Stop when the architecture is satisfactory and checks pass.

    line 20
  2. Distinctive:

    Use this for a deliberate architectural refactor where the desired destination can be stated in concrete terms and the current system can …

    line 24
  3. Distinctive:

    Before editing code, write down the target in concrete terms.

    line 30
  4. Distinctive:

    If the target is vague, pause and clarify it.

    line 40
  5. Very specific:

    Create or update a progress file in /tmp named for the project, for example:

    line 44
  6. Distinctive:

    Run the relevant automated checks: tests, type checks, linters, formatters, build, migrations, or focused smoke scripts.

    line 69
  7. Distinctive:

    Run an independent review after each significant change.

    line 70
  8. Distinctive:

    Commit each verified checkpoint when the user has asked for commits or the repository workflow expects checkpoint commits.

    line 72
  9. Distinctive:

    Update the progress file with the checkpoint, evidence, decisions, and next action.

    line 73
  10. Distinctive:

    Do not let several unrelated refactors accumulate before verification.

    line 86
  11. Distinctive:

    Ask the review pass to look for:

    line 90
  12. Distinctive:

    Call sites missed during the refactor.

    line 94
  13. Distinctive:

    Do not begin a broad refactor without a concrete target and verification plan.

    line 115
  14. Distinctive:

    Do not combine unrelated architecture moves in one checkpoint.

    line 116
  15. Distinctive:

    Do not commit failing checkpoints unless the user explicitly wants a work-in-progress checkpoint.

    line 117
  16. Distinctive:

    Do not rewrite public interfaces, data shapes, or migration behavior without checking callers and compatibility.

    line 118
  17. Distinctive:

    Do not discard user changes or unrelated work.

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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 Satisfaction

Goal

Refactor toward a concrete architectural target while keeping the system working after each meaningful step.

Loop Prompt

Refactor until you are happy with the architecture. After each significant step, live-test the system, run an independent review, and commit. Track progress in /tmp/refactor-{projectname}.md.

Stop when the architecture is satisfactory and checks pass.

When To Use

Use this for a deliberate architectural refactor where the desired destination can be stated in concrete terms and the current system can be tested after each meaningful change.

This is not a general cleanup pass. Use housekeeper for low-risk code hygiene, and repository-cleanup for Git branch/PR/worktree/stash cleanup.

Define Satisfactory First

Before editing code, write down the target in concrete terms. Include the parts that make the architecture satisfactory, such as:

  • Module boundaries and ownership.
  • Dependency direction.
  • Public interfaces that should stay stable.
  • Behavior that must keep working.
  • Performance constraints.
  • Tests, smoke checks, or live flows that prove safety.
  • Known risks and rollback points.

If the target is vague, pause and clarify it. A subjective stop condition can otherwise run indefinitely.

Progress File

Create or update a progress file in /tmp named for the project, for example:

/tmp/refactor-my-project.md

Track:

  • Architectural target and constraints.
  • Current risks.
  • Checkpoint history.
  • Decisions made.
  • Commands run and their results.
  • Independent review findings.
  • Blockers.
  • Next action.

The progress file is scratch state for long refactors and handoffs. Do not use it as a substitute for project documentation unless the user asks.

Workflow

  1. Inspect the current repository state: branch, uncommitted work, recent commits, test commands, app startup commands, and relevant architecture docs.
  2. Define the architectural target, constraints, current risks, and verification plan in the progress file.
  3. Make one significant, reviewable change at a time.
  4. Live-test the affected behavior after each significant change. Prefer the project's real app/runtime checks when available, not only static checks.
  5. Run the relevant automated checks: tests, type checks, linters, formatters, build, migrations, or focused smoke scripts.
  6. Run an independent review after each significant change. Use a review subagent, code-review tool, existing autoreview command, or a separate review pass that looks for behavior regressions, missed callers, leaky abstractions, and test gaps.
  7. Fix issues found by live testing, checks, or review before moving to the next architectural step.
  8. Commit each verified checkpoint when the user has asked for commits or the repository workflow expects checkpoint commits. Keep commits small and named after the architectural move.
  9. Update the progress file with the checkpoint, evidence, decisions, and next action.
  10. Repeat until the stated architecture target is met, checks pass, and review finds no blocking issue.

Checkpoint Discipline

Each checkpoint should have:

  • One coherent architectural change.
  • Passing or explicitly explained verification.
  • A reviewed diff.
  • A short commit message if committing.
  • A progress-file entry explaining what changed and why.

Do not let several unrelated refactors accumulate before verification. Small verified checkpoints reduce risk and preserve rollback points.

Independent Review Focus

Ask the review pass to look for:

  • Broken dependency direction or circular dependencies.
  • Interfaces that became broader or leak implementation details.
  • Call sites missed during the refactor.
  • Behavior changes not covered by tests.
  • Migration or data compatibility risks.
  • Performance regressions.
  • Over-abstracted code that is harder to understand than the original.
  • Documentation or comments that now describe old architecture.

Report

End with:

  • Architectural target.
  • Checkpoints completed.
  • Live tests and automated checks run.
  • Independent review findings and fixes.
  • Commits created, if any.
  • Remaining risks or deferred work.
  • Current progress-file path.

Guardrails

  • Do not begin a broad refactor without a concrete target and verification plan.
  • Do not combine unrelated architecture moves in one checkpoint.
  • Do not commit failing checkpoints unless the user explicitly wants a work-in-progress checkpoint.
  • Do not rewrite public interfaces, data shapes, or migration behavior without checking callers and compatibility.
  • Do not discard user changes or unrelated work.

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.