Skills Getting started Skills GitLab Hub

write-tech-task-plan

Writes or revises a task plan — the problem and its evidence, the behaviour in scope, the risks and dependencies that change the work, acceptance criteria, and proof. Use when a kit::task MR needs its plan.md written or deepened, before any code exists.

Synopsis

User-invoked. Name this skill when you want the agent to apply it. disable-model-invocation is true.

Source file: skills/write-tech-task-plan/SKILL.md.

Front matter

name
write-tech-task-plan
description
Writes or revises a task plan — the problem and its evidence, the behaviour in scope, the risks and dependencies that change the work, acceptance criteria, and proof. Use when a kit::task MR needs its plan.md written or deepened, before any code exists.
disable-model-invocation
true

Full contents

---
name: write-tech-task-plan
description: Writes or revises a task plan — the problem and its evidence, the behaviour in scope, the risks and dependencies that change the work, acceptance criteria, and proof. Use when a kit::task MR needs its plan.md written or deepened, before any code exists.
disable-model-invocation: true
---

# Write a task plan

Read [write-tech-core](../write-tech-core/SKILL.md) first.

A task plan is an agreement between the human, the planner, and the developer.
It says what becomes true, what could change the approach, what must land
first, and how the result will be judged. It does not decide the diff.

The developer owns the implementation, including which files change and how.
A plan that lists every edited file has done the developer's job badly, and it
is wrong the moment the first file turns out to be unnecessary.

## Before writing

- Read the spec and the parent epic plan. The task argues from them; it does
  not repeat them.
- Read the code the task touches, enough to know which surfaces are involved
  and which risk is real.
- Ask the human only what the repository cannot answer. Ask in a merge-request
  comment, one focused question at a time.

## Template

```markdown
# <Outcome, as a sentence>

**Outcome:** what is true after this lands.
**Spec:** `.slopkit/specs/<slug>/SPEC.md`, item N.       (only when true)

## Problem and evidence
## In scope
## Out of scope
## Risks and unknowns
## Dependencies
## Approach
## Acceptance criteria
## Proof
## Open decisions
```

## Problem and evidence

Name the symptom and where it was observed: a failing job, a log line, a
report, a command's output. Say what it costs or what it blocks. A reader who
has never seen the ticket must recognise the problem.

For a defect, name the file where it lives and the faulty behaviour, with a
link. Stop there. Do not describe the fix, the new helper, or the branch that
should be added — that is the developer's decision to make after reading the
code.

```markdown
`[src/errors.ts](../../../src/errors.ts)` prints the status and an empty body,
so a `403` from the group endpoint reads the same as a `403` from the project
endpoint.
```

## In scope and Out of scope

Both lists name behaviour. Out of scope is not optional: it is the part a
reviewer uses to reject a diff that grew.

## Risks and unknowns

Only the risks that could change the plan: a body read twice, a migration that
cannot be reversed, an ordering assumption, a check that already passes for the
wrong reason. For each, give the check that would expose it and the fallback.

If nothing could change the plan, write `None identified` rather than inventing
risks.

## Dependencies

What must land first, and what can run in parallel. Name the other plan or MR
when one exists. Write `None` explicitly when the task can start immediately; a
blank section hides whether anyone considered the order.

## Approach

How the change is shaped and why: which module or interface carries it, what
alternative was rejected. Name a file or symbol only when it identifies a
surface the developer would not find alone, or when a dependency crosses it.

This section is not a diff outline. "Add `describeFailure` beside `errorMessage`
and route the non-ok branches through it" belongs here; "change line 31 of
`cleanup-projects.ts`" does not.

<!-- fragment:acceptance_template -->
## Acceptance criteria

Write each criterion as external behaviour: the actor, the starting state, the
action, and the result. Add the denial or failure path when one exists. A
developer must be able to deliver the criterion, and a reviewer must be able to
see that it holds.

Do not describe how the criterion is tested. Evidence belongs under Proof, and
a check is not the behaviour it checks.
<!-- /fragment:acceptance_template -->

<!-- fragment:proof_template -->
## Proof

Record evidence that each acceptance criterion holds. Any form counts: a
command and its output, a log line, a screenshot, a recording, a page the
reader can open, a pipeline job. Name what you ran or where you looked, and
include the part of the result that settles the question.

Choose the evidence the behaviour needs. A narrow check does not prove a wide
behaviour, and a wide check is noise when one line settles it.
<!-- /fragment:proof_template -->

## What a task plan never contains

- A table of files with a column for what changes in each.
- Pasted implementations, full test code, or step-by-step commits.
- Micro-steps such as "write the failing test", "run it", "commit".
- `TBD`, "implement later", "add appropriate error handling", "similar to
  task 2".
- A restatement of the spec or the parent epic.
- Acceptance criteria that name a test, a command, or a pipeline instead of a
  behaviour.

## Example

```markdown
# The steward-page guard says how long it waited

**Outcome:** a `MISSING` line and a first-attempt success both report elapsed
seconds, so a page written late by this run is distinguishable from a page an
earlier run wrote.
**Spec:** `.slopkit/specs/steward-page-watch/SPEC.md`, item 3.

## Problem and evidence

`scripts/assert-steward-page.ts` prints `steward page present: <path>` or a
`MISSING` line. Neither carries a wall clock, so the job log cannot say whether
the session wrote the page in this run or a previous one did. Pipeline `16599`
shows both cases with identical output.

## In scope

- The success and `MISSING` lines both name the elapsed seconds.
- Exit codes and the attempt budget stay as they are.

## Out of scope

- The fetch, the retry policy, and the page path.
- Any change to the steward session itself.

## Risks and unknowns

The elapsed value depends on the injected clock. A test that stubs `sleep` but
not `now` proves nothing; the check is a run where both are fixed.
Fallback: assert the suffix shape rather than exact seconds.

## Dependencies

None.

## Approach

Capture `started` once before the retry loop and format one suffix used by both
branches. Rejected: threading a clock through the loop, which the injected
`now` already provides.

## Acceptance criteria

- A first-attempt success reads `after 1 attempt(s) (0s)`.
- A page written on the fourth attempt reads the seconds that elapsed, not the
  attempt count.
- A missing page ends with the same suffix as the success line.
- Exit codes 0, 1, and 2 keep their current meaning.

## Proof

- `node --test scripts/assert-steward-page.test.ts` — the new cases pass and
  the existing four assertions are unchanged apart from the expected strings.
- The next `KIT_RUN_STEWARD=1` schedule on `main` prints the suffix in its job
  log.

## Open decisions

- Whether to print milliseconds — the human, only if a second is too coarse.
```

## Self-check

1. Does every acceptance criterion describe behaviour rather than a check?
2. Does each risk name the check that would reveal it?
3. Is there any sentence that only restates the spec?
4. Does any section say what changes in a specific file?
5. Could a developer who has never seen this conversation start work without
   asking a question that the plan should have answered?