agentleFS
Baba01hacker666Baba01hacker666/dummyskills/skills/step-decomposer/SKILL.md

step-decomposer

Skill0 starsChanged 2 months agoMITView on GitHub

Breaks an approved goal or task brief into small, sequential, testable execution steps with verification gates.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 8 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when:

    line 14
  2. Very specific:

    Do not use to define or clarify scope.

    line 20
  3. Very specific:

    Do not use to report progress on in-flight work.

    line 21
  4. Very specific:

    Do not use for general codebase exploration.

    line 22
  5. Very specific:

    If task_goal is missing or empty: stop and ask: "Please provide the task goal or approved task brief to decompose."

    line 29
  6. Very specific:

    If target_files are unknown: include Step 1 as an inspection step using repo-inspector to locate the files before editing.

    line 30
  7. Distinctive:

    Do not invent non-existent file paths.

    line 31
  8. Distinctive:

    Follow these numbered actions:

    line 34
  9. Distinctive:

    Ensure each step touches at most 2 related files.

    line 39
  10. Distinctive:

    If any single step requires more than 50 lines of code changes: split it into two sub-steps.

    line 48
  11. Distinctive:

    If a step modifies database schemas or production configs: insert a manual approval checkpoint before that step.

    line 49
  12. Distinctive:

    If all steps are complete: final step must run the full test suite.

    line 50
  13. Distinctive:

    Stop and ask the user when:

    line 91

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

Step Decomposer

Breaks down an approved engineering goal or task brief into small, sequential execution steps. Ensures each step is independently testable before proceeding to the next.

1. Purpose

Convert a task objective into a sequence of small, verifiable actions. A "step" is an atomic unit of work touching one concern that takes under 5 minutes to verify.

2. When to Use

Use this skill when:

  • An approved task brief or clear goal exists.
  • The task involves multiple file edits, dependencies, or sequential commands.
  • Preparing execution steps for autonomous or semi-autonomous execution.

3. When Not to Use

  • Do not use to define or clarify scope; use task-brief.
  • Do not use to report progress on in-flight work; use status-update.
  • Do not use for general codebase exploration; use repo-inspector.

4. Required Inputs

  • task_goal: A clear statement of the objective or approved task brief (string).
  • target_files: Known files to be created or modified (list of paths).

5. Missing-Input Behavior

  1. If task_goal is missing or empty: stop and ask: "Please provide the task goal or approved task brief to decompose."
  2. If target_files are unknown: include Step 1 as an inspection step using repo-inspector to locate the files before editing.
  3. Do not invent non-existent file paths.

6. Procedure

Follow these numbered actions:

  1. Action 1: Identify Dependencies and Order
    • Determine what must happen first (e.g., config changes before code changes, code changes before test updates).
  2. Action 2: Divide into Atomic Steps
    • Limit the total sequence to 3 to 7 steps.
    • Ensure each step touches at most 2 related files.
  3. Action 3: Attach an Objective Verification Gate to Each Step
    • For every step, specify the exact command or inspection check to confirm completion (e.g., npm run lint, pytest tests/test_auth.py).
  4. Action 4: Define Rollback Action for Each Step
    • State what command reverts the step if the verification gate fails (e.g., git checkout -- file.js).
  5. Action 5: Emit the Execution Plan
    • Format the plan per Section 8.

7. Decision Rules

  • If any single step requires more than 50 lines of code changes: split it into two sub-steps.
  • If a step modifies database schemas or production configs: insert a manual approval checkpoint before that step.
  • If all steps are complete: final step must run the full test suite.

8. Output Format

Emit the decomposed plan using this structured template:

### Execution Plan: [Task Title]

- **Total Steps**: [Count]
- **Target Files**: [Comma-separated file list]

#### Ordered Steps
1. **Step 1: [Short Title]**
   - **Action**: [Exact modification or command]
   - **Target**: `[file path]`
   - **Verification Gate**: `[command or check]` -> Expected: `[expected result]`
   - **Rollback**: `[revert command]`

2. **Step 2: [Short Title]**
   - **Action**: [Exact modification or command]
   - **Target**: `[file path]`
   - **Verification Gate**: `[command or check]` -> Expected: `[expected result]`
   - **Rollback**: `[revert command]`

#### Final Verification Gate
- `[Overall test command, e.g., npm test]`

9. Verification Checklist

  • Every step has an explicit verification gate.
  • Every step has a rollback instruction.
  • Steps are strictly ordered by dependency.
  • No step touches unrelated files.

10. Common Failures and Recovery

Failure SymptomCauseRecovery Action
Too many steps (> 10)Over-fragmenting trivial editsCombine trivial edits into a single logical step.
Missing verification gateAssuming code works without checkAdd a concrete command (e.g. node --check file.js).
Circular dependenciesStep A needs B, but B needs AExtract common interface into Step 0.

11. Stop or Escalation Conditions

Stop and ask the user when:

  • The task goal contains contradictory requirements.
  • External infrastructure or credentials are required before continuing.

12. Examples

Example 1: Successful Execution

Input:

Task: Add timeout option to HTTP client in src/http.ts and verify in tests/http.test.ts

Expected Observable Actions:

  1. Produced 3 sequential steps.
  2. Included verification commands and rollback commands.

Output:

### Execution Plan: Add HTTP Client Timeout Option

- **Total Steps**: 3
- **Target Files**: `src/http.ts`, `tests/http.test.ts`

#### Ordered Steps
1. **Step 1: Add Timeout Interface and Defaults**
   - **Action**: Add `timeoutMs?: number` to `RequestOptions` interface and set default to 5000ms.
   - **Target**: `src/http.ts`
   - **Verification Gate**: `npx tsc --noEmit` -> Expected: Exits code 0
   - **Rollback**: `git checkout src/http.ts`

2. **Step 2: Add Timeout Regression Test**
   - **Action**: Add test case expecting timeout error when request exceeds timeoutMs.
   - **Target**: `tests/http.test.ts`
   - **Verification Gate**: `npm test tests/http.test.ts` -> Expected: 1 failure (timeout not wired yet)
   - **Rollback**: `git checkout tests/http.test.ts`

3. **Step 3: Wire Timeout Signal to Fetch Call**
   - **Action**: Pass AbortSignal.timeout(timeoutMs) to internal fetch call.
   - **Target**: `src/http.ts`
   - **Verification Gate**: `npm test tests/http.test.ts` -> Expected: All tests pass
   - **Rollback**: `git checkout src/http.ts`

#### Final Verification Gate
- `npm test`

Example 2: Ambiguous or Missing Input

Input:

Task: "Refactor backend"

Output:

### Execution Plan: Blocked - Missing Scope

- **Status**: Escalation Required

The goal "Refactor backend" is too broad to decompose safely. Please provide:
1. Specific target module or files (e.g., `src/auth/` or `src/database/`).
2. Desired architectural change or behavioral constraints.
Alternatively, run `task-brief` first to establish scope.

Example 3: Expected Final Output

Output:

### Execution Plan: Add Environment Variable Validation

- **Total Steps**: 2
- **Target Files**: `src/config.ts`, `tests/config.test.ts`

#### Ordered Steps
1. **Step 1: Create Validation Function**
   - **Action**: Add `validateEnv()` throwing on missing `PORT` or `DATABASE_URL`.
   - **Target**: `src/config.ts`
   - **Verification Gate**: `npm run lint` -> Expected: Clean exit 0
   - **Rollback**: `git checkout src/config.ts`

2. **Step 2: Add Configuration Unit Tests**
   - **Action**: Test missing variable raises descriptive error.
   - **Target**: `tests/config.test.ts`
   - **Verification Gate**: `npx jest tests/config.test.ts` -> Expected: 2 passed
   - **Rollback**: `git checkout tests/config.test.ts`

#### Final Verification Gate
- `npm test`

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.