Everything the documentation generation needs about one project build in one self contained message The Klok Gradle plugin fills the payload during the build and publishes it on the Klok broker in klok cli does the same for a repository without Gradle with only KlokDocumentationEgress KLK007 builds the project s documentation on docs klok dev from that payload alone and klok dev builds the integration context graph from the same payload when the plugin s posts it Question why self contained Because it makes documentation generation a service A project on a git server the worker cannot reach is documented exactly like one on Property Value Information model class A public the payload is the contract between every tenant s builds and the platform s documentation service and the producer runs in builds outside Klok too Tenant domain klok public Schema schema definition xsd klok project documentation v1 xsd root element KlokProjectDocumentation_v1 record KlokProjectDocumentationV1 Topic persistent <tenant> _<env> common KlokProjectDocumentationV1_prepared in the documented repository s own tenant purpose prepared Java dev klok klok datamodel klok project documentation v1 on Maven Central package dev klok klok datamodel public_ klok_project_documentation_v1 catalog alias klokLibs klokProjectDocumentationV1 Python klok datamodel klok project documentation v1 in this project s GitLab PyPI registry TypeScript @klok integration datamodel klok project documentation v1 on npmjs org releases are staged and published by a maintainer Owner Klok platform KLK007 and the Klok tools The datamodel captures all information required for documentation generation from a single Klok project build packaged into a self contained message Its primary purpose is to decouple the documentation generation process from the source code repository ensuring that receiving services do not require direct access to the project s Git server This design allows projects hosted on any Git platformwhether internal or foreign GitLab GitHubto be documented in the same standardized manner as the payload itself contains all necessary context including routes solutions source references configurations and documentation files The message is primarily produced by the Klok Gradle plugin during a build process that scans sources and dependencies though the klok command line interface can generate a reduced payload for non Gradle projects Once assembled the message is published to the Klok broker topic Key consumers such as the KlokDocumentationEgress route and the klok dev portal use this payload to generate documentation pages build integration context graph nodes and verify solution registries without ever querying the original repository The model is structured with a CloudEvents envelope and a comprehensive payload that includes project metadata route definitions centralized source code maps folder contents and configuration keys utilizing a claim check mechanism for payloads exceeding 3 MiB klok project documentation v1 git klok dev persistent <tenant> _<env> common KlokProjectDocumentationV1_prepared klok docs Envelope CloudEvents attributes on the outside the payload in Attribute Value type dev klok documentation project prepared source urn gradle <projectPath> <taskName> from the Gradle plugin urn klok cli docs send <repoPath> from klok cli subject the project name id time specversion a new id per publish the publish time 1 0 datacontenttype application json Payload Field Content project tenant domain environment repo path and commit and the documentation identity docsRepoPath docId docScope solutions the integration solutions the routes claim with business context SLR and HLD markdown routes one entry per class extending a dev klok framework patterns base class directly or through base classes of the project sources every source file once addressed by qualifiedName with origin PROJECT FRAMEWORK_JAR DATAMODEL_JAR or DEPENDENCY_JAR dataModelDocs in a datamodel project the classes of the model klokDocs the whole klok docs folder one entry per file with sha256 configKeys keys from application properties values masked when the key matches pass secret token key or credential attachments openapi document README XSD and Avro schemas claimCheck for a payload over 3 MiB the reference to the whole payload in the tenant s claim check bucket the collections are then empty see Size and claim check payloadSizeBytes payloadSha256 the size and hash of the payload s JSON form always set by the producers componentDocs the classes and packages annotated with @KlokDocs added 2026 09 29 optional usedDatamodels the datamodels from jars the routes are bound to with where each one is documented added 2026 09 30 optional Routes reference sources they do not repeat them A route carries and all values that resolve into Most routes in a project share the same base class and the same datamodels so repeating the source per route would multiply the payload for no gain Avoid reading as a per route list It is a map keyed by added 2026 09 29 optional lists the project s own top level types the route references anywhere in its class method bodies included one level deep It excludes the route itself other routes they are in or have their own entry and types from jars The documentation gives these sources to the route s AI prompts so a route that calls is described from what actually does names the project s other routes a route calls through their direct URI a class literal of the route in the route s own class a REST operation s handler or since 2026 09 30 in a project class the route references so a route that calls a sub route through a helper names it too Its reverse is what the documentation shows as used by on the called route s page added 2026 10 27 optional is set on a REST API handler annotated see MCP tools in the klok quarkus extension documentation the tool s name and description as a model reads them whether it writes whether it is on without configuration false for a tool that writes and its key the verb and full path of the REST operation it calls the MCP hints its arguments path query or body and the reply type The documentation turns it into an MCP tools page and the tenant skill s facts Components A class record enum interface or package annotated with from is an important component that is not a route central configuration a shared mapper domain logic used by several routes Each one is an entry in and gets its own documentation page Field Content qualifiedName simpleName the type or the package name for PACKAGE kind CLASS RECORD ENUM INTERFACE annotation types too or PACKAGE summary chapter the annotation s attributes an empty chapter means the standard components chapter javadoc the Javadoc of the annotated element sourceRef the entry in sources empty for a package or a source over the producer s size cap memberSignatures one line per public member for a package its public types usedBy the route ids whose class references the component Datamodels the routes use added 2026 09 30 optional is the other direction of a datamodel project s one entry per datamodel class from a jar that the routes are bound to their with where that datamodel lives and is documented The producer reads the origin from in the datamodel s jar which the Klok Gradle plugin writes when it builds a datamodel a jar built before that has no metadata and its entries carry only and Field Content qualifiedName simpleName the datamodel class artifact group name version of the jar the version this project was built with repoPath docsRepoPath docId the datamodel s repository its documentation project and its id on docs klok dev usedBy the route ids bound to it The documentation links a route s datamodels to their own documentation with it and lists on each datamodel s pages the projects and routes of the same tenant that use it These additions are optional so a consumer built against the earlier V1 ignores them and a payload without them is rendered exactly as before Changed pages without git Every entry in carries the of its decoded bytes The receiver keeps the hashes of the previous run and compares which gives added changed and removed pages without a against the source project Secrets The payload carries source code documentation and configuration keys It carries no secret values the Gradle plugin masks any value whose key matches or and it never reads the environment beyond the build coordinates Warning do not add a field to this datamodel that could carry a credential The payload is kept on the broker and what it carries is published as documentation publishKlokDocs klok docs send klok docs publishKlokContext git klok dev data sourceRef superClassRef processingPatternRefs subRouteRefs dataModelRefs qualifiedName sources sources qualifiedName referencedSourceRefs subRouteRefs KlokStandard get KlokStandard subRouteRefs directUriOf X class subRoute X class client call KLK003S3_Chat class mcpTool @KlokMcpTool enabledByDefault kind mcp tool @dev klok framework common docs KlokDocs klok common componentDocs usedDatamodels dataModelDocs dataModelRefs META INF klok datamodel properties qualifiedName artifact usedBy klokDocs sha256 git diff application properties pass secret token key credential ConfigKeyCollector