@bovinphang/frontend-craft 2.5.0 → 2.6.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.
Files changed (77) hide show
  1. package/.claude-plugin/marketplace.json +7 -3
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +39 -0
  4. package/CHANGELOG.zh-CN.md +40 -0
  5. package/CONTRIBUTING.md +15 -10
  6. package/CONTRIBUTING.zh-CN.md +15 -10
  7. package/README.md +61 -39
  8. package/README.openclaw.md +8 -8
  9. package/README.openclaw.zh-CN.md +8 -8
  10. package/README.zh-CN.md +61 -39
  11. package/commands/fec-doc-sync.md +7 -6
  12. package/dist/bin/frontend-craft.js +30 -27
  13. package/docs/example-prompts.md +4 -3
  14. package/docs/ja-JP/README.md +61 -39
  15. package/docs/ko-KR/README.md +61 -39
  16. package/docs/runtimes/antigravity.md +1 -1
  17. package/docs/runtimes/augment.md +1 -1
  18. package/docs/runtimes/claude.md +16 -10
  19. package/docs/runtimes/claude.zh-CN.md +16 -10
  20. package/docs/runtimes/cline.md +1 -1
  21. package/docs/runtimes/codebuddy.md +1 -1
  22. package/docs/runtimes/codex.md +1 -1
  23. package/docs/runtimes/copilot.md +1 -1
  24. package/docs/runtimes/cursor.md +1 -1
  25. package/docs/runtimes/gemini.md +1 -1
  26. package/docs/runtimes/kilo.md +1 -1
  27. package/docs/runtimes/openclaw.md +1 -1
  28. package/docs/runtimes/opencode.md +1 -1
  29. package/docs/runtimes/qoder.md +1 -1
  30. package/docs/runtimes/trae.md +1 -1
  31. package/docs/runtimes/windsurf.md +1 -1
  32. package/docs/zh-CN/example-prompts.md +4 -3
  33. package/docs/zh-TW/README.md +61 -39
  34. package/openclaw.plugin.json +1 -1
  35. package/package.json +1 -1
  36. package/skills/eval_queries.json +25 -0
  37. package/skills/fec-accessibility-check/SKILL.md +1 -1
  38. package/skills/fec-alchemy/SKILL.md +74 -0
  39. package/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
  40. package/skills/fec-alchemy/assets/intake-template.md +55 -0
  41. package/skills/fec-alchemy/assets/review-checklist.md +31 -0
  42. package/skills/fec-alchemy/references/methodology.md +94 -0
  43. package/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
  44. package/skills/fec-browser-storage/SKILL.md +1 -1
  45. package/skills/fec-canvas-threejs/SKILL.md +1 -1
  46. package/skills/fec-code-review/SKILL.md +10 -2
  47. package/skills/fec-data-fetching/SKILL.md +15 -15
  48. package/skills/fec-data-fetching/references/query-patterns.md +27 -1
  49. package/skills/fec-debug-framework/SKILL.md +14 -19
  50. package/skills/fec-debug-framework/references/report-template.md +58 -0
  51. package/skills/fec-doc-sync/SKILL.md +19 -17
  52. package/skills/fec-e2e-testing/SKILL.md +3 -3
  53. package/skills/fec-form-handling/SKILL.md +11 -11
  54. package/skills/fec-form-handling/references/advanced-form-patterns.md +34 -5
  55. package/skills/fec-implement-from-design/SKILL.md +2 -2
  56. package/skills/fec-legacy-to-modern-migration/SKILL.md +33 -23
  57. package/skills/fec-legacy-web-standard/SKILL.md +1 -1
  58. package/skills/fec-list-virtualization/SKILL.md +3 -3
  59. package/skills/fec-list-virtualization/references/virtualization-patterns.md +32 -4
  60. package/skills/fec-performance-optimization/SKILL.md +5 -1
  61. package/skills/fec-performance-optimization/references/report-template.md +53 -0
  62. package/skills/fec-pwa-implementation/SKILL.md +3 -4
  63. package/skills/fec-react-project-standard/SKILL.md +1 -1
  64. package/skills/fec-refactor-clean/SKILL.md +4 -1
  65. package/skills/fec-refactor-clean/references/report-template.md +42 -0
  66. package/skills/fec-security-review/SKILL.md +3 -3
  67. package/skills/fec-state-management/SKILL.md +1 -1
  68. package/skills/fec-storybook-component-doc/SKILL.md +2 -2
  69. package/skills/fec-typescript-type-safety/SKILL.md +1 -1
  70. package/skills/fec-validation-fix/SKILL.md +5 -2
  71. package/skills/fec-validation-fix/references/report-template.md +43 -0
  72. package/skills/fec-vue3-project-standard/SKILL.md +1 -1
  73. package/skills/fec-web-workers/SKILL.md +3 -4
  74. package/skills/metadata.json +82 -45
  75. package/skills/relations.json +20 -0
  76. package/docs/superpowers/plans/2026-05-29-fec-debug.md +0 -491
  77. package/docs/superpowers/specs/2026-05-29-fec-debug-design.md +0 -340
@@ -12,9 +12,13 @@
12
12
  "plugins": [
13
13
  {
14
14
  "name": "frontend-craft",
15
- "source": "./",
16
- "description": "Enterprise frontend team Claude Code plugin — 13 agents, 40 skills, 8 commands, shared rule templates, and production-ready hooks for code review, TypeScript review, type-safety modeling, state management, Tailwind design systems, responsive layout, dependency upgrades, security review, testing strategy, E2E, component testing, route protection, API integration, interaction motion, performance optimization, scaffolding, design-to-code (Figma/Sketch/MasterGo/Pixso/墨刀/摹客), UI design and polish, Vite standards, legacy-to-modern migration, React/Vue/Next.js/Nuxt/monorepo standards, PWA, Web Workers, Canvas/Three.js, SVG animation, CI/CD, architecture planning, and UI debugging with multi-design-tool MCP integration. All reports auto-saved as Markdown files to reports/ directory.",
17
- "version": "2.5.0",
15
+ "source": {
16
+ "source": "npm",
17
+ "package": "@bovinphang/frontend-craft",
18
+ "version": "2.6.0"
19
+ },
20
+ "description": "Enterprise frontend team Claude Code plugin — 13 agents, 41 skills, 8 commands, shared rule templates, and production-ready hooks for code review, TypeScript review, type-safety modeling, state management, Tailwind design systems, responsive layout, dependency upgrades, security review, testing strategy, E2E, component testing, route protection, API integration, interaction motion, performance optimization, scaffolding, design-to-code (Figma/Sketch/MasterGo/Pixso/墨刀/摹客), UI design and polish, Vite standards, legacy-to-modern migration, React/Vue/Next.js/Nuxt/monorepo standards, PWA, Web Workers, Canvas/Three.js, SVG animation, CI/CD, architecture planning, project absorption, and UI debugging with multi-design-tool MCP integration. All reports auto-saved as Markdown files to reports/ directory.",
21
+ "version": "2.6.0",
18
22
  "author": {
19
23
  "name": "Bovin Phang",
20
24
  "email": "pengbaowen@msn.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "frontend-craft",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Shared Claude Code plugin for frontend teams, including frontend skills, subagents, hooks, and MCP integration for Figma/Sketch/MasterGo/Pixso/墨刀/摹客. All reports auto-saved as Markdown files.",
5
5
  "author": {
6
6
  "name": "Bovin Phang",
package/CHANGELOG.md CHANGED
@@ -10,6 +10,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  Project-facing release notes are maintained in English from 2.0.0 onward. Historical entries may preserve their original language.
11
11
 
12
12
 
13
+ ## [2.6.0] - 2026-06-07
14
+
15
+ ### Added
16
+
17
+ - **`fec-alchemy` skill:** new project absorption workflow that extracts useful ideas from reference systems and redesigns them into original, project-native improvements; ships with `SKILL.md`, intake / absorption-plan templates, and reference docs covering methodology, originality, and licensing.
18
+ - **`fec setup all` subcommand:** installs frontend-craft for every supported runtime in one shot, defaulting to the current project unless `--global` is passed; help text now distinguishes the terminal `fec setup` command from the in-assistant `/fec-init` slash command.
19
+ - **`fec-debug-framework` in README skill tables:** the skill was already shipped in `skills/` but is now surfaced in every README locale and marketplace metadata.
20
+ - **`scripts/sync-version.ts`:** propagates `package.json` version to `.claude-plugin/plugin.json`, `.claude-plugin/marketplace.json` (including the npm source pin), `openclaw.plugin.json`, and per-skill entries in `skills/metadata.json`. Run via `npm run sync:version`; wired into the `version` lifecycle script.
21
+ - **Skill-pack script minification:** `pack-skills.ts` and `skill-packaging.ts` are now minified with esbuild during build, producing smaller standalone skill packages in `skill-packages/`.
22
+ - **Reference docs for key skills:** added dedicated reference documents for `fec-debug-framework`, `fec-performance-optimization`, `fec-refactor-clean`, and `fec-validation-fix`, linked from the localized "详细参考" section of each `SKILL.md`.
23
+
24
+ ### Changed
25
+
26
+ - **`fec-doc-sync` scope expansion:** the doc-sync workflow and skill descriptions now cover env notes, scripts, API/route notes, and deploy facts in addition to user-facing docs; example prompts, the `/fec-doc-sync` command doc, and `skills/metadata.json` were updated to match.
27
+ - **Skill taxonomy — new `project-evolution` category:** added to the taxonomy allowlist (in addition to the existing `implementation-capability`, `testing`, `review-quality`, `design-ui`, `legacy-migration`, `maintenance-docs`); `fec-alchemy` lives here, and the README skill tables, marketplace keywords, and `tests/install/metadata-consistency.test.ts` allowlist were updated across all 5 locales.
28
+ - **Skill count:** 40 → 41 across all README locales and `skills/metadata.json`.
29
+ - **README install sections restructured:** the en / zh-CN / zh-TW / ja-JP / ko-KR READMEs were reorganized into 3 install options (down from 4), with numbered steps (1–6), `install --all` examples for both `--local` and `--global`, and a final "Preview / query" step that surfaces `dry-run` and `fec list`. Option 1 is now explicitly "Install the fec CLI globally" so the `npm install -g` step is unambiguous; `Claude Code Marketplace` moved to Option 3 to reflect its position among the paths.
30
+ - **CLI setup help text:** clarified that `npm install -g` only installs the `fec` terminal command and that `--global` is required to write to the AI tool's global config; scripted all-runtime installs must use `install --all`, not `install all`.
31
+ - **`SKILL.md` References localization:** the "References" section header is now rendered as `详细参考` (Detailed References) in every `SKILL.md` to match the existing Chinese-first documentation convention.
32
+ - **`pnpm-lock.yaml`:** now tracked in version control — pnpm is the canonical package manager for the repo.
33
+ - **Marketplace plugin source pin:** `marketplace.json` source entry now follows `package.json` version consistently via `sync-version.ts` instead of being edited by hand.
34
+ - **CLI project setup command:** renamed the terminal project initialization shortcut from `fec init` / `frontend-craft init` to `fec setup` / `frontend-craft setup`; the in-assistant `/fec-init` slash command is unchanged. `src/install/cli.ts` help text, command dispatcher, and default install location updated; `tests/install/cli.test.ts` asserts the new `setup` command and that legacy `init` is rejected.
35
+
36
+ ### Fixed
37
+
38
+ - **Plugin install command scope:** README, runtime docs, and marketplace descriptions now reference the `@bovinphang/frontend-craft` npm scope consistently; the previous `@frontend-craft` references (no scope) were misleading.
39
+
40
+ ### Removed
41
+
42
+ - **CLI `init` command:** `init` is no longer accepted as a terminal CLI command and exits with "Unknown command: init"; use `setup` for local project setup.
43
+
44
+ ### Chore
45
+
46
+ - **`SKILL.md` BOM cleanup:** removed the UTF-8 byte order mark (BOM, U+FEFF) from the first line of 23 `SKILL.md` files; the BOM was rendering as an unknown glyph in some editors and tooling.
47
+ - **JSON metadata formatting:** normalized indentation and trailing-newline conventions in `marketplace.json` and `skills/metadata.json` after the `sync-version.ts` migration.
48
+ - **`CONTRIBUTING` guide:** added scenario-specific check instructions (skill authoring, installer changes, runtime template changes, OpenClaw packaging) so contributors know which commands to run before opening a PR.
49
+ - **Runtime docs:** added build and Marketplace troubleshooting notes to per-runtime install docs under `docs/runtimes/`.
50
+ - **npm package scope migration:** published package is now `@bovinphang/frontend-craft`; install commands, `pack:skills` output paths, README badges, and OpenClaw staging paths were updated in lockstep.
51
+
13
52
 
14
53
  ## [2.5.0] - 2026-06-01
15
54
 
@@ -10,6 +10,46 @@
10
10
 
11
11
 
12
12
 
13
+ ## [2.6.0] - 2026-06-07
14
+
15
+ ### 新增
16
+
17
+ - **`fec-alchemy` 技能**:新增「项目吸收与原创化融合」工作流,从参考系统提取可借鉴的设计并以项目原生方式重构为原创能力;随附 `SKILL.md`、intake / absorption-plan 模板,以及涵盖方法论、原创性、许可证的参考文档。
18
+ - **`fec setup all` 子命令**:一键为所有受支持的 runtime 安装 frontend-craft,默认安装到当前项目,除非显式传入 `--global`;帮助文本现在区分终端 `fec setup` 命令与 AI 助手内的 `/fec-init` 斜杠命令。
19
+ - **README 技能表补全 `fec-debug-framework`**:该技能此前已在 `skills/` 中提供,现统一收录到各语言 README 技能表与 marketplace 元数据中。
20
+ - **`scripts/sync-version.ts`**:将 `package.json` 的版本号同步到 `.claude-plugin/plugin.json`、`.claude-plugin/marketplace.json`(包含 npm source 钉版)、`openclaw.plugin.json`,以及 `skills/metadata.json` 的每条技能记录。可通过 `npm run sync:version` 执行;已接入 `version` 生命周期脚本。
21
+ - **技能打包脚本压缩**:`pack-skills.ts` 与 `skill-packaging.ts` 在构建期通过 esbuild 压缩,输出到 `skill-packages/` 的独立技能包体积更小。
22
+ - **关键技能参考文档**:为 `fec-debug-framework`、`fec-performance-optimization`、`fec-refactor-clean`、`fec-validation-fix` 新增独立参考文档,从各 `SKILL.md` 本地化后的「详细参考」一节链接。
23
+
24
+ ### 变更
25
+
26
+ - **`fec-doc-sync` 同步范围扩展**:文档同步工作流与技能描述现在覆盖环境变量说明、脚本、接口/路由说明与部署文档,不再局限于面向用户的文档;示例提示词、`/fec-doc-sync` 命令文档以及 `skills/metadata.json` 同步更新。
27
+ - **技能分类新增 `project-evolution`**:在原 `implementation-capability` / `testing` / `review-quality` / `design-ui` / `legacy-migration` / `maintenance-docs` 之外新增 `project-evolution`,`fec-alchemy` 归入此类;各语言 README 技能表、marketplace 关键词以及 `tests/install/metadata-consistency.test.ts` 白名单同步更新。
28
+ - **技能数量**:40 → 41,已同步到各语言 README 与 `skills/metadata.json`。
29
+ - **README 安装章节重构**:en / zh-CN / zh-TW / ja-JP / ko-KR 五种语言的 README 重新组织为 3 个安装选项(从 4 个收敛),步骤编号 1–6,并补充 `--local` / `--global` 两种场景下的 `install --all` 示例,新增「Preview / query」步骤展示 `dry-run` 与 `fec list`。「选项 1」改为「全局安装 fec CLI」,使 `npm install -g` 步骤不再有歧义;Claude Code Marketplace 下移至「选项 3」。
30
+ - **CLI setup 帮助文本**:明确说明 `npm install -g` 仅安装终端 `fec` 命令,若要写入 AI 工具的全局配置需额外传 `--global`;脚本化的全 runtime 安装必须使用 `install --all`,不能使用 `install all`。
31
+ - **`SKILL.md` References 本地化**:每份 `SKILL.md` 的「References」章节标题统一为「详细参考」,与既有中文优先的文档约定一致。
32
+ - **`pnpm-lock.yaml` 纳入版本控制**:pnpm 已成为仓库规范化的包管理器。
33
+ - **Marketplace 插件 source 钉版**:`marketplace.json` 的 source 字段现由 `sync-version.ts` 与 `package.json` 保持一致,无需手工修改。
34
+ - **CLI 项目 setup 命令重命名**:终端里的项目初始化快捷命令从 `fec init` / `frontend-craft init` 重命名为 `fec setup` / `frontend-craft setup`;AI 助手内的 `/fec-init` 斜杠命令保持不变。`src/install/cli.ts` 的帮助文本、命令分发与默认安装位置同步更新;`tests/install/cli.test.ts` 已断言新 `setup` 命令并校验旧 `init` 会被拒绝。
35
+
36
+ ### 修复
37
+
38
+ - **插件安装命令作用域**:README、runtime 文档与 marketplace 描述现在统一引用 `@bovinphang/frontend-craft` npm 作用域;先前未带作用域的 `@frontend-craft` 引用已修正。
39
+
40
+ ### 移除
41
+
42
+ - **CLI `init` 命令**:终端 CLI 不再接受 `init`,遇到时直接退出并提示「Unknown command: init」;本地项目 setup 请改用 `setup`。
43
+
44
+ ### 工程
45
+
46
+ - **`SKILL.md` BOM 清理**:从 23 份 `SKILL.md` 的首行移除 UTF-8 字节顺序标记(BOM, U+FEFF),避免部分编辑器与工具把首字符渲染为不可识别字形。
47
+ - **JSON 元数据格式统一**:`sync-version.ts` 迁移后,统一 `marketplace.json` 与 `skills/metadata.json` 的缩进与末尾换行规范。
48
+ - **`CONTRIBUTING` 贡献指南**:补充分场景的检查指引(技能编写、安装器变更、runtime 模板变更、OpenClaw 打包),让贡献者在提 PR 前明确应执行哪些命令。
49
+ - **Runtime 文档**:在 `docs/runtimes/` 的各 runtime 安装文档中补充构建与 Marketplace 排错说明。
50
+ - **npm 包作用域迁移**:发布包更名为 `@bovinphang/frontend-craft`;安装命令、`pack:skills` 输出路径、README 徽标与 OpenClaw staging 路径同步刷新。
51
+
52
+
13
53
  ## [2.5.0] - 2026-06-01
14
54
 
15
55
  ### 新增
package/CONTRIBUTING.md CHANGED
@@ -10,15 +10,19 @@ Thanks for your interest in `frontend-craft`. Issues, pull requests, documentati
10
10
  - Git.
11
11
  - Run `npm install` before local development.
12
12
 
13
- Useful checks:
13
+ For documentation-only changes, focus on the language and documentation policy plus the pull request checklist. For skill or OpenClaw changes, use the focused sections below before opening a pull request.
14
+
15
+ Quick checks (minimum recommended):
14
16
 
15
17
  ```bash
16
- npm test
17
- npm run pack:skills
18
- npm run check:skills-publish
19
- npm run typecheck:openclaw
18
+ npm test # General validation
19
+ npm run pack:skills # Skill changes
20
+ npm run check:skills-publish # Skill changes
21
+ npm run typecheck:openclaw # OpenClaw changes
20
22
  ```
21
23
 
24
+ See the NPM Scripts section and Pull Request Checklist for complete scenario-specific checks.
25
+
22
26
  ## Project Structure
23
27
 
24
28
  ```
@@ -112,7 +116,7 @@ The canonical skill sources live under `skills/<skill-id>/`. Do not edit generat
112
116
  ```bash
113
117
  npm run pack:skills # Build one standalone package per skill
114
118
  npm run check:skills-publish # Verify package metadata, index, and copied references
115
- npm run pack:all # Full test + OpenClaw package + standalone skill packages
119
+ npm run pack:all # Build + test + OpenClaw package + standalone skill packages
116
120
  ```
117
121
 
118
122
  `npm run pack:skills` writes `skill-packages/<skill-id>/` with `SKILL.md`, only the referenced `references/` files, `metadata.json`, `package.json`, `README.md`, and `LICENSE`. It also writes `skill-packages/index.json` for platform crawlers and release automation.
@@ -131,7 +135,7 @@ Use `package.json` scripts as the public development entrypoints.
131
135
  | Script | Purpose |
132
136
  | ------------------------------ | -------------------------------------------------------------------------------- |
133
137
  | `npm run clean` | Remove `dist/`. |
134
- | `npm run typecheck` | Run TypeScript checking for the main project with `tsconfig.json`. |
138
+ | `npm run typecheck` | Run main TypeScript checks plus checked skill support scripts. |
135
139
  | `npm run build` | Run `clean`, `typecheck`, and bundle CLI/hooks via `scripts/build-dist.ts`. |
136
140
  | `npm test` | Build, then run the curated `node:test` suite with `tsx`. |
137
141
  | `npm run build:openclaw` | Build the main project, then bundle OpenClaw runtime output. |
@@ -139,9 +143,9 @@ Use `package.json` scripts as the public development entrypoints.
139
143
  | `npm run typecheck:openclaw` | Run TypeScript checking for OpenClaw with `tsconfig.openclaw.json`. |
140
144
  | `npm run check:openclaw-dist` | Verify the generated OpenClaw dist output. |
141
145
  | `npm run pack:openclaw` | Build, verify, and package the OpenClaw plugin. |
142
- | `npm run pack:skills` | Build standalone packages under `skill-packages/`. |
143
- | `npm run check:skills-publish` | Build, then verify standalone skill package metadata and copied files. |
144
- | `npm run pack:all` | Run tests, package OpenClaw, package skills, and verify skill publishing output. |
146
+ | `npm run pack:skills` | Build first, then create standalone packages under `skill-packages/`. |
147
+ | `npm run check:skills-publish` | Build first, then verify standalone skill package metadata and copied files. |
148
+ | `npm run pack:all` | Build, run tests, package OpenClaw, package skills, and verify skill output. |
145
149
  | `npm run sync:version` | Sync package version metadata across release manifests. |
146
150
  | `npm run version` | Run `sync:version`, then stage versioned manifests for npm version workflows. |
147
151
  | `npm run prepack` | Build before `npm pack`. |
@@ -161,6 +165,7 @@ Maintenance scripts live under `scripts/` and run from source with `tsx`; they a
161
165
  | ------------------------------------------ | ------------------------------------ |
162
166
  | `scripts/audit-skills.ts` | Skill size and trigger-overlap audit |
163
167
  | `scripts/build-dist.ts` | CLI and runtime hook bundler |
168
+ | `scripts/clean-dist.mjs` | Remove generated `dist/` output |
164
169
  | `scripts/sync-codex-agents-toml.ts` | Sync Codex agents configuration |
165
170
  | `scripts/sync-version.ts` | Sync release version metadata |
166
171
  | `scripts/pack-skills.ts` | Standalone skill package builder |
@@ -10,15 +10,19 @@
10
10
  - Git。
11
11
  - 本地开发前运行 `npm install`。
12
12
 
13
- 常用校验:
13
+ 仅修改文档时,重点阅读语言与文档策略以及 Pull Request 自检。修改 skill 或 OpenClaw 时,请在提交 PR 前参考下方对应章节。
14
+
15
+ 快速自检(最小推荐):
14
16
 
15
17
  ```bash
16
- npm test
17
- npm run pack:skills
18
- npm run check:skills-publish
19
- npm run typecheck:openclaw
18
+ npm test # 通用校验
19
+ npm run pack:skills # Skill 变更
20
+ npm run check:skills-publish # Skill 变更
21
+ npm run typecheck:openclaw # OpenClaw 变更
20
22
  ```
21
23
 
24
+ 完整的场景化命令请见后文 npm scripts 与 Pull Request 自检。
25
+
22
26
  ## 项目结构
23
27
 
24
28
  ```
@@ -112,7 +116,7 @@ Skill 的权威源文件位于 `skills/<skill-id>/`。不要手动修改 `skill-
112
116
  ```bash
113
117
  npm run pack:skills # 为每个 skill 生成独立发布包
114
118
  npm run check:skills-publish # 校验包元数据、索引和引用文件
115
- npm run pack:all # 完整测试 + OpenClaw 包 + 独立 skill 包
119
+ npm run pack:all # 构建 + 测试 + OpenClaw 包 + 独立 skill 包
116
120
  ```
117
121
 
118
122
  `npm run pack:skills` 会生成 `skill-packages/<skill-id>/`,其中包含 `SKILL.md`、该 skill 实际引用的 `references/` 文件、`metadata.json`、`package.json`、`README.md` 和 `LICENSE`。同时会生成 `skill-packages/index.json`,供平台索引或发布自动化使用。
@@ -131,7 +135,7 @@ npm run pack:all # 完整测试 + OpenClaw 包 + 独立 skill 包
131
135
  | Script | 用途 |
132
136
  | ------------------------------ | -------------------------------------------------------------------------- |
133
137
  | `npm run clean` | 删除 `dist/`。 |
134
- | `npm run typecheck` | 使用 `tsconfig.json` 对主项目做 TypeScript 类型检查。 |
138
+ | `npm run typecheck` | 运行主项目 TypeScript 检查,并检查 skill 辅助脚本。 |
135
139
  | `npm run build` | 运行 `clean`、`typecheck`,并通过 `scripts/build-dist.ts` 打包 CLI/hooks。 |
136
140
  | `npm test` | 先构建,再通过 `tsx` 运行精选的 `node:test` 测试集。 |
137
141
  | `npm run build:openclaw` | 构建主项目,然后打包 OpenClaw runtime 输出。 |
@@ -139,9 +143,9 @@ npm run pack:all # 完整测试 + OpenClaw 包 + 独立 skill 包
139
143
  | `npm run typecheck:openclaw` | 使用 `tsconfig.openclaw.json` 检查 OpenClaw 类型。 |
140
144
  | `npm run check:openclaw-dist` | 校验生成的 OpenClaw dist 输出。 |
141
145
  | `npm run pack:openclaw` | 构建、校验并打包 OpenClaw 插件。 |
142
- | `npm run pack:skills` | 在 `skill-packages/` 下生成独立 skill 包。 |
143
- | `npm run check:skills-publish` | 构建后校验独立 skill 包元数据与复制文件。 |
144
- | `npm run pack:all` | 运行测试、打包 OpenClaw、打包 skills,并校验 skill 发布产物。 |
146
+ | `npm run pack:skills` | 先构建,再在 `skill-packages/` 下生成独立 skill 包。 |
147
+ | `npm run check:skills-publish` | 先构建,再校验独立 skill 包元数据与复制文件。 |
148
+ | `npm run pack:all` | 构建、运行测试、打包 OpenClaw、打包 skills,并校验 skill 产物。 |
145
149
  | `npm run sync:version` | 同步发布清单中的 package 版本元数据。 |
146
150
  | `npm run version` | 运行 `sync:version`,并为 npm version 工作流暂存版本清单。 |
147
151
  | `npm run prepack` | 在 `npm pack` 前构建。 |
@@ -161,6 +165,7 @@ npm run pack:all # 完整测试 + OpenClaw 包 + 独立 skill 包
161
165
  | ------------------------------------------ | ------------------------------ |
162
166
  | `scripts/audit-skills.ts` | Skill 大小与触发描述重叠度审计 |
163
167
  | `scripts/build-dist.ts` | CLI 与 runtime hook 打包 |
168
+ | `scripts/clean-dist.mjs` | 删除生成的 `dist/` 输出 |
164
169
  | `scripts/sync-codex-agents-toml.ts` | 同步 Codex agents 配置 |
165
170
  | `scripts/sync-version.ts` | 同步发布版本元数据 |
166
171
  | `scripts/pack-skills.ts` | 独立 skill 包构建 |
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  [![Stars](https://img.shields.io/github/stars/bovinphang/frontend-craft?style=flat)](https://github.com/bovinphang/frontend-craft/stargazers)
10
10
  [![CI](https://github.com/bovinphang/frontend-craft/actions/workflows/ci.yml/badge.svg)](https://github.com/bovinphang/frontend-craft/actions/workflows/ci.yml)
11
- [![npm version](https://img.shields.io/npm/v/frontend-craft)](https://www.npmjs.com/package/frontend-craft)
11
+ [![npm version](https://img.shields.io/npm/v/@bovinphang/frontend-craft)](https://www.npmjs.com/package/@bovinphang/frontend-craft)
12
12
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
13
13
  ![Node](https://img.shields.io/badge/Node.js-22+-5FA04E?logo=node.js&logoColor=white)
14
14
  ![TypeScript](https://img.shields.io/badge/-TypeScript-3178C6?logo=typescript&logoColor=white)
@@ -32,7 +32,7 @@
32
32
 
33
33
  Per-runtime paths and caveats live in [`docs/runtimes/`](docs/runtimes/).
34
34
 
35
- It bundles **13 specialized agents**, **40 auto-activated skills**, **8 slash commands**, **5 event-driven hooks**, **MCP integrations** for 6 design-tool endpoints, and a complete **rules library** into a single installable package. Run one command, and every AI session on your team writes React, Vue, Next.js, or Nuxt the same way — typed, accessible, secure, and consistent.
35
+ It bundles **13 specialized agents**, **41 auto-activated skills**, **8 slash commands**, **5 event-driven hooks**, **MCP integrations** for 6 design-tool endpoints, and a complete **rules library** into a single installable package. Run one command, and every AI session on your team writes React, Vue, Next.js, or Nuxt the same way — typed, accessible, secure, and consistent.
36
36
 
37
37
  ---
38
38
 
@@ -40,7 +40,7 @@ It bundles **13 specialized agents**, **40 auto-activated skills**, **8 slash co
40
40
 
41
41
  | Problem | What frontend-craft does |
42
42
  | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
43
- | AI assistants write inconsistent, untyped, or insecure frontend code | **40 skills** encode team standards — auto-activated when the assistant touches matching files |
43
+ | AI assistants write inconsistent, untyped, or insecure frontend code | **41 skills** encode team standards — auto-activated when the assistant touches matching files |
44
44
  | Each AI tool has its own plugin format | **One CLI** installs the same rules, agents, and hooks into 15 runtimes |
45
45
  | Design-to-code handoff is lossy | **MCP integrations** bring in richer context from Figma, Figma Desktop, Sketch, MasterGo, Pixso, and 墨刀 |
46
46
  | Reviews are ad-hoc and shallow | **13 agents** produce graded reports: code, security, a11y, performance, TS, UI fidelity |
@@ -53,45 +53,59 @@ It bundles **13 specialized agents**, **40 auto-activated skills**, **8 slash co
53
53
 
54
54
  Requires **Node.js 22+**. Works on **Windows, macOS, and Linux**.
55
55
 
56
- ### Option 1 - Global CLI project init (recommended)
56
+ ### Option 1 - Install the fec CLI globally (recommended)
57
57
 
58
58
  ```bash
59
- npm install -g frontend-craft@latest
59
+ # 1. Install the fec command globally
60
+ npm install -g @bovinphang/frontend-craft@latest
61
+
62
+ # 2. Go to your frontend project
60
63
  cd your-project
61
- fec init
62
- fec init codex # initialize for a specific runtime
63
- fec init claude # initialize for Claude Code
64
- ```
65
64
 
66
- `fec init` is the terminal CLI command for initializing the current project. In an interactive terminal, omit the runtime to choose one from the prompt; in non-interactive terminals, the CLI defaults to `claude` when no runtime is specified. `init` installs locally by default unless you explicitly pass `--global`, for example `fec init codex --global`. The in-assistant `/fec-init` slash command is separate and runs after frontend-craft is installed in your AI runtime.
65
+ # 3. Choose the AI runtime(s) interactively
66
+ fec setup
67
67
 
68
- ### Option 2 — No-global interactive wizard
68
+ # 4. Connect the current project
69
+ fec setup codex
70
+ fec setup claude
71
+ fec setup all
69
72
 
70
- ```bash
71
- npx frontend-craft@latest
73
+ # 5. Connect globally, available across all projects
74
+ fec setup codex --global
75
+ fec setup claude --global
76
+ fec setup all --global
77
+
78
+ # 6. Preview / query
79
+ fec install --all --dry-run --global
80
+ fec list
72
81
  ```
73
82
 
74
- Use this when you do not want to install a global `fec` command. The wizard walks through the full install flow: choose one or more runtimes, then choose whether to install globally or into the current project.
83
+ `npm install -g` only installs the `fec` terminal command. `fec setup` is the terminal CLI command for connecting frontend-craft to a project; it is not the in-assistant `/fec-init` slash command. In an interactive terminal, running only `fec setup` asks you to choose runtimes. `fec setup <runtime>` and `fec setup all` connect frontend-craft to the current project by default. Only pass `--global` when you want to connect frontend-craft to the selected AI tool's global config directory so it is available across projects.
75
84
 
76
- ### Option 3 — Scripted install
85
+ ### Option 2 — Temporary npx run (no global fec command)
77
86
 
78
87
  ```bash
79
- # Install into the current project
80
- npx frontend-craft@latest install --local claude
81
-
82
- # Install globally for a runtime
83
- npx frontend-craft@latest install --global codex
84
-
85
- # Preview what would be installed across all runtimes
86
- npx frontend-craft@latest install --all --dry-run --global
87
-
88
- # List available runtimes
89
- npx frontend-craft@latest list
88
+ # 1. Interactive wizard
89
+ npx @bovinphang/frontend-craft@latest
90
+
91
+ # 2. Connect the current project
92
+ npx @bovinphang/frontend-craft@latest install --local codex
93
+ npx @bovinphang/frontend-craft@latest install --local claude
94
+ npx @bovinphang/frontend-craft@latest install --all --local
95
+
96
+ # 3. Connect globally, available across all projects
97
+ npx @bovinphang/frontend-craft@latest install --global codex
98
+ npx @bovinphang/frontend-craft@latest install --global claude
99
+ npx @bovinphang/frontend-craft@latest install --all --global
100
+
101
+ # 4. Preview / query
102
+ npx @bovinphang/frontend-craft@latest install --all --dry-run --global
103
+ npx @bovinphang/frontend-craft@latest list
90
104
  ```
91
105
 
92
- > **CI / scripts:** always pass `--global` / `-g` or `--local` / `-l`. Without a TTY, the CLI defaults to `claude --global` if neither is set.
106
+ Use `npx` when you do not want to install a global `fec` command. Without arguments, it opens the interactive wizard: choose one or more runtimes, then choose whether to connect globally or into the current project. For scripted all-runtime installs, use `install --all --local` or `install --all --global`; do not write `install all`. For CI / scripts, always pass `--global` / `-g` or `--local` / `-l`; in non-TTY environments without an explicit location, the CLI defaults to `claude --global`.
93
107
 
94
- ### Option 4 — Claude Code Marketplace
108
+ ### Option 3 — Claude Code Marketplace
95
109
 
96
110
  For Claude Code users, **Claude Code Marketplace** is the preferred single-source install. Use the CLI for Claude only when you need cross-runtime installs, scripted/offline file copies, or non-Marketplace environments.
97
111
 
@@ -133,7 +147,7 @@ For a complete scenario-based prompt library, see [docs/example-prompts.md](docs
133
147
  ```text
134
148
  You: "Review my recent changes before merge. Focus on architecture, type safety, rendering behavior, styles, accessibility, and missing tests."
135
149
  You: "Before coding, plan the account billing feature: route structure, component boundaries, data flow, state ownership, validation flow, and rollout risks."
136
- You: "Build a multi-step registration form with React Hook Form + Zod, file upload, conditional fields, async validation, and accessible errors."
150
+ You: "Build a multi-step registration form; choose the right form and schema validation approach for this project, with file upload, conditional fields, async validation, and accessible errors."
137
151
  You: "Implement the UI from Figma node 123:456. Use existing design tokens and components, match spacing and responsive states, and document assumptions."
138
152
  You: "`/fec-refactor-clean` Clean up dead code in this module."
139
153
  ```
@@ -155,13 +169,13 @@ Slash commands are the primary entry points for structured workflows. Most produ
155
169
  | `/fec-tdd` | Red → green → refactor loop for frontend TDD | — |
156
170
  | `/fec-debug` | Diagnose and fix frontend issues: build, runtime, UI, and API failures | `debug-*.md` |
157
171
  | `/fec-refactor-clean` | Classify and safely remove dead code, unused exports, styles, and deps | `refactor-clean-*.md` |
158
- | `/fec-doc-sync` | Sync READMEs, runtime docs, capability tables, and metadata | — |
172
+ | `/fec-doc-sync` | Sync READMEs, docs, env notes, scripts, API/route notes, and deploy docs | — |
159
173
 
160
174
  ### Skills (auto-activated)
161
175
 
162
176
  Skills are workflow definitions that activate automatically based on file patterns, frameworks, or task context. They encode review dimensions, output conventions, and report formats.
163
177
 
164
- The skills below are grouped by use case so you can quickly find project standards, implementation, testing, review, design, migration, and documentation workflows.
178
+ The skills below are grouped by use case so you can quickly find project standards, implementation, testing, review, design, migration, project evolution, and documentation workflows.
165
179
 
166
180
  **Project standards** — conventions enforced whenever matching frameworks are detected:
167
181
 
@@ -178,17 +192,17 @@ The skills below are grouped by use case so you can quickly find project standar
178
192
 
179
193
  | Skill | Scope |
180
194
  | ------------------------- | ------------------------------------------------------------------------- |
181
- | `fec-data-fetching` | TanStack Query / server-state fetching, caching, optimistic updates |
195
+ | `fec-data-fetching` | Server-state fetching, caching, invalidation, SSR, infinite loading |
182
196
  | `fec-api-integration` | Typed API clients, auth refresh, uploads, realtime integration |
183
197
  | `fec-state-management` | State ownership, store selection, URL state, server/form/local boundaries |
184
- | `fec-form-handling` | React Hook Form + Zod, dynamic fields, uploads, multi-step flows |
198
+ | `fec-form-handling` | Framework-aware forms, schema validation, dynamic fields, uploads |
185
199
  | `fec-browser-storage` | localStorage / sessionStorage / IndexedDB / Cookies selection |
186
200
  | `fec-route-protection` | Auth and permission routes for React Router, Next.js, Vue Router, Nuxt |
187
201
  | `fec-pwa-implementation` | Manifest, service worker, offline cache, install prompts |
188
202
  | `fec-web-workers` | Web Worker integration, transferables, Comlink, worker pools |
189
203
  | `fec-canvas-threejs` | Canvas 2D, Three.js, React Three Fiber, WebGL |
190
204
  | `fec-svg-animation` | CSS / Framer Motion / GSAP SVG animation with reduced-motion |
191
- | `fec-list-virtualization` | react-window / TanStack Virtual with measurement strategies |
205
+ | `fec-list-virtualization` | Framework-aware list virtualization, measurement, grids, infinite scroll |
192
206
 
193
207
  **Testing** — activated when planning or authoring frontend test coverage:
194
208
 
@@ -204,6 +218,7 @@ The skills below are grouped by use case so you can quickly find project standar
204
218
  | Skill | Scope |
205
219
  | ------------------------------ | ----------------------------------------------------------------------------- |
206
220
  | `fec-code-review` | Architecture, types, rendering, styles, a11y review |
221
+ | `fec-debug-framework` | Systematic diagnostics for build, runtime, UI, and API/data failures |
207
222
  | `fec-typescript-type-safety` | Type contracts, DTO mapping, type guards, generics, type-level checks |
208
223
  | `fec-security-review` | XSS, CSRF, sensitive data leakage, input validation |
209
224
  | `fec-accessibility-check` | WCAG 2.2, keyboard, focus, touch, and screen-reader behavior |
@@ -228,13 +243,19 @@ The skills below are grouped by use case so you can quickly find project standar
228
243
  | Skill | Scope |
229
244
  | -------------------------------- | ---------------------------------------------------------- |
230
245
  | `fec-legacy-web-standard` | Standards for JS + jQuery + HTML maintenance |
231
- | `fec-legacy-to-modern-migration` | jQuery/MPA → React/Vue 3 + TS strategy and phased workflow |
246
+ | `fec-legacy-to-modern-migration` | Legacy frontend modernization, target-stack selection, phased workflow |
247
+
248
+ **Project evolution** — activated when absorbing reference systems into project-native improvements:
249
+
250
+ | Skill | Scope |
251
+ | ------------- | ---------------------------------------------------------------------- |
252
+ | `fec-alchemy` | Absorb reference system ideas through original, project-native redesign |
232
253
 
233
254
  **Maintenance docs** — activated during documentation upkeep:
234
255
 
235
256
  | Skill | Scope |
236
257
  | ------------------------------- | -------------------------------------------------------------------------------------- |
237
- | `fec-doc-sync` | Keep public docs in sync with scripts, skills, agents, commands |
258
+ | `fec-doc-sync` | Keep frontend docs in sync with code, config, scripts, routes, APIs, env, and deploy facts |
238
259
  | `fec-source-driven-development` | Verify version-sensitive frontend decisions against project facts and official sources |
239
260
 
240
261
  ### Agents
@@ -365,11 +386,12 @@ $env:MODAO_TOKEN = "your-modao-token"
365
386
  Every review, analysis, and evaluation writes a timestamped Markdown report to `reports/`. These serve as an audit trail and a handoff artifact for PRs.
366
387
 
367
388
  <details>
368
- <summary>Click to see all 15 report types</summary>
389
+ <summary>Click to see all 16 report types</summary>
369
390
 
370
391
  | Report type | Filename pattern | Produced by |
371
392
  | ---------------------- | -------------------------------------------- | ------------------------------------------------------------------- |
372
393
  | Code review | `code-review-YYYY-MM-DD-HHmmss.md` | `/fec-review`, `fec-code-review`, `fec-code-reviewer` |
394
+ | Debug diagnostics | `debug-YYYY-MM-DD-HHmmss.md` | `/fec-debug`, `fec-debug-framework`, `fec-debugger` |
373
395
  | TypeScript / JS review | `typescript-review-YYYY-MM-DD-HHmmss.md` | `fec-typescript-reviewer` |
374
396
  | Security review | `security-review-YYYY-MM-DD-HHmmss.md` | `fec-security-review`, `fec-security-reviewer` |
375
397
  | Accessibility | `accessibility-review-YYYY-MM-DD-HHmmss.md` | `fec-accessibility-check` |
@@ -393,7 +415,7 @@ Every review, analysis, and evaluation writes a timestamped Markdown report to `
393
415
 
394
416
  ## Update and Remove
395
417
 
396
- `fec` is the short command for `frontend-craft`. If you have not installed the global `fec` command, use the same arguments with `npx frontend-craft@latest`, for example `npx frontend-craft@latest update`.
418
+ `fec` is the short command for `frontend-craft`. If you have not installed the global `fec` command, use the same arguments with `npx @bovinphang/frontend-craft@latest`, for example `npx @bovinphang/frontend-craft@latest update`.
397
419
 
398
420
  ### Update
399
421
 
@@ -437,7 +459,7 @@ npx skills check # preview available updates
437
459
 
438
460
  | CLI | Installs |
439
461
  | -------------------- | ------------------------------------------------------------------- |
440
- | `npx frontend-craft` | Skills + runtime-specific agents, commands, hooks, rules, templates |
462
+ | `npx @bovinphang/frontend-craft` | Skills + runtime-specific agents, commands, hooks, rules, templates |
441
463
  | `npx skills` | Skills only (for existing Skills CLI workflows) |
442
464
 
443
465
  To disable telemetry: `DISABLE_TELEMETRY=1`. Details: [skills.sh CLI docs](https://skills.sh/docs/cli).
@@ -146,22 +146,22 @@ frontend-craft/
146
146
  | `fec-implement-from-design` | Implement UI from Figma, Sketch, MasterGo, Pixso, Modao, or screenshots |
147
147
  | `fec-validation-fix` | Run validation commands, diagnose failures, and fix safely |
148
148
  | `fec-legacy-web-standard` | JavaScript + jQuery + HTML/CSS legacy frontend standards |
149
- | `fec-legacy-to-modern-migration` | jQuery / MPA migration strategy to React or Vue + TypeScript |
149
+ | `fec-legacy-to-modern-migration` | Legacy frontend modernization, target-stack selection, and phased migration |
150
150
  | `fec-testing-strategy` | Testing layer selection, risk matrix, and coverage planning |
151
151
  | `fec-e2e-testing` | Playwright / Cypress E2E structure, artifacts, CI, and flaky test handling |
152
152
  | `fec-nextjs-project-standard` | Next.js App Router, SSR/SSG, routing, metadata, middleware |
153
153
  | `fec-nuxt-project-standard` | Nuxt 3 SSR/SSG, composables, routing, middleware |
154
154
  | `fec-monorepo-project-standard` | pnpm workspace, Turborepo, Nx structure and task orchestration |
155
- | `fec-data-fetching` | TanStack Query / server-state fetching, caching, invalidation, optimistic updates |
155
+ | `fec-data-fetching` | Server-state fetching, caching, invalidation, SSR, and infinite loading |
156
156
  | `fec-state-management` | State ownership, store selection, URL/server/form/local state boundaries |
157
- | `fec-form-handling` | React Hook Form + Zod forms, dynamic fields, uploads, multi-step flows |
157
+ | `fec-form-handling` | Framework-aware forms, schema validation, dynamic fields, uploads, multi-step flows |
158
158
  | `fec-tailwind-design-system` | Tailwind tokens, theme extension, variants, class governance, dark mode |
159
159
  | `fec-responsive-layout` | Mobile-first layouts, container queries, data-dense responsive UI |
160
160
  | `fec-browser-storage` | localStorage/sessionStorage/IndexedDB/Cookies selection and safe client persistence |
161
161
  | `fec-route-protection` | Authenticated and permissioned routes for React Router, Next.js, Vue Router, Nuxt |
162
162
  | `fec-component-testing` | React Testing Library / Vue Test Utils component tests and regression scenarios |
163
163
  | `fec-storybook-component-doc` | Storybook component docs, addons, MDX, interaction and visual test integration |
164
- | `fec-list-virtualization` | Large-list windowing with react-window / TanStack Virtual and measurement strategies |
164
+ | `fec-list-virtualization` | Framework-aware virtualization, item measurement, grids, and infinite scrolling |
165
165
  | `fec-pwa-implementation` | Manifest, service worker, offline cache, install prompts, update handling |
166
166
  | `fec-web-workers` | Web Worker integration, transferable objects, Comlink, worker pools |
167
167
  | `fec-canvas-threejs` | Canvas 2D, Three.js, React Three Fiber, WebGL performance and accessibility |
@@ -195,19 +195,19 @@ This section is a quick OpenClaw-oriented sample, not the full prompt catalog. F
195
195
  | Implement from Figma / screenshot | `fec-implement-from-design` | “Implement this screen from Figma node `123:456`: match spacing and design tokens, reuse our `Button`, and note any assumptions.” |
196
196
  | CI red or local script failures | `fec-validation-fix` | “`pnpm lint` and `pnpm test` are failing—find the root causes, fix them, and don’t weaken types or skip checks.” |
197
197
  | Maintain jQuery / MPA legacy pages | `fec-legacy-web-standard` | “For `public/js/legacy/*.js`, suggest safe refactors and patterns that keep current behavior; we still ship this in production.” |
198
- | Plan jQuery → React/Vue migration | `fec-legacy-to-modern-migration` | “We have `static/app.js` in jQuery + MPA. Outline a phased migration to React + TypeScript with risks and milestones.” |
198
+ | Plan legacy frontend modernization | `fec-legacy-to-modern-migration` | “We have `static/app.js` in jQuery + MPA. Evaluate keeping the MPA, local modernization, or moving to our target stack with risks and milestones.” |
199
199
  | Plan frontend test coverage | `fec-testing-strategy` | “For this checkout refactor, map risks to static checks, unit/component tests, E2E, visual, a11y, and security coverage before we write tests.” |
200
200
  | Add or stabilize E2E | `fec-e2e-testing` | “Add a Playwright smoke test for login; use a clear folder layout and Page Objects, and mention how to run it in CI.” |
201
201
  | Next.js App Router feature | `fec-nextjs-project-standard` | “Review `app/(dashboard)/reports/page.tsx` and related server actions for Next.js App Router best practices (data fetching, errors, metadata).” |
202
202
  | Nuxt 3 feature or layout | `fec-nuxt-project-standard` | “Review `pages/admin/*.vue` and `composables/useApi.ts` for Nuxt 3 SSR/data/composables conventions.” |
203
203
  | Monorepo boundaries and tasks | `fec-monorepo-project-standard` | “`apps/web` depends on `packages/ui`—check package boundaries, workspace config, and Turborepo task graph for issues.” |
204
- | Server-state data fetching | `fec-data-fetching` | “Review `src/queries/useReports.ts` for TanStack Query patterns: caching keys, invalidation, and optimistic updates.” |
204
+ | Server-state data fetching | `fec-data-fetching` | “Review `src/data/reports.ts` for server-state fetching, cache keys, invalidation, SSR hydration, and whether a query library is warranted.” |
205
205
  | State ownership and store selection | `fec-state-management` | “Audit our dashboard state: decide what belongs in URL params, TanStack Query, local state, or the global store, then propose a safe migration.” |
206
- | Complex form with validation | `fec-form-handling` | “Build a multi-step registration form with Zod validation, file upload, and dynamic conditional fields using React Hook Form.” |
206
+ | Complex form with validation | `fec-form-handling` | “Build a multi-step registration form; choose the project-appropriate form library and schema validation approach, with uploads and dynamic fields.” |
207
207
  | Add route guards to an app | `fec-route-protection` | “Secure the `/admin` routes in our React Router app: redirect unauthenticated users and enforce role-based access.” |
208
208
  | Write component unit tests | `fec-component-testing` | “Add RTL tests for `src/components/UserCard.tsx`: render, user-event interactions, and snapshot for regression.” |
209
209
  | Document a component library | `fec-storybook-component-doc` | “Set up Storybook for `packages/ui/` with MDX docs, accessibility addon, and interaction tests.” |
210
- | Render thousands of list rows | `fec-list-virtualization` | “Our `ProductList` renders 10k items—virtualize it with react-window or TanStack Virtual and measure scroll performance.” |
210
+ | Render thousands of list rows | `fec-list-virtualization` | “Our `ProductList` renders 10k items—choose a virtualization approach for our framework, dynamic heights, browser search, and SEO constraints.” |
211
211
  | Add offline support | `fec-pwa-implementation` | “Make this React app a PWA: manifest, service worker, offline cache strategy, and install prompt.” |
212
212
  | Heavy computation off main thread | `fec-web-workers` | “Move the image-processing logic to a Web Worker with Comlink to keep the UI responsive.” |
213
213
  | Build an interactive 3D scene | `fec-canvas-threejs` | “Add a Three.js product viewer to `src/components/ProductViewer.tsx` with performance and fallback considerations.” |
@@ -146,22 +146,22 @@ frontend-craft/
146
146
  | `fec-implement-from-design` | 基于 Figma、Sketch、MasterGo、Pixso、墨刀或截图实现 UI |
147
147
  | `fec-validation-fix` | 执行校验命令、分析失败并安全修复 |
148
148
  | `fec-legacy-web-standard` | JavaScript + jQuery + HTML/CSS 传统前端规范 |
149
- | `fec-legacy-to-modern-migration` | jQuery / MPA 迁移到 React 或 Vue + TypeScript 的策略 |
149
+ | `fec-legacy-to-modern-migration` | 遗留前端现代化、目标栈识别与分阶段迁移策略 |
150
150
  | `fec-testing-strategy` | 测试层级选择、风险矩阵与覆盖规划 |
151
151
  | `fec-e2e-testing` | Playwright / Cypress E2E 结构、产物、CI 与不稳定用例治理 |
152
152
  | `fec-nextjs-project-standard` | Next.js App Router、SSR/SSG、路由、元数据、中间件 |
153
153
  | `fec-nuxt-project-standard` | Nuxt 3 SSR/SSG、组合式函数、路由、中间件 |
154
154
  | `fec-monorepo-project-standard` | pnpm workspace、Turborepo、Nx 结构与任务编排 |
155
- | `fec-data-fetching` | TanStack Query / 服务端状态获取、缓存、失效、乐观更新 |
155
+ | `fec-data-fetching` | 服务端状态获取、缓存、失效、SSR 与无限加载 |
156
156
  | `fec-state-management` | 状态归属、store 选型、URL/服务端/表单/本地状态边界 |
157
- | `fec-form-handling` | React Hook Form + Zod 表单、动态字段、上传、多步流程 |
157
+ | `fec-form-handling` | 跨框架表单选型、schema 校验、动态字段、上传、多步流程 |
158
158
  | `fec-tailwind-design-system` | Tailwind token、主题扩展、组件变体、class 治理和暗色模式 |
159
159
  | `fec-responsive-layout` | 移动优先布局、容器查询、数据密集型响应式界面 |
160
160
  | `fec-browser-storage` | localStorage/sessionStorage/IndexedDB/Cookies 选型与安全持久化 |
161
161
  | `fec-route-protection` | React Router、Next.js、Vue Router、Nuxt 的权限路由保护 |
162
162
  | `fec-component-testing` | RTL / Vue Test Utils 组件测试与回归用例 |
163
163
  | `fec-storybook-component-doc` | Storybook 组件文档、Addon、MDX、交互与视觉测试集成 |
164
- | `fec-list-virtualization` | react-window / TanStack Virtual 大列表虚拟滚动 |
164
+ | `fec-list-virtualization` | 按框架选型的大列表虚拟滚动、测量、网格和无限滚动 |
165
165
  | `fec-pwa-implementation` | PWA manifest、Service Worker、离线缓存与安装提示 |
166
166
  | `fec-web-workers` | Web Worker、Transferable、Comlink、Worker 池 |
167
167
  | `fec-canvas-threejs` | Canvas 2D、Three.js、React Three Fiber、WebGL 性能与可访问性 |
@@ -195,19 +195,19 @@ frontend-craft/
195
195
  | 按设计稿 / 截图实现 UI | `fec-implement-from-design` | 「请按 Figma 节点 `123:456` 实现该界面:间距与设计 Token 对齐,复用现有 `Button`,并说明假设条件。」 |
196
196
  | CI 或本地脚本失败 | `fec-validation-fix` | 「`pnpm lint` 和 `pnpm test` 都挂了,请定位根因并修复,不要放宽类型或跳过检查。」 |
197
197
  | 维护 jQuery / MPA 老页面 | `fec-legacy-web-standard` | 「`public/js/legacy/*.js` 仍在生产使用,请在保持行为的前提下给出可维护性改进与模式建议。」 |
198
- | 规划 jQuery → React/Vue 迁移 | `fec-legacy-to-modern-migration` | 「我们有 `static/app.js` 的 jQuery + 多页应用,请输出迁到 React + TypeScript 的分阶段方案、风险与里程碑。」 |
198
+ | 规划遗留前端现代化 | `fec-legacy-to-modern-migration` | 「我们有 `static/app.js` 的 jQuery + 多页应用,请评估保留 MPA、局部现代化或迁到目标栈的分阶段方案、风险与里程碑。」 |
199
199
  | 规划前端测试覆盖 | `fec-testing-strategy` | 「这次 checkout 重构先别急着写测试,请把风险映射到静态检查、单元/组件、E2E、视觉、无障碍和安全覆盖。」 |
200
200
  | 补充或稳定 E2E | `fec-e2e-testing` | 「请用 Playwright 给登录流程加冒烟用例:目录清晰、使用 Page Object,并说明如何在 CI 里跑。」 |
201
201
  | Next.js App Router 功能 | `fec-nextjs-project-standard` | 「请评审 `app/(dashboard)/reports/page.tsx` 及相关 server actions 是否符合 Next.js App Router 最佳实践(数据获取、错误、元数据等)。」 |
202
202
  | Nuxt 3 页面或布局 | `fec-nuxt-project-standard` | 「请评审 `pages/admin/*.vue` 与 `composables/useApi.ts` 是否符合 Nuxt 3 的 SSR、数据与组合式用法惯例。」 |
203
203
  | Monorepo 边界与任务编排 | `fec-monorepo-project-standard` | 「`apps/web` 依赖 `packages/ui`,请检查包边界、workspace 配置和 Turborepo 任务图是否有问题。」 |
204
- | 服务端数据获取 | `fec-data-fetching` | 「请评审 `src/queries/useReports.ts` 的 TanStack Query 模式:缓存 key、失效策略和乐观更新。」 |
204
+ | 服务端数据获取 | `fec-data-fetching` | 「请评审 `src/data/reports.ts` 的服务端状态获取:缓存 key、失效策略、SSR 水合,以及是否需要查询库。」 |
205
205
  | 状态归属与 store 选型 | `fec-state-management` | 「请审计 dashboard 的状态:哪些属于 URL 参数、TanStack Query、本地 state 或全局 store,并给出安全迁移方案。」 |
206
- | 复杂表单与校验 | `fec-form-handling` | 「用 React Hook Form + Zod 构建多步注册表单,包含文件上传和动态条件字段。」 |
206
+ | 复杂表单与校验 | `fec-form-handling` | 「构建多步注册表单:按项目框架选择表单库和 schema 校验方案,包含文件上传和动态条件字段。」 |
207
207
  | 为应用添加路由守卫 | `fec-route-protection` | 「为 React Router 的 `/admin` 路由做权限保护:未登录用户重定向,基于角色控制访问。」 |
208
208
  | 编写组件单元测试 | `fec-component-testing` | 「为 `src/components/UserCard.tsx` 编写 RTL 测试:渲染、user-event 交互和快照回归用例。」 |
209
209
  | 组件库文档化 | `fec-storybook-component-doc` | 「为 `packages/ui/` 搭建 Storybook:MDX 文档、无障碍 addon 和交互测试。」 |
210
- | 渲染上万条列表数据 | `fec-list-virtualization` | 「`ProductList` 渲染上万行太卡,请用 react-window 或 TanStack Virtual 做虚拟滚动并测量滚动性能。」 |
210
+ | 渲染上万条列表数据 | `fec-list-virtualization` | 「`ProductList` 渲染上万行太卡,请按现有框架、动态高度、浏览器查找和 SEO 约束选择虚拟滚动方案并测量性能。」 |
211
211
  | 添加离线支持 | `fec-pwa-implementation` | 「把这个 React 应用做成 PWA:manifest、Service Worker、离线缓存策略和安装提示。」 |
212
212
  | 重计算移出主线程 | `fec-web-workers` | 「把图片处理逻辑移到 Web Worker,用 Comlink 通信,保持 UI 响应。」 |
213
213
  | 构建交互式 3D 场景 | `fec-canvas-threejs` | 「在 `src/components/ProductViewer.tsx` 添加 Three.js 产品展示,兼顾性能和降级方案。」 |