Repository navigation
docs(issues): [#2691] add specification to reduce the AGENTS.md token footprint - #2692
Conversation
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
ACK cf2e206 |
da2ce7
left a comment
There was a problem hiding this comment.
Reviewed at cf2e206c39f16147619f9cca4adee4327a16bbcd. Recomputed from the bytes at this head, against the merge base 311e7f070; git merge-tree against develop 311e7f070 exited 0 and produced the head tree without conflicts.
The specification follows the issue template: strict frontmatter, task statuses, commit points, acceptance review and manual evidence are present. Compared with the research task for issue #2547 and documentation task for issue #2576.
The base AGENTS.md is 35,910 bytes (35.910 decimal KB), 523 lines and 3,740 words. The stated footprint is sound; the auxiliary-table count and creation-log time need small corrections. External loading behavior and the agent tool's report remain unverified from repository bytes.
The plan requires a reproducible baseline, the same final measurement method, and an agreed target before restructuring. It preserves rules and requires link updates. The package catalog is only partly duplicated: docs/packages.md and packages/AGENTS.md refer back to its canonical anchor, which must be preserved or redirected when content moves.
Hygiene: only the specification changed; diff whitespace and the verbatim PR-branch commit-id check passed. The commit subject follows the template's unbracketed issue-reference form, which also has recent precedent. Author and committer match. The commit carries one attribution footer, which no rule in the tree forbids. The body says Related to #2691; the skill's closing-keyword scan found no match.
Findings: F1 and F2 are nonblocking Nits. Numbering starts at F1 because this PR has no prior audit record.
Checked, no finding: semantic paths resolve; planned evidence files are future outputs; no local Markdown links are broken; policy references exist. No blocking finding stands.
Checks
On the loop's compute hub at this head, against the merge base 311e7f070 (receipt server-gates-sojka-505): pre-commit profile gate exit 0 (148 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 16 errors / 4 warnings at this head and 16 / 4 at the base re-measured, none in the file this PR adds. No path outside docs/ changes. git merge-tree of this head into develop 311e7f070 is clean (tree 101235662). GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 311e7f070.
| Observations from a first read of the file: | ||
|
|
||
| - It mixes always-needed rules (linting gate, GPG signing, branch naming) with reference material | ||
| that is only needed for some tasks (the full package catalog and its three auxiliary tables, |
There was a problem hiding this comment.
[Nit][F1] Correct the auxiliary-table count
The base AGENTS.md has six tables in Package Catalog: the main package table plus extracted packages, console tools, workspace developer tools, skill-owned tools and community contributions. Please change “three auxiliary tables” to “five”, or omit the count. This does not block the plan because T4 already requires every section to be classified.
| - 2026-10-30 13:45 UTC - Claude Code (Claude Sonnet 5.5) - Drafted the specification from the maintainer's request - this file | ||
| - 2026-10-30 13:55 UTC - Claude Code (Claude Sonnet 5.5) - Maintainer approved the scope and decided no ADR is needed for now; removed the ADR task and added a post-implementation re-evaluation (T10) - this file | ||
| - 2026-10-30 14:05 UTC - Claude Code (Claude Sonnet 5.5) - Maintainer confirmed Claude Code accepts `AGENTS.md` in place of `CLAUDE.md`; removed the adapter work from the scope, T3, T7 and AC5 - this file | ||
| - 2026-10-30 14:15 UTC - Claude Code (Claude Sonnet 5.5) - Maintainer approved the draft; created GitHub issue #2691, chose a spec-only PR, and moved the spec to `docs/issues/open/` - https://github.com/torrust/torrust-tracker/issues/2691 |
There was a problem hiding this comment.
[Nit][F2] Separate the issue creation time from the later log update
The captured issue record gives created_at as 2026-10-30 13:51:17 UTC, while this 14:15 entry says the issue was created then. Please use the recorded creation time, or say this entry records later approval/move work and that the issue already existed. The checked creation checkpoint is valid; only its chronology needs correction.
|
ACK cf2e206 — specification structure, repository claims and merge compatibility were checked at this head |
|
ACK cf2e206 |
6b63c72 docs(issues): [#2691] record the re-review and correct the R030 reason (josecelano-bot) 60d26d3 docs(issues): [#2691] record the independent review and fix its findings (josecelano-bot) 31d1238 docs(issues): [#2691] record the AC4 and ADR decisions (josecelano-bot) bdda2c0 docs(issues): [#2691] add the implementation retrospective and review the acceptance criteria (josecelano-bot) d0f974b docs(issues): [#2691] record the fresh-session discoverability check and the final rule inventory walk-through (josecelano-bot) 34018ea docs(issues): [#2691] record the fresh-session rules check and waive the regrowth guard (josecelano-bot) 66403fc docs(issues): [#2691] record the final AGENTS.md token measurement (josecelano-bot) 501cc4d docs(agents): [#2691] condense the remaining AGENTS.md sections (josecelano-bot) c5a596a docs(skills): [#2691] document the VS Code agent skills setting in setup-dev-environment (josecelano-bot) af8fa16 docs(agents): [#2691] move Git Workflow detail to the open-pull-request skill (josecelano-bot) ee1344f docs(skills): [#2691] add history and PR-title rules to the open-pull-request skill (josecelano-bot) fa21a75 docs(agents): [#2691] point to the linter and hook skills instead of duplicating their content (josecelano-bot) 497d003 docs(agents): [#2691] link package naming conventions and container usage instead of duplicating them (josecelano-bot) 4121871 docs(issues): [#2691] add a rule inventory built from the baseline AGENTS.md (josecelano-bot) c4c32ce docs(packages): [#2691] make docs/packages.md the canonical package catalog (josecelano-bot) deabe26 docs(issues): [#2691] record the maintainer review decisions for the AGENTS.md dispositions (josecelano-bot) a02da32 docs(issues): [#2691] propose a disposition for every AGENTS.md section (josecelano-bot) 5a54f96 docs(issues): [#2691] record the Claude Code /context baseline for AGENTS.md (josecelano-bot) 75c8452 docs(issues): [#2691] record the AGENTS.md token baseline and best-practices research (josecelano-bot) Pull request description: ## Summary Implements #2691: research good practices for `AGENTS.md` and apply them to the root `AGENTS.md` to cut its token footprint. The specification was merged earlier in #2692. | Measure | Baseline | Now | | --- | --- | --- | | Claude Code `/context` tokens | 12.4k | 4.8k (-61%) | | Lines | 523 | 229 | | Bytes | 35,910 | 13,027 | The target was about 5k tokens or fewer. Only global rules stay in the root file; the rest moved to the skill, doc or nested `AGENTS.md` closest to where it is used, or was removed with a recorded reason. ## What changed - `docs/packages.md` is now the canonical package catalog; `packages/AGENTS.md` links to it. `AGENTS.md` keeps a pointer and the `cargo metadata` command. - The `open-pull-request` skill gained the commit-history, rewrite and PR-title rules (it previously pointed back at `AGENTS.md`). The `run-linters` skill gets a corrected ignore note (`ignorePaths` in `cspell.json`). The `setup-dev-environment` skill gains an optional VS Code agent-skills section. - Build, config, container and Git Workflow detail in `AGENTS.md` is condensed to short rules plus pointers. - Cross-references to the removed content were updated (`deny.toml`, EPIC #1669, spec #2183). - Four statements in the old file were already wrong (non-existent test target, `.cspell.gitignore`, four of five cargo aliases, `tests/` contents) and were dropped, not carried over. ## How "no rule lost" was checked - `rule-inventory.md` lists all 99 rules and facts of the baseline file, each with a final location or a recorded reason for removal; all are asserted. - Two fresh-session checks (V2, V3) confirmed an agent still states the commit, signing and branch rules and finds the moved package and port content. - An independent review found no lost rules and some stale references, which were fixed and re-reviewed (`agent-review-reports.md`). ## Decisions and non-goals No ADR, no `CLAUDE.md` adapter, and no regrowth guard for now (D7, D9; may be revisited). The short, very common branch, commit and pre-commit rules deliberately stay inline (D8). Details are in `section-disposition.md` and `implementation-retrospective.md` in the issue folder. ## Validation `./contrib/dev-tools/git/hooks/pre-commit.sh` passes for every commit, `linter all` exits 0, and the pre-push hook passed. CI has not run yet. Closes #2691 🤖 Generated with [Claude Code](https://claude.com/claude-code) ACKs for top commit: josecelano: ACK 6b63c72 Tree-SHA512: c9d15cb15607793b2ea0cbc01060c5abcc856b5c2da419b53caa0fde33a64c6358b2542e9aa75bcf7fd9ecdee3fe8c727b8cba9238498f8690ab92f6ca3ac1c2
Summary
Adds the issue specification for #2691: research good practices for
AGENTS.mdand apply them to the rootAGENTS.mdto reduce its token footprint. This is a spec-only PR so scope and acceptance criteria can be reviewed before implementation starts.Files touched
docs/issues/open/2691-reduce-agents-md-token-footprint/ISSUE.md(new)No code, configuration or
AGENTS.mdchanges are included.Validation
./contrib/dev-tools/git/hooks/pre-commit.shpassed all 9 steps, includinglinter alland the staged Markdown frontmatter check.Related to #2691
🤖 Generated with Claude Code