agentleFS
89jobrien89jobrien/godmode/skills/decompose/SKILL.md

godmode:decompose

Skill1 starsChanged 57 days agoMITView on GitHub

Use when the user wants to break up a large diff, PR, or branch into smaller independent PRs or branches. Handles mechanical analysis (file-to-crate mapping, concern classification, coupling detection), proposes a decomposition plan, requires explicit approval, then executes the split (creates branches, stages subsets, runs taskit check compile per split, optionally opens PRs). Trigger on "decompose this PR", "split this branch", "this diff is too big", "break this into smaller PRs", "make this reviewable", "/decompose", or any request to split a large changeset into independent units.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is 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.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the file named in a row before doing the step in its right column.

    line 33
  2. Very specific:

    If any split failed verification, list it as FAILED with the failure summary.

    line 62
  3. Distinctive:

    Source branch is read-only: Never commit to it, never delete it.

    line 69
  4. Distinctive:

    Plan approval is required: No git mutations before the user says go.

    line 70
  5. Distinctive:

    Coverage check: After all splits, verify every changed file appears in exactly one split.

    line 73

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

godmode:decompose — Diff Decomposition Agent

Splits a large diff or branch into independent, reviewable units. Mechanical analysis runs first and is fully verifiable. LLM judgment is used only where the mechanical analysis is ambiguous — and always requires explicit user approval before any git mutations occur.

Helpers

FilePurpose
helpers/analyze-diff.nuMechanical analysis: file→crate map, concern classification, coupling detection
helpers/split-branch.nuBranch creation, file staging, per-split verification loop
helpers/decompose-proptest.rsProperty tests for grouping and coverage invariants
references/split-strategies.mdDecision guide for ambiguous grouping calls

Reference files

Read the file named in a row before doing the step in its right column. These files are not loaded automatically.

FileRead before
references/analysis-input-and-mechanics.mdStep 0: choosing the input diff and recording the source branch, base, and changed files
references/analysis-mechanics-step-1.mdStep 1: running the analyzer on the input diff, or reading its coupling warnings
references/review-and-plan.mdStep 2–3: judging groupings, naming splits, presenting the plan for approval
references/execute-splits.mdStep 4: running the splitter after approval, and the coverage check
references/open-prs.mdStep 5: opening PRs for the split branches, only when the user asks
references/split-strategies.mda grouping call is ambiguous and needs decision heuristics

Step 6 — Report

Decomposition complete: <source-branch> → N splits

Split 1: <name> | <sha> | PR #<N> <url>
Split 2: <name> | <sha> | PR #<N> <url>
...

Coverage: all N changed files accounted for.
Orphaned: none | <list if any>

Source branch <source-branch> was not modified.

If any split failed verification, list it as FAILED with the failure summary. The source branch is always intact regardless.


Guardrails

  • Source branch is read-only. Never commit to it, never delete it. All splits branch from base.
  • Plan approval is required. No git mutations before the user says go.
  • Sequential verification. Each split must pass taskit check compile + nextest before the next begins. A failing split halts the process — do not skip forward.
  • Coverage check. After all splits, verify every changed file appears in exactly one split. Files in multiple splits or no split are bugs.
  • Coupling warnings are not blockers — but they must be shown. The user decides whether to merge the affected splits or accept the dependency.
  • Dry-run by default on ambiguous inputs. If uncertain what the user wants decomposed, ask rather than acting.

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.