feat(using-tasks): done-task archival rule, fix STATUS.md bloat (v1.3.0)

MINOR bump 1.2.0 -> 1.3.0. Adds a done-task archival rule: when >=10
green done blocks pile up in STATUS.md (checked at Session start step 7
and Task completion step 7), move them verbatim to
.tasks/archive/YYYY-MM.md (append, monthly file, one-time header,
committed on its own), leaving only active/paused/ready/blocked on the
board. This is the root-cause fix for the recurring "huge STATUS.md"
complaint -- orientation still reads the local board, but the board is
kept small so the read stays cheap.

Deliberately did NOT follow the task's literal instruction to swap
Read STATUS.md for tasks_get_status in the orientation flow: that rests
on a factual error. tasks_get_status returns ONE task's live status by a
known slug and cannot enumerate the board; tasks_aggregate is
cross-project + cache-based and does not index ready/done (its docs say
read STATUS.md directly for the current project). So no projects-meta
tool replaces the orientation board-read. The skill now warns against
both tools for board enumeration and points tasks_get_status at its real
single-task use.

Concept page concepts/using-tasks-status-archival.md + index + log
document the deviation for the paired review task. TDD N/A (markdown
policy). hermes/mapping + install untouched (separate baseline tasks).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-09 16:50:13 +03:00
parent 23d5be647f
commit afb1d1eb96
5 changed files with 115 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
---
name: using-tasks
version: 1.2.0
version: 1.3.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
@@ -33,12 +33,16 @@ If `.tasks/` is **missing**, or `STATUS.md` exists but is non-canonical (e.g. fl
```
<monorepo-root>/
.tasks/
STATUS.md ← board: one block per task, sorted by priority
STATUS.md ← active board: 🔴 / 🟡 / ⚪ / 🔵 blocks, sorted by priority
<task-slug>.md ← deep context per task, one file each
archive/
YYYY-MM.md ← 🟢 done blocks moved off the board, one file per month
```
Commit `.tasks/` to git. Decision history is valuable; diffs show how thinking evolved.
`STATUS.md` is the **active** board — it must stay lean so orientation reads stay cheap. Closed 🟢 tasks are archived to `archive/YYYY-MM.md` once they pile up; see "### Archiving done tasks".
---
## STATUS.md format
@@ -62,7 +66,7 @@ _Updated: YYYY-MM-DD_
- 🔴 Active — currently worked on (only one at a time)
- 🟡 Paused — in progress, resumable
- ⚪ Ready — not started, fully defined
- 🟢 Done — completed, kept until merged
- 🟢 Done — completed; kept on the board until merged, then archived (see "### Archiving done tasks")
- 🔵 Blocked — waiting on external input
### `session_break` marker
@@ -112,11 +116,16 @@ Temporary hypotheses, links, names of people to consult.
### Session start
1. Check if `.tasks/STATUS.md` exists. If not → invoke `setup-tasks` and stop here until it returns.
2. Read `STATUS.md`.
2. Read `STATUS.md` — this is the orientation read (see note below on why it's a local read, not an MCP call).
3. If user names a task, read its `<task-slug>.md`.
4. Confirm in one sentence: "We're in the middle of X, next step is Y."
5. Ask if the plan is still correct before doing anything.
6. If STATUS.md `_Updated` date is >3 days ago, flag it and ask user to confirm current state.
7. If `STATUS.md` holds **≥ 10** 🟢 done blocks, archive them first (see "### Archiving done tasks") so the board you orient on is lean.
> **Orient by reading the local `STATUS.md`, not an MCP call.** It is the live board and — kept lean by archival — cheap to read. Do **not** reach for projects-meta tools to enumerate the current project's board:
> - `tasks_aggregate` is cache-based, cross-project, and does **not** index ready/done — its own docs say to read `.tasks/STATUS.md` directly for the current project.
> - `tasks_get_status(target_project, slug)` returns a **single** task's live status (`{status, found}`) by a slug you already know — it cannot list the board. Use it only to check **one** known task (e.g. confirm a delegated task's board state, or detect async-human parking), never for orientation.
### Session end / pause / switch
1. Update `STATUS.md`: set current task to 🟡, update "Where I stopped" and "Next action".
@@ -153,6 +162,36 @@ Temporary hypotheses, links, names of people to consult.
- **Stop.** Do not claim or start the next task.
- If the marker is absent → behaviour is unchanged: proceed to claim / start the next task as usual.
7. **Archival check.** After the close is committed, if `STATUS.md` now holds **≥ 10** 🟢 done blocks, archive them (see "### Archiving done tasks"). This keeps the board lean for the next orientation read.
### Archiving done tasks
🟢 done blocks accumulate in `STATUS.md` and bloat it — and since orientation reads the whole board, a bloated file burns context on every session start (the recurring "huge STATUS.md" complaint). Keep the board lean: done blocks stay only until merged, then move to a monthly archive.
**Threshold.** When `STATUS.md` holds **≥ 10** 🟢 done blocks, archive them. Check at two moments: (a) right after closing a task (Task completion step 7), and (b) at session start, before orienting (Session start step 7). The threshold is a ceiling, not a target — archive in batches; don't churn one block at a time.
**Where.** Append the archived blocks to `.tasks/archive/YYYY-MM.md` — one file per calendar month, keyed by the date of archival. Create `.tasks/archive/` and the month file if absent. If the month file already exists, **append**; never overwrite.
**Archive file format** (header written once, on file creation):
```markdown
# Archived done tasks — YYYY-MM
Moved out of `.tasks/STATUS.md` to keep the active board lean.
Full source is git history; this file is for grep-able historical context.
---
```
…followed by each 🟢 block **verbatim** (including its trailing `---` separator and any `<!-- closed-by … -->` comments).
**After archiving,** `STATUS.md` keeps only 🔴 / 🟡 / ⚪ / 🔵 blocks. Commit the move on its own:
```
git add .tasks/ && git commit -m "meta(tasks): archive done batch → .tasks/archive/YYYY-MM.md"
```
Leave a just-closed 🟢 block on the board only while it's still useful at a glance (pending merge, fresh reference). Everything older goes to the archive.
### Post-commit task closure prompt
@@ -190,6 +229,7 @@ Pair: `using-projects-meta` declares local-first for **reads**; this rule extend
- **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.
- **Keep the board lean** — orientation reads the local `STATUS.md` whole, so archive 🟢 done blocks to `.tasks/archive/YYYY-MM.md` once ≥10 pile up. Never enumerate the current project's board via `tasks_aggregate` (cross-project cache) or `tasks_get_status` (single-task, by slug). See "### Archiving done tasks".
- **Never close a task without a coverage check** — see "### Task completion" step 1. Acceptance criteria with no evidence → ask, don't auto-close.
- **Honour `session_break`** — a closed task carrying a `session_break` marker means stop after close; never chain into `tasks_claim_next`. See "### Task completion" step 6.
- **Local-first recommendations** — cwd-project board comes first; cross-project urgents are at most one footnote line.