agentleFS
leekleek/agent-skills/skills/scratch-status/SKILL.md

scratch-status

Skill5 starsChanged 10 days agoMITView on GitHub

Report what is still open across .scratch/ and the next skill to run for each effort. Read-only.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    done: every file's status is closed or the wontfix role string, every cited commit is on default_branch, and nothing contradicts (mismatch …

    line 31
  2. Very specific:

    After the last block, one line naming any path in unreadable_efforts, then a one-line total from counts: <open> open, <stale> stale, …

    line 94

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Scratch Status

A quick answer to "what's left to do in .scratch/", with nothing written or removed. For the full sweep (filing research, removing done efforts, judging contradictions), that is scratch-cleanup; this skill only ever reports.

$ARGUMENTS is an effort slug to scope to .scratch/<slug>/ alone; empty means every effort.

In Claude Code with the leek-skills plugin, /scratch [slug] shows the effort board live in a pane without a turn; point the user at it for a quick look. You cannot read that board, so always run the steps below: they add the commit-ancestry checks and the per-artifact report the board lacks.

1. Scan .scratch/

From inside the repository, run scripts/scratch-state.sh $ARGUMENTS once.

The script walks .scratch/ (or .scratch/<slug>/ when scoped), reads .agents/triage-labels.md (fallback docs/agents/triage-labels.md) when present, parses frontmatter and legacy Status: lines across maps, specs, decisions/, tickets/ (or legacy issues/), and triage request files, checks every cited commit SHA against default_branch (git merge-base --is-ancestor, merged PRs via gh api, git cherry, and commit subject match), and emits one JSON object ranking efforts most urgent first:

  • done: every file's status is closed or the wontfix role string, every cited commit is on default_branch, and nothing contradicts (mismatch is null).
  • mismatched: fails the contradiction check (spec still ready-for-agent while every ticket is closed, map still open while spec.md exists, a closed ticket whose cited commit is missing from default_branch, or a file with no readable status).
  • open: has any open file, with stale: true when its newest file is older than 30 days.

These rules are the source of truth; the /scratch board's hooks/mods/scratch-scan.ts must change with them, so a drift shows as the board and this report disagreeing.

Done when scripts/scratch-state.sh has returned the JSON state for every effort in scope.

2. Report

One block per effort in efforts, in the order the script returned them (unblocked open work, then blocked open work, then stale, then mismatched, then done). A done effort collapses to one line: `.scratch/<slug>/` — done, last change <last_change>. Next: `/scratch-cleanup`. Every other effort gets the full block:

### `.scratch/<slug>/`: <open | ⚠️ mismatched> · last change <date><, ⚠️ stale>

**Map**: <title>, <status>. Destination: <one line>.
**Spec**: <title>, <status>. <problem, one line>. <n> open questions.

**Decisions**: <n> open of <n>
| # | Decision | Status | Resolution or blocker |
|---|---|---|---|
| 01 | <title> | closed | <resolution, one line> |
| 02 | <title> | blocked | by 01 |

**Tickets**: <n> open of <n>
| # | Ticket | Status | Detail |
|---|---|---|---|
| 01 | <title> | ready | |
| 02 | <title> | blocked | by 01 |
| 03 | <title> | in progress | claimed by <claimant> |
| 04 | <title> | closed | <short SHA>, on <default-branch> |

**Next**: `<command>`: <why, one line>.
<Also: up to two alternatives, one line each, only when they exist.>

Section rules:

  • An absent artifact gets one line, so its absence is visible: **Map**: none., **Spec**: none., **Decisions**: none., **Tickets**: none. Older efforts' issues/ folder reports as Tickets; a loose triage request file in requests gets its own line, **Request** <file>: <title>, <status>.
  • List every decision and ticket, closed ones too, in number order.
  • Status uses derived_status (closed, in progress, blocked, ready, or unreadable, which you print as ⚠️ unreadable; when wontfix is true, say wontfix in Detail).
  • Detail for a ticket: open_blockers (by 01, 03), claimed_by, or for a closed ticket its cited commits (<sha>, on <default_branch> or ⚠️ <sha> missing). Empty when there is nothing to say. A decision's last column is its resolution once closed, its open_blockers or claimed_by while open.
  • Mark nothing else with ⚠️: only stale, mismatched, unreadable, and missing commits.
  • Next uses next and next_why; when mismatched, next is the contradiction, printed as ⚠️ <mismatch>; Also prints the entries in also when non-empty.

After the last block, one line naming any path in unreadable_efforts, then a one-line total from counts: <open> open, <stale> stale, <mismatched> mismatched, <done> done. Stop there: no plan, no questions, no approval prompt.

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.