# Instructions

> Standing instructions for every run, custom instructions for each automation, and the modes a run picks from.

Instructions tell Pullfrog how your team wants work done. They are fields in the repository console under **Automations**: one for every run, and one on each card for the runs that card covers.

| Field | Applies to | Effect |
| --- | --- | --- |
| **General → Standing instructions** | Every run | Added to the run |
| **Mentions → Custom instructions** | Runs a mention starts | Added to the request |
| **Review PRs → Custom instructions** | Reviews and re-reviews | Added to the built-in workflow |
| **Plan → Custom instructions** | Plans | Added to the built-in workflow |
| **Build → Custom instructions** | Code changes | Added to the built-in workflow |
| **Address reviews → Custom instructions** | Review feedback on a PR | Added to the built-in workflow |
| **Fix CI failures → Custom instructions** | CI fixes | Added to the built-in workflow |
| **Enrich issues → Enrichment prompt** | New issues in Enrich mode | Replaces the default prompt |
| **Enrich issues → Custom instructions** | New issues in Plan or Build mode | Added to the mode's prompt |
| **Label issues → Custom instructions** | Issue labels | Shapes the choice of labels |

Instructions on a card apply to automatic runs and to direct requests alike, and win where they conflict with the built-in workflow. The **Plan** and **Build** cards start no runs of their own: the [Enrich issues](https://pullfrog.com/docs/issues) card chooses what a new issue starts.

## Review instructions

By default, a review looks for defects, meaning anything that changes what the code does, and puts each one inline at its real severity. It does not go looking for missing tests, stale comments, naming, dead code or rollout plans, and it never flags formatting.

Ask for that feedback in the **Review PRs** card's **Custom instructions**:

```text
Flag new code that has no test.
Flag new code that duplicates an existing helper.
Check the rollout order of schema changes.
```

The field applies to automatic reviews, re-reviews, and reviews you request with `@pullfrog`. It overrides the built-in review checklist where they conflict. Guidance in `AGENTS.md` does not.

## Build instructions

Build instructions guide how Pullfrog writes code when it implements a task: a plan, an issue in Build mode, or an `@pullfrog` request for a change. Keep them short and actionable.

```text
Run `pnpm test` and `pnpm lint` before pushing.
Match the patterns in the file you're editing.
Keep PRs small and move unrelated cleanup to a separate PR.
```

## Plan instructions

Plan instructions guide how Pullfrog writes implementation plans. They apply when enrichment runs in Plan mode, when someone clicks **Make a plan**, and when an `@pullfrog` mention asks for a plan.

The plans that Enrich mode posts follow the [enrichment prompt](https://pullfrog.com/docs/issues#enrichment-prompt) instead.

## Modes

A mode is the workflow a run follows. The agent reads the request, picks the mode that matches, and gets that mode's instructions, so nobody names a mode: "Please review this PR" selects Review, and "Add dark mode support" selects Build.

| Mode | Picked for | What the run does |
| --- | --- | --- |
| Build | A change to implement, or a plan to execute | Creates a branch, makes the change, runs tests, pushes, and opens a PR |
| Address Reviews | Review feedback on an existing PR | Reads each review thread, replies, and pushes the changes asked for |
| Review | A request to review a PR | Reads the diff and submits a review with inline comments |
| Incremental Review | New commits on a reviewed PR | Reviews only the changes since the last review |
| Fix | A failing check | Reads the failure logs, reproduces the failure with the CI commands, fixes it, and pushes |
| Plan | A request for a plan | Posts a plan with milestones and dependencies |
| Resolve Conflicts | Merge conflicts on a PR branch | Merges the base branch, resolves the conflicts, verifies, and pushes |
| Task | Anything else: a question, a comment, a label, an ad-hoc command | Does the task, and opens a PR if it changed code |
