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
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Chart Requirements and Guidance
|
|
2
|
-
|
|
3
|
-
Use this when creating or editing charts, dashboards, or chart-ready summaries in spreadsheet workbooks. Keep the chart useful first: accurate data binding, readable units, and legible labels matter more than decorative styling.
|
|
4
|
-
|
|
5
|
-
## Chart Requirements
|
|
6
|
-
|
|
7
|
-
- Use native Excel charts for chart deliverables when plottable data supports the requested comparison or trend.
|
|
8
|
-
- Chart from a bounded source/helper range whose first row is headers, first column is the displayed category or time label, and remaining columns are plotted series.
|
|
9
|
-
- Link helper values to source cells with formulas when the source data should remain auditable.
|
|
10
|
-
- Keep the full source table available when helper labels are abbreviated or grouped for chart readability.
|
|
11
|
-
- Do not place charts over source data or important notes; reserve a bounded chart area with whitespace around it.
|
|
12
|
-
- Percent, currency, date, and count axes must use an appropriate number format or visible data labels.
|
|
13
|
-
- For narrow chart-edit requests, preserve the requested edit scope and do not silently rewrite unrelated formulas, formatting, data tables, or workbook structure.
|
|
14
|
-
- For chart edits, inspect the visible chart area and source range for formula errors. Preserve unrelated pre-existing errors, mention them in the final response, and fix them only when they directly break the chart or the user asked for repair/audit.
|
|
15
|
-
- Render every meaningful chart sheet before export. Check for blank charts, disconnected or stale ranges, unreadable axis units, clipped labels, overcrowded tick labels, unintended multi-color single-series styling, and visible formula errors near chart inputs or outputs.
|
|
16
|
-
|
|
17
|
-
## Chart Guidance
|
|
18
|
-
|
|
19
|
-
- Use charts when they improve the answer; avoid redundant charts that repeat the same point.
|
|
20
|
-
- For dashboards, reporting, and analysis, place charts near the KPI blocks or source tables they explain when charts help the user make the decision.
|
|
21
|
-
- Multiple charts are useful when they communicate distinct KPIs, comparisons, or trends.
|
|
22
|
-
- When the workbook needs both a detailed data table and a chart, keep the detailed table for browsing/filtering and chart a smaller helper range with only the plotted fields.
|
|
23
|
-
- For single-series line charts, explicitly set one consistent line color and marker style. Do not rely on automatic Excel chart styles that may vary point colors, segment colors, or marker symbols inside one series.
|
|
24
|
-
- If markers are used, keep marker shape, fill, and outline consistent across the series unless each point intentionally encodes a category.
|
|
25
|
-
- Prefer a clear chart title, but do not use the title as the only place where units are visible when the axis values need interpretation.
|
|
26
|
-
- Axis titles are optional when the chart title and surrounding worksheet context make the dimension and measure unambiguous. Axis number formatting is not optional when the unit changes how the chart is read.
|
|
27
|
-
- Add data labels when exact values matter or when the axis unit is easy to misread. If data labels make the chart crowded, use fewer labels, improve axis formatting, or enlarge the chart rather than leaving units ambiguous.
|
|
28
|
-
- For long category labels, create readable shortened chart labels when the full labels would clip or wrap badly.
|
|
29
|
-
- For summary tables adjacent to charts, widen the category column, wrap only at natural word breaks, or move long descriptors into a notes column rather than allowing cramped within-word wrapping.
|
|
30
|
-
- For time-based charts, if raw dates would create crowded labels or unreliable date-axis grouping, add a grouped field such as Year, Quarter, Month, or Week to the chart source.
|
|
31
|
-
- If a chart fails export after optional styling, simplify styling before removing the chart: use a helper-range chart, reduce custom axis/series mutations, then retry export.
|
package/template/.codex/skills/data-analytics/skills/spreadsheets/references/artifact_tool_api.md
DELETED
|
@@ -1,466 +0,0 @@
|
|
|
1
|
-
# Artifact Tool API Reference
|
|
2
|
-
|
|
3
|
-
Use this reference when building or editing workbooks with `@oai/artifact-tool` and the core `SKILL.md` workflow is not enough. Keep API lookup targeted; do not load this file for lightweight routing or non-spreadsheet analysis.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
- Imports and startup
|
|
7
|
-
- Build patterns and conventions
|
|
8
|
-
- API discovery and formula lookup
|
|
9
|
-
- Existing workbook inspection
|
|
10
|
-
- Feature-specific notes and pitfalls
|
|
11
|
-
- Quick API surface
|
|
12
|
-
- Runnable JavaScript example
|
|
13
|
-
|
|
14
|
-
# Using artifact_tool APIs (JavaScript)
|
|
15
|
-
|
|
16
|
-
## Imports + Startup
|
|
17
|
-
|
|
18
|
-
Import existing workbook only when needed:
|
|
19
|
-
```js
|
|
20
|
-
import { FileBlob, SpreadsheetFile } from "@oai/artifact-tool";
|
|
21
|
-
|
|
22
|
-
const input = await FileBlob.load("path/to/input.xlsx");
|
|
23
|
-
const workbook = await SpreadsheetFile.importXlsx(input);
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Import CSV text directly when the source or intermediate data is CSV:
|
|
27
|
-
```js
|
|
28
|
-
import fs from "node:fs/promises";
|
|
29
|
-
import { Workbook } from "@oai/artifact-tool";
|
|
30
|
-
|
|
31
|
-
const csvText = await fs.readFile("path/to/input.csv", "utf8");
|
|
32
|
-
const workbook = await Workbook.fromCSV(csvText, { sheetName: "Sheet1" });
|
|
33
|
-
```
|
|
34
|
-
Prefer `Workbook.fromCSV(...)` over hand-parsing CSV rows; clean or analyze CSV with Python/Node first only when needed.
|
|
35
|
-
|
|
36
|
-
Create new workbook:
|
|
37
|
-
```js
|
|
38
|
-
import fs from "node:fs/promises";
|
|
39
|
-
import { SpreadsheetFile, Workbook } from "@oai/artifact-tool";
|
|
40
|
-
|
|
41
|
-
const workbook = Workbook.create();
|
|
42
|
-
const sheet = workbook.worksheets.add("Inputs");
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Final export:
|
|
46
|
-
```js
|
|
47
|
-
await fs.mkdir(outputDir, { recursive: true });
|
|
48
|
-
const output = await SpreadsheetFile.exportXlsx(workbook);
|
|
49
|
-
await output.save(`${outputDir}/output.xlsx`);
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
## Build Patterns
|
|
53
|
-
- Prefer block writes (`range.values`, `range.formulas`) over per-cell loops. Matrix shape must match the target range (for example `"D4:M4"` should be a 1x10 matrix, row x col).
|
|
54
|
-
- Seed scalar formulas once, then `fillDown()` / `fillRight()`. For dynamic-array formulas (`SEQUENCE`, `UNIQUE`, `FILTER`, `SORT`, `VSTACK`, `HSTACK`), write only the anchor cell and let the result spill after.
|
|
55
|
-
- Use `range.displayFormulas` plus `range.formulaInfos` when you need to understand a spill child or a data-table output cell.
|
|
56
|
-
- You do not need to call recalculate; calculation automatically happens.
|
|
57
|
-
- Date handling:
|
|
58
|
-
- Prefer real `Date` objects for sortable/charted/formula date columns.
|
|
59
|
-
- Apply date formats explicitly (for example `yyyy-mm-dd`).
|
|
60
|
-
- Use JSON-serializable values for non-Date cells: `string | number | boolean | null`.
|
|
61
|
-
- If a cell is intended to display literal text that begins with `=`, write it as a value prefixed with a single quote (for example `'=B2*C2`). This includes formula descriptions, validation examples, and labels; do not write these cells through `range.formulas`.
|
|
62
|
-
- Create every worksheet referenced by formulas before writing any cross-sheet formulas.
|
|
63
|
-
- When rebuilding dashboards, delete drawings first with `sheet.deleteAllDrawings()`. `range.clear()` does not remove charts, shapes, or images.
|
|
64
|
-
- Verify with `await workbook.inspect(...)`; use `workbook.help(...)` only when the quick surface below is insufficient.
|
|
65
|
-
- For formula audits or tracing how a formula is calculated, use `workbook.trace("Sheet!A1")` on the key output/check cells. It takes only a cell reference and returns the full tree, so print a capped summary. Do not dump raw traces.
|
|
66
|
-
|
|
67
|
-
## Conventions
|
|
68
|
-
- Use camelCase API names and option keys.
|
|
69
|
-
- Cell/range addressing: A1 notation (`sheet.getRange("A1:C10")`).
|
|
70
|
-
- Drawing anchors (`sheet.charts`, `sheet.shapes`, `sheet.images`): 0-based `{ row, col }`.
|
|
71
|
-
- Drawing offsets/extents use pixels (`rowOffsetPx`, `colOffsetPx`, `widthPx`, `heightPx`).
|
|
72
|
-
|
|
73
|
-
## API Discovery
|
|
74
|
-
- Use this quick API surface first.
|
|
75
|
-
- Use `workbook.help(...)` only when blocked by uncertainty.
|
|
76
|
-
- For help queries, start with exact feature/path lookups (`chart`, `worksheet.getRange`, `worksheet.freezePanes`, `range.dataValidation`, `chart.series.add`). If an exact path fails, one broader wildcard search is allowed.
|
|
77
|
-
- Do not repeat semantically similar help queries.
|
|
78
|
-
- If one help query returns 0 matches, reformulate once, then proceed best-effort.
|
|
79
|
-
- `render` can be used to examine an existing workbook visually and for visual verifications.
|
|
80
|
-
|
|
81
|
-
## Efficient Formula Lookup
|
|
82
|
-
- If you know the function name, use exact lookup first: `workbook.help("fx.PMT", { include: "index,examples,notes", maxChars: 3000 })`.
|
|
83
|
-
- To browse a family, use `fx.*` with a category regex. Useful categories: `financial`, `math-trig`, `statistical`, `lookup-reference`, `logical`, `text`, `date-time`, `information`, `engineering`, `database`.
|
|
84
|
-
- For intent-based lookup, use a short natural query plus a narrow `search` regex of likely functions.
|
|
85
|
-
- Keep `maxChars` bounded; if results are noisy, narrow `search` rather than issuing many similar queries.
|
|
86
|
-
|
|
87
|
-
Useful help calls:
|
|
88
|
-
```js
|
|
89
|
-
console.log(workbook.help("shape.add", { include: "examples,notes" }).ndjson);
|
|
90
|
-
console.log(
|
|
91
|
-
workbook.help("*", {
|
|
92
|
-
search: "fill|borders|autofit",
|
|
93
|
-
include: "index,examples,notes",
|
|
94
|
-
maxChars: 6000,
|
|
95
|
-
}).ndjson,
|
|
96
|
-
);
|
|
97
|
-
console.log(workbook.help("fx.PMT", { include: "index,examples,notes" }).ndjson);
|
|
98
|
-
console.log(workbook.help("fx.*", { search: "financial", include: "index,examples", maxChars: 4000 }).ndjson);
|
|
99
|
-
console.log(workbook.help("fx.*", { search: "math-trig", include: "index,examples", maxChars: 4000 }).ndjson);
|
|
100
|
-
console.log(workbook.help("lookup with fallback", { search: "XLOOKUP|INDEX|MATCH|IFERROR", include: "index,examples,notes", maxChars: 4000 }).ndjson);
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Reading existing/imported workbooks
|
|
104
|
-
- On existing/imported workbooks, get a compact summary via `inspect` to understand what already exists and where.
|
|
105
|
-
- Prefer `inspect(...)` for workbook understanding and discovery across broad areas.
|
|
106
|
-
- Prefer direct getters like `range.formulas` when you already know the target range and need the exact rectangular formula matrix.
|
|
107
|
-
- If formula locations are unknown, prefer `inspect({ kind: "formula", ... })` over reading `range.formulas` across a very large area.
|
|
108
|
-
- Prefer to set `maxChars`, `tableMaxRows`, `tableMaxCols`, and/or `maxResults` to prevent large dumps of data.
|
|
109
|
-
- For suspicious or high-impact outputs, use `workbook.trace("Sheet!A1")` to audit the dependency tree from final output/check cell back to source cells. Trace output can be large, so summarize by depth/node count before logging.
|
|
110
|
-
|
|
111
|
-
### Inspect for workbook understanding
|
|
112
|
-
- Compact summary:
|
|
113
|
-
```js
|
|
114
|
-
await wb.inspect({
|
|
115
|
-
kind: "workbook,sheet,table",
|
|
116
|
-
maxChars: 6000,
|
|
117
|
-
tableMaxRows: 6,
|
|
118
|
-
tableMaxCols: 6,
|
|
119
|
-
tableMaxCellChars: 80,
|
|
120
|
-
});
|
|
121
|
-
```
|
|
122
|
-
- Quick overview of sheet ids and names: `await wb.inspect({ kind: "sheet", include: "id,name" })`
|
|
123
|
-
- Formula discovery in a targeted area: `await wb.inspect({ kind: "formula", sheetId: firstSheetName, range: "A1:Z30", maxChars: 2500, options: {maxResults:50} })`
|
|
124
|
-
- Checking existing styles in a targeted area: `await wb.inspect({ kind: "computedStyle", sheetId: firstSheetName, range: "A1:E10", maxChars: 2500 })`
|
|
125
|
-
- Common `kind` tokens: `workbook`, `sheet`, `table`, `region`, `match`, `formula`, `thread`, `computedStyle`, `definedName`, `drawing`
|
|
126
|
-
- Inspects can also be used to zoom in on specific areas, especially for target edits:
|
|
127
|
-
```js
|
|
128
|
-
await wb.inspect({
|
|
129
|
-
kind: "region",
|
|
130
|
-
sheetId: firstSheetName,
|
|
131
|
-
range: "A1:Z30",
|
|
132
|
-
maxChars: 2500,
|
|
133
|
-
});
|
|
134
|
-
```
|
|
135
|
-
- Inspect output may include JSON records with `"id"` values (for example `"ws/r5qsk5"`), which you can resolve back to workbook objects with `wb.resolve(...)`:
|
|
136
|
-
- `wb.resolve("ws/...")` -> worksheet
|
|
137
|
-
- `wb.resolve("th/...")` -> comment thread
|
|
138
|
-
|
|
139
|
-
## Additional feature-specific notes
|
|
140
|
-
|
|
141
|
-
### Merging cells
|
|
142
|
-
- Merging cells is useful for visual headers, title bands, note/source blocks, and labels that span columns.
|
|
143
|
-
- `range.merge()` merges the target range into one cell; `range.merge(true)` merges across each row in the target range.
|
|
144
|
-
- `range.unmerge()` reverses a merge.
|
|
145
|
-
For example:
|
|
146
|
-
```js
|
|
147
|
-
const range = sheet.getRange("I23:N24");
|
|
148
|
-
range.merge();
|
|
149
|
-
range.values = [["Source note spanning the recommendation panel"]];
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
## Common API Pitfalls
|
|
153
|
-
- Do not set undocumented attributes on remote objects.
|
|
154
|
-
- `Workbook.create()` starts with no sheets; add one before calling `getActiveWorksheet()`.
|
|
155
|
-
- Use matrix sizes that match target ranges unless you intentionally spill.
|
|
156
|
-
- Create every worksheet referenced by formulas before writing cross-sheet formulas.
|
|
157
|
-
- Avoid full-column formula references such as `A:A`, `$A:$A`, or `Sheet!B:B`. Prefer bounded ranges sized to the editable table, e.g. `$A$6:$A$205`, especially inside `COUNTIFS`, `SUMIFS`, `INDEX`, and lookup formulas.
|
|
158
|
-
- If export fails, checkpoint-export after major blocks to isolate the cause: base sheets, values/formulas, formatting, conditional formatting, tables, charts/rendering.
|
|
159
|
-
- If export fails after formatting or charts, simplify optional styling first: nested border configs, custom chart axis/series mutations, broad autofit/formatting, then nonessential drawings.
|
|
160
|
-
|
|
161
|
-
## Quick API Surface (High-Value + Common)
|
|
162
|
-
|
|
163
|
-
### Core workbook/file APIs
|
|
164
|
-
- `import { FileBlob, SpreadsheetFile, Workbook } from "@oai/artifact-tool"`
|
|
165
|
-
- `const workbook = Workbook.create(); const sheet = workbook.worksheets.add("Sheet1")`
|
|
166
|
-
- `const workbook = await SpreadsheetFile.importXlsx(arrayBufferOrFileBlob)`
|
|
167
|
-
- `const xlsx = await SpreadsheetFile.exportXlsx(workbook); await xlsx.save("output.xlsx")`
|
|
168
|
-
- `const inspect = await workbook.inspect({ kind: "sheet", include: "id,name", sheetId, range: "A1:C10" })`
|
|
169
|
-
- `const help = workbook.help("worksheet.getRange", { include: "index,examples" })`
|
|
170
|
-
- `const trace = workbook.trace("Checks!F2")` // summarize before logging
|
|
171
|
-
- Preferred: `const blob = await workbook.render({ sheetName: "Sheet1", autoCrop: "all", scale: 1, format: "png" })`
|
|
172
|
-
- To get the bytes and/or save the blob to file:
|
|
173
|
-
```js
|
|
174
|
-
const previewBytes = new Uint8Array(await preview.arrayBuffer());
|
|
175
|
-
await fs.writeFile(`${outputDir}/preview.png`, previewBytes);
|
|
176
|
-
```
|
|
177
|
-
- `const workbook = await Workbook.fromCSV(csvText, { sheetName: "Sheet1" })`
|
|
178
|
-
- `await workbook.fromCSV(csvText, { sheetName: "ImportedData" })`
|
|
179
|
-
|
|
180
|
-
### Worksheet selection/creation
|
|
181
|
-
- `workbook.worksheets.add(name)`
|
|
182
|
-
- `workbook.worksheets.getItem(name)`
|
|
183
|
-
- `workbook.worksheets.getOrAdd(name, { renameFirstIfOnlyNewSpreadsheet: true })`
|
|
184
|
-
- `workbook.worksheets.getItemAt(index)`
|
|
185
|
-
- `workbook.worksheets.getActiveWorksheet()` (only after at least one sheet exists)
|
|
186
|
-
|
|
187
|
-
### Worksheet operations
|
|
188
|
-
- `sheet.getRange("A1:C10")`, `sheet.getRangeByIndexes(startRow, startCol, rowCount, colCount)`, `sheet.getCell(row, col)`
|
|
189
|
-
- `sheet.getUsedRange(valuesOnly?)`
|
|
190
|
-
- `sheet.mergeCells("A1:C1")`, `sheet.unmergeCells("A1:C1")`
|
|
191
|
-
- `sheet.freezePanes.freezeRows(1)`, `sheet.freezePanes.freezeColumns(2)`, `sheet.freezePanes.unfreeze()`
|
|
192
|
-
- `sheet.tables`, `sheet.charts`, `sheet.sparklineGroups` (`sheet.sparklines` alias), `sheet.shapes`, `sheet.images`
|
|
193
|
-
- `sheet.showGridLines = false`
|
|
194
|
-
- `sheet.dataTables`, `sheet.conditionalFormattings`, `sheet.dataValidations`
|
|
195
|
-
- `sheet.deleteAllDrawings()` removes charts, shapes, and images before a dashboard rebuild.
|
|
196
|
-
|
|
197
|
-
### Range values/formulas
|
|
198
|
-
- `const range = sheet.getRange("A1:C10")`
|
|
199
|
-
- `range.values = [[...], ...]` (2D matrix of values)
|
|
200
|
-
- `range.formulas = [["=..."], ...]`
|
|
201
|
-
- `range.formulasR1C1 = [["=RC[-1]*2"]]`
|
|
202
|
-
- To read: `range.values` / `range.formulas` / `range.displayFormulas` / `range.formulaInfos` (for spill/array formulas)
|
|
203
|
-
- `range.write(matrixOrPayload)` (auto-sizes/spills from anchor as needed)
|
|
204
|
-
- `range.writeValues(matrixOrRows)`
|
|
205
|
-
- `range.fillDown()`, `range.fillRight()`
|
|
206
|
-
- `sheet.getRange("D2").formulas = [["=..."]]`
|
|
207
|
-
- `sheet.getRange("D2:D200").fillDown()`
|
|
208
|
-
- `range.clear({ applyTo: "contents" | "formats" | "all" })`
|
|
209
|
-
- `range.copyFrom(sourceRange, "values" | "formulas" | "all")` source and destination must have the same shape
|
|
210
|
-
- `range.copyTo(destRange, "values" | "formulas" | "all")`
|
|
211
|
-
- `range.offset(...)`, `range.resize(...)`, `range.getCurrentRegion()`, `range.getRow(i)`, `range.getColumn(j)`
|
|
212
|
-
- `range.getRangeByIndexes(...)`, `range.getCell(...)`
|
|
213
|
-
- `range.merge()`, `range.merge(true)` to merge across, `range.unmerge()`
|
|
214
|
-
|
|
215
|
-
### Formatting
|
|
216
|
-
- `range.format` supports `fill`, `font`, `numberFormat`, `borders`, alignments, `wrapText`
|
|
217
|
-
- `range.format.autofitColumns()`, `range.format.autofitRows()`
|
|
218
|
-
- Excel unit sizing: `range.format.columnWidth = 18`, `range.format.rowHeight = 24`
|
|
219
|
-
- Pixel sizing: `range.format.columnWidthPx = 120`, `range.format.rowHeightPx = 24`
|
|
220
|
-
- `range.setNumberFormat("yyyy-mm-dd")`
|
|
221
|
-
- `range.format.numberFormat = [["0"], ["0.00"], ["@"]]`
|
|
222
|
-
|
|
223
|
-
### Data Validation
|
|
224
|
-
- `range.dataValidation = { rule: { type: "list", formula1: "Categories!$A$2:$A$4" } }`
|
|
225
|
-
- `range.dataValidation = { rule: { type: "list", values: ["Not Started", "In Progress"] } }`
|
|
226
|
-
- `sheet.dataValidations.add({ range: "B2:B100", rule: { type: "whole", operator: "between", formula1: 1, formula2: 10 } })`
|
|
227
|
-
|
|
228
|
-
### Conditional formatting
|
|
229
|
-
- Use `range.conditionalFormats.add(ruleType, ConditionalFormatConfig);`.
|
|
230
|
-
- Use `range.conditionalFormats.add(ruleType, {operator, formula, format});`. Choose ruleType, operator, color, and style strings from the inline types below.
|
|
231
|
-
```
|
|
232
|
-
type ConditionalFormatRuleType =
|
|
233
|
-
| "cellIs" | "CellValue" | "Custom" | "expression"
|
|
234
|
-
| "colorScale" | "dataBar" | "iconSet"
|
|
235
|
-
| "containsText" | "notContainsText" | "beginsWith" | "endsWith"
|
|
236
|
-
| "containsBlanks" | "notContainsBlanks" | "containsErrors" | "notContainsErrors"
|
|
237
|
-
| "duplicateValues" | "uniqueValues" | "timePeriod" | "top10" | "aboveAverage";
|
|
238
|
-
|
|
239
|
-
type CellIsOperator =
|
|
240
|
-
| "greaterThan"
|
|
241
|
-
| "greaterThanOrEqual"
|
|
242
|
-
| "lessThan"
|
|
243
|
-
| "lessThanOrEqual"
|
|
244
|
-
| "equal"
|
|
245
|
-
| "notEqual"
|
|
246
|
-
| "between"
|
|
247
|
-
| "notBetween";
|
|
248
|
-
|
|
249
|
-
type ConditionalFormatConfig =
|
|
250
|
-
| { operator: CellIsOperator; formula: string | number | Array<string | number>; format?: DifferentialFormatConfig }
|
|
251
|
-
| { formula: string | number; format?: DifferentialFormatConfig }
|
|
252
|
-
| { colors?: ColorConfig[]; thresholds?: CfvoInput[] }
|
|
253
|
-
| { color?: ColorConfig; thresholds?: CfvoInput[]; gradient?: boolean }
|
|
254
|
-
| { iconSet: string; showValue?: boolean; reverse?: boolean; thresholds?: CfvoInput[] }
|
|
255
|
-
| { text: string; format?: DifferentialFormatConfig }
|
|
256
|
-
| { timePeriod: "yesterday" | "today" | "tomorrow" | "last7Days" | "lastWeek" | "thisWeek" | "nextWeek" | "lastMonth" | "thisMonth" | "nextMonth"; format?: DifferentialFormatConfig }
|
|
257
|
-
| { rank?: number; percent?: boolean; bottom?: boolean; format?: DifferentialFormatConfig }
|
|
258
|
-
| { aboveAverage?: boolean; equalAverage?: boolean; stdDev?: number; format?: DifferentialFormatConfig };
|
|
259
|
-
|
|
260
|
-
type DifferentialFormatConfig = {
|
|
261
|
-
fill?: FillConfig;
|
|
262
|
-
font?: { bold?: boolean; italic?: boolean; color?: ColorConfig };
|
|
263
|
-
border?: RangeBordersConfig;
|
|
264
|
-
numberFormat?: string;
|
|
265
|
-
};
|
|
266
|
-
|
|
267
|
-
type CfvoInput =
|
|
268
|
-
| "min"
|
|
269
|
-
| "max"
|
|
270
|
-
| number
|
|
271
|
-
| `${number}%`
|
|
272
|
-
| { type: "min" | "max" | "num" | "percent" | "percentile"; value?: string | number };
|
|
273
|
-
```
|
|
274
|
-
- Rule types (`ConditionalFormatRuleType`): "cellIs" | "CellValue" | "Custom" | "expression"
|
|
275
|
-
| "colorScale" | "dataBar" | "iconSet"
|
|
276
|
-
| "containsText" | "notContainsText" | "beginsWith" | "endsWith"
|
|
277
|
-
| "containsBlanks" | "notContainsBlanks" | "containsErrors" | "notContainsErrors"
|
|
278
|
-
| "duplicateValues" | "uniqueValues" | "timePeriod" | "top10" | "aboveAverage";
|
|
279
|
-
- Built-in `iconSet` names: `3Arrows`, `3Triangles`, `4Arrows`, `5Arrows`, `3ArrowsGray`, `4ArrowsGray`, `5ArrowsGray`, `3TrafficLights1`, `3Signs`, `4RedToBlack`, `3TrafficLights2`, `4TrafficLights`, `3Symbols`, `3Flags`, `3Symbols2`, `3Stars`, `5Quarters`, `5Boxes`, `4Rating`, `5Rating`.
|
|
280
|
-
- Custom conditional formatting: `range.conditionalFormats.addCustom(expression, {fill, font, border});`
|
|
281
|
-
- `range.conditionalFormats.deleteAll()` / `range.conditionalFormats.clear()`
|
|
282
|
-
|
|
283
|
-
```js
|
|
284
|
-
const grid = sheet.getRange("B2:J10");
|
|
285
|
-
grid.conditionalFormats.add("colorScale", {
|
|
286
|
-
criteria: [
|
|
287
|
-
{ type: "lowestValue", color: "#2563EB" },
|
|
288
|
-
{ type: "percentile", value: 50, color: "#FDE047" },
|
|
289
|
-
{ type: "highestValue", color: "#DC2626" },
|
|
290
|
-
],
|
|
291
|
-
});
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### Tables
|
|
295
|
-
- When adding new tables, set explicit unique names (`TasksTable`, `SummaryTable`).
|
|
296
|
-
- You cannot have multiple tables over the same range. Before adding a table on an existing/imported workbook, confirm the target range does not already overlap an existing table. Prefer the initial compact `inspect` summary over a separate tables-only scan when available.
|
|
297
|
-
- `const table = sheet.tables.add("A1:H200", true, "TasksTable")`
|
|
298
|
-
- `table.rows.add(null, [[...], ...])`, `table.getDataRows()`, `table.getHeaderRowRange()`
|
|
299
|
-
- Read tables: `sheet.tables.items` -> `Table[]`
|
|
300
|
-
- Set + Getters: `table.name`, `table.style`, `table.style`, `table.showHeaders`
|
|
301
|
-
- Toggles for table utilities (set/get): `table.showTotals`, `table.showBandedColumns = true`, `table.showFilterButton`
|
|
302
|
-
- `table.delete()`
|
|
303
|
-
|
|
304
|
-
### Images
|
|
305
|
-
- `sheet.images.add({dataUrl: "data:image/png;base64,...", anchor: {from: { row: 1, col: 2 }, extent: { widthPx: 160, heightPx: 120 }}})`
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
### Threaded Comments
|
|
309
|
-
Follow this exact API when adding a note or comment:
|
|
310
|
-
- Required: First, always first call set_self to create an author `workbook.comments.setSelf({"displayName": "ChatGPT"})`
|
|
311
|
-
- Create a new thread with a single comment: `const thread = workbook.comments.addThread({"cell": sheet.getRange("E2")}, "Source: <website>")`
|
|
312
|
-
- To reply to a threaded comment: `thread.addReply("This is a reply to the comment")`
|
|
313
|
-
- To resolve/re-open a thread: `thread.resolve()`, `thread.reopen()`
|
|
314
|
-
|
|
315
|
-
### Charts
|
|
316
|
-
- When adding or moving charts, do not cover existing data. Put charts in a reserved rectangle with blank gutter columns/rows around the chart area.
|
|
317
|
-
- Fast chart path, no help lookup needed for common line/bar/scatter charts: write a compact helper range with text categories and one column per series, then chart that range.
|
|
318
|
-
- If chart data comes from editable/source data, make the helper range formula-backed instead of copying literal values.
|
|
319
|
-
```js
|
|
320
|
-
sheet.getRange("F4:H7").values = [
|
|
321
|
-
["Month", "Revenue", "EBITDA"],
|
|
322
|
-
["Jan", 100, 10],
|
|
323
|
-
["Feb", 120, 18],
|
|
324
|
-
["Mar", 130, 22],
|
|
325
|
-
];
|
|
326
|
-
const chart = sheet.charts.add("line", sheet.getRange("F4:H7"));
|
|
327
|
-
chart.setPosition("J4", "Q20");
|
|
328
|
-
chart.title = "Revenue and EBITDA Trend";
|
|
329
|
-
chart.hasLegend = true;
|
|
330
|
-
chart.xAxis = { axisType: "textAxis" };
|
|
331
|
-
chart.yAxis = { numberFormatCode: "$#,##0" };
|
|
332
|
-
```
|
|
333
|
-
- Fast chart path from range: `const chart = sheet.charts.add("line", sourceRange)` when the source range already has headers and text x-axis labels.
|
|
334
|
-
- Advanced fallback only: avoid manual `chart.series.add(...)` and `chart.legend = {...}` on the first pass unless source-range chart creation does not work (for example, non-continuous data). Use a helper range chart first, then add optional chart styling only if the basic chart renders and exports cleanly.
|
|
335
|
-
- If you want to set specific chart props after the helper-range path is not enough: `const chart = sheet.charts.add("bar", chartProps)`, then checkpoint export before adding optional styling.
|
|
336
|
-
- If using compat positioning, always set position: `chart.setPosition("F2", "M20")`.
|
|
337
|
-
- `sheet.charts.getItemOrNullObject("Chart 1")`, `sheet.charts.deleteAll()`
|
|
338
|
-
- To update x/y-axis, prefer compact config assignments such as `chart.xAxis = { axisType: "textAxis", tickLabelInterval: 2 }` and `chart.yAxis = { numberFormatCode: "$#,##0" }`. These help legibility and visibility.
|
|
339
|
-
- For month/date x-axes, prefer a chart helper range with text labels such as `Jan 2025` or `2025-01`. Do not rely on date axis number formats alone; rendered previews can show Excel serial numbers.
|
|
340
|
-
- Chart types: `"bar" | "line" | "area" | "pie" | "doughnut" | "scatter" | "bubble" | "radar" | "stock" | "treemap" | "sunburst" | "histogram" | "boxWhisker" | "waterfall" | "funnel" | "map"`.
|
|
341
|
-
|
|
342
|
-
### Sparklines
|
|
343
|
-
```
|
|
344
|
-
const group = sheet.sparklineGroups.add({
|
|
345
|
-
type,
|
|
346
|
-
targetRange,
|
|
347
|
-
sourceData,
|
|
348
|
-
dateAxisRange,
|
|
349
|
-
seriesColor,
|
|
350
|
-
negativeColor,
|
|
351
|
-
markers,
|
|
352
|
-
axis,
|
|
353
|
-
lineWeight,
|
|
354
|
-
displayEmptyCellsAs,
|
|
355
|
-
displayHidden,
|
|
356
|
-
});
|
|
357
|
-
```
|
|
358
|
-
- Sparkline type is a string. Empty-cell display mode and axis min/max modes are proto enum numbers on the current facade; inspect nearby tests before setting them directly.
|
|
359
|
-
- Sparkline Inline Type:
|
|
360
|
-
```
|
|
361
|
-
type SparklineConfig = {
|
|
362
|
-
type: "line" | "column" | "stacked";
|
|
363
|
-
targetRange: Range | string;
|
|
364
|
-
sourceData: Range | string;
|
|
365
|
-
dateAxisRange?: Range | string;
|
|
366
|
-
lineWeight?: number;
|
|
367
|
-
displayHidden?: boolean;
|
|
368
|
-
seriesColor?: ColorConfig;
|
|
369
|
-
negativeColor?: ColorConfig;
|
|
370
|
-
axisColor?: ColorConfig;
|
|
371
|
-
markersColor?: ColorConfig;
|
|
372
|
-
firstMarkerColor?: ColorConfig;
|
|
373
|
-
lastMarkerColor?: ColorConfig;
|
|
374
|
-
highMarkerColor?: ColorConfig;
|
|
375
|
-
lowMarkerColor?: ColorConfig;
|
|
376
|
-
markers?: SparklineMarkersOptions;
|
|
377
|
-
axis?: SparklineAxisOptions;
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
type SparklineMarkersOptions = {
|
|
381
|
-
show?: boolean;
|
|
382
|
-
high?: boolean;
|
|
383
|
-
low?: boolean;
|
|
384
|
-
first?: boolean;
|
|
385
|
-
last?: boolean;
|
|
386
|
-
negative?: boolean;
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
type SparklineAxisOptions = {
|
|
390
|
-
showAxis?: boolean;
|
|
391
|
-
manualMin?: number;
|
|
392
|
-
manualMax?: number;
|
|
393
|
-
rightToLeft?: boolean;
|
|
394
|
-
};
|
|
395
|
-
```
|
|
396
|
-
- Range Alias: `const group = targetRange.sparklines.add(type, sourceRange, sparklineConfig);`
|
|
397
|
-
- Edit And Delete
|
|
398
|
-
```
|
|
399
|
-
group.seriesColor = colorConfig;
|
|
400
|
-
group.markers = markerConfig;
|
|
401
|
-
group.axis = axisConfig;
|
|
402
|
-
group.delete();
|
|
403
|
-
sheet.sparklineGroups.deleteAll();
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
### Help / Grep
|
|
407
|
-
Use `workbook.help(...)` primarily for obscure/advanced surfaces (for example deep chart axis settings, unusual drawing configs, pivot APIs, or uncommon option schemas).
|
|
408
|
-
- `workbook.help("enum.ShapeGeometry", { include: "index,notes" }).ndjson`
|
|
409
|
-
- `workbook.help("enum.*", { search: "ShapeGeometry|LineStyle", include: "index" }).ndjson`
|
|
410
|
-
- `workbook.help("shape.add", { include: "examples,notes" }).ndjson`
|
|
411
|
-
- `workbook.help("fx.RATE", { include: "index,examples,notes" }).ndjson`
|
|
412
|
-
- `workbook.help("cash flow return rate", { search: "IRR|XIRR|NPV|XNPV", include: "index,examples,notes", maxChars: 4000 }).ndjson`
|
|
413
|
-
- `workbook.help("*", { search: "fill|borders|autofit", include: "index,examples,notes", maxChars: 6000 }).ndjson`
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
### JavaScript example snippet (runnable)
|
|
417
|
-
|
|
418
|
-
```js
|
|
419
|
-
import fs from "node:fs/promises";
|
|
420
|
-
import { SpreadsheetFile, Workbook } from "@oai/artifact-tool";
|
|
421
|
-
|
|
422
|
-
const outputDir = "output";
|
|
423
|
-
await fs.mkdir(outputDir, { recursive: true });
|
|
424
|
-
|
|
425
|
-
const workbook = Workbook.create();
|
|
426
|
-
const sheet = workbook.worksheets.add("Summary");
|
|
427
|
-
|
|
428
|
-
sheet.getRange("A1:C4").values = [
|
|
429
|
-
["Month", "Revenue", "EBITDA"],
|
|
430
|
-
["Jan", 100, 10],
|
|
431
|
-
["Feb", 120, 18],
|
|
432
|
-
["Mar", 130, 22],
|
|
433
|
-
];
|
|
434
|
-
sheet.getRange("D1").values = [["Margin"]];
|
|
435
|
-
sheet.getRange("D2").formulas = [["=C2/B2"]];
|
|
436
|
-
sheet.getRange("D2:D4").fillDown();
|
|
437
|
-
|
|
438
|
-
sheet.getRange("A1:D1").format = {
|
|
439
|
-
fill: "#0F766E",
|
|
440
|
-
font: { bold: true, color: "#FFFFFF" },
|
|
441
|
-
};
|
|
442
|
-
sheet.getRange("B2:C4").format.numberFormat = "$#,##0";
|
|
443
|
-
sheet.getRange("D2:D4").format.numberFormat = "0.0%";
|
|
444
|
-
|
|
445
|
-
// Helper range links to source cells so edits update the chart.
|
|
446
|
-
sheet.getRange("F1:G1").values = [["Month", "Revenue"]];
|
|
447
|
-
sheet.getRange("F2:G2").formulas = [["=A2", "=B2"]];
|
|
448
|
-
sheet.getRange("F2:G4").fillDown();
|
|
449
|
-
const chart = sheet.charts.add("line", sheet.getRange("F1:G4"));
|
|
450
|
-
chart.title = "Revenue Trend";
|
|
451
|
-
chart.hasLegend = false;
|
|
452
|
-
chart.xAxis = { axisType: "textAxis" };
|
|
453
|
-
chart.yAxis = { numberFormatCode: "$#,##0" };
|
|
454
|
-
chart.setPosition("I1", "P15");
|
|
455
|
-
|
|
456
|
-
const preview = await workbook.render({
|
|
457
|
-
sheetName: "Summary",
|
|
458
|
-
autoCrop: "all",
|
|
459
|
-
scale: 1,
|
|
460
|
-
format: "png",
|
|
461
|
-
});
|
|
462
|
-
await fs.writeFile(`${outputDir}/summary.png`, new Uint8Array(await preview.arrayBuffer()));
|
|
463
|
-
|
|
464
|
-
const xlsx = await SpreadsheetFile.exportXlsx(workbook);
|
|
465
|
-
await xlsx.save(`${outputDir}/summary.xlsx`);
|
|
466
|
-
```
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
# Default Style and Formatting Instructions
|
|
2
|
-
Apply these defaults to all spreadsheet outputs but ensure user provided style reference(s), template, or explicit formatting instructions take precadence. If the user specifies a style, match that style.
|
|
3
|
-
|
|
4
|
-
## Formatting Baseline
|
|
5
|
-
- If editing an uploaded/template workbook: render first, preserve and match existing style unless user asks to restyle.
|
|
6
|
-
- Typical defaults when unspecified:
|
|
7
|
-
- content columns: ~10-24
|
|
8
|
-
- text-heavy columns: cap ~32-40
|
|
9
|
-
- row heights: ~15-20 (titles may be larger)
|
|
10
|
-
- avoid oversized body fonts (>12pt) except intentional titles
|
|
11
|
-
- Use fill colors, borders, and merged cells judiciously to give the spreadsheet a professional visual style with a clear layout without overdoing it
|
|
12
|
-
- Add data validation for editable categorical columns (`Status`, `Priority`, `Owner`) where feasible.
|
|
13
|
-
- Unless conflicting style guidelines are provided: style headers, correct number/date formats, sensible column widths, and row heights, light borders.
|
|
14
|
-
- Use larger text only for titles or major section labels.
|
|
15
|
-
- Use blank space or slightly taller section/header rows to separate sections
|
|
16
|
-
- Keep row heights consistent within each section unless wrapped content requires expansion.
|
|
17
|
-
- When text wraps, prefer widening the column before allowing deep multi-line rows; if wrapping is necessary, increase row height just enough to fully show the content.
|
|
18
|
-
- Before editing, inspect all relevant current styling attributes (fills, fonts, borders, merged cells, number formats). If changing values only, never overwrite or clear cell formats.
|
|
19
|
-
- Maintain structural elements (filters, tables, totals rows), and never introduce merged cells in calculation areas.
|
|
20
|
-
- If users are likely to edit the workbook after export, make worksheet cells the live source of truth: any downstream values or visual states that depend on editable inputs should be driven by formulas referencing worksheet cells, then styled with conditional formatting or presentation-only formatting instead of Python-precomputed values or one-time manual fills.
|
|
21
|
-
- Use simple helper values when they make behavior easier to inspect and formatting easier to apply;
|
|
22
|
-
|
|
23
|
-
## Document structure
|
|
24
|
-
When creating a new spreadsheet, compose a clear visual layout with distinct zones: a title/header area, the primary table or working region, and—when space and task type allow—a secondary adjacent to the main table to cover summary section or instructions for how to use the sheet. When appropriate, design the sheet so it reads like a structured document, not just a matrix of cells. Use layout, scale, and selective merging to create clear sections and give headers enough room to breathe.
|
|
25
|
-
|
|
26
|
-
- Vary font size and weight intentionally so the sheet has a readable hierarchy: larger for title, medium for section headers, standard for body text.
|
|
27
|
-
- Let major headers occupy more space than body cells so the sheet can feel like a real document with sections, not a uniformly sized table.
|
|
28
|
-
- Size status and other validated categorical columns to the longest expected label plus dropdown space; do not leave values clipped.
|
|
29
|
-
- If the same label would otherwise repeat across many adjacent rows or columns, prefer a grouped header band, merged label, or legend rather than repeating the text cell by cell.
|
|
30
|
-
|
|
31
|
-
### Create strong visual hierarchy
|
|
32
|
-
Establish at least three hierarchy levels:
|
|
33
|
-
1. page title band (larger type, stronger fill, centered, often merged)
|
|
34
|
-
2. section/header bands (distinct fill, bold text, clear alignment)
|
|
35
|
-
3. body area (light or neutral surface, restrained styling)
|
|
36
|
-
|
|
37
|
-
### Use a theme palette
|
|
38
|
-
Choose a small coordinated palette and assign colors by role:
|
|
39
|
-
- primary accent for titles or major headers
|
|
40
|
-
- secondary accent for subheaders or section bars
|
|
41
|
-
- soft surface/background fill for the working canvas
|
|
42
|
-
- neutral/light fill for body cells
|
|
43
|
-
- darker text colors for readability
|
|
44
|
-
- avoid harsh contrast, excessive saturation, or too many unrelated fills
|
|
45
|
-
|
|
46
|
-
### Avoiding gridlines
|
|
47
|
-
Define structure with explicit fills and borders rather than relying on default gridlines. Use subtle internal borders for separation and slightly stronger outside borders to frame sections or cards. Hide gridlines when explicit section styling already defines the sheet.
|
|
48
|
-
|
|
49
|
-
### Use adjacent whitespace intentionally
|
|
50
|
-
When appropriate, place summary cards, assumptions, instructions, charts, legends, and small supporting lists in unused columns to the right or below the primary table as compact bounded panels sized to their content. Keep these panels visually separate from the main data region with whitespace and aligned edges, but avoid oversized sparse blocks that consume more space than the information warrants. Keep short legends and short validation vocabularies on the main sheet when they fit cleanly; use a helper sheet only when the supporting data is large, heavily reused, or would clutter the main layout.
|
|
51
|
-
|
|
52
|
-
### Align and format by data type
|
|
53
|
-
Apply semantic formatting to entire columns or blocks:
|
|
54
|
-
- text/descriptive fields left-aligned
|
|
55
|
-
- labels centered or left-aligned depending on context
|
|
56
|
-
- numeric and currency fields right-aligned
|
|
57
|
-
- dates with explicit date formats
|
|
58
|
-
- financial values with explicit currency/accounting formats
|
|
59
|
-
- do not leave important numeric fields in raw General format
|
|
60
|
-
|
|
61
|
-
### Use typography intentionally but conservatively
|
|
62
|
-
Use one display-style font choice for titles/section headers and one neutral readable font for body content when supported by the workbook viewer. Keep body text modest in size, reserve larger fonts for titles, and avoid mixing many fonts or excessive emphasis.
|
|
63
|
-
|
|
64
|
-
### Style the body lightly for scanability
|
|
65
|
-
Body regions should remain readable and calm. Use light fills, subtle borders, and minimal emphasis. If one column is the primary descriptive field, it may receive slightly stronger text emphasis to aid scanning, but avoid over-styling entire data regions.
|
|
66
|
-
For dense operational tables, use subtle alternating row banding together with thin light borders so users can track across rows without making the grid feel heavy.
|
|
67
|
-
|
|
68
|
-
### Prefer visible summaries over buried totals
|
|
69
|
-
Important totals should usually appear in a visible summary area near the top or in a side panel, even if table-footer totals also exist. Use formulas, not hardcoded values, and style summary cards as distinct panels with their own fill and border treatment.
|
|
70
|
-
|
|
71
|
-
## Colors and borders
|
|
72
|
-
- Use a restrained and professional color palette that matches the nature of the task: neutral text/grid styling, one primary accent family, and at most one secondary accent for exceptions such as warnings or special states.
|
|
73
|
-
- Use thin, light borders for structure; use stronger borders only for important section breaks.
|
|
74
|
-
- If the sheet includes progress indicators, status indicators, timelines, heatmaps, or other cell-based visuals, make them read as consistent visual bands or blocks with restrained fills, uniform repeated-column styling, and clear accents for milestones or special states rather than noisy repeated symbols or unrelated colors.
|
|
75
|
-
- Ensure conditional formatting is applied properly (i.e. such as red for negative, green for positive values)
|
|
76
|
-
|
|
77
|
-
## Typography and whitespace
|
|
78
|
-
- Use bold sparingly and only to establish reading order.
|
|
79
|
-
- Give titles, summaries, and section breaks visible breathing room so the sheet does not feel cramped.
|
|
80
|
-
|
|
81
|
-
## Charting and plotting data
|
|
82
|
-
When a spreadsheet includes charts, they should feel like part of the document rather than generic spreadsheet defaults dropped onto the page.
|
|
83
|
-
|
|
84
|
-
- Create charts from a bounded source range whose first row is headers, whose first column contains the exact x-axis labels to display, and whose remaining columns are the plotted series. If the available data is not already in that shape, write a helper range in that shape first and chart the helper range instead of the raw block. Use clear titles and explicitly set axis titles and unit/number formats whenever the chart communicates a measured value or comparison.
|
|
85
|
-
- When the workbook needs both a detailed data table and a chart, keep the detailed table for browsing/filtering, but place the chart next to a smaller chart-driving range that contains only the fields actually plotted.
|
|
86
|
-
- Choose chart types intentionally (e.g., clustered column for group comparisons, line for trends over time, pie for share of a whole) and place them close to the relevant data.
|
|
87
|
-
- Use tables for structured data that benefits from filtering/sorting; name tables clearly.
|
|
88
|
-
- Do not place a chart so it is overlapping or hides data
|
|
89
|
-
|
|
90
|
-
### Axes, scales, and labels
|
|
91
|
-
- Use readable axis labels with sensible tick density; do not overcrowd the x-axis.
|
|
92
|
-
- If needed, angle the axis labels if they are at risk of overlapping and this would boost readability.
|
|
93
|
-
- For time-based charts, if raw dates would create crowded labels or unreliable date-axis grouping, add an explicit grouped field such as Year, Quarter, Month, or Week to the chart source and chart that field instead of charting every raw date.
|
|
94
|
-
|
|
95
|
-
## Citation Requirements
|
|
96
|
-
### Cite sources inside the spreadsheet
|
|
97
|
-
- Use plain-text URLs in spreadsheet cells.
|
|
98
|
-
- For financial models, cite model-input sources in cell comments.
|
|
99
|
-
- For researched row-wise data tables, include source URLs in a dedicated source column.
|