# Tasks

`dryv task` keeps your project's work as Markdown files inside the project. Each task is one file with YAML frontmatter. Tasks are grouped in **waves**. You, your teammates and the [Dryv agent](/docs/guides/agent) all read and change the same files.

Tasks work offline and need no account. Sign in only if you want to [sync them](/docs/guides/sync) to the Dryv web app and your other devices.

> [!NOTE]
> Tasks are in the current Dryv CLI. The published 0.1.0 build may not include them yet.

## When to use it

- You want a plan for a feature that lives next to the code.
- You want an agent to pick up work, record progress and hand it back.
- You want to see which files changed while a task was in progress.

## Set up a project

From your project folder:

```bash
dryv task init
```

This creates:

| Path | What it is |
| --- | --- |
| `task.yaml` | Task configuration. |
| `tasks/` | The task workspace. |
| `tasks/README.md` | How the workspace works. |
| `tasks/rules/task-writing.md` | The writing standard tasks must meet. |
| `AGENTS.md` | A managed block that tells agents how to use tasks. |

Use `--workspace <path>` to choose another folder. Run `dryv task init update` later to refresh the guide and the `AGENTS.md` block.

By default the task workspace is kept out of git. Dryv adds it to `.git/info/exclude`, never to `.gitignore`. See [Configuration](#configuration) to track it.

## Create and work on tasks

Create a wave, then a task in it:

```bash
dryv task wave create --title "Login flow"
dryv task create --title "Add password reset" --wave login-flow --priority high --assignee alice
```

Each task gets an id such as `TSK-9C598FB02513`. Waves are stored by week, for example `tasks/todo/work/W49/login-flow--b4c221/`.

Write the task body with `dryv task edit <id>`, which opens `$EDITOR`. A task needs a real Goal, Context and checklist before you can start it. The rules are in `tasks/rules/task-writing.md`.

Then work through it:

```bash
dryv task start TSK-9C598FB02513 --track    # move to in-progress and record git changes
dryv task check TSK-9C598FB02513 --item 1   # tick the first checkbox
dryv task comment TSK-9C598FB02513 --text "API done, UI left."
dryv task update TSK-9C598FB02513 --status completed
dryv task validate
```

Statuses are `planned`, `in-progress`, `blocked`, `completed` and `archived`. Priorities are `low`, `medium` and `high`.

## Agents and handover

The Dryv agent has task tools: `task.list`, `task.show`, `task.search`, `task.validate`, `task.create`, `task.update`, `task.start`, `task.check` and `task.comment`. Changes go through the agent's [approval policy](/docs/guides/agent#approvals).

Other agents use the same files through the CLI. `dryv task init` writes instructions for them into `AGENTS.md`, and `dryv task setup` can add more agent guidance.

To hand work to someone:

1. Set who owns it: `dryv task update <id> --assignee <name>`.
2. Leave a note: `dryv task comment <id> --text "What is done, what is left, where to look."`.
3. Read the history with `dryv task activity <id>` and `dryv task comments <id>`.

## Command reference

Run `dryv task --help` for the same list. `dryv tasks` is an alias.

| Command | What it does |
| --- | --- |
| `dryv task` | Show the workspace overview. |
| `init [--workspace <path>]` | Set up the project for tasks. |
| `init update` | Update the workspace guide and the `AGENTS.md` instructions. |
| `init --refresh-docs` | Refresh the task docs without prompting. |
| `project inspect` | Inspect the repository and suggest guidance. Read-only. |
| `setup` | Review and apply project documentation and agent guidance. |
| `setup plan --json` | Print a setup plan without writing files. |
| `setup apply --path <file>` | Apply a saved setup plan. |
| `tui`, `-f` | Open the full-screen interface. |
| `run` | Start the local dashboard and open it in a browser. |
| `doctor` | Check Bun and workspace health. |
| `info`, `status`, `stats` | Show workspace information and counts. |
| `tree` | Show the Markdown workspace paths. |
| `wave create\|list` | Manage waves. `group` is an alias. |
| `migrate` | Move old flat waves into week folders. |
| `list [filters]` | List active tasks. Add `--archived` for archived ones. |
| `show <id\|path>` | Show a task or document. |
| `search <query>` | Search metadata and Markdown text. |
| `create` | Create a task in a wave. |
| `update <id>` | Change task metadata. |
| `edit <id>` | Edit the Markdown body in `$EDITOR`. |
| `archive <task-or-wave>`, `restore <task-or-wave>` | Archive or restore. |
| `start <id> [--track]` | Move to in-progress, optionally recording git changes. |
| `changes <id> [--diff <path>]` | Show the git changes made while the task was in progress. |
| `comment <id> --text "…"`, `comments <id>` | Add or list comments. |
| `move <id> (--before\|--after <id> \| --order N \| --wave <id>)` | Reorder or move a task. |
| `attach <id> <file\|url>`, `detach <id> <name>` | Manage small attachments and links. |
| `template create\|list` | Manage task templates. Use with `create --template <id>`. |
| `bulk <id…> [--status …]` | Change many tasks at once. |
| `activity <id>` | Show a task's timeline. |
| `checklist <id>` | Show a task's checkboxes by heading. |
| `check\|uncheck <id> (--item N \| --section "Heading" \| --all)` | Tick or untick checkboxes. |
| `delete <id> [--yes] [--force] [--cascade]` | Move a task, wave or document to the trash. |
| `undelete <trash-id>`, `trash list` | Restore from the trash, or list it. |
| `validate [scope]` | Validate tasks, docs, links and references. |
| `docs list\|show\|search\|tree\|open\|create` | Work with documents. |
| `index status\|rebuild\|verify` | Inspect or rebuild the index. |
| `registry` | List every registered task and document (`dryv.task.yaml`). |
| `sync [status\|now\|enable\|disable]` | Sync tasks with your Dryv account. See [Sync](/docs/guides/sync). |

Task fields: `--title`, `--wave` (or `--group`), `--status`, `--priority`, `--assignee`, `--project`, `--tag a,b`, `--due YYYY-MM-DD`, `--depends-on TSK-…`, `--extra JSON`.

Common options: `--workspace <path>`, `--json`, `--plain`, `--no-color`, `--quiet`, `--verbose`, `--no-open`.

## Configuration

Settings live in a `tasks:` block in `dryv.yaml`. If there is no such block, `task.yaml` is read instead.

```yaml title="dryv.yaml"
tasks:
  workspace: tasks          # folder with the task files
  documents: [docs, notes]  # other folders whose Markdown files are registered
  sync:
    enabled: false          # turned on by `dryv task sync enable`
    ignore: ["*.draft.md"]  # files never uploaded
  git:
    track: false            # true keeps the workspace visible to git
  quality:
    mode: reject            # reject, warn or off
  tracking:
    enabled: true           # record file changes while a task is in progress
```

Every key is optional; `tasks: {}` uses the defaults. The block also accepts `idPrefix`, `identity`, and `organization`. The CLI and the local daemon accept the same keys, so `registry` and `sync` work with any valid block.

## The registry

`dryv task registry` lists every file Dryv knows about: the files in the task workspace and the Markdown files under `documents` folders. The list is written to `dryv.task.yaml` at the project root. It is rebuilt from the files, so do not edit it.

Some files are never registered, so never uploaded: hidden files, links, files over 1 MB, `node_modules`, and names that often hold secrets (`.env*`, `*.pem`, `*.key`, `id_*`, `credentials*`, `secrets.*`).

`dryv task registry` and `dryv task sync` use the [local daemon](/docs/guides/local-daemon) and start it if needed.

## Troubleshooting

**"Write the missing content … then try again."** The task or its wave plan is too thin to start. Fill in the sections named in the message, or relax `quality.mode`.

**"No Task workspace in the project."** The CLI looks for the workspace only in the project root, the folder with `dryv.yaml`. It never uses a `tasks` folder from a parent directory. Run `dryv task init` in your project first, add a `tasks:` block, or pass `--workspace`.

**"The local Dryv daemon is not reachable."** Only `registry` and `sync` need the daemon. See [Local daemon](/docs/guides/local-daemon#troubleshooting).
