docs(site): mermaid rendering, stat removal, and full-corpus persona-review fixes#2601
Merged
Conversation
Fumadocs was showing ```mermaid blocks (used on 7 pages: protocol diagram, kernel architecture, data-flow, permissions matrix, field-type decision tree, contracts, metadata-service) as plain code. Add a client-side Mermaid component (theme-aware, falls back to the source block on bad syntax) and a remark plugin that rewrites mermaid fences into <Mermaid chart=.../> — no content changes required. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018r9mjpF7jr9BKdzEmUE4uZ
Per review feedback, remove count-style statistics from module overviews and landing (field type counts, hook event counts, namespace tallies) in favor of qualitative descriptions — counts drift from the implementation and don't help readers. Also lands the first fixes from the reader-persona review pass: - ai/actions-as-tools: remove walkthrough of HITL demo tests that do not exist in examples/app-todo (only mcp-actions/seed tests exist); point at the real delete_completed danger action instead - ai/agents, ai/natural-language-queries: fix orphaned 'see above' references and same-page anchors that now live on sibling pages Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018r9mjpF7jr9BKdzEmUE4uZ
Seven reader-persona passes (first-time developer, schema modeler, logic author + API integrator, security admin, UI builder + AI admin, plugin developer, production SRE) read every hand-written page and verified claims against source before fixing. Highlights: - hooks: ctx.input is flat (installFlatInput) — the documented ctx.input.doc pattern never worked; fixed across hooks, events, error-handling-server, and the plugin tutorial - plugin tutorial: manifest example was missing required id (threw at parse) and registered a kernel hook name that never fires — a reader shipped a silently dead plugin; rewritten against engine.registerHook - permissions: removed the false implicit manager-visibility claim (role hierarchy grants nothing by itself); owner-type sharing rules and group/guest recipients marked declared-but-unenforced; FLS semantics corrected to default-visible for undeclared fields; no-sharingModel = no record filter warning added - data modeling: removed invented cdc/partitioning/recordTypes object config (schema hard-rejects), phantom field props (pruned 2026-06), wrong autonumber key; new expand (related records) query section - api: removed ADR-0019-deleted workflow approve/reject endpoints, invented webhook rate-limiting; realtime status stated honestly (in-process pub/sub; WS/SSE transport plugin-provided); error handling documents the two real wire formats - protocol: maskingRule/encryptionConfig sections re-scoped to their real status (System schemas exist; field wiring pruned, channel is type:'secret' + FLS) - deployment: env-var table repaired and completed (OS_SECRET_KEY, cluster vars), stale CLI paths and ten dead links fixed - onboarding: REST route /api/v1/data/:object, send_email→notify node, npx os pointers, nine dead ADR links - runtime-services: binding note — services.* is the contract surface; open-framework hooks use ctx.api / ctx.getService Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018r9mjpF7jr9BKdzEmUE4uZ
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Docs: mermaid support + statistics removal + full-corpus reader review
Follow-up to #2584/#2593. Three parts (one commit each):
1. Mermaid diagrams render (
b1ec299)Fumadocs was showing the
```mermaidfences on 7 pages (protocol diagram, kernel architecture, API data-flow, permissions matrix, field-type decision tree, contracts, metadata-service) as plain code blocks. Added a client-side theme-awareMermaidcomponent plus a remark plugin that rewrites mermaid fences into<Mermaid chart=.../>— zero content changes, falls back to the source block on bad syntax.2. Numeric statistics removed (
8a3e5ca)Count-style claims ("N field types", "N hook events", namespace tallies) drift from the implementation and don't help readers — replaced with qualitative descriptions across the landing page and module overviews.
3. Full-corpus persona review (
f0f60a2)Seven reader personas — first-time developer, schema modeler, logic author, API integrator, security admin, UI builder, AI-enabling admin, plugin developer, production SRE — each read every hand-written page in their area end-to-end and verified claims against source (
packages/spec,packages/plugins/plugin-security/plugin-sharing,packages/rest,packages/objectql,packages/core,packages/cli, examples) before fixing. ~40 pages touched. The fixes that mattered most:Would have broken your code:
ctx.input.doc.<field>— the engine passes a flatctx.input(installFlatInput); the documented pattern never worked. Fixed in hooks, kernel/events, error-handling-server, and the plugin tutorial.id(throws at.parse()), and its flagship example registered a kernel hook name that is never triggered — a reader shipped a silently dead plugin. Rewritten against the realengine.registerHookpath.objects.mdxdocumentedcdc,partitioning, andrecordTypesconfig thatObjectSchema.create()hard-rejects; AutoNumber used the wrong key (format→autonumberFormat); many field props documented were pruned in the 2026-06 dead-surface cleanup.Would have misconfigured your security (admin persona):
buildReadFilter); rewritten around the two real opt-in paths (sharing-rule recipients,readScopescope-depth grants).group/guestrecipients are declared but not enforced (seeder skips with a warning) — now labeled.sharingModelhas no record-level filter at all.maskingRule/encryptionConfigwere taught as live field-level features; the field wiring was pruned (never had a runtime consumer) — re-scoped to schema-shape status with the real channel (type: 'secret'+ FLS).Would have misled integrators/operators:
POST /workflow/.../approve|rejectendpoints and invented webhook rate-limiting; realtime status stated honestly (in-process pub/sub; WS/SSE transport is plugin-provided, none ships open); error handling now documents the two real wire formats.OS_SECRET_KEY, cluster vars); stale CLI file references and ~25 dead links fixed across deployment/protocol/releases.services.*runtime docs got a binding note: they are the contract surface; open-framework hooks reach the same capabilities viactx.api/ctx.getService(...).Verification
check-doc-authoringclean (180 files); internal-link sweep: 0 broken/docs/...targets outside generated referencesnext buildpasses; mermaid transformation verified in built HTMLFollow-ups surfaced by the review (not addressed here)
unit_and_subordinatessharing recipient expands to zero users silently (sharing-rule-service.tshas no case for it); clientanalytics.meta(cube)/explaincall routes the dispatcher doesn't serve;HookContextSchemadoc-comment still saysdocwhere the engine passesdata; specrole.zod.tscomment repeats the manager-visibility misconception.releases/implementation-status.mdxself-contradicts (sharing/identity marked plugin-pending vs live elsewhere) and should be regenerated; no upgrade notes for v10/v11 though packages ship 11.x; troubleshooting page is dev-time only (no production incident runbook); auth token lifecycle for integrators is undocumented;relationships.mdxdeserves a fuller rewrite (deleteBehavior, lookup-picker config);nameField(ADR-0079) has no first-class doc; theos initscaffold emits a bare object literal while docs brand that style deprecated (needs a product decision).🤖 Generated with Claude Code
https://claude.ai/code/session_018r9mjpF7jr9BKdzEmUE4uZ
Generated by Claude Code