feat(using-tasks): pre-close coverage gate + local-first recommendations [v1.1.0]

Part A — Pre-close coverage gate. ### Task completion now lists acceptance
criteria from the per-task file before setting 🟢; missing evidence → ask
the user. New section ### Post-commit task closure prompt: after a feat:/fix:
commit the agent asks "эта работа закрывает таску <slug>?" so shipped code
doesn't sit under stale  blocks (cf. extend-project-discipline-brainstorm-
workspaces / project-creation-lifecycle-skill, both shipped before close).

Part B — Local-first recommendations at session-start / "what next" triggers.
cwd-project board (🔴🟡) leads; cross-project urgents are at most one
footnote line. Explicit "по всем проектам" flips the order. Pairs with
using-projects-meta's local-first read rule.

Bump 1.0.0 → 1.1.0 (MINOR — adds two new operation types; task block
suggested PATCH but Rule 3 grades these as capability additions). Closes
[using-tasks-close-coverage-gate] (next commit).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-06 23:49:09 +03:00
parent 733e1466df
commit b0d2d5169a
3 changed files with 71 additions and 9 deletions

BIN
dist/using-tasks.skill vendored

Binary file not shown.

View File

@@ -103,10 +103,36 @@ hypotheses, links).
### Task completion
1. Resolve or drop all open questions.
2. Set status to 🟢 in `STATUS.md`.
3. Append a final summary line to the Decisions log.
4. Remind the user to delete the branch after merge.
1. **Pre-close coverage check** — list acceptance criteria, locate
evidence (tests, smoke-test artefacts, manual checklist ticks, design
doc refs). Missing evidence → ask the user before closing; never auto-close.
2. Resolve or drop all open questions.
3. Set status to 🟢 in `STATUS.md`.
4. Append a final summary line to the Decisions log.
5. Remind the user to delete the branch after merge.
### Post-commit task closure prompt
After a `feat:` / `fix:` commit the agent prompts:
"эта работа закрывает таску `<slug>`?". Slug candidates: commit-message
scope, current branch, most recent `Where I stopped`. If yes → run the
coverage check above. Skips `chore:` / `meta:` / `docs:` commits.
Forces a fresh-while-fresh decision, instead of letting shipped code sit
under a stale ⚪ block.
### Recommendations / "what's next" trigger
When the user asks «что дальше», «срочные», «куда копаем», "what next",
"status", or on session-start — recommend in this order:
1. **Local cwd-project board** ranked 🔴 → 🟡 → ⚪. Cite slugs.
2. **One footnote line** if relevant: `Cross-project: N 🔴 in other repos
(см. mcp__projects-meta__tasks_aggregate).` Only if N>0 and no local 🔴.
Explicit "по всем проектам" / "across all projects" flips the order.
Pairs with `using-projects-meta`'s local-first rule (which covers reads;
this one covers recommendations).
## Rules
@@ -120,6 +146,10 @@ hypotheses, links).
- **Always confirm orientation at session start.** State understanding
before acting.
- **One active task at a time** — only one 🔴 in `STATUS.md`.
- **Never close without coverage check.** See "### Task completion"
step 1.
- **Local-first recommendations.** cwd-project first; cross-project at
most one footnote line.
## Install

View File

@@ -1,6 +1,6 @@
---
name: using-tasks
version: 1.0.0
version: 1.1.0
description: >
Policy skill for working with an existing `.tasks/` board (per-task files + STATUS.md).
Use whenever the user is switching between tasks, resuming a paused task, starting a new
@@ -124,10 +124,40 @@ Temporary hypotheses, links, names of people to consult.
4. Create and checkout branch if it doesn't exist.
### Task completion
1. Resolve or drop all open questions.
2. Set status to 🟢 in STATUS.md.
3. Append final summary line to Decisions log.
4. Remind user to delete the branch after merge.
1. **Pre-close coverage check.** Before setting 🟢:
- List acceptance criteria from the per-task `<slug>.md` (or the STATUS block if no per-task file).
- For each criterion, locate evidence: a test name in the diff, a smoke-test artefact, a manual-checklist tick in the per-task file, or a design-doc reference.
- Missing evidence on any criterion → flag to user and ask "закрывать или подождать coverage'а?". Never silently close.
- If acceptance criteria are policy / docs-only and have no testable shape, an explicit user "ok, closed by inspection" is required (record this in the close-note).
2. Resolve or drop all open questions.
3. Set status to 🟢 in STATUS.md.
4. Append final summary line to Decisions log.
5. Remind user to delete the branch after merge.
### Post-commit task closure prompt
After any implementation commit (`feat:` / `fix:` / similar), prompt the user once:
> Эта работа закрывает таску `<slug>`?
Slug candidates, in priority: (a) commit message scope, (b) current branch name, (c) the most recent `Where I stopped` field that mentions a now-shipped artefact. If user says yes → run the pre-close coverage check from "### Task completion". If no → silent.
Skip on `chore:` / `meta:` / `docs:` / `style:` commits — they rarely close work.
This exists because shipped code can sit while the task block stays ⚪ ready (e.g. `extend-project-discipline-brainstorm-workspaces` lived as ⚪ for a day after `215afdd` shipped Rule 5). The prompt forces a one-line decision while the work is fresh.
### Recommendations / "what's next" trigger
When the user asks «что дальше», «срочные», «куда копаем», «status», «what next», or session-start lands on a project — recommend in this order:
1. **Local cwd-project board** ranked 🔴 → 🟡 → ⚪. Group by status, summarize one line each. Cite slugs.
2. **One footnote line** if cross-project state is relevant: `Cross-project: N 🔴 active in other repos (см. mcp__projects-meta__tasks_aggregate).` Only when N>0 and there is no active 🔴 in the current cwd. Never bury local recommendations under it.
Cross-project urgents are *information*, not the driver of "what to do here". The user chose this cwd; that's the implicit scope.
If the user explicitly asks "across all projects" / "по всем проектам" / "cross-project status" — flip the order: cross-project first, local as footnote.
Pair: `using-projects-meta` declares local-first for **reads**; this rule extends local-first to the **recommendation phase**.
---
@@ -140,3 +170,5 @@ Temporary hypotheses, links, names of people to consult.
- **Commit after every session end** — git log is the history of thinking.
- **Always confirm orientation at session start** — state understanding before acting.
- **One active task at a time** — only one 🔴 in STATUS.md.
- **Never close a task without a coverage check** — see "### Task completion" step 1. Acceptance criteria with no evidence → ask, don't auto-close.
- **Local-first recommendations** — cwd-project board comes first; cross-project urgents are at most one footnote line.