docs: align ai.contentrain.io with shipped behavior across all packages#90
Merged
Conversation
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).
✅ Deploy Preview for contentrain-ai ready!
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).
Member
Author
|
Added in 9ecf304: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
dry_run: true" as a core principledry_runexists only oncontentrain_apply; other writes are guarded bycr/*isolation, the pre-commit validation gate, andconfirm: trueon destructive tools{ "type": "relation", "relation": "team-members" }model(and the Zod schema is.strict()) — the old example failed as written0.0.0.0and enforces Bearer per-request only when a token is setoptionson select+icon,unique"collection only",min/maxas date rangesoptionsis select-only (rejected elsewhere),uniqueis collection+document (rejected on singleton),min/max/patternenforced generically on string values — no date-range semantics;relationssupports countmin/max{slug}.json; "cascade warning" on entry delete{slug}/{default-locale}.json; entry deletes have no reference guard — broken relations are errors on the next validatebulk update_statuscan set any statuscdn.contentrain.ioGET /api/cdn/v1/{projectId}/{path}, correctly framed as a Studio featureAlso fixed
publish_at/expire_at,content_listpagination, and the missing subpath exports (root,tools/availability,testing/conformance) documentedcontentrain_scan, which is filtered out oftools/listand can never return that error — replaced with the real call-time case; hint string now byte-matchesguards.ts; brokenr.errorguard removed from the plan-API sample; GitLabprojectId(required) + auth union fields +contentRootdocumented#contentrain/*subpath (generator emits it) in both the imports block and tsconfig advice; document/non-i18n data module naming; DocumentQuerysort; types page no longer claims constants are the only runtime exports — the 13 validate/serialize functions,SECRET_PATTERNS, and NormalizePlan types are documented;LOCAL_CAPABILITIEScorrected to 5-of-7demo.mdwas unreachable from nav/sidebar (despite being the landing CTA) — added to sidebar;og:imagepointed at a file that didn't exist —og-image.png(1200×630) added; frontmatterordercollisions resolved~86 linesclaim for essential rules dropped (file is 139 lines and drifts) — docs, CLAUDE.mdDeliberately left
npx -yin Codex/Claude Desktop blocks vs plainnpxin IDE configs — consistent with whatcontentrain setupemits and with packages/mcp.md's conventionserver.tsDEFAULT_INSTRUCTIONSoverstates dry_run the same way the docs did; a guided "first model" onboarding path (SWOT W2) is worth a dedicated pageVerification
vitepress buildclean — no dead links, sitemap OK. No package source touched.🤖 Generated with Claude Code