create-yss-spec 3.3.8 → 3.4.3
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/README.md +1 -1
- package/package.json +2 -2
- package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -13
- package/template/.agents/skills/archify/SKILL.md +1 -1
- package/template/.agents/skills/code-review/SKILL.md +12 -8
- package/template/.agents/skills/file-export-download/SKILL.md +1 -1
- package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
- package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
- package/template/.agents/skills/lombok/SKILL.md +10 -336
- package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.agents/skills/mapstruct/SKILL.md +11 -318
- package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.agents/skills/page-form-module/SKILL.md +1 -1
- package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
- package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.agents/skills/to-tickets/SKILL.md +1 -1
- package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.agents/skills/wayfinder/SKILL.md +1 -1
- package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.agents/skills/yss-cache/SKILL.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
- package/template/.agents/skills/yss-design-system/SKILL.md +19 -19
- package/template/.agents/skills/yss-design-system/references/data-quality-theme.md +13 -0
- package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -1
- package/template/.agents/skills/yss-design-system/references/design-system.md +7 -9
- package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.agents/skills/yss-dto/SKILL.md +5 -1
- package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.agents/skills/yss-exception/SKILL.md +5 -1
- package/template/.agents/skills/yss-formily/SKILL.md +21 -258
- package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
- package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
- package/template/.agents/skills/yss-hook/SKILL.md +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
- package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
- package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
- package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
- package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.agents/skills/yss-openapi-governance/SKILL.md +3 -1
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -2
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +13 -9
- package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
- package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
- package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
- package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
- package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
- package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
- package/template/.agents/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
- package/template/.agents/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
- package/template/.agents/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
- package/template/.agents/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
- package/template/.agents/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
- package/template/.agents/skills/yss-prototype-stage/references/antd-integration.md +61 -0
- package/template/.agents/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
- package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
- package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
- package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
- package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
- package/template/.agents/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
- package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
- package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
- package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
- package/template/.agents/skills/yss-repository/SKILL.md +4 -0
- package/template/.agents/skills/yss-research/SKILL.md +1 -1
- package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
- package/template/.agents/skills/yss-tactical-design/SKILL.md +5 -1
- package/template/.agents/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.agents/skills/yss-ui/SKILL.md +4 -3
- package/template/.agents/skills/yss-ui/references/component-routing.md +11 -10
- package/template/.agents/skills/yss-ui/references/specialized-components.md +52 -0
- package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.agents/skills/yss-validation/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
- package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
- package/template/.codex/skills/archify/SKILL.md +1 -1
- package/template/.codex/skills/code-review/SKILL.md +12 -8
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
- package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
- package/template/.codex/skills/file-export-download/SKILL.md +1 -1
- package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
- package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
- package/template/.codex/skills/lombok/SKILL.md +10 -336
- package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.codex/skills/mapstruct/SKILL.md +11 -318
- package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.codex/skills/page-form-module/SKILL.md +1 -1
- package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
- package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
- package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.codex/skills/to-tickets/SKILL.md +1 -1
- package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.codex/skills/wayfinder/SKILL.md +1 -1
- package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.codex/skills/yss-cache/SKILL.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
- package/template/.codex/skills/yss-design-system/SKILL.md +19 -19
- package/template/.codex/skills/yss-design-system/references/data-quality-theme.md +13 -0
- package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -1
- package/template/.codex/skills/yss-design-system/references/design-system.md +7 -9
- package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.codex/skills/yss-dto/SKILL.md +5 -1
- package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.codex/skills/yss-exception/SKILL.md +5 -1
- package/template/.codex/skills/yss-formily/SKILL.md +21 -258
- package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
- package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
- package/template/.codex/skills/yss-hook/SKILL.md +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
- package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
- package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
- package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
- package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.codex/skills/yss-openapi-governance/SKILL.md +3 -1
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -2
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +13 -9
- package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
- package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
- package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
- package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
- package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
- package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
- package/template/.codex/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
- package/template/.codex/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
- package/template/.codex/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
- package/template/.codex/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
- package/template/.codex/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
- package/template/.codex/skills/yss-prototype-stage/references/antd-integration.md +61 -0
- package/template/.codex/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
- package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
- package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
- package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
- package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
- package/template/.codex/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
- package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
- package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
- package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
- package/template/.codex/skills/yss-repository/SKILL.md +4 -0
- package/template/.codex/skills/yss-research/SKILL.md +1 -1
- package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
- package/template/.codex/skills/yss-tactical-design/SKILL.md +5 -1
- package/template/.codex/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.codex/skills/yss-ui/SKILL.md +4 -3
- package/template/.codex/skills/yss-ui/references/component-routing.md +11 -10
- package/template/.codex/skills/yss-ui/references/specialized-components.md +52 -0
- package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.codex/skills/yss-validation/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
- package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
- package/template/.cursor/skills/archify/SKILL.md +1 -1
- package/template/.cursor/skills/code-review/SKILL.md +12 -8
- package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
- package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
- package/template/.cursor/skills/lombok/SKILL.md +10 -336
- package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
- package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
- package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
- package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
- package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
- package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
- package/template/.cursor/skills/yss-design-system/SKILL.md +19 -19
- package/template/.cursor/skills/yss-design-system/references/data-quality-theme.md +13 -0
- package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -1
- package/template/.cursor/skills/yss-design-system/references/design-system.md +7 -9
- package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
- package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
- package/template/.cursor/skills/yss-formily/SKILL.md +21 -258
- package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
- package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
- package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
- package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
- package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
- package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.cursor/skills/yss-openapi-governance/SKILL.md +3 -1
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +13 -9
- package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
- package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
- package/template/.cursor/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
- package/template/.cursor/skills/yss-prototype-stage/references/antd-integration.md +61 -0
- package/template/.cursor/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
- package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
- package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
- package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
- package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
- package/template/.cursor/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
- package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
- package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
- package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
- package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
- package/template/.cursor/skills/yss-research/SKILL.md +1 -1
- package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
- package/template/.cursor/skills/yss-tactical-design/SKILL.md +5 -1
- package/template/.cursor/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.cursor/skills/yss-ui/SKILL.md +4 -3
- package/template/.cursor/skills/yss-ui/references/component-routing.md +11 -10
- package/template/.cursor/skills/yss-ui/references/specialized-components.md +52 -0
- package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
- package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
- package/template/.pi/skills/archify/SKILL.md +1 -1
- package/template/.pi/skills/code-review/SKILL.md +12 -8
- package/template/.pi/skills/file-export-download/SKILL.md +1 -1
- package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
- package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
- package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
- package/template/.pi/skills/lombok/SKILL.md +10 -336
- package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
- package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
- package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
- package/template/.pi/skills/mapstruct/SKILL.md +11 -318
- package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
- package/template/.pi/skills/page-form-module/SKILL.md +1 -1
- package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
- package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
- package/template/.pi/skills/to-tickets/SKILL.md +1 -1
- package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
- package/template/.pi/skills/wayfinder/SKILL.md +1 -1
- package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
- package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
- package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
- package/template/.pi/skills/yss-cache/SKILL.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
- package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
- package/template/.pi/skills/yss-design-system/SKILL.md +19 -19
- package/template/.pi/skills/yss-design-system/references/data-quality-theme.md +13 -0
- package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -1
- package/template/.pi/skills/yss-design-system/references/design-system.md +7 -9
- package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
- package/template/.pi/skills/yss-dto/SKILL.md +5 -1
- package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
- package/template/.pi/skills/yss-exception/SKILL.md +5 -1
- package/template/.pi/skills/yss-formily/SKILL.md +21 -258
- package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
- package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
- package/template/.pi/skills/yss-hook/SKILL.md +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
- package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
- package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
- package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
- package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
- package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
- package/template/.pi/skills/yss-openapi-governance/SKILL.md +3 -1
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -2
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -1
- package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +13 -9
- package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
- package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
- package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
- package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
- package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
- package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
- package/template/.pi/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
- package/template/.pi/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
- package/template/.pi/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
- package/template/.pi/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
- package/template/.pi/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
- package/template/.pi/skills/yss-prototype-stage/references/antd-integration.md +61 -0
- package/template/.pi/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
- package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
- package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
- package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
- package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
- package/template/.pi/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
- package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
- package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
- package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
- package/template/.pi/skills/yss-repository/SKILL.md +4 -0
- package/template/.pi/skills/yss-research/SKILL.md +1 -1
- package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
- package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
- package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
- package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
- package/template/.pi/skills/yss-tactical-design/SKILL.md +5 -1
- package/template/.pi/skills/yss-technical-design/SKILL.md +4 -0
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
- package/template/.pi/skills/yss-ui/SKILL.md +4 -3
- package/template/.pi/skills/yss-ui/references/component-routing.md +11 -10
- package/template/.pi/skills/yss-ui/references/specialized-components.md +52 -0
- package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
- package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
- package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
- package/template/.pi/skills/yss-validation/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
- package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
- package/template/AGENTS.md +1 -0
- package/template/CONTEXT.md +3 -1
- package/template/DESIGN.md +31 -14
- package/template/__yss_dotfile__.gitignore +4 -0
- package/template/docs/agents/backend-architecture-profiles.md +1 -1
- package/template/docs/agents/digital-human-roles.yaml +29 -5
- package/template/docs/agents/issue-tracker.md +2 -0
- package/template/docs/agents/skill-migrations.md +15 -2
- package/template/docs/agents/yss-skill-registry.yaml +6 -40
- package/template/docs/design/README.md +4 -4
- package/template/docs/design/design-system-sync.yaml +2 -1
- package/template/docs/design/design.md +23 -31
- package/template/docs/design/preview-dark.html +3 -3
- package/template/docs/design/preview.css +1 -1
- package/template/docs/design/preview.html +2 -2
- package/template/docs/design/templates/interaction-spec-template.md +2 -2
- package/template/docs/design/templates/prototype-evidence-template.yaml +18 -22
- package/template/docs/design/templates/prototype-review-checklist.md +3 -1
- package/template/docs/design/templates/state-matrix-template.md +1 -1
- package/template/docs/design/templates/visual-baseline-template.yaml +3 -2
- package/template/docs/design/tokens/.design-md-projection.json +7 -7
- package/template/docs/design/tokens/theme.json +16 -10
- package/template/docs/design/tokens/tokens.compact.json +521 -237
- package/template/docs/design/tokens/tokens.dark.json +527 -240
- package/template/docs/design/tokens/tokens.default.json +513 -235
- package/template/docs/design/tokens/variables.css +67 -65
- package/template/docs/design/tokens/variables.dark.css +41 -41
- package/template/docs/engineering/backend-platforms.json +174 -0
- package/template/docs/engineering/backend-platforms.md +77 -0
- package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
- package/template/docs/process/delivery-preflight.md +1 -1
- package/template/docs/process/frontend-backend-delivery.md +2 -1
- package/template/docs/process/harness-process-tailoring.md +9 -1
- package/template/docs/process/lifecycle-artifact-map.md +4 -4
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +9 -9
- package/template/docs/process/schemas/api-contract-decision.schema.json +74 -0
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
- package/template/docs/process/schemas/data-architecture-decision.schema.json +34 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -1
- package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +80 -24
- package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +4 -0
- package/template/docs/process/schemas/project-scaffold-contract.schema.json +666 -73
- package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
- package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
- package/template/docs/process/schemas/strategic-design-handoff.schema.json +296 -107
- package/template/docs/process/schemas/strategic-handoff-delivery-verification.schema.json +19 -0
- package/template/docs/process/schemas/strategic-handoff-delivery.schema.json +84 -0
- package/template/docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json +42 -0
- package/template/docs/process/strategic-handoff-package.md +26 -9
- package/template/docs/templates/approval-record-template.yaml +2 -0
- package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
- package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +1 -1
- package/template/scripts/audit-legacy-backend-scaffold +29 -0
- package/template/scripts/backend-platforms +14 -0
- package/template/scripts/lib/api-contract-decision.mjs +49 -0
- package/template/scripts/lib/api-contract-decision.test.mjs +69 -0
- package/template/scripts/lib/approval-record.mjs +32 -6
- package/template/scripts/lib/approved-execution-context.mjs +31 -8
- package/template/scripts/lib/backend-architecture.mjs +6 -0
- package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
- package/template/scripts/lib/backend-platform-verification.mjs +210 -0
- package/template/scripts/lib/backend-platform.mjs +175 -0
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +123 -0
- package/template/scripts/lib/decision-continuation.mjs +79 -0
- package/template/scripts/lib/delivery-preflight.mjs +6 -5
- package/template/scripts/lib/digital-human-roles.mjs +10 -0
- package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
- package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
- package/template/scripts/lib/legacy-backend-scaffold-audit.mjs +87 -0
- package/template/scripts/lib/legacy-backend-scaffold-audit.test.mjs +64 -0
- package/template/scripts/lib/lifecycle-controls.mjs +2 -2
- package/template/scripts/lib/lifecycle-transition.mjs +155 -5
- package/template/scripts/lib/openapi-draft-validation.mjs +111 -0
- package/template/scripts/lib/plan-spec-entry.mjs +3 -3
- package/template/scripts/lib/scaffold-local-database.mjs +1 -0
- package/template/scripts/lib/skill-registry.mjs +17 -3
- package/template/scripts/lib/skill-supply-chain.mjs +12 -1
- package/template/scripts/lib/slice-applicability.mjs +10 -0
- package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
- package/template/scripts/lib/slice-contract-views.mjs +52 -0
- package/template/scripts/lib/slice-contract.mjs +211 -0
- package/template/scripts/lib/slice-repositories.mjs +49 -0
- package/template/scripts/lib/slice-task-package.mjs +66 -0
- package/template/scripts/lib/strategic-feedback.mjs +2 -2
- package/template/scripts/lib/strategic-handoff-consumption.mjs +2 -2
- package/template/scripts/lib/strategic-handoff.mjs +89 -4
- package/template/scripts/lib/task-package.mjs +6 -2
- package/template/scripts/lib/technical-design-boundary.mjs +1 -0
- package/template/scripts/lib/user-decision-reuse.mjs +1 -0
- package/template/scripts/lib/user-decision.mjs +4 -1
- package/template/scripts/preflight-delivery +2 -2
- package/template/scripts/slice-contract +30 -0
- package/template/scripts/strategic-handoff +6 -4
- package/template/scripts/verify-backend-platform-matrix +69 -0
- package/template/scripts/verify-openapi-draft-validation-record +10 -129
- package/template/scripts/verify-scaffold-architecture-decisions +5 -0
- package/template/scripts/verify-strategic-context-import +12 -14
- package/template/scripts/verify-user-decision +7 -2
- package/template/skills-lock.json +67 -117
- package/template/yss-public-skills.json +0 -6
- package/template.snapshot.json +8 -4
- package/template/.agents/skills/yss-antd-design/SKILL.md +0 -35
- package/template/.agents/skills/yss-antd-design/references/boundaries.md +0 -30
- package/template/.agents/skills/yss-antd-design/references/cli-matrix.md +0 -38
- package/template/.agents/skills/yss-antd-design/references/evidence.md +0 -35
- package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
- package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
- package/template/.agents/skills/yss-antdv-next-design/SKILL.md +0 -48
- package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +0 -25
- package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
- package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
- package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
- package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
- package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
- package/template/.agents/skills/yss-components/SKILL.md +0 -386
- package/template/.agents/skills/yss-components/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-components/references/frontend-docs.md +0 -9
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
- package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
- package/template/.agents/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
- package/template/.agents/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
- package/template/.agents/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
- package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
- package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
- package/template/.codex/skills/yss-antd-design/SKILL.md +0 -35
- package/template/.codex/skills/yss-antd-design/references/boundaries.md +0 -30
- package/template/.codex/skills/yss-antd-design/references/cli-matrix.md +0 -38
- package/template/.codex/skills/yss-antd-design/references/evidence.md +0 -35
- package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
- package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
- package/template/.codex/skills/yss-antdv-next-design/SKILL.md +0 -48
- package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +0 -25
- package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
- package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
- package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
- package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
- package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
- package/template/.codex/skills/yss-components/SKILL.md +0 -386
- package/template/.codex/skills/yss-components/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-components/references/frontend-docs.md +0 -9
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
- package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
- package/template/.codex/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
- package/template/.codex/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
- package/template/.codex/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
- package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
- package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
- package/template/.cursor/skills/yss-antd-design/SKILL.md +0 -35
- package/template/.cursor/skills/yss-antd-design/references/boundaries.md +0 -30
- package/template/.cursor/skills/yss-antd-design/references/cli-matrix.md +0 -38
- package/template/.cursor/skills/yss-antd-design/references/evidence.md +0 -35
- package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
- package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
- package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +0 -48
- package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +0 -25
- package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
- package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
- package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
- package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
- package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
- package/template/.cursor/skills/yss-components/SKILL.md +0 -386
- package/template/.cursor/skills/yss-components/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-components/references/frontend-docs.md +0 -9
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
- package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
- package/template/.cursor/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
- package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
- package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
- package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
- package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
- package/template/.pi/skills/yss-antd-design/SKILL.md +0 -35
- package/template/.pi/skills/yss-antd-design/references/boundaries.md +0 -30
- package/template/.pi/skills/yss-antd-design/references/cli-matrix.md +0 -38
- package/template/.pi/skills/yss-antd-design/references/evidence.md +0 -35
- package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
- package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
- package/template/.pi/skills/yss-antdv-next-design/SKILL.md +0 -48
- package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +0 -25
- package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
- package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
- package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
- package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
- package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
- package/template/.pi/skills/yss-components/SKILL.md +0 -386
- package/template/.pi/skills/yss-components/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-components/references/frontend-docs.md +0 -9
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
- package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
- package/template/.pi/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
- package/template/.pi/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
- package/template/.pi/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
- package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
- package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { assertUserDecisionRequirement, decisionDigest, decisionIO } from "../../../../scripts/lib/user-decision.mjs";
|
|
3
3
|
import { existsSync } from "node:fs";
|
|
4
|
-
import {
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { prepareOfflineHtml, validateOfflineHtml, sealOfflineHtml } from "./offline-html.mjs";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { pathToFileURL } from "node:url";
|
|
7
8
|
import { parseDocument } from "../../../../scripts/vendor/yaml.mjs";
|
|
@@ -10,12 +11,6 @@ const nonEmpty = (value) => typeof value === "string" && value.trim().length > 0
|
|
|
10
11
|
const object = (value) => value && typeof value === "object" && !Array.isArray(value);
|
|
11
12
|
const antdSemver = /^6\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/;
|
|
12
13
|
const exactSemver = /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/;
|
|
13
|
-
const DEFAULT_H2_COMPONENT_BASIS = "vue-antdv-next";
|
|
14
|
-
const DEFAULT_ANTDV_NEXT_VERSION = "1.5.2";
|
|
15
|
-
const DEFAULT_VUE_VERSION = "3.5.21";
|
|
16
|
-
const DEFAULT_VITE_VERSION = "6.4.2";
|
|
17
|
-
const DEFAULT_VUE_PLUGIN_VERSION = "5.2.4";
|
|
18
|
-
const H2_COMPONENT_BASES = new Set([DEFAULT_H2_COMPONENT_BASIS, "react-antd-6"]);
|
|
19
14
|
const PROFILE_KIND = { H1: "visual-review", H2: "flow-review" };
|
|
20
15
|
const PROFILE_BLOCK = { H1: "visual_review", H2: "flow_review" };
|
|
21
16
|
|
|
@@ -71,6 +66,20 @@ function validateCommonV4(data, errors, allowTemplate) {
|
|
|
71
66
|
for (const field of ["ideation_status", "selected_ref", "reuse_reason"]) requiredString(visual, field, "source_visual", errors);
|
|
72
67
|
if (object(visual) && !["required", "not-applicable"].includes(visual.ideation_status)) errors.push("source_visual.ideation_status 必须为 required/not-applicable");
|
|
73
68
|
|
|
69
|
+
if (visual?.kind !== undefined) {
|
|
70
|
+
if (!["design-system", "visual-reference"].includes(visual.kind)) errors.push("source_visual.kind 必须为 design-system/visual-reference");
|
|
71
|
+
const expectedMode = visual.kind === "design-system" ? "design-contract" : "visual-comparison";
|
|
72
|
+
if (data.design_qa?.mode !== expectedMode) errors.push("design_qa.mode 与 source_visual.kind 不一致");
|
|
73
|
+
if (visual.kind === "design-system" && visual.selected_ref !== "DESIGN.md") errors.push("规范直出必须以 DESIGN.md 为规范依据,不能用自身截图自证");
|
|
74
|
+
if (!allowTemplate && visual.kind === "visual-reference" && visual.selected_ref === data.prototype_ref) errors.push("视觉还原目标不得引用原型自身");
|
|
75
|
+
}
|
|
76
|
+
if (data.browser_delivery?.delivery_contract === "offline-html-v1") {
|
|
77
|
+
requiredString(data.browser_delivery, "resource_manifest_ref", "browser_delivery", errors);
|
|
78
|
+
requiredString(data.browser_delivery, "offline_verification_ref", "browser_delivery", errors);
|
|
79
|
+
requiredPassed(data.browser_delivery, "offline_verification_result", "browser_delivery", errors, allowTemplate);
|
|
80
|
+
if (visual?.kind === undefined) errors.push("离线 HTML 证据必须声明 source_visual.kind");
|
|
81
|
+
}
|
|
82
|
+
|
|
74
83
|
const baseline = data.design_baseline;
|
|
75
84
|
requiredString(baseline, "canonical_design_ref", "design_baseline", errors);
|
|
76
85
|
requiredString(baseline, "canonical_design_digest", "design_baseline", errors);
|
|
@@ -167,6 +176,17 @@ function validateProfileV4(data, errors, allowTemplate) {
|
|
|
167
176
|
const facts = evidence.prototype_library_facts;
|
|
168
177
|
required(facts, "applicable", "profile_evidence.flow_review.prototype_library_facts", errors);
|
|
169
178
|
requiredString(facts, "component_basis", "profile_evidence.flow_review.prototype_library_facts", errors);
|
|
179
|
+
if (["html-css-js", "react-antd-prebuilt"].includes(facts?.component_basis)) {
|
|
180
|
+
if (implementation?.runtime_build_required !== false || implementation?.framework !== facts.component_basis || (facts.component_basis === "html-css-js" && facts.applicable !== false)) errors.push("HTML H2 必须声明无组件 Provider、无运行时构建及 html-css-js framework");
|
|
181
|
+
if (data.browser_delivery?.delivery_contract !== "offline-html-v1") errors.push("HTML H2 缺少 offline-html-v1 交付证据");
|
|
182
|
+
for (const field of ["scenario_replay_ref", "scenario_reset_result"]) requiredString(evidence, field, "profile_evidence.flow_review", errors);
|
|
183
|
+
requiredPassed(evidence, "scenario_reset_result", "profile_evidence.flow_review", errors, allowTemplate);
|
|
184
|
+
}
|
|
185
|
+
if (facts?.component_basis === "react-antd-prebuilt") {
|
|
186
|
+
if (facts.applicable !== true || facts.library_package !== "antd" || !antdSemver.test(facts.library_version ?? "")) errors.push("真实 AntD 预构建需要实际 antd 精确版本");
|
|
187
|
+
requiredString(facts, "build_provenance_ref", "prototype_library_facts", errors);
|
|
188
|
+
requiredString(implementation, "selection_reason", "prototype_implementation", errors);
|
|
189
|
+
}
|
|
170
190
|
if (facts?.applicable === true) {
|
|
171
191
|
for (const field of ["source", "manifest_ref", "manifest_digest", "canonical_design_digest", "project_token_baseline_digest"]) requiredString(facts, field, "profile_evidence.flow_review.prototype_library_facts", errors);
|
|
172
192
|
requireArray(facts, "components_covered", "profile_evidence.flow_review.prototype_library_facts", errors, { nonEmpty: true });
|
|
@@ -201,6 +221,11 @@ export function validatePrototypeEvidence(data, { allowTemplate = false, allowLe
|
|
|
201
221
|
return { errors, warnings };
|
|
202
222
|
}
|
|
203
223
|
if (data.schema_version !== 4) return { errors: ["schema_version 必须为 4"], warnings };
|
|
224
|
+
const oldBasis = data.profile_evidence?.flow_review?.prototype_library_facts?.component_basis;
|
|
225
|
+
if (["vue-antdv-next", "react-antd-6"].includes(oldBasis)) {
|
|
226
|
+
if (!allowLegacy && !allowTemplate) errors.push("Provider 已退役;旧证据仅 --allow-legacy 只读检查,在途需迁移 HTML");
|
|
227
|
+
else warnings.push("历史 Provider 证据只读,不代表当前原型通过");
|
|
228
|
+
}
|
|
204
229
|
validateCommonV4(data, errors, allowTemplate);
|
|
205
230
|
validateProfileV4(data, errors, allowTemplate);
|
|
206
231
|
if (!allowTemplate && errors.length === 0) {
|
|
@@ -213,146 +238,26 @@ export function validatePrototypeEvidence(data, { allowTemplate = false, allowLe
|
|
|
213
238
|
return { errors, warnings };
|
|
214
239
|
}
|
|
215
240
|
|
|
216
|
-
function
|
|
217
|
-
|
|
218
|
-
const resolvedRoot = path.resolve(root);
|
|
219
|
-
const expected = path.resolve(resolvedProject, "docs/.scratch", feature, "design/prototypes");
|
|
220
|
-
if (resolvedRoot !== expected) throw new TypeError(`原型目录必须精确匹配 ${expected}`);
|
|
221
|
-
if (!resolvedRoot.startsWith(`${resolvedProject}${path.sep}`)) throw new TypeError("原型目录越出项目根");
|
|
222
|
-
return { resolvedProject, resolvedRoot };
|
|
241
|
+
export async function prepareStaticPrototype(options) {
|
|
242
|
+
return prepareOfflineHtml({ ...options, profile: "H1" });
|
|
223
243
|
}
|
|
224
244
|
|
|
225
|
-
export async function
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
await mkdir(resolvedRoot, { recursive: true });
|
|
229
|
-
for (const forbidden of ["package.json", "pnpm-lock.yaml", "package-lock.json", "yarn.lock"]) if (existsSync(path.join(resolvedRoot, forbidden))) throw new TypeError(`H1 静态适配器拒绝已有 ${forbidden}`);
|
|
230
|
-
await writeFile(path.join(resolvedRoot, "index.html"), `<!doctype html>\n<html lang="zh-CN">\n<head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width,initial-scale=1">\n <title>${feature} · H1 visual review</title>\n <link rel="stylesheet" href="./styles.css">\n</head>\n<body>\n <main id="prototype" aria-labelledby="page-title">\n <header><p class="eyebrow">H1 · visual-review</p><h1 id="page-title">${feature}</h1></header>\n <section class="surface" aria-label="原型内容"><p>请在此实现已评审的视觉布局与少量关键交互。</p><button type="button" id="prototype-action">关键操作</button><p role="status" id="prototype-status"></p></section>\n </main>\n <script>document.querySelector('#prototype-action').addEventListener('click',()=>{document.querySelector('#prototype-status').textContent='交互已触发';});</script>\n</body>\n</html>\n`);
|
|
231
|
-
await writeFile(path.join(resolvedRoot, "styles.css"), `@import url("../../../../design/tokens/variables.css");\n:root{font-family:var(--brand-font-family,system-ui,sans-serif);color:var(--brand-color-text);background:var(--brand-color-bg-layout)}*{box-sizing:border-box}body{margin:0}main{max-width:1440px;margin:auto;padding:var(--brand-size-lg)}.eyebrow{color:var(--brand-color-primary)}.surface{padding:var(--yss-card-compact-padding,var(--brand-size));border-radius:var(--brand-border-radius-lg);background:var(--brand-color-bg-container);box-shadow:0 1px 3px rgb(0 0 0/.08)}button{min-height:var(--yss-control-height-compact);padding:var(--brand-size-xxs) var(--brand-size-sm);border:0;border-radius:var(--brand-border-radius);color:var(--yss-color-on-primary,var(--brand-color-bg-container));background:var(--yss-color-primary-control,var(--brand-color-primary))}button:hover{background:var(--yss-color-primary-control-hover,var(--brand-color-primary-hover))}button:focus-visible{outline:3px solid color-mix(in srgb,var(--yss-color-primary-control,var(--brand-color-primary)),white 55%);outline-offset:2px}@media(max-width:576px){main{padding:var(--brand-size-sm)}.surface{padding:var(--brand-size-sm)}}\n`);
|
|
232
|
-
const manifest = { schema_version: 1, feature, prototype_profile: "H1", profile_kind: "visual-review", runtime_build_required: false, entry: `docs/.scratch/${feature}/design/prototypes/index.html`, theme_source: "docs/design/tokens/variables.css" };
|
|
233
|
-
await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
234
|
-
return manifest;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
async function writeIfMissing(file, content) {
|
|
238
|
-
if (!existsSync(file)) await writeFile(file, content);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
async function prepareVueFlowPrototype({ projectRoot, root, feature, libraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion, factPackRef }) {
|
|
242
|
-
for (const [field, version] of Object.entries({ libraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion })) {
|
|
243
|
-
if (!exactSemver.test(version ?? "")) throw new TypeError(`${field} 必须是明确 semver`);
|
|
244
|
-
}
|
|
245
|
-
const { resolvedProject, resolvedRoot } = safePrototypeRoot(projectRoot, root, feature);
|
|
246
|
-
const themeSourcePath = path.join(resolvedProject, "docs/design/tokens/theme.json");
|
|
247
|
-
if (!existsSync(themeSourcePath)) throw new TypeError(`缺少项目主题: ${themeSourcePath}`);
|
|
248
|
-
const themeSource = JSON.parse(await readFile(themeSourcePath, "utf8"));
|
|
249
|
-
await mkdir(path.join(resolvedRoot, "src"), { recursive: true });
|
|
250
|
-
const packagePath = path.join(resolvedRoot, "package.json");
|
|
251
|
-
const pkg = existsSync(packagePath) ? JSON.parse(await readFile(packagePath, "utf8")) : {};
|
|
252
|
-
if (pkg.dependencies?.react || pkg.dependencies?.antd) throw new TypeError("Vue/Antdv Next H2 不得静默覆盖 React/AntD starter;请显式选择 react-antd-6 或使用新的原型目录");
|
|
253
|
-
pkg.name ??= `${feature}-prototype`;
|
|
254
|
-
pkg.version ??= "0.0.0";
|
|
255
|
-
pkg.private = true;
|
|
256
|
-
pkg.type = "module";
|
|
257
|
-
pkg.packageManager = `pnpm@${pnpmVersion}`;
|
|
258
|
-
pkg.scripts = { dev: "vite --host 127.0.0.1", build: "vite build", preview: "vite preview --host 127.0.0.1", ...(pkg.scripts ?? {}) };
|
|
259
|
-
pkg.dependencies = { ...(pkg.dependencies ?? {}), "@vitejs/plugin-vue": vuePluginVersion, "antdv-next": libraryVersion, vite: viteVersion, vue: vueVersion };
|
|
260
|
-
await writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
261
|
-
await writeIfMissing(path.join(resolvedRoot, "index.html"), `<!doctype html>\n<html lang="zh-CN">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>${feature} · H2 flow review</title>\n</head>\n<body>\n <div id="app"></div>\n <script type="module" src="/src/main.js"></script>\n</body>\n</html>\n`);
|
|
262
|
-
await writeIfMissing(path.join(resolvedRoot, "vite.config.mjs"), `import { defineConfig } from "vite";\nimport vue from "@vitejs/plugin-vue";\n\nexport default defineConfig({ plugins: [vue()] });\n`);
|
|
263
|
-
await writeIfMissing(path.join(resolvedRoot, "src/main.js"), `import { createApp } from "vue";\nimport Antdv from "antdv-next";\nimport App from "./App.vue";\nimport "antdv-next/dist/reset.css";\nimport "./styles.css";\n\ncreateApp(App).use(Antdv).mount("#app");\n`);
|
|
264
|
-
await writeIfMissing(path.join(resolvedRoot, "src/App.vue"), `<script setup>\nimport { computed, ref } from "vue";\nimport { createYssTheme } from "./yss-theme.js";\n\nconst dark = ref(false);\nconst yssTheme = computed(() => createYssTheme({ dark: dark.value }));\n</script>\n\n<template>\n <a-config-provider :theme="yssTheme">\n <main aria-labelledby="page-title">\n <p class="eyebrow">H2 · flow-review</p>\n <h1 id="page-title">${feature}</h1>\n <p>请在此实现已评审的主流程与关键异常状态。</p>\n <a-button type="primary" @click="dark = !dark">切换主题以验证反馈</a-button>\n </main>\n </a-config-provider>\n</template>\n`);
|
|
265
|
-
await writeIfMissing(path.join(resolvedRoot, "src/styles.css"), `:root{font-family:system-ui,sans-serif;color:var(--text-color,#1f2329);background:var(--layout-background,#f0f2f5)}*{box-sizing:border-box}body{margin:0}main{max-width:1440px;margin:auto;padding:24px}.eyebrow{color:var(--brand-primary,#3371ff)}@media(max-width:576px){main{padding:12px}}\n`);
|
|
266
|
-
const generated = ['import { theme } from "antdv-next";', "", `const source = ${JSON.stringify(themeSource, null, 2)};`, 'const layoutKeys = new Set(["layoutHeaderHeight", "layoutSiderBackground", "layoutBodyBackground"]);', "export const yssLayoutTokens = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => layoutKeys.has(key)));", "const seed = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => !layoutKeys.has(key)));", "export function createYssTheme({ dark = false } = {}) {", " return { algorithm: dark ? [theme.darkAlgorithm, theme.compactAlgorithm] : [theme.defaultAlgorithm, theme.compactAlgorithm], token: seed };", "}", ""].join("\n");
|
|
267
|
-
await writeFile(path.join(resolvedRoot, "src/yss-theme.js"), generated);
|
|
268
|
-
const manifest = { schema_version: 3, feature, prototype_profile: "H2", profile_kind: "flow-review", design_standard: "yss-antdv-next", component_basis: "vue-antdv-next", framework: "vue", library: { package: "antdv-next", version: libraryVersion }, framework_packages: { vue: vueVersion, vite: viteVersion, "@vitejs/plugin-vue": vuePluginVersion }, package_manager: `pnpm@${pnpmVersion}`, fact_pack_ref: factPackRef, theme_source: "docs/design/tokens/theme.json", theme_adapter: `docs/.scratch/${feature}/design/prototypes/src/yss-theme.js`, next_commands: ["pnpm install", "pnpm build"] };
|
|
269
|
-
await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
270
|
-
return manifest;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
async function prepareReactFlowPrototype({ projectRoot, root, feature, targetAntdVersion, pnpmVersion }) {
|
|
274
|
-
if (!/^[a-z0-9][a-z0-9-]*$/.test(feature ?? "")) throw new TypeError("feature 必须是小写 kebab-case");
|
|
275
|
-
if (!antdSemver.test(targetAntdVersion ?? "")) throw new TypeError("targetAntdVersion 必须是明确的 antd 6.x semver");
|
|
276
|
-
if (!exactSemver.test(pnpmVersion ?? "")) throw new TypeError("pnpmVersion 必须是明确 semver");
|
|
277
|
-
const { resolvedProject, resolvedRoot } = safePrototypeRoot(projectRoot, root, feature);
|
|
278
|
-
const packagePath = path.join(resolvedRoot, "package.json");
|
|
279
|
-
if (!existsSync(packagePath)) throw new TypeError(`缺少 Product Design starter package.json: ${packagePath}`);
|
|
280
|
-
const pkg = JSON.parse(await readFile(packagePath, "utf8"));
|
|
281
|
-
pkg.packageManager = `pnpm@${pnpmVersion}`;
|
|
282
|
-
pkg.dependencies = { ...(pkg.dependencies ?? {}), "@ant-design/icons": "^6.0.0", antd: targetAntdVersion };
|
|
283
|
-
await writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
|
|
284
|
-
const themeSourcePath = path.join(resolvedProject, "docs/design/tokens/theme.json");
|
|
285
|
-
if (!existsSync(themeSourcePath)) throw new TypeError(`缺少项目主题: ${themeSourcePath}`);
|
|
286
|
-
const themeSource = JSON.parse(await readFile(themeSourcePath, "utf8"));
|
|
287
|
-
const generated = ['import { theme } from "antd";', "", `const source = ${JSON.stringify(themeSource, null, 2)};`, 'const layoutKeys = new Set(["layoutHeaderHeight", "layoutSiderBackground", "layoutBodyBackground"]);', "export const yssLayoutTokens = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => layoutKeys.has(key)));", "export const yssTheme = {", " algorithm: [theme.defaultAlgorithm, theme.compactAlgorithm],", " token: Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => !layoutKeys.has(key)))", "};", ""].join("\n");
|
|
288
|
-
await mkdir(path.join(resolvedRoot, "src"), { recursive: true });
|
|
289
|
-
await writeFile(path.join(resolvedRoot, "src/yss-theme.js"), generated);
|
|
290
|
-
const manifest = { schema_version: 2, feature, prototype_profile: "H2", profile_kind: "flow-review", design_standard: "ant-design-v6", target_antd_version: targetAntdVersion, prototype_framework: "react", package_manager: `pnpm@${pnpmVersion}`, theme_source: "docs/design/tokens/theme.json", theme_adapter: `docs/.scratch/${feature}/design/prototypes/src/yss-theme.js`, next_commands: ["pnpm install", "pnpm build"] };
|
|
291
|
-
await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
|
|
292
|
-
return manifest;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
export async function prepareFlowPrototype({ projectRoot, root, feature, componentBasis, libraryVersion, targetAntdVersion, pnpmVersion, vueVersion = DEFAULT_VUE_VERSION, viteVersion = DEFAULT_VITE_VERSION, vuePluginVersion = DEFAULT_VUE_PLUGIN_VERSION, factPackRef }) {
|
|
296
|
-
if (!/^[a-z0-9][a-z0-9-]*$/.test(feature ?? "")) throw new TypeError("feature 必须是小写 kebab-case");
|
|
297
|
-
const resolvedBasis = componentBasis ?? (targetAntdVersion ? "react-antd-6" : DEFAULT_H2_COMPONENT_BASIS);
|
|
298
|
-
if (!H2_COMPONENT_BASES.has(resolvedBasis)) throw new TypeError(`componentBasis 必须为 ${[...H2_COMPONENT_BASES].join("/")}`);
|
|
299
|
-
if (resolvedBasis === "react-antd-6") return prepareReactFlowPrototype({ projectRoot, root, feature, targetAntdVersion: targetAntdVersion ?? libraryVersion, pnpmVersion });
|
|
300
|
-
const resolvedLibraryVersion = libraryVersion ?? DEFAULT_ANTDV_NEXT_VERSION;
|
|
301
|
-
return prepareVueFlowPrototype({ projectRoot, root, feature, libraryVersion: resolvedLibraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion, factPackRef: factPackRef ?? `docs/design/facts/antdv-next/${resolvedLibraryVersion}/manifest.json` });
|
|
245
|
+
export async function prepareFlowPrototype(options) {
|
|
246
|
+
if (options.targetAntdVersion || options.libraryVersion || options.factPackRef || (options.componentBasis && options.componentBasis !== "html-css-js")) throw new TypeError("原型 Provider 已退役;请迁移到 html-css-js 离线交付,历史原型保持只读");
|
|
247
|
+
return prepareOfflineHtml({ ...options, profile: "H2" });
|
|
302
248
|
}
|
|
303
249
|
|
|
304
250
|
export const preparePrototype = prepareFlowPrototype;
|
|
305
251
|
|
|
306
|
-
export async function validatePrototypeProject({ root, profile = "H2", componentBasis,
|
|
307
|
-
|
|
308
|
-
if (!
|
|
309
|
-
|
|
310
|
-
if (!
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const stylesPath = path.join(root, "styles.css");
|
|
314
|
-
if (!existsSync(stylesPath)) errors.push("H1 缺少 styles.css");
|
|
315
|
-
else {
|
|
316
|
-
const styles = await readFile(stylesPath, "utf8");
|
|
317
|
-
for (const token of ["--brand-font-family", "--brand-color-text", "--brand-color-bg-layout", "--brand-color-bg-container", "--yss-color-primary-control", "--yss-control-height-compact"]) if (!styles.includes(token)) errors.push(`H1 styles.css 未消费项目 Token ${token}`);
|
|
318
|
-
for (const staleAlias of ["--font-family", "--layout-background", "--container-background", "--brand-primary"]) if (styles.includes(staleAlias)) errors.push(`H1 styles.css 使用过时变量 ${staleAlias}`);
|
|
319
|
-
for (const hardcodedDeclaration of ["padding:24px", "padding:20px", "min-height:32px", "border-radius:8px", "border-radius:6px"]) if (styles.includes(hardcodedDeclaration)) errors.push(`H1 styles.css 硬编码视觉基线 ${hardcodedDeclaration}`);
|
|
320
|
-
}
|
|
321
|
-
return { errors };
|
|
252
|
+
export async function validatePrototypeProject({ root, profile = "H2", componentBasis, targetAntdVersion }) {
|
|
253
|
+
if (!Object.hasOwn(PROFILE_KIND, profile)) return { errors: ["prototype_profile 必须为 H1/H2"] };
|
|
254
|
+
if (targetAntdVersion || (componentBasis && !["html-css-js", "react-antd-prebuilt"].includes(componentBasis))) return { errors: ["旧 Provider 项目不进入当前生成路线;请保留历史快照并迁移"] };
|
|
255
|
+
const result = await validateOfflineHtml(root, profile);
|
|
256
|
+
if (componentBasis && !result.errors.length) {
|
|
257
|
+
const manifest = JSON.parse(await readFile(path.join(root, "yss-prototype-adapter.json"), "utf8"));
|
|
258
|
+
if (manifest.component_basis !== componentBasis) result.errors.push("componentBasis 与原型 manifest 不一致");
|
|
322
259
|
}
|
|
323
|
-
|
|
324
|
-
if (!existsSync(packagePath)) return { errors: [...errors, "缺少 package.json"] };
|
|
325
|
-
const pkg = JSON.parse(await readFile(packagePath, "utf8"));
|
|
326
|
-
if (profile === "H2") {
|
|
327
|
-
const adapterPath = path.join(root, "yss-prototype-adapter.json");
|
|
328
|
-
const adapter = existsSync(adapterPath) ? JSON.parse(await readFile(adapterPath, "utf8")) : {};
|
|
329
|
-
const resolvedBasis = componentBasis ?? (targetAntdVersion ? "react-antd-6" : adapter.component_basis ?? (adapter.prototype_framework === "react" ? "react-antd-6" : DEFAULT_H2_COMPONENT_BASIS));
|
|
330
|
-
if (resolvedBasis === "react-antd-6") {
|
|
331
|
-
const resolvedVersion = targetAntdVersion ?? libraryVersion ?? adapter.target_antd_version;
|
|
332
|
-
if (pkg.dependencies?.antd !== resolvedVersion) errors.push(`package.json 必须精确锁定 antd ${resolvedVersion}`);
|
|
333
|
-
if (!antdSemver.test(resolvedVersion ?? "")) errors.push("React H2 libraryVersion 必须是 antd 6.x semver");
|
|
334
|
-
if (!existsSync(path.join(root, "src/yss-theme.js"))) errors.push("React/AntD H2 缺少 src/yss-theme.js");
|
|
335
|
-
const sourceFiles = ["src/App.jsx", "src/App.tsx", "src/main.jsx", "src/main.tsx"].filter((file) => existsSync(path.join(root, file)));
|
|
336
|
-
const source = (await Promise.all(sourceFiles.map((file) => readFile(path.join(root, file), "utf8")))).join("\n");
|
|
337
|
-
if (!/ConfigProvider/.test(source) || !/yssTheme/.test(source)) errors.push("React/AntD H2 入口必须通过 ConfigProvider 消费 yssTheme");
|
|
338
|
-
} else if (resolvedBasis === "vue-antdv-next") {
|
|
339
|
-
const resolvedVersion = libraryVersion ?? adapter.library?.version ?? DEFAULT_ANTDV_NEXT_VERSION;
|
|
340
|
-
if (pkg.dependencies?.["antdv-next"] !== resolvedVersion) errors.push(`package.json 必须精确锁定 antdv-next ${resolvedVersion}`);
|
|
341
|
-
if (!exactSemver.test(resolvedVersion ?? "")) errors.push("Vue H2 libraryVersion 必须是明确 semver");
|
|
342
|
-
for (const [name, expected] of Object.entries(adapter.framework_packages ?? {})) if (pkg.dependencies?.[name] !== expected) errors.push(`package.json 必须精确锁定 ${name} ${expected}`);
|
|
343
|
-
for (const file of ["vite.config.mjs", "src/main.js", "src/App.vue", "src/yss-theme.js"]) if (!existsSync(path.join(root, file))) errors.push(`Vue/Antdv Next H2 缺少 ${file}`);
|
|
344
|
-
const sourceFiles = ["src/App.vue", "src/main.js", "src/yss-theme.js"].filter((file) => existsSync(path.join(root, file)));
|
|
345
|
-
const source = (await Promise.all(sourceFiles.map((file) => readFile(path.join(root, file), "utf8")))).join("\n");
|
|
346
|
-
if (!/a-config-provider/.test(source) || !/yssTheme/.test(source)) errors.push("Vue/Antdv Next H2 必须通过 ConfigProvider 消费 yssTheme");
|
|
347
|
-
if (!/compactAlgorithm/.test(source)) errors.push("Vue/Antdv Next H2 主题必须消费 compactAlgorithm");
|
|
348
|
-
if (adapter.schema_version !== 3 || adapter.component_basis !== "vue-antdv-next" || adapter.framework !== "vue") errors.push("Vue/Antdv Next H2 adapter manifest 必须使用 provider-neutral schema v3");
|
|
349
|
-
} else {
|
|
350
|
-
errors.push(`不支持的 H2 component basis: ${resolvedBasis}`);
|
|
351
|
-
}
|
|
352
|
-
if (!String(pkg.packageManager ?? "").startsWith("pnpm@")) errors.push("H2 package.json 必须记录实际 pnpm packageManager");
|
|
353
|
-
if (!existsSync(path.join(root, "pnpm-lock.yaml"))) errors.push("H2 缺少 pnpm-lock.yaml");
|
|
354
|
-
}
|
|
355
|
-
return { errors };
|
|
260
|
+
return result;
|
|
356
261
|
}
|
|
357
262
|
|
|
358
263
|
function args(argv) {
|
|
@@ -378,11 +283,15 @@ async function main(argv) {
|
|
|
378
283
|
const parsed = args(argv);
|
|
379
284
|
const command = parsed._[0];
|
|
380
285
|
if (command === "prepare-static") {
|
|
381
|
-
process.stdout.write(`${JSON.stringify(await prepareStaticPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature }), null, 2)}\n`);
|
|
286
|
+
process.stdout.write(`${JSON.stringify(await prepareStaticPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, pattern: parsed.pattern }), null, 2)}\n`);
|
|
382
287
|
return;
|
|
383
288
|
}
|
|
384
289
|
if (["prepare", "prepare-flow"].includes(command)) {
|
|
385
|
-
process.stdout.write(`${JSON.stringify(await prepareFlowPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, componentBasis: parsed["component-basis"], libraryVersion: parsed["library-version"], targetAntdVersion: parsed["target-antd-version"], pnpmVersion: parsed["pnpm-version"],
|
|
290
|
+
process.stdout.write(`${JSON.stringify(await prepareFlowPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, pattern: parsed.pattern, componentBasis: parsed["component-basis"], libraryVersion: parsed["library-version"], targetAntdVersion: parsed["target-antd-version"], pnpmVersion: parsed["pnpm-version"], factPackRef: parsed["fact-pack-ref"] }), null, 2)}\n`);
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
if (command === "seal-project") {
|
|
294
|
+
process.stdout.write(`${JSON.stringify(await sealOfflineHtml(parsed.root, parsed.profile ?? "H2"), null, 2)}\n`);
|
|
386
295
|
return;
|
|
387
296
|
}
|
|
388
297
|
if (command === "validate-project") {
|
|
@@ -397,7 +306,7 @@ async function main(argv) {
|
|
|
397
306
|
process.stdout.write(`prototype evidence passed${result.warnings.length ? ` with warnings: ${result.warnings.join(", ")}` : ""}\n`);
|
|
398
307
|
return;
|
|
399
308
|
}
|
|
400
|
-
throw new TypeError("usage: prototype-contract.mjs prepare-static|prepare-flow|validate-project|validate-evidence ...");
|
|
309
|
+
throw new TypeError("usage: prototype-contract.mjs prepare-static|prepare-flow|seal-project|validate-project|validate-evidence ...");
|
|
401
310
|
}
|
|
402
311
|
|
|
403
312
|
if (import.meta.url === pathToFileURL(process.argv[1]).href) main(process.argv.slice(2)).catch((error) => { process.stderr.write(`${error.message}\n`); process.exitCode = 1; });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {test} from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {mkdtempSync,mkdirSync,writeFileSync,existsSync,rmSync} from 'node:fs';
|
|
4
|
+
import os from 'node:os';
|
|
5
|
+
import path from 'node:path';
|
|
6
|
+
import {collectAntdReference} from '../scripts/collect-antd-reference.mjs';
|
|
7
|
+
test('reference collection distinguishes exact evidence from minor fallback and refuses fabricated coverage',()=>{
|
|
8
|
+
const temp=mkdtempSync(path.join(os.tmpdir(),'antd-metadata-contract-'));
|
|
9
|
+
try{
|
|
10
|
+
const pkg=path.join(temp,'node_modules/@ant-design/cli');mkdirSync(path.join(pkg,'data'),{recursive:true});
|
|
11
|
+
writeFileSync(path.join(pkg,'package.json'),JSON.stringify({name:'@ant-design/cli',version:'6.6.4'}));
|
|
12
|
+
writeFileSync(path.join(pkg,'data/versions.json'),JSON.stringify({v6:{'6.6':'6.6.4'}}));
|
|
13
|
+
writeFileSync(path.join(pkg,'data/v6.6.4.json'),JSON.stringify({version:'6.6.4',components:[{name:'Button',props:[{name:'disabled'}]}]}));
|
|
14
|
+
const run=(version,name,components=['Button'])=>collectAntdReference({toolchain:temp,version,output:path.join(temp,name),components});
|
|
15
|
+
assert.equal(run('6.6.4','exact').version_match,'exact');
|
|
16
|
+
assert.equal(run('6.6.3','fallback').version_match,'minor-snapshot-only');
|
|
17
|
+
assert.throws(()=>run('6.5.0','unavailable'),/未收录该 minor/);
|
|
18
|
+
assert.throws(()=>run('6.6.4','util',['Util']),/不可补造 API/);
|
|
19
|
+
assert.equal(existsSync(path.join(temp,'util')),false);
|
|
20
|
+
assert.throws(()=>run('6.6.4','exact'),/输出已存在/);
|
|
21
|
+
writeFileSync(path.join(pkg,'data/v6.6.4.json'),JSON.stringify({version:'6.6.3',components:[]}));
|
|
22
|
+
assert.throws(()=>run('6.6.4','drift'),/版本不一致/);
|
|
23
|
+
}finally{rmSync(temp,{recursive:true,force:true});}
|
|
24
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Template adapter smoke test; this is not a product prototype approval.
|
|
2
|
+
import assert from "node:assert/strict";
|
|
3
|
+
import { mkdtemp, mkdir, cp, writeFile } from "node:fs/promises";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
import { prepareFlowPrototype, prepareStaticPrototype } from "../scripts/prototype-contract.mjs";
|
|
8
|
+
|
|
9
|
+
const { chromium } = await import(process.env.YSS_PLAYWRIGHT_MODULE || "playwright");
|
|
10
|
+
const temp = await mkdtemp(path.join(os.tmpdir(), "yss-offline-browser-"));
|
|
11
|
+
const source = path.join(temp, "source");
|
|
12
|
+
await mkdir(path.join(source, "docs/design/tokens"), { recursive: true });
|
|
13
|
+
await cp(new URL("../../../../DESIGN.md", import.meta.url), path.join(source, "DESIGN.md"));
|
|
14
|
+
await cp(new URL("../../../../docs/design/tokens/variables.css", import.meta.url), path.join(source, "docs/design/tokens/variables.css"));
|
|
15
|
+
const root = path.join(source, "docs/.scratch/fixture/design/prototypes");
|
|
16
|
+
await prepareFlowPrototype({ projectRoot: source, root, feature: "fixture" });
|
|
17
|
+
const portable = path.join(temp, "portable");
|
|
18
|
+
await cp(root, portable, { recursive: true });
|
|
19
|
+
const browser = await chromium.launch(process.env.YSS_BROWSER_CHANNEL ? { channel: process.env.YSS_BROWSER_CHANNEL } : {});
|
|
20
|
+
const results = [];
|
|
21
|
+
try {
|
|
22
|
+
const context = await browser.newContext({ offline: true, viewport: { width: 1440, height: 900 }, deviceScaleFactor: 1, reducedMotion: "reduce", locale: "zh-CN", timezoneId: "Asia/Shanghai" });
|
|
23
|
+
const page = await context.newPage();
|
|
24
|
+
const failures = [];
|
|
25
|
+
page.on("pageerror", error => failures.push(error.message));
|
|
26
|
+
page.on("console", message => { if (["warning", "error"].includes(message.type())) failures.push(message.text()); });
|
|
27
|
+
page.on("requestfailed", request => failures.push(`${request.url()}: ${request.failure()?.errorText}`));
|
|
28
|
+
page.on("request", request => { if (/^https?:/.test(request.url())) failures.push(`unexpected network: ${request.url()}`); });
|
|
29
|
+
const url = pathToFileURL(path.join(portable, "index.html")).href;
|
|
30
|
+
for (const width of [1440, 390]) {
|
|
31
|
+
await page.setViewportSize({ width, height: width === 390 ? 844 : 900 });
|
|
32
|
+
await page.goto("about:blank");
|
|
33
|
+
await page.goto(`${url}#scenario=failure`);
|
|
34
|
+
await page.locator("#content").fill("长中文输入与待保存内容,失败后必须完整保留。");
|
|
35
|
+
await page.locator("#save").click();
|
|
36
|
+
assert.equal(await page.locator("body").getAttribute("data-state"), "error");
|
|
37
|
+
assert.equal(await page.locator("#content").inputValue(), "长中文输入与待保存内容,失败后必须完整保留。");
|
|
38
|
+
await page.locator("#retry").click();
|
|
39
|
+
assert.equal(await page.locator("body").getAttribute("data-state"), "success");
|
|
40
|
+
assert.equal(await page.locator("#retry").isVisible(), false);
|
|
41
|
+
assert.equal(await page.evaluate(() => document.activeElement.id), "save");
|
|
42
|
+
await page.locator("summary").click();
|
|
43
|
+
await page.locator("#reset").click();
|
|
44
|
+
assert.equal(await page.locator("#content").inputValue(), "失败后应保留的输入");
|
|
45
|
+
await page.locator("#scenario").selectOption("no-permission");
|
|
46
|
+
assert.equal(await page.locator("#save").isDisabled(), true);
|
|
47
|
+
assert.equal(await page.locator("#content").getAttribute("readonly"), "");
|
|
48
|
+
await page.locator("#scenario").selectOption("conflict");
|
|
49
|
+
await page.locator("#save").click();
|
|
50
|
+
assert.equal(await page.locator("body").getAttribute("data-state"), "conflict");
|
|
51
|
+
await page.locator("#reload").click();
|
|
52
|
+
assert.equal(await page.locator("#content").inputValue(), "重新加载的最新内容");
|
|
53
|
+
await page.locator("#scenario").selectOption("primary");
|
|
54
|
+
await page.locator("#content").focus();
|
|
55
|
+
await page.keyboard.press("Tab");
|
|
56
|
+
assert.equal(await page.evaluate(() => document.activeElement.id), "save");
|
|
57
|
+
await page.keyboard.press("Enter");
|
|
58
|
+
assert.equal(await page.locator("body").getAttribute("data-state"), "success");
|
|
59
|
+
const layout = await page.evaluate(() => ({ overflow: document.documentElement.scrollWidth > innerWidth, height: getComputedStyle(document.querySelector("#save")).minHeight, color: getComputedStyle(document.querySelector("#save")).backgroundColor, reducedMotion: matchMedia("(prefers-reduced-motion: reduce)").matches }));
|
|
60
|
+
assert.equal(layout.overflow, false);
|
|
61
|
+
assert.equal(layout.height, "32px");
|
|
62
|
+
assert.equal(layout.color, "rgb(36, 91, 219)");
|
|
63
|
+
assert.equal(layout.reducedMotion, true);
|
|
64
|
+
const screenshot = path.join(temp, `h2-${width}.png`);
|
|
65
|
+
await page.screenshot({ path: screenshot, animations: "disabled" });
|
|
66
|
+
results.push({ width, layout, screenshot, scenarios: ["failure-retry-input-preserved", "reset", "no-permission", "conflict-reload", "keyboard-submit"], result: "passed" });
|
|
67
|
+
}
|
|
68
|
+
const h1Root = path.join(source, "docs/.scratch/visual-fixture/design/prototypes");
|
|
69
|
+
await prepareStaticPrototype({ projectRoot: source, root: h1Root, feature: "visual-fixture" });
|
|
70
|
+
await page.goto(pathToFileURL(path.join(h1Root, "index.html")).href);
|
|
71
|
+
assert.equal(await page.locator("h1").innerText(), "visual-fixture");
|
|
72
|
+
assert.deepEqual(failures, []);
|
|
73
|
+
const report = { result: "passed", browser: browser.version(), operating_system: process.platform, delivery: "file://, isolated directory, offline=true", console_and_resource_failures: failures, results, scope: "template starter smoke, not product QA or user approval" };
|
|
74
|
+
const output = path.join(temp, "browser-result.json");
|
|
75
|
+
await writeFile(output, JSON.stringify(report, null, 2));
|
|
76
|
+
process.stdout.write(`${output}\n`);
|
|
77
|
+
} finally { await browser.close(); }
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
3
|
import { buildDecisionFixture } from "../../../../scripts/fixtures/user-decision/build-fixture.mjs";
|
|
4
|
-
import { mkdtemp, mkdir, readFile, writeFile } from "node:fs/promises";
|
|
4
|
+
import { mkdtemp, mkdir, readFile, writeFile, rm, cp, symlink } from "node:fs/promises";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { prepareFlowPrototype, prepareStaticPrototype, validatePrototypeEvidence, validatePrototypeProject, prototypeDecisionSnapshot } from "../scripts/prototype-contract.mjs";
|
|
8
8
|
import { sealVisualBaseline, validateVisualBaseline } from "../scripts/visual-baseline-contract.mjs";
|
|
9
9
|
|
|
10
|
+
import { sealOfflineHtml } from "../scripts/offline-html.mjs";
|
|
11
|
+
|
|
10
12
|
const tempRoot = await mkdtemp(path.join(os.tmpdir(), "yss-prototype-contract-"));
|
|
11
13
|
const projectRoot = path.join(tempRoot, "project");
|
|
12
14
|
const feature = "order-review";
|
|
@@ -14,37 +16,48 @@ await mkdir(path.join(projectRoot, "docs/design/tokens"), { recursive: true });
|
|
|
14
16
|
await writeFile(path.join(projectRoot, "DESIGN.md"), "---\nversion: alpha\n---\n");
|
|
15
17
|
await writeFile(path.join(projectRoot, "docs/design/tokens/theme.json"), JSON.stringify({ token: { colorPrimary: "#3371ff", borderRadius: 6, controlHeight: 32 } }, null, 2));
|
|
16
18
|
|
|
19
|
+
await cp(new URL("../../../../docs/design/tokens/variables.css", import.meta.url), path.join(projectRoot, "docs/design/tokens/variables.css"));
|
|
20
|
+
|
|
17
21
|
const h1Root = path.join(projectRoot, "docs/.scratch", feature, "design/prototypes");
|
|
18
22
|
await prepareStaticPrototype({ projectRoot, root: h1Root, feature });
|
|
19
|
-
assert.match(await readFile(path.join(h1Root, "index.html"), "utf8"), /H1 · visual-review/);
|
|
20
|
-
const h1Styles = await readFile(path.join(h1Root, "styles.css"), "utf8");
|
|
21
|
-
for (const token of ["--brand-font-family", "--brand-color-text", "--brand-color-bg-layout", "--brand-color-bg-container", "--yss-color-primary-control", "--yss-control-height-compact", "--brand-size-lg", "--brand-size", "--brand-size-sm", "--brand-border-radius-lg", "--brand-border-radius"]) assert.match(h1Styles, new RegExp(token));
|
|
22
|
-
for (const staleAlias of ["--font-family", "--layout-background", "--container-background", "--brand-primary"]) assert.doesNotMatch(h1Styles, new RegExp(staleAlias));
|
|
23
|
-
for (const hardcodedDeclaration of ["padding:24px", "padding:20px", "min-height:32px", "border-radius:8px", "border-radius:6px"]) assert.doesNotMatch(h1Styles, new RegExp(hardcodedDeclaration));
|
|
24
23
|
assert.deepEqual((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors, []);
|
|
24
|
+
const originalHtml = await readFile(path.join(h1Root, "index.html"), "utf8");
|
|
25
|
+
await assert.rejects(prepareStaticPrototype({ projectRoot, root: h1Root, feature }), /已有内容|已存在内容/);
|
|
26
|
+
assert.equal(await readFile(path.join(h1Root, "index.html"), "utf8"), originalHtml);
|
|
25
27
|
await writeFile(path.join(h1Root, "package.json"), "{}\n");
|
|
26
|
-
assert((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors.some(
|
|
28
|
+
assert((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors.some(message => message.includes("package.json")));
|
|
29
|
+
await rm(path.join(h1Root, "package.json"));
|
|
27
30
|
|
|
28
31
|
const h2Feature = "approval-flow";
|
|
29
32
|
const h2Root = path.join(projectRoot, "docs/.scratch", h2Feature, "design/prototypes");
|
|
30
|
-
const h2Manifest = await prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature
|
|
31
|
-
|
|
32
|
-
assert.equal(h2Manifest.
|
|
33
|
-
assert.equal(h2Manifest.library.version, "1.5.2");
|
|
34
|
-
assert.match(await readFile(path.join(h2Root, "src/App.vue"), "utf8"), /a-config-provider/);
|
|
35
|
-
assert.match(await readFile(path.join(h2Root, "src/yss-theme.js"), "utf8"), /compactAlgorithm/);
|
|
33
|
+
const h2Manifest = await prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature });
|
|
34
|
+
assert.equal(h2Manifest.component_basis, "html-css-js");
|
|
35
|
+
assert.equal(h2Manifest.runtime_build_required, false);
|
|
36
36
|
assert.deepEqual((await validatePrototypeProject({ root: h2Root, profile: "H2" })).errors, []);
|
|
37
|
-
assert((
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
await
|
|
42
|
-
await
|
|
43
|
-
await writeFile(path.join(
|
|
44
|
-
await
|
|
45
|
-
await writeFile(path.join(
|
|
46
|
-
await writeFile(path.join(
|
|
47
|
-
assert.
|
|
37
|
+
await assert.rejects(prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature, componentBasis: "vue-antdv-next" }), /已退役/);
|
|
38
|
+
await assert.rejects(prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature, targetAntdVersion: "6.6.2" }), /已退役/);
|
|
39
|
+
const portableRoot = path.join(tempRoot, "portable");
|
|
40
|
+
await cp(h2Root, portableRoot, { recursive: true });
|
|
41
|
+
assert.deepEqual((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors, [], "脱离源仓后仍可校验");
|
|
42
|
+
const styles = await readFile(path.join(portableRoot, "styles.css"), "utf8");
|
|
43
|
+
await writeFile(path.join(portableRoot, "styles.css"), styles + '\n@import "../outside.css";');
|
|
44
|
+
await assert.rejects(sealOfflineHtml(portableRoot, "H2"), /资源缺失或越出交付包/);
|
|
45
|
+
await writeFile(path.join(portableRoot, "styles.css"), styles);
|
|
46
|
+
await writeFile(path.join(portableRoot, "tokens.css"), "/* tampered */");
|
|
47
|
+
await assert.rejects(sealOfflineHtml(portableRoot, "H2"), /Token 来源摘要/);
|
|
48
|
+
await cp(path.join(h2Root, "tokens.css"), path.join(portableRoot, "tokens.css"));
|
|
49
|
+
await symlink(path.join(projectRoot, "DESIGN.md"), path.join(portableRoot, "escaped.md"));
|
|
50
|
+
assert((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors.some(message => message.includes("符号链接")));
|
|
51
|
+
await rm(path.join(portableRoot, "escaped.md"));
|
|
52
|
+
const html = await readFile(path.join(portableRoot, "index.html"), "utf8");
|
|
53
|
+
for (const addition of ['<script type="module" src="./app.js"></script>', '<script src="https://example.test/app.js"></script>', '<script>fetch("./data.json")</script>']) {
|
|
54
|
+
await writeFile(path.join(portableRoot, "index.html"), html + addition);
|
|
55
|
+
await assert.rejects(sealOfflineHtml(portableRoot, "H2"));
|
|
56
|
+
}
|
|
57
|
+
await writeFile(path.join(portableRoot, "index.html"), html + "<!-- changed -->");
|
|
58
|
+
assert((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors.some(message => message.includes("摘要")));
|
|
59
|
+
await sealOfflineHtml(portableRoot, "H2");
|
|
60
|
+
assert.deepEqual((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors, []);
|
|
48
61
|
|
|
49
62
|
function common(profile, kind, block) {
|
|
50
63
|
const data = {
|
|
@@ -109,11 +122,12 @@ const h2Evidence = common("H2", "flow-review", { flow_review: {
|
|
|
109
122
|
visual_regression: { applicable: true, result: "passed", evidence_ref: "visual.json" },
|
|
110
123
|
prototype_library_facts: { applicable: true, component_basis: "vue-antdv-next", source: "fact-pack", library_package: "antdv-next", library_version: "1.5.2", manifest_ref: "docs/design/facts/antdv-next/1.5.2/manifest.json", manifest_digest: "sha256:facts", components_covered: ["Button"], canonical_design_digest: "sha256:design", project_token_baseline_digest: "sha256:tokens", new_api_uncertainty: false }
|
|
111
124
|
} });
|
|
112
|
-
assert
|
|
125
|
+
assert(validatePrototypeEvidence(h2Evidence).errors.some(message => message.includes("Provider 已退役")));
|
|
126
|
+
assert.deepEqual(validatePrototypeEvidence(h2Evidence, { allowLegacy: true }).errors, []);
|
|
113
127
|
const legacyReactEvidence = structuredClone(h2Evidence);
|
|
114
128
|
legacyReactEvidence.profile_evidence.flow_review.implementation.framework = "react";
|
|
115
129
|
legacyReactEvidence.profile_evidence.flow_review.prototype_library_facts = { applicable: true, component_basis: "react-antd-6", source: "fact-pack", actual_antd_version: "6.6.2", manifest_ref: "docs/design/facts/antd/6.6.2/manifest.json", manifest_digest: "sha256:facts", components_covered: ["Button"], canonical_design_digest: "sha256:design", project_token_baseline_digest: "sha256:tokens", new_api_uncertainty: false };
|
|
116
|
-
assert.deepEqual(validatePrototypeEvidence(legacyReactEvidence).errors, []);
|
|
130
|
+
assert.deepEqual(validatePrototypeEvidence(legacyReactEvidence, { allowLegacy: true }).errors, []);
|
|
117
131
|
const staleFacts = structuredClone(h2Evidence);
|
|
118
132
|
staleFacts.profile_evidence.flow_review.prototype_library_facts.project_token_baseline_digest = "sha256:old";
|
|
119
133
|
assert(validatePrototypeEvidence(staleFacts).errors.some((message) => message.includes("Token digest")));
|
|
@@ -137,6 +151,39 @@ assert(validatePrototypeEvidence(invalidHandoff).errors.some((message) => messag
|
|
|
137
151
|
assert(validatePrototypeEvidence({ schema_version: 3 }).errors.some((message) => message.includes("只读旧证据")));
|
|
138
152
|
assert.deepEqual(validatePrototypeEvidence({ schema_version: 3 }, { allowLegacy: true }).errors, []);
|
|
139
153
|
|
|
154
|
+
|
|
155
|
+
const htmlEvidence = common("H2", "flow-review", { flow_review: {
|
|
156
|
+
implementation: { framework: "html-css-js", runtime_build_required: false },
|
|
157
|
+
main_flow_result: "passed", exceptional_state_result: "passed", exceptional_state_ref: "exceptions.md",
|
|
158
|
+
keyboard_result: "passed", focus_result: "passed", contrast_result: "passed", zoom_200_result: "passed", reduced_motion_result: "passed",
|
|
159
|
+
scenario_replay_ref: "replay.json", scenario_reset_result: "passed",
|
|
160
|
+
visual_regression: { applicable: false, result: "not-applicable", evidence_ref: "first-version.md" },
|
|
161
|
+
prototype_library_facts: { applicable: false, component_basis: "html-css-js" }
|
|
162
|
+
} });
|
|
163
|
+
htmlEvidence.source_visual = { kind: "design-system", ideation_status: "not-applicable", selected_ref: "DESIGN.md", reuse_reason: "已有规范覆盖当前页面模式" };
|
|
164
|
+
htmlEvidence.design_qa.mode = "design-contract";
|
|
165
|
+
Object.assign(htmlEvidence.browser_delivery, { delivery_contract: "offline-html-v1", resource_manifest_ref: "yss-prototype-adapter.json", offline_verification_ref: "offline.json", offline_verification_result: "passed" });
|
|
166
|
+
assert.deepEqual(validatePrototypeEvidence(htmlEvidence).errors, []);
|
|
167
|
+
for (const field of ["offline_verification_result", "offline_verification_ref", "resource_manifest_ref"]) {
|
|
168
|
+
const invalid = structuredClone(htmlEvidence); delete invalid.browser_delivery[field];
|
|
169
|
+
assert(validatePrototypeEvidence(invalid).errors.some(message => message.includes(field)));
|
|
170
|
+
}
|
|
171
|
+
const selfComparison = structuredClone(htmlEvidence); selfComparison.design_qa.mode = "visual-comparison";
|
|
172
|
+
assert(validatePrototypeEvidence(selfComparison).errors.some(message => message.includes("source_visual.kind")));
|
|
173
|
+
const incompleteFlow = structuredClone(htmlEvidence); incompleteFlow.profile_evidence.flow_review.scenario_reset_result = "pending";
|
|
174
|
+
assert(validatePrototypeEvidence(incompleteFlow).errors.some(message => message.includes("scenario_reset_result")));
|
|
175
|
+
|
|
176
|
+
const prebuiltEvidence = structuredClone(htmlEvidence);
|
|
177
|
+
Object.assign(prebuiltEvidence.profile_evidence.flow_review.implementation, { framework: "react-antd-prebuilt", selection_reason: "日期与受控表单影响评审结论" });
|
|
178
|
+
prebuiltEvidence.profile_evidence.flow_review.prototype_library_facts = { applicable: true, component_basis: "react-antd-prebuilt", library_package: "antd", library_version: "6.6.4", source: "fact-pack", manifest_ref: "reference/manifest.json", manifest_digest: "sha256:" + "c".repeat(64), canonical_design_digest: prebuiltEvidence.design_baseline.canonical_design_digest, project_token_baseline_digest: prebuiltEvidence.design_baseline.project_token_baseline_digest, new_api_uncertainty: false, components_covered: ["Table", "Select"], build_provenance_ref: "build-provenance.json" };
|
|
179
|
+
assert.deepEqual(validatePrototypeEvidence(prebuiltEvidence).errors, []);
|
|
180
|
+
for (const field of ["build_provenance_ref", "library_version"]) {
|
|
181
|
+
const invalid = structuredClone(prebuiltEvidence); delete invalid.profile_evidence.flow_review.prototype_library_facts[field];
|
|
182
|
+
assert(validatePrototypeEvidence(invalid).errors.length > 0);
|
|
183
|
+
}
|
|
184
|
+
const noPrebuiltReason = structuredClone(prebuiltEvidence); delete noPrebuiltReason.profile_evidence.flow_review.implementation.selection_reason;
|
|
185
|
+
assert(validatePrototypeEvidence(noPrebuiltReason).errors.some(x => x.includes("selection_reason")));
|
|
186
|
+
|
|
140
187
|
function pngHeader(width, height) {
|
|
141
188
|
const value = Buffer.alloc(24);
|
|
142
189
|
Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]).copy(value, 0);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Real browser verification of reusable maintenance starters; never product approval.
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {mkdtemp,mkdir,cp,writeFile,readFile} from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import {pathToFileURL} from 'node:url';
|
|
7
|
+
import {prepareFlowPrototype,validatePrototypeProject} from '../scripts/prototype-contract.mjs';
|
|
8
|
+
import {buildAntdPrototype} from '../scripts/build-antd-prototype.mjs';
|
|
9
|
+
const {chromium}=await import(process.env.YSS_PLAYWRIGHT_MODULE||'playwright');
|
|
10
|
+
const temp=await mkdtemp(path.join(os.tmpdir(),'yss-workbench-browser-'));const source=path.join(temp,'source');
|
|
11
|
+
await mkdir(path.join(source,'docs/design/tokens'),{recursive:true});for(const ref of ['DESIGN.md','docs/design/tokens/variables.css'])await cp(new URL(`../../../../${ref}`,import.meta.url),path.join(source,ref));
|
|
12
|
+
const results=[];const browser=await chromium.launch(process.env.YSS_BROWSER_CHANNEL?{channel:process.env.YSS_BROWSER_CHANNEL}:{});
|
|
13
|
+
try{
|
|
14
|
+
for(const kind of ['native','antd']){
|
|
15
|
+
const root=path.join(source,`docs/.scratch/${kind}/design/prototypes`);
|
|
16
|
+
if(kind==='native')await prepareFlowPrototype({projectRoot:source,root,feature:kind,pattern:'workbench'});
|
|
17
|
+
else{await assert.rejects(buildAntdPrototype({projectRoot:source,root,feature:kind}),/理由/);await buildAntdPrototype({projectRoot:source,root,feature:kind,toolchain:process.env.YSS_ANTD_TOOLCHAIN,reason:'维护测试:复杂表格分页、Select 与日期区间需要真实交互'});}
|
|
18
|
+
assert.deepEqual((await validatePrototypeProject({root,componentBasis:kind==='antd'?'react-antd-prebuilt':'html-css-js'})).errors,[]);
|
|
19
|
+
if(kind==='antd'){
|
|
20
|
+
assert((await validatePrototypeProject({root,componentBasis:'html-css-js'})).errors.length);
|
|
21
|
+
const ref=path.join(root,'build-provenance.json'),original=await readFile(ref,'utf8');
|
|
22
|
+
await writeFile(ref,'{broken');assert((await validatePrototypeProject({root})).errors.some(e=>e.includes('有效 JSON')));await writeFile(ref,original);
|
|
23
|
+
const sourceRef=path.join(root,'authoring-source.jsx'),sourceBytes=await readFile(sourceRef);
|
|
24
|
+
await writeFile(sourceRef,sourceBytes+'\n// drift');assert((await validatePrototypeProject({root})).errors.some(e=>e.includes('源文件')));await writeFile(sourceRef,sourceBytes);
|
|
25
|
+
await assert.rejects(buildAntdPrototype({projectRoot:source,root,feature:kind,toolchain:process.env.YSS_ANTD_TOOLCHAIN,reason:'验证拒绝覆盖'}),/已存在内容/);
|
|
26
|
+
assert.deepEqual((await validatePrototypeProject({root})).errors,[]);
|
|
27
|
+
}
|
|
28
|
+
const portable=path.join(temp,kind);await cp(root,portable,{recursive:true});const url=pathToFileURL(path.join(portable,'index.html')).href;
|
|
29
|
+
const context=await browser.newContext({offline:true,deviceScaleFactor:1,locale:'zh-CN',timezoneId:'Asia/Shanghai',reducedMotion:'reduce'});
|
|
30
|
+
const page=await context.newPage();const failures=[];
|
|
31
|
+
page.on('pageerror',e=>failures.push(e.message));page.on('console',m=>{if(['warning','error'].includes(m.type()))failures.push(m.text());});page.on('requestfailed',r=>failures.push(r.url()));page.on('request',r=>{if(/^https?:/.test(r.url()))failures.push(r.url());});
|
|
32
|
+
for(const width of [1440,390]){
|
|
33
|
+
await page.setViewportSize({width,height:width===390?844:900});await page.goto('about:blank');await page.goto(url+'#scenario=failure');
|
|
34
|
+
await page.getByRole('button',{name:'查看 M-001',exact:true}).click();await page.getByRole('dialog').waitFor();await page.keyboard.press('Escape');await page.getByRole('dialog').waitFor({state:'hidden'});
|
|
35
|
+
await page.getByRole('button',{name:'编辑 M-001',exact:true}).click();await page.locator('#name').fill('维护测试:跨部门资料更新');await page.locator('#save').click();await page.getByText('保存失败,输入已保留,请重试。',{exact:true}).waitFor();assert.equal(await page.locator('#name').inputValue(),'维护测试:跨部门资料更新');await page.locator('#retry').click();await page.getByText('保存成功(本地模拟)。',{exact:true}).waitFor();
|
|
36
|
+
assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);
|
|
37
|
+
await page.locator('.table-scroll, .ant-table-content').evaluateAll(elements=>elements.forEach(el=>{el.scrollLeft=0;}));await page.evaluate(()=>scrollTo(0,0));
|
|
38
|
+
const screenshot=path.join(temp,`${kind}-${width}.png`);await page.screenshot({path:screenshot,animations:'disabled'});
|
|
39
|
+
await page.locator('summary').click();await page.locator('#reset').click();assert.equal(await page.locator('table').getByText('季度经营分析资料',{exact:true}).count(),1);
|
|
40
|
+
await page.locator('#scenario').selectOption('no-permission');assert.equal(await page.getByRole('button',{name:'编辑 M-001',exact:true}).isDisabled(),true);
|
|
41
|
+
await page.locator('#scenario').selectOption('empty');await page.getByText('暂无符合条件的资料',{exact:true}).waitFor();
|
|
42
|
+
await page.locator('#scenario').selectOption('loading');if(kind==='native')await page.getByText('正在加载(固定评审状态)',{exact:true}).waitFor();else assert.equal(await page.locator('.ant-spin-spinning').count(),1);
|
|
43
|
+
await page.locator('#scenario').selectOption('conflict');await page.getByRole('button',{name:'编辑 M-001',exact:true}).click();await page.locator('#name').fill('冲突时保留的输入');await page.locator('#save').click();assert.equal(await page.locator('#name').inputValue(),'冲突时保留的输入');await page.locator('#reload').click();
|
|
44
|
+
const control=await page.locator('#save').evaluate(el=>({height:el.getBoundingClientRect().height,color:getComputedStyle(el).backgroundColor}));assert.equal(control.height,32);assert.equal(control.color,'rgb(36, 91, 219)');
|
|
45
|
+
if(kind==='antd'){const theme=await page.locator('#name').evaluate(el=>({background:getComputedStyle(el).backgroundColor,color:getComputedStyle(el).color}));assert.equal(theme.background,'rgb(255, 255, 255)');assert.equal(theme.color,'rgba(0, 0, 0, 0.88)');}
|
|
46
|
+
if(kind==='antd'){
|
|
47
|
+
await page.locator('#owner').click();await page.locator('.ant-select-item-option').filter({hasText:'王宁'}).click();
|
|
48
|
+
const date=page.locator('.ant-picker-input input').first();await date.click();await page.locator('.ant-picker-panel-container').waitFor();await page.keyboard.press('Escape');await page.locator('.ant-picker-panel-container').waitFor({state:'hidden'});
|
|
49
|
+
}
|
|
50
|
+
await page.locator('#save').focus();await page.keyboard.press('Escape');await page.getByRole('dialog').waitFor({state:'hidden'});
|
|
51
|
+
await page.locator('#scenario').selectOption('primary');await page.locator('#keyword').fill('M-003');await page.getByRole('button',{name:'查询',exact:true}).click();await page.getByRole('button',{name:'查看 M-003',exact:true}).waitFor();
|
|
52
|
+
results.push({kind,width,result:'passed',control,screenshot,scenarios:['query','detail-escape','edit-failure-retry','reset','no-permission','empty','loading','conflict-reload',...(kind==='antd'?['select','date-panel']:[])]});
|
|
53
|
+
}
|
|
54
|
+
assert.deepEqual(failures,[]);await context.close();
|
|
55
|
+
}
|
|
56
|
+
const report={result:'passed',scope:'maintenance starters only; not product QA or approval',browser:browser.version(),os:process.platform,delivery:'file:// isolated directory offline=true',results};await writeFile(path.join(temp,'result.json'),JSON.stringify(report,null,2));console.log(path.join(temp,'result.json'));
|
|
57
|
+
}finally{await browser.close();}
|