agentleFS
justmanivjustmaniv/cannery-row/skills/task-lifecycle/SKILL.md

task-lifecycle

Skill1 starsChanged 4 months agoApache-2.0View on GitHub

Move tasks between status directories (new/prioritized/wip/blocked/done/done-archived) with full frontmatter sync, "Done when" reconciliation, reverse blocked-by sweep, a propagation gate that carries a closure's changes and findings out to the documents and open tasks they affect, claim validation before starting a task you did not write, and a best-effort task-numbering scan across every ref and worktree. Use whenever creating, starting, blocking, unblocking, or completing a task, or shelving old completed ones, in a repository's `tasks/` directory.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. ray-amjad/skills★ 73same name
    2. ali-maraci/claude-skills★ 1same name
    3. max-miller1204/max-agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

28 rules. 0 are common, 17 are distinctive, and 11 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every - [ ] in the "Done when" checklist is resolved (- [x] or - ~~strikethrough~~ (reason)) before a task moves to done/.

    line 22
  2. Very specific:

    The campsite is clean: before any task is reported done to the human — see the Clean-campsite gate in the wip → done procedure.

    line 24
  3. Distinctive:

    If you can't satisfy an invariant, stop and surface the conflict — don't move the file.

    line 28
  4. Very specific:

    Reconcile "Done when" checklist: Every - [ ] must become either:

    line 55
  5. Very specific:

    Never pre-fill - ✅ on something that wasn't accomplished.

    line 59
  6. Distinctive:

    Run it from the repository root:

    line 78
  7. Very specific:

    If a projection of tasks/ enumerates lanes, it needs the new one — otherwise an archived blocker silently reads as a prose condition rather …

    line 103
  8. Distinctive:

    What the change turned up that nothing yet says: No sentence is wrong; a sentence is *missing*, and only you know it.

    line 126
  9. Distinctive:

    The artifacts you had to read to do the work: No query returns this list.

    line 148
  10. Very specific:

    Local branches: delete the ones *you* created that are now merged or whose upstream is gone.

    line 198
  11. Distinctive:

    Remote branches / anything outward-facing: do not delete without asking — surface it instead.

    line 200
  12. Very specific:

    Background jobs: stop any poll/watch/server you spawned for the task.

    line 201
  13. Very specific:

    Temp files you created: delete them, wherever you put them.

    line 202
  14. Distinctive:

    Read the code before you trust the task, and read it to break the claim rather than to confirm it.

    line 246
  15. Very specific:

    Read any hit before proceeding.

    line 259
  16. Distinctive:

    If you also run a periodic grooming sweep, this is its per-pickup complement: grooming bounds staleness to at most one cycle.

    line 284
  17. Distinctive:

    If the existing coverage is a decision you'd be changing, that's an ADR/supersession conversation, not a fresh task.

    line 321
  18. Distinctive:

    Write criteria a different person can evaluate.

    line 376
  19. Distinctive:

    Run it from anywhere in the repo — it scans all worktrees and refs, not the cwd.

    line 411
  20. Distinctive:

    Never reach into another session's worktree to renumber *its* task.

    line 432
  21. Distinctive:

    If the project has no generated view, this is a no-op — don't invent one.

    line 550
  22. Distinctive:

    When a task closes, other tasks may have been waiting on it.

    line 556
  23. Very specific:

    Check if this was the last blocker: Read the dependent's blocked-by: field.

    line 566
  24. Very specific:

    Defensively: if you notice a blocked-by: pointing to a path that doesn't exist, find the file by slug and rewrite.

    line 579
  25. Distinctive:

    Don't leave stale paths — they break the dependency graph silently.

    line 581
  26. Distinctive:

    If the answer is yes:

    line 591
  27. Distinctive:

    Update the phase doc — status, any "you are here" marker, any summary table.

    line 593
  28. Distinctive:

    If your project has no such document, this section is a no-op.

    line 598

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Premise

tasks/<status>/NNN-slug.md IS the task tracker. The directory the file lives in is its status. Frontmatter must agree with the directory. Other tasks reference this one by path in their blocked-by: field, so a move has cross-task consequences.

This skill is the source of truth for the lifecycle procedure. Project tasks/README.md files document layout and frontmatter for humans; this skill governs the operations.


Invariants (always true after this skill runs)

  1. status: frontmatter value === directory the file is in.
  2. updated: is today's date on every transition or material edit.
  3. created: is set at file creation and never changes.
  4. completed: is set if and only if the file is in done/ or done-archived/. Archiving shelves a closed task; it does not un-close it, and the date is what the archive operation itself reads.
    • Invariant 1 needs no amendment for the archive lane, by construction. status: done-archived in done-archived/ already satisfies "status === directory". A shelf outside the lane system would have needed an exception clause on invariant 1, and an exception is the thing that rots — which is why the archive is a lane.
  5. Every - [ ] in the "Done when" checklist is resolved (- [x] or - ~~strikethrough~~ (reason)) before a task moves to done/.
  6. No task sits in blocked/ with every one of its blockers closed. A blocked-by: entry whose task has moved is rewritten to the new path, never deleted — the entry is the audit trail, and status: blocked over an empty blocked-by: is a task blocked by nothing. When the last blocker closes, surface the task for re-triage (see the sweep); it does not sit there.
  7. The campsite is clean before any task is reported done to the human — see the Clean-campsite gate in the wip → done procedure. "Done" is never claimed over a littered workspace.
  8. Every task file carries an H1 title and a ## Done when checklist with at least one criterion — in every lane, from the moment it is created. See "The shape of a task file" below.
  9. What the closure made wrong has been corrected, and what the closure turned up has been written down somewhere it will be read again — see the Propagation gate in the wip → done procedure. Naming the artifact and routing it satisfies this; fixing every site does not have to.

If you can't satisfy an invariant, stop and surface the conflict — don't move the file.


Transitions

All transitions are: (a) update frontmatter in place, (b) git mv the file, (c) for → done, run the three closing gates — the reverse-dependency sweep, the propagation gate, and the campsite check. Do this in the same turn as the work that triggered the transition. Don't ask "should I move it?" as a separate question.

new → prioritized

  • Set status: prioritized
  • Bump updated: to today
  • git mv tasks/new/X.md tasks/prioritized/X.md

prioritized → wip (or new → wip, blocked → wip)

  • First validate the task's claims (see below) — unless you wrote it yourself, in which case there is nothing to re-check.
  • Set status: wip
  • Bump updated:
  • git mv to tasks/wip/

* → blocked

  • Set status: blocked
  • Bump updated:
  • Fill blocked-by: with the blocking task's path (e.g. tasks/wip/010-create-prd.md). Multi-line YAML block scalar is fine for multiple blockers.
  • git mv to tasks/blocked/

wip → done (full procedure)

  1. Reconcile "Done when" checklist. Every - [ ] must become either:

    • - [x] (or - ✅) — criterion actually met
    • - ~~strikethrough~~ (reason) — deliberately skipped, reason stated

    Never pre-fill - ✅ on something that wasn't accomplished. ✅ means done; pre-filling erodes the signal.

  2. Set status: done
  3. Set completed: to today
  4. Bump updated: to today
  5. git mv to tasks/done/
  6. Run reverse-dependency sweep (below).
  7. Run the propagation gate (next section) — carry outward what this closure made wrong and what it turned up.
  8. Clean the campsite (below) — the last thing before you report done to the human.

done → done-archived (shelving old closed work)

done/ grows monotonically and nothing ever leaves it. That costs nothing for a while and then it does: any structural check that validates the whole tracker pays for every file in it, so the price of closing work rises with the amount of work already closed. Shelving bounds that.

The archive is a lane, not a shelf. A shelved task gets status: done-archived in done-archived/, so invariant 1 holds by construction and every consumer that enumerates lanes gains one correct entry instead of a special case. completed: stays (invariant 4).

Run it from the repository root:

{skill-root}/scripts/archive-done-tasks.py --dry-run   # list what would move
{skill-root}/scripts/archive-done-tasks.py             # shelve it
{skill-root}/scripts/archive-done-tasks.py --days 30   # a different threshold
  • The default threshold is 14 days, and --days N overrides it per call. Strictly more than N days since completed: — at exactly N the task stays.
  • Preview first. This is the only lifecycle operation that moves files in bulk with no per-file human decision behind it, so --dry-run is the habit, not the exception.
  • Age comes from completed:, never from a file's modification time. Modification times do not survive a clone, so a rule that read them would shelve the entire tracker on a fresh checkout.
  • A task in done/ with an empty or unreadable completed: is refused, reported, and left where it is, and the run exits non-zero. That is an invariant-4 breach that happened somewhere upstream; shelving the file would bury the evidence. One refusal never stops the rest of the run.
  • Nothing is renamed. Filenames cross unchanged, because the number width belongs to the repository — see the numbering section.
  • Commit the moves like any other transition. The operation writes files; it does not commit.

⚠️ Shelved is not un-closed. A blocked-by: entry pointing at an archived task is still satisfied, and the reverse-dependency sweep treats done-archived/ exactly as it treats done/. If a projection of tasks/ enumerates lanes, it needs the new one — otherwise an archived blocker silently reads as a prose condition rather than as closed work.



Propagation gate (before claiming done)

A closure changes what is true, and nothing else in this skill carries that outward. Every other propagation step here walks a path: the reverse-dependency sweep walks the tasks that name this one, and the phase check walks a document the project has already identified. Content has no path to walk. The session holding the answer is the one about to end, so what does not go out now does not go out.

This gate holds on every closure, whether or not the task file says so (invariant 9). The template carries a matching line because most tasks benefit from stating their blast radius up front — but an author who drops it changes nothing about the obligation, exactly as with the campsite gate one section down.

Two things go outward, and the second is the one that gets missed:

  • What the change left wrong. Something asserts the old behavior and is now false.
  • What the change turned up that nothing yet says. No sentence is wrong; a sentence is missing, and only you know it. There is no query behind this half — the artifact that needs the note may never mention this task at all.

⚠️ This is not the reverse-dependency sweep, and it will be mistaken for it. That sweep finds tasks that name this one and rewrites a stale path — a bookkeeping fix to a reference. This gate reads for content that just stopped being true, and its most valuable hits are artifacts that never named this task and never will.

The bound

"Everything relevant" is not a criterion. It is satisfied by finding nothing and refuted by nothing — the shape of check §"The shape of a task file" tells you not to write. Three sources, and it is the third that reaches the second half:

  1. What already cites this work, by number or by slug:

    grep -rl "NNN-slug" tasks/ docs/
  2. The task's own links: frontmatter.
  3. The artifacts you had to read to do the work. No query returns this list; you have it because you just opened them. It is usually where the missing sentence belongs, and neither of the other two sources can see it.

The stopping rule — name and route, don't fix everything

A four-line change can open into dozens of sites, and an unbounded sweep at closure is how this step gets ticked blind to escape it. Name the artifact and route it to the task that owns it — you are not obliged to fix every site you find. Correct what this change itself made wrong; for anything further out, name it in the closing task and either open a task for it or add it to the one that already owns that ground. This is the same call the reverse-dependency sweep makes one step over: it surfaces newly-unblocked tasks for the user to triage rather than moving them itself.

Then, in the done report, say what you carried and what you routed elsewhere.


Clean-campsite gate (before claiming done)

"Done" is not "the change merged" — it is "the change merged and the workspace is as clean as you found it." Never come back to the human claiming a task is done while temporary scaffolding you created is still lying around. This is a required completion step, not a courtesy: leftover worktrees, merged branches, and orphaned background jobs are the litter the next session (or the human) trips over. Every task carries an implicit clean-campsite acceptance criterion — you do not need to restate it per file, but you must satisfy it every time (invariant 7).

Walk this checklist and act on each — don't just eyeball it:

git worktree list          # any temp worktree you added for this task → remove it
git branch -vv             # merged/`: gone` local branches you created → delete (-d, or -D for squash-merges)
git status -sb             # working tree clean, on a known branch (usually main), no stray files
jobs                       # background polls/servers you started → stop them
  • Temp worktrees: reset the branch to its merge target (usually main) first if it holds merged work (avoids a "discard permanently?" prompt), then git worktree remove. Never leave a task's worktree behind.

    ⚠️ Run the removal from outside the tree you are removing. git worktree remove deletes the directory, so if your shell is sitting in it, the cwd is pulled out from under you mid-command and everything chained after it dies with fatal: Unable to read current working directory — including the rest of this checklist. The failure looks like a git problem and is not one. cd to the main tree first:

    cd /path/to/main-tree && git worktree remove ../<temp-tree>

    Then finish the checklist from there. This is the single most-reported stumble in this section.

  • Local branches: delete the ones you created that are now merged or whose upstream is gone. Leave branches still under review or carrying an active sibling task — say which you left and why.
  • Remote branches / anything outward-facing: do not delete without asking — surface it instead.
  • Background jobs: stop any poll/watch/server you spawned for the task.
  • Temp files you created: delete them, wherever you put them. A scratch directory the host says it reclaims still has to be named in the report as reclaimed-not-checked, and anything you wrote outside it — /tmp, the repo, a home directory — is ordinary litter you own. Never put task deliverables in scratch.

🔴 Running this checklist is not reading it. The commands print state; a report is a claim about that state, and the two part company silently. Quote the reading beside each line — worktrees: mine removed, ../x left (sibling); branches: mine deleted, 3 : gone not mine; status: clean, level with its upstream; jobs: none — and only then write "clean". In particular git status -sb reading [behind N] is not clean: fast-forward first. (A branch with no upstream simply has no such reading — there is nothing to be behind.) A campsite claim with no readings under it was not checked.

⚠️ No line in this gate may end "no action needed." One did, for scratch files, and it was not a rule anyone gave — an agent wrote an exemption into the checklist, for agents, and a session then read "temp files: handled" and reported a clean campsite over five surviving directories it had made. An exemption you grant yourself is the one thing this gate cannot contain.

Then, in the done report, state the campsite is clean and note anything deliberately left standing.


Before starting: validate the task's claims

A task file is a claim about the past. Before acting on it, confirm the claim is true. Note what that does not say: not "still true." A task can be false the day it was written.

The trigger is authorship, not age. Validate the load-bearing claims of any task you did not write yourself, however fresh it is. A task you wrote in this session needs nothing — you already read the code. Everything else does, because two different failures land in the same place:

  • Overtaken. Work converges under whatever task its author happened to be in, so a task's own work can ship under a different number while its file sits untouched. Age makes this likelier.
  • Wrong when written. The author searched the wrong directory, read a stale document, or assumed a convention had lapsed. Age has nothing to do with it, and nobody reviewed the file before it landed.

The second is the more likely failure for a task written to be handed off, and the more expensive: a stale task wastes a pickup, a false premise sends you building the wrong thing with a well-argued spec telling you it's right. Real case: a task claimed a table had never been seeded and specified work to seed it. Seven migrations were already doing exactly that — the author's grep had searched one directory while the writes lived in another. Four minutes of checking; the task was one day old, and every "is it stale?" heuristic would have waved it through.

Read the code before you trust the task, and read it to break the claim rather than to confirm it. The two questions send you to different files: "check this claim" finds the thing the task cited and stops there; "try to prove this wrong" opens what that thing actually does. Start with the claims the work depends on — the ones where being wrong changes what you build, not every sentence.

Then, for task number NNN, check whether the work already shipped elsewhere:

git log --oneline --all --grep="\bNNN\b"     # discard hits where NNN is only a merge reference, (#NNN)
grep -rn "task NNN" --include='*.rs' --include='*.md' --exclude-dir=tasks .

Read any hit before proceeding. Note the second command excludes tasks/ deliberately: hits inside tasks/ are just cross-references, and the naive | grep -v '^./tasks/' filter silently matches nothing, because paths come back without the ./ prefix.

Then act on what you find:

  • Work already shipped → the task is done, not startable. Close it per wip → done with the evidence (the commit and the file that implements it), and spawn a follow-up for any real remainder rather than folding the remainder into the closure.
  • Partially shipped → rewrite the task to the actual remaining scope before starting, so the "Done when" list describes work that still exists.
  • A load-bearing claim is false → rewrite the task against what the code actually says, then start. Say what was wrong and how you found it; the next reader needs to know the file was corrected rather than drafted that way. If the correction changes the shape of the work rather than its details, hand it back instead of quietly redesigning it under the old number.
  • Nothing found → proceed. The check cost two greps and a few minutes of reading.

Why this matters most for decision tasks and spikes. Their chosen option characteristically ships inside the very piece of work that needed it. A decision task picked up cold reads as an instruction to go implement option A — so the failure mode is not a stale board entry, it is rebuilding something that already has callers. Real case: a coverage-standard decision task sat in new/ for ten days while the harness it recommended was built and merged the very next day under a different task number — the implementing file named the decision task in its own module doc. It was caught only because the pickup happened to read the code first. That is luck, not procedure.

If you also run a periodic grooming sweep, this is its per-pickup complement: grooming bounds staleness to at most one cycle; this catches it at zero latency, at the moment it would cost work.

Where this check stops. It is answered by a reader who has just absorbed the task's argument, so it is validation and not an independent read. It is built for the two failures above and is weak against a third: a claim about how something works, where everything cited is real and the mechanism is invented. A citation that checks out is not evidence for the sentence around it — the load-bearing claim is rarely "this artifact exists", it is "it does X by doing Y", and Y is the part that gets made up. When the task's own output is a spec later sessions are held to, a false mechanism does not stop at this file: it flows into its ## Done when list and its siblings', and once it is a criterion it is self-enforcing. That case wants a second reader that was not in the conversation which accepted the task, told to assume something is wrong and go find it. This skill does not ship one and does not prescribe one — it tells you where its own check stops.


Before creating: check for prior coverage

Before drafting a new task, search for existing coverage of its topic. A new task that duplicates or contradicts an existing task, ADR, README, or runbook is worse than no task: two artifacts answering the same question differently silently diverge, and a blind draft can merge to main before anyone notices the conflict. This is a real failure mode, not a hypothetical — it has happened (a runner-cache task drafted and merged before finding an existing task + README already governed that ground, with a different stance).

The check is cheap and mandatory. Before writing the file:

# TOPIC = a couple of distinctive keywords for the task (e.g. "runner cache", "otp signup")
grep -ril "TOPIC" tasks/ docs/decisions/ docs/working-agreement/ 2>/dev/null
grep -ril "TOPIC" -- '*README*' 'ci/**' 2>/dev/null   # topic's runbook/README home, if any

Then act on the hits:

  • Prior coverage exists → extend or reopen against it (add a task that references the governing doc/ADR, or reopen the owning task) rather than creating a parallel artifact. If the existing coverage is a decision you'd be changing, that's an ADR/supersession conversation, not a fresh task.
  • A governing doc exists but is stale/wrong → fix it in place; don't route around it with a contradicting new task.
  • Nothing found → proceed to numbering below.

Fold anything you do find into the new task's links: frontmatter so the next person inherits the trail. When in doubt, widen the keywords — a false "nothing found" is the expensive outcome.


The shape of a task file (on creation)

Frontmatter is not the whole contract. Two things in the body are required, in every lane, from creation — not added later when the task is closed:

---
created: YYYY-MM-DD
updated: YYYY-MM-DD
completed:
status: new
owner: name
blocked-by: ""
---

# What outcome this task produces

## <whatever carries the handoff>

Context, the verifiable state of the code today, the fork you considered and what you recommend.

## Done when

- [ ] A criterion someone else can check without asking what you meant
- [ ] Another one
- [ ] Every document and open task this change makes wrong is updated, and anything the work
      turned up that nothing yet records is written down — or what was checked is named here,
      with why none of it needed changing
  • The H1 is the title of record. Any projection of tasks/ reads it for the card headline; without it the card renders blank and nothing reports the omission.
  • ## Done when is the acceptance criteria. It is the only part of the file a later session is held to, and the wip → done transition is defined as reconciling it (invariant 5). A task with no criteria — or with the heading and nothing under it — closes on nobody's authority but the closer's, because "resolve every - [ ]" is trivially true when there are none.
  • The third line is the propagation criterion. It is worded so it cannot be resolved silently: a closer who ticks it having named nothing has visibly not done it. It is in the template as a default, not as a requirement — invariant 9 holds whether or not the file carries the line, so dropping it costs nothing but the reminder. Keep it when the task can already guess what its change will make wrong.

Write criteria a different person can evaluate. "Works properly" is not a criterion; "the gate fails with a non-zero exit on a task missing its H1" is. If you cannot state one, the task is not yet understood well enough to hand off — that is information, not a formality to skip.

Everything between the H1 and ## Done when is free-form. Use whatever headings carry the handoff.


Assigning the next task number (on creation)

Task numbers must be unique across the entire repo — every branch and every worktree — not just the tree you happen to be sitting in. Numbering off a plain ls tasks/ in the current worktree is the #1 collision source: two parallel branches each read the same stale max, both grab the same "next" number, and they clash at merge. This is not hypothetical — it happens whenever work is split across worktrees (routine wherever parallel sessions each take a branch).

Compute the next number with this scan — it covers committed task files on every local + remote ref, plus working-tree files (including staged/untracked new ones) in every worktree:

# If other machines/sessions share task branches via a remote, fetch first so their numbers count:
#   git fetch --all -q
next=$( {
  git for-each-ref --format='%(refname)' refs/heads refs/remotes 2>/dev/null \
    | while read -r ref; do git ls-tree -r --name-only "$ref" -- tasks/ 2>/dev/null; done
  git worktree list --porcelain 2>/dev/null | sed -n 's/^worktree //p' \
    | while read -r wt; do find "$wt/tasks" -type f -name '*.md' 2>/dev/null; done
} | sed -E 's#.*/##' | grep -oE '^[0-9]{3,}' | sort -n | tail -1 )
width=${#next}; [ "$width" -lt 3 ] && width=3
printf 'next task number: %0*d\n' "$width" $(( 10#${next:-0} + 1 ))
  • Run it from anywhere in the repo — it scans all worktrees and refs, not the cwd.
  • The width comes from the repository, not from this file. The reduction takes any run of three or more digits and returns the maximum with its padding intact, so ${#next} is the width already in use and the new number matches it: a tree of 00738-… yields 00739, a tree of 738-… yields 739. Three is the floor when there is nothing to read.

    ⚠️ Do not hardcode a width here. This file is installed into repositories that have chosen different ones, and a fixed width mints a mismatched number in every repository that chose another — manufacturing the mixed-width state the padding rule exists to prevent. %0*d is a minimum width, so it never truncates: at 999 the next number is 1000 whatever the padding said. In a tree that is already mixed it takes the width of the highest number; make the tree uniform rather than relying on that.

  • An exact {3} in the reduction does not error and does not skip the file. grep -o matches a prefix, so 1000-b.md reduces to 100 and the caller is handed 101, a number already in use, and 00035-b.md reduces to 000 so every number collides. This shipped, and it was silent.
  • git ls-tree reads each ref's committed tree; the sed over git worktree list paths catches numbers created-but-not-yet-committed in a sibling worktree.
  • Creating several tasks at once? Increment locally from that base; don't re-scan between them.
  • Collide anyway (a branch landed after you scanned)? The loser renumbers via git mv before merge — task numbers carry no meaning, so yielding a number is free. ⚠️ That is a repair, not a control; see §"The scan is best-effort" below for why it needs a trigger.
  • Never reach into another session's worktree to renumber its task; renumber yours.

⚠️ Why that line uses sed and not an awk field reference. A $ immediately followed by a digit — the positional form used by awk and by shell — is replaced with one of the caller's argument words before Claude reads this file. Verified 2026-08-30, and the boundary matters: the indexing is zero-based, and nothing is substituted when the caller passes too few words to reach that position.

arguments at invocationan on-disk field-two reference arrives as
alpha bravo charlie delta{print charlie} — the third word
one two three{print three}
one twointact, with the raw arguments appended as a footer
(none)intact

So the break is not "whenever arguments are passed" — it is whenever they reach the index. That narrowness is why it hid: the common invocations render correctly. The corrupted form is usually still valid shell — an undefined awk variable prints an empty string rather than erroring, so the line emits one blank line per worktree, find matches nothing, and 2>/dev/null swallows it. (Only usually: an argument word containing a quote or brace breaks the program loudly instead.) A silent half-scan is the worse outcome, because it is trusted.

The half that goes quiet is the one that catches an uncommitted sibling — the case the committed-refs half structurally cannot cover. ${name}, "$var", $(...) and $((...)) survive byte-identical; only the bare positional form is touched. Nothing in a skill body that a reader is meant to run may use it — the sed above has no $ at all, so no argument can reach it.

The field reference was also wrong for a second, unrelated reason: splitting on whitespace truncates a worktree path at its first space. A worktree under ~/My Projects/ scanned as ~/My, which finds nothing — silently, again. sed takes the rest of the line, so the path survives intact.

The scan is best-effort — a check at merge is the backstop

The scan cannot see a number a concurrent session has decided on but has not committed anywhere yet. Two sessions that both scan before either writes read the same max and both take it. That is a lost-update race, and running the scan more carefully does not close it.

⚠️ The remedy above has no trigger. "The loser renumbers before merge" is a repair that fires when a person happens to notice. Measured in an adopting repository where concurrent sessions are the default: three collisions in six days — twice the scan was run, run correctly, and lost to a number a sibling had already decided on but not yet pushed; once it was skipped outright, one scan and then the next two numbers assumed. Two of the three reached the main branch under one number, and one of those went unnoticed until a third session tripped over it. Nothing complains, because a duplicate does not break anything: it makes every blocked-by: path, every links: entry and every bare "task NNN" in prose resolve to whichever of the two files the reader happens to open.

If the project runs automated checks on proposed changes, add one that fails when a number is used by more than one task file. It is a few lines — collect the numbers, report any used twice — and it moves the failure from "a person noticed" to "the build said no." Two details decide whether it works:

  • Compare across every lane, not within one. The commonest collision is two sessions taking the same number and one of them moving to a different lane. A per-lane check is blind to it.
  • Decide what the check reads. One that reads only its own working tree sees a duplicate once both files sit on the same branch. One that also unions the other refs — the same for-each-ref refs/heads refs/remotes as the scan above — sees a half that is merely pushed.

⚠️ Then bound the result honestly, because the natural over-reading is wrong. A tree-local check does not make both halves unable to land. Two reviews open at once are two unmerged branches: each passes against a tree the other's file was never in, and unless the project also requires a branch to be current before merging, the second one's stale pass is accepted and lands on a main branch its check never saw. What the check reliably buys is a trigger — if it also runs on the main branch, the collision reddens a build by itself within minutes instead of waiting for a person. That is the property worth having, and it is not the same as prevention.

So the scan stays what you run when creating a task; the check is the backstop for when it lost, or was never run at all. This skill ships neither — whether a project runs automated checks, and what they read, is the project's business. A project with no check at all is relying on the loser noticing.


Commit (closes every transition)

Every status move and every new task file is committed in the same session the change happens. Provenance — why this task moved, why this task exists — lives in conversation context until it's in git history. If the session ends before the commit, that reasoning is lost.

Git is assumed throughout this skill — history is what makes the provenance claim true. A remote is not: a local commit satisfies provenance completely, and a repository tracked only on a filesystem is an ordinary way to use this skill, not a degraded one.

The atomic unit is "what would I want to revert in one move."

  • Status moves (one or two files): commit immediately after the lifecycle ops land. Use the commit-push skill.
  • Singleton task creation (a one-off task drafted with its own rationale, e.g. a single new spec): commit immediately, like a move.
  • Bulk creation (generating many cross-referencing task files at once): commit per coherent batch — one commit per group whose members reference each other and don't independently revert. Per-file commits in this case are ceremony without provenance benefit and drown the signal at bisect time.

git mv is preferred for moves of tracked files. If the file is untracked (just created this session), a plain mv + commit is equivalent — the commit captures the destination path.

Push, when a remote exists

Sharing and backup are what a remote adds — a bonus, not a dependency. If git remote prints anything, push in the same session as the commit, at the same cadence: status moves and singleton creations push immediately after their commit; bulk creation pushes when the batch is internally consistent (every internal cross-reference resolves). If git remote prints nothing, the commit is the whole step — there is nothing to push to, and no part of this skill should exit non-zero because of that.

Projections of tasks/ are refreshed on demand — not as part of the move

A directory-as-tracker attracts generated views: a board, an index, a status roll-up, a diagram. Each one goes stale the moment a task is added, moved, or has its frontmatter edited. That is accepted. Do not regenerate a view as part of a status move, and do not treat a stale one as an incomplete move. Refresh it when someone wants to read it, using whatever command the project documents.

This obligation used to run the other way — regenerate in the same commit, so the tracker and its view could never disagree at any commit. That argument was reasoned about one session moving one task, and it does not survive concurrency. A view is a single file that every lane change rewrites, so where parallel sessions are normal it becomes the most contended file in the tree, and the conflict it produces is pure ceremony: the file is derived, and nobody has ever needed to hand-merge two renderings of the same directory. Cheap to run was never the problem — running it costs a fraction of a second. The cost is the collision, and one merged change can make every sibling change touching the view pay a re-merge, a regenerate, and a fresh round of automated checks.

⚠️ If the project fails a build on a stale view, the two halves are coupled. A staleness check that runs on every proposed change will fail every task move once this rule is gone, and the fix is to hand-run the generator anyway — the same work, now discovered as a failed build instead of prompted. That combination is worse than either alternative. A project that wants the freshness guarantee should keep regenerating as part of the move; a project optimising for low churn should drop the check. Follow whichever the project has chosen; don't add a gate on its behalf.

If the project has no generated view, this is a no-op — don't invent one.


Reverse-dependency sweep (on → done only)

When a task closes, other tasks may have been waiting on it. Find them and update.

# Replace NNN with the closing task's number prefix, or use the slug
grep -rl "blocked-by:" tasks/ | xargs grep -l "NNN-slug"

For each hit:

  1. Update the path — don't delete the entry. The reference probably points to the old location (e.g. tasks/wip/NNN-slug.md). Rewrite it to the new path (tasks/done/NNN-slug.md). Deleting the line instead is the tempting shortcut and it is wrong twice over: it destroys the record of what this task was waiting on, and it leaves a task in blocked/ whose blocked-by: is empty — blocked by nothing, which nothing will ever surface. Rewrite; never clear.
  2. Check if this was the last blocker. Read the dependent's blocked-by: field. If every entry now points into done/, the dependent is no longer blocked and must not be left sitting in blocked/ (invariant 6) — surface it per step 3.
  3. Surface, don't auto-move. List the now-unblocked tasks back to the user with a recommendation:

    Task 005 was blocked only by 016 (just closed). Recommend moving to prioritized/. Confirm?

    The user decides whether the dependent goes to prioritized/, wip/, or stays put. Auto-moving risks promoting work the user hasn't re-triaged.


When blocked-by: paths drift

Task paths change every time the blocker transitions. Two ways to handle:

  • At sweep time (preferred): when sweeping for → done, also rewrite stale paths in any matched task.
  • Defensively: if you notice a blocked-by: pointing to a path that doesn't exist, find the file by slug and rewrite.

Don't leave stale paths — they break the dependency graph silently.


Phase-tipping tasks

Some projects keep a document that tracks what phase the project is in — requirements locked, architecture decided, first end-to-end slice in production, launch criterion met. If yours does, it is the doc most likely to go quietly stale, because nothing fails when it does.

On every → done transition, explicitly evaluate whether this closure moves the project across a phase boundary. Do this every time, as part of the same completion step — not as a separate judgment call you might skip. Most task closures are routine and the answer is no; a phase doc tracks boundaries, not throughput. But the check itself is not optional, because a missed phase tip compounds silently until someone notices the doc is wrong.

If the answer is yes:

  • Update the phase doc — status, any "you are here" marker, any summary table.
  • Check for a companion rendered visual (SVG, diagram, image) alongside it. If one exists, regenerate it in the same pass, not as an optional afterthought. A stale visual next to a freshly-updated source doc is worse than no visual at all: it silently contradicts the doc it summarizes, and nobody re-checks a rendered image against its source once it exists.

If you discover the phase doc (or its visual) is already stale from a tip that happened in a prior session — even though the task you're closing right now isn't itself the trigger — fix it now rather than deferring further. Staleness compounds; the moment you notice is the cheapest moment to fix it.

If your project has no such document, this section is a no-op. Don't invent one to satisfy it.


What this skill does NOT do

  • Doesn't decide what to work on. Prioritization is a judgment call; this skill executes transitions.
  • Doesn't write task content. "Done when" updates reflect work the user/Claude already did.
  • Doesn't auto-promote unblocked tasks. It surfaces them; the user triages.
  • Doesn't write the commit message. It mandates the commit — and the push, where a remote exists (see above) — but defers message authorship to the commit-push skill.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.