agentleFS
zauberzeugzauberzeug/game-of-cards/.claude/skills/pull-card/SKILL.md

pull-card

Skill7 starsChanged 6 months agoMITView on GitHub

Pull the highest-leverage `human_gate: none` open card off the queue, claim it, work it, close it, commit. AUTO-INVOKE when the user says \"drain the queue\", \"pull a card\", \"let the agents work\", \"autonomous mode\", \"make progress\", or when invoked via /loop or /schedule.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    If any ! block below shows goc: command not found, Permission for this action has been denied, or no such file or directory: …

    line 12
  2. Distinctive:

    Check for already-claimed work first:

    line 32
  3. Distinctive:

    Treat any listed active card as a soft lock.

    line 36
  4. Very specific:

    When M >> N (≥3× higher value), the autonomous puller is about to work a small card while a much higher-value card sits parked behind a …

    line 53
  5. Distinctive:

    Read the body, the DoD, and any referenced files.

    line 65
  6. Distinctive:

    When a finding does not clear the bar — it needs a decision, fans out across the codebase, is a meta-fix family, or sits far from your …

    line 106
  7. Very specific:

    Queue empty: No ready cards. Invoke Skill(audit-deck) to file one new card from emergent codebase observations.

    line 120
  8. Distinctive:

    BEFORE raising the gate. The body reveals the card needs a judgement call (mechanism choice, convention, default value, scope reframing, …

    line 128
  9. Distinctive:

    If the consuming repo defined a consultation skill or rubric in the hook above, follow it.

    line 135
  10. Very specific:

    If no hook is defined, OR the consultation is ambiguous, OR the question is non-substantive in nature (resource allocation, scope split, …

    line 142
  11. Distinctive:

    Don't narrate context — no "round N", no "via /loop", no "picked because contribution:high".

    line 185

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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

Preflight

If any ! block below shows goc: command not found, Permission for this action has been denied, or no such file or directory: .game-of-cards/deck/, stop and invoke Skill(kickoff) first. Kickoff finds the missing setup step (CLI not installed, deck not scaffolded); a denied goc call goes to Skill(claude-kickoff) on Claude Code. Re-invoke this skill only after kickoff completes.

Pull a card

Kanban's foundational principle (Anderson) is pull-based work intake: a worker takes the next item when capacity exists, rather than having work pushed at them. This skill is the autonomous worker — it pulls one card off the queue, works it end-to-end, commits.

The pull principle is what makes autonomous operation safe. Work isn't shoved at agents on a timer; agents pull on their own terms, filtered through the ready-to-pull predicate (status: open, human_gate: none, no active waiting_on impediment). The human steers by curating WHAT'S in the queue and at what gate; an explicit impediment overlay (waiting_on / waiting_until) hides hard waits automatically — advances edges are advisory and do NOT hide a card from the queue.

What to do

Check for already-claimed work first:

!b=.claude/skills/_goc-bootstrap.sh; if [ -f $b ]; then sh $b --status active -v; else goc --status active -v; fi 2>&1 | head -20

Treat any listed active card as a soft lock. Do not claim the same card, or adjacent/conflicting work, unless the user explicitly asks to continue that active card.

Pick the highest-contribution ready card (--ready filters to status: open ∧ human_gate: none ∧ no active waiting_on overlay — dependency-readiness is advisory display only, an advances prereq that is still open shows up as "awaiting" but does NOT hide the card from the queue):

!b=.claude/skills/_goc-bootstrap.sh; if [ -f $b ]; then sh $b --ready -v; else goc --ready -v; fi 2>&1 | head -22

The last line of goc --ready is a leverage comparison: Pulling <title> (value N). Highest gated card: <title> (value M, gate <kind>). The gated card is drawn from the same scope as the pick (--worker / GOC_WORKER, --tag, and the other query filters). It is the card this queue would pull if a human lowered its gate. When M >> N (≥3× higher value), the autonomous puller is about to work a small card while a much higher-value card sits parked behind a human gate — that's a signal to ping the human to lower the gate (decide-card for decision, the human's session for session) before draining low-value queue items. When the leverage is close, just pull. The line is omitted when no gated card exists in that scope or the queue is empty.

Then:

  1. Skill(advance-card) <title> active to claim. (The status flip is the soft lock against parallel sessions.)
  2. Read the body, the DoD, and any referenced files.
  3. Implement.
  4. Skill(finish-card) <title> to close (DoD-gated), then commit the work and closure.

The card body is the briefing the original filer wrote. Trust it.

Fixing what you surface (fix-through)

A pull-card session routinely surfaces new defects while working its card — a sibling bug in the same function, an adjacent one-liner, a missing guard — or finds one when the queue is empty. The reflex inherited from Skill(audit-deck) is "flag, don't fix": file a card and leave it. But that reflex is audit's, not the worker's. A session that already has the relevant code loaded and the diagnosis done is the cheapest place to land a small fix; deferring it to a separate fresh-context run that must rediscover, reload, and re-diagnose is pure overhead.

So fix it through — file the card, then claim → implement → close it in the same session — when all of these hold:

  • Gate-free. It would file at human_gate: none: the fix is determined, with no decision or taste call between credible alternatives.
  • Small and single-site. The fix is mechanically clear and bounded — rule of thumb, ~one source file plus its regression test. If it fans out across modules, it is not fix-through.
  • Not a meta-fix. It is not the Nth instance of a root-cause shape that should become one architectural card (the audit-deck sibling-sweep rule). Four instances of one shape is a deliberate decision — file it, don't inline it.
  • Close to loaded context. It lives in code this session already has in focus. A defect spotted in a far-off module is fixed better by a fresh run with that module loaded — file it and move on.

Always file the card (Skill(create-card)), even when you fix it seconds later. The card is the record axis, and its DoD carries the TDD contract — the regression test that proves the fix. Fix-through removes the wasted second run, not the card. Each fix-through finding is its own card and its own commit, kept separate from the card you pulled.

When a finding does not clear the bar — it needs a decision, fans out across the codebase, is a meta-fix family, or sits far from your loaded context — file it and leave it in the queue. The fresh-context separation earns its cost there.

Fix-through is not "drain the queue." Close the card you pulled plus at most the small defect(s) it entangled, then exit. One pull per run, with fresh context as the default, stays the operating rhythm (/loop and the cloud pull-card workflow re-trigger for the next card) — fix-through just stops you from leaving a small, ready fix on the floor for a second run to trip over.

When to stop without finishing

  • Queue empty. No ready cards. Invoke Skill(audit-deck) to file one new card from emergent codebase observations. If that finding is fix-through-eligible (see "Fixing what you surface" above), work it to close in this same session instead of exiting. Otherwise — a decision-class, cross-cutting, or meta-fix finding — file it and exit; the next invocation can work it.
  • Decision-class question — try the project-specific consultation BEFORE raising the gate. The body reveals the card needs a judgement call (mechanism choice, convention, default value, scope reframing, lit-anchored default). The Andon cord is lazy: agents try the project-local consultation first, then pull.

    !cat .game-of-cards/hooks/pull-card.md 2>/dev/null || true

    1. If the consuming repo defined a consultation skill or rubric in the hook above, follow it. If it answers confidently: record the resulting decision via Skill(decide-card) <title> --decision "<choice>" --because "<consultation-name>: <one-line>" (the --because should cite whatever rubric the hook prescribes). Then continue working the card from the decision: implement, close, commit.
    2. If no hook is defined, OR the consultation is ambiguous, OR the question is non-substantive in nature (resource allocation, scope split, deadline, multi-stakeholder alignment, taste call, missing primary evidence): raise the gate to decision or session, write a ## Decision required body section, commit the gate-and-body update. The human will see the parked card.

    This keeps the human out of the loop when project-specific reasoning is decisive. The cord still gets pulled — just not for questions the project's own rubric already answers.

  • Fix fails verification. Revert the work, append ## Disproved fix attempt YYYY-MM-DD to log.md, leave the card open with new evidence.
  • Pre-commit refuses + research-impacting issue. Pause for the human.

What to report

Whatever happened, in one line of plain fact:

closed <title>: <one-line what-changed>

or

parked <title>: gate raised to <decision|session> — <reason>

or

queue empty; filed <new-title>

or, when you fixed through a finding you surfaced:

closed <pulled-title>; fixed-through <surfaced-title>: <one-line>

Don't narrate context — no "round N", no "via /loop", no "picked because contribution:high". The commit message and closure log already say what happened. The report is the index, not the story.

Pairs naturally with

  • /loop 30m /pull-card — drains the queue while the user works in another session.
  • /schedule pull-card weekday 09:00 — opens the day with one card closed.
  • /schedule audit-deck weekly — keeps the queue fed; the pull-principle requires something to pull.
  • /schedule refine-deck monthly — hygiene pass.

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.