Skip to content

feat: keep repository layout entries to one line - #120

Merged
webern merged 5 commits into
mainfrom
owner-edits
Oct 7, 2026
Merged

webern merged 5 commits into
mainfrom
owner-edits

Conversation

@webern

@webern webern commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Human Summary

I was just going to touch up AGENTS.md a little bit by hand but the LLM tendency to add crap is so infuriating. It was puking into the Repository Layout section so we changed that lint to disallow multiline in the Repository Layout.

Summary

Agents kept filling the "Repository layout" section of an AGENTS.md without breaking its entry limit, because the repo_layout lint let a description run on to the next line, aligned under it. A layout of 8 entries could take 30 lines. An entry is now one line. A line under the description above it is a new problem, Malformed::Continued, and the report tells the agent to shorten the description. It does not count as an entry. The advice and deslag instructions say the same. The change is in src/lint/repo_layout.rs, with a new multiline case and new unit tests.

The branch also holds:

  • The owner's edits (a402bc2): the root AGENTS.md layout cut to one-line entries that point to tests/AGENTS.md and tools/AGENTS.md, and the deslag-review-pick skill deleted.
  • The two guides those entries point to, which were TODO placeholders. Each has a layout of 5 to 10 one-line entries and a few rules. Their budgets are 1450 bytes for tests/AGENTS.md and 1300 for tools/AGENTS.md, set just over their size, and list_growth is on for both. .agents/deslag.toml selects them.
  • Two small fixes: trailing whitespace in the root AGENTS.md, and the over-budget report, which said "which larger than" and now says "which is larger than". Three test helpers matched the old words, so they change with it.

No corpus fixture or golden file changed.

Testing

  • make ci-fast: exit 0
  • cargo test --profile fast --test corpus and cargo test --profile fast --doc, which ci-fast leaves to make ci
  • Broke each guide by hand to confirm the budget and layout limits apply to it, then restored it

References

webern added 5 commits October 7, 2026 12:24
An agent could keep a layout within its entry limit and still fill the
section, because a description that ran past its line was allowed to
continue on the next one, aligned under it.

An entry is now one line. A line under the description above is a new
problem, Malformed::Continued, and the report tells the agent to
shorten the description. It is not counted as an entry. A line that is
neither an entry nor under a description is still stray, and its
message no longer talks about continuations.

The advice and the lint's instructions say that an entry is one line.
The clean case and the unit tests no longer use a continuation, and a
new multiline case shows the report.
Each guide has a layout of 5 to 10 entries, one line each, and a few
rules. Their budgets are 1450 and 1300 bytes, set just over their
size, so growing one is a decision for a human. list_growth keeps
their lists from growing too.

.agents/deslag.toml selects the two files and sets the budgets and
the layout limits.
The line read "AGENTS.md is 34, which larger than 10 bytes". It now
reads "which is larger than".

Three helpers in the tests matched the old words to find the line, so
they change with it, as do the case output and the unit tests that
pin it.
@webern webern added docs Documentation including agent instructions, readmes, code comments, etc. enhancement New feature or request ai Primarily authored by AI (whether PR, Issue, Whatever) area/lint Deals with the linting algorithms themselves, how they work. labels Oct 7, 2026
@webern
webern merged commit 04c6a8a into main Oct 7, 2026
2 checks passed
@webern
webern deleted the owner-edits branch October 7, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai Primarily authored by AI (whether PR, Issue, Whatever) area/lint Deals with the linting algorithms themselves, how they work. docs Documentation including agent instructions, readmes, code comments, etc. enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant