@bovinphang/frontend-craft 2.7.0 → 2.8.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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +34 -0
- package/CHANGELOG.zh-CN.md +34 -0
- package/README.md +1 -1
- package/README.openclaw.md +99 -43
- package/README.openclaw.zh-CN.md +99 -43
- package/README.zh-CN.md +1 -1
- package/agents/fec-architect.md +70 -70
- package/agents/fec-code-reviewer.md +82 -82
- package/agents/fec-debugger.md +20 -20
- package/agents/fec-design-token-mapper.md +36 -36
- package/agents/fec-doc-updater.md +13 -13
- package/agents/fec-e2e-runner.md +45 -45
- package/agents/fec-figma-implementer.md +59 -59
- package/agents/fec-performance-optimizer.md +128 -128
- package/agents/fec-refactor-cleaner.md +14 -14
- package/agents/fec-security-reviewer.md +66 -67
- package/agents/fec-test-planner.md +27 -27
- package/agents/fec-typescript-reviewer.md +87 -87
- package/agents/fec-ui-checker.md +74 -74
- package/commands/fec-debug.md +19 -19
- package/commands/fec-doc-sync.md +11 -11
- package/commands/fec-init.md +37 -38
- package/commands/fec-plan.md +58 -58
- package/commands/fec-refactor-clean.md +11 -11
- package/commands/fec-review.md +41 -41
- package/commands/fec-scaffold.md +41 -41
- package/commands/fec-tdd.md +13 -13
- package/dist/bin/frontend-craft.js +29 -27
- package/docs/example-prompts.md +3 -0
- package/docs/ja-JP/README.md +1 -1
- package/docs/ko-KR/README.md +1 -1
- package/docs/project-structure.md +13 -5
- package/docs/zh-CN/example-prompts.md +3 -0
- package/docs/zh-CN/project-structure.md +6 -1
- package/docs/zh-TW/README.md +1 -1
- package/localized/zh-CN/agents/fec-architect.md +125 -0
- package/localized/zh-CN/agents/fec-code-reviewer.md +152 -0
- package/localized/zh-CN/agents/fec-debugger.md +44 -0
- package/localized/zh-CN/agents/fec-design-token-mapper.md +75 -0
- package/localized/zh-CN/agents/fec-doc-updater.md +30 -0
- package/localized/zh-CN/agents/fec-e2e-runner.md +107 -0
- package/localized/zh-CN/agents/fec-figma-implementer.md +104 -0
- package/localized/zh-CN/agents/fec-performance-optimizer.md +293 -0
- package/localized/zh-CN/agents/fec-refactor-cleaner.md +32 -0
- package/localized/zh-CN/agents/fec-security-reviewer.md +116 -0
- package/localized/zh-CN/agents/fec-test-planner.md +50 -0
- package/localized/zh-CN/agents/fec-typescript-reviewer.md +142 -0
- package/localized/zh-CN/agents/fec-ui-checker.md +120 -0
- package/localized/zh-CN/commands/fec-debug.md +30 -0
- package/localized/zh-CN/commands/fec-doc-sync.md +19 -0
- package/localized/zh-CN/commands/fec-init.md +70 -0
- package/localized/zh-CN/commands/fec-plan.md +94 -0
- package/localized/zh-CN/commands/fec-refactor-clean.md +19 -0
- package/localized/zh-CN/commands/fec-review.md +66 -0
- package/localized/zh-CN/commands/fec-scaffold.md +205 -0
- package/localized/zh-CN/commands/fec-tdd.md +21 -0
- package/localized/zh-CN/skills/TEMPLATE.md +155 -0
- package/localized/zh-CN/skills/eval_queries.json +1013 -0
- package/localized/zh-CN/skills/fec-accessibility-check/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/report-template.md +23 -0
- package/localized/zh-CN/skills/fec-accessibility-check/references/screen-reader-testing.md +33 -0
- package/localized/zh-CN/skills/fec-alchemy/SKILL.md +74 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/absorption-plan-template.md +47 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/intake-template.md +55 -0
- package/localized/zh-CN/skills/fec-alchemy/assets/review-checklist.md +31 -0
- package/localized/zh-CN/skills/fec-alchemy/references/methodology.md +94 -0
- package/localized/zh-CN/skills/fec-alchemy/references/originality-and-licensing.md +57 -0
- package/localized/zh-CN/skills/fec-api-integration/SKILL.md +78 -0
- package/localized/zh-CN/skills/fec-api-integration/references/integration-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-backend-requirements-handoff/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-browser-storage/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-browser-storage/references/storage-patterns.md +65 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/SKILL.md +66 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/rendering-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +67 -0
- package/localized/zh-CN/skills/fec-code-review/SKILL.md +143 -0
- package/localized/zh-CN/skills/fec-code-review/references/report-template.md +29 -0
- package/localized/zh-CN/skills/fec-component-testing/SKILL.md +119 -0
- package/localized/zh-CN/skills/fec-data-fetching/SKILL.md +62 -0
- package/localized/zh-CN/skills/fec-data-fetching/references/query-patterns.md +103 -0
- package/localized/zh-CN/skills/fec-debug-framework/SKILL.md +157 -0
- package/localized/zh-CN/skills/fec-debug-framework/references/report-template.md +58 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +56 -0
- package/localized/zh-CN/skills/fec-doc-sync/SKILL.md +39 -0
- package/localized/zh-CN/skills/fec-drawio-studio/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +10 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/brand-icons.json +878 -0
- package/localized/zh-CN/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/data-residency.md +27 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/diagram-patterns.md +60 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/layout-and-export.md +72 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/troubleshooting.md +29 -0
- package/localized/zh-CN/skills/fec-drawio-studio/references/xml-and-mermaid.md +58 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/brand-symbols.mjs +99 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-lint.mjs +205 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/diagram-url.mjs +102 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/layout-graph.mjs +107 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/png-embed-fix.mjs +26 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-go-packages.mjs +36 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-js-modules.mjs +52 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-classes.mjs +30 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-python-modules.mjs +55 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-rust-modules.mjs +35 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/scan-ts-modules.mjs +7 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/shape-query.mjs +121 -0
- package/localized/zh-CN/skills/fec-drawio-studio/scripts/studio-core.mjs +139 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/corporate.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/default.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/built-in/handdrawn.json +49 -0
- package/localized/zh-CN/skills/fec-drawio-studio/styles/schema.json +112 -0
- package/localized/zh-CN/skills/fec-e2e-testing/SKILL.md +42 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-ci-reporting.md +62 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-special-scenarios.md +52 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/e2e-visual-regression.md +60 -0
- package/localized/zh-CN/skills/fec-e2e-testing/references/playwright-patterns.md +95 -0
- package/localized/zh-CN/skills/fec-form-handling/SKILL.md +76 -0
- package/localized/zh-CN/skills/fec-form-handling/references/advanced-form-patterns.md +101 -0
- package/localized/zh-CN/skills/fec-image-generation/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/localized/zh-CN/skills/fec-image-generation/references/artifact-routing.md +80 -0
- package/localized/zh-CN/skills/fec-image-generation/references/diagram-workflows.md +74 -0
- package/localized/zh-CN/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/localized/zh-CN/skills/fec-image-generation/references/png-qa-autofix.md +30 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/png-qa.mjs +431 -0
- package/localized/zh-CN/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/localized/zh-CN/skills/fec-implement-from-design/SKILL.md +129 -0
- package/localized/zh-CN/skills/fec-implement-from-design/references/design-plan-template.md +36 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/SKILL.md +46 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +110 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +41 -0
- package/localized/zh-CN/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +48 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-legacy-web-standard/references/legacy-patterns.md +85 -0
- package/localized/zh-CN/skills/fec-list-virtualization/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-list-virtualization/references/virtualization-patterns.md +80 -0
- package/localized/zh-CN/skills/fec-monorepo-project-standard/SKILL.md +142 -0
- package/localized/zh-CN/skills/fec-motion-interaction/SKILL.md +73 -0
- package/localized/zh-CN/skills/fec-motion-interaction/references/motion-patterns.md +112 -0
- package/localized/zh-CN/skills/fec-nextjs-project-standard/SKILL.md +123 -0
- package/localized/zh-CN/skills/fec-nuxt-project-standard/SKILL.md +122 -0
- package/localized/zh-CN/skills/fec-performance-optimization/SKILL.md +80 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/framework-performance-patterns.md +38 -0
- package/localized/zh-CN/skills/fec-performance-optimization/references/report-template.md +59 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/manifest-and-icons.md +53 -0
- package/localized/zh-CN/skills/fec-pwa-implementation/references/service-worker-workbox.md +68 -0
- package/localized/zh-CN/skills/fec-react-project-standard/SKILL.md +91 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-performance-patterns.md +35 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-project-structure.md +197 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-quality-patterns.md +131 -0
- package/localized/zh-CN/skills/fec-react-project-standard/references/react-runtime-patterns.md +293 -0
- package/localized/zh-CN/skills/fec-refactor-clean/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-refactor-clean/references/report-template.md +42 -0
- package/localized/zh-CN/skills/fec-responsive-layout/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-responsive-layout/references/responsive-layout-patterns.md +70 -0
- package/localized/zh-CN/skills/fec-route-protection/SKILL.md +135 -0
- package/localized/zh-CN/skills/fec-security-review/SKILL.md +38 -0
- package/localized/zh-CN/skills/fec-security-review/references/report-template.md +27 -0
- package/localized/zh-CN/skills/fec-security-review/references/security-checklist.md +64 -0
- package/localized/zh-CN/skills/fec-source-driven-development/SKILL.md +87 -0
- package/localized/zh-CN/skills/fec-state-management/SKILL.md +140 -0
- package/localized/zh-CN/skills/fec-state-management/references/state-patterns.md +109 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/SKILL.md +37 -0
- package/localized/zh-CN/skills/fec-storybook-component-doc/references/story-patterns.md +118 -0
- package/localized/zh-CN/skills/fec-svg-animation/SKILL.md +148 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/SKILL.md +34 -0
- package/localized/zh-CN/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +59 -0
- package/localized/zh-CN/skills/fec-tdd-workflow/SKILL.md +52 -0
- package/localized/zh-CN/skills/fec-testing-strategy/SKILL.md +45 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/SKILL.md +54 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety-patterns.md +102 -0
- package/localized/zh-CN/skills/fec-typescript-project-standard/references/type-safety.md +148 -0
- package/localized/zh-CN/skills/fec-ui-design/SKILL.md +108 -0
- package/localized/zh-CN/skills/fec-ui-design/data/product-rules.json +231 -0
- package/localized/zh-CN/skills/fec-ui-design/data/stack-ui-rules.json +146 -0
- package/localized/zh-CN/skills/fec-ui-design/data/style-archetypes.json +373 -0
- package/localized/zh-CN/skills/fec-ui-design/data/ux-quality-rules.json +203 -0
- package/localized/zh-CN/skills/fec-ui-design/references/design-intelligence.md +97 -0
- package/localized/zh-CN/skills/fec-ui-design/references/master-page-overrides.md +30 -0
- package/localized/zh-CN/skills/fec-ui-design/references/pre-delivery-checklist.md +39 -0
- package/localized/zh-CN/skills/fec-ui-design/scripts/design-system.mjs +648 -0
- package/localized/zh-CN/skills/fec-validation-fix/SKILL.md +51 -0
- package/localized/zh-CN/skills/fec-validation-fix/references/report-template.md +43 -0
- package/localized/zh-CN/skills/fec-vite-project-standard/SKILL.md +83 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/SKILL.md +58 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +162 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +13 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-project-structure.md +176 -0
- package/localized/zh-CN/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +216 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/SKILL.md +61 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/data/starter-themes.json +59 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/chapter-craft.md +37 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/content-plan.md +38 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/recording-and-audio.md +33 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/references/theme-system.md +36 -0
- package/localized/zh-CN/skills/fec-web-video-presentation/scripts/create-video-presentation.mjs +430 -0
- package/localized/zh-CN/skills/fec-web-workers/SKILL.md +35 -0
- package/localized/zh-CN/skills/fec-web-workers/references/advanced-workers.md +54 -0
- package/localized/zh-CN/skills/fec-web-workers/references/basic-worker.md +67 -0
- package/localized/zh-CN/skills/metadata.json +1646 -0
- package/localized/zh-CN/skills/relations.json +755 -0
- package/localized/zh-CN/templates/claude/CLAUDE.md +106 -0
- package/localized/zh-CN/templates/claude/settings.json +62 -0
- package/localized/zh-CN/templates/codex/AGENTS.md +105 -0
- package/localized/zh-CN/templates/codex/config.toml +32 -0
- package/localized/zh-CN/templates/openclaw/AGENTS.md +101 -0
- package/localized/zh-CN/templates/openclaw/OPENCLAW-CONFIG.md +12 -0
- package/localized/zh-CN/templates/shared/rules/fec-agent-workflow.md +54 -0
- package/localized/zh-CN/templates/shared/rules/fec-api-layer.md +99 -0
- package/localized/zh-CN/templates/shared/rules/fec-ci-cd.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-code-comments.md +33 -0
- package/localized/zh-CN/templates/shared/rules/fec-design-system.md +72 -0
- package/localized/zh-CN/templates/shared/rules/fec-error-handling.md +56 -0
- package/localized/zh-CN/templates/shared/rules/fec-git-conventions.md +73 -0
- package/localized/zh-CN/templates/shared/rules/fec-i18n.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-naming-conventions.md +120 -0
- package/localized/zh-CN/templates/shared/rules/fec-performance.md +101 -0
- package/localized/zh-CN/templates/shared/rules/fec-react.md +82 -0
- package/localized/zh-CN/templates/shared/rules/fec-refactoring.md +47 -0
- package/localized/zh-CN/templates/shared/rules/fec-rendering-patterns.md +40 -0
- package/localized/zh-CN/templates/shared/rules/fec-responsive-design.md +50 -0
- package/localized/zh-CN/templates/shared/rules/fec-source-driven-development.md +31 -0
- package/localized/zh-CN/templates/shared/rules/fec-state-management.md +60 -0
- package/localized/zh-CN/templates/shared/rules/fec-testing.md +98 -0
- package/localized/zh-CN/templates/shared/rules/fec-typescript.md +112 -0
- package/localized/zh-CN/templates/shared/rules/fec-vue.md +64 -0
- package/localized/zh-CN/templates/shared/rules/fec-working-modes.md +50 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +3 -2
- package/skills/TEMPLATE.md +74 -74
- package/skills/eval_queries.json +678 -678
- package/skills/fec-accessibility-check/SKILL.md +21 -21
- package/skills/fec-accessibility-check/references/report-template.md +12 -12
- package/skills/fec-accessibility-check/references/screen-reader-testing.md +24 -24
- package/skills/fec-alchemy/SKILL.md +50 -50
- package/skills/fec-alchemy/assets/absorption-plan-template.md +32 -32
- package/skills/fec-alchemy/assets/intake-template.md +55 -55
- package/skills/fec-alchemy/assets/review-checklist.md +23 -23
- package/skills/fec-alchemy/references/methodology.md +66 -66
- package/skills/fec-alchemy/references/originality-and-licensing.md +42 -42
- package/skills/fec-api-integration/SKILL.md +61 -61
- package/skills/fec-api-integration/references/integration-patterns.md +30 -30
- package/skills/fec-backend-requirements-handoff/SKILL.md +25 -25
- package/skills/fec-browser-storage/SKILL.md +16 -16
- package/skills/fec-browser-storage/references/storage-patterns.md +16 -16
- package/skills/fec-canvas-threejs/SKILL.md +21 -21
- package/skills/fec-canvas-threejs/references/rendering-patterns.md +10 -10
- package/skills/fec-canvas-threejs/references/shader-webgl-patterns.md +37 -37
- package/skills/fec-code-review/SKILL.md +94 -94
- package/skills/fec-code-review/references/report-template.md +13 -13
- package/skills/fec-component-testing/SKILL.md +39 -39
- package/skills/fec-data-fetching/SKILL.md +16 -16
- package/skills/fec-data-fetching/references/query-patterns.md +27 -27
- package/skills/fec-debug-framework/SKILL.md +95 -95
- package/skills/fec-debug-framework/references/report-template.md +34 -34
- package/skills/fec-dependency-upgrade/SKILL.md +17 -17
- package/skills/fec-dependency-upgrade/references/dependency-upgrade-workflow.md +31 -31
- package/skills/fec-doc-sync/SKILL.md +23 -23
- package/skills/fec-drawio-studio/SKILL.md +42 -38
- package/skills/fec-drawio-studio/data/THIRD_PARTY_NOTICES.md +1 -1
- package/skills/fec-drawio-studio/data/shape-index.json +83570 -0
- package/skills/fec-drawio-studio/references/diagram-patterns.md +19 -0
- package/skills/fec-drawio-studio/references/flowchart-quality.md +49 -0
- package/skills/fec-drawio-studio/references/layout-and-export.md +18 -3
- package/skills/fec-drawio-studio/references/xml-and-mermaid.md +5 -1
- package/skills/fec-drawio-studio/scripts/diagram-lint.mjs +62 -0
- package/skills/fec-drawio-studio/scripts/drawio-export.mjs +134 -0
- package/skills/fec-drawio-studio/scripts/shape-query.mjs +55 -15
- package/skills/fec-e2e-testing/SKILL.md +24 -24
- package/skills/fec-e2e-testing/references/e2e-ci-reporting.md +20 -20
- package/skills/fec-e2e-testing/references/e2e-special-scenarios.md +10 -10
- package/skills/fec-e2e-testing/references/e2e-visual-regression.md +17 -17
- package/skills/fec-e2e-testing/references/playwright-patterns.md +6 -6
- package/skills/fec-form-handling/SKILL.md +21 -21
- package/skills/fec-form-handling/references/advanced-form-patterns.md +41 -41
- package/skills/fec-image-generation/SKILL.md +54 -29
- package/skills/fec-image-generation/assets/interactive-diagram.html +371 -0
- package/skills/fec-image-generation/references/diagram-workflows.md +33 -2
- package/skills/fec-image-generation/references/html-technical-diagrams.md +236 -0
- package/skills/fec-image-generation/scripts/export-diagram.mjs +364 -0
- package/skills/fec-image-generation/scripts/interactive-diagram-server.mjs +654 -0
- package/skills/fec-image-generation/scripts/tech-diagram-render.mjs +1397 -0
- package/skills/fec-implement-from-design/SKILL.md +81 -81
- package/skills/fec-implement-from-design/references/design-plan-template.md +16 -16
- package/skills/fec-legacy-to-modern-migration/SKILL.md +29 -29
- package/skills/fec-legacy-to-modern-migration/references/migration-execution-checklist.md +81 -81
- package/skills/fec-legacy-to-modern-migration/references/migration-report-template.md +37 -37
- package/skills/fec-legacy-to-modern-migration/references/migration-strategy-and-mapping.md +31 -31
- package/skills/fec-legacy-web-standard/SKILL.md +17 -17
- package/skills/fec-legacy-web-standard/references/legacy-patterns.md +16 -16
- package/skills/fec-list-virtualization/SKILL.md +16 -16
- package/skills/fec-list-virtualization/references/virtualization-patterns.md +31 -31
- package/skills/fec-monorepo-project-standard/SKILL.md +52 -52
- package/skills/fec-motion-interaction/SKILL.md +51 -51
- package/skills/fec-motion-interaction/references/motion-patterns.md +11 -11
- package/skills/fec-nextjs-project-standard/SKILL.md +64 -64
- package/skills/fec-nuxt-project-standard/SKILL.md +57 -57
- package/skills/fec-performance-optimization/SKILL.md +54 -54
- package/skills/fec-performance-optimization/references/framework-performance-patterns.md +23 -23
- package/skills/fec-performance-optimization/references/report-template.md +31 -31
- package/skills/fec-pwa-implementation/SKILL.md +17 -17
- package/skills/fec-pwa-implementation/references/manifest-and-icons.md +12 -12
- package/skills/fec-pwa-implementation/references/service-worker-workbox.md +13 -13
- package/skills/fec-react-project-standard/SKILL.md +72 -72
- package/skills/fec-react-project-standard/references/react-performance-patterns.md +28 -28
- package/skills/fec-react-project-standard/references/react-project-structure.md +112 -112
- package/skills/fec-react-project-standard/references/react-quality-patterns.md +72 -72
- package/skills/fec-react-project-standard/references/react-runtime-patterns.md +94 -94
- package/skills/fec-refactor-clean/SKILL.md +30 -30
- package/skills/fec-refactor-clean/references/report-template.md +23 -23
- package/skills/fec-responsive-layout/SKILL.md +17 -17
- package/skills/fec-responsive-layout/references/responsive-layout-patterns.md +37 -37
- package/skills/fec-route-protection/SKILL.md +26 -26
- package/skills/fec-security-review/SKILL.md +20 -20
- package/skills/fec-security-review/references/report-template.md +12 -12
- package/skills/fec-security-review/references/security-checklist.md +27 -27
- package/skills/fec-source-driven-development/SKILL.md +59 -59
- package/skills/fec-state-management/SKILL.md +34 -34
- package/skills/fec-state-management/references/state-patterns.md +19 -19
- package/skills/fec-storybook-component-doc/SKILL.md +19 -19
- package/skills/fec-storybook-component-doc/references/story-patterns.md +12 -12
- package/skills/fec-svg-animation/SKILL.md +32 -32
- package/skills/fec-tailwind-design-system/SKILL.md +17 -17
- package/skills/fec-tailwind-design-system/references/tailwind-system-patterns.md +36 -36
- package/skills/fec-tdd-workflow/SKILL.md +28 -28
- package/skills/fec-testing-strategy/SKILL.md +29 -29
- package/skills/fec-typescript-project-standard/SKILL.md +38 -38
- package/skills/fec-typescript-project-standard/references/type-safety-patterns.md +20 -20
- package/skills/fec-typescript-project-standard/references/type-safety.md +18 -18
- package/skills/fec-ui-design/SKILL.md +90 -90
- package/skills/fec-ui-design/references/design-intelligence.md +61 -61
- package/skills/fec-ui-design/references/master-page-overrides.md +15 -15
- package/skills/fec-ui-design/references/pre-delivery-checklist.md +38 -38
- package/skills/fec-validation-fix/SKILL.md +26 -26
- package/skills/fec-validation-fix/references/report-template.md +25 -25
- package/skills/fec-vite-project-standard/SKILL.md +39 -39
- package/skills/fec-vue3-project-standard/SKILL.md +38 -38
- package/skills/fec-vue3-project-standard/references/vue3-composables-routing.md +36 -36
- package/skills/fec-vue3-project-standard/references/vue3-performance-patterns.md +8 -8
- package/skills/fec-vue3-project-standard/references/vue3-project-structure.md +112 -112
- package/skills/fec-vue3-project-standard/references/vue3-state-api-quality.md +74 -74
- package/skills/fec-web-video-presentation/SKILL.md +33 -33
- package/skills/fec-web-workers/SKILL.md +16 -16
- package/skills/fec-web-workers/references/advanced-workers.md +13 -13
- package/skills/fec-web-workers/references/basic-worker.md +8 -8
- package/skills/metadata.json +121 -115
- package/skills/relations.json +4 -0
- package/templates/claude/CLAUDE.md +60 -60
- package/templates/codex/AGENTS.md +76 -76
- package/templates/codex/config.toml +4 -4
- package/templates/openclaw/AGENTS.md +68 -68
- package/templates/openclaw/OPENCLAW-CONFIG.md +8 -8
- package/templates/shared/rules/fec-agent-workflow.md +40 -40
- package/templates/shared/rules/fec-api-layer.md +52 -52
- package/templates/shared/rules/fec-ci-cd.md +29 -29
- package/templates/shared/rules/fec-code-comments.md +22 -22
- package/templates/shared/rules/fec-design-system.md +53 -53
- package/templates/shared/rules/fec-error-handling.md +40 -40
- package/templates/shared/rules/fec-git-conventions.md +42 -42
- package/templates/shared/rules/fec-i18n.md +48 -48
- package/templates/shared/rules/fec-naming-conventions.md +91 -91
- package/templates/shared/rules/fec-performance.md +78 -78
- package/templates/shared/rules/fec-react.md +58 -58
- package/templates/shared/rules/fec-refactoring.md +34 -34
- package/templates/shared/rules/fec-rendering-patterns.md +36 -36
- package/templates/shared/rules/fec-responsive-design.md +37 -37
- package/templates/shared/rules/fec-source-driven-development.md +22 -22
- package/templates/shared/rules/fec-state-management.md +56 -56
- package/templates/shared/rules/fec-testing.md +64 -64
- package/templates/shared/rules/fec-typescript.md +75 -75
- package/templates/shared/rules/fec-vue.md +42 -42
- package/templates/shared/rules/fec-working-modes.md +34 -34
- package/skills/fec-drawio-studio/data/shape-index.json.gz +0 -0
|
@@ -1,94 +1,94 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Project absorption methodology
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Target
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This document is used to extend the core process in `SKILL.md`, suitable for larger "reference system to target project" capability absorption tasks. A reference system can be a code base, product, service, framework, library, CLI, plug-in, documentation system, or AI/Agent toolchain.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Phase 1: Establish Target Project Baseline
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Before diving into the reference project, establish a brief baseline for the target project:
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
11
|
+
- What is the purpose of the target project statement?
|
|
12
|
+
- What are the current top-level capabilities?
|
|
13
|
+
- What entry points, extension points and user workflows already exist?
|
|
14
|
+
- Which areas are still under active maintenance?
|
|
15
|
+
- Which areas are fragile, complex or over-engineered?
|
|
16
|
+
- What testing and verification commands are in place?
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Don’t prematurely formulate renovation recommendations before understanding the target project baseline.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## Phase 2: Scan Reference Projects
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Scan high-signal materials in reference systems:
|
|
23
23
|
|
|
24
|
-
- README
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
24
|
+
- README and documentation: project location, usage model, installation, configuration.
|
|
25
|
+
- Package or build metadata: technology selection, dependency scope, script commands.
|
|
26
|
+
- Source code layout: architecture, module boundaries, naming conventions.
|
|
27
|
+
- Capability domain: product capabilities, architectural patterns, domain models, interface protocols, data flow, runtime behavior, development experience, quality system, delivery process, document knowledge, and ecological expansion.
|
|
28
|
+
- Project shape probe: select relevant directories and behavior entries according to the reference system type, without assuming that all projects have the same structure.
|
|
29
|
+
- Testing: expected behavior and edge scenarios.
|
|
30
|
+
- Example: User-facing workflow and quality of onboarding experience.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
When recording observations, they should be recorded as “competencies,” not “documents.” For example, write "Has guided configuration wizard with environment checks" instead of "Copy setup.ts".
|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### Project shape probe
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
Select the scan angle according to the actual shape of the target and reference system:
|
|
37
37
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- AI/Agent
|
|
42
|
-
-
|
|
43
|
-
-
|
|
38
|
+
- Front-end projects: pages, components, routing, state, data requests, forms, design systems, accessibility, performance, build.
|
|
39
|
+
- Backend projects: API, service boundary, database, queue, cache, authentication and authorization, task scheduling, observability, deployment.
|
|
40
|
+
- Tool or CLI project: command model, configuration, plugin mechanism, error output, installation distribution, templates.
|
|
41
|
+
- AI/Agent projects: skills, commands, hooks, rules, agents, MCP, prompts, workflow.
|
|
42
|
+
- Library project: public API, types, compatibility, build artifacts, examples, version policy.
|
|
43
|
+
- Documentation or knowledge base project: information architecture, navigation, examples, search, versioning, contribution process, release cadence.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
If the project spans multiple modalities, prioritize 1 to 3 perspectives that are directly related to user goals to avoid expanding the absorption task into a full warehouse audit.
|
|
46
46
|
|
|
47
|
-
##
|
|
47
|
+
## Phase 3: Candidate Ability Scoring
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
Rate each candidate on a scale of 1 to 5.
|
|
50
50
|
|
|
51
|
-
|
|
|
51
|
+
| Dimensions | Questions |
|
|
52
52
|
|---|---|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
53
|
+
| User value | Can it substantially improve the workflow of target users? |
|
|
54
|
+
| Fit | Is it consistent with the target project's architecture and roadmap? |
|
|
55
|
+
| Feasibility of originalization | Is it possible to recreate a protected expression without copying it? |
|
|
56
|
+
| Complexity | Can it be delivered safely and maintained over the long term? |
|
|
57
|
+
| Verifiability | Can correctness be verified through testing or review? |
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
Prioritize high-value, high-fit, low-risk candidates.
|
|
60
60
|
|
|
61
|
-
##
|
|
61
|
+
## Phase 4: Absorption Strategy
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
Choose a strategy for each candidate:
|
|
64
64
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
65
|
+
- **Enhancement**: Improve the existing abilities of the target item.
|
|
66
|
+
- **New**: Introducing new target project native capabilities.
|
|
67
|
+
- **Split**: Split an overloaded target concept or reference concept.
|
|
68
|
+
- **Merge**: Merge overlapping concepts in the target project.
|
|
69
|
+
- **Replace**: Remove weaker goal implementations once a more secure design is ready.
|
|
70
|
+
- **Documentation**: Only add knowledge, do not change the code.
|
|
71
|
+
- **Rejection**: Defer or give up clearly and explain the reasons.
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## Phase 5: Implementation Sequence
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
It is recommended to proceed in the following order:
|
|
76
76
|
|
|
77
|
-
1.
|
|
78
|
-
2.
|
|
79
|
-
3.
|
|
80
|
-
4.
|
|
81
|
-
5.
|
|
82
|
-
6.
|
|
77
|
+
1. Documentation and boundary clarification.
|
|
78
|
+
2. Test or validate scaffolding.
|
|
79
|
+
3. Minimized target project native implementation.
|
|
80
|
+
4. Integrate with existing workflows.
|
|
81
|
+
5. Clean up duplicate logic and abandoned paths.
|
|
82
|
+
6. User-oriented documentation and examples.
|
|
83
83
|
|
|
84
|
-
##
|
|
84
|
+
## Stage 6: Review Questions
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
Before finalizing, answer the following questions:
|
|
87
87
|
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
88
|
+
- Will the target items remain consistent after assimilation?
|
|
89
|
+
- Are module boundaries preserved or improved?
|
|
90
|
+
- Is each new ability discoverable?
|
|
91
|
+
- Are there overlapping capabilities, portals, abstractions, configurations, runtime processes, tool functions, document commitments, or user workflows?
|
|
92
|
+
- Is there a good reason for adding new dependencies?
|
|
93
|
+
- Verify that the command was logged?
|
|
94
|
+
- Is the source of inspiration transparently stated without implying duplication of code?
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Originality and license restrictions
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Target
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
This process is used for legal, compliant, ethical, and maintainable adaptation. It should help users refine their ideas and recreate designs that fit the style of the target project, rather than pretending to be a copy.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Content that is generally safe to absorb
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
9
|
+
- High-level thinking and product concepts.
|
|
10
|
+
- Common architectural patterns.
|
|
11
|
+
- Publicly documented workflow.
|
|
12
|
+
- Behavioral needs expressed in own words.
|
|
13
|
+
- Algorithms and technologies that are standard, unprotectable or properly licensed.
|
|
14
|
+
- Configuration concepts recreated for the target environment.
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Content that needs to be handled with caution
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
18
|
+
- Large chunks of code from other projects.
|
|
19
|
+
- Unique text, prompts, examples, documents, graphics, names or brand expressions.
|
|
20
|
+
- Highly tied and non-obvious implementation structure to the reference project.
|
|
21
|
+
- Makefile containing license header or attribution requirements.
|
|
22
|
+
- Dependencies with restrictive license.
|
|
23
|
+
- Private or proprietary repositories.
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Security adaptation process
|
|
26
26
|
|
|
27
|
-
1.
|
|
28
|
-
2.
|
|
29
|
-
3.
|
|
30
|
-
4.
|
|
31
|
-
5.
|
|
32
|
-
6.
|
|
33
|
-
7.
|
|
34
|
-
8.
|
|
27
|
+
1. Summarize reference capabilities in neutral language.
|
|
28
|
+
2. Identify the problem it solves.
|
|
29
|
+
3. Independently design the original solution for the target project.
|
|
30
|
+
4. Implement new code using target project conventions.
|
|
31
|
+
5. Adjust concept naming to target project semantics.
|
|
32
|
+
6. Add tests based on desired behavior rather than on the internal implementation of the reference project.
|
|
33
|
+
7. When a license requires a signature, retain the necessary signature.
|
|
34
|
+
8. Document license uncertainty as a risk rather than ignoring it.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Risk Signal
|
|
37
37
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- Agent
|
|
41
|
-
-
|
|
42
|
-
-
|
|
38
|
+
- The output retains the same file structure and naming of the reference project without target project specific justification.
|
|
39
|
+
- The output contains a lot of identical or nearly identical code/text.
|
|
40
|
+
- The Agent cannot explain why the target design differs from the reference design.
|
|
41
|
+
- The new module has a high degree of overlap with the existing modules of the target project.
|
|
42
|
+
- The only reason is just "that's what the reference project does".
|
|
43
43
|
|
|
44
|
-
##
|
|
44
|
+
## Recommended statements in reports
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Recommended to use:
|
|
47
47
|
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
48
|
+
- "Inspired by the way reference projects are treated in..."
|
|
49
|
+
- "Reimplemented as a module that matches the style of the target project, for..."
|
|
50
|
+
- "The reference project solved this problem with X; this project chose Y because..."
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Avoid using:
|
|
53
53
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
54
|
+
- "Copied from..."
|
|
55
|
+
- "Exactly the same as..."
|
|
56
|
+
- "Hidden imitation..."
|
|
57
|
+
- "Make it seem irrelevant..."
|
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-api-integration
|
|
3
|
-
description: Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API
|
|
3
|
+
description: Use when designing, implementing, or reviewing frontend-to-backend API integration, typed API clients, REST/tRPC/OpenAPI client choices, auth refresh, API error mapping, upload flows, SSE/WebSocket/polling choices, CORS-facing frontend behavior, or cross-boundary loading/error states. Do not use for backend-only service architecture or TanStack Query cache policy alone; Chinese triggers include API integration, front-end and back-end joint debugging, typed API client, Interface error handling, SSE, WebSocket.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# API
|
|
6
|
+
# API integration
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Suitable for front-end and back-end boundary types, errors, authentication, uploads, real-time communication and user status design. Load [integration-patterns.md](references/integration-patterns.md) when specific code patterns are required.
|
|
9
9
|
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Standardize front-end API integration boundaries to make requests, errors, authentication, and real-time data maintainable.
|
|
13
13
|
|
|
14
14
|
## Procedure
|
|
15
15
|
|
|
16
|
-
1.
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
2.
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- 204
|
|
28
|
-
- TypeScript
|
|
29
|
-
|
|
30
|
-
3.
|
|
31
|
-
- 401
|
|
32
|
-
- 403
|
|
33
|
-
- 404
|
|
34
|
-
- 409
|
|
35
|
-
- 422
|
|
36
|
-
- 429/5xx
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
4.
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
5.
|
|
47
|
-
- Access token
|
|
48
|
-
- 401
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
6.
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
7.
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
16
|
+
1. Clarify interface ownership
|
|
17
|
+
- For TypeScript full stack in the same team, tRPC or shared schema can be considered.
|
|
18
|
+
- Multi-language or multi-consumer API preferred OpenAPI/GraphQL codegen.
|
|
19
|
+
- Typed fetch wrapper can be used for small internal applications, but types must be maintained centrally.
|
|
20
|
+
- Do not scatter `fetch`, URL, header, error parsing and token logic in components.
|
|
21
|
+
- Public interfaces need to specify versions, compatibility windows, obsolete field policies, and caller scope.
|
|
22
|
+
|
|
23
|
+
2. Establish client boundaries
|
|
24
|
+
- Handle base URL, credentials, JSON parsing, timeouts, cancellation and unified errors with an API client.
|
|
25
|
+
- The environment variable only reads the public prefix, and the private token does not enter the client bundle.
|
|
26
|
+
- The component only consumes domain functions or query/mutation hooks, and does not directly splice interface paths.
|
|
27
|
+
- 204, empty response, non-JSON error and network disconnection must have clear behavior.
|
|
28
|
+
- TypeScript contracts must cover request, response, error shapes, and pagination/cursor metadata.
|
|
29
|
+
|
|
30
|
+
3. Map user-understandable errors
|
|
31
|
+
- 401: Boot login after failed refresh.
|
|
32
|
+
- 403: Indicates insufficient permissions, do not retry.
|
|
33
|
+
- 404: Display missing status or return to the upper level entrance.
|
|
34
|
+
- 409: Prompt for conflict and next step.
|
|
35
|
+
- 422: Mapping field level error.
|
|
36
|
+
- 429/5xx/Network Error: Allow backoff to retry or show try again later.
|
|
37
|
+
- Unrecognized errors should fall into a unified fallback, and the original backend exception should not be exposed to the user.
|
|
38
|
+
- All errors should be attributed to user-recoverable actions: retry, log in again, modify input, return to the previous level, contact support, or try again later.
|
|
39
|
+
- The error object should retain the log-oriented trace id / request id, but the UI should not expose the internal stack, SQL, service name or sensitive fields.
|
|
40
|
+
|
|
41
|
+
4. Management interface evolution
|
|
42
|
+
- Compatible with new fields; deleting or renaming fields must go through the migration period, adaptation layer or double-write/double-read strategy.
|
|
43
|
+
- Capture breaking changes using schema, type generators or contract tests.
|
|
44
|
+
- Record status codes, error codes, idempotence, retry semantics and time zone/amount/enumeration rules for front-end and back-end collaboration items.
|
|
45
|
+
|
|
46
|
+
5. Handle authentication refresh
|
|
47
|
+
- Access token has a short life cycle, and refresh is prioritized in httpOnly cookies or server sessions.
|
|
48
|
+
- Only a single refresh of the queue is allowed after 401 to avoid multiple requests being refreshed at the same time.
|
|
49
|
+
- If the refresh fails, you need to clear the local identity status and jump to login.
|
|
50
|
+
- Do not put bearer token in URL, localStorage or logs.
|
|
51
|
+
|
|
52
|
+
6. Select the upload and real-time plan
|
|
53
|
+
- Multipart is available for small files; large files are given priority for pre-signed direct upload or multipart upload.
|
|
54
|
+
- Only use SSE for server push; use WebSocket for two-way collaboration, chat or multi-person status.
|
|
55
|
+
- Simple status refresh, low-frequency task progress can be polled, and stop conditions can be set.
|
|
56
|
+
- Both uploads and live connections require cancellation, reconnection, timeout and error UI.
|
|
57
|
+
|
|
58
|
+
7. Verify integration quality
|
|
59
|
+
- Check loading, empty, error, unauthorized, offline, retrying status.
|
|
60
|
+
- Confirm base URL, credentials, CORS, and status code behavior using the browser network panel.
|
|
61
|
+
- Use mock or test services to cover 401, 403, 422, 500, disconnection and cancellation requests.
|
|
62
|
+
- Verify that the client bundle does not contain private environment variables, server keys, or internal addresses.
|
|
63
|
+
- Add minimal testing for key API client behaviors to demonstrate that timeouts, cancellations, error mappings, and flush queues are expected.
|
|
64
|
+
- Verification error boundary cooperates with the request layer: rendering exceptions go to the Error Boundary, and request failures go to the recoverable UI, without swallowing each other.
|
|
65
65
|
|
|
66
66
|
## Constraints
|
|
67
67
|
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
68
|
+
- Do not manage token refresh, error format parsing, or retry strategies directly in page components.
|
|
69
|
+
- No blind automatic retries for 4xx business errors.
|
|
70
|
+
- Do not expose backend exception stacks, internal error codes or raw SQL/service names to users.
|
|
71
|
+
- Do not use localStorage to store high-value tokens; if legacy systems cannot be avoided, security review must be linked.
|
|
72
|
+
- No need to use WebSocket to replace simple polling, and no need to use polling to achieve high-frequency two-way collaboration.
|
|
73
|
+
- Do not allow uploads to be forwarded through the API server for large files unless there is an explicit compliance or scanning need.
|
|
74
|
+
- Do not directly expose temporary fields, database field names or backend internal error structures in the public interface.
|
|
75
75
|
|
|
76
76
|
## Expected Output
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
The output should include API client boundaries, interface type sources, error mappings, authentication refresh policies, upload/real-time schemes, and validation results. After completion, the component will not scatter request details, the user status will be intact, failure scenarios can be recovered, and the client will not leak the server key.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# API
|
|
1
|
+
# API integration implementation mode
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Typed Fetch client
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
export class ApiError extends Error {
|
|
@@ -8,7 +8,7 @@ export class ApiError extends Error {
|
|
|
8
8
|
public readonly status: number,
|
|
9
9
|
public readonly body: unknown,
|
|
10
10
|
) {
|
|
11
|
-
super(`API
|
|
11
|
+
super(`API request failed, status code ${status}`);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -36,45 +36,45 @@ export async function requestJson<T>(
|
|
|
36
36
|
}
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## User side error mapping
|
|
40
40
|
|
|
41
41
|
```ts
|
|
42
42
|
export function getApiMessage(error: unknown): string {
|
|
43
|
-
if (!(error instanceof ApiError)) return "
|
|
43
|
+
if (!(error instanceof ApiError)) return "The operation failed, please try again later.";
|
|
44
44
|
|
|
45
|
-
if (error.status === 401) return "
|
|
46
|
-
if (error.status === 403) return "
|
|
47
|
-
if (error.status === 404) return "
|
|
48
|
-
if (error.status === 409) return "
|
|
49
|
-
if (error.status === 422) return "
|
|
50
|
-
if (error.status === 429) return "
|
|
45
|
+
if (error.status === 401) return "Please log in again.";
|
|
46
|
+
if (error.status === 403) return "You do not have permission to perform this operation.";
|
|
47
|
+
if (error.status === 404) return "The requested resource no longer exists.";
|
|
48
|
+
if (error.status === 409) return "This change conflicts with the latest data.";
|
|
49
|
+
if (error.status === 422) return "Please check the red fields.";
|
|
50
|
+
if (error.status === 429) return "The request is too frequent, please try again later.";
|
|
51
51
|
|
|
52
|
-
return "
|
|
52
|
+
return "The service is temporarily unavailable, please try again later.";
|
|
53
53
|
}
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
##
|
|
56
|
+
## Upload selection
|
|
57
57
|
|
|
58
|
-
|
|
|
58
|
+
| Requirements | Recommended solutions |
|
|
59
59
|
| ---------------- | ----------------------------- |
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
60
|
+
| Avatar or CSV | Multipart request |
|
|
61
|
+
| Large video or archive file | Pre-signed direct transfer |
|
|
62
|
+
| Large files in weak network environment | Fragmented breakpoint resume download |
|
|
63
|
+
| Compliance scanning before warehousing | Uploading through API intermediary (including size limit) |
|
|
64
64
|
|
|
65
|
-
##
|
|
65
|
+
## Real-time communication selection
|
|
66
66
|
|
|
67
|
-
|
|
|
67
|
+
| Requirements | Recommended solutions |
|
|
68
68
|
| -------------------- | ------------------------- |
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
69
|
+
| Task progress or notification | SSE (Server-Sent Events) |
|
|
70
|
+
| Chat, Presence, Collaboration | WebSocket |
|
|
71
|
+
| Status polling every few seconds | Scheduled polling (Polling) |
|
|
72
|
+
| Server-side AI Token stream | SSE or fetch streaming response |
|
|
73
73
|
|
|
74
|
-
##
|
|
74
|
+
## Review Checklist
|
|
75
75
|
|
|
76
|
-
- API
|
|
77
|
-
-
|
|
78
|
-
- Token
|
|
79
|
-
-
|
|
80
|
-
-
|
|
76
|
+
- Centralized management of API addresses and credentials.
|
|
77
|
+
- The client needs to handle 204, non-JSON errors, cancellation and offline status.
|
|
78
|
+
- The Token refresh mechanism cannot trigger request storms.
|
|
79
|
+
- Components should consume hooks/domain functions rather than calling raw fetch directly.
|
|
80
|
+
- Uploads and live streams need to expose progress, cancellation, failure and retry status.
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fec-backend-requirements-handoff
|
|
3
|
-
description: Use when frontend work needs to communicate data, action, state, permission, validation, or business-rule needs to backend teams without dictating endpoint design, field names, database shape, or implementation details; Chinese triggers include
|
|
3
|
+
description: Use when frontend work needs to communicate data, action, state, permission, validation, or business-rule needs to backend teams without dictating endpoint design, field names, database shape, or implementation details; Chinese triggers include front-end and back-end requirements handover, back-end requirements, API requirements clarification, data requirements description.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Handover of front-end and back-end requirements
|
|
7
7
|
|
|
8
8
|
## Purpose
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Organize the data, actions, status, and questions required for front-end pages and interactions into discussion-ready requirements for the back-end.
|
|
11
11
|
|
|
12
12
|
## Procedure
|
|
13
13
|
|
|
14
|
-
1.
|
|
15
|
-
|
|
16
|
-
-
|
|
14
|
+
1. Clarify the functional context
|
|
15
|
+
- Describe what the page, process, or component is, what type of user it is intended for, and the success status of the user completing the task.
|
|
16
|
+
- If there are existing designs, routes, user stories, or permission roles, use them as sources of truth first.
|
|
17
17
|
|
|
18
|
-
2.
|
|
19
|
-
-
|
|
20
|
-
-
|
|
18
|
+
2. Describe front-end display requirements
|
|
19
|
+
- List information to be displayed by screen or component, relationships between information, sorting/filtering/pagination requirements and visibility rules.
|
|
20
|
+
- Use business language to describe "what needs to be displayed" and do not specify endpoints, field names, DTOs, database tables or response nested structures in advance.
|
|
21
21
|
|
|
22
|
-
3.
|
|
23
|
-
-
|
|
24
|
-
-
|
|
22
|
+
3. Describe user actions and results
|
|
23
|
+
- List the actions the user can perform, expected results, success feedback, failure feedback and whether optimistic updates are needed.
|
|
24
|
+
- Mark behaviors that affect the UI such as idempotence, undo, confirm, dangerous operations, batch operations, or long task progress.
|
|
25
25
|
|
|
26
|
-
4.
|
|
27
|
-
-
|
|
28
|
-
-
|
|
26
|
+
4. Complete status and business rules
|
|
27
|
+
- Override the status of loading, empty, error, partial, permission denied, expired, conflict, offline and retrying.
|
|
28
|
+
- Document permissions, lifecycle, amounts/timezones/enumerations, validations, editable conditions, and boundary rules that affect the UI.
|
|
29
29
|
|
|
30
|
-
5.
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
30
|
+
5. Output discussion document
|
|
31
|
+
- By default, it is written to `docs/backend-requirements/<feature-name>.md`; if the warehouse already has a requirements document directory, the existing location will be used.
|
|
32
|
+
- Documentation includes Context, Screens/Components, Data Needs, User Actions, UI States, Business Rules, Uncertainties, Questions for Backend and Decision Log.
|
|
33
|
+
- If the user only needs chat replies, they can directly output Markdown with the same structure without creating a file.
|
|
34
34
|
|
|
35
35
|
## Constraints
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
37
|
+
- Does not specify URLs, HTTP methods, field names, database schema, cache implementation, or service splitting for the backend.
|
|
38
|
+
- Don't write front-end guesses into facts; uncertain business rules must go into Uncertainties or Questions.
|
|
39
|
+
- Errors, empty states, permissions and partial data are not ignored; these states determine the quality of interface collaboration.
|
|
40
|
+
- Do not expose internal error stacks, database fields, or sensitive implementation details to the UI.
|
|
41
|
+
- Does not duplicate the API integration process: This skill describes the requirements, client boundaries, type sources and error mapping implementation should be handled in subsequent implementation phases.
|
|
42
42
|
|
|
43
43
|
## Expected Output
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Produce a back-end requirements handover description from a front-end perspective, clearly describing what data and behaviors the UI requires, which rules still need to be confirmed, and subsequent issues that need to be decided jointly by the front-end and back-end.
|