Task record
Read this before defining, delivering or reporting a task in either track. Read storage first for paths and locks, and task identity for IDs. Both tracks use the same record: a header that the workflow owns, and a short definition that people read.
Header
The frontmatter holds identity, state, dependencies and every workflow reference, so the task overview and automatic selection read only the header. Use null for a reference that does not exist yet. Never move one into the body. Tasks written before 0.6.0 kept these references in body sections; the 0.6.0 release migration moves them here. Never convert such a task outside that migration: report it and point to /factory:migrate 0.6.0.
| Field | Track | Set by | Value |
|---|---|---|---|
id, title, kind, status, priority |
both | define | See task identity and priority. legacy_id stays when a migration recorded it. |
depends_on |
both | define | List of full task IDs that must be done before this task can start, for example [DEV-002, DSGN-001]. [] when there are none. A task waiting only on these stays ready: the overview and delivery look up their current status, so nothing is set or cleared when they finish. |
implements |
code | define | Approved design this task implements: task (DSGN-NNN), exact revision, and approval (reviewer and date), copied from the design task. null when there is no design dependency. |
reviewer |
design | design define | The named human who approves the visuals. Required before ready. |
approach |
design | design define | Artifact approach: figma or prototype. Required before ready. |
delivery |
both | delivery start | Code: branch, full base SHA, base_ref (where the base came from, see project repository; for a stacked task, the parent's branch, for example origin/factory/DEV-031-search (stacked on DEV-031)), absolute checkout, shared git_dir, baseline: the baseline check decisions, [] when the base passes, and manual_checks (written at the gate): one entry per criterion only a person can check, with criterion, optional steps, result (pending, passed or failed), and by and date once checked; approved: the SHA the last review approved, cleared when the task goes back to building; and pr: the URL of the task's pull request, once opened. Design: branch, base and base_ref for a mocked prototype, null for Figma. Records written before base_ref, baseline, manual_checks, approved and pr existed stay valid without them; a missing manual_checks means none. |
submitted |
both | review | Revision under review: the full commit SHA for code, or the exact Figma version or prototype commit for design. |
handoff |
design | design review | Catalog-relative human-review handoff, for example designs/DSGN-003-review.md. |
approval |
design | human approval | reviewer, date and revision of the human approval. |
dev_task |
design | after approval | Linked DEV-NNN once a code task is defined from this design. |
delivery:
branch: factory/DEV-003-settings
base: 4f1c0a9e2b7d3c5f6a8b9c0d1e2f3a4b5c6d7e8f
base_ref: origin/main
checkout: /home/dev/app
git_dir: /home/dev/app/.git
baseline:
- check: npm run format:check
failures: [.agents/factory/README.md, .agents/factory/CHANGELOG.md]
decision: ignore
- check: npm test
failures: ['tests/api.test.ts "search": timeout']
decision: ignore
- check: npm run build
failures: ['Error: Cannot find module "sharp"']
decision: waive
manual_checks:
- criterion: Settings page matches the approved Figma frame at 375px
result: passed
by: developer
date: 2026-11-18
approved: 9c2e7b1d4a6f8e0c2b4d6f8a0c2e4b6d8f0a2c4e
pr: https://github.com/acme/app/pull/42
Definition
The body has the same four sections for every task, in this order, followed by the log. It covers scope and behaviour only:
- General description: the current situation and what the task should achieve, from the project or business perspective.
- Goals: a short bullet list.
- Scope of work: the elements to design, implement or define. Link existing designs (for example Figma frames), design systems, docs and components instead of restating them. For UI, name a few representative states rather than every state × width × theme combination. Mention exclusions only when they prevent a likely misreading.
- Acceptance criteria: checkable outcomes that decide the task is done, including any manual check that must happen before completion. Keep them thin: no implementation details, procedure or audit evidence. The project's code, guidelines and documented checks already guide the builder and reviewer.
Do not write session or access history, approval metadata, review procedure or instructions for agent roles into a task. Capability checks, verification output, review findings and human feedback go to the agent or developer that needs them, or into the design handoff, not the task.
Create a task
- Reserve the next ID for the track's prefix (
DEVfor code,DSGNfor design) using the shared task ID allocation procedure. - Copy the track's template, either code or design, to
$FACTORY_ROOT/tasks/<full-id>-short-slug.md. Create the folders if they are missing. - Write the definition as described above. Leave the template sections and header fields in place: write "None" in an empty section,
nullin an empty field and[]in an emptydepends_on. - Propose a priority (
urgent,high,normal,low) and show how this task or its follow-ups affect pending order. Do not interrupt active work.
Log
The ## Log section is the last one. Add one line per status or priority change, and per edit to an approved definition, with a short reason:
- YYYY-MM-DD: <from> → <to> (<skill>, <short reason>)
The first line records creation (created as draft (define)). An edit that doesn't change the status is logged as edited (<skill>, <what changed>), adding re-approved by dev when it needed approval; a reopened task logs done → building with the reason and the previously reviewed short SHA. A base update that keeps the review logs base updated (deliver, onto <short tip>, reviewed <short SHA>). A task settled after its PR was merged logs <from> → done (<skill>, PR #<number> merged at <short merged head>), where <skill> is settle or, when the developer settled it there, deliver, adding , follow-up <ID> when a follow-up task took over what the merge left out, and , confirmed by developer when the developer confirmed the changes reached the integration branch. A run that fails while holding the task lock logs run failed (<skill>, stopped in <step>: <reason>), and a lock takeover logs lock taken over (<skill>, from <agent> <session> in <checkout>, acquired <time>); neither changes the status. See changes after approval. Keep earlier log lines as they are. Rounds, findings and evidence belong in the report to the developer and in the journal, not in the log.
Show every update
When you create or change a task, or hand off a human review, show the developer a Markdown link to the absolute path of the file, along with a short summary of what changed. Use the file name as the link text and its absolute path, for example /home/dev/app/.git/factory/tasks/DEV-003-settings.md, as the target; wrap a target that contains spaces in <...>. A bare path or a summary on its own is not enough. The catalog lives under .git, which file explorers usually hide, so the link is how the developer opens the file.
Original Markdown, including metadata
# Task record
Read this before defining, delivering or reporting a task in either track. Read [storage](storage.md) first for paths and locks, and [task identity](task-ids.md) for IDs. Both tracks use the same record: a header that the workflow owns, and a short definition that people read.
## Header
The frontmatter holds identity, state, dependencies and every workflow reference, so the [task overview](tasks/SKILL.md) and automatic selection read only the header. Use `null` for a reference that does not exist yet. Never move one into the body. Tasks written before 0.6.0 kept these references in body sections; the [0.6.0 release migration](../docs/migrations/0.6.0-release.md) moves them here. Never convert such a task outside that migration: report it and point to `/factory:migrate 0.6.0`.
| Field | Track | Set by | Value |
| --- | --- | --- | --- |
| `id`, `title`, `kind`, `status`, `priority` | both | define | See [task identity](task-ids.md) and [priority](task-priorities.md). `legacy_id` stays when a migration recorded it. |
| `depends_on` | both | define | List of full task IDs that must be `done` before this task can start, for example `[DEV-002, DSGN-001]`. `[]` when there are none. A task waiting only on these stays `ready`: the overview and delivery look up their current status, so nothing is set or cleared when they finish. |
| `implements` | code | define | Approved design this task implements: `task` (`DSGN-NNN`), exact `revision`, and `approval` (reviewer and date), copied from the design task. `null` when there is no design dependency. |
| `reviewer` | design | design define | The named human who approves the visuals. Required before `ready`. |
| `approach` | design | design define | Artifact approach: `figma` or `prototype`. Required before `ready`. |
| `delivery` | both | delivery start | Code: `branch`, full `base` SHA, `base_ref` (where the base came from, see [project repository](repository.md#resolve-the-delivery-base); for a [stacked task](deliver/SKILL.md#stacked-tasks), the parent's branch, for example `origin/factory/DEV-031-search (stacked on DEV-031)`), absolute `checkout`, shared `git_dir`, `baseline`: the [baseline check](deliver/SKILL.md#baseline-check) decisions, `[]` when the base passes, and `manual_checks` (written at the gate): one entry per criterion only a person can check, with `criterion`, optional `steps`, `result` (`pending`, `passed` or `failed`), and `by` and `date` once checked; `approved`: the SHA the last review approved, cleared when the task goes back to building; and `pr`: the URL of the task's pull request, once opened. Design: `branch`, `base` and `base_ref` for a mocked prototype, `null` for Figma. Records written before `base_ref`, `baseline`, `manual_checks`, `approved` and `pr` existed stay valid without them; a missing `manual_checks` means none. |
| `submitted` | both | review | Revision under review: the full commit SHA for code, or the exact Figma version or prototype commit for design. |
| `handoff` | design | design review | Catalog-relative human-review handoff, for example `designs/DSGN-003-review.md`. |
| `approval` | design | human approval | `reviewer`, `date` and `revision` of the human approval. |
| `dev_task` | design | after approval | Linked `DEV-NNN` once a code task is defined from this design. |
```yaml
delivery:
branch: factory/DEV-003-settings
base: 4f1c0a9e2b7d3c5f6a8b9c0d1e2f3a4b5c6d7e8f
base_ref: origin/main
checkout: /home/dev/app
git_dir: /home/dev/app/.git
baseline:
- check: npm run format:check
failures: [.agents/factory/README.md, .agents/factory/CHANGELOG.md]
decision: ignore
- check: npm test
failures: ['tests/api.test.ts "search": timeout']
decision: ignore
- check: npm run build
failures: ['Error: Cannot find module "sharp"']
decision: waive
manual_checks:
- criterion: Settings page matches the approved Figma frame at 375px
result: passed
by: developer
date: 2026-11-18
approved: 9c2e7b1d4a6f8e0c2b4d6f8a0c2e4b6d8f0a2c4e
pr: https://github.com/acme/app/pull/42
```
## Definition
The body has the same four sections for every task, in this order, followed by the log. It covers scope and behaviour only:
- **General description**: the current situation and what the task should achieve, from the project or business perspective.
- **Goals**: a short bullet list.
- **Scope of work**: the elements to design, implement or define. Link existing designs (for example Figma frames), design systems, docs and components instead of restating them. For UI, name a few representative states rather than every state × width × theme combination. Mention exclusions only when they prevent a likely misreading.
- **Acceptance criteria**: checkable outcomes that decide the task is done, including any manual check that must happen before completion. Keep them thin: no implementation details, procedure or audit evidence. The project's code, guidelines and documented checks already guide the builder and reviewer.
Do not write session or access history, approval metadata, review procedure or instructions for agent roles into a task. Capability checks, verification output, review findings and human feedback go to the agent or developer that needs them, or into the design handoff, not the task.
## Create a task
1. Reserve the next ID for the track's prefix (`DEV` for code, `DSGN` for design) using the shared [task ID allocation](task-ids.md) procedure.
2. Copy the track's template, either [code](define/task-template.md) or [design](design/task-template.md), to `$FACTORY_ROOT/tasks/<full-id>-short-slug.md`. Create the folders if they are missing.
3. Write the definition as described above. Leave the template sections and header fields in place: write "None" in an empty section, `null` in an empty field and `[]` in an empty `depends_on`.
4. Propose a [priority](task-priorities.md) (`urgent`, `high`, `normal`, `low`) and show how this task or its follow-ups affect pending order. Do not interrupt active work.
## Log
The `## Log` section is the last one. Add one line per status or priority change, and per edit to an approved definition, with a short reason:
```text
- YYYY-MM-DD: <from> → <to> (<skill>, <short reason>)
```
The first line records creation (`created as draft (define)`). An edit that doesn't change the status is logged as `edited (<skill>, <what changed>)`, adding `re-approved by dev` when it needed approval; a reopened task logs `done → building` with the reason and the previously reviewed short SHA. A [base update](deliver/SKILL.md#update-a-moved-base) that keeps the review logs `base updated (deliver, onto <short tip>, reviewed <short SHA>)`. A task [settled](settle/SKILL.md) after its PR was merged logs `<from> → done (<skill>, PR #<number> merged at <short merged head>)`, where `<skill>` is `settle` or, when the developer settled it there, `deliver`, adding `, follow-up <ID>` when a follow-up task took over what the merge left out, and `, confirmed by developer` when the developer confirmed the changes reached the integration branch. A run that fails while holding the task lock logs `run failed (<skill>, stopped in <step>: <reason>)`, and a [lock takeover](storage.md#locks) logs `lock taken over (<skill>, from <agent> <session> in <checkout>, acquired <time>)`; neither changes the status. See [changes after approval](deliver/SKILL.md#changes-after-approval). Keep earlier log lines as they are. Rounds, findings and evidence belong in the report to the developer and in the journal, not in the log.
## Show every update
When you create or change a task, or hand off a human review, show the developer a Markdown link to the absolute path of the file, along with a short summary of what changed. Use the file name as the link text and its absolute path, for example `/home/dev/app/.git/factory/tasks/DEV-003-settings.md`, as the target; wrap a target that contains spaces in `<...>`. A bare path or a summary on its own is not enough. The catalog lives under `.git`, which file explorers usually hide, so the link is how the developer opens the file.