Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

docs(website): surface the agent diagram guide from quick start

tt-a1i2d106d7b4c12
diff --git a/README.md b/README.md
index a7e3cee0..d965ce71 100644
--- a/README.md
+++ b/README.md
@@ -75,7 +75,7 @@ Then continue: “Add authentication”, “Highlight the cache-miss path”, or
**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)
+[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)
<a id="sponsors"></a>
diff --git a/README_EN.md b/README_EN.md
index a7e3cee0..d965ce71 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -75,7 +75,7 @@ Then continue: “Add authentication”, “Highlight the cache-miss path”, or
**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)
+[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)
<a id="sponsors"></a>
diff --git a/README_ZH.md b/README_ZH.md
index 28aefa12..70ad8359 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -75,7 +75,7 @@ API 优先读取 Redis,缓存未命中时查询 PostgreSQL 并回填缓存。
**不需要绑定代码库:**从描述开始即可。也可以让 Agent 阅读仓库,生成有源码依据的架构图。
-[按 Agent 选择安装方式](https://archify.si/zh/start?agent=cursor&type=architecture) · [安装细节与更新检查](#快速开始)
+[按 Agent 选择安装方式](https://archify.si/zh/start?agent=cursor&type=architecture) · [安装细节与更新检查](#快速开始) · [用 Agent 画图并检查结果](https://archify.si/zh/agent-diagrams)
<a id="sponsors"></a>
diff --git a/website/src/pages/index.astro b/website/src/pages/index.astro
index b25c37e1..2c09cc47 100644
--- a/website/src/pages/index.astro
+++ b/website/src/pages/index.astro
@@ -357,6 +357,8 @@ const { lang = 'en' } = Astro.props;
</ol>
</div>
+ <p class="guide-discovery"><a href="agent-diagrams.html" data-en="Learn to create and check diagrams with your agent →" data-zh="学习用 Agent 画图并检查结果 →">Learn to create and check diagrams with your agent →</a></p>
+
<div class="shortcut-box fade-up d2">
<p class="shortcut-title" data-i18n="kbd-label">Inside every artifact</p>
<div class="shortcut-rows">
diff --git a/website/src/styles/index.css b/website/src/styles/index.css
index 36206b4e..5e264bfc 100644
--- a/website/src/styles/index.css
+++ b/website/src/styles/index.css
@@ -308,6 +308,8 @@
.step a:hover { border-bottom-color:var(--accent); }
.step code { font-family:var(--font-mono); font-size:.85em; padding:.1em .4em; border-radius:5px; background:rgba(var(--fg-rgb),.07); }
+ .guide-discovery { margin-top:2rem; line-height:1.7; }
+ .guide-discovery a { color:var(--text); text-decoration:underline; text-underline-offset:4px; }
.shortcut-box { margin-top:3rem; padding:1.5rem 1.75rem; border:1px solid var(--line-hi); border-radius:16px; background:var(--bg-2); }
.shortcut-title { margin-bottom:1.1rem; font-family:var(--font-mono); font-size:.625rem; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--text-3); }
.shortcut-rows { display:grid; grid-template-columns:repeat(4,1fr); gap:.6rem 2rem; }
diff --git a/website/test/agent-diagrams.test.mjs b/website/test/agent-diagrams.test.mjs
index 26b47175..c0b4fc23 100644
--- a/website/test/agent-diagrams.test.mjs
+++ b/website/test/agent-diagrams.test.mjs
@@ -10,7 +10,7 @@ const nodes = node => [node, ...(node.childNodes || []).flatMap(nodes)];
const attr = (node, name) => node.attrs?.find(item => item.name === name)?.value;
const text = node => node.nodeName === '#text' ? node.value : (node.childNodes || []).map(text).join('');
-test('agent guide is readable without JavaScript, honest about examples, and linked from both entry points', () => {
+test('agent guide is readable without JavaScript, honest about examples, and linked from the homepage and both entry points', () => {
for (const lang of ['en', 'zh']) {
const prefix = lang === 'zh' ? 'zh/' : '';
const all = nodes(parse(fs.readFileSync(new URL(`${prefix}agent-diagrams.html`, output), 'utf8')));
@@ -47,6 +47,15 @@ test('agent guide is readable without JavaScript, honest about examples, and lin
assert.equal(text(nextElement), text(link), `${id}: TOC label must identify the section it reaches, including after reordering`);
}
assert.doesNotMatch(visible, /editorial draft|publication checks|workspace\/shared|factcheck\.md/i);
+ const homeFile = lang === 'zh' ? 'zh.html' : 'index.html';
+ const homeNodes = nodes(parse(fs.readFileSync(new URL(homeFile, output), 'utf8')));
+ const discovery = homeNodes.find(node => attr(node, 'class') === 'guide-discovery');
+ assert.ok(discovery, `${lang}: homepage discovery is present without JavaScript`);
+ const homeLink = nodes(discovery).find(node => node.tagName === 'a');
+ assert.equal(text(homeLink), lang === 'en' ? 'Learn to create and check diagrams with your agent →' : '学习用 Agent 画图并检查结果 →');
+ const homeUrl = new URL(homeFile, documentUrl.origin + (cloudflare ? '/' : '/archify/'));
+ const homeBase = new URL(attr(homeNodes.find(node => node.tagName === 'base'), 'href'), homeUrl);
+ assert.equal(new URL(attr(homeLink, 'href'), homeBase).href, documentUrl.href);
for (const entry of ['start', 'guide']) {
const entryNodes = nodes(parse(fs.readFileSync(new URL(`${prefix}${entry}.html`, output), 'utf8')));
const guideLink = entryNodes.find(node => node.tagName === 'a' && attr(node, 'href') === `${prefix}agent-diagrams${cloudflare ? '' : '.html'}`);
@@ -60,3 +69,15 @@ test('both agent guide routes are included in the actual sitemap and allowed Ind
const urls = parseSitemap(fs.readFileSync(new URL('sitemap.xml', output), 'utf8'));
for (const url of ['https://archify.si/agent-diagrams', 'https://archify.si/zh/agent-diagrams']) assert.ok(urls.includes(url));
});
+
+test('README entry points link directly to the matching language guide', () => {
+ for (const name of ['README.md', 'README_EN.md', 'README_ZH.md']) {
+ const source = fs.readFileSync(new URL(`../../${name}`, import.meta.url), 'utf8');
+ const link = name === 'README_ZH.md'
+ ? '[用 Agent 画图并检查结果](https://archify.si/zh/agent-diagrams)'
+ : '[Create and check diagrams with your agent](https://archify.si/agent-diagrams)';
+ assert.ok(source.includes(link), `${name}: descriptive guide discovery`);
+ assert.ok(source.indexOf(link) < source.indexOf('<a id="sponsors">'), `${name}: link stays with quick start`);
+ }
+ assert.equal(fs.readFileSync(new URL('../../README.md', import.meta.url), 'utf8'), fs.readFileSync(new URL('../../README_EN.md', import.meta.url), 'utf8'));
+});
diff --git a/website/test/homepage-browser.test.mjs b/website/test/homepage-browser.test.mjs
index 35cf3f2a..bd8cb945 100644
--- a/website/test/homepage-browser.test.mjs
+++ b/website/test/homepage-browser.test.mjs
@@ -66,11 +66,12 @@ test('real Chrome: homepage category and identity remain readable across languag
scrollTo(0, 0);
await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));
})()`);
- for (const region of ['hero', 'identity']) {
+ for (const region of ['hero', 'identity', 'guide-discovery']) {
if (region === 'identity') await evaluate(`document.querySelector('.facts-identity').scrollIntoView({block:'center',behavior:'instant'})`);
+ if (region === 'guide-discovery') await evaluate(`document.querySelector('.guide-discovery').scrollIntoView({block:'center',behavior:'instant'})`);
await evaluate('new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)))');
const receipt = await evaluate(`(() => {
- const selectors = ${JSON.stringify(region === 'hero' ? ['.hero h1', '.hero-sub', '.hero-eyebrow', '.cmd-chip', '.cmd-copy', '.hero-actions .btn'] : ['.facts-identity', '.facts-identity a'])};
+ const selectors = ${JSON.stringify(region === 'hero' ? ['.hero h1', '.hero-sub', '.hero-eyebrow', '.cmd-chip', '.cmd-copy', '.hero-actions .btn'] : region === 'identity' ? ['.facts-identity', '.facts-identity a'] : ['.guide-discovery a'])};
const scope = ${JSON.stringify(region)} === 'hero' ? document.querySelector('.hero-copy') : document;
return { lang: document.documentElement.lang, theme: document.documentElement.dataset.theme,
viewport: innerWidth, scrollY, pageWidth: document.documentElement.scrollWidth,
@@ -90,11 +91,14 @@ test('real Chrome: homepage category and identity remain readable across languag
assert.equal(receipt.theme, theme);
assert.equal(receipt.viewport, width, `${name}: requested layout viewport`);
assert.ok(receipt.pageWidth <= receipt.viewport + 1, `${name}: no page overflow`);
- assert.equal(receipt.nodes.length, region === 'hero' ? 7 : 3);
+ assert.equal(receipt.nodes.length, region === 'hero' ? 7 : region === 'identity' ? 3 : 1);
for (const node of receipt.nodes) assert.ok(node.visible && node.fits && node.inView, `${name}: readable ${node.text}`);
if (region === 'hero') {
assert.match(receipt.nodes[0].text, /AI agent|AI Agent/);
assert.match(receipt.nodes[1].text, /diagram skill|画图工具/);
+ } else if (region === 'guide-discovery') {
+ assert.match(receipt.nodes[0].text, lang === 'en' ? /create and check diagrams/ : /画图并检查结果/);
+ assert.equal(receipt.nodes[0].href, `${lang === 'zh' ? 'zh/' : ''}agent-diagrams${mount ? '.html' : ''}`);
} else {
assert.deepEqual(receipt.nodes.slice(1).map(node => [node.text, node.href]), [
['archify.si', 'https://archify.si/'], ['tt-a1i/archify', 'https://github.com/tt-a1i/archify'],