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.
Files changed (438) hide show
  1. package/package.json +1 -1
  2. package/src/template/asset-runtime.js +3 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
  4. package/template/.agents/skills/codebase-design/SKILL.md +4 -0
  5. package/template/{.codex/skills/improve-codebase-architecture/SKILL.md → .agents/skills/codebase-design/references/architecture-audit.md} +3 -9
  6. package/template/.agents/skills/frontend-commit/SKILL.md +4 -93
  7. package/template/.agents/skills/git-commit-core/SKILL.md +18 -0
  8. package/template/.agents/skills/java-backend-commit/SKILL.md +4 -96
  9. package/template/.agents/skills/llm-wiki/SKILL.md +12 -13
  10. package/template/.agents/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
  11. package/template/.agents/skills/llm-wiki/references/compile.md +21 -114
  12. package/template/.agents/skills/llm-wiki/references/ingest.md +8 -33
  13. package/template/.agents/skills/llm-wiki/references/lint.md +9 -46
  14. package/template/.agents/skills/llm-wiki/references/query.md +9 -18
  15. package/template/.agents/skills/llm-wiki/references/schema.md +56 -29
  16. package/template/.agents/skills/llm-wiki/references/transactions.md +48 -0
  17. package/template/.agents/skills/llm-wiki/references/writing.md +4 -4
  18. package/template/.agents/skills/llm-wiki/scripts/advise.mjs +46 -58
  19. package/template/.agents/skills/llm-wiki/scripts/advise.test.mjs +11 -16
  20. package/template/.agents/skills/llm-wiki/scripts/core.mjs +262 -0
  21. package/template/.agents/skills/llm-wiki/scripts/extract.mjs +35 -18
  22. package/template/.agents/skills/llm-wiki/scripts/extract.test.mjs +5 -8
  23. package/template/.agents/skills/llm-wiki/scripts/feedback.mjs +51 -0
  24. package/template/.agents/skills/llm-wiki/scripts/inventory.mjs +43 -171
  25. package/template/.agents/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
  26. package/template/.agents/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
  27. package/template/.agents/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
  28. package/template/.agents/skills/llm-wiki/scripts/migrate.mjs +51 -0
  29. package/template/.agents/skills/llm-wiki/scripts/query.mjs +149 -0
  30. package/template/.agents/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
  31. package/template/.agents/skills/llm-wiki/scripts/sources.mjs +166 -0
  32. package/template/.agents/skills/llm-wiki/scripts/transaction.mjs +384 -0
  33. package/template/.agents/skills/llm-wiki/scripts/v2.test.mjs +354 -0
  34. package/template/.agents/skills/prototype/LOGIC.md +1 -1
  35. package/template/.agents/skills/prototype/SKILL.md +5 -19
  36. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +3 -3
  37. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
  38. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
  39. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
  40. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +8 -8
  41. package/template/.agents/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
  42. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  43. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
  44. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  45. package/template/.agents/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
  46. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
  47. package/template/.agents/skills/yss-research/SKILL.md +4 -0
  48. package/template/.codex/skills/codebase-design/SKILL.md +4 -0
  49. package/template/{.pi/skills/improve-codebase-architecture/SKILL.md → .codex/skills/codebase-design/references/architecture-audit.md} +3 -9
  50. package/template/.codex/skills/frontend-commit/SKILL.md +4 -93
  51. package/template/.codex/skills/git-commit-core/SKILL.md +18 -0
  52. package/template/.codex/skills/java-backend-commit/SKILL.md +4 -96
  53. package/template/.codex/skills/llm-wiki/SKILL.md +12 -13
  54. package/template/.codex/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
  55. package/template/.codex/skills/llm-wiki/references/compile.md +21 -114
  56. package/template/.codex/skills/llm-wiki/references/ingest.md +8 -33
  57. package/template/.codex/skills/llm-wiki/references/lint.md +9 -46
  58. package/template/.codex/skills/llm-wiki/references/query.md +9 -18
  59. package/template/.codex/skills/llm-wiki/references/schema.md +56 -29
  60. package/template/.codex/skills/llm-wiki/references/transactions.md +48 -0
  61. package/template/.codex/skills/llm-wiki/references/writing.md +4 -4
  62. package/template/.codex/skills/llm-wiki/scripts/advise.mjs +46 -58
  63. package/template/.codex/skills/llm-wiki/scripts/advise.test.mjs +11 -16
  64. package/template/.codex/skills/llm-wiki/scripts/core.mjs +262 -0
  65. package/template/.codex/skills/llm-wiki/scripts/extract.mjs +35 -18
  66. package/template/.codex/skills/llm-wiki/scripts/extract.test.mjs +5 -8
  67. package/template/.codex/skills/llm-wiki/scripts/feedback.mjs +51 -0
  68. package/template/.codex/skills/llm-wiki/scripts/inventory.mjs +43 -171
  69. package/template/.codex/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
  70. package/template/.codex/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
  71. package/template/.codex/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
  72. package/template/.codex/skills/llm-wiki/scripts/migrate.mjs +51 -0
  73. package/template/.codex/skills/llm-wiki/scripts/query.mjs +149 -0
  74. package/template/.codex/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
  75. package/template/.codex/skills/llm-wiki/scripts/sources.mjs +166 -0
  76. package/template/.codex/skills/llm-wiki/scripts/transaction.mjs +384 -0
  77. package/template/.codex/skills/llm-wiki/scripts/v2.test.mjs +354 -0
  78. package/template/.codex/skills/prototype/LOGIC.md +1 -1
  79. package/template/.codex/skills/prototype/SKILL.md +5 -19
  80. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +3 -3
  81. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
  82. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
  83. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
  84. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +8 -8
  85. package/template/.codex/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
  86. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  87. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
  88. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  89. package/template/.codex/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
  90. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
  91. package/template/.codex/skills/yss-research/SKILL.md +4 -0
  92. package/template/.cursor/skills/codebase-design/SKILL.md +4 -0
  93. package/template/.cursor/skills/{improve-codebase-architecture/SKILL.md → codebase-design/references/architecture-audit.md} +3 -9
  94. package/template/.cursor/skills/frontend-commit/SKILL.md +4 -93
  95. package/template/.cursor/skills/git-commit-core/SKILL.md +18 -0
  96. package/template/.cursor/skills/java-backend-commit/SKILL.md +4 -96
  97. package/template/.cursor/skills/llm-wiki/SKILL.md +12 -13
  98. package/template/.cursor/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
  99. package/template/.cursor/skills/llm-wiki/references/compile.md +21 -114
  100. package/template/.cursor/skills/llm-wiki/references/ingest.md +8 -33
  101. package/template/.cursor/skills/llm-wiki/references/lint.md +9 -46
  102. package/template/.cursor/skills/llm-wiki/references/query.md +9 -18
  103. package/template/.cursor/skills/llm-wiki/references/schema.md +56 -29
  104. package/template/.cursor/skills/llm-wiki/references/transactions.md +48 -0
  105. package/template/.cursor/skills/llm-wiki/references/writing.md +4 -4
  106. package/template/.cursor/skills/llm-wiki/scripts/advise.mjs +46 -58
  107. package/template/.cursor/skills/llm-wiki/scripts/advise.test.mjs +11 -16
  108. package/template/.cursor/skills/llm-wiki/scripts/core.mjs +262 -0
  109. package/template/.cursor/skills/llm-wiki/scripts/extract.mjs +35 -18
  110. package/template/.cursor/skills/llm-wiki/scripts/extract.test.mjs +5 -8
  111. package/template/.cursor/skills/llm-wiki/scripts/feedback.mjs +51 -0
  112. package/template/.cursor/skills/llm-wiki/scripts/inventory.mjs +43 -171
  113. package/template/.cursor/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
  114. package/template/.cursor/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
  115. package/template/.cursor/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
  116. package/template/.cursor/skills/llm-wiki/scripts/migrate.mjs +51 -0
  117. package/template/.cursor/skills/llm-wiki/scripts/query.mjs +149 -0
  118. package/template/.cursor/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
  119. package/template/.cursor/skills/llm-wiki/scripts/sources.mjs +166 -0
  120. package/template/.cursor/skills/llm-wiki/scripts/transaction.mjs +384 -0
  121. package/template/.cursor/skills/llm-wiki/scripts/v2.test.mjs +354 -0
  122. package/template/.cursor/skills/prototype/LOGIC.md +1 -1
  123. package/template/.cursor/skills/prototype/SKILL.md +5 -19
  124. package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +3 -3
  125. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
  126. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
  127. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
  128. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +8 -8
  129. package/template/.cursor/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
  130. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  131. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
  132. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  133. package/template/.cursor/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
  134. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
  135. package/template/.cursor/skills/yss-research/SKILL.md +4 -0
  136. package/template/.pi/skills/codebase-design/SKILL.md +4 -0
  137. package/template/{.agents/skills/improve-codebase-architecture/SKILL.md → .pi/skills/codebase-design/references/architecture-audit.md} +3 -9
  138. package/template/.pi/skills/frontend-commit/SKILL.md +4 -93
  139. package/template/.pi/skills/git-commit-core/SKILL.md +18 -0
  140. package/template/.pi/skills/java-backend-commit/SKILL.md +4 -96
  141. package/template/.pi/skills/llm-wiki/SKILL.md +12 -13
  142. package/template/.pi/skills/llm-wiki/assets/CLAUDE.md.template +7 -1
  143. package/template/.pi/skills/llm-wiki/references/compile.md +21 -114
  144. package/template/.pi/skills/llm-wiki/references/ingest.md +8 -33
  145. package/template/.pi/skills/llm-wiki/references/lint.md +9 -46
  146. package/template/.pi/skills/llm-wiki/references/query.md +9 -18
  147. package/template/.pi/skills/llm-wiki/references/schema.md +56 -29
  148. package/template/.pi/skills/llm-wiki/references/transactions.md +48 -0
  149. package/template/.pi/skills/llm-wiki/references/writing.md +4 -4
  150. package/template/.pi/skills/llm-wiki/scripts/advise.mjs +46 -58
  151. package/template/.pi/skills/llm-wiki/scripts/advise.test.mjs +11 -16
  152. package/template/.pi/skills/llm-wiki/scripts/core.mjs +262 -0
  153. package/template/.pi/skills/llm-wiki/scripts/extract.mjs +35 -18
  154. package/template/.pi/skills/llm-wiki/scripts/extract.test.mjs +5 -8
  155. package/template/.pi/skills/llm-wiki/scripts/feedback.mjs +51 -0
  156. package/template/.pi/skills/llm-wiki/scripts/inventory.mjs +43 -171
  157. package/template/.pi/skills/llm-wiki/scripts/inventory.test.mjs +25 -18
  158. package/template/.pi/skills/llm-wiki/scripts/lint-wikilinks.mjs +69 -92
  159. package/template/.pi/skills/llm-wiki/scripts/lint-wikilinks.test.mjs +25 -37
  160. package/template/.pi/skills/llm-wiki/scripts/migrate.mjs +51 -0
  161. package/template/.pi/skills/llm-wiki/scripts/query.mjs +149 -0
  162. package/template/.pi/skills/llm-wiki/scripts/regressions.test.mjs +101 -0
  163. package/template/.pi/skills/llm-wiki/scripts/sources.mjs +166 -0
  164. package/template/.pi/skills/llm-wiki/scripts/transaction.mjs +384 -0
  165. package/template/.pi/skills/llm-wiki/scripts/v2.test.mjs +354 -0
  166. package/template/.pi/skills/prototype/LOGIC.md +1 -1
  167. package/template/.pi/skills/prototype/SKILL.md +5 -19
  168. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +3 -3
  169. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -0
  170. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +2 -3
  171. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +14 -0
  172. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +8 -8
  173. package/template/.pi/skills/yss-product-lifecycle/references/external-input-questionnaire.md +19 -0
  174. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  175. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +20 -4
  176. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  177. package/template/.pi/skills/yss-product-lifecycle/references/plan-requirements.md +10 -0
  178. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
  179. package/template/.pi/skills/yss-research/SKILL.md +4 -0
  180. package/template/.template-spec/agents/README.md +1 -1
  181. package/template/.template-spec/agents/digital-human-roles.yaml +1 -1
  182. package/template/.template-spec/agents/skill-migrations.md +15 -0
  183. package/template/.template-spec/agents/yss-skill-registry.yaml +10 -29
  184. package/template/.template-spec/architecture/README.md +3 -34
  185. package/template/.template-spec/plan/templates/competitive-analysis-template.md +2 -2
  186. package/template/.template-spec/process/contract-reading.md +24 -0
  187. package/template/.template-spec/process/lifecycle-registry-baseline.json +3 -1
  188. package/template/.template-spec/process/lifecycle-registry.yaml +6 -0
  189. package/template/.template-spec/process/research-completion.md +23 -0
  190. package/template/.template-spec/process/schemas/digital-human-task-package.schema.json +202 -12
  191. package/template/.template-spec/process/schemas/frontend-implementation-evidence.schema.json +7 -15
  192. package/template/.template-spec/process/subagent-collaboration.md +8 -0
  193. package/template/.template-spec/process/templates/frontend-implementation-verification-template.yaml +15 -1
  194. package/template/AGENTS.md +1 -1
  195. package/template/CONTEXT.md +5 -1
  196. package/template/README.md +12 -24
  197. package/template/scripts/contract +5 -5
  198. package/template/scripts/lib/contract-views.mjs +57 -2
  199. package/template/scripts/lib/execution-evidence.mjs +51 -0
  200. package/template/scripts/lib/harness-execution-scope.mjs +1 -1
  201. package/template/scripts/lib/implementation-contract-compiler.mjs +2 -0
  202. package/template/scripts/lib/lifecycle-context-query.mjs +15 -3
  203. package/template/scripts/lib/lifecycle-status.mjs +32 -6
  204. package/template/scripts/lib/lifecycle-transition.mjs +19 -1
  205. package/template/scripts/lib/maintenance-research.mjs +63 -0
  206. package/template/scripts/lib/read-only-intake.mjs +132 -0
  207. package/template/scripts/lib/skill-registry.mjs +2 -1
  208. package/template/scripts/lib/skill-supply-chain.mjs +4 -0
  209. package/template/scripts/lib/slice-task-package.mjs +1 -1
  210. package/template/scripts/lib/task-package.mjs +9 -2
  211. package/template/scripts/lifecycle-status +2 -2
  212. package/template/scripts/prepare-read-only-intake +16 -0
  213. package/template/scripts/run-read-only-intake +14 -0
  214. package/template/scripts/verify-digital-human-task-package +2 -2
  215. package/template/scripts/verify-frontend-implementation-evidence +24 -1
  216. package/template/scripts/verify-maintenance-research +13 -0
  217. package/template/skills-lock.json +19 -76
  218. package/template.manifest.json +118 -29
  219. package/template.snapshot.json +5 -6
  220. package/template/.agents/skills/grill-with-docs/SKILL.md +0 -20
  221. package/template/.agents/skills/grill-with-docs/agents/openai.yaml +0 -5
  222. package/template/.agents/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  223. package/template/.agents/skills/prototype/UI.md +0 -112
  224. package/template/.agents/skills/setup-matt-pocock-skills/domain.md +0 -37
  225. package/template/.agents/skills/to-questionnaire/SKILL.md +0 -55
  226. package/template/.agents/skills/to-questionnaire/agents/openai.yaml +0 -5
  227. package/template/.agents/skills/wait-what/SKILL.md +0 -7
  228. package/template/.agents/skills/wait-what/agents/openai.yaml +0 -5
  229. package/template/.codex/skills/data-analytics/.app.json +0 -84
  230. package/template/.codex/skills/data-analytics/.codex-plugin/plugin.json +0 -66
  231. package/template/.codex/skills/data-analytics/.mcp.json +0 -30
  232. package/template/.codex/skills/data-analytics/AGENTS.md +0 -20
  233. package/template/.codex/skills/data-analytics/DEPENDENCIES.MD +0 -27
  234. package/template/.codex/skills/data-analytics/README.md +0 -60
  235. package/template/.codex/skills/data-analytics/__yss_dotfile__.gitignore +0 -2
  236. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html +0 -16
  237. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part001 +0 -1
  238. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part002 +0 -1
  239. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part003 +0 -1
  240. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part004 +0 -1
  241. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part005 +0 -1
  242. package/template/.codex/skills/data-analytics/assets/datascience-artifact-widget.html.gz.b64.part006 +0 -1
  243. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html +0 -16
  244. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part001 +0 -1
  245. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part002 +0 -1
  246. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part003 +0 -1
  247. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part004 +0 -1
  248. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part005 +0 -1
  249. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part006 +0 -1
  250. package/template/.codex/skills/data-analytics/assets/datascience-chart-widget.html.gz.b64.part007 +0 -1
  251. package/template/.codex/skills/data-analytics/assets/datascience-small.svg +0 -5
  252. package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html +0 -16
  253. package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part001 +0 -1
  254. package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part002 +0 -1
  255. package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part003 +0 -1
  256. package/template/.codex/skills/data-analytics/assets/datascience-table-widget.html.gz.b64.part004 +0 -1
  257. package/template/.codex/skills/data-analytics/assets/datascience.png +0 -0
  258. package/template/.codex/skills/data-analytics/assets/datascience.svg +0 -10
  259. package/template/.codex/skills/data-analytics/mcp/server.cjs +0 -2964
  260. package/template/.codex/skills/data-analytics/package-lock.json +0 -3048
  261. package/template/.codex/skills/data-analytics/package.json +0 -43
  262. package/template/.codex/skills/data-analytics/scripts/normalize-widget-assets.mjs +0 -75
  263. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +0 -137
  264. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/agents/openai.yaml +0 -6
  265. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +0 -29
  266. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +0 -148
  267. package/template/.codex/skills/data-analytics/skills/build-dashboard/agents/openai.yaml +0 -6
  268. package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/bi-platform-dashboard.md +0 -18
  269. package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/html-dashboard.md +0 -24
  270. package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/mcp-artifact-dashboard.md +0 -71
  271. package/template/.codex/skills/data-analytics/skills/build-dashboard/specifications/streamlit-dashboard.md +0 -85
  272. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +0 -207
  273. package/template/.codex/skills/data-analytics/skills/build-report/agents/openai.yaml +0 -6
  274. package/template/.codex/skills/data-analytics/skills/build-report/assets/executive-report-shell.html +0 -70
  275. package/template/.codex/skills/data-analytics/skills/build-report/assets/technical-report-shell.html +0 -66
  276. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +0 -108
  277. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/agents/openai.yaml +0 -6
  278. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/__init__.py +0 -1
  279. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +0 -52
  280. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/constants.py +0 -61
  281. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/docx_writer.py +0 -362
  282. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/html_parser.py +0 -829
  283. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/model.py +0 -30
  284. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +0 -127
  285. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/quality.py +0 -374
  286. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/rendering.py +0 -613
  287. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/table_utils.py +0 -54
  288. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/utils.py +0 -16
  289. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc_plan.py +0 -9
  290. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +0 -45
  291. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +0 -77
  292. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/agents/openai.yaml +0 -6
  293. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/scripts/report_to_google_slides.py +0 -2379
  294. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +0 -88
  295. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/agents/openai.yaml +0 -6
  296. package/template/.codex/skills/data-analytics/skills/build-report/specifications/executive-report.md +0 -97
  297. package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +0 -59
  298. package/template/.codex/skills/data-analytics/skills/build-report/specifications/technical-report.md +0 -75
  299. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +0 -103
  300. package/template/.codex/skills/data-analytics/skills/design-kpis/agents/openai.yaml +0 -6
  301. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +0 -68
  302. package/template/.codex/skills/data-analytics/skills/gather-business-context/agents/openai.yaml +0 -6
  303. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +0 -251
  304. package/template/.codex/skills/data-analytics/skills/index/agents/openai.yaml +0 -6
  305. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +0 -131
  306. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/agents/openai.yaml +0 -6
  307. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +0 -141
  308. package/template/.codex/skills/data-analytics/skills/kpi-reporting/agents/openai.yaml +0 -6
  309. package/template/.codex/skills/data-analytics/skills/kpi-reporting/references/report-templates.md +0 -32
  310. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +0 -106
  311. package/template/.codex/skills/data-analytics/skills/market-sizing/agents/openai.yaml +0 -6
  312. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +0 -130
  313. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/agents/openai.yaml +0 -6
  314. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +0 -141
  315. package/template/.codex/skills/data-analytics/skills/product-business-analysis/agents/openai.yaml +0 -6
  316. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +0 -178
  317. package/template/.codex/skills/data-analytics/skills/spreadsheets/agents/openai.yaml +0 -9
  318. package/template/.codex/skills/data-analytics/skills/spreadsheets/assets/file-spreadsheet.png +0 -0
  319. package/template/.codex/skills/data-analytics/skills/spreadsheets/charts.md +0 -31
  320. package/template/.codex/skills/data-analytics/skills/spreadsheets/references/artifact_tool_api.md +0 -466
  321. package/template/.codex/skills/data-analytics/skills/spreadsheets/style_guidelines.md +0 -99
  322. package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +0 -197
  323. package/template/.codex/skills/data-analytics/skills/user-context/agents/openai.yaml +0 -6
  324. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +0 -26
  325. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/source-category-config.json +0 -51
  326. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/user-context-config.md +0 -66
  327. package/template/.codex/skills/data-analytics/skills/user-context/references/automation.md +0 -69
  328. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +0 -204
  329. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-state-template.json +0 -87
  330. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +0 -497
  331. package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/connector-playbook.md +0 -74
  332. package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/setup.md +0 -65
  333. package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/skill-template.md +0 -160
  334. package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/source-intake.md +0 -75
  335. package/template/.codex/skills/data-analytics/skills/user-context/references/semantic-layer/weekly-polling-automation.md +0 -96
  336. package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +0 -263
  337. package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +0 -1462
  338. package/template/.codex/skills/data-analytics/skills/user-context/scripts/init_user_context_state.py +0 -128
  339. package/template/.codex/skills/data-analytics/skills/user-context/scripts/reset_user_context_state.py +0 -101
  340. package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +0 -499
  341. package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +0 -978
  342. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +0 -126
  343. package/template/.codex/skills/data-analytics/skills/validate-data/agents/openai.yaml +0 -6
  344. package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +0 -70
  345. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +0 -157
  346. package/template/.codex/skills/data-analytics/skills/visualize-data/agents/openai.yaml +0 -6
  347. package/template/.codex/skills/data-analytics/skills/visualize-data/references/seaborn-templates.md +0 -774
  348. package/template/.codex/skills/data-analytics/src/DESIGN.md +0 -222
  349. package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +0 -3666
  350. package/template/.codex/skills/data-analytics/src/analytics-app/analytics-layout.test.mjs +0 -136
  351. package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartFrame.tsx +0 -54
  352. package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartLegend.tsx +0 -96
  353. package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartRenderer.tsx +0 -1647
  354. package/template/.codex/skills/data-analytics/src/analytics-app/charting/ChartTooltip.tsx +0 -245
  355. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-app-helpers.tsx +0 -462
  356. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-capabilities.ts +0 -107
  357. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-compatibility.ts +0 -164
  358. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-contract.ts +0 -192
  359. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-theme.ts +0 -203
  360. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-tokens.css +0 -619
  361. package/template/.codex/skills/data-analytics/src/analytics-app/charting/chart-transforms.ts +0 -402
  362. package/template/.codex/skills/data-analytics/src/analytics-app/fonts/SystemSansVariableVF.woff2 +0 -0
  363. package/template/.codex/skills/data-analytics/src/analytics-app/imageExport.ts +0 -370
  364. package/template/.codex/skills/data-analytics/src/analytics-app/layout/AnalyticsLayoutCanvas.tsx +0 -536
  365. package/template/.codex/skills/data-analytics/src/analytics-app/layout/RichMarkdown.tsx +0 -681
  366. package/template/.codex/skills/data-analytics/src/analytics-app/layout/analyticsLayoutCore.ts +0 -164
  367. package/template/.codex/skills/data-analytics/src/analytics-app/main.tsx +0 -21
  368. package/template/.codex/skills/data-analytics/src/analytics-app/scripts/chart_contract.py +0 -472
  369. package/template/.codex/skills/data-analytics/src/analytics-app/scripts/check_analytics_app_runtime_links.py +0 -75
  370. package/template/.codex/skills/data-analytics/src/analytics-app/scripts/design_contract.py +0 -142
  371. package/template/.codex/skills/data-analytics/src/analytics-app/scripts/package_utils.py +0 -142
  372. package/template/.codex/skills/data-analytics/src/analytics-app/scripts/tests/test_package_utils.py +0 -377
  373. package/template/.codex/skills/data-analytics/src/analytics-app/styles.css +0 -3468
  374. package/template/.codex/skills/data-analytics/src/analytics-app/tables/DataTable.d.ts +0 -44
  375. package/template/.codex/skills/data-analytics/src/analytics-app/tables/DataTable.jsx +0 -639
  376. package/template/.codex/skills/data-analytics/src/analytics-app/tables/data-table.css +0 -327
  377. package/template/.codex/skills/data-analytics/src/analytics-app/tokens.css +0 -225
  378. package/template/.codex/skills/data-analytics/src/analytics-app/types.ts +0 -204
  379. package/template/.codex/skills/data-analytics/src/analytics-app-core.md +0 -85
  380. package/template/.codex/skills/data-analytics/src/codex-style-contract.md +0 -30
  381. package/template/.codex/skills/data-analytics/src/datascience-artifact-widget.html +0 -12
  382. package/template/.codex/skills/data-analytics/src/datascience-artifact-widget.jsx +0 -1008
  383. package/template/.codex/skills/data-analytics/src/datascience-chart-widget.css +0 -2117
  384. package/template/.codex/skills/data-analytics/src/datascience-chart-widget.html +0 -122
  385. package/template/.codex/skills/data-analytics/src/datascience-chart-widget.js +0 -3588
  386. package/template/.codex/skills/data-analytics/src/datascience-table-widget.css +0 -483
  387. package/template/.codex/skills/data-analytics/src/datascience-table-widget.html +0 -32
  388. package/template/.codex/skills/data-analytics/src/datascience-table-widget.js +0 -333
  389. package/template/.codex/skills/data-analytics/src/mcp-host.js +0 -153
  390. package/template/.codex/skills/data-analytics/src/recharts-config.js +0 -315
  391. package/template/.codex/skills/data-analytics/src/recharts-renderer.jsx +0 -294
  392. package/template/.codex/skills/data-analytics/src/sql-source-view.css +0 -33
  393. package/template/.codex/skills/data-analytics/src/sql-source-view.js +0 -157
  394. package/template/.codex/skills/data-analytics/src/styles/codex-theme.css +0 -121
  395. package/template/.codex/skills/data-analytics/src/table-renderer.jsx +0 -28
  396. package/template/.codex/skills/data-analytics/tests/chart-transforms.test.mjs +0 -87
  397. package/template/.codex/skills/data-analytics/tests/funnel-smoke.html +0 -105
  398. package/template/.codex/skills/data-analytics/tests/inline-widget-compare.html +0 -233
  399. package/template/.codex/skills/data-analytics/tests/mcp-server.test.mjs +0 -1500
  400. package/template/.codex/skills/data-analytics/tests/native-style-contract.test.mjs +0 -219
  401. package/template/.codex/skills/data-analytics/tests/recharts-config.test.mjs +0 -144
  402. package/template/.codex/skills/data-analytics/tests/recharts-renderer.test.mjs +0 -11
  403. package/template/.codex/skills/data-analytics/tests/rich-markdown.test.mjs +0 -54
  404. package/template/.codex/skills/data-analytics/tests/widget-render-harness.html +0 -321
  405. package/template/.codex/skills/data-analytics/tsconfig.json +0 -19
  406. package/template/.codex/skills/data-analytics/vite.config.ts +0 -46
  407. package/template/.codex/skills/grill-with-docs/SKILL.md +0 -20
  408. package/template/.codex/skills/grill-with-docs/agents/openai.yaml +0 -5
  409. package/template/.codex/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  410. package/template/.codex/skills/prototype/UI.md +0 -112
  411. package/template/.codex/skills/setup-matt-pocock-skills/domain.md +0 -37
  412. package/template/.codex/skills/to-questionnaire/SKILL.md +0 -55
  413. package/template/.codex/skills/to-questionnaire/agents/openai.yaml +0 -5
  414. package/template/.codex/skills/wait-what/SKILL.md +0 -7
  415. package/template/.codex/skills/wait-what/agents/openai.yaml +0 -5
  416. package/template/.cursor/skills/grill-with-docs/SKILL.md +0 -20
  417. package/template/.cursor/skills/grill-with-docs/agents/openai.yaml +0 -5
  418. package/template/.cursor/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  419. package/template/.cursor/skills/prototype/UI.md +0 -112
  420. package/template/.cursor/skills/setup-matt-pocock-skills/domain.md +0 -37
  421. package/template/.cursor/skills/to-questionnaire/SKILL.md +0 -55
  422. package/template/.cursor/skills/to-questionnaire/agents/openai.yaml +0 -5
  423. package/template/.cursor/skills/wait-what/SKILL.md +0 -7
  424. package/template/.cursor/skills/wait-what/agents/openai.yaml +0 -5
  425. package/template/.pi/skills/grill-with-docs/SKILL.md +0 -20
  426. package/template/.pi/skills/grill-with-docs/agents/openai.yaml +0 -5
  427. package/template/.pi/skills/improve-codebase-architecture/agents/openai.yaml +0 -5
  428. package/template/.pi/skills/prototype/UI.md +0 -112
  429. package/template/.pi/skills/setup-matt-pocock-skills/domain.md +0 -37
  430. package/template/.pi/skills/to-questionnaire/SKILL.md +0 -55
  431. package/template/.pi/skills/to-questionnaire/agents/openai.yaml +0 -5
  432. package/template/.pi/skills/wait-what/SKILL.md +0 -7
  433. package/template/.pi/skills/wait-what/agents/openai.yaml +0 -5
  434. package/template/.template-spec/agents/domain.md +0 -31
  435. /package/template/.agents/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
  436. /package/template/.codex/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
  437. /package/template/.cursor/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
  438. /package/template/.pi/skills/{improve-codebase-architecture → codebase-design/references}/HTML-REPORT.md +0 -0
