Skip to content

docs: documentation drift audit and rework tracking#233

Draft
vredchenko wants to merge 3 commits into
mainfrom
docs/drift-audit
Draft

docs: documentation drift audit and rework tracking#233
vredchenko wants to merge 3 commits into
mainfrom
docs/drift-audit

Conversation

@vredchenko

@vredchenko vredchenko commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Draft tracking PR for the documentation rework. Rather than rewrite the docs blind, this lands a
measured audit of the current docs against reality, so the rework can reuse what is still true and
target what is missing. Two axes are now covered:

Drift results

64 docs -> 2,560 content atoms. Verifiable subset (how-to / reference / tutorial): 34 files -> 960 claims.
Every prose atom decomposed into factual claims, each checked against the real repositories. ADR/design docs
parked (historical record, not drift).

Verdict Claims Share Meaning
true 763 79% reuse as-is
misleading 119 12% right fact, drifted context - fix in place
incorrect 56 6% false as written - rewrite or bin
unverifiable 22 2% needs a live system

79% of documented claims are true - the rework is a re-organise-and-fill exercise, not a blank page.

  • Repo-split drift dominates. Most non-true claims are misleading, not wrong: tooling moved
    smartem-decisions -> smartem-devtools, so documented commands/paths point at the wrong repo.
  • Dead docs. The two athena pages document the athena_api package deleted under ADR 0015 - remove/rewrite.
  • Real code bugs surfaced: agent validate exits 0 when docs promise 1; --log-file is a no-op;
    -v/--verbose is inconsistent across subcommands.

Coverage results

The actual system surface enumerated from source and diffed against the docs corpus - the axis the drift
audit cannot see (a true claim can sit next to a large hole).

Surface Real surface Gap
Frontend routes 16 + shell 100% undocumented - now documented in docs/frontend/
Backend endpoints 88 1 code-only route; no hand-written reference; committed spec stale
Backend CLI tools 4 all undocumented
Env vars 32 read 13 undocumented + 8 stale docs-only
K8s 9 workloads + config mongodb/elasticsearch undocumented; HPA, ingress, /dls mount, 6 secret keys missing
Agent CLI 10 commands best-covered; verbose flag misdocumented; agent-cleanup absent

The largest hole is the entire shipped frontend. Coverage also surfaced real defects alongside doc
gaps: a stale committed OpenAPI spec (lags code by one endpoint), an orphaned HPA that no kustomization
deploys, and an incomplete secret.example.yaml (6 required keys missing).

Rework workstreams

  • Drift audit - what is true / drifted / wrong
  • Coverage-gap analysis - undocumented CLI / API / env vars / k8s / frontend surface
  • Write docs/frontend/ from scratch - 16 routes + shell, 0% covered, existing material misleading (index, architecture, routes, shell, development)
  • Backend endpoint reference + regenerate stale OpenAPI spec; document the 4 backend CLI tools
  • Complete env-var reference - 13 tunables; split app-config from deploy/infra; prune 8 stale tokens
  • K8s operator section - ingress, secrets, autoscaling, /dls mount
  • Fix drifted docs - 119 misleading claims, mostly path re-homing to smartem-devtools
  • Remove/rewrite dead docs - athena pages + 56 incorrect claims
  • Restructure and consistency - regroup by audience/task, unify terminology, reusing the true atoms
  • File defects surfaced by the audit - validate exit-code, --log-file no-op, verbose-flag mismatch,
    stale OpenAPI spec, orphaned HPA, incomplete secret.example.yaml

Notes

Draft, not for merge - the purpose is to track the rework. Analysis data (verdicts.jsonl) and the
re-runnable slicer (atomize.py) travel with the branch so findings are auditable and refreshable.
Neither report measures structure/consistency (grouping, navigation, terminology) - that remains a
rework workstream, not an audit output.

The docs under docs/ have drifted from the code since the workspace tooling
was split into smartem-devtools. Before rewriting blind, measure the drift:
slice each how-to/reference/tutorial doc into content atoms, decompose prose
into factual claims, and verify each against the repositories.

Lands the analysis (verdicts.jsonl, REPORT.md, interactive drift-map.html)
and the re-runnable slicer (atomize.py) as the tracking point for the rework.
@vredchenko vredchenko added the documentation Improvements or additions to project documentation label Jul 9, 2026
The drift audit measures whether documented claims are true; it cannot
see undocumented system surface. This adds the coverage axis: the actual
agent CLI, backend API, env vars, k8s resources, and frontend routes
enumerated from source and diffed against the docs corpus.

Largest gap is the entire shipped frontend (16 routes, no docs/frontend/).
Also surfaces real defects alongside the doc gaps: a stale committed
OpenAPI spec, an orphaned HPA that no kustomization deploys, and an
incomplete secret.example.yaml.
The docs corpus had no frontend documentation at all - the coverage-gap
analysis found 16 shipped routes and the entire shell undocumented, with
the only existing material (the design/requirements records) describing a
route scheme and a legacy app that were never/no longer shipped.

Adds docs/frontend/ documenting the app as shipped: architecture (monorepo,
stack, file-based routing, the generated API client, theming), a route/view
reference grounding every view in its backend endpoints, the shell
(navigation, command palette, settings, feature flags), and development
(run modes, mock mode, API client regeneration, build and release).

The webui nav and MDX regenerate from these sources via the existing
prebuild step; validated locally (Frontend section renders, 0 errors).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to project documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant