A custom rule keeps its name, requirement, parameters, event type, and enablement scope. How Warestack evaluates it depends on the evidence that requirement needs.
Ordinary custom rules
An ordinary rule uses reviewed, persisted checks. Each check returns passed, failed, not_applicable, or not_evaluated. Warestack validates selector, alternative, and applicability coverage for every check, then derives the rule outcome on the server.
Missing or incomplete coverage is not a pass. For a merge-blocking rule, it produces an incomplete, fail-closed check until a complete trusted evaluation is available. Re-interpret and review an ordinary rule when its saved requirement itself changes; analyze_rule and create_rule draft a new rule and do not replace an existing one.
Repository instructions at runtime
A pull-request rule can ask Warestack to follow applicable repository instructions or exact local files such as CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules, .github/copilot-instructions.md, or another supported Markdown, MDC, text, or reStructuredText file.
For this mode, Warestack reads the selected files from the pull request’s base revision and interprets the applicable requirements on every evaluation. The pull request that edits a policy is therefore judged against the policy from before that change. Once the policy change merges, later pull requests use the updated requirement automatically; no manual re-interpret-and-adopt cycle is required.
The runtime interpretation is bound to the rule, repository, source revision, file digests, evaluated head, and collected evidence. If the files cannot be read or the runtime interpretation cannot be verified, the rule is not_evaluated rather than guessed.
Context from other repositories
A pull-request rule can name related repositories and files in its description, for example:
When a pull request in
acme/serverchanges a customer response, evaluate it against the approved contract and examples fromacme/schemas-libraryand the approved client expectations fromacme/web.
Warestack extracts literal repository references, resolves them only inside the connected space, and asks a space admin to review and approve the exact context boundary. The approved binding specifies the source rule configuration and referenced repositories. Each referenced repository independently selects paths or directories and exactly one revision source: a branch, immutable revision, or pull request. Different repositories may use different revision sources; a change diff is derived only for a pull-request source. Repository metadata alone never grants read authority.
At evaluation time Warestack uses the installed GitHub App to collect only that approved context. The approved selected content—including private repository content—is sent to the Space’s configured evaluation model. The rule receives the complete selection and, for a pull-request source, the derived change diff, plus the source pull-request revision, approved referenced-context revisions, immutable citations, and a receipt. Sensitive or binary content, oversized selections, ambiguous repository names, missing access, or incomplete collection remain unavailable evidence.
When an approved dependency changes, Warestack invalidates the affected context and durably reevaluates the relevant open pull requests. It does not wait for an unrelated source-repository webhook. Each result stays attributable to the exact source and dependency revisions used.
Where to review it
The Rules drawer is the primary configuration surface. Its Interpretation tab shows the interpreted requirement, resolved repository references, exact collection scope, current status, and receipts. A space admin uses Approve repository context before collection starts and Stop context to prevent future collection without deleting the rule, stopping repository monitoring, or rewriting earlier receipts. People who can access the Space can read the binding and its immutable receipts.
The repository drawer answers the inverse question: how is this repository involved?
- Applied here means a rule configuration is saved directly on this repository; the row can be enabled, disabled, or awaiting context configuration.
- Used as context means another source repository’s rule has or had an approved reference to this repository; current, stopped, and historical bindings can appear.
- A direct configuration without repository context shows Configure rule, which opens Scopes. Context-capable or bound rows show their selection and Review context and evidence, which opens Interpretation for receipts and, for a space admin, Stop context.
For example, if a rule on acme/server reads acme/schemas-library, the server drawer lists it under Applied here and the schemas-library drawer lists the same binding under Used as context. Both drawers link to Review context and evidence in the Rules drawer’s Interpretation tab.
Cross-repository context does not turn several pull requests into a pull-request stack. Each pull request keeps its own checks and findings; the rule adds bounded evidence from approved revisions in referenced repositories. Discovering or requiring a separate issue-linked pull request is a different workflow and is not inferred by an ordinary repository-context binding.