> ## Documentation Index
> Fetch the complete documentation index at: https://taskgraph-ai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PRD Creation and Parsing

> Write a PRD (product requirements document) and parse it into a dependency-aware TaskGraph task list with Claude Code.

# Writing a PRD

A PRD (Product Requirements Document) is the starting point of every task flow in TaskGraph. It defines what you're building and why. A clear PRD dramatically improves the quality of your tasks, your model outputs, and your final product — so it’s worth taking the time to get it right.

> [!TIP]
>
> You don’t need to define your whole app up front. You can write a focused PRD just for the next feature or module you’re working on.

> [!TIP]
>
> You can start with an empty project or you can start with a feature PRD on an existing project.

> [!TIP]
>
> You can add and parse multiple PRDs per project using the --append flag. Running `--append` again on a PRD you edited only generates tasks for the sections you added.

## What Makes a Good PRD?

* Clear objective — what’s the outcome or feature?
* Context — what’s already in place or assumed?
* Constraints — what limits or requirements need to be respected?
* Reasoning — why are you building it this way?

The more context you give the model, the better the breakdown and results.

***

## Writing a PRD for TaskGraph

> [!NOTE]
>
> Two example PRD templates are available in `.taskgraph/templates/`:
>
> * `example_prd.md` - Simple template for straightforward projects (`.md` recommended for better editor support)
> * `example_prd_rpg.md` - Advanced RPG (Repository Planning Graph) template for complex projects with dependencies
>
> **Why `.md`?** While both `.txt` and `.md` work, Markdown files provide syntax highlighting, proper rendering on GitHub, and better collaboration through formatted documentation.

You can co-write your PRD with an LLM model using the following workflow:

1. **Chat about requirements** — explain what you want to build.
2. **Show an example PRD** — share the example PRD so the model understands the expected format. The example uses formatting that work well with TaskGraph's code. Following the example will yield better results.
3. **Iterate and refine** — work with the model to shape the draft into a clear and well-structured PRD.

This approach works great in Claude Code, or anywhere you use a chat-based LLM.

### Choosing Between Templates

**Use `example_prd.md` when:**

* Building straightforward features
* Working on smaller projects
* Dependencies are simple and obvious

**Use `example_prd_rpg.md` when:**

* Building complex systems with multiple modules
* Need explicit dependency management
* Want structured guidance on architecture decisions
* Planning a large codebase from scratch

The RPG template teaches you to think about:

1. **Functional decomposition** (WHAT the system does)
2. **Structural decomposition** (HOW it's organized in code)
3. **Explicit dependencies** (WHAT depends on WHAT)
4. **Topological ordering** (build foundation first, then layers)

> [!TIP]
>
> For complex projects, using the RPG template with a code-context-aware ai agent produces the best results because the AI can understand your existing codebase structure. [Learn more about the RPG method →](https://taskgraph-ai.com/capabilities/rpg-method)

***

## Where to Save Your PRD

Place your PRD file in the `.taskgraph/docs` folder in your project.

* You can have **multiple PRDs** per project.
* Name your PRDs clearly so they're easy to reference later.
  * Examples: `dashboard_redesign.md`, `user_onboarding.md`
  * Tip: Use `.md` extension for better editor support and syntax highlighting

***

# Parse your PRD into Tasks

This is where the TaskGraph magic begins.

In Claude Code, instruct the agent to generate tasks from your PRD:

```
Please use the taskgraph parse-prd command to generate tasks from my PRD. The PRD is located at .taskgraph/docs/<prd-name>.md.
```

The agent will execute the following command which you can alternatively paste into the CLI:

```bash theme={null}
taskgraph parse-prd .taskgraph/docs/<prd-name>.md
```

This will:

* Parse your PRD document
* Generate a structured `tasks.json` file with tasks, dependencies, priorities, and test strategies

To be asked about gaps in the PRD first, use the `/taskgraph:parse-prd` plugin command in Claude Code, or add `--clarify` in the terminal:

```bash theme={null}
taskgraph parse-prd .taskgraph/docs/<prd-name>.md --clarify
```

It asks up to 5 questions, each with a suggested answer, saves your answers in the PRD under `## Clarifications`, and then generates the tasks from it.

Now that you have written and parsed a PRD, you are ready to start setting up your tasks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.