generate_tasks

A set of rules for turning a product requirements document, or PRD, into an implementation task list. It first creates broad parent tasks, then creates smaller tasks after the user confirms.

In plain words
What is it for?
Use it to create Markdown task files from PRDs, review high-level implementation work, and then break that work into actionable subtasks.
Why use it?
It gives a structured place to record the work implied by a PRD and prevents detailed subtasks from being generated before the high-level plan is reviewed. It also identifies relevant files.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/markhazlett/cursor-rules/generate_tasks
Clone the repo
git clone --depth 1 https://github.com/markhazlett/cursor-rules
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 88% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00844
Opus 5 $0.00000 $0.00422
Sonnet 5 $0.00000 $0.00169
Haiku 4.5 $0.00000 $0.00084

Measured yesterday against content hash 304e6f72ea7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate_tasks scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

88% identical to generate-tasks — 19 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

rules/generate_tasks.mdc · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

  • Format: Markdown (.md)
  • Location: /tasks/
  • Filename: tasks-[prd-file-name].md (e.g., tasks-prd-user-profile-editing.md)

Process

  1. Receive PRD Reference: The user points the AI to a specific PRD file
  2. Analyze PRD: The AI reads and analyzes the functional requirements, user stories, and other sections of the specified PRD.
  3. Phase 1: Generate Parent Tasks: Based on the PRD analysis, create the file and generate the main, high-level tasks required to implement the feature. Use your judgement on how many high-level tasks to use. It's likely to be about 5. Present these tasks to the user in the specified format (without sub-tasks yet). Inform the user: "I have generated the high-level tasks based on the PRD. Ready to generate the sub-tasks? Respond with 'Go' to proceed."
  4. Wait for Confirmation: Pause and wait for the user to respond with "Go".
  5. Phase 2: Generate Sub-Tasks: Once the user confirms, break down each parent task into smaller, actionable sub-tasks necessary to complete the parent task. Ensure sub-tasks logically follow from the parent task and cover the implementation details implied by the PRD.
  6. Identify Relevant Files: Based on the tasks and PRD, identify potential files that will need to be created or modified. List these under the Relevant Files section, including corresponding test files if applicable.
  7. Generate Final Output: Combine the parent tasks, sub-tasks, relevant files, and notes into the final Markdown structure.
  8. Save Task List: Save the generated document in the /tasks/ directory with the filename tasks-[prd-file-name].md, where [prd-file-name] matches the base name of the input PRD file (e.g., if the input was prd-user-profile-editing.md, the output is tasks-prd-user-profile-editing.md).

Output Format

The generated task list must follow this structure:

## Relevant Files

- `path/to/potential/file1.ts` - Brief description of why this file is relevant (e.g., Contains the main component for this feature).
- `path/to/file1.test.ts` - Unit tests for `file1.ts`.
- `path/to/another/file.tsx` - Brief description (e.g., API route handler for data submission).
- `path/to/another/file.test.tsx` - Unit tests for `another/file.tsx`.
- `lib/utils/helpers.ts` - Brief description (e.g., Utility functions needed for calculations).
- `lib/utils/helpers.test.ts` - Unit tests for `helpers.ts`.

### Notes

- Unit tests should typically be placed alongside the code files they are testing (e.g., `MyComponent.tsx` and `MyComponent.test.tsx` in the same directory).
- Use `npx jest [optional/path/to/test/file]` to run tests. Running without a path executes all tests found by the Jest configuration.

## Tasks

- [ ] 1.0 Parent Task Title
  - [ ] 1.1 [Sub-task description 1.1]
  - [ ] 1.2 [Sub-task description 1.2]
- [ ] 2.0 Parent Task Title
  - [ ] 2.1 [Sub-task description 2.1]
- [ ] 3.0 Parent Task Title (may not require sub-tasks if purely structural or configuration)

Read the full file on GitHub · 56 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 56 lines · 0 tokens per session scan A 304e6f72ea7b

Subscribe to this mod's changes

generate_tasks is a cursor rule published in the GitHub repository markhazlett/cursor-rules (2 stars, last pushed 1y ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 844 tokens. A static security scan graded it A with 0 findings. It is 88% identical to generate-tasks, differing in 19 lines, and is treated as a copy.