Developer
Architecture
Both outputs are TypoScript page objects that call a USER function on
Web:
llms.(typeNum 1699)txt generatedelegates toAction () Llms, which reads the site settings throughTxt Generator Service Configuration, builds the page tree withService Navigationand caches the result if a cache lifetime is configured.Builder - Markdown (typeNum 1701)
renderchecks that Markdown output is allowed for the site and page, renders the page's content through TYPO3'sPage As Markdown () Content, strips layout markup withObject Renderer Htmland converts the result withCleaner Service Markdown(based onConverter Service league/).html- to- markdown
Class (Web) |
Responsibility |
|---|---|
Controller\ | Entry points for both page types |
Service\ | Assembles llms. and manages its cache |
Service\ | Typed access to the site settings |
Builder\ | Builds and formats the page tree, with language fallback |
Repository\ | Page queries with frontend restrictions, batched per tree level |
Service\ | Absolute frontend URLs for page records |
Service\ | Removes empty and layout-only markup before conversion |
Service\ | HTML to Markdown conversion |
Command\ | CLI command ai- |
Public API and backward compatibility
The extension follows Semantic Versioning. The following are covered by it and change incompatibly only in a new major version - or, while the version is below 1.0, only in a new minor version (for example 0.3 to 0.4, never 0.3.0 to 0.3.1):
- the site configuration settings (Site settings),
- the page types 1699 and 1701 and the bundled route enhancer,
- the structure of the
llms.and Markdown output,txt - the CLI command
ai-and its options.llms: download- markdown
The PHP classes are internal. They are not marked final so that projects
can replace a service through dependency injection, but their methods may
change in minor versions. If you need a stable hook, please open an issue
describing your use case.
Testing
Tests run in containers through Build/ (Docker or
Podman). Install the dependencies for the TYPO3 version to test first:
# Install dependencies for TYPO3 13 (or 14)
Build/Scripts/runTests.sh -t 13 -s composerUpdate
# Unit and functional tests
Build/Scripts/runTests.sh -t 13 -p 8.2 -s unit
Build/Scripts/runTests.sh -t 13 -p 8.2 -s functional -d sqlite
# Static analysis and coding guidelines
Build/Scripts/runTests.sh -t 13 -s phpstan
Build/Scripts/runTests.sh -s cgl -n
Run Build/ for all options. The same suites run on
GitHub Actions for TYPO3 13 and 14 with PHP 8.2 to 8.4.
Contributing
Contributions are welcome at https://github.com/web-vision/ai-llms-txt.
- Follow the TYPO3 coding guidelines:
Build/fixes most issues automatically.Scripts/ run Tests. sh - s cgl - Add tests for new behaviour and bug fixes. Test methods use the
#attribute instead of a[Test] testprefix. - Document new settings in Site settings.
- Use
declare, full type declarations and constructor injection.(strict_ types=1)
Please report security issues privately as described in SECURITY.,
not in the public issue tracker.