@@ -1,43 +0,0 @@
1
- {
2
- "name": "datascience-mcp-widgets",
3
- "version": "0.1.34",
4
- "type": "module",
5
- "private": true,
6
- "scripts": {
7
- "build": "npm run build:chart && npm run build:table && npm run build:artifact && npm run normalize:assets",
8
- "build:artifact": "cross-env INPUT=datascience-artifact-widget.html vite build",
9
- "build:chart": "cross-env INPUT=datascience-chart-widget.html vite build",
10
- "build:table": "cross-env INPUT=datascience-table-widget.html vite build",
11
- "dev": "concurrently \"npm:dev:chart\" \"npm:dev:table\" \"npm:dev:artifact\"",
12
- "dev:artifact": "cross-env INPUT=datascience-artifact-widget.html vite build --watch",
13
- "dev:chart": "cross-env INPUT=datascience-chart-widget.html vite build --watch",
14
- "dev:table": "cross-env INPUT=datascience-table-widget.html vite build --watch",
15
- "preview:widgets": "vite --host 127.0.0.1",
16
- "normalize:assets": "node scripts/normalize-widget-assets.mjs",
17
- "test": "node --test tests/*.test.mjs",
18
- "typecheck": "tsc --noEmit"
19
- },
20
- "dependencies": {
21
- "@lexical/history": "^0.44.0",
22
- "@lexical/link": "^0.44.0",
23
- "@lexical/list": "^0.44.0",
24
- "@lexical/markdown": "^0.44.0",
25
- "@lexical/react": "^0.44.0",
26
- "@lexical/rich-text": "^0.44.0",
27
- "@modelcontextprotocol/ext-apps": "^1.7.0",
28
- "html-to-image": "1.11.13",
29
- "lexical": "^0.44.0",
30
- "lucide-react": "^0.468.0",
31
- "react": "^19.2.3",
32
- "react-dom": "^19.2.3",
33
- "recharts": "^3.8.1"
34
- },
35
- "devDependencies": {
36
- "@types/node": "^25.6.0",
37
- "concurrently": "^9.2.1",
38
- "cross-env": "^10.1.0",
39
- "typescript": "^6.0.2",
40
- "vite": "^8.0.8",
41
- "vite-plugin-singlefile": "^2.3.3"
42
- }
43
- }
@@ -1,75 +0,0 @@
1
- import { readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
2
- import { dirname, resolve } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
- import { gzipSync } from "node:zlib";
5
-
6
- const pluginRoot = resolve(dirname(fileURLToPath(import.meta.url)), "..");
7
- const assetDir = resolve(pluginRoot, "assets");
8
- const maxChunkChars = 120_000;
9
- const widgetAssets = [
10
- "datascience-artifact-widget.html",
11
- "datascience-chart-widget.html",
12
- "datascience-table-widget.html",
13
- ];
14
-
15
- for (const asset of widgetAssets) {
16
- const path = resolve(assetDir, asset);
17
- const html = readFileSync(path, "utf8");
18
- assertBuiltWidgetHtml(asset, html);
19
- const normalized = sanitizePublicCopy(html).replace(/[ \t]+$/gm, "");
20
- const encoded = gzipSync(Buffer.from(normalized, "utf8"), { level: 9 }).toString("base64");
21
- const prefix = `${asset}.gz.b64.part`;
22
-
23
- for (const name of readdirSync(assetDir)) {
24
- if (name.startsWith(prefix)) rmSync(resolve(assetDir, name));
25
- }
26
-
27
- for (let offset = 0, index = 1; offset < encoded.length; offset += maxChunkChars, index += 1) {
28
- const chunk = encoded.slice(offset, offset + maxChunkChars);
29
- const chunkName = `${prefix}${String(index).padStart(3, "0")}`;
30
- writeFileSync(resolve(assetDir, chunkName), `${chunk}\n`);
31
- }
32
-
33
- writeFileSync(path, localDevRedirect(asset));
34
- }
35
-
36
- function assertBuiltWidgetHtml(asset, html) {
37
- if (html.includes("Redirecting to the local widget source") || html.includes("window.location.replace(target)")) {
38
- throw new Error(
39
- `${asset} is still the local development redirect; run npm run build before npm run normalize:assets`,
40
- );
41
- }
42
- }
43
-
44
- function sanitizePublicCopy(html) {
45
- return html
46
- .replace(/\bInternal error\b/g, "Widget error")
47
- .replace(/\binternal error\b/g, "widget error")
48
- .replace(/\bInternal\b/g, "Implementation")
49
- .replace(/\binternal\b/g, "implementation");
50
- }
51
-
52
- function localDevRedirect(asset) {
53
- const title = asset.includes("artifact")
54
- ? "Data Analytics artifact app"
55
- : asset.includes("table")
56
- ? "Data Analytics table widget"
57
- : "Data Analytics chart widget";
58
- return `<!doctype html>
59
- <html lang="en">
60
- <head>
61
- <meta charset="utf-8" />
62
- <title>${title}</title>
63
- <script type="module">
64
- const target = new URL("../src/${asset}", import.meta.url);
65
- target.search = window.location.search;
66
- window.location.replace(target);
67
- </script>
68
- </head>
69
- <body>
70
- <p>Redirecting to the local widget source for development.</p>
71
- <p><a href="../src/${asset}">Open ${title}</a></p>
72
- </body>
73
- </html>
74
- `;
75
- }
@@ -1,137 +0,0 @@
1
- ---
2
- name: analyze-data-quality
3
- description: "Assess analytical data quality: grain, freshness, nulls, duplicates, joins, schema drift and source consistency."
4
- ---
5
-
6
- # Analyze Data Quality
7
-
8
- Assess whether a dataset is trustworthy enough for analysis, modeling,
9
- dashboards, experiments, or downstream pipelines. Start with the intended use and grain, run the highest-value checks for the data shape, and report concrete evidence, analytical risk, likely causes, and the smallest useful remediation or automated test.
10
-
11
- ## Skill Configuration
12
-
13
- ### User Context
14
-
15
- Mandatory pre-answer gate: Invoke `data-analytics:user-context` in preflight mode by loading [data-analytics:user-context](../user-context/SKILL.md) and using its read-only preflight before source selection. Reuse the already loaded envelope within the same workflow while the resolved state paths, file digests, request mode and source scope are unchanged; re-read on change, missing context or explicit inspection. Do not look for a callable MCP tool named `data-analytics:user-context`. Use the returned `data_analytics_preflight` envelope as the source of truth for saved context, source-category mapping, semantic-layer registry, onboarding/final-response obligations, and conditional guidance; use saved context and semantic layers as source-selection inputs, not as substitutes for workflow-time reads from connected or provided sources. Do not read or reinterpret raw plugin state files unless preflight fails, declares required content omitted, local shell access is unavailable, or the user explicitly asks for raw state inspection.
16
-
17
- ## Workflow
18
-
19
- Choose checks from the data grain, intended decision and known risk. Reuse fresh checks already covering the same source/query/transform; do not repeat the catalog. A notebook is needed only when reproducibility or multi-step analysis warrants it. Preserve blocking correctness findings and report material limitations.
20
-
21
-
22
- 1. Clarify the quality question and operating context.
23
-
24
- Establish what the dataset represents, the intended unit of analysis, the downstream use, whether the user cares about raw ingestion quality,
25
- transformed-model quality, or both, and the comparison baseline such as prior weeks, prior schema, or a trusted reference table. Identify expected grain,
26
- primary keys or candidate keys, important date columns, timezone assumptions,
27
- domain rules, allowed values, and business thresholds. If context is missing,
28
- infer cautiously and label assumptions.
29
-
30
- 2. Choose an inspectable analysis path.
31
-
32
- When multi-step SQL/Python analysis needs a reproducible narrative, use a companion notebook; a bounded check may provide its query/script and result directly. Use $jupyter-notebooks when a dedicated notebook scaffold or refactor workflow would help. For queryable tables, use `~~structured_data` to confirm schema, grain, sample rows, and query rules through the relevant source connector before heavier checks. Use `~~operations_logs` for freshness and lineage when those checks matter.
33
-
34
- 3. Build a compact profile.
35
-
36
- Start with row count, column count, column names and types, candidate keys,
37
- duplicate rates on likely identifiers, min/max timestamps for relevant date columns, null rates, distinct counts for likely categorical columns, and basic numeric summaries for measure columns. Confirm grain before interpreting anomalies; many apparent quality problems are mixed-grain data,
38
- partial backfills, late-arriving data, or duplicated joins.
39
-
40
- 4. Run core quality checks.
41
-
42
- Select checks that match the dataset and task. Default to the most relevant checks across completeness, uniqueness, validity, consistency, integrity,
43
- timeliness, volume, and shape. Compare rates, not just counts, and segment by time, source, country, platform, model version, or other key dimensions when that helps distinguish real issues from expected variation.
44
-
45
- 5. Run shape-specific checks.
46
-
47
- Adapt the checks to the data shape:
48
-
49
- - Event data: duplicate event IDs, future event timestamps, session or user
50
- coverage gaps, and abrupt event-mix changes after releases.
51
- - Dimension tables: non-unique business keys, orphan surrogate keys, status
52
- changes without corresponding timestamps, and unexpected churn in reference
53
- values.
54
- - Fact tables: mixed grain, impossible measures such as negative revenue or
55
- quantity, join blowups to dimensions, and late-arriving or partially loaded
56
- partitions.
57
- - ML feature or scoring tables: leakage from post-outcome fields, feature
58
- sparsity spikes, range shifts after model or feature-store changes, and
59
- class-label drift.
60
- - Experiment data: duplicate assignments, variant imbalance beyond
61
- expectation, exposure without assignment, and events before assignment
62
- timestamp.
63
-
64
- 6. Run temporal and distribution checks when history exists.
65
-
66
- Prioritize temporal diagnostics when the user mentions "after X date",
67
- "suddenly", "recently", or "only started appearing". Check first-seen dates,
68
- last-seen dates, daily or weekly null-rate trends, duplicate-rate trends, row count trends, category-share shifts, distribution drift, and change points around launches, migrations, incidents, model changes, or backfills.
69
-
70
- 7. Investigate analytical risks and likely causes.
71
-
72
- Tie each issue to the downstream risk: broken trusted analysis, biased decisions, broken joins, stale dashboards, incorrect experiments, leakage,
73
- unreliable model features, or misleading segments. When possible, identify whether the issue is isolated to a source, segment, partition, time window,
74
- release, migration, backfill, or upstream pipeline change.
75
-
76
- 8. Recommend fixes or automated tests.
77
-
78
- Recommend the smallest set of follow-up fixes, monitoring, or automated tests that would materially reduce risk. Suggest automation only when the rule is stable and worth maintaining. Include or save the notebook/query path when code produced the findings.
79
-
80
- ## Standards
81
-
82
- ### 按影响选择检查
83
-
84
- 先确认 grain、关键字段和决策风险,再按需读取 [质量检查方法](references/quality-checks.md)。对实际使用的字段/关联执行验证;不把全部目录作为每个任务的固定步骤。
85
-
86
- ### Severity
87
-
88
- - Critical: breaks trusted analysis, core joins, production dashboards, or key decisions, such as duplicated grain, missing primary keys, or stale production data.
89
- - High: materially biases downstream decisions, such as large null spikes,
90
- category drift in a core dimension, invalid business-rule values, leakage, or severe join coverage loss.
91
- - Medium: localized or explainable issues that still need documentation,
92
- monitoring, or owner follow-up.
93
- - Low: cosmetic inconsistencies, expected sparsity, or known edge cases that do not materially affect current use.
94
-
95
- Do not dump raw profiling output without interpretation. Tie each finding to an analytical risk and likely impact.
96
-
97
- ### Automated Test Guidance
98
-
99
- - Good candidates for automation: primary key uniqueness, not-null checks on required columns, accepted values for stable enums, referential integrity,
100
- freshness thresholds, and seasonality-aware row-count or volume bounds.
101
- - Use caution with hard-coded distribution thresholds on volatile product metrics, strict uniqueness in messy entity-resolution use cases, and recent partitions when late-arriving data is normal.
102
- - Suggest automated tests only when the expected rule is stable, important, and maintainable.
103
-
104
- ### Output Standards
105
-
106
- Structure the response with:
107
-
108
- 1. dataset and grain summary
109
- 2. checks performed
110
- 3. findings
111
- 4. temporal or trend anomalies
112
- 5. likely causes and impacted use cases
113
- 6. recommended fixes or automated tests
114
- 7. assumptions and open questions
115
-
116
- For each finding, include:
117
-
118
- - what failed
119
- - evidence: counts, rates, segments, and dates
120
- - why it matters
121
- - severity and confidence level
122
- - likely cause when known
123
- - suggested remediation or automated test
124
-
125
- When code was used, retain the exact queries/scripts and results. Use a notebook when complexity or the requested output calls for one.
126
-
127
- ### Defaults
128
-
129
- - Prefer small, high-signal tables over exhaustive dumps.
130
- - Compare rates, not just counts.
131
- - Break checks out by time and key segments whenever possible.
132
- - Normalize strings before judging duplicates or distinct-count spikes.
133
- - Treat recent partitions carefully when data arrives late.
134
- - Call out when an anomaly could be caused by a legitimate product launch,
135
- experiment, migration, incident, model change, or backfill.
136
- - Preserve inspectable evidence: SQL, query links, notebook paths, source paths,
137
- sample rows, chart outputs, and calculation notes.
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Analyze Data Quality"
3
- short_description: "Assess tables and datasets before analysis or publication"
4
- default_prompt: "Assess a dataset or table for quality risks before I rely on it for analysis or reporting."
5
- policy:
6
- allow_implicit_invocation: false
@@ -1,29 +0,0 @@
1
- ### Core Checks
2
-
3
- - Completeness: null rate by column; null rate by partition, segment, and time bucket; unexpected empty strings or sentinel values; required-column population rate.
4
- - Uniqueness: exact duplicate rows, duplicate primary keys, duplicate composite keys, and proportion unique for semi-unique fields such as emails or device IDs.
5
- - Validity: type conformance after casting; format checks for IDs, emails, URLs,
6
- enums, country codes, and timestamps; range checks for measures, percentages,
7
- counts, and dates; allowed-values checks for controlled vocabularies.
8
- - Consistency: cross-field rule checks, units or currency consistency, status and timestamp alignment, and agreement between duplicated fields from different sources.
9
- - Integrity: parent-child key coverage, orphan records, unexpected many-to-many joins, and broken slowly changing dimension joins.
10
- - Timeliness: freshness lag from source event time to load time, freshness lag from load time to report time, missing recent partitions, and unexplained historical rewrites or backfills.
11
- - Volume and shape: row-count drift, distinct-count drift, distribution drift,
12
- share-of-total drift for major categories, and new or disappeared categories.
13
-
14
- ### Specific Check Guidance
15
-
16
- - Duplicates and keys: check exact duplicates, primary key duplicates, composite key duplicates at the intended grain, and near-duplicates caused by whitespace,
17
- casing, formatting, or late updates. Report count, share of affected rows,
18
- duplicated keys, and whether duplication is isolated to a time range, source,
19
- or segment.
20
- - Missingness: distinguish acceptable sparsity from broken completeness. Check null rates over time, newly null columns after schema or pipeline changes, and sentinel values such as `''`, `'unknown'`, `'n/a'`, `0`, or `-1`.
21
- - Domain validity: check malformed identifiers, country codes, timestamps,
22
- impossible values, values outside allowed sets, and cross-field contradictions such as `is_cancelled = false` with a non-null `cancelled_at`.
23
- - Join coverage: when multiple datasets are involved, check foreign keys that do not match a parent table, unexpected one-to-many expansion, coverage loss when joining to dimensions or experiments, and row counts before and after joins.
24
- - Freshness and schema drift: check row-count changes against recent history,
25
- lag on important date columns, added/removed/retyped columns, and shifts in sparsity or cardinality that suggest upstream changes.
26
- - Outliers and distribution shifts: use robust methods such as quantiles, MAD,
27
- or IQR before defaulting to z-scores. Check sudden changes in mean, median,
28
- variance, zero rate, category share, and long-tail behavior.
29
- - Leakage, backfill, and time travel: check features populated before they should exist, future-dated records, late-arriving data causing unstable recent partitions, and backfills that change historical counts without annotation.
@@ -1,148 +0,0 @@
1
- ---
2
- name: build-dashboard
3
- description: "Build an analytical dashboard or scorecard with defined metrics, filters, source evidence and validation."
4
- ---
5
-
6
- # Dashboard Building
7
-
8
- Use this skill when the user needs a dashboard rather than a report, notebook-only analysis, spreadsheet, or transient chat summary. A good dashboard is summary-first, chart-led, scannable, and organized around what the audience needs to monitor, understand, or act on.
9
-
10
- Clarify with the user when a missing input would materially change the dashboard brief, analysis, or recommendation. Otherwise make a reasonable assumption, state it, and proceed.
11
-
12
- This skill owns the dashboard brief, delivery-mode selection, metric definitions, source expectations, layout logic, dashboard QA, and handoff. Delivery-specific mechanics belong in the selected dashboard specification.
13
-
14
- ## Skill Configuration
15
-
16
- ### User Context
17
-
18
- Mandatory pre-answer gate: Invoke `data-analytics:user-context` in preflight mode by loading [data-analytics:user-context](../user-context/SKILL.md) and using its read-only preflight before source selection. Reuse the already loaded envelope within the same workflow while the resolved state paths, file digests, request mode and source scope are unchanged; re-read on change, missing context or explicit inspection. Do not look for a callable MCP tool named `data-analytics:user-context`. Use the returned `data_analytics_preflight` envelope as the source of truth for saved context, source-category mapping, semantic-layer registry, onboarding/final-response obligations, and conditional guidance; use saved context and semantic layers as source-selection inputs, not as substitutes for workflow-time reads from connected or provided sources. Do not read or reinterpret raw plugin state files unless preflight fails, declares required content omitted, local shell access is unavailable, or the user explicitly asks for raw state inspection.
19
-
20
- ### Source Discovery And Verification
21
-
22
- Use the relevant semantic layer first when one exists. Treat it as the starting map for candidate metrics, tables, joins, filters, caveats, source precedence, and known conflicts.
23
-
24
- Do not stop at the semantic layer or the first plausible source. Search across the relevant available company source lanes, including structured data or data warehouses, dashboards, company docs, team communication, notebooks, code repositories, and other connected company knowledge or data that could change the answer.
25
-
26
- For source-backed analytical work, always verify through live source reads. When the answer depends on data, run fresh data queries against the available structured-data sources before drawing conclusions, even when the semantic layer already names likely tables or definitions.
27
-
28
- Use the combined evidence to determine which source controls the answer, note meaningful disagreements, and state why the selected source is authoritative.
29
-
30
- ### Source Access Guardrail
31
-
32
- Before querying sources, building artifacts, or drawing conclusions, determine whether the answer requires a specific source of truth.
33
-
34
- If a required source is unavailable, stop that path. Tell the user what source is needed, ask them to make it available or provide a reviewed fallback, and do not treat weaker substitutes as equivalent.
35
-
36
- If the missing source is only optional enrichment, continue with the strongest available evidence and label the gap when it materially affects the answer.
37
-
38
- ## Workflow
39
-
40
- ### 1. Define The Dashboard Brief
41
-
42
- Understand who will use the dashboard, what they need to measure or monitor, which metrics matter, what surface it should live in, and what constraints could change the build.
43
-
44
- Clarify only the inputs that materially affect the dashboard, such as the primary audience, measurement goal, metric scope, delivery surface, refresh expectations, required filters, access constraints, or sharing needs. Decide whether the dashboard is mainly for status monitoring, recurring operating review, or analytical exploration, because that changes the layout, filter design, and validation bar.
45
-
46
- Use $gather-business-context when dashboard purpose, metric definitions, operating context, audience expectations, or existing dashboard conventions are not clear enough to design the dashboard well.
47
-
48
- ### 2. Select The Delivery Surface
49
-
50
- Pick the first delivery surface that fits the user's need and available access. If the user specifies the destination or surface, use that instead of the default order.
51
-
52
- 1. Use a connected BI tool by default. Use the BI surface identified during onboarding or user context; if none is specified, look for an available connected BI solution before choosing another surface.
53
- 2. Use the MCP artifact app when a connected BI build is unavailable, too heavy for the request, or the user needs a compact in-Codex analytical dashboard.
54
- 3. Use HTML when BI and MCP are not suitable and the user needs a portable static dashboard.
55
-
56
- Use Streamlit only when the user explicitly asks for it or an existing Streamlit app must be changed.
57
-
58
- Read the matching specification before building:
59
-
60
- - `../../src/analytics-app-core.md` for shared MCP artifact mechanics, source safety, runtime behavior, and validation helpers.
61
- - `specifications/bi-platform-dashboard.md` for BI platform dashboards.
62
- - `specifications/mcp-artifact-dashboard.md` for dashboards rendered by the MCP artifact app.
63
- - `specifications/html-dashboard.md` for portable static HTML dashboards.
64
- - `specifications/streamlit-dashboard.md` for Streamlit dashboards.
65
-
66
- ### 3. Gather And Validate The Data
67
-
68
- Do the data work in this order:
69
-
70
- - **Find the source path before rendering.** Source discovery is part of dashboard building, not optional enrichment. Identify the source path for the core dashboard metrics. Use `~~structured_data` when the dashboard needs data from a warehouse or another structured data source. Use context lanes such as `~~company_docs`, `~~team_communication`, or `~~dashboards_or_bi` when the dashboard needs business meaning, source-of-truth guidance, metric definitions, or requirements that are not captured in structured data alone.
71
- - **Use durable dashboard data.** Validate the data before wiring it into the dashboard. Keep final extracts compact and aggregated unless a bounded detail table is part of the dashboard's purpose. Avoid final dashboards that depend on scratch or temporary tables.
72
- - **Validate trust.** For straightforward dashboards, confirm the source, grain, freshness, and basic reconciliation needed to trust the displayed metrics. Use $analyze-data-quality when data trust is a material risk, such as a new source, recent backfill, complex join, or surprising result.
73
- - **Resolve time and context anchors.** Before selecting metrics, establish any date anchor, comparison window, latest complete data date, source coverage, or authoritative artifact needed to shape the dashboard, such as a launch date, incident window, or campaign period. Use $gather-business-context when the prompt does not provide it. If still unclear, ask only when it would materially change the dashboard; otherwise state the assumption and shape queries around it.
74
- - **Stop if source-backed data is unavailable.** Do not render dashboards from fallback, sample, scratch, or partially blocked data unless the user explicitly asked for a mockup. If the core dashboard data is not available, stop the build path and tell the user what source or access is needed. Do not claim a dashboard was created from real data when the source path is missing.
75
-
76
- ### 4. Define The Metric Model
77
-
78
- **Select the metrics.**
79
-
80
- When selecting dashboard metrics, classify the measurement object and choose a balanced metric model for that object. Do not use a fixed checklist. Identify which metric families are decision-relevant and which are intentionally out of scope.
81
-
82
- Consider these metric families as prompts, not required sections:
83
-
84
- - Reach: who or what is using the thing, eligible population, penetration, activation, adoption, coverage.
85
- - Volume: events, usage, transactions, sessions, requests, units, throughput, frequency.
86
- - Value: revenue, cost, margin, savings, conversion, retention value, productivity, business outcome.
87
- - Quality: success, failure, reliability, latency, satisfaction, correctness, safety, support burden.
88
- - Depth: repeat usage, intensity, feature mix, workflow completion, productionization, maturity, lifecycle stage.
89
- - Mix: segment, customer type, geography, channel, model/product/version, plan, use case, cohort.
90
- - Movement: trend, growth, seasonality, pre/post change, benchmark, target, forecast, leading indicators.
91
- - Risk and constraints: data coverage, source freshness, known blind spots, capacity, compliance, operational limits.
92
-
93
- **Build breadth without flattening the dashboard.**
94
-
95
- Build enough metric breadth to cover every family that is relevant to the dashboard's measurement object and decision. Keep the default view hierarchical rather than exhaustive: lead with the primary outcome and the highest-signal drivers, then use sections, tabs, filters, detail tables, or supporting views for additional relevant metrics. A selected family can be represented by one or many KPIs, drivers, guardrails, or breakdowns, depending on what the user needs to monitor or diagnose.
96
-
97
- Map the selected families into dashboard roles before building: hero metrics for the default view, diagnostic metrics for movement and breakdowns, guardrails for interpretation, and detail metrics for lookup or follow-up.
98
-
99
- **Escalate when metric design is the hard part.**
100
-
101
- Invoke $design-kpis when this baseline metric-family pass is not enough, such as when the dashboard needs a deeper metric framework, target-setting, formal KPI tradeoff analysis, or clearer definitions than this workflow can safely infer. Pass the dashboard brief, business context, source context, existing metric definitions, and constraints so the recommended metrics fit the audience and use case.
102
-
103
- **Keep the data model consistent.**
104
-
105
- Build from a reusable compact data model where possible instead of many slightly different tile queries. Keep date logic, filters, dimensions, and metric definitions consistent across cards, charts, and tables so numbers reconcile. Reuse shared metric definitions from the selected tool or semantic layer when available.
106
-
107
- ### 5. Design The Dashboard Layout
108
-
109
- Make the default view useful before the viewer interacts. Arrange the dashboard from summary to detail: lead with the key status or primary KPI context, follow with movement over time, then show the breakdowns that explain the pattern, and put detail tables lower on the page when lookup or operational follow-up is needed.
110
-
111
- Use global filters only when they materially update the dashboard-wide view. Prefer a few high-signal controls over a dense filter panel. Keep dashboards visual-heavy and neutral: short labels, direct metric names, sparse annotations, and minimal explanatory text on the main canvas. Use human-readable short date form in visible labels and freshness text; keep ISO timestamps for machine-readable source metadata.
112
-
113
- Prefer human-readable short date forms in visible labels and tooltips unless the dashboard needs timestamps for operational precision.
114
-
115
- ### 6. Choose The Right Charts
116
-
117
- Use $visualize-data when the dashboard needs chart selection, visual encoding, or chart polish. This skill should define what each chart needs to communicate; $visualize-data handles the detailed visual design.
118
-
119
- Choose the simplest visual that answers the viewer's question. Use a chart when it makes the pattern easier to understand than text or a table.
120
-
121
- Put metrics in the same chart only when comparing them directly makes sense. Otherwise, split them into separate charts, KPI cards, or tables.
122
-
123
- Use the selected dashboard specification for exact schema, renderer, and interaction requirements.
124
-
125
- ### 7. Build And Validate In The Selected Surface
126
-
127
- Build in the selected surface using its native patterns. Before handoff, check that the dashboard opens cleanly, filters work, charts render, numbers reconcile, access is handled clearly, and performance is acceptable.
128
-
129
- Record the source or query path when it would be hard to rediscover later.
130
-
131
- ### 8. Hand Off The Dashboard
132
-
133
- Include the dashboard link or local artifact path, what validation was performed, source or access caveats, and any remaining sharing or operational steps. For MCP artifact dashboards, follow the validation and render handoff rules in `specifications/mcp-artifact-dashboard.md`.
134
-
135
- ## Dashboard Quality Bar
136
-
137
- Before handoff, make sure the dashboard is usable as a measurement surface:
138
-
139
- - The default view answers the primary audience question before the viewer interacts.
140
- - Filters are few, meaningful, and work across the surfaces they claim to control.
141
- - Cards, charts, and tables reconcile unless differences are clearly labeled.
142
- - Charts answer clear questions with compatible metrics.
143
- - Tables support lookup, comparison, or operational follow-up after the chart-led summary.
144
- - The metric set is broad enough for the measurement object: it covers the relevant families with primary outcomes, important drivers, guardrails, and supporting breakdowns while keeping the default view usable.
145
- - KPI cards are precisely defined: business-defined metrics include enough visible or nearby context for a reader to understand what is counted, over what window, and under what denominator or eligibility rule.
146
- - Source freshness, access limits, and caveats are visible where they matter.
147
- - The layout, labels, and performance work for the selected delivery mode.
148
- - The selected dashboard specification's validation and render rules were followed.
@@ -1,6 +0,0 @@
1
- interface:
2
- display_name: "Build Dashboard"
3
- short_description: "Create source-backed dashboards for monitoring performance, exploring drivers, and acting on metrics."
4
- default_prompt: "Build a dashboard for a product or business metric with clear definitions, useful filters, validation, and handoff."
5
- policy:
6
- allow_implicit_invocation: true
@@ -1,18 +0,0 @@
1
- # BI Platform Dashboard Specification
2
-
3
- Use this when the dashboard should live in a third-party or managed dashboard platform such as Tableau, Databricks dashboards, Looker, Power BI, Mode, or an managed BI surface. This surface is for long-lived, broadly shared dashboards with platform ownership, permissions, modeled data, refresh, and publishing.
4
-
5
- Default to `~~presentation_surface` when the user is editing an existing BI platform dashboard or making a new dashboard that should be shared broadly in a BI platform.
6
-
7
- Use `~~structured_data` before dashboard editing when you need to discover source tables, validate SQL, create query permalinks, or inspect sample rows through the relevant source connector when available.
8
- Use `~~operations_logs` when you need to check partition freshness and lineage.
9
-
10
- Preserve the user's requested audience, metrics, filters, data sources,
11
- ownership, and publication target. Do not switch to MCP artifact or Streamlit unless the user explicitly wants an in-Codex artifact, prototype, local app, or surface that is unsuitable for the BI platform.
12
-
13
- ## BI Platform Defaults
14
-
15
- - Keep the shared dashboard hierarchy: hero metrics first, then trend, then diagnosis, then detail.
16
- - Use modeled production tables or views for dashboard queries. Do not finalize dashboards that depend on scratch or temporary tables.
17
- - Use the BI platform's standard widgets by default. Let `~~presentation_surface` decide whether a classic dashboard tab, freeform tab, or platform specific layout is necessary.
18
- - Report the dashboard, active draft or platform URL, and any unresolved permission, publishing, or sharing constraints in the handoff.
@@ -1,24 +0,0 @@
1
- # HTML Dashboard Specification
2
-
3
- Use this when the dashboard should be delivered as a portable static HTML file rather than a connected BI dashboard, MCP artifact dashboard, or Streamlit app.
4
-
5
- ## When To Use
6
-
7
- - Use HTML when the user requests a static file or when BI and MCP surfaces are not suitable for the requested handoff.
8
- - Do not use HTML to bypass missing source access. HTML dashboards must still be source-backed, validated, and reproducible from reviewed data.
9
- - Prefer MCP artifacts for in-Codex handoff and BI tools for shared operating dashboards with managed refresh.
10
-
11
- ## Build Shape
12
-
13
- - Build a single portable HTML file when practical, with compact embedded data and no external runtime dependency unless the user asked for one.
14
- - Lead with the dashboard's primary metric context, then trends, diagnostic breakdowns, and detail tables.
15
- - Keep filters and interactions limited to controls that materially help the reader explore the dashboard.
16
- - Preserve source provenance in a visible sources or methodology section, including query links, source tables, freshness, definitions, and important filters.
17
- - Use compact reader-facing number formats in cards, chart labels, axes, tooltips, headings, and narrative text unless exact values are the point.
18
- - Define business-specific KPI labels in nearby text or a source/methodology section so the dashboard can be understood without reading SQL.
19
-
20
- ## Validation
21
-
22
- - Validate that the HTML opens locally, renders charts and tables, and has no obvious JavaScript errors.
23
- - Inspect the rendered page at desktop and narrow widths for clipping, overlap, unreadable labels, and broken controls.
24
- - Confirm that cards, charts, and tables reconcile against the reviewed source extracts before handoff.
@@ -1,71 +0,0 @@
1
- # MCP Artifact Dashboard Specification
2
-
3
- Use this when the dashboard should be rendered by the Data Analytics MCP app in Codex using `render_artifact`. This is the first-party dashboard surface for bounded, reviewed dashboard payloads that should stay inside the Codex/MCP Apps handoff instead of being created in an external BI platform.
4
-
5
- ## When To Use
6
-
7
- - The user wants an in-Codex dashboard, quick analytical artifact, prototype, or source-backed dashboard readout without creating a Tableau, Databricks, Looker, Power BI, or other BI-platform asset.
8
- - The dashboard can be represented as a manifest plus bounded snapshot, with compact reviewed datasets. Customer, account, company, segment, and product names are valid analytical dimensions when they are relevant.
9
- - The primary value is reader handoff and exploration inside Codex, not long-lived BI governance, platform permissions, or scheduled platform refresh.
10
-
11
- Prefer a BI platform dashboard for broadly shared production dashboards, third-party platform edits, managed refresh, or platform-specific publishing. Use Streamlit only when the user explicitly asks for Streamlit or an existing Streamlit app must be changed.
12
-
13
- ## Build Shape
14
-
15
- - Build a dashboard manifest with `version: 1`, `surface: "dashboard"`, a reader-facing `title`, and top-level `blocks`. `cards`, `charts`, and `tables` define reusable renderable assets; `blocks` establish the dashboard reading and layout order. Do not emit a shorthand dashboard that declares cards/charts/tables without blocks.
16
- - Read `../../../src/analytics-app-core.md` for shared MCP payload safety, source provenance, manifest/snapshot, rendering, and chart encoding rules. In particular, do not bind color, series, grouped, or stacked behavior to the same category already used for an axis just to color bars.
17
- - Follow the current `render_artifact` and `validate_artifact` MCP chart schema instead of duplicating chart-field rules here. Validate the manifest before rendering.
18
- - Validate the complete manifest and snapshot first with `validate_artifact`, fix validator errors there, and make only one visible `render_artifact` call after validation succeeds. If visible render fails after validation, record the blocker instead of repeated visible retries.
19
- - Default to built-in artifact blocks for dashboards: `metric-strip`, `chart`, `table`, and `markdown`. Use these native blocks for ordinary KPI strips, trends, bars, rankings, tables, caveats, source notes, and dashboard structure even when custom HTML would be faster to hand-author.
20
- - Pair it with a compact bounded snapshot containing reviewed aggregate datasets. Avoid row-level payloads unless a small detail table is essential. Use the canonical snapshot shape: `snapshot.datasets` is an object keyed by dataset id, and each value is a plain array of reviewed row objects. Do not put `{columns, rows}` table objects inside `snapshot.datasets`; keep column metadata in `manifest.tables[].columns`.
21
- - If a required source is blocked by permissions, set the snapshot status to `partial` or `blocked`, populate `snapshot.accessIssues`, put a clean access notice above the dashboard header, and state the exact missing role/table. Do not bury the blocker inside a chart card.
22
- - Keep the shared hierarchy: hero metrics first, then trend, then diagnosis, then detail.
23
- - Render the editable dashboard title from `manifest.title`, the last-refresh date, and a Refresh action in the top bar. Treat the top-bar title as canonical.
24
- - Keep snapshot freshness quiet in the top bar. Render a compact status pill only when the snapshot is fixture, partial, or blocked.
25
- - KPI cards render as individual cards from one `metrics[]` list. The first metric renders as the large value; later metrics render as labeled secondary badges. Each metric declares `label`, `field`, optional `format`, and `signed: true` for signed changes.
26
- - When a metric label is not self-defining, include a card description or nearby markdown that explains the metric in reader terms, and include the exact calculation in `source.query.metric_definitions`.
27
- - Back every chart with a dataset that remains useful beyond the visible chart encoding when safe reviewed context is available. Retain useful dimensions, time/cohort fields, candidate grouping columns, numerators, denominators, benchmarks, ranks, comparison-period values, and adjacent measures so the expanded table supports inspection, filtering, and realistic chart switching.
28
- - Percent values rendered with `format: "percent"` or `valueFormat: "percent"` must use the same numeric scale consistently in the provided data. Use decimal rates for computed numeric fields, such as `0.149` for `14.9%`, or pass preformatted reader-facing strings where exact display text matters.
29
- - Use the shared analytics app Recharts v3 chart system for generated app chart types, and keep card width/order persistence, source dialogs, copy actions, table sorting, pagination, and responsive drag behavior aligned with the shared artifact app and validator instead of reimplementing local variants.
30
- - Generate manifest and snapshot data first. Do not generate bespoke React unless a requested visualization cannot fit the contract.
31
- - Use `type: "html"` blocks only when the user requests customization, interaction, or a bespoke visual treatment that is not possible with the built-in artifact blocks. Before choosing HTML, verify that native cards, charts, tables, markdown, filters, chart options, or table formatting cannot satisfy the request. Put the raw markup in `html`; HTML blocks auto-size to their content in the MCP artifact renderer.
32
- - Use `render_artifact` as the default reader and handoff when the payload is safe and within bounds.
33
- - If the payload is unsafe, too large, or the MCP artifact tool is unavailable after exact discovery, record the blocker and choose another delivery surface.
34
-
35
- ## App Visual System
36
-
37
- - Use the Data Analytics artifact app's design system, chart renderer, and interaction model.
38
- - Chart and table panels use the shared two-column grid above the stack breakpoint and full-width cards below it.
39
- - Tables default to dense full-width lookup surfaces, avoid nested inset containers, allow horizontal overflow for wide rows, and paginate bounded detail data instead of vertically scrolling the table body.
40
- - Movement columns should be explicitly marked with `movement: true`, `semantic: "movement"`, or `role: "movement"`; render signed positive values with `+` and color only movement cells, not neutral current values or shares.
41
- - Keep generated app styles theme-aware: component styles should consume `--ds-*` aliases, and those aliases should resolve to Figma-backed PUIK/design-system semantic variables such as `--color-surface`, `--color-text-primary`, and `--color-border` before falling back to standalone values.
42
- - For the outer page canvas and top bar, prefer Codex artifact window surface tokens `--color-token-main-surface-primary` / `--color-background-surface`; dark mode should fall back to Codex `#181818` while cards and charts continue using Figma surface tokens.
43
-
44
- ## App Controls And Interaction
45
-
46
- - Render filters, chart overflow menus, table overflow menus, and the top-bar Share menu with the shared dashboard menu surface.
47
- - Menu surfaces and item states should use Codex dropdown/list palette aliases: `--ds-menu-bg`, `--ds-menu-text`, `--ds-menu-border`, and `--ds-menu-hover-bg`, not card surface tokens.
48
- - For menus, prefer Codex dropdown tokens `--color-token-dropdown-background`, `--color-token-dropdown-foreground`, `--color-token-dropdown-border`, and `--color-token-list-hover-background` so hover/open states match Codex chrome.
49
- - Menus should support smooth open/close motion, click-outside dismissal, Escape dismissal, and keyboard-friendly navigation.
50
- - Filter controls should hug their label/value content and avoid native OS select styling. Show filters only when they materially control the visible dashboard surfaces.
51
- - Chart and table cards should expose lightweight card actions without turning the dashboard into a full editor.
52
- - Non-interactive card surfaces may be draggable; controls, links, inputs, textareas, and menu surfaces should cancel dragging.
53
- - Drag preview placeholders should remain visible in dark mode by using `--ds-drag-preview-bg` and `--ds-drag-preview-border`, not card surface tokens that can match the artifact background.
54
- - Inline chart titles and optional descriptions should wrap, avoid clipping, and stay visually part of the card header. Descriptions should be absent by default; include one only when the title is ambiguous or the note materially changes how to read the chart. If the surface exposes `showDescription`, leave it off unless the description is needed.
55
-
56
- ## App Chart Rendering
57
-
58
- - Box plots and waterfalls may require custom shapes or the app's closest supported equivalent. Use custom panels only for deliberate non-native mark systems such as heatmaps and compact leaderboards.
59
- - Render compact centered legends outside Recharts for multi-series charts so the plot resizes around them.
60
- - Size standard Recharts charts with the v3 `responsive` chart prop and CSS sizing, not `ResponsiveContainer` wrappers or measured width/height props. The chart body should flex to fill the vertical space left by the header, with `min-height: 0` and bounded max height so it never grows past the card.
61
- - Use full-space blue-shade cell heatmaps when a dense row-by-column comparison is needed: right-aligned row labels on the left, adaptive column labels below the grid, and hover tooltips for exact values.
62
- - For complex custom chart types such as heatmaps, leaderboards, funnels, waterfalls, and box plots, let marks stretch when there are only a few rows; when marks would fall below their readable minimum, grow the chart block height instead of introducing vertical scrolling inside the chart body.
63
- - Let Recharts v3 auto-size Y-axis gutters from formatted visible tick labels with `width="auto"`; use explicit nice ticks when the data domain needs stable labels.
64
- - When a non-stacked multi-series chart omits explicit colors, use the fallback order blue, purple, green, neutral, orange, yellow, pink, red. Stacked bars use the generated app's blue/purple token-shade fallback set.
65
- - Disable chart intro animation when deterministic screenshots or hosted previews matter.
66
-
67
- ## Handoff
68
-
69
- - Lead with the MCP artifact result or the exact blocker.
70
- - Include source/freshness caveats, query or notebook references, and any omitted filters or datasets. For native artifact charts and tables, use the canonical `source` shape: runnable SQL in `source.query.sql`, plain-English summary in `source.query.description`, source predicates in `source.query.filters`, tables in `source.query.tables_used`, and metric formulas in `source.query.metric_definitions`.
71
- - Do not ask the user to open a localhost server or static file as the primary dashboard handoff when the MCP artifact app can render the payload.