Skip to main content
rule CX Codex

tasks-generation — Claude Code rule: what it does, how to install

tasks-generation guides AI coding agents to generate structured, dependency-ordered technical task plans from specifications without leaking low-level code details.

MIT ★ 3,774 updated 2026-10-22

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/rules/tasks-generation.md
Open on GitHub

What tasks-generation does

The rule enforces a disciplined format for generating tasks.md from requirements.md and design.md. It instructs the agent to describe functional outcomes and business logic rather than mentioning file paths, class names, or method signatures. Work is structured into four sequential phases: Foundation, Core implementation, Integration, and Validation.

Sub-tasks must take between 1 and 3 hours each and map back to numeric IDs from requirements.md. The system supports explicit dependency declaration via _Depends:_ tags and parallel execution tags marked with (P). Before writing the final file, the agent runs a task plan review gate with a strict limit of two repair cycles; if gaps or contradictions persist, it halts instead of guessing.

Deployment, marketing, end-user testing, and documentation tasks are explicitly barred from the generated plan.

What it helps with

  • break down design documents into sequential implementation tasks
  • organize engineering work across four structured delivery phases
  • map every sub-task directly to numeric requirement IDs
  • validate parallel safety using module boundary declarations

Example prompts for the agent

  • Generate the tasks.md plan based on requirements.md and design.md
  • Break down the core billing module using the tasks-generation workflow
  • Run the review gate on our draft task list and flag missing requirement IDs

How to install tasks-generation

Manually: put the files in place

.claude/rules/tasks-generation.md

The paths frontmatter field limits the files

Step by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use

Questions about tasks-generation

How to install tasks-generation in Claude Code?

Add the rule content to .claude/rules/tasks-generation.md in your project repository. Claude Code reads this file automatically during task planning.

What types of tasks are excluded by tasks-generation?

The rule keeps the task list strictly technical. It explicitly rejects deployment, documentation, user testing, and marketing activities.

What happens if a requirement is missing from the task plan?

The draft task plan undergoes a review gate. If an ID from requirements.md is unassigned or the specification has ambiguities, task creation stops until the spec is corrected.

Source text

tasks-generation.md · MIT
# Task Generation Rules

## Core Principles

### 1. Natural Language Descriptions
Focus on capabilities and outcomes, not code structure.

**Describe**:
- What functionality to achieve
- Business logic and behavior
- Features and capabilities
- Domain language and concepts
- Data relationships and workflows

**Avoid**:
- File paths and directory structure
- Function/method names and signatures
- Type definitions and interfaces
- Class names and API contracts
- Specific data structures

**Rationale**: Implementation details (files, methods, types) are defined in design.md. Tasks describe the functional work to be done.

### 2. Task Ordering Principle

**Order implies dependency**: Task N implicitly depends on all tasks before it. This is the primary dependency mechanism.

**Tasks must follow this phase order**:
1. **Foundation**: Environment setup, test infrastructure, shared utilities, database schema, configuration
2. **Core**: Primary feature implementation (parallel-capable tasks grouped here)
3. **Integration**: Wiring components together, cross-boundary connections
4. **Validation**: E2E tests, edge cases, regression checks

**Rationale**: Foundation work unblocks everything else. Placing setup tasks early prevents downstream blocking. Core tasks can often run in parallel because foundation is already complete.

### 3. Task Integration & Progression

**Every task must**:
- Build on previous outputs (no orphaned code)
- Connect to the overall system (no hanging features)
- Progress incrementally (no big jumps in complexity)
- Respect architecture boundaries defined in design.md (Architecture Pattern & Boundary Map)
- Honor interface contracts documented in design.md
- Use major task summaries sparingly—omit detail bullets if the work is fully captured by child tasks.

**End with integration tasks** to wire everything together.

### 4. Dependency Declaration

**Default**: Sequential ordering handles most dependencies (task N depends on tasks before it).

**Explicit declaration required when**:
- A task depends on a specific task in a different major-task group (cross-boundary)
- The dependency is non-obvious from ordering alone
- A task can skip ahead of its position (declared via `(P)`) but still needs specific prior work

**Format**: `_Depends: 1.2, 2.3_` — placed alongside `_Requirements:_` in task detail sections.

**Do not over-annotate**: If a task simply depends on the task directly before it, ordering alone is sufficient.

### 5. Boundary Scope

**Each task should declare its component boundary** using design.md component/module names:
- `_Boundary: AuthService_` or `_Boundary: API Layer, UserRepository_`
- Helps validate parallel safety: tasks with non-overlapping boundaries are parallel candidates
- Helps agents understand scope: what to touch and what not to touch

**When to use**: Required for tasks marked `(P)` to validate parallel safety. Omit for sequential tasks where scope is obvious from the description.

### 6. Flexible Task Sizing

**Guidelines**:
- **Major tasks**: As many sub-tasks as logically needed (group by cohesion)
- **Sub-tasks**: 1-3 hours each, 3-10 details per sub-task
- Balance between too granular and too broad

**Don't force arbitrary numbers** - let logical grouping determine structure.

### 7. Requirements Mapping

**End each task detail section with**:
- `_Requirements: X.X, Y.Y_` listing **only numeric requirement IDs** (comma-separated). Never append descriptive text, parentheses, translations, or free-form labels.
- For cross-cutting requirements, list every relevant requirement ID. All requirements MUST have numeric IDs in requirements.md. If an ID is missing, stop and correct requirements.md before generating tasks.
- Reference components/interfaces from design.md when helpful (e.g., `_Contracts: AuthService API`)

### 8. Code-Only Focus

**Include ONLY**:
- Coding tasks (implementation)
- Testing tasks (unit, integration, E2E)
- Technical setup tasks (infrastructure, configuration)

**Exclude**:
- Deployment tasks
- Documentation tasks
- User testing
- Marketing/business activities

## Task Plan Review Gate

Before writing `tasks.md`, review the draft task plan and repair local issues until the plan passes or a true spec gap is discovered.

### Coverage Review

- Every requirement ID from `requirements.md` must appear in at least one task.
- Every design component, interface/contract, integration point, runtime prerequisite, and validation concern from `design.md` must be represented by at least one task.
- If coverage is missing because the task plan is incomplete, repair the draft tasks and review again.
- If coverage cannot be added cleanly because requirements or design are ambiguous, contradictory, or underspecified, stop and return to the requirements/design phase instead of papering over the gap in `tasks.md`.

### Executability Review

- Every sub-task must be executable as written, usually within 1-3 hours.
- Every sub-task must produce a verifiable deliverable (behavior, artifact, endpoint, UI state, config, migration, test, or integration result).
- Split tasks that combine multiple independently verifiable outcomes.
- Merge or collapse tasks that are too small, bookkeeping-only, or not meaningful execution units.
- Make implicit prerequisites explicit as preceding tasks.
- Re-check `_Depends:_`, `_Boundary:_`, and `(P)` markers after edits so concurrency claims still match the design boundaries and dependency graph.

### Review Loop

- Run the review gate on the draft task plan before writing `tasks.md`.
- If issues are task-plan-local, repair the draft and re-run the review gate.
- Keep the loop bounded: no more than 2 review-and-repair passes before escalating a real spec gap.
- Write `tasks.md` only after the review gate passes.

### Optional Test Coverage Tasks

- When the design already guarantees functional coverage and rapid MVP delivery is prioritized, mark purely test-oriented follow-up work (e.g., baseline rendering/unit tests) as **optional** using the `- [ ]*` checkbox form.
- Only apply the optional marker when the sub-task directly references acceptance criteria from requirements.md in its detail bullets.
- Never mark implementation work or integration-critical verification as optional—reserve `*` for auxiliary/deferrable test coverage that can be revisited post-MVP.

## Task Hierarchy Rules

### Maximum 2 Levels
- **Level 1**: Major tasks (1, 2, 3, 4...)
- **Level 2**: Sub-tasks (1.1, 1.2, 2.1, 2.2...)
- **No deeper nesting** (no 1.1.1)
- If a major task would contain only a single actionable item, collapse the structure and promote the sub-task to the major level (e.g., replace `1.1` with `1.`).
- When a major task exists purely as a container, keep the checkbox description concise and avoid duplicating detailed bullets—reserve specifics for its sub-tasks.

### Sequential Numbering
- Major tasks MUST increment: 1, 2, 3, 4, 5...
- Sub-tasks reset per major task: 1.1, 1.2, then 2.1, 2.2...
- Never repeat major task numbers

### Parallel Analysis (default)
- Assume parallel analysis is enabled unless explicitly disabled (e.g. `--sequential` flag).
- `(P)` means: this task has no dependency on its immediately preceding peers and can run concurrently with them.
- Identify tasks that can run concurrently when **all** conditions hold:
  - No data dependency on other pending tasks
  - No shared file or resource contention
  - No prerequisite review/approval from another task
  - `_Boundary:_` annotations confirm non-overlapping component scopes
- Foundation-phase tasks (see Task Ordering Principle) are rarely `(P)` — they establish shared prerequisites.
- Core-phase tasks are the primary candidates for `(P)` since foundation is already complete.
- Validate that identified parallel tasks operate within separate boundaries defined in the Architecture Pattern & Boundary Map.
- Confirm API/event contracts from design.md do not overlap in ways that cause conflicts.
- `(P)` tasks with cross-boundary dependencies must declare `_Depends: X.X_` explicitly.
- Append `(P)` immediately after the task number for each parallel-capable task:
  - Example: `- [ ] 2.1 (P) Build background worker`
  - Apply to both major tasks and sub-tasks when appropriate.
- If sequential mode is requested, omit `(P)` markers entirely.
- Group parallel tasks logically (same parent when possible) and highlight any ordering caveats in detail bullets.
- Explicitly call out dependencies that prevent `(P)` even when tasks look similar.

### Checkbox Format
```markdown
- [ ] 1. Foundation: environment and test infrastructure setup
- [ ] 1.1 Sub-task description
  - Detail item 1
  - Detail item 2
  - _Requirements: X.X_

- [ ] 2. Core feature A
- [ ] 2.1 (P) Sub-task description
  - Detail items...
  - _Requirements: Y.Y_
  - _Boundary: AuthService_

- [ ] 2.2 (P) Sub-task description
  - Detail items...
  - _Requirements: Z.Z_
  - _Boundary: UserRepository_

- [ ] 3. Integration and wiring
- [ ] 3.1 Sub-task description
  - Detail items...
  - _Depends: 2.1, 2.2_
  - _Requirements: W.W_
```

## Requirements Coverage

**Mandatory Check**:
- ALL requirements from requirements.md MUST be covered
- Cross-reference every requirement ID with task mappings
- If gaps found: Return to requirements or design phase
- No requirement should be left without corresponding tasks

Use `N.M`-style numeric requirement IDs where `N` is the top-level requirement number from requirements.md (for example, Requirement 1 → 1.1, 1.2; Requirement 2 → 2.1, 2.2), and `M` is a local index within that requirement group.

Document any intentionally deferred requirements with rationale.

© gotalab · MIT · gotalab/cc-sdd

Similar IDE rules

All IDE rules for Agent setup: memory, context, orchestration →

From the same set12

The whole set →
requirements-review-gate The requirements-review-gate rule halts work and requires fixing the requirements draft before requirements.md is written. It validates scope coverage, EARS format compliance, and structural quality. CX Codex +1 ★ 3,774repo stars design-review-gate design-review-gate audits draft architectures before generating design.md. It links requirement IDs to concrete components and prevents speculative interfaces. CX Codex +1 ★ 3,774repo stars ears-format The ears-format rule formats acceptance criteria with EARS patterns. Use it when a specification needs clear conditions, subjects, and system responses. CX Codex +1 ★ 3,774repo stars design-discovery-full The design-discovery-full rule systematically maps requirements, existing code, technologies, and risks before design begins. It ensures architectural choices rest on facts rather than assumptions. CX Codex +1 ★ 3,774repo stars design-review design-review reviews technical design documents before coding starts and issues a GO/NO-GO verdict. Caps feedback at three critical issues tied directly to project requirements. CX Codex +1 ★ 3,774repo stars cc-sdd-new-agent The cc-sdd-new-agent skill guides a new coding-agent integration in cc-sdd, from official-format research and planning to implementation checks. CX Codex +1 ★ 3,774repo stars gap-analysis The gap-analysis rule structures the analysis of your existing codebase, identifies what's missing for a feature, and helps you decide whether to extend existing components or build new ones. CX Codex +1 ★ 3,774repo stars design-principles The design-principles rule sets checks for architecture, types, documentation, and Mermaid diagrams. Use it when drafting design.md or reviewing component boundaries. CX Codex +1 ★ 3,774repo stars

Project sponsors

Companies that keep this analytics open