Skip to content

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

Merge remote-tracking branch 'origin/main' into codex/dev-stability-repair-20260922

tt-a1i564c2e5293f4
diff --cc .github/workflows/ci.yml
index e4a984e9,6e5cf144..1afa7149
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@@ -2,18 -2,58 +2,58 @@@ name: C
on:
push:
- branches: [main]
+ branches: [main, dev]
pull_request:
+ # Cancel obsolete PR runs, but never interrupt main verification/deployment.
+ concurrency:
+ group: ci-${{ github.event.pull_request.number || github.run_id }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
jobs:
+ scope:
+ runs-on: ubuntu-latest
+ outputs:
+ scope: ${{ steps.classify.outputs.scope }}
+ website: ${{ steps.classify.outputs.website }}
+ steps:
- - uses: actions/checkout@v5
++ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ with:
+ fetch-depth: 0
- - uses: actions/setup-node@v5
++ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: 22
+ - name: Classify changed paths
+ id: classify
+ run: node scripts/ci-scope.mjs
+ env:
+ CI_EVENT_NAME: ${{ github.event_name }}
+ CI_BASE_SHA: ${{ github.event.pull_request.base.sha }}
+ - name: Check README content for documentation-only changes
+ if: steps.classify.outputs.scope == 'docs'
+ run: node --test archify/test/readme-showcase.test.mjs
+
test:
+ needs: scope
+ if: always() && !cancelled()
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20, 22, 24]
steps:
+ # Keep every required matrix check present; fail closed if classification/checks fail.
+ - name: Require successful scope checks
+ env:
+ SCOPE_RESULT: ${{ needs.scope.result }}
+ CI_SCOPE: ${{ needs.scope.outputs.scope }}
+ shell: bash
+ run: |
+ test "$SCOPE_RESULT" = success
+ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
- - uses: actions/checkout@v5
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ if: needs.scope.outputs.scope == 'full'
- - uses: actions/setup-node@v5
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ if: needs.scope.outputs.scope == 'full'
with:
node-version: ${{ matrix.node-version }}
cache: npm
@@@ -22,23 -63,34 +63,37 @@@
run: npm ci
working-directory: archify
- name: Golden-file + schema tests
+ if: needs.scope.outputs.scope == 'full'
run: npm test
working-directory: archify
-
+ - name: Verify community Hermes adapter
- if: matrix.node-version == 22
++ if: needs.scope.outputs.scope == 'full' && matrix.node-version == 22
+ run: node --test integrations/hermes-agent/test/plugin-contract.test.mjs
webm-artifact:
+ needs: scope
+ if: always() && !cancelled()
runs-on: ubuntu-latest
steps:
+ # Keep every required matrix check present; fail closed if classification/checks fail.
+ - name: Require successful scope checks
+ env:
+ SCOPE_RESULT: ${{ needs.scope.result }}
+ CI_SCOPE: ${{ needs.scope.outputs.scope }}
+ shell: bash
+ run: |
+ test "$SCOPE_RESULT" = success
+ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
- - uses: actions/checkout@v5
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ if: needs.scope.outputs.scope == 'full'
- - uses: actions/setup-node@v5
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ if: needs.scope.outputs.scope == 'full'
with:
node-version: 22
- name: Provision a known Chrome runtime
+ if: needs.scope.outputs.scope == 'full'
id: setup-chrome
- uses: browser-actions/setup-chrome@v2
+ uses: browser-actions/setup-chrome@48ad923757ca74d66703209fe939badbdf80f2f4 # v2.2.0
with:
chrome-version: stable
install-dependencies: true
@@@ -49,21 -103,71 +106,78 @@@
working-directory: archify
env:
ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
- - name: Install browser test dependencies
+ - name: Verify packaged examples and Reader Layout boundaries in a real browser
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test test/desktop-reader-browser.test.mjs test/reader-layout-browser.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Verify SVG export cleanup and live state isolation
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test test/export-cleanup-browser.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Install offline font test parser
+ if: needs.scope.outputs.scope == 'full'
run: npm ci --ignore-scripts --no-audit --no-fund
working-directory: archify
+ - name: Verify offline fonts and independent SVG/raster exports
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test test/offline-font-browser.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Verify all five diagram modes localize Viewer interactions
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test test/i18n.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Verify Semantic Radar collision and drag behavior
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test test/semantic-radar.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Verify Viewer chrome, camera, motion and input interactions
+ if: needs.scope.outputs.scope == 'full'
+ run: node --test --test-concurrency=2 test/viewer-chrome-layout.test.mjs test/viewer-camera-browser.test.mjs test/motion-governor-browser.test.mjs test/finder-browser.test.mjs test/intent-trace-browser.test.mjs test/semantic-lens-browser.test.mjs test/route-probe-browser.test.mjs test/guided-views-browser.test.mjs test/focus-browser.test.mjs test/export-browser.test.mjs test/viewer-identifiers-browser.test.mjs
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
+ - name: Run shared browser regression gate
++ if: needs.scope.outputs.scope == 'full'
+ run: npm run test:browser
+ working-directory: archify
+ env:
+ ARCHIFY_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
zip-freshness:
+ needs: scope
+ if: always() && !cancelled()
runs-on: ubuntu-latest
steps:
+ # Keep every required matrix check present; fail closed if classification/checks fail.
+ - name: Require successful scope checks
+ env:
+ SCOPE_RESULT: ${{ needs.scope.result }}
+ CI_SCOPE: ${{ needs.scope.outputs.scope }}
+ shell: bash
+ run: |
+ test "$SCOPE_RESULT" = success
+ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
- - uses: actions/checkout@v5
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ if: needs.scope.outputs.scope == 'full'
- - uses: actions/setup-node@v5
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ if: needs.scope.outputs.scope == 'full'
with:
node-version: 22
- name: Rebuild archify.zip and compare exact bytes
@@@ -75,10 -180,23 +190,23 @@@
fi
published-update-manifest:
+ needs: scope
+ if: always() && !cancelled()
runs-on: ubuntu-latest
steps:
+ # Keep every required matrix check present; fail closed if classification/checks fail.
+ - name: Require successful scope checks
+ env:
+ SCOPE_RESULT: ${{ needs.scope.result }}
+ CI_SCOPE: ${{ needs.scope.outputs.scope }}
+ shell: bash
+ run: |
+ test "$SCOPE_RESULT" = success
+ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
- - uses: actions/checkout@v5
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ if: needs.scope.outputs.scope == 'full'
- - uses: actions/setup-node@v5
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ if: needs.scope.outputs.scope == 'full'
with:
node-version: 22
- name: Public notifier manifest must reference an existing stable Release
@@@ -137,8 -258,19 +268,19 @@@
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
+ # Keep every required matrix check present; fail closed if classification/checks fail.
+ - name: Require successful scope checks
+ env:
+ SCOPE_RESULT: ${{ needs.scope.result }}
+ CI_SCOPE: ${{ needs.scope.outputs.scope }}
+ shell: bash
+ run: |
+ test "$SCOPE_RESULT" = success
+ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
- - uses: actions/checkout@v5
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
+ if: needs.scope.outputs.scope == 'full'
- - uses: actions/setup-node@v5
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ if: needs.scope.outputs.scope == 'full'
with:
node-version: 22
- name: Extract packaged skill
@@@ -157,57 -289,47 +299,109 @@@
if (Test-Path $packageRoot) { Remove-Item -Recurse -Force $packageRoot }
Expand-Archive -Path archify.zip -DestinationPath $packageRoot
- name: Validate packaged skill without installing dependencies
+ if: needs.scope.outputs.scope == 'full'
run: node scripts/package-smoke.mjs
+ - name: Install delivery-lock test dependencies
- if: runner.os != 'Linux'
++ if: needs.scope.outputs.scope == 'full' && runner.os != 'Linux'
+ run: npm ci --ignore-scripts
+ working-directory: archify
+ - name: Verify delivery-lock ownership with real subprocesses
- if: runner.os != 'Linux'
++ if: needs.scope.outputs.scope == 'full' && runner.os != 'Linux'
+ run: >-
+ node --test
+ --test-name-pattern="cli: portable delivery lock:"
+ test/cli.test.mjs
+ working-directory: archify
+ - name: Verify macOS opener stays behind delivery-lock release
- if: runner.os == 'macOS'
++ if: needs.scope.outputs.scope == 'full' && runner.os == 'macOS'
+ run: >-
+ node --test
+ --test-name-pattern="cli: lock release failure does not invoke the requested opener"
+ test/cli.test.mjs
+ working-directory: archify
+ website:
+ needs: scope
+ if: needs.scope.outputs.website == 'true'
+ runs-on: ubuntu-latest
+ steps:
- - uses: actions/checkout@v5
- - uses: actions/setup-node@v5
++ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
++ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: website/package-lock.json
+ - name: Install website dependencies
+ run: npm ci
+ working-directory: website
+ - name: Typecheck and build website
+ run: npm run check && npm run build && npm test
+ working-directory: website
- - uses: browser-actions/setup-chrome@v2
++ - uses: browser-actions/setup-chrome@48ad923757ca74d66703209fe939badbdf80f2f4 # v2.2.0
+ id: website-chrome
+ with:
+ chrome-version: stable
+ install-dependencies: true
+ - name: Verify built website navigation and language continuity
+ run: node --test --test-name-pattern='real Chrome' archify/test/site-language-continuity.test.mjs
+ env:
+ ARCHIFY_SITE_ROOT: ${{ github.workspace }}/website/dist
+ ARCHIFY_SITE_INTEGRATION: '1'
+ ARCHIFY_CHROME: ${{ steps.website-chrome.outputs.chrome-path }}
+ ARCHIFY_CHROME_NO_SANDBOX: '1'
- - uses: actions/upload-artifact@v4
++ - uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
+ with:
+ name: website-dist
+ path: website/dist
+ include-hidden-files: true
+
+ windows-test-portability:
++ needs: scope
++ if: always() && !cancelled()
+ name: Windows test portability (Node ${{ matrix.node-version }})
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [22, 24]
+ runs-on: windows-latest
+ steps:
++ # Keep every required matrix check present; fail closed if classification/checks fail.
++ - name: Require successful scope checks
++ env:
++ SCOPE_RESULT: ${{ needs.scope.result }}
++ CI_SCOPE: ${{ needs.scope.outputs.scope }}
++ shell: bash
++ run: |
++ test "$SCOPE_RESULT" = success
++ case "$CI_SCOPE" in docs|full) ;; *) exit 1 ;; esac
+ - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
++ if: needs.scope.outputs.scope == 'full'
+ - uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
++ if: needs.scope.outputs.scope == 'full'
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Install test dependencies
++ if: needs.scope.outputs.scope == 'full'
+ run: npm ci --ignore-scripts
+ working-directory: archify
+ - name: Provision controlled Windows path fixtures
++ if: needs.scope.outputs.scope == 'full'
+ shell: pwsh
+ run: scripts/windows-path-fixtures.ps1 -NodeVersion '${{ matrix.node-version }}'
+ - name: Verify maintained Windows path contracts
++ if: needs.scope.outputs.scope == 'full'
+ run: node scripts/run-windows-path-tests.mjs
+ env:
+ ARCHIFY_REQUIRE_WINDOWS_8DOT3: '1'
+ ARCHIFY_REQUIRE_WINDOWS_REAL_PATHS: '1'
+ - name: Clean up controlled Windows path fixtures
- if: ${{ always() }}
++ if: ${{ always() && needs.scope.outputs.scope == 'full' }}
+ shell: pwsh
+ run: scripts/windows-path-fixtures.ps1 -NodeVersion '${{ matrix.node-version }}' -Cleanup
+
deploy-pages:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- needs: [test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, windows-test-portability]
- needs: [test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, website]
++ needs: [test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, windows-test-portability, website]
runs-on: ubuntu-latest
concurrency:
group: github-pages
@@@ -235,13 -357,19 +429,19 @@@
fi
- name: Configure GitHub Pages
if: steps.deployment-head.outputs.current == 'true'
- uses: actions/configure-pages@v6
+ uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
- - name: Upload checked documentation
+ - name: Download verified website build
+ if: steps.deployment-head.outputs.current == 'true'
- uses: actions/download-artifact@v4
++ uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
+ with:
+ name: website-dist
+ path: website/dist
+ - name: Upload verified website
if: steps.deployment-head.outputs.current == 'true'
- uses: actions/upload-pages-artifact@v5
+ uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
- path: docs
- - name: Deploy checked documentation
+ path: website/dist
+ - name: Deploy verified website
if: steps.deployment-head.outputs.current == 'true'
id: deployment
- uses: actions/deploy-pages@v5
+ uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
diff --cc README.md
index 5f241a2c,7a9f6fe7..49dc38e0
--- a/README.md
+++ b/README.md
@@@ -265,7 -365,6 +365,7 @@@ The complete generation and viewer cont
| **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** | `hermes skills install skills-sh/tt-a1i/archify/archify -y` | Community opt-in; Node `>=18`. [Details](integrations/hermes-agent/README.md). |
++| **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/[email protected]`. 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/[email protected]`; 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
diff --cc README_EN.md
index 5f241a2c,7a9f6fe7..49dc38e0
--- a/README_EN.md
+++ b/README_EN.md
@@@ -265,7 -365,6 +365,7 @@@ The complete generation and viewer cont
| **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** | `hermes skills install skills-sh/tt-a1i/archify/archify -y` | Community opt-in; Node `>=18`. [Details](integrations/hermes-agent/README.md). |
++| **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/[email protected]`. 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/[email protected]`; 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
diff --cc README_ZH.md
index d1d952ad,04af5cfe..7f4ec0d5
--- a/README_ZH.md
+++ b/README_ZH.md
@@@ -261,13 -366,8 +366,9 @@@ node bin/archify.mjs deliver workflow e
| **opencode** | `~/.config/opencode/skills/`、`.opencode/skills/` 或 `.agents/skills/` | 完整 Renderer + Validation 工作流 |
| **Claude.ai** | Settings → Capabilities → Skills 中上传 `archify.zip` | 取决于沙箱是否提供 Node.js |
| **Project Knowledge** | 把 `archify.zip` 上传到项目 | Prompt 驱动的 Architecture Fallback |
+| **Hermes Agent** | 显式启用:`hermes skills install skills-sh/tt-a1i/archify/archify -y` | 社区 Skill-only;Node `>=18`;不是 Nous 官方产品。没有遥测。非切换器目标。[详情](integrations/hermes-agent/README.md)。 |
| **DeepSeek Harness** | 显式启用:`dsh plugin --profile web add @tt-a1i/[email protected]`;调用:`Use the archify skill to map this repository's runtime architecture.`;卸载:`dsh plugin --profile web remove @tt-a1i/archify-dsh`。 | 面向开发者预览版 `@deepseek-ai/[email protected]` 的社区集成;Node `^22.19.0 \|\| >=24.0.0`;不是 DeepSeek 官方产品。没有遥测;shell 文件不会自动进入 Web Produced Files,请返回精确工作区路径。[详情](integrations/deepseek-harness/README.md)。 |
- Claude.ai 中的上传入口:
-
- ![Claude Skills 设置](docs/assets/claude-skills-settings.png)
-
## 参考与边界
- [Schema 说明](archify/schemas/README.md)
diff --cc archify/test/release-package-gates.test.mjs
index 988c7f2a,aed6695e..401faaaa
--- a/archify/test/release-package-gates.test.mjs
+++ b/archify/test/release-package-gates.test.mjs
@@@ -213,37 -166,29 +213,67 @@@ test('release docs disclose that mutabl
assert.doesNotMatch(design, /即使 Release 资产后来可被替换,也不能脱离/);
});
- test('GitHub Pages deploys docs only after every repository gate succeeds', () => {
+ test('GitHub Pages deploys the verified website artifact only after every repository gate succeeds', () => {
const workflow = fs.readFileSync(path.join(repoRoot, '.github', 'workflows', 'ci.yml'), 'utf8');
const job = workflowJob(workflow, 'deploy-pages');
++ assert.match(workflow, /push:\n branches: \[main, dev\]/);
assert.match(job, /if: github\.event_name == 'push' && github\.ref == 'refs\/heads\/main'/);
- assert.match(job, /needs: \[test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, windows-test-portability\]/);
- assert.match(job, /needs: \[test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, website\]/);
++ assert.match(job, /needs: \[test, webm-artifact, zip-freshness, published-update-manifest, package-smoke, windows-test-portability, website\]/);
assert.match(job, /pages: write/);
assert.match(job, /id-token: write/);
assert.match(job, /repos\/\$\{GITHUB_REPOSITORY\}\/git\/ref\/heads\/main/);
assert.match(job, /current_main" == "\$GITHUB_SHA"/);
assert.match(job, /Skipping obsolete Pages deployment/);
assert.match(job, /if: steps\.deployment-head\.outputs\.current == 'true'/);
- assert.match(job, /actions\/configure-pages@v6/);
+ assertPinnedAction(
+ job,
+ 'actions/configure-pages',
+ '45bfe0192ca1faeb007ade9deae92b16b8254a0d',
+ 'v6.0.0',
+ );
// v5 delegates to upload-artifact v7 (Node 24); v4 still embeds Node 20.
- assert.match(job, /actions\/upload-pages-artifact@v5\s/);
- assert.match(job, /actions\/download-artifact@v4/);
+ assertPinnedAction(
+ job,
+ 'actions/upload-pages-artifact',
+ 'fc324d3547104276b827a68afc52ff2a11cc49c9',
+ 'v5.0.0',
+ );
- assert.match(job, /path: docs/);
++ assertPinnedAction(
++ job,
++ 'actions/download-artifact',
++ 'd3f86a106a0bac45b974a628896c90dbdf5c8093',
++ 'v4.3.0',
++ );
+ assert.match(job, /name: website-dist/);
+ assert.match(job, /path: website\/dist/);
+ assertPinnedAction(
+ job,
+ 'actions/deploy-pages',
+ 'cd2ce8fcbc39b97be8ca5fce6e763baed58fa128',
+ 'v5.0.0',
+ );
+ const website = workflowJob(workflow, 'website');
+ assert.match(website, /npm run check && npm run build && npm test/);
+ assert.match(website, /ARCHIFY_SITE_ROOT:.*website\/dist/);
- assert.match(website, /actions\/upload-artifact@v4/);
++ assertPinnedAction(
++ website,
++ 'actions/upload-artifact',
++ '65462800fd760344b1a7b4382951275a0abb4808',
++ 'v4.3.3',
++ );
+ assert.match(website, /name: website-dist/);
- assert.match(job, /actions\/deploy-pages@v5/);
++ const browser = workflowJob(workflow, 'webm-artifact');
++ assert.match(browser, /Run shared browser regression gate/);
++ assert.match(browser, /npm run test:browser/);
++ const renderer = workflowJob(workflow, 'test');
++ assert.match(renderer, /Verify community Hermes adapter/);
++ const packageSmoke = workflowJob(workflow, 'package-smoke');
++ assert.match(packageSmoke, /Verify delivery-lock ownership with real subprocesses/);
++ assert.match(packageSmoke, /Verify macOS opener stays behind delivery-lock release/);
++ const windows = workflowJob(workflow, 'windows-test-portability');
++ assert.match(windows, /node-version: \[22, 24\]/);
++ assert.match(windows, /Verify maintained Windows path contracts/);
++ assert.match(windows, /ARCHIFY_REQUIRE_WINDOWS_REAL_PATHS: '1'/);
});
test('release tags with a SemVer prerelease are marked prerelease and never become latest', () => {
diff --cc docs/index.html
index 9e4b5aab,fa981b6f..17747e04
--- a/docs/index.html
+++ b/docs/index.html
@@@ -4,9 -4,9 +4,9 @@@
<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 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="description" content="An agent skill for Cursor, Claude Code, Codex CLI, OpenCode, and GitHub Copilot that turns plain-English descriptions into polished, explorable, self-contained technical diagrams with semantic focus, motion, and crisp export.">
<meta name="theme-color" content="#eff2f1">
- <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>">
+ <link rel="icon" type="image/svg+xml" href="assets/archify-mark.svg">
<meta property="og:type" content="website">
<meta property="og:title" content="Archify — Technical Diagrams from Plain English">
diff --cc scripts/copy-site-assets.mjs
index 36cca03b,e04715b1..0321c045
--- a/scripts/copy-site-assets.mjs
+++ b/scripts/copy-site-assets.mjs
@@@ -20,116 -7,14 +20,118 @@@ const sourceRoot = path.resolve(__dirna
const SITE_ASSETS = Object.freeze([
'site-language.js',
'site-navigation.css',
+ 'archify-lockup-light.svg',
+ 'archify-mark.svg',
]);
+function publicationError(asset, state) {
+ const reason = state?.reason || state;
+ return new Error(`Cannot safely publish site asset "${asset}" (${reason?.code || 'indeterminate'}).`, {
+ cause: reason,
+ });
+}
+
+function stageSiteAsset(source, commitPath, mode) {
+ const content = fs.readFileSync(source);
+ for (let attempt = 0; attempt < 100; attempt += 1) {
+ const candidatePath = path.join(
+ path.dirname(commitPath),
+ `.${path.basename(commitPath)}.archify-${randomBytes(16).toString('hex')}.tmp`,
+ );
+ let descriptor;
+ let identity;
+ try {
+ const noFollow = process.platform === 'win32' ? 0 : (fs.constants.O_NOFOLLOW || 0);
+ descriptor = fs.openSync(
+ candidatePath,
+ fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_EXCL | noFollow,
+ mode ?? 0o666,
+ );
+ let metadata;
+ try {
+ metadata = fs.fstatSync(descriptor, { bigint: true });
+ } catch (error) {
+ try {
+ const retry = fs.fstatSync(descriptor, { bigint: true });
+ if (retry.isFile() && retry.ino !== 0n) {
+ identity = { device: retry.dev, inode: retry.ino };
+ }
+ } catch {}
+ throw error;
+ }
+ if (!metadata.isFile() || metadata.ino === 0n) {
+ throw new Error('Temporary site asset identity could not be verified safely.');
+ }
+ identity = { device: metadata.dev, inode: metadata.ino };
+ fs.writeFileSync(descriptor, content);
+ if (mode !== null) fs.fchmodSync(descriptor, mode);
+ fs.closeSync(descriptor);
+ descriptor = undefined;
+ return { candidatePath, identity };
+ } catch (error) {
+ if (descriptor !== undefined) {
+ try { fs.closeSync(descriptor); } catch {}
+ }
+ if (error?.code === 'EEXIST') continue;
+ if (identity) removeOwnedRegularFile(candidatePath, identity, { subject: 'site-asset-candidate' });
+ throw error;
+ }
+ }
+ throw Object.assign(new Error(`Could not reserve a temporary site asset beside "${commitPath}".`), {
+ code: 'EEXIST',
+ });
+}
+
+function removeBoundSiteCandidate(item, expectedLinks) {
+ const removed = quarantineRemoveRegularFileBinding(
+ item.candidateBinding,
+ item.candidatePath,
+ { subject: 'site-asset-candidate', expectedLinks },
+ );
+ if (removed.status === 'removed' || removed.status === 'preserved') return removed;
+
+ // An in-place mutation still belongs to the inode we created. Rebind its
+ // current bytes by expected identity so quarantine cleanup remains race-safe
+ // without treating a replacement path claimant as ours.
+ const rebound = captureRegularFileBinding(item.candidatePath, {
+ subject: 'mutated-site-asset-candidate',
+ expectedIdentity: item.candidateIdentity,
+ expectedLinks,
+ });
+ if (rebound.status !== 'captured') return removed;
+ try {
+ return quarantineRemoveRegularFileBinding(
+ rebound.binding,
+ item.candidatePath,
+ { subject: 'mutated-site-asset-candidate', expectedLinks },
+ );
+ } finally {
+ releaseRegularFileBinding(rebound.binding);
+ }
+}
+
export function copySiteAssets(outputHtmlPath) {
- const targetRoot = path.join(path.dirname(path.resolve(outputHtmlPath)), 'assets');
- fs.mkdirSync(targetRoot, { recursive: true });
+ const requestedOutputParent = path.dirname(path.resolve(outputHtmlPath));
+ fs.mkdirSync(requestedOutputParent, { recursive: true });
+ const outputParent = fs.realpathSync.native(requestedOutputParent);
+ const targetRoot = path.join(outputParent, 'assets');
+ try {
+ fs.mkdirSync(targetRoot);
+ } catch (error) {
+ if (error?.code !== 'EEXIST') throw error;
+ }
+ const assetsEntry = fs.lstatSync(targetRoot, { bigint: true });
+ if (assetsEntry.isSymbolicLink() || !assetsEntry.isDirectory()) {
+ throw new Error('Site assets directory must be a physical directory, not a symbolic link or special entry.');
+ }
+ const containment = containedBy(outputParent, targetRoot);
+ if (containment.status !== 'match') {
+ throw new Error('Site assets directory is not physically contained by the output directory.', {
+ cause: containment.reason,
+ });
+ }
+ const publications = [];
for (const asset of SITE_ASSETS) {
const source = path.join(sourceRoot, asset);
const target = path.join(targetRoot, asset);
diff --cc website/src/pages/guide.astro
index 00000000,babff28c..ab4adf22
mode 000000,100644..100644
--- a/website/src/pages/guide.astro
+++ b/website/src/pages/guide.astro
@@@ -1,0 -1,59 +1,59 @@@
+ ---
+ import { version, versioned, jsonScript, guide } from '../data/site';
+ import SiteLayout from '../layouts/SiteLayout.astro';
+ import Navigation from '../components/Navigation.astro';
+ import head from '../data/guide-head.html?raw';
+ import css from '../styles/guide.css?raw';
+ import pageScript from '../scripts/guide.js?raw';
+ ---
+ <SiteLayout head={versioned(head)} css={css}>
+
+ <div class="grid-bg" aria-hidden="true"></div>
+
+ <Navigation page="guide" />
+
+ <main class="shell">
+ <section class="hero">
+ <div>
+ <div class="lead-label" data-i18n="eyebrow">Question-first diagramming</div>
+ <h1 data-i18n-html="headline">Choose the question.<br>Get the <em>right diagram.</em></h1>
+ <p class="lede" data-i18n="lede">Describe what your audience needs to understand. Archify recommends one bounded visual recipe—plus the evidence it must contain, when not to use it, and a prompt you can copy.</p>
+ </div>
+ <div class="metrics" aria-label="Guide metrics">
- <div class="metric"><strong>11</strong><span data-i18n-html="metricRecipes">real-world<br>recipes</span></div>
++ <div class="metric"><strong>12</strong><span data-i18n-html="metricRecipes">real-world<br>recipes</span></div>
+ <div class="metric"><strong>5</strong><span data-i18n-html="metricModes">typed diagram<br>modes</span></div>
+ <div class="metric"><strong>0</strong><span data-i18n-html="metricRuntime">runtime<br>dependencies</span></div>
+ </div>
+ </section>
+
+ <section class="chooser" aria-labelledby="chooser-title">
+ <div class="chooser-head">
+ <div><h2 id="chooser-title" data-i18n="chooserTitle">What must the diagram explain?</h2><p data-i18n="chooserBody">Write a situation, not a diagram type. Specific system facts produce a stronger recommendation.</p></div>
+ <span class="kbd">⌘ / Ctrl + Enter</span>
+ </div>
+ <textarea id="scenario" data-i18n-placeholder="placeholder" placeholder="Example: Show an API request with JWT auth, a Redis cache miss, database fallback, and async tracing."></textarea>
+ <div class="sample-row" id="samples"></div>
+ <div class="actions">
+ <button class="primary" id="recommend" type="button" data-i18n="recommend">Recommend a recipe →</button>
+ <button class="secondary" id="clear" type="button" data-i18n="clear">Clear</button>
+ </div>
+ <div class="result" id="result" aria-live="polite"></div>
+ </section>
+
+ <section class="library" id="library">
+ <div class="section-head">
- <div><div class="lead-label" data-i18n="libraryEyebrow">Recipe library</div><h2 data-i18n="libraryTitle">Eleven small, opinionated starting points.</h2></div>
++ <div><div class="lead-label" data-i18n="libraryEyebrow">Recipe library</div><h2 data-i18n="libraryTitle">12 small, opinionated starting points.</h2></div>
+ <p data-i18n="libraryBody">Each recipe answers one technical question. That boundary keeps the result legible, reviewable, and honest about missing evidence.</p>
+ </div>
+ <div class="filters" id="filters" aria-label="Filter recipes"></div>
+ <div class="cards" id="cards"></div>
+ </section>
+ </main>
+
+ <footer><div class="shell"><span data-i18n="footerLeft">Generated from the same recipe source as the Archify CLI.</span><span>archify guide "your scenario"</span><span data-i18n="versionLabel">Scenario guide / development / v{version}</span></div></footer>
+
+ <script is:inline id="guide-data" type="application/json" set:html={jsonScript(guide)}></script>
+ <script is:inline src="assets/site-language.js"></script>
+ <script is:inline set:html={versioned(pageScript)}></script>
+
+ </SiteLayout>
diff --cc website/src/pages/start.astro
index 00000000,80febf2e..77c88719
mode 000000,100644..100644
--- a/website/src/pages/start.astro
+++ b/website/src/pages/start.astro
@@@ -1,0 -1,98 +1,99 @@@
+ ---
+ import { version, versioned, jsonScript, starts } from '../data/site';
+ import SiteLayout from '../layouts/SiteLayout.astro';
+ import Navigation from '../components/Navigation.astro';
+ import head from '../data/start-head.html?raw';
+ import css from '../styles/start.css?raw';
+ import pageScript from '../scripts/start.js?raw';
+ ---
+ <SiteLayout head={versioned(head)} css={css}>
+
+ <div class="grid-bg" aria-hidden="true"></div>
+
+ <Navigation page="start" />
+
+ <main>
+ <header class="lead">
+ <div>
+ <p class="lead-label" data-en="Start with words, Mermaid, or code" data-zh="从描述、Mermaid 或代码开始">Start with words, Mermaid, or code</p>
+ <h1><span data-en="Describe it." data-zh="直接说,">Describe it.</span><span class="title-gap" aria-hidden="true"> </span><em data-en="Archify maps it." data-zh="Archify 就能画。">Archify maps it.</em></h1>
+ </div>
+ <div>
+ <p class="lead-copy" data-en="No repository is required. Describe a system or flow in a normal agent chat and Archify will turn it into a checked, interactive diagram. If code exists, the same skill can inspect it for evidence." data-zh="不需要绑定代码库。在任意 Agent 对话里用自然语言描述系统或流程,Archify 就会把它变成经过校验的交互图;如果有代码,也可以再让它读取仓库作为证据。">No repository is required. Describe a system or flow in a normal agent chat and Archify will turn it into a checked, interactive diagram. If code exists, the same skill can inspect it for evidence.</p>
+ <div class="trust-line" data-en="Your description is enough to make the first diagram." data-zh="只有一段描述,也足够画出第一张图。">Your description is enough to make the first diagram.</div>
+ </div>
+ </header>
+
+ <section class="type-shell" aria-labelledby="type-label">
+ <p class="type-label"><span data-en="Choose how to start" data-zh="选择如何开始">Choose how to start</span><strong data-en="Repository optional" data-zh="代码库可选">Repository optional</strong></p>
+ <div class="input-paths" role="tablist" aria-label="Input source">
+ <button class="input-path" type="button" role="tab" data-input="description"><strong data-en="Just describe it" data-zh="直接描述">直接描述</strong><span data-en="Start in any chat. No files or repository needed." data-zh="在任意对话里开始,不需要文件或代码库。">Start in any chat. No files or repository needed.</span></button>
+ <button class="input-path" type="button" role="tab" data-input="repository"><strong data-en="Use a repository" data-zh="从代码库开始">Use a repository</strong><span data-en="Let the agent inspect code when source evidence matters." data-zh="需要源码证据时,再让 Agent 检查代码。">Let the agent inspect code when source evidence matters.</span></button>
+ </div>
+ <p class="type-label" id="type-label"><span data-en="Choose the question shape" data-zh="选择问题形态">Choose the question shape</span><strong data-en="5 typed renderers" data-zh="5 种类型化渲染器">5 typed renderers</strong></p>
+ <div class="type-tabs" role="tablist" aria-label="Diagram type">
+ <button class="type-tab" type="button" role="tab" data-type="architecture" data-en="Architecture" data-zh="架构图">Architecture</button>
+ <button class="type-tab" type="button" role="tab" data-type="workflow" data-en="Workflow" data-zh="工作流">Workflow</button>
+ <button class="type-tab" type="button" role="tab" data-type="sequence" data-en="Sequence" data-zh="时序图">Sequence</button>
+ <button class="type-tab" type="button" role="tab" data-type="dataflow" data-en="Data flow" data-zh="数据流">Data flow</button>
+ <button class="type-tab" type="button" role="tab" data-type="lifecycle" data-en="Lifecycle" data-zh="生命周期">Lifecycle</button>
+ </div>
+ </section>
+
+ <section class="workbench" aria-label="Archify quick start">
+ <article class="panel" id="install">
+ <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="Choose Cursor, Codex, Claude Code, or OpenCode. The switcher gives each one 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. The switcher gives each one the same checked Skill and zero-dependency renderers—no vendor-specific fork.</p>
++ <p class="panel-intro" data-en="Choose Cursor, Codex, Claude Code, OpenCode, or GitHub Copilot. The switcher gives each one the same checked Skill and zero-dependency renderers—no vendor-specific fork." data-zh="选择 Cursor、Codex、Claude Code、OpenCode 或 GitHub Copilot。切换器为每个 Agent 提供同一份经过检查的 Skill 与零依赖渲染器,不维护厂商专属分叉。">Choose Cursor, Codex, Claude Code, OpenCode, or GitHub Copilot. The switcher gives each one 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>
++ <button class="agent-tab" type="button" role="tab" data-agent="github-copilot">GitHub Copilot</button>
+ </div>
+ </div>
+
+ <div class="command-block">
+ <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="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="Raven is supported through a manual ZIP installation, not a generated agent-switcher command. Extract archify.zip into ~/.raven/workspace/skills, which yields ~/.raven/workspace/skills/archify." data-zh="Raven 采用 ZIP 手动安装,不使用 Agent 切换器生成命令。将 archify.zip 解压到 ~/.raven/workspace/skills,解压后会得到 ~/.raven/workspace/skills/archify。">Raven is supported through a manual ZIP installation, not a generated agent-switcher command. Extract archify.zip into ~/.raven/workspace/skills, which yields ~/.raven/workspace/skills/archify.</p>
+ <p class="secondary-note" data-en="The Start link carries only your agent, language, diagram type, input mode, and a coarse source label. Journey events stay in this browser session and are never sent by Archify. No repository path, title, node, relationship, or source JSON is recorded." data-zh="Start 链接只携带 Agent、语言、图表类型、输入模式和粗粒度来源标签。转化步骤只保存在当前浏览器会话中,Archify 不会发送这些数据,也不会记录仓库路径、标题、节点、关系或源 JSON。">The Start link carries only your agent, language, diagram type, input mode, and a coarse source label. Journey events stay in this browser session and are never sent by Archify. No repository path, title, node, relationship, or source JSON is recorded.</p>
+ </article>
+
+ <article class="panel" aria-live="polite">
+ <div class="panel-kicker"><b>02</b><span data-en="Ask one bounded question" data-zh="只问一个有边界的问题">Ask one bounded question</span></div>
+ <h2 id="recipe-title">System overview</h2>
+ <p class="question" id="recipe-question"></p>
+ <ul class="include-list" id="include-list" aria-label="Required evidence"></ul>
+ <p class="prompt-box" id="recipe-prompt"></p>
+ <div class="actions">
+ <button class="action action-primary" id="copy-starter" type="button" data-en="Copy install + prompt" data-zh="复制安装命令 + 提示词">Copy install + prompt</button>
+ <button class="action" id="copy-prompt" type="button" data-en="Prompt only" data-zh="仅复制提示词">Prompt only</button>
+ <a class="action" id="proof-link" href="gallery.html" data-en="Open verified proof ↗" data-zh="打开验证成品 ↗">Open verified proof ↗</a>
+ <a class="action" href="guide.html" data-en="Need another recipe?" data-zh="需要其他配方?">Need another recipe?</a>
+ </div>
+ <p class="proof-meta" id="proof-meta"></p>
+ </article>
+ </section>
+
+ <footer class="page-footer">
+ <span data-en={`Archify v${version} · development · self-contained HTML · typed JSON source`} data-zh={`Archify v${version} · 开发版 · 独立 HTML · 类型化 JSON 源`}>Archify v{version} · development · self-contained HTML · typed JSON source</span>
+ <span id="copy-status" role="status" aria-live="polite"></span>
+ <a href="https://github.com/tt-a1i/archify" data-en="View source on GitHub ↗" data-zh="在 GitHub 查看源码 ↗">View source on GitHub ↗</a>
+ </footer>
+ </main>
+
+ <script is:inline id="start-data" type="application/json" set:html={jsonScript(starts)}></script>
+ <script is:inline src="assets/site-language.js"></script>
+ <script is:inline set:html={versioned(pageScript)}></script>
+
+ </SiteLayout>
diff --cc website/src/scripts/guide.js
index 00000000,82def304..889008d9
mode 000000,100644..100644
--- a/website/src/scripts/guide.js
+++ b/website/src/scripts/guide.js
@@@ -1,0 -1,101 +1,101 @@@
+
+ (function () {
+ 'use strict';
+ var recipes = JSON.parse(document.getElementById('guide-data').textContent);
+ var types = ["architecture","workflow","sequence","dataflow","lifecycle"];
+ var colors = { architecture:'#0891b2', workflow:'#047857', sequence:'#6d28d9', dataflow:'#b45309', lifecycle:'#be123c' };
+ var language = ArchifySiteLanguage.read();
+ var activeType = 'all';
+ var lastRecipe = null;
+ var copy = {
+ en: {
+ navGuide:'Guide',navProof:'Proof Lab',navStart:'Start',navInstall:'Install Skill',versionLabel:'Scenario guide / development / v[[ARCHIFY_VERSION]]',eyebrow:'Question-first diagramming', headline:'Choose the question.<br>Get the <em>right diagram.</em>', lede:'Describe what your audience needs to understand. Archify recommends one bounded visual recipe—plus the evidence it must contain, when not to use it, and a prompt you can copy.',
- metricRecipes:'real-world<br>recipes',metricModes:'typed diagram<br>modes',metricRuntime:'runtime<br>dependencies',chooserTitle:'What must the diagram explain?',chooserBody:'Write a situation, not a diagram type. Specific system facts produce a stronger recommendation.',placeholder:'Example: Show an API request with JWT auth, a Redis cache miss, database fallback, and async tracing.',recommend:'Recommend a recipe →',clear:'Clear',libraryEyebrow:'Recipe library',libraryTitle:'Eleven small, opinionated starting points.',libraryBody:'Each recipe answers one technical question. That boundary keeps the result legible, reviewable, and honest about missing evidence.',footerLeft:'Generated from the same recipe source as the Archify CLI.',all:'All recipes',recommended:'Recommended recipe',use:'Use when',avoid:'Avoid when',must:'Evidence to include',presentation:'Presentation',prompt:'Copy-ready prompt',copyPrompt:'Copy prompt',copied:'Copied',alternatives:'Other possible fits:',confidence:'confidence',open:'Open recipe',proofReady:'Verified proof',proofLink:'Open verified example ↗',
++ metricRecipes:'real-world<br>recipes',metricModes:'typed diagram<br>modes',metricRuntime:'runtime<br>dependencies',chooserTitle:'What must the diagram explain?',chooserBody:'Write a situation, not a diagram type. Specific system facts produce a stronger recommendation.',placeholder:'Example: Show an API request with JWT auth, a Redis cache miss, database fallback, and async tracing.',recommend:'Recommend a recipe →',clear:'Clear',libraryEyebrow:'Recipe library',libraryTitle:'12 small, opinionated starting points.',libraryBody:'Each recipe answers one technical question. That boundary keeps the result legible, reviewable, and honest about missing evidence.',footerLeft:'Generated from the same recipe source as the Archify CLI.',all:'All recipes',recommended:'Recommended recipe',use:'Use when',avoid:'Avoid when',must:'Evidence to include',presentation:'Presentation',prompt:'Copy-ready prompt',copyPrompt:'Copy prompt',copied:'Copied',alternatives:'Other possible fits:',confidence:'confidence',open:'Open recipe',proofReady:'Verified proof',proofLink:'Open verified example ↗',
+ samples:[['API + cache miss','Show an API request with JWT auth, a Redis cache miss, database fallback, and async tracing.'],['Kafka + DLQ','Map Kafka topics, ordered processors, consumer groups, replay, state stores, and the dead-letter queue.'],['Incident response','Show how responders detect, triage, mitigate, escalate, communicate, and verify recovery.']]
+ },
+ zh: {
+ navGuide:'场景指南',navProof:'验证作品集',navStart:'快速上手',navInstall:'安装技能',versionLabel:'场景指南 / 开发版 / v[[ARCHIFY_VERSION]]',eyebrow:'先问题,后图表',headline:'先选对问题,<br>再得到<em>对的图。</em>',lede:'描述受众真正需要理解的内容。Archify 会推荐一个有边界的视觉配方,同时给出证据清单、禁用条件和可复制提示词。',
- metricRecipes:'个真实场景<br>配方',metricModes:'种类型化<br>图表模式',metricRuntime:'个运行时<br>依赖',chooserTitle:'这张图必须解释什么?',chooserBody:'写清场景,不要只写图表类型。系统事实越具体,推荐越可靠。',placeholder:'例如:展示带 JWT 鉴权、Redis 缓存未命中、数据库回退和异步追踪的 API 请求。',recommend:'推荐配方 →',clear:'清空',libraryEyebrow:'配方库',libraryTitle:'十一个小而专的起点。',libraryBody:'每个配方只回答一个技术问题。清晰的边界让图更易读、可评审,也不会掩盖证据缺口。',footerLeft:'网页与 Archify CLI 使用同一份配方数据生成。',all:'全部配方',recommended:'推荐配方',use:'适合',avoid:'不要这样用',must:'必须包含的证据',presentation:'表现建议',prompt:'可直接复制的提示词',copyPrompt:'复制提示词',copied:'已复制',alternatives:'其他可能:',confidence:'置信度',open:'打开配方',proofReady:'已验证成品',proofLink:'打开验证成品 ↗',
++ metricRecipes:'个真实场景<br>配方',metricModes:'种类型化<br>图表模式',metricRuntime:'个运行时<br>依赖',chooserTitle:'这张图必须解释什么?',chooserBody:'写清场景,不要只写图表类型。系统事实越具体,推荐越可靠。',placeholder:'例如:展示带 JWT 鉴权、Redis 缓存未命中、数据库回退和异步追踪的 API 请求。',recommend:'推荐配方 →',clear:'清空',libraryEyebrow:'配方库',libraryTitle:'12 个小而专的起点。',libraryBody:'每个配方只回答一个技术问题。清晰的边界让图更易读、可评审,也不会掩盖证据缺口。',footerLeft:'网页与 Archify CLI 使用同一份配方数据生成。',all:'全部配方',recommended:'推荐配方',use:'适合',avoid:'不要这样用',must:'必须包含的证据',presentation:'表现建议',prompt:'可直接复制的提示词',copyPrompt:'复制提示词',copied:'已复制',alternatives:'其他可能:',confidence:'置信度',open:'打开配方',proofReady:'已验证成品',proofLink:'打开验证成品 ↗',
+ samples:[['API + 缓存未命中','展示带 JWT 鉴权、Redis 缓存未命中、数据库回退和异步追踪的 API 请求。'],['Kafka + 死信','梳理 Kafka Topic、有序处理器、消费者组、重放、状态存储和死信队列。'],['事故处置','展示响应者如何发现、分诊、缓解、升级、沟通并验证恢复。']]
+ }
+ };
+
+ function t(key) { return copy[language][key]; }
+ function local(recipe) { return Object.assign({}, recipe, recipe[language]); }
+ function normalize(value) { return String(value || '').normalize('NFKC').toLowerCase().replace(/[\s_]+/g,' ').trim(); }
+ function rank(query) {
+ var text = normalize(query);
+ return recipes.map(function (recipe,index) {
+ var score = 0, matched = [];
+ if (text === recipe.id || text === recipe.id.replace(/-/g,' ')) { score = 100; matched = [recipe.id]; }
+ else recipe.signals.forEach(function (signal) { if (text.includes(normalize(signal[0]))) { score += signal[1]; matched.push(signal[0]); } });
+ return { recipe:recipe, score:score, matched:matched, index:index };
+ }).sort(function (a,b) { return b.score - a.score || a.index - b.index; });
+ }
+ function recommendation(query) {
+ var ranked = rank(query), winner = ranked[0].score > 0 ? ranked[0] : { recipe:recipes[0], score:0, matched:[] };
+ return { recipe:winner.recipe, confidence:winner.score >= 14 ? 'high' : winner.score >= 7 ? 'medium' : 'low', alternatives:ranked.filter(function (entry) { return entry.recipe.id !== winner.recipe.id && entry.score > 0; }).slice(0,2) };
+ }
+ function escapeHtml(value) { var node = document.createElement('span'); node.textContent = String(value); return node.innerHTML; }
+ function renderSamples() {
+ document.getElementById('samples').innerHTML = t('samples').map(function (sample) { return '<button class="chip" type="button" data-query="'+escapeHtml(sample[1])+'">'+escapeHtml(sample[0])+'</button>'; }).join('');
+ }
+ function renderFilters() {
+ var labels = {"en":{"architecture":"Architecture","workflow":"Workflow","sequence":"Sequence","dataflow":"Data flow","lifecycle":"Lifecycle"},"zh":{"architecture":"架构图","workflow":"工作流","sequence":"时序图","dataflow":"数据流","lifecycle":"生命周期"}};
+ document.getElementById('filters').innerHTML = ['all'].concat(types).map(function (type) { return '<button class="filter '+(activeType === type ? 'active':'')+'" type="button" data-filter="'+type+'">'+escapeHtml(type === 'all' ? t('all') : labels[language][type])+'</button>'; }).join('');
+ }
+ function renderCards() {
+ var visible = recipes.filter(function (recipe) { return activeType === 'all' || recipe.type === activeType; });
+ document.getElementById('cards').innerHTML = visible.map(function (raw) {
+ var recipe = local(raw);
+ return '<button class="card" type="button" data-recipe="'+recipe.id+'" style="--type-color:'+colors[recipe.type]+'"><span class="card-type">'+escapeHtml(recipe.type)+'</span><h3>'+escapeHtml(recipe.title)+'</h3><p class="card-question">'+escapeHtml(recipe.question)+'</p><p class="card-summary">'+escapeHtml(recipe.summary)+'</p><span class="card-foot"><span>'+escapeHtml(recipe.presentation.preset)+' · '+escapeHtml(recipe.presentation.motion)+'</span><span>'+escapeHtml(recipe.proof ? t('proofReady') : t('open'))+' ↗</span></span></button>';
+ }).join('');
+ }
+ function renderResult(rawRecipe, confidence, alternatives) {
+ var recipe = local(rawRecipe);
+ lastRecipe = rawRecipe;
+ var alt = alternatives || [];
+ var html = '<div class="result-main"><div><span class="result-kicker">'+escapeHtml(t('recommended'))+' · '+escapeHtml(confidence)+' '+escapeHtml(t('confidence'))+'</span><h3>'+escapeHtml(recipe.title)+'</h3><p class="result-question">'+escapeHtml(recipe.question)+'</p><p class="result-summary">'+escapeHtml(recipe.summary)+'</p>'+(recipe.proof ? '<a class="proof-link" href="gallery.html#proof-'+encodeURIComponent(recipe.proof)+'">'+escapeHtml(t('proofLink'))+'</a>' : '')+'</div><div class="boundary"><div class="boundary-item"><small>'+escapeHtml(t('use'))+'</small><p>'+escapeHtml(recipe.useWhen)+'</p></div><div class="boundary-item avoid"><small>'+escapeHtml(t('avoid'))+'</small><p>'+escapeHtml(recipe.avoidWhen)+'</p></div></div></div>';
+ html += '<div class="result-grid"><div class="checklist"><div class="mini-heading">'+escapeHtml(t('must'))+'</div><ul>'+recipe.include.map(function (item) { return '<li>'+escapeHtml(item)+'</li>'; }).join('')+'</ul><div class="presentation"><span class="tag">'+escapeHtml(recipe.type)+'</span><span class="tag">'+escapeHtml(recipe.presentation.preset)+'</span><span class="tag">'+escapeHtml(recipe.presentation.motion)+'</span><span class="tag">views '+escapeHtml(recipe.presentation.views)+'</span></div></div>';
+ html += '<div class="prompt-box"><div class="prompt-bar"><div class="mini-heading" style="margin:0">'+escapeHtml(t('prompt'))+'</div><button class="copy" id="copy-prompt" type="button">'+escapeHtml(t('copyPrompt'))+'</button></div><p class="prompt-text">'+escapeHtml(recipe.prompt)+'</p></div></div>';
+ if (alt.length) html += '<div class="alternatives">'+escapeHtml(t('alternatives'))+alt.map(function (entry) { var item=local(entry.recipe); return '<button type="button" data-alt="'+item.id+'">'+escapeHtml(item.title)+' ['+item.type+']</button>'; }).join('')+'</div>';
+ var result = document.getElementById('result');
+ result.innerHTML = html;
+ result.classList.add('visible');
+ }
+ function runRecommendation() {
+ var query = document.getElementById('scenario').value.trim();
+ if (!query) { document.getElementById('scenario').focus(); return; }
+ var picked = recommendation(query);
+ renderResult(picked.recipe,picked.confidence,picked.alternatives);
+ }
+ function applyLanguage(next) {
+ language = ArchifySiteLanguage.write(next);
+ document.documentElement.lang = language === 'zh' ? 'zh-CN' : 'en';
+ document.getElementById('language').textContent = language === 'zh' ? 'EN' : '中文';
+ document.getElementById('language').setAttribute('aria-label', language === 'zh' ? 'Switch to English' : '切换到中文');
+ document.querySelectorAll('[data-en][data-zh]').forEach(function (node) { node.textContent=node.getAttribute(language === 'zh' ? 'data-zh' : 'data-en'); });
+ document.querySelectorAll('[data-i18n]').forEach(function (node) { node.textContent=t(node.dataset.i18n); });
+ document.querySelectorAll('[data-i18n-html]').forEach(function (node) { node.innerHTML=t(node.dataset.i18nHtml); });
+ document.querySelectorAll('[data-i18n-placeholder]').forEach(function (node) { node.placeholder=t(node.dataset.i18nPlaceholder); });
+ renderSamples(); renderFilters(); renderCards();
+ if (lastRecipe) renderResult(lastRecipe,'selected',[]);
+ }
+ async function copyPrompt() {
+ if (!lastRecipe) return;
+ var text = local(lastRecipe).prompt, button = document.getElementById('copy-prompt');
+ try { await navigator.clipboard.writeText(text); } catch (_) {
+ var area=document.createElement('textarea'); area.value=text; document.body.appendChild(area); area.select(); document.execCommand('copy'); area.remove();
+ }
+ button.textContent=t('copied'); setTimeout(function () { if (button.isConnected) button.textContent=t('copyPrompt'); },1200);
+ }
+ document.getElementById('recommend').addEventListener('click',runRecommendation);
+ document.getElementById('clear').addEventListener('click',function () { document.getElementById('scenario').value=''; document.getElementById('result').classList.remove('visible'); lastRecipe=null; });
+ document.getElementById('language').addEventListener('click',function () { applyLanguage(language === 'en' ? 'zh':'en'); });
+ document.getElementById('scenario').addEventListener('keydown',function (event) { if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') runRecommendation(); });
+ document.getElementById('samples').addEventListener('click',function (event) { var chip=event.target.closest('[data-query]'); if (!chip) return; document.getElementById('scenario').value=chip.dataset.query; runRecommendation(); });
+ document.getElementById('filters').addEventListener('click',function (event) { var filter=event.target.closest('[data-filter]'); if (!filter) return; activeType=filter.dataset.filter; renderFilters(); renderCards(); });
+ document.getElementById('cards').addEventListener('click',function (event) { var card=event.target.closest('[data-recipe]'); if (!card) return; var recipe=recipes.find(function (item) { return item.id === card.dataset.recipe; }); renderResult(recipe,'selected',[]); document.getElementById('result').scrollIntoView({behavior:'smooth',block:'center'}); });
+ document.getElementById('result').addEventListener('click',function (event) { if (event.target.id === 'copy-prompt') copyPrompt(); var alt=event.target.closest('[data-alt]'); if (alt) renderResult(recipes.find(function (item) { return item.id === alt.dataset.alt; }),'selected',[]); });
+ applyLanguage(language);
+ }());
diff --cc website/src/scripts/start.js
index 00000000,f8582c02..535ecb18
mode 000000,100644..100644
--- a/website/src/scripts/start.js
+++ b/website/src/scripts/start.js
@@@ -1,0 -1,241 +1,241 @@@
+
+ (function () {
+ 'use strict';
+
+ 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 KNOWN_AGENTS = new Set(['cursor', 'codex', 'claude-code', 'opencode', 'github-copilot']);
+ var KNOWN_INPUTS = new Set(['description', 'repository']);
+ var KNOWN_SOURCES = new Set(['artifact', 'gallery', 'readme', 'direct']);
+ var EVENT_KEY = 'archify.start.events.v1';
+ var params = new URLSearchParams(window.location.search);
+ var requestedType = params.get('type');
+ var requestedAgent = params.get('agent');
+ var requestedSource = params.get('source');
+ var requestedInput = params.get('input');
+ var type = KNOWN_TYPES.has(requestedType) ? requestedType : 'architecture';
+ var agent = KNOWN_AGENTS.has(requestedAgent) ? requestedAgent : 'codex';
+ var source = KNOWN_SOURCES.has(requestedSource) ? requestedSource : 'direct';
+ var input = KNOWN_INPUTS.has(requestedInput) ? requestedInput : 'description';
+ var language = ArchifySiteLanguage.read();
+
+ var title = document.getElementById('recipe-title');
+ var question = document.getElementById('recipe-question');
+ var prompt = document.getElementById('recipe-prompt');
+ var includeList = document.getElementById('include-list');
+ var proofLink = document.getElementById('proof-link');
+ 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;
+ }
+
+ function updateStaticCopy() {
+ document.documentElement.lang = language === 'zh' ? 'zh-CN' : 'en';
+ document.querySelectorAll('[data-en][data-zh]').forEach(function (element) {
+ element.textContent = copyForElement(element);
+ });
+ languageButton.textContent = language === 'zh' ? 'EN' : '中文';
+ languageButton.setAttribute('aria-label', language === 'zh' ? 'Switch to English' : '切换到中文');
+ }
+
+ function updateUrl() {
+ var next = new URL(window.location.href);
+ next.searchParams.set('type', type);
+ next.searchParams.set('agent', agent);
+ next.searchParams.delete('lang');
+ next.searchParams.set('source', source);
+ next.searchParams.set('input', input);
+ history.replaceState(null, '', next.pathname + next.search + next.hash);
+ }
+
+ function recordStep(step) {
+ var detail = {
+ schemaVersion: 1,
+ step: step,
+ source: source,
+ type: type,
+ agent: agent,
+ language: language
+ };
+ try {
+ var events = JSON.parse(sessionStorage.getItem(EVENT_KEY) || '[]');
+ if (!Array.isArray(events)) events = [];
+ events.push(detail);
+ sessionStorage.setItem(EVENT_KEY, JSON.stringify(events.slice(-24)));
+ } catch (_) {}
+ try { window.dispatchEvent(new CustomEvent('archify:start-funnel', { detail: detail })); } catch (_) {}
+ }
+
+ window.ArchifyStartMetrics = {
+ snapshot: function () {
+ try {
+ var events = JSON.parse(sessionStorage.getItem(EVENT_KEY) || '[]');
+ return Array.isArray(events) ? events.slice() : [];
+ } catch (_) { return []; }
+ }
+ };
+
+ function currentPrompt() {
+ return input === 'description'
+ ? DATA[type][language].descriptionPrompt
+ : DATA[type][language].repositoryPrompt;
+ }
+
+ function render() {
+ language = ArchifySiteLanguage.write(language);
+ var recipe = DATA[type];
+ var copy = recipe[language];
+ updateStaticCopy();
+ document.querySelectorAll('[data-type]').forEach(function (button) {
+ var active = button.dataset.type === type;
+ 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;
+ });
+ document.querySelectorAll('[data-input]').forEach(function (button) {
+ var active = button.dataset.input === input;
+ 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 = currentPrompt();
+ includeList.replaceChildren.apply(includeList, copy.include.map(function (item) {
+ var entry = document.createElement('li');
+ entry.textContent = item;
+ return entry;
+ }));
+ proofLink.href = 'gallery.html#proof-' + encodeURIComponent(recipe.proof);
+ proofMeta.textContent = language === 'zh'
+ ? '验证成品 · ' + recipe.presentation.preset + ' · ' + recipe.presentation.motion
+ : 'Verified proof · ' + recipe.presentation.preset + ' · ' + recipe.presentation.motion;
+ copyStatus.textContent = '';
+ updateUrl();
+ }
+
+ function fallbackCopy(text) {
+ var area = document.createElement('textarea');
+ area.value = text;
+ area.setAttribute('readonly', '');
+ area.style.position = 'fixed';
+ area.style.opacity = '0';
+ document.body.appendChild(area);
+ area.select();
+ var ok = document.execCommand('copy');
+ area.remove();
+ if (!ok) throw new Error('copy failed');
+ }
+
+ function starterText() {
+ var agentName = document.querySelector('[data-agent="' + agent + '"]').textContent;
+ if (language === 'zh') {
+ return '为 ' + agentName + ' 安装 Archify:\n' + installCommand.textContent.trim()
+ + (input === 'description' ? '\n\n然后在任意新对话中直接告诉 ' : '\n\n然后在目标仓库中让 ') + agentName + ':\n' + currentPrompt();
+ }
+ return 'Install Archify for ' + agentName + ':\n' + installCommand.textContent.trim()
+ + (input === 'description' ? '\n\nThen start any new chat and tell ' : '\n\nThen, in your target repository, ask ') + agentName + ':\n' + currentPrompt();
+ }
+
+ async function copyText(text, step) {
+ try {
+ if (navigator.clipboard && window.isSecureContext) await navigator.clipboard.writeText(text);
+ else fallbackCopy(text);
+ if (step) recordStep(step);
+ copyStatus.textContent = language === 'zh' ? '已复制到剪贴板。' : 'Copied to clipboard.';
+ } catch (_) {
+ copyStatus.textContent = language === 'zh' ? '复制失败,请手动选择文本。' : 'Copy failed. Select the text manually.';
+ }
+ }
+
+ document.querySelectorAll('[data-type]').forEach(function (button) {
+ button.addEventListener('click', function () {
+ type = button.dataset.type;
+ render();
+ });
+ button.addEventListener('keydown', function (event) {
+ var buttons = Array.from(document.querySelectorAll('[data-type]'));
+ 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-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-input]').forEach(function (button) {
+ button.addEventListener('click', function () {
+ input = button.dataset.input;
+ render();
+ });
+ button.addEventListener('keydown', function (event) {
+ var buttons = Array.from(document.querySelectorAll('[data-input]'));
+ 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 () {
+ var step = button.dataset.copySource === 'install-command' ? 'global_install_copy' : 'project_install_copy';
+ copyText(document.getElementById(button.dataset.copySource).textContent.trim(), step);
+ });
+ });
+ document.getElementById('copy-prompt').addEventListener('click', function () {
+ copyText(currentPrompt(), 'prompt_copy');
+ });
+ document.getElementById('copy-starter').addEventListener('click', function () {
+ copyText(starterText(), 'starter_copy');
+ });
+ proofLink.addEventListener('click', function () { recordStep('proof_open'); });
+ languageButton.addEventListener('click', function () {
+ language = language === 'zh' ? 'en' : 'zh';
+ render();
+ });
+
+ render();
+ recordStep('start_view');
+ })();