Skilllibrary goal-decomposition
install
source · Clone the upstream repo
git clone https://github.com/merceralex397-collab/skilllibrary
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/merceralex397-collab/skilllibrary "$T" && mkdir -p ~/.claude/skills && cp -r "$T/05-agentic-orchestration-and-autonomy/goal-decomposition" ~/.claude/skills/merceralex397-collab-skilllibrary-goal-decomposition && rm -rf "$T"
manifest:
05-agentic-orchestration-and-autonomy/goal-decomposition/SKILL.mdsource content
Purpose
Transform high-level goals into a tree of agent-executable tasks, each with clear scope, acceptance criteria, and dependency ordering. Ensures every leaf task is small enough for a single agent to complete in one run and that the full tree covers the goal with no gaps or overlaps (MECE).
When to use
- A goal or epic is too large for a single agent to execute in one run.
- The user provides a broad objective ("refactor auth system") that needs structured decomposition.
- A project kickoff needs a work breakdown before agents can be assigned.
- An existing decomposition has gaps, overlaps, or tasks that are still too large.
- Dependencies between tasks are unclear and need explicit ordering.
Do NOT use when
- The goal is already a single concrete action that one agent can complete directly.
- A complete, current task breakdown already exists (update it rather than recreating).
- The user wants execution, not planning — hand off to the appropriate execution skill.
Operating procedure
- State the top-level goal in one sentence. Write it as a measurable outcome (e.g., "All API endpoints return valid JSON Schema-compliant responses" not "improve the API").
- Identify the goal's scope boundaries: list what is in-scope and what is explicitly out-of-scope.
- Decompose the goal into 2–5 sub-goals using MECE principles: each sub-goal is mutually exclusive (no overlap) and collectively exhaustive (full coverage).
- For each sub-goal, repeat decomposition until every leaf task meets the single-agent rule: completable by one agent in one run (≤30 tool calls, ≤50,000 tokens, ≤300 seconds).
- Write each leaf task with these fields:
.| Task ID | Title | Description (≤50 words) | Acceptance Criteria (≤3 items) | Estimated Tool Calls | Dependencies | - Build a dependency graph: for each task, list which other task IDs must complete first. Verify there are no circular dependencies by performing a topological sort.
- Run the topological sort: list tasks in execution order, grouping tasks that can run in parallel on the same line.
- Validate MECE coverage: for each sub-goal, confirm that its child tasks fully cover the sub-goal's scope and do not overlap with siblings.
- Assign priority tiers: Tier 1 = tasks with no dependencies (can start immediately), Tier 2 = tasks depending only on Tier 1, etc.
- Produce the final Goal Tree as a markdown outline with indentation showing parent-child relationships, plus the execution-order table.
- Write leaf tasks to the repo's ticket system (e.g.,
directory) if one exists, or output them as a structured list.tickets/
Decision rules
- If a leaf task requires more than 30 tool calls, it is too large — split it further.
- If two tasks modify the same file, add an explicit dependency or assign them to the same agent.
- Acceptance criteria must be verifiable by an agent (e.g., "tests pass", "file exists") — never subjective ("code is clean").
- If the goal has ambiguous scope, define the narrowest reasonable interpretation and note assumptions.
- Maximum tree depth is 4 levels. If deeper decomposition is needed, the goal itself is too broad — split the goal first.
Output requirements
- Goal Statement — one-sentence measurable outcome.
- Scope Boundaries — in-scope and out-of-scope lists.
- Goal Tree — markdown outline showing hierarchical decomposition.
- Leaf Task Table — all leaf tasks with ID, title, description, acceptance criteria, estimated effort, and dependencies.
- Execution Order — topologically sorted task list with parallel groupings.
- Dependency Graph — text-based DAG or mermaid diagram showing task relationships.
References
— each leaf task becomes a delegation contract.references/delegate-contracts.md
— checkpoints align with sub-goal completion boundaries.references/checkpoint-rules.md- MECE framework (McKinsey) for ensuring complete, non-overlapping decomposition.
Related skills
— each leaf task should have an artifact contract defining its output.artifact-contracts
— task sizing must respect agent run budgets.autonomous-run-control
— ambiguous goals may require human clarification before decomposition.human-interrupt-handling
— parallel task groups need sync points.collaboration-checkpoints
Failure handling
- Ambiguous goal: If the goal cannot be stated as a measurable outcome, pause and request clarification — do not decompose a vague goal.
- MECE violation detected: If tasks overlap, merge the overlapping portions into a single task. If gaps exist, create a new task to cover the gap.
- Circular dependency: If topological sort fails, identify the cycle and break it by splitting one task into a dependency-free setup step and a dependent execution step.
- Over-decomposition: If the tree exceeds 30 leaf tasks, re-examine sub-goals for opportunities to merge related tasks.