diff --git a/.wiki/concepts/delegate-task-review-weight.md b/.wiki/concepts/delegate-task-review-weight.md new file mode 100644 index 0000000..428bf08 --- /dev/null +++ b/.wiki/concepts/delegate-task-review-weight.md @@ -0,0 +1,43 @@ +--- +title: delegate-task review-task weight inheritance +type: concept +tags: [delegate-task, fleet-routing, review-task, weight] +updated: 2026-06-09 +--- + +# delegate-task review-task `weight` inheritance + +`delegate-task` v0.2.3 makes Step 5 (the paired `-review` task) set an explicit `weight`, +inherited from the impl-task with a `needs-claude` floor. + +## Problem + +Step 5 created the review task with `status=blocked` + `blocker=` but **never set `weight`**. +A review task with no weight is invisible to fleet routing — the reconciler/poller skips it, so it +never gets claimed. This surfaced as commit `c0af151` ("add Weight: needs-claude to 4 review tasks +— reconciler was skipping them"), a manual after-the-fact patch of the symptom. The root cause was +in the authoring skill: it omitted the field. + +## Design + +Step 5 now sets the review-task weight by **inheriting from the impl-task, floored at `needs-claude`**: + +- impl `needs-human` → review `needs-human` — a critical-infra change cannot be reviewed by a weaker + tier; the review inherits the impl's strictness. +- impl `needs-claude` → review `needs-claude`. +- impl `cheap-ok` → review `needs-claude` — the floor. Review is discipline-critical (it must honour + the `invoke` instructions and acceptance criteria), and the skill's own "What NOT to do" already + forbids `cheap-ok` for review/security/migration tasks. So `cheap-ok` is never propagated. + +### Why a floor, not pure inheritance + +The delegating task said "inherit weight from impl". Pure inheritance would let a `cheap-ok` impl +produce a `cheap-ok` review — directly contradicting the skill's existing "What NOT to do" bullet +(no `cheap-ok` for review) and the `needs-claude` convention the manual fix established. The floor +is the reading that keeps the document internally consistent: inherit upward (so `needs-human` +propagates), clamp the bottom (so review never drops below `needs-claude`). + +## Versioning + +PATCH bump (0.2.2 → 0.2.3): tightens guidance on an existing step, no new step or breaking change. +Target version fixed by the delegating task. diff --git a/.wiki/index.md b/.wiki/index.md index fecc34e..dc2a720 100644 --- a/.wiki/index.md +++ b/.wiki/index.md @@ -43,6 +43,7 @@ Catalog of all wiki pages. One line per page, organized by type. Updated on ever - [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-session-break.md](concepts/delegate-task-session-break.md) — `delegate-task` v0.2.2 — authoring side of the `session_break` marker (consumer = [[using-tasks-session-break]]): pre-flight Q6 + optional template field `session_break: true | ""`; three set-it cases (domain-switch / milestone / heavy infra); not a default +- [delegate-task-review-weight.md](concepts/delegate-task-review-weight.md) — `delegate-task` v0.2.3 — Step 5 review-task now sets explicit `weight`, inherited from impl with a `needs-claude` floor (impl `needs-human`→review `needs-human`; `cheap-ok`→`needs-claude`). Fixes the reconciler skipping weightless review tasks (root cause of manual patch `c0af151`) - [using-system-snapshot-design.md](concepts/using-system-snapshot-design.md) — `using-system-snapshot` v0.1.0 — thin read-only skill wrapping the single `mcp__projects-meta__meta_system_snapshot` call (poller + local docker + cached task summary); replaces scattered `tasklist`/`docker ps`/manual `meta_status`; core rule = no liveness claim without calling the tool this turn; three-line output; defers deep docker to [[using-vds-ops]] and precise tasks to [[using-projects-meta]] - [using-tasks-status-archival.md](concepts/using-tasks-status-archival.md) — `using-tasks` v1.3.0 done-task archival rule (≥10 🟢 → `.tasks/archive/YYYY-MM.md`) fixes STATUS.md bloat; documents why `tasks_get_status` (single-task, by slug) / `tasks_aggregate` (cross-project cache) can't replace the orientation board-read, so the literal task instruction was not followed - [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) diff --git a/.wiki/log.md b/.wiki/log.md index f7cbc7d..330582c 100644 --- a/.wiki/log.md +++ b/.wiki/log.md @@ -73,3 +73,4 @@ Parseable: `grep "^## \[" .wiki/log.md | tail -20`. ## [2026-06-09] decision | using-tasks-status-archival — `using-tasks` 1.2.0→1.3.0 (MINOR): added done-task archival rule to fix STATUS.md bloat ("huge STATUS.md" complaint). When ≥10 🟢 done blocks pile up — checked at session start (step 7) and after close (Task completion step 7) — move them verbatim to `.tasks/archive/YYYY-MM.md` (append, one file per month, one-time header), leaving only 🔴/🟡/⚪/🔵 on the board; committed on its own. Did NOT follow the task's literal instruction to replace `Read STATUS.md` with `tasks_get_status` for orientation: that tool returns a single task's live status by known slug (`{status, found}`) and cannot enumerate the board, and `tasks_aggregate` is cross-project + cache-based + doesn't index ready/done (its docs say read STATUS.md directly for the current project). So orientation stays a local board-read (kept cheap by archival); skill now warns against both tools for board enumeration and points `tasks_get_status` at its real single-task use. Core goal (kill the bloat) met by archival alone. Concept page concepts/using-tasks-status-archival.md + index. TDD N/A (markdown policy). Deviation flagged for paired review task using-tasks-status-read-perf-review. ## [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 | ""` 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. ## [2026-06-09] review | using-tasks-status-archival v1.3.0 — VERDICT PASS 3/3 (using-tasks-status-read-perf-review). Criterion «ориентация через `tasks_get_status`, не Read» is satisfied by a **validated deviation**, not a literal swap: re-verified against the live tool schema that `tasks_get_status(target_project, slug)→{status, found}` takes a required slug and returns ONE task — it cannot enumerate the board, so it cannot drive orientation; the implementer correctly rejected the impossible instruction and fixed the real problem (bloat→archival). No regression: orientation still reads local STATUS.md (Session start §2) and the «what's next» flow still reads the board — change is purely additive. Archival rule clear & complete (≥10 threshold, two trigger points, monthly append-only archive, verbatim blocks, dedicated commit, cross-referenced). One informational non-blocking note: this repo's own STATUS.md (>10 🟢) would itself trip the rule — dogfooding tracked separately as tasks-board-cleanup-2026-05. No follow-up tasks. Verdict appended to concepts/using-tasks-status-archival.md. +## [2026-06-09] decision | delegate-task-review-weight — `delegate-task` 0.2.2→0.2.3 (PATCH): Step 5 (paired `-review` task) now sets an explicit `weight`, inherited from the impl-task with a `needs-claude` floor (impl `needs-human`→review `needs-human`; `needs-claude`→`needs-claude`; `cheap-ok`→`needs-claude`). Root cause of commit `c0af151` ("add Weight: needs-claude to 4 review tasks — reconciler was skipping them"): the authoring skill omitted `weight` on review tasks, making them invisible to fleet routing. Floor (not pure inheritance) chosen to stay internally consistent with the skill's own "What NOT to do" bullet that forbids `cheap-ok` for review tasks — a `cheap-ok` impl would otherwise propagate a forbidden `cheap-ok` review. Added a What-NOT-to-do bullet against weightless review tasks. Concept page concepts/delegate-task-review-weight.md + index. TDD N/A (markdown policy artifact). diff --git a/skills/delegate-task/SKILL.md b/skills/delegate-task/SKILL.md index 7b3ff1f..a9a681b 100644 --- a/skills/delegate-task/SKILL.md +++ b/skills/delegate-task/SKILL.md @@ -1,6 +1,6 @@ --- name: delegate-task -version: 0.2.2 +version: 0.2.3 description: > Use when delegating a task to another agent or project via mcp__projects-meta__tasks_create. Triggers: «делегировать таску», @@ -98,6 +98,14 @@ description: > Если задача имплементационная — создать парную `-review` (status=blocked, blocker=``). Пропустить для: pointers-тасок, ops-тасок, research-тасок, любых non-impl. +**`weight` review-таски — наследовать от impl-таски, но не ниже `needs-claude`** (проставлять явно при `tasks_create`): + +- impl `needs-human` → review `needs-human` (критично-инфраструктурное изменение нельзя ревьюить слабым tier'ом — ревью наследует строгость impl). +- impl `needs-claude` → review `needs-claude`. +- impl `cheap-ok` → review `needs-claude` (флор: review дисциплинарно-критична, см. What NOT to do — cheap-ok сюда не опускать). + +Без явного `weight` поллер не маршрутизирует review-таску (reconciler её пропускает) — поэтому проставлять всегда, даже когда impl и review совпадают по tier'у. + ## Failure modes - **Пользователь отказывает на pre-flight** → abort, задачу не создавать. @@ -118,6 +126,7 @@ description: > - Не пропускать `notify` — без него boss не узнает о завершении. - Не пропускать `weight` — без него fleet routing слеп. - Не создавать review-таску для pointers/ops/research задач — только для impl. +- Не создавать review-таску без `weight` — reconciler/поллер её пропустит. Наследовать от impl, флор `needs-claude` (см. Step 5). - Не назначать `weight: cheap-ok` для задач где дисциплина критична (review, security, schema migration) — слабые модели могут игнорировать invoke-инструкции. - Не назначать `weight: needs-claude` или `cheap-ok` задачам, меняющим критическую инфраструктуру (поллер, MCP серверы, deploy, CI/CD) — только `needs-human`. - Не ставить `session_break` рутинно на каждую задачу — это маркер реальной границы (domain-switch / milestone / heavy infra), не дефолт; иначе `using-tasks` рвёт сессию после каждого close.