feat(delegate-task): session_break authoring field [v0.2.2]

Add the authoring side of the `session_break` marker whose consumer
side shipped in using-tasks v1.2.0. At delegation time the author can
now mark a task so that, after it closes, an autonomous runner pauses
instead of chaining the next task.

- Pre-flight gate 5->6 questions: new Q (item 5, after notify) —
  "Session-break после этой задачи? (domain-switch / milestone /
  heavy infra)". Yes -> set session_break in body; no -> omit
  (default unchanged).
- Template trailer gains optional `[**session_break:** true |
  "<hint>"]` with inline comment (same lowercase frontmatter key
  using-tasks reads).
- Usage-guidance block: three set-it cases + tie to using-tasks
  Task-completion step 6 / SESSION BOUNDARY line.
- What-NOT-to-do bullet: don't set it routinely (real-boundary
  marker, not a default).
- Wiki concept page concepts/delegate-task-session-break.md
  (links using-tasks-session-break) + index + log.

PATCH bump: additive optional field + one pre-flight question, no
existing behaviour changed. Markdown policy artifact — no test
surface (TDD N/A). Closes [session-break-delegate-task].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 16:38:52 +03:00
parent c32c67ffb7
commit 5e3c01622e
5 changed files with 68 additions and 9 deletions

View File

@@ -0,0 +1,46 @@
---
title: delegate-task session_break field
type: concept
tags: [delegate-task, using-tasks, autonomous-runner, session-boundary]
updated: 2026-06-09
---
# delegate-task `session_break` field
`delegate-task` v0.2.2 adds an optional `session_break` field to the task-body template, plus
a sixth pre-flight question. This is the **authoring** side of the marker whose **consumer**
side lives in `using-tasks` — see [[using-tasks-session-break]].
## Problem
`using-tasks` v1.2.0 can stop an autonomous runner after a task closes (instead of chaining
`tasks_claim_next`) **iff** the closed task carries a `session_break` marker. But nothing in the
delegation flow prompted the author to set it — so the capability sat unused unless someone
hand-edited the task body. The marker has to be *placed at delegation time* to be useful.
## Design
- **Pre-flight Q6** (after Q5 `notify`): *"Session-break после этой задачи? — нужен ли разрыв
сессии после её закрытия (domain-switch, milestone, heavy infra)?"* If yes → set
`session_break` in the task body; if no → omit it (default unchanged).
- **Template field** (optional, in the trailer next to `weight` / `notify` / `allow_upgrade`):
`session_break: true | "<следующий трек / hint>"` with an inline comment pointing at the
`using-tasks` stop behaviour. `session_break` (lowercase, underscore) is the same frontmatter
key `using-tasks` reads.
- **Value:** `true` (next track = "см. STATUS.md") or a hint string naming the next track.
## When to set it (three cases)
1. **Смена домена / репо** — the task ends one track before an unrelated one begins.
2. **Milestone-задача** — the last sub-task in a feature's group.
3. **Тяжёлая инфра-задача** — shared checkout, migrations, deploy — where it's sane to stop and
inspect state before continuing.
Not a default: setting it routinely would make `using-tasks` tear the session after every
close. It is a marker of a *real* boundary, an authoring choice — same rationale as the
consumer-side "marker not heuristic" argument in [[using-tasks-session-break]].
## Versioning
PATCH bump (0.2.1 → 0.2.2): additive optional field + one extra pre-flight question, no existing
behaviour changed. (The version target was fixed by the delegating task.)