create-yss-spec 3.5.2 → 3.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/template/asset-runtime.js +3 -1
- package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
- package/template/.agents/skills/codebase-design/SKILL.md +4 -0
- package/template/{.codex/skills/improve-codebase-architecture/SKILL.md → .agents/skills/codebase-design/references/architecture-audit.md} +3 -9
- package/template/.agents/skills/frontend-commit/SKILL.md +4 -93
- package/template/.agents/skills/git-commit-core/SKILL.md +18 -0
- package/template/.agents/skills/java-backend-commit/SKILL.md +4 -96
- package/template/.agents/skills/llm-wiki/SKILL.md +12 -13
- package/template/.agents/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
- package/template/.agents/skills/llm-wiki/references/compile.md +21 -114
- package/template/.agents/skills/llm-wiki/references/ingest.md +8 -33
- package/template/.agents/skills/llm-wiki/references/lint.md +9 -46
- package/template/.agents/skills/llm-wiki/references/query.md +9 -18
- package/template/.agents/skills/llm-wiki/references/schema.md +56 -29
- package/template/.agents/skills/llm-wiki/references/transactions.md +48 -0
- package/template/.agents/skills/llm-wiki/references/writing.md +4 -4
- package/template/.agents/skills/llm-wiki/scripts/advise.mjs +46 -58
- package/template/.agents/skills/llm-wiki/scripts/advise.test.mjs +11 -16
- package/template/.agents/skills/llm-wiki/scripts/core.mjs +262 -0
- package/template/.agents/skills/llm-wiki/scripts/extract.mjs +35 -18
- package/template/.agents/skills/llm-wiki/scripts/extract.test.mjs +5 -8
- package/template/.agents/skills/llm-wiki/scripts/feedback.mjs +51 -0
- package/template/.agents/skills/llm-wiki/scripts/inventory.mjs +43 -171
- package/template/.agents/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
- package/template/.agents/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
- package/template/.agents/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
- package/template/.agents/skills/llm-wiki/scripts/migrate.mjs +51 -0
- package/template/.agents/skills/llm-wiki/scripts/query.mjs +149 -0
- package/template/.agents/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
- package/template/.agents/skills/llm-wiki/scripts/sources.mjs +166 -0
- package/template/.agents/skills/llm-wiki/scripts/transaction.mjs +384 -0
- package/template/.agents/skills/llm-wiki/scripts/v2.test.mjs +354 -0
- package/template/.agents/skills/prototype/LOGIC.md +1 -1
- package/template/.agents/skills/prototype/SKILL.md +5 -19
- package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +3 -3
- package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
- package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
- package/template/.agents/skills/yss-product-lifecycle/SKILL.md +8 -8
- package/template/.agents/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
- package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
- package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.agents/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
- package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.agents/skills/yss-research/SKILL.md +4 -0
- package/template/.codex/skills/codebase-design/SKILL.md +4 -0
- package/template/{.pi/skills/improve-codebase-architecture/SKILL.md → .codex/skills/codebase-design/references/architecture-audit.md} +3 -9
- package/template/.codex/skills/frontend-commit/SKILL.md +4 -93
- package/template/.codex/skills/git-commit-core/SKILL.md +18 -0
- package/template/.codex/skills/java-backend-commit/SKILL.md +4 -96
- package/template/.codex/skills/llm-wiki/SKILL.md +12 -13
- package/template/.codex/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
- package/template/.codex/skills/llm-wiki/references/compile.md +21 -114
- package/template/.codex/skills/llm-wiki/references/ingest.md +8 -33
- package/template/.codex/skills/llm-wiki/references/lint.md +9 -46
- package/template/.codex/skills/llm-wiki/references/query.md +9 -18
- package/template/.codex/skills/llm-wiki/references/schema.md +56 -29
- package/template/.codex/skills/llm-wiki/references/transactions.md +48 -0
- package/template/.codex/skills/llm-wiki/references/writing.md +4 -4
- package/template/.codex/skills/llm-wiki/scripts/advise.mjs +46 -58
- package/template/.codex/skills/llm-wiki/scripts/advise.test.mjs +11 -16
- package/template/.codex/skills/llm-wiki/scripts/core.mjs +262 -0
- package/template/.codex/skills/llm-wiki/scripts/extract.mjs +35 -18
- package/template/.codex/skills/llm-wiki/scripts/extract.test.mjs +5 -8
- package/template/.codex/skills/llm-wiki/scripts/feedback.mjs +51 -0
- package/template/.codex/skills/llm-wiki/scripts/inventory.mjs +43 -171
- package/template/.codex/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
- package/template/.codex/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
- package/template/.codex/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
- package/template/.codex/skills/llm-wiki/scripts/migrate.mjs +51 -0
- package/template/.codex/skills/llm-wiki/scripts/query.mjs +149 -0
- package/template/.codex/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
- package/template/.codex/skills/llm-wiki/scripts/sources.mjs +166 -0
- package/template/.codex/skills/llm-wiki/scripts/transaction.mjs +384 -0
- package/template/.codex/skills/llm-wiki/scripts/v2.test.mjs +354 -0
- package/template/.codex/skills/prototype/LOGIC.md +1 -1
- package/template/.codex/skills/prototype/SKILL.md +5 -19
- package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +3 -3
- package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
- package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
- package/template/.codex/skills/yss-product-lifecycle/SKILL.md +8 -8
- package/template/.codex/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
- package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
- package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.codex/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
- package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.codex/skills/yss-research/SKILL.md +4 -0
- package/template/.cursor/skills/codebase-design/SKILL.md +4 -0
- package/template/.cursor/skills/{improve-codebase-architecture/SKILL.md → codebase-design/references/architecture-audit.md} +3 -9
- package/template/.cursor/skills/frontend-commit/SKILL.md +4 -93
- package/template/.cursor/skills/git-commit-core/SKILL.md +18 -0
- package/template/.cursor/skills/java-backend-commit/SKILL.md +4 -96
- package/template/.cursor/skills/llm-wiki/SKILL.md +12 -13
- package/template/.cursor/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
- package/template/.cursor/skills/llm-wiki/references/compile.md +21 -114
- package/template/.cursor/skills/llm-wiki/references/ingest.md +8 -33
- package/template/.cursor/skills/llm-wiki/references/lint.md +9 -46
- package/template/.cursor/skills/llm-wiki/references/query.md +9 -18
- package/template/.cursor/skills/llm-wiki/references/schema.md +56 -29
- package/template/.cursor/skills/llm-wiki/references/transactions.md +48 -0
- package/template/.cursor/skills/llm-wiki/references/writing.md +4 -4
- package/template/.cursor/skills/llm-wiki/scripts/advise.mjs +46 -58
- package/template/.cursor/skills/llm-wiki/scripts/advise.test.mjs +11 -16
- package/template/.cursor/skills/llm-wiki/scripts/core.mjs +262 -0
- package/template/.cursor/skills/llm-wiki/scripts/extract.mjs +35 -18
- package/template/.cursor/skills/llm-wiki/scripts/extract.test.mjs +5 -8
- package/template/.cursor/skills/llm-wiki/scripts/feedback.mjs +51 -0
- package/template/.cursor/skills/llm-wiki/scripts/inventory.mjs +43 -171
- package/template/.cursor/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
- package/template/.cursor/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
- package/template/.cursor/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
- package/template/.cursor/skills/llm-wiki/scripts/migrate.mjs +51 -0
- package/template/.cursor/skills/llm-wiki/scripts/query.mjs +149 -0
- package/template/.cursor/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
- package/template/.cursor/skills/llm-wiki/scripts/sources.mjs +166 -0
- package/template/.cursor/skills/llm-wiki/scripts/transaction.mjs +384 -0
- package/template/.cursor/skills/llm-wiki/scripts/v2.test.mjs +354 -0
- package/template/.cursor/skills/prototype/LOGIC.md +1 -1
- package/template/.cursor/skills/prototype/SKILL.md +5 -19
- package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +3 -3
- package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
- package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
- package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +8 -8
- package/template/.cursor/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
- package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.cursor/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
- package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.cursor/skills/yss-research/SKILL.md +4 -0
- package/template/.pi/skills/codebase-design/SKILL.md +4 -0
- package/template/{.agents/skills/improve-codebase-architecture/SKILL.md → .pi/skills/codebase-design/references/architecture-audit.md} +3 -9
- package/template/.pi/skills/frontend-commit/SKILL.md +4 -93
- package/template/.pi/skills/git-commit-core/SKILL.md +18 -0
- package/template/.pi/skills/java-backend-commit/SKILL.md +4 -96
- package/template/.pi/skills/llm-wiki/SKILL.md +12 -13
- package/template/.pi/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
- package/template/.pi/skills/llm-wiki/references/compile.md +21 -114
- package/template/.pi/skills/llm-wiki/references/ingest.md +8 -33
- package/template/.pi/skills/llm-wiki/references/lint.md +9 -46
- package/template/.pi/skills/llm-wiki/references/query.md +9 -18
- package/template/.pi/skills/llm-wiki/references/schema.md +56 -29
- package/template/.pi/skills/llm-wiki/references/transactions.md +48 -0
- package/template/.pi/skills/llm-wiki/references/writing.md +4 -4
- package/template/.pi/skills/llm-wiki/scripts/advise.mjs +46 -58
- package/template/.pi/skills/llm-wiki/scripts/advise.test.mjs +11 -16
- package/template/.pi/skills/llm-wiki/scripts/core.mjs +262 -0
- package/template/.pi/skills/llm-wiki/scripts/extract.mjs +35 -18
- package/template/.pi/skills/llm-wiki/scripts/extract.test.mjs +5 -8
- package/template/.pi/skills/llm-wiki/scripts/feedback.mjs +51 -0
- package/template/.pi/skills/llm-wiki/scripts/inventory.mjs +43 -171
- package/template/.pi/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
- package/template/.pi/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
- package/template/.pi/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
- package/template/.pi/skills/llm-wiki/scripts/migrate.mjs +51 -0
- package/template/.pi/skills/llm-wiki/scripts/query.mjs +149 -0
- package/template/.pi/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
- package/template/.pi/skills/llm-wiki/scripts/sources.mjs +166 -0
- package/template/.pi/skills/llm-wiki/scripts/transaction.mjs +384 -0
- package/template/.pi/skills/llm-wiki/scripts/v2.test.mjs +354 -0
- package/template/.pi/skills/prototype/LOGIC.md +1 -1
- package/template/.pi/skills/prototype/SKILL.md +5 -19
- package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +3 -3
- package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
- package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
- package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
- package/template/.pi/skills/yss-product-lifecycle/SKILL.md +8 -8
- package/template/.pi/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
- package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
- package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
- package/template/.pi/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
- package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
- package/template/.pi/skills/yss-research/SKILL.md +4 -0
- package/template/.template-spec/agents/README.md +1 -1
- package/template/.template-spec/agents/digital-human-roles.yaml +1 -1
- package/template/.template-spec/agents/skill-migrations.md +15 -0
- package/template/.template-spec/agents/yss-skill-registry.yaml +10 -29
- package/template/.template-spec/architecture/README.md +3 -34
- package/template/.template-spec/plan/templates/competitive-analysis-template.md +2 -2
- package/template/.template-spec/process/contract-reading.md +24 -0
- package/template/.template-spec/process/lifecycle-registry-baseline.json +3 -1
- package/template/.template-spec/process/lifecycle-registry.yaml +6 -0
- package/template/.template-spec/process/research-completion.md +23 -0
- package/template/.template-spec/process/schemas/digital-human-task-package.schema.json +202 -12
- package/template/.template-spec/process/schemas/frontend-implementation-evidence.schema.json +7 -15
- package/template/.template-spec/process/subagent-collaboration.md +8 -0
- package/template/.template-spec/process/templates/frontend-implementation-verification-template.yaml +15 -1
- package/template/AGENTS.md +1 -1
- package/template/CONTEXT.md +5 -1
- package/template/README.md +12 -24
- package/template/scripts/contract +5 -5
- package/template/scripts/lib/contract-views.mjs +57 -2
- package/template/scripts/lib/execution-evidence.mjs +51 -0
- package/template/scripts/lib/harness-execution-scope.mjs +1 -1
- package/template/scripts/lib/implementation-contract-compiler.mjs +2 -0
- package/template/scripts/lib/lifecycle-context-query.mjs +15 -3
- package/template/scripts/lib/lifecycle-status.mjs +32 -6
- package/template/scripts/lib/lifecycle-transition.mjs +19 -1
- package/template/scripts/lib/maintenance-research.mjs +63 -0
- package/template/scripts/lib/read-only-intake.mjs +132 -0
- package/template/scripts/lib/skill-registry.mjs +2 -1
- package/template/scripts/lib/skill-supply-chain.mjs +4 -0
- package/template/scripts/lib/slice-task-package.mjs +1 -1
- package/template/scripts/lib/task-package.mjs +9 -2
- package/template/scripts/lifecycle-status +2 -2
- package/template/scripts/prepare-read-only-intake +16 -0
- package/template/scripts/run-read-only-intake +14 -0
- package/template/scripts/verify-digital-human-task-package +2 -2
- package/template/scripts/verify-frontend-implementation-evidence +24 -1
- package/template/scripts/verify-maintenance-research +13 -0
- package/template/skills-lock.json +19 -76
- package/template.manifest.json +118 -29
- package/template.snapshot.json +5 -6
- package/template/.agents/skills/grill-with-docs/SKILL.md +0 -20
- package/template/.agents/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/template/.agents/skills/prototype/UI.md +0 -112
- package/template/.agents/skills/setup-matt-pocock-skills/domain.md +0 -37
- package/template/.agents/skills/to-questionnaire/SKILL.md +0 -55
- package/template/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/template/.agents/skills/wait-what/SKILL.md +0 -7
- package/template/.agents/skills/wait-what/agents/openai.yaml +0 -5
- package/template/.codex/skills/data-analytics/.app.json +0 -84
- package/template/.codex/skills/data-analytics/.codex-plugin/plugin.json +0 -66
- package/template/.codex/skills/data-analytics/.mcp.json +0 -30
- package/template/.codex/skills/data-analytics/AGENTS.md +0 -20
- package/template/.codex/skills/data-analytics/DEPENDENCIES.MD +0 -27
- package/template/.codex/skills/data-analytics/README.md +0 -60
- package/template/.codex/skills/data-analytics/__yss_dotfile__.gitignore +0 -2
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html +0 -16
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part001 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part002 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part003 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part004 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part005 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part006 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html +0 -16
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part001 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part002 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part003 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part004 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part005 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part006 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part007 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-small.svg +0 -5
- package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html +0 -16
- package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part001 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part002 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part003 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part004 +0 -1
- package/template/.codex/skills/data-analytics/assets/datascience.png +0 -0
- package/template/.codex/skills/data-analytics/assets/datascience.svg +0 -10
- package/template/.codex/skills/data-analytics/mcp/server.cjs +0 -2964
- package/template/.codex/skills/data-analytics/package-lock.json +0 -3048
- package/template/.codex/skills/data-analytics/package.json +0 -43
- package/template/.codex/skills/data-analytics/scripts/normalize-widget-assets.mjs +0 -75
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +0 -137
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +0 -29
- package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +0 -148
- package/template/.codex/skills/data-analytics/skills/build-dashboard/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/bi-platform-dashboard.md +0 -18
- package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/html-dashboard.md +0 -24
- package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/mcp-artifact-dashboard.md +0 -71
- package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/streamlit-dashboard.md +0 -85
- package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +0 -207
- package/template/.codex/skills/data-analytics/skills/build-report/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/build-report/assets/executive-report-shell.html +0 -70
- package/template/.codex/skills/data-analytics/skills/build-report/assets/technical-report-shell.html +0 -66
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +0 -108
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/__init__.py +0 -1
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +0 -52
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/constants.py +0 -61
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/docx_writer.py +0 -362
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/html_parser.py +0 -829
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/model.py +0 -30
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +0 -127
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/quality.py +0 -374
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/rendering.py +0 -613
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/table_utils.py +0 -54
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/utils.py +0 -16
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc_plan.py +0 -9
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +0 -45
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +0 -77
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/scripts/report_to_google_slides.py +0 -2379
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +0 -88
- package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/build-report/specifications/executive-report.md +0 -97
- package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +0 -59
- package/template/.codex/skills/data-analytics/skills/build-report/specifications/technical-report.md +0 -75
- package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +0 -103
- package/template/.codex/skills/data-analytics/skills/design-kpis/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +0 -68
- package/template/.codex/skills/data-analytics/skills/gather-business-context/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/index/SKILL.md +0 -251
- package/template/.codex/skills/data-analytics/skills/index/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +0 -131
- package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +0 -141
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/kpi-reporting/references/report-templates.md +0 -32
- package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +0 -106
- package/template/.codex/skills/data-analytics/skills/market-sizing/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +0 -130
- package/template/.codex/skills/data-analytics/skills/metric-diagnostics/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +0 -141
- package/template/.codex/skills/data-analytics/skills/product-business-analysis/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +0 -178
- package/template/.codex/skills/data-analytics/skills/spreadsheets/agents/openai.yaml +0 -9
- package/template/.codex/skills/data-analytics/skills/spreadsheets/assets/file-spreadsheet.png +0 -0
- package/template/.codex/skills/data-analytics/skills/spreadsheets/charts.md +0 -31
- package/template/.codex/skills/data-analytics/skills/spreadsheets/references/artifact_tool_api.md +0 -466
- package/template/.codex/skills/data-analytics/skills/spreadsheets/style_guidelines.md +0 -99
- package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +0 -197
- package/template/.codex/skills/data-analytics/skills/user-context/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +0 -26
- package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/source-category-config.json +0 -51
- package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/user-context-config.md +0 -66
- package/template/.codex/skills/data-analytics/skills/user-context/references/automation.md +0 -69
- package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +0 -204
- package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-state-template.json +0 -87
- package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +0 -497
- package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/connector-playbook.md +0 -74
- package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/setup.md +0 -65
- package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/skill-template.md +0 -160
- package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/source-intake.md +0 -75
- package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/weekly-polling-automation.md +0 -96
- package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +0 -263
- package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +0 -1462
- package/template/.codex/skills/data-analytics/skills/user-context/scripts/init_user_context_state.py +0 -128
- package/template/.codex/skills/data-analytics/skills/user-context/scripts/reset_user_context_state.py +0 -101
- package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +0 -499
- package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +0 -978
- package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +0 -126
- package/template/.codex/skills/data-analytics/skills/validate-data/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +0 -70
- package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +0 -157
- package/template/.codex/skills/data-analytics/skills/visualize-data/agents/openai.yaml +0 -6
- package/template/.codex/skills/data-analytics/skills/visualize-data/references/seaborn-templates.md +0 -774
- package/template/.codex/skills/data-analytics/src/DESIGN.md +0 -222
- package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +0 -3666
- package/template/.codex/skills/data-analytics/src/analytics-app/analytics-layout.test.mjs +0 -136
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartFrame.tsx +0 -54
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartLegend.tsx +0 -96
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartRenderer.tsx +0 -1647
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartTooltip.tsx +0 -245
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-app-helpers.tsx +0 -462
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-capabilities.ts +0 -107
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-compatibility.ts +0 -164
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-contract.ts +0 -192
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-theme.ts +0 -203
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-tokens.css +0 -619
- package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-transforms.ts +0 -402
- package/template/.codex/skills/data-analytics/src/analytics-app/fonts/SystemSansVariableVF.woff2 +0 -0
- package/template/.codex/skills/data-analytics/src/analytics-app/imageExport.ts +0 -370
- package/template/.codex/skills/data-analytics/src/analytics-app/layout/AnalyticsLayoutCanvas.tsx +0 -536
- package/template/.codex/skills/data-analytics/src/analytics-app/layout/RichMarkdown.tsx +0 -681
- package/template/.codex/skills/data-analytics/src/analytics-app/layout/analyticsLayoutCore.ts +0 -164
- package/template/.codex/skills/data-analytics/src/analytics-app/main.tsx +0 -21
- package/template/.codex/skills/data-analytics/src/analytics-app/scripts/chart_contract.py +0 -472
- package/template/.codex/skills/data-analytics/src/analytics-app/scripts/check_analytics_app_runtime_links.py +0 -75
- package/template/.codex/skills/data-analytics/src/analytics-app/scripts/design_contract.py +0 -142
- package/template/.codex/skills/data-analytics/src/analytics-app/scripts/package_utils.py +0 -142
- package/template/.codex/skills/data-analytics/src/analytics-app/scripts/tests/test_package_utils.py +0 -377
- package/template/.codex/skills/data-analytics/src/analytics-app/styles.css +0 -3468
- package/template/.codex/skills/data-analytics/src/analytics-app/tables/DataTable.d.ts +0 -44
- package/template/.codex/skills/data-analytics/src/analytics-app/tables/DataTable.jsx +0 -639
- package/template/.codex/skills/data-analytics/src/analytics-app/tables/data-table.css +0 -327
- package/template/.codex/skills/data-analytics/src/analytics-app/tokens.css +0 -225
- package/template/.codex/skills/data-analytics/src/analytics-app/types.ts +0 -204
- package/template/.codex/skills/data-analytics/src/analytics-app-core.md +0 -85
- package/template/.codex/skills/data-analytics/src/codex-style-contract.md +0 -30
- package/template/.codex/skills/data-analytics/src/datascience-artifact-widget.html +0 -12
- package/template/.codex/skills/data-analytics/src/datascience-artifact-widget.jsx +0 -1008
- package/template/.codex/skills/data-analytics/src/datascience-chart-widget.css +0 -2117
- package/template/.codex/skills/data-analytics/src/datascience-chart-widget.html +0 -122
- package/template/.codex/skills/data-analytics/src/datascience-chart-widget.js +0 -3588
- package/template/.codex/skills/data-analytics/src/datascience-table-widget.css +0 -483
- package/template/.codex/skills/data-analytics/src/datascience-table-widget.html +0 -32
- package/template/.codex/skills/data-analytics/src/datascience-table-widget.js +0 -333
- package/template/.codex/skills/data-analytics/src/mcp-host.js +0 -153
- package/template/.codex/skills/data-analytics/src/recharts-config.js +0 -315
- package/template/.codex/skills/data-analytics/src/recharts-renderer.jsx +0 -294
- package/template/.codex/skills/data-analytics/src/sql-source-view.css +0 -33
- package/template/.codex/skills/data-analytics/src/sql-source-view.js +0 -157
- package/template/.codex/skills/data-analytics/src/styles/codex-theme.css +0 -121
- package/template/.codex/skills/data-analytics/src/table-renderer.jsx +0 -28
- package/template/.codex/skills/data-analytics/tests/chart-transforms.test.mjs +0 -87
- package/template/.codex/skills/data-analytics/tests/funnel-smoke.html +0 -105
- package/template/.codex/skills/data-analytics/tests/inline-widget-compare.html +0 -233
- package/template/.codex/skills/data-analytics/tests/mcp-server.test.mjs +0 -1500
- package/template/.codex/skills/data-analytics/tests/native-style-contract.test.mjs +0 -219
- package/template/.codex/skills/data-analytics/tests/recharts-config.test.mjs +0 -144
- package/template/.codex/skills/data-analytics/tests/recharts-renderer.test.mjs +0 -11
- package/template/.codex/skills/data-analytics/tests/rich-markdown.test.mjs +0 -54
- package/template/.codex/skills/data-analytics/tests/widget-render-harness.html +0 -321
- package/template/.codex/skills/data-analytics/tsconfig.json +0 -19
- package/template/.codex/skills/data-analytics/vite.config.ts +0 -46
- package/template/.codex/skills/grill-with-docs/SKILL.md +0 -20
- package/template/.codex/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/template/.codex/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/template/.codex/skills/prototype/UI.md +0 -112
- package/template/.codex/skills/setup-matt-pocock-skills/domain.md +0 -37
- package/template/.codex/skills/to-questionnaire/SKILL.md +0 -55
- package/template/.codex/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/template/.codex/skills/wait-what/SKILL.md +0 -7
- package/template/.codex/skills/wait-what/agents/openai.yaml +0 -5
- package/template/.cursor/skills/grill-with-docs/SKILL.md +0 -20
- package/template/.cursor/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/template/.cursor/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/template/.cursor/skills/prototype/UI.md +0 -112
- package/template/.cursor/skills/setup-matt-pocock-skills/domain.md +0 -37
- package/template/.cursor/skills/to-questionnaire/SKILL.md +0 -55
- package/template/.cursor/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/template/.cursor/skills/wait-what/SKILL.md +0 -7
- package/template/.cursor/skills/wait-what/agents/openai.yaml +0 -5
- package/template/.pi/skills/grill-with-docs/SKILL.md +0 -20
- package/template/.pi/skills/grill-with-docs/agents/openai.yaml +0 -5
- package/template/.pi/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
- package/template/.pi/skills/prototype/UI.md +0 -112
- package/template/.pi/skills/setup-matt-pocock-skills/domain.md +0 -37
- package/template/.pi/skills/to-questionnaire/SKILL.md +0 -55
- package/template/.pi/skills/to-questionnaire/agents/openai.yaml +0 -5
- package/template/.pi/skills/wait-what/SKILL.md +0 -7
- package/template/.pi/skills/wait-what/agents/openai.yaml +0 -5
- package/template/.template-spec/agents/domain.md +0 -31
- /package/template/.agents/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
- /package/template/.codex/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
- /package/template/.cursor/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
- /package/template/.pi/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-compatibility.ts
DELETED
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { ChartSpec, ChartType } from "./chart-contract";
|
|
2
|
-
import { asNumber, type ChartDataRow } from "./chart-transforms";
|
|
3
|
-
import { CHART_TYPE_LABELS, CHART_TYPE_ORDER } from "./chart-theme";
|
|
4
|
-
|
|
5
|
-
export type ChartTypeOption = {
|
|
6
|
-
label: string;
|
|
7
|
-
type: ChartType;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type ChartTypeOptionSection = {
|
|
11
|
-
options: ChartTypeOption[];
|
|
12
|
-
title: string;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const CHART_TYPE_MENU_SECTIONS: Array<{ title: string; types: ChartType[] }> = [
|
|
16
|
-
{
|
|
17
|
-
title: "Trends",
|
|
18
|
-
types: ["line", "area", "stackedArea", "sparkline"],
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
title: "Comparison",
|
|
22
|
-
types: ["bar", "leaderboard"],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
title: "Distribution",
|
|
26
|
-
types: ["histogram", "boxPlot"],
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
title: "Relationships",
|
|
30
|
-
types: ["scatter", "heatmap"],
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: "Composition",
|
|
34
|
-
types: ["pie"],
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: "Progression",
|
|
38
|
-
types: ["funnel", "waterfall"],
|
|
39
|
-
},
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
const CHART_TYPE_MENU_ORDER: ChartType[] = CHART_TYPE_MENU_SECTIONS.flatMap((section) => section.types);
|
|
43
|
-
const HIDDEN_BAR_VARIANT_TYPE_LIST: ChartType[] = [
|
|
44
|
-
"horizontalBar",
|
|
45
|
-
"stackedBar",
|
|
46
|
-
"stackedBar100",
|
|
47
|
-
"horizontalStackedBar",
|
|
48
|
-
"horizontalStackedBar100",
|
|
49
|
-
];
|
|
50
|
-
const HIDDEN_BAR_VARIANT_TYPES = new Set<ChartType>(HIDDEN_BAR_VARIANT_TYPE_LIST);
|
|
51
|
-
const BAR_SHAPE_TYPES: ChartType[] = ["bar", "leaderboard"];
|
|
52
|
-
const FUNNEL_SHAPE_TYPES: ChartType[] = ["bar", "funnel"];
|
|
53
|
-
const PIE_SHAPE_TYPES: ChartType[] = ["bar", "pie"];
|
|
54
|
-
const WATERFALL_SHAPE_TYPES: ChartType[] = ["bar", "waterfall"];
|
|
55
|
-
const STACKED_SHAPE_TYPES: ChartType[] = ["bar", "heatmap"];
|
|
56
|
-
const TREND_SHAPE_TYPES: ChartType[] = ["line", "area", "stackedArea", "sparkline", "bar"];
|
|
57
|
-
|
|
58
|
-
export function isChartType(value: unknown): value is ChartType {
|
|
59
|
-
return typeof value === "string" && CHART_TYPE_ORDER.includes(value as ChartType);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function chartTypeOptions(types: readonly ChartType[]): ChartTypeOption[] {
|
|
63
|
-
return types.map((type) => ({
|
|
64
|
-
label: CHART_TYPE_LABELS[type],
|
|
65
|
-
type,
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function compatibleChartTypesFor(_chart: ChartSpec, _rows: ChartDataRow[]): ChartTypeOption[] {
|
|
70
|
-
return chartTypeOptions(CHART_TYPE_MENU_ORDER);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function hasMultipleXValues(chart: ChartSpec, rows: ChartDataRow[]): boolean {
|
|
74
|
-
return new Set(rows.map((row) => String(row[chart.xField] ?? ""))).size >= 2;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function hasNumericX(chart: ChartSpec, rows: ChartDataRow[]): boolean {
|
|
78
|
-
return rows.some((row) => asNumber(row[chart.xField]) != null);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function hasNumericSeries(chart: ChartSpec, rows: ChartDataRow[], seriesLimit = chart.series.length): boolean {
|
|
82
|
-
const series = chart.series.slice(0, Math.max(1, seriesLimit));
|
|
83
|
-
return rows.some((row) => series.some((item) => asNumber(row[item.field]) != null));
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function hasPositiveSeries(chart: ChartSpec, rows: ChartDataRow[]): boolean {
|
|
87
|
-
return rows.some((row) => chart.series.some((item) => (asNumber(row[item.field]) ?? 0) > 0));
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function chartTypesForCurrentShape(chart: ChartSpec): ChartType[] {
|
|
91
|
-
const seriesCount = chart.series.length;
|
|
92
|
-
if (chart.type === "line" || chart.type === "area" || chart.type === "stackedArea" || chart.type === "sparkline") {
|
|
93
|
-
return TREND_SHAPE_TYPES;
|
|
94
|
-
}
|
|
95
|
-
if (chart.type === "funnel" || chart.intent === "funnel") return FUNNEL_SHAPE_TYPES;
|
|
96
|
-
if (chart.type === "pie" || chart.intent === "composition") return PIE_SHAPE_TYPES;
|
|
97
|
-
if (chart.type === "waterfall" || chart.intent === "decomposition") return WATERFALL_SHAPE_TYPES;
|
|
98
|
-
if (
|
|
99
|
-
chart.type === "stackedBar" ||
|
|
100
|
-
chart.type === "stackedBar100" ||
|
|
101
|
-
chart.type === "horizontalStackedBar" ||
|
|
102
|
-
chart.type === "horizontalStackedBar100" ||
|
|
103
|
-
chart.type === "heatmap" ||
|
|
104
|
-
seriesCount > 1
|
|
105
|
-
) {
|
|
106
|
-
return STACKED_SHAPE_TYPES;
|
|
107
|
-
}
|
|
108
|
-
if (chart.type === "bar" || chart.type === "horizontalBar" || chart.type === "leaderboard") {
|
|
109
|
-
return BAR_SHAPE_TYPES;
|
|
110
|
-
}
|
|
111
|
-
if (chart.type === "histogram") return ["histogram"];
|
|
112
|
-
if (chart.type === "boxPlot") return ["boxPlot"];
|
|
113
|
-
if (chart.type === "scatter") return ["scatter"];
|
|
114
|
-
return [chart.type];
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
function chartTypeCanReuseFields(type: ChartType, chart: ChartSpec, rows: ChartDataRow[]): boolean {
|
|
118
|
-
if (type === chart.type) return true;
|
|
119
|
-
if (type === "sparkline" && chart.series.length > 1) return false;
|
|
120
|
-
if ((type === "line" || type === "area" || type === "stackedArea" || type === "sparkline") && !hasMultipleXValues(chart, rows)) {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
if ((type === "funnel" || type === "leaderboard" || type === "waterfall") && chart.series.length > 1) {
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
if (type === "pie" && !hasPositiveSeries(chart, rows)) return false;
|
|
127
|
-
if (type === "histogram" && !hasNumericSeries(chart, rows, 1)) return false;
|
|
128
|
-
if (type === "scatter" && (!hasNumericX(chart, rows) || !hasNumericSeries(chart, rows))) return false;
|
|
129
|
-
if (type === "heatmap" && chart.series.length < 2) return false;
|
|
130
|
-
if (type === "boxPlot" && chart.series.length < 5) return false;
|
|
131
|
-
return true;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function chartTypeAllowedByManifest(type: ChartType, chart: ChartSpec, allowedByManifest: Set<ChartType> | null): boolean {
|
|
135
|
-
if (!allowedByManifest) return true;
|
|
136
|
-
if (type === chart.type || allowedByManifest.has(type)) return true;
|
|
137
|
-
return (
|
|
138
|
-
type === "bar" &&
|
|
139
|
-
(HIDDEN_BAR_VARIANT_TYPES.has(chart.type) ||
|
|
140
|
-
HIDDEN_BAR_VARIANT_TYPE_LIST.some((variant) => allowedByManifest.has(variant)))
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export function compatibleChartTypesForDataShape(chart: ChartSpec, rows: ChartDataRow[]): ChartTypeOption[] {
|
|
145
|
-
const allowedByManifest = chart.compatibleTypes?.length ? new Set(chart.compatibleTypes) : null;
|
|
146
|
-
const shapeTypes = chartTypesForCurrentShape(chart).filter((type) => {
|
|
147
|
-
if (!chartTypeAllowedByManifest(type, chart, allowedByManifest)) return false;
|
|
148
|
-
return chartTypeCanReuseFields(type, chart, rows);
|
|
149
|
-
});
|
|
150
|
-
const orderedTypes = CHART_TYPE_MENU_ORDER.filter((type) => shapeTypes.includes(type));
|
|
151
|
-
if (!orderedTypes.includes(chart.type) && !HIDDEN_BAR_VARIANT_TYPES.has(chart.type)) orderedTypes.push(chart.type);
|
|
152
|
-
return chartTypeOptions(orderedTypes);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export function chartTypeSectionsForOptions(options: readonly ChartTypeOption[]): ChartTypeOptionSection[] {
|
|
156
|
-
const optionByType = new Map(options.map((option) => [option.type, option]));
|
|
157
|
-
return CHART_TYPE_MENU_SECTIONS.map((section) => ({
|
|
158
|
-
title: section.title,
|
|
159
|
-
options: section.types.flatMap((type) => {
|
|
160
|
-
const option = optionByType.get(type);
|
|
161
|
-
return option ? [option] : [];
|
|
162
|
-
}),
|
|
163
|
-
})).filter((section) => section.options.length > 0);
|
|
164
|
-
}
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
export const CHART_TYPES = [
|
|
2
|
-
"line",
|
|
3
|
-
"area",
|
|
4
|
-
"stackedArea",
|
|
5
|
-
"bar",
|
|
6
|
-
"horizontalBar",
|
|
7
|
-
"stackedBar",
|
|
8
|
-
"stackedBar100",
|
|
9
|
-
"horizontalStackedBar",
|
|
10
|
-
"horizontalStackedBar100",
|
|
11
|
-
"histogram",
|
|
12
|
-
"scatter",
|
|
13
|
-
"heatmap",
|
|
14
|
-
"pie",
|
|
15
|
-
"leaderboard",
|
|
16
|
-
"sparkline",
|
|
17
|
-
"funnel",
|
|
18
|
-
"waterfall",
|
|
19
|
-
"boxPlot",
|
|
20
|
-
] as const;
|
|
21
|
-
|
|
22
|
-
export type ChartType = (typeof CHART_TYPES)[number];
|
|
23
|
-
|
|
24
|
-
export type ValueFormat = "compact" | "number" | "percent" | "currency";
|
|
25
|
-
|
|
26
|
-
export type ChartSurface = "compact" | "card" | "explorer" | "export";
|
|
27
|
-
|
|
28
|
-
export type ChartIntent =
|
|
29
|
-
| "status"
|
|
30
|
-
| "trend"
|
|
31
|
-
| "comparison"
|
|
32
|
-
| "composition"
|
|
33
|
-
| "decomposition"
|
|
34
|
-
| "distribution"
|
|
35
|
-
| "relationship"
|
|
36
|
-
| "funnel"
|
|
37
|
-
| "lookup"
|
|
38
|
-
| "custom";
|
|
39
|
-
|
|
40
|
-
export type ChartComparisonContext = {
|
|
41
|
-
baseline?: string;
|
|
42
|
-
denominator?: string;
|
|
43
|
-
grain?: string;
|
|
44
|
-
normalization?: string;
|
|
45
|
-
semanticFamily?: string;
|
|
46
|
-
unit?: string;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export type ChartPaletteKind =
|
|
50
|
-
| "categorical"
|
|
51
|
-
| "sequential"
|
|
52
|
-
| "diverging"
|
|
53
|
-
| "semantic"
|
|
54
|
-
| "identity";
|
|
55
|
-
|
|
56
|
-
export type ChartLineStyle = "solid" | "dashed" | "dotted";
|
|
57
|
-
|
|
58
|
-
export type ChartSeriesColor =
|
|
59
|
-
| "blue"
|
|
60
|
-
| "purple"
|
|
61
|
-
| "green"
|
|
62
|
-
| "neutral"
|
|
63
|
-
| "orange"
|
|
64
|
-
| "yellow"
|
|
65
|
-
| "pink"
|
|
66
|
-
| "red";
|
|
67
|
-
|
|
68
|
-
export type ChartSeriesRole =
|
|
69
|
-
| "actual"
|
|
70
|
-
| "baseline"
|
|
71
|
-
| "target"
|
|
72
|
-
| "forecast"
|
|
73
|
-
| "plan"
|
|
74
|
-
| "comparison";
|
|
75
|
-
|
|
76
|
-
export type ChartSeriesSpec = {
|
|
77
|
-
field: string;
|
|
78
|
-
label?: string;
|
|
79
|
-
color?: ChartSeriesColor;
|
|
80
|
-
lineStyle?: ChartLineStyle;
|
|
81
|
-
role?: ChartSeriesRole;
|
|
82
|
-
semanticRole?: ChartSeriesRole;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export type ChartEncodingSpec = {
|
|
86
|
-
field?: string;
|
|
87
|
-
fields?: string[];
|
|
88
|
-
type?: "nominal" | "ordinal" | "quantitative" | "temporal" | "text";
|
|
89
|
-
aggregate?: "none" | "sum" | "avg" | "min" | "max" | "count" | "countDistinct";
|
|
90
|
-
format?: ValueFormat;
|
|
91
|
-
label?: string;
|
|
92
|
-
unit?: string;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export type ChartPaletteSpec = {
|
|
96
|
-
kind: ChartPaletteKind;
|
|
97
|
-
name?: string;
|
|
98
|
-
midpoint?: number;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
export type ChartReferenceLineSpec = {
|
|
102
|
-
axis?: "x" | "y";
|
|
103
|
-
color?: ChartSeriesColor;
|
|
104
|
-
label?: string;
|
|
105
|
-
lineStyle?: ChartLineStyle;
|
|
106
|
-
value: number | string;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export type ChartLegendOptions = {
|
|
110
|
-
position?: "bottom" | "right";
|
|
111
|
-
sort?: "spec" | "labelAsc" | "labelDesc";
|
|
112
|
-
title?: string;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export type ChartValueLabelMode = "none" | "auto" | "all" | "endpoints";
|
|
116
|
-
|
|
117
|
-
export type ChartLabelOptions = {
|
|
118
|
-
values?: ChartValueLabelMode;
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
export type ChartSurfaceOptions = {
|
|
122
|
-
surface?: ChartSurface;
|
|
123
|
-
compact?: boolean;
|
|
124
|
-
interactiveLegend?: boolean;
|
|
125
|
-
showControls?: boolean;
|
|
126
|
-
viewMode?: "visualization" | "table" | "both";
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export type ChartBarOrientation = "vertical" | "horizontal";
|
|
130
|
-
|
|
131
|
-
export type ChartBarGroupMode = "single" | "grouped" | "stacked" | "stacked100";
|
|
132
|
-
|
|
133
|
-
export type ChartSettings = {
|
|
134
|
-
bins?: number;
|
|
135
|
-
categoryLabelPolicy?: "wrap" | "truncate" | "rotate";
|
|
136
|
-
groupMode?: ChartBarGroupMode;
|
|
137
|
-
limit?: number;
|
|
138
|
-
maxSegments?: number;
|
|
139
|
-
orientation?: ChartBarOrientation;
|
|
140
|
-
otherThreshold?: number;
|
|
141
|
-
showLatestValue?: boolean;
|
|
142
|
-
showPercent?: boolean;
|
|
143
|
-
showPoints?: "always" | "never";
|
|
144
|
-
showValues?: boolean;
|
|
145
|
-
sort?: "none" | "ascending" | "descending" | "custom";
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
export type ChartSpec = {
|
|
149
|
-
id: string;
|
|
150
|
-
title: string;
|
|
151
|
-
subtitle?: string;
|
|
152
|
-
showDescription?: boolean;
|
|
153
|
-
headerMarkdown?: string;
|
|
154
|
-
intent?: ChartIntent;
|
|
155
|
-
question?: string;
|
|
156
|
-
rationale?: string;
|
|
157
|
-
comparisonContext?: ChartComparisonContext;
|
|
158
|
-
type: ChartType;
|
|
159
|
-
dataset: string;
|
|
160
|
-
sourceId?: string;
|
|
161
|
-
encodings?: {
|
|
162
|
-
x?: ChartEncodingSpec;
|
|
163
|
-
y?: ChartEncodingSpec;
|
|
164
|
-
color?: ChartEncodingSpec;
|
|
165
|
-
lineStyle?: ChartEncodingSpec;
|
|
166
|
-
size?: ChartEncodingSpec;
|
|
167
|
-
facet?: ChartEncodingSpec;
|
|
168
|
-
label?: ChartEncodingSpec;
|
|
169
|
-
tooltip?: ChartEncodingSpec[];
|
|
170
|
-
};
|
|
171
|
-
xField?: string;
|
|
172
|
-
xAxisTitle?: string;
|
|
173
|
-
yAxisTitle?: string;
|
|
174
|
-
series?: ChartSeriesSpec[];
|
|
175
|
-
valueFormat?: ValueFormat;
|
|
176
|
-
unit?: string;
|
|
177
|
-
layout?: "full" | "half";
|
|
178
|
-
combinationRationale?: string;
|
|
179
|
-
labels?: ChartLabelOptions;
|
|
180
|
-
legend?: ChartLegendOptions;
|
|
181
|
-
maxRows?: number;
|
|
182
|
-
palette?: ChartPaletteSpec;
|
|
183
|
-
referenceLines?: ChartReferenceLineSpec[];
|
|
184
|
-
emptyState?: string;
|
|
185
|
-
compatibleTypes?: ChartType[];
|
|
186
|
-
settings?: ChartSettings;
|
|
187
|
-
surface?: ChartSurfaceOptions;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export function isChartType(value: unknown): value is ChartType {
|
|
191
|
-
return typeof value === "string" && (CHART_TYPES as readonly string[]).includes(value);
|
|
192
|
-
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
ChartBarGroupMode,
|
|
3
|
-
ChartBarOrientation,
|
|
4
|
-
ChartLineStyle,
|
|
5
|
-
ChartPaletteKind,
|
|
6
|
-
ChartSeriesColor,
|
|
7
|
-
ChartSeriesRole,
|
|
8
|
-
ChartType,
|
|
9
|
-
} from "./chart-contract";
|
|
10
|
-
|
|
11
|
-
export const CHART_TYPE_ORDER: ChartType[] = [
|
|
12
|
-
"line",
|
|
13
|
-
"area",
|
|
14
|
-
"stackedArea",
|
|
15
|
-
"bar",
|
|
16
|
-
"horizontalBar",
|
|
17
|
-
"stackedBar",
|
|
18
|
-
"stackedBar100",
|
|
19
|
-
"horizontalStackedBar",
|
|
20
|
-
"horizontalStackedBar100",
|
|
21
|
-
"leaderboard",
|
|
22
|
-
"sparkline",
|
|
23
|
-
"scatter",
|
|
24
|
-
"histogram",
|
|
25
|
-
"heatmap",
|
|
26
|
-
"pie",
|
|
27
|
-
"funnel",
|
|
28
|
-
"waterfall",
|
|
29
|
-
"boxPlot",
|
|
30
|
-
];
|
|
31
|
-
|
|
32
|
-
export const CHART_TYPE_LABELS: Record<ChartType, string> = {
|
|
33
|
-
area: "Area",
|
|
34
|
-
bar: "Bar",
|
|
35
|
-
boxPlot: "Box plot",
|
|
36
|
-
funnel: "Funnel",
|
|
37
|
-
heatmap: "Heatmap",
|
|
38
|
-
histogram: "Histogram",
|
|
39
|
-
horizontalBar: "Horizontal bar",
|
|
40
|
-
horizontalStackedBar: "Horizontal stacked bar",
|
|
41
|
-
horizontalStackedBar100: "100% horizontal stacked bar",
|
|
42
|
-
leaderboard: "Leaderboard",
|
|
43
|
-
line: "Line",
|
|
44
|
-
pie: "Pie",
|
|
45
|
-
scatter: "Scatter",
|
|
46
|
-
sparkline: "Sparkline",
|
|
47
|
-
stackedArea: "Stacked area",
|
|
48
|
-
stackedBar: "Stacked bar",
|
|
49
|
-
stackedBar100: "100% stacked bar",
|
|
50
|
-
waterfall: "Waterfall",
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export const SERIES_COLORS: Record<ChartSeriesColor, string> = {
|
|
54
|
-
blue: "var(--ds-chart-series-blue)",
|
|
55
|
-
purple: "var(--ds-chart-series-purple)",
|
|
56
|
-
yellow: "var(--ds-chart-series-yellow)",
|
|
57
|
-
orange: "var(--ds-chart-series-orange)",
|
|
58
|
-
green: "var(--ds-chart-series-green)",
|
|
59
|
-
pink: "var(--ds-chart-series-pink)",
|
|
60
|
-
neutral: "var(--ds-chart-series-neutral)",
|
|
61
|
-
red: "var(--ds-chart-series-red)",
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const DEFAULT_SERIES_COLOR_ORDER: ChartSeriesColor[] = [
|
|
65
|
-
"blue",
|
|
66
|
-
"orange",
|
|
67
|
-
"green",
|
|
68
|
-
"purple",
|
|
69
|
-
"red",
|
|
70
|
-
"pink",
|
|
71
|
-
"yellow",
|
|
72
|
-
"neutral",
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
export const SEMANTIC_ROLE_COLORS: Partial<Record<ChartSeriesRole, ChartSeriesColor>> = {
|
|
76
|
-
actual: "blue",
|
|
77
|
-
baseline: "neutral",
|
|
78
|
-
comparison: "purple",
|
|
79
|
-
forecast: "neutral",
|
|
80
|
-
plan: "neutral",
|
|
81
|
-
target: "neutral",
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const STACKED_SERIES_FALLBACK_COLORS = [
|
|
85
|
-
"var(--ds-chart-stack-1)",
|
|
86
|
-
"var(--ds-chart-stack-2)",
|
|
87
|
-
"var(--ds-chart-stack-3)",
|
|
88
|
-
"var(--ds-chart-stack-4)",
|
|
89
|
-
"var(--ds-chart-stack-5)",
|
|
90
|
-
"var(--ds-chart-stack-6)",
|
|
91
|
-
"var(--ds-chart-stack-7)",
|
|
92
|
-
"var(--ds-chart-stack-8)",
|
|
93
|
-
];
|
|
94
|
-
|
|
95
|
-
export const SEQUENTIAL_SERIES_COLORS = [
|
|
96
|
-
"var(--ds-chart-sequential-1)",
|
|
97
|
-
"var(--ds-chart-sequential-2)",
|
|
98
|
-
"var(--ds-chart-sequential-3)",
|
|
99
|
-
"var(--ds-chart-sequential-4)",
|
|
100
|
-
"var(--ds-chart-sequential-5)",
|
|
101
|
-
"var(--ds-chart-sequential-6)",
|
|
102
|
-
"var(--ds-chart-sequential-7)",
|
|
103
|
-
"var(--ds-chart-sequential-8)",
|
|
104
|
-
"var(--ds-chart-sequential-9)",
|
|
105
|
-
];
|
|
106
|
-
|
|
107
|
-
export const DIVERGING_SERIES_COLORS = [
|
|
108
|
-
"var(--ds-chart-diverging-negative-2)",
|
|
109
|
-
"var(--ds-chart-diverging-negative-1)",
|
|
110
|
-
"var(--ds-chart-diverging-neutral)",
|
|
111
|
-
"var(--ds-chart-diverging-positive-1)",
|
|
112
|
-
"var(--ds-chart-diverging-positive-2)",
|
|
113
|
-
];
|
|
114
|
-
|
|
115
|
-
export const HEATMAP_BLUE_SCALE = [
|
|
116
|
-
"var(--ds-chart-heatmap-1)",
|
|
117
|
-
"var(--ds-chart-heatmap-2)",
|
|
118
|
-
"var(--ds-chart-heatmap-3)",
|
|
119
|
-
"var(--ds-chart-heatmap-4)",
|
|
120
|
-
"var(--ds-chart-heatmap-5)",
|
|
121
|
-
"var(--ds-chart-heatmap-6)",
|
|
122
|
-
"var(--ds-chart-heatmap-7)",
|
|
123
|
-
"var(--ds-chart-heatmap-8)",
|
|
124
|
-
"var(--ds-chart-heatmap-9)",
|
|
125
|
-
];
|
|
126
|
-
|
|
127
|
-
export const FUNNEL_STAGE_COLORS = [
|
|
128
|
-
"var(--ds-chart-funnel-1)",
|
|
129
|
-
"var(--ds-chart-funnel-2)",
|
|
130
|
-
"var(--ds-chart-funnel-3)",
|
|
131
|
-
"var(--ds-chart-funnel-4)",
|
|
132
|
-
"var(--ds-chart-funnel-5)",
|
|
133
|
-
];
|
|
134
|
-
|
|
135
|
-
export function strokeDasharrayForLineStyle(lineStyle: ChartLineStyle | undefined): string | undefined {
|
|
136
|
-
if (lineStyle === "dotted") return "2 4";
|
|
137
|
-
if (lineStyle === "dashed") return "5 5";
|
|
138
|
-
return undefined;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export function colorForSequentialValue(value: number | null, min: number, max: number): string {
|
|
142
|
-
if (value == null || !Number.isFinite(value)) return SEQUENTIAL_SERIES_COLORS[0];
|
|
143
|
-
const range = max - min;
|
|
144
|
-
const intensity = range === 0 ? 1 : (value - min) / range;
|
|
145
|
-
const index = Math.max(
|
|
146
|
-
0,
|
|
147
|
-
Math.min(SEQUENTIAL_SERIES_COLORS.length - 1, Math.round(intensity * (SEQUENTIAL_SERIES_COLORS.length - 1))),
|
|
148
|
-
);
|
|
149
|
-
return SEQUENTIAL_SERIES_COLORS[index] ?? SEQUENTIAL_SERIES_COLORS[0];
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function colorForDivergingValue(value: number | null, midpoint = 0): string {
|
|
153
|
-
if (value == null || !Number.isFinite(value)) return DIVERGING_SERIES_COLORS[2];
|
|
154
|
-
if (value < midpoint) return DIVERGING_SERIES_COLORS[0];
|
|
155
|
-
if (value > midpoint) return DIVERGING_SERIES_COLORS[4];
|
|
156
|
-
return DIVERGING_SERIES_COLORS[2];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export function isStackedChartType(type: ChartType, groupMode?: ChartBarGroupMode): boolean {
|
|
160
|
-
return (
|
|
161
|
-
type === "stackedArea" ||
|
|
162
|
-
type === "stackedBar" ||
|
|
163
|
-
type === "stackedBar100" ||
|
|
164
|
-
type === "horizontalStackedBar" ||
|
|
165
|
-
type === "horizontalStackedBar100" ||
|
|
166
|
-
(type === "bar" && (groupMode === "stacked" || groupMode === "stacked100"))
|
|
167
|
-
);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
export function isNormalizedStackedChartType(type: ChartType, groupMode?: ChartBarGroupMode): boolean {
|
|
171
|
-
return type === "stackedBar100" || type === "horizontalStackedBar100" || (type === "bar" && groupMode === "stacked100");
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function isHorizontalChartType(type: ChartType, orientation?: ChartBarOrientation): boolean {
|
|
175
|
-
return type === "horizontalBar" || type === "horizontalStackedBar" || type === "horizontalStackedBar100" || (type === "bar" && orientation === "horizontal");
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export function colorForSeries(
|
|
179
|
-
color: ChartSeriesColor | undefined,
|
|
180
|
-
index: number,
|
|
181
|
-
options: {
|
|
182
|
-
paletteKind?: ChartPaletteKind;
|
|
183
|
-
semanticRole?: ChartSeriesRole;
|
|
184
|
-
singleSeriesTrend?: boolean;
|
|
185
|
-
stacked?: boolean;
|
|
186
|
-
} = {},
|
|
187
|
-
): string {
|
|
188
|
-
if (color) return SERIES_COLORS[color] ?? SERIES_COLORS.blue;
|
|
189
|
-
if (options.paletteKind === "semantic" && options.semanticRole) {
|
|
190
|
-
return SERIES_COLORS[SEMANTIC_ROLE_COLORS[options.semanticRole] ?? "blue"];
|
|
191
|
-
}
|
|
192
|
-
if (options.paletteKind === "sequential") {
|
|
193
|
-
return SEQUENTIAL_SERIES_COLORS[index % SEQUENTIAL_SERIES_COLORS.length];
|
|
194
|
-
}
|
|
195
|
-
if (options.paletteKind === "diverging") {
|
|
196
|
-
return DIVERGING_SERIES_COLORS[index % DIVERGING_SERIES_COLORS.length];
|
|
197
|
-
}
|
|
198
|
-
if (options.stacked && !color) {
|
|
199
|
-
return STACKED_SERIES_FALLBACK_COLORS[index % STACKED_SERIES_FALLBACK_COLORS.length];
|
|
200
|
-
}
|
|
201
|
-
if (options.singleSeriesTrend && !color) return SERIES_COLORS.blue;
|
|
202
|
-
return SERIES_COLORS[DEFAULT_SERIES_COLOR_ORDER[index % DEFAULT_SERIES_COLOR_ORDER.length]] ?? SERIES_COLORS.blue;
|
|
203
|
-
}
|