Skip to content

Commit e318ac2

Browse files
committed
docs: distill design system entry split
1 parent 06f98c0 commit e318ac2

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

.agents/skills/gettokens-domain-engineering/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ This skill unifies the technical rules for building, styling, and debugging GetT
286286
- **Professional Tooling Bias**: When a mature, domain-standard frontend tool directly solves a design-system, component-workbench, accessibility, visual-regression, or interaction-preview problem, recommend it explicitly even if it is outside the user's stated vocabulary. Do not default to self-building a weaker internal version just because it avoids a new tool.
287287
- **Storybook Baseline**: For GetTokens design-system work, Storybook is the default primary component workbench. Use `@storybook/react-vite` for the current React + Vite stack. Keep any in-app `design-system` route as a discovery/entry page unless a later requirement explicitly needs production-embedded component previews.
288288
- **Storybook Scope**:
289+
- Treat `http://127.0.0.1:6006/` as the public foundation Storybook, not the full business design-system surface. Its `frontend/.storybook/main.ts` story globs should stay limited to tokens, primitives, and `frontend/src/components/ui`; do not reintroduce `../src/**/*.stories` or `features/**` there.
290+
- Business design-system work belongs to the Vite app entry `http://127.0.0.1:5173/#frame=design-system`. Keep `storyCatalog.ts` / `componentManifest.ts` able to list `feature-components` for 5173 even when those stories are excluded from 6006.
291+
- When verifying this boundary, check both sides: `6006/index.json` must not contain `Design System/业务组件`, `feature-components`, or `frontend/src/features`; the 5173 design-system catalog must still retain `feature-components`.
289292
- Stories must render real components, not copied static HTML.
290293
- Stories must use mock data and must not call Wails bindings or sidecar APIs.
291294
- Load `frontend/src/style.css` and the relevant providers in Storybook preview so CSS variables, theme behavior, text scale, and localization are visible.

docs-linhay/dev/20260528-storybook-public-catalog-scope.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,16 @@
2424
2. Storybook 配置不能包含 `features/**`
2525
3. 5173 应用内 catalog 必须保留 `feature-components`,用于承接业务设计系统任务。
2626
4. 6006 的 Storybook 配置和构建产物不能包含 `Design System/业务组件``feature-components``frontend/src/features/`
27+
28+
## 会话沉淀
29+
本轮沉淀到项目级 skill 的稳定模式是“设计系统双入口分工”:
30+
31+
1. `6006` 是公开基础 Storybook,只服务 tokens、primitives、`components/ui`
32+
2. `5173/#frame=design-system` 是应用开发态设计系统入口,继续承接业务组件、inspect 模式和 feature-owned catalog。
33+
3. 后续处理业务组件设计系统时,不要为了让 6006 变干净而删除 `feature-components``componentManifest.ts` 记录或 feature-owned story 文件。
34+
4. 回归验证必须同时检查 6006 的排除结果和 5173 的保留结果,避免“从一个入口移除”误变成“从设计系统移除”。
35+
36+
不纳入长期规则的内容:
37+
38+
1. 本轮截图文件名、具体 story 数量 `36` 只是本次验收事实,不作为长期固定值。
39+
2. 本轮在脏工作区中用定向暂存提交,是通用 Git 卫生动作,不额外提升为设计系统规则。

docs-linhay/memory/2026-05-28.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,8 @@
110110
- 技术边界已记录到 `docs-linhay/dev/20260528-storybook-public-catalog-scope.md`:公开 6006 目录不得回退到 `../src/**/*.stories`,也不得包含 `features/**`;业务 story 文件和 `componentManifest.ts` 的历史收编记录暂不删除。
111111
- 验证通过:`node --test frontend/src/features/design-system/storyCatalog.test.mjs``npm --prefix frontend run typecheck``npm --prefix frontend run build-storybook``npm --prefix frontend run build`;live `http://127.0.0.1:6006/index.json` 为 36 条 story,未出现 `Design System/业务组件``feature-components``frontend/src/features`
112112
- 验收截图已归档:`docs-linhay/spaces/20260528-storybook-remove-business-components/screenshots/20260528/design-system/20260528-storybook-no-business-components-after-v01.png`
113+
114+
## Storybook 公开目录会话沉淀
115+
- 本轮整理将“设计系统双入口分工”沉淀到 `.agents/skills/gettokens-domain-engineering/SKILL.md`:6006 是公开基础 Storybook,5173 `#frame=design-system` 承接业务设计系统、inspect 和 feature-owned catalog。
116+
- 已更新 `docs-linhay/dev/20260528-storybook-public-catalog-scope.md` 的会话沉淀段,明确后续不能为了清理 6006 而删除 `feature-components``componentManifest.ts` 记录或业务 story 文件。
117+
- 本轮不升级 `AGENTS.md`:该规则属于 GetTokens 设计系统领域边界,不是 repo-wide 文档治理或通用流程规则。

0 commit comments

Comments
 (0)