agentleFS
rioX432rioX432/agent-witness/.claude/skills/decompose/SKILL.md

decompose

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

Break a task into ordered subtasks with dependencies

28 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use idea, discover and 8 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • szweibelSkill

    idea

    Generate a wide field of options when the user is brainstorming, exploring, expanding, or pressure-testing — not recommending or implementing

    Also in 3 projects that use this

  • anombyte93Skill

    discover

    Phase 1 of the prd-taskmaster pipeline: brainstorm-driven discovery. Delegates to superpowers:brainstorming in Interactive Mode (one adaptive question at a time), or self-brainstorms in Autonomous Mode when no user is present. Intercepts before the brainstorming chain hands off to writing-plans — this skill owns the exit. Extracts constraints, calibrates scale (Solo / Team / Enterprise), and advances the pipeline to GENERATE.

    Also in 3 projects that use this

  • MicrosoftSkill

    diagnose

    Use to systematically diagnose why scenarios fail — identifies root causes by analyzing agent traces, codebase, and behavioral patterns

    Also in 4 projects that use this

  • GitHubSkill

    prd

    Generate high-quality Product Requirements Documents (PRDs) for software systems and AI-powered features. Includes executive summaries, user stories, technical specifications, and risk analysis.

    Also in 3 projects that use this

  • Hugging FaceSkill

    implement

    Make tests pass. Invoke after /write-tests produces failing tests.

    Also in 6 projects that use this

  • MicrosoftSkill

    init

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 12 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 26 edited versions we read keep these.

  • 12

    Distinctive

    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:

    After investigation and dig phases are complete

    line 15
  2. Distinctive:

    When the approach is confirmed and decisions are made

    line 16
  3. Distinctive:

    Before starting the implementation loop

    line 17
  4. Distinctive:

    If a task feels larger, split it further

    line 30
  5. Distinctive:

    Read CLAUDE.md to understand the project's architecture layers, then split by layer from inner to outer.

    line 42
  6. Distinctive:

    Implementation + test = 1 task: Never separate implementation from its test

    line 77
  7. Distinctive:

    Cross-cutting checks = last task: After all implementations are done

    line 78
  8. Distinctive:

    All tasks block cross-cutting checks

    line 84
  9. Very specific:

    Use TaskCreate for each subtask:

    line 88
  10. Distinctive:

    After creating all tasks, show the full task list with dependencies:

    line 103
  11. Distinctive:

    Ask user to confirm before starting implementation.

    line 116
  12. Distinctive:

    After generating the full task list, use Codex to validate the decomposition.

    line 122
  13. Distinctive:

    If Codex suggests corrections:

    line 153
  14. Very specific:

    If ToolSearch fails to find Codex or the call errors:

    line 159

“Common” is measured: kept by at least 6 in 10 of the 26 edited versions of this file we could read. “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

Task Decomposition

Break down a development task into small, executable subtasks with clear dependencies.

When to Use

  • After investigation and dig phases are complete
  • When the approach is confirmed and decisions are made
  • Before starting the implementation loop

Input Requirements

You need these before decomposing:

  1. Investigation results (affected files, data flow, impact)
  2. Decision matrix from dig phase (resolved ambiguities)
  3. Confirmed approach

Decomposition Rules

Size

  • Each task should take 5-30 minutes to implement
  • If a task feels larger, split it further

Structure per Task

Each task must include:

  • What: What to implement/change
  • Where: Target file(s) with paths
  • How: Specific implementation approach
  • Why: Reason this change is needed
  • Verify: How to confirm it works (test command, manual check, etc.)

Architecture-Based Ordering

Read CLAUDE.md to understand the project's architecture layers, then split by layer from inner to outer.

General pattern (adapt to project):

1. Core types      — data classes, interfaces, enums
2. Business logic  — use cases, services, domain rules
3. Infrastructure  — repositories, API clients, DB
4. Presentation    — UI components, view models, controllers
5. Tests           — unit tests, integration tests
6. Cross-cutting   — lint, formatting, CI checks

For KMP projects:

1. commonMain API  — shared types, interfaces
2. expect/actual   — platform abstractions
3. androidMain     — Android-specific implementation
4. iosMain         — iOS-specific implementation
5. Tests           — commonTest, platform tests
6. Sample apps     — androidApp, iosApp
7. Cross-cutting   — detekt, explicitApi

For web projects:

1. Types/schemas   — shared types, API contracts
2. Backend logic   — API handlers, services
3. Frontend logic  — state management, hooks
4. UI components   — views, pages
5. Tests           — unit, E2E
6. Cross-cutting   — lint, build

Pairing Rules

  • Type + mapper = 1 task: Data type and its transformation go together
  • Implementation + test = 1 task: Never separate implementation from its test
  • Cross-cutting checks = last task: After all implementations are done

Dependency Order

Set dependencies on tasks that require earlier ones:

  • Core type tasks block implementation tasks
  • Implementation tasks block test tasks
  • All tasks block cross-cutting checks

TaskCreate Format

Use TaskCreate for each subtask:

subject: "Implement {What} in {Where}"
description: |
  **What**: {description}
  **Where**: {file path(s)}
  **How**: {implementation approach}
  **Why**: {reason}
  **Verify**: {verification step}
activeForm: "Implementing {What}"

Output

After creating all tasks, show the full task list with dependencies:

| # | Layer | Description | Blocked By |
|---|-------|-------------|------------|
| 1 | Core | Define FooData data class | — |
| 2 | Logic | Implement FooService | #1 |
| 3 | Infra | Add FooRepository | #2 |
| 4 | UI | Add FooScreen component | #2, #3 |
| 5 | Test | Unit tests for FooService | #2 |
| 6 | Cross | Lint + format check | #3, #4 |

Ask user to confirm before starting implementation.


Codex Architecture Validation (Optional)

After generating the full task list, use Codex to validate the decomposition.

Load Codex

ToolSearch("select:mcp__codex__codex")

Call Codex (if available)

mcp__codex__codex(
  prompt: "Validate this task decomposition for correctness and completeness:

  ## Task List
  {full task table with dependencies}

  ## Project Architecture
  {architecture layers from CLAUDE.md}

  ## Validation Checklist
  1. **Layer ordering**: Are tasks ordered inner-to-outer (core → logic → infra → presentation → tests → cross-cutting)?
  2. **Missing tasks**: Are there any steps that should exist between tasks? Any gaps?
  3. **Dependency correctness**: Are all dependency edges correct? Any missing or unnecessary dependencies?
  4. **Parallelization**: Which tasks could safely run in parallel (no shared state, no dependency)?
  5. **Risk assessment**: Which tasks are highest-risk and might need extra verification?

  Output: validated task list with any corrections, plus a list of parallelizable task groups."
)

If Codex suggests corrections:

  1. Apply the corrections to the task list
  2. Note what was changed and why

Fallback (Codex unavailable)

If ToolSearch fails to find Codex or the call errors:

  • Skip validation — output the task list as-is (traditional flow)

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.