> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macroscope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instructions and context

> Imports, review output, prior discussion, and context limits.

Specify the rule, its scope, the evidence needed to report a violation, and the action to take. State when the check should report success. Use [front matter](/check-run-agents/configuration) for file filters, tools, and budgets.

## Example

`.macroscope/check-run-agents/api-review.md`:

```markdown theme={null}
---
title: API Compatibility
input: full_diff
include: ["api/**"]
conclusion: failure
requiredStatusCheck: true
maxBudgetPerRun: 2
---

Review changed public endpoints against our compatibility contract:

@/docs/api-contract.md

Flag removed response fields, new required request fields, or changes to
error codes used by existing clients. Trace the callers before reporting.

For each violation, post one inline comment with the affected client and a
compatible alternative. Report success if no compatibility breaks are found.
```

## Output

Each Check Run Agent reports in GitHub check details. With `modify_pr`, it can also post inline review comments and conversation comments. Without that tool, it cannot post either kind of comment.

Instructions control report structure. For example: “List findings by severity, with file, line, impact, and suggested fix.” `showToolCalls: false` hides the tool-call log from check details.

## Importing files

Write `@path/to/file.md` in the instruction body to insert that file's contents. Imported front matter is stripped. Imports do not expand inside front matter, inline code, or fenced code blocks.

| From `.macroscope/check-run-agents/api-review.md` | Resolves to |
| - | - |
| `@/docs/api-contract.md` | `docs/api-contract.md` at the repository root. |
| `@/CLAUDE.md` | Root `CLAUDE.md`. |
| `@rules/naming.md` | `.macroscope/check-run-agents/rules/naming.md`. |
| `@../../docs/api-contract.md` | `docs/api-contract.md`. |

Paths resolve relative to the importing file unless they start with `/`. Any text file can be imported. A directive must contain `/` or an extension; handles, decorators, and email addresses are left alone.

Imports support **4 hops** and **50 imports per prompt**. Paths must stay inside the repository and outside `.git`; symbolic links are not followed. Keep shared Markdown outside `.macroscope/check-run-agents/` if you do not want it discovered as another check.

Missing paths, cycles, or exceeded import limits leave the directive as literal text and add a warning to check details. The check still runs. Imported content has no separate size cap, but the complete prompt must fit the model's context window.

Imports come from the same commit as the definition, including the default-branch exception for external forks.

<a id="what-an-agent-remembers" />

## Context from prior runs

Every run starts a fresh model conversation with context from prior PR activity:

* Its own review threads, including replies and resolution state.
* Recent comments from others when it has little discussion history of its own.
* Its prior actions, including comments, Slack messages, labels, and reviewer assignments.

This context comes from Macroscope's stored record. Deleted comments are excluded. Long comments may be shortened; older threads and action logs are dropped when space is limited. The prompt reports omissions.

## Context window

Instructions and imports are included in full. The remaining space is shared by tool schemas, PR context, discussion, and diff or commit messages.

| Content that does not fit | Behavior |
| - | - |
| PR diff | Omitted whole. With `git_tools`, the agent can fetch changes by path. |
| Discussion | Whole threads are dropped, prioritizing the agent's own recent threads. |
| `pr_metadata` commit messages | At most 50 recent messages; oldest entries are removed first. |
| Initial prompt | Check skipped before execution; no charge. |
| Conversation during execution | Check stops as skipped; work already done is billed. |

A context failure is titled **Prompt too large for the selected model**. Choose a larger-context model or shorten instructions. Narrowing `include`/`exclude` does not shrink a `full_diff` prompt.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.