---
title: "Developer"
manual: "LLMS TXT Generator"
version: "0.3"
permalink: "https://docs.typo3.org/permalink/web-vision/ai-llms-txt:developer@0.3"
source: "Developer/Index.rst"
rendered: "2026-10-13T13:11:58+00:00"
---

# Developer {#developer}

## Architecture {#architecture}

Both outputs are TypoScript page objects that call a `USER` function on
`WebVisionAiLlmsTxtControllerLlmsTxtController`:

-   **`llms.txt` (typeNum 1699)**

    `generateAction()` delegates to `LlmsTxtGeneratorService`, which
    reads the site settings through `ConfigurationService`, builds the
    page tree with `NavigationBuilder` and caches the result if a cache
    lifetime is configured.

-   **Markdown (typeNum 1701)**

    `renderPageAsMarkdown()` checks that Markdown output is allowed for
    the site and page, renders the page's content through TYPO3's
    `ContentObjectRenderer`, strips layout markup with
    `HtmlCleanerService` and converts the result with
    `MarkdownConverterService` (based on `league/html-to-markdown`).

| Class (`WebVision\AiLlmsTxt\…`) | Responsibility |
| --- | --- |
| `Controller\LlmsTxtController` | Entry points for both page types |
| `Service\LlmsTxtGeneratorService` | Assembles `llms.txt` and manages its cache |
| `Service\ConfigurationService` | Typed access to the site settings |
| `Builder\NavigationBuilder` | Builds and formats the page tree, with language fallback |
| `Repository\PageRepository` | Page queries with frontend restrictions, batched per tree level |
| `Service\UrlGeneratorService` | Absolute frontend URLs for page records |
| `Service\HtmlCleanerService` | Removes empty and layout-only markup before conversion |
| `Service\MarkdownConverterService` | HTML to Markdown conversion |
| `Command\DownloadMarkdownCommand` | CLI command `ai-llms:download-markdown` |

## Public API and backward compatibility {#api}

The extension follows [Semantic Versioning](https://semver.org/). 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](https://docs.typo3.org/permalink/web-vision/ai-llms-txt:configuration-site@0.3)),
-   the page types 1699 and 1701 and the bundled route enhancer,
-   the structure of the `llms.txt` and Markdown output,
-   the CLI command `ai-llms:download-markdown` and its options.

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 {#testing}

Tests run in containers through `Build/Scripts/runTests.sh` (Docker or
Podman). Install the dependencies for the TYPO3 version to test first:

```bash
# 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/Scripts/runTests.sh -h` for all options. The same suites run on
GitHub Actions for TYPO3 13 and 14 with PHP 8.2 to 8.4.

## Contributing {#contributing}

Contributions are welcome at [https://github.com/web-vision/ai-llms-txt](https://github.com/web-vision/ai-llms-txt).

-   Follow the TYPO3 coding guidelines: `Build/Scripts/runTests.sh -s cgl`
    fixes most issues automatically.
-   Add tests for new behaviour and bug fixes. Test methods use the
    `#[Test]` attribute instead of a `test` prefix.
-   Document new settings in [Site settings](https://docs.typo3.org/permalink/web-vision/ai-llms-txt:configuration-site@0.3).
-   Use `declare(strict_types=1)`, full type declarations and constructor
    injection.

Please report security issues privately as described in `SECURITY.md`,
not in the public issue tracker.
