Skip to content
4. Write a good task

4. Write a good task

By the end of this chapter you will write requests the agents finish on the first try — from a two-line bug fix to a multi-PR feature — and know which of them can merge without you.

The agents read the issue and nothing else. They cannot ask what you meant halfway through, so the issue is the whole brief. Whether you write it yourself, your coding agent compiles it, or the broker planner drafts it from Slack or the web UI, check it before it is filed.

The template

Maku uses one elastic Default Spec: three required sections for small fixes, plus three optional sections that scale the same format to larger features. Combined # <title>\n\n<body> must stay within 14 KiB (matching factory admission).

SectionRequiredWhat goes in it
TitleYesOne line, <area>: <what changes>, ≤ 256 chars (docs: …, fix(scripts): …, intake: …)
## What is wrong
## Goal
YesDefect: what you saw and where (file, line, command, output). Feature: why the capability is needed
## What it should be
## Requirements
YesObservable end state, not steps. RFC 2119 (MUST/SHOULD), EARS, or Given/When/Then welcome, never forced
## ScopeOptionalAdvisory paths (Touches: and Leave alone: / Out of scope:), forwarded to both implementer and reviewer even on standard runs
## ChecklistOptionalCommit-sized steps inside this single PR (omit on tiny fixes)
## Acceptance checkYesCommand that exits 0, or concrete observable result
## DecisionsOptionalAppend-only settled choices (D1 [g1]: …, A2 [g2]: …) recorded during intake or scoper answers; never reopened

Keep headings in this order with no duplicates. The acceptance check matters most: the implementer runs it before opening the pull request, and the reviewer verifies it before its verdict.

One task equals one independently CI-green PR targeting main. Default to one issue with commit-sized steps in ## Checklist; split into 2–5 dependsOn-linked issues only when each slice compiles, passes CI, and merges on its own.

Good and bad issues

BadWhy it failsGood
fix the docsNo defect, place, or end statedocs: the logging page lists the wrong chart version
“The test is flaky sometimes”Nothing an agent can reproduce“test-storage-dashboard.py finds no dashboard under .claude/”
“Clean up scripts and fix dead links”Two unrelated tasks; first has no endTwo issues; second names the links
Five issues for one PR’s checklistIntermediate slices fail CI aloneOne issue with five items in ## Checklist
Acceptance check: “it works”Nothing to run or observe“python3 scripts/ci/tests/test-storage-dashboard.py exits 0”
“Use a regex, then refactor the loop…”Steps instead of an outcome“SKIP matches paths relative to the repo root”

Compare a minimal 3-section fix with a scoped feature in the same format:

docs: the logging page lists the wrong chart version

## What is wrong
docs/observability/logs.md says 0.13.9.
The repository pins 0.13.10 (clusters/base/victoria-logs.yaml).

## What it should be
The page says 0.13.10, matching the pinned version.

## Acceptance check
- docs/observability/logs.md names 0.13.10.
- `grep -rn 0.13.9 docs/` finds nothing for this chart.

Paste exact errors rather than paraphrasing, and declare ## Scope (Touches: / Leave alone:) — or end with “change nothing else” on a tiny fix — whenever adjacent paths must stay untouched.

Requests in Slack, the web UI, and your coding agent

Two intake paths converge on the same broker readiness gate and confirmation form:

    flowchart TD
  S["Slack, Web UI, or short /maku handoff"] --> T["handoff({text})<br/>broker planner · 0 repo reads"]
  B["Spec file or multi-file feature (/maku handoff)"] --> L["Local coding agent<br/>reads spec/repo · compiles 1–5 PRs"]
  L --> D["handoff({issues})<br/>deterministic · $0 broker LLM"]
  T --> G["Broker readiness gate<br/>schema · floor · 14 KiB · redaction"]
  D --> G
  G --> F["Confirm & start<br/>files 1–5 issues in dependsOn order"]
  
  • Text path (handoff({text})): used by Slack, the web UI’s New task form, and short concrete /maku handoff requests. It does not check your facts against the repository — a false premise becomes a confident, wrong issue.
  • Draft path (handoff({issues})): when you point /maku handoff at any local spec or plan (Superpowers, Spec Kit, OpenSpec, Kiro, an RFC, or a chat design) or ask for a multi-file feature, your coding agent reads the spec and relevant files, resolves blocking gaps, compiles 1–5 Default Spec PR slices, and submits them deterministically at $0 broker LLM cost — including on private repositories without an internal planner route.

On the text path, open the file first so the planner has facts to copy rather than a guess:

@factory docs/install.md, section "Download", links to maku-linux,
which 404s. It should link to maku-linux-amd64, the published asset.
The link resolves, and the link check passes.

For multi-PR plans (2–5 slices), confirming files every slice in dependency order by default (wholePlans enabled across CLI, MCP, Slack, and the web UI’s Start all N), adding Waits for #N markers so downstream tasks wait until their upstream PR merges.

Before you press Confirm, Start, or answer File: yes:

  1. Read every drafted issue. Open the named files and verify every fact.
  2. Read the acceptance check. Could you run it? Would it fail today?
  3. Check repository, slice boundaries, and workflow. Each slice should merge independently.
  4. Revise before confirming. Reply in Slack to re-plan in place, or ask your agent to adjust before confirming.

Workflows and merge policies: what runs and what merges on its own

Two choices stay separate: the workflow decides which roles run, and the merge policy decides who merges the pull request.

Workflow label on the issueRoles that run
(none) (standard, default)Implementer (with repo checks and stall detection), then reviewer
workflow:quickImplementer alone, for mechanical fixes and scheduled runs
workflow:carefulScoper, optional tester (when testFirst is set), implementer (with repo search, checks, and completion judge), then reviewer

The planner picks the workflow from the factory’s live catalogue, or a maintainer adds workflow:quick / workflow:careful before factory/ready. Pre-specced issues with ## Scope usually stay on standard: the factory forwards Touches and Leave alone to both implementer and reviewer without paying for a scoper run.

When the PR opens, the merge gate matches its diff against the repository’s bound merge policies:

ModeWho merges
liveThe merge bot, with no human, when every check holds
shadowYou; the gate records what it would have done
unboundYou; a normal pull request

Maku ships three starter policies (docs-links, deps-patch, docs) in shadow mode by default, and teams can add custom MergePolicy objects. Most work lands in a policy you merge by design (chapter 7, Merge policies). The workflow and its tier also set time and cost limits (chapter 5).

When the issue is not enough

On workflow:careful, a scoper reads the issue before anyone writes code:

  • Settled D<n> / A<n> records in ## Decisions are never reopened.
  • If a GitHub issue names a spec or design file committed in the repository, the scoper reads it from the checkout and treats its decisions and scope boundaries as authoritative unless overridden.
  • When something remains open, the scoper asks one question instead of guessing; a wide issue may come back with a split plan of up to 4 parts (chapter 6).

Next: chapter 5 shows how to follow a task as it runs, and how to steer it.