Skip to content

ADR-0025 — AI as Consumer, Not Producer of TDS Content

Status

Accepted

Context

Issue #4 observes a gap: the repository exposes the Backstage catalog to AI agents over MCP (ADR-0009), AI tooling increasingly drafts documentation, and the TDS is deliberately deterministic — but nothing states where the line is between deterministic generation and AI assistance. As agent integration grows, the determinism promise risks being diluted by an accumulation of unstated exceptions. Three questions needed answers:

  1. Which TDS content is machine-generated and which is authored?
  2. May AI assist in producing content at all, and under which guardrails?
  3. What is the standing role of AI relative to the TDS — producer, co-author, or consumer?

Decision

  1. [DECISION] The TDS generation path contains no AI, and the drift gates keep it that way. Every artefact under docs/generated/ is produced by a deterministic generator from version-controlled sources (terraform-docs, DscResource.DocGenerator, the stdlib-only scripts/generate-*.py tools of ADR-0018/0021/0022/0024), and CI regenerates each one and fails on committed drift. This is structural, not just policy: an LLM-authored edit to a generated artefact cannot survive the next pipeline run. docs/architecture/ ai-boundary.md (governed by this ADR) enumerates the full generated/human-authored/AI-assisted classification as documentation surface.

  2. [DECISION] AI assistance is admitted only for human-authored content, through the ordinary PR gates. AI-drafted ADR prose, runbook updates, or requirement wording is a proposal: a human owns the pull request, the text lands as ordinary version-controlled Markdown, and it passes the same gates as any human draft — the ADR boundary gate, the documentation coverage gate (ADR-0006), the strict MkDocs build, and SpecTree validation where applicable. AI never writes into docs/generated/, never commits directly, and is never a pipeline step: no CI job may call an LLM, because generated artefacts must be byte-reproducible from the tree alone (the ADR-0018 determinism bar).

  3. [DECISION] The standing role of AI is read-only consumer. Agents query the Backstage catalog via MCP (ADR-0009) and read the published docs and committed JSON artefacts (catalog, metadata contract, composition report). Consumption may trigger contribution — an agent may open a PR — but proposals pass the identical human review gates. Extending MCP tooling to serve more of the TDS (e.g. the traceability metadata) is compatible with this boundary; producing spec content is not.

Consequences

Positive

  • The determinism promise is now documented, not implicit — the classification page gives every contributor and agent the same explicit line.
  • AI value is captured where it is safe (catalog querying, drafting proposals) without opening the generation path.
  • The boundary is enforced by existing gates (drift, boundary, coverage, selftests), so it needs no new enforcement machinery.
  • Future AI features have a decision to supersede rather than an ambiguity to erode.

Negative / Trade-offs

  • Human review remains a hard requirement; AI acceleration cannot remove it, by design.
  • The classification page must be kept current as new generators or AI surfaces are added — it is a living governance document, not a one-time statement.
  • A repository wanting LLM-authored narrative summaries (e.g. auto-generated ADR digests) cannot have them in the deterministic tree; they would require a new decision superseding this one.

Alternatives Considered

  • LLM-generated narrative summaries in CI — rejected: nondeterministic output, unverifiable provenance, breaks the drift gate and the ADR-0018 reproducibility bar.
  • Ban AI assistance entirely — rejected: drafting help for human-authored pages is useful and safe precisely because the gates review the result, not the author.
  • Allow AI into docs/generated/ with review — rejected: the drift gate makes every generated byte re-derivable; an LLM in that path adds nothing it can keep, and reviewing "generated" output defeats the purpose of generation.
  • ADR-0009 — the MCP surface that makes AI a first-class consumer.
  • ADR-0012 and ADR-0018 — the determinism and traceability machinery this boundary protects.
  • ADR-0006 — the coverage gate that binds code changes to documentation changes.
  • Requirement AI-004 — this decision satisfies it; the classification lives in AI/LLM Boundary.