worktree-policy

worktree-policy is an agent for Claude Code from moabualruz/fulcrum. It costs 0 tokens per session (383 once invoked), scanned A, original, MIT.

A set of rules for doing feature work in separate Git worktrees, which are additional working folders connected to one repository. It also defines how to verify, commit, merge, and recover failed work.

In plain words
What is it for?
Use it to run PRD-based work in dedicated worktrees, follow required type and lint checks, record blocked work, commit completed slices, and fast-forward merge them into dev/v1.0.
Why use it?
It keeps generated changes isolated and makes failed checks available for inspection. This helps ensure only verified work is merged into the designated development branch.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fulcrum plugin — 32 skills, 5 agents shipped together

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/moabualruz/fulcrum/worktree-policy
Clone the repo
git clone --depth 1 https://github.com/moabualruz/fulcrum

Made for: Claude Code.

Or install fulcrum, the plugin that ships this one along with the rest of its 32 skills, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for worktree-policy

README.md
[![agentmods](https://agentmods.dev/badge/agents/moabualruz/fulcrum/worktree-policy.svg)](https://agentmods.dev/agents/moabualruz/fulcrum/worktree-policy)
Your own site
<a href="https://agentmods.dev/agents/moabualruz/fulcrum/worktree-policy"><img src="https://agentmods.dev/badge/agents/moabualruz/fulcrum/worktree-policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 383 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.1 $0.00000 $0.00383
Opus 5 $0.00000 $0.00192
Sonnet 5 $0.00000 $0.00077
Haiku 4.5 $0.00000 $0.00038

Measured 5d ago against content hash 0f3f387a94b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

worktree-policy 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 5d 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.

docs/agents/worktree-policy.md · 33 lines

What it actually says

Worktree Policy

Every PRD-driven adoption slice runs in its own git worktree. The policy keeps generated work isolated, makes failed verification inspectable, and keeps dev/v1.0 as the only merge target.

Lifecycle

  1. Select one eligible PRD from the local PRD glossary (kept locally, not tracked).
  2. Create .claude/worktrees/<id>/ from dev/v1.0 on branch feat/prd-<id>.
  3. Implement only the PRD's assigned paths unless verification exposes a directly related prerequisite.
  4. Run every command in the PRD's verify list.
  5. Run bun run typecheck and bun run lint.
  6. Commit the slice in the PRD worktree when all gates exit 0.
  7. Fast-forward merge feat/prd-<id> into dev/v1.0.
  8. Prune .claude/worktrees/<id>/.

Verify-Fail Recovery

If any verify command fails, stop the slice before merge.

  • Leave .claude/worktrees/<id>/ intact for inspection.
  • Update the PRD entry with status: "blocked", blocked_reason, and blocked_at.
  • Append a BLOCKED:<id> line to the adoption progress log.
  • Do not flip passes to true.
  • Do not prune the worktree until a later pass resolves the blocker.

Merge Rules

  • Use fast-forward merges only.
  • Never merge a dirty worktree.
  • Never force-push or reset shared branches to recover a PRD slice.
  • If dev/v1.0 moved, rebase the PRD branch inside its worktree, rerun all gates, then merge.
  • Keep one commit per PRD unless a separate prerequisite fix is required and verified independently.
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. 5d ago First seen · 33 lines · 0 tokens per session scan A 0f3f387a94b3

Subscribe to this mod's changes

worktree-policy is an agent published in the GitHub repository moabualruz/fulcrum (3 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 383 tokens. 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.

Related

Other agents, from other repositories

rondoflow-reviewer

Reviews a RondoFlow code change against this project's specific conventions and security rules (childprocess spawn safety, the { success, error } API envelope, per-user ownership/IDOR, Zod boundary validation, immutability, i18n parity, file/function size limits, Claude-auth handling). Use after writing or before…

rondoflow/rondoflow · 112 tokens

rondoflow-i18n-translator

Translates RondoFlow UI strings into Slovak (sk) and Spanish (es) and writes them into the locale catalogs, keeping key/interpolation parity with English so the catalog test passes. Use when English keys were added or changed and the sk/es catalogs need to be filled in, or when asked to translate/localize UI strings.…

rondoflow/rondoflow · 91 tokens

board-opus

Design-taste and architecture executor on the delivery board (opus tier). Use for first-impression UI flagships (login, first-run, Studio), contract authoring/splitting at plan checkpoints, cross-workstream tradeoffs, and unblocking tasks lower tiers failed twice.

binary16labs/prime-silo · 59 tokens

board-sonnet

Standard delivery-board contract executor (sonnet tier). Use for well-specified implementation contracts — layout/CSS work, API endpoints, SSE bindings, test suites, gate scripts written from a spec.

binary16labs/prime-silo · 43 tokens

board-verifier

Independent verifier for delivery-board tasks (haiku tier, fresh context). Use to verify a task in VERIFY — re-runs the gate from a clean checkout, audits the diff against the allowlist, and is the ONLY role allowed to move VERIFY → DONE.

binary16labs/prime-silo · 56 tokens

board-haiku

Mechanical delivery-board executor (haiku tier). Use for grep-and-replace passes, running gates, board/LOG hygiene, and other single-surface contracts with zero design judgment. Also see board-verifier for verification work.

binary16labs/prime-silo · 49 tokens