aub-workspace 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +23 -0
- package/bin/aub-workspace.mjs +246 -0
- package/package.json +32 -0
- package/vendor/aub/apps/editor/dist/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/angular-importer.lib-dB_jK4mR.js +32 -0
- package/vendor/aub/apps/editor/dist/assets/canvas-tools-CuYC7cA2.js +364 -0
- package/vendor/aub/apps/editor/dist/assets/design-bridge.lib-DJvaK6AX.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/export-agent-prompt.lib-BsP0KNqo.js +2 -0
- package/vendor/aub/apps/editor/dist/assets/export-md.lib-DdmdeWgO.js +3 -0
- package/vendor/aub/apps/editor/dist/assets/handoff-package.lib-DDYpcEma.js +20 -0
- package/vendor/aub/apps/editor/dist/assets/implementation-report.lib-CmsSB_8s.js +1 -0
- package/vendor/aub/apps/editor/dist/assets/index-BCH-ek3h.js +2 -0
- package/vendor/aub/apps/editor/dist/assets/index-lAnc928Q.css +1 -0
- package/vendor/aub/apps/editor/dist/assets/index-vt1nM1M4.js +507 -0
- package/vendor/aub/apps/editor/dist/assets/jszip.min-CRfXyL92.js +12 -0
- package/vendor/aub/apps/editor/dist/assets/react-vendor-ByX9Pqse.js +40 -0
- package/vendor/aub/apps/editor/dist/brand/android-chrome-192x192.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/android-chrome-512x512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-1024.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-192.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/app-icon-512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/apple-touch-icon.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/aub-logo-mark.svg +28 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-16x16.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-32x32.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon-48x48.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon.ico +0 -0
- package/vendor/aub/apps/editor/dist/brand/favicon.svg +9 -0
- package/vendor/aub/apps/editor/dist/brand/maskable-icon-512.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/mstile-150x150.png +0 -0
- package/vendor/aub/apps/editor/dist/brand/safari-pinned-tab.svg +8 -0
- package/vendor/aub/apps/editor/dist/browserconfig.xml +9 -0
- package/vendor/aub/apps/editor/dist/index.html +22 -0
- package/vendor/aub/apps/editor/dist/manifest.webmanifest +28 -0
- package/vendor/aub/apps/editor/dist/template-previews/admin-table.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/booking.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/calendar.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/catalog.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/chat.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/checkout.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/crm.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/dashboard.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/feed.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/files.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/kanban.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/landing.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/mail.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/onboarding.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/pricing.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/product-detail.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/settings.png +0 -0
- package/vendor/aub/apps/editor/dist/template-previews/wiki.png +0 -0
- package/vendor/aub/apps/mcp-server/dist/aub.js +15 -0
- package/vendor/aub/apps/mcp-server/dist/context.js +1 -0
- package/vendor/aub/apps/mcp-server/dist/http.js +123 -0
- package/vendor/aub/apps/mcp-server/dist/index.js +23 -0
- package/vendor/aub/apps/mcp-server/dist/repo.js +17 -0
- package/vendor/aub/apps/mcp-server/dist/schema.js +42 -0
- package/vendor/aub/apps/mcp-server/dist/server.js +80 -0
- package/vendor/aub/apps/mcp-server/dist/tools/approve-component-candidate.js +27 -0
- package/vendor/aub/apps/mcp-server/dist/tools/diff-blueprints.js +27 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-handoff.js +87 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-prompt.js +35 -0
- package/vendor/aub/apps/mcp-server/dist/tools/export-template-authoring-prompt.js +13 -0
- package/vendor/aub/apps/mcp-server/dist/tools/generate-template-from-source.js +25 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-aub-session.js +13 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-blueprint.js +28 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-project.js +45 -0
- package/vendor/aub/apps/mcp-server/dist/tools/get-workspace-status.js +10 -0
- package/vendor/aub/apps/mcp-server/dist/tools/import-design-bridge.js +62 -0
- package/vendor/aub/apps/mcp-server/dist/tools/list-blueprints.js +11 -0
- package/vendor/aub/apps/mcp-server/dist/tools/list-projects.js +11 -0
- package/vendor/aub/apps/mcp-server/dist/tools/lock-blueprint.js +33 -0
- package/vendor/aub/apps/mcp-server/dist/tools/migrate-blueprint.js +38 -0
- package/vendor/aub/apps/mcp-server/dist/tools/resolve-component.js +51 -0
- package/vendor/aub/apps/mcp-server/dist/tools/scaffold-blueprint.js +53 -0
- package/vendor/aub/apps/mcp-server/dist/tools/scan-project-ui.js +18 -0
- package/vendor/aub/apps/mcp-server/dist/tools/submit-report.js +48 -0
- package/vendor/aub/apps/mcp-server/dist/tools/update-aub-session.js +14 -0
- package/vendor/aub/apps/mcp-server/dist/tools/validate-blueprint.js +67 -0
- package/vendor/aub/apps/mcp-server/dist/tools/validate-project.js +74 -0
- package/vendor/aub/apps/mcp-server/dist/tools/write-blueprint.js +72 -0
- package/vendor/aub/apps/mcp-server/dist/workspace.js +138 -0
- package/vendor/aub/docs/agent-handoff.md +85 -0
- package/vendor/aub/docs/agent-handoff.zh-Hant.md +85 -0
- package/vendor/aub/docs/template-authoring-agent.md +86 -0
- package/vendor/aub/schema/aub-ci.schema.json +34 -0
- package/vendor/aub/schema/aub.registry.schema.json +118 -0
- package/vendor/aub/schema/design-bridge.schema.json +44 -0
- package/vendor/aub/schema/implementation-report.schema.json +93 -0
- package/vendor/aub/schema/project-types.ts +72 -0
- package/vendor/aub/schema/registry/components.json +118 -0
- package/vendor/aub/schema/types.js +13 -0
- package/vendor/aub/schema/types.ts +348 -0
- package/vendor/aub/schema/ui-blueprint-lock.schema.json +61 -0
- package/vendor/aub/schema/ui-blueprint.schema.json +1339 -0
- package/vendor/aub/schema/ui-project.schema.json +139 -0
- package/vendor/aub/scripts/agent-implementation-benchmark.lib.mjs +125 -0
- package/vendor/aub/scripts/angular-importer.lib.mjs +982 -0
- package/vendor/aub/scripts/check-editor-bundle-budget.mjs +36 -0
- package/vendor/aub/scripts/ci-verify.lib.mjs +256 -0
- package/vendor/aub/scripts/ci-verify.mjs +45 -0
- package/vendor/aub/scripts/create-authoring-kit.mjs +84 -0
- package/vendor/aub/scripts/create-implementation-report.mjs +24 -0
- package/vendor/aub/scripts/design-bridge.lib.d.mts +32 -0
- package/vendor/aub/scripts/design-bridge.lib.mjs +69 -0
- package/vendor/aub/scripts/diff-blueprint.lib.d.mts +18 -0
- package/vendor/aub/scripts/diff-blueprint.lib.mjs +148 -0
- package/vendor/aub/scripts/diff-blueprint.mjs +25 -0
- package/vendor/aub/scripts/export-agent-prompt.lib.d.mts +10 -0
- package/vendor/aub/scripts/export-agent-prompt.lib.mjs +160 -0
- package/vendor/aub/scripts/export-agent-prompt.mjs +79 -0
- package/vendor/aub/scripts/export-md.lib.d.mts +3 -0
- package/vendor/aub/scripts/export-md.lib.mjs +302 -0
- package/vendor/aub/scripts/export-md.mjs +43 -0
- package/vendor/aub/scripts/generate-registry-artifacts.lib.mjs +118 -0
- package/vendor/aub/scripts/generate-registry-artifacts.mjs +65 -0
- package/vendor/aub/scripts/generate-site-locales.mjs +545 -0
- package/vendor/aub/scripts/handoff-package.lib.d.mts +20 -0
- package/vendor/aub/scripts/handoff-package.lib.mjs +111 -0
- package/vendor/aub/scripts/implementation-report.lib.d.mts +21 -0
- package/vendor/aub/scripts/implementation-report.lib.mjs +97 -0
- package/vendor/aub/scripts/import-angular-component.mjs +72 -0
- package/vendor/aub/scripts/import-design-bridge.mjs +59 -0
- package/vendor/aub/scripts/lock-blueprint.lib.d.mts +23 -0
- package/vendor/aub/scripts/lock-blueprint.lib.mjs +58 -0
- package/vendor/aub/scripts/lock-blueprint.mjs +36 -0
- package/vendor/aub/scripts/migrate-blueprint-cli.mjs +28 -0
- package/vendor/aub/scripts/migrate-blueprint.d.mts +5 -0
- package/vendor/aub/scripts/migrate-blueprint.mjs +95 -0
- package/vendor/aub/scripts/package-workspace-cli.mjs +34 -0
- package/vendor/aub/scripts/project.lib.d.mts +44 -0
- package/vendor/aub/scripts/project.lib.mjs +175 -0
- package/vendor/aub/scripts/project.mjs +332 -0
- package/vendor/aub/scripts/registry.lib.d.mts +52 -0
- package/vendor/aub/scripts/registry.lib.mjs +222 -0
- package/vendor/aub/scripts/run-agent-implementation.mjs +423 -0
- package/vendor/aub/scripts/run-agent-readability.mjs +145 -0
- package/vendor/aub/scripts/run-ollama-prompt.mjs +30 -0
- package/vendor/aub/scripts/scaffold-blueprint.lib.d.mts +38 -0
- package/vendor/aub/scripts/scaffold-blueprint.lib.mjs +316 -0
- package/vendor/aub/scripts/scaffold-blueprint.mjs +86 -0
- package/vendor/aub/scripts/score-agent-implementation.mjs +27 -0
- package/vendor/aub/scripts/score-agent-readability.mjs +54 -0
- package/vendor/aub/scripts/sync-brand-assets.mjs +33 -0
- package/vendor/aub/scripts/validate-blueprint.lib.d.mts +14 -0
- package/vendor/aub/scripts/validate-blueprint.lib.mjs +136 -0
- package/vendor/aub/scripts/validate.mjs +128 -0
- package/vendor/aub/scripts/verify-implementation-report.mjs +36 -0
- package/vendor/aub/scripts/workspace-loop.lib.d.mts +17 -0
- package/vendor/aub/scripts/workspace-loop.lib.mjs +674 -0
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { resolve } from 'node:path';
|
|
4
|
+
|
|
5
|
+
const ROOT = resolve(import.meta.dirname, '..');
|
|
6
|
+
const CHECK = process.argv.includes('--check');
|
|
7
|
+
|
|
8
|
+
const locales = {
|
|
9
|
+
en: {
|
|
10
|
+
path: '',
|
|
11
|
+
label: 'English',
|
|
12
|
+
shortLabel: 'EN',
|
|
13
|
+
htmlLang: 'en',
|
|
14
|
+
ogLocale: 'en_US',
|
|
15
|
+
title: 'AUB — UI Contracts for Coding Agents',
|
|
16
|
+
description:
|
|
17
|
+
'Define a versioned UI implementation contract, map it to production components, hand it to any coding agent, and gate the pull request on acceptance evidence.',
|
|
18
|
+
ogDescription:
|
|
19
|
+
'From design intent to verified implementation: semantic Blueprints, production components, MCP, and PR acceptance gates.',
|
|
20
|
+
navEditor: 'Editor',
|
|
21
|
+
navWorkflow: 'Workflow',
|
|
22
|
+
navIntegrations: 'Integrations',
|
|
23
|
+
navGitHub: 'GitHub',
|
|
24
|
+
languageNav: 'Language',
|
|
25
|
+
eyebrow: 'UI implementation contracts',
|
|
26
|
+
headline: ['Define the intent.', 'Reuse real components.', 'Gate the PR on evidence.'],
|
|
27
|
+
lede:
|
|
28
|
+
'AUB is the open contract layer between product intent and coding agents. Compose a semantic Blueprint, map it to production components, hand the same source of truth to Codex, Claude Code, Copilot, or another agent, then verify every acceptance id in CI.',
|
|
29
|
+
openEditor: 'Open the live editor',
|
|
30
|
+
viewGitHub: 'View on GitHub',
|
|
31
|
+
note: 'Apache-2.0 · local-first · agent-neutral · the editor uploads nothing',
|
|
32
|
+
editorAria: 'Open the AUB editor',
|
|
33
|
+
editorAlt: 'AUB visual editor composing a responsive screen',
|
|
34
|
+
capabilitiesAria: 'Product capabilities',
|
|
35
|
+
proof: [
|
|
36
|
+
['62', 'semantic component types'],
|
|
37
|
+
['18', 'responsive starting templates'],
|
|
38
|
+
['23', 'MCP tools for agents'],
|
|
39
|
+
['4', 'acceptance categories'],
|
|
40
|
+
],
|
|
41
|
+
workflowKicker: 'Golden path',
|
|
42
|
+
workflowTitle: 'One contract from intent to pull request',
|
|
43
|
+
steps: [
|
|
44
|
+
['Compose or import', 'Build one screen, import a Figma/Penpot bridge, or compose a navigable multi-screen project.'],
|
|
45
|
+
['Bind real components', 'Resolve custom types to production modules, exports, source files, Storybook, and props.'],
|
|
46
|
+
['Hand off once', 'Use a portable package or MCP. The core contract stays identical across agents.'],
|
|
47
|
+
['Return evidence', 'The agent maps every node and reports pass, fail, or needs-review for every acceptance id.'],
|
|
48
|
+
['Gate the PR', 'The AUB GitHub Action rejects drift, missing mappings, failed criteria, and unresolved work.'],
|
|
49
|
+
],
|
|
50
|
+
whyKicker: 'Designed for implementation',
|
|
51
|
+
whyTitle: 'Not another design canvas or one-shot code generator',
|
|
52
|
+
whyLede:
|
|
53
|
+
'Design tools optimize creation. Code generators optimize speed. AUB protects intent across tools, agents, revisions, and reviews with a format that Git and CI can understand.',
|
|
54
|
+
whyCards: [
|
|
55
|
+
['Versioned source of truth', 'JSON Schema, semantic validation, migration, diff, and lock snapshots.'],
|
|
56
|
+
['Production reuse', 'Map semantic types to existing framework components instead of recreating them.'],
|
|
57
|
+
['Agent-neutral execution', 'Codex, Claude Code, Copilot, and generic agents receive the same contract.'],
|
|
58
|
+
['Evidence, not confidence', 'Implementation reports and PR checks make incomplete work visible.'],
|
|
59
|
+
],
|
|
60
|
+
integrationKicker: 'Integration contract',
|
|
61
|
+
integrationTitle: 'Point agents at the component you already ship',
|
|
62
|
+
integrationBody:
|
|
63
|
+
'Custom registry entries can identify a production package, exported symbol, source file, Storybook story, documentation, and the exact Blueprint-to-prop mapping.',
|
|
64
|
+
integrationList: [
|
|
65
|
+
'Prevent bespoke lookalike components',
|
|
66
|
+
'Keep repository-native tokens and behavior',
|
|
67
|
+
'Support multiple framework implementations',
|
|
68
|
+
],
|
|
69
|
+
handoffKicker: 'Connect and verify',
|
|
70
|
+
handoffTitle: 'Files when you need portability. MCP when agents need live access.',
|
|
71
|
+
handoffBody:
|
|
72
|
+
'Export an <code>.aub.zip</code>, or let MCP-capable agents over stdio or HTTP import, write, package, resolve, validate, scaffold, diff, migrate, lock, and report against Blueprints and multi-screen projects. Add the bundled GitHub Action to turn those contracts into a pull-request gate.',
|
|
73
|
+
commandNote: 'Validates contracts and implementation evidence',
|
|
74
|
+
links: ['Agent handoff guide', 'MCP server', 'GitHub CI gate', 'Production mappings', 'Figma/Penpot bridge', 'Blueprint schema'],
|
|
75
|
+
footer: 'UI contracts for coding agents',
|
|
76
|
+
},
|
|
77
|
+
'zh-hant': {
|
|
78
|
+
path: 'zh-hant',
|
|
79
|
+
label: '繁體中文',
|
|
80
|
+
shortLabel: '繁中',
|
|
81
|
+
htmlLang: 'zh-Hant',
|
|
82
|
+
ogLocale: 'zh_TW',
|
|
83
|
+
title: 'AUB — 編碼 Agent 的 UI 實作合約',
|
|
84
|
+
description: '定義可版本化的 UI 實作合約、對應正式元件、交付給任何編碼 Agent,並以驗收證據把關 Pull Request。',
|
|
85
|
+
ogDescription: '從設計意圖到可驗證實作:語意化 Blueprint、正式元件、MCP 與 PR 驗收閘門。',
|
|
86
|
+
navEditor: '編輯器',
|
|
87
|
+
navWorkflow: '流程',
|
|
88
|
+
navIntegrations: '整合',
|
|
89
|
+
navGitHub: 'GitHub',
|
|
90
|
+
languageNav: '語言',
|
|
91
|
+
eyebrow: 'UI 實作合約',
|
|
92
|
+
headline: ['定義產品意圖。', '重用正式元件。', '以證據把關 PR。'],
|
|
93
|
+
lede:
|
|
94
|
+
'AUB 是產品意圖與編碼 Agent 之間的開放合約層。建立語意化 Blueprint、對應正式元件,將同一份唯一真實來源交給 Codex、Claude Code、Copilot 或其他 Agent,再於 CI 逐項驗證 acceptance id。',
|
|
95
|
+
openEditor: '開啟線上編輯器',
|
|
96
|
+
viewGitHub: '前往 GitHub',
|
|
97
|
+
note: 'Apache-2.0 · local-first · agent-neutral · 編輯器不會上傳資料',
|
|
98
|
+
editorAria: '開啟 AUB 編輯器',
|
|
99
|
+
editorAlt: 'AUB 視覺編輯器正在組合響應式畫面',
|
|
100
|
+
capabilitiesAria: '產品能力',
|
|
101
|
+
proof: [
|
|
102
|
+
['62', '種語意元件類型'],
|
|
103
|
+
['18', '個響應式起始範本'],
|
|
104
|
+
['23', '個 Agent MCP 工具'],
|
|
105
|
+
['4', '類驗收條件'],
|
|
106
|
+
],
|
|
107
|
+
workflowKicker: '黃金流程',
|
|
108
|
+
workflowTitle: '從產品意圖到 Pull Request,只用一份合約',
|
|
109
|
+
steps: [
|
|
110
|
+
['組合或匯入', '建立單一畫面、匯入 Figma/Penpot bridge,或組成可導覽的多畫面專案。'],
|
|
111
|
+
['綁定正式元件', '將自訂類型對應到正式 module、export、source、Storybook 與 props。'],
|
|
112
|
+
['一次交付', '使用可攜式交付包或 MCP;不同 Agent 仍共享同一份核心合約。'],
|
|
113
|
+
['回報證據', 'Agent 對應每個節點,並為每個 acceptance id 回報 pass、fail 或 needs-review。'],
|
|
114
|
+
['把關 PR', 'AUB GitHub Action 會拒絕漂移、遺漏 mapping、驗收失敗與未解決事項。'],
|
|
115
|
+
],
|
|
116
|
+
whyKicker: '為實作而設計',
|
|
117
|
+
whyTitle: '不是另一套設計畫布,也不是一次性程式碼生成器',
|
|
118
|
+
whyLede: '設計工具最佳化創作,程式碼生成器最佳化速度;AUB 用 Git 與 CI 能理解的格式,跨工具、Agent、版本與審查保護產品意圖。',
|
|
119
|
+
whyCards: [
|
|
120
|
+
['可版本化的唯一真實來源', 'JSON Schema、語意驗證、migration、diff 與 lock snapshot。'],
|
|
121
|
+
['重用正式元件', '將語意類型對應到既有 framework 元件,而不是重新製作相似品。'],
|
|
122
|
+
['Agent-neutral 執行', 'Codex、Claude Code、Copilot 與通用 Agent 取得相同合約。'],
|
|
123
|
+
['需要證據,不靠信心', 'Implementation report 與 PR check 會讓未完成工作清楚可見。'],
|
|
124
|
+
],
|
|
125
|
+
integrationKicker: '整合合約',
|
|
126
|
+
integrationTitle: '讓 Agent 使用你已經上線的正式元件',
|
|
127
|
+
integrationBody: '自訂 registry 可指定正式 package、export symbol、source file、Storybook、文件,以及精確的 Blueprint-to-prop mapping。',
|
|
128
|
+
integrationList: ['避免建立相似但不同的元件', '保留 repository 原生 token 與行為', '支援多種 framework 實作'],
|
|
129
|
+
handoffKicker: '連接並驗證',
|
|
130
|
+
handoffTitle: '需要可攜性時用檔案;Agent 需要即時存取時用 MCP。',
|
|
131
|
+
handoffBody:
|
|
132
|
+
'匯出 <code>.aub.zip</code>,或讓支援 MCP 的 Agent 透過 stdio/HTTP 匯入、寫入、打包、解析、驗證、補全、diff、migrate、lock 與回報 Blueprint 和多畫面專案。再加入內建 GitHub Action,將合約變成 Pull Request 驗收閘門。',
|
|
133
|
+
commandNote: '驗證合約與實作證據',
|
|
134
|
+
links: ['Agent 交付指南', 'MCP server', 'GitHub CI 閘門', '正式元件對應', 'Figma/Penpot bridge', 'Blueprint schema'],
|
|
135
|
+
footer: '編碼 Agent 的 UI 實作合約',
|
|
136
|
+
},
|
|
137
|
+
'zh-hans': {
|
|
138
|
+
path: 'zh-hans',
|
|
139
|
+
label: '简体中文',
|
|
140
|
+
shortLabel: '简中',
|
|
141
|
+
htmlLang: 'zh-Hans',
|
|
142
|
+
ogLocale: 'zh_CN',
|
|
143
|
+
title: 'AUB — 编码 Agent 的 UI 实现契约',
|
|
144
|
+
description: '定义可版本化的 UI 实现契约、映射生产组件、交付给任意编码 Agent,并用验收证据管控 Pull Request。',
|
|
145
|
+
ogDescription: '从设计意图到可验证实现:语义化 Blueprint、生产组件、MCP 与 PR 验收门禁。',
|
|
146
|
+
navEditor: '编辑器',
|
|
147
|
+
navWorkflow: '流程',
|
|
148
|
+
navIntegrations: '集成',
|
|
149
|
+
navGitHub: 'GitHub',
|
|
150
|
+
languageNav: '语言',
|
|
151
|
+
eyebrow: 'UI 实现契约',
|
|
152
|
+
headline: ['定义产品意图。', '复用生产组件。', '用证据管控 PR。'],
|
|
153
|
+
lede:
|
|
154
|
+
'AUB 是产品意图与编码 Agent 之间的开放契约层。创建语义化 Blueprint、映射生产组件,把同一份唯一事实来源交给 Codex、Claude Code、Copilot 或其他 Agent,再在 CI 中逐项验证 acceptance id。',
|
|
155
|
+
openEditor: '打开在线编辑器',
|
|
156
|
+
viewGitHub: '前往 GitHub',
|
|
157
|
+
note: 'Apache-2.0 · local-first · agent-neutral · 编辑器不会上传数据',
|
|
158
|
+
editorAria: '打开 AUB 编辑器',
|
|
159
|
+
editorAlt: 'AUB 可视化编辑器正在编排响应式页面',
|
|
160
|
+
capabilitiesAria: '产品能力',
|
|
161
|
+
proof: [
|
|
162
|
+
['62', '种语义组件类型'],
|
|
163
|
+
['18', '个响应式起始模板'],
|
|
164
|
+
['23', '个 Agent MCP 工具'],
|
|
165
|
+
['4', '类验收条件'],
|
|
166
|
+
],
|
|
167
|
+
workflowKicker: '黄金路径',
|
|
168
|
+
workflowTitle: '从产品意图到 Pull Request,只使用一份契约',
|
|
169
|
+
steps: [
|
|
170
|
+
['编排或导入', '创建单个页面、导入 Figma/Penpot bridge,或组成可导航的多页面项目。'],
|
|
171
|
+
['绑定生产组件', '把自定义类型映射到生产 module、export、source、Storybook 与 props。'],
|
|
172
|
+
['一次交付', '使用便携交付包或 MCP;不同 Agent 始终共享同一份核心契约。'],
|
|
173
|
+
['返回证据', 'Agent 映射每个节点,并为每个 acceptance id 报告 pass、fail 或 needs-review。'],
|
|
174
|
+
['管控 PR', 'AUB GitHub Action 会拒绝漂移、缺失 mapping、验收失败和未解决事项。'],
|
|
175
|
+
],
|
|
176
|
+
whyKicker: '为实现而设计',
|
|
177
|
+
whyTitle: '不是另一套设计画布,也不是一次性代码生成器',
|
|
178
|
+
whyLede: '设计工具优化创作,代码生成器优化速度;AUB 使用 Git 与 CI 能理解的格式,跨工具、Agent、版本和评审保护产品意图。',
|
|
179
|
+
whyCards: [
|
|
180
|
+
['可版本化的唯一事实来源', 'JSON Schema、语义验证、migration、diff 与 lock snapshot。'],
|
|
181
|
+
['复用生产组件', '把语义类型映射到现有 framework 组件,而不是重新创建相似组件。'],
|
|
182
|
+
['Agent-neutral 执行', 'Codex、Claude Code、Copilot 与通用 Agent 获得相同契约。'],
|
|
183
|
+
['需要证据,而非信心', 'Implementation report 与 PR check 会让未完成工作清晰可见。'],
|
|
184
|
+
],
|
|
185
|
+
integrationKicker: '集成契约',
|
|
186
|
+
integrationTitle: '让 Agent 使用你已经上线的生产组件',
|
|
187
|
+
integrationBody: '自定义 registry 可以指定生产 package、export symbol、source file、Storybook、文档,以及精确的 Blueprint-to-prop mapping。',
|
|
188
|
+
integrationList: ['避免创建相似但不一致的组件', '保留 repository 原生 token 与行为', '支持多种 framework 实现'],
|
|
189
|
+
handoffKicker: '连接并验证',
|
|
190
|
+
handoffTitle: '需要便携性时使用文件;Agent 需要实时访问时使用 MCP。',
|
|
191
|
+
handoffBody:
|
|
192
|
+
'导出 <code>.aub.zip</code>,或让支持 MCP 的 Agent 通过 stdio/HTTP 导入、写入、打包、解析、验证、补全、diff、migrate、lock 并报告 Blueprint 和多页面项目。再加入内置 GitHub Action,把契约转为 Pull Request 验收门禁。',
|
|
193
|
+
commandNote: '验证契约与实现证据',
|
|
194
|
+
links: ['Agent 交付指南', 'MCP server', 'GitHub CI 门禁', '生产组件映射', 'Figma/Penpot bridge', 'Blueprint schema'],
|
|
195
|
+
footer: '编码 Agent 的 UI 实现契约',
|
|
196
|
+
},
|
|
197
|
+
ja: {
|
|
198
|
+
path: 'ja',
|
|
199
|
+
label: '日本語',
|
|
200
|
+
shortLabel: '日本語',
|
|
201
|
+
htmlLang: 'ja',
|
|
202
|
+
ogLocale: 'ja_JP',
|
|
203
|
+
title: 'AUB — コーディング Agent のための UI 実装契約',
|
|
204
|
+
description: 'バージョン管理可能な UI 実装契約を定義し、本番コンポーネントへ紐付け、任意のコーディング Agent に渡して、受け入れ証拠で Pull Request を検証します。',
|
|
205
|
+
ogDescription: 'デザイン意図から検証可能な実装へ。セマンティック Blueprint、本番コンポーネント、MCP、PR 受け入れゲート。',
|
|
206
|
+
navEditor: 'エディター',
|
|
207
|
+
navWorkflow: 'ワークフロー',
|
|
208
|
+
navIntegrations: '連携',
|
|
209
|
+
navGitHub: 'GitHub',
|
|
210
|
+
languageNav: '言語',
|
|
211
|
+
eyebrow: 'UI 実装契約',
|
|
212
|
+
headline: ['意図を定義する。', '本番コンポーネントを再利用する。', '証拠で PR を検証する。'],
|
|
213
|
+
lede:
|
|
214
|
+
'AUB は、プロダクト意図とコーディング Agent をつなぐオープンな契約レイヤーです。セマンティック Blueprint を作成し、本番コンポーネントに紐付け、同じ信頼できる情報源を Codex、Claude Code、Copilot などへ渡し、CI で各 acceptance id を検証します。',
|
|
215
|
+
openEditor: 'オンラインエディターを開く',
|
|
216
|
+
viewGitHub: 'GitHub を見る',
|
|
217
|
+
note: 'Apache-2.0 · local-first · agent-neutral · エディターはデータを送信しません',
|
|
218
|
+
editorAria: 'AUB エディターを開く',
|
|
219
|
+
editorAlt: 'レスポンシブ画面を構成する AUB ビジュアルエディター',
|
|
220
|
+
capabilitiesAria: '製品機能',
|
|
221
|
+
proof: [
|
|
222
|
+
['62', '種類のセマンティックコンポーネント'],
|
|
223
|
+
['18', '種類のレスポンシブテンプレート'],
|
|
224
|
+
['23', '個の Agent 向け MCP ツール'],
|
|
225
|
+
['4', '種類の受け入れカテゴリ'],
|
|
226
|
+
],
|
|
227
|
+
workflowKicker: 'ゴールデンパス',
|
|
228
|
+
workflowTitle: '意図から Pull Request まで、一つの契約でつなぐ',
|
|
229
|
+
steps: [
|
|
230
|
+
['作成またはインポート', '単一画面、Figma/Penpot bridge、または遷移可能な複数画面プロジェクトを作成します。'],
|
|
231
|
+
['本番コンポーネントを紐付け', 'カスタム型を本番 module、export、source、Storybook、props に解決します。'],
|
|
232
|
+
['一度だけ引き渡す', 'ポータブルパッケージまたは MCP を使用し、どの Agent にも同じ契約を渡します。'],
|
|
233
|
+
['証拠を返す', 'Agent は全ノードを対応付け、各 acceptance id を pass、fail、needs-review で報告します。'],
|
|
234
|
+
['PR をゲートする', 'AUB GitHub Action が差異、mapping 漏れ、受け入れ失敗、未解決項目を拒否します。'],
|
|
235
|
+
],
|
|
236
|
+
whyKicker: '実装のための設計',
|
|
237
|
+
whyTitle: '新しいデザインキャンバスでも、一回限りのコード生成器でもありません',
|
|
238
|
+
whyLede: 'デザインツールは制作を、コード生成器は速度を最適化します。AUB は Git と CI が理解できる形式で、ツール、Agent、リビジョン、レビューをまたいで意図を守ります。',
|
|
239
|
+
whyCards: [
|
|
240
|
+
['バージョン管理できる信頼できる情報源', 'JSON Schema、セマンティック検証、migration、diff、lock snapshot。'],
|
|
241
|
+
['本番資産の再利用', 'セマンティック型を既存 framework コンポーネントへ紐付けます。'],
|
|
242
|
+
['Agent-neutral な実行', 'Codex、Claude Code、Copilot、汎用 Agent が同じ契約を受け取ります。'],
|
|
243
|
+
['信頼ではなく証拠', 'Implementation report と PR check が未完了作業を可視化します。'],
|
|
244
|
+
],
|
|
245
|
+
integrationKicker: '連携契約',
|
|
246
|
+
integrationTitle: 'すでに提供中の本番コンポーネントを Agent に使わせる',
|
|
247
|
+
integrationBody: 'カスタム registry で、本番 package、export symbol、source file、Storybook、ドキュメント、正確な Blueprint-to-prop mapping を指定できます。',
|
|
248
|
+
integrationList: ['似ているだけの独自コンポーネントを防ぐ', 'repository 固有の token と動作を維持する', '複数 framework の実装を支援する'],
|
|
249
|
+
handoffKicker: '接続して検証',
|
|
250
|
+
handoffTitle: '持ち運びにはファイルを、Agent のライブアクセスには MCP を。',
|
|
251
|
+
handoffBody:
|
|
252
|
+
'<code>.aub.zip</code> を書き出すか、MCP 対応 Agent に stdio/HTTP 経由で Blueprint と複数画面プロジェクトの import、write、package、resolve、validate、scaffold、diff、migrate、lock、report を実行させます。付属の GitHub Action で契約を Pull Request ゲートにできます。',
|
|
253
|
+
commandNote: '契約と実装証拠を検証',
|
|
254
|
+
links: ['Agent 引き渡しガイド', 'MCP server', 'GitHub CI ゲート', '本番 mapping', 'Figma/Penpot bridge', 'Blueprint schema'],
|
|
255
|
+
footer: 'コーディング Agent のための UI 実装契約',
|
|
256
|
+
},
|
|
257
|
+
ko: {
|
|
258
|
+
path: 'ko',
|
|
259
|
+
label: '한국어',
|
|
260
|
+
shortLabel: '한국어',
|
|
261
|
+
htmlLang: 'ko',
|
|
262
|
+
ogLocale: 'ko_KR',
|
|
263
|
+
title: 'AUB — 코딩 Agent를 위한 UI 구현 계약',
|
|
264
|
+
description: '버전 관리 가능한 UI 구현 계약을 정의하고, 프로덕션 컴포넌트에 연결해 어떤 코딩 Agent에도 전달한 뒤 인수 증거로 Pull Request를 검증합니다.',
|
|
265
|
+
ogDescription: '디자인 의도에서 검증 가능한 구현까지: 시맨틱 Blueprint, 프로덕션 컴포넌트, MCP, PR 인수 게이트.',
|
|
266
|
+
navEditor: '에디터',
|
|
267
|
+
navWorkflow: '워크플로',
|
|
268
|
+
navIntegrations: '통합',
|
|
269
|
+
navGitHub: 'GitHub',
|
|
270
|
+
languageNav: '언어',
|
|
271
|
+
eyebrow: 'UI 구현 계약',
|
|
272
|
+
headline: ['의도를 정의합니다.', '프로덕션 컴포넌트를 재사용합니다.', '증거로 PR을 검증합니다.'],
|
|
273
|
+
lede:
|
|
274
|
+
'AUB는 제품 의도와 코딩 Agent 사이의 개방형 계약 계층입니다. 시맨틱 Blueprint를 만들고 프로덕션 컴포넌트에 연결한 뒤, 동일한 단일 기준을 Codex, Claude Code, Copilot 또는 다른 Agent에 전달하고 CI에서 모든 acceptance id를 검증합니다.',
|
|
275
|
+
openEditor: '온라인 에디터 열기',
|
|
276
|
+
viewGitHub: 'GitHub 보기',
|
|
277
|
+
note: 'Apache-2.0 · local-first · agent-neutral · 에디터는 데이터를 업로드하지 않습니다',
|
|
278
|
+
editorAria: 'AUB 에디터 열기',
|
|
279
|
+
editorAlt: '반응형 화면을 구성하는 AUB 비주얼 에디터',
|
|
280
|
+
capabilitiesAria: '제품 기능',
|
|
281
|
+
proof: [
|
|
282
|
+
['62', '가지 시맨틱 컴포넌트 유형'],
|
|
283
|
+
['18', '가지 반응형 시작 템플릿'],
|
|
284
|
+
['23', '개의 Agent용 MCP 도구'],
|
|
285
|
+
['4', '가지 인수 카테고리'],
|
|
286
|
+
],
|
|
287
|
+
workflowKicker: '골든 패스',
|
|
288
|
+
workflowTitle: '제품 의도부터 Pull Request까지 하나의 계약으로',
|
|
289
|
+
steps: [
|
|
290
|
+
['구성 또는 가져오기', '단일 화면, Figma/Penpot bridge 또는 탐색 가능한 다중 화면 프로젝트를 만듭니다.'],
|
|
291
|
+
['프로덕션 컴포넌트 연결', '사용자 정의 유형을 프로덕션 module, export, source, Storybook, props에 연결합니다.'],
|
|
292
|
+
['한 번만 전달', '휴대 가능한 패키지나 MCP를 사용하며 모든 Agent가 동일한 핵심 계약을 공유합니다.'],
|
|
293
|
+
['증거 반환', 'Agent가 모든 노드를 매핑하고 각 acceptance id를 pass, fail, needs-review로 보고합니다.'],
|
|
294
|
+
['PR 게이트', 'AUB GitHub Action이 드리프트, 누락된 mapping, 인수 실패와 미해결 작업을 거부합니다.'],
|
|
295
|
+
],
|
|
296
|
+
whyKicker: '구현을 위한 설계',
|
|
297
|
+
whyTitle: '또 하나의 디자인 캔버스나 일회성 코드 생성기가 아닙니다',
|
|
298
|
+
whyLede: '디자인 도구는 제작을, 코드 생성기는 속도를 최적화합니다. AUB는 Git과 CI가 이해하는 형식으로 도구, Agent, 리비전과 리뷰 전반에서 의도를 보호합니다.',
|
|
299
|
+
whyCards: [
|
|
300
|
+
['버전 관리 가능한 단일 기준', 'JSON Schema, 시맨틱 검증, migration, diff, lock snapshot.'],
|
|
301
|
+
['프로덕션 자산 재사용', '시맨틱 유형을 기존 framework 컴포넌트에 연결해 재구현을 방지합니다.'],
|
|
302
|
+
['Agent-neutral 실행', 'Codex, Claude Code, Copilot과 범용 Agent가 동일한 계약을 받습니다.'],
|
|
303
|
+
['신뢰가 아닌 증거', 'Implementation report와 PR check가 미완료 작업을 드러냅니다.'],
|
|
304
|
+
],
|
|
305
|
+
integrationKicker: '통합 계약',
|
|
306
|
+
integrationTitle: '이미 배포 중인 프로덕션 컴포넌트를 Agent가 사용하게 합니다',
|
|
307
|
+
integrationBody: '사용자 정의 registry에 프로덕션 package, export symbol, source file, Storybook, 문서와 정확한 Blueprint-to-prop mapping을 지정할 수 있습니다.',
|
|
308
|
+
integrationList: ['비슷하게만 생긴 별도 컴포넌트 방지', 'repository 고유 token과 동작 유지', '여러 framework 구현 지원'],
|
|
309
|
+
handoffKicker: '연결 및 검증',
|
|
310
|
+
handoffTitle: '이식성이 필요하면 파일을, Agent의 실시간 접근에는 MCP를 사용합니다.',
|
|
311
|
+
handoffBody:
|
|
312
|
+
'<code>.aub.zip</code>을 내보내거나 MCP 지원 Agent가 stdio/HTTP를 통해 Blueprint와 다중 화면 프로젝트를 import, write, package, resolve, validate, scaffold, diff, migrate, lock, report하도록 합니다. 번들 GitHub Action을 추가하면 이 계약이 Pull Request 게이트가 됩니다.',
|
|
313
|
+
commandNote: '계약과 구현 증거 검증',
|
|
314
|
+
links: ['Agent 전달 가이드', 'MCP server', 'GitHub CI 게이트', '프로덕션 mapping', 'Figma/Penpot bridge', 'Blueprint schema'],
|
|
315
|
+
footer: '코딩 Agent를 위한 UI 구현 계약',
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
const linkTargets = [
|
|
320
|
+
'docs/agent-handoff.md',
|
|
321
|
+
'apps/mcp-server/README.md',
|
|
322
|
+
'docs/github-ci.md',
|
|
323
|
+
'docs/custom-components.md',
|
|
324
|
+
'docs/design-tool-bridge.md',
|
|
325
|
+
'schema/ui-blueprint.schema.json',
|
|
326
|
+
];
|
|
327
|
+
|
|
328
|
+
function localeHref(current, target) {
|
|
329
|
+
const base = current.path ? '../' : './';
|
|
330
|
+
return target.path ? `${base}${target.path}/` : base;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function renderLanguageNav(id, locale) {
|
|
334
|
+
return Object.entries(locales)
|
|
335
|
+
.map(([targetId, target]) => {
|
|
336
|
+
const current = targetId === id ? ' aria-current="page"' : '';
|
|
337
|
+
return `<a href="${localeHref(locale, target)}" hreflang="${target.htmlLang}" lang="${target.htmlLang}"${current}>${target.shortLabel}</a>`;
|
|
338
|
+
})
|
|
339
|
+
.join('\n ');
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function renderPage(id, locale) {
|
|
343
|
+
const base = locale.path ? '../' : './';
|
|
344
|
+
const pageUrl = locale.path
|
|
345
|
+
? `https://henrylau1103.github.io/AUB/${locale.path}/`
|
|
346
|
+
: 'https://henrylau1103.github.io/AUB/';
|
|
347
|
+
const alternateLinks = Object.values(locales)
|
|
348
|
+
.map((target) => {
|
|
349
|
+
const href = target.path
|
|
350
|
+
? `https://henrylau1103.github.io/AUB/${target.path}/`
|
|
351
|
+
: 'https://henrylau1103.github.io/AUB/';
|
|
352
|
+
return ` <link rel="alternate" hreflang="${target.htmlLang}" href="${href}" />`;
|
|
353
|
+
})
|
|
354
|
+
.join('\n');
|
|
355
|
+
const ogAlternates = Object.values(locales)
|
|
356
|
+
.filter((target) => target.ogLocale !== locale.ogLocale)
|
|
357
|
+
.map((target) => ` <meta property="og:locale:alternate" content="${target.ogLocale}" />`)
|
|
358
|
+
.join('\n');
|
|
359
|
+
const proof = locale.proof
|
|
360
|
+
.map(([value, label]) => ` <div><strong>${value}</strong><span>${label}</span></div>`)
|
|
361
|
+
.join('\n');
|
|
362
|
+
const steps = locale.steps
|
|
363
|
+
.map(
|
|
364
|
+
([title, body], index) => ` <li>
|
|
365
|
+
<span class="step-num">${index + 1}</span>
|
|
366
|
+
<h3>${title}</h3>
|
|
367
|
+
<p>${body}</p>
|
|
368
|
+
</li>`
|
|
369
|
+
)
|
|
370
|
+
.join('\n');
|
|
371
|
+
const cards = locale.whyCards
|
|
372
|
+
.map(
|
|
373
|
+
([title, body]) => ` <div class="card">
|
|
374
|
+
<h3>${title}</h3>
|
|
375
|
+
<p>${body}</p>
|
|
376
|
+
</div>`
|
|
377
|
+
)
|
|
378
|
+
.join('\n');
|
|
379
|
+
const featureList = locale.integrationList.map((item) => ` <li>${item}</li>`).join('\n');
|
|
380
|
+
const links = locale.links
|
|
381
|
+
.map(
|
|
382
|
+
(label, index) =>
|
|
383
|
+
` <a href="https://github.com/HenryLau1103/AUB/blob/main/${linkTargets[index]}">${label}</a>`
|
|
384
|
+
)
|
|
385
|
+
.join('\n');
|
|
386
|
+
|
|
387
|
+
return `<!doctype html>
|
|
388
|
+
<html lang="${locale.htmlLang}">
|
|
389
|
+
<head>
|
|
390
|
+
<meta charset="UTF-8" />
|
|
391
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
392
|
+
<title>${locale.title}</title>
|
|
393
|
+
<meta name="description" content="${locale.description}" />
|
|
394
|
+
<link rel="canonical" href="${pageUrl}" />
|
|
395
|
+
${alternateLinks}
|
|
396
|
+
<link rel="alternate" hreflang="x-default" href="https://henrylau1103.github.io/AUB/" />
|
|
397
|
+
<meta property="og:title" content="${locale.title}" />
|
|
398
|
+
<meta property="og:description" content="${locale.ogDescription}" />
|
|
399
|
+
<meta property="og:type" content="website" />
|
|
400
|
+
<meta property="og:url" content="${pageUrl}" />
|
|
401
|
+
<meta property="og:locale" content="${locale.ogLocale}" />
|
|
402
|
+
${ogAlternates}
|
|
403
|
+
<meta property="og:image" content="${base}assets/aub-editor-en.jpg" />
|
|
404
|
+
<meta name="theme-color" content="#0B1220" />
|
|
405
|
+
<link rel="icon" href="${base}assets/brand/favicon.svg" type="image/svg+xml" />
|
|
406
|
+
<link rel="icon" href="${base}assets/brand/favicon-32x32.png" sizes="32x32" type="image/png" />
|
|
407
|
+
<link rel="mask-icon" href="${base}assets/brand/safari-pinned-tab.svg" color="#0B67F0" />
|
|
408
|
+
<link rel="apple-touch-icon" href="${base}assets/brand/apple-touch-icon.png" />
|
|
409
|
+
<link rel="manifest" href="${base}manifest.webmanifest" />
|
|
410
|
+
<meta name="msapplication-config" content="${base}browserconfig.xml" />
|
|
411
|
+
<link rel="stylesheet" href="${base}styles.css" />
|
|
412
|
+
</head>
|
|
413
|
+
<body>
|
|
414
|
+
<header class="site-header">
|
|
415
|
+
<a class="brand" href="${base}">
|
|
416
|
+
<img class="brand-mark" src="${base}assets/brand/aub-logo-mark.svg" alt="" />
|
|
417
|
+
<span class="brand-name">AUB</span>
|
|
418
|
+
</a>
|
|
419
|
+
<div class="header-actions">
|
|
420
|
+
<nav class="site-nav">
|
|
421
|
+
<a href="${base}editor/">${locale.navEditor}</a>
|
|
422
|
+
<a href="#workflow">${locale.navWorkflow}</a>
|
|
423
|
+
<a href="#integrations">${locale.navIntegrations}</a>
|
|
424
|
+
<a href="https://github.com/HenryLau1103/AUB">${locale.navGitHub}</a>
|
|
425
|
+
</nav>
|
|
426
|
+
<nav class="language-nav" aria-label="${locale.languageNav}">
|
|
427
|
+
${renderLanguageNav(id, locale)}
|
|
428
|
+
</nav>
|
|
429
|
+
</div>
|
|
430
|
+
</header>
|
|
431
|
+
|
|
432
|
+
<main>
|
|
433
|
+
<section class="hero">
|
|
434
|
+
<div class="hero-copy">
|
|
435
|
+
<p class="eyebrow">${locale.eyebrow}</p>
|
|
436
|
+
<h1>${locale.headline.join('<br />')}</h1>
|
|
437
|
+
<p class="lede">${locale.lede}</p>
|
|
438
|
+
<div class="cta-row">
|
|
439
|
+
<a class="btn btn-primary" href="${base}editor/">${locale.openEditor}</a>
|
|
440
|
+
<a class="btn btn-ghost" href="https://github.com/HenryLau1103/AUB">${locale.viewGitHub}</a>
|
|
441
|
+
</div>
|
|
442
|
+
<p class="note">${locale.note}</p>
|
|
443
|
+
</div>
|
|
444
|
+
<a class="hero-shot" href="${base}editor/" aria-label="${locale.editorAria}">
|
|
445
|
+
<img src="${base}assets/aub-editor-en.jpg" alt="${locale.editorAlt}" loading="lazy" />
|
|
446
|
+
</a>
|
|
447
|
+
</section>
|
|
448
|
+
|
|
449
|
+
<section class="proof" aria-label="${locale.capabilitiesAria}">
|
|
450
|
+
${proof}
|
|
451
|
+
</section>
|
|
452
|
+
|
|
453
|
+
<section class="steps" id="workflow">
|
|
454
|
+
<p class="section-kicker">${locale.workflowKicker}</p>
|
|
455
|
+
<h2>${locale.workflowTitle}</h2>
|
|
456
|
+
<ol class="step-grid step-grid-five">
|
|
457
|
+
${steps}
|
|
458
|
+
</ol>
|
|
459
|
+
</section>
|
|
460
|
+
|
|
461
|
+
<section class="why">
|
|
462
|
+
<p class="section-kicker">${locale.whyKicker}</p>
|
|
463
|
+
<h2>${locale.whyTitle}</h2>
|
|
464
|
+
<p class="why-lede">${locale.whyLede}</p>
|
|
465
|
+
<div class="why-grid">
|
|
466
|
+
${cards}
|
|
467
|
+
</div>
|
|
468
|
+
</section>
|
|
469
|
+
|
|
470
|
+
<section class="integrations" id="integrations">
|
|
471
|
+
<p class="section-kicker">${locale.integrationKicker}</p>
|
|
472
|
+
<h2>${locale.integrationTitle}</h2>
|
|
473
|
+
<div class="integration-grid">
|
|
474
|
+
<div>
|
|
475
|
+
<p>${locale.integrationBody}</p>
|
|
476
|
+
<ul class="feature-list">
|
|
477
|
+
${featureList}
|
|
478
|
+
</ul>
|
|
479
|
+
</div>
|
|
480
|
+
<pre><code>{
|
|
481
|
+
"name": "acme:insight_card",
|
|
482
|
+
"isContainer": true,
|
|
483
|
+
"implementations": [{
|
|
484
|
+
"id": "react",
|
|
485
|
+
"framework": "react",
|
|
486
|
+
"module": "@acme/analytics-ui",
|
|
487
|
+
"export": "InsightCard",
|
|
488
|
+
"props": {
|
|
489
|
+
"title": { "from": "content.title" }
|
|
490
|
+
}
|
|
491
|
+
}]
|
|
492
|
+
}</code></pre>
|
|
493
|
+
</div>
|
|
494
|
+
</section>
|
|
495
|
+
|
|
496
|
+
<section class="handoff">
|
|
497
|
+
<p class="section-kicker">${locale.handoffKicker}</p>
|
|
498
|
+
<h2>${locale.handoffTitle}</h2>
|
|
499
|
+
<p>${locale.handoffBody}</p>
|
|
500
|
+
<div class="command-card">
|
|
501
|
+
<code>uses: HenryLau1103/AUB@main</code>
|
|
502
|
+
<span>${locale.commandNote}</span>
|
|
503
|
+
</div>
|
|
504
|
+
<div class="link-row">
|
|
505
|
+
${links}
|
|
506
|
+
</div>
|
|
507
|
+
</section>
|
|
508
|
+
</main>
|
|
509
|
+
|
|
510
|
+
<footer class="site-footer">
|
|
511
|
+
<p>
|
|
512
|
+
AUB · ${locale.footer} ·
|
|
513
|
+
<a href="https://github.com/HenryLau1103/AUB">github.com/HenryLau1103/AUB</a> ·
|
|
514
|
+
Apache-2.0
|
|
515
|
+
</p>
|
|
516
|
+
</footer>
|
|
517
|
+
</body>
|
|
518
|
+
</html>
|
|
519
|
+
`;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
const stale = [];
|
|
523
|
+
for (const [id, locale] of Object.entries(locales)) {
|
|
524
|
+
const output = resolve(ROOT, 'site', locale.path, 'index.html');
|
|
525
|
+
const expected = renderPage(id, locale);
|
|
526
|
+
if (CHECK) {
|
|
527
|
+
let current = '';
|
|
528
|
+
try {
|
|
529
|
+
current = await readFile(output, 'utf8');
|
|
530
|
+
} catch {
|
|
531
|
+
// Report missing output below.
|
|
532
|
+
}
|
|
533
|
+
if (current !== expected) stale.push(output.replace(`${ROOT}/`, ''));
|
|
534
|
+
} else {
|
|
535
|
+
await mkdir(resolve(output, '..'), { recursive: true });
|
|
536
|
+
await writeFile(output, expected, 'utf8');
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
if (CHECK && stale.length > 0) {
|
|
541
|
+
console.error(`Localized site output is stale:\n${stale.map((file) => `- ${file}`).join('\n')}`);
|
|
542
|
+
process.exit(1);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
console.log(CHECK ? 'Localized site output is up to date.' : `Generated ${Object.keys(locales).length} localized site pages.`);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface HandoffArchiveInput {
|
|
2
|
+
blueprint: Record<string, any>;
|
|
3
|
+
markdown: string;
|
|
4
|
+
genericPrompt: string;
|
|
5
|
+
codexPrompt: string;
|
|
6
|
+
agentGuide: string;
|
|
7
|
+
agentGuideZhHant: string;
|
|
8
|
+
reportTemplate: Record<string, any>;
|
|
9
|
+
reportSchema: Record<string, unknown>;
|
|
10
|
+
viewportImages: Record<string, string>;
|
|
11
|
+
extensionRegistry?: string;
|
|
12
|
+
generatedAt?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface HandoffArchiveResult {
|
|
16
|
+
bytes: Uint8Array;
|
|
17
|
+
manifest: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function createHandoffArchive(input: HandoffArchiveInput): Promise<HandoffArchiveResult>;
|