Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.
HTML agent-skillsai-agentsarchitecture-diagramclaude-codeclaude-skillscodexcoding-agentsdeepseek-harnessdeveloper-toolsdiagramsdiagrams-as-codedsh-pluginflowchartllmmermaidopencodesequence-diagramsoftware-architecturesystem-designvisualization
feat: add first-class Cursor onboarding
tt-a1ia73047b27e3b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 550c87f8..29e294ec 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -5,6 +5,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo## [Unreleased]### Added+- **First-class Cursor onboarding.** README EN/ZH, the landing quick start, and the generated Start surface now name Cursor beside Codex, Claude Code, and OpenCode while keeping one portable `archify/SKILL.md`. The Start page adds a URL-stable, keyboard-operable agent selector that produces explicit global and repository-local `skills` CLI commands with bounded scope and copy mode; it does not advertise the unsupported `skills use --agent cursor` launcher or promise one physical global directory. A pinned `[email protected]` canary verifies the canonical `.agents/skills/archify` package path, `doctor`, and all five zero-dependency validators. A fresh Cursor Agent CLI `2026.07.20-8cc9c0b` session then discovered that Skill, ran doctor, authored six-component typed Architecture JSON, and delivered a 9/9-check showcase artifact; independent browser review confirmed the main and failure paths, authored chapter, and zero console warnings/errors. No Cursor-only Skill, renderer, schema, hosted service, telemetry, or mobile surface was added.- **Structured Repair Receipt.** `archify validate --json` and `archify deliver --json` now return exactly one versioned JSON object on both success and failure. Each failure carries additive `diagnostics[]` with a stable rule code, severity, exact subject, measured evidence, and only renderer-supported repairs for input parsing, schema, repository evidence, Clean Flow, composition, artifact checks, and delivery stages; unclassified internal failures are explicit and offer no guessed fix. Human CLI and Last-Good Preview format the same facts without exposing Node stacks, while Atomic Verified Delivery still removes the candidate and preserves the prior artifact byte-for-byte. Five-mode schema fixtures, validate/deliver Clean Flow parity, evidence failure, checker failure, installed-skill smoke, and the existing two-round perceptual boundary are covered. No auto-fix, LLM call, retry expansion, schema/IR change, renderer geometry change, viewer panel, dependency, hosted service, telemetry, or mobile surface was added.- **Reach Share Card.** An active Upstream or Downstream Authored Reachability result now reveals one contextual **Export → Reach Share Card** item. It copies the already resolved origin, direction, stable node/edge identity, minimum depths, and maximum hops without rerunning traversal, then applies only static `data-share-reach-*` decoration to a finite canonical clone before producing a 1200×630 PNG. The full diagram remains as dimmed context; the header names `Authored upstream/downstream`, origin, nodes, links, and hops; upstream uses repository violet, downstream uses proof green, and Blueprint stays filter-free. Missing, empty, stale, duplicate, conflicting, or tampered state fails closed. The truthful receipt uses `format=share-card`, `variant=reach`, `canonical=false`, and a dedicated reach-state-clean proof. Ordinary exports remain canonical. This is download-only and adds no schema, parser, traversal, format, panel, toolbar control, dependency, network, storage, hosted service, geometry change, or mobile product surface.- **Authored Reachability.** A focused node's existing Semantic Passport now offers compact `Upstream` and `Downstream` actions that reveal the deterministic transitive closure of authored relationships, report matched nodes, links, and maximum hops, and round-trip through `#focus=<id>&reach=upstream|downstream` plus Copy link. The viewer deduplicates parallel SVG fragments by stable edge key, terminates cycles, preserves authored DOM order, supports keyboard and browser-history navigation, and remains legible across Classic, Signal Flow, Blueprint, dark, and light. SVG, raster, Share Card, WebM backgrounds, and print strip the temporary state. This is explicitly authored reachability—not blast radius, breakage, repository impact, or runtime causality—and adds no parser, crawler, schema, panel, permanent toolbar action, dependency, hosted runtime, storage, geometry change, or mobile product surface.@@ -12,6 +13,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo- **Revision-verified Repository Evidence Passport.** Architecture diagrams can opt into public GitHub source links by declaring a repository URL, a full commit SHA, and one to three repo-relative sources per component, then passing `--repo-root` to `render`, `deliver`, `preview`, or `validate`. Archify verifies the local origin, commit, blobs, and optional line ranges before publishing; verified links appear in Semantic Passport and Node Finder while staying outside the canonical SVG and every visual export. Plain diagrams remain the default, other diagram modes reject the option, and private or unpinned evidence is deliberately out of scope.### Fixed+- The landing Live Proof now runs in a least-privilege script-only sandbox and starts its bounded chapter in the artifact's first load. This removes parent/child DOM reach-through and avoids a browser-visible `MutationObserver.observe(null)` injection race while preserving one-shot and reduced-motion behavior.- Existing custom templates remain compatible when repository evidence is unused; only the opt-in evidence path requires the new HTML payload slot. Evidence paths reject control characters, and line verification no longer treats a trailing newline as an extra source line.## [2.12.0] — 2026-07-23@@ -37,7 +39,7 @@ All notable changes are documented here. Format loosely follows [Keep a Changelo- **Clean Flow Gate.** All five typed renderers now share one generation-time relationship/obstacle contract: a connection, edge, flow, transition, or message may terminate on its own endpoints but cannot pass through an unrelated semantic node box. Failures carry the stable `clean-flow/edge-through-node` code, exact collection/index and authored ID, obstacle ID, first intersecting segment coordinates, 2px clearance, and renderer-specific repair knobs before any artifact is written. Architecture boundaries, workflow lanes/phases/groups, data-flow stages, lifecycle bands, and sequence segments/lifelines/activations remain intentional pass-through geometry; endpoint boxes are exempt. Six previously accepted canonical routes now use explicit clean corridors, all 11 proof scenarios remain valid, and edge-edge crossings are handled separately by the named composition profile instead of being promoted to a universal correctness rule.- **Story Shelf.** Guided artifacts now open with a compact, canvas-first shelf that keeps the useful `Guided views` identity, `Play story`, and every authored chapter visible while removing inactive Previous/Next, Copy moment, Show all, and generic instructional copy. The existing `data-active-view="all"` state is established before first paint; selecting a chapter, starting playback, or restoring a valid deep link immediately expands the complete Story Director, while Show all and Escape return to the shelf. In the measured workflow proof the panel shrinks from about 128px to 55px on desktop and 172px to 107px on mobile, moving the 390×844 diagram start from about y=389 to y=324 so the complete first diagram fits above the fold. Play and chapter targets remain 44px, chapter scrolling stays contained, and no panel, toggle, storage, schema, IR, renderer branch, dependency, motion owner, canonical SVG, or export state was added.- **Settled Flow.** Ordinary trace artifacts now spend their ambient motion budget once: edges, nodes, and Signal Flow scan complete one finite pass, then the viewer marks the canvas settled and restores every authored relationship style—including solid lines, security `5,5`, and async `4,4` dashes. The pass cannot replay when `Still` returns to `Live`; Story, Route, Lens, previews, embed, hidden pages, and reduced-motion continue to take priority. Long graphs cap visual delay without reordering semantic data. Canonical SVG/raster exports stay static, while WebM explicitly samples the same authored relationship geometry into its own repeatable finite canvas timeline. No schema, IR, renderer branch, layout, control, or dependency was added.-- **First-fold Proof Aperture.** The GitHub Pages hero now tightens its normal-flow vertical rhythm so the existing generated Live Proof exposes real diagram canvas—not just its border and chrome—inside the initial 1280×720 and 390×844 viewports. The eager iframe first loads the same settled named view, then one Intersection Observer handshake requests the existing finite `play=1` story only after at least 88 real canvas pixels are visible; it disconnects permanently, while reduced-motion and no-Observer readers keep the static proof. The complete bilingual promise, both 44px actions, three explicit proof tabs, deliberate tab playback, stable authored views, validation receipts, and canvas heights remain intact, with no carousel, scroll polling, second motion region, schema/renderer/export change, or new dependency.+- **First-fold Proof Aperture.** The GitHub Pages hero now tightens its normal-flow vertical rhythm so the existing generated Live Proof exposes real diagram canvas—not just its border and chrome—inside the initial 1280×720 and 390×844 viewports. One eager, script-only sandboxed iframe loads the same finite `play=1` named story exactly once and delegates reduced-motion behavior to the generated artifact itself; it neither reaches into the parent DOM nor grants same-origin privileges. The complete bilingual promise, both 44px actions, three explicit proof tabs, deliberate tab playback, stable authored views, validation receipts, and canvas heights remain intact, with no carousel, scroll polling, second motion region, schema/renderer/export change, or new dependency.- **Story Horizon.** Every non-final Story Beat now distinguishes one exact immediate-next stop from the farther pending story: the next authored node receives a restrained static state, and only the exact already-resolved connector set for that next transition follows it. Grouped transitions preview the real node without inventing an edge; multiple transitions retain every authored edge. The Director Strip names the next stop in its existing desktop footprint, while mobile relies on the same canvas hierarchy with no new row or lost touch height. Final beats clear the horizon, rapid navigation rewrites it atomically, and Still/reduced motion keep the same static meaning. Camera ownership, JSON, schema, IR, layout, dependencies, authored edge styling/geometry, ordinary embeds, print, and canonical SVG/raster/WebM export remain unchanged.- **Story Director Strip.** Every active Story Beat now receives one stable viewer-only caption with its exact position, real previous/current node route, authored edge label where present, and current node responsibility/context. Forward, reverse, multiple, and grouped/no-link states reuse Story Beat's fail-closed classification; the strip never invents a relationship or changes JSON. Automatic playback disables live announcements, while paused, manual, and exact-link states use polite updates. Desktop Presentation playback now keeps Previous, Next, and Pause but hides the chapter rail, Story Trail, Copy moment, and Show all until paused, shrinking the guided surface from about 155px to 82px in the 1280×720 proof and returning roughly 16% more height to the diagram. Still/reduced motion, mobile, ordinary embed, print, canonical SVG/raster/WebM export, schema, IR, renderer layout, dependencies, and authored geometry remain clean.- **Story Follow Camera.** Guided Story playback and deliberate Story Beat activation now frame an authored local window instead of leaving the current stop tiny inside the whole diagram: the first beat shows current + next, middle beats preserve previous + current + next, and the last beat keeps previous + current. The existing Semantic Camera owns the one finite 320ms move with 64px padding and a 1.65× cap; every beat receives at least 1100ms of readable dwell, so the camera settles before the story advances. Pause, manual pan/zoom, chapter replacement, hidden/print state, and Motion Still cancel follow ownership without a stale callback. `Still` and reduced-motion explicitly disable automatic Story playback while keeping manual beat inspection as an instant static frame. Exact `#view=&beat=` restoration waits one frame for the shared camera, then restores the paused moment without pulse or autoplay. Ordinary embeds keep their stable cold open; explicit share playback may follow. Schema, IR, renderer layout, authored geometry, dependencies, storage, and canonical SVG/raster/WebM export remain clean.diff --git a/README.md b/README.mdindex 57754fc4..26a45875 100644--- a/README.md+++ b/README.md@@ -12,7 +12,7 @@**Turn a codebase or system description into a polished, interactive system map — directly in chat.**-Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.+Archify is an agent skill for Cursor, Claude Code, Codex CLI, and OpenCode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, trace upstream/downstream authored reach and exact routes, compare roles, and play guided stories without inventing topology@@ -28,6 +28,8 @@ Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a systemnpx skills add tt-a1i/archify -g```+Using Cursor? Open the [agent-aware quick start](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture) for exact global and project commands.+Then ask your agent: `Use archify to map this repository's runtime architecture.`## See Archify in action@@ -85,13 +87,19 @@ Open [`examples/web-app.html`](examples/web-app.html) locally to try the completnpx skills add tt-a1i/archify -g```+For an explicit, non-interactive Cursor install:++```bash+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes+```+To try it without a permanent install:```bashnpx skills use tt-a1i/archify@archify --agent codex```-Replace `codex` with `claude-code` or `opencode` when needed. The packaged [`archify.zip`](archify.zip) also works without `npm install`.+The same Skill works with `cursor`, `codex`, `claude-code`, and `opencode`; the [quick-start agent switcher](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture) generates the exact command without maintaining vendor-specific forks. The packaged [`archify.zip`](archify.zip) also works without `npm install`.### 2. Ask for one bounded viewdiff --git a/README_EN.md b/README_EN.mdindex 57754fc4..26a45875 100644--- a/README_EN.md+++ b/README_EN.md@@ -12,7 +12,7 @@**Turn a codebase or system description into a polished, interactive system map — directly in chat.**-Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.+Archify is an agent skill for Cursor, Claude Code, Codex CLI, and OpenCode. Give it a system description or repository; get a polished diagram you can open, explore, present, and share.- **Open it and present** — five technical diagram types, three visual presets, dark/light themes, and optional finite motion- **Every interaction stays grounded** — search nodes, optionally open revision-verified source, trace upstream/downstream authored reach and exact routes, compare roles, and play guided stories without inventing topology@@ -28,6 +28,8 @@ Archify is an agent skill for Claude, Codex CLI, and opencode. Give it a systemnpx skills add tt-a1i/archify -g```+Using Cursor? Open the [agent-aware quick start](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture) for exact global and project commands.+Then ask your agent: `Use archify to map this repository's runtime architecture.`## See Archify in action@@ -85,13 +87,19 @@ Open [`examples/web-app.html`](examples/web-app.html) locally to try the completnpx skills add tt-a1i/archify -g```+For an explicit, non-interactive Cursor install:++```bash+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes+```+To try it without a permanent install:```bashnpx skills use tt-a1i/archify@archify --agent codex```-Replace `codex` with `claude-code` or `opencode` when needed. The packaged [`archify.zip`](archify.zip) also works without `npm install`.+The same Skill works with `cursor`, `codex`, `claude-code`, and `opencode`; the [quick-start agent switcher](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture) generates the exact command without maintaining vendor-specific forks. The packaged [`archify.zip`](archify.zip) also works without `npm install`.### 2. Ask for one bounded viewdiff --git a/README_ZH.md b/README_ZH.mdindex 5392a998..bfde14df 100644--- a/README_ZH.md+++ b/README_ZH.md@@ -8,7 +8,7 @@**在对话里,把代码仓库或系统描述变成漂亮、可靠、可交互的系统地图。**-Archify 是适用于 Claude、Codex CLI 和 opencode 的 Agent Skill。给它一段系统描述或一个代码仓库,就能得到可打开、可探索、可演示、可分享的专业技术图。+Archify 是适用于 Cursor、Claude Code、Codex CLI 和 OpenCode 的 Agent Skill。给它一段系统描述或一个代码仓库,就能得到可打开、可探索、可演示、可分享的专业技术图。- **打开就是成品** —— 五种技术图、三套视觉预设、深浅主题,以及显式启用的有限动态- **每次探索都有依据** —— 搜索节点、按需打开版本校验过的源码、追踪作者定义的上下游可达范围与精确路径、对比角色、播放故事,但不编造拓扑@@ -24,6 +24,8 @@ Archify 是适用于 Claude、Codex CLI 和 opencode 的 Agent Skill。给它一npx skills add tt-a1i/archify -g```+使用 Cursor?打开[可切换 Agent 的快速开始页](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture),即可获得准确的全局或当前仓库安装命令。+然后告诉 Agent:`使用 archify 梳理这个仓库的运行时架构。`## 看看 Archify 能做什么@@ -81,13 +83,19 @@ Export 菜单支持复制 PNG,并下载静态或动态格式:npx skills add tt-a1i/archify -g```+显式、非交互地安装到 Cursor:++```bash+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes+```+如果只想临时体验:```bashnpx skills use tt-a1i/archify@archify --agent codex```-需要时可以把 `codex` 换成 `claude-code` 或 `opencode`。仓库内的 [`archify.zip`](archify.zip) 也不需要执行 `npm install`。+同一份 Skill 可用于 `cursor`、`codex`、`claude-code` 和 `opencode`;[快速开始页的 Agent 切换器](https://tt-a1i.github.io/archify/start.html?agent=cursor&type=architecture)会生成准确命令,不维护厂商专属分叉。仓库内的 [`archify.zip`](archify.zip) 也不需要执行 `npm install`。### 2. 先画一个边界清楚的视图diff --git a/ROADMAP.md b/ROADMAP.mdindex a38b9841..2b129ea8 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -2,6 +2,8 @@As of v2.12.0, the coordinate-stability work has shipped as JSON IR plus typed renderers for architecture, workflow, sequence, data-flow, and lifecycle diagrams. Workflow diagrams now also have phase/group/exception-lane structure, happy-path linting, trace animation, and route-crossing guards. The shared viewer adds deterministic semantic node IDs, optional author-controlled relationship IDs with durable `#relation=` links, a pre-click Intent Trace for exact one-hop traffic, a two-endpoint Route Probe with an inspectable Route Journey over deterministic shortest authored paths, searchable Node Finder navigation, read-only one-hop focus with a renderer-owned Semantic Passport and copyable focus link, upstream/downstream Authored Reachability, a runtime-built Semantic Radar for desktop viewport navigation, bounded typed guided views with a visible Named Chapter Rail, pre-commit Chapter Delta Preview, Shared Anchor Handoff, and path-aware Semantic Story Beats, a reader-controlled Live/Still Motion Governor, share-ready one-shot chapters with a title/route/step/state/progress cue, a viewport-filling Presentation Stage, Semantic Camera framing, pan/zoom, three reader-switchable visual presets, a contain-only 1200×630 Share Card, route-focused Route Share Card and authored-reach Reach Share Card variants, and browser-native WebM export. A generated Proof Lab publishes 11 live scenario artifacts with their exact sources, three named reader views, 99 artifact checks, and named composition receipts; its preview grid stays static while deliberate proof links play one named chapter once. The landing-page Live Proof Stage promotes three of those generated artifacts into the first bounded motion proof, and the README motion reel carries the same proof-first story onto GitHub without claiming SVG animation support. A question-first scenario guide maps concrete user needs to those 11 bounded recipes across the five modes, with one shared source for CLI and GitHub Pages and direct proof navigation. A unified CLI (`bin/archify.mjs`) wraps guide, render, preview, deliver, validate, check, and examples, with optional last-good desktop preview and verified post-commit open handoffs. This file records the design decisions that led there, plus the ideas that were explicitly declined. The original v2.4 / v2.5 backlog (export-scale URL param, color-blind palette, gzip+base64 share links) was considered and dropped — see [Not planned](#not-planned) for the rationale on each.+The latest distribution slice makes Cursor a first-class onboarding choice without introducing a second Skill. README EN/ZH, landing copy, and the generated Start page now share explicit `cursor`, `codex`, `claude-code`, and `opencode` targets; `?agent=` is bounded to those four values, keyboard navigation and language switching preserve the selection, and the page emits exact global or repository-local copy-mode commands while carrying no repository content. The installer canary unpacks the zero-dependency archive at Cursor's supported `.agents/skills/archify` root and validates all five modes. A fresh Cursor Agent CLI session independently discovered the same `SKILL.md`, ran doctor, authored typed Architecture source, and delivered a 9/9-check artifact; built-in-browser review confirmed its main and failure paths and zero console errors. The contract intentionally omits `skills use --agent cursor`, automatic updates, a fixed `~/.cursor` location, universal model-quality claims, Cursor-only renderer/schema behavior, and mobile scope.+The latest stability slice adds Structured Repair Receipt across `validate --json`, `deliver --json`, and Last-Good Preview. A failed input, schema, repository-evidence check, Clean Flow or composition gate, artifact check, or delivery stage now returns one additive `schemaVersion: 1` object with stable `diagnostics[]`: rule code, severity, exact subject, measured evidence, and only supported repair controls. Renderer child processes emit a private structured boundary so the CLI never copies Node stacks into machine output; human mode formats the same facts, and unknown internal failures remain explicitly unclassified with no invented fix. Validate and deliver expose identical Clean Flow evidence, failed delivery still preserves the old artifact byte-for-byte, five modes share schema-subject coverage, and preview shows the bounded repair without leaking its private paths. This is a feedback protocol, not auto-layout or auto-fix: no LLM call, retry expansion, schema/IR change, geometry rewrite, viewer panel, dependency, hosted service, telemetry, or mobile surface was added.The latest authoring slice adds Last-Good Live Preview. `archify preview <type> <input.json> [output.html]` binds one random IPv4 loopback port, opens one desktop status shell, and combines content-digest polling with directory watching so editor rename bursts and missed native notifications converge on the same source bytes. Every generation snapshots those exact bytes, then runs the existing atomic `deliver` pipeline into a private same-directory staging area; immediately before rename, preview rereads the named source digest, so only the latest passing SHA-256 receipt may replace the output and advance the iframe revision. Invalid, missing, half-written, failed, or superseded candidates update an exact stage diagnostic while the last verified artifact stays visible and byte-stable. Identical sources do not rebuild, identical artifacts do not reload, canonical future-path checks reject input/output aliases, external hosts and write requests are rejected, shutdown gives an active delivery a bounded graceful drain before terminating a stuck process and removing the server and staging directory, and installed ZIP skills keep the zero-dependency contract across all five modes. Preview is explicit, desktop-only, and local: no server state, port, path, error, or reload token enters HTML, SVG, raster, WebM, Share Card, schema, renderer, layout, storage, hosted network, or mobile scope.diff --git a/archify/test/cursor-onboarding.test.mjs b/archify/test/cursor-onboarding.test.mjsnew file mode 100644index 00000000..358becce--- /dev/null+++ b/archify/test/cursor-onboarding.test.mjs@@ -0,0 +1,74 @@+import { test } from 'node:test';+import assert from 'node:assert/strict';+import { execFileSync } from 'node:child_process';+import fs from 'node:fs';+import os from 'node:os';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++const __dirname = path.dirname(fileURLToPath(import.meta.url));+const skillRoot = path.resolve(__dirname, '..');+const repoRoot = path.resolve(skillRoot, '..');+const cursorCommand = 'npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes';++test('Cursor onboarding stays explicit, bilingual, and backed by the same Skill', () => {+ const english = fs.readFileSync(path.join(repoRoot, 'README.md'), 'utf8');+ const englishMirror = fs.readFileSync(path.join(repoRoot, 'README_EN.md'), 'utf8');+ const chinese = fs.readFileSync(path.join(repoRoot, 'README_ZH.md'), 'utf8');+ const start = fs.readFileSync(path.join(repoRoot, 'docs', 'start.html'), 'utf8');+ const landing = fs.readFileSync(path.join(repoRoot, 'docs', 'index.html'), 'utf8');++ assert.equal(english, englishMirror, 'English README mirrors must stay synchronized');+ assert.match(english, /Cursor, Claude Code, Codex CLI, and OpenCode/);+ assert.match(chinese, /Cursor、Claude Code、Codex CLI 和 OpenCode/);+ for (const surface of [english, chinese, landing]) assert.ok(surface.includes(cursorCommand));+ for (const surface of [english, chinese, start, landing]) {+ assert.doesNotMatch(surface, /skills use[^\n<]*--agent cursor/);+ assert.doesNotMatch(surface, /~\/\.cursor\/skills\/archify/);+ assert.doesNotMatch(surface, /all Cursor models|every Cursor model/i);+ }++ assert.match(start, /data-agent="cursor">Cursor<\/button>/);+ assert.match(start, /data-agent="codex">Codex<\/button>/);+ assert.match(start, /data-agent="claude-code">Claude Code<\/button>/);+ assert.match(start, /data-agent="opencode">OpenCode<\/button>/);+ assert.match(start, /KNOWN_AGENTS\.has\(requestedAgent\)/);+ assert.match(start, /same Skill/);+ assert.match(start, /同一份 Skill/);+ assert.doesNotMatch(start, /vendor-specific (?:renderer|schema|skill)/i);+});++test('the zero-dependency archive works from the canonical Cursor-visible agent path', () => {+ const tmp = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-cursor-package-'));+ const agentSkills = path.join(tmp, '.agents', 'skills');+ try {+ fs.mkdirSync(agentSkills, { recursive: true });+ execFileSync('unzip', ['-q', path.join(repoRoot, 'archify.zip'), '-d', agentSkills]);+ const installed = path.join(agentSkills, 'archify');+ const cli = path.join(installed, 'bin', 'archify.mjs');+ const doctor = execFileSync(process.execPath, [cli, 'doctor'], { encoding: 'utf8' });+ assert.match(doctor, /Archify is ready\./);++ const fixtures = {+ architecture: 'web-app.architecture.json',+ workflow: 'agent-tool-call.workflow.json',+ sequence: 'cache-miss-request.sequence.json',+ dataflow: 'product-analytics.dataflow.json',+ lifecycle: 'agent-run.lifecycle.json',+ };+ for (const [type, fixture] of Object.entries(fixtures)) {+ const output = execFileSync(process.execPath, [+ cli,+ 'validate',+ type,+ path.join(installed, 'examples', fixture),+ '--json',+ ], { encoding: 'utf8' });+ const receipt = JSON.parse(output);+ assert.equal(receipt.ok, true, `${type}: installed package validation failed`);+ assert.equal(receipt.type, type);+ }+ } finally {+ fs.rmSync(tmp, { recursive: true, force: true });+ }+});diff --git a/archify/test/landing.test.mjs b/archify/test/landing.test.mjsindex 289e7a36..08c789cf 100644--- a/archify/test/landing.test.mjs+++ b/archify/test/landing.test.mjs@@ -29,6 +29,8 @@ const proofs = [test('landing metadata describes the full technical-diagram product without changing the hero', () => {assert.match(landing, /<title>Archify — Technical Diagrams from Plain English<\/title>/);assert.match(landing, /<meta property="og:title" content="Archify — Technical Diagrams from Plain English">/);+ assert.match(landing, /An agent skill for Cursor, Claude Code, Codex CLI, and OpenCode/);+ assert.equal((landing.match(/npx -y skills add tt-a1i\/archify --skill archify --agent cursor --global --copy --yes/g) || []).length, 2);assert.match(landing, /From plain English<br>to architecture <em>in seconds\.<\/em>/);});@@ -64,9 +66,11 @@ test('landing proof switcher is bilingual and keyboard navigable', () => {assert.match(landing, /event\.key === 'Home'/);assert.match(landing, /event\.key === 'End'/);assert.match(landing, /proofFrame\.dataset\.proof !== key/);- assert.match(landing, /\?embed=1&theme=dark#view=happy-path/);+ assert.match(landing, /\?embed=1&play=1&theme=dark#view=happy-path/);+ assert.match(landing, /sandbox="allow-scripts"/);assert.match(landing, /const playback = play \? '&play=1' : ''/);assert.match(landing, /proofEmbedUrl\(proof, \{ play: deliberate \}\)/);+ assert.doesNotMatch(landing, /proofFrame\.contentWindow|proofFrame\.contentDocument/);assert.match(landing, /\?present=1&play=1#view=/);assert.match(landing, /#view=\$\{encodeURIComponent\(proof\.view\)\}/);assert.match(landing, /Pin one exact Story Moment, copy its stable link, and let someone else open the same authored node/);diff --git a/archify/test/proof-aperture.test.mjs b/archify/test/proof-aperture.test.mjsindex 9e8323c8..b9ba90d3 100644--- a/archify/test/proof-aperture.test.mjs+++ b/archify/test/proof-aperture.test.mjs@@ -42,30 +42,25 @@ test('narrow mobile gets an independently tuned proof aperture and full-size actassert.match(mobile, /\.proof-viewport\s*\{\s*height:400px;\s*\}/);});-test('proof aperture remains one real eager artifact with explicit user-selected identities', () => {+test('proof aperture remains one real eager sandboxed artifact with explicit user-selected identities', () => {assert.equal((landing.match(/<iframe id="hero-proof-frame"/g) || []).length, 1);assert.match(landing, /loading="eager"/);+ assert.match(landing, /sandbox="allow-scripts"/);+ assert.doesNotMatch(landing, /sandbox="[^"]*allow-same-origin/);assert.equal((landing.match(/class="proof-tab"/g) || []).length, 3);- assert.match(landing, /data-proof-playback="settled"/);- assert.match(landing, /\?embed=1&theme=dark#view=happy-path/);- assert.doesNotMatch(landing, /src="[^"]+play=1[^"]+"/);+ assert.match(landing, /data-proof-playback="first-fold-once"/);+ assert.match(landing, /\?embed=1&play=1&theme=dark#view=happy-path/);assert.doesNotMatch(landing, /setInterval\(|scrollIntoView\(|scroll-triggered|proof-carousel/);});-test('initial proof playback waits for 88 visible canvas pixels and can start only once', () => {- assert.match(landing, /let initialProofPlaybackStarted = false/);- assert.match(landing, /visibleHeight < 88/);- assert.match(landing, /new IntersectionObserver\(entries =>/);- assert.match(landing, /threshold: \[0, \.15, \.2\]/);- assert.match(landing, /if \(initialProofPlaybackStarted \|\| proofMotionPreference\.matches \|\| activeProof !== 'signal'\) return false/);- assert.match(landing, /initialProofPlaybackStarted = true/);- assert.match(landing, /proofStage\.dataset\.proofPlayback = 'visible-once'/);- assert.match(landing, /initialProofObserver\.disconnect\(\)/);+test('initial proof playback uses one sandboxed load without parent-frame reach-through', () => {+ assert.match(landing, /src="gallery\/artifacts\/agent-tool-call\.workflow\.html\?embed=1&play=1&theme=dark#view=happy-path"/);+ assert.doesNotMatch(landing, /initialProof|proofFrameDocumentIsReady|proofFrame\.contentWindow|proofFrame\.contentDocument/);+ assert.match(landing, /proofFrame\.addEventListener\('load', \(\) => \{/);+ assert.match(landing, /proofStage\.classList\.remove\('is-loading'\)/);});-test('proof visibility handshake has reduced-motion, no-observer, and deliberate-choice boundaries', () => {- assert.match(landing, /window\.matchMedia\('\(prefers-reduced-motion: reduce\)'\)/);- assert.match(landing, /if \(proofMotionPreference\.matches \|\| !\('IntersectionObserver' in window\)\) return/);+test('proof playback delegates reduced motion to the artifact and keeps deliberate-choice boundaries', () => {assert.match(landing, /renderProof\(tab\.dataset\.proof, \{ deliberate: true \}\)/);assert.match(landing, /renderProof\(tabs\[next\]\.dataset\.proof, \{ focus: true, deliberate: true \}\)/);assert.match(landing, /proofEmbedUrl\(proof, \{ play: deliberate \}\)/);diff --git a/archify/test/start-page.test.mjs b/archify/test/start-page.test.mjsindex 28d0abb0..debb4144 100644--- a/archify/test/start-page.test.mjs+++ b/archify/test/start-page.test.mjs@@ -28,8 +28,11 @@ test('start page: checked-in HTML is reproducible from canonical scenario recipetest('start page: offers five bounded bilingual starts without ingesting source content', () => {const html = fs.readFileSync(path.join(repoRoot, 'docs/start.html'), 'utf8');assert.doesNotMatch(html, /\[\[[A-Z0-9_]+\]\]/);- assert.match(html, /npx skills add tt-a1i\/archify -g/);- assert.match(html, /npx skills use tt-a1i\/archify@archify --agent codex/);+ assert.match(html, /npx -y skills add tt-a1i\/archify --skill archify --agent codex --global --copy --yes/);+ assert.match(html, /npx -y skills add tt-a1i\/archify --skill archify --agent codex --copy --yes/);+ for (const agent of ['cursor', 'codex', 'claude-code', 'opencode']) {+ assert.match(html, new RegExp(`role="tab" data-agent="${agent}"`));+ }assert.match(html, /data-en="One install\."/);assert.match(html, /data-en="One bounded prompt\."/);assert.match(html, /data-zh="一次安装,"/);@@ -47,6 +50,10 @@ test('start page: offers five bounded bilingual starts without ingesting sourceassert.ok(scriptMatch);assert.doesNotThrow(() => new vm.Script(scriptMatch[1]));assert.match(scriptMatch[1], /KNOWN_TYPES\.has\(requestedType\)/);+ assert.match(scriptMatch[1], /KNOWN_AGENTS\.has\(requestedAgent\)/);+ assert.match(scriptMatch[1], /next\.set\('agent', agent\)/);+ assert.match(scriptMatch[1], /--agent ' \+ agent \+ ' --global --copy --yes/);+ assert.match(scriptMatch[1], /--agent ' \+ agent \+ ' --copy --yes/);assert.match(scriptMatch[1], /textContent/);assert.match(scriptMatch[1], /replaceChildren/);assert.doesNotMatch(scriptMatch[1], /innerHTML/);diff --git a/docs/cursor-acceptance-2026-07.md b/docs/cursor-acceptance-2026-07.mdnew file mode 100644index 00000000..759d46bb--- /dev/null+++ b/docs/cursor-acceptance-2026-07.md@@ -0,0 +1,73 @@+# Cursor acceptance record++> Verified: 2026-07-23+> Scope: project-local Cursor Agent Skill discovery and one checked Architecture delivery+> This is a dated compatibility record, not a claim that every Cursor version or model produces identical output.++## Environment++- Cursor Agent CLI: `2026.07.20-8cc9c0b`+- Model selection: `auto` (Cursor CLI default)+- OS: macOS 26.5.2 (`25F84`)+- Skills CLI: `[email protected]`+- Archify source: `codex/cursor-onboarding`, based on `e7e22a1`++## Installation and discovery++The acceptance workspace was a new temporary directory. Archify was installed with the reproducible project command:++```bash+npx -y [email protected] add /path/to/archify \+ --skill archify --agent cursor --copy --yes+```++`skills list --agent cursor --json` reported one project-scoped `Cursor` installation at `.agents/skills/archify`. A new Cursor Agent session then independently reported that it had discovered:++```text+.agents/skills/archify/SKILL.md+```++The session ran `archify doctor` successfully before authoring. No Cursor-specific `SKILL.md`, renderer, schema, or prompt fork was present.++## End-to-end task++Cursor was asked to use Archify to create a six-component local event-processing Architecture diagram containing:++- Webhook Client+- API Gateway+- Event Router+- Worker+- PostgreSQL+- Dead Letter Queue++The authored main path was `Webhook Client → API Gateway → Event Router → Worker → PostgreSQL`; the explicit failure route was `Worker → Dead Letter Queue` with label `on failure`.++Cursor wrote only the typed source and checked HTML in the workspace root, in addition to installer-owned files. Its delivery receipt reported:++```text+validation: passed+visual_review: skipped (image reader unavailable in Cursor session)+correction_rounds: 0+quality: showcase+compositionStatus: pass+checksPassed: 9/9+errors: 0+warnings: 0+artifact.sha256: d4d443f160fafd7615234987a5572d7169916719b9a97b9231e9f48434c79e4a+artifact.bytes: 582743+```++An independent Archify `validate --json` and `check --json` rerun matched the nine passing checks, zero composition findings, byte count, and SHA-256 receipt.++## Browser review++The generated HTML was opened in the built-in browser at a 1280×720 desktop viewport. The complete six-node main path was readable in Presentation Stage, the Worker-to-DLQ relationship remained visually distinct, and selecting the authored `Failure to DLQ` chapter framed exactly Worker and Dead Letter Queue while leaving the rest as context. The Start page's Cursor selector, English/Chinese switching, agent URL state, and exact global/project install commands were also exercised. Finally, the landing Live Proof's script-only sandbox was checked through its initial Signal Flow chapter and a deliberate Blueprint switch. All three surfaces produced zero browser warnings or errors in the final clean sessions.++Result: **Cursor project installation, native Skill discovery, execution, verified delivery, and desktop browser presentation passed for the recorded environment.**++## Boundaries retained++- `skills use ... --agent cursor` is not documented because `[email protected]` rejects that launcher.+- No physical `~/.cursor/skills` path is promised; Cursor also officially scans `.agents/skills`, which the verified installer uses.+- Global installation is documented as user-wide, project installation as repository-local, and both use explicit copy mode.+- This record does not benchmark other Cursor models, claim automatic updates, or replace Archify's deterministic and perceptual delivery gates.diff --git a/docs/index.html b/docs/index.htmlindex d049f7ac..8d823ad4 100644--- a/docs/index.html+++ b/docs/index.html@@ -4,7 +4,7 @@<meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Archify — Technical Diagrams from Plain English</title>- <meta name="description" content="An agent skill for Claude, Codex CLI, and opencode that turns plain-English descriptions into polished, explorable, self-contained technical diagrams with semantic focus, motion, and crisp export.">+ <meta name="description" content="An agent skill for Cursor, Claude Code, Codex CLI, and OpenCode that turns plain-English descriptions into polished, explorable, self-contained technical diagrams with semantic focus, motion, and crisp export."><meta name="theme-color" content="#020617"><link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'><polygon points='14,2 26,8 26,20 14,26 2,20 2,8' fill='%23083344' stroke='%2322d3ee' stroke-width='1.5'/><circle cx='14' cy='15' r='2.5' fill='%2322d3ee'/></svg>">@@ -277,7 +277,7 @@<span data-i18n="hero-gallery">Explore proof gallery</span></a></div>- <div class="hero-proof fade-up d4" id="hero-proof-stage" data-proof-playback="settled">+ <div class="hero-proof fade-up d4" id="hero-proof-stage" data-proof-playback="first-fold-once"><div class="proof-chrome"><div class="proof-status"><span class="proof-live" data-i18n="proof-live">Live proof</span>@@ -296,7 +296,7 @@</a></div><div class="proof-viewport" id="hero-proof-panel" role="tabpanel" aria-labelledby="proof-tab-signal">- <iframe id="hero-proof-frame" data-proof="signal" src="gallery/artifacts/agent-tool-call.workflow.html?embed=1&theme=dark#view=happy-path" title="Agent Tool Call live Archify proof" loading="eager"></iframe>+ <iframe id="hero-proof-frame" data-proof="signal" src="gallery/artifacts/agent-tool-call.workflow.html?embed=1&play=1&theme=dark#view=happy-path" title="Agent Tool Call live Archify proof" loading="eager" sandbox="allow-scripts"></iframe></div><div class="proof-caption" aria-live="polite"><div class="proof-caption-main">@@ -552,13 +552,13 @@<div><div class="section-label fade-up" data-i18n="label-qs">Quick Start</div><h2 class="section-heading fade-up d1" data-i18n="qs-h2">Up and running<br>in three steps.</h2>- <p class="section-body fade-up d2" style="margin-bottom:2.5rem" data-i18n="qs-body">One command for Claude Code, Codex, or opencode. Or try it with a temporary copy.</p>+ <p class="section-body fade-up d2" style="margin-bottom:2.5rem" data-i18n="qs-body">One checked Skill for Cursor, Claude Code, Codex, and OpenCode. Choose an agent, then draw.</p><div class="steps"><div class="step fade-up d1"><div class="step-num">1</div><div class="step-content"><h4 data-i18n="step1-h">Install in one command</h4>- <p data-i18n="step1-p">Run <code>npx skills add tt-a1i/archify -g</code>, then select your agent. To try it without a permanent install, use <code>npx skills use tt-a1i/archify@archify --agent codex</code>.</p>+ <p data-i18n="step1-p">Run <code>npx skills add tt-a1i/archify -g</code>, or open the <a href="start.html?agent=cursor&type=architecture">agent-aware quick start</a> for an exact Cursor, Codex, Claude Code, or OpenCode command.</p></div></div><div class="step fade-up d2">@@ -584,8 +584,8 @@<div class="code-bar-dots"><span class="d-red"></span><span class="d-amber"></span><span class="d-green"></span></div><span class="code-bar-label" data-i18n="code-label">example prompt</span></div>- <div class="code-body" id="code-en"><span class="cmt"># Step 1 — install globally</span>-npx skills add tt-a1i/archify -g+ <div class="code-body" id="code-en"><span class="cmt"># Step 1 — install globally for Cursor</span>+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes<span class="cmt"># Or try with Codex, without a permanent install</span>npx skills use tt-a1i/archify@archify --agent codex@@ -609,8 +609,8 @@ with rollback on failure.</span><span class="str">"Add a Kafka message bus""Move Redis next to the DB""Use rose for the auth path"</span></div>- <div class="code-body" id="code-zh" style="display:none"><span class="cmt"># 第 1 步 — 全局安装</span>-npx skills add tt-a1i/archify -g+ <div class="code-body" id="code-zh" style="display:none"><span class="cmt"># 第 1 步 — 全局安装到 Cursor</span>+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes<span class="cmt"># 或者用临时副本启动 Codex</span>npx skills use tt-a1i/archify@archify --agent codex@@ -732,8 +732,8 @@ npx skills use tt-a1i/archify@archify --agent codex'chip-external':'External','chip-external-use':'Users, 3rd parties, generic','label-qs':'Quick Start','qs-h2':'Up and running<br>in three steps.',- 'qs-body':'One command for Claude Code, Codex, or opencode. Or try it with a temporary copy.',- 'step1-h':'Install in one command','step1-p':'Run <code>npx skills add tt-a1i/archify -g</code>, then select your agent. To try it without a permanent install, use <code>npx skills use tt-a1i/archify@archify --agent codex</code>.',+ 'qs-body':'One checked Skill for Cursor, Claude Code, Codex, and OpenCode. Choose an agent, then draw.',+ 'step1-h':'Install in one command','step1-p':'Run <code>npx skills add tt-a1i/archify -g</code>, or open the <a href="start.html?agent=cursor&type=architecture">agent-aware quick start</a> for an exact Cursor, Codex, Claude Code, or OpenCode command.','step2-h':'Describe your system','step2-p':'Describe components, connections, and cloud services — or ask your agent to analyze the repository first.','step3-h':'Ask your agent to draw it','step3-p':'Tell your agent to use Archify. It generates a self-contained HTML file you can open in any browser and refine in chat.','code-label':'example prompt',@@ -791,8 +791,8 @@ npx skills use tt-a1i/archify@archify --agent codex'chip-external':'外部系统','chip-external-use':'用户、第三方、通用外部','label-qs':'快速开始','qs-h2':'三步上手,<br>即刻运行。',- 'qs-body':'一条命令用于 Claude Code、Codex 或 opencode,也可以先用临时副本试用。',- 'step1-h':'一条命令安装','step1-p':'运行 <code>npx skills add tt-a1i/archify -g</code>,然后选择使用的 agent。不想常驻安装,可运行 <code>npx skills use tt-a1i/archify@archify --agent codex</code>。',+ 'qs-body':'同一份经过检查的 Skill 可用于 Cursor、Claude Code、Codex 和 OpenCode;选择 Agent,然后开始作图。',+ 'step1-h':'一条命令安装','step1-p':'运行 <code>npx skills add tt-a1i/archify -g</code>,或打开<a href="start.html?agent=cursor&type=architecture">可切换 Agent 的快速开始页</a>,获取准确的 Cursor、Codex、Claude Code 或 OpenCode 命令。','step2-h':'描述你的系统','step2-p':'描述组件、连接关系和云服务,也可以先让 agent 分析代码仓库。','step3-h':'让 agent 绘制','step3-p':'告诉 agent 使用 Archify,它会生成可在任意浏览器打开的单文件 HTML,并可继续在对话中迭代。','code-label':'示例提示词',@@ -835,9 +835,6 @@ npx skills use tt-a1i/archify@archify --agent codexconst proofOpen = document.getElementById('proof-open');const proofMeta = document.getElementById('proof-meta');const proofTitle = document.getElementById('proof-title');- const proofMotionPreference = window.matchMedia('(prefers-reduced-motion: reduce)');- let initialProofPlaybackStarted = false;- let initialProofObserver = null;function proofEmbedUrl(proof, { play = false } = {}) {const playback = play ? '&play=1' : '';@@ -861,40 +858,16 @@ npx skills use tt-a1i/archify@archify --agent codexproofTitle.textContent = proof.title[lang];proofFrame.title = proof.iframeTitle[lang];if (proofFrame.dataset.proof !== key) {- if (deliberate) {- initialProofPlaybackStarted = true;- initialProofObserver?.disconnect();- proofStage.dataset.proofPlayback = 'deliberate';- }+ if (deliberate) proofStage.dataset.proofPlayback = 'deliberate';proofStage.classList.add('is-loading');proofFrame.dataset.proof = key;proofFrame.src = proofEmbedUrl(proof, { play: deliberate });}}- function startInitialProofPlayback() {- if (initialProofPlaybackStarted || proofMotionPreference.matches || activeProof !== 'signal') return false;- initialProofPlaybackStarted = true;- proofStage.dataset.proofPlayback = 'visible-once';- proofStage.classList.add('is-loading');- proofFrame.src = proofEmbedUrl(PROOFS.signal, { play: true });- return true;- }-- function armInitialProofPlayback() {- if (proofMotionPreference.matches || !('IntersectionObserver' in window)) return;- initialProofObserver = new IntersectionObserver(entries => {- const entry = entries.find(candidate => candidate.target === proofPanel);- if (!entry) return;- const visibleHeight = Math.max(0, Math.min(entry.boundingClientRect.bottom, entry.rootBounds?.bottom ?? innerHeight) - Math.max(entry.boundingClientRect.top, entry.rootBounds?.top ?? 0));- if (!entry.isIntersecting || visibleHeight < 88) return;- startInitialProofPlayback();- initialProofObserver.disconnect();- }, { threshold: [0, .15, .2] });- initialProofObserver.observe(proofPanel);- }-- proofFrame.addEventListener('load', () => proofStage.classList.remove('is-loading'));+ proofFrame.addEventListener('load', () => {+ proofStage.classList.remove('is-loading');+ });document.querySelectorAll('.proof-tab').forEach(tab => {tab.addEventListener('click', () => renderProof(tab.dataset.proof, { deliberate: true }));tab.addEventListener('keydown', event => {@@ -928,10 +901,6 @@ npx skills use tt-a1i/archify@archify --agent codexbtnLang.addEventListener('click', () => applyLang(lang === 'en' ? 'zh' : 'en'));applyLang(lang);- armInitialProofPlayback();- proofMotionPreference.addEventListener?.('change', event => {- if (event.matches && !initialProofPlaybackStarted) initialProofObserver?.disconnect();- });/* ══ Intersection observer ══ */if ('IntersectionObserver' in window) {diff --git a/docs/research-cursor-onboarding-2026-07.md b/docs/research-cursor-onboarding-2026-07.mdnew file mode 100644index 00000000..2b28e8cd--- /dev/null+++ b/docs/research-cursor-onboarding-2026-07.md@@ -0,0 +1,133 @@+# Archify first-class Cursor onboarding research++> Snapshot: 2026-07-23. Sources are limited to Cursor's official documentation and changelog, the official `vercel-labs/skills` repository and CLI, Archify's own issue/docs/tests, and first-party peer repositories.++## Decision++**Recommendation:** add Cursor as a first-class installation surface for the existing `archify` Skill. Do not fork `SKILL.md`, add a Cursor-only runtime, or call the work complete until one real Cursor Editor/CLI session discovers the Skill and produces a verified artifact.++Use an explicit agent, skill, scope, and copy mode in product copy:++```bash+# Individual use: available in every Cursor project+npx -y skills add tt-a1i/archify --skill archify --agent cursor --global --copy --yes++# Team/repository use: installed only in the current project+npx -y skills add tt-a1i/archify --skill archify --agent cursor --copy --yes+```++For a reproducible test fixture, pin the version that was verified in this snapshot:++```bash+npx -y [email protected] add tt-a1i/archify --skill archify --agent cursor --copy --yes+```++`[email protected]` is the published version in the official package source at this snapshot. Its CLI supports `--agent`, `--skill`, `--global`, `--copy`, and `--yes`.[`skills` package version](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/package.json#L1-L8) · [`skills add` options](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/README.md#L50-L60)++The unpinned command is the better user-facing default because it receives installer fixes. Pin the CLI in automated acceptance tests so a registry release cannot silently change the expected layout.++## Post-research acceptance++The live gate identified below subsequently passed on the same date. A fresh Cursor Agent CLI `2026.07.20-8cc9c0b` session discovered the project installation at `.agents/skills/archify/SKILL.md`, ran `doctor`, authored typed Architecture JSON, and delivered a showcase artifact with 9/9 checks and zero composition findings. Independent validation plus built-in-browser review confirmed the receipt, readable main/failure paths, working authored chapter, and zero console warnings or errors. See the dated [Cursor acceptance record](./cursor-acceptance-2026-07.md).++This supports first-class Cursor onboarding for the recorded environment. It still does not claim identical quality across every Cursor release or model.++## Verified facts++### Cursor's native contract++- Cursor 2.4 introduced Agent Skills in both the Editor and CLI. Skills can be discovered by the agent from context or invoked from the slash-command menu.[Cursor 2.4 changelog](https://cursor.com/changelog/2-4)+- Cursor automatically loads project skills from `.agents/skills/` and `.cursor/skills/`, and user-level skills from `~/.agents/skills/` and `~/.cursor/skills/`.[Cursor skill directories](https://cursor.com/docs/skills#skill-directories)+- The unit is a folder containing `SKILL.md`; scripts, references, and assets may live beside it. Cursor presents discovered skills under **Customize → Skills → Agent Decides**.[Cursor Skills documentation](https://cursor.com/docs/skills)+- Cursor's GitHub UI import flow is documented as **Customize → Rules → Add Rule → Remote Rule (Github)**, but the official page does not specify how a nested skill is selected or which local scope/path receives it.[Cursor GitHub import](https://cursor.com/docs/skills#installing-skills-from-github)++Therefore these are valid Cursor-native endpoints:++| Scope | Valid Skill roots | Archify entry |+|---|---|---|+| Project | `.agents/skills/`, `.cursor/skills/` | `<root>/archify/SKILL.md` |+| User/global | `~/.agents/skills/`, `~/.cursor/skills/` | `<root>/archify/SKILL.md` |++### What the `skills` CLI actually supports++- The official CLI lists Cursor as install target `cursor`, with project path `.agents/skills/` and documented global path `~/.cursor/skills/`.[Supported agents table](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/README.md#L238-L265) · [Cursor agent configuration](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/agents.ts#L248-L255)+- Project scope is the default; `--global` makes the Skill available across projects. The CLI describes symlink mode as a canonical copy plus agent links, and copy mode as independent copies.[Scope and method documentation](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/README.md#L90-L104)+- Current installer code treats every agent whose project path is `.agents/skills/` as a universal agent. For a universal agent it resolves both project and global installs to the canonical `.agents/skills/` root.[Universal-agent resolution](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/installer.ts#L98-L129) · [Universal-agent predicate](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/agents.ts#L842-L847)+- Consequently, as of `1.5.20`, a Cursor-only **global** CLI install lands in `~/.agents/skills/archify`, not necessarily in the README's `~/.cursor/skills/archify`. This remains a valid Cursor directory, so discovery compatibility is not lost; documentation must not promise the latter physical path.[Global universal install behavior](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/installer.ts#L358-L371) · [Cursor global directories](https://cursor.com/docs/skills#skill-directories)+- `--copy` writes directly to the resolved agent path. Default symlink mode first creates a canonical copy, then links agent-specific paths when those paths differ; if linking fails it falls back to another copy.[Installer copy/symlink implementation](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/installer.ts#L336-L412)+- `skills use ... --agent cursor` is **not** supported by the current CLI. Its interactive launcher only registers `claude-code` and `codex`, and its own test expects Cursor launch to be rejected.[Interactive launcher allowlist](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/use.ts#L74-L86) · [Cursor rejection test](https://github.com/vercel-labs/skills/blob/e173b8c88f2581cfdaa1b6767c6519a08155790e/src/use.test.ts#L216-L222)++### Archify's current evidence++- [Issue #46](https://github.com/tt-a1i/archify/issues/46) is open and asks to collaborate on Cursor usage. It had no comments at this snapshot.+- The current Archify README names Claude, Codex CLI, and opencode, and its installation matrix does not include Cursor.[Current positioning](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/README.md#L11-L19) · [Current installation matrix](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/README.md#L223-L231)+- Archify requires Node.js 18 or newer, but its distributed renderer and validators do not require `npm install`.[Runtime contract](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/archify/package.json#L8-L13) · [Skill setup contract](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/archify/SKILL.md#L27-L33)+- Existing tests already simulate a copied installation with `node_modules` and repository-only tests removed, then exercise all five modes through `deliver` and run live preview.[Installed-copy fixture](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/archify/test/cli.test.mjs#L56-L69) · [Five-mode installed delivery](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/archify/test/cli.test.mjs#L357-L381) · [Installed preview](https://github.com/tt-a1i/archify/blob/e7e22a1e3243d51c1cfbfcce005db1d3355478b3/archify/test/cli.test.mjs#L383-L425)++### Live installer smoke performed for this research++From a fresh temporary directory, this exact command succeeded:++```bash+npx -y [email protected] add tt-a1i/archify \+ --skill archify --agent cursor --copy --yes+```++Observed evidence:++1. `npx -y [email protected] list --agent cursor --json` reported one project-scoped `Cursor` installation at `.agents/skills/archify`.+2. `node .agents/skills/archify/bin/archify.mjs doctor` exited 0.+3. Showcase validation of the installed architecture example exited 0 with nine checks and zero errors/warnings.+4. `deliver` exited 0 and produced a checked, self-contained HTML artifact with a SHA-256 receipt.++This installer smoke alone proves **install-path and packaged-runtime compatibility**. The separate live Cursor Agent gate recorded above subsequently proved discovery and execution for one dated environment; neither result generalizes across every Cursor release or model.++## Scope and installation trade-offs++| Choice | Verified behavior | Risk | Recommendation |+|---|---|---|---|+| Global | Current CLI resolves Cursor to `~/.agents/skills/archify`; Cursor officially scans that root. | A shell-capable Skill becomes available in every project; update timing is user-wide. | Default for an individual who wants Archify everywhere. Say exactly what scope it grants. |+| Project | Installs `.agents/skills/archify` plus `skills-lock.json` in the current repository. | The copied Skill is a substantial repository diff if committed, and can become stale relative to upstream. | Offer as the team/reproducible option, not as a silent default. |+| Default symlink mode | For multiple agents, keeps a canonical copy and creates agent links. For Cursor alone, canonical and agent project paths coincide, so the installed Skill is a real directory, not a live link to GitHub. | “Symlink” may be misread as automatic upstream updates; cross-platform links can fail. | Keep as an advanced/default-CLI behavior, but do not promise automatic updates. |+| `--copy` | Writes an independent Skill tree directly to the resolved Cursor path. | Multiple agent copies can drift and must be reinstalled/updated independently. | Use in the one-line Cursor command for predictable, reviewable files and parity with the tested smoke. |++Regardless of method, tell users that skills execute with the agent's permissions and should be reviewed before use; the official CLI prints this warning after installation.++## Defensible claims vs claims to avoid++### Defensible now++- “Cursor supports Agent Skills in its Editor and CLI.”+- “Install Archify for Cursor with `--agent cursor`; use `.agents/skills/archify` for a project or a Cursor-supported global Skill root for user scope.”+- “The installed Archify package passes `doctor`, validation, and checked HTML delivery without `npm install`, provided Node.js 18+ is available.”+- “Archify uses the same portable `SKILL.md` and renderer contract across Cursor, Claude, Codex, and opencode.”++### Claims to continue avoiding++- “Fully tested across Cursor” or “all Cursor models produce the same visual quality.” One dated Cursor Agent environment passed; broader versions and models were not benchmarked.+- “Try without installing via `npx skills use ... --agent cursor`.” Current `skills` explicitly rejects interactive Cursor launch.+- “The global CLI command installs to `~/.cursor/skills/archify`.” The current implementation resolves Cursor as universal and may use `~/.agents/skills/archify`.+- “Cursor's Remote Rule UI imports Archify correctly from the bare repository URL.” Cursor documents the UI, but not nested Skill selection; Archify's actual Skill lives under `archify/`.+- “The Skill updates automatically.” Both CLI modes create a local copy somewhere; updates require an explicit CLI update/reinstall or an independently managed checkout.++## What close peers teach us++- **GitNexus** turns editor support into an explicit product path: `npx gitnexus setup` auto-detects editors, while `gitnexus setup -c cursor,codex` makes the chosen integrations auditable; its README publishes a Cursor support row instead of relying on generic compatibility language.[GitNexus quick start](https://github.com/abhigyanpatwari/GitNexus/blob/cdbdf219dce797e51cdeb8cfa386e77ab2d35628/README.md#L50-L58) · [GitNexus editor setup](https://github.com/abhigyanpatwari/GitNexus/blob/cdbdf219dce797e51cdeb8cfa386e77ab2d35628/README.md#L201-L210) **Recommendation:** give Cursor its own visible selector/command and acceptance row, without adding an Archify setup daemon.+- **Fireworks Tech Graph** pins a known `skills` version, uses the real nested Skill path, targets agents explicitly, chooses copy mode, documents exact resulting directories, and tells users when runtime restart may be needed.[Fireworks install contract](https://github.com/yizhiyanhua-ai/fireworks-tech-graph/blob/50c819d68fd4fee330b3010988cd13e98b678d44/README.md#L193-L205) · [Fireworks discovery/update note](https://github.com/yizhiyanhua-ai/fireworks-tech-graph/blob/50c819d68fd4fee330b3010988cd13e98b678d44/README.md#L248-L256) **Recommendation:** use explicit `--skill archify --agent cursor --copy --yes`, pin only in tests, and offer “start a new Cursor Agent session if the Skill is not yet visible” as a conservative troubleshooting note rather than an official hard requirement.+- **GitDiagram** compresses first use to one memorable action—replace `hub` with `diagram` in a GitHub URL—then immediately shows the interactive result.[GitDiagram first-use contract](https://github.com/ahmedkhaleel2004/gitdiagram/blob/041d2feb4a9b1593dcf3bde2ca5b9ae7659becb9/README.md#L6-L20) **Recommendation:** pair the Cursor install command with one bounded prompt and `doctor`/`demo`; do not copy its hosted repository-ingestion model into Archify's local, self-contained trust boundary.++## Acceptance gates (3–5 tests)++1. **Project installation contract — automated.** In a clean temporary repository, run the pinned project command. Assert a real directory at `.agents/skills/archify`, valid `SKILL.md` frontmatter, a `skills-lock.json`, and `skills list --agent cursor --json` reporting scope `project` and agent `Cursor`.+2. **Global installation contract — automated in an isolated home/container.** Run the pinned global command without touching the developer's real home. Assert the resulting `archify/SKILL.md` is under a directory Cursor officially scans. For `[email protected]`, expect `~/.agents/skills/archify`; do not hard-code `~/.cursor/skills` as the only valid result.+3. **Installed runtime contract — automated.** From the copied install with no `node_modules`, run `doctor`, then `deliver --quality showcase --json` for architecture, workflow, sequence, dataflow, and lifecycle. Require exit 0, a single JSON receipt, nine checks, zero errors, and an existing self-contained HTML file for every mode.+4. **Real Cursor discovery and invocation — manual release gate (passed 2026-07-23).** In a fresh Cursor Agent session, confirm Archify appears under **Customize → Skills** and is slash-invokable or context-discovered. Ask: `Use archify to map this repository's runtime architecture.` Confirm Cursor runs `doctor`, produces one typed source plus verified HTML, and the artifact opens without console errors. Record Cursor version, model, OS, and scope. The dated acceptance record captures the passing environment; future support claims should continue to name that boundary.+5. **Documentation and negative-contract gate — automated.** Keep README EN/ZH, start page source/generated page, landing page, and installation matrix on one exact Cursor command. Add a guard that fails if docs suggest `skills use ... --agent cursor`, promise `~/.cursor/skills` as the CLI's only global result, or claim end-to-end Cursor verification without a recorded smoke fixture.++## Smallest implementation slice++1. Add Cursor to the README opening sentence and installation matrix.+2. Add a Cursor selector to the existing Start surface; selecting it changes only the command, expected scope/path note, and one bounded first prompt.+3. Reuse the same `archify/SKILL.md`; add no Cursor fork or Cursor-specific diagram behavior.+4. Add the project installer canary and documentation consistency test.+5. Run the real Cursor acceptance gate, then decide whether the issue can be answered as supported or only install-compatible.diff --git a/docs/start.html b/docs/start.htmlindex d813997e..60811f12 100644--- a/docs/start.html+++ b/docs/start.html@@ -95,7 +95,7 @@main { width:min(1120px,calc(100% - 3rem)); margin:0 auto; padding:5rem 0 4rem; }.lead { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.65fr); gap:4rem; align-items:end; margin-bottom:3rem; }.eyebrow { margin:0 0 1rem; color:var(--cyan); font-size:.68rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }- h1 { max-width:780px; margin:0; font-size:clamp(2.1rem,5.3vw,4.7rem); line-height:1.04; letter-spacing:-.055em; text-wrap:balance; }+ h1 { max-width:780px; margin:0; font-size:clamp(2.1rem,5.3vw,4.7rem); line-height:1.04; letter-spacing:-.04em; text-wrap:balance; }h1 span { color:var(--cyan); }html[lang^="zh"] .title-gap { display:none; }.lead-copy { margin:0; color:var(--muted); font-size:.8rem; line-height:1.8; }@@ -119,19 +119,38 @@.type-tab:hover { background:var(--panel-raised); color:var(--text); }.type-tab[aria-selected="true"] { color:var(--cyan); background:var(--cyan-soft); box-shadow:inset 0 -2px var(--cyan); }- .workbench { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:1px; border:1px solid var(--border-hi); background:var(--border-hi); box-shadow:0 24px 80px rgba(0,0,0,.32); }+ .workbench { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:1px; border:1px solid var(--border-hi); background:var(--border-hi); }.panel { min-width:0; padding:2rem; background:rgba(7,16,31,.96); }.panel-kicker { display:flex; align-items:center; gap:.7rem; margin-bottom:1.4rem; color:var(--dim); font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; }.panel-kicker b { display:grid; place-items:center; width:26px; height:26px; border:1px solid var(--border-hi); color:var(--cyan); font-size:.64rem; }.panel h2 { margin:0 0 .65rem; font-size:1.05rem; letter-spacing:-.025em; }.panel-intro { min-height:3.9rem; margin:0 0 1.5rem; color:var(--muted); font-size:.72rem; line-height:1.75; }+ .agent-picker { margin:0 0 1.25rem; }+ .agent-picker-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0 0 .6rem; color:var(--muted); font-size:.64rem; line-height:1.45; }+ .agent-picker-head strong { color:var(--emerald); font-weight:600; }+ .agent-tabs { display:flex; flex-wrap:wrap; gap:.4rem; }+ .agent-tab {+ min-height:44px;+ padding:.55rem .72rem;+ border:1px solid var(--border-hi);+ border-radius:6px;+ background:transparent;+ color:var(--muted);+ cursor:pointer;+ font-size:.64rem;+ font-weight:650;+ transition:background .15s,color .15s,border-color .15s;+ }+ .agent-tab:hover { color:var(--text); border-color:var(--dim); }+ .agent-tab[aria-selected="true"] { color:#041019; border-color:var(--cyan); background:var(--cyan); }+.command-block { margin-top:1rem; border:1px solid var(--border); background:#030914; }.command-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.62rem .75rem; border-bottom:1px solid var(--border); color:var(--dim); font-size:.6rem; text-transform:uppercase; letter-spacing:.08em; }.copy-button { border:0; background:transparent; color:var(--cyan); cursor:pointer; font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }.copy-button:hover { color:#a5f3fc; }pre { margin:0; padding:1rem; overflow:auto; color:#d9f9ff; font:500 .7rem/1.65 'JetBrains Mono',ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }- .secondary-note { margin:1.25rem 0 0; padding:1rem; border-left:2px solid var(--emerald); background:var(--emerald-soft); color:var(--muted); font-size:.67rem; line-height:1.7; }+ .secondary-note { margin:1.25rem 0 0; padding:1rem; border:1px solid rgba(52,211,153,.28); background:var(--emerald-soft); color:var(--muted); font-size:.67rem; line-height:1.7; }.question { margin:0 0 1rem; color:var(--text); font-size:.82rem; line-height:1.65; }.include-list { display:flex; flex-wrap:wrap; gap:.45rem; margin:0 0 1.2rem; padding:0; list-style:none; }@@ -215,17 +234,27 @@<article class="panel"><div class="panel-kicker"><b>01</b><span data-en="Install the skill" data-zh="安装 Skill">Install the skill</span></div><h2 data-en="Keep the tool local." data-zh="让工具留在本地。">Keep the tool local.</h2>- <p class="panel-intro" data-en="Install once for Claude Code, Codex, or opencode. The packaged renderers and validators work without a hosted diagram service." data-zh="一次安装,即可用于 Claude Code、Codex 或 opencode。打包后的渲染器与校验器不依赖托管式图表服务。">Install once for Claude Code, Codex, or opencode. The packaged renderers and validators work without a hosted diagram service.</p>+ <p class="panel-intro" data-en="Choose Cursor, Codex, Claude Code, or OpenCode. Every agent receives the same checked Skill and zero-dependency renderers—no vendor-specific fork." data-zh="选择 Cursor、Codex、Claude Code 或 OpenCode。每个 Agent 使用同一份经过检查的 Skill 与零依赖渲染器,不维护厂商专属分叉。">Choose Cursor, Codex, Claude Code, or OpenCode. Every agent receives the same checked Skill and zero-dependency renderers—no vendor-specific fork.</p>++ <div class="agent-picker">+ <p class="agent-picker-head"><span data-en="Choose your coding agent" data-zh="选择你的编码 Agent">Choose your coding agent</span><strong id="agent-state">Codex · same Skill</strong></p>+ <div class="agent-tabs" role="tablist" aria-label="Coding agent">+ <button class="agent-tab" type="button" role="tab" data-agent="cursor">Cursor</button>+ <button class="agent-tab" type="button" role="tab" data-agent="codex">Codex</button>+ <button class="agent-tab" type="button" role="tab" data-agent="claude-code">Claude Code</button>+ <button class="agent-tab" type="button" role="tab" data-agent="opencode">OpenCode</button>+ </div>+ </div><div class="command-block">- <div class="command-bar"><span data-en="Permanent install" data-zh="永久安装">Permanent install</span><button class="copy-button" type="button" data-copy-source="install-command" data-en="Copy" data-zh="复制">Copy</button></div>- <pre id="install-command">npx skills add tt-a1i/archify -g</pre>+ <div class="command-bar"><span data-en="Global install" data-zh="全局安装">Global install</span><button class="copy-button" type="button" data-copy-source="install-command" data-en="Copy" data-zh="复制">Copy</button></div>+ <pre id="install-command">npx -y skills add tt-a1i/archify --skill archify --agent codex --global --copy --yes</pre></div><div class="command-block">- <div class="command-bar"><span data-en="One-off Codex run" data-zh="Codex 临时体验">One-off Codex run</span><button class="copy-button" type="button" data-copy-source="try-command" data-en="Copy" data-zh="复制">Copy</button></div>- <pre id="try-command">npx skills use tt-a1i/archify@archify --agent codex</pre>+ <div class="command-bar"><span data-en="This repository only" data-zh="仅安装到当前仓库">This repository only</span><button class="copy-button" type="button" data-copy-source="project-command" data-en="Copy" data-zh="复制">Copy</button></div>+ <pre id="project-command">npx -y skills add tt-a1i/archify --skill archify --agent codex --copy --yes</pre></div>- <p class="secondary-note" data-en="The viewer link carries only the diagram type. It does not include the title, nodes, edges, repository path, or source JSON." data-zh="Viewer 链接只携带图表类型,不包含标题、节点、连线、仓库路径或源 JSON。">The viewer link carries only the diagram type. It does not include the title, nodes, edges, repository path, or source JSON.</p>+ <p class="secondary-note" data-en="The Start link carries only your agent, language, and diagram type. It never contains a repository path, title, node, relationship, or source JSON." data-zh="Start 链接只携带 Agent、语言和图表类型,不包含仓库路径、标题、节点、关系或源 JSON。">The Start link carries only your agent, language, and diagram type. It never contains a repository path, title, node, relationship, or source JSON.</p></article><article class="panel" aria-live="polite">@@ -257,10 +286,13 @@var DATA = JSON.parse(document.getElementById('start-data').textContent);var KNOWN_TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow', 'lifecycle']);+ var KNOWN_AGENTS = new Set(['cursor', 'codex', 'claude-code', 'opencode']);var params = new URLSearchParams(window.location.search);var requestedType = params.get('type');+ var requestedAgent = params.get('agent');var requestedLanguage = params.get('lang');var type = KNOWN_TYPES.has(requestedType) ? requestedType : 'architecture';+ var agent = KNOWN_AGENTS.has(requestedAgent) ? requestedAgent : 'codex';var language = requestedLanguage === 'zh' || requestedLanguage === 'en'? requestedLanguage: ((navigator.languages && navigator.languages[0]) || navigator.language || 'en').toLowerCase().startsWith('zh') ? 'zh' : 'en';@@ -273,6 +305,9 @@var proofMeta = document.getElementById('proof-meta');var copyStatus = document.getElementById('copy-status');var languageButton = document.getElementById('language');+ var agentState = document.getElementById('agent-state');+ var installCommand = document.getElementById('install-command');+ var projectCommand = document.getElementById('project-command');function copyForElement(element) {return language === 'zh' ? element.dataset.zh : element.dataset.en;@@ -290,6 +325,7 @@function updateUrl() {var next = new URLSearchParams(window.location.search);next.set('type', type);+ next.set('agent', agent);next.set('lang', language);history.replaceState(null, '', window.location.pathname + '?' + next.toString());}@@ -303,6 +339,15 @@button.setAttribute('aria-selected', String(active));button.tabIndex = active ? 0 : -1;});+ document.querySelectorAll('[data-agent]').forEach(function (button) {+ var active = button.dataset.agent === agent;+ button.setAttribute('aria-selected', String(active));+ button.tabIndex = active ? 0 : -1;+ });+ var agentName = document.querySelector('[data-agent="' + agent + '"]').textContent;+ agentState.textContent = agentName + (language === 'zh' ? ' · 同一份 Skill' : ' · same Skill');+ installCommand.textContent = 'npx -y skills add tt-a1i/archify --skill archify --agent ' + agent + ' --global --copy --yes';+ projectCommand.textContent = 'npx -y skills add tt-a1i/archify --skill archify --agent ' + agent + ' --copy --yes';title.textContent = copy.title;question.textContent = copy.question;prompt.textContent = copy.prompt;@@ -361,6 +406,25 @@});});+ document.querySelectorAll('[data-agent]').forEach(function (button) {+ button.addEventListener('click', function () {+ agent = button.dataset.agent;+ render();+ });+ button.addEventListener('keydown', function (event) {+ var buttons = Array.from(document.querySelectorAll('[data-agent]'));+ var index = buttons.indexOf(button);+ if (event.key === 'ArrowRight' || event.key === 'ArrowDown') index = (index + 1) % buttons.length;+ else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') index = (index - 1 + buttons.length) % buttons.length;+ else if (event.key === 'Home') index = 0;+ else if (event.key === 'End') index = buttons.length - 1;+ else return;+ event.preventDefault();+ buttons[index].click();+ buttons[index].focus();+ });+ });+document.querySelectorAll('[data-copy-source]').forEach(function (button) {button.addEventListener('click', function () {copyText(document.getElementById(button.dataset.copySource).textContent.trim());diff --git a/scripts/start-template.html b/scripts/start-template.htmlindex fc0f5b67..db22ebc2 100644--- a/scripts/start-template.html+++ b/scripts/start-template.html@@ -95,7 +95,7 @@main { width:min(1120px,calc(100% - 3rem)); margin:0 auto; padding:5rem 0 4rem; }.lead { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(260px,.65fr); gap:4rem; align-items:end; margin-bottom:3rem; }.eyebrow { margin:0 0 1rem; color:var(--cyan); font-size:.68rem; font-weight:700; letter-spacing:.14em; text-transform:uppercase; }- h1 { max-width:780px; margin:0; font-size:clamp(2.1rem,5.3vw,4.7rem); line-height:1.04; letter-spacing:-.055em; text-wrap:balance; }+ h1 { max-width:780px; margin:0; font-size:clamp(2.1rem,5.3vw,4.7rem); line-height:1.04; letter-spacing:-.04em; text-wrap:balance; }h1 span { color:var(--cyan); }html[lang^="zh"] .title-gap { display:none; }.lead-copy { margin:0; color:var(--muted); font-size:.8rem; line-height:1.8; }@@ -119,19 +119,38 @@.type-tab:hover { background:var(--panel-raised); color:var(--text); }.type-tab[aria-selected="true"] { color:var(--cyan); background:var(--cyan-soft); box-shadow:inset 0 -2px var(--cyan); }- .workbench { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:1px; border:1px solid var(--border-hi); background:var(--border-hi); box-shadow:0 24px 80px rgba(0,0,0,.32); }+ .workbench { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:1px; border:1px solid var(--border-hi); background:var(--border-hi); }.panel { min-width:0; padding:2rem; background:rgba(7,16,31,.96); }.panel-kicker { display:flex; align-items:center; gap:.7rem; margin-bottom:1.4rem; color:var(--dim); font-size:.62rem; letter-spacing:.12em; text-transform:uppercase; }.panel-kicker b { display:grid; place-items:center; width:26px; height:26px; border:1px solid var(--border-hi); color:var(--cyan); font-size:.64rem; }.panel h2 { margin:0 0 .65rem; font-size:1.05rem; letter-spacing:-.025em; }.panel-intro { min-height:3.9rem; margin:0 0 1.5rem; color:var(--muted); font-size:.72rem; line-height:1.75; }+ .agent-picker { margin:0 0 1.25rem; }+ .agent-picker-head { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0 0 .6rem; color:var(--muted); font-size:.64rem; line-height:1.45; }+ .agent-picker-head strong { color:var(--emerald); font-weight:600; }+ .agent-tabs { display:flex; flex-wrap:wrap; gap:.4rem; }+ .agent-tab {+ min-height:44px;+ padding:.55rem .72rem;+ border:1px solid var(--border-hi);+ border-radius:6px;+ background:transparent;+ color:var(--muted);+ cursor:pointer;+ font-size:.64rem;+ font-weight:650;+ transition:background .15s,color .15s,border-color .15s;+ }+ .agent-tab:hover { color:var(--text); border-color:var(--dim); }+ .agent-tab[aria-selected="true"] { color:#041019; border-color:var(--cyan); background:var(--cyan); }+.command-block { margin-top:1rem; border:1px solid var(--border); background:#030914; }.command-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.62rem .75rem; border-bottom:1px solid var(--border); color:var(--dim); font-size:.6rem; text-transform:uppercase; letter-spacing:.08em; }.copy-button { border:0; background:transparent; color:var(--cyan); cursor:pointer; font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }.copy-button:hover { color:#a5f3fc; }pre { margin:0; padding:1rem; overflow:auto; color:#d9f9ff; font:500 .7rem/1.65 'JetBrains Mono',ui-monospace,monospace; white-space:pre-wrap; overflow-wrap:anywhere; }- .secondary-note { margin:1.25rem 0 0; padding:1rem; border-left:2px solid var(--emerald); background:var(--emerald-soft); color:var(--muted); font-size:.67rem; line-height:1.7; }+ .secondary-note { margin:1.25rem 0 0; padding:1rem; border:1px solid rgba(52,211,153,.28); background:var(--emerald-soft); color:var(--muted); font-size:.67rem; line-height:1.7; }.question { margin:0 0 1rem; color:var(--text); font-size:.82rem; line-height:1.65; }.include-list { display:flex; flex-wrap:wrap; gap:.45rem; margin:0 0 1.2rem; padding:0; list-style:none; }@@ -215,17 +234,27 @@<article class="panel"><div class="panel-kicker"><b>01</b><span data-en="Install the skill" data-zh="安装 Skill">Install the skill</span></div><h2 data-en="Keep the tool local." data-zh="让工具留在本地。">Keep the tool local.</h2>- <p class="panel-intro" data-en="Install once for Claude Code, Codex, or opencode. The packaged renderers and validators work without a hosted diagram service." data-zh="一次安装,即可用于 Claude Code、Codex 或 opencode。打包后的渲染器与校验器不依赖托管式图表服务。">Install once for Claude Code, Codex, or opencode. The packaged renderers and validators work without a hosted diagram service.</p>+ <p class="panel-intro" data-en="Choose Cursor, Codex, Claude Code, or OpenCode. Every agent receives the same checked Skill and zero-dependency renderers—no vendor-specific fork." data-zh="选择 Cursor、Codex、Claude Code 或 OpenCode。每个 Agent 使用同一份经过检查的 Skill 与零依赖渲染器,不维护厂商专属分叉。">Choose Cursor, Codex, Claude Code, or OpenCode. Every agent receives the same checked Skill and zero-dependency renderers—no vendor-specific fork.</p>++ <div class="agent-picker">+ <p class="agent-picker-head"><span data-en="Choose your coding agent" data-zh="选择你的编码 Agent">Choose your coding agent</span><strong id="agent-state">Codex · same Skill</strong></p>+ <div class="agent-tabs" role="tablist" aria-label="Coding agent">+ <button class="agent-tab" type="button" role="tab" data-agent="cursor">Cursor</button>+ <button class="agent-tab" type="button" role="tab" data-agent="codex">Codex</button>+ <button class="agent-tab" type="button" role="tab" data-agent="claude-code">Claude Code</button>+ <button class="agent-tab" type="button" role="tab" data-agent="opencode">OpenCode</button>+ </div>+ </div><div class="command-block">- <div class="command-bar"><span data-en="Permanent install" data-zh="永久安装">Permanent install</span><button class="copy-button" type="button" data-copy-source="install-command" data-en="Copy" data-zh="复制">Copy</button></div>- <pre id="install-command">npx skills add tt-a1i/archify -g</pre>+ <div class="command-bar"><span data-en="Global install" data-zh="全局安装">Global install</span><button class="copy-button" type="button" data-copy-source="install-command" data-en="Copy" data-zh="复制">Copy</button></div>+ <pre id="install-command">npx -y skills add tt-a1i/archify --skill archify --agent codex --global --copy --yes</pre></div><div class="command-block">- <div class="command-bar"><span data-en="One-off Codex run" data-zh="Codex 临时体验">One-off Codex run</span><button class="copy-button" type="button" data-copy-source="try-command" data-en="Copy" data-zh="复制">Copy</button></div>- <pre id="try-command">npx skills use tt-a1i/archify@archify --agent codex</pre>+ <div class="command-bar"><span data-en="This repository only" data-zh="仅安装到当前仓库">This repository only</span><button class="copy-button" type="button" data-copy-source="project-command" data-en="Copy" data-zh="复制">Copy</button></div>+ <pre id="project-command">npx -y skills add tt-a1i/archify --skill archify --agent codex --copy --yes</pre></div>- <p class="secondary-note" data-en="The viewer link carries only the diagram type. It does not include the title, nodes, edges, repository path, or source JSON." data-zh="Viewer 链接只携带图表类型,不包含标题、节点、连线、仓库路径或源 JSON。">The viewer link carries only the diagram type. It does not include the title, nodes, edges, repository path, or source JSON.</p>+ <p class="secondary-note" data-en="The Start link carries only your agent, language, and diagram type. It never contains a repository path, title, node, relationship, or source JSON." data-zh="Start 链接只携带 Agent、语言和图表类型,不包含仓库路径、标题、节点、关系或源 JSON。">The Start link carries only your agent, language, and diagram type. It never contains a repository path, title, node, relationship, or source JSON.</p></article><article class="panel" aria-live="polite">@@ -257,10 +286,13 @@var DATA = JSON.parse(document.getElementById('start-data').textContent);var KNOWN_TYPES = new Set(['architecture', 'workflow', 'sequence', 'dataflow', 'lifecycle']);+ var KNOWN_AGENTS = new Set(['cursor', 'codex', 'claude-code', 'opencode']);var params = new URLSearchParams(window.location.search);var requestedType = params.get('type');+ var requestedAgent = params.get('agent');var requestedLanguage = params.get('lang');var type = KNOWN_TYPES.has(requestedType) ? requestedType : 'architecture';+ var agent = KNOWN_AGENTS.has(requestedAgent) ? requestedAgent : 'codex';var language = requestedLanguage === 'zh' || requestedLanguage === 'en'? requestedLanguage: ((navigator.languages && navigator.languages[0]) || navigator.language || 'en').toLowerCase().startsWith('zh') ? 'zh' : 'en';@@ -273,6 +305,9 @@var proofMeta = document.getElementById('proof-meta');var copyStatus = document.getElementById('copy-status');var languageButton = document.getElementById('language');+ var agentState = document.getElementById('agent-state');+ var installCommand = document.getElementById('install-command');+ var projectCommand = document.getElementById('project-command');function copyForElement(element) {return language === 'zh' ? element.dataset.zh : element.dataset.en;@@ -290,6 +325,7 @@function updateUrl() {var next = new URLSearchParams(window.location.search);next.set('type', type);+ next.set('agent', agent);next.set('lang', language);history.replaceState(null, '', window.location.pathname + '?' + next.toString());}@@ -303,6 +339,15 @@button.setAttribute('aria-selected', String(active));button.tabIndex = active ? 0 : -1;});+ document.querySelectorAll('[data-agent]').forEach(function (button) {+ var active = button.dataset.agent === agent;+ button.setAttribute('aria-selected', String(active));+ button.tabIndex = active ? 0 : -1;+ });+ var agentName = document.querySelector('[data-agent="' + agent + '"]').textContent;+ agentState.textContent = agentName + (language === 'zh' ? ' · 同一份 Skill' : ' · same Skill');+ installCommand.textContent = 'npx -y skills add tt-a1i/archify --skill archify --agent ' + agent + ' --global --copy --yes';+ projectCommand.textContent = 'npx -y skills add tt-a1i/archify --skill archify --agent ' + agent + ' --copy --yes';title.textContent = copy.title;question.textContent = copy.question;prompt.textContent = copy.prompt;@@ -361,6 +406,25 @@});});+ document.querySelectorAll('[data-agent]').forEach(function (button) {+ button.addEventListener('click', function () {+ agent = button.dataset.agent;+ render();+ });+ button.addEventListener('keydown', function (event) {+ var buttons = Array.from(document.querySelectorAll('[data-agent]'));+ var index = buttons.indexOf(button);+ if (event.key === 'ArrowRight' || event.key === 'ArrowDown') index = (index + 1) % buttons.length;+ else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') index = (index - 1 + buttons.length) % buttons.length;+ else if (event.key === 'Home') index = 0;+ else if (event.key === 'End') index = buttons.length - 1;+ else return;+ event.preventDefault();+ buttons[index].click();+ buttons[index].focus();+ });+ });+document.querySelectorAll('[data-copy-source]').forEach(function (button) {button.addEventListener('click', function () {copyText(document.getElementById(button.dataset.copySource).textContent.trim());