# Technical Documentation: tt-a1i/archify

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/tt-a1i/archify)

### Overview (README.md)

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="docs/assets/archify-lockup-dark.svg" />
    <img src="docs/assets/archify-lockup-light.svg" alt="Archify" width="440" height="121" />
  </picture>
</p>
<h3 align="center">Turn anything you want to understand, plan, or share into an interactive visual.</h3>

<p align="center"><img src="docs/assets/archify-readme-hero.png" alt="Archify — interactive diagrams" width="960" /></p>

<p align="center"><strong>Official channels：</strong> <a href="https://archify.si">archify.si</a> · <a href="https://github.com/tt-a1i/archify">GitHub</a><br/>Archify is free and open source. Third-party online services and paid plans are operated by their respective providers and do not represent Archify. <a href="#official-services">Service details →</a></p>

<p align="center">Start with an idea, a question, or a plan. Describe it to your AI agent, and Archify turns it into an interactive HTML you can explore, customize, and share. From travel itineraries and learning maps to complex systems—make it your own.</p>

<p align="center"><strong>10 diagram types · One-page answers in 4 styles · Architecture Diagnosis · Story walkthroughs with 1080p video · PR/MR walkthroughs</strong></p>

<p align="center">See what the community is creating—and imagine what you could make next.</p>

<p align="center">
  <a href="https://archify.si/gallery.html"><strong>Live demos</strong></a> &nbsp;·&nbsp;
  <a href="#start"><strong>Get started</strong></a> &nbsp;·&nbsp;
  <a href="https://archify.si/guide.html"><strong>Scenario guide</strong></a> &nbsp;·&nbsp;
  <a href="#community"><strong>Community</strong></a> &nbsp;·&nbsp;
  <a href="./README_ZH.md"><strong>简体中文</strong></a> &nbsp;·&nbsp;
  <a href="./README_JA.md"><strong>日本語</strong></a> &nbsp;·&nbsp;
  <a href="./README_KO.md"><strong>한국어</strong></a>
</p>

<p align="center">
  <a href="https://trendshift.io/repositories/31352?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-31352" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/31352" alt="tt-a1i/archify | Trendshift" width="250" height="55" /></a>
</p>

<p align="center">
  <a href="https://github.com/tt-a1i/archify/stargazers"><img src="https://img.shields.io/github/stars/tt-a1i/archify?style=flat-square&amp;color=E5B650&amp;logo=github&amp;label=Stars" alt="GitHub stars" /></a>
  <a href="https://skills.sh/tt-a1i/archify/archify"><img src="https://img.shields.io/badge/installs-130K%2B-0EA5E9?style=flat-square" alt="130K+ installs on skills.sh" /></a>
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-22c55e?style=flat-square" alt="Apache License 2.0" /></a>
  <a href="#installation-options"><img src="https://img.shields.io/badge/works_with-Claude_Code_%7C_Codex_%7C_Cursor_%7C_OpenCode_%7C_Copilot-7C3AED?style=flat-square" alt="Works with Claude Code, Codex, Cursor, OpenCode, and GitHub Copilot" /></a>
  <a href="CHANGELOG.md#333--2026-11-30"><img src="https://img.shields.io/badge/version-3.3.3-0891b2?style=flat-square" alt="Stable version 3.3.3" /></a>
</p>

<p align="center">
  <a href="https://archify.si/"><img src="https://img.shields.io/badge/Website-0891B2?style=for-the-badge" alt="Archify website" /></a>
  <a href="https://discord.gg/6xWMjgCeUq"><img src="https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&amp;logo=discord&amp;logoColor=white" alt="Join Archify on Discord" /></a>
  <a href="#community"><img src="https://img.shields.io/badge/WeChat-07C160?style=for-the-badge&amp;logo=wechat&amp;logoColor=white" alt="Archify WeChat group" /></a>
  <a href="#community"><img src="https://img.shields.io/badge/QQ-1688D8?style=for-the-badge&amp;logo=qq&amp;logoColor=white" alt="Archify QQ group" /></a>
  <a href="https://x.com/t20000622yy"><img src="https://img.shields.io/badge/Creator_on_X-181717?style=for-the-badge&amp;logo=x&amp;logoColor=white" alt="Follow the creator on X" /></a>
  <a href="#support-archify"><img src="https://img.shields.io/badge/Support-E2500E?style=for-the-badge" alt="Support Archify" /></a>
</p>

<p align="center"><a href="#sponsors"><strong>❤️ Partners & sponsors: Kimi Work · Supercode · OpenLux</strong></a></p>

## See Archify in action



https://github.com/user-attachments/assets/6a0d6637-e3af-43af-a733-4b4b53da0542

