Skip to content

docs(generator): document data provenance and source-of-truth rules - #1111

Closed
teallarson wants to merge 6 commits into
chore/hardeningfrom
docs/generator-architecture
Closed

docs(generator): document data provenance and source-of-truth rules#1111
teallarson wants to merge 6 commits into
chore/hardeningfrom
docs/generator-architecture

Conversation

@teallarson

@teallarson teallarson commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

On hold — do not merge. Superseded by #1112.

Purpose

This draft records the provenance and source-of-truth rules for the toolkit documentation pipeline. It explains how upstream API data, design-system metadata, generated enrichment, and hand-authored curation become the JSON consumed by the docs app.

How it fits

API + design metadata + LLM enrichment + curation
                         │
                         v
                      merger
                         │
                         v
                 toolkit JSON -> docs app

The document is intended to make field ownership and durability clear when debugging generated output or changing a pipeline stage. It covers the shared schema, category and URL derivation, toolkit grouping, corruption handling, exclusions, caching, and metadata completeness.

Status

The original draft described hand-authored prose as living only in generated JSON and warned that forced regeneration could delete it. #1112 now gives that prose a durable curation/ source, so this PR's prose-hazard section is outdated.

This should be rewritten as the narrower, post-#1112 provenance document before it is considered for merge. The current draft is retained only as a reference for that rewrite.

@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 4, 2026 3:39pm

Request Review

teallarson and others added 3 commits August 3, 2026 15:46
ARCHITECTURE.md described the pipeline but not where any individual field
comes from, so tracing a wrong category or a missing callout back to its
origin meant reading the generator end to end.

Adds a pipeline diagram, a per-field provenance table, and the constraints
that are not visible from any single file:

- The output directory is also an input. Hand-authored documentationChunks,
  customImports, and subPages have no upstream source and survive only
  through previous-output carry-forward, so --force-regenerate and
  --overwrite-output discard them as a side effect.
- src/shared/toolkit-schemas.ts is the one contract, validated on write by
  the generator and on read by the app.
- metadata.category and docsLink come from a pinned design-system
  dependency and determine the page URL, making a version bump a routing
  change. An unrecognized category throws rather than falling back.
- Toolkits are derived by grouping tools, not fetched as a list.
- Absence and corruption are different failures, enforced on both halves.

Also records the skip-toolkits/remove-toolkits distinction, the cached
loader, and the shared modules under src/shared/.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…lve-pr-1111

# Conflicts:
#	tests/toolkit-data-cache.test.ts
@teallarson

Copy link
Copy Markdown
Contributor Author

outdated

@teallarson teallarson closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant