Key Features

Excluding Documents from Code Reviews

Mark operational or informational documents so code-review agents never consult them, while interactive tools keep full visibility.

Summary

Not every library document is relevant to a code review. Operational and informational content — CLI cheatsheets, runbooks, workflow guides — helps humans and interactive agent sessions but adds noise when a code-review agent searches the knowledge base for canonical guidance.

Marking a document as excluded from code reviews hides it from the document tools only when they run on the code-review execution path:

ToolCode-review pathInteractive MCP / HTTP
list_documentsExcluded documents hiddenFull listing
search_documentsExcluded documents hiddenFull results
search_sectionsSnippets of excluded documents hiddenFull results
search_code_snippetsSnippets of excluded documents hiddenFull results
read_document_by_pathAlways resolvesAlways resolves

Direct path reads resolve on every path by design: if a reviewer is explicitly pointed at a document (for example by a prompt), the read succeeds. Exclusion only removes the document from discovery — listings and searches.

Marking a Document

In the library editor, open a document and use the eye toggle in the editor header:

  • view icon — the document is visible to code reviews (default).
  • view-off-slash icon with a Review-excluded badge — the document is hidden from code-review discovery.

Excluded documents also show a muted view-off-slash marker next to their name in the document tree.

The toggle is reversible and takes effect immediately — no re-indexing is required, because the filter is applied at query time.

API

POST /api/v1/orgs/{orgId}/libraries/{name}/documents/review-exclusion
{ "path": "/guides/runbook.md", "excluded": true }

Returns the updated document summary. The document is resolved with the same tiered walk as other document endpoints (exact path, suffix, or previous-path alias).

Scope and Limitations (v1)

  • Hand-authored documents only. Synced documents (repository-sourced ingest) are rejected with a 400 — an ingest run owns their lifecycle and would silently fight the flag. The editor hides the toggle for remote documents.
  • Public-source libraries are not filterable. Their snippets live in a shared cross-organization table with no per-org override, so exclusion does not apply there.
  • The flag survives content edits and renames; it is stored on the document row (excluded_from_code_reviews), not derived from content.

How It Works

The code-review agent executor wraps every document tool in a per-invocation dependency-injection scope (needed for safe concurrent tool calls). The review path marks that scope as code-review execution, and the Postgres document and snippet stores apply an additional predicate — NOT excluded_from_code_reviews — to list and search queries when the mark is present. Ordinary request scopes are never marked, so the interactive MCP server and HTTP endpoints (including the library Test panel) stay unfiltered.

This means the Test panel shows what an interactive agent sees, not what a review agent sees — an excluded document still surfacing there is expected behavior.