**One sentence. Your repo, mapped.** Watch the 60-second tour: map a whole repository, put the findings on your architecture diagram, walk through a real PR, and export it as video. [Try the interactive examples ↗](https://archify.si/gallery.html)

<a id="start"></a>

### Install, then describe your idea

Works with Cursor, Claude Code, Codex CLI, and OpenCode. See installation options below for additional integrations.

**With an AI agent.** Paste this:

```text
Install Archify for me by reading https://raw.githubusercontent.com/tt-a1i/archify/main/llms.txt
```

Send this to your agent:

```text
Use Archify to diagram a web request: Browser calls the API,
the API checks Redis, and a cache miss queries PostgreSQL and fills the cache.
```

Then continue: “Add authentication”, “Highlight the cache-miss path”, or “Switch to the light theme”.

**No repository is required:** start with a description, or ask your agent to read a repository for a source-backed architecture diagram.

[Choose your agent](https://archify.si/start.html?agent=cursor&type=architecture) · [Installation details and update checks](#quick-start) · [Create and check diagrams with your agent](https://archify.si/agent-diagrams)

## Ask a question, get a one-page answer

Not every answer is one diagram. Ask your agent to answer as a page and Archify builds an **explainer**: the conclusion first, then one panel per question, with tables, steps, charts, code and validated diagrams.

[](https://archify.si/cases/explainer/tls-first-visit.html)

- **Conclusion first.** The answer and its reasons lead; every panel takes one question.
- **Diagrams that explain.** Steps sit beside the diagram they walk through and light its parts as you read. Click any node to open the full interactive view.
- **Easy to check.** Claims cite numbered sources; repository excerpts are pinned to a commit and open in a source card.
- **Easy to share.** One HTML file with four styles and light or dark themes. Export a PNG, WebP or JPG long image, or print to PDF. Ask about any panel to get a follow-up your agent can use to revise just that panel.

```text
Use Archify to answer as one page: our API's P99 went from 80 ms to 600 ms
while the mean barely moved. What is the likely cause, and how should we investigate?
```

By default your agent also makes a page unasked when an answer is a complex flow, a diagnosis, a comparison or a test report. The reply still gives a short conclusion you can read in chat, and its last line links to the page, such as “Open the test report”. Short answers, text-only requests and failed pages get no page or link. To get pages only when you ask, tell your agent so, or add `[archify explainer: on-demand]` to its global rules file (such as `~/.codex/AGENTS.md` or `~/.claude/CLAUDE.md`). `[archify explainer: always-on]` adds a compact page to every answer that reaches a conclusion; deleting the line restores the default.

Live examples: [First HTTPS visit](https://archify.si/cases/explainer/tls-first-visit.html) · [P99 latency (Chinese)](https://archify.si/cases/explainer/p99-tail-latency.html) · [How Archify finalize keeps the last good file, read from this repository (Chinese)](https://archify.si/cases/explainer/finalize-delivery.html) · [First rental checklist (Chinese)](https://archify.si/cases/explainer/first-rental.html)

<a id="sponsors"></a>

## ❤️ Sponsors

<p align="center">
  <a href="https://www.kimi.ai/?aff=archify"><img src="docs/assets/sponsors/archify-kimi-work.png" alt="Archify × Kimi Work collaboration banner" width="800" /></a>
</p>

**Archify × Kimi Work.** Find Archify in the Kimi Work plugin store as **Interactive Architecture Diagram**. Describe your system in one sentence to create an interactive diagram. **[Try it in Kimi Work →](https://www.kimi.ai/?aff=archify)**

<table>
<tr>
  <td align="center" width="240"><a href="https://supercode.sh/?utm_source=archify"><img src="https://cdn.supercode.sh/sponsors/supercode-logo.png" alt="Supercode" width="200"/></a><br/><strong><a href="https://supercode.sh/?utm_source=archify">supercode.sh</a></strong></td>
<td><a href="https://supercode.sh/?utm_source=archify">Supercode</a> sponsors Archify and enhances Codex and Cursor with token optimization, curated Skills, and spec-driven development. Archify is featured as a <a href="https://supercode.sh/en/skills/tt-a1i/archify/archify">Supercode Editor’s Choice</a> skill.<br/><br/><a href="https://supercode.sh/en/skills/tt-a1i/archify/archify"><img src="https://supercode.sh/badges/editors-choice.svg" alt="Supercode Editor’s Choice — Archify" width="240" height="55"/></a></td>
</tr>
<tr>
<td align="center" width="240"><a href="https://www.openlux.ai/register?channel=c_qdvanbpc"><img src="docs/assets/sponsors/openlux-logo.png" alt="OpenLux" width="200" /></a><br/><strong><a href="https://www.openlux.ai/register?channel=c_qdvanbpc">OpenLux</a></strong></td>
<td>Thank you to OpenLux for sponsoring this project! OpenLux is an all-in-one AI platform for businesses, bringing together leading AI models from major providers worldwide. With fast, reliable service and responsive technical support, OpenLux offers base pricing for Claude, OpenAI, and Gemini models as low as 8.82%, 4%, and 8% of official rates, respectively.<br/><br/>Exclusive offer for Archify users: Sign up through our referral link and enjoy up to 7.5% off credit top-ups!<br/><br/><a href="https://www.openlux.ai/register?channel=c_qdvanbpc">Get started with OpenLux →</a></td>
</tr>
<tr>
<td align="center" width="240"><a href="https://www.packyapi.ai/register?aff=bN97"><img src="docs/assets/sponsors/packycode-logo.png" alt="PackyCode" width="200" /></a><br/><strong><a href="https://www.packyapi.ai/register?aff=bN97">PackyCode</a></strong></td>
<td>Access leading AI models through PackyCode with one API endpoint and one API key. Enjoy automatic failover and dedicated high-speed routes for Codex and Claude Code.<br/><br/>Get started with $1 in free credits, a discount on your first top-up, and savings of up to 80% on eligible routes. Pay in RMB with no currency conversion markups or extra top-up fees.<br/><br/><a href="https://www.packyapi.ai/register?aff=bN97">Get started with PackyCode →</a></td>
</tr>
<tr>
<td align="center" width="240"><a href="https://www.aicodemirror.ai/register?invitecode=WC26FL"><img src="docs/assets/sponsors/aicodemirror-logo.jpg" alt="AICodeMirror" width="200" /></a><br/><strong><a href="https://www.aicodemirror.ai/register?invitecode=WC26FL">AICodeMirror</a></strong></td>
<td>Thank you to AICodeMirror for sponsoring Archify! AICodeMirror provides API relay services for Claude, Codex, and Gemini, with enterprise-grade concurrency, invoice issuance, and 24/7 technical support. Codex pricing starts at 7% of standard rates, with additional top-up discounts.<br/><br/>Exclusive offer for Archify users: Register through our referral link to receive 20% off your first top-up.<br/><br/><a href="https://www.aicodemirror.ai/register?invitecode=WC26FL">Try AICodeMirror →</a></td>
</tr>
<tr>
<td align="center" width="240"><a href="https://zturbo.top"><img src="docs/assets/sponsors/zturbo-logo.png" alt="ZTURBO" width="200" /></a><br/><strong><a href="https://zturbo.top">ZTURBO</a></strong></td>
<td>Fast, stable connectivity for developers and AI users.<br/>New users can try the service for free and receive an exclusive bonus on their first top-up. Supports Windows, macOS, iOS, and Android; long-term plans work out to less than ¥1 per day.<br/><br/>Free trial · First top-up bonus · Multi-device connectivity<br/><br/><a href="https://zturbo.top">Try ZTURBO →</a></td>
</tr>
<tr>
<td colspan="2"><a href="https://www.infistar.cc/register?aff=9N89LEMV&amp;ref_source=link"><picture>
  <source media="(prefers-color-scheme: dark)" srcset="website/public/assets/sponsors/infistar-banner-en-dark.svg" />
  <img src="website/public/assets/sponsors/infistar-banner-en-light.svg" alt="Infistar.cc" width="660" />
</picture></a><br/>Infistar provides access to Claude, GPT, Gemini and DeepSeek with one API key for text, image and video creation. Model API pricing starts at 1% of official rates.<br/><br/>Archify users receive CNY 5 in trial credit when signing up through this link.<br/><br/><a href="https://www.infistar.cc/register?aff=9N89LEMV&amp;ref_source=link">Try Infistar →</a></td>
</tr>
</table>

> Want to sponsor Archify? [Contact us by email.](mailto:2801884530@qq.com)

## Show what matters

| Explain an agent workflow | Follow a cache miss | Explore service relationships |
|---|---|---|
| [](https://archify.si/gallery/artifacts/agent-tool-call.workflow.html?theme=dark&present=1#focus=planner&reach=downstream) | [](https://archify.si/gallery/artifacts/cache-miss.sequence.html?theme=dark&present=1#route=web~db) | [](https://archify.si/gallery/artifacts/production-deployment.architecture.html?theme=dark&present=1#lens=backend~database) |
| Trace everything downstream of one step. | Highlight the path from web app to database. | Focus on authored backend and database connections. |

The [Proof Lab](https://archify.si/gallery.html) contains all 11 checked-in scenarios, their JSON sources, and validation receipts.

### Understand a real repository

<sub>CODE → DIAGRAM · A source-backed system map</sub>

[](https://archify.si/cases/mco-runtime.architecture.html?theme=dark&present=1)

Archify traced [`mco-org/mco`](https://github.com/mco-org/mco) at `9f1a1cf` and produced this checked map. **[Open it ↗](https://archify.si/cases/mco-runtime.architecture.html?theme=dark&present=1)** · [trace reach ↗](https://archify.si/cases/mco-runtime.architecture.html?theme=dark#focus=router&reach=downstream) · [typed source](docs/cases/mco-runtime.architecture.json)

### Diagnose a repository

<sub>CODE ANALYSIS · Built into the Skill, no extra install</sub>

| Dependency star map | 3D model of the same run |
|---|---|
| [](archify/modules/code-analysis/docs/USAGE.md) | [](archify/modules/code-analysis/docs/USAGE.md) |

**Architecture Diagnosis** reads a repository and shows how it actually hangs together: dependency cycles, tightly coupled modules, complexity hotspots and layer-rule breaks, each linked to the source behind it, with a fix task you can hand back to your agent. Pair it with an architecture diagram and every component shows its issue count. JS/TS, Python, Java, Go, Rust, C and C++ are supported; the result is one offline HTML file.

```text
Use archify Code Analysis on this repository: show module coupling, dependency cycles and hotspots.
```

[Code Analysis guide](archify/modules/code-analysis/docs/USAGE.md)

### Walk through it as a story, or a pull request

<sub>STORY · PR WALKTHROUGH</sub>

- **Story video.** Ask your agent to add a guided story to any diagram. The page gains a Story mode with a timeline and captions, and **Export → Story video** records it at 1080p, 60 fps (WebM or MP4). Several diagrams can also be choreographed into one stage page or video. [Story authoring](archify/references/story-authoring.md)
- **PR walkthrough.** Ask your agent to explain a pull request or branch: Archify marks what changed directly on the diagram and can attach light and dark diagrams to a GitHub PR or GitLab MR. The default install includes the `archify-pr` Skill, which offers this while you prepare a PR, and only for material diffs. [PR review](archify/references/pr-review.md)

```text
Use archify to add a guided story to this diagram and export it as a video.
```

### Easy to extend. More ways to make it yours.

<sub>COMMUNITY STORIES · Selected examples shared by users</sub>

**Keep building after the diagram is generated.** Archify is open source and its output is standalone HTML. Ask your agent to adapt it, connect useful links, or add interactions for your own workflow. Community creations already span team collaboration, travel planning, legal citation checks, contract review, and incident retrospectives. These are just a few examples.

One user started with a hand-drawn multi-agent architecture, turned it into an interactive diagram, then added a Kimi execution pool through conversation. Others asked their agent to read a project and brought the resulting architecture into Feishu or DingTalk for team discussion.

Another user turned a Shanghai CityWalk guide into a four-day itinerary: switch between days, inspect a stop, and jump to Amap, Xiaohongshu, or Dianping. The author also added arrival check-ins and stop notes, turning the itinerary into a small tool to use during the trip. These extensions were added by the community author for this particular artifact.

**[▶ Explore the interactive Shanghai CityWalk](https://archify.si/cases/community/shanghai-citywalk.html)**

[](https://archify.si/cases/community/shanghai-citywalk.html)

**[▶ Try the interactive version](https://archify.si/cases/community/shanghai-citywalk.html)** · Switch between D1–D4 and click a place to explore.

<sub>Community artifact · Shanghai CityWalk · Four days of routes and place links</sub>

### Download it. Open it. Explore it.

The output is a self-contained HTML file. Download it and open it in your browser to use the node details and path exploration included in that artifact. No Archify installation is needed to view it. Send the HTML to someone else and the interactions go with it; external websites and map links need a network connection.

**[Explore the Shanghai CityWalk ↗](https://archify.si/cases/community/shanghai-citywalk.html)** · **[Download HTML ↓](https://github.com/tt-a1i/archify/raw/refs/heads/main/docs/cases/community/shanghai-citywalk.html)**

<sub>Try switching between D1–D4, opening a place card, or following a map link. Times and place information reflect the author's original itinerary.</sub>

## Community and recognition

- **#1 on GitHub Trending's weekly, all-language repository list.** [Ranking screenshot published by the creator on September 1, 2026](https://x.com/t20000622yy/status/2094656813576880285), with all languages and “This week” selected.
- **Featured and interviewed by QbitAI.** [Project feature](https://www.qbitai.com/2026/09/482469.html) · [The developer's story](https://www.qbitai.com/2026/09/488519.html).
- **Shared with developer communities.** [midudev's post](https://x.com/midudev/status/2094425974406320207).

<sub>A selection of public coverage, community shares, and historical milestones. Follow the links for dates and sources.</sub>

## Preview

<details>
<summary>Themes, exports, and share cards</summary>

Same diagram, two themes, one click to switch:

| Dark | Light |
|---|---|
|  |  |

The Export menu copies PNG to the clipboard and downloads static or motion formats:



After tracing a route, **Export → Route Share Card** downloads that authored path as a 1200×630 PNG with the full diagram retained for context.



After tracing authored `Upstream` or `Downstream` reach, **Export → Reach Share Card** captures that exact reading without claiming runtime impact.



Open [`examples/web-app.html`](examples/web-app.html) locally to try the complete viewer.

</details>

## Quick start

**Current stable version:** `v3.3.3`. See [Changelog](CHANGELOG.md#333--2026-11-30).

### 1. Install

**With an AI agent**

Paste this to your agent:

```text
Install Archify for me by reading https://raw.githubusercontent.com/tt-a1i/archify/main/llms.txt
```

Or install without prompts. Pass one agent, or repeat `--agent` for every switcher target (`cursor`, `codex`, `claude-code`, `opencode`, `github-copilot`). `--copy` copies the skill instead of symlinking:

Cursor only:

```bash
npx -y skills@latest add https://archify.si --skill archify --skill archify-pr --agent cursor --global --copy --yes
```

Or, only if you want all five agents:

```bash
npx -y skills@latest add https://archify.si --skill archify --skill archify-pr --agent cursor --agent codex --agent claude-code --agent opencode --agent github-copilot --global --copy --yes
```

The default install includes the `archify-pr` companion. It stays silent for docs, lockfiles, formatting and other small changes and offers a diagram only for material diffs while you prepare a PR. Add `[archify pr: on-demand]` to your agent's global rules file to disable those offers. To keep only `/archify`, remove the companion with `npx -y skills@latest remove archify-pr --agent cursor --global --yes` (omit `--global` for a project-only install). If you already have only `/archify`, add the companion with `npx -y skills@latest add https://archify.si --skill archify-pr --agent cursor --global --copy --yes`.

<details>
<summary>More installation options and update-check details</summary>

To try without installing:

```bash
npx skills use tt-a1i/archify@archify --agent codex
```

[DSH community opt-in](integrations/deepseek-harness/README.md): `dsh plugin --profile web add @tt-a1i/archify-dsh@1.2.0`

The [agent switcher](https://archify.si/start.html?agent=cursor&type=architecture) covers `cursor`, `codex`, `claude-code`, `opencode`, and `github-copilot`.

Archify may GET the fixed stable manifest solely to show an optional reminder; it never downloads or installs updates. Successful checks wait about 24 hours (±20%); active use retries failures after 6, then 24 hours. The server sees normal HTTP metadata (IP and time), but receives no version, Agent, project data, prompts, account/device ID, or ETag. You decide whether and when to update. Set `ARCHIFY_UPDATE_CHECK_DISABLED=1` to disable networking and reminder-state writes. A slow check can finish in the background and show its reminder on the next delivery. When an update is known, delivered pages show a dismissible notice in the top bar on wide diagrams when space allows, and in the footer otherwise. The notice works offline and makes zero network requests. It includes a one-click copy button for an Agent update prompt and a release notes link. Pass `--no-update-notice` or set `ARCHIFY_UPDATE_NOTICE_DISABLED=1` to keep pages unchanged.

</details>

### Stay updated

- **Get release notifications:** select **Watch → Custom → Releases** at the top of this GitHub repository. Starring the project does not subscribe you to release notifications.
- **See what changed:** [Release notes](https://github.com/tt-a1i/archify/releases).
- **Use a feed reader:** [Subscribe to the release feed](https://github.com/tt-a1i/archify/releases.atom).

Installations with the update checker also check for newer stable releases during diagram delivery and can show a reminder. Older installations without the checker need a manual update to gain this feature. You choose whether and when to upgrade; Archify never installs updates automatically.

### 2. Start from a description — no repository required

```text
Use Archify to draw: Browser -> API -> Redis cache -> PostgreSQL fallback.
```

For source evidence, open a repository and ask:

```text
Analyze this repository, then use archify to create a high-level runtime architecture diagram.
Show 8–12 core components, one primary path, external dependencies, and trust boundaries.
Put supporting detail in cards instead of adding more edges.
```

Archify’s built-in **Architecture Diagnosis** maps repository dependencies as a radial star map and a rotatable 3D model. It also shows issue counts on each component of your architecture diagram, with links to the source behind findings such as dependency cycles and dependencies missing from the diagram. After delivering a repository-backed architecture diagram, Archify ends its summary with what Diagnosis can do, and the diagram has a Code Analysis button that explains it. Diagnosis starts only if you say yes. It runs from the installed Skill with no extra install step. See the [Code Analysis guide](archify/modules/code-analysis/docs/USAGE.md).

```text
Use archify Code Analysis on this repository: show module coupling, dependency cycles and hotspots.
```

### 3. Refine in chat

Continue with focused requests such as `add Redis`, `move auth to the left`, or `highlight the rollback path`. Archify keeps the typed source available for targeted iteration.

## Try it in DeepSeek Harness

<p align="center"><a href="integrations/deepseek-harness/README.md"><img src="docs/assets/archify-dsh-lockup.svg" alt="Archify × DSH" width="440" /></a></p>

Archify also runs in [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) through **`@tt-a1i/archify-dsh`**, a community plugin. Version 1.2.0 bundles the Archify 3.3.0 Skill, so one command adds diagrams, one-page answers and Code Analysis to your dsh sessions:

```bash
dsh plugin --profile web add @tt-a1i/archify-dsh@1.2.0
```

Then ask: `Use the archify skill to map this repository's runtime architecture.`

<p align="center"><a href="integrations/deepseek-harness/README.md#install"><img src="https://img.shields.io/badge/Try_Archify_%C3%97_DSH-Install_guide_%E2%86%92-0856F5?style=for-the-badge" alt="Try Archify × DSH: install guide" /></a></p>

<sub>Community integration for the developer-preview `@deepseek-ai/dsh@0.2.2-rc.5` on Node `^22.19.0 || >=24.0.0`. Not an official DeepSeek product. See the [install guide](integrations/deepseek-harness/README.md) for compatibility, upgrades and removal.</sub>

## Choose the right diagram

<details>
<summary>Ten diagram types, architecture comparisons, and examples</summary>


| Type | Best for | Include in your prompt |
|---|---|---|
| **Architecture** | Components, services, storage, boundaries | Scope, core components, primary path |
| **Workflow** | CI/CD, approvals, tool calls, runbooks | Participants, order, branches, exceptions |
| **Sequence** | API calls, cache fallback, auth, async traces | Callers, callees, returns, timing |
| **Data Flow** | Pipelines, lineage, PII, consumers | Sources, transforms, stores, boundaries |
| **Lifecycle** | States, retries, waits, terminal outcomes | States, events, retry and cancellation paths |
| **ERD** | Database schemas: tables, columns, keys, cardinality | Tables, every column with its type, primary/foreign/unique keys, relationship cardinality |
| **Class** | Classes, interfaces, selected members, type relationships | Types, key members, inheritance and implementations, composition, dependencies |
| **Tree** | Single-parent hierarchies: repositories, modules, capability breakdowns | Root, levels, what each branch contains |
| **Timeline** | When things happened: incident reviews, release histories | Timestamps with time zone, events, source lanes, whether times are observed or illustrative |
| **Waterfall** | Where the time went in one request or agent run | Spans, start times and durations, nesting, whether timings are measured or illustrative |

Architecture's optional `deployment-ownership` profile fails closed when authored owners, region placement, private database scope, or named crossings are missing; it is never implicit and does not inspect live infrastructure. See the [checked deployment proof](https://archify.si/gallery.html#proof-deployment-ownership).

For design or PR review, Architecture Delta compares validated Before / Delta / After snapshots with a machine receipt. Select an authored change or play one finite, viewer-only Review; it infers no impact, risk, or merge safety.

`node archify/bin/archify.mjs compare architecture base.json head.json architecture-delta.html --json`

[](examples/checkout-platform-delta.html)

Not sure which one fits? Use the [interactive scenario guide](https://archify.si/guide.html), or ask the zero-dependency CLI:

```bash
node archify/bin/archify.mjs guide "Show an API request with Redis cache miss"
node archify/bin/archify.mjs guide "Map Kafka topics, consumer groups, replay, and DLQ" --json
```

Workflow keeps the happy path clear across lanes:



Sequence explains one interaction over time:



Data Flow makes movement and sensitivity boundaries explicit:



Lifecycle separates progress, waits, retries, and terminal outcomes:



New in 3.1: ERD, Class, Tree, Timeline and Waterfall.

ERD keeps tables, every column and key, and relationship cardinality together:



Class shows contracts, selected members, and which types depend on or implement them:



Tree shows single-parent containment, such as a capability breakdown:



Timeline places events on one proportional clock, with a lane per source:



Waterfall shows where the time went across nested and overlapping spans:



Explore these examples: [`ERD`](https://archify.si/gallery/artifacts/orders.erd.html) · [`Class`](examples/class-payments-rendered.html) · [`Tree`](examples/tree-payment-platform-rendered.html) · [`Timeline`](examples/timeline-payment-incident-rendered.html) · [`Waterfall`](examples/waterfall-checkout-request-rendered.html). The Timeline and Waterfall examples use illustrative data; treat timestamps or durations as real only when they come from logs or traces.

Architecture examples: [`web-app`](examples/web-app.html) · [`Archify pipeline`](examples/archify-repo.html) · [`grid placement`](examples/archify-repo-grid.html) · [`desktop agent`](examples/maka-architecture.html)

</details>

## Why Archify

| Understand the structure | Walk through the story |
|---|---|
| Map components, workflows, and relationships from code or a description. | Explore nodes, follow paths, and share any view as a link. |
| **Extend it your way** | **Share the result** |
| Keep an editable source and build on the open-source code or generated HTML with your own interactions and use cases. | Share a self-contained HTML file or export images, video, and share cards. |

<details>
<summary>The engineering behind the experience</summary>


- **Layout judgment, with automatic placement when you want it** — the agent chooses hierarchy, spacing, routes, and emphasis. Architecture diagrams can opt into `layout.mode: "auto"`, which places components from their relationships and keeps any positions and routes you author fixed, and shared automatic endpoints spread deterministically instead of piling arrows on one midpoint.
- **Typed JSON IR** — every renderer-backed mode has a schema and reproducible source.
- **Atomic validation before delivery** — schema, layout, HTML/SVG, route, and label-to-route clearance checks must all pass before a showcase artifact replaces the last known good output.
- **Failures come with a repair receipt** — `validate --json` and `deliver --json` return stable rule codes, the exact subject, measured evidence, and only supported repair controls instead of a Node stack or an unstructured retry guess.
- **Last-good live preview** — an optional desktop loop watches one JSON file, refreshes only after the latest candidate passes every gate, and keeps the previous verified diagram visible when a save is incomplete or invalid.
- **Truthful interaction** — focus, upstream/downstream reach, exact routes, role comparison, and stories reuse authored nodes and relationships instead of inventing topology or claiming runtime impact.
- **Source evidence, only when requested** — Evidence-backed Architecture nodes mark themselves `SRC n` and open Git-verified files and line ranges pinned to one public commit; ordinary artifacts stay source-free.
- **Portable by default** — the result is one HTML file; exports remain full-diagram and free of temporary viewer state.

Archify is not a general-purpose drawing editor or a Mermaid theme. It turns technical intent into a communication artifact.

</details>

## How it works

<details>
<summary>Generation, validation, preview, and delivery details</summary>

| Step | What happens |
|---|---|
| **Generate** | The agent creates typed JSON IR from your description. |
| **Validate** | Bundled validators and layout rules check the source; failures identify the exact local repair in machine-readable JSON. |
| **Preview (optional)** | A loopback-only desktop session watches one source and reloads only verified revisions; failures keep the last-good artifact. |
| **Deliver** | A same-directory candidate is rendered and checked; only a passing artifact atomically replaces the target, then optional `--open` launches that exact file. |
| **Iterate** | The agent updates the source while unrelated structure stays stable. |

Useful repository commands:

```bash
cd archify
node bin/archify.mjs doctor
node bin/archify.mjs demo /tmp/archify-demo
node bin/archify.mjs guide "Show CI/CD checks, approval, deploy, and rollback"
node bin/archify.mjs validate workflow examples/agent-tool-call.workflow.json --quality showcase --json
node bin/archify.mjs preview workflow examples/agent-tool-call.workflow.json /tmp/workflow.html --quality showcase
node bin/archify.mjs deliver workflow examples/agent-tool-call.workflow.json /tmp/workflow.html --quality showcase --open --json
```

`preview` is an explicit loopback-only desktop mode: it watches one JSON file on a random `127.0.0.1` port, keeps the last verified output through failures, stops with Ctrl-C, and adds no generated-HTML runtime. Use `--no-open` for tests or manual URL opening.

`deliver --open` is an opt-in one-shot handoff after commit. Opener failure preserves success; JSON remains on stdout and the absolute fallback path goes to stderr.

On failure, `validate --json` and `deliver --json` emit one JSON object. Apply only each `diagnostics[]` subject's `supportedFixes`, within the Skill's two correction rounds; visual review remains separate.

Settings:

```json
{
  "meta": {
    "locale": "en",
    "animation": "trace",
    "visual_preset": "signal-flow"
  }
}
```

`meta.locale` localizes page title, Legend, states/errors, a11y, HTML/SVG `lang`—never authored content. `en`, `zh-CN`, `zh-TW`, `es`, `ko`, `ar`, and `ru` are bundled and need only `meta.locale`; `meta.translations` (canonical message key → translated string) overrides individual keys and keeps the rest of the language. Other languages supply their catalog there (see `archify/examples/locales/`), or the renderer falls back to English and discloses it. Static omits `animation`; `classic` defaults.

</details>

## Explore and share the output

| Action | Control |
|---|---|
| Open the factual Diagram Guide | <kbd>?</kbd> |
| Find and focus a semantic node | <kbd>/</kbd> |
| Trace upstream/downstream authored reach | Focus a node → `Upstream` / `Downstream` |
| Probe a directed route and inspect its journey | <kbd>R</kbd> or `PATH` |
| Compare one or two semantic roles | <kbd>L</kbd> or `LENS` |
| Open the live overview radar | <kbd>M</kbd> or `MAP` |
| Enter Presentation Stage | <kbd>F</kbd> |
| Play a guided story or export it as video (diagrams with a story) | Motion control → `Story` · Export → `Story video` |
| Choose visual style (`S` cycles) / toggle theme / open Export | <kbd>S</kbd> / <kbd>T</kbd> / <kbd>E</kbd> |
| Zoom or reset | <kbd>+</kbd> / <kbd>-</kbd> / <kbd>0</kbd> |

Stable links can restore `#focus=<id>`, `#focus=<id>&reach=upstream|downstream`, `#relation=<id>`, `#route=<source>~<target>`, and `#lens=<kind>~<kind>`. Live repeats connection flow until paused; semantic previews remain bounded. Motion respects `prefers-reduced-motion` and never enters canonical exports.

The complete generation and viewer contract lives in [`archify/SKILL.md`](archify/SKILL.md).

## Installation options

| Surface | Install location or method | Capability |
|---|---|---|
| **Claude Code** | `~/.claude/skills/` or `.claude/skills/` | Full renderer + validation workflow |
| **Codex CLI** | `~/.agents/skills/` or `.agents/skills/` | Full renderer + validation workflow |
| **opencode** | `~/.config/opencode/skills/`, `.opencode/skills/`, or `.agents/skills/` | Full renderer + validation workflow |
| **Claude.ai** | Upload `archify.zip` under Settings → Capabilities → Skills | Depends on Node.js access in the sandbox |
| **Project Knowledge** | Upload `archify.zip` to the project | Prompt-driven architecture fallback |
| **Hermes Agent** | Opt-in: `hermes skills install skills-sh/tt-a1i/archify/archify -y` | Community Skill-only integration; Node `>=18`; not a Nous official product. No telemetry. It is not a switcher target. [Details](integrations/hermes-agent/README.md). |
| **DeepSeek Harness** | Opt-in: `dsh plugin --profile web add @tt-a1i/archify-dsh@1.2.0`. Invoke: `Use the archify skill to map this repository's runtime architecture.` Remove: `dsh plugin --profile web remove @tt-a1i/archify-dsh`. | Community integration for developer-preview `@deepseek-ai/dsh@0.2.2-rc.5`; Node `^22.19.0 \|\| >=24.0.0`; not an official DeepSeek product. No telemetry. Shell files need exact workspace paths, not Web Produced Files. [Details](integrations/deepseek-harness/README.md). |

## Reference and scope

- [Schema reference](archify/schemas/README.md) · [Skill](archify/SKILL.md) · [Examples](archify/examples/) · [Agent cookbook](docs/authoring-cookbook.md)
- [Changelog](CHANGELOG.md)
- [Roadmap](ROADMAP.md)
- [Generated Proof Lab](https://archify.si/gallery.html)

Automatic Mermaid parsing, hosted sharing, and WYSIWYG editing are intentionally outside the current scope. Architecture diagrams can opt into automatic placement with `layout.mode: "auto"`. Other diagram types follow their own renderer rules. For example, Tree computes node positions from the parent relationships you define.

## Community

👋 **Welcome to the Archify Community!**

Connect with other users and developers, share ideas, request features, report bugs, discuss development, and help make Archify better together.

- <img src="docs/assets/community/discord.svg" alt="" width="18" /> [Discord](https://discord.gg/6xWMjgCeUq)
- <img src="docs/assets/community/wechat.svg" alt="" width="18" /> WeChat: scan the QR code below. WeChat group codes expire periodically; if this one has expired, ask for the current code through Discord or QQ.
- <img src="docs/assets/community/qq.svg" alt="" width="18" /> QQ group: `1121948602`

<table>
<tr>
  <td align="center"><strong><img src="docs/assets/community/wechat.svg" alt="" width="18" /> WeChat</strong><br/><img src="docs/assets/community/wechat-qr.png" alt="Archify Official WeChat group QR code" width="300" height="300" /></td>
  <td align="center"><strong><img src="docs/assets/community/qq.svg" alt="" width="18" /> QQ</strong><br/><img src="docs/assets/community/qq-qr.png" alt="Archify Official QQ group QR code" width="300" height="300" /></td>
</tr>
</table>

<a id="official-services"></a>

## Official channels and third-party services

- **Open-source project:** Current source and packages built from it are available under the [Apache License 2.0](LICENSE); previously published releases retain their original licenses.
- **Official website:** [archify.si](https://archify.si) currently provides project information, examples, and installation guidance.
- **Third-party services:** Pricing, data handling, and support are determined by the respective provider. A similar name or domain does not establish an official affiliation.

## License

[Apache-2.0](LICENSE) — free to use, modify, and distribute.

Historical MIT grants remain in effect; see [NOTICE](NOTICE) and [LICENSE-MIT](LICENSE-MIT). Third-party components retain their own licenses. The software license does not change ownership of your authored content or grant general permission to use Archify trademarks.

## Contributing

Building a standalone package on Archify? [Submit it to the community catalog](community/README.md#submitting-a-package); the guide includes a collapsible example and complete Chinese steps.

Issues, pull requests, and real-world diagrams are welcome. Start with the [contribution guide](CONTRIBUTING.md), use the reproducible bug form for failures, or submit a validated diagram through the [community showcase form](https://github.com/tt-a1i/archify/issues/new?template=showcase.yml).&nbsp;·&nbsp;[LINUX&nbsp;DO](https://linux.do)

## Support Archify

If Archify has been useful to you, you can support its continued development. Thank you for helping keep the project going ❤️

<details>
<summary>Support via WeChat Pay</summary>

Scan the QR code below with WeChat, or save it and open it in WeChat to scan.

<p align="center"><img src="docs/assets/support/wechat-pay.png" alt="WeChat Pay QR code to support the Archify maintainer" width="240" /></p>

</details>

<details>
<summary>Support via Alipay</summary>

Scan the QR code below with Alipay, or save it and open it in Alipay to scan.

<p align="center"><img src="docs/assets/support/alipay.png" alt="Alipay QR code to support the Archify maintainer (name redacted)" width="240" /></p>

</details>

Using Archify, sharing it, reporting bugs, and contributing improvements are also ways to help.

[Code Analysis: setup and usage](archify/modules/code-analysis/docs/USAGE.md).

## Contributors

Thanks to everyone who helped build Archify. [Go follow them.](https://github.com/tt-a1i/archify/graphs/contributors) ❤️

<p align="center"><a href="https://github.com/tt-a1i/archify/graphs/contributors"><img alt="Archify contributors" src="https://raw.githubusercontent.com/tt-a1i/archify/contributors/contributors.svg" width="1000" /></a></p>

## Star History

<p align="center"><picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-dark.svg" /><img alt="Star History" src="https://raw.githubusercontent.com/tt-a1i/archify/star-history/assets/star-history-light.svg" /></picture></p>

---

### Article Archify (`docs/article-archify.md`)

# 让 AI 画架构图不难。难的是决定不画什么。

> [!IMPORTANT]
> 这是基于 Archify v2.6 的历史文章，用于保留当时的设计背景，不代表当前功能、命令或产品边界。最新能力与安装方式以 [README](../README.md) 为准；仍然有效的架构取舍以 [ROADMAP](../ROADMAP.md) 为准。



一条命令：

```
node renderers/architecture/render-architecture.mjs web-app.json web-app.html
```

跑完你会得到一个独立的 HTML 文件。打开浏览器，深色/浅色一键切换。PNG、JPEG、WebP、SVG 四种导出，4x 原生光栅化，复制到剪贴板就能贴进 Notion 或 GitHub README。

看起来只是一张架构图。但打开浏览器你会注意到，这图不是均匀的方格阵列。

Auth Provider 飘在 AWS 区域的左上角外面——它不是 AWS 的资源。S3 放在 CloudFront 下方而非旁边——这是层级关系，不是同级关系。security-group 的虚线边界精确地画在 30px padding 处。

这些不是样式。是布局。

---

**Archify 是一个让 Claude 用自然语言画技术架构图的 Skill**。支持五种图表类型——Architecture（系统架构）、Workflow（工作流水线）、Sequence（调用时序）、Data Flow（数据管线）、Lifecycle（状态机）。每种都有独立的 JSON Schema、独立的渲染器、独立的布局规则检查。项目从 Cocoon AI 的 v1 分支重写而来，目前 v2.6，MIT 协议。

但这篇文章关心的不是功能列表。我关心的是一个设计决策——Archify 明确拒绝了自动布局引擎。而且这个拒绝不是"我们还没做"，是"我们实验验证了，这条路不通"。

---

## 一个实验：换 CSS 不换布局，能差多远？

Archify 的 Roadmap 里有一段不常出现在开源项目中的文字：

> **Auto-layout (dagre / elk-js) is a dead end for archify.**

为了验证这个判断，作者做了一个盲测实验。

原始实验用了五张真实 Mermaid 流程图，每张渲染三个版本：

- **版本 A**：原生 Mermaid，dagre 布局，默认主题。
- **版本 B**：同样 dagre 布局，但换上 archify 的深色配色、JetBrains Mono 字体、slate-900 背景。布局不动——只换皮。
- **版本 C**：archify 手动布局——Claude 分配语义类（`c-frontend`、`c-backend`、`c-security` 等），手动摆放坐标，archify CSS 是最后一步。

原始 15 张截图打乱、去标签，盲评 1-10 分。2026-09-01 因其中两个来源仓库没有可核验的再分发许可，当前仓库已移除这两组输入和衍生物，仅保留 3 图、9 张截图；因此原始 5 图实验无法再从当前 HEAD 完整复现。

结论写在 `experiments/v3-mermaid-validation/RESULT.md` 里，只一行：

> **C looks good; A and B both don't look good. B is not meaningfully better than A.**

换 CSS 不换布局，审美差距**无法弥合**。B 不比 A 更好看。一张均匀网格涂上更好的颜色，仍然是一张均匀网格。



这就是为什么 ROADMAP.md 里用了"dead end"这种词——不是因为 dagre 或 elk-js 不好，而是因为 Archify 的审美**不来自配色，来自空间叙事**。Auth Provider 为什么放在外面？S3 为什么比 CloudFront 低 30px？虚线边界为什么是 30/50 padding？这些都是 Claude 的判断。去掉布局判断，就去了产品骨头。

相应的，Roadmap 里 P1（Mermaid 解析器引入 dagre 自动布局）打了 **KILLED**。P3（end-to-end 解析管线）、P4（IR → Mermaid 输出、C4 输入）同样。

另外一个要命的问题也在 Roadmap 里写清楚了：

> **"Prettier Mermaid renderer" is already taken.** lukilabs/beautiful-mermaid 有 15 套主题（Tokyo Night、Catppuccin、Nord、Dracula），8.1k stars。Mermaid 11.14 自己加了 Neo/Redux 主题、ELK 布局、Hand Drawn 风格。做"更好看的 Mermaid"是已经被占领的赛道。

Archify 选的是一条更窄但更硬的路：**让 Claude 做信息架构决策，而不只是往布局引擎的输出上刷 CSS。**

---

## 不是"人类在环"，是"判断在环"



这句话你可能在别的 AI 工具文章里看过："人机协作"、"人类在回路中"。太模糊了——谁在回路里？做了什么事？

Archify 的回路里有一个具体的决策者：Claude。它做一件事——**从语义推断空间关系**。

举个例子。你要画一个 Web 应用架构：

```
用户说：AWS 上跑着 Next.js 前端、Go 后端和 PostgreSQL。
前端通过 CloudFront 分发，缓存打在 S3 上。
所有流量经过 WAF，auth 走独立 Identity Provider。
```

dagre 会怎么做：六个节点排成两行三列。整齐、均匀、无聊。

Claude 的答案——当 Archify 让它自己决定坐标时：S3 放在 CloudFront 下方而非旁边，因为"缓存打在 S3 上"意味着**层级关系**而非**同级关系**。Identity Provider 故意浮在 AWS region 边界外面，因为它不是 AWS 的资源。WAF 画在整个入口处。PostgreSQL 和 Go backend 靠得更近，因为它们高频交互。

这不是配色问题。这是**对"谁依赖谁"、"谁在外面"、"什么应该靠在一起"的空间翻译**。



这个设计哲学在 Archify 的架构上有个精确的落点：**类型化渲染器不是自动布局引擎**。

Workflow、Sequence、Dataflow、Lifecycle 四种模式的渲染器有预定义的 lane/stage/row 网格。它们告诉你哪些坐标是合法的——但是 Claude 仍然决定把哪个节点放进哪个泳道、哪个阶段、主路径上放哪些步、连接线走哪条 route。渲染器给的是约束，不是解。

举个具体的例子——layout-rules.test.mjs 里的一条断言：

```
节点重叠 → 报错："/nodes/3 (label: 'Data Cache') overlaps /nodes/5 (label: 'CDN Edge')"
标签越界 → 报错并给出数值阈值
跨泳道重叠 → 报错并命名两边的泳道名
```

这四种错误的返回格式不是随意写的。它们的格式专门服务于一件事——**让 LLM 能自我修复**。每条错误消息包含 JSON path、违规的两个对象名、超出的数值或合法范围。Claude 读到这种错误后，可以自己修正 JSON 并重新渲染，不需要人介入。

不是"人类在环"。是"判断在环"。人类提供的是判断——API 架构师理解"Identity Provider 不是 AWS 资源"——AI 负责执行判断（选坐标、定距离、调间距）并接受约束检查。

---

## 决心不做什么，比做了什么更难

翻 Archify 的 ROADMAP.md 和 CHANGELOG，最惊讶的不是它做了什么，是它**公开拒绝了多少东西**。

| 被拒绝的功能 | 理由 |
|---|---|
| dagre / elk-js 自动布局 | 实验证明 auto-layout + CSS 不比原生 Mermaid 更好 |
| Mermaid 解析器管线 | 同上的实验结论 |
| `?exportScale=N` URL 参数 | 诱导用户选低质量的缩放下采样，而项目已经有 4x 原生光栅化 |
| gzip+base64 分享链接 | XSS 向量，URL 长度限制，大家已经接受了"发 HTML 文件" |
| 色盲安全调色板 | 维护负担过重，CSS 变量系统使下游 fork 在约 30 行内就能完成 |
| 缩放/平移 UI | 浏览器原生双指缩放和 Cmd+滚轮已经可用 |
| 字体嵌入光栅导出 | 每文件增加约 150KB，收益有限 |
| PDF 导出按钮 | Cmd+P 自带打印样式表（`@page landscape`） |
| 多语言 UI | 保持界面极简，国际化交给下游 |

这些决策每一项都带着成本意识。gzip+base64 分享听起来方便——但一旦做了，就要一直维护 XSS 防护，还要处理 URL 长度在各个平台上的表现差异。"发 HTML 文件"在今天已经很自然了——Slack 传文件、GitHub 上传、邮件附件——再叠一层 base64 包装，增加的复杂度买回来的便利微乎其微。

另一类决策更有意思——"我们已经有了更好的替代方案"。4x 原生光栅化比 `?exportScale=N` 质量好得多；浏览器 Cmd+P 比内置 PDF 按钮稳定得多；CSS 变量系统比硬编码调色板灵活得多。**做了新东西，就可以不维护旧方案。**

Archify 在这件事上极其诚实。没有任何一项被拒绝的功能挂着"未来考虑"的标签。砍了就砍了，理由写清楚，不留后路。

这种诚实在中国开源项目里少见。大部分项目 Roadmap 里堆满了"计划中"、"考虑中"，Archify 的 Roadmap 却有一整节的 **KILLED**。



---

## 什么情况下它会失效

Archify 的布局哲学有一个硬前提：**负责做布局判断的那个人（或 AI）真的理解架构语义**。

当图太大时，这个前提会崩。一个 30 节点的微服务拓扑、横跨 3 个 region 的部署图——Claude 会在中间某个节点处丢失全局结构，开始随机分配坐标。它不会再被语义驱使，只是机械地在 viewBox 里填满剩余空间。这种时候，dagre 的均匀网格反而更好——至少它不出错。

第二类失效场景是：用户自己描述不清楚。"帮我画个架构图"——然后就没了。Archify 的 SKILL.md 在开头就告诉你，Claude 需要问清楚：组件类型、拓扑关系、安全边界、主要数据流。如果用户说不清楚，问出来的图也不会有信息架构。

第三类失效更微妙：当图的审美**不需要空间叙事**时，Archify 的所有设计都变成了过度设计。一个 4 步骤的审批流画在泳道里很清爽，但为了它走 JSON IR → schema 验证 → renderer 的全套流程，不如直接在 Excalidraw 里拖四个方块。

Archify 不适用于"所有图"。它适用于**那些组件之间的空间关系本身就携带信息的图**。

---

## 那么，Archify 真正值得学习的是什么？

不是配色系统。不是 4x 导出。甚至不是五种图表类型——类型会继续增加。

值得看的是三件事。

**第一，一个 AI 工具的设计哲学可以小到"一个实验结果"。**

Archify 拒绝 auto-layout 不是哲学讨论——是先跑了一个 5 张图的盲测，结果 B 不比 A 好，然后 ROADMAP 里所有跟 dagre 相关的任务集体被杀。设计决策不是从观点出发的，是从一堆截图和评分的表格出发的。这比任何关于"AI 工具该怎么设计"的方法论都可信。

**第二，"知道自己不是什么"比"知道自己是什么"更值钱。**

"Prettier Mermaid renderer is already taken" —— 这句话省了至少三个月的工作。Archify 不跟 beautiful-mermaid 比配色、不跟 Mermaid 11.14 比 Hand Drawn 风格。它选了一个更窄的赛道：信息架构。你画的是架构图，配色只是最后一步，布局才是主角——而布局是 Claude 的理解，不是 dagre 的均匀网格。

**第三，对 AI 来说，"约束"和"自由"不是对立的。**

Archify 的渲染器给你一个 lane/stage 网格（约束），但让你决定每个节点进哪个泳道、每个连接走哪条路由（自由）。Schema 验证会卡你格式（约束），但错误消息格式被专门设计成 Claude 能自动修复（自由）。如果你想让 Claude 稳定在一条特定的布局路径上，给它一个比"随便画"更窄的系统。

---

Archify 的 JSON IR 从第一天就强制声明 `schema_version`。最初五种图都固定为 `schema_version: 1`；现在 Workflow 是明确的例外：v1 继续合法并保持旧版固定布局，v2 则显式选择新的可读性编译器。其他四种图仍固定为 v1。打破性变更触发版本号升级，旧版本永远合法。

这一行比它前面 200 行的 SKILL.md 都更能说明问题。

因为这个字段承认了一件事：今天最好的布局判断，明天可能就不是最好的了。版本号是给未来留的退路——**在不知道明天会更好的情况下，先保证今天不会更差。**

---

### Artifact Install V2 Measurement (`docs/artifact-install-v2-measurement.md`)

# Artifact → Install v2 measurement contract

Artifact → Install v2 is a bounded change to the existing journey. Proof Lab cards link to `start.html?type=<type>&source=gallery`, and the Start page selects the matching typed recipe and can copy the selected agent's installation request plus the bounded first-use prompt in one action. Generated artifacts no longer emit the former footer link; `source=artifact` remains accepted only for compatibility with already-shared artifact URLs.

The page records only coarse interaction steps:

- `start_view`
- `starter_copy`
- `global_install_copy`
- `project_install_copy`
- `agent_install_prompt_copy`
- `prompt_copy`
- `proof_open`

Each event contains `schemaVersion`, `step`, the allow-listed source, diagram type, agent, and language. It never contains a repository path, diagram title, prompt text, node, relationship, source JSON, or user identifier. Unknown source values are normalized to `direct`.

## Privacy boundary

Events are capped at the latest 24 entries in `sessionStorage` under `archify.start.events.v1`. The page also dispatches the same detail as the `archify:start-funnel` browser event and exposes a read-only snapshot through `window.ArchifyStartMetrics.snapshot()`.

**No network request is made by Archify.** The page contains no `fetch`, `sendBeacon`, or XHR path. Closing the browser session discards the local receipt. A hosting operator must not attach an external event sink without a separate privacy decision, public disclosure, retention policy, and test update.

## Observable metrics

Within a controlled browser test or an explicitly instrumented host, compute:

- Legacy artifact arrival share: `source=artifact` `start_view` / all `start_view`
- Gallery arrival share: `source=gallery` `start_view` / all `start_view`
- Combined starter copy rate: `starter_copy / start_view`
- Agent installation prompt copy rate: `agent_install_prompt_copy / start_view` (scope is not selected yet)
- Any install copy rate: sessions with at least one of `starter_copy`, `agent_install_prompt_copy`, `global_install_copy`, or `project_install_copy` / sessions with `start_view`
- Prompt-only copy rate: `prompt_copy / start_view`
- Proof reassurance rate: `proof_open / start_view`

The two terminal events describe only their respective global/project commands. Agent prompt copies do not imply either installation scope.

Count at most one occurrence of each step per browser session when reporting conversion, even though the local diagnostic receipt retains repeated clicks. Segment only by the allow-listed source, type, agent, and language.

## What this does not prove

**First-diagram success is not observable from this static page.** A successful copy is an intent signal, not proof that installation completed, the agent generated a candidate, validation passed, or the user retained Archify. Do not label these ratios “activation,” “success,” or “retention.”

The Ordinary-Model Floor benchmark measures candidate quality independently. A future end-to-end activation metric would require an explicit, privacy-reviewed receipt boundary at the installed CLI or a voluntary user submission; it must not be inferred from Start-page clicks.

## Evaluation window

Before publishing a conversion claim:

1. Pin the repository commit and the exact v2 UI.
2. Validate the event contract in a real browser for artifact, gallery, direct, and rejected unknown-source URLs.
3. If an approved aggregate sink is later added, run a predeclared observation window and publish both session counts and rates; do not compare against a historical period that lacked equivalent instrumentation.
4. Keep deterministic page tests, package tests, and visual review as release gates regardless of copy rate.

Until an approved aggregate sink exists, the event receipt is for local QA and experiment readiness only.

---

### Cursor Acceptance 2026 07 (`docs/cursor-acceptance-2026-07.md`)

# 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: `skills@1.5.20`
- 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 skills@1.5.20 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 `skills@1.5.20` 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.

---

### Deployment Ownership Profile Acceptance 2026 07 23 (`docs/deployment-ownership-profile-acceptance-2026-07-23.md`)

# Deployment Ownership Profile Acceptance

Date: 2026-07-23 (Asia/Shanghai)

Branch: `codex/deployment-ownership-profile`

Research: `journal/research-next-stability-delight-slice-2026-07-23.md`

## Outcome

- `validation`: **pass**
- `visual_review`: **pass**
- `correction_rounds`: **0** source-level visual corrections
- Product surface: optional Architecture `meta.engineering_profile: "deployment-ownership"`
- Compatibility boundary: profile-less v1 inputs keep the existing validation and rendering path
- Scope boundary: no new renderer, diagram type, visual preset, viewer panel, dependency, hosted service, telemetry, or mobile product work

## Contract proven

When explicitly selected, the profile fails closed unless:

1. every non-external component has a non-empty `tag` owner;
2. every non-external component belongs to exactly one `region` boundary;
3. at least one `region` and one `security-group` boundary exist;
4. every `database` belongs to a `security-group`;
5. every security group contains members from exactly one shared region;
6. every connection whose region/security-group membership changes has a non-empty mechanism label.

The validator reads authored IR only. A passing result is not repository, IaC, cloud-account, runtime-impact, availability, or live-deployment verification.

## Deterministic and failure evidence

- `production-deployment.architecture.json` passes nine artifact checks, `showcase`, and the engineering profile.
- `validate --json` and `deliver --json` report `engineeringProfile: "deployment-ownership"`.
- Repeated delivery of the same source produces the same HTML SHA-256.
- Profile-less Architecture output omits `data-engineering-profile`.
- Workflow, Sequence, Data Flow, and Lifecycle reject the Architecture-only field.
- The mutation matrix covers missing owner, missing/ambiguous region, missing boundary kinds, missing database private scope, cross-region private groups, and missing outside→region, region→region, public→private, and private→public labels.
- Same-membership relationships and self-loops do not acquire a false label requirement.
- A failed profile delivery preserves the previous artifact bytes.

Stable diagnostic families exercised:

- `engineering/deployment-owner-missing`
- `engineering/deployment-region-scope`
- `engineering/deployment-region-ambiguous`
- `engineering/deployment-boundary-kind`
- `engineering/deployment-private-state`
- `engineering/deployment-private-region-consistency`
- `engineering/deployment-crossing-mechanism`

## Built-in browser acceptance

Viewport used for acceptance: 1280×720 desktop. No mobile-specific product pass was performed.

Verified on the generated Production Deployment artifact:

- Gallery card presents one compact `DEPLOYMENT OWNERSHIP · PASS` strip without adding a fifth receipt cell.
- Blueprint, Classic, and Signal Flow preserve the same `data-engineering-profile` and authored topology.
- Dark and light themes keep owner tags, Region/private boundaries, databases, and `VPC route` / `cross-region WAL` labels readable.
- Presentation opens on the authored `request-boundary` chapter.
- Finder narrows `postgres` to one structured PostgreSQL result without the previous oversized search treatment.
- Focus opens the PostgreSQL Semantic Passport and exposes `data team` plus exact incoming/outgoing relationships.
- Downstream Reach reports `1 node · 1 link · max 1 hop` without claiming impact.
- Route Probe resolves PostgreSQL → DR Replica as `2 nodes · 1 directed hop · shortest authored route`.
- Guided Story enters a finite five-beat request path with Pause available.
- A fresh standalone artifact tab and a fresh direct-embed tab reported zero console warnings/errors.

The built-in browser's multi-iframe Gallery host emitted source-less observer messages from its inspection environment; isolated standalone and direct-embed artifact pages were clean, so these were not attributed to Archify source.

## Release gates

- `npm test`: **472 passed, 0 failed**
- `npm run test:webm`: Share/Route/Reach matrices and WebM readback passed; WebM contained 9/9 unique sampled frames
- Focused engineering/Gallery/README suite: **12 passed, 0 failed**
- Zero-dependency installed package smoke: passed locally on macOS
- CI package smoke now runs the same Node harness on Ubuntu, macOS, and Windows
- ZIP integrity: passed; required standalone validator and engineering-profile module are present
- Generated Gallery and Guide freshness: passed through their reproducibility tests
- README / README_EN byte mirror: passed
- GitHub Actions YAML parse: passed
- `git diff --check`: passed

## Artifact fingerprints

- `archify.zip`: `0d129612c2dfd4145f03a5f9b67730a1001dfe043c23e3287cd050663227e3cc`
- Deployment HTML: `3a8d12813da45b465f3f633a8c4341760e300d10961768274511c2203b331e0b`
- README live proof GIF: `06526e75b813681bee1a8157774f2875603f6f75e1aa9497388aa810bff4e41e`

## Next independent slice

Architecture Delta / PR Proof remains the strongest next growth candidate, but it must be designed separately around comparability, stable relationship IDs, removed-node geometry, and export semantics. It is intentionally not hidden inside this release.

---

--- METRICS ---
- Files Extracted: 5
- Estimated Token Budget: ~15162 tokens
- Canonical Reference: https://codewiki.google/github.com/tt-a1i/archify
