agent-native icon indicating copy to clipboard operation
agent-native copied to clipboard

docs: visual overhaul — diagrams, API/schema specs & annotated code throughout

Open steve8708 opened this issue 5 months ago • 10 comments

What & why

A comprehensive visual upgrade of the documentation, inspired by Visual Plans / Visual Recaps. The docs were too text-heavy; now every doc carries hand-drawn (rough.js) architecture and flow diagrams, plus — where they genuinely help — expandable API-endpoint and schema/data-model blocks, annotated-code walkthroughs, file trees, and callouts. Walls of text were broken into scannable sections.

Crucially, the docs reuse the exact same @agent-native/core/blocks library that powers Plans, so a diagram in the docs looks identical to one in the Plan app — same sketchy aesthetic, same dark/light theming, same expand affordance.

How it works

  • Renderer: DocContent splits each markdown doc into prose runs and visual-block runs. Prose renders through the existing markdown pipeline; blocks render through the shared BlockView. Blocks are authored as fenced code blocks namespaced with an an- prefix (an-diagram, an-api, an-schema, an-annotated-code, an-file-tree, an-callout, …) so they can never collide with ordinary code fences (```json, ```ts, ```diff all still render as code).
  • Global sketchy/clean toggle: a header control plus a new per-diagram hover toggle (added in core, so the Plan app gets it too). Both flip the shared plan-wireframe-style localStorage preference — global, persisted, cross-tab synced, dark/light aware.
  • Block isolation: blocks render as siblings outside .docs-content so doc prose CSS (tables, links, paragraphs) can't bleed into a block's own design.

Validation — no broken docs in prod

A build-time test (docBlocks.validate.test.tsx) scans every doc, and for each embedded block: (1) validates the body against the block's zod schema with a precise error, and (2) SSR-renders it (the prod first-paint path). A single JSON typo or wrong field can no longer ship a broken page. Parser unit tests guard the an-* fence splitting and alias resolution.

Verified end-to-end

  • pnpm typecheck (docs) ✅ · core + docs pnpm build ✅
  • Docs test suite: 47 passing (incl. block schema + SSR-render validation across all 81 docs) ✅
  • Core block library tests: 202 passing ✅
  • Render smoke test against the built server: diagrams (data-style="sketchy"), expandable/toggle affordances, annotated code, and API/schema tables all render; zero raw an-* fences leaked as code.

Notes

  • packages/core change (diagram hover toggle) ships with a changeset.
  • All block content is derived from each doc's existing, accurate content; frontmatter, links, and {#anchors} are preserved.

🤖 Generated with Claude Code


Generated by Claude Code

steve8708 avatar Jun 19 '26 13:06 steve8708

Deploy Preview for agent-native-scheduling ready!

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-scheduling/deploys/6a354d6e5f5ac700089cd111
Deploy Preview https://deploy-preview-1320--agent-native-scheduling.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Make changes Run an agent on this branch

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

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-voice ready!

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-voice/deploys/6a354d6e1a0acc0008137892
Deploy Preview https://deploy-preview-1320--agent-native-voice.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Make changes Run an agent on this branch

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

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-design canceled.

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-design/deploys/6a354d6ed8b7c30008bac657

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-images ready!

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-images/deploys/6a354d6ecce957000858d94b
Deploy Preview https://deploy-preview-1320--agent-native-images.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Make changes Run an agent on this branch

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

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-brain ready!

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-brain/deploys/6a354d6e4658ba00084b8d5e
Deploy Preview https://deploy-preview-1320--agent-native-brain.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Make changes Run an agent on this branch

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

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-meeting-notes ready!

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-meeting-notes/deploys/6a354d6ed0431100083220b8
Deploy Preview https://deploy-preview-1320--agent-native-meeting-notes.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Make changes Run an agent on this branch

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

netlify avatar Jun 19 '26 13:06 netlify

⚠️ Review Agent ran into a problem and couldn't finish reviewing the latest commit.

We've been automatically notified and are looking into it. Push a new commit to re-trigger the review, or contact [email protected] if this keeps happening.

Error ID: cf3bb7dcac6a4494811d13927667edab

builder-io-integration avatar Jun 19 '26 13:06 builder-io-integration

Deploy Preview for nutritrack-daily-calories canceled.

Name Link
Latest commit 387f0fdb5f6b25a8a2de32d1bd79e53a9b9425a6
Latest deploy log https://app.netlify.com/projects/nutritrack-daily-calories/deploys/6a35471a0baf320008b197e0

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-starter canceled.

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-starter/deploys/6a354d6e70e5640008b0b401

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-videos canceled.

Name Link
Latest commit ceb49e8cee93a238a6e0173c965f10d4de742164
Latest deploy log https://app.netlify.com/projects/agent-native-videos/deploys/6a354d6eb489a40008f91fe0

netlify avatar Jun 19 '26 13:06 netlify

Deploy Preview for agent-native-dispatch canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-dispatch/deploys/6a354b8c0baf320008b2ecc9

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-macros canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-macros/deploys/6a354b8c93bb0300082c0554

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-calendar canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-calendar/deploys/6a354b8f77148b00087dc64c

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-mail canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-mail/deploys/6a354b8ce21e550008d86a04

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-slides canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-slides/deploys/6a354b8c2d5f710008c62f9d

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-content canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-content/deploys/6a354b8cd8b7c30008ba7dee

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-forms canceled.

Name Link
Latest commit 235e315ab43674e2e24a478b2b7082c1f36e1773
Latest deploy log https://app.netlify.com/projects/agent-native-forms/deploys/6a354b8cd8b7c30008ba7df2

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-mail canceled.

Name Link
Latest commit 37d1e74343a0cee1228fd208097103df6d7b1252
Latest deploy log https://app.netlify.com/projects/agent-native-mail/deploys/6a354cbf797b8d0008c15552

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-forms canceled.

Name Link
Latest commit 37d1e74343a0cee1228fd208097103df6d7b1252
Latest deploy log https://app.netlify.com/projects/agent-native-forms/deploys/6a354cbf2783900008ac5582

netlify avatar Jun 19 '26 14:06 netlify

Deploy Preview for agent-native-calendar canceled.

Name Link
Latest commit 37d1e74343a0cee1228fd208097103df6d7b1252
Latest deploy log https://app.netlify.com/projects/agent-native-calendar/deploys/6a354cbf797b8d0008c1554d

netlify avatar Jun 19 '26 14:06 netlify