silarhi/llms-txt-bundle
A Symfony bundle that automatically generates an llms.txt file for your site, exposing a clean, markdown-based index of your key pages and documentation so large language models can discover and understand your content.
Architecture fit. The release notes describe silarhi/llms-txt-bundle, a Symfony bundle, not a Laravel package — evidenced by %kernel.build_dir%, cache:warmup, container compilation, and Twig functions (preload(), link()). There is no service provider, no publishable config, and no Artisan surface. This should be reconciled before we plan anything: if our target application is Symfony, fit is good and idiomatic; if it is Laravel, the package is best treated as a reference design (route option → aggregated /llms.txt) rather than a dependency, since the whole caching mechanism is kernel-specific and has no Laravel analogue. The v1.3.0 changes are exactly the kind of thing that matters to a Symfony runtime and is not portable to Laravel.
What v1.3.0 actually changes.
llms_txt option are now cached to %kernel.build_dir%/llms_txt_routes.php, alongside compiled routes, invalidated with them; cache:warmup writes it so read-only build dirs work. Reported gains: 15.9 ms → 1.8 ms at 1,000 routes (~9×), 720 ms → 19 ms at 10,000 routes (~38×). This removes a real per-request cost cliff.symfony/web-link demoted to optional. Only discovery.link_header (off by default) needs it. This is a de facto breaking change for two populations: anyone enabling link_header without declaring the dependency (container build fails), and anyone relying on the bundle's transitive pull of symfony/web-link while calling preload() / link() / AbstractController::addLink() (app boot failure).Integration feasibility. Low effort for a Symfony stack — no code changes if link_header is off and no WebLink APIs are in use. For a Laravel stack, feasibility of reuse is low; feasibility of reimplementation is high, since the semantics are simple, but we would need our own invalidation hook (Laravel route:cache) and would not inherit the benchmark gains.
Technical risk. (a) Silent-ish dependency removal — the failure is loud at build time but only if that code path is exercised; CI must explicitly require symfony/web-link when relevant. (b) Stale cache if a pipeline skips warmup or has an unwritable build dir. (c) "An invalid option still fails the requests of the file, not the warmup" — a config typo surfaces as runtime 500s on /llms.txt only, not at deploy time, which weakens our fail-fast posture.
Key questions. Is our consuming app Symfony or Laravel? Do we enable discovery.link_header? Does our app code — or any other dependency — call WebLink APIs without declaring the package? Do all deploy targets run cache:warmup, and are build dirs writable? Are our routes attribute-based? What is our real route count and 12-month trajectory? Which Symfony versions does 1.3.0 support (not stated in the notes)?
Stack fit. PHP/Composer, Symfony kernel required. Laravel: no first-class fit; a thin custom route + controller (or Artisan command writing a static llms.txt) reproduces the user-visible behavior with far less coupling.
Migration path (Symfony). v1.2.0 → v1.3.0 needs no code changes when link_header is off and WebLink APIs are unused. If either applies, add an explicit composer require symfony/web-link before upgrading, then clear/rebuild cache.
Compatibility. The new cache artifact shares the compiled-routes lifecycle and invalidation, which is the right coupling — it cannot drift independently of the routes in normal operation. Read-only build directories are supported only if cache:warmup runs during build, so pipeline ordering is a compatibility condition, not a given.
Sequencing.
link_header enabled? Any preload()/link()/addLink() usage, direct or transitive?symfony/web-link explicitly where required.cache:warmup and build-dir permissions are correct./llms.txt output byte-for-byte against the 1.2.0 baseline./llms.txt latency pre/post at our real route count.Maintenance. Net positive for runtime cost, but we take on a generated build artifact that ops and release tooling must understand. The explicit optional dependency is better long-term hygiene than an implicit transitive one, at the cost of one more composer.json line to keep honest.
Support. The container-build failure for missing symfony/web-link is clear and early — good diagnosability. The invalid-option case is the opposite: it fails only requests for the file, so we need an alert on /llms.txt 5xx responses; crawler traffic is sporadic and a broken file can go unnoticed for days.
Scaling. This is the reason to take the release. At ~1,000 routes the per-request scan was tolerable; at 10,000 routes 720 ms on a crawler-triggered endpoint is a latent timeout and CPU-burst risk. The fix makes cost roughly independent of route count, which de-risks route growth rather than merely speeding up today.
Failure modes. Missing symfony/web-link with link_header on → container build failure (deploy-blocking, no traffic impact if caught in build). Same package missing while app code uses WebLink APIs → boot failure. Stale route cache → /llms.txt silently reflects old routes; most likely in pipelines without warmup or with ephemeral build dirs. Read-only build dir without warmup → generation failure. Invalid llms_txt option → 500 on the file only.
Ramp-up. Low for a Symfony team; route-cache-plus-warmup is familiar ground. For a Laravel team, near-zero direct reuse — budget a small in-house implementation and do not book the 9×/38× numbers as a benefit we receive unless we replicate the same caching and invalidation.
How can I help you explore Laravel packages today?