@lark-apaas/coding-miaoda-sandbox-skills 0.1.0-dev.ec88bb5 → 0.1.0-dev.f3f0e48

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 (207) hide show
  1. package/miaoda/ai-data-processing/SKILL.md +4 -1
  2. package/miaoda/animation-skill/SKILL.md +348 -0
  3. package/miaoda/authz-cli/SKILL.md +1 -0
  4. package/miaoda/charts-skill/SKILL.md +264 -0
  5. package/miaoda/creative-to-fullstack/SKILL.md +64 -0
  6. package/miaoda/data-analysis/SKILL.md +151 -0
  7. package/miaoda/data-analysis/references/json-output-specification.md +277 -0
  8. package/miaoda/data-analysis/references/post-analysis-guide.md +77 -0
  9. package/miaoda/data-analysis/references/python-analysis-reference.md +272 -0
  10. package/miaoda/data-analysis/references/tmp-file-management-guide.md +100 -0
  11. package/miaoda/debug-investigation/SKILL.md +35 -23
  12. package/miaoda/extract-json-schema/SKILL.md +147 -0
  13. package/miaoda/feishu/SKILL.md +4 -4
  14. package/miaoda/forms-skill/SKILL.md +46 -4
  15. package/miaoda/lark-apps/SKILL.md +37 -0
  16. package/miaoda/lark-apps/references/openapi-key.md +80 -0
  17. package/miaoda/lark-apps-authz/SKILL.md +292 -0
  18. package/miaoda/lark-apps-authz/references/permission-points.md +39 -0
  19. package/miaoda/lark-apps-authz/references/role.md +122 -0
  20. package/miaoda/lark-apps-db/SKILL.md +227 -0
  21. package/miaoda/lark-apps-db/references/full-reference.md +424 -0
  22. package/miaoda/lark-apps-file/SKILL.md +216 -0
  23. package/miaoda/lark-apps-ops/SKILL.md +67 -0
  24. package/miaoda/lark-apps-ops/references/lark-apps-access-scope-get.md +30 -0
  25. package/miaoda/lark-apps-ops/references/lark-apps-access-scope-set.md +40 -0
  26. package/miaoda/lark-apps-ops/references/lark-apps-cache.md +62 -0
  27. package/miaoda/lark-apps-ops/references/lark-apps-env.md +46 -0
  28. package/miaoda/lark-apps-ops/references/lark-apps-export.md +46 -0
  29. package/miaoda/lark-apps-ops/references/lark-apps-local-dev.md +26 -0
  30. package/miaoda/lark-apps-ops/references/lark-apps-mcp.md +25 -0
  31. package/miaoda/lark-apps-ops/references/lark-apps-member.md +93 -0
  32. package/miaoda/lark-apps-ops/references/lark-apps-observability.md +46 -0
  33. package/miaoda/lark-apps-ops/references/lark-apps-plugin-install.md +36 -0
  34. package/miaoda/lark-apps-ops/references/lark-apps-plugin-list.md +23 -0
  35. package/miaoda/lark-apps-ops/references/lark-apps-plugin-uninstall.md +25 -0
  36. package/miaoda/lark-apps-ops/references/lark-apps-release-create.md +37 -0
  37. package/miaoda/lark-apps-ops/references/lark-apps-release-get.md +59 -0
  38. package/miaoda/lark-apps-ops/references/lark-apps-release-list.md +31 -0
  39. package/miaoda/lark-apps-ops/references/lark-apps-update.md +30 -0
  40. package/miaoda/lark-apps-ops/references/lark-apps-user-id-convert.md +63 -0
  41. package/miaoda/lark-apps-ops/references/openapi-key.md +80 -0
  42. package/miaoda/lark-design-prototype/DESIGN.md +603 -0
  43. package/miaoda/lark-design-prototype/SKILL.md +85 -0
  44. package/miaoda/lark-design-prototype/references/assets/card-illustration-library.md +113 -0
  45. package/miaoda/lark-design-prototype/references/case-matching.md +53 -0
  46. package/miaoda/lark-design-prototype/references/cases/conversational-ai-home.md +27 -0
  47. package/miaoda/lark-design-prototype/references/cases/data-table.md +30 -0
  48. package/miaoda/lark-design-prototype/references/cases/official-home.md +26 -0
  49. package/miaoda/lark-design-prototype/references/cases/workspace-home.md +34 -0
  50. package/miaoda/lark-design-prototype/references/color-roles.md +163 -0
  51. package/miaoda/lark-design-prototype/references/component-selection.md +134 -0
  52. package/miaoda/lark-design-prototype/references/design-quality-checklist.md +156 -0
  53. package/miaoda/lark-design-prototype/references/form-shell-patterns.md +77 -0
  54. package/miaoda/lark-design-prototype/references/icon-semantics.md +237 -0
  55. package/miaoda/lark-design-prototype/references/layout-interaction.md +164 -0
  56. package/miaoda/lark-design-prototype/references/page-contract.md +281 -0
  57. package/miaoda/lark-design-prototype/references/product-patterns.md +93 -0
  58. package/miaoda/lark-design-prototype/references/prompt-expansion.md +107 -0
  59. package/miaoda/lark-design-prototype/references/restoration-traps.md +113 -0
  60. package/miaoda/lark-design-prototype/references/token-semantics.md +112 -0
  61. package/miaoda/lark-design-prototype/references/visual-brief.md +125 -0
  62. package/miaoda/lark-design-prototype/references/visual-style-prompts.md +61 -0
  63. package/miaoda/lark-design-prototype/scripts/icon-query.mjs +272 -0
  64. package/miaoda/lark-design-prototype/scripts/token-query.mjs +76 -0
  65. package/miaoda/lark-design-prototype/scripts/verify-static-html.mjs +117 -0
  66. package/miaoda/miaoda-file/SKILL.md +1 -0
  67. package/miaoda/miaoda-sql/SKILL.md +21 -2
  68. package/miaoda/performance-review/SKILL.md +144 -0
  69. package/miaoda/performance-review/references/business-analyzer.md +139 -0
  70. package/miaoda/performance-review/references/examples.md +107 -0
  71. package/miaoda/semantic-search/SKILL.md +6 -4
  72. package/miaoda/table-skill/SKILL.md +2 -0
  73. package/{shared → miaoda}/testing-guide/SKILL.md +119 -13
  74. package/miaoda-design/lark-apps-comment/SKILL.md +119 -0
  75. package/miaoda-design/lark-apps-ops/SKILL.md +47 -0
  76. package/miaoda-design/lark-apps-ops/references/lark-apps-release-create.md +52 -0
  77. package/miaoda-design/lark-apps-ops/references/lark-apps-release-get.md +59 -0
  78. package/miaoda-design/lark-apps-ops/references/lark-apps-release-list.md +31 -0
  79. package/miaoda-design/lark-apps-ops/references/lark-apps-update.md +33 -0
  80. package/{shared → miaoda-modern}/charts-skill/SKILL.md +1 -1
  81. package/miaoda-modern/debug-investigation/SKILL.md +1 -1
  82. package/miaoda-modern/forms-skill/SKILL.md +70 -7
  83. package/{shared → miaoda-modern}/lark-apps/SKILL.md +5 -5
  84. package/miaoda-modern/lark-apps/references/openapi-key.md +80 -0
  85. package/miaoda-modern/lark-apps-ops/SKILL.md +67 -0
  86. package/miaoda-modern/lark-apps-ops/references/lark-apps-access-scope-get.md +30 -0
  87. package/miaoda-modern/lark-apps-ops/references/lark-apps-access-scope-set.md +40 -0
  88. package/miaoda-modern/lark-apps-ops/references/lark-apps-cache.md +62 -0
  89. package/miaoda-modern/lark-apps-ops/references/lark-apps-env.md +46 -0
  90. package/miaoda-modern/lark-apps-ops/references/lark-apps-export.md +46 -0
  91. package/miaoda-modern/lark-apps-ops/references/lark-apps-local-dev.md +26 -0
  92. package/miaoda-modern/lark-apps-ops/references/lark-apps-mcp.md +25 -0
  93. package/miaoda-modern/lark-apps-ops/references/lark-apps-member.md +93 -0
  94. package/miaoda-modern/lark-apps-ops/references/lark-apps-observability.md +46 -0
  95. package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-install.md +36 -0
  96. package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-list.md +23 -0
  97. package/miaoda-modern/lark-apps-ops/references/lark-apps-plugin-uninstall.md +25 -0
  98. package/miaoda-modern/lark-apps-ops/references/lark-apps-release-create.md +37 -0
  99. package/miaoda-modern/lark-apps-ops/references/lark-apps-release-get.md +59 -0
  100. package/miaoda-modern/lark-apps-ops/references/lark-apps-release-list.md +31 -0
  101. package/miaoda-modern/lark-apps-ops/references/lark-apps-update.md +30 -0
  102. package/miaoda-modern/lark-apps-ops/references/lark-apps-user-id-convert.md +63 -0
  103. package/{shared/lark-apps → miaoda-modern/lark-apps-ops}/references/openapi-key.md +3 -3
  104. package/miaoda-modern/lark-design-prototype/DESIGN.md +603 -0
  105. package/miaoda-modern/lark-design-prototype/SKILL.md +85 -0
  106. package/miaoda-modern/lark-design-prototype/references/assets/card-illustration-library.md +113 -0
  107. package/miaoda-modern/lark-design-prototype/references/case-matching.md +53 -0
  108. package/miaoda-modern/lark-design-prototype/references/cases/conversational-ai-home.md +27 -0
  109. package/miaoda-modern/lark-design-prototype/references/cases/data-table.md +30 -0
  110. package/miaoda-modern/lark-design-prototype/references/cases/official-home.md +26 -0
  111. package/miaoda-modern/lark-design-prototype/references/cases/workspace-home.md +34 -0
  112. package/miaoda-modern/lark-design-prototype/references/color-roles.md +163 -0
  113. package/miaoda-modern/lark-design-prototype/references/component-selection.md +134 -0
  114. package/miaoda-modern/lark-design-prototype/references/design-quality-checklist.md +156 -0
  115. package/miaoda-modern/lark-design-prototype/references/form-shell-patterns.md +77 -0
  116. package/miaoda-modern/lark-design-prototype/references/icon-semantics.md +237 -0
  117. package/miaoda-modern/lark-design-prototype/references/layout-interaction.md +164 -0
  118. package/miaoda-modern/lark-design-prototype/references/page-contract.md +281 -0
  119. package/miaoda-modern/lark-design-prototype/references/product-patterns.md +93 -0
  120. package/miaoda-modern/lark-design-prototype/references/prompt-expansion.md +107 -0
  121. package/miaoda-modern/lark-design-prototype/references/restoration-traps.md +113 -0
  122. package/miaoda-modern/lark-design-prototype/references/token-semantics.md +112 -0
  123. package/miaoda-modern/lark-design-prototype/references/visual-brief.md +125 -0
  124. package/miaoda-modern/lark-design-prototype/references/visual-style-prompts.md +61 -0
  125. package/miaoda-modern/lark-design-prototype/scripts/icon-query.mjs +272 -0
  126. package/miaoda-modern/lark-design-prototype/scripts/token-query.mjs +76 -0
  127. package/miaoda-modern/lark-design-prototype/scripts/verify-static-html.mjs +117 -0
  128. package/miaoda-modern/memory/SKILL.md +86 -0
  129. package/{shared → miaoda-modern}/performance-review/SKILL.md +3 -3
  130. package/miaoda-modern/reviewer-usage/SKILL.md +113 -0
  131. package/package.json +1 -1
  132. package/shared/attachment/SKILL.md +5 -1
  133. package/shared/lark-cli/SKILL.md +221 -0
  134. package/shared/lark-cli/lark-base/README.md +61 -0
  135. package/shared/lark-cli/lark-base/references/lark-base-commands.md +123 -0
  136. package/shared/lark-cli/lark-calendar/README.md +158 -0
  137. package/shared/lark-cli/lark-calendar/references/lark-calendar-meeting.md +30 -0
  138. package/shared/lark-cli/lark-calendar/references/lark-calendar-room-find.md +108 -0
  139. package/shared/lark-cli/lark-calendar/references/lark-calendar-suggestion.md +120 -0
  140. package/shared/lark-cli/lark-contact/README.md +35 -0
  141. package/shared/lark-cli/lark-contact/references/lark-contact-get-user.md +13 -0
  142. package/shared/lark-cli/lark-contact/references/lark-contact-search-user.md +121 -0
  143. package/shared/lark-cli/lark-doc/README.md +68 -0
  144. package/shared/lark-cli/lark-doc/references/lark-doc-fetch.md +138 -0
  145. package/shared/lark-cli/lark-doc/references/lark-doc-history.md +61 -0
  146. package/shared/lark-cli/lark-drive/README.md +158 -0
  147. package/shared/lark-cli/lark-drive/references/lark-drive-batch-query-comments.md +44 -0
  148. package/shared/lark-cli/lark-drive/references/lark-drive-files-list.md +183 -0
  149. package/shared/lark-cli/lark-drive/references/lark-drive-list-replies.md +49 -0
  150. package/shared/lark-cli/lark-im/README.md +70 -0
  151. package/shared/lark-cli/lark-im/references/lark-im-chat-list.md +140 -0
  152. package/shared/lark-cli/lark-im/references/lark-im-chat-members-list.md +84 -0
  153. package/shared/lark-cli/lark-im/references/lark-im-chat-search.md +135 -0
  154. package/shared/lark-cli/lark-im/references/lark-im-reactions.md +232 -0
  155. package/shared/lark-cli/lark-minutes/README.md +51 -0
  156. package/shared/lark-cli/lark-minutes/references/lark-minutes-download.md +130 -0
  157. package/shared/lark-cli/lark-sheets/README.md +174 -0
  158. package/shared/lark-cli/lark-sheets/references/lark-sheets-changeset.md +105 -0
  159. package/shared/lark-cli/lark-sheets/references/lark-sheets-chart.md +46 -0
  160. package/shared/lark-cli/lark-sheets/references/lark-sheets-conditional-format.md +42 -0
  161. package/shared/lark-cli/lark-sheets/references/lark-sheets-filter-view.md +51 -0
  162. package/shared/lark-cli/lark-sheets/references/lark-sheets-filter.md +42 -0
  163. package/shared/lark-cli/lark-sheets/references/lark-sheets-float-image.md +43 -0
  164. package/shared/lark-cli/lark-sheets/references/lark-sheets-formula-verify.md +64 -0
  165. package/shared/lark-cli/lark-sheets/references/lark-sheets-history.md +70 -0
  166. package/shared/lark-cli/lark-sheets/references/lark-sheets-pivot-table.md +44 -0
  167. package/shared/lark-cli/lark-sheets/references/lark-sheets-read-data.md +287 -0
  168. package/shared/lark-cli/lark-sheets/references/lark-sheets-search-replace.md +67 -0
  169. package/shared/lark-cli/lark-sheets/references/lark-sheets-sheet-structure.md +52 -0
  170. package/shared/lark-cli/lark-sheets/references/lark-sheets-sparkline.md +47 -0
  171. package/shared/lark-cli/lark-sheets/references/lark-sheets-workbook.md +69 -0
  172. package/shared/lark-cli/lark-sheets/scripts/lark_detect_subtables.py +596 -0
  173. package/shared/lark-cli/lark-sheets/scripts/lark_inspect_workbook.py +193 -0
  174. package/shared/lark-cli/lark-sheets/scripts/lark_profile_table.py +616 -0
  175. package/shared/lark-cli/lark-sheets/scripts/lark_sheet_range.py +176 -0
  176. package/shared/lark-cli/lark-sheets/scripts/lark_sheet_read_cli.py +221 -0
  177. package/shared/lark-cli/lark-sheets/scripts/sheets_df.py +50 -0
  178. package/shared/lark-cli/lark-slides/README.md +87 -0
  179. package/shared/lark-cli/lark-slides/references/lark-slides-history.md +117 -0
  180. package/shared/lark-cli/lark-slides/references/lark-slides-xml-presentation-slide-get.md +108 -0
  181. package/shared/lark-cli/lark-slides/references/lark-slides-xml-presentations-get.md +77 -0
  182. package/shared/lark-cli/lark-task/README.md +93 -0
  183. package/shared/lark-cli/lark-task/references/lark-task-get-my-tasks.md +57 -0
  184. package/shared/lark-cli/lark-task/references/lark-task-get-related-tasks.md +49 -0
  185. package/shared/lark-cli/lark-task/references/lark-task-search.md +36 -0
  186. package/shared/lark-cli/lark-task/references/lark-task-tasklist-search.md +35 -0
  187. package/shared/lark-cli/lark-vc/README.md +40 -0
  188. package/shared/lark-cli/lark-vc/references/lark-vc-recording.md +31 -0
  189. package/shared/lark-cli/lark-whiteboard/README.md +34 -0
  190. package/shared/lark-cli/lark-whiteboard/references/lark-whiteboard-export.md +59 -0
  191. package/shared/lark-cli/lark-wiki/README.md +50 -0
  192. package/shared/lark-cli/lark-wiki/references/lark-wiki-node-get.md +70 -0
  193. package/shared/lark-cli/lark-wiki/references/lark-wiki-node-list.md +95 -0
  194. package/shared/lark-cli/lark-wiki/references/lark-wiki-space-list.md +68 -0
  195. package/miaoda-design/attachment/SKILL.md +0 -58
  196. package/shared/dev-channel-probe/SKILL.md +0 -40
  197. /package/{shared → miaoda}/memory/SKILL.md +0 -0
  198. /package/{shared → miaoda}/reviewer-usage/SKILL.md +0 -0
  199. /package/{shared → miaoda-modern}/animation-skill/SKILL.md +0 -0
  200. /package/{shared → miaoda-modern}/data-analysis/SKILL.md +0 -0
  201. /package/{shared → miaoda-modern}/data-analysis/references/json-output-specification.md +0 -0
  202. /package/{shared → miaoda-modern}/data-analysis/references/post-analysis-guide.md +0 -0
  203. /package/{shared → miaoda-modern}/data-analysis/references/python-analysis-reference.md +0 -0
  204. /package/{shared → miaoda-modern}/data-analysis/references/tmp-file-management-guide.md +0 -0
  205. /package/{shared → miaoda-modern}/extract-json-schema/SKILL.md +0 -0
  206. /package/{shared → miaoda-modern}/performance-review/references/business-analyzer.md +0 -0
  207. /package/{shared → miaoda-modern}/performance-review/references/examples.md +0 -0
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: creative-to-fullstack
3
+ description: Use when the task is to build a complete full-stack application from a creative-mode design draft. 触发词:创意设计稿, 将创意设计稿实现为一个完整的全栈应用, 按设计稿开发应用, 基于当前设计生成应用, design to fullstack
4
+ hook: SessionStart
5
+ workspace-contains:
6
+ - source_package/creative/.upgrade-manifest.json
7
+ ---
8
+
9
+ # 把创意设计稿实现为全栈应用
10
+
11
+ 以 `source_package/creative/` 中的原创意设计应用为依据,在当前工程中交付真实可运行的全栈应用,而不是静态原型。源稿是只读的视觉与业务意图权威,不能作为交付应用的运行时依赖。目标是在保证以下结果的前提下尽快完成。
12
+
13
+ ## 工程规范与最小规划
14
+
15
+ - **开发前必读 `coding-guide`**:使用当前技术栈的工程、共享类型、平台能力及规范。开发 Worker 同样必读,只按需加载专项 skill;不另发明行数/目录规则或限定文件数。在独占页面/模块目录内,首次编码即可按该规范拆私有组件与逻辑文件;必要的后置重构须基于完整源码局部移动,不能依据截断读取整体重写。
16
+ - **先写 `docs/business-design.md` 再编码**:只写支持实现与验收的决策,不誊写源稿视觉细节、实际种子值或逐控件功能全集。正文需覆盖下表,短列表或合并表格均可;同一事实只定义一次。
17
+ - **契约先行**:当前并行批次所需的最小 shared 类型、路由参数、ID/状态/单位口径、实际 schema 与接口落盘可引用后即可开工,不等全部业务契约或公共组件实现完成;代码契约不与文档维护两份字段定义。执行期主 Agent 与 Worker 均不得擅改契约;阻断核心链路时暂停受影响任务,统一修订设计与契约,只通知受影响消费者并调整其任务。
18
+ - 用 TodoWrite 记录实现、验收及未完成项,每批完成或提交前按事实更新。实际阻塞在设计文档中登记,交付时如实披露。
19
+
20
+ ### 业务设计必须回答的问题
21
+
22
+ | 内容 | 最小产出 |
23
+ | --- | --- |
24
+ | 核心链路 | 按用户目标识别核心链路,每条链路定义:真实可见入口与目标对象 → 输入/动作 → 必要中间态 → 真实结果 → 回读位置。链路内各步骤作用于同一目标对象,每一步写入产生的对象、状态及其关联记录须满足下一步操作与回读页所需的数据条件,任一条件不满足即视为链路未闭环。 |
25
+ | 非核心功能 | 不属于任何核心链路的功能点逐项列出,全部保留源稿视觉;其展示数据来自数据库中的真实记录,不实现业务写入、状态流转与外部能力接入。对应控件保持外观并呈现不可用语义,不显示虚假成功,不删除页面或区块。该清单与核心链路清单共同构成本次交付范围,收尾时按同一清单如实说明。 |
26
+ | 页面与视觉来源 | 记录全部源稿页面对应的目标路由/目录、对象参数、源文件/区块,以及用户可见的到达路径;核心结果页明确其上游操作入口。记录全局 Layout 和真正跨页组件的归属,以及素材来源与迁移/复用方案。 |
27
+ | 最小业务模型 | 核心实体、稳定 ID/关联、关键状态及前置条件、必要唯一性与可空规则;初始事实的源稿位置与字段映射,缺失事实按空态展示。 |
28
+ | 接口与结果口径 | 核心动作的必要用户输入、前置条件、状态变化与回读结果在接口契约中一一对应。记录方法/路径、请求/响应类型及 shared 路径、错误/空态语义;动态结果明确事实来源、计算/筛选口径与变化触发。前后端共同引用对象 ID、状态、单位/取整、时间及可空字段口径。平台/插件能力按实际需要选型并确认可用契约。 |
29
+ | 验收与阻塞 | 按源事实定义每条核心链路的可见操作路径、目标对象/状态、可判定的结果与刷新/跨页回读;覆盖相关中间态及动态变化,合并共享链路,另列全页面视觉检查。记录影响核心交付的外部依赖、资源缺失及实际阻塞。 |
30
+
31
+ 设计以能开工、能判定结果为止;不扩成全产品设计、字段血缘大全或多层门禁。遇到新事实只改受影响条目,不反复读写整份文档。视觉实现者直接读取对应源稿,不凭主 Agent 转述实现。
32
+
33
+ ## 交付目标
34
+
35
+ ### 1. 页面视觉效果 100% 还原
36
+
37
+ 保留所有源稿页面、导航、布局、层级、尺寸、间距、字体、颜色、固定文案、素材主体与图表形态。素材优先复用/迁移;不可复用时替代图须保持原用途、主体、色调和裁切。以源稿中的实际业务页面为还原对象。
38
+
39
+ 动态数字来自当前业务事实,保持与源稿一致的单位、格式和排布。视觉验收关注整体呈现效果,允许动态数值和无影响的小图标差异。
40
+
41
+ ### 2. 核心功能完整,操作链路与数据闭环
42
+
43
+ - **承诺与结果一致**:核心动作必须真实完成其业务含义,写入后可按对象 ID 重新查询,成功页刷新/重进仍能显示该结果;仅 toast、跳页、接口 200 或数据库有记录不足以证明闭环。中间态与终态区分,不能提前显示全部完成或过早清空后续页面所需状态。
44
+ - **对象身份一致**:入口、路由参数、详情、子记录和结果内容属于同一对象。已存在的合法对象不能仅因未出现在最近/摘要列表中就不可访问。无效 ID、无关联记录返回明确空态/错误,不能默认第一条记录来掩盖问题;新对象的可空字段不得使详情崩溃,空链接不渲染可点击目标。
45
+ - **事实与状态来源**:初始数据从源稿明确的既有事实映射、去重并建立有依据的关联,保留各对象所处的业务状态。核心操作按业务规则生成必要关联记录,状态、时间与用户输入随实际执行更新;结果页读取执行后的事实。缺失事实如实展示空态,业务完成依据实际状态判定。
46
+ - **动态数据同一口径**:会随业务变化的展示从事实实时计算,不用预置统计字段/常数替代。写入后的计数、进度、余额与聚合联动;周期选择一致作用于标题、明细和统计;分子分母、过程/结算/历史、时钟与取整口径统一。只为本身具有独立业务生命周期的快照保留持久化,不为展示另造真源。
47
+ - **真实能力与明确边界**:核心 AI、媒体和外部能力取得真实结果或明确失败;检索计数/字符串模板不是 AI 回答,动画计时不是播放。按需读取 `plugin-guide` 并确认运行时 schema,不把普通数据库、定位/导航/扫码或内部演示支付机械判成插件。已明确采用内部演示的能力标识模拟边界,并使用一致、可复核的状态/计算,不能伪称外部执行成功;缺少核心资源则报告阻塞。
48
+
49
+ ## 提效时的执行约束
50
+
51
+ - 共享层只准备当前批次必要结构与接口,复用已有模板;不批量造空 API/DTO,主 Agent 不先写完所有服务和 SQL 才派发业务任务。
52
+ - 以独占写入范围拆任务。优先按页面拆前端、按 server module 拆后端,让独立页面、后端模块与种子任务同批开始;不要把多页与整个后端塞进一个长任务。公共层一个写入者;公共组件有稳定接口即可并行消费,不等其实现完成。仅消费必要插件/素材的任务等待其结果,不让无关任务一起等待。
53
+ - 种子数据:CodeAct 写种子数据与业务任务并行,按实际 schema 写入源稿已有对象及必要关联,写入成功即完成。统计数据基于实际数据计算,允许与源稿数值不同;运行时验证统一由主 Agent 完成。
54
+ - 开发任务只检查自己改动的类型/契约等静态问题,达标即返回。不运行接口冒烟、启动服务联调、读运行时日志、读库验收或执行 E2E;运行时验证交由主 Agent 组织,避免开发与测试同时改同一资源。
55
+ - 任务单引用所属核心链路、契约路径和独占写入范围,仅补充本任务特有的实现信息。前后端沿用同一结果、状态与统计口径;契约缺口由主 Agent 定点协调修订。回传改动文件、检查结果、实际阻塞和未完成项。
56
+
57
+ ## 验收准则
58
+
59
+ **验收前必读 `testing-guide`**,使用设计阶段已确定的清单,不在验收阶段重新扩展业务或以实际弱化实现改写通过标准。
60
+
61
+ 1. **真实操作核心链路**:验收从应用首页或正常业务起点开始,通过用户可见的导航、按钮或业务操作到达目标页面,记录入口操作与到达结果。同一核心链路连续使用同一对象;包含创建时,将新建结果用于后续操作。一次执行核对必要输入的保存与回读、关键状态变化、真实结果及关联动态输出,并完成刷新或跨页回读。
62
+ 2. **完整视觉**:覆盖全部源稿页面,逐页确认主要布局、内容、图表、导航与图片;允许动态数值和无影响的小图标差异。
63
+ 3. **针对性修复**:先看失败步骤的请求、ID、状态及相关代码,结合源事实区分应用缺陷、测试假设错误与平台问题;只修核心功能问题或实质视觉问题,不新增身份/权限体系或源稿外业务。已有平台与 coding-guide 约束仍须满足。应用或测试修正、平台恢复后定向复测受影响链路;提交自动修复改变关键行为后也须复测。同一结果复用证据,不重复整套无关验收。不以关键词命中或同名组件一概判错,不搞全库对账。
64
+ 4. **如实交付**:清单逐项记录通过/失败/未测和证据,复测保留各核心功能的实际验收状态,披露核心阻塞。核心功能和视觉验收全部通过后宣称完成,并移除 `source_package/creative/.upgrade-manifest.json` 停止重复注入;其他源稿保留。存在失败或未测项时保留标记与证据,如实交付当前状态。
@@ -0,0 +1,151 @@
1
+ ---
2
+ name: data-analysis
3
+ description: "Data analysis and insight extraction skill. Outputs structured JSON for downstream code consumption. MUST be used FIRST when user's message contains or references data file attachments (CSV/Excel/JSON/Markdown), even if the final goal is building a webpage or dashboard. Use when: (1) exploring/comparing datasets, finding patterns/trends/correlations, (2) preparing data for visualization, dashboard, or analysis webpage, (3) assessing data quality or generating statistical reports. Keywords: 分析数据, 数据分析, 统计, 对比, 趋势, 评估, 数据看板, 数据大屏, 分析页面, 分析网页, 数据探索, 数据展示, 找规律, 画图, 报表, 报告, 可视化, 图表, visualize, dashboard, chart, plot, trend, pattern, insight, comparison, overview, correlation"
4
+ ---
5
+
6
+ # Data Analysis
7
+
8
+ Systematic data analysis workflow that produces structured JSON output for downstream code consumption.
9
+
10
+ ## Execution Flow
11
+
12
+ When this skill is triggered, execute **ALL** steps below in order. **Do NOT skip any step** — every step is mandatory unless explicitly marked as optional.
13
+
14
+ 1. **Setup tmp directory**: Initialize `tmp/` directory structure in project root. **MUST read `references/tmp-file-management-guide.md` before proceeding.**
15
+ 2. **Confirm data source**: Confirm the file path to analyze with user
16
+ 3. **Execute Phase 1-3**: Business Understanding → Data Understanding → Quality Assessment (see "Analysis Methodology")
17
+ 4. **Report initial findings**: Inform user about data overview and quality issues
18
+ 5. **Execute Phase 4-5**: Descriptive Analysis → Insight Extraction (see "Analysis Methodology")
19
+ 6. **Generate JSON output**: Save structured result to `tmp/output/`, then copy the JSON files the app will consume to `shared/static/data/` (create the directory if missing) — `tmp/` is gitignored and not deployed, so anything the frontend imports at runtime must live in `shared/static/data/`. **MUST read `references/json-output-specification.md` before generating — do NOT guess the schema.**
20
+ 7. **Generate visualizations** (optional): Save charts to `tmp/output/visualizations/`
21
+ 8. **[CRITICAL] Update type definitions**: Extract TS type definitions from analysis JSON and append/update to `shared/static/types.ts` (check if file exists first; if not, create it with directory). Naming convention: remove file extension, convert snake_case to PascalCase (e.g. `sales_2023_exploratory.json` → `Sales2023Exploratory`). Do NOT skip.
22
+ 9. **[CRITICAL] Update AGENTS.md**: Record analysis summary in AGENTS.md with type definition location and consumption example. **MUST read `references/post-analysis-guide.md` before updating.** Do NOT skip.
23
+ 10. **Report output locations**: Inform user where artifacts are saved. **MUST read "Output Summary Template" in `references/post-analysis-guide.md`.**
24
+
25
+ ### Quality Checklist
26
+
27
+ After completing all steps above, verify the following before considering the task done:
28
+
29
+ - [ ] **tmp/ directory initialized**: All subdirectories created
30
+ - [ ] **Data quality assessed**: `data_quality` section fully populated
31
+ - [ ] **Statistics complete**: All numeric/categorical columns have corresponding summary
32
+ - [ ] **Insights have evidence**: Every insight has an `evidence` field
33
+ - [ ] **Insights answer business question**: Corresponds to `metadata.business_question`
34
+ - [ ] **JSON conforms to spec**: Field names, types, required fields all correct
35
+ - [ ] **Visualization config is valid**: Field names in `config` exist in the data
36
+ - [ ] **At least 1 recommendation**: `recommendations` is not empty
37
+ - [ ] **No hardcoded paths**: File paths come from user input
38
+ - [ ] **Outputs saved to tmp/**: JSON result and visualizations written to correct locations
39
+ - [ ] **Consumable JSON copied to shared/static/data/**: any JSON the app reads at runtime is copied out of tmp/ (tmp/ is gitignored and not deployed)
40
+ - [ ] **tmp/ in .gitignore**: Ensure tmp/ is excluded from version control
41
+ - [ ] **types.ts updated**: TS type definitions extracted and appended to `shared/static/types.ts` (created if not exists)
42
+ - [ ] **AGENTS.md updated**: Analysis record appended with type definition location and consumption example
43
+
44
+ ---
45
+
46
+ ## Analysis Methodology (6 Phases)
47
+
48
+ Follow a simplified CRISP-DM methodology. **MUST read `references/python-analysis-reference.md` for Python code templates before writing analysis code.**
49
+
50
+ ### Phase 1: Business Understanding
51
+
52
+ **Goal**: Clarify the analysis purpose and avoid blind exploration.
53
+
54
+ 1. Confirm analysis type (see "Analysis Type Quick Reference")
55
+ 2. Extract the user's core question or hypothesis
56
+ 3. Define success criteria: What does the user expect from the analysis?
57
+
58
+ **Output**: Record in `metadata.analysis_type` and `metadata.business_question` in JSON.
59
+
60
+ ### Phase 2: Data Understanding
61
+
62
+ **Goal**: Fully understand the structure and content of the data.
63
+
64
+ 1. Load data and get basic information (row/column count, field names, dtypes, sample rows)
65
+ 2. Identify field semantics:
66
+
67
+ | Type | Examples |
68
+ | ---- | -------- |
69
+ | Numeric (continuous) | price, age, amount |
70
+ | Numeric (discrete) | count, quantity |
71
+ | Categorical (ordinal) | rating, education level |
72
+ | Categorical (nominal) | color, city, product name |
73
+ | DateTime | order_date, created_at |
74
+ | Text | description, comments |
75
+
76
+ 3. Initial statistical overview
77
+
78
+ ### Phase 3: Data Quality Assessment
79
+
80
+ **Goal**: Identify data issues for credibility reference.
81
+
82
+ | Check | Method |
83
+ | ----- | ------ |
84
+ | Missing values | Per-column missing ratio, random vs systematic pattern |
85
+ | Duplicates | Full-row and key-field duplicates |
86
+ | Outliers | Numeric: IQR or Z-score; Categorical: rare categories |
87
+ | Consistency | Date formats, category value spelling |
88
+
89
+ **Output**: Populate the `data_quality` section of JSON.
90
+
91
+ ### Phase 4: Descriptive Analysis
92
+
93
+ **Goal**: Extract statistical characteristics and distribution patterns.
94
+
95
+ | Sub-phase | Focus | Key Metrics |
96
+ | --------- | ----- | ----------- |
97
+ | 4.1 Numeric | Central tendency & dispersion | mean, median, std, skew, kurtosis, quartiles |
98
+ | 4.2 Categorical | Frequency distribution | unique count, top N values, mode |
99
+ | 4.3 Correlation | Variable relationships | Pearson (linear), Spearman (monotonic), \|r\| > 0.7 = strong |
100
+ | 4.4 Group Aggregation | Group comparisons | group-by mean/std/count |
101
+
102
+ **Output**: Populate the `statistics` section of JSON.
103
+
104
+ ### Phase 5: Insight Extraction
105
+
106
+ **Goal**: Extract business-valuable findings from statistical results.
107
+
108
+ | Type | Identification Criteria | Example |
109
+ | ---- | ----------------------- | ------- |
110
+ | `correlation` | \|r\| > 0.7 or p < 0.05 | "Price and sales show strong negative correlation" |
111
+ | `trend` | Directional change in time series | "Monthly revenue shows continuous growth" |
112
+ | `anomaly` | Beyond 3σ or IQR boundary | "5 anomalous high-value orders detected" |
113
+ | `distribution` | Obvious skewness or multimodal | "Income shows right-skewed distribution" |
114
+ | `comparison` | Significant group differences | "Group A conversion rate significantly higher than Group B" |
115
+
116
+ Each insight must include: **evidence** (specific supporting data), **significance** (high/medium/low), **affected_columns**.
117
+
118
+ ### Phase 6: JSON Output
119
+
120
+ Generate structured analysis result. **MUST read `references/json-output-specification.md` and strictly conform to its schema.**
121
+
122
+ ---
123
+
124
+ ## Analysis Type Quick Reference
125
+
126
+ Select the appropriate analysis focus based on user intent. Phase numbers refer to "Analysis Methodology" above.
127
+
128
+ | User Expression | Analysis Type | Focus Phase | Key Output |
129
+ | --------------- | ------------- | ----------- | ---------- |
130
+ | "explore data", "overview", "understand data" | `exploratory` | Phase 2-4 | Basic stats, quality report, distribution |
131
+ | "find patterns", "correlations", "relationships" | `exploratory` | Phase 4.3 | Correlation matrix, significant pairs |
132
+ | "compare", "A vs B", "differences" | `diagnostic` | Phase 4.4 | Group statistics, group differences |
133
+ | "validate hypothesis", "significance test" | `confirmatory` | Phase 4-5 | Statistical tests, p-values |
134
+ | "statistics", "summary", "report" | `descriptive` | Phase 4 | Aggregation results, frequency stats |
135
+ | "trend", "changes", "time series" | `exploratory` | Phase 4 | Time series trends, periodicity |
136
+
137
+ ---
138
+
139
+ ## Common Mistakes
140
+
141
+ | Mistake | Correct Approach |
142
+ | ------- | ---------------- |
143
+ | Analyze directly without checking data quality | Execute Phase 3 first, assess missing values and outliers |
144
+ | Ignore missing values when calculating mean | Clarify missing value handling strategy, or use `dropna()` |
145
+ | Interpret correlation as causation | Explicitly label "correlation" not "causes" in insights |
146
+ | Ignore data types and analyze directly | Confirm dtype first, numeric vs categorical need different handling |
147
+ | Output non-standardized JSON | Strictly follow the Schema in `references/json-output-specification.md` |
148
+ | Insights without supporting evidence | Every insight must have an `evidence` field |
149
+ | Visualization config doesn't match data | Ensure field names in `config` exist in the data |
150
+ | JSON contains NaN/Infinity (TS1328) | MUST sanitize: replace NaN/Infinity with `None` before `json.dump()`, use `allow_nan=False` |
151
+
@@ -0,0 +1,277 @@
1
+ # JSON Output Specification
2
+
3
+ ## Complete Schema
4
+
5
+ ```json
6
+ {
7
+ "analysis_id": "string (UUID v4)",
8
+ "timestamp": "string (ISO 8601 format)",
9
+ "metadata": {
10
+ "data_source": "string (file path or data description)",
11
+ "row_count": "integer",
12
+ "column_count": "integer",
13
+ "analysis_type": "exploratory | confirmatory | diagnostic | descriptive",
14
+ "business_question": "string (user's core question, optional)"
15
+ },
16
+ "data_quality": {
17
+ "completeness": "number (0-1, non-missing ratio)",
18
+ "missing_values": {
19
+ "column_name": "integer (missing count)"
20
+ },
21
+ "duplicates": "integer (duplicate row count)",
22
+ "outliers": {
23
+ "column_name": "integer (outlier count)"
24
+ },
25
+ "issues": ["string (issue description)"]
26
+ },
27
+ "statistics": {
28
+ "numeric_summary": {
29
+ "column_name": {
30
+ "count": "integer",
31
+ "mean": "number",
32
+ "std": "number",
33
+ "min": "number",
34
+ "max": "number",
35
+ "quartiles": ["number (Q1)", "number (Q2/median)", "number (Q3)"],
36
+ "skew": "number (optional)",
37
+ "kurtosis": "number (optional)"
38
+ }
39
+ },
40
+ "categorical_summary": {
41
+ "column_name": {
42
+ "unique_count": "integer",
43
+ "top_values": [
44
+ {"value": "string", "count": "integer", "percentage": "number"}
45
+ ],
46
+ "mode": "string"
47
+ }
48
+ },
49
+ "correlations": [
50
+ {
51
+ "column1": "string",
52
+ "column2": "string",
53
+ "coefficient": "number",
54
+ "method": "pearson | spearman"
55
+ }
56
+ ]
57
+ },
58
+ "insights": [
59
+ {
60
+ "id": "string (insight_1, insight_2, ...)",
61
+ "type": "correlation | trend | anomaly | distribution | comparison",
62
+ "title": "string (short title, within 10 characters)",
63
+ "description": "string (detailed description)",
64
+ "evidence": {
65
+ "metric": "string (metric name)",
66
+ "value": "number | string",
67
+ "p_value": "number (optional, for statistical tests)"
68
+ },
69
+ "significance": "high | medium | low",
70
+ "affected_columns": ["string"]
71
+ }
72
+ ],
73
+ "recommendations": [
74
+ {
75
+ "id": "string (rec_1, rec_2, ...)",
76
+ "type": "visualization | further_analysis | data_collection | action",
77
+ "title": "string (recommendation title)",
78
+ "description": "string (detailed recommendation)",
79
+ "priority": "high | medium | low"
80
+ }
81
+ ],
82
+ "visualizations": [
83
+ {
84
+ "id": "string (viz_1, viz_2, ...)",
85
+ "type": "histogram | scatter | line | bar | heatmap | box | pie",
86
+ "title": "string (chart title)",
87
+ "config": {
88
+ "x": "string (X-axis field name)",
89
+ "y": "string (Y-axis field name, optional)",
90
+ "group_by": "string (grouping field, optional)",
91
+ "aggregation": "string (aggregation method: sum/mean/count, optional)"
92
+ },
93
+ "insight_refs": ["string (associated insight id)"]
94
+ }
95
+ ]
96
+ }
97
+ ```
98
+
99
+ ## CRITICAL: JSON Validity Rules
100
+
101
+ Python `json.dumps()` defaults to `allow_nan=True`, which outputs `NaN` and `Infinity` as bare tokens — **these are NOT valid JSON** and will cause TypeScript build failures (TS1328).
102
+
103
+ | Python value | json.dumps output | Valid JSON? | Fix |
104
+ |-------------|-------------------|-------------|-----|
105
+ | `float('nan')` | `NaN` | **NO** | Replace with `null` |
106
+ | `float('inf')` | `Infinity` | **NO** | Replace with `null` or max value |
107
+ | `float('-inf')` | `-Infinity` | **NO** | Replace with `null` or min value |
108
+ | `None` | `null` | Yes | OK |
109
+
110
+ **MUST** do one of:
111
+ 1. Call `json.dump(..., allow_nan=False)` (raises error if NaN exists, forcing explicit handling)
112
+ 2. Sanitize all float values before dumping: replace `NaN`/`Infinity` with `None`
113
+
114
+ Common sources of NaN in pandas: `df.mean()` on empty column, `df.std()` on single value, `df.skew()` on constant data, division by zero.
115
+
116
+ ## Field Description
117
+
118
+ | Field Path | Required | Description |
119
+ | ---------- | -------- | ----------- |
120
+ | `analysis_id` | Yes | Unique identifier for analysis task, use UUID v4 |
121
+ | `timestamp` | Yes | Analysis completion time, ISO 8601 format |
122
+ | `metadata.*` | Yes | Data source metadata |
123
+ | `data_quality.*` | Yes | Data quality assessment results |
124
+ | `statistics.numeric_summary` | Conditional | Required when numeric columns exist |
125
+ | `statistics.categorical_summary` | Conditional | Required when categorical columns exist |
126
+ | `statistics.correlations` | No | Only populate when significant correlations found |
127
+ | `insights` | Yes | At least 1 insight required |
128
+ | `recommendations` | Yes | At least 1 recommendation required |
129
+ | `visualizations` | Yes | At least 1 visualization config required |
130
+
131
+ ## Example Output
132
+
133
+ ```json
134
+ {
135
+ "analysis_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
136
+ "timestamp": "2024-01-15T10:30:00Z",
137
+ "metadata": {
138
+ "data_source": "/data/sales_2023.csv",
139
+ "row_count": 10000,
140
+ "column_count": 12,
141
+ "analysis_type": "exploratory",
142
+ "business_question": "了解2023年销售数据的整体情况"
143
+ },
144
+ "data_quality": {
145
+ "completeness": 0.95,
146
+ "missing_values": {
147
+ "customer_age": 320,
148
+ "region": 180
149
+ },
150
+ "duplicates": 45,
151
+ "outliers": {
152
+ "order_amount": 23
153
+ },
154
+ "issues": [
155
+ "customer_age 列有 3.2% 缺失值",
156
+ "order_amount 存在 23 个异常高值(超出 IQR 上界)"
157
+ ]
158
+ },
159
+ "statistics": {
160
+ "numeric_summary": {
161
+ "order_amount": {
162
+ "count": 10000,
163
+ "mean": 156.78,
164
+ "std": 89.34,
165
+ "min": 5.00,
166
+ "max": 2500.00,
167
+ "quartiles": [85.00, 135.00, 210.00],
168
+ "skew": 2.34,
169
+ "kurtosis": 8.91
170
+ },
171
+ "customer_age": {
172
+ "count": 9680,
173
+ "mean": 35.6,
174
+ "std": 12.3,
175
+ "min": 18,
176
+ "max": 75,
177
+ "quartiles": [26, 34, 44]
178
+ }
179
+ },
180
+ "categorical_summary": {
181
+ "product_category": {
182
+ "unique_count": 5,
183
+ "top_values": [
184
+ {"value": "Electronics", "count": 3500, "percentage": 35.0},
185
+ {"value": "Clothing", "count": 2800, "percentage": 28.0},
186
+ {"value": "Home", "count": 2000, "percentage": 20.0}
187
+ ],
188
+ "mode": "Electronics"
189
+ }
190
+ },
191
+ "correlations": [
192
+ {
193
+ "column1": "order_amount",
194
+ "column2": "customer_age",
195
+ "coefficient": 0.72,
196
+ "method": "pearson"
197
+ }
198
+ ]
199
+ },
200
+ "insights": [
201
+ {
202
+ "id": "insight_1",
203
+ "type": "correlation",
204
+ "title": "年龄与消费正相关",
205
+ "description": "客户年龄与订单金额呈较强正相关(r=0.72),年长客户倾向于更高消费。",
206
+ "evidence": {
207
+ "metric": "pearson_correlation",
208
+ "value": 0.72,
209
+ "p_value": 0.001
210
+ },
211
+ "significance": "high",
212
+ "affected_columns": ["customer_age", "order_amount"]
213
+ },
214
+ {
215
+ "id": "insight_2",
216
+ "type": "distribution",
217
+ "title": "订单金额右偏分布",
218
+ "description": "订单金额呈明显右偏(skew=2.34),大部分订单集中在低价区间,少量高价订单拉高均值。",
219
+ "evidence": {
220
+ "metric": "skewness",
221
+ "value": 2.34
222
+ },
223
+ "significance": "medium",
224
+ "affected_columns": ["order_amount"]
225
+ }
226
+ ],
227
+ "recommendations": [
228
+ {
229
+ "id": "rec_1",
230
+ "type": "further_analysis",
231
+ "title": "深入分析高价值客户",
232
+ "description": "建议对年龄>40且订单金额>500的客户群体进行细分分析,挖掘其消费特征。",
233
+ "priority": "high"
234
+ },
235
+ {
236
+ "id": "rec_2",
237
+ "type": "visualization",
238
+ "title": "绘制年龄-消费散点图",
239
+ "description": "使用散点图可视化年龄与订单金额的关系,并按产品类别着色。",
240
+ "priority": "medium"
241
+ }
242
+ ],
243
+ "visualizations": [
244
+ {
245
+ "id": "viz_1",
246
+ "type": "scatter",
247
+ "title": "客户年龄 vs 订单金额",
248
+ "config": {
249
+ "x": "customer_age",
250
+ "y": "order_amount",
251
+ "group_by": "product_category"
252
+ },
253
+ "insight_refs": ["insight_1"]
254
+ },
255
+ {
256
+ "id": "viz_2",
257
+ "type": "histogram",
258
+ "title": "订单金额分布",
259
+ "config": {
260
+ "x": "order_amount"
261
+ },
262
+ "insight_refs": ["insight_2"]
263
+ },
264
+ {
265
+ "id": "viz_3",
266
+ "type": "bar",
267
+ "title": "各产品类别销售额",
268
+ "config": {
269
+ "x": "product_category",
270
+ "y": "order_amount",
271
+ "aggregation": "sum"
272
+ },
273
+ "insight_refs": []
274
+ }
275
+ ]
276
+ }
277
+ ```
@@ -0,0 +1,77 @@
1
+ # Post-Analysis Guide
2
+
3
+ Steps to complete after analysis is done: update AGENTS.md and report output locations to user.
4
+
5
+ ## 1. Update AGENTS.md
6
+
7
+ **CRITICAL**: After completing analysis, you **MUST** update AGENTS.md. This is NOT optional.
8
+
9
+ ### Steps
10
+
11
+ 1. Check if `AGENTS.md` exists in the project root; if not, create it
12
+ 2. Append the analysis record to `AGENTS.md` following the format below exactly
13
+
14
+ > **NOTE**: Before writing code that consumes analysis data, always read the corresponding type definition in `shared/static/types.ts` first to ensure correct field access.
15
+
16
+ ### AGENTS.md Format (MUST follow exactly)
17
+
18
+ > ### [Date] Analysis of [filename]
19
+ > - **Source file**: `path/to/source/data.csv`
20
+ > - **Analysis type**: exploratory | confirmatory | diagnostic | descriptive
21
+ > - **Key findings**: Brief summary of main insights (1-2 sentences)
22
+ > - **Output location**: `tmp/output/filename_analysis.json`
23
+ > - **Copied to**: `shared/static/filename_analysis.json` (if applicable)
24
+ > - **Type definition**: `shared/static/types.ts` → `FilenameAnalysis`
25
+ >
26
+ > #### Consumption
27
+ >
28
+ > ```typescript
29
+ > import type { FilenameAnalysis } from '@shared/static/types';
30
+ > import rawData from '@shared/static/filename_analysis.json';
31
+ >
32
+ > const data = rawData as FilenameAnalysis;
33
+ > // access fields: data.insights, data.statistics, data.visualizations, etc.
34
+ > ```
35
+
36
+ ### Example Entry
37
+
38
+ > ### 2024-01-15 Analysis of sales_2023.csv
39
+ > - **Source file**: `data/sales_2023.csv`
40
+ > - **Analysis type**: exploratory
41
+ > - **Key findings**: Strong correlation between customer age and order amount (r=0.72). Order amounts show right-skewed distribution.
42
+ > - **Output location**: `tmp/output/sales_2023_exploratory.json`
43
+ > - **Copied to**: `shared/static/sales_2023_exploratory.json`
44
+ > - **Type definition**: `shared/static/types.ts` → `Sales2023Exploratory`
45
+ >
46
+ > #### Consumption
47
+ >
48
+ > ```typescript
49
+ > import type { Sales2023Exploratory } from '@shared/static/types';
50
+ > import rawData from '@shared/static/sales_2023_exploratory.json';
51
+ >
52
+ > const data = rawData as Sales2023Exploratory;
53
+ > const highInsights = data.insights.filter(i => i.significance === 'high');
54
+ > ```
55
+
56
+ ## 2. Report Output Locations
57
+
58
+ After completing analysis, report to user:
59
+
60
+ ```text
61
+ Analysis complete! Artifacts saved to:
62
+
63
+ 📁 tmp/
64
+ ├── output/
65
+ │ ├── sales_2023_exploratory.json # Structured analysis result
66
+ │ └── visualizations/
67
+ │ ├── sales_2023_age_vs_amount.png # Scatter plot
68
+ │ └── sales_2023_amount_dist.png # Histogram
69
+ └── intermediate/
70
+ └── sales_2023_cleaned.csv # Cleaned data (if applicable)
71
+
72
+ To use in your code, copy the JSON to shared/static/:
73
+ mkdir -p shared/static/ && cp tmp/output/sales_2023_exploratory.json shared/static/
74
+
75
+ Then import directly in your code:
76
+ import analysisData from '@shared/static/sales_2023_exploratory.json'
77
+ ```