Cadence-lang redesign + AI tools (MCP, Skills, LLM endpoints, AI Chat)#285
Cadence-lang redesign + AI tools (MCP, Skills, LLM endpoints, AI Chat)#285lmcmz wants to merge 125 commits into
Conversation
Complete rewrite of cadence-lang.org: - Fumadocs UI with TanStack Start router and Vite bundler - Tailwind CSS 4 with Geist font family (including Pixel display variants) - Custom Cadence syntax highlighting via Shiki + TextMate grammar - AI-native homepage: skills command, LogoLoop ticker, social proof section - AI toolkit section: Agent Skills, MCP Server, llms.txt, per-page AI actions - Theme toggle with View Transitions API sweep animation - StickerPeel draggable stickers (gsap + Draggable, SSR-safe) - SEO: JSON-LD structured data, sitemap, robots.txt - Env var VITE_SKILLS_ORG for org-agnostic skills command - All 82 docs migrated to content/docs/ with GFM admonitions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate from Docusaurus to Fumadocs + TanStack Start + Vite
- VITE_SKILLS_ORG env var controls homepage skills command org - Try/catch around Shiki codeToHtml with plain-text fallback - Add .vercel/output to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migrate to Fumadocs + TanStack Start + Vite
- Set Nitro runtime to nodejs20.x (was defaulting to nodejs24.x) - Add buildCommand, installCommand, framework:null to vercel.json - Prevents Vercel from auto-detecting wrong framework Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix Vercel: nodejs20.x runtime + build config
- Remove cleanUrls/trailingSlash from vercel.json (may conflict with Nitro routing)
- Simplify vite.config.ts to bare nitro({ preset: 'vercel' })
- Remove .vercel/output from git tracking (already in .gitignore)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: simplify Vercel deployment config
The native binding (@takumi-rs/core-linux-x64-gnu) is not available in Vercel's serverless environment. Move to dynamic import so the module is only loaded when the OG image route is hit, with SVG fallback when the native binding is unavailable. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: dynamic import for OG image native binding
…ibility and fumadocs theme
|
@zenabot27 is attempting to deploy a commit to the Flow Team on Vercel. A member of the Team first needs to authorize it. |
… sidebar context crash
…idebar llms links
…thub icons, remove llms from header
…rt ./ MDX links to absolute paths
…is visible on mobile
…-patterns and anti-patterns
Add LSP_BINARY env var to run integration tests against a standalone LSP binary instead of Flow CLI. All 30 tests pass with v2. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chore: sync SKILL.md from docs changes
The debug endpoint leaked file paths, flow.json contents, and directory listings without authentication. The /health endpoint is sufficient for monitoring LSP status. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat: integrate Cadence LSP v2 binary into MCP server
Add POST /api/security-scan that runs static analysis + LSP type check directly, bypassing the MCP tool call. This eliminates the need for Claude to re-output the entire contract code as tool arguments, which was extremely slow for large contracts (100KB+). Extract createApp() from http.ts for testability. Co-authored-by: ZenaBot <qq_agent_hao@proton.me> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ution (#13) Co-authored-by: ZenaBot <qq_agent_hao@proton.me> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
The rewrite/lsp-v2 branch has been merged to master with WASM slimming (47→22MB) and all Phase 1-3 LSP improvements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@lmcmz The Language reference (https://cadence-lang.org/docs/language) menu structure and order should be preserved, the new site is all over the place. |
|
@lmcmz There is whole bunch of broken links in the language reference, see: |
Keep LLM endpoints accessible via settings only. Co-authored-by: ZenaBot <qq_agent_hao@proton.me> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
I started reviewing SKILL.md, but didn't get very far because there is a lot of bad advice. I assume you used AI to generate it.
I already spent a lot of time reviewing and added a bunch of advice to https://github.com/onflow/cadence-rules. Can you please import those rules into the AI that you're using to generate SKILL.md and have it re-generate it? Also make sure it knows about the few comments I already left here because I'm sure those apply to many of the skills in the rest of the file.
I also agree with Bastian about breaking this into smaller PRs. This is way too difficult to review as one big PR
| | Testing framework | https://cadence-lang.org/docs/testing-framework | | ||
| | Flow NFT Standard | https://github.com/onflow/flow-nft | | ||
| | Flow FT Standard | https://github.com/onflow/flow-ft | | ||
|
|
There was a problem hiding this comment.
Probably should include other repos in here like core contracts, bridge, hybrid custody, NFT storefront, etc
| | `access(all)` | Everyone (public read, callable by anyone) | | ||
| | `access(self)` | Only within the type itself | | ||
| | `access(contract)` | Same contract | | ||
| | `access(account)` | Same account | |
There was a problem hiding this comment.
| | `access(account)` | Same account | | |
| | `access(account)` | Contracts within the same account | |
| | `access(self)` | Only within the type itself | | ||
| | `access(contract)` | Same contract | | ||
| | `access(account)` | Same account | | ||
| | `access(E)` | Callers holding entitlement `E` | |
There was a problem hiding this comment.
| | `access(E)` | Callers holding entitlement `E` | | |
| | `access(E)` | Either callers holding the actual object or callers holding a reference to the object authorized with entitlement `E` | |
| // 4. Borrow from another account | ||
| let receiver = getAccount(address).capabilities | ||
| .borrow<&{FungibleToken.Receiver}>(/public/receiver) | ||
| ?? panic("Account has no receiver capability") |
There was a problem hiding this comment.
Can you update all the error messages in here to have more descriptive messages that include values? For example, this one should be, "Account \(address) has no FungibleToken.Receiver capability at path /public/receiver"
| transaction(amount: UFix64, recipient: Address) { | ||
|
|
||
| // Declare fields shared across phases | ||
| let vaultRef: auth(FungibleToken.Withdraw) &FungibleToken.Vault |
There was a problem hiding this comment.
This is an invalid type. It should be &{FungibleToken.Vault}. You'll need to update this type wherever else it is in these skills
| // Access accounts — the ONLY phase with account access | ||
| prepare(signer: auth(BorrowValue) &Account) { | ||
| self.vaultRef = signer.storage | ||
| .borrow<auth(FungibleToken.Withdraw) &FungibleToken.Vault>( |
| self.vaultRef = signer.storage | ||
| .borrow<auth(FungibleToken.Withdraw) &FungibleToken.Vault>( | ||
| from: /storage/vault | ||
| ) ?? panic("No vault found") |
There was a problem hiding this comment.
need descriptive error message here and everywhere else in this file with error messages
…, SKILL.md, bun migration - Fix 68 broken internal links across language reference, tutorials, ai-tools, and migration guide - Restore Language Reference sidebar menu order to match production site - SKILL.md: add repo links (core-contracts, bridge, hybrid-custody, nft-storefront), fix access(account)/access(E) descriptions, fix invalid &FungibleToken.Vault types, improve all panic messages with descriptive values - Convert relative ./links in index.mdx files to absolute paths (Fumadocs resolves ./ from index pages incorrectly) - Fix anchor slugs (#semicolons → #-semicolon, #accessing-objects → #borrowing-objects, etc.) - Migrate from npm to bun (remove package-lock.json, add bun.lockb) - Add scripts/check-links.mjs for link validation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@j1010001 Both issues have been addressed in the latest push: 1. Language Reference menu order — Restored to match the production site order 2. Broken links — All 68 broken links from the link-check report have been fixed. The root cause was @joshuahannan All SKILL.md review comments resolved:
|
|
Hey @joshuahannan @j1010001 — quick update on the review feedback: What's been fixed (latest push):
On splitting the PR: Review guide — where to focus:
Happy to hand off further iterations: Preview is live at https://cadence-lang.vercel.app/ for testing. |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
New MCP tool that validates JSON-CDC encoded arguments for Cadence scripts and transactions. Supports two modes: - Standalone: validates format, type names, and value correctness (integer ranges, Fix64 precision, Address format, nested types) - With source code: additionally verifies args match the entry function signature via LSP or regex fallback Stricter than FCL's @onflow/types — catches range overflows, invalid addresses, and type mismatches that FCL passes through silently. 220 tests with FCL-generated ground truth fixtures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit 78a4c90.
…dk to 1.26.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Superseded by #306, which carries the same redesign + AI tools work plus 6 weeks of release-prep follow-ups. The new PR is on Recommend closing this PR in favor of #306. Leaving open for now so reviewers can see the lineage. |
…framework PR #285 was opened from a fork branch that pre-dated several merged-to-main docs PRs. Forward-ports 7 of those into the redesigned tree, adapted to the new Docusaurus → fumadocs filename / frontmatter conventions. - public/robots.txt — 'Adopt Content Signals Policy' (bac9365). Replaces 'Allow all bots / Disallow:' with explicit Content-Signal: search=yes, ai-input=yes, ai-train=yes per contentsignals.org (2025). Hoisted to file-level header comment so Lighthouse robots-txt-valid passes. - AGENTS.md (NEW) — 'Add AGENTS.md' (4e1e4f8 / PR #292). Upstream version describes Docusaurus stack which would actively mislead any AI agent reading it post-migration. Re-written from scratch around TanStack + Fumadocs + Bun + Vite while preserving upstream INTENT (concise agent guidance, same section structure: Overview / Build Commands / Architecture / Conventions / Files Not to Modify). - content/docs/{language,cadence-migration-guide}/meta.json — 'Label top-level doc categories' (754a9e7). Translates Docusaurus '_category_.json {label, position}' to fumadocs 'meta.json {title}' with verbatim string values ('Language Reference', 'Cadence 1.0 Migration Guide'). - content/docs/language/references.mdx — 'Clarify storage vs ephemeral references' (f12cc38 / PR #289 by Supun Setunga). Adds top-of-page 'Cadence has two kinds of references' summary, '## Ephemeral references' + '## Storage references' + '## Common characteristics' H2s, and '### Ephemeral references' + '### Storage references' subsections under Reference Validity. Plus search keywords frontmatter. - content/docs/language/contract-updatability.mdx — 'docs: clarify ContractUpdateValidator scope and threat model' (f60d342 / PR #290 by Jan Bernatik). Verbatim adds the 15-line 'Threat model and scope' section. Plus search keywords frontmatter. - content/docs/testing-framework.mdx — 'Update test framework syntax' (8c76347 / PR #291 by Jordan Ribbink). PR branch had the OLD test syntax (1395 lines pre-#291) — file replaced with upstream post-state (1182 lines) plus 2 mechanical Docusaurus → fumadocs conversions (sidebar_label removed, HTML comment → JSX comment). Plus search keywords frontmatter. - content/docs/language/control-flow.mdx — 'docs: document the guard statement in control-flow' (PR #293 by Bastian Müller, merged 2026-04-28 — landed during the redesign branch's lifetime). Inserts a comprehensive 'Guard statement' section (basic boolean / comparison with if-statement / optional binding / chaining / loops / resources) between Optional binding and Switch.
Two related tooling stories were tangled in the original PR — they're now consolidated to the canonical Flow Foundation paths. SKILLS — single Claude Code marketplace ------ Hao's redesign shipped an inline 'skills/cadence/SKILL.md' (single file, 873 lines) plus 'update-ai-files.yml' CI to keep it in sync. Meanwhile, onflow ships an official Claude Code plugin marketplace at [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) — bundles 'flow-dev' plugin with the full Cadence + Flow skill suite (cadence-lang, cadence-tokens, cadence-audit, cadence-scaffold, cadence-testing, flow-react-sdk, flow-project-setup, flow-cli, flow-dev-setup, flow-defi, flow-tokenomics — each with its own reference files). Inline skill is strictly subsumed. - skills/cadence/SKILL.md: DELETED - .github/workflows/update-ai-files.yml: DELETED (auto-sync CI obsolete) - content/docs/ai-tools/skills.mdx: rewritten around '/plugin marketplace add onflow/flow-ai-tools' install path. Skill table phrasing uses 'full Cadence + Flow skill suite' instead of hardcoded count (durable across upstream additions). MCP — single canonical install path (flow mcp) ------ Hao's redesign also shipped 'mcp-server/' as a TypeScript / Bun standalone package published to npm as '@outblock/cadence-mcp'. Meanwhile, Peter Argue (Flow DX) shipped a Go-native Cadence MCP server in [flow-cli #2306](onflow/flow-cli#2306), merged 2026-04-03 (one day after Hao's last npm publish) — inspired by Hao's PR #285 design but implemented from scratch in Go with no extra runtime dependencies. flow-ai-tools' install script ([scripts/install.sh L65–98](https://github.com/onflow/flow-ai-tools/blob/main/scripts/install.sh#L65)) already registers MCP via 'flow mcp', not Hao's npm package — i.e. anyone running the marketplace one-liner is already on the canonical path. Two MCPs both registering as 'cadence-mcp' in Claude Code is a footgun: same tool name, different binaries, surprising about which one served a response. Consolidating to one canonical install path. - mcp-server/: DELETED entirely (~7,000 lines, 21 files, ~330 tests) - .github/workflows/publish-mcp.yml: DELETED (npm publish CI obsolete) - content/docs/ai-tools/mcp-server.mdx: rewritten around 'flow mcp' (Flow CLI ≥ v2.16.0). Tool list updated to the 8 tools 'flow mcp' exposes (LSP-backed: cadence_check, cadence_hover, cadence_definition, cadence_symbols, cadence_completion + on-chain: get_contract_source, get_contract_code, cadence_execute_script). - content/docs/ai-tools/integrations/{antigravity,claude,cursor,opencode}.mdx: install snippets all reference 'claude mcp add --scope user cadence-mcp -- flow mcp' (or editor-equivalent). Cursor deeplink updated. - content/docs/ai-tools/integrations/index.mdx (NEW): per-editor matrix table summarizing project-context source / skills support / MCP support. Fixes broken '../integrations' link from skills.mdx (was 404 because fumadocs needs an index.mdx for directory routes). - content/docs/ai-tools/{,integrations/}meta.json: add '...' rest token so any future pages added to those dirs get auto-included. - content/docs/ai-tools/index.mdx: tweak MCP description to match new tool surface. - src/routes/index.tsx (homepage hero MCP card): replaces 'npx install-mcp @outblock/cadence-mcp --client $CLIENT' with the 'flow mcp' install command. Drops the now-superfluous client + mode selectors. (NOTE: src/routes/index.tsx homepage hero edit goes in the next commit with the rest of the index.tsx changes — bundled with a11y to keep one diff per file.) DOCS / META ------ - CLAUDE.md: removed 'skills/cadence/SKILL.md' line; removed 'mcp-server/' line. The MCP server now lives at onflow/flow-cli/internal/mcp. - README.md: 'AI Integration' section rewritten — Skills via flow-ai-tools marketplace, MCP via 'flow mcp'. Follow-up issues for the 3 unique tools Hao's mcp-server had that 'flow mcp' doesn't yet (cadence_security_scan, cadence_validate_args, doc-search trio): tracked at #307 for upstream contribution to onflow/flow-cli.
…framework PR #285 was opened from a fork branch that pre-dated several merged-to-main docs PRs. Forward-ports 7 of those into the redesigned tree, adapted to the new Docusaurus → fumadocs filename / frontmatter conventions. - public/robots.txt — 'Adopt Content Signals Policy' (bac9365). Replaces 'Allow all bots / Disallow:' with explicit Content-Signal: search=yes, ai-input=yes, ai-train=yes per contentsignals.org (2025). Hoisted to file-level header comment so Lighthouse robots-txt-valid passes. - AGENTS.md (NEW) — 'Add AGENTS.md' (4e1e4f8 / PR #292). Upstream version describes Docusaurus stack which would actively mislead any AI agent reading it post-migration. Re-written from scratch around TanStack + Fumadocs + Bun + Vite while preserving upstream INTENT (concise agent guidance, same section structure: Overview / Build Commands / Architecture / Conventions / Files Not to Modify). - content/docs/{language,cadence-migration-guide}/meta.json — 'Label top-level doc categories' (754a9e7). Translates Docusaurus '_category_.json {label, position}' to fumadocs 'meta.json {title}' with verbatim string values ('Language Reference', 'Cadence 1.0 Migration Guide'). - content/docs/language/references.mdx — 'Clarify storage vs ephemeral references' (f12cc38 / PR #289 by Supun Setunga). Adds top-of-page 'Cadence has two kinds of references' summary, '## Ephemeral references' + '## Storage references' + '## Common characteristics' H2s, and '### Ephemeral references' + '### Storage references' subsections under Reference Validity. Plus search keywords frontmatter. - content/docs/language/contract-updatability.mdx — 'docs: clarify ContractUpdateValidator scope and threat model' (f60d342 / PR #290 by Jan Bernatik). Verbatim adds the 15-line 'Threat model and scope' section. Plus search keywords frontmatter. - content/docs/testing-framework.mdx — 'Update test framework syntax' (8c76347 / PR #291 by Jordan Ribbink). PR branch had the OLD test syntax (1395 lines pre-#291) — file replaced with upstream post-state (1182 lines) plus 2 mechanical Docusaurus → fumadocs conversions (sidebar_label removed, HTML comment → JSX comment). Plus search keywords frontmatter. - content/docs/language/control-flow.mdx — 'docs: document the guard statement in control-flow' (PR #293 by Bastian Müller, merged 2026-04-28 — landed during the redesign branch's lifetime). Inserts a comprehensive 'Guard statement' section (basic boolean / comparison with if-statement / optional binding / chaining / loops / resources) between Optional binding and Switch.
Two related tooling stories were tangled in the original PR — they're now consolidated to the canonical Flow Foundation paths. SKILLS — single Claude Code marketplace ------ Hao's redesign shipped an inline 'skills/cadence/SKILL.md' (single file, 873 lines) plus 'update-ai-files.yml' CI to keep it in sync. Meanwhile, onflow ships an official Claude Code plugin marketplace at [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) — bundles 'flow-dev' plugin with the full Cadence + Flow skill suite (cadence-lang, cadence-tokens, cadence-audit, cadence-scaffold, cadence-testing, flow-react-sdk, flow-project-setup, flow-cli, flow-dev-setup, flow-defi, flow-tokenomics — each with its own reference files). Inline skill is strictly subsumed. - skills/cadence/SKILL.md: DELETED - .github/workflows/update-ai-files.yml: DELETED (auto-sync CI obsolete) - content/docs/ai-tools/skills.mdx: rewritten around '/plugin marketplace add onflow/flow-ai-tools' install path. Skill table phrasing uses 'full Cadence + Flow skill suite' instead of hardcoded count (durable across upstream additions). MCP — single canonical install path (flow mcp) ------ Hao's redesign also shipped 'mcp-server/' as a TypeScript / Bun standalone package published to npm as '@outblock/cadence-mcp'. Meanwhile, Peter Argue (Flow DX) shipped a Go-native Cadence MCP server in [flow-cli #2306](onflow/flow-cli#2306), merged 2026-04-03 (one day after Hao's last npm publish) — inspired by Hao's PR #285 design but implemented from scratch in Go with no extra runtime dependencies. flow-ai-tools' install script ([scripts/install.sh L65–98](https://github.com/onflow/flow-ai-tools/blob/main/scripts/install.sh#L65)) already registers MCP via 'flow mcp', not Hao's npm package — i.e. anyone running the marketplace one-liner is already on the canonical path. Two MCPs both registering as 'cadence-mcp' in Claude Code is a footgun: same tool name, different binaries, surprising about which one served a response. Consolidating to one canonical install path. - mcp-server/: DELETED entirely (~7,000 lines, 21 files, ~330 tests) - .github/workflows/publish-mcp.yml: DELETED (npm publish CI obsolete) - content/docs/ai-tools/mcp-server.mdx: rewritten around 'flow mcp' (Flow CLI ≥ v2.16.0). Tool list updated to the 8 tools 'flow mcp' exposes (LSP-backed: cadence_check, cadence_hover, cadence_definition, cadence_symbols, cadence_completion + on-chain: get_contract_source, get_contract_code, cadence_execute_script). - content/docs/ai-tools/integrations/{antigravity,claude,cursor,opencode}.mdx: install snippets all reference 'claude mcp add --scope user cadence-mcp -- flow mcp' (or editor-equivalent). Cursor deeplink updated. - content/docs/ai-tools/integrations/index.mdx (NEW): per-editor matrix table summarizing project-context source / skills support / MCP support. Fixes broken '../integrations' link from skills.mdx (was 404 because fumadocs needs an index.mdx for directory routes). - content/docs/ai-tools/{,integrations/}meta.json: add '...' rest token so any future pages added to those dirs get auto-included. - content/docs/ai-tools/index.mdx: tweak MCP description to match new tool surface. - src/routes/index.tsx (homepage hero MCP card): replaces 'npx install-mcp @outblock/cadence-mcp --client $CLIENT' with the 'flow mcp' install command. Drops the now-superfluous client + mode selectors. (NOTE: src/routes/index.tsx homepage hero edit goes in the next commit with the rest of the index.tsx changes — bundled with a11y to keep one diff per file.) DOCS / META ------ - CLAUDE.md: removed 'skills/cadence/SKILL.md' line; removed 'mcp-server/' line. The MCP server now lives at onflow/flow-cli/internal/mcp. - README.md: 'AI Integration' section rewritten — Skills via flow-ai-tools marketplace, MCP via 'flow mcp'. Follow-up issues for the 3 unique tools Hao's mcp-server had that 'flow mcp' doesn't yet (cadence_security_scan, cadence_validate_args, doc-search trio): tracked at #307 for upstream contribution to onflow/flow-cli.
…framework PR #285 was opened from a fork branch that pre-dated several merged-to-main docs PRs. Forward-ports 7 of those into the redesigned tree, adapted to the new Docusaurus → fumadocs filename / frontmatter conventions. - public/robots.txt — 'Adopt Content Signals Policy' (bac9365). Replaces 'Allow all bots / Disallow:' with explicit Content-Signal: search=yes, ai-input=yes, ai-train=yes per contentsignals.org (2025). Hoisted to file-level header comment so Lighthouse robots-txt-valid passes. - AGENTS.md (NEW) — 'Add AGENTS.md' (4e1e4f8 / PR #292). Upstream version describes Docusaurus stack which would actively mislead any AI agent reading it post-migration. Re-written from scratch around TanStack + Fumadocs + Bun + Vite while preserving upstream INTENT (concise agent guidance, same section structure: Overview / Build Commands / Architecture / Conventions / Files Not to Modify). - content/docs/{language,cadence-migration-guide}/meta.json — 'Label top-level doc categories' (754a9e7). Translates Docusaurus '_category_.json {label, position}' to fumadocs 'meta.json {title}' with verbatim string values ('Language Reference', 'Cadence 1.0 Migration Guide'). - content/docs/language/references.mdx — 'Clarify storage vs ephemeral references' (f12cc38 / PR #289 by Supun Setunga). Adds top-of-page 'Cadence has two kinds of references' summary, '## Ephemeral references' + '## Storage references' + '## Common characteristics' H2s, and '### Ephemeral references' + '### Storage references' subsections under Reference Validity. Plus search keywords frontmatter. - content/docs/language/contract-updatability.mdx — 'docs: clarify ContractUpdateValidator scope and threat model' (f60d342 / PR #290 by Jan Bernatik). Verbatim adds the 15-line 'Threat model and scope' section. Plus search keywords frontmatter. - content/docs/testing-framework.mdx — 'Update test framework syntax' (8c76347 / PR #291 by Jordan Ribbink). PR branch had the OLD test syntax (1395 lines pre-#291) — file replaced with upstream post-state (1182 lines) plus 2 mechanical Docusaurus → fumadocs conversions (sidebar_label removed, HTML comment → JSX comment). Plus search keywords frontmatter. - content/docs/language/control-flow.mdx — 'docs: document the guard statement in control-flow' (PR #293 by Bastian Müller, merged 2026-04-28 — landed during the redesign branch's lifetime). Inserts a comprehensive 'Guard statement' section (basic boolean / comparison with if-statement / optional binding / chaining / loops / resources) between Optional binding and Switch.
Two related tooling stories were tangled in the original PR — they're now consolidated to the canonical Flow Foundation paths. SKILLS — single Claude Code marketplace ------ Hao's redesign shipped an inline 'skills/cadence/SKILL.md' (single file, 873 lines) plus 'update-ai-files.yml' CI to keep it in sync. Meanwhile, onflow ships an official Claude Code plugin marketplace at [onflow/flow-ai-tools](https://github.com/onflow/flow-ai-tools) — bundles 'flow-dev' plugin with the full Cadence + Flow skill suite (cadence-lang, cadence-tokens, cadence-audit, cadence-scaffold, cadence-testing, flow-react-sdk, flow-project-setup, flow-cli, flow-dev-setup, flow-defi, flow-tokenomics — each with its own reference files). Inline skill is strictly subsumed. - skills/cadence/SKILL.md: DELETED - .github/workflows/update-ai-files.yml: DELETED (auto-sync CI obsolete) - content/docs/ai-tools/skills.mdx: rewritten around '/plugin marketplace add onflow/flow-ai-tools' install path. Skill table phrasing uses 'full Cadence + Flow skill suite' instead of hardcoded count (durable across upstream additions). MCP — single canonical install path (flow mcp) ------ Hao's redesign also shipped 'mcp-server/' as a TypeScript / Bun standalone package published to npm as '@outblock/cadence-mcp'. Meanwhile, Peter Argue (Flow DX) shipped a Go-native Cadence MCP server in [flow-cli #2306](onflow/flow-cli#2306), merged 2026-04-03 (one day after Hao's last npm publish) — inspired by Hao's PR #285 design but implemented from scratch in Go with no extra runtime dependencies. flow-ai-tools' install script ([scripts/install.sh L65–98](https://github.com/onflow/flow-ai-tools/blob/main/scripts/install.sh#L65)) already registers MCP via 'flow mcp', not Hao's npm package — i.e. anyone running the marketplace one-liner is already on the canonical path. Two MCPs both registering as 'cadence-mcp' in Claude Code is a footgun: same tool name, different binaries, surprising about which one served a response. Consolidating to one canonical install path. - mcp-server/: DELETED entirely (~7,000 lines, 21 files, ~330 tests) - .github/workflows/publish-mcp.yml: DELETED (npm publish CI obsolete) - content/docs/ai-tools/mcp-server.mdx: rewritten around 'flow mcp' (Flow CLI ≥ v2.16.0). Tool list updated to the 8 tools 'flow mcp' exposes (LSP-backed: cadence_check, cadence_hover, cadence_definition, cadence_symbols, cadence_completion + on-chain: get_contract_source, get_contract_code, cadence_execute_script). - content/docs/ai-tools/integrations/{antigravity,claude,cursor,opencode}.mdx: install snippets all reference 'claude mcp add --scope user cadence-mcp -- flow mcp' (or editor-equivalent). Cursor deeplink updated. - content/docs/ai-tools/integrations/index.mdx (NEW): per-editor matrix table summarizing project-context source / skills support / MCP support. Fixes broken '../integrations' link from skills.mdx (was 404 because fumadocs needs an index.mdx for directory routes). - content/docs/ai-tools/{,integrations/}meta.json: add '...' rest token so any future pages added to those dirs get auto-included. - content/docs/ai-tools/index.mdx: tweak MCP description to match new tool surface. - src/routes/index.tsx (homepage hero MCP card): replaces 'npx install-mcp @outblock/cadence-mcp --client $CLIENT' with the 'flow mcp' install command. Drops the now-superfluous client + mode selectors. (NOTE: src/routes/index.tsx homepage hero edit goes in the next commit with the rest of the index.tsx changes — bundled with a11y to keep one diff per file.) DOCS / META ------ - CLAUDE.md: removed 'skills/cadence/SKILL.md' line; removed 'mcp-server/' line. The MCP server now lives at onflow/flow-cli/internal/mcp. - README.md: 'AI Integration' section rewritten — Skills via flow-ai-tools marketplace, MCP via 'flow mcp'. Follow-up issues for the 3 unique tools Hao's mcp-server had that 'flow mcp' doesn't yet (cadence_security_scan, cadence_validate_args, doc-search trio): tracked at #307 for upstream contribution to onflow/flow-cli.
Summary
Complete redesign of cadence-lang.org with AI-native developer tooling.
Preview: https://cadence-lang.vercel.app/
Site Redesign
MCP Server (
mcp-server/)search_docs,get_doc,cadence_check,cadence_hover,cadence_definition,cadence_symbolshttps://cadence-mcp.up.railway.appAI Skills
SKILL.md— one-command install vianpx skills add outblock/cadence-lang.orgLLM Endpoints
/llms.txt— concise site overview for LLM context/llms-full.txt— full documentation dump optimized for LLM context windowsAI Chat Panel
Fumadocs
meta.jsonfilesAI Tools Documentation (
content/docs/ai-tools/)Test plan
bun testinmcp-server/)https://cadence-mcp.up.railway.app/mcp