fix(delegate-task): literal negative-clause kills self-task FP (0.2.0->0.2.1)

«создать задачу себе» false-positive-fired delegate-task instead of
using-tasks (5/5 trials, found by delegate-task-test-trigger). Root cause:
the self-task phrase shares the stem «создать задачу» with the positive
trigger «создать задачу на агента», and the abstract "Does NOT apply when
doing the work yourself" carve-out cannot beat a literal stem-match under
the using-superpowers 1%-rule.

Fix: make the negative literal + routed. Description now lists
«создать задачу себе» / «task for myself» / «поставить себе задачу»
-> using-tasks; body "Ne primenyaetsya" gains a self-assigned bullet plus a
disambiguator («на агента»/«агенту»/«в проект X» = delegate; «себе» = own
board). PATCH bump 0.2.0 -> 0.2.1.

Verification (fresh-context subagents, simulated available-skills registry,
no hint): positives 5/5 -> delegate-task (no regression); negative
«создать задачу себе на завтра» 4/5 -> using-tasks (was 0/5). The 1
residual miss reasoned correctly but tripped on an eval-harness artifact
(prompt forced skill-name-before-reasoning), not description ambiguity.

Wiki: concept page delegate-task-negative-trigger-fp.md + index/log.
Board: [delegate-task-description-fp-fix] -> done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 12:40:38 +03:00
parent 731ed420ee
commit 8b22d16c20
5 changed files with 73 additions and 16 deletions

View File

@@ -0,0 +1,59 @@
---
title: delegate-task — literal negative triggers beat abstract carve-outs
type: concept
updated: 2026-06-09
---
# delegate-task — literal negative triggers beat abstract carve-outs
## Symptom
`delegate-task` v0.2.0 false-positive-fired on **«создать задачу себе»** (create a task
for myself) — a self-assigned task that should route to `using-tasks`, not to cross-agent
delegation. The `delegate-task-test-trigger` run measured it at **5/5 trials** consistently
wrong (→ `delegate-task`).
## Root cause
The positive trigger list contained **«создать задачу на агента»**. A self-task phrase
**«создать задачу себе»** shares the stem **«создать задачу»**, so it literal-matched the
positive trigger. The negative clause was abstract — *"Does NOT apply when doing the work
yourself"* — and an abstract carve-out does **not** beat a literal stem-match under the
`using-superpowers` 1%-rule. Clean-context subagents *recognized* the «себе» exception in
their reasoning, yet still invoked `delegate-task` FIRST because the literal match outweighed
the abstract exclusion.
## Fix (v0.2.0 → v0.2.1, PATCH)
Make the negative **literal and routed**, so it competes head-on with the positive at the
same surface level:
> Does NOT apply to self-assigned tasks on your own board (**«создать задачу себе»**,
> **«task for myself»**, **«поставить себе задачу»** → using-tasks), to work you do
> yourself, or to workshop-internal tasks.
Plus a body disambiguator in the "Не применяется" section:
**«на агента» / «агенту» / «в проект X» = делегирование; «себе» / «myself» = своя доска.**
## Verification
Re-ran the `delegate-task-test-trigger` methodology (fresh-context subagents, simulated
available-skills registry with the new description + competitors `using-tasks` /
`using-projects-meta` / `setup-tasks` / `session-handoff`, no hint about the expected
answer):
- **Positives 5/5** — «создать задачу на агента», «поставить задачу агенту», «delegate task
to the books project», «делегировать таску», «tasks_create для проекта X» → all
`delegate-task`. No regression from the literal negative.
- **Negative «создать задачу себе на завтра» 4/5 → `using-tasks`** (was 0/5 before the fix).
The single residual miss reasoned correctly («себе» → using-tasks) but was tripped by an
eval-harness artifact (the prompt forced a skill name on line 1 *before* reasoning),
not by ambiguity in the description.
## Reusable principle
When a skill's positive triggers contain a phrase whose **stem** also appears in a sibling
skill's domain, an abstract "does NOT apply when…" clause is too weak. Put the **exact
colliding negative phrase** in the description with an explicit **→ <sibling-skill>** route.
Literal beats abstract under the 1%-rule. See also [[tdd-criteria-design]] for another
"make the bright line literal, not a judgement call" pattern.

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)
- [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

@@ -65,3 +65,5 @@ Parseable: `grep "^## \[" .wiki/log.md | tail -20`.
## [2026-05-25] decision | install-cross-platform — `install.{ps1,sh}` paired-script parity contract documented; `--prune` / `-Prune` flag rationale (combined-with-install, global-scan ignores names filter, default-off, print-and-delete no prompt); shipped in commit `6cf0e98` with `[skip-tdd: wrapper]` carve-out + smoke-test evidence; closes 2/3 of `[install-ps1]` acceptance (the doc + flag), `dist/`-prune analogue deferred to `build` scripts
## [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.