К основному содержанию
правило CX Codex

tasks-generation — правило для Claude Code

Правило tasks-generation задаёт формат декомпозиции проекта на задачи: делит разработку на четыре фазы, связывает подзадачи с требованиями и отсекает нетехническую работу.

MIT ★ 3 774 обновлён 2026-10-22

Установить в Claude Code · Вручную: положить файлы Все способы и платформы ↓
.claude/rules/tasks-generation.md
Открыть на GitHub

Что делает tasks-generation

Правило регламентирует составление плана работ в файле tasks.md на основе requirements.md и design.md. Задачи формулируются на естественном языке от результата и поведения системы, без имён функций или путей к файлам. Вся работа делится строго на четыре этапа: настройка окружения (Foundation), разработка основной логики (Core), связывание компонентов (Integration) и сквозное тестирование (Validation).

Каждая подзадача рассчитана на 1–3 часа работы и обязана ссылаться на числовые идентификаторы из требований через метку _Requirements:_. Дополнительно размечаются границы компонентов и параллельное исполнение маркером (P). Перед записью итогового списка агент обязан прогнать черновик через шлюз проверки: если требование не покрыто или спецификация противоречива, генерация останавливается.

Задачи по развёртыванию, пользовательскому тестированию и написанию документации правило прямо запрещает включать в план.

Какие задачи решает

  • разбить архитектурный дизайн на пошаговые задачи без деталей реализации
  • выстроить очерёдность задач от базовой инфраструктуры до тестов
  • проверить полное покрытие требований из requirements.md перед стартом кодинга
  • разметить параллельные подзадачи с указанием границ компонентов

Примеры запросов агенту

  • Составь пошаговый план разработки tasks.md по нашей спецификации и архитектуре
  • Разбей фичу авторизации на подзадачи по правилам tasks-generation
  • Проверь черновик задач через шлюз и отметь зависимости между модулями

Как установить tasks-generation

Вручную: положить файлы

.claude/rules/tasks-generation.md

Поле paths во frontmatter ограничивает файлы

По шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать

Вопросы о tasks-generation

Как установить tasks-generation в Claude Code?

Сохраните текст правила в файл .claude/rules/tasks-generation.md внутри вашего репозитория. Claude Code автоматически подхватит инструкции при планировании.

Какие задачи запрещено включать в план?

Правило фокусирует агента исключительно на коде. В tasks.md нельзя добавлять шаги по деплою, маркетингу, ручному пользовательскому тестированию и составлению документации.

Как работает шлюз проверки плана задач?

Перед сохранением tasks.md агент проверяет, что каждый числовой ID требований покрыт задачами, а каждая подзадача выполнима за 1–3 часа. Допускается не более двух циклов исправления, после чего агент сообщает о пробелах в спецификации.

Исходный текст

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

Похожие правила IDE

Все правила IDE по теме «Настройка агента: память, контекст, субагенты» →
speckit.tasks alfredoperez Промпт speckit.tasks для Claude Code и Codex собирает из проектных документов план задач tasks.md, упорядоченный по зависимостям и пользовательским историям. Формирует этапы реализации проекта. CX Codex GP ChatGPT ★ 110звёзд репо ns-spec-driven nextstage-brasil Скилл ns-spec-driven для Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI и OpenCode, который ведёт доставку фичи по формальной спецификации. CX Codex +1 208установок paperclip-converting-plans-to-tasks paperclipai Скилл paperclip-converting-plans-to-tasks для Claude Code и Codex превращает утверждённый план в задачи с владельцами и реальными зависимостями. Помогает разделить план для делегирования. CX Codex +1 264установок edge-ai-tasks официальный Awesome Copilot Community Плагин edge-ai-tasks для GitHub Copilot исследует проект и планирует задачи реализации. Он предназначен для работы с крупными кодовыми базами и рассчитан на пользователей среднего и экспертного уровня. ★ 41 430звёзд репо openspec-implementation forztf Скилл openspec-implementation для Claude Code последовательно выполняет задачи утверждённых спецификаций OpenSpec, проверяя каждую тестами перед переходом дальше. CX Codex +1 1 400установок add-task NeoLabHQ Скилл add-task создаёт файл задачи в .specs/tasks/draft/ из вашего запроса: с заголовком-действием, типом и исходным текстом. Старт цепочки spec-driven разработки. CX Codex +1 1 300установок

Из того же набора12

Весь набор →
requirements-review-gate Правило requirements-review-gate останавливает работу и требует отремонтировать черновик требований перед тем, как начать писать requirements.md. Проверяет полноту охвата, формат EARS и структуру. CX Codex +1 ★ 3 774звёзд репо design-review-gate Правило design-review-gate проверяет черновик архитектуры перед формированием design.md. Находит пробелы в спецификациях и связывает каждый пункт требований с файловой структурой. CX Codex +1 ★ 3 774звёзд репо ears-format Правило ears-format задаёт формат EARS для критериев приёмки: условие, система и действие. Пригодится в spec-driven разработке. CX Codex +1 ★ 3 774звёзд репо design-discovery-full Правило design-discovery-full проводит систематическое исследование требований, существующего кода, технологий и рисков перед тем, как начать дизайн. Помогает выбрать архитектуру на основе фактов, а не предположений. CX Codex +1 ★ 3 774звёзд репо design-review Правило design-review оценивает технический дизайн-документ перед началом кодинга и выносит вердикт GO или NO-GO. Ограничивает замечания тремя критическими пунктами со ссылками на требования. CX Codex +1 ★ 3 774звёзд репо cc-sdd-new-agent Скилл cc-sdd-new-agent помогает добавить нового coding-агента в cc-sdd по готовому SOP: от исследования формата до тестов и dry-run. CX Codex +1 ★ 3 774звёзд репо gap-analysis Правило gap-analysis помогает структурировать анализ существующей кодовой базы, выявить, чего не хватает для реализации требований, и выбрать стратегию разработки. CX Codex +1 ★ 3 774звёзд репо design-principles Правило design-principles задаёт требования к архитектуре, типам, документации и Mermaid-диаграммам. Оно пригодится при подготовке design.md и проверке границ компонентов. CX Codex +1 ★ 3 774звёзд репо

Спонсоры проекта

Компании, которые помогают держать аналитику открытой