Playbook: Tasks
This page is written for the agent. For a plain explanation, see the manual: The cycle of a feature.
Command: /nodfirst-tasks (in Codex: $nodfirst-tasks). Without commands, tell your agent: follow nodfirst/playbooks/tasks.md.
Version: 0.5 (default tests and done-when written once new in 0.5; size signal used once; tested on five projects)
Purpose: break an approved plan into small, ordered, verifiable tasks.
Prompt: /nodfirst-tasks (or mention nodfirst/playbooks/tasks.md) (and a feature number only if it is not the active one).
Output: specs/NNN-feature-name/tasks.md, status Draft.
Context to read (do not ask the human to attach it)
AGENTS.md, nodfirst/constitution.md, project/profile.md, the modules it lists (nodfirst/modules/), nodfirst/templates/tasks-template.md, the active feature’s spec.md and plan.md (and design.md if any).
Preconditions
The spec and the plan are Approved, with no open questions. If not, stop and say so (C2).
Instructions for the agent
You are planning the work, not doing it. Follow nodfirst/constitution.md, especially C1, C4, C5, C8 and C9.
- Derive tasks from the plan, in dependency order, applying the “Tasks” checklist of every active module:
- Phase 1: setup and foundation. Scaffolding and configuration; the runtimes and tools the plan lists, each checked; the environment (for example installed dependencies in an isolated environment); a smoke test so the test runner is proven before any task that depends on it; the single quality-gate command and Section 5 (Commands) of
project/profile.md; CI if the project has one; migrations and how they run in production; shared helpers. Keep it minimal: with a small stack, one set-up task. The set-up lists the tools’ default settings that weaken a gate (for example a type checker that is not in strict mode) for the human to decide, and ignores operating-system and editor files (for example.DS_Store). - Phase 2: one group per user story, each a vertical slice that delivers something demonstrable. Start with the smallest slice that proves the architecture. Pure logic comes before anything that needs infrastructure.
- Phase 3: hardening only for what the earlier tasks do not cover.
- Phase 1: setup and foundation. Scaffolding and configuration; the runtimes and tools the plan lists, each checked; the environment (for example installed dependencies in an isolated environment); a smoke test so the test runner is proven before any task that depends on it; the single quality-gate command and Section 5 (Commands) of
- Shape each task:
- One coherent change that leaves the project building, linted, typed and tested (C9).
- Tests first (C5). The template’s header states the default once: tests for the covered AC, at the plan’s level, first or with the code; done when they pass and the quality command is green. A task writes “Tests” or “Done when” only to add what the default does not say (an input chosen here, a prepared state, a human check) (C13). Done must be provable inside the task; it never relies on a later task to show that it works.
- Cites the R and AC it covers, and the files or areas.
- Depends on: the tasks it needs, or “—”. Requires human action: anything outside the repository (accounts, consoles, secrets, installing a runtime). The agent stops and asks; it never pretends.
- Versions: exact pins, verified on the registry with the date; if a version is less than 7 days old, read its release notes and record the result in the task’s notes.
- One deliverable per task, sized by what it proves. Criteria of the same screen or the same rule that share code and tests go in one task. Two forms with different rules, regular expressions or limits are two tasks, even when they look similar (for example “in N days” and “in N weeks” in a date parser).
- If the feature changes behaviour that existing tests cover, the first task updates those tests and stays green before and after the change; the code change follows.
- A temporary stub is allowed only if the task says so and names the task that replaces it.
- If an AC is split across tasks, say which part each task covers.
[P]only when two tasks share no files and no dependency. No task without a source in the spec or plan (C1). No git or commit instructions unlessproject/profile.mdsays git is used.
- Check traceability (in the report; the file has no traceability table): every active R and AC in at least one task; every plan decision implemented by some task; every AC has a test level in the plan. A requirement with no criterion that proves it is reported as a spec change request, not patched inside a task. Every documentation requirement has a test that keeps the documentation true.
- Check:
- No task mixes more than one deliverable; nothing vague (“implement authentication”).
- Order respects dependencies, tests included: a test that needs a user, a page or an endpoint depends on the task that builds it (seeded data is fine until then, repeated with the real flow later). Test infrastructure comes before the first task that needs it. Anything created for one task but used by an earlier one is moved before its user.
- Plain characters in the file, never HTML entities.
- Size signal, not a target: more than 12 tasks for a feature with one screen, or more than 20 for any feature, means look again: merge tasks that split one deliverable, or say why in “What you are approving”. Never merge different deliverables to stay under it, and never write “within the limit” as a reason: a hardening task with several unrelated checks is several tasks.
- Nothing contradicts the plan or the spec; otherwise write a change request and stop. Report plan gaps the same way; never invent a mechanism.
- Stop. Show “What you are approving” first (after approval, the next step is
/nodfirst-analyze, required before the first task); then tasks per phase, the traceability result (every R and AC → task → test, in the report, not in the file), assumptions, change requests and interpretations. Ask for review. Do not implement.
Revising existing tasks
Apply only the requested changes, keep untouched tasks identical, update dependencies and totals, re-check traceability (also when the spec’s criteria changed, so test names and covers match the current text), and show two lists (changes and interpretations).
Do not
- Write code or run commands, add behaviour, libraries or decisions the plan does not contain, or mark the tasks
Approved.