Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions website/app/docs/cli/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,19 @@ Selection notes:
- only folder-based pages can be written automatically, because the command needs a sibling
`agent.md` target

- `--review <page...>` records a hash-bound human review for one or more pages without rewriting
`agent.md` or calling the compressor; requires explicit page arguments plus `--reviewed-by` and
`--reason`
- `--review-manifest <path>` overrides the project-relative manifest location used to store review
entries (default: `.farming-labs/agent-compaction-reviews.json`)

A reviewed entry binds the resolved page source, compaction settings, and `agent.md` body to the
reviewer and reason. If any of those hashes drift, `--check` and `docs doctor --agent` report the
entry as invalid until the page is deliberately reviewed again.

```bash title="terminal"
pnpm exec docs agent compact --review --reviewed-by "docs-team" --reason "Preserve operator guidance" /docs/configuration
```
Recommended config defaults:

```ts title="docs.config.ts"
Expand Down
15 changes: 15 additions & 0 deletions website/app/docs/configuration/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1852,6 +1852,21 @@ Supported fields:
- `minOutputTokens`
- `protectJson`

- `reviewManifestPath`

`reviewManifestPath` sets the project-relative path to the JSON manifest used by
`docs agent compact --review` to store hash-bound reviewed exceptions. The default is
`.farming-labs/agent-compaction-reviews.json`. Set it when your project stores the manifest at a
custom location:

```ts title="docs.config.ts"
agent: {
compact: {
reviewManifestPath: ".farming-labs/agent-compaction-reviews.json",
},
},
```

<Callout type="info" title="What changes after compaction">
`docs agent compact` creates missing `agent.md` files and overwrites existing ones. The written
`agent.md` becomes the machine-readable source for `.md` routes,
Expand Down
4 changes: 4 additions & 0 deletions website/app/docs/reference/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ related:
- /docs/installation
- /docs/customization/mcp
agent:

| Property | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| `reviewManifestPath` | `string` | `.farming-labs/agent-compaction-reviews.json` | Project-relative path to the JSON manifest for hash-bound reviewed compaction exceptions. Overridable per-run with `--review-manifest`. |
tokenBudget: 1800
task: Select and configure the exact typed Farming Labs docs option required by a project.
outcome: The chosen defineDocs option has the documented type and default and the resolved runtime exposes matching behavior.
Expand Down
8 changes: 8 additions & 0 deletions website/app/docs/token-efficiency/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ related:
- /docs/customization/llms-txt
- /docs/customization/mcp
agent:

When a hand-authored or intentionally modified `agent.md` should be preserved long-term, record a
hash-bound review with `--review`. The review manifest (default
`.farming-labs/agent-compaction-reviews.json`) stores the resolved source, settings, and output
hashes together with the reviewer and reason. `docs doctor --agent` and `docs agent compact --check`
accept matching reviewed entries but fail when any hash drifts (source, settings, or `agent.md`
body), or when a manifest entry no longer matches any compactable page. Re-reviewing requires an
explicit `--review` run after the drift is inspected and accepted.
tokenBudget: 900
task: Reduce agent context usage while preserving the evidence needed to implement and verify a docs task.
outcome: Retrieval returns the relevant page and executable evidence within the configured UTF-8 context budget.
Expand Down
Loading