Skip to content
GitHub

Team configuration examples

Open

Copy a complete .shepherd/config.yml for review-only adoption, local fixes with an escalation boundary, or an organisation pack that each repository extends.

These are complete .shepherd/config.yml examples for common team setups. Choose a fix mode first, then add the checks and reviewers your repository needs. Replace the paths and commands with your own before you merge one. For what each key does, see the configuration reference.

Start here if you want findings before you let Shepherd change code:

fixes:
mode: suggest
checks:
unit:
command: bun test
types:
command: bun run typecheck
recipes:
review:
steps: [swarm]

1. Check the policy

Run shepherd config validate and shepherd preview --working-tree --recipe review. The preview lists review steps and no code edits. If your project uses another stack, replace the Bun checks first.

2. Merge and run it

Merge .shepherd/config.yml, then run /shepherd 42 in your agent.

Fix locally inside a team decision boundary

Section titled “Fix locally inside a team decision boundary”

Use this setup to let Shepherd fix code in your working tree while a maintainer keeps schema and public API changes:

fixes:
mode: local
checks:
unit:
command: bun test
escalate:
paths: ['migrations/**', 'src/public-api/**']
reason: A maintainer decides schema and public API changes.
recipes:
fix:
steps: [swarm, triage, simplify, swarm]

Shepherd leaves its fixes in the working tree and reviews again after the last fix. Inspect and commit those changes yourself. Shepherd defers fixes that touch the escalation paths.

An organisation pack lets one policy repository set lenses and checks for many repositories.

1. Commit the pack

In your organisation’s policy repository, commit a pack such as:

fixes:
mode: push
lenses:
payments:
skill: lenses/payments
applies_to: ['src/payments/**']
checks:
unit:
command: bun test

Add lenses/payments/SKILL.md in that policy repository, using the lens format.

2. Extend it from each repository

In a consuming repository:

extends:
- github:acme/policy/shepherd.yml@0123456789abcdef0123456789abcdef01234567
fixes:
mode: suggest
checks:
unit:
command: pnpm test

Replace the example SHA with a commit on the policy repository’s default branch, and give gh access to that repository. The consumer keeps the payments lens, replaces the unit command and selects review-only mode.

Remote resolution needs the real pack and credentials. The docs checker validates syntax and recipe contracts without fetching placeholder repositories.

3. Check each value’s source

Inspect shepherd config explain --working-tree to see where each value came from. Merge once the preview matches the permissions you intend.

The organisation pack can extend Shepherd’s stack packs itself, so every consumer gets them with one line:

extends:
- github:jagreehal/shepherd/packs/node-api.yml@0123456789abcdef0123456789abcdef01234567
- github:jagreehal/shepherd/packs/observability.yml@0123456789abcdef0123456789abcdef01234567
lenses:
node-api:
applies_to: ['services/**/*.ts']

Compose reviews for your stack lists the catalogue.