Skip to content
Development
Command

/tasks

Generate implementation tasks from design

From plugin
smart-ralph
43223 skills12 agents23 commands
Install
$ npx -y skills add tzachbon/smart-ralph --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/tasks

Context preview

What this command does when you run it.

Generate implementation tasks from design

Command definition

tasks.md
description: Generate implementation tasks from design
argument-hint: [spec-name] [--tasks-size fine|coarse]
allowed-tools: "*"

Tasks Phase

Generate implementation tasks for the active spec. Running this command implicitly approves design. You are a **coordinator, not a task planner** -- delegate ALL work to the `task-planner` subagent.

Checklist

Create a task for each item and complete in order:

1. **Gather context** -- resolve spec, read design, requirements, research 2. **Interview** -- brainstorming dialogue (skip if `--quick`) 3. **Execute task generation** -- dispatch task-planner via team 4. **Artifact review** -- spec-reviewer validation loop (only if `--quick`) 5. **Walkthrough & approval** -- display summary, get user approval 6. **Finalize** -- update state, commit, stop

Step 1: Gather Context

1. If `$ARGUMENTS` contains a spec name, use `ralph_find_spec()` to resolve it; otherwise use `ralph_resolve_current()` 2. If no active spec, error: "No active spec. Run /ralph-specum:new <name> first." 3. Check the resolved spec directory exists 4. Check `design.md` exists. If not, error: "Design not found. Run /ralph-specum:design first." 5. Check `requirements.md` exists 6. Read `.ralph-state.json`; clear approval flag: `awaitingApproval: false` 7. **`--tasks-size` flag handling**: Check `$ARGUMENTS` for `--tasks-size` flag:

  • If value is `fine` or `coarse`: update `granularity` in `.ralph-state.json` to the given value (overrides any value set by `/ralph-specum:start`)
  • If value is invalid (not `fine` or `coarse`): warn the user (`⚠️ Invalid --tasks-size value "<value>", defaulting to fine`) and set `"granularity": "fine"` in `.ralph-state.json`
  • If `--tasks-size` flag is absent: leave `granularity` unchanged in `.ralph-state.json` (preserve any value set by `/ralph-specum:start`)

8. **Quick mode granularity default**: If `--quick` is present in `$ARGUMENTS` AND `granularity` is not set in `.ralph-state.json`, set `"granularity": "fine"` in `.ralph-state.json` 9. Read context: `requirements.md`, `design.md`, `research.md` (if exists), `.progress.md`

Step 2: Interview (skip if --quick)

Check if `--quick` appears in `$ARGUMENTS`. If present, skip to Step 3.

Read Context from .progress.md

Parse Intent Classification and all prior interview responses to skip already-answered questions.

**Intent-Based Question Counts:**

  • TRIVIAL: 1-2 | REFACTOR: 3-5 | GREENFIELD: 5-10 | MID_SIZED: 3-7

Brainstorming Dialogue

Apply adaptive dialogue from `${CLAUDE_PLUGIN_ROOT}/skills/interview-framework/SKILL.md`. Ask context-driven questions one at a time.

**Tasks Exploration Territory** (hints, not a script):

  • **Testing thoroughness** -- minimal POC-only tests, standard unit + integration, or comprehensive E2E?
  • **Deployment considerations** -- feature flags, database migrations, backward compatibility, rollback plan?
  • **Execution priority** -- ship fast with shortcuts, balanced pace, or quality-first from the start?
  • **Dependency ordering** -- are there tasks that must complete before others can begin?
  • **Team workflow constraints** -- PR review process, CI pipeline requirements, branch strategy?
  • **E2E verification** -- add autonomous end-to-end verification tasks? (default YES). What should be tested end-to-end?
  • **Task granularity** -- fine (40-60+ small tasks, ideal for parallel) or coarse (10-20 larger tasks, fewer tokens)? Both include [VERIFY] checkpoints every 2-3 tasks. Fine is recommended.

**Granularity question skip conditions**: Only ask the "Task granularity" question when ALL of these are true:

  • `--quick` is NOT present in `$ARGUMENTS`
  • `granularity` is NOT already set in `.ralph-state.json` (i.e., not pre-set via `--tasks-size` flag on `/ralph-specum:start` or `/ralph-specum:tasks`)

If either condition is false, skip the granularity question:

  • In `--quick` mode: handled in Step 1 (quick mode granularity default)
  • If `granularity` already set in `.ralph-state.json`: use the existing value without asking

When the user answers the granularity question, store the response in `.progress.md` under Interview Responses and update `"granularity"` in `.ralph-state.json`.

Tasks Approach Proposals

After dialogue, propose 2-3 execution strategies. Examples (illustrative only):

  • **(A)** Aggressive POC -- fewer tasks, ship in small increments, add polish later
  • **(B)** Thorough -- more tasks with full test coverage and quality gates throughout
  • **(C)** Phased delivery -- split into multiple PRs with clear milestones

Store Interview & Approach

Append to `.progress.md` under "Interview Responses":

### Tasks Interview (from tasks.md)
- [Topic 1]: [response]
- E2E verification: YES/NO -- [strategy or "auto"]
- Chosen approach: [name] -- [brief description]

Pass combined context to delegation prompt as "Interview Context".

Step 3: Execute Task Generation (Team-Based)

<mandatory> **Use Claude Code Teams with `task-planner` as the teammate subagent type.**

ALL specs MUST follow POC-first workflow. Read `${CLAUDE_PLUGIN_ROOT}/references/phase-rules.md` for the mandatory 5-phase structure and phase distribution rules.

Read `${CLAUDE_PLUGIN_ROOT}/references/quality-checkpoints.md` for checkpoint insertion rules (frequency, format, final verification sequence).

Follow the full team lifecycle:

1. **Clean up stale team (MANDATORY FIRST ACTION)**: Call `TeamDelete()` before anything else. This releases whatever team the session is currently leading (could be from any prior phase). Errors mean no team was active -- harmless, proceed. 2. **Create team**: `TeamCreate(team_name: "tasks-$spec")` 3. **Create task**: `TaskCreate(subject: "Generate implementation tasks for $spec", activeForm: "Generating tasks")` 4. **Spawn teammate**: `Task(subagent_type: task-planner, team_name: "tasks-$spec", name: "planner-1")` — delegate with requirements, design, and interview context. Instruct to:

  • Break implementation into
Read more
Ships withsmart-ralph

Spec-driven development with smart compaction. Claude Code plugin combining Ralph Wiggum loop with structured specification workflow.

Get the whole plugin, auto-invoked
Stats
432
Stars
1
Views
40
Forks
Active
Maintenance
Shell
Language
MIT
License
16d ago
Last commit
6mo ago
Created

Repo: tzachbon/smart-ralph