Skip to content

fix(docs): allow the AGENTS.md link through the llms leakguard - #21

Merged
HaoZeke merged 1 commit into
mainfrom
eb/llms-full-leakguard
Nov 4, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
eb/llms-full-leakguard

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

llms-full.txt generation hits this line when the allowlist is empty:

leakguard: llms-full.txt links to AGENTS.md (https://github.com/HaoZeke/eb-stack/blob/main/AGENTS.md); allowlist the URL in scripts/leakguard.toml or drop the link

The manual index publishes that URL.
scripts/leakguard.toml allowlists it.
scripts/gen-llms-txt.py and the prek llms leakguard hook read that file.

Before and after

Before, an empty allowlist makes scripts/llms_leakguard.py exit 1 and print the line above.
scripts/gen-llms-txt.py exits 1 on the same line and does not write.

After, the URL is in scripts/leakguard.toml.
python3 scripts/llms_leakguard.py exits 0.
python3 scripts/gen-llms-txt.py rewrites nothing.
python3 scripts/gen-llms-txt.py --check exits 0.
uvx prek run -a exits 0, including llms leakguard.

Tests

cargo +stable fmt --all --check exited 0.
cargo +stable clippy --locked --all-targets -- -D warnings exited 0.
cargo +stable test --locked --all-targets exited 0.
1516 passed, 0 failed, 10 ignored.
tests/llms_txt.rs runs scripts/llms_leakguard.py and checks the allowlist URL.


Note

Low Risk
Docs and CI hook changes only; no runtime or auth behavior. Risk is limited to false positives blocking llms regeneration if new instruction links are added without updating the allowlist.

Overview
Adds a llms leakguard that blocks markdown links to AGENTS.md, CLAUDE.md, or GEMINI.md in generated or committed llms.txt / llms-full.txt unless the URL is listed in scripts/leakguard.toml.

scripts/gen-llms-txt.py runs that check on the rendered content before writing or --check, so generation fails with the same messages as the standalone script. A new prek local hook (llms-leakguard, always_run) runs scripts/llms_leakguard.py against the committed files; CHANGELOG.md documents both paths.

The manual’s existing AGENTS.md GitHub link is allowlisted so index generation and hooks pass without dropping discovery links. tests/llms_txt.rs asserts the allowlist entry and that llms_leakguard.py exits successfully.

Reviewed by Cursor Bugbot for commit a2bc888. Bugbot is set up for automated code reviews on this repo. Configure here.

leakguard: llms-full.txt links to AGENTS.md (https://github.com/HaoZeke/eb-stack/blob/main/AGENTS.md); allowlist the URL in scripts/leakguard.toml or drop the link
scripts/gen-llms-txt.py and the prek llms-leakguard hook read the same allowlist.
The manual index URL is listed, so generation writes llms-full.txt.
@HaoZeke
HaoZeke merged commit f066d3d into main Nov 4, 2026
19 checks passed
@HaoZeke
HaoZeke deleted the eb/llms-full-leakguard branch November 8, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant