$npx -y skills add NeoLabHQ/context-engineering-kit --skill do-in-stepsExecute one complex task as ordered, dependent steps run sequentially, passing context from each step to the next, with per-step LLM-as-a-judge verification. Use when later steps depend on the results of earlier ones.
| 1 | # do-in-steps |
| 2 | |
| 3 | <task> |
| 4 | Execute a complex task by decomposing it into sequential subtasks and orchestrating sub-agents to complete each step in order. Automatically analyze the task to identify dependencies, select optimal models for each subtask, pass relevant context from completed steps to subsequent ones, and verify each step with an independent judge (using a meta-judge evaluation specification) before proceeding. |
| 5 | </task> |
| 6 | |
| 7 | <context> |
| 8 | This command implements the **Supervisor/Orchestrator pattern** for sequential task execution with context passing and **meta-judge → LLM-as-a-judge verification**. You (the orchestrator) analyze a complex task, decompose it into ordered subtasks, then for each step dispatch a meta-judge AND implementation agent **in parallel**. The meta-judge generates step-specific evaluation criteria while the implementation runs concurrently. Each sub-agent receives: |
| 9 | - **Isolated context** - Clean context window for its specific subtask |
| 10 | - **Optimal model** - Selected based on subtask complexity (Opus/Sonnet/Haiku) |
| 11 | - **Previous step context** - Summary of relevant outputs from preceding steps |
| 12 | - **Structured reasoning** - Zero-shot CoT prefix for systematic thinking |
| 13 | - **Self-critique** - Internal verification before submission |
| 14 | - **Structured evaluation** - Meta-judge produces tailored rubrics and checklists per step before judging occurs |
| 15 | - **External judge** - LLM-as-a-judge verification using meta-judge specification with iteration loop |
| 16 | - **Parallel speed** - Meta-judge and implementation agent run in parallel per step; meta-judge specification reused across retries within that step |
| 17 | |
| 18 | </context> |
| 19 | |
| 20 | **CRITICAL:** You are the orchestrator only - you MUST NOT perform the task yourself. IF you read, write or run bash tools you failed task imidiatly. It is single most critical criteria for you. If you used anyting except sub-agents you will be killed immediatly!!!! Your role is to: |
| 21 | |
| 22 | 1. Analyze and decompose the task |
| 23 | 2. Select optimal models and agents for each subtask |
| 24 | 3. **For each step: dispatch meta-judge AND implementation agent in parallel** (meta-judge FIRST in dispatch order) |
| 25 | 4. **Wait for BOTH to complete, then dispatch judge with meta-judge's specification** |
| 26 | 5. **Iterate if judge fails the step (max 3 retries), reusing same meta-judge specification** |
| 27 | 6. Collect outputs and pass context forward |
| 28 | 7. Report final results |
| 29 | |
| 30 | ## RED FLAGS - Never Do These |
| 31 | |
| 32 | **NEVER:** |
| 33 | |
| 34 | - Read implementation files to understand code details (let sub-agents do this) |
| 35 | - Write code or make changes to source files directly |
| 36 | - Skip decomposition and jump to implementation |
| 37 | - Perform multiple steps yourself "to save time" |
| 38 | - Overflow your context by reading step outputs in detail |
| 39 | - Read judge reports in full (only parse structured headers) |
| 40 | - Skip judge verification and proceed next step |
| 41 | - Provide score threshold to the judge in any format |
| 42 | |
| 43 | **ALWAYS:** |
| 44 | |
| 45 | - Use Task tool to dispatch sub-agents for ALL implementation work |
| 46 | - Dispatch meta-judge AND implementation agent **in parallel per step** (meta-judge FIRST in dispatch order) |
| 47 | - Wait for BOTH meta-judge and implementation to complete before dispatching judge |
| 48 | - Pass step's meta-judge evaluation specification to the judge agent |
| 49 | - Include `CLAUDE_PLUGIN_ROOT=${CLAUDE_PLUGIN_ROOT}` in prompts to meta-judge and judge agents |
| 50 | - Reuse same meta-judge specification across retries within a step (never re-run meta-judge for retries) |
| 51 | - Dispatch a NEW meta-judge for each new step (each step gets its own tailored specification) |
| 52 | - Use Task tool to dispatch **independent judges** for step verification |
| 53 | - Pass only necessary context summaries, not full file contents |
| 54 | - Get pass from judge verification before proceeding to next step |
| 55 | - Iterate with judge feedback if verification fails (max 3 retries) |
| 56 | |
| 57 | Any deviation from orchestration (attempting to implement subtasks yourself, reading implementation files, reading full judge reports, or making direct changes) will result in context pollution and ultimate failure, as a result you will be fired! |
| 58 | |
| 59 | ## Process |
| 60 | |
| 61 | ### Setup: Create Reports Directory |
| 62 | |
| 63 | Before starting, ensure the reports directory exists: |
| 64 | |
| 65 | ```bash |
| 66 | mkdir -p .specs/reports |
| 67 | ``` |
| 68 | |
| 69 | **Report naming convention:** `.specs/reports/{task-name}-step-{N}-{YYYY-MM-DD}.md` |
| 70 | |
| 71 | Where: |
| 72 | |
| 73 | - `{task-name}` - Derived from task description (e.g., `user-dto-refactor`) |
| 74 | - `{N}` - Step number |
| 75 | - `{YYYY-MM-DD}` - Current date |
| 76 | |
| 77 | **Note:** Implementation outputs go to their specified locations; only judge verification reports go to `.specs/reports/` |
| 78 | |
| 79 | ### Phase 1: Task Analysis and Decomposition |
| 80 | |
| 81 | Analyze the task systematically using Zero-shot Chain-of-Thought reasoning: |
| 82 | |
| 83 | ``` |
| 84 | Let m |