Skip to content

docs: align ai.contentrain.io with shipped behavior across all packages#90

Merged
ABB65 merged 2 commits into
mainfrom
docs/align-docs-site
Jul 17, 2026
Merged

docs: align ai.contentrain.io with shipped behavior across all packages#90
ABB65 merged 2 commits into
mainfrom
docs/align-docs-site

Conversation

@ABB65

@ABB65 ABB65 commented Jul 17, 2026

Copy link
Copy Markdown
Member

Seven parallel source-verified audits of the docs site — every page checked claim-by-claim against package source (mcp 2.0.1, cli 0.7.10, query 7.0.1, types 0.9.0, rules/skills 0.6.0), the Studio repo, and docs.contentrain.io. 34 confirmed divergences fixed, plus structural gaps. Nothing here changes runtime behavior; only docs/, the root README line about Studio plans, and one stale line-count in CLAUDE.md.

The sharpest fixes

Page Was Is
packages/mcp "Every write supports dry_run: true" as a core principle dry_run exists only on contentrain_apply; other writes are guarded by cr/* isolation, the pre-commit validation gate, and confirm: true on destructive tools
packages/mcp Relation example { "type": "relation", "relation": "team-members" } Schema key is model (and the Zod schema is .strict()) — the old example failed as written
cli + serve-ui "Non-localhost binds hard-error without authToken" attributed to MCP HTTP Inverted: the hard-error protects the web UI; MCP HTTP warns on 0.0.0.0 and enforces Bearer per-request only when a token is set
reference/field-types options on select+icon, unique "collection only", min/max as date ranges options is select-only (rejected elsewhere), unique is collection+document (rejected on singleton), min/max/pattern enforced generically on string values — no date-range semantics; relations supports count min/max
reference/model-kinds i18n:false document meta at {slug}.json; "cascade warning" on entry delete {slug}/{default-locale}.json; entry deletes have no reference guard — broken relations are errors on the next validate
reference/config Entry fields "follow schema order"; defaults "omitted entirely"; status table implied an enforced state machine Alphabetical sort (schema order is model-file-only); only null/undefined omitted; transitions are conventions, bulk update_status can set any status
concepts CDN at invented cdn.contentrain.io Studio's real delivery route GET /api/cdn/v1/{projectId}/{path}, correctly framed as a Studio feature
4 pages + README "managed Pro/Enterprise offering" Managed plans are Starter/Pro/Enterprise

Also fixed

  • mcp: trust table now covers all 24 tools accurately (scan read-only, merge local); scaffold lists all 7 templates; publish_at/expire_at, content_list pagination, and the missing subpath exports (root, tools/availability, testing/conformance) documented
  • guides: capability-error example used contentrain_scan, which is filtered out of tools/list and can never return that error — replaced with the real call-time case; hint string now byte-matches guards.ts; broken r.error guard removed from the plan-API sample; GitLab projectId (required) + auth union fields + contentRoot documented
  • sdk/types: #contentrain/* subpath (generator emits it) in both the imports block and tsconfig advice; document/non-i18n data module naming; DocumentQuery sort; types page no longer claims constants are the only runtime exports — the 13 validate/serialize functions, SECRET_PATTERNS, and NormalizePlan types are documented; LOCAL_CAPABILITIES corrected to 5-of-7
  • field-types: new "How Constraints Are Enforced" section — model_save authoring rules vs content_save write gate, error/warning severity split
  • Structural: demo.md was unreachable from nav/sidebar (despite being the landing CTA) — added to sidebar; og:image pointed at a file that didn't exist — og-image.png (1200×630) added; frontmatter order collisions resolved
  • ~86 lines claim for essential rules dropped (file is 139 lines and drifts) — docs, CLAUDE.md

Deliberately left

  • npx -y in Codex/Claude Desktop blocks vs plain npx in IDE configs — consistent with what contentrain setup emits and with packages/mcp.md's convention
  • Follow-ups (not docs): server.ts DEFAULT_INSTRUCTIONS overstates dry_run the same way the docs did; a guided "first model" onboarding path (SWOT W2) is worth a dedicated page

Verification

vitepress build clean — no dead links, sitemap OK. No package source touched.

🤖 Generated with Claude Code

Full audit of the VitePress docs site against package source (mcp 2.0.1,
cli 0.7.10, query 7.0.1, types 0.9.0, rules/skills 0.6.0) and the Studio
source/docs. Every factual claim was verified with file:line evidence;
this commit fixes everything that diverged.

Highlights:
- dry_run is contentrain_apply-only; other writes are guarded by cr/*
  isolation, the content_save validation gate, and confirm:true on
  destructive tools. The docs claimed a universal dry-run pattern that
  the schemas do not accept.
- relation example used a non-existent 'relation' key (schema wants
  'model' and is strict) — the example would fail as written.
- Trust table now covers all 24 tools with accurate read-only/local
  semantics (scan is read-only; merge is a local git op).
- serve security notes had the enforcement inverted: the hard-error on
  non-localhost binds protects the web UI; MCP HTTP only warns on
  0.0.0.0 and enforces Bearer per-request when a token is set.
- Field constraint tables now match enforcement reality: options is
  select-only, unique is collection+document (rejected on singleton),
  pattern/min-max apply to all string values (no date-range semantics),
  relations supports count min/max, maxSize is provider-enforced,
  accept is a warning-only extension check.
- Meta path for i18n:false documents corrected to
  {slug}/{default-locale}.json; entry deletes have no cascade guard —
  broken relations surface as errors on the next validate.
- Canonical serialization: entry fields sort alphabetically (schema
  order applies only to model files); defaults are not stripped.
- Studio alignment: real CDN endpoint pattern instead of the invented
  cdn.contentrain.io; managed plans are Starter/Pro/Enterprise.
- Structural: demo.md added to the sidebar, og-image.png now exists
  (1200x630), frontmatter order collisions resolved, missing exports
  (root, tools/availability, testing/conformance) and runtime function
  surface of @contentrain/types documented.

Verification: vitepress build clean (no dead links).
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for contentrain-ai ready!

Name Link
🔨 Latest commit 9ecf304
🔍 Latest deploy log https://app.netlify.com/projects/contentrain-ai/deploys/6a5a6406b78d7b0008a062c0
😎 Deploy Preview https://deploy-preview-90--contentrain-ai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

llms.txt is a curated index of the AI package surface (packages, key
facts, key pages) following the llms.txt convention, cross-linking the
Studio docs' own llms.txt. llms-full.txt is generated in the VitePress
buildEnd hook — all pages in sidebar order, frontmatter stripped, each
with a Source URL — so it exists on every deploy regardless of how the
build is invoked and never drifts from the published pages. Pages
missing from the order list are appended automatically.

Verification: vitepress build clean; dist contains llms.txt (2.9 KB)
and llms-full.txt (282 KB, all 22 pages).
@ABB65

ABB65 commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Added in 9ecf304: /llms.txt (curated index, committed) and /llms-full.txt (generated in the VitePress buildEnd hook on every build — all pages in sidebar order with Source URLs, auto-appends pages missing from the order list). Verified: dist contains both after a clean build.

@ABB65
ABB65 merged commit 9dec0bb into main Jul 17, 2026
6 checks passed
@ABB65
ABB65 deleted the docs/align-docs-site branch July 17, 2026 17:23
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant