mytask
# mytask
Task management for one plain-text task list — for you from the command line,
for an AI agent over MCP, and on a screen: a Gantt chart, a dependency chart
and a terminal UI. Standard library only, no dependencies.
```
mytask list --ready # what can be worked on now
mytask add "Ship the release" --section Release --priority 0 --estimate 1d
mytask done ^ship-the-release
mytask gantt # an interactive HTML Gantt chart
mytask chart # the schedule + dependencies as an SVG
mytask tui # walk the tree, change statuses in place
mytask mcp # the same list for an AI agent (MCP)
mytask export md -o - # a status report for the meeting
```
Extracted from [myteam](https://github.com/saperant/myteam): the TaskML parser
(`src/taskml/`) and the plan editor (`src/mytask/plan.py`) are the same code,
so files written here read there and vice versa. (Source paths such as
`tasks/src/parser.cpp` in docstrings refer to the C++ originals in myteam.)
## The task list
One file, Markdown by convention (TaskML works too — the dialect follows the
file name). Point the tool at it with `-f PLAN.md`, or let it find one of
`PLAN.md` → `plan.md` → `TASKS.md` → `tasks.md` → `plan.taskml` →
`tasks.taskml` in the working directory. `mytask init` creates a starter.
```markdown
---
project: Website redesign
sprint: Sprint 1
---
## Backend
- [x] Design schema #p0 ~1d @ann ^schema
- [~] Build API #p1 ~3d @bob ^api
- depends: ^schema
- Plan reviewed with the team
- (x) Returns JSON
- ( ) Handles errors
## Frontend
- [ ] Build UI #p1 ~5d @cid ^ui
- depends: ^api
- [ ] Deploy ~1d ^deploy
- blocked-by: ^ui
```
- Statuses: `[ ]` pending, `[~]` in progress, `[x]` done, `[!]` blocked,
`[?]` in review, `[-]` cancelled.
- Tokens: `#p0`–`#p3` priority, `~4h`/`~2d`/`~1w` estimate, `@assignee`,
`!2026-12-15` due date, `^id` (what other tasks refer to).
- Dependencies: `depends:` waits until done or in review; `blocked-by:` waits
until done.
- Nested list items under a task: notes, acceptance criteria (`( )` pending,
`(x)` verified, `(!)` failed — `(x) ...` becomes evidence with
`--evidence`), and subtasks (any status marker).
- Everything else (prose, paragraphs, code blocks) is left alone by every
edit: changes are line-by-line, validated before they touch the file, and
written atomically.
## The CLI
`mytask [global options] COMMAND [command options]`, where `-f PLAN` can
stand before or after the command.
| Querying | |
|---|---|
| `list [-s STATUS] [-a HANDLE] [-t TAG] [--section T] [--text WORDS] [--ready] [--all] [--json]` | the tasks, one line each (open ones by default) |
| `show TASK` | one task in full: notes, criteria, dependencies, blockers, who waits for it |
| `status` | the overview: counts, what is ready, what waits for what, validation errors |
| `check` | validate the list (duplicate ids, unknown or circular dependencies), exit 1 on errors |
| Managing | |
|---|---|
| `init [PATH]` | create a starter task list |
| `add "DESCRIPTION" [--section T \| --under TASK \| --after TASK] [--status S] [--assignee H] [--priority 0-3] [--estimate 4h] [--id ID] [--tag TAG]... [--note TEXT]... [--criterion TEXT]... [--depends ^ID]... [--blocked-by ^ID]...` | add a task (dependencies included in one write) |
| `start`, `done`, `open`, `block`, `review`, `cancel`, `set-status TASK STATUS` | change a status (`--note` adds a note with it) |
| `assign TASK HANDLE`, `priority TASK 0-3`, `estimate TASK 4h`, `tag TASK TAG`, `note TASK TEXT` | the other fields |
| `dep TASK add\|remove OTHER`, `blocker TASK add\|remove OTHER` | the two kinds of links |
| `criterion TASK add TEXT \| set N STATUS [--evidence E] \| remove N [--why W]` | acceptance criteria |
| `dedup [--dry-run]` | merge open twins (same title and assignee) |
A task key is `^id`, the id alone, or `L<line>`. `myteam`'s protections are
kept: a write that would break the list is refused (nothing written), a list
that does not validate is not edited until fixed, and a file changed on disk
since it was read is not overwritten.
## The MCP server (AI agents)
`mytask mcp -f PLAN.md` speaks MCP (JSON-RPC 2.0, one message per line) on
stdin/stdout. Reading tools: `plan_overview`, `plan_list_tasks`,
`plan_get_task`, `plan_validate`. Writing tools — one validated edit per
call, committed atomically: `plan_add_task`, `plan_update_task`,
`plan_add_note`, `plan_add_dependency`, `plan_remove_dependency`,
`plan_add_criterion`, `plan_check_criterion`, `plan_remove_criterion`.
Statuses take their words and the everyday aliases (`done` for `completed`,
`doing` for `in_progress`, `todo` for `pending`, ...). Adding a task whose
title and assignee match an open task does not duplicate it: the open one
gets a note instead.
```json
{"mcpServers": {"mytask": {
"command": "/path/to/mytask/bin/mytask",
"args": ["mcp", "-f", "/path/to/PLAN.md"]}}}
```
## Seeing it: Gantt, chart, TUI
- `mytask gantt [-o FILE]` — an interactive HTML page (inline SVG, hover
tooltips, dark mode): estimates turned into dates, dependencies resolved,
one task per assignee at a time (unless `--no-leveling`), weekends off
(unless `--include-weekends`). `--start`, `--hours-per-day`,
`--default-days` tune it.
- `mytask chart [-o FILE.svg]` — the same schedule with its dependency arrows
as a standalone SVG: what waits for what, and when it can run.
- `mytask tui` — the tree in the terminal: walk with the arrows, change a
status with `space/~/x/!/r/-`, assign with `a`, estimate with `e`,
prioritize with `p`, detail with `Enter`, hide finished with `h`, and see
the Gantt schedule with `g`.
## Exporting
- `mytask export json` — the TaskML reference JSON (round-trips back).
- `mytask export csv` — one row per task for a spreadsheet.
- `mytask export md` — a Markdown status report (progress, open work by
section, what waits for what).
- `mytask convert --to md|taskml` — between the two dialects.
All write to a file next to the list by default; `-o -` writes to stdout.
## Running it
Python 3.11+, nothing to install but this:
```
pip install . # the mytask command
./bin/mytask ... # or straight from the checkout, any python3
python -m mytask ... # with src/ on sys.path
uv run --extra test pytest # the tests (106: taskml + plan + tool)
```
## Layout
```
src/taskml/ the TaskML library: parser, model, validator, serializer, JSON, Gantt
src/mytask/ plan.py (the validated line-by-line editor), views.py, cli.py,
mcp.py, tui.py, chart.py, export.py, util.py
tests/ taskml core (ported), plan editor (ported), and the tool
examples/ a task list to try the commands on
```
TDQS
Scored across 12 tools
Each tool targets a distinct element (task, dependency link, criterion, note) with a clear action, so selection is mostly unambiguous. The only friction is between plan_overview, plan_list_tasks, plan_get_task and plan_validate, which all surface list/task state and could be confused at first glance, though the descriptions differentiate them by scope (counts vs. one-line rows vs. full task vs. errors).
Every tool uses the identical plan_<verb>_<noun> snake_case pattern (plan_add_task, plan_remove_dependency, plan_check_criterion, etc.). The verb vocabulary is small and reused predictably (add/remove/get/list/update/validate/overview), making the set easy to scan and infer.
Twelve tools is a well-scoped size for a task-list domain, and each one maps to a concrete operation rather than a redundant variant. Nothing appears padded or trivial: the dependency, criterion, and note sub-resources each justify their add/remove/check tools.
Task and criterion lifecycles are largely covered (add, update, list, get; add/check/remove criterion; add/remove dependency), but there is no tool to delete or archive a task, and notes can only be added, never edited or removed. These are real dead ends for an agent cleaning up or reversing mistakes, though common workflows remain achievable.