@1aboveio/skills 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -2
- package/bin/cli.mjs +14 -0
- package/bin/select-core.mjs +172 -0
- package/package.json +146 -4
- package/skills/app-dev/airflow/LICENSE +3 -0
- package/skills/app-dev/airflow/SKILL.md +199 -0
- package/skills/app-dev/airflow/release-check.mjs +93 -0
- package/skills/app-dev/android-foundation/LICENSE +3 -0
- package/skills/app-dev/android-foundation/SKILL.md +192 -0
- package/skills/app-dev/android-foundation/assets/android-ci-job.yml +217 -0
- package/skills/app-dev/android-foundation/references/ci.md +87 -0
- package/skills/app-dev/android-foundation/references/gotchas.md +221 -0
- package/skills/app-dev/android-foundation/references/setup.md +164 -0
- package/skills/app-dev/android-foundation/release-check.mjs +93 -0
- package/skills/app-dev/android-foundation/scripts/device-run.sh +176 -0
- package/skills/app-dev/android-foundation/scripts/device-run.test.mjs +172 -0
- package/skills/app-dev/app-debug/LICENSE +3 -0
- package/skills/app-dev/app-debug/SKILL.md +110 -0
- package/skills/app-dev/app-debug/references/common-errors.md +128 -0
- package/skills/app-dev/app-debug/release-check.mjs +93 -0
- package/skills/app-dev/better-auth/LICENSE +3 -0
- package/skills/app-dev/better-auth/SKILL.md +598 -0
- package/skills/app-dev/better-auth/references/feishu-api.md +270 -0
- package/skills/app-dev/better-auth/release-check.mjs +93 -0
- package/skills/app-dev/data-catalog/LICENSE +3 -0
- package/skills/app-dev/data-catalog/SKILL.md +204 -0
- package/skills/app-dev/data-catalog/agents/openai.yaml +3 -0
- package/skills/app-dev/data-catalog/references/data-catalog-conventions.md +75 -0
- package/skills/app-dev/data-catalog/references/field-definitions.md +116 -0
- package/skills/app-dev/data-catalog/references/format.md +121 -0
- package/skills/app-dev/data-catalog/release-check.mjs +93 -0
- package/skills/app-dev/data-catalog/scripts/data-catalog.test.mjs +36 -0
- package/skills/app-dev/data-catalog/scripts/data_catalog.py +1392 -0
- package/skills/app-dev/data-catalog/scripts/persist-conventions-core.mjs +117 -0
- package/skills/app-dev/data-catalog/scripts/persist-conventions.mjs +17 -0
- package/skills/app-dev/data-catalog/scripts/test_data_catalog.py +571 -0
- package/skills/app-dev/ios-foundation/LICENSE +3 -0
- package/skills/app-dev/ios-foundation/SKILL.md +184 -0
- package/skills/app-dev/ios-foundation/references/setup.md +243 -0
- package/skills/app-dev/ios-foundation/release-check.mjs +93 -0
- package/skills/app-dev/monorepo/LICENSE +3 -0
- package/skills/app-dev/monorepo/SKILL.md +462 -0
- package/skills/app-dev/monorepo/release-check.mjs +93 -0
- package/skills/app-dev/nextjs-fullstack/LICENSE +3 -0
- package/skills/app-dev/nextjs-fullstack/SKILL.md +211 -0
- package/skills/app-dev/nextjs-fullstack/conventions.md +318 -0
- package/skills/app-dev/nextjs-fullstack/frontend-conventions.md +61 -0
- package/skills/app-dev/nextjs-fullstack/nextjs16.md +287 -0
- package/skills/app-dev/nextjs-fullstack/release-check.mjs +93 -0
- package/skills/app-dev/nextjs-fullstack/server-actions.md +409 -0
- package/skills/app-dev/prisma-setup/LICENSE +3 -0
- package/skills/app-dev/prisma-setup/SKILL.md +181 -0
- package/skills/app-dev/prisma-setup/nextjs.md +258 -0
- package/skills/app-dev/prisma-setup/release-check.mjs +93 -0
- package/skills/app-dev/prisma-setup/turborepo.md +301 -0
- package/skills/app-dev/pyspark/LICENSE +3 -0
- package/skills/app-dev/pyspark/SKILL.md +127 -0
- package/skills/app-dev/pyspark/assets/templates/etl.py +748 -0
- package/skills/app-dev/pyspark/assets/templates/utils/__init__.py +1 -0
- package/skills/app-dev/pyspark/assets/templates/utils/hudi_metadata.py +14 -0
- package/skills/app-dev/pyspark/references/diagnosis-and-profiling.md +169 -0
- package/skills/app-dev/pyspark/references/etl-contract.md +129 -0
- package/skills/app-dev/pyspark/references/production-validation.md +131 -0
- package/skills/app-dev/pyspark/references/reconciliation.md +38 -0
- package/skills/app-dev/pyspark/references/transformation-design.md +190 -0
- package/skills/app-dev/pyspark/references/velocity-feature-calculation.md +193 -0
- package/skills/app-dev/pyspark/release-check.mjs +93 -0
- package/skills/app-dev/pyspark/scripts/spark_eventlog_summary.py +223 -0
- package/skills/app-dev/python-backend/LICENSE +3 -0
- package/skills/app-dev/python-backend/SKILL.md +325 -0
- package/skills/app-dev/python-backend/assets/uv-install.sh +48 -0
- package/skills/app-dev/python-backend/references/uv-installs.md +83 -0
- package/skills/app-dev/python-backend/release-check.mjs +93 -0
- package/skills/app-dev/shadcn/LICENSE +3 -0
- package/skills/app-dev/shadcn/SKILL.md +120 -0
- package/skills/app-dev/shadcn/assets/shadcn-small.png +0 -0
- package/skills/app-dev/shadcn/assets/shadcn.png +0 -0
- package/skills/app-dev/shadcn/cli.md +411 -0
- package/skills/app-dev/shadcn/customization.md +224 -0
- package/skills/app-dev/shadcn/mcp.md +101 -0
- package/skills/app-dev/shadcn/release-check.mjs +93 -0
- package/skills/app-dev/shadcn/rules/base-vs-radix.md +323 -0
- package/skills/app-dev/shadcn/rules/component-selection.md +67 -0
- package/skills/app-dev/shadcn/rules/composition.md +195 -0
- package/skills/app-dev/shadcn/rules/data-table.md +201 -0
- package/skills/app-dev/shadcn/rules/forms.md +255 -0
- package/skills/app-dev/shadcn/rules/icons.md +103 -0
- package/skills/app-dev/shadcn/rules/styling.md +167 -0
- package/skills/app-dev/zod-v4/LICENSE +3 -0
- package/skills/app-dev/zod-v4/SKILL.md +286 -0
- package/skills/app-dev/zod-v4/release-check.mjs +93 -0
- package/skills/cicd/cloud-build/LICENSE +3 -0
- package/skills/cicd/cloud-build/SKILL.md +707 -0
- package/skills/cicd/cloud-build/release-check.mjs +93 -0
- package/skills/cicd/cloud-debug/LICENSE +3 -0
- package/skills/cicd/cloud-debug/SKILL.md +315 -0
- package/skills/cicd/cloud-debug/references/build-failures.md +238 -0
- package/skills/cicd/cloud-debug/references/deploy-failures.md +376 -0
- package/skills/cicd/cloud-debug/references/pipeline-failures.md +378 -0
- package/skills/cicd/cloud-debug/release-check.mjs +93 -0
- package/skills/cicd/cloud-deploy/LICENSE +3 -0
- package/skills/cicd/cloud-deploy/SKILL.md +230 -0
- package/skills/cicd/cloud-deploy/references/config-templates.md +257 -0
- package/skills/cicd/cloud-deploy/release-check.mjs +93 -0
- package/skills/cicd/docker/LICENSE +3 -0
- package/skills/cicd/docker/SKILL.md +151 -0
- package/skills/cicd/docker/release-check.mjs +93 -0
- package/skills/cicd/github-actions/LICENSE +3 -0
- package/skills/cicd/github-actions/SKILL.md +111 -0
- package/skills/cicd/github-actions/references/audit-profile-optimize.md +150 -0
- package/skills/cicd/github-actions/references/ci-case-studies.md +141 -0
- package/skills/cicd/github-actions/references/conditional-ci.md +214 -0
- package/skills/cicd/github-actions/references/debugging.md +13 -0
- package/skills/cicd/github-actions/references/pipeline.md +87 -0
- package/skills/cicd/github-actions/references/post-deploy-and-publishing.md +33 -0
- package/skills/cicd/github-actions/references/runners.md +253 -0
- package/skills/cicd/github-actions/references/security.md +29 -0
- package/skills/cicd/github-actions/references/speed-and-audit.md +115 -0
- package/skills/cicd/github-actions/references/two-pass-reading.md +92 -0
- package/skills/cicd/github-actions/release-check.mjs +93 -0
- package/skills/cicd/github-actions/scripts/ci-run-audit-core.mjs +612 -0
- package/skills/cicd/github-actions/scripts/ci-run-audit.mjs +4 -0
- package/skills/cicd/github-actions/scripts/ci-run-audit.test.mjs +637 -0
- package/skills/cicd/github-flow/LICENSE +3 -0
- package/skills/cicd/github-flow/SKILL.md +123 -0
- package/skills/cicd/github-flow/references/ci-conventions.md +14 -0
- package/skills/cicd/github-flow/release-check.mjs +93 -0
- package/skills/cicd/github-flow/scripts/flow-core.mjs +105 -0
- package/skills/cicd/github-flow/scripts/flow.mjs +81 -0
- package/skills/cicd/github-flow/scripts/flow.test.mjs +114 -0
- package/skills/cicd/github-flow/scripts/persist-conventions-core.mjs +117 -0
- package/skills/cicd/github-flow/scripts/persist-conventions.mjs +49 -0
- package/skills/cicd/github-flow/scripts/persist-conventions.test.mjs +108 -0
- package/skills/cicd/google-cloud/LICENSE +3 -0
- package/skills/cicd/google-cloud/SKILL.md +119 -0
- package/skills/cicd/google-cloud/references/gcs.md +469 -0
- package/skills/cicd/google-cloud/references/iam.md +451 -0
- package/skills/cicd/google-cloud/references/project.md +349 -0
- package/skills/cicd/google-cloud/references/secrets.md +336 -0
- package/skills/cicd/google-cloud/references/vpc.md +312 -0
- package/skills/cicd/google-cloud/release-check.mjs +93 -0
- package/skills/cicd/google-cloud/scripts/create-sa.sh +36 -0
- package/skills/cicd/google-cloud/scripts/gcp-config.sh +31 -0
- package/skills/cicd/google-cloud/scripts/grant-iap.sh +41 -0
- package/skills/cicd/google-cloud/scripts/setup-secrets.sh +48 -0
- package/skills/cicd/mergify/LICENSE +3 -0
- package/skills/cicd/mergify/SKILL.md +102 -0
- package/skills/cicd/mergify/assets/templates/mergify.yml +215 -0
- package/skills/cicd/mergify/assets/templates/ruleset.json +46 -0
- package/skills/cicd/mergify/references/branch-protection.md +282 -0
- package/skills/cicd/mergify/references/configuration.md +274 -0
- package/skills/cicd/mergify/references/diagnosis.md +109 -0
- package/skills/cicd/mergify/references/stacks.md +84 -0
- package/skills/cicd/mergify/references/traps.md +119 -0
- package/skills/cicd/mergify/references/watch-contract.md +274 -0
- package/skills/cicd/mergify/release-check.mjs +93 -0
- package/skills/cicd/mergify/scripts/audit-core.mjs +208 -0
- package/skills/cicd/mergify/scripts/audit.mjs +4 -0
- package/skills/cicd/mergify/scripts/audit.test.mjs +201 -0
- package/skills/cicd/mergify/scripts/entrypoints.test.mjs +106 -0
- package/skills/cicd/mergify/scripts/pr-620-mergify-comments.fixture.json +30 -0
- package/skills/cicd/mergify/scripts/stack-push-core.mjs +258 -0
- package/skills/cicd/mergify/scripts/stack-push.mjs +4 -0
- package/skills/cicd/mergify/scripts/stack-push.test.mjs +233 -0
- package/skills/cicd/mergify/scripts/watch-pr-delivery-core.mjs +1065 -0
- package/skills/cicd/mergify/scripts/watch-pr-delivery.mjs +4 -0
- package/skills/cicd/mergify/scripts/watch-pr-delivery.test.mjs +1826 -0
- package/skills/cicd/podman/LICENSE +3 -0
- package/skills/cicd/podman/SKILL.md +71 -0
- package/skills/cicd/podman/agents/openai.yaml +4 -0
- package/skills/cicd/podman/assets/templates/podman-compose-socket-directory.yml +6 -0
- package/skills/cicd/podman/assets/templates/podman-service-override.conf +3 -0
- package/skills/cicd/podman/references/compose-compatibility.md +70 -0
- package/skills/cicd/podman/references/networking-and-ports.md +74 -0
- package/skills/cicd/podman/references/rootless-services-and-sockets.md +156 -0
- package/skills/cicd/podman/references/troubleshooting.md +98 -0
- package/skills/cicd/podman/release-check.mjs +93 -0
- package/skills/content/article-review/LICENSE +3 -0
- package/skills/content/article-review/SKILL.md +66 -0
- package/skills/content/article-review/references/report-format.md +68 -0
- package/skills/content/article-review/references/template-guide.md +79 -0
- package/skills/content/article-review/references/template-wechat-payments.md +125 -0
- package/skills/content/article-review/release-check.mjs +93 -0
- package/skills/content/article-to-image/LICENSE +3 -0
- package/skills/content/article-to-image/SKILL.md +91 -0
- package/skills/content/article-to-image/references/formats.md +53 -0
- package/skills/content/article-to-image/release-check.mjs +93 -0
- package/skills/content/flowchart-svg/LICENSE +3 -0
- package/skills/content/flowchart-svg/SKILL.md +43 -0
- package/skills/content/flowchart-svg/release-check.mjs +93 -0
- package/skills/content/flowchart-svg/scripts/export_png.sh +8 -0
- package/skills/content/image-gen/LICENSE +3 -0
- package/skills/content/image-gen/SKILL.md +192 -0
- package/skills/content/image-gen/release-check.mjs +93 -0
- package/skills/content/image-gen/scripts/credentials.mjs +217 -0
- package/skills/content/image-gen/scripts/credentials.test.mjs +212 -0
- package/skills/content/image-gen/scripts/generate.mjs +240 -0
- package/skills/content/image-gen/scripts/options.mjs +293 -0
- package/skills/content/image-gen/scripts/options.test.mjs +245 -0
- package/skills/content/mermaid/LICENSE +3 -0
- package/skills/content/mermaid/SKILL.md +635 -0
- package/skills/content/mermaid/release-check.mjs +93 -0
- package/skills/content/wechat-article-writer/LICENSE +3 -0
- package/skills/content/wechat-article-writer/SKILL.md +92 -0
- package/skills/content/wechat-article-writer/references/style-selector.md +133 -0
- package/skills/content/wechat-article-writer/references/writing-rules.md +152 -0
- package/skills/content/wechat-article-writer/release-check.mjs +93 -0
- package/skills/content/wechat-article-writer/templates/wechat-comparison.md +52 -0
- package/skills/content/wechat-article-writer/templates/wechat-howto.md +51 -0
- package/skills/content/wechat-article-writer/templates/wechat-insight.md +50 -0
- package/skills/content/wechat-article-writer/templates/wechat-pitfall.md +52 -0
- package/skills/content/wechat-publisher/LICENSE +3 -0
- package/skills/content/wechat-publisher/SKILL.md +171 -0
- package/skills/content/wechat-publisher/references/api.md +105 -0
- package/skills/content/wechat-publisher/references/layout-rules.md +57 -0
- package/skills/content/wechat-publisher/references/wechat-safe-template.html +86 -0
- package/skills/content/wechat-publisher/release-check.mjs +93 -0
- package/skills/content/wechat-publisher/scripts/md_to_wechat_html.py +194 -0
- package/skills/content/wechat-publisher/scripts/publish.py +239 -0
- package/skills/content/wechat-search/LICENSE +3 -0
- package/skills/content/wechat-search/SKILL.md +211 -0
- package/skills/content/wechat-search/release-check.mjs +93 -0
- package/skills/content/wechat-search/scripts/start-chrome.sh +83 -0
- package/skills/content/xai-search/LICENSE +3 -0
- package/skills/content/xai-search/SKILL.md +79 -0
- package/skills/content/xai-search/release-check.mjs +93 -0
- package/skills/content/xai-search/scripts/xai_search.sh +187 -0
- package/skills/content/xai-search/tests/smoke_test.sh +36 -0
- package/skills/core/distill-writing/LICENSE +3 -0
- package/skills/core/distill-writing/SKILL.md +74 -0
- package/skills/core/distill-writing/references/extraction.md +95 -0
- package/skills/core/distill-writing/references/updating.md +46 -0
- package/skills/core/distill-writing/release-check.mjs +93 -0
- package/skills/core/doc-to-md/LICENSE +3 -0
- package/skills/core/doc-to-md/SKILL.md +78 -0
- package/skills/core/doc-to-md/release-check.mjs +93 -0
- package/skills/core/doc-to-md/scripts/convert.py +157 -0
- package/skills/core/editorial-review/LICENSE +3 -0
- package/skills/core/editorial-review/SKILL.md +79 -0
- package/skills/core/editorial-review/references/checklist.md +94 -0
- package/skills/core/editorial-review/release-check.mjs +93 -0
- package/skills/core/house-style/LICENSE +3 -0
- package/skills/core/house-style/SKILL.md +33 -0
- package/skills/core/house-style/references/defaults.md +66 -0
- package/skills/core/house-style/references/rules.md +267 -0
- package/skills/core/house-style/references/sources.md +27 -0
- package/skills/core/house-style/references/style-en.md +131 -0
- package/skills/core/house-style/references/style-zh.md +141 -0
- package/skills/core/house-style/references/terminology-zh.md +223 -0
- package/skills/core/house-style/release-check.mjs +93 -0
- package/skills/core/house-style/templates/brd.md +103 -0
- package/skills/core/house-style/templates/commercial-proposal.md +93 -0
- package/skills/core/house-style/templates/compliance-policy.md +109 -0
- package/skills/core/house-style/templates/gap-analysis.md +105 -0
- package/skills/core/house-style/templates/general.md +63 -0
- package/skills/core/house-style/templates/integration-guide.md +98 -0
- package/skills/core/house-style/templates/prd.md +81 -0
- package/skills/core/house-style/templates/risk-operations-procedure.md +94 -0
- package/skills/core/house-style/templates/technical-spec.md +96 -0
- package/skills/core/polish-cn/LICENSE +3 -0
- package/skills/core/polish-cn/SKILL.md +102 -0
- package/skills/core/polish-cn/references/brief.md +93 -0
- package/skills/core/polish-cn/references/models.md +76 -0
- package/skills/core/polish-cn/release-check.mjs +93 -0
- package/skills/core/polish-cn/scripts/polish-cn.test.mjs +244 -0
- package/skills/core/polish-cn/scripts/polish_blocks.py +489 -0
- package/skills/core/reg-parser/LICENSE +3 -0
- package/skills/core/reg-parser/SKILL.md +212 -0
- package/skills/core/reg-parser/references/checklist-schema.md +223 -0
- package/skills/core/reg-parser/references/checklists/hk-amlo-checklist.json +1306 -0
- package/skills/core/reg-parser/references/checklists/hk-amlo-checklist.md +469 -0
- package/skills/core/reg-parser/references/checklists/hk-fi-corporate-onboarding-cdd-checklist.json +634 -0
- package/skills/core/reg-parser/references/checklists/hk-fi-corporate-onboarding-cdd-checklist.md +233 -0
- package/skills/core/reg-parser/references/checklists/hk-mso-guideline-checklist.json +2194 -0
- package/skills/core/reg-parser/references/checklists/hk-mso-guideline-checklist.md +771 -0
- package/skills/core/reg-parser/references/checklists/kyc-aml-checklist.md +258 -0
- package/skills/core/reg-parser/references/checklists/visa-vars-checklist.md +1058 -0
- package/skills/core/reg-parser/references/mandates/hk-amlo-cap615.md +389 -0
- package/skills/core/reg-parser/references/mandates/visa-vars.md +205 -0
- package/skills/core/reg-parser/release-check.mjs +93 -0
- package/skills/core/reg-parser/scripts/compare_checklist.py +230 -0
- package/skills/core/reg-parser/scripts/dump_checklist.py +361 -0
- package/skills/core/reg-parser/scripts/preprocess-mandate.sh +187 -0
- package/skills/core/reg-parser/scripts/reg-parser.test.mjs +165 -0
- package/skills/core/reg-parser/scripts/test_quarantine.sh +105 -0
- package/skills/core/reg-parser/scripts/validate_checklist.py +563 -0
- package/skills/core/reg-parser/scripts/validate_mandate.py +273 -0
- package/skills/core/terminology/LICENSE +3 -0
- package/skills/core/terminology/SKILL.md +62 -0
- package/skills/core/terminology/references/format.md +50 -0
- package/skills/core/terminology/references/init.md +32 -0
- package/skills/core/terminology/release-check.mjs +93 -0
- package/skills/core/write-doc/LICENSE +3 -0
- package/skills/core/write-doc/SKILL.md +141 -0
- package/skills/core/write-doc/references/bilingual.md +60 -0
- package/skills/core/write-doc/release-check.mjs +93 -0
- package/skills/engineering/better-review/LICENSE +3 -0
- package/skills/engineering/better-review/SKILL.md +249 -0
- package/skills/engineering/better-review/agents/openai.yaml +9 -0
- package/skills/engineering/better-review/references/domain-hazards.md +53 -0
- package/skills/engineering/better-review/references/passes.md +147 -0
- package/skills/engineering/better-review/references/result.md +151 -0
- package/skills/engineering/better-review/release-check.mjs +93 -0
- package/skills/engineering/better-review/scripts/pr-context.mjs +212 -0
- package/skills/engineering/better-review/scripts/pr-context.test.mjs +168 -0
- package/skills/engineering/better-review/scripts/rereview-scope.mjs +503 -0
- package/skills/engineering/better-review/scripts/rereview-scope.test.mjs +587 -0
- package/skills/engineering/better-review/scripts/scan-diff.mjs +365 -0
- package/skills/engineering/better-review/scripts/scan-diff.test.mjs +414 -0
- package/skills/engineering/better-review/scripts/vendor-sync.test.mjs +96 -0
- package/skills/engineering/e2e-test/LICENSE +3 -0
- package/skills/engineering/e2e-test/SKILL.md +98 -0
- package/skills/engineering/e2e-test/assets/ci-gates.cloudbuild.yaml +24 -0
- package/skills/engineering/e2e-test/references/authoring/auth-flows.md +159 -0
- package/skills/engineering/e2e-test/references/authoring/playwright-config.md +73 -0
- package/skills/engineering/e2e-test/references/authoring/playwright-patterns.md +144 -0
- package/skills/engineering/e2e-test/references/ci-integration.md +25 -0
- package/skills/engineering/e2e-test/references/ci-playwright-container.md +290 -0
- package/skills/engineering/e2e-test/references/presentation-sweep.md +104 -0
- package/skills/engineering/e2e-test/references/reviewing.md +41 -0
- package/skills/engineering/e2e-test/references/route-manifest.md +51 -0
- package/skills/engineering/e2e-test/release-check.mjs +93 -0
- package/skills/engineering/e2e-test/scripts/detect-routes-nextjs.mjs +200 -0
- package/skills/engineering/e2e-test/scripts/presentation-checks.mjs +171 -0
- package/skills/engineering/e2e-test/scripts/presentation-checks.test.mjs +106 -0
- package/skills/engineering/e2e-test/scripts/presentation-perceivability.mjs +179 -0
- package/skills/engineering/e2e-test/scripts/presentation-perceivability.test.mjs +117 -0
- package/skills/engineering/e2e-test/scripts/presentation-reachability.mjs +154 -0
- package/skills/engineering/e2e-test/scripts/presentation-reachability.test.mjs +69 -0
- package/skills/engineering/e2e-test/scripts/presentation-render-health.mjs +141 -0
- package/skills/engineering/e2e-test/scripts/presentation-render-health.test.mjs +98 -0
- package/skills/engineering/e2e-test/scripts/presentation-sweep.mjs +147 -0
- package/skills/engineering/e2e-test/scripts/presentation-sweep.test.mjs +71 -0
- package/skills/engineering/e2e-test/scripts/presentation-temporal.mjs +127 -0
- package/skills/engineering/e2e-test/scripts/presentation-temporal.test.mjs +59 -0
- package/skills/engineering/e2e-test/scripts/project-route-manifest.mjs +82 -0
- package/skills/engineering/e2e-test/scripts/project-route-manifest.test.mjs +76 -0
- package/skills/engineering/e2e-test/scripts/validate-manifest.mjs +106 -0
- package/skills/engineering/engineering-runtime/LICENSE +3 -0
- package/skills/engineering/engineering-runtime/SKILL.md +11 -0
- package/skills/engineering/engineering-runtime/agents/openai.yaml +6 -0
- package/skills/engineering/engineering-runtime/coherence/workflow.json +597 -0
- package/skills/engineering/engineering-runtime/engineering-runtime.test.mjs +68 -0
- package/skills/engineering/engineering-runtime/release-check.mjs +93 -0
- package/skills/engineering/engineering-runtime/scripts/exact-head-artifact.mjs +131 -0
- package/skills/engineering/engineering-runtime/scripts/head-check-set.mjs +398 -0
- package/skills/engineering/engineering-runtime/scripts/invocation-policy.mjs +187 -0
- package/skills/engineering/engineering-runtime/scripts/invocation-policy.test.mjs +95 -0
- package/skills/engineering/engineering-runtime/scripts/main-module.mjs +79 -0
- package/skills/engineering/engineering-runtime/scripts/main-module.test.mjs +288 -0
- package/skills/engineering/engineering-runtime/scripts/mergify-yaml.mjs +11 -0
- package/skills/engineering/engineering-runtime/scripts/package-lock.json +43 -0
- package/skills/engineering/engineering-runtime/scripts/package.json +10 -0
- package/skills/engineering/engineering-runtime/scripts/required-check-plan.mjs +223 -0
- package/skills/engineering/engineering-runtime/scripts/required-check-plan.test.mjs +96 -0
- package/skills/engineering/engineering-runtime/scripts/review-completion.mjs +56 -0
- package/skills/engineering/engineering-runtime/scripts/workflow-coherence.mjs +595 -0
- package/skills/engineering/engineering-runtime/scripts/workflow-policy.mjs +189 -0
- package/skills/engineering/engineering-runtime/scripts/yaml-mapping.mjs +18 -0
- package/skills/engineering/ensure-coverage/LICENSE +3 -0
- package/skills/engineering/ensure-coverage/SKILL.md +129 -0
- package/skills/engineering/ensure-coverage/references/breadth/coverage-ledger.md +92 -0
- package/skills/engineering/ensure-coverage/references/breadth/inventory-contract.md +85 -0
- package/skills/engineering/ensure-coverage/references/breadth/surface-baseline.md +44 -0
- package/skills/engineering/ensure-coverage/references/breadth/surface-discovery.md +16 -0
- package/skills/engineering/ensure-coverage/references/depth/characterization.md +68 -0
- package/skills/engineering/ensure-coverage/references/depth/coverage.config.example.json +19 -0
- package/skills/engineering/ensure-coverage/references/depth/grading.md +35 -0
- package/skills/engineering/ensure-coverage/references/depth/mock-policy.md +57 -0
- package/skills/engineering/ensure-coverage/references/depth/test-smells.md +39 -0
- package/skills/engineering/ensure-coverage/references/enforcement/ci-contract.md +44 -0
- package/skills/engineering/ensure-coverage/references/examples/coverage-ledger.md +110 -0
- package/skills/engineering/ensure-coverage/references/examples/refund-flow.md +35 -0
- package/skills/engineering/ensure-coverage/references/presentation/axis.md +64 -0
- package/skills/engineering/ensure-coverage/references/process/audit-mode.md +27 -0
- package/skills/engineering/ensure-coverage/references/process/output-template.md +139 -0
- package/skills/engineering/ensure-coverage/references/process/test-strategy.md +56 -0
- package/skills/engineering/ensure-coverage/release-check.mjs +93 -0
- package/skills/engineering/ensure-coverage/schemas/coverage-config.schema.json +67 -0
- package/skills/engineering/ensure-coverage/schemas/coverage-file.schema.json +140 -0
- package/skills/engineering/ensure-coverage/scripts/README.md +99 -0
- package/skills/engineering/ensure-coverage/scripts/adapters/nextjs-inventory.mjs +182 -0
- package/skills/engineering/ensure-coverage/scripts/adapters/nextjs-inventory.test.mjs +96 -0
- package/skills/engineering/ensure-coverage/scripts/check-quarantine-expiry.mjs +105 -0
- package/skills/engineering/ensure-coverage/scripts/check-quarantine-expiry.test.mjs +47 -0
- package/skills/engineering/ensure-coverage/scripts/ci-audit.mjs +137 -0
- package/skills/engineering/ensure-coverage/scripts/ci-audit.test.mjs +86 -0
- package/skills/engineering/ensure-coverage/scripts/coverage-ledger.mjs +674 -0
- package/skills/engineering/ensure-coverage/scripts/coverage-ledger.test.mjs +447 -0
- package/skills/engineering/ensure-coverage/scripts/design-parity.mjs +591 -0
- package/skills/engineering/ensure-coverage/scripts/design-parity.test.mjs +552 -0
- package/skills/engineering/ensure-coverage/scripts/lint-tests.mjs +282 -0
- package/skills/engineering/ensure-coverage/scripts/lint-tests.test.mjs +289 -0
- package/skills/engineering/ensure-coverage/scripts/mock-policy-config.mjs +176 -0
- package/skills/engineering/ensure-coverage/scripts/mock-policy-config.test.mjs +119 -0
- package/skills/engineering/ensure-coverage/scripts/package.json +19 -0
- package/skills/engineering/golden-path/LICENSE +3 -0
- package/skills/engineering/golden-path/SKILL.md +230 -0
- package/skills/engineering/golden-path/agents/openai.yaml +3 -0
- package/skills/engineering/golden-path/assets/golden-paths.example.json +57 -0
- package/skills/engineering/golden-path/references/contract.md +239 -0
- package/skills/engineering/golden-path/references/migration.md +111 -0
- package/skills/engineering/golden-path/release-check.mjs +93 -0
- package/skills/engineering/golden-path/scripts/golden-path-core.mjs +1779 -0
- package/skills/engineering/golden-path/scripts/golden-path.mjs +6 -0
- package/skills/engineering/golden-path/scripts/golden-path.test.mjs +1457 -0
- package/skills/engineering/harness-runtime/LICENSE +3 -0
- package/skills/engineering/harness-runtime/SKILL.md +19 -0
- package/skills/engineering/harness-runtime/agents/openai.yaml +6 -0
- package/skills/engineering/harness-runtime/bin/discover-models.mjs +4 -0
- package/skills/engineering/harness-runtime/bin/model-catalog.mjs +4 -0
- package/skills/engineering/harness-runtime/contracts.md +15 -0
- package/skills/engineering/harness-runtime/discover-models.mjs +392 -0
- package/skills/engineering/harness-runtime/discover-models.test.mjs +363 -0
- package/skills/engineering/harness-runtime/fixtures/native-question-schemas.json +33 -0
- package/skills/engineering/harness-runtime/fixtures/question-responses.json +54 -0
- package/skills/engineering/harness-runtime/harness-runtime.test.mjs +967 -0
- package/skills/engineering/harness-runtime/index.mjs +767 -0
- package/skills/engineering/harness-runtime/model-catalog-seed.test.mjs +829 -0
- package/skills/engineering/harness-runtime/model-catalog.mjs +787 -0
- package/skills/engineering/harness-runtime/model-catalog.test.mjs +366 -0
- package/skills/engineering/harness-runtime/native-question-contracts.md +37 -0
- package/skills/engineering/harness-runtime/references/model-catalog-seed.json +408 -0
- package/skills/engineering/harness-runtime/references/model-catalog.md +57 -0
- package/skills/engineering/harness-runtime/release-check.mjs +93 -0
- package/skills/engineering/resolve-issues/LICENSE +3 -0
- package/skills/engineering/resolve-issues/SKILL.md +250 -0
- package/skills/engineering/resolve-issues/agents/openai.yaml +9 -0
- package/skills/engineering/resolve-issues/plugin-hooks.json +17 -0
- package/skills/engineering/resolve-issues/references/canary.md +28 -0
- package/skills/engineering/resolve-issues/references/ci.md +105 -0
- package/skills/engineering/resolve-issues/references/done.md +25 -0
- package/skills/engineering/resolve-issues/references/dropbox.md +90 -0
- package/skills/engineering/resolve-issues/references/expire.md +318 -0
- package/skills/engineering/resolve-issues/references/exploration.md +202 -0
- package/skills/engineering/resolve-issues/references/implementation.md +303 -0
- package/skills/engineering/resolve-issues/references/preflight.md +445 -0
- package/skills/engineering/resolve-issues/references/review.md +228 -0
- package/skills/engineering/resolve-issues/references/shared-modules.md +44 -0
- package/skills/engineering/resolve-issues/references/task-plan.md +264 -0
- package/skills/engineering/resolve-issues/release-check.mjs +93 -0
- package/skills/engineering/resolve-issues/scripts/cleanup-runs.mjs +364 -0
- package/skills/engineering/resolve-issues/scripts/cleanup-runs.test.mjs +280 -0
- package/skills/engineering/resolve-issues/scripts/discover-models.mjs +9 -0
- package/skills/engineering/resolve-issues/scripts/dropbox.mjs +473 -0
- package/skills/engineering/resolve-issues/scripts/dropbox.test.mjs +346 -0
- package/skills/engineering/resolve-issues/scripts/findings-reuse.mjs +98 -0
- package/skills/engineering/resolve-issues/scripts/findings-reuse.test.mjs +88 -0
- package/skills/engineering/resolve-issues/scripts/github-reviews.mjs +384 -0
- package/skills/engineering/resolve-issues/scripts/github-reviews.test.mjs +264 -0
- package/skills/engineering/resolve-issues/scripts/install-hooks.mjs +135 -0
- package/skills/engineering/resolve-issues/scripts/install-hooks.test.mjs +79 -0
- package/skills/engineering/resolve-issues/scripts/issue-tree.mjs +162 -0
- package/skills/engineering/resolve-issues/scripts/issue-tree.test.mjs +107 -0
- package/skills/engineering/resolve-issues/scripts/manual-invocation.test.mjs +14 -0
- package/skills/engineering/resolve-issues/scripts/model-catalog.mjs +9 -0
- package/skills/engineering/resolve-issues/scripts/next-actions-capacity.test.mjs +149 -0
- package/skills/engineering/resolve-issues/scripts/next-actions.mjs +856 -0
- package/skills/engineering/resolve-issues/scripts/next-actions.test.mjs +915 -0
- package/skills/engineering/resolve-issues/scripts/plan-sync.mjs +269 -0
- package/skills/engineering/resolve-issues/scripts/plan-sync.test.mjs +156 -0
- package/skills/engineering/resolve-issues/scripts/preflight-models.mjs +736 -0
- package/skills/engineering/resolve-issues/scripts/preflight-models.test.mjs +448 -0
- package/skills/engineering/resolve-issues/scripts/ready-check.mjs +185 -0
- package/skills/engineering/resolve-issues/scripts/ready-check.test.mjs +217 -0
- package/skills/engineering/resolve-issues/scripts/rehydrate.mjs +98 -0
- package/skills/engineering/resolve-issues/scripts/rehydrate.test.mjs +91 -0
- package/skills/engineering/resolve-issues/scripts/review-verdict.mjs +509 -0
- package/skills/engineering/resolve-issues/scripts/review-verdict.test.mjs +1060 -0
- package/skills/engineering/resolve-issues/scripts/size-check.mjs +492 -0
- package/skills/engineering/resolve-issues/scripts/size-check.test.mjs +458 -0
- package/skills/engineering/resolve-release/LICENSE +3 -0
- package/skills/engineering/resolve-release/SKILL.md +215 -0
- package/skills/engineering/resolve-release/agents/openai.yaml +8 -0
- package/skills/engineering/resolve-release/flows/cloud-run-canary.md +13 -0
- package/skills/engineering/resolve-release/flows/cloud-run.md +7 -0
- package/skills/engineering/resolve-release/flows/root-tag-npm.md +13 -0
- package/skills/engineering/resolve-release/flows/workspace-npm.md +22 -0
- package/skills/engineering/resolve-release/references/canary.md +51 -0
- package/skills/engineering/resolve-release/references/candidate.md +41 -0
- package/skills/engineering/resolve-release/references/cut.md +131 -0
- package/skills/engineering/resolve-release/references/dark-launch.md +66 -0
- package/skills/engineering/resolve-release/references/flows.md +150 -0
- package/skills/engineering/resolve-release/references/preflight.md +154 -0
- package/skills/engineering/resolve-release/references/prepared-metadata.md +260 -0
- package/skills/engineering/resolve-release/references/promotion.md +82 -0
- package/skills/engineering/resolve-release/references/publish.md +232 -0
- package/skills/engineering/resolve-release/references/workspace-npm.md +103 -0
- package/skills/engineering/resolve-release/release-check.mjs +93 -0
- package/skills/engineering/resolve-release/scripts/apply.mjs +212 -0
- package/skills/engineering/resolve-release/scripts/apply.test.mjs +99 -0
- package/skills/engineering/resolve-release/scripts/dark-flags.mjs +134 -0
- package/skills/engineering/resolve-release/scripts/dark-flags.test.mjs +100 -0
- package/skills/engineering/resolve-release/scripts/flow.mjs +500 -0
- package/skills/engineering/resolve-release/scripts/flow.test.mjs +340 -0
- package/skills/engineering/resolve-release/scripts/green-head.mjs +231 -0
- package/skills/engineering/resolve-release/scripts/green-head.test.mjs +101 -0
- package/skills/engineering/resolve-release/scripts/npm-version-absence.mjs +138 -0
- package/skills/engineering/resolve-release/scripts/npm-version-absence.test.mjs +426 -0
- package/skills/engineering/resolve-release/scripts/plan-npm.test.mjs +659 -0
- package/skills/engineering/resolve-release/scripts/plan-toml-boundary.test.mjs +317 -0
- package/skills/engineering/resolve-release/scripts/plan-uv.test.mjs +291 -0
- package/skills/engineering/resolve-release/scripts/plan.mjs +806 -0
- package/skills/engineering/resolve-release/scripts/plan.test.mjs +428 -0
- package/skills/engineering/rush-issues/LICENSE +3 -0
- package/skills/engineering/rush-issues/SKILL.md +58 -0
- package/skills/engineering/rush-issues/agents/openai.yaml +8 -0
- package/skills/engineering/rush-issues/rehydrate.mjs +10 -0
- package/skills/engineering/rush-issues/release-check.mjs +93 -0
- package/skills/engineering/rush-release/LICENSE +3 -0
- package/skills/engineering/rush-release/SKILL.md +35 -0
- package/skills/engineering/rush-release/agents/openai.yaml +8 -0
- package/skills/engineering/rush-release/release-check.mjs +93 -0
- package/skills/engineering/test-quality/LICENSE +3 -0
- package/skills/engineering/test-quality/SKILL.md +79 -0
- package/skills/engineering/test-quality/references/audit.md +80 -0
- package/skills/engineering/test-quality/references/lint.md +24 -0
- package/skills/engineering/test-quality/references/principles.md +143 -0
- package/skills/engineering/test-quality/references/testing-conventions.md +9 -0
- package/skills/engineering/test-quality/release-check.mjs +93 -0
- package/skills/engineering/test-quality/scripts/lint-tests.mjs +574 -0
- package/skills/engineering/test-quality/scripts/lint-tests.test.mjs +591 -0
- package/skills/engineering/test-quality/scripts/mock-policy-config.mjs +176 -0
- package/skills/engineering/test-quality/scripts/mock-policy-config.test.mjs +119 -0
- package/skills/engineering/test-quality/scripts/persist-conventions-core.mjs +117 -0
- package/skills/engineering/test-quality/scripts/persist-conventions.mjs +17 -0
- package/skills/engineering/test-quality/scripts/persist-conventions.test.mjs +104 -0
- package/skills/risk-compliance/compliance-audit/LICENSE +3 -0
- package/skills/risk-compliance/compliance-audit/SKILL.md +439 -0
- package/skills/risk-compliance/compliance-audit/references/findings-schema.md +293 -0
- package/skills/risk-compliance/compliance-audit/references/normalization-rules.md +45 -0
- package/skills/risk-compliance/compliance-audit/references/vars-checklist.md +1068 -0
- package/skills/risk-compliance/compliance-audit/references/vars-findings-schema.md +398 -0
- package/skills/risk-compliance/compliance-audit/release-check.mjs +93 -0
- package/skills/risk-compliance/compliance-audit/scripts/compliance-audit.test.mjs +14 -0
- package/skills/risk-compliance/compliance-audit/scripts/export_tracker_xlsx.py +221 -0
- package/skills/risk-compliance/compliance-audit/scripts/reconcile_tracker.py +458 -0
- package/skills/risk-compliance/compliance-audit/scripts/test_export_tracker_xlsx.py +97 -0
- package/skills/risk-compliance/compliance-audit/scripts/test_validate_tracker.py +157 -0
- package/skills/risk-compliance/compliance-audit/scripts/validate_tracker.py +829 -0
- package/skills/risk-compliance/contract-compare/LICENSE +3 -0
- package/skills/risk-compliance/contract-compare/SKILL.md +199 -0
- package/skills/risk-compliance/contract-compare/references/comparison-dimensions.md +209 -0
- package/skills/risk-compliance/contract-compare/release-check.mjs +93 -0
- package/skills/risk-compliance/contract-review/LICENSE +3 -0
- package/skills/risk-compliance/contract-review/SKILL.md +240 -0
- package/skills/risk-compliance/contract-review/references/review-criteria.md +223 -0
- package/skills/risk-compliance/contract-review/release-check.mjs +93 -0
- package/skills/risk-compliance/doc-authenticity/LICENSE +3 -0
- package/skills/risk-compliance/doc-authenticity/SKILL.md +160 -0
- package/skills/risk-compliance/doc-authenticity/agents/openai.yaml +8 -0
- package/skills/risk-compliance/doc-authenticity/manual-invocation.test.mjs +12 -0
- package/skills/risk-compliance/doc-authenticity/references/agreement.md +66 -0
- package/skills/risk-compliance/doc-authenticity/references/bank-statement.md +150 -0
- package/skills/risk-compliance/doc-authenticity/references/forensic-signals.md +157 -0
- package/skills/risk-compliance/doc-authenticity/references/image-signals.md +114 -0
- package/skills/risk-compliance/doc-authenticity/references/invoice.md +66 -0
- package/skills/risk-compliance/doc-authenticity/references/issuer-profiles.md +86 -0
- package/skills/risk-compliance/doc-authenticity/references/verdict-and-report.md +95 -0
- package/skills/risk-compliance/doc-authenticity/references/verdict.schema.json +81 -0
- package/skills/risk-compliance/doc-authenticity/release-check.mjs +93 -0
- package/skills/risk-compliance/doc-authenticity/scripts/image_forensics.py +294 -0
- package/skills/risk-compliance/doc-authenticity/scripts/pdf_forensics.py +401 -0
- package/skills/risk-compliance/doc-authenticity/scripts/validate_codes.py +224 -0
- package/skills/risk-compliance/doc-authenticity/scripts/validate_verdict.py +308 -0
- package/skills/risk-compliance/doc-authenticity/scripts/validate_verdict.test.mjs +212 -0
- package/skills/risk-compliance/fraud-analysis/LICENSE +3 -0
- package/skills/risk-compliance/fraud-analysis/SKILL.md +114 -0
- package/skills/risk-compliance/fraud-analysis/references/archetypes/authorized-payment-scam.md +41 -0
- package/skills/risk-compliance/fraud-analysis/references/archetypes/first-party-fraud.md +44 -0
- package/skills/risk-compliance/fraud-analysis/references/archetypes/third-party-fraud.md +27 -0
- package/skills/risk-compliance/fraud-analysis/references/contexts/bank-transfer.md +24 -0
- package/skills/risk-compliance/fraud-analysis/references/contexts/card-payment.md +30 -0
- package/skills/risk-compliance/fraud-analysis/references/contexts/payment-collection.md +20 -0
- package/skills/risk-compliance/fraud-analysis/references/contexts/payout.md +20 -0
- package/skills/risk-compliance/fraud-analysis/references/feature-engineering.md +158 -0
- package/skills/risk-compliance/fraud-analysis/references/mechanisms/account-takeover.md +36 -0
- package/skills/risk-compliance/fraud-analysis/references/report-rationale.md +45 -0
- package/skills/risk-compliance/fraud-analysis/references/report-template.md +190 -0
- package/skills/risk-compliance/fraud-analysis/references/review-checklist.md +175 -0
- package/skills/risk-compliance/fraud-analysis/references/taxonomy.md +79 -0
- package/skills/risk-compliance/fraud-analysis/references/terminology.md +108 -0
- package/skills/risk-compliance/fraud-analysis/references/workflow.md +175 -0
- package/skills/risk-compliance/fraud-analysis/release-check.mjs +93 -0
- package/skills/risk-compliance/payment-analysis/LICENSE +3 -0
- package/skills/risk-compliance/payment-analysis/SKILL.md +180 -0
- package/skills/risk-compliance/payment-analysis/references/auth-rate-actions.md +30 -0
- package/skills/risk-compliance/payment-analysis/references/chargebacks.md +208 -0
- package/skills/risk-compliance/payment-analysis/references/chinese-polish.md +51 -0
- package/skills/risk-compliance/payment-analysis/references/event-layers.md +127 -0
- package/skills/risk-compliance/payment-analysis/references/fx.md +59 -0
- package/skills/risk-compliance/payment-analysis/references/journey.md +79 -0
- package/skills/risk-compliance/payment-analysis/references/metrics.md +67 -0
- package/skills/risk-compliance/payment-analysis/references/report-template.md +119 -0
- package/skills/risk-compliance/payment-analysis/references/terminology.md +95 -0
- package/skills/risk-compliance/payment-analysis/references/visualization.md +56 -0
- package/skills/risk-compliance/payment-analysis/release-check.mjs +93 -0
- package/skills/risk-compliance/report-writing/LICENSE +3 -0
- package/skills/risk-compliance/report-writing/SKILL.md +220 -0
- package/skills/risk-compliance/report-writing/references/audit-report-template.md +121 -0
- package/skills/risk-compliance/report-writing/references/external-assessment-template.md +167 -0
- package/skills/risk-compliance/report-writing/references/management-report-template.md +145 -0
- package/skills/risk-compliance/report-writing/references/vars-report-template.md +224 -0
- package/skills/risk-compliance/report-writing/release-check.mjs +93 -0
- package/skills/risk-compliance/similar-domain/LICENSE +3 -0
- package/skills/risk-compliance/similar-domain/SKILL.md +203 -0
- package/skills/risk-compliance/similar-domain/references/entities.md +67 -0
- package/skills/risk-compliance/similar-domain/references/fingerprints.md +134 -0
- package/skills/risk-compliance/similar-domain/references/pivots.md +82 -0
- package/skills/risk-compliance/similar-domain/references/report-template.md +93 -0
- package/skills/risk-compliance/similar-domain/references/scoring.md +130 -0
- package/skills/risk-compliance/similar-domain/references/terminology.md +41 -0
- package/skills/risk-compliance/similar-domain/references/workflow.md +85 -0
- package/skills/risk-compliance/similar-domain/release-check.mjs +93 -0
- package/skills/risk-compliance/tld-detection/LICENSE +3 -0
- package/skills/risk-compliance/tld-detection/SKILL.md +245 -0
- package/skills/risk-compliance/tld-detection/agents/openai.yaml +9 -0
- package/skills/risk-compliance/tld-detection/references/chinese-polish.md +55 -0
- package/skills/risk-compliance/tld-detection/references/clean.md +51 -0
- package/skills/risk-compliance/tld-detection/references/clustering.md +235 -0
- package/skills/risk-compliance/tld-detection/references/decision.md +189 -0
- package/skills/risk-compliance/tld-detection/references/fx-conversion.md +232 -0
- package/skills/risk-compliance/tld-detection/references/report-template.md +272 -0
- package/skills/risk-compliance/tld-detection/references/streams.md +141 -0
- package/skills/risk-compliance/tld-detection/references/terminology.md +95 -0
- package/skills/risk-compliance/tld-detection/references/workflow.md +95 -0
- package/skills/risk-compliance/tld-detection/release-check.mjs +93 -0
- package/skills/risk-compliance/tld-detection/scripts/detect_ladders.py +390 -0
- package/skills/risk-compliance/tld-detection/scripts/detect_ladders.test.mjs +14 -0
- package/skills/risk-compliance/tld-detection/scripts/detect_streams.py +650 -0
- package/skills/risk-compliance/tld-detection/scripts/detect_streams.test.mjs +14 -0
- package/skills/risk-compliance/tld-detection/tests/test_detect_ladders.py +134 -0
- package/skills/risk-compliance/tld-detection/tests/test_detect_streams.py +520 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
// mock-policy-config — project-agnostic classifier for the `mock-internal-seam`
|
|
2
|
+
// lint rule. The engine is invariant; the project's topology is *declared*, not
|
|
3
|
+
// hardcoded. This is the "externals-allowlist inversion": you cannot enumerate
|
|
4
|
+
// every internal seam (unbounded, per-project), but the set of things that may
|
|
5
|
+
// LEGITIMATELY be faked is small, stable, and known — third-party HTTP, the
|
|
6
|
+
// clock, randomness, the runtime/stdlib. So we flip the question: a mock whose
|
|
7
|
+
// target resolves to *first-party* code is a candidate gap; anything on the
|
|
8
|
+
// declared externals allowlist (or the stdlib) is exempt. This makes the
|
|
9
|
+
// "real internals, faked externals, nothing between" policy (mock-policy.md)
|
|
10
|
+
// decidable from config rather than from a baked-in path regex.
|
|
11
|
+
//
|
|
12
|
+
// Per-project facts come from a `coverage.config.json` (or `.coverage.config.json`)
|
|
13
|
+
// at the repo root, under a `mockPolicy` key. The config only *declares topology*
|
|
14
|
+
// (a monorepo's own package scope, generated dirs to exempt) — it does NOT gate
|
|
15
|
+
// whether the rule runs. Over-mock is ZERO-TOLERANCE: the gate is default-on and
|
|
16
|
+
// works with zero config on a conventional `@/`-aliased repo. There is no
|
|
17
|
+
// `enabled:false` off switch and no inline waiver.
|
|
18
|
+
|
|
19
|
+
import fs from 'node:fs'
|
|
20
|
+
import path from 'node:path'
|
|
21
|
+
|
|
22
|
+
/** Generic defaults — safe for any repo; tune topology via coverage.config.json. */
|
|
23
|
+
export const DEFAULT_MOCK_POLICY = {
|
|
24
|
+
// Default-ON. Zero-tolerance: a project cannot turn the over-mock gate off via
|
|
25
|
+
// config; `enabled` is retained only so a config that sets it is accepted, but
|
|
26
|
+
// the rule is default-on (defaultOn:true) regardless. There is no opt-out.
|
|
27
|
+
enabled: true,
|
|
28
|
+
// Import-specifier prefixes that denote first-party app source. `@/` and `~/`
|
|
29
|
+
// are near-universal TS path aliases for "this app's src".
|
|
30
|
+
firstPartyAliasPrefixes: ['@/', '~/'],
|
|
31
|
+
// Bare package names (exact or prefix) that are actually first-party workspace
|
|
32
|
+
// packages — e.g. a monorepo's own scope `@acme/`. Declared per project.
|
|
33
|
+
firstPartyPackages: [],
|
|
34
|
+
// Regex sources (strings) for specifiers that ARE legitimately external and so
|
|
35
|
+
// exempt — third-party APIs/SDKs a project wants to name explicitly. Bare npm
|
|
36
|
+
// packages are already treated as external by default; this is for the rare
|
|
37
|
+
// case you must override (or to exempt a first-party-looking alias).
|
|
38
|
+
externals: [],
|
|
39
|
+
// Path segments that mark a relative import as a test util / fixture / mock,
|
|
40
|
+
// NOT an internal seam — mocking those is not over-mocking.
|
|
41
|
+
testUtilHints: [
|
|
42
|
+
'__mocks__', '__fixtures__', 'fixtures', 'mocks', 'helpers',
|
|
43
|
+
'test-utils', 'testing', 'support', 'stubs', 'factories',
|
|
44
|
+
],
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Compile externals regex sources once and attach them as a genuinely
|
|
49
|
+
* non-enumerable cache, so the compiled RegExp[] never leaks into a
|
|
50
|
+
* `JSON.stringify(policy)` (where it would serialize to a useless `{}`) or a
|
|
51
|
+
* `deepEqual` over the policy's declared fields.
|
|
52
|
+
*/
|
|
53
|
+
function compile(policy) {
|
|
54
|
+
const externalsRe = (policy.externals || []).map((src) => {
|
|
55
|
+
try { return new RegExp(src) } catch { return null }
|
|
56
|
+
}).filter(Boolean)
|
|
57
|
+
const compiled = { ...policy }
|
|
58
|
+
Object.defineProperty(compiled, '_externalsRe', { value: externalsRe, enumerable: false })
|
|
59
|
+
return compiled
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Merge a project's `mockPolicy` over the defaults and compile it. Pure given
|
|
64
|
+
* the override object (no fs); use loadMockPolicy() to read from disk.
|
|
65
|
+
*/
|
|
66
|
+
export function resolveMockPolicy(override = {}) {
|
|
67
|
+
const merged = {
|
|
68
|
+
...DEFAULT_MOCK_POLICY,
|
|
69
|
+
...override,
|
|
70
|
+
// arrays replace wholesale when provided, else inherit the default
|
|
71
|
+
firstPartyAliasPrefixes: override.firstPartyAliasPrefixes ?? DEFAULT_MOCK_POLICY.firstPartyAliasPrefixes,
|
|
72
|
+
firstPartyPackages: override.firstPartyPackages ?? DEFAULT_MOCK_POLICY.firstPartyPackages,
|
|
73
|
+
externals: override.externals ?? DEFAULT_MOCK_POLICY.externals,
|
|
74
|
+
testUtilHints: override.testUtilHints ?? DEFAULT_MOCK_POLICY.testUtilHints,
|
|
75
|
+
}
|
|
76
|
+
return compile(merged)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Non-fatal warning sink (stderr). Kept here so both loaders warn identically. */
|
|
80
|
+
function warn(msg) {
|
|
81
|
+
process.stderr.write(`lint-tests: ${msg}\n`)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Read+resolve `mockPolicy` from one config file. Returns the resolved policy,
|
|
86
|
+
* or `null` when the file does not exist (so the dir-search can fall through).
|
|
87
|
+
* A *malformed* file resolves to defaults AND warns — a silent fallback would let
|
|
88
|
+
* a typo'd config that meant `enabled:true` masquerade as a clean run (finding #2).
|
|
89
|
+
*/
|
|
90
|
+
function readConfigFile(p) {
|
|
91
|
+
if (!fs.existsSync(p)) return null
|
|
92
|
+
try {
|
|
93
|
+
const cfg = JSON.parse(fs.readFileSync(p, 'utf8'))
|
|
94
|
+
return resolveMockPolicy(cfg.mockPolicy ?? {})
|
|
95
|
+
} catch (e) {
|
|
96
|
+
warn(`ignoring malformed ${p} (${e.message}); mock-policy running on defaults`)
|
|
97
|
+
return resolveMockPolicy({})
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Discover `coverage.config.json` / `.coverage.config.json` in rootDir and resolve
|
|
103
|
+
* its `mockPolicy`. Returns the compiled default policy when absent/unparsable
|
|
104
|
+
* (never throws — a missing config must not break the gate).
|
|
105
|
+
*/
|
|
106
|
+
export function loadMockPolicy(rootDir = process.cwd()) {
|
|
107
|
+
for (const name of ['coverage.config.json', '.coverage.config.json']) {
|
|
108
|
+
const got = readConfigFile(path.join(rootDir, name))
|
|
109
|
+
if (got) return got
|
|
110
|
+
}
|
|
111
|
+
return resolveMockPolicy({})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Resolve the policy for an explicit `--config <file>`. Reads THAT file (finding
|
|
116
|
+
* #1: the old caller passed only its dirname, so a non-standard filename was
|
|
117
|
+
* silently discarded and the gate ran on defaults). Falls back to dir-discovery
|
|
118
|
+
* when no file is given, and WARNS (non-fatal) when the named file is missing —
|
|
119
|
+
* a declared config that doesn't apply must never look like a clean pass.
|
|
120
|
+
*/
|
|
121
|
+
export function loadMockPolicyFromFile(configFile, rootDir = process.cwd()) {
|
|
122
|
+
if (!configFile) return loadMockPolicy(rootDir)
|
|
123
|
+
const got = readConfigFile(configFile)
|
|
124
|
+
if (got) return got
|
|
125
|
+
warn(`--config ${configFile} not found; mock-policy running on defaults`)
|
|
126
|
+
return resolveMockPolicy({})
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Extract the mocked module specifier from a (comment-stripped) line of test
|
|
131
|
+
* code, or null. Covers the JS/TS module-mock front-ends: `vi.mock`/`vi.doMock`,
|
|
132
|
+
* `jest.mock`/`jest.doMock`, `vitest.mock`. Other ecosystems (e.g. Python
|
|
133
|
+
* `patch('a.b.c')`) are a future adapter — keep one matcher per ecosystem so the
|
|
134
|
+
* core classify logic stays shared. Returns the FIRST string argument only.
|
|
135
|
+
*/
|
|
136
|
+
export function extractMockTarget(codeLine) {
|
|
137
|
+
const m = /\b(?:vi|jest|vitest)\s*\.\s*(?:mock|doMock)\s*\(\s*(['"`])([^'"`]+)\1/.exec(codeLine || '')
|
|
138
|
+
return m ? m[2] : null
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Classify a mock target as an internal seam (a gap) or an allowed external.
|
|
143
|
+
* Decidable given the policy — no fs, no module resolution at runtime; the
|
|
144
|
+
* project's declared topology supplies the facts.
|
|
145
|
+
*
|
|
146
|
+
* Precedence: declared externals > stdlib > relative(util vs source) >
|
|
147
|
+
* first-party alias > first-party package > bare package (external default).
|
|
148
|
+
*/
|
|
149
|
+
export function classifyMockTarget(target, policy = DEFAULT_MOCK_POLICY) {
|
|
150
|
+
const p = policy._externalsRe ? policy : compile(policy)
|
|
151
|
+
if (!target) return { internal: false, reason: 'no target' }
|
|
152
|
+
|
|
153
|
+
for (const re of p._externalsRe) {
|
|
154
|
+
if (re.test(target)) return { internal: false, reason: 'declared external' }
|
|
155
|
+
}
|
|
156
|
+
if (target.startsWith('node:')) return { internal: false, reason: 'node builtin' }
|
|
157
|
+
|
|
158
|
+
if (target.startsWith('.')) {
|
|
159
|
+
const segs = target.split('/')
|
|
160
|
+
if (segs.some((s) => p.testUtilHints.includes(s))) {
|
|
161
|
+
return { internal: false, reason: 'relative test util/fixture/mock' }
|
|
162
|
+
}
|
|
163
|
+
return { internal: true, reason: 'relative import into first-party source' }
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
for (const pre of p.firstPartyAliasPrefixes) {
|
|
167
|
+
if (target.startsWith(pre)) return { internal: true, reason: `first-party alias "${pre}"` }
|
|
168
|
+
}
|
|
169
|
+
for (const fp of p.firstPartyPackages) {
|
|
170
|
+
const base = fp.endsWith('/') ? fp.slice(0, -1) : fp
|
|
171
|
+
if (target === base || target.startsWith(`${base}/`)) {
|
|
172
|
+
return { internal: true, reason: `first-party package "${fp}"` }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return { internal: false, reason: 'external package' }
|
|
176
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Tests for the mock-policy classifier (pure; one fs case via a temp dir).
|
|
2
|
+
import { test } from 'node:test'
|
|
3
|
+
import assert from 'node:assert/strict'
|
|
4
|
+
import fs from 'node:fs'
|
|
5
|
+
import os from 'node:os'
|
|
6
|
+
import path from 'node:path'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_MOCK_POLICY,
|
|
10
|
+
resolveMockPolicy,
|
|
11
|
+
loadMockPolicy,
|
|
12
|
+
loadMockPolicyFromFile,
|
|
13
|
+
extractMockTarget,
|
|
14
|
+
classifyMockTarget,
|
|
15
|
+
} from './mock-policy-config.mjs'
|
|
16
|
+
|
|
17
|
+
test('default policy is zero-tolerance: default-on, no waiver tag', () => {
|
|
18
|
+
assert.equal(DEFAULT_MOCK_POLICY.enabled, true)
|
|
19
|
+
// the inline-waiver escape hatch is gone
|
|
20
|
+
assert.equal(DEFAULT_MOCK_POLICY.waiverTag, undefined)
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
test('extractMockTarget pulls the specifier from vi/jest/vitest mock+doMock', () => {
|
|
24
|
+
assert.equal(extractMockTarget("vi." + "mock('@/lib/x')"), '@/lib/x')
|
|
25
|
+
assert.equal(extractMockTarget('jest.' + 'mock("pkg")'), 'pkg')
|
|
26
|
+
assert.equal(extractMockTarget('vi.' + 'doMock(`@/a/b`)'), '@/a/b')
|
|
27
|
+
assert.equal(extractMockTarget('vitest.' + 'mock("./rel")'), './rel')
|
|
28
|
+
assert.equal(extractMockTarget('const x = mockThing()'), null) // bare mock() is not a module mock
|
|
29
|
+
assert.equal(extractMockTarget('expect(x).toBe(1)'), null)
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
test('classify: first-party alias @/ and ~/ are internal seams (the incident case)', () => {
|
|
33
|
+
const p = resolveMockPolicy({})
|
|
34
|
+
assert.equal(classifyMockTarget('@/lib/org-allowlist-client', p).internal, true)
|
|
35
|
+
assert.equal(classifyMockTarget('~/services/cp', p).internal, true)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
test('classify: stdlib and third-party packages are external (exempt)', () => {
|
|
39
|
+
const p = resolveMockPolicy({})
|
|
40
|
+
assert.equal(classifyMockTarget('node:fs', p).internal, false)
|
|
41
|
+
assert.equal(classifyMockTarget('react', p).internal, false)
|
|
42
|
+
assert.equal(classifyMockTarget('@playwright/test', p).internal, false)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
test('classify: relative import into source is internal; into a test util/fixture is not', () => {
|
|
46
|
+
const p = resolveMockPolicy({})
|
|
47
|
+
assert.equal(classifyMockTarget('../services/payments', p).internal, true)
|
|
48
|
+
assert.equal(classifyMockTarget('./helpers/operator-session-store', p).internal, false)
|
|
49
|
+
assert.equal(classifyMockTarget('../__mocks__/cp', p).internal, false)
|
|
50
|
+
assert.equal(classifyMockTarget('../fixtures/data', p).internal, false)
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
test('classify: declared first-party workspace package is internal', () => {
|
|
54
|
+
const p = resolveMockPolicy({ firstPartyPackages: ['@acme/'] })
|
|
55
|
+
assert.equal(classifyMockTarget('@acme/db', p).internal, true)
|
|
56
|
+
assert.equal(classifyMockTarget('@acme', p).internal, true)
|
|
57
|
+
assert.equal(classifyMockTarget('@other/db', p).internal, false)
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
test('classify: declared externals allowlist exempts a first-party-looking target', () => {
|
|
61
|
+
const p = resolveMockPolicy({ externals: ['^@/generated/'] })
|
|
62
|
+
assert.equal(classifyMockTarget('@/generated/openapi', p).internal, false) // exempted
|
|
63
|
+
assert.equal(classifyMockTarget('@/lib/x', p).internal, true) // still flagged
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
test('compiled _externalsRe is non-enumerable: does not leak into JSON / enumeration', () => {
|
|
67
|
+
const p = resolveMockPolicy({ externals: ['^@/generated/'] })
|
|
68
|
+
// the compiled RegExp cache works...
|
|
69
|
+
assert.equal(classifyMockTarget('@/generated/openapi', p).internal, false)
|
|
70
|
+
// ...but is hidden from enumeration and serialization
|
|
71
|
+
assert.ok(!Object.keys(p).includes('_externalsRe'))
|
|
72
|
+
assert.equal(JSON.parse(JSON.stringify(p))._externalsRe, undefined)
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
test('loadMockPolicy reads coverage.config.json topology, defaults to on with no config', () => {
|
|
76
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mpc-'))
|
|
77
|
+
// no config → zero-tolerance default (on), conventional topology
|
|
78
|
+
assert.equal(loadMockPolicy(dir).enabled, true)
|
|
79
|
+
// with config → declared topology is merged in (config declares topology, not on/off)
|
|
80
|
+
fs.writeFileSync(
|
|
81
|
+
path.join(dir, 'coverage.config.json'),
|
|
82
|
+
JSON.stringify({ mockPolicy: { firstPartyPackages: ['@acme/'] } }),
|
|
83
|
+
)
|
|
84
|
+
const p = loadMockPolicy(dir)
|
|
85
|
+
assert.equal(p.enabled, true)
|
|
86
|
+
assert.deepEqual(p.firstPartyPackages, ['@acme/'])
|
|
87
|
+
// inherited default array still present
|
|
88
|
+
assert.ok(p.firstPartyAliasPrefixes.includes('@/'))
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
test('loadMockPolicy never throws on malformed config (and stays on)', () => {
|
|
92
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mpc-'))
|
|
93
|
+
fs.writeFileSync(path.join(dir, 'coverage.config.json'), '{ not json')
|
|
94
|
+
assert.equal(loadMockPolicy(dir).enabled, true)
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
test('loadMockPolicyFromFile reads the NAMED file (finding #1: not just its dirname)', () => {
|
|
98
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mpc-'))
|
|
99
|
+
const file = path.join(dir, 'team-coverage.json') // deliberately non-standard name
|
|
100
|
+
fs.writeFileSync(file, JSON.stringify({ mockPolicy: { enabled: true, externals: ['^@/generated/'] } }))
|
|
101
|
+
const p = loadMockPolicyFromFile(file)
|
|
102
|
+
assert.equal(p.enabled, true)
|
|
103
|
+
// the declared externals must actually apply (proof the file was read, not defaults)
|
|
104
|
+
assert.equal(classifyMockTarget('@/generated/openapi', p).internal, false)
|
|
105
|
+
assert.equal(classifyMockTarget('@/lib/auth', p).internal, true)
|
|
106
|
+
})
|
|
107
|
+
|
|
108
|
+
test('loadMockPolicyFromFile falls back to defaults when the named file is missing', () => {
|
|
109
|
+
// finding #1: a declared config that does not apply must not look like a clean pass.
|
|
110
|
+
// (It warns on stderr; here we assert the zero-tolerance default — gate stays ON.)
|
|
111
|
+
const p = loadMockPolicyFromFile(path.join(os.tmpdir(), 'definitely-absent-config-xyz.json'))
|
|
112
|
+
assert.equal(p.enabled, true)
|
|
113
|
+
})
|
|
114
|
+
|
|
115
|
+
test('loadMockPolicyFromFile with no argument discovers coverage.config.json in cwd', () => {
|
|
116
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'mpc-'))
|
|
117
|
+
fs.writeFileSync(path.join(dir, 'coverage.config.json'), JSON.stringify({ mockPolicy: { enabled: true } }))
|
|
118
|
+
assert.equal(loadMockPolicyFromFile(undefined, dir).enabled, true)
|
|
119
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ensure-coverage-ledger",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"description": "Reference validator + aggregator for the ensure-coverage Coverage Ledger convention.",
|
|
7
|
+
"bin": {
|
|
8
|
+
"coverage-ledger": "./coverage-ledger.mjs"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"aggregate": "node coverage-ledger.mjs aggregate",
|
|
12
|
+
"validate": "node coverage-ledger.mjs validate",
|
|
13
|
+
"report": "node coverage-ledger.mjs report",
|
|
14
|
+
"test": "node --test"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"js-yaml": "^4.2.0"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: golden-path
|
|
3
|
+
description: "Golden-path E2E: the short list of user journeys whose failure blocks a release, kept in a repo as one contract (golden-paths.json) with a generated GOLDEN_PATHS.md and a generated GitHub Actions workflow, and run against a local build or a deployed URL for an ALIVE/DEAD verdict. Use to set golden paths up in a repo ('init golden paths', 'add golden-path CI'), to migrate an older smoke.manifest.json or a hand-built smoke setup ('audit', 'migrate smoke'), to add, change, or remove a golden path, to ask 'is the build alive?' or run them before a PR or release, or when a change touches a flow listed in GOLDEN_PATHS.md. NOT for writing the Playwright specs themselves (e2e-test), deciding what a change must prove (ensure-coverage), or general workflow YAML (github-actions)."
|
|
4
|
+
dependencies:
|
|
5
|
+
- e2e-test
|
|
6
|
+
release-version: 0.36.0
|
|
7
|
+
---
|
|
8
|
+
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
|
+
# Golden path
|
|
10
|
+
|
|
11
|
+
Keep the few user journeys that must work before a release in one contract, and
|
|
12
|
+
generate everything else from it. A run drives those journeys against the real app
|
|
13
|
+
and returns one verdict: **ALIVE** (every selected path passed) or not.
|
|
14
|
+
|
|
15
|
+
## Find your task
|
|
16
|
+
|
|
17
|
+
| Task | Do |
|
|
18
|
+
|---|---|
|
|
19
|
+
| The repo already has `scripts/golden-paths/` | Compare `node <engine> version` with `<skill-base-dir>/scripts/golden-path.mjs version` first; refresh with init when they differ |
|
|
20
|
+
| Set up a repo that has nothing yet | [Init](#init-a-repo) |
|
|
21
|
+
| The repo has `smoke.manifest.json`, `@smoke` tags, or its own smoke scripts | [Audit and migrate](#audit-and-migrate) |
|
|
22
|
+
| Add, change, or remove a golden path | [Change the contract](#change-the-contract) |
|
|
23
|
+
| Run them: before a PR, after a deploy, or "is it alive?" | [Run and judge](#run-and-judge) |
|
|
24
|
+
| CI says generated files are out of date | `node <engine> init --write`, commit |
|
|
25
|
+
| A field, profile, or rule in the contract | [references/contract.md](references/contract.md) |
|
|
26
|
+
| Every command and flag | `node <engine> --help` |
|
|
27
|
+
| Migration details and what stays manual | [references/migration.md](references/migration.md) |
|
|
28
|
+
|
|
29
|
+
`<engine>` is `scripts/golden-paths/golden-path.mjs` inside the repo (in a monorepo,
|
|
30
|
+
inside the app directory), or `<skill-base-dir>/scripts/golden-path.mjs` before the
|
|
31
|
+
repo has a copy.
|
|
32
|
+
|
|
33
|
+
## The files
|
|
34
|
+
|
|
35
|
+
| File | Owner | Edit it? |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `golden-paths.json` | the contract: paths, profiles, setup, CI settings | yes, the only one |
|
|
38
|
+
| `GOLDEN_PATHS.md` | generated view for people | never |
|
|
39
|
+
| `.github/workflows/golden-paths.yml` (`golden-paths-<app>-<hash>.yml` for an app in a monorepo) | generated CI job | never |
|
|
40
|
+
| `scripts/golden-paths/golden-path.mjs`, `golden-path-core.mjs` | engine copied from this skill | never; refresh with init |
|
|
41
|
+
| `README.md` and `AGENTS.md` blocks between `golden-path` markers | generated pointers | never; surrounding content is yours |
|
|
42
|
+
|
|
43
|
+
## Rules
|
|
44
|
+
|
|
45
|
+
1. **A person decides which flows are golden.** Draft candidates; never promote one
|
|
46
|
+
on your own judgment. A flow the user names in the request is confirmed, and so
|
|
47
|
+
are paths carried over from an older smoke manifest (ask about trimming them).
|
|
48
|
+
Example: you find `/checkout` and `/settings`. Ask "does a broken checkout block
|
|
49
|
+
a release? does broken settings?" and add only what they confirm.
|
|
50
|
+
2. **Edit the contract, then regenerate.** Never edit a generated file; CI's `check`
|
|
51
|
+
step fails while they disagree.
|
|
52
|
+
Example: to change a path's display title, edit `title` (and
|
|
53
|
+
`documentation.title` when present) in `golden-paths.json`, run `init --write`,
|
|
54
|
+
and commit the contract and generated files together. Keep `id`, `journey`, and
|
|
55
|
+
`documentation.reference` unchanged for a display-only rename.
|
|
56
|
+
3. **A browser path points at a tagged spec; documentation does not drive it.** The
|
|
57
|
+
spec carries `@golden-path` and one `@covers <id>`; `e2e-test` owns the executable
|
|
58
|
+
steps and assertions. Optional `documentation` describes the journey for people.
|
|
59
|
+
`run` executes whole spec files, so one journey per file keeps a read-only run
|
|
60
|
+
from executing a writing journey beside it.
|
|
61
|
+
Example: `{ "surface": "browser", "journey": "sign-in" }` plus
|
|
62
|
+
`// @golden-path` and `// @covers sign-in` in `e2e/journeys/sign-in.spec.ts`.
|
|
63
|
+
4. **Only `fail` means the app is broken.** A path that could not be driven is
|
|
64
|
+
`cannot-run`; with no failure the verdict is CANNOT-RUN: fix the gate, never
|
|
65
|
+
skip the path. One `fail` makes the verdict DEAD whatever else could not run.
|
|
66
|
+
Example: the seed step lacked `DATABASE_URL`, so every path is `cannot-run`;
|
|
67
|
+
fix the env, rerun.
|
|
68
|
+
5. **Production never takes writes.** Profiles in `prod` are read-only and drop
|
|
69
|
+
every path with `mutates: true`, tenant or not.
|
|
70
|
+
Example: under `prod-preview`, `sign-up-verify` is skipped; under `dev-active`
|
|
71
|
+
it runs only with its `e2e-` tenant.
|
|
72
|
+
6. **Adding the workflow adds a check, not a required one.** Make it required in
|
|
73
|
+
the merge rules only when the user asks.
|
|
74
|
+
Example: after `init --write`, report "the Golden paths job now runs on PRs;
|
|
75
|
+
it is not required".
|
|
76
|
+
7. **A verdict judges one run.** `run` records the profile and target it observed;
|
|
77
|
+
`verdict` refuses results from another profile or target, and stamps the time it
|
|
78
|
+
was computed, not observed.
|
|
79
|
+
Example: after `run --profile pr-local`, `verdict --profile prod-preview` fails;
|
|
80
|
+
run `prod-preview` against the candidate URL first.
|
|
81
|
+
|
|
82
|
+
## Init a repo
|
|
83
|
+
|
|
84
|
+
1. From the repo root (or the app directory in a monorepo):
|
|
85
|
+
`node <skill-base-dir>/scripts/golden-path.mjs init` to preview, then `--write`.
|
|
86
|
+
It creates the contract with the five standard profiles and no paths, copies the
|
|
87
|
+
engine, writes `GOLDEN_PATHS.md`, pointers in the repo-root `README.md` and
|
|
88
|
+
`AGENTS.md` (and a `CLAUDE.md`
|
|
89
|
+
symlink when missing), and `.gitignore` entries for run output. It writes the
|
|
90
|
+
workflow only once the contract validates.
|
|
91
|
+
2. Fill `setup` ([contract.md](references/contract.md#setup)). Needed: `boot`,
|
|
92
|
+
`baseUrl`, and `healthPath`. Add the rest only when the app has it: `journeys`
|
|
93
|
+
for browser specs, `database`, `seed`, `env`, `secrets`. Init guesses `boot` and
|
|
94
|
+
`baseUrl` (default port 3000): check both against the README or start script.
|
|
95
|
+
Confirm `ci.queue` (init guesses `mergify` from `.mergify.yml`, else `none`). Keep
|
|
96
|
+
`dev-active` and the `prod-*` profiles only when the repo deploys there (a deploy
|
|
97
|
+
workflow or `cloudbuild.yaml`); otherwise drop them and say so. `check` fails until
|
|
98
|
+
the first path is added; that is expected.
|
|
99
|
+
3. Draft candidate paths, strongest source first: the repo's critical E2E journeys,
|
|
100
|
+
the state changes of its core entities (sign up, pay, publish), the README and
|
|
101
|
+
routes, then `<engine> suggest --inventory <file>` when the repo has a surface
|
|
102
|
+
inventory (`ensure-coverage` generates `docs/tests/_generated/surface-inventory.json`).
|
|
103
|
+
Ask the user which ones block a release ([rule 1](#rules)).
|
|
104
|
+
4. Add the confirmed paths (tag the spec of each browser path), run
|
|
105
|
+
`<engine> validate`, then `init --write` again to generate the workflow. Deliver
|
|
106
|
+
the change, unless the user said not to commit.
|
|
107
|
+
|
|
108
|
+
The workflow appears only after step 4. When the user asked for CI but has not
|
|
109
|
+
confirmed any path, finish steps 1-3 and hand back with the candidates as a
|
|
110
|
+
question: "CI is ready to generate. Which of these block a release: `health`,
|
|
111
|
+
`place-order`, ...? I'll add them and generate the workflow."
|
|
112
|
+
|
|
113
|
+
## Audit and migrate
|
|
114
|
+
|
|
115
|
+
1. `node <skill-base-dir>/scripts/golden-path.mjs audit` from the repo root. It
|
|
116
|
+
lists legacy manifests, forked smoke scripts, workflows that run smoke by hand,
|
|
117
|
+
`@smoke` tags, and declared profiles nothing runs.
|
|
118
|
+
2. `audit --write` converts each `smoke.manifest.json` into `golden-paths.json`
|
|
119
|
+
beside it and runs init there. It keeps the old file unless you add
|
|
120
|
+
`--remove-legacy`.
|
|
121
|
+
3. Resolve every "needs a person" line, then `validate` and `init --write`.
|
|
122
|
+
Placeholders (`TODO: ...`) fail validation on purpose, so no workflow is
|
|
123
|
+
generated from a half-migrated contract.
|
|
124
|
+
4. Retire what the audit flagged: replace hand-built PR or queue smoke jobs with the
|
|
125
|
+
generated workflow, or, when the repo's runner cannot use it (self-hosted, no
|
|
126
|
+
Docker or sudo, sharded lanes), set `ci.enabled` to `false` and point the existing
|
|
127
|
+
job at `<engine> run` and `verdict` (`--paths` for a shard). Point deploy-time smoke
|
|
128
|
+
steps at `run` and `verdict` with the deployed profile. Details: [migration.md](references/migration.md).
|
|
129
|
+
|
|
130
|
+
## Change the contract
|
|
131
|
+
|
|
132
|
+
- **Add a path:** confirm it blocks a release, add it with a `title` under 80
|
|
133
|
+
characters, the profiles it must pass in, and `mutates`. Tag its spec for a
|
|
134
|
+
browser path; give an api path `expect: { status, bodyIncludes?, json? }` and a
|
|
135
|
+
cli path `expect: { exitCode, stdoutIncludes? }`.
|
|
136
|
+
- **A path that writes data:** set `mutates: true`, a `tenant`, and `cleanup`. The
|
|
137
|
+
tenant is only a label: send it yourself in `request.headers` or `request.body`
|
|
138
|
+
the way the app scopes test data, or the path writes untagged live data. The one
|
|
139
|
+
exception: a path declared only in local profiles, whose writes land in a store
|
|
140
|
+
thrown away after the run, may stay `mutates: false`; `validate` rejects a
|
|
141
|
+
writing request marked so in any dev or prod profile. When the app cannot delete
|
|
142
|
+
what the path writes, keep it local and ask before adding `dev-active`.
|
|
143
|
+
- **A migration or seed command:** put it in `setup.seed` when the app needs it
|
|
144
|
+
before boot; make it a cli path too only when its success is release-blocking.
|
|
145
|
+
- New api and cli paths need no workflow change: the workflow runs whatever the
|
|
146
|
+
contract selects. Only `GOLDEN_PATHS.md` changes.
|
|
147
|
+
- **Remove or rename an executable id:** change the contract and the spec tag together;
|
|
148
|
+
`validate` fails on a tag with no path and on a path with no tag. Display-title
|
|
149
|
+
changes alone do not rename an executable id or a documentation reference.
|
|
150
|
+
- **Document a path:** add optional `documentation` for a localized title, group,
|
|
151
|
+
precondition, action/expected steps, and optional route/outcome summary
|
|
152
|
+
([fields and example](references/contract.md#documentation)). Use `→` between
|
|
153
|
+
route stops and pair English/Chinese copy when supplying Chinese. A summary
|
|
154
|
+
stays visible above closed full steps and verification; without a summary the
|
|
155
|
+
path stays expanded. The view groups browser journeys separately from the
|
|
156
|
+
service-check appendix; an entirely undocumented contract keeps its legacy table.
|
|
157
|
+
- **Keep human references stable:** optionally set `documentation.reference`, such
|
|
158
|
+
as `GP-IDENTITY-LOGIN`, unique across the contract and matching
|
|
159
|
+
`GP-[A-Z0-9]+(?:-[A-Z0-9]+)*`. Never infer it from position, category, or title;
|
|
160
|
+
preserve it when inserting, reordering, regrouping, or renaming display titles.
|
|
161
|
+
Documented headings and Contents fall back to `id`, never a positional number,
|
|
162
|
+
when the reference is absent. Executable identity remains `id`; links remain
|
|
163
|
+
`#golden-path-${id}`.
|
|
164
|
+
- Then `<engine> validate` and `<engine> init --write`; commit the contract and the
|
|
165
|
+
regenerated files in one commit.
|
|
166
|
+
- Refresh an old engine copy: run init with this skill's copy
|
|
167
|
+
(`<skill-base-dir>/scripts/golden-path.mjs init --write`). The copy is stale when
|
|
168
|
+
`<engine> version` differs from `<skill-base-dir>/scripts/golden-path.mjs version`
|
|
169
|
+
(the version carries a hash of the engine files, so any change shows).
|
|
170
|
+
|
|
171
|
+
## Run and judge
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
node <engine> run --profile pr-local --boot # runs setup.seed, starts setup.boot, waits, runs, stops it
|
|
175
|
+
node <engine> run --profile prod-preview --target <url> --expect-sha <sha>
|
|
176
|
+
node <engine> verdict --profile <same profile> [--target <url>]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Prefer `--boot` for local runs: it stops exactly the process group it started.
|
|
180
|
+
Install dependencies first; `--boot` does not run `setup.install` or `setup.build`.
|
|
181
|
+
`verdict` prints the report below, ready to paste.
|
|
182
|
+
If the app is already running, drop `--boot`; never stop servers by name
|
|
183
|
+
(`pkill node`), which kills unrelated work.
|
|
184
|
+
|
|
185
|
+
`run` drives api paths over HTTP (never leaving the target's origin), cli paths in a
|
|
186
|
+
shell, and browser paths through their tagged specs with the repo's Playwright, then
|
|
187
|
+
writes `golden-path-results.json`. `run` exits 0 whatever the paths did; `verdict`
|
|
188
|
+
is the gate, so a CI step needs both. A local profile only drives a loopback
|
|
189
|
+
address and a deployed one only https; a profile's `forbidEnv` refuses a run while
|
|
190
|
+
those variables are set. A skipped test, an expected failure (`test.fail`),
|
|
191
|
+
or a Playwright run that broke outside the tests is never a pass. `verdict` writes `golden-path-verdict.json` and exits 0
|
|
192
|
+
only on ALIVE. Verdicts: ALIVE, DEAD (a path failed), CANNOT-RUN (the gate could not
|
|
193
|
+
observe a path), EMPTY (the profile selected nothing).
|
|
194
|
+
|
|
195
|
+
Check `observedAt`, not `generatedAt`, against the release's freshness policy:
|
|
196
|
+
recomputing a verdict cannot refresh an old run or prove a new candidate build.
|
|
197
|
+
When fresh evidence is required, rerun the intended profile and target. Successful
|
|
198
|
+
`validate` or `check` proves the contract and generated files are current, not
|
|
199
|
+
that the app is ALIVE.
|
|
200
|
+
|
|
201
|
+
Report in this shape:
|
|
202
|
+
|
|
203
|
+
```
|
|
204
|
+
Golden paths: ALIVE | DEAD | CANNOT-RUN | EMPTY (profile <name>, target <url or local>)
|
|
205
|
+
- pass health
|
|
206
|
+
- fail sign-in: journey failed: e2e/journeys/sign-in.spec.ts
|
|
207
|
+
Findings: anything surprising, even on ALIVE.
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Callers
|
|
211
|
+
|
|
212
|
+
- **Before a PR:** the implementer runs the local profile against the booted build;
|
|
213
|
+
a new release-blocking flow owes a contract entry.
|
|
214
|
+
- **Review:** a missing contract entry for a new release-blocking flow is a finding;
|
|
215
|
+
a gate that cannot run is CANNOT-RUN, never a finding against the diff.
|
|
216
|
+
- **CI:** the generated workflow runs `pr-local` on pull requests and `queue-local`
|
|
217
|
+
in the merge queue.
|
|
218
|
+
- **Deploys and releases:** `dev-active` after a dev deploy; `prod-preview` against
|
|
219
|
+
the 0%-traffic candidate before promotion and `prod-active` after it. Promote only
|
|
220
|
+
on ALIVE.
|
|
221
|
+
|
|
222
|
+
## Reference map
|
|
223
|
+
|
|
224
|
+
| Need | Read |
|
|
225
|
+
|---|---|
|
|
226
|
+
| Every field, the profiles, setup, expect, CI settings | [references/contract.md](references/contract.md) |
|
|
227
|
+
| Audit findings, migration steps, what stays manual | [references/migration.md](references/migration.md) |
|
|
228
|
+
| A full example contract | [assets/golden-paths.example.json](assets/golden-paths.example.json) |
|
|
229
|
+
| Writing or fixing the tagged browser spec | `e2e-test` |
|
|
230
|
+
| Booting the app locally | the `run` skill |
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "EXAMPLE ONLY, for one consumer auth product. Your golden paths are the flows whose failure blocks YOUR release (a payments app: checkout, pay, receipt). Adapt it, then delete this comment. See references/contract.md.",
|
|
3
|
+
"version": 3,
|
|
4
|
+
"profiles": {
|
|
5
|
+
"pr-local": { "gate": "pull-request", "environment": "local", "endpoint": "local", "prerequisites": ["boot", "seed"], "mutationPolicy": "isolated-writes" },
|
|
6
|
+
"queue-local": { "gate": "merge-queue", "environment": "local", "endpoint": "local", "prerequisites": ["boot", "seed"], "mutationPolicy": "isolated-writes" },
|
|
7
|
+
"dev-active": { "gate": "trunk-integration", "environment": "dev", "endpoint": "active", "prerequisites": ["deployed-revision"], "mutationPolicy": "synthetic-tenant" },
|
|
8
|
+
"prod-preview": { "gate": "pre-promotion", "environment": "prod", "endpoint": "preview", "prerequisites": ["candidate-revision-at-0pct"], "mutationPolicy": "read-only" },
|
|
9
|
+
"prod-active": { "gate": "post-promotion", "environment": "prod", "endpoint": "active", "prerequisites": ["live-service-at-100pct"], "mutationPolicy": "read-only" }
|
|
10
|
+
},
|
|
11
|
+
"setup": {
|
|
12
|
+
"install": "pnpm install --frozen-lockfile",
|
|
13
|
+
"build": "pnpm build",
|
|
14
|
+
"seed": "pnpm db:migrate && pnpm db:seed:e2e",
|
|
15
|
+
"boot": "pnpm start --port 3000",
|
|
16
|
+
"baseUrl": "http://127.0.0.1:3000",
|
|
17
|
+
"healthPath": "/api/health",
|
|
18
|
+
"journeys": "e2e/journeys",
|
|
19
|
+
"database": { "engine": "postgres", "version": "17", "urlEnv": "DATABASE_URL" },
|
|
20
|
+
"env": { "E2E_AUTH_BYPASS": "1" },
|
|
21
|
+
"secrets": { "generate": ["AUTH_SECRET"], "fromCi": [] },
|
|
22
|
+
"attestation": { "path": "/api/version", "field": "sha" },
|
|
23
|
+
"authBypass": "E2E_AUTH_BYPASS=1, read by e2e/fixtures/auth.ts",
|
|
24
|
+
"tenants": ["e2e-synthetic"]
|
|
25
|
+
},
|
|
26
|
+
"ci": { "queue": "mergify", "packageManager": "pnpm", "node": "22", "timeoutMinutes": 15 },
|
|
27
|
+
"paths": [
|
|
28
|
+
{
|
|
29
|
+
"id": "health",
|
|
30
|
+
"title": "The app is serving",
|
|
31
|
+
"surface": "api",
|
|
32
|
+
"start": "GET /api/health",
|
|
33
|
+
"expect": { "status": 200, "json": { "status": "ok" } },
|
|
34
|
+
"observable": "200 with body { status: \"ok\" }",
|
|
35
|
+
"mutates": false,
|
|
36
|
+
"profiles": ["pr-local", "queue-local", "dev-active", "prod-preview", "prod-active"]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "sign-in",
|
|
40
|
+
"title": "A returning user signs in and lands on the dashboard",
|
|
41
|
+
"surface": "browser",
|
|
42
|
+
"journey": "sign-in",
|
|
43
|
+
"mutates": false,
|
|
44
|
+
"profiles": ["pr-local", "queue-local", "dev-active", "prod-preview", "prod-active"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "sign-up-verify",
|
|
48
|
+
"title": "A new user signs up, verifies by code, and is signed in",
|
|
49
|
+
"surface": "browser",
|
|
50
|
+
"journey": "sign-up-verify",
|
|
51
|
+
"mutates": true,
|
|
52
|
+
"tenant": "e2e-synthetic",
|
|
53
|
+
"cleanup": "users under the e2e-synthetic tenant are deleted after each run",
|
|
54
|
+
"profiles": ["pr-local", "queue-local", "dev-active"]
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
}
|