Skip to content

Cadence-lang redesign + AI tools (MCP, Skills, LLM endpoints, AI Chat)#285

Open
lmcmz wants to merge 125 commits into
onflow:mainfrom
Outblock:main
Open

Cadence-lang redesign + AI tools (MCP, Skills, LLM endpoints, AI Chat)#285
lmcmz wants to merge 125 commits into
onflow:mainfrom
Outblock:main

Conversation

@lmcmz
Copy link
Copy Markdown

@lmcmz lmcmz commented Feb 21, 2026

Summary

Complete redesign of cadence-lang.org with AI-native developer tooling.

Preview: https://cadence-lang.vercel.app/

Site Redesign

  • New homepage with ASCII 3D animation (Cadence logo, Flow token, CryptoKitty cycle)
  • Dark mode support with proper background colors
  • Responsive layout with mobile optimizations
  • Updated header nav with AI Tools link

MCP Server (mcp-server/)

  • Cadence MCP server wrapping the Flow CLI Language Server over JSON-RPC
  • 6 tools: search_docs, get_doc, cadence_check, cadence_hover, cadence_definition, cadence_symbols
  • HTTP transport via Hono + WebStandardStreamableHTTPServerTransport (stateless)
  • Deployed on Railway at https://cadence-mcp.up.railway.app
  • Dockerfile with Flow CLI for containerized deployment
  • Stdio transport for local CLI usage
  • 54 unit + integration tests covering LSP message parsing, formatters, and Cadence syntax/type error detection

AI Skills

  • SKILL.md — one-command install via npx skills add outblock/cadence-lang.org
  • Injects Cadence language reference, patterns, and best practices into AI coding agents

LLM Endpoints

  • /llms.txt — concise site overview for LLM context
  • /llms-full.txt — full documentation dump optimized for LLM context windows

AI Chat Panel

  • Embedded Cadence AI chat panel in docs pages
  • Drag-to-resize from left edge
  • Responsive (full width on mobile)

Fumadocs

  • Migrated documentation framework to Fumadocs
  • Structured navigation via meta.json files

AI Tools Documentation (content/docs/ai-tools/)

  • Skills — installation and usage guide
  • MCP Server — tools reference, Claude Desktop/Code config, HTTP usage, local setup
  • LLM Endpoints — llms.txt and llms-full.txt documentation
  • Integration guides for: Antigravity, Claude (Code/Desktop/API), Cursor, OpenAI Codex, Gemini, OpenCode

Test plan

  • MCP server: 54 tests passing (bun test in mcp-server/)
  • Homepage renders with 3D animation cycle
  • Dark mode background color applies correctly
  • AI Tools docs render in Fumadocs
  • MCP endpoint responds at https://cadence-mcp.up.railway.app/mcp

zenabot27 and others added 14 commits February 15, 2026 21:29
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
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 21, 2026

@zenabot27 is attempting to deploy a commit to the Flow Team on Vercel.

A member of the Team first needs to authorize it.

zenabot27 and others added 8 commits March 5, 2026 01:14
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>
@j1010001
Copy link
Copy Markdown
Member

@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.

@j1010001
Copy link
Copy Markdown
Member

@lmcmz There is whole bunch of broken links in the language reference, see:
link-check-report.md

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>
Copy link
Copy Markdown
Contributor

@joshuahannan joshuahannan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread skills/cadence/SKILL.md
| 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 |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably should include other repos in here like core contracts, bridge, hybrid custody, NFT storefront, etc

Comment thread skills/cadence/SKILL.md Outdated
| `access(all)` | Everyone (public read, callable by anyone) |
| `access(self)` | Only within the type itself |
| `access(contract)` | Same contract |
| `access(account)` | Same account |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `access(account)` | Same account |
| `access(account)` | Contracts within the same account |

Comment thread skills/cadence/SKILL.md Outdated
| `access(self)` | Only within the type itself |
| `access(contract)` | Same contract |
| `access(account)` | Same account |
| `access(E)` | Callers holding entitlement `E` |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `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` |

