Let the agent budget measure what it documents #336

Open
PerishFire wants to merge 1 commit from task/an-agent-budget-that-measures into main
Owner

document.magnitude says every strategy applies a magnitude to the target and the evidence mass. Two strategies do; two did not:

Strategy::Agent | Strategy::Design => Some(320),                    // measures nothing
Strategy::Architecture => (32 * root(leaves)).clamp(240, 800),
Strategy::Brief        => (4  * root(lines)).clamp(240, 800),

A constant is wrong at both ends.

Too tight here. This repository has grown six media, a contract layer, a datum, a rejoin and four rendered lanes since 320 was chosen, and the budget did not move — so the pressure landed on the sentences rather than on the count of things worth saying. It bit in this very line: an invariant about evidence strength (a registry answering with an identity rather than a digest is the weak case, and the adaptor says so) was cut to fit. That is not concision, it is a rule recorded nowhere. It is restored in this commit.

Too loose everywhere small. A repository of a dozen files was allowed 320 lines of agent document, which is no guard at all. Sharing the architecture arm gives it the corridor floor of 240 instead.

So the guard gets stricter exactly where it was doing nothing, and yields exactly where the repository earned it — 544 here.

Leaves rather than lines, because an agent document describes the shape of a tree: one that grew by files has more shape to describe than one that grew by lines inside them.

The magnitude test now asserts both halves — the floor refusing an oversized document in a small fixture, and a fixture whose source grew carrying a budget that grew with it.

`document.magnitude` says every strategy applies a magnitude to the target **and the evidence mass**. Two strategies do; two did not: ```rust Strategy::Agent | Strategy::Design => Some(320), // measures nothing Strategy::Architecture => (32 * root(leaves)).clamp(240, 800), Strategy::Brief => (4 * root(lines)).clamp(240, 800), ``` A constant is wrong at **both** ends. **Too tight here.** This repository has grown six media, a contract layer, a datum, a rejoin and four rendered lanes since 320 was chosen, and the budget did not move — so the pressure landed on the sentences rather than on the count of things worth saying. It bit in this very line: an invariant about evidence strength (a registry answering with an identity rather than a digest is the weak case, and the adaptor says so) was **cut to fit**. That is not concision, it is a rule recorded nowhere. It is restored in this commit. **Too loose everywhere small.** A repository of a dozen files was allowed 320 lines of agent document, which is no guard at all. Sharing the architecture arm gives it the corridor floor of **240** instead. So the guard gets stricter exactly where it was doing nothing, and yields exactly where the repository earned it — **544** here. Leaves rather than lines, because an agent document describes the shape of a tree: one that grew by files has more shape to describe than one that grew by lines inside them. The magnitude test now asserts both halves — the floor refusing an oversized document in a small fixture, and a fixture whose source grew carrying a budget that grew with it.
Let the agent budget measure what it documents
All checks were successful
guard / guard (pull_request) Successful in 4m27s
250084aa57
`document.magnitude` says every strategy applies a magnitude to the target and
the evidence mass. Two strategies do: architecture scales on source leaves,
brief on source lines, each clamped to a corridor. Agent and design did not.
They held 320, a number that measures nothing, in the one document a reader
opens before anything else.

A constant is wrong at both ends. This repository has grown six media, a
contract layer, a datum, a rejoin and four rendered lanes since that number was
chosen, and the budget did not move, so the pressure landed on the sentences
rather than on the count of things worth saying. It bit in this line: an
invariant about evidence strength — that a registry answering with an identity
rather than a digest is the weak case, and the adaptor says so — was cut to fit,
which is not concision, it is a rule recorded nowhere. It is back, above.

The other end matters more. A repository of a dozen files was allowed 320 lines
of agent document, which is no guard at all; sharing the architecture arm gives
it the corridor floor of 240 instead. The guard gets stricter exactly where it
was doing nothing, and yields exactly where the repository earned it: 544 here.

Agent and design now share the architecture arm. Leaves rather than lines,
because an agent document describes the shape of a tree, and a tree that grew
by files has more shape to describe than one that grew by lines inside them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
All checks were successful
guard / guard (pull_request) Successful in 4m27s
This pull request has changes conflicting with the target branch.
  • AGENTS.md
  • crates/cli/src/shape/document/mod.rs
  • crates/cli/tests/doctor/document.rs
  • plumb.toml
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin task/an-agent-budget-that-measures:task/an-agent-budget-that-measures
git switch task/an-agent-budget-that-measures
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PerishLab/plumb!336
No description provided.