Playbooks
A field guide to the playbooks
A playbook is a short procedure loaded only when its stage comes up: a flaky test, a migration, a release. Each one names when to use it and the steps that prove the work.
Using and learning them
- Load one.
fm playbooks show NAMEfills in the project's facts and adds its own notes from.claude/playbooks/. - Practise.
fm playbooks kata NAMEgives held-out briefs to answer;--answer FILEscores yours. - Score a run.
fm playbooks score NAME --task IDshows which steps a finished task followed. - Learn from a change.
fm playbooks lesson RANGEis a five-minute read of a diff: what changed, where, what its tasks learned and the checklists to read it with. - Grow your own.
fm playbooks draft IDturns a finished task into a draft;mineandcounterread the repo's history for what changes together and what failed.
build8
clean5
context5
evals2
fix4
ground3
lang7
ops2
perf3
plan4
reflect2
release4
review9
security3
ui12
verify3
build
build/cpp-buildC++ Build Error Resolverbuild/csharp-buildC# build errors (dotnet, MSBuild, NuGet)- Use when `dotnet build`, `dotnet test` or `dotnet restore` fails. The goal is a green build with the smallest diff that fixes the cause. Built on the library cards `fm lib show csharp` (the baseline), `fm lib show dotnet-cli` (MSBuild, restore, solution-wide settings) and `fm lib show nuget` (package references, central versions, audit).
build/go-buildGo build errors- Use when `go build`, `go vet` or `go test` fails to compile. The goal is a green build with the smallest diff that fixes the cause: no refactors, no silenced checks. Built on the library cards `fm lib show go` (the baseline), `fm lib show go-modules` (go.mod, go.sum, toolchains), `fm lib show go-errors` (multi-value returns, wrapping) and `fm lib show go-testing` (when the failure is in a `_test.go` file).
build/jvm-buildJVM build errors (Gradle, Maven, Java, Kotlin)- Use when a Gradle or Maven build of Java or Kotlin code fails: in configuration, dependency resolution or compilation. Test failures are a different job (see `references/verify/`). The goal is a green build with the smallest diff that fixes the cause. Built on the library cards `fm lib show java`, `fm lib show kotlin`, `fm lib show gradle`, `fm lib show gradle-version-catalogs` and `fm lib show maven`.
build/rust-buildRust Build Error Resolverbuild/shell-buildShell script errors (bash -n, ShellCheck, bats)- Use when a shell script fails to parse, fails ShellCheck, dies under strict mode, or fails its bats tests. Shell has no compiler, so "the build" here is three checks: the parser (`bash -n`), the linter (`shellcheck`) and the tests (`bats`). The goal is all three green with the smallest diff. Built on the library cards `fm lib show bash` (strict mode, bats), `fm lib show shellcheck` (the SC codes, directives), `fm lib show shell-scripting` (quoting, traps, POSIX sh) and `fm lib show cli-tests` (testing a script through its real entry point).
build/swift-buildSwift build errors (SwiftPM, Xcode)- Use when `swift build`, `swift test` or `xcodebuild` fails to compile. The goal is a green build with the smallest diff that fixes the cause. Built on the library cards `fm lib show swift` (the baseline), `fm lib show swift-package-manager` (Package.swift, resolution), `fm lib show xcodebuild` (schemes, destinations, signing) and `fm lib show swift-concurrency` (Swift 6 isolation and Sendable errors).
build/typescript-buildBuild Error Resolver
clean
clean/characterisation-testsCharacterisation tests: pin behaviour before a refactor- Use when you must change code that has thin or no tests and nobody can say exactly what it does: a refactor, a port to another language or library, a performance rewrite, or a cleanup that should change nothing. The tests record what the code does today, right or wrong; they are a safety net, not a specification.
clean/code-simplifierCode Simplifier Agentclean/deprecationDeprecation: announce, shim, remove- Use when a public function, CLI flag, config key, endpoint, file format or setting is going away or changing shape, and someone outside this change may depend on it. Internal code with every caller in this repo needs no deprecation: change the callers in the same commit.
clean/refactor-cleanerRefactor & Dead Code Cleanerclean/repo-sweepWhole-repo cleanup sweep (Foreman's own, T-0364)- Use when asked to "clean up the repo / docs / code / briefs / dead code / unused or replaced functionality". A dead-code tool that finds nothing is one row of evidence, never the verdict: a sweep is done when every area has been checked by a stated method, not when a gate stays green.
context
context/context-budgetContext Budgetcontext/decks-and-reportsDecks and reports: the answer first- Use when making something people read to decide or to stay informed: a slide deck, a written report, a status update, a results write-up, a proposal. Charts inside follow `../ui/data-viz.md`; a page someone follows to do a task is `docs.md`.
context/docsDocs: task-first pages, examples that run- Use when writing or reworking documentation a person reads to get something done: a README, a guide, a how-to, a reference page, CLI help. For keeping a whole repo's doc set owned and fresh over time, use `living-docs.md`.
context/living-docsLiving Docs Governancecontext/strategic-compactStrategic Compact Skill
evals
evals/eval-harnessEval Harness Skillevals/loop-design-checkLoop Design + Review
fix
fix/flaky-testsFlaky tests- Use when a test passes and fails without a code change.
fix/migrationSchema and data migrations- Use when a change alters a live database: a new, renamed or dropped column or table, a type change, a new constraint or index, or a backfill. The rule underneath: old code and new code both run against the schema during a deploy, so every step must work with both.
fix/sqlSQL: query review, indexes and plans- Use when a query is slow, a page times out on the database, a new query or index goes into review, or an ORM call might be issuing more SQL than it looks. Schema changes belong in `migration.md`.
fix/text-time-bytesText, time, bytes and money: encodings, time zones, amounts- Use when code reads or writes text from outside (files, HTTP, a database, a terminal), stores or compares timestamps, schedules anything by the calendar, or handles prices, totals, tax or currency. Bugs here pass every test written in one locale, one time zone and round numbers.
ground
ground/code-architectCode Architect Agentground/code-explorerCode Explorer Agentground/search-first/search-first — Research Before You Code
lang
lang/cpp-coding-standardsC++ Coding Standards (C++ Core Guidelines)lang/cpp-testingC++ Testing (Agent Skill)lang/python-patternsPython Development Patternslang/python-testingPython Testing Patternslang/rust-patternsRust Development Patternslang/rust-testingRust Testing Patternslang/stdlib-pythonPython: the standard library first- Use when you are about to add a Python dependency, write a helper, or review code that rebuilds something the standard library already has. Every dependency is code you didn't read, a version to keep current and a supply-chain risk; the standard library ships with the interpreter and is already reviewed.
ops
ops/incidentIncident: stop the harm, then learn- Use when something people depend on is broken or wrong right now, or about to be: an outage, errors or slowness users can see, wrong data being written, a security event in progress. A bug that hurts nobody yet is an ordinary FIX (the intake skill's `references/debugging.md`). In Foreman, capture it with the urgent tag (`FIX!:`) so the current task is checkpointed and the incident takes the focus.
ops/observabilityObservability: signals worth having- Use when adding a service, endpoint, job or queue; when an incident timeline had a gap ("we couldn't tell when it started"); or when someone asks to "add logging". Every signal costs money and attention, so each one must answer a question someone will ask during an incident (`incident.md`).
perf
perf/benchmark-loopBenchmark Optimization Loopperf/latency-criticalLatency Critical Systemsperf/profilingProfiling- Use when you know something is slow but not where (pair with benchmark-loop.md for the before/after).
plan
plan/api-designAPI design- Use when adding or changing a public interface: a CLI, HTTP/RPC endpoint, library function, config format or file format.
plan/decision-memoDecision memo: options, choice, why, revisit- Use when a choice is costly to reverse, someone else has to approve it, or the same question keeps coming back: picking a library, a data store, an approach for an M or L task, a vendor, a policy. A memo is short and made before the work; for a lasting architecture choice, also write an ADR (`../reflect/architecture-decision-records.md`).
plan/intent-driven-developmentIntent-Driven Developmentplan/plannerImplementation Plan: [Feature Name]
reflect
reflect/agent-introspectionAgent Introspection Debuggingreflect/architecture-decision-recordsArchitecture Decision Records
release
release/demo-productionDemo production: scripted, seeded, short- Use when making a product demo: a release video, a GIF for a README or pull request, a terminal recording, or a live walkthrough. A demo is a claim about the product, so it is held to the same evidence rule as the code: it shows only what the shipped build really does.
release/dependency-admissionDependency admission: before adding one- Use when you are about to add any new package, library, plugin, action, container base image or vendored file to a project, including a dev-only or transitive one you pull in on purpose. Upgrading one already admitted is `dependency-upgrade.md`.
release/dependency-upgradeDependency upgrade- Use when bumping a library, toolchain or runtime.
release/release-and-changelogRelease and changelog- Use when cutting a version, tagging, or publishing.
review
review/code-reviewercode-reviewerreview/cppcppreview/pythonpythonreview/rustrustreview/securitySecurity Reviewerreview/silent-failuresSilent Failure Hunter Agentreview/test-coveragePR Test Analyzer Agentreview/type-designType Design Analyzer Agentreview/typescripttypescript
security
security/bounty-triageSecurity Bounty Huntersecurity/cloud-infrastructureCloud & Infrastructure Security Skillsecurity/security-reviewSecurity Review Skill
ui
ui/compositionComposition, depth and states- Use when a web or app screen gets its layout: where things sit, what is in front of what, how a landing page runs from top to bottom, and what every screen looks like when the data is missing, slow, broken or too long. For terminals see `terminal-ui.md`.
ui/data-vizData viz: one claim, one axis, colour by job- Use when a screen, report or doc shows numbers as a chart, a sparkline or a big number. It builds on `type-and-colour.md` (palette roles, reserved status colours, contrast) and `motion.md` (tokens, reduced motion); those rules hold here unchanged.
ui/design-directionDesign direction before pixelsui/game-feelGame feel: juice with intensity caps- Use when a game or a playful interface needs to feel responsive and physical: hits that land, jumps that pop, buttons that squish, rewards that burst. Applies to Phaser, Pygame, Godot, LÖVE, Unity and canvas or DOM games alike; the engine APIs live in the cards at the end.
ui/interactionInteraction: feedback, keyboard, forms, words and the phone- Use when a web or app screen gets something to do: a form, a button that saves or sends, a menu, a list you act on, a sign-up, a checkout, a settings page. The sibling playbooks decide how a screen looks; this one decides how it behaves in the hand. Most UI that looks finished fails here first: the button that gives no sign it was pressed, the error that says "Invalid", the field hidden behind the phone's keyboard, the menu a keyboard can't leave.
ui/motionMotion: choreography, timing and reduced motion- Use when adding or reworking animation in a web or app UI: transitions, enter and exit, loading, list changes, page changes. For terminals see `terminal-ui.md`; for library code see the cards at the end.
ui/scene-3d3D on the web: a designed scene that never breaks the page- Use when a page gets a WebGL scene: a hero object, a product viewer, a data sculpture, an ambient background. Applies to three.js, React Three Fiber and raw WebGL alike. The API lives in the cards (`fm lib show three-js`, `fm lib show react-three-fiber`, `fm lib show postprocessing`, `fm lib show webgl`, `fm lib show glsl`, `fm lib show shader-performance`); this playbook holds the decisions, the numbers and the failure handling.
ui/scrollytellingScrollytelling: steps the reader controls- Use when a story or explainer changes a sticky graphic (a chart, a map, a diagram) as the reader scrolls through text steps. It builds on `motion.md` (tokens, reduced motion as its own path) and `data-viz.md` (the graphic's claim, colour and table view); their rules hold here unchanged.
ui/sound-designSound design: off by default, earcons, volume caps- Use when a web or app UI plays sound: notification chimes, confirmations, alerts, timers, ambient beds. Games and playful UI start from `game-feel.md`, whose sound caps this file shares; the two never disagree.
ui/terminal-uiTerminal and mod UI- Use when building or reworking UI inside a terminal app or a Claude Code mod (panes, bands, status lines, tool rows), or a command-line tool's own output. Each rule below can be marked pass or fail by a reviewer. Foreman's own worked examples: `fmcodeterm.py` (the terminal: keys, paste, resize, colour depth, the session) and `fmcodetui.py` (the app drawn on it: `width`, `fit`, `render`).
ui/type-and-colourType and colour that read as chosen- Use when a web or app screen gets its type and colour: a new product, a restyle, a dark mode, or "the text looks off". `design-direction.md` picks the stance (the family class, the scale ratio, the ink); this playbook turns that stance into a scale, a pairing, a palette and the proof that they hold. For terminals see `terminal-ui.md`.
ui/visual-qaVisual QA: screenshots, an eyeball pass and a receipt- Use when a task changes what a web screen looks like: a new view, a restyle, a dark mode, a layout fix, a motion change. Green tests say the code does what the tests ask; only a frame says the screen looks right. This playbook proves a UI change by looking at it: `fm smoke` for the defects a crawler can name, the start page's frames and hostile profiles, a small frame script for the other views and fixtures, a checklist for the eye, and a receipt in the task's evidence.
verify
verify/tdd-guideRequired: 80%+ branches, functions, lines, statementsverify/tdd-workflowTest-Driven Development Workflowverify/verification-loopVerification Loop Skill