create-yss-spec 3.3.7 → 3.4.1
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 +12 -13
- package/package.json +1 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -13
- package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.agents/skills/yss-application/SKILL.md +1 -1
- package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +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 +1 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
- package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
- 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-formily/SKILL.md +21 -258
- 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 +3 -3
- 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 +17 -5
- package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- 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 +12 -8
- 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 +97 -9
- 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-openapi-governance/SKILL.md +2 -0
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.agents/skills/yss-prototype-stage/SKILL.md +22 -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-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 +1 -1
- package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
- package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
- package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
- package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
- package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
- package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
- package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
- package/template/.agents/skills/yss-ui/SKILL.md +3 -2
- 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-web-controller/SKILL.md +1 -1
- package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
- package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.codex/skills/yss-application/SKILL.md +1 -1
- package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +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 +1 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
- package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
- 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-formily/SKILL.md +21 -258
- 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 +3 -3
- 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 +17 -5
- package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- 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 +12 -8
- 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 +97 -9
- 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-openapi-governance/SKILL.md +2 -0
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.codex/skills/yss-prototype-stage/SKILL.md +22 -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-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 +1 -1
- package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
- package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
- package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
- package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
- package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
- package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
- package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
- package/template/.codex/skills/yss-ui/SKILL.md +3 -2
- 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-web-controller/SKILL.md +1 -1
- package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
- package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.cursor/skills/yss-application/SKILL.md +1 -1
- package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +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 +1 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
- package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
- 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-formily/SKILL.md +21 -258
- 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 +3 -3
- 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 +17 -5
- package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- 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 +12 -8
- 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 +97 -9
- 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-openapi-governance/SKILL.md +2 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.cursor/skills/yss-prototype-stage/SKILL.md +22 -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-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 +1 -1
- package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
- package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
- package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
- package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
- package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
- package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
- package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
- package/template/.cursor/skills/yss-ui/SKILL.md +3 -2
- 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-web-controller/SKILL.md +1 -1
- package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
- package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
- package/template/.pi/skills/yss-application/SKILL.md +1 -1
- package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +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 +1 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
- package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
- 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-formily/SKILL.md +21 -258
- 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 +3 -3
- 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 +17 -5
- package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
- 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 +12 -8
- 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 +97 -9
- 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-openapi-governance/SKILL.md +2 -0
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.pi/skills/yss-prototype-stage/SKILL.md +22 -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-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 +1 -1
- package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
- package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
- package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
- package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
- package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
- package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
- package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
- package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
- package/template/.pi/skills/yss-ui/SKILL.md +3 -2
- 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-web-controller/SKILL.md +1 -1
- package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
- package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
- package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
- package/template/CONTEXT.md +1 -0
- package/template/DESIGN.md +31 -14
- package/template/README.md +4 -6
- package/template/__yss_dotfile__.gitignore +4 -0
- package/template/docs/agents/backend-architecture-profiles.md +4 -0
- package/template/docs/agents/digital-human-roles.yaml +4 -4
- package/template/docs/agents/skill-migrations.md +15 -2
- package/template/docs/agents/yss-skill-registry.yaml +19 -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-confirmation-template.md +2 -2
- package/template/docs/design/templates/prototype-evidence-template.yaml +18 -22
- package/template/docs/design/templates/prototype-review-checklist.md +5 -3
- 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/plan/templates/market-analysis-template.md +3 -3
- package/template/docs/plan/templates/user-pain-points-template.md +3 -3
- package/template/docs/process/delivery-preflight.md +72 -0
- package/template/docs/process/document-writing.md +5 -1
- package/template/docs/process/existing-backend-architecture.md +31 -0
- package/template/docs/process/existing-ui-baseline.md +40 -0
- package/template/docs/process/frontend-backend-delivery.md +20 -6
- package/template/docs/process/implementation-repo-integration.md +6 -0
- package/template/docs/process/lifecycle-registry-baseline.json +1 -1
- package/template/docs/process/lifecycle-registry.yaml +5 -5
- package/template/docs/process/schemas/api-contract-decision.schema.json +74 -0
- package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
- package/template/docs/process/schemas/data-architecture-decision.schema.json +34 -0
- package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
- package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
- package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
- package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
- package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
- package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
- package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +80 -24
- package/template/docs/process/schemas/project-scaffold-contract.schema.json +85 -11
- package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -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-export-v2.schema.json +378 -0
- package/template/docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json +42 -0
- package/template/docs/process/strategic-handoff-package.md +42 -17
- package/template/docs/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md +43 -0
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
- package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +9 -10
- 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 +13 -10
- package/template/scripts/audit-legacy-backend-scaffold +29 -0
- package/template/scripts/backend-delivery +20 -4
- 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/approved-execution-context.mjs +106 -0
- package/template/scripts/lib/backend-architecture.mjs +12 -0
- package/template/scripts/lib/backend-delivery.mjs +10 -6
- package/template/scripts/lib/backend-scaffold-prerequisites.mjs +123 -0
- package/template/scripts/lib/delivery-preflight.mjs +238 -0
- package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
- package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
- package/template/scripts/lib/frontend-delivery.mjs +23 -15
- package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
- package/template/scripts/lib/json-schema.mjs +19 -4
- 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-transition.mjs +153 -5
- package/template/scripts/lib/openapi-draft-validation.mjs +111 -0
- package/template/scripts/lib/profile-skill-sync.mjs +26 -0
- package/template/scripts/lib/skill-registry.mjs +17 -3
- package/template/scripts/lib/skill-supply-chain.mjs +12 -1
- package/template/scripts/lib/strategic-feedback.mjs +2 -2
- package/template/scripts/lib/strategic-handoff-consumption.mjs +8 -7
- package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
- package/template/scripts/lib/strategic-handoff-io.mjs +10 -0
- package/template/scripts/lib/strategic-handoff.mjs +124 -32
- package/template/scripts/lib/task-package.mjs +11 -3
- package/template/scripts/lib/technical-design-boundary.mjs +9 -1
- package/template/scripts/lib/ui-baseline.mjs +26 -0
- package/template/scripts/lib/user-decision.mjs +4 -1
- package/template/scripts/preflight-delivery +14 -0
- package/template/scripts/strategic-handoff +23 -6
- package/template/scripts/sync-profile-skills +4 -5
- package/template/scripts/verify-openapi-draft-validation-record +10 -129
- package/template/scripts/verify-strategic-context-import +12 -14
- package/template/skills-lock.json +25 -80
- 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
- package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +0 -35
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { existsSync, lstatSync, readdirSync, readFileSync, mkdirSync, writeFileSync, realpathSync } from 'node:fs';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
+
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
4
5
|
import { spawnSync } from 'node:child_process';
|
|
5
6
|
import { fileURLToPath } from 'node:url';
|
|
6
7
|
import { validateJsonSchemas } from './json-schema.mjs';
|
|
7
8
|
import { parseDocument } from '../vendor/yaml.mjs';
|
|
8
9
|
export const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
|
|
10
|
+
// A v5 package keeps the source glossary as a snapshot, never a nested CONTEXT.md.
|
|
11
|
+
// Only this fixed alias is supported, isolated to the current asynchronous reader.
|
|
12
|
+
const sourceContextSnapshots = new AsyncLocalStorage();
|
|
13
|
+
export function withSourceContextSnapshot(root, action) {
|
|
14
|
+
const roots = new Set(sourceContextSnapshots.getStore() || []);
|
|
15
|
+
roots.add(path.resolve(root));
|
|
16
|
+
return sourceContextSnapshots.run(roots, action);
|
|
17
|
+
}
|
|
9
18
|
export const ensure = (condition, message) => { if (!condition) throw new TypeError(message); };
|
|
10
19
|
export const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object' ? Object.fromEntries(Object.keys(value).sort().map(k => [k, canonical(value[k])])) : value;
|
|
11
20
|
export const hash = bytes => `sha256:${createHash('sha256').update(bytes).digest('hex')}`;
|
|
@@ -23,6 +32,7 @@ export function relative(ref) {
|
|
|
23
32
|
}
|
|
24
33
|
export function safe(root, ref, { missing = false } = {}) {
|
|
25
34
|
relative(ref);
|
|
35
|
+
if (ref === 'CONTEXT.md' && sourceContextSnapshots.getStore()?.has(path.resolve(root))) ref = 'source-context.snapshot.md';
|
|
26
36
|
let current = path.resolve(root);
|
|
27
37
|
ensure(!existsSync(current) || !lstatSync(current).isSymbolicLink(), `根目录不能是 symlink: ${root}`);
|
|
28
38
|
for (const part of ref.split('/')) {
|
|
@@ -1,31 +1,44 @@
|
|
|
1
1
|
import { existsSync, lstatSync, readFileSync, mkdirSync, mkdtempSync, renameSync, rmSync, cpSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { tmpdir } from 'node:os';
|
|
4
|
-
import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, schemaBatch, archive, ROOT, sourceApprovalPolicy } from './strategic-handoff-io.mjs';
|
|
4
|
+
import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, schemaBatch, archive, ROOT, sourceApprovalPolicy, withSourceContextSnapshot } from './strategic-handoff-io.mjs';
|
|
5
5
|
import { parseContextSource, parseContextContract, resolveContextTermRefs } from './context-contract.mjs';
|
|
6
6
|
import { countersignRuleForGate } from './digital-human-roles.mjs';
|
|
7
7
|
import { validateApprovalRecord } from './approval-record.mjs';
|
|
8
8
|
import { treeDigest } from './strategic-handoff-io.mjs';
|
|
9
|
-
import {
|
|
9
|
+
import { uiBaselineKind, uiBaselineRef, uiBaselineCaseIds, hasConsumerRoutes, validateHandoffUiBaseline } from './ui-baseline.mjs';
|
|
10
10
|
import { extractTraceability, compareIndexes } from './strategic-handoff-rules.mjs';
|
|
11
11
|
const MAX_BYTES = 512 * 1024 * 1024;
|
|
12
12
|
const own = (a,b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
|
|
13
13
|
const nonempty = x => typeof x === 'string' && x.trim();
|
|
14
14
|
const bytesDigest = (bytes, kind) => kind === 'canonical-json' ? digest(parse(bytes)) : kind === 'sha256-bytes' ? hash(bytes) : (() => { throw new TypeError(`未知摘要算法: ${kind}`); })();
|
|
15
|
-
const HANDOFF_SCHEMAS = new Map([[3,'docs/process/schemas/strategic-design-handoff-v3.schema.json'],[4,'docs/process/schemas/strategic-design-handoff-v4.schema.json']]);
|
|
15
|
+
const HANDOFF_SCHEMAS = new Map([[3,'docs/process/schemas/strategic-design-handoff-v3.schema.json'],[4,'docs/process/schemas/strategic-design-handoff-v4.schema.json'],[5,'docs/process/schemas/strategic-design-handoff-v5.schema.json']]);
|
|
16
16
|
const SOURCE_SCHEMAS = new Map([
|
|
17
17
|
[3,['docs/process/schemas/strategic-handoff-domain-strategy.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package.schema.json']],
|
|
18
18
|
[4,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
|
|
19
|
+
[5,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
|
|
19
20
|
]);
|
|
20
21
|
const CAPABILITIES=['backend-technical-design','frontend-engineering-design','delivery-coordination'];
|
|
21
22
|
|
|
23
|
+
function deliveryReadme(handoff) {
|
|
24
|
+
const sources=Object.entries(handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([key,value])=>`- \`${key}\`: \`${value.persisted_ref}\` (${value.version}, ${value.digest})`);
|
|
25
|
+
const routes=handoff.consumer_routes.map(route=>`- \`${route.capability}\`: \`${route.activation}\` (${route.route_id})`);
|
|
26
|
+
const questions=handoff.tactical_design_questions.length?handoff.tactical_design_questions.map((_,index)=>`- tactical-design-question-${index+1}`).join('\n'):'- 无';
|
|
27
|
+
const deferred=handoff.deferred_decisions_and_ownership.length?handoff.deferred_decisions_and_ownership.map(item=>`- ${item.decision_id||item.id||'deferred-decision'} / ${item.owner||'owner-unset'}`).join('\n'):'- 无';
|
|
28
|
+
return `# 战略交接快照包\n\n此目录是由 Handoff v5 确定性生成的不可变研发交付件。业务正文保留在 \`payload/\`,本页只提供接收导航。\n\n## 范围\n\n- Handoff: \`${handoff.handoff_id}\`\n- Version: \`${handoff.handoff_version}\`\n- Schema: \`5\`\n\n## 来源资产\n\n${sources.join('\n')}\n\n## 消费者路线\n\n${routes.join('\n')}\n\n## 待决问题索引\n\n${questions}\n\n## 延期决定索引\n\n${deferred}\n\n## 接收命令\n\n\`\`\`bash\nscripts/strategic-handoff import --bundle <delivery-dir> --target-root <implementation-repository>\n\`\`\`\n`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isDeliveryDirectory(input) {
|
|
32
|
+
return existsSync(input) && lstatSync(input).isDirectory() && existsSync(path.join(input,'delivery-record.json'));
|
|
33
|
+
}
|
|
34
|
+
|
|
22
35
|
function versionSchema(version, schemas, label) {
|
|
23
36
|
ensure(schemas.has(version), `${label} 未知 schema_version: ${String(version)};支持版本: ${[...schemas.keys()].join(', ')};请使用显式迁移器升级`);
|
|
24
37
|
return schemas.get(version);
|
|
25
38
|
}
|
|
26
39
|
|
|
27
40
|
function validateConsumerRoutes(handoff, stage) {
|
|
28
|
-
if(handoff
|
|
41
|
+
if(!hasConsumerRoutes(handoff))return;
|
|
29
42
|
const routes=new Map();
|
|
30
43
|
for(const route of handoff.consumer_routes||[]){
|
|
31
44
|
ensure(!routes.has(route.capability),`消费者能力重复: ${route.capability}`);
|
|
@@ -128,7 +141,8 @@ export async function inspectSource(root, handoffRef) {
|
|
|
128
141
|
schema(handoff,versionSchema(handoff?.schema_version,HANDOFF_SCHEMAS,'Strategic Handoff'));
|
|
129
142
|
ensure(handoff.status==='approved', '交接包尚未批准');
|
|
130
143
|
const config=handoff.package_export;
|
|
131
|
-
schema(config,'docs/process/schemas/strategic-handoff-export.schema.json');
|
|
144
|
+
schema(config,handoff.schema_version===5?'docs/process/schemas/strategic-handoff-export-v2.schema.json':'docs/process/schemas/strategic-handoff-export.schema.json');
|
|
145
|
+
if(handoff.schema_version===5)ensure(config.ui_baseline_kind===uiBaselineKind(handoff),'交接与导出 UI 基线类型不一致');
|
|
132
146
|
const source=parseContextSource(readFileSync(safe(root,'CONTEXT.md'),'utf8'));
|
|
133
147
|
snapshot(handoff.source_context_snapshot,source); checkDelta(handoff,source);
|
|
134
148
|
const strategy=read(safe(root,handoff.source.domain_strategy_ref.persisted_ref));
|
|
@@ -142,6 +156,7 @@ export async function inspectSource(root, handoffRef) {
|
|
|
142
156
|
ensure(stage.domain_strategy_ref.domain_strategy_id===strategy.domain_strategy_id && stage.domain_strategy_ref.domain_version===strategy.domain_version && stage.domain_strategy_ref.status==='approved' && stage.domain_strategy_ref.persisted_ref===handoff.source.domain_strategy_ref.persisted_ref && stage.domain_strategy_ref.digest===digest(strategy), '阶段包引用的战略内容不一致');
|
|
143
157
|
ensure(!(stage.unresolved_items || []).some(x=>x.type==='blocker'), '阶段包含 blocker');
|
|
144
158
|
validateConsumerRoutes(handoff,stage);
|
|
159
|
+
if(uiBaselineKind(handoff)==='existing-ui-baseline')ensure(stage.impact_assessment?.ui===false,'existing-ui-baseline 不支持 UI 影响,返回产品设计');
|
|
145
160
|
const indexes=extractTraceability(strategy);
|
|
146
161
|
const sourceRoles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
|
|
147
162
|
const roles=sourceApprovalPolicy(sourceRoles);
|
|
@@ -152,22 +167,24 @@ export async function inspectSource(root, handoffRef) {
|
|
|
152
167
|
const currentPlan = (roles.gate_policy.dual_digital_human || []).some(rule => rule.gate === 'gate.plan-approved');
|
|
153
168
|
const terminalGate=currentPlan?'gate.plan-approved':countersignRuleForGate(roles.gate_policy,'gate.strategic-design-handoff-approved')?'gate.strategic-design-handoff-approved':'gate.stage-decision-package-approved';
|
|
154
169
|
const expectedGates={domain_strategy_ref:currentPlan?'gate.plan-approved':'gate.domain-strategy-approved',stage_decision_package_ref:currentPlan?'gate.plan-approved':'gate.stage-decision-package-approved',spec_ref:'gate.spec-baseline-approved',prototype_ref:currentPlan?'gate.product-design-approved':'gate.user-confirmation',visual_baseline_ref:currentPlan?'gate.product-design-approved':'gate.user-confirmation',business_ticket_set_ref:terminalGate,handoff:terminalGate};
|
|
170
|
+
expectedGates.existing_ui_baseline_ref=expectedGates.prototype_ref;
|
|
155
171
|
const bindings={...handoff.source,handoff:{id:handoff.handoff_id,version:handoff.handoff_version,persisted_ref:handoffRef,status:'approved'}};
|
|
156
172
|
for(const [key,ref] of Object.entries(bindings)) {
|
|
157
173
|
const approval=config.approvals[key];
|
|
158
174
|
ensure(approval,`缺少资产批准绑定: ${key}`);
|
|
159
175
|
ensure(approval.gate_id===expectedGates[key],`资产使用错误批准门禁: ${key}`);
|
|
160
|
-
const
|
|
176
|
+
const baselineKey=['visual_baseline_ref','existing_ui_baseline_ref'].includes(key);
|
|
161
177
|
let actual;
|
|
162
|
-
if(
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
} else actual=bytesDigest(
|
|
178
|
+
if(baselineKey) {
|
|
179
|
+
const validated=await validateHandoffUiBaseline(root,handoff);actual=validated.digest;
|
|
180
|
+
if(key==='existing_ui_baseline_ref') {
|
|
181
|
+
ensure(approval.digest_kind==='sha256-bytes','既有 UI 批准必须绑定 manifest 原字节');
|
|
182
|
+
ensure(roles.user_decision_policy.gates.includes(expectedGates.existing_ui_baseline_ref),'既有 UI 承接必须使用产品设计真实用户决定策略');
|
|
183
|
+
}
|
|
184
|
+
} else actual=bytesDigest(readFileSync(safe(root,ref.persisted_ref)),approval.digest_kind);
|
|
169
185
|
if(key!=='handoff')ensure(ref.digest===actual,`源资产摘要过期: ${key}`);
|
|
170
186
|
const record=read(safe(root,approval.record_ref));
|
|
187
|
+
if(key==='existing_ui_baseline_ref')ensure(record.subject_ref===`${ref.persisted_ref}/${ref.manifest_ref}`,'既有 UI 用户决定必须以当前 manifest 为批准主体');
|
|
171
188
|
await sourceApproval(record,roles,root);
|
|
172
189
|
ensure(record.gate_id===approval.gate_id,`批准门禁不匹配: ${key}`);
|
|
173
190
|
ensure((record.artifact_bindings || []).some(x=>x.id===(ref.id||ref.baseline_id) && x.version===ref.version && x.digest===actual),`批准记录未绑定当前资产: ${key}`);
|
|
@@ -180,19 +197,22 @@ export async function inspectSource(root, handoffRef) {
|
|
|
180
197
|
ensure(scope.delivery_ref && own(read(safe(root,scope.delivery_ref)),delivery), '交付范围清单未覆盖当前交接内容或风险');
|
|
181
198
|
ensure(scope.assets?.some(asset=>asset.ref===scope.delivery_ref && asset.digest===hash(readFileSync(safe(root,scope.delivery_ref)))), '交接内容快照缺少批准覆盖');
|
|
182
199
|
for (const [key,ref] of Object.entries(handoff.source)) {
|
|
183
|
-
const file=
|
|
200
|
+
const file=['visual_baseline_ref','existing_ui_baseline_ref'].includes(key)?`${ref.persisted_ref}/${ref.manifest_ref}`:ref.persisted_ref;
|
|
184
201
|
const decisionBoundaries=key==='business_ticket_set_ref'?['gate.spec-baseline-approved',terminalGate]:[expectedGates[key]];
|
|
185
202
|
ensure(scope.assets?.some(asset=>asset.ref===file && asset.version===ref.version && decisionBoundaries.includes(asset.boundary) && asset.digest===hash(readFileSync(safe(root,file)))), `交付范围清单遗漏当前资产: ${key}`);
|
|
186
203
|
}
|
|
187
204
|
}
|
|
188
|
-
|
|
189
|
-
|
|
205
|
+
if(uiBaselineKind(handoff)==='prototype') {
|
|
206
|
+
const receipt=previewFiles(root,config.prototype);
|
|
207
|
+
ensure(uiBaselineCaseIds(handoff).every(id=>receipt.case_ids.includes(id)), '离线验证未覆盖视觉基线 case');
|
|
208
|
+
}
|
|
190
209
|
return {handoff,config,indexes,strategy,stage};
|
|
191
210
|
}
|
|
192
211
|
|
|
193
212
|
function collect(root, handoffRef, handoff, config) {
|
|
194
|
-
const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files
|
|
195
|
-
if(config.prototype
|
|
213
|
+
const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files];
|
|
214
|
+
if(config.prototype)queue.push(config.prototype.preview_root,config.prototype.verification_ref);
|
|
215
|
+
if(config.prototype?.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
|
|
196
216
|
const symbolic=config.reference_map || {};
|
|
197
217
|
const enqueue=ref=> { if(symbolic[ref])queue.push(symbolic[ref]); else if(/^https?:\/\//i.test(ref))return; else if(ref.startsWith('evidence.'))throw new TypeError(`未解析 evidence ID: ${ref}`); else if(ref.includes('/') || /\.(?:md|yaml|json|html|png|txt|log)$/.test(ref))queue.push(ref); };
|
|
198
218
|
function refs(value,key='') {
|
|
@@ -208,20 +228,23 @@ function collect(root, handoffRef, handoff, config) {
|
|
|
208
228
|
ensure(stat.isFile() && stat.size<=MAX_BYTES,`源文件类型/大小无效: ${ref}`);
|
|
209
229
|
const bytes=readFileSync(full); collected.set(ref,bytes); totalBytes += bytes.length;
|
|
210
230
|
ensure(collected.size<=20000 && totalBytes<=MAX_BYTES,'交接包大小超限');
|
|
211
|
-
|
|
212
|
-
|
|
231
|
+
const localBaseline=uiBaselineKind(handoff)==='existing-ui-baseline'&&ref.startsWith(`${uiBaselineRef(handoff).persisted_ref}/`);
|
|
232
|
+
if(!localBaseline&&/\.(yaml|yml|json)$/.test(ref))refs(parse(bytes));
|
|
233
|
+
// The entire existing UI observation directory was validated as a byte-bound file set.
|
|
234
|
+
// Its copied source documentation is evidence, not governance dependency instructions.
|
|
235
|
+
if(!localBaseline)queue.push(...documentLinks(ref,bytes));
|
|
213
236
|
}
|
|
214
237
|
return collected;
|
|
215
238
|
}
|
|
216
239
|
function materialize(captured, manifest, destination) {
|
|
217
240
|
for(const file of manifest.files.filter(x=>x.original_ref))write(destination,file.original_ref,captured.get(file.path));
|
|
218
241
|
}
|
|
219
|
-
export async function openBundle(input, action) {
|
|
220
|
-
const temp=mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
|
|
242
|
+
export async function openBundle(input, action, {readOnly=false}={}) {
|
|
243
|
+
const temp=readOnly?null:mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
|
|
221
244
|
try {
|
|
222
245
|
ensure(existsSync(input) && !lstatSync(input).isSymbolicLink(),'交接包不存在或是 symlink');
|
|
223
246
|
let root=path.resolve(input);
|
|
224
|
-
if(lstatSync(root).isFile()){ root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
|
|
247
|
+
if(lstatSync(root).isFile()){ ensure(!readOnly,'readonly-extraction-required: 只读验证需要已展开目录');root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
|
|
225
248
|
const manifest=read(safe(root,'manifest.json'));
|
|
226
249
|
schema(manifest,'docs/process/schemas/strategic-handoff-package.schema.json');
|
|
227
250
|
const {bundle_digest,...body}=manifest;ensure(bundle_digest===digest(body),'包清单摘要不一致');
|
|
@@ -233,7 +256,12 @@ export async function openBundle(input, action) {
|
|
|
233
256
|
for(const file of manifest.files){const bytes=readFileSync(safe(root,file.path));ensure(bytes.length===file.size_bytes && hash(bytes)===file.sha256,`文件摘要不一致: ${file.path}`);if(file.original_ref)relative(file.original_ref);captured.set(file.path,bytes);}
|
|
234
257
|
const originals=manifest.files.filter(x=>x.original_ref).map(x=>x.original_ref);
|
|
235
258
|
ensure(new Set(originals.map(x=>x.toLowerCase())).size===originals.length,'源路径重复');
|
|
236
|
-
|
|
259
|
+
let source;
|
|
260
|
+
if(readOnly){
|
|
261
|
+
ensure(manifest.files.filter(file=>file.original_ref).every(file=>file.path===`payload/files/${file.original_ref==='CONTEXT.md'?'source-context.snapshot.md':file.original_ref}`),'readonly-source-layout-required: 原始源布局需要只读文件映射支持');
|
|
262
|
+
source=safe(root,'payload/files');
|
|
263
|
+
}else{source=path.join(temp,'source');mkdirSync(source);materialize(captured,manifest,source);}
|
|
264
|
+
const inspect=async()=>{
|
|
237
265
|
const inspected=await inspectSource(source,manifest.handoff_ref);
|
|
238
266
|
ensure(manifest.bundle_id===inspected.handoff.handoff_id && manifest.version===inspected.handoff.handoff_version,'包身份与源交接不一致');
|
|
239
267
|
ensure(own(read(safe(root,'indexes/rules.json')),inspected.indexes.rules) && own(read(safe(root,'indexes/scenarios.json')),inspected.indexes.scenarios),'规则/场景索引与源资产不一致');
|
|
@@ -250,14 +278,16 @@ export async function openBundle(input, action) {
|
|
|
250
278
|
}
|
|
251
279
|
ensure(own(changes,{previous_bundle:manifest.previous_bundle,...compareIndexes(inspected.indexes,previousIndexes)}),'版本差异与实际索引不一致');
|
|
252
280
|
return await action({root,manifest,...inspected,changes});
|
|
253
|
-
|
|
281
|
+
};
|
|
282
|
+
return readOnly?await withSourceContextSnapshot(source,inspect):await inspect();
|
|
283
|
+
} finally {if(temp)rmSync(temp,{recursive:true,force:true});}
|
|
254
284
|
}
|
|
255
285
|
export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previous}) {
|
|
256
286
|
const root=project(sourceRoot); parseContextContract({root}); relative(handoffRef);
|
|
257
287
|
const current=await inspectSource(root,handoffRef);
|
|
258
288
|
let prior=null;
|
|
259
289
|
if(previous)prior=await openBundle(previous, b=>({manifest:b.manifest,indexes:b.indexes,handoff:b.handoff,rulesBytes:readFileSync(safe(b.root,'indexes/rules.json')),scenariosBytes:readFileSync(safe(b.root,'indexes/scenarios.json'))}));
|
|
260
|
-
if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
|
|
290
|
+
if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old&&old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
|
|
261
291
|
const previousBundle=prior?{bundle_id:prior.manifest.bundle_id,version:prior.manifest.version,digest:prior.manifest.bundle_digest}:null;
|
|
262
292
|
const snapshotFiles=collect(root,handoffRef,current.handoff,current.config);
|
|
263
293
|
const target=path.resolve(output);
|
|
@@ -270,12 +300,13 @@ export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previ
|
|
|
270
300
|
const entries=[];
|
|
271
301
|
const put=(ref,bytes,original)=>{write(staging,ref,bytes);entries.push({path:ref,sha256:hash(bytes),size_bytes:bytes.length,...(original?{original_ref:original}:{})});};
|
|
272
302
|
for(const [ref,bytes]of [...snapshotFiles].sort(([a],[b])=>a.localeCompare(b))) {
|
|
273
|
-
const dest=ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
|
|
303
|
+
const dest=current.handoff.schema_version===5?`payload/files/${ref==='CONTEXT.md'?'source-context.snapshot.md':ref}`:ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
|
|
274
304
|
ensure(!dest.endsWith('/CONTEXT.md'),'只允许源根词汇快照,禁止嵌套 CONTEXT.md');put(dest,bytes,ref);
|
|
275
305
|
}
|
|
276
306
|
put('indexes/rules.json',Buffer.from(json(current.indexes.rules)));
|
|
277
307
|
put('indexes/scenarios.json',Buffer.from(json(current.indexes.scenarios)));
|
|
278
308
|
put('indexes/changes.json',Buffer.from(json({previous_bundle:previousBundle,...compareIndexes(current.indexes,prior?.indexes)})));
|
|
309
|
+
if(current.handoff.schema_version===5)put('README.md',Buffer.from(deliveryReadme(current.handoff)));
|
|
279
310
|
if(prior){put('indexes/previous-manifest.json',Buffer.from(json(prior.manifest)));put('indexes/previous-rules.json',prior.rulesBytes);put('indexes/previous-scenarios.json',prior.scenariosBytes);}
|
|
280
311
|
const body={schema_version:1,bundle_id:current.handoff.handoff_id,version:current.handoff.handoff_version,handoff_ref:handoffRef,previous_bundle:previousBundle,files:entries.sort((a,b)=>a.path.localeCompare(b.path))};
|
|
281
312
|
const manifest={...body,bundle_digest:digest(body)};write(staging,'manifest.json',json(manifest));
|
|
@@ -288,9 +319,68 @@ export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previ
|
|
|
288
319
|
return {result:'exported',bundle_id:manifest.bundle_id,version:manifest.version,bundle_digest:manifest.bundle_digest,output:target,...(zip?{zip:`${target}.zip`,zip_sha256:hash(readFileSync(`${target}.zip`))}:{})};
|
|
289
320
|
} finally {rmSync(staging,{recursive:true,force:true});rmSync(`${staging}.zip`,{force:true});}
|
|
290
321
|
}
|
|
322
|
+
|
|
323
|
+
export async function openDelivery(input, action) {
|
|
324
|
+
const root=path.resolve(input);
|
|
325
|
+
ensure(isDeliveryDirectory(root),'交付目录缺少 delivery-record.json');
|
|
326
|
+
ensure(!lstatSync(root).isSymbolicLink(),'交付目录不能是 symlink');
|
|
327
|
+
const recordBytes=readFileSync(safe(root,'delivery-record.json'));
|
|
328
|
+
const record=parse(recordBytes);schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');
|
|
329
|
+
const verification=read(safe(root,record.verification_ref));schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');
|
|
330
|
+
const packageRoot=safe(root,record.package_ref);
|
|
331
|
+
ensure(lstatSync(packageRoot).isDirectory()&&!lstatSync(packageRoot).isSymbolicLink(),'package_ref 必须指向普通目录');
|
|
332
|
+
if(record.zip){const archiveRef=safe(root,record.zip.ref);ensure(lstatSync(archiveRef).isFile()&&hash(readFileSync(archiveRef))===record.zip.sha256,'ZIP 摘要不一致');}
|
|
333
|
+
else ensure(!existsSync(path.join(root,'package.zip')),'未登记的 package.zip');
|
|
334
|
+
const allowed=new Set(['delivery-record.json','verification.json',...(record.zip?['package.zip']:[])]);
|
|
335
|
+
for(const ref of files(root))ensure(ref.startsWith('package/')||allowed.has(ref),`交付目录存在未登记文件: ${ref}`);
|
|
336
|
+
return openBundle(packageRoot,async bundle=>{
|
|
337
|
+
ensure(record.handoff.id===bundle.manifest.bundle_id&&record.handoff.version===bundle.manifest.version&&record.handoff.schema_version===bundle.handoff.schema_version,'delivery record 的 Handoff 身份不一致');
|
|
338
|
+
ensure(record.bundle_digest===bundle.manifest.bundle_digest&&record.manifest_ref==='package/manifest.json','delivery record 的包摘要或清单引用不一致');
|
|
339
|
+
ensure(verification.bundle_digest===bundle.manifest.bundle_digest&&verification.package_ref===record.package_ref&&verification.manifest_ref===record.manifest_ref&&verification.exit_code===0&&verification.result==='verified','delivery verification 与包不一致');
|
|
340
|
+
const handoffEntry=bundle.manifest.files.find(file=>file.original_ref===record.handoff.ref);
|
|
341
|
+
ensure(handoffEntry&&handoffEntry.sha256===record.handoff.sha256,'delivery record 的 Handoff 源摘要不一致');
|
|
342
|
+
const sourceAssets=Object.entries(bundle.handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([sourceKey,value])=>({source_key:sourceKey,id:value.id||value.baseline_id,version:value.version,ref:value.persisted_ref,digest:value.digest}));
|
|
343
|
+
ensure(own(sourceAssets,record.source_assets),'delivery record 的来源资产不一致');
|
|
344
|
+
ensure(own(bundle.handoff.consumer_routes.map(({route_id,capability,activation})=>({route_id,capability,activation})),record.consumer_routes),'delivery record 的消费者路由不一致');
|
|
345
|
+
const previous=bundle.manifest.previous_bundle?{handoff_id:bundle.manifest.previous_bundle.bundle_id,version:bundle.manifest.previous_bundle.version,bundle_digest:bundle.manifest.previous_bundle.digest}:null;
|
|
346
|
+
ensure(own(previous,record.previous_delivery),'delivery record 的上一版本身份不一致');
|
|
347
|
+
return action({...bundle,deliveryRoot:root,packageRoot,record,recordBytes,verification});
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export async function finalizeDelivery({sourceRoot,handoffRef,zip=false,previous}) {
|
|
352
|
+
const root=project(sourceRoot);parseContextContract({root});relative(handoffRef);
|
|
353
|
+
const current=await inspectSource(root,handoffRef);
|
|
354
|
+
ensure(current.handoff.schema_version===5,'migration-required: v3/v4 只允许历史 verify/import;修改或重新交付必须迁移到 Handoff v5 并重新批准');
|
|
355
|
+
const delivery=path.join(root,'docs/deliveries/strategic',current.handoff.handoff_id,current.handoff.handoff_version);
|
|
356
|
+
const parent=path.dirname(delivery);mkdirSync(parent,{recursive:true});
|
|
357
|
+
let previousPackage=previous;
|
|
358
|
+
if(previous&&isDeliveryDirectory(path.resolve(previous)))previousPackage=await openDelivery(path.resolve(previous),value=>value.packageRoot);
|
|
359
|
+
const stage=mkdtempSync(path.join(parent,'.delivery-staging-'));
|
|
360
|
+
try {
|
|
361
|
+
const exported=await exportBundle({sourceRoot:root,handoffRef,output:path.join(stage,'package'),zip,previous:previousPackage});
|
|
362
|
+
const handoffEntry=await openBundle(path.join(stage,'package'),bundle=>bundle.manifest.files.find(file=>file.original_ref===handoffRef));
|
|
363
|
+
ensure(handoffEntry,'交付包缺少 Handoff 源文件');
|
|
364
|
+
const verification={schema_version:1,kind:'strategic-delivery-verification-v1',result:'verified',command:`scripts/strategic-handoff verify --bundle docs/deliveries/strategic/${current.handoff.handoff_id}/${current.handoff.handoff_version}`,exit_code:0,executed_at:new Date().toISOString(),package_ref:'package',manifest_ref:'package/manifest.json',bundle_digest:exported.bundle_digest};
|
|
365
|
+
schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');write(stage,'verification.json',json(verification));
|
|
366
|
+
const sourceAssets=Object.entries(current.handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([sourceKey,value])=>({source_key:sourceKey,id:value.id||value.baseline_id,version:value.version,ref:value.persisted_ref,digest:value.digest}));
|
|
367
|
+
const previousDelivery=await openBundle(path.join(stage,'package'),bundle=>bundle.manifest.previous_bundle?{handoff_id:bundle.manifest.previous_bundle.bundle_id,version:bundle.manifest.previous_bundle.version,bundle_digest:bundle.manifest.previous_bundle.digest}:null);
|
|
368
|
+
const record={schema_version:1,kind:'strategic-handoff-delivery-v1',status:'packaged',handoff:{id:current.handoff.handoff_id,version:current.handoff.handoff_version,ref:handoffRef,sha256:handoffEntry.sha256,schema_version:5},source_assets:sourceAssets,package_ref:'package',manifest_ref:'package/manifest.json',bundle_digest:exported.bundle_digest,verification_ref:'verification.json',consumer_routes:current.handoff.consumer_routes.map(({route_id,capability,activation})=>({route_id,capability,activation})),...(zip?{zip:{ref:'package.zip',sha256:exported.zip_sha256}}:{}),previous_delivery:previousDelivery};
|
|
369
|
+
schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');write(stage,'delivery-record.json',json(record));
|
|
370
|
+
await openDelivery(stage,()=>null);
|
|
371
|
+
if(existsSync(delivery)){
|
|
372
|
+
const existing=await openDelivery(delivery,value=>value.record);
|
|
373
|
+
ensure(existing.bundle_digest===record.bundle_digest&&existing.handoff.sha256===record.handoff.sha256,'delivery-version-conflict: 同 Handoff ID/version 已存在不同内容;请提升 handoff_version 并重新批准');
|
|
374
|
+
return {result:'already-packaged',handoff_id:record.handoff.id,version:record.handoff.version,bundle_digest:record.bundle_digest,delivery};
|
|
375
|
+
}
|
|
376
|
+
renameSync(stage,delivery);
|
|
377
|
+
return {result:'packaged',handoff_id:record.handoff.id,version:record.handoff.version,bundle_digest:record.bundle_digest,delivery,...(zip?{zip:path.join(delivery,'package.zip'),zip_sha256:record.zip.sha256}:{})};
|
|
378
|
+
} finally {rmSync(stage,{recursive:true,force:true});}
|
|
379
|
+
}
|
|
291
380
|
export async function importBundle({bundle,targetRoot}) {
|
|
292
381
|
const target=project(targetRoot);const context=parseContextContract({root:target});
|
|
293
|
-
|
|
382
|
+
const open=isDeliveryDirectory(path.resolve(bundle))?action=>openDelivery(path.resolve(bundle),action):action=>openBundle(bundle,action);
|
|
383
|
+
return open(async b=>{
|
|
294
384
|
const rel=`docs/handoffs/${b.manifest.bundle_id}/${b.manifest.version}`,dest=safe(target,rel,{missing:true});
|
|
295
385
|
if(existsSync(dest)) {
|
|
296
386
|
const receipt=read(safe(dest,'import-receipt.json'));
|
|
@@ -329,8 +419,10 @@ export async function importBundle({bundle,targetRoot}) {
|
|
|
329
419
|
if(route.activation!=='not-applicable'&&route.capability==='delivery-coordination')artifactRefs.push(`${rel}/consumer-status-index-draft.json`);
|
|
330
420
|
return {route_id:route.route_id,capability:route.capability,activation:route.activation,artifact_refs:artifactRefs};
|
|
331
421
|
});
|
|
332
|
-
|
|
333
|
-
|
|
422
|
+
const fromDelivery=Boolean(b.recordBytes);
|
|
423
|
+
if(fromDelivery)write(stage,'source-delivery-record.json',b.recordBytes);
|
|
424
|
+
receipt={schema_version:fromDelivery?3:2,bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,package_ref:`${rel}/package`,...(fromDelivery?{source_delivery_record_ref:`${rel}/source-delivery-record.json`,source_delivery_record_sha256:hash(b.recordBytes),ready_for_agent:false}:{}),target_context_digest:context.document_digest,target_profile_id:profile?.profile_id||'yss-full-lifecycle',selected_consumer_capabilities:capabilities,routes:routeRecords,status:'pending-context-reconciliation'};
|
|
425
|
+
schema(receipt,fromDelivery?'docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json':'docs/process/schemas/strategic-handoff-import-receipt.schema.json');
|
|
334
426
|
write(stage,'import-receipt.json',json(receipt));
|
|
335
427
|
write(stage,'context-reconciliation-draft.json',json({schema_version:2,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,target_context_digest:context.document_digest,route_ids:selected.map(route=>route.route_id),terms}));
|
|
336
428
|
write(stage,'upstream-change-impact.json',json({schema_version:2,previous_bundle:b.manifest.previous_bundle,routes:selected.map(route=>({route_id:route.route_id,capability:route.capability,activation:route.activation,changed_source_ids:[...b.changes.updated,...b.changes.removed],added_source_ids:b.changes.added,status:'requires-lifecycle-reconciliation'})),policy:'mark-only-known-dependent-contracts-stale; unknown-dependency-or-design-basis-change-blocks-all'}));
|
|
@@ -339,8 +431,8 @@ export async function importBundle({bundle,targetRoot}) {
|
|
|
339
431
|
const coordinationRoute=b.handoff.consumer_routes.find(route=>route.capability==='delivery-coordination');
|
|
340
432
|
if(capabilities.includes('backend-technical-design')&&backendRoute.activation!=='not-applicable')write(stage,'backend-technical-traceability-draft.json',json({schema_version:2,route_id:backendRoute.route_id,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows}));
|
|
341
433
|
if(capabilities.includes('frontend-engineering-design')&&frontendRoute.activation!=='not-applicable'){
|
|
342
|
-
const preflight={schema_version:1,status:'draft',route_id:frontendRoute.route_id,capability:frontendRoute.capability,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,context_reconciliation_ref:'',
|
|
343
|
-
schema(preflight,'docs/process/schemas/frontend-strategic-preflight.schema.json');
|
|
434
|
+
const preflight={schema_version:b.handoff.schema_version===5?2:1,status:'draft',route_id:frontendRoute.route_id,capability:frontendRoute.capability,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,context_reconciliation_ref:'',...(b.handoff.schema_version===5?{ui_baseline_kind:uiBaselineKind(b.handoff),ui_baseline_ref:`${rel}/package/payload/files/${uiBaselineRef(b.handoff).persisted_ref}/${uiBaselineRef(b.handoff).manifest_ref}`}:{visual_baseline_ref:`${rel}/package/payload/files/${uiBaselineRef(b.handoff).persisted_ref}/${uiBaselineRef(b.handoff).manifest_ref}`}),source_rule_refs:rows.map(row=>row.source_id),backend_dependency:{mode:backendRoute.activation==='not-applicable'?'not-applicable':'required',route_id:backendRoute.route_id,...(backendRoute.activation==='not-applicable'?{reason:backendRoute.reason,impact_refs:backendRoute.impact_refs,evidence_refs:backendRoute.evidence_refs}:{})},ready_for_agent:false};
|
|
435
|
+
schema(preflight,b.handoff.schema_version===5?'docs/process/schemas/frontend-strategic-preflight-v2.schema.json':'docs/process/schemas/frontend-strategic-preflight.schema.json');
|
|
344
436
|
write(stage,'frontend-strategic-preflight-draft.json',json(preflight));write(stage,'frontend-traceability-draft.json',json({schema_version:1,route_id:frontendRoute.route_id,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows:rows.map(({tactical_refs,test_seam_refs,...row})=>({...row,frontend_case_refs:[]}))}));
|
|
345
437
|
}
|
|
346
438
|
if(capabilities.includes('delivery-coordination')&&coordinationRoute.activation!=='not-applicable')write(stage,'consumer-status-index-draft.json',json({schema_version:1,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,routes:b.handoff.consumer_routes.map(route=>({route_id:route.route_id,capability:route.capability,activation:route.activation,consumer_status:route.activation==='not-applicable'?'not-applicable':'pending',receipt_refs:[],acceptance_refs:[],feedback_refs:[]}))}));
|
|
@@ -179,13 +179,21 @@ function validateContract(value, registry, lifecycle) {
|
|
|
179
179
|
if (!existsSync(contractPath)) fail(`Slice Implementation Contract 不存在: ${contract.slice_contract_ref}`);
|
|
180
180
|
const document = parseYaml(readFileSync(contractPath, "utf8"), "Slice Implementation Contract");
|
|
181
181
|
const slice = document.slice_contract || document;
|
|
182
|
-
if (slice.schema_version !==
|
|
182
|
+
if (slice.schema_version !== 2 || typeof slice.slice_id !== "string" || !slice.lifecycle_refs || !slice.readiness || !Array.isArray(slice.work_units)) fail("Slice Implementation Contract 需要 schema v2 及 slice_id/lifecycle_refs/readiness/work_units");
|
|
183
183
|
if (slice.contract_id !== contract.contract_id || slice.contract_version !== contract.contract_version || slice.status !== "approved") fail("Slice Contract 必须是当前 approved 版本");
|
|
184
184
|
const sliceUnit = slice.work_units.find((item) => item && item.id === value.work_unit_id);
|
|
185
185
|
if (!sliceUnit) fail(`Slice Implementation Contract 缺少 work_unit_id: ${value.work_unit_id}`);
|
|
186
186
|
for (const field of ["role_id", "runtime_id", "task_package_ref", "contract_id", "contract_version", "allowed_write_paths"]) if (sliceUnit[field] === undefined) fail(`Slice Contract work_unit 缺少 ${field}`);
|
|
187
|
-
if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version
|
|
187
|
+
if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version) fail("任务包与 Slice Contract work_unit 不一致");
|
|
188
188
|
for (const allowed of value.allowed_write_paths) if (!sliceUnit.allowed_write_paths.includes(allowed)) fail(`allowed_write_paths 未获 Slice Contract 授权: ${allowed}`);
|
|
189
|
+
// Older packages used the work-unit ID here; new packages bind a readable dispatch file.
|
|
190
|
+
if (sliceUnit.task_package_ref !== value.work_unit_id) {
|
|
191
|
+
const dispatchPath = assertSafeRelativePath(sliceUnit.task_package_ref, "Slice work_unit.task_package_ref");
|
|
192
|
+
if (!existsSync(dispatchPath)) fail("Slice task_package_ref 不可读");
|
|
193
|
+
const dispatched = parseDocument(readFileSync(dispatchPath, "utf8")).toJS();
|
|
194
|
+
for (const field of ["task_id", "work_unit_id", "actor_id", "role_id", "runtime_id"]) if (dispatched?.[field] !== value[field]) fail("Slice task_package_ref 与当前派发身份不一致");
|
|
195
|
+
if (JSON.stringify(dispatched.contract) !== JSON.stringify(value.contract) || JSON.stringify(dispatched.allowed_write_paths) !== JSON.stringify(value.allowed_write_paths)) fail("Slice task_package_ref 与当前合同或写范围不一致");
|
|
196
|
+
}
|
|
189
197
|
if (value.execution_state === "Worker") assertImplementationDecision({ slice_contract_ref: contract.slice_contract_ref, vertical_slice_ticket_ref: slice.lifecycle_refs.ticket, user_decisions: value.user_decisions });
|
|
190
198
|
}
|
|
191
199
|
|
|
@@ -223,7 +231,7 @@ export function validateTaskPackageSet(packages, options = {}) {
|
|
|
223
231
|
packages.forEach((pkg) => validateTaskPackage(pkg, options));
|
|
224
232
|
const slicePackages = packages.filter((pkg) => pkg.contract.kind === "slice-implementation");
|
|
225
233
|
if (slicePackages.length > 0) {
|
|
226
|
-
const contracts = new Set(slicePackages.map((pkg) =>
|
|
234
|
+
const contracts = new Set(slicePackages.map((pkg) => JSON.stringify([pkg.contract.contract_id, pkg.contract.contract_version])));
|
|
227
235
|
if (contracts.size !== 1) fail("同一切片的任务包必须消费同一 contract_id/contract_version");
|
|
228
236
|
const workers = new Set(slicePackages.filter((pkg) => pkg.execution_state === "Worker").map((pkg) => pkg.actor_id));
|
|
229
237
|
slicePackages.filter((pkg) => pkg.execution_state === "Reviewer").forEach((pkg) => { if (workers.has(pkg.actor_id)) fail("Reviewer 不得与实现者使用同一 actor_id"); });
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { assertApprovedExecutionContext, approvedExecutionBinding } from './approved-execution-context.mjs';
|
|
1
2
|
import path from 'node:path';
|
|
2
3
|
import { readFileSync } from 'node:fs';
|
|
3
4
|
import { spawnSync } from 'node:child_process';
|
|
4
5
|
import { ROOT, read, safe, ensure, hash } from './strategic-handoff-io.mjs';
|
|
5
6
|
|
|
6
7
|
// The compiler's synchronous boundary reruns the design verifier against current files.
|
|
7
|
-
export function enforceTechnicalDesign(state = {}, { root = ROOT } = {}) {
|
|
8
|
+
export function enforceTechnicalDesign(state = {}, { root = ROOT, execution, readOnly = false } = {}) {
|
|
8
9
|
const binding = state.technical_design;
|
|
9
10
|
const affected = (state.conditions || []).some(value => ['backend-technical-design-impact','tactical-domain','tactical-domain-impact','aggregate-impact','state-machine-impact','invariant-impact','consistency-impact','domain-event-impact','gateway-boundary-impact','persistence-mapping-impact'].includes(value));
|
|
10
11
|
if (!binding && !affected) return;
|
|
@@ -13,11 +14,18 @@ export function enforceTechnicalDesign(state = {}, { root = ROOT } = {}) {
|
|
|
13
14
|
const file = safe(root, binding.ref);
|
|
14
15
|
ensure(hash(readFileSync(file)) === binding.digest, '技术设计绑定摘要漂移');
|
|
15
16
|
const data = read(file);
|
|
17
|
+
if(data.design_scope==='engineering-only')ensure(!(state.conditions||[]).some(value=>['tactical-domain','tactical-domain-impact','aggregate-impact','state-machine-impact','invariant-impact','domain-event-impact','gateway-boundary-impact','persistence-mapping-impact'].includes(value)),'engineering-only 技术设计不能承接领域模型、业务状态或持久化映射影响');
|
|
16
18
|
ensure(data.status === 'approved' && data.version === binding.version, '技术设计必须为批准且绑定版本');
|
|
17
19
|
const family = data.schema_version === 1 && binding.legacy_ddd === true ? 'domain-driven' : data.architecture?.family;
|
|
18
20
|
ensure(family && family === state.architecture_identity?.architecture_family, '技术设计与实现架构不匹配');
|
|
19
21
|
const args = [path.join(ROOT, '.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs'), file, '--root', root, '--slice', state.slice_id];
|
|
20
22
|
if (binding.legacy_ddd === true) args.push('--legacy-ddd');
|
|
23
|
+
if(readOnly)args.push('--read-only');
|
|
24
|
+
if(execution){
|
|
25
|
+
assertApprovedExecutionContext(execution,{root,technicalDesign:data,architectureIdentity:state.architecture_identity,sliceId:state.slice_id});
|
|
26
|
+
const approved=approvedExecutionBinding(execution);
|
|
27
|
+
args.push('--approved-slice',approved.ref,'--approved-slice-digest',approved.digest,'--approved-slice-approval',approved.approval_ref);
|
|
28
|
+
}
|
|
21
29
|
const verified = spawnSync(process.execPath, args, { cwd: root, encoding: 'utf8', timeout: 60000, maxBuffer: 2 * 1024 * 1024 });
|
|
22
30
|
ensure(verified.status === 0, `技术设计不可消费: ${verified.error?.message || verified.stderr}`);
|
|
23
31
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { ensure, read, safe, hash } from './strategic-handoff-io.mjs';
|
|
3
|
+
import { validateVisualBaseline } from '../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs';
|
|
4
|
+
import { validateExistingUiBaseline } from './existing-ui-baseline.mjs';
|
|
5
|
+
|
|
6
|
+
export function hasConsumerRoutes(handoff) { return [4,5].includes(handoff?.schema_version); }
|
|
7
|
+
export function uiBaselineKind(handoff) {
|
|
8
|
+
ensure([3,4,5].includes(handoff?.schema_version),'未知 Strategic Handoff schema_version');
|
|
9
|
+
if(handoff.schema_version<5)return 'prototype';
|
|
10
|
+
ensure(['prototype','existing-ui-baseline'].includes(handoff.ui_baseline_kind),'未知 ui_baseline_kind');
|
|
11
|
+
return handoff.ui_baseline_kind;
|
|
12
|
+
}
|
|
13
|
+
export function uiBaselineRef(handoff) {
|
|
14
|
+
const kind=uiBaselineKind(handoff),ref=handoff.source?.[kind==='prototype'?'visual_baseline_ref':'existing_ui_baseline_ref'];
|
|
15
|
+
ensure(ref,'缺少 UI 基线引用');return ref;
|
|
16
|
+
}
|
|
17
|
+
export function uiBaselineCaseIds(handoff) { return uiBaselineRef(handoff).case_ids; }
|
|
18
|
+
export function uiBaselineSourceKeys(handoff) { return uiBaselineKind(handoff)==='prototype'?['prototype_ref','visual_baseline_ref']:['existing_ui_baseline_ref']; }
|
|
19
|
+
export async function validateHandoffUiBaseline(root,handoff) {
|
|
20
|
+
const kind=uiBaselineKind(handoff),ref=uiBaselineRef(handoff),file=safe(root,`${ref.persisted_ref}/${ref.manifest_ref}`),baseline=read(file);
|
|
21
|
+
const result=kind==='prototype'?await validateVisualBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)}):validateExistingUiBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)});
|
|
22
|
+
ensure(!result.errors.length,`UI 基线无效: ${result.errors.join('; ')}`);
|
|
23
|
+
// The immutable existing manifest records readiness; the caller verifies its current approval chain.
|
|
24
|
+
ensure((kind==='existing-ui-baseline'||baseline.status==='approved')&&baseline.baseline_id===ref.baseline_id&&baseline.version===ref.version&&JSON.stringify([...ref.case_ids].sort())===JSON.stringify(baseline.cases.map(item=>item.case_id).sort()),'UI 基线身份不一致');
|
|
25
|
+
return {kind,ref,baseline,digest:kind==='prototype'?baseline.bundle.digest:hash(readFileSync(file))};
|
|
26
|
+
}
|
|
@@ -113,8 +113,11 @@ export function validateUserDecision(record, options = {}) {
|
|
|
113
113
|
previousTime = time;
|
|
114
114
|
if (response.decision === "approved") {
|
|
115
115
|
const explicit = source.decision === "approved" && Array.isArray(source.item_ids) && response.item_ids.every((id) => source.item_ids.includes(id));
|
|
116
|
+
const contextualAll = response.selection === "explicit-all" && items.size > 1
|
|
117
|
+
&& /是否\s*(?:明确)?(?:确认|批准|同意|接受)[^\n]{0,32}(?:以上)?全部\s*(?:\d+|[一二三四五六七八九十]+)?\s*(?:项|事项)/i.test(presentation.text)
|
|
118
|
+
&& /^(?:确认|同意|批准|接受|可以|好的|好|yes|ok)[。.!!\s]*$/i.test(source.text.trim());
|
|
116
119
|
if (!explicit && (!/(同意|批准|确认|接受|可以|好的|^好[。!!\s]*$|\b(?:approve|approved|agree|agreed|accept|yes|ok)\b)/i.test(source.text) || /(不同意|不批准|拒绝|反对|不要|需[要]?修改|请修改|暂不|reject|decline|do not approve|don't approve|disagree)/i.test(source.text))) decisionError("user-decision-ambiguous", "原文不能明确支持批准结论");
|
|
117
|
-
if (!explicit && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "
|
|
120
|
+
if (!explicit && !contextualAll && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "批量批准原文必须明确全部事项,或直接回复明确询问全部事项的当前展示");
|
|
118
121
|
if (!explicit && response.selection === "explicit-items" && items.size > 1 && response.item_ids.some((id) => !source.text.includes(id) && !source.text.includes(items.get(id)?.title))) decisionError("user-decision-ambiguous", "原文未指向所选事项");
|
|
119
122
|
}
|
|
120
123
|
if (response.selection === "single" && items.size !== 1) decisionError("user-decision-ambiguous", "多事项不能用单项回复");
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { parseArgs } from 'node:util';
|
|
4
|
+
import { read } from './lib/strategic-handoff-io.mjs';
|
|
5
|
+
import { preflightDelivery, invalidPreflightInput } from './lib/delivery-preflight.mjs';
|
|
6
|
+
|
|
7
|
+
let result;
|
|
8
|
+
try {
|
|
9
|
+
const {values}=parseArgs({options:{input:{type:'string'},stage:{type:'string'},json:{type:'boolean'}},strict:true});
|
|
10
|
+
if(!values.input||!values.stage) throw new TypeError('必须提供 --input <file> 和 --stage prepare|build|export|accept');
|
|
11
|
+
result=await preflightDelivery(read(path.resolve(values.input)),{stage:values.stage,root:process.cwd()});
|
|
12
|
+
} catch(error) { result=invalidPreflightInput(error.message); }
|
|
13
|
+
process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
|
|
14
|
+
process.exitCode=result.exit_code;
|
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { parseArgs } from 'node:util';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { existsSync } from 'node:fs';
|
|
5
|
+
import { exportBundle, finalizeDelivery, openBundle, openDelivery, importBundle } from './lib/strategic-handoff.mjs';
|
|
6
|
+
import { read, safe, ensure } from './lib/strategic-handoff-io.mjs';
|
|
7
|
+
|
|
8
|
+
async function preflightExport(values) {
|
|
9
|
+
const root=path.resolve(values['source-root']),handoff=read(safe(root,values.handoff));
|
|
10
|
+
const required=handoff.schema_version===5&&handoff.ui_baseline_kind==='existing-ui-baseline';
|
|
11
|
+
ensure(!required||values['preflight-input'],'preflight-required: 既有 UI 战略导出必须提供 --preflight-input <file>;先按 docs/process/delivery-preflight.md 准备源资产清单并执行 export 阶段只读预检');
|
|
12
|
+
if(!values['preflight-input'])return;
|
|
13
|
+
const {preflightDelivery}=await import('./lib/delivery-preflight.mjs');
|
|
14
|
+
const input=read(path.resolve(values['preflight-input']));
|
|
15
|
+
ensure(!input.delivery_kind||input.delivery_kind==='strategic-handoff','preflight-scope-conflict: 战略导出只能使用 strategic-handoff 清单');
|
|
16
|
+
ensure(path.resolve(root,input.governance_root||'.')===root,'preflight-scope-conflict: 预检治理根与导出来源不同');
|
|
17
|
+
ensure(input.assets?.strategic_handoff?.ref===values.handoff,'preflight-scope-conflict: 预检未绑定本次导出的 handoff 源文件');
|
|
18
|
+
const result=await preflightDelivery({...input,delivery_kind:'strategic-handoff'},{stage:'export',root});
|
|
19
|
+
if(result.exit_code!==0){const error=new TypeError('delivery-preflight-blocked: 请按每项 recovery 补证,再从正常导出入口重试');error.preflight=result;throw error;}
|
|
20
|
+
}
|
|
5
21
|
try {
|
|
6
|
-
const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'}}});
|
|
22
|
+
const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'},'preflight-input':{type:'string'}}});
|
|
7
23
|
const [command]=positionals;
|
|
8
24
|
let result;
|
|
9
|
-
if(command==='
|
|
10
|
-
else if(command==='
|
|
25
|
+
if(command==='finalize'&&values['source-root']&&values.handoff){await preflightExport(values);result=await finalizeDelivery({sourceRoot:values['source-root'],handoffRef:values.handoff,zip:values.zip,previous:values.previous});}
|
|
26
|
+
else if(command==='export'&&values['source-root']&&values.handoff&&values.output){const sourceRoot=path.resolve(values['source-root']),handoff=read(safe(sourceRoot,values.handoff));ensure(handoff.schema_version===5,'migration-required: v3/v4 不再创建新 export;请迁移到 Handoff v5、重新批准并使用 finalize');await preflightExport(values);result=await exportBundle({sourceRoot:sourceRoot,handoffRef:values.handoff,output:values.output,zip:values.zip,previous:values.previous});}
|
|
27
|
+
else if(command==='verify'&&values.bundle){const input=path.resolve(values.bundle),action=b=>({result:'verified',bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,rules:b.indexes.rules.length,scenarios:b.indexes.scenarios.length});result=existsSync(path.join(input,'delivery-record.json'))?await openDelivery(input,action):await openBundle(input,action);}
|
|
11
28
|
else if(command==='import'&&values.bundle&&values['target-root'])result=await importBundle({bundle:path.resolve(values.bundle),targetRoot:values['target-root']});
|
|
12
|
-
else throw new TypeError('用法: strategic-handoff
|
|
29
|
+
else throw new TypeError('用法: strategic-handoff finalize --source-root <repo> --handoff <relative-file> [--preflight-input <file>] [--previous <delivery-or-package>] [--zip] | verify --bundle <delivery-dir|package-dir|zip> | import --bundle <delivery-dir|package-dir|zip> --target-root <repo>');
|
|
13
30
|
process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
|
|
14
|
-
}catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message})}\n`);process.exitCode=1;}
|
|
31
|
+
}catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message,...(error.preflight?{preflight:error.preflight}:{})})}\n`);process.exitCode=1;}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import { applyProfileSkillSync, loadProfileSyncConfig, planProfileSkillSync, reportProfileSkillSync } from "./lib/profile-skill-sync.mjs";
|
|
4
|
+
import { applyProfileSkillSync, formatProfileSkillSync, loadProfileSyncConfig, planProfileSkillSync, reportProfileSkillSync } from "./lib/profile-skill-sync.mjs";
|
|
5
5
|
|
|
6
6
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
7
7
|
try {
|
|
@@ -30,10 +30,9 @@ try {
|
|
|
30
30
|
const report = reportProfileSkillSync(result);
|
|
31
31
|
if (json) process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
|
|
32
32
|
else {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
for (const item of report.issues) process.stderr.write(`${item.profile}: ${item.status}: ${item.path ?? item.skill ?? item.message}\n`);
|
|
33
|
+
const output = formatProfileSkillSync(report, modes[0]);
|
|
34
|
+
process.stdout.write(output.stdout);
|
|
35
|
+
process.stderr.write(output.stderr);
|
|
37
36
|
}
|
|
38
37
|
if (args.includes("--check") && (plan.changes.length || plan.issues.length)) process.exitCode = 1;
|
|
39
38
|
if (args.includes("--apply") && plan.issues.length) process.exitCode = 1;
|