feat(using-tasks): session_break marker [v1.2.0]

Add a session_break marker so a task author can mark a task's
completion as a natural session boundary. After the task closes 🟢,
before tasks_claim_next, an autonomous agent prints the verbatim
SESSION BOUNDARY line and stops instead of chaining the next task.
Absent -> behaviour unchanged.

- STATUS.md format: optional **Session break:** field + new
  "### session_break marker" subsection (type bool|string, examples).
- Task completion step 6: after close, before claim-next, check the
  closed task's session_break; print boundary line + stop if present.
- Rules bullet "Honour session_break".
- Wiki concept page concepts/using-tasks-session-break.md + index + log.

MINOR bump: new optional capability, no existing behaviour changed.
Closes [session-break-using-tasks].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 16:33:37 +03:00
parent 85244a4917
commit 9a518fcb43
5 changed files with 82 additions and 6 deletions

View File

@@ -0,0 +1,52 @@
---
title: using-tasks session_break marker
type: concept
tags: [using-tasks, autonomous-runner, session-boundary]
updated: 2026-06-09
---
# using-tasks `session_break` marker
`using-tasks` v1.2.0 adds a `session_break` marker so a task author can mark a task's
completion as a natural place to **stop**, rather than have an autonomous agent immediately
chain into the next task via `tasks_claim_next`.
## Problem
An autonomous runner closes a task and, by default, claims the next one. There is no signal
for "this is a good seam to end the session" — so unrelated tracks get welded into one
ever-growing context, and the natural review/hand-off moment is skipped.
## Design
- **Marker:** `session_break` in the task's frontmatter (task-system delivery) or the
`**Session break:**` field in the task's STATUS.md block (local board mirror).
- **Type:** boolean or string.
- `true` → pause after close; next track is "see STATUS.md".
- `"<hint>"` → pause after close; the hint names the recommended next track.
- **Enforcement point:** `using-tasks` → Task completion, **step 6***after* the task is
🟢 and committed, *before* any `tasks_claim_next` / starting the next task.
- **Behaviour when present:** print the SESSION BOUNDARY line verbatim, then stop (do not
claim the next task).
- **Behaviour when absent:** unchanged — claim / start the next task as usual.
### Verbatim message
```
🔚 SESSION BOUNDARY — [slug] закрыта. Рекомендую завершить текущую сессию. Следующий трек: [value | "см. STATUS.md"]
```
`[slug]` = the closed task's slug. `[value | "см. STATUS.md"]` = the marker's string value,
or the literal `см. STATUS.md` when the marker is just `true`. The wording is fixed so the
boundary is greppable and recognisable across sessions.
## Why a marker, not a heuristic
The decision of *what counts as a stopping point* belongs to whoever scoped the work (the
delegating workshop), not to the runner mid-flight. A heuristic ("stop after N tasks", "stop
when tired") would either over- or under-fire. An explicit, opt-in marker keeps the default
unchanged and makes the boundary a deliberate authoring choice.
## Versioning
MINOR bump (1.1.0 → 1.2.0): new optional capability, no existing behaviour changed.

View File

@@ -41,6 +41,7 @@ Catalog of all wiki pages. One line per page, organized by type. Updated on ever
- [project-bootstrap-meta-isolation.md](concepts/project-bootstrap-meta-isolation.md) — project-bootstrap@1.11.0 — Step 1 ships meta-isolation block in `.gitignore` (`!.claude/`, `!.tasks/`, `!.wiki/`, ...) so own greenfield/upgrade projects re-enable agent meta-paths against global `core.excludesFile` cutter. Marker-based append-only on existing files; smoke-tested with negative control
- [interns-grep-audit-design](concepts/interns-grep-audit-design.md) — interns-grep-audit-design
- [session-handoff-skill-design.md](concepts/session-handoff-skill-design.md) — design rationale for the `session-handoff` skill (sliding overwrite into `.tasks/NEXT_SESSION.md`, phrase whitelist + substantive-commit heuristic, optional PostToolUse hook for harness-side determinism, orient+ask default, project scope, cluster 7/7 closure)
- [using-tasks-session-break.md](concepts/using-tasks-session-break.md) — `using-tasks` v1.2.0 `session_break` marker: task-author-set boolean/string flag; after a task closes 🟢, before `tasks_claim_next`, an autonomous agent prints the verbatim SESSION BOUNDARY line and stops instead of chaining the next task. Absent → unchanged
- [delegate-task-negative-trigger-fp.md](concepts/delegate-task-negative-trigger-fp.md) — `delegate-task` v0.2.1 FP fix: «создать задачу себе» stem-matched the «создать задачу на агента» positive trigger; abstract "does NOT apply when doing the work yourself" carve-out loses to literal stem-match under the 1%-rule → made the negative literal + routed (→ using-tasks). Verified pos 5/5, neg 4/5 (was 0/5)
## Packages

View File

@@ -67,3 +67,4 @@ Parseable: `grep "^## \[" .wiki/log.md | tail -20`.
## [2026-05-25] decision | install-cross-platform extended to build scripts — `build.{ps1,sh}` get the symmetric `--prune` / `-Prune` flag (removes `dist/<name>.skill` where `<name>` is not in `skills/`). Bash delegation to `powershell.exe -File build.ps1` does NOT forward the flag — bash runs prune itself against the shared `dist/`. Both paths smoke-tested with fake stale .skill files against real dist/. Closes `[install-ps1-build-prune-followup]`.
## [2026-06-09] decision | delegate-task-negative-trigger-fp — `delegate-task` 0.2.0→0.2.1 (PATCH): fixed 5/5-consistent false-positive on «создать задачу себе». Root cause: self-task phrase shares stem «создать задачу» with the «создать задачу на агента» positive trigger; the abstract "Does NOT apply when doing the work yourself" carve-out can't beat a literal stem-match under the 1%-rule. Fix: made the negative literal + routed («создать задачу себе» / «task for myself» / «поставить себе задачу» → using-tasks) in description + body disambiguator («на агента»/«агенту» = delegate; «себе» = own board). Re-verified via fresh-context subagent trigger run: positives 5/5 (no regression), negative 4/5 → using-tasks (was 0/5); the 1 residual miss was an eval-harness artifact (forced skill-name-before-reasoning), not description ambiguity. Concept page written; reusable principle = put the exact colliding negative phrase with an explicit →sibling route, literal beats abstract.
## [2026-06-09] decision | using-tasks-session-break — `using-tasks` 1.1.0→1.2.0 (MINOR): added the `session_break` marker. Task author sets `session_break: true | "<hint>"` in task frontmatter (mirrored as `**Session break:**` on the local board); after the task closes 🟢, before `tasks_claim_next`, an autonomous agent prints the verbatim line `🔚 SESSION BOUNDARY — [slug] закрыта. Рекомендую завершить текущую сессию. Следующий трек: [value | "см. STATUS.md"]` and stops instead of chaining the next task. Absent → behaviour unchanged. Enforced in Task completion step 6 + Rules bullet + format docs. Marker not heuristic: the stop-point is an authoring choice, not a runner guess.