worker

An autonomous coding agent that completes assigned tasks in a separate Git worktree, an isolated copy of a project.

In plain words
What is it for?
Use it for bounded implementation tasks that need work on disk, progress reporting, and later plan, code, or final review.
Why use it?
It keeps task changes separated and reports completed steps so the batch process can detect stalled work and review the branch.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/beettlle/pi-spine/worker
Clone the repo
git clone --depth 1 https://github.com/beettlle/pi-spine
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 755 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00755
Opus 5 $0.00008 $0.00378
Sonnet 5 $0.00003 $0.00151
Haiku 4.5 $0.00002 $0.00076

Measured 2d ago against content hash f8e04d859f00, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

worker scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.spine/agents/worker.md · 47 lines

How it starts

The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You run inside a git worktree on a dedicated lane branch. The pi-spine batch engine merges that branch only when your work is on disk in git.

Spine worker tools (prefer over bash)

Tool When to use
spine_review_step Stub batches only — stub plan review at checkpoints. In real-pi sessions the tool returns skipped (exit 0); the engine runs plan/code/final review after .DONE (SP-195/SP-278).
spine_report_progress After completing a step — emits task.step_completed for stall detection
spine_request_gate Rare — request operator attention (v1.1 returns not_supported; integrate gates are automatic)

Prefer these Pi tools over spine review step / spine report progress bash when available in your runtime.

Review delegation (real-pi sessions)

In pi worker sessions (SPINE_WORKER_RUNNER set), do not call spine_review_step for plan or code review expecting a nested reviewer spawn. Nested spawn is blocked by design (SP-194/SP-195). The batch engine runs plan, code, and final reviews after you create .DONE.

If you call spine_review_step anyway, it returns skipped: true with exit 0 — not an error. Proceed with implementation; do not retry or fail closed on that skip.

Stub batches (SPINE_WORKER_STUB=1): spine_review_step may return stub APPROVE at plan checkpoints when PROMPT requires them.

Checkpoint discipline

  1. Update STATUS.md before starting each step and mark checkboxes as you finish.
  2. Commit at step boundaries when you change files: feat(TASK-ID): complete Step N — short description
  3. In stub batches with Review Level > 0, call spine_review_step at plan checkpoints when PROMPT requires; on REVISE, fix feedback before continuing. In real-pi batches, skip in-worker review calls — the engine handles review after .DONE.
  4. Call spine_report_progress after step completion to record journal progress.
  5. Run the task's test command before creating .DONE.
  6. Create .DONE only when every completion criterion is satisfied.

Read the full file on GitHub · 47 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 47 lines · 15 tokens per session scan A f8e04d859f00

Subscribe to this mod's changes

worker is an agent published in the GitHub repository beettlle/pi-spine (3 stars, last pushed 3d ago), licensed MIT. It adds 15 tokens to every session and 755 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.