Skip to content

docs: sync llms.txt with Sphinx toctrees - #349

Merged
K1rL3s merged 2 commits into
K1rL3s:masterfrom
HarshRajSinghania:docs/sync-llms-txt-with-toctree
Sep 20, 2026
Merged

K1rL3s merged 2 commits into
K1rL3s:masterfrom
HarshRajSinghania:docs/sync-llms-txt-with-toctree

Conversation

@HarshRajSinghania

@HarshRajSinghania HarshRajSinghania commented Sep 16, 2026 •

Copy link
Copy Markdown

Summary

docs/_extra/llms.txt no longer omitted pages that already appear in the Sphinx toctrees.

Closes #267

Motivation

Issue #267 listed pages present in docs/index.rst (and the hidden Bot API toctree) but missing from llms.txt, so LLM crawlers and Context7/DeepWiki saw an incomplete docs map.

Implementation

  • Added the missing pages to docs/_extra/llms.txt:
    • pages/event-handling/flags
    • pages/utils/link, callback_answer, chat_action
    • pages/changelog
    • Bot API bot, types, methods, enums, updates
  • Kept the existing hand-written descriptions; only filled gaps.
  • Added tests/test_llms_txt.py so a future toctree entry without a matching llms.txt URL fails CI.

Did not generate llms.txt from Sphinx in conf.py, because the file is meant to stay a short annotated map rather than a dump of every title.

Testing

python -m pytest tests/test_llms_txt.py -q

Result: 1 passed.

Summary by CodeRabbit

  • Документация
    • Добавлена ссылка на документацию по флагам метаданных обработчиков.
    • Добавлен раздел «Утилиты» с тремя полезными материалами.
    • Расширен раздел «API Reference» ссылками на основные компоненты API.
    • Уточнено описание раздела «Начало работы».

Add the missing event-handling, utils, changelog, and Bot API pages to docs/_extra/llms.txt so LLM crawlers see the same map as index.rst. Add a regression test that fails if a toctree page is omitted.

Fixes K1rL3s#267
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3ea18ef8-5e29-442e-af54-4ee59cd27ff8

📥 Commits

Reviewing files that changed from the base of the PR and between 81c99c7 and 76986dc.

📒 Files selected for processing (1)
  • docs/_extra/llms.txt

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Обновлён docs/_extra/llms.txt: добавлены страницы флагов, утилит и API Reference. Добавлен тест, который сравнивает ссылки в файле с записями Sphinx toctree.

Changes

Синхронизация документации

Layer / File(s) Summary
Обновление списка страниц
docs/_extra/llms.txt
Добавлены ссылки на флаги, утилиты и страницы API Reference. Ссылка на официальную документацию перемещена без изменения текста и URL.
Проверка соответствия toctree
tests/test_llms_txt.py
Тест извлекает записи из docs/index.rst и docs/pages/botapi/index.rst, формирует URL и проверяет их наличие в llms.txt.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Medium

Suggested reviewers: k1rl3s

Merge Risk: ⚪ Minimal · up to 76986

The documentation map covers the inspected Sphinx pages, so the change is mergeable.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning По #267 файл docs/_extra/llms.txt теперь содержит пропущенные страницы: event-handling/flags, три страницы utils, changelog, а также bot, types, methods, enums и updates. Однако PR о… Добавить генерацию docs/_extra/llms.txt из toctree либо добавить тест согласованности. Тест должен проверять все блоки .. toctree:: в docs/index.rst и страницы docs/pages/botapi/index.rst по ссылкам в llms.txt.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Заголовок точно описывает основное изменение: синхронизацию docs/_extra/llms.txt с Sphinx toctrees.
Description check ✅ Passed Описание содержит цель, мотивацию, закрытие issue #267, перечень изменений и команду тестирования с результатом. В нём отсутствуют отдельные разделы «Тип изменения» и «Контрольный список», а конфигура…
Out of Scope Changes check ✅ Passed Изменения ограничены картой документации в docs/_extra/llms.txt. Обновления описаний и добавление ссылок поддерживают цель #267. Несвязанные изменения не обнаружены.
Full details: Linked Issues check

Explanation

По #267 файл docs/_extra/llms.txt теперь содержит пропущенные страницы: event-handling/flags, три страницы utils, changelog, а также bot, types, methods, enums и updates. Однако PR оставляет файл ручной картой и не добавляет генерацию из toctree или тест согласованности. Поэтому защита от следующего рассинхронизирования не реализована.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: a8ddf676-d063-4dc9-b8e9-6f9d67a70553

📥 Commits

Reviewing files that changed from the base of the PR and between edce039 and 81c99c7.

📒 Files selected for processing (2)
  • docs/_extra/llms.txt
  • tests/test_llms_txt.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

Comment thread tests/test_llms_txt.py Outdated
Проверку полноты llms.txt решили не автоматизировать: файл остаётся рукописной аннотированной картой документации, за его полнотой следит ревью.

Три описания приведены к тому, что на страницах есть: в быстром старте нет таба с вебхуком, флаги ставятся не только декоратором, но и при регистрации хендлера и фильтрами, а link.rst - про сборку ссылок max:// и https://max.ru и перевод ID сообщения в ссылку и обратно.
@codecov

codecov Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.68%. Comparing base (edce039) to head (76986dc).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #349   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files         417      417           
  Lines       12200    12200           
=======================================
  Hits        12039    12039           
  Misses        161      161           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@K1rL3s
K1rL3s merged commit 3f950d4 into K1rL3s:master Sep 20, 2026
12 checks passed
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.

docs/_extra/llms.txt рассинхронизирован с docs/index.rst

2 participants