Comment thread skills/cadence/SKILL.md Outdated
// 4. Borrow from another account
let receiver = getAccount(address).capabilities
.borrow<&{FungibleToken.Receiver}>(/public/receiver)
?? panic("Account has no receiver capability")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Comment thread skills/cadence/SKILL.md Outdated
transaction(amount: UFix64, recipient: Address) {

// Declare fields shared across phases
let vaultRef: auth(FungibleToken.Withdraw) &FungibleToken.Vault
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an invalid type. It should be &{FungibleToken.Vault}. You'll need to update this type wherever else it is in these skills

Comment thread skills/cadence/SKILL.md Outdated
// Access accounts — the ONLY phase with account access
prepare(signer: auth(BorrowValue) &Account) {
self.vaultRef = signer.storage
.borrow<auth(FungibleToken.Withdraw) &FungibleToken.Vault>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still invalid

Comment thread skills/cadence/SKILL.md Outdated
self.vaultRef = signer.storage
.borrow<auth(FungibleToken.Withdraw) &FungibleToken.Vault>(
from: /storage/vault
) ?? panic("No vault found")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@lmcmz
Copy link
Copy Markdown
Author

lmcmz commented Mar 31, 2026

@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 ./ relative links in index.mdx files

@joshuahannan All SKILL.md review comments resolved:

  • Added repo links (core-contracts, bridge, hybrid-custody, nft-storefront)
  • Fixed access(account) → "Contracts within the same account"
  • Fixed access(E) description
  • Fixed invalid &FungibleToken.Vault&{FungibleToken.Vault} (Cadence 1.0 interface syntax)
  • Updated all panic messages with descriptive values (addresses, paths, capability IDs)

@lmcmz
Copy link
Copy Markdown
Author

lmcmz commented Mar 31, 2026

Hey @joshuahannan @j1010001 — quick update on the review feedback:

What's been fixed (latest push):

  • All broken links resolved (68 total, verified with a link checker across 107 pages — 0 remaining)
  • Language Reference sidebar order restored to match production
  • SKILL.md updates per Josh's review: added repo links, fixed access modifier descriptions, fixed &{FungibleToken.Vault} types, improved panic messages

On splitting the PR:
This is a static docs site framework migration — TanStack Start + Fumadocs replacing the old engine. The core MDX documentation content is unchanged; the diff is routing/config/components and link syntax adaptation. Splitting it isn't practical since the framework, routes, and components are interdependent — each piece wouldn't build or run on its own.

Review guide — where to focus:

  • skills/cadence/SKILL.md — Josh has already reviewed this line by line, updates applied
  • mcp-server/ — standalone package with 54 tests, can be reviewed independently
  • content/docs/ — the MDX content migrated from the old site. Spot-check a few pages against production to confirm nothing was lost
  • Everything else (components, routes, config) — framework scaffolding, not content

Happy to hand off further iterations:
The SKILL.md content and landing page copy are areas where Cadence experts/creator can improve directly. Feel free to push commits to this branch for any wording, code examples, or content changes — I'll keep the framework and tooling side working.

Preview is live at https://cadence-lang.vercel.app/ for testing.

lmcmz and others added 6 commits March 31, 2026 23:14
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>
…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>
@Aliserag
Copy link
Copy Markdown
Contributor

Aliserag commented May 1, 2026

Superseded by #306, which carries the same redesign + AI tools work plus 6 weeks of release-prep follow-ups.

The new PR is on eval/pr285-cleanup (a branch under onflow/cadence-lang.org rather than the Outblock fork) so reviewers don't need write access to Hao's old fork to land it. Full evaluation history (15-agent test + review matrix → fix cycle → 9-agent re-test → 10-agent manual-test wave) is preserved in pr285-evaluation/ on the new branch.

Recommend closing this PR in favor of #306. Leaving open for now so reviewers can see the lineage.

Aliserag added a commit that referenced this pull request May 1, 2026
…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.
Aliserag added a commit that referenced this pull request May 1, 2026
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.
Aliserag added a commit that referenced this pull request May 1, 2026
…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.
Aliserag added a commit that referenced this pull request May 1, 2026
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.
Aliserag added a commit that referenced this pull request May 1, 2026
…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.
Aliserag added a commit that referenced this pull request May 1, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants