create-yss-spec 3.4.7 → 3.4.9

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 (454) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +5 -5
  4. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +2 -2
  5. package/template/.agents/skills/archify/SKILL.md +2 -19
  6. package/template/.agents/skills/archify/references/geometry-and-routing.md +20 -0
  7. package/template/.agents/skills/code-review/SKILL.md +3 -33
  8. package/template/.agents/skills/code-review/references/candidate-capture.md +33 -0
  9. package/template/.agents/skills/code-review/references/yss-review-standards.md +20 -0
  10. package/template/.agents/skills/codebase-design/SKILL.md +2 -2
  11. package/template/.agents/skills/competitive-intelligence/SKILL.md +1 -1
  12. package/template/.agents/skills/diagnosing-bugs/SKILL.md +6 -2
  13. package/template/.agents/skills/formily-foundation/SKILL.md +1 -1
  14. package/template/.agents/skills/formily-step-flow/SKILL.md +3 -2
  15. package/template/.agents/skills/frontend-commit/SKILL.md +6 -6
  16. package/template/.agents/skills/grilling/SKILL.md +2 -2
  17. package/template/.agents/skills/implement/SKILL.md +1 -1
  18. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +3 -3
  19. package/template/.agents/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  20. package/template/.agents/skills/improve-codebase-architecture/SKILL.md +10 -6
  21. package/template/.agents/skills/java-backend-commit/SKILL.md +5 -5
  22. package/template/.agents/skills/llm-wiki/SKILL.md +1 -1
  23. package/template/.agents/skills/lombok/SKILL.md +1 -1
  24. package/template/.agents/skills/mapstruct/SKILL.md +3 -1
  25. package/template/.agents/skills/prototype/SKILL.md +1 -1
  26. package/template/.agents/skills/prototype-review/SKILL.md +1 -1
  27. package/template/.agents/skills/resolving-merge-conflicts/SKILL.md +2 -2
  28. package/template/.agents/skills/tdd/SKILL.md +1 -1
  29. package/template/.agents/skills/to-questionnaire/SKILL.md +4 -2
  30. package/template/.agents/skills/to-spec/SKILL.md +3 -3
  31. package/template/.agents/skills/to-tickets/SKILL.md +7 -7
  32. package/template/.agents/skills/using-git-worktrees/SKILL.md +13 -11
  33. package/template/.agents/skills/wait-what/SKILL.md +1 -1
  34. package/template/.agents/skills/wayfinder/SKILL.md +4 -2
  35. package/template/.agents/skills/writing-for-agents/SKILL.md +9 -73
  36. package/template/.agents/skills/writing-for-agents/references/writing-principles.md +76 -0
  37. package/template/.agents/skills/yss-api-integration/SKILL.md +2 -2
  38. package/template/.agents/skills/yss-application/SKILL.md +12 -0
  39. package/template/.agents/skills/yss-application/references/application-layer-guide.md +7 -0
  40. package/template/.agents/skills/yss-audit-log/SKILL.md +3 -1
  41. package/template/.agents/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  42. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  43. package/template/.agents/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  44. package/template/.agents/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  45. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +44 -0
  46. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  47. package/template/.agents/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  48. package/template/.agents/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  49. package/template/.agents/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  50. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  51. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  52. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  53. package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  54. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  55. package/template/.agents/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  56. package/template/.agents/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  57. package/template/.agents/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  58. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  59. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  60. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  61. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  62. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  63. package/template/.agents/skills/yss-domain/SKILL.md +17 -5
  64. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +10 -3
  65. package/template/.agents/skills/yss-domain/references/existing-project.md +5 -0
  66. package/template/.agents/skills/yss-dto/SKILL.md +13 -10
  67. package/template/.agents/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  68. package/template/.agents/skills/yss-exception/SKILL.md +2 -2
  69. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +12 -12
  70. package/template/.agents/skills/yss-hook/SKILL.md +8 -44
  71. package/template/.agents/skills/yss-hook/references/use-request.md +42 -0
  72. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  73. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  74. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  75. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  76. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  77. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  78. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  79. package/template/.agents/skills/yss-mybatis/SKILL.md +14 -0
  80. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
  81. package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -32
  82. package/template/.agents/skills/yss-openapi-governance/references/governance-output.md +34 -0
  83. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
  84. package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -5
  85. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  86. package/template/.agents/skills/yss-repository/SKILL.md +13 -1
  87. package/template/.agents/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  88. package/template/.agents/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  89. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  90. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  91. package/template/.agents/skills/yss-stage-decision/SKILL.md +1 -1
  92. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  93. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -3
  94. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  95. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  96. package/template/.agents/skills/yss-validation/SKILL.md +1 -1
  97. package/template/.agents/skills/yss-web-controller/SKILL.md +16 -7
  98. package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  99. package/template/.agents/skills/ytable-usage/SKILL.md +2 -2
  100. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +2 -2
  101. package/template/.codex/skills/archify/SKILL.md +2 -19
  102. package/template/.codex/skills/archify/references/geometry-and-routing.md +20 -0
  103. package/template/.codex/skills/code-review/SKILL.md +3 -33
  104. package/template/.codex/skills/code-review/references/candidate-capture.md +33 -0
  105. package/template/.codex/skills/code-review/references/yss-review-standards.md +20 -0
  106. package/template/.codex/skills/codebase-design/SKILL.md +2 -2
  107. package/template/.codex/skills/competitive-intelligence/SKILL.md +1 -1
  108. package/template/.codex/skills/data-analytics/mcp/server.cjs +2 -1
  109. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +9 -32
  110. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/references/quality-checks.md +29 -0
  111. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  112. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +4 -4
  113. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/SKILL.md +12 -22
  114. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/cli.py +5 -10
  115. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/scripts/report_to_google_doc/plan.py +47 -49
  116. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-doc/tests/test_delivery_plan.py +45 -0
  117. package/template/.codex/skills/data-analytics/skills/build-report/report-to-google-slides/SKILL.md +4 -5
  118. package/template/.codex/skills/data-analytics/skills/build-report/report-to-pdf/SKILL.md +1 -1
  119. package/template/.codex/skills/data-analytics/skills/build-report/specifications/mcp-app-report.md +1 -1
  120. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  121. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  122. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +4 -4
  123. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  124. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +2 -2
  125. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  126. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  127. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  128. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +4 -4
  129. package/template/.codex/skills/data-analytics/skills/user-context/SKILL.md +16 -14
  130. package/template/.codex/skills/data-analytics/skills/user-context/plugin-author-config/automation-config.md +1 -1
  131. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding-examples.md +1 -1
  132. package/template/.codex/skills/data-analytics/skills/user-context/references/onboarding.md +7 -7
  133. package/template/.codex/skills/data-analytics/skills/user-context/references/source-category-runtime.md +7 -7
  134. package/template/.codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py +4 -2
  135. package/template/.codex/skills/data-analytics/skills/user-context/scripts/validate_user_context_preflight.py +5 -5
  136. package/template/.codex/skills/data-analytics/skills/user-context/tests/test_state_helpers.py +3 -3
  137. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +7 -71
  138. package/template/.codex/skills/data-analytics/skills/validate-data/references/validation-methods.md +70 -0
  139. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +4 -4
  140. package/template/.codex/skills/data-analytics/src/analytics-app/App.tsx +1 -1
  141. package/template/.codex/skills/data-analytics/src/analytics-app-core.md +1 -1
  142. package/template/.codex/skills/diagnosing-bugs/SKILL.md +6 -2
  143. package/template/.codex/skills/formily-foundation/SKILL.md +1 -1
  144. package/template/.codex/skills/formily-step-flow/SKILL.md +3 -2
  145. package/template/.codex/skills/frontend-commit/SKILL.md +6 -6
  146. package/template/.codex/skills/grilling/SKILL.md +2 -2
  147. package/template/.codex/skills/implement/SKILL.md +1 -1
  148. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +3 -3
  149. package/template/.codex/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  150. package/template/.codex/skills/improve-codebase-architecture/SKILL.md +10 -6
  151. package/template/.codex/skills/java-backend-commit/SKILL.md +5 -5
  152. package/template/.codex/skills/llm-wiki/SKILL.md +1 -1
  153. package/template/.codex/skills/lombok/SKILL.md +1 -1
  154. package/template/.codex/skills/mapstruct/SKILL.md +3 -1
  155. package/template/.codex/skills/product-design/references/critical-overrides.md +3 -4
  156. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  157. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  158. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +2 -1
  159. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +2 -50
  160. package/template/.codex/skills/product-design/skills/ideate/references/image-prompt-patterns.md +51 -0
  161. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +6 -6
  162. package/template/.codex/skills/product-design/skills/index/SKILL.md +2 -2
  163. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +6 -6
  164. package/template/.codex/skills/product-design/skills/url-to-code/SKILL.md +1 -1
  165. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  166. package/template/.codex/skills/prototype/SKILL.md +1 -1
  167. package/template/.codex/skills/prototype-review/SKILL.md +1 -1
  168. package/template/.codex/skills/resolving-merge-conflicts/SKILL.md +2 -2
  169. package/template/.codex/skills/tdd/SKILL.md +1 -1
  170. package/template/.codex/skills/to-questionnaire/SKILL.md +4 -2
  171. package/template/.codex/skills/to-spec/SKILL.md +3 -3
  172. package/template/.codex/skills/to-tickets/SKILL.md +7 -7
  173. package/template/.codex/skills/using-git-worktrees/SKILL.md +13 -11
  174. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  175. package/template/.codex/skills/wayfinder/SKILL.md +4 -2
  176. package/template/.codex/skills/writing-for-agents/SKILL.md +9 -73
  177. package/template/.codex/skills/writing-for-agents/references/writing-principles.md +76 -0
  178. package/template/.codex/skills/yss-api-integration/SKILL.md +2 -2
  179. package/template/.codex/skills/yss-application/SKILL.md +12 -0
  180. package/template/.codex/skills/yss-application/references/application-layer-guide.md +7 -0
  181. package/template/.codex/skills/yss-audit-log/SKILL.md +3 -1
  182. package/template/.codex/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  183. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  184. package/template/.codex/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  185. package/template/.codex/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  186. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +44 -0
  187. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  188. package/template/.codex/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  189. package/template/.codex/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  190. package/template/.codex/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  191. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  192. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  193. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  194. package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  195. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  196. package/template/.codex/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  197. package/template/.codex/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  198. package/template/.codex/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  199. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  200. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  201. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  202. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  203. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  204. package/template/.codex/skills/yss-domain/SKILL.md +17 -5
  205. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +10 -3
  206. package/template/.codex/skills/yss-domain/references/existing-project.md +5 -0
  207. package/template/.codex/skills/yss-dto/SKILL.md +13 -10
  208. package/template/.codex/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  209. package/template/.codex/skills/yss-exception/SKILL.md +2 -2
  210. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +12 -12
  211. package/template/.codex/skills/yss-hook/SKILL.md +8 -44
  212. package/template/.codex/skills/yss-hook/references/use-request.md +42 -0
  213. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  214. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  215. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  216. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  217. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  218. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  219. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  220. package/template/.codex/skills/yss-mybatis/SKILL.md +14 -0
  221. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
  222. package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -32
  223. package/template/.codex/skills/yss-openapi-governance/references/governance-output.md +34 -0
  224. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
  225. package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -5
  226. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  227. package/template/.codex/skills/yss-repository/SKILL.md +13 -1
  228. package/template/.codex/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  229. package/template/.codex/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  230. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  231. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  232. package/template/.codex/skills/yss-stage-decision/SKILL.md +1 -1
  233. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  234. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -3
  235. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  236. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  237. package/template/.codex/skills/yss-validation/SKILL.md +1 -1
  238. package/template/.codex/skills/yss-web-controller/SKILL.md +16 -7
  239. package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  240. package/template/.codex/skills/ytable-usage/SKILL.md +2 -2
  241. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +2 -2
  242. package/template/.cursor/skills/archify/SKILL.md +2 -19
  243. package/template/.cursor/skills/archify/references/geometry-and-routing.md +20 -0
  244. package/template/.cursor/skills/code-review/SKILL.md +3 -33
  245. package/template/.cursor/skills/code-review/references/candidate-capture.md +33 -0
  246. package/template/.cursor/skills/code-review/references/yss-review-standards.md +20 -0
  247. package/template/.cursor/skills/codebase-design/SKILL.md +2 -2
  248. package/template/.cursor/skills/competitive-intelligence/SKILL.md +1 -1
  249. package/template/.cursor/skills/diagnosing-bugs/SKILL.md +6 -2
  250. package/template/.cursor/skills/formily-foundation/SKILL.md +1 -1
  251. package/template/.cursor/skills/formily-step-flow/SKILL.md +3 -2
  252. package/template/.cursor/skills/frontend-commit/SKILL.md +6 -6
  253. package/template/.cursor/skills/grilling/SKILL.md +2 -2
  254. package/template/.cursor/skills/implement/SKILL.md +1 -1
  255. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +3 -3
  256. package/template/.cursor/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  257. package/template/.cursor/skills/improve-codebase-architecture/SKILL.md +10 -6
  258. package/template/.cursor/skills/java-backend-commit/SKILL.md +5 -5
  259. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -1
  260. package/template/.cursor/skills/lombok/SKILL.md +1 -1
  261. package/template/.cursor/skills/mapstruct/SKILL.md +3 -1
  262. package/template/.cursor/skills/prototype/SKILL.md +1 -1
  263. package/template/.cursor/skills/prototype-review/SKILL.md +1 -1
  264. package/template/.cursor/skills/resolving-merge-conflicts/SKILL.md +2 -2
  265. package/template/.cursor/skills/tdd/SKILL.md +1 -1
  266. package/template/.cursor/skills/to-questionnaire/SKILL.md +4 -2
  267. package/template/.cursor/skills/to-spec/SKILL.md +3 -3
  268. package/template/.cursor/skills/to-tickets/SKILL.md +7 -7
  269. package/template/.cursor/skills/using-git-worktrees/SKILL.md +13 -11
  270. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  271. package/template/.cursor/skills/wayfinder/SKILL.md +4 -2
  272. package/template/.cursor/skills/writing-for-agents/SKILL.md +9 -73
  273. package/template/.cursor/skills/writing-for-agents/references/writing-principles.md +76 -0
  274. package/template/.cursor/skills/yss-api-integration/SKILL.md +2 -2
  275. package/template/.cursor/skills/yss-application/SKILL.md +12 -0
  276. package/template/.cursor/skills/yss-application/references/application-layer-guide.md +7 -0
  277. package/template/.cursor/skills/yss-audit-log/SKILL.md +3 -1
  278. package/template/.cursor/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  279. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  280. package/template/.cursor/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  281. package/template/.cursor/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  282. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +44 -0
  283. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  284. package/template/.cursor/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  285. package/template/.cursor/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  286. package/template/.cursor/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  287. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  288. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  289. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  290. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  291. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  292. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  293. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  294. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  295. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  296. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  297. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  298. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  299. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  300. package/template/.cursor/skills/yss-domain/SKILL.md +17 -5
  301. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +10 -3
  302. package/template/.cursor/skills/yss-domain/references/existing-project.md +5 -0
  303. package/template/.cursor/skills/yss-dto/SKILL.md +13 -10
  304. package/template/.cursor/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  305. package/template/.cursor/skills/yss-exception/SKILL.md +2 -2
  306. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +12 -12
  307. package/template/.cursor/skills/yss-hook/SKILL.md +8 -44
  308. package/template/.cursor/skills/yss-hook/references/use-request.md +42 -0
  309. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  310. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  311. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  312. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  313. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  314. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  315. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  316. package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -0
  317. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
  318. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -32
  319. package/template/.cursor/skills/yss-openapi-governance/references/governance-output.md +34 -0
  320. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
  321. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -5
  322. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  323. package/template/.cursor/skills/yss-repository/SKILL.md +13 -1
  324. package/template/.cursor/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  325. package/template/.cursor/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  326. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  327. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  328. package/template/.cursor/skills/yss-stage-decision/SKILL.md +1 -1
  329. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  330. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -3
  331. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  332. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  333. package/template/.cursor/skills/yss-validation/SKILL.md +1 -1
  334. package/template/.cursor/skills/yss-web-controller/SKILL.md +16 -7
  335. package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  336. package/template/.cursor/skills/ytable-usage/SKILL.md +2 -2
  337. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +2 -2
  338. package/template/.pi/skills/archify/SKILL.md +2 -19
  339. package/template/.pi/skills/archify/references/geometry-and-routing.md +20 -0
  340. package/template/.pi/skills/code-review/SKILL.md +3 -33
  341. package/template/.pi/skills/code-review/references/candidate-capture.md +33 -0
  342. package/template/.pi/skills/code-review/references/yss-review-standards.md +20 -0
  343. package/template/.pi/skills/codebase-design/SKILL.md +2 -2
  344. package/template/.pi/skills/competitive-intelligence/SKILL.md +1 -1
  345. package/template/.pi/skills/diagnosing-bugs/SKILL.md +6 -2
  346. package/template/.pi/skills/formily-foundation/SKILL.md +1 -1
  347. package/template/.pi/skills/formily-step-flow/SKILL.md +3 -2
  348. package/template/.pi/skills/frontend-commit/SKILL.md +6 -6
  349. package/template/.pi/skills/grilling/SKILL.md +2 -2
  350. package/template/.pi/skills/implement/SKILL.md +1 -1
  351. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +3 -3
  352. package/template/.pi/skills/implementation-repo-onboarding/references/write-scope.md +5 -0
  353. package/template/.pi/skills/improve-codebase-architecture/SKILL.md +10 -6
  354. package/template/.pi/skills/java-backend-commit/SKILL.md +5 -5
  355. package/template/.pi/skills/llm-wiki/SKILL.md +1 -1
  356. package/template/.pi/skills/lombok/SKILL.md +1 -1
  357. package/template/.pi/skills/mapstruct/SKILL.md +3 -1
  358. package/template/.pi/skills/prototype/SKILL.md +1 -1
  359. package/template/.pi/skills/prototype-review/SKILL.md +1 -1
  360. package/template/.pi/skills/resolving-merge-conflicts/SKILL.md +2 -2
  361. package/template/.pi/skills/tdd/SKILL.md +1 -1
  362. package/template/.pi/skills/to-questionnaire/SKILL.md +4 -2
  363. package/template/.pi/skills/to-spec/SKILL.md +3 -3
  364. package/template/.pi/skills/to-tickets/SKILL.md +7 -7
  365. package/template/.pi/skills/using-git-worktrees/SKILL.md +13 -11
  366. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  367. package/template/.pi/skills/wayfinder/SKILL.md +4 -2
  368. package/template/.pi/skills/writing-for-agents/SKILL.md +9 -73
  369. package/template/.pi/skills/writing-for-agents/references/writing-principles.md +76 -0
  370. package/template/.pi/skills/yss-api-integration/SKILL.md +2 -2
  371. package/template/.pi/skills/yss-application/SKILL.md +12 -0
  372. package/template/.pi/skills/yss-application/references/application-layer-guide.md +7 -0
  373. package/template/.pi/skills/yss-audit-log/SKILL.md +3 -1
  374. package/template/.pi/skills/yss-audit-log/assets/AuditLogAspect.java +1 -0
  375. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogPrintSubscriberImpl.java +1 -0
  376. package/template/.pi/skills/yss-audit-log/assets/YssAuditLogSysManagerSubscriberImpl.java +1 -0
  377. package/template/.pi/skills/yss-audit-log/assets/YssAuditPublishService.java +1 -0
  378. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +44 -0
  379. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +21 -0
  380. package/template/.pi/skills/yss-backend-spec-review/references/remediation-workflow.md +48 -0
  381. package/template/.pi/skills/yss-backend-spec-review/references/standards-coverage.md +39 -0
  382. package/template/.pi/skills/yss-backend-spec-review/tests/routing.test.mjs +19 -0
  383. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +7 -34
  384. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +60 -23
  385. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +6 -0
  386. package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +1 -1
  387. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +4 -2
  388. package/template/.pi/skills/yss-ddd-scaffold-generator/references/command-examples.md +32 -0
  389. package/template/.pi/skills/yss-ddd-scaffold-generator/references/engineering-baseline.md +7 -1
  390. package/template/.pi/skills/yss-ddd-scaffold-generator/references/generator-maintenance.md +7 -0
  391. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +6 -10
  392. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +12 -16
  393. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +36 -87
  394. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +4 -3
  395. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  396. package/template/.pi/skills/yss-domain/SKILL.md +17 -5
  397. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +10 -3
  398. package/template/.pi/skills/yss-domain/references/existing-project.md +5 -0
  399. package/template/.pi/skills/yss-dto/SKILL.md +13 -10
  400. package/template/.pi/skills/yss-dto/references/wire-validation-checklist.md +14 -0
  401. package/template/.pi/skills/yss-exception/SKILL.md +2 -2
  402. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +12 -12
  403. package/template/.pi/skills/yss-hook/SKILL.md +8 -44
  404. package/template/.pi/skills/yss-hook/references/use-request.md +42 -0
  405. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +1 -5
  406. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  407. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +7 -0
  408. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +5 -1
  409. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  410. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/assets/templates/architecture-rules-test.java.template +66 -0
  411. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +4 -2
  412. package/template/.pi/skills/yss-mybatis/SKILL.md +14 -0
  413. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
  414. package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -32
  415. package/template/.pi/skills/yss-openapi-governance/references/governance-output.md +34 -0
  416. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
  417. package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -5
  418. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +7 -0
  419. package/template/.pi/skills/yss-repository/SKILL.md +13 -1
  420. package/template/.pi/skills/yss-repository/references/profiles/existing-domain-driven-maven.md +7 -0
  421. package/template/.pi/skills/yss-repository/references/profiles/existing-layered-mvc-maven.md +7 -0
  422. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +10 -2
  423. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +3 -1
  424. package/template/.pi/skills/yss-stage-decision/SKILL.md +1 -1
  425. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +3 -0
  426. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -3
  427. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +5 -0
  428. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +5 -3
  429. package/template/.pi/skills/yss-validation/SKILL.md +1 -1
  430. package/template/.pi/skills/yss-web-controller/SKILL.md +16 -7
  431. package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +8 -0
  432. package/template/.pi/skills/ytable-usage/SKILL.md +2 -2
  433. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  434. package/template/docs/engineering/backend-platforms.md +14 -0
  435. package/template/docs/process/schemas/digital-human-task-package.schema.json +713 -100
  436. package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +41 -0
  437. package/template/scripts/backend-standards-coverage +26 -0
  438. package/template/scripts/lib/backend-platform-provenance.mjs +1 -1
  439. package/template/scripts/lib/backend-platform-verification.mjs +2 -2
  440. package/template/scripts/lib/backend-platform.mjs +62 -0
  441. package/template/scripts/lib/backend-review.mjs +140 -0
  442. package/template/scripts/lib/backend-standards-coverage.mjs +237 -0
  443. package/template/scripts/lib/first-slice-artifacts.mjs +47 -0
  444. package/template/scripts/lib/first-slice-tests.mjs +24 -0
  445. package/template/scripts/lib/lifecycle-transition.mjs +9 -0
  446. package/template/scripts/lib/maintenance-candidate.mjs +160 -0
  447. package/template/scripts/lib/profile-skill-sync.mjs +46 -5
  448. package/template/scripts/lib/slice-execution-preflight.mjs +43 -0
  449. package/template/scripts/slice-contract +7 -3
  450. package/template/scripts/verify-backend-platform-matrix +8 -2
  451. package/template/skills-lock.json +77 -63
  452. package/template/yss-public-skills.json +4 -2
  453. package/template.manifest.json +0 -1
  454. package/template.snapshot.json +5 -5
@@ -11,12 +11,12 @@ This skill is the Data Analytics plugin's source-routing, semantic-layer registr
11
11
 
12
12
  - For ordinary Data Analytics preflight, use `scripts/data_analytics_preflight.py` as the default state-read path when local shell access is available.
13
13
  - Apply the same gate on behalf of other Data Analytics skills that call `data-analytics:user-context` as part of their own mandatory preflight before answering, searching connectors, retrieving evidence, creating artifacts, or drafting output.
14
- - When running the preflight script through a command tool, set the tool's `max_output_tokens` to at least `25000` so the complete payload remains visible as the registry grows. If the tool output is truncated, warn the user that Data Analytics could not load all source-routing preferences and semantic-layer registry entries in one pass, then rerun with a higher cap and do not use the payload until the complete output is visible.
15
- - Treat the script payload as satisfying the read requirement only when it reports read status for `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/user-context.md` and renders the compact context it will use in `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, and `control`.
14
+ - When running the preflight script through a command tool, choose an output budget that renders the compact payload completely; there is no fixed minimum token allocation. If the tool output is truncated, warn the user that Data Analytics could not load all source-routing preferences and semantic-layer registry entries in one pass, then rerun with a higher cap and do not use the payload until the complete output is visible.
15
+ - Treat the script payload as satisfying the read requirement only when it reports read status for `$CODEX_HOME/state/plugins/data-analytics/user-context.md` and renders the compact context it will use in `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, and `control`.
16
16
  - Do not treat listing files, checking that files exist, or saying they should be read as sufficient; source-routing preferences, semantic-layer pointers, source category mapping, and onboarding obligations must be loaded and applied.
17
17
  - If the script fails, cannot render the compact Data Analytics context the workflow will use, local shell access is unavailable, or the request is direct context maintenance, actually read the relevant state files manually before answering or writing.
18
18
  - If the user-context file is absent or unavailable, follow `references/onboarding.md` for first-run behavior.
19
- - Read `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/onboarding-state.json` only when onboarding state, semantic-layer refresh setup, hero prompt progress, or progressive nudges are relevant.
19
+ - Read `$CODEX_HOME/state/plugins/data-analytics/onboarding-state.json` only when onboarding state, semantic-layer refresh setup, hero prompt progress, or progressive nudges are relevant.
20
20
 
21
21
  ## Skill Configuration
22
22
 
@@ -41,7 +41,7 @@ Use this skill as the fast preflight for every substantive Data Analytics workfl
41
41
  `SKILL.md` owns the normal preflight, direct read, narrow write, onboarding handoff, and first-run setup path. Load references selectively:
42
42
 
43
43
  - Use `scripts/data_analytics_preflight.py` as the normal read-only preflight implementation when local shell access is available. Its JSON payload owns Data Analytics state-file read status, compact user-context normalization, source-routing preferences, source category configuration, connector confirmation and setup summary, semantic-layer registry, hero prompt candidates, file provenance, onboarding progress, and final response obligations for ordinary workflows.
44
- - Keep first-run state creation automated through `scripts/init_user_context_state.py`; it copies the bundled templates into the user's Data Analytics state directory. Do not run it before the first direct onboarding orientation when no state exists. Run it after the user approves the first setup step, or when an explicit future source-routing choice or semantic-layer registry pointer needs persistence. When running through a sandboxed local shell, request elevated execution by default because the initializer writes under `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}`, outside the project workspace. After initialization, write only the narrow supported `user-context.md` fields and related JSON state files.
44
+ - Keep first-run state creation automated through `scripts/init_user_context_state.py`; it copies the bundled templates into the user's Data Analytics state directory. Do not run it before the first direct onboarding orientation when no state exists. Run it after the user approves the first setup step, or when an explicit future source-routing choice or semantic-layer registry pointer needs persistence. Use the permissions actually provided by the host; request additional access only if the authorized narrow write is blocked. Do not assume elevation is required or available. After initialization, write only the narrow supported `user-context.md` fields and related JSON state files.
45
45
  - Use `scripts/reset_user_context_state.py` for explicit debugging reset requests that clear local Data Analytics user-context and onboarding state. The helper backs up known state files before removing them from the active state directory.
46
46
  - Use `references/onboarding.md` when first-run orientation, core source setup confirmation, semantic-layer setup, semantic-layer refresh setup, semantic-layer weekly source polling setup, hero prompt sequencing, onboarding completion, onboarding status, Data Analytics TODOs, walkthroughs, environment conflict audit, or onboarding-state updates are active.
47
47
  - Use `references/semantic-layer/setup.md` when onboarding, direct setup, or maintenance work needs to create, refresh, inspect, or repair a semantic layer. Use `references/semantic-layer/source-intake.md` for seed-source intake and source inventory shaping, `references/semantic-layer/connector-playbook.md` for semantic-layer source-lane connector behavior, and `references/semantic-layer/skill-template.md` for the generated semantic-layer skill shape.
@@ -69,18 +69,20 @@ When `data_analytics_preflight.py` reports hero prompt candidates and onboarding
69
69
 
70
70
  ## State Files
71
71
 
72
+ Resolve the state directory exactly as the script does: explicit `--state-dir`, otherwise resolved `CODEX_HOME` (fallback `~/.codex`) plus `state/plugins/data-analytics`. Invoke scripts from the resolved skill directory or use its absolute path. This is a path clarification, not an instruction to migrate, reset or clean existing state.
73
+
72
74
  Ordinary workflow preflight should read these files through `scripts/data_analytics_preflight.py`; direct context maintenance and fallback paths may read them manually when the script is unavailable or insufficient.
73
75
 
74
76
  The configured user-context file is:
75
77
 
76
78
  ```text
77
- $CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/user-context.md
79
+ $CODEX_HOME/state/plugins/data-analytics/user-context.md
78
80
  ```
79
81
 
80
82
  The configured onboarding-state file is JSON:
81
83
 
82
84
  ```text
83
- $CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/onboarding-state.json
85
+ $CODEX_HOME/state/plugins/data-analytics/onboarding-state.json
84
86
  ```
85
87
 
86
88
  ## Read
@@ -91,7 +93,7 @@ Treat `user-context.md` as the local Data Analytics plugin-scoped source of trut
91
93
 
92
94
  Use preflight mode when another Data Analytics skill asks for Data Analytics setup context before ordinary plugin work. Optimize this path for speed:
93
95
 
94
- - When local shell access is available, run `python3 plugins/data-analytics/skills/user-context/scripts/data_analytics_preflight.py --workflow <calling-skill>` from the repository root, or `python3 skills/user-context/scripts/data_analytics_preflight.py --workflow <calling-skill>` from the Data Analytics plugin root. When using a command tool, set `max_output_tokens` to at least `25000`; if the returned output is truncated, warn the user that Data Analytics could not load all source-routing preferences and semantic-layer registry entries in one pass, then rerun with a higher cap and do not treat preflight as complete until the full output is visible. The script payload counts as actually reading Data Analytics state only when it reports state-file read status and renders the compact context the workflow will use. Use the payload as the single source of truth for `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, hard `control.final_obligations`, `control.conditional_guidance`, and `control.onboarding_progress.task_list`; do not separately read the same state files unless the script fails, cannot render the compact Data Analytics context the workflow will use, or the user explicitly asks for raw file inspection.
96
+ - When local shell access is available, run `python3 .codex/skills/data-analytics/skills/user-context/scripts/data_analytics_preflight.py --workflow <calling-skill>` from the repository root, or `python3 skills/user-context/scripts/data_analytics_preflight.py --workflow <calling-skill>` from the Data Analytics plugin root. When using a command tool, size the output budget to the compact payload; if the returned output is truncated, warn the user that Data Analytics could not load all source-routing preferences and semantic-layer registry entries in one pass, then rerun with a higher cap and do not treat preflight as complete until the full output is visible. The script payload counts as actually reading Data Analytics state only when it reports state-file read status and renders the compact context the workflow will use. Use the payload as the single source of truth for `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, applicable `control.final_obligations` (respect each `only_when` condition), `control.conditional_guidance`, and `control.onboarding_progress.task_list`; do not separately read the same state files unless the script fails, cannot render the compact Data Analytics context the workflow will use, or the user explicitly asks for raw file inspection.
95
97
  - Use the default `--request-mode ordinary_workflow` for normal Data Analytics answers. Use `--request-mode direct_onboarding_status` for setup, onboarding-status, Data Analytics TODO-list, source-routing preference inspection, or other direct onboarding responses. Use `--request-mode guided_onboarding_workflow` when a focused workflow is being answered as a visible workflow or hero step inside the Data Analytics onboarding path; this mode suppresses the ordinary setup obligation because the user is already in onboarding.
96
98
  - Use `context.source_preferences` as source-selection hints. Do not proactively check connector readiness during ordinary preflight. When onboarding or a focused workflow needs a source, it should try the relevant connector then and handle auth, connection, skip, defer, or manual fallback in that context.
97
99
  - Use `context.semantic_layers` as the semantic-layer registry. If the request names or implies a product area, metric, table, dashboard, SQL query, source choice, join, caveat, or recurring business question and a matching semantic layer exists, load that semantic-layer skill before choosing tables, writing SQL, reconciling dashboards, or giving metric definitions.
@@ -100,14 +102,14 @@ Use preflight mode when another Data Analytics skill asks for Data Analytics set
100
102
  - If `onboarding-state.json` exists, parse only the relevant fields for whether onboarding is active, quiet, complete, whether core onboarding is complete, and any concrete next actions. Do not echo raw onboarding-state content into ordinary preflight output; use file provenance plus the normalized onboarding, source, semantic-layer, and hero-prompt fields the script returns. During ordinary preflight, return at most one concrete guided next step that the calling skill may append after answering the immediate request. If core onboarding is still incomplete, the next step should direct the user back to the next unresolved core setup item: source setup confirmation or semantic-layer setup. During direct onboarding, setup-status answers, or user requests for the Data Analytics TODO list, use `references/onboarding.md` to render the single visible compact `**Next Step**` block and mirror the compact high-level roadmap into the built-in thread task list when available.
101
103
  - Treat `context.connector_setup_summary.unresolved_core_ids` and `context.connector_setup_summary.next_action` as authoritative during onboarding. Do not advance into semantic-layer setup because a core source entry merely says `deferred`, `skipped`, `declined`, `unavailable`, or `not_applicable`; preflight reopens that source as `needs_confirmation` unless onboarding state records the user's explicit known-gap resolution.
102
104
  - Use the returned `data_analytics_preflight` envelope as the source of truth for saved context, source category configuration, connector setup summary, semantic-layer registry, primary hero prompt, extra hero prompt candidates, onboarding progress, final obligations, and conditional guidance. Treat saved context and semantic layers as source-selection inputs, not as substitutes for workflow-time reads from connected or provided sources.
103
- - If `user-context.md` is missing, read `references/onboarding.md`, return that no durable Data Analytics source-routing preferences or semantic-layer registry are available, use the script-driven payload or documented manual fallback to provide conditional setup guidance, and let the caller continue. Do not run the initializer or scaffold state merely because the file is missing. Do not interrupt ordinary plugin work with setup or stop at a setup request. For a high-intent first-run workflow request, tell the caller to answer the user's concrete query first using bundled instructions, user-provided material, and available connectors or sources; if the requested artifact cannot be completed or is meaningfully weaker because a source or semantic layer is missing, give the best truthful answer from the attempted sources and name the practical gap using `references/onboarding.md#context-gap-note`. Append the ordinary-workflow setup obligation only when preflight returns it because onboarding has not started; do not offer to start onboarding when `onboarding-state.json` already says onboarding is active.
105
+ - If `user-context.md` is missing, read `references/onboarding.md`, return that no durable Data Analytics source-routing preferences or semantic-layer registry are available, use the script-driven payload or documented manual fallback to provide conditional setup guidance, and let the caller continue. Do not run the initializer or scaffold state merely because the file is missing. Do not interrupt ordinary plugin work with setup or stop at a setup request. For a high-intent first-run workflow request, tell the caller to answer the user's concrete query first using bundled instructions, user-provided material, and available connectors or sources; if the requested artifact cannot be completed or is meaningfully weaker because a source or semantic layer is missing, give the best truthful answer from the attempted sources and name the practical gap using `references/onboarding.md#context-gap-note`. Append a returned setup suggestion only when its `only_when` condition is met because missing setup materially affects this requested output; do not offer to start onboarding when `onboarding-state.json` already says onboarding is active.
104
106
  - If a referenced source is inaccessible, stale, ambiguous, or missing, say that directly only when the missing source affects the current task, then continue with the available context.
105
107
 
106
108
  ### Script-Driven Preflight Payload
107
109
 
108
- Preflight mode must use `scripts/data_analytics_preflight.py` as the authoritative payload before ordinary work continues. The script output owns `request_mode`, `current_skill_experience`, `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, `control.response_mode`, hard `control.final_obligations`, `control.conditional_guidance`, and `control.onboarding_progress.task_list`. Do not hand-author, recreate, or mentally reconstruct the payload when the script is available; use the JSON fields the script returned.
110
+ Preflight mode must use `scripts/data_analytics_preflight.py` as the authoritative payload before ordinary work continues. The script output owns `request_mode`, `current_skill_experience`, `context.user_context`, `context.source_preferences`, `context.source_category_config`, `context.connector_confirmation`, `context.connector_setup_summary`, `context.semantic_layers`, `context.hero_prompt_candidates`, `context.primary_hero_prompt`, `context.extra_hero_prompt_candidates`, `control.response_mode`, applicable `control.final_obligations` (respect each `only_when` condition), `control.conditional_guidance`, and `control.onboarding_progress.task_list`. Do not hand-author, recreate, or mentally reconstruct the payload when the script is available; use the JSON fields the script returned.
109
111
 
110
- For ordinary Data Analytics workflow requests, honor `control.final_obligations` exactly as returned by the script. The calling skill must answer the immediate request first, then satisfy any returned setup CTA or core-onboarding reminder. When the focused skill does not otherwise own a final continuation, append the returned template intact. When the focused skill has its own final continuation, fold the setup reminder or move-on path into that same final natural continuation so the response has one final visible CTA, not a standalone setup reminder plus a second skill CTA. Do not downgrade a hard obligation into a passive setup aside or a context-gap explanation. Do not use that hard obligation for direct onboarding/setup/status responses, focused workflows launched from the visible onboarding path, or responses where the immediate workflow must ask a required clarification; those callers should use `direct_onboarding_status` or `guided_onboarding_workflow` request mode when appropriate, and clarification-only responses should end with the clarification as the sole final natural continuation.
112
+ For ordinary workflows, apply each `control.final_obligations` item only when its `only_when` condition holds. Answer the immediate request first. Missing saved setup alone never forces a setup CTA after a complete inline/local answer. If missing setup materially blocks this task, name the practical gap and at most one relevant next step. Explicit onboarding/status requests use their own request mode and may show setup steps. Never initialize, migrate, reset or write durable state during ordinary read-only preflight.
111
113
 
112
114
  When the script fails, cannot render the compact Data Analytics context the workflow will use, or local shell access is unavailable, fall back to the manual file-read path described above: actually read the relevant state files, use only fields known from those files or the missing-file condition, apply `references/onboarding.md` for direct onboarding/status behavior, and state any missing source or semantic-layer gap only when it materially affects the current answer. Restore script-driven validation as soon as local shell access is available.
113
115
 
@@ -136,7 +138,7 @@ Default Data Analytics outputs should be useful launchpads, not dead ends. In al
136
138
 
137
139
  Avoid asking for setup context merely to fill onboarding state. Ask only high-uncertainty, high-impact questions whose answers would significantly improve future outputs, semantic-layer quality, connector setup, or the active workflow. If onboarding is active, the current step card in `references/onboarding.md` governs the next step; otherwise use the ordinary action-oriented continuation rules here.
138
140
 
139
- Show at most one direct CTA during ordinary workflow output unless the user explicitly asks for options, onboarding, setup, or the Data Analytics TODO list. When onboarding has not started in an ordinary workflow, that CTA must be the `## Data Analytics Setup Required` template from preflight, even if the immediate artifact is otherwise complete, unless the immediate workflow is blocked on a required clarification. Clarifications always become the final natural continuation and suppress onboarding CTAs for that response. When onboarding is already active and core onboarding is incomplete, direct the user to finish the next core setup item before continuing non-urgent Data Analytics workflows. When onboarding is active and core onboarding is complete, preserve the workflow-owned final natural continuation and mention resuming guided onboarding only as a short non-competing note when useful. For direct onboarding and setup-status flows, follow `references/onboarding.md` instead: render the single visible compact `**Next Step**` block, mirror the compact high-level roadmap into the built-in thread task list when available, and check tasks off as the user completes, approves, declines, or makes them unnecessary. Skip the CTA only when the user asks for quiet behavior, the request is sensitive or high-pressure enough that a follow-up would be distracting, onboarding is complete and the workflow has no reasonable next action, or the focused workflow already owns a better clarification.
141
+ Show at most one contextually useful next step. Respect inline-only and quiet requests. During explicit setup, follow `references/onboarding.md`; ordinary workflows do not become onboarding sessions merely because saved state is missing.
140
142
 
141
143
  ## Write
142
144
 
@@ -147,11 +149,11 @@ Write only two kinds of durable Data Analytics user context to `user-context.md`
147
149
 
148
150
  Do not store general memory, arbitrary "remember this" content, analytical priorities, copied source-of-truth links, saved dashboards, saved tables, saved docs, source inventories, output preferences, accepted-output preferences, quiet-ending preferences, automatic connector readiness, operational onboarding status, connector-audit bookkeeping, hero prompt progress, or semantic-layer refresh metadata in `user-context.md`. Area-specific metric, dashboard, table, source-of-truth, caveat, and definition anchors belong inside the semantic layer itself.
149
151
 
150
- First-run state creation remains automated when persistence is needed: run `python3 plugins/data-analytics/skills/user-context/scripts/init_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/init_user_context_state.py` from the Data Analytics plugin root, to copy `plugin-author-config/user-context-config.md` and seed `onboarding-state.json` from `references/onboarding-state-template.json`. Do not run this command just to show the first direct onboarding orientation. In sandboxed local-shell environments, request elevated execution on the first attempt because the target state directory is under `$CODEX_HOME`, not the project workspace. After initialization, modify `user-context.md` directly. For multi-entry approvals, read the current state once, update every touched source category in one coherent edit, update `onboarding-state.json` once when onboarding bookkeeping changes, then run `scripts/data_analytics_preflight.py --workflow user-context` or the relevant workflow preflight to confirm the supported context reads back cleanly. Keep `onboarding-state.json` compact: do not persist raw `list_available_plugins_to_install` results, full connector inventories, connector descriptions, copied source inventories, source URLs, prompts beyond the compact current onboarding choice, artifact text, source-gap notes, or analysis output. Store resolved route metadata, counts, ids, statuses, timestamps, and durable pointers instead. Never run parallel writes against the same Data Analytics state files.
152
+ First-run state creation remains automated when persistence is needed: run `python3 .codex/skills/data-analytics/skills/user-context/scripts/init_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/init_user_context_state.py` from the Data Analytics plugin root, to copy `plugin-author-config/user-context-config.md` and seed `onboarding-state.json` from `references/onboarding-state-template.json`. Do not run this command just to show the first direct onboarding orientation. In sandboxed local-shell environments, request elevated execution on the first attempt because the target state directory is under `$CODEX_HOME`, not the project workspace. After initialization, modify `user-context.md` directly. For multi-entry approvals, read the current state once, update every touched source category in one coherent edit, update `onboarding-state.json` once when onboarding bookkeeping changes, then run `scripts/data_analytics_preflight.py --workflow user-context` or the relevant workflow preflight to confirm the supported context reads back cleanly. Keep `onboarding-state.json` compact: do not persist raw `list_available_plugins_to_install` results, full connector inventories, connector descriptions, copied source inventories, source URLs, prompts beyond the compact current onboarding choice, artifact text, source-gap notes, or analysis output. Store resolved route metadata, counts, ids, statuses, timestamps, and durable pointers instead. Never run parallel writes against the same Data Analytics state files.
151
153
 
152
154
  For semantic-layer setup, refresh, inspection, or repair, read `references/semantic-layer/setup.md`. Write durable layer pointers into the `# Semantic Layers` section of `user-context.md` and update operational setup or refresh metadata in `onboarding-state.json`. Do not keep semantic-layer discoverability only in onboarding state.
153
155
 
154
- For explicit debugging reset requests only, run `python3 plugins/data-analytics/skills/user-context/scripts/reset_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/reset_user_context_state.py` from the Data Analytics plugin root. The helper backs up active Data Analytics state files, then leaves the plugin ready for fresh onboarding. Never perform this reset for ordinary onboarding, source-routing preference edits, setup retries, source refresh work, or vague troubleshooting.
156
+ For explicit debugging reset requests only, run `python3 .codex/skills/data-analytics/skills/user-context/scripts/reset_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/reset_user_context_state.py` from the Data Analytics plugin root. The helper backs up active Data Analytics state files, then leaves the plugin ready for fresh onboarding. Never perform this reset for ordinary onboarding, source-routing preference edits, setup retries, source refresh work, or vague troubleshooting.
155
157
 
156
158
  Use this source-routing structure:
157
159
 
@@ -186,7 +188,7 @@ For first-run setup after the first orientation, use `scripts/init_user_context_
186
188
 
187
189
  After the user approves the next setup step, supplies an explicit future source-routing choice, or semantic-layer setup needs a durable registry pointer:
188
190
 
189
- 1. Run `python3 plugins/data-analytics/skills/user-context/scripts/init_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/init_user_context_state.py` from the Data Analytics plugin root, when local shell access is available. In sandboxed local-shell environments, request elevated execution on the first attempt because it writes to `$CODEX_HOME/state/plugins/data-analytics`. If the script is unavailable, create `$CODEX_HOME/state/plugins/data-analytics`, copy the content below `## Default User Context` from `plugin-author-config/user-context-config.md` into `user-context.md` with the required top note, and create `onboarding-state.json` from `references/onboarding-state-template.json`.
191
+ 1. Run `python3 .codex/skills/data-analytics/skills/user-context/scripts/init_user_context_state.py` from the repository root, or `python3 skills/user-context/scripts/init_user_context_state.py` from the Data Analytics plugin root, when local shell access is available. In sandboxed local-shell environments, request elevated execution on the first attempt because it writes to `$CODEX_HOME/state/plugins/data-analytics`. If the script is unavailable, create `$CODEX_HOME/state/plugins/data-analytics`, copy the content below `## Default User Context` from `plugin-author-config/user-context-config.md` into `user-context.md` with the required top note, and create `onboarding-state.json` from `references/onboarding-state-template.json`.
190
192
  2. Read the resulting `user-context.md`, preserving every source category's `Prefer` and `Avoid` rows plus the `# Semantic Layers` registry section.
191
193
  3. Update only the approved source-routing choice or semantic-layer pointer. Do not append disconnected general memory.
192
194
  4. Read the resulting `onboarding-state.json`, then update onboarding state with operational onboarding progress, connector confirmation labels, semantic-layer setup or refresh metadata, hero prompt progress, and skill experience progress.
@@ -16,7 +16,7 @@ Every automation entry must use this shape:
16
16
  - Instructions: thin launcher instructions for the scheduled run.
17
17
  ```
18
18
 
19
- Do not add model, reasoning effort, heartbeat kind, RRULEs, tool names, user-specific target thread ids, canonical automation ids, install status, readback evidence, cleanup state, onboarding notification copy, or per-user preferred times here. Those belong in `../references/automation.md` or `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/onboarding-state.json`.
19
+ Do not add model, reasoning effort, heartbeat kind, RRULEs, tool names, user-specific target thread ids, canonical automation ids, install status, readback evidence, cleanup state, onboarding notification copy, or per-user preferred times here. Those belong in `../references/automation.md` or `$CODEX_HOME/state/plugins/data-analytics/onboarding-state.json`.
20
20
 
21
21
  ## Default Automations
22
22
 
@@ -65,7 +65,7 @@ User says:
65
65
  continue
66
66
  ```
67
67
 
68
- Context: Data Analytics found Google Drive and Notion for company docs, but no active data warehouse or team communication route. `functions.list_available_plugins_to_install` returned Databricks, BigQuery, Snowflake, Slack, and Teams.
68
+ Context: Data Analytics found Google Drive and Notion for company docs, but no active data warehouse or team communication route. `host_available_plugin_catalog` returned Databricks, BigQuery, Snowflake, Slack, and Teams.
69
69
 
70
70
  Expected behavior:
71
71
 
@@ -1,12 +1,12 @@
1
1
  # Data Analytics Onboarding Flow
2
2
 
3
- Use this reference when `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/user-context.md` is missing or unreadable, when the user asks what Data Analytics can do, when the user asks to set up or customize Data Analytics, or when `onboarding-state.json` says onboarding is active and a nudge is due.
3
+ Use this reference when `$CODEX_HOME/state/plugins/data-analytics/user-context.md` is missing or unreadable, when the user asks what Data Analytics can do, when the user asks to set up or customize Data Analytics, or when `onboarding-state.json` says onboarding is active and a nudge is due.
4
4
 
5
5
  Onboarding is a mostly linear, nested step-card playbook. It is not a formal graph. Each step owns setup copy, output contract, action close, completion behavior, skip or defer behavior, and any loop or optional branch. Every onboarding message should handle one major user-visible step at most, mirror the overall progress list when the UI is available, and end with one clear action or question.
6
6
 
7
- Store durable source-routing preferences explicitly selected for future use plus semantic-layer pointers in `user-context.md`. Store only operational onboarding progress, including connector-confirmation labels, skill experience progress, semantic-layer setup and refresh state, automation setup, and quiet or complete state, in `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/onboarding-state.json`. Keep onboarding state compact: do not put raw `list_available_plugins_to_install` results, full connector inventories, connector descriptions, copied source inventories, source URLs, source data, polling results, research result bodies, artifact text, source-gap notes, or analysis output in onboarding state; keep that content in `user-context.md`, the generated semantic-layer skill, the pinned polling thread, the current workflow artifact, or the source system. Record compact route metadata, counts, ids, statuses, timestamps, and durable pointers instead. Do not create, read, or update durable connector-readiness proof as part of onboarding. Data Analytics workflows use plugins, apps, or connectors when the workflow needs the source.
7
+ Store durable source-routing preferences explicitly selected for future use plus semantic-layer pointers in `user-context.md`. Store only operational onboarding progress, including connector-confirmation labels, skill experience progress, semantic-layer setup and refresh state, automation setup, and quiet or complete state, in `$CODEX_HOME/state/plugins/data-analytics/onboarding-state.json`. Keep onboarding state compact: do not put raw `list_available_plugins_to_install` results, full connector inventories, connector descriptions, copied source inventories, source URLs, source data, polling results, research result bodies, artifact text, source-gap notes, or analysis output in onboarding state; keep that content in `user-context.md`, the generated semantic-layer skill, the pinned polling thread, the current workflow artifact, or the source system. Record compact route metadata, counts, ids, statuses, timestamps, and durable pointers instead. Do not create, read, or update durable connector-readiness proof as part of onboarding. Data Analytics workflows use plugins, apps, or connectors when the workflow needs the source.
8
8
 
9
- The first direct onboarding response is a response-first fast path. When the user asks to onboard, set up, or learn what Data Analytics can do and no Data Analytics state files exist yet, render Step 1 immediately. Do not run `../scripts/init_user_context_state.py`, write scaffold files, inspect connectors, audit conflicts, create semantic layers, create threads, install automations, start source discovery, or run workflows before that first message. After the user approves the next visible setup step, or whenever the user supplies context that should be saved, use `../scripts/init_user_context_state.py` when local shell access is available. In sandboxed local-shell environments, request elevated execution by default because it writes to `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}`.
9
+ The first direct onboarding response is a response-first fast path. When the user asks to onboard, set up, or learn what Data Analytics can do and no Data Analytics state files exist yet, render Step 1 immediately. Do not run `../scripts/init_user_context_state.py`, write scaffold files, inspect connectors, audit conflicts, create semantic layers, create threads, install automations, start source discovery, or run workflows before that first message. After the user approves the next visible setup step, or whenever the user supplies context that should be saved, use `../scripts/init_user_context_state.py` when local shell access is available. In sandboxed local-shell environments, request elevated execution by default because it writes to `$CODEX_HOME/state/plugins/data-analytics`.
10
10
 
11
11
  Related sources of truth:
12
12
 
@@ -107,7 +107,7 @@ Mirror this user-visible roadmap into the built-in thread task list when availab
107
107
 
108
108
  Before every onboarding response, refresh the checklist from current onboarding state after applying actions from that turn. If the response completed, skipped, or deferred a step, mark that step accordingly and mark the next unresolved visible step as `in_progress`.
109
109
 
110
- Treat core onboarding as complete after source setup confirmation is resolved and the data semantic layer step is either set up from user-provided inputs, explicitly skipped, deferred, unavailable, or blocked with one concrete path. Source setup confirmation is not complete while `structured_data`, `team_communication`, or `company_docs` has an installable or otherwise actionable route question that the user has not explicitly resolved. If no stable semantic-layer target exists because the user skipped, deferred, or is blocked, do not require the refresh substep. Ordinary Data Analytics work should still answer best effort while onboarding is missing or active, then append the single preflight-provided setup obligation unless the response is blocked on a required clarification or the user asked for quiet behavior.
110
+ Treat core onboarding as complete after source setup confirmation is resolved and the data semantic layer step is either set up from user-provided inputs, explicitly skipped, deferred, unavailable, or blocked with one concrete path. Source setup confirmation is not complete while `structured_data`, `team_communication`, or `company_docs` has an installable or otherwise actionable route question that the user has not explicitly resolved. If no stable semantic-layer target exists because the user skipped, deferred, or is blocked, do not require the refresh substep. Ordinary Data Analytics work should still answer best effort while onboarding is missing or active, append at most one preflight-provided setup suggestion only when its `only_when` condition is met and a missing source meaningfully affects the current task. Inline-only and quiet requests do not acquire onboarding CTAs.
111
111
 
112
112
  Treat a plain `yes`, `okay`, `continue`, `ready`, or similar reply after a next-step CTA as approval to perform the current visible next step unless the user names a different action. Treat `skip`, `skip for now`, `not now`, or similar as approval to mark the current visible step skipped or deferred when that step allows it, then continue.
113
113
 
@@ -167,7 +167,7 @@ Reply `continue` and I'll check which analytics sources Codex can use, only aski
167
167
  - Exit when: Every core source category is recorded as `active` or has a user-explicit `declined`, `deferred`, `skipped`, `unavailable`, or `not_applicable` fallback, any offered optional category is recorded as `active`, `missing`, `declined`, `deferred`, `skipped`, `unavailable`, or `not_applicable`, or the user explicitly chooses to continue with recorded known gaps.
168
168
  - Completion: Store onboarding confirmation labels and resolved source routes in `onboarding-state.json`; do not write connector readiness to `user-context.md`.
169
169
  - Next: Step 2A, `resolve_source_questions`, when any source category needs user input; otherwise Step 3A, `introduce_semantic_layer_setup`.
170
- - Output contract: Return a concise standalone active/missing source result with one setup-ready heading line, bold bullets for available sources, one sentence naming remaining source gaps, and one clear setup question. Active connector or app sources are informational fallback routes, not winners, when a related plugin is installed or installable. This setup step, not preflight, inspects the environment, calls `functions.list_available_plugins_to_install` once for the setup pass, and writes resolved routes for each source category. Ask only when there are multiple mutually exclusive installed source tools, an installable related plugin needs approval, no source was found, or the category needs IT or admin help. Do not ask for a docs preference merely because both Google Drive and Notion are available; record both routes and let workflows use both. For missing sources and connector-covered sources, prefer plugin setup, then direct app or connector setup, then manual exports or pasted context. Core categories are not optional setup extras: if `structured_data`, `team_communication`, or `company_docs` lacks an active or manual route, make it part of the Step 2 question, keep installable core candidates as `needs_confirmation`, and do not introduce semantic-layer setup until the user installs a route or explicitly says to defer, skip, decline, mark unavailable, mark not applicable, or continue with a recorded known gap. Do not introduce semantic-layer setup in the same response when source questions remain. When core source questions remain and company docs are already covered, use this style:
170
+ - Output contract: Return a concise standalone active/missing source result with one setup-ready heading line, bold bullets for available sources, one sentence naming remaining source gaps, and one clear setup question. Active connector or app sources are informational fallback routes, not winners, when a related plugin is installed or installable. This setup step, not preflight, inspects the environment, inspects the host-provided installable-plugin catalog once for the setup pass, and writes resolved routes for each source category. Ask only when there are multiple mutually exclusive installed source tools, an installable related plugin needs approval, no source was found, or the category needs IT or admin help. Do not ask for a docs preference merely because both Google Drive and Notion are available; record both routes and let workflows use both. For missing sources and connector-covered sources, prefer plugin setup, then direct app or connector setup, then manual exports or pasted context. Core categories are not optional setup extras: if `structured_data`, `team_communication`, or `company_docs` lacks an active or manual route, make it part of the Step 2 question, keep installable core candidates as `needs_confirmation`, and do not introduce semantic-layer setup until the user installs a route or explicitly says to defer, skip, decline, mark unavailable, mark not applicable, or continue with a recorded known gap. Do not introduce semantic-layer setup in the same response when source questions remain. When core source questions remain and company docs are already covered, use this style:
171
171
 
172
172
  ```md
173
173
  After some searching, it looks like you're already set up with Google Drive, Notion, and Spreadsheets.
@@ -197,7 +197,7 @@ Reply with the sources you want to connect now, or say `defer for now` to contin
197
197
  ```
198
198
 
199
199
  Do not render separate `Active sources`, `Sources I need your help with`, or `Missing sources and practical impact` headings unless the source result is too unusual for the concise shape.
200
- - Reference copy: Active and appropriate sources are FYI only. Do not preflight-read installed or active sources just to prove they work. For each category, compare `saved_source_preferences` and `preferred` from preflight, configured `preferred_plugins` from `source-category-config.json`, legacy `preferred_apps` only when present, `.app.json` ids for configured preferred providers, the session `Available plugins` and `Available skills` blocks, and the single `functions.list_available_plugins_to_install` result for the setup pass. If one or more related plugins are installed with visible skill or tool surfaces, write them to `connector_confirmation` as active routes under `routes[]` with `source_kind: plugin`, `skill_surface`, plugin details, and evidence fields. Related means the plugin or provider itself matches the configured preferred plugin route, or its declared connector id matches a configured preferred provider id from `.app.json`; cross-source search surfaces are not active source routes for another category. Do not classify Notion, Google Drive, or a broad internal search tool as active team communication solely because it indexes Slack or Teams. If no related plugin is active but a related plugin is installable, highlight it as the recommended setup action even when an app or connector route is already active; explain that Data Analytics should prefer the plugin because it can add dedicated Data Analytics workflow support, and keep the existing app or connector route as fallback if the user defers or install visibility is pending. Rank plugin candidates by saved preferences first, then configured `preferred_plugins`, then legacy `preferred_apps` when present, then `.app.json` connector-id intersections. If no related plugin is installed or installable and exactly one plausible app or connector is installed or available, write it as active with `source_kind`, `skill_surface`, and route details when available, then let the workflow's first real read handle auth, query, or schema issues. If multiple plausible source tools are complementary rather than mutually exclusive, such as Drive and Notion for docs, write multiple active routes instead of asking the user to pick a winner. If multiple plausible source tools are mutually exclusive for the same category, ask the user which one to prefer and write the selected route only after resolving its plugin, app, connector, or manual route. Missing sources should explain practical workflow impact and list specific IT or admin options. Be prescriptive about pilot setup: warehouse access unlocks live metric definitions, table shape, query logic, and current-source validation; dashboards and BI let Data Analytics inspect dashboards and BI reports for metric definitions, filters, and saved views; behavior signals unlock product usage, funnels, retention, adoption, and experiment evidence; notebook labs let Data Analytics inspect prior analyses, reuse notebook logic, and continue exploratory work; Slack or Teams unlock recent discussion, owners, caveats, and decision context; Drive, SharePoint, or Notion unlock source-of-truth docs, specs, dashboard notes, and governance context; GitHub unlocks model, query, schema, and semantic-layer ownership.
200
+ - Reference copy: Active and appropriate sources are FYI only. Do not preflight-read installed or active sources just to prove they work. For each category, compare `saved_source_preferences` and `preferred` from preflight, configured `preferred_plugins` from `source-category-config.json`, legacy `preferred_apps` only when present, `.app.json` ids for configured preferred providers, the session `Available plugins` and `Available skills` blocks, and the single `host_available_plugin_catalog` result for the setup pass. If one or more related plugins are installed with visible skill or tool surfaces, write them to `connector_confirmation` as active routes under `routes[]` with `source_kind: plugin`, `skill_surface`, plugin details, and evidence fields. Related means the plugin or provider itself matches the configured preferred plugin route, or its declared connector id matches a configured preferred provider id from `.app.json`; cross-source search surfaces are not active source routes for another category. Do not classify Notion, Google Drive, or a broad internal search tool as active team communication solely because it indexes Slack or Teams. If no related plugin is active but a related plugin is installable, highlight it as the recommended setup action even when an app or connector route is already active; explain that Data Analytics should prefer the plugin because it can add dedicated Data Analytics workflow support, and keep the existing app or connector route as fallback if the user defers or install visibility is pending. Rank plugin candidates by saved preferences first, then configured `preferred_plugins`, then legacy `preferred_apps` when present, then `.app.json` connector-id intersections. If no related plugin is installed or installable and exactly one plausible app or connector is installed or available, write it as active with `source_kind`, `skill_surface`, and route details when available, then let the workflow's first real read handle auth, query, or schema issues. If multiple plausible source tools are complementary rather than mutually exclusive, such as Drive and Notion for docs, write multiple active routes instead of asking the user to pick a winner. If multiple plausible source tools are mutually exclusive for the same category, ask the user which one to prefer and write the selected route only after resolving its plugin, app, connector, or manual route. Missing sources should explain practical workflow impact and list specific IT or admin options. Be prescriptive about pilot setup: warehouse access unlocks live metric definitions, table shape, query logic, and current-source validation; dashboards and BI let Data Analytics inspect dashboards and BI reports for metric definitions, filters, and saved views; behavior signals unlock product usage, funnels, retention, adoption, and experiment evidence; notebook labs let Data Analytics inspect prior analyses, reuse notebook logic, and continue exploratory work; Slack or Teams unlock recent discussion, owners, caveats, and decision context; Drive, SharePoint, or Notion unlock source-of-truth docs, specs, dashboard notes, and governance context; GitHub unlocks model, query, schema, and semantic-layer ownership.
201
201
  - Next-step copy: If one or more source categories need user input, make the `Next Step` only about resolving those questions. When the Step 2 source result includes explanatory optional sources before a separate core-source reply line, render `**Next Step**` immediately before that final reply line so the action close stays visually distinct. If no source questions need input, move directly into Step 3A with a short transition note and the semantic-layer introduction; do not ask whether to introduce it.
202
202
 
203
203
  ### Step 2A: Resolve Source Questions
@@ -238,7 +238,7 @@ You can defer warehouse or team communication access, but say it explicitly so D
238
238
 
239
239
  After the user answers, install confirmed plugin or connector candidates one at a time, save any clear source preferences or accepted skips, then move directly into the semantic-layer introduction. Do not ask whether to introduce it. For routine source setup preferences in onboarding, do not render a saved-context recap or `Saved today` list; use only the short transition into Step 3A below, then render Step 3A in the same response:
240
240
 
241
- If the user confirms an installable plugin or connector candidate returned by `functions.list_available_plugins_to_install`, call `functions.request_plugin_install` with `action_type: "install"`, the returned candidate `tool_type`, the returned candidate `id`, and a concise reason such as `Use Databricks as the preferred Data Analytics source for data warehouse.` Pass the returned `tool_type` directly; it may be `plugin` or `connector`. Do not call `request_plugin_install` in parallel with any other tool. If multiple related plugin candidates tie after saved preference order, configured `preferred_plugins` order, legacy `preferred_apps` order when present, and connector-id matching, ask the user to choose; if no related plugin candidate exists, say so and offer admin, app, connector, or manual fallback. If plugin install fails, setup fails, or install succeeds but the plugin-owned skills or tools are not visible yet, record the category as `needs_confirmation`, `deferred`, `deferred_environment_api_limitations`, or `skipped_for_now`; do not mark it active and do not treat the failed setup as a durable decline. Keep plugin-first setup eligible for retry in future workflows when that source category matters. If the user explicitly declines a plugin, suppress that plugin in the current workflow and fall back to the next related plugin candidate, existing connector or app route, or manual setup for that category; save a future `do not use` rule only when the user asks for durable avoidance.
241
+ If the user confirms an installable plugin or connector candidate returned by `host_available_plugin_catalog`, call `host_authorized_plugin_install` with `action_type: "install"`, the returned candidate `tool_type`, the returned candidate `id`, and a concise reason such as `Use Databricks as the preferred Data Analytics source for data warehouse.` Pass the returned `tool_type` directly; it may be `plugin` or `connector`. Do not call `request_plugin_install` in parallel with any other tool. If multiple related plugin candidates tie after saved preference order, configured `preferred_plugins` order, legacy `preferred_apps` order when present, and connector-id matching, ask the user to choose; if no related plugin candidate exists, say so and offer admin, app, connector, or manual fallback. If plugin install fails, setup fails, or install succeeds but the plugin-owned skills or tools are not visible yet, record the category as `needs_confirmation`, `deferred`, `deferred_environment_api_limitations`, or `skipped_for_now`; do not mark it active and do not treat the failed setup as a durable decline. Keep plugin-first setup eligible for retry in future workflows when that source category matters. If the user explicitly declines a plugin, suppress that plugin in the current workflow and fall back to the next related plugin candidate, existing connector or app route, or manual setup for that category; save a future `do not use` rule only when the user asks for durable avoidance.
242
242
 
243
243
  If the user selects or confirms an installed or available plugin, app, or connector, treat it as usable for setup purposes only when the route evidence matches `source-category-runtime.md`, write the resolved route to `connector_confirmation`, and transition without a proof read. If the selected source is missing, use the matching source category and native plugin, app, or connector path: load any relevant helper skill from `source-category-config.json`, use tool discovery or exposed app tools if needed, and run the smallest safe read-only action only when a workflow needs the source. If the workflow-time read triggers auth or setup, let that flow complete before continuing and then write the resolved app or connector route. If no read action or setup route is exposed, keep the category unresolved and ask the user whether to install, connect, or authorize it, ask IT or admin to enable it, defer or skip the category, or proceed with manual or exported context. Adapt the source list in the transition to the resolved active or default sources, but when the standard onboarding source set applies, use this copy spine:
244
244
 
@@ -13,19 +13,19 @@ A source category is the kind of analytical evidence a workflow may need, such a
13
13
 
14
14
  ## Setup-Owned Source Routes
15
15
 
16
- Source route selection happens during onboarding, an explicit source-setup turn, or workflow-time repair for a missing or broken source, not during ordinary preflight. The setup or search step is responsible for inspecting the current environment, preferring related plugins before raw app or connector routes, asking for installation or setup when needed, and writing compact resolved routes to `onboarding-state.json` under `connector_confirmation`. Do not persist the raw `functions.list_available_plugins_to_install` response, full session plugin inventory, connector descriptions, or discovery transcript into onboarding state.
16
+ Source route selection happens during onboarding, an explicit source-setup turn, or workflow-time repair for a missing or broken source, not during ordinary preflight. The setup or search step is responsible for inspecting the current environment, preferring related plugins before raw app or connector routes, asking for installation or setup when needed, and writing compact resolved routes to `onboarding-state.json` under `connector_confirmation`. Do not persist the raw `host_available_plugin_catalog` response, full session plugin inventory, connector descriptions, or discovery transcript into onboarding state.
17
17
 
18
18
  Preflight is a reader. It should return the configured routes that setup wrote, plus unresolved setup gaps, but it must not choose a plugin, app, connector, or manual route on its own. Runtime workflows consume the configured routes.
19
19
 
20
20
  During setup, prefer source routes in this order:
21
21
 
22
22
  1. Installed or enabled related plugin from the session `Available plugins` block when it has visible plugin-owned skill or tool surface.
23
- 2. Installable related plugin returned by `functions.list_available_plugins_to_install`, including a plugin that contains or declares a connector or app id from the category's configured preferred plugin route.
23
+ 2. Installable related plugin returned by `host_available_plugin_catalog`, including a plugin that contains or declares a connector or app id from the category's configured preferred plugin route.
24
24
  3. Installed or installable app or connector returned by the same install listing or exposed in the session or tool surface.
25
25
  4. Manual, uploaded, pasted, or exported context.
26
26
  5. Missing or unavailable with practical IT or admin options.
27
27
 
28
- At the start of onboarding source resolution or explicit source setup, call `functions.list_available_plugins_to_install` once and reuse those results for all source categories in that pass. Also read the session `Available plugins` block to identify installed plugins, and read the session `Available skills` block when deciding whether an installed plugin has plugin-owned skills exposed. Load `../plugin-author-config/source-category-config.json` for category `preferred_plugins` and legacy `preferred_apps` only when present, and load `.app.json` to map configured preferred provider names to app or connector ids.
28
+ At the start of onboarding source resolution or explicit source setup, inspect the host-provided installable-plugin catalog once and reuse those results for all source categories in that pass. Also read the session `Available plugins` block to identify installed plugins, and read the session `Available skills` block when deciding whether an installed plugin has plugin-owned skills exposed. Load `../plugin-author-config/source-category-config.json` for category `preferred_plugins` and legacy `preferred_apps` only when present, and load `.app.json` to map configured preferred provider names to app or connector ids.
29
29
 
30
30
  Installed source tools are treated as usable for setup purposes only when their surface is visible enough to use later. If setup finds one or more installed related plugins with visible plugin-owned skill or tool surfaces for the same category, write all useful routes as active under `routes` and let workflows choose among them by evidence need. Do not force a preference question just because several non-conflicting sources are available, such as Google Drive and Notion for company docs; the agent can use both. If setup finds an installed app or connector and also finds a related plugin candidate, prefer the plugin anyway because Data Analytics workflows should use plugin-owned skills and tools when available; keep the app or connector route as fallback if the user defers or install visibility is pending. If setup finds one installed app or connector and no related plugin candidate, write the app or connector route as active and let the workflow try the actual read only when it needs that source. Do not perform a read merely to prove an installed source works during onboarding.
31
31
 
@@ -74,7 +74,7 @@ Recommended active multi-route state:
74
74
  "source_kind": "plugin",
75
75
  "skill_surface": "plugin_owned",
76
76
  "plugin": {
77
- "id": "google-drive@openai-curated",
77
+ "id": "<google-drive-id-from-host-catalog>",
78
78
  "name": "Google Drive"
79
79
  },
80
80
  "plugin_install_evidence": "plugin_in_available_plugins",
@@ -150,9 +150,9 @@ When setup finds that a needed source category is not already covered by a prove
150
150
 
151
151
  1. Build the plugin preference order from `saved_source_preferences` when preflight provides them first, then the source category's configured `preferred_plugins`, then legacy `preferred_apps` only when present. Use that order to rank plugins, but do not require the user to have saved a preference before plugin setup is attempted.
152
152
  2. Check the session `Available plugins` block for an installed plugin whose name, display name, id, or declared app or connector ids match a configured preferred plugin route for the category. If it has visible plugin-owned skill or tool surface, write it as the active route.
153
- 3. If no installed related plugin exists, call `functions.list_available_plugins_to_install` if it has not already been called in this setup pass, then look for related plugin candidates.
153
+ 3. If no installed related plugin exists, inspect the host-provided installable-plugin catalog if it has not already been inspected in this setup pass, then look for related plugin candidates.
154
154
  4. A candidate is related only when the plugin or provider itself matches the configured preferred plugin route, or its declared `app_connector_ids` intersects the `.app.json` ids for a configured preferred plugin route. Legacy `preferred_apps` may contribute only when an older config still declares them. Do not treat broad search, mirrored content, imported content, or a description-level category similarity as enough to make a plugin related.
155
- 5. Prefer plugin candidates over connector candidates even when the app or connector route is already callable or active. If one related plugin candidate is clearly best by saved preference order, configured `preferred_plugins` order, legacy `preferred_apps` order when present, or connector-id intersection, ask one clear install or defer question unless the user explicitly requested installation. If the user confirms, call `functions.request_plugin_install` with the exact returned candidate `tool_type` and `id`. Do not call `request_plugin_install` in parallel with any other tool.
155
+ 5. Prefer plugin candidates over connector candidates even when the app or connector route is already callable or active. If one related plugin candidate is clearly best by saved preference order, configured `preferred_plugins` order, legacy `preferred_apps` order when present, or connector-id intersection, ask one clear install or defer question unless the user explicitly requested installation. If the user confirms, call `host_authorized_plugin_install` with the exact returned candidate `tool_type` and `id`. Do not call `request_plugin_install` in parallel with any other tool.
156
156
  6. If multiple related plugin candidates tie after saved preference order, configured `preferred_plugins` order, legacy `preferred_apps` order when present, and connector-id matching, ask the user to choose among only those tied relevant candidates.
157
157
  7. If installation or setup fails, or install succeeds but plugin skills or tools are not visible yet, keep the plugin setup path retryable. Record `needs_confirmation`, `deferred`, `deferred_environment_api_limitations`, or `skipped_for_now` for operational state, not `declined`, and surface plugin-first setup again in a future workflow when that source category is material. Use connector or app or manual fallback for the current run when useful.
158
158
  8. If the user declines a plugin, suppress that plugin for the current workflow and continue with the next related plugin candidate, the existing app or connector route, another user-selected source, or manual or exported context. Save a durable `do not use` or `do not offer` rule only when the user explicitly asks for that future behavior.
@@ -256,7 +256,7 @@ Do not write `available`, `verified`, `checked`, `installed`, or automatic `bloc
256
256
 
257
257
  ## Onboarding Behavior
258
258
 
259
- The first direct onboarding response should not inspect connectors. After the user approves setup, run source setup or search, call `functions.list_available_plugins_to_install` once, prefer related plugins over raw app or connector routes, and write resolved routes for each category to `connector_confirmation`. Do not preflight-read installed or active connectors merely to prove they work. Active sources are informational only; do not ask the user to confirm every source when setup finds clear active installed plugins, apps, or connectors that can coexist in the same category.
259
+ The first direct onboarding response should not inspect connectors. After the user approves setup, run source setup or search, inspect the host-provided installable-plugin catalog once, prefer related plugins over raw app or connector routes, and write resolved routes for each category to `connector_confirmation`. Do not preflight-read installed or active connectors merely to prove they work. Active sources are informational only; do not ask the user to confirm every source when setup finds clear active installed plugins, apps, or connectors that can coexist in the same category.
260
260
 
261
261
  Ask for help only when there are multiple mutually exclusive plausible source tools, an installable related plugin needs approval, no source was found, or IT or admin action may be needed. For missing or connector-covered sources, use plugin setup before connector or app setup and manual fallback. When a later focused workflow needs a source, that workflow attempts the configured source route at that moment and handles plugin install, auth, connection, skip, or manual fallback in context.
262
262
 
@@ -690,9 +690,9 @@ def plugin_first_setup_recovery(
690
690
  "type": "plugin_first_source_setup",
691
691
  "preferred_plugins": unique_strings(metadata.get("preferred_plugins") or []),
692
692
  "configured_source_routes": preferred_source_routes(metadata),
693
- "candidate_lookup": "functions.list_available_plugins_to_install",
693
+ "candidate_lookup": "host_available_plugin_catalog",
694
694
  "candidate_match": "plugin_name_slug_or_app_connector_id_intersection",
695
- "install_request": "functions.request_plugin_install",
695
+ "install_request": "host_authorized_plugin_install",
696
696
  "install_requires_user_approval": True,
697
697
  "fallback_setup_action": fallback_setup_action,
698
698
  }
@@ -1328,6 +1328,7 @@ def final_obligations(
1328
1328
  {
1329
1329
  "id": "offer_data_analytics_onboarding_next_step",
1330
1330
  "timing": "append_after_main_answer",
1331
+ "only_when": "missing setup materially affects the requested output and the user has not requested inline-only or quiet delivery",
1331
1332
  "template": markdown_template_from_onboarding_reference(
1332
1333
  "Ordinary Workflow Onboarding CTA"
1333
1334
  ),
@@ -1340,6 +1341,7 @@ def final_obligations(
1340
1341
  {
1341
1342
  "id": "complete_data_analytics_core_onboarding",
1342
1343
  "timing": "append_after_main_answer",
1344
+ "only_when": "missing setup materially affects the requested output and the user has not requested inline-only or quiet delivery",
1343
1345
  "template": markdown_template_from_onboarding_reference(
1344
1346
  "Active Core Onboarding Reminder"
1345
1347
  ),
@@ -16,10 +16,10 @@ MANDATORY_GATE_PHRASES = (
16
16
  "not as substitutes for workflow-time reads from connected or provided sources",
17
17
  )
18
18
  USER_CONTEXT_MANDATORY_GATE_PHRASES = (
19
- "set the tool's `max_output_tokens` to at least `25000`",
19
+ "there is no fixed minimum token allocation",
20
20
  "warn the user that Data Analytics could not load all source-routing preferences and semantic-layer registry entries in one pass",
21
21
  "do not use the payload until the complete output is visible",
22
- "reports read status for `$CODEX_HOME/state/plugins/{marketplace_id}/{plugin_id}/user-context.md`",
22
+ "reports read status for `$CODEX_HOME/state/plugins/data-analytics/user-context.md`",
23
23
  )
24
24
  PREFLIGHT_HELPER_PHRASES = (
25
25
  "summarize_user_context",
@@ -30,8 +30,8 @@ PREFLIGHT_HELPER_PHRASES = (
30
30
  "preferred_source_routes",
31
31
  "match_installable_plugin_candidates",
32
32
  "plugin_first_setup_recovery",
33
- "functions.list_available_plugins_to_install",
34
- "functions.request_plugin_install",
33
+ "host_available_plugin_catalog",
34
+ "host_authorized_plugin_install",
35
35
  "plugin_setup_opportunities",
36
36
  )
37
37
 
@@ -171,7 +171,7 @@ def main() -> int:
171
171
  for phrase in (
172
172
  "## Setup-Owned Source Routes",
173
173
  "Preflight is a reader.",
174
- "functions.list_available_plugins_to_install",
174
+ "host_available_plugin_catalog",
175
175
  "## Plugin-First Setup For Missing Sources",
176
176
  "Do not proactively suggest every installable plugin",
177
177
  "## Missing Sources And Fallbacks",
@@ -36,7 +36,7 @@ assert PREFLIGHT_SPEC and PREFLIGHT_SPEC.loader
36
36
  PREFLIGHT_MODULE = importlib.util.module_from_spec(PREFLIGHT_SPEC)
37
37
  PREFLIGHT_SPEC.loader.exec_module(PREFLIGHT_MODULE)
38
38
 
39
- # Representative functions.list_available_plugins_to_install fixture for plugin-first routing.
39
+ # Representative host_available_plugin_catalog fixture for plugin-first routing.
40
40
  LIVE_INSTALLABLE_PLUGIN_CANDIDATES = [
41
41
  {
42
42
  "id": "databricks@openai-curated",
@@ -371,11 +371,11 @@ class DataAnalyticsStateHelperTests(unittest.TestCase):
371
371
  self.assertEqual(slack["plugin_preference_order"], ["Slack", "Teams"])
372
372
  self.assertEqual(
373
373
  slack["setup_recovery"]["candidate_lookup"],
374
- "functions.list_available_plugins_to_install",
374
+ "host_available_plugin_catalog",
375
375
  )
376
376
  self.assertEqual(
377
377
  slack["setup_recovery"]["install_request"],
378
- "functions.request_plugin_install",
378
+ "host_authorized_plugin_install",
379
379
  )
380
380
  calendar = confirmation["calendar_context"]
381
381
  self.assertEqual(
@@ -13,10 +13,13 @@ duplicates, join coverage, or source mismatches, use $analyze-data-quality as a
13
13
 
14
14
  ### User Context
15
15
 
16
- Mandatory pre-answer gate: Invoke `data-analytics:user-context` in preflight mode by loading [data-analytics:user-context](../user-context/SKILL.md) and running its preflight script before answering, searching connectors, retrieving evidence, creating artifacts, or drafting output. 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
+ 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.
17
17
 
18
18
  ## Workflow
19
19
 
20
+ 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.
21
+
22
+
20
23
  1. Inventory the artifact and claims.
21
24
 
22
25
  Identify the report, notebook, spreadsheet, SQL, dashboard, chart, pasted analysis, or recommendation being validated. Inspect source artifacts when a path, link, query, notebook, spreadsheet, or dashboard is referenced. Extract the main question, audience, decision, key claims, headline numbers, data sources, time windows, populations, filters, comparison baselines, and stated caveats. Verify that every metric or KPI requested by the user appears in the analysis or is explicitly marked unavailable, not applicable, or out of scope.
@@ -76,76 +79,9 @@ Mandatory pre-answer gate: Invoke `data-analytics:user-context` in preflight mod
76
79
  high-impact decisions, and externally shared analyses as higher-risk validation targets.
77
80
  - Select checks that match the artifact and decision. Do not run every possible check mechanically.
78
81
 
79
- ### Methodology Checks
80
-
81
- - Question framing: the analysis answers the stated business or product question.
82
- - Data selection: sources are appropriate and current enough for the decision.
83
- - Population: inclusions, exclusions, eligibility rules, and sampling are explicit.
84
- - Metric definitions: formulas, units, denominators, and timezones are clear and aligned with stakeholder definitions.
85
- - Baselines: comparison periods, cohorts, and contexts are comparable.
86
- - Causality: causal wording is backed by experimental or otherwise credible causal evidence.
87
-
88
- ### Data Quality Checks
89
-
90
- - Freshness: the analysis states or can recover the data "as of" date.
91
- - Completeness: no unexpected missing partitions, segments, rows, or categories.
92
- - Null handling: key columns have expected null rates or explicit treatment.
93
- - Deduplication: primary entities are not double counted.
94
- - Filter verification: filters and WHERE clauses do not silently exclude the population of interest.
95
- - Join coverage: dimensions, experiments, and reference tables do not drop or multiply important rows.
96
-
97
- ### Calculation Checks
98
-
99
- - Grain: the aggregation level matches the intended analysis grain.
100
- - Denominators: rates and percentages use the correct population and non-zero denominators.
101
- - Period alignment: comparisons use equal or explicitly caveated windows.
102
- - Weighted metrics: averages are weighted correctly when group sizes differ.
103
- - Subtotals: parts add to totals where categories are mutually exclusive.
104
- - Units: currency, token, user, request, account, day/week/month, and timezone units are consistent.
105
-
106
- ### Reasonableness Checks
107
-
108
- - Magnitudes are plausible relative to known dashboards, historical reports, or expected product scale.
109
- - Percentages fall in expected ranges and segment shares sum to about 100% where expected.
110
- - Trend jumps, drops, flatlines, exact round numbers, and 0% or 100% rates have an explanation.
111
- - Results do not perfectly confirm the hypothesis without friction or exceptions.
112
- - Edge cases such as empty segments, new entities, and boundary dates behave sensibly.
113
-
114
- ### Common Pitfalls
115
-
116
- - Join explosion: many-to-many joins silently multiply rows and inflate counts or sums. Compare row counts and distinct primary entities before and after the join, and check whether the right-hand table has multiple rows per join key.
117
- Aggregate the right-hand table to the intended grain before joining when needed, use `COUNT(DISTINCT primary_id)` when counting entities through joins,
118
- and comment intentional one-to-many joins.
119
- - Survivorship bias: the analysis only includes entities that exist today and misses deleted, churned, failed, or otherwise absent entities. Ask who is not in the dataset and whether the missing population changes the conclusion.
120
- - Incomplete period comparison: a partial period is compared with a complete period. Use complete periods, compare the same number of elapsed days, or label the partial-period caveat prominently.
121
- - Denominator shifting: the eligible population changes between periods or segments. Validate that conversion, churn, activation, attach, and retention rates use stable definitions across compared groups.
122
- - Average of averages: pre-computed averages are averaged without weighting for group size. Aggregate from raw numerators and denominators or use a weighted average.
123
- - Timezone mismatch: sources use different timestamp conventions or daily cutoffs. Confirm the analysis standardizes timestamps or explicitly states the timezone and cutoff.
124
- - Selection bias in segmentation: segments are defined by the outcome being measured. Define comparison groups by pre-treatment characteristics when making lift, causality, or behavior-difference claims.
125
- - Other statistical traps: Simpson's paradox where aggregate and segment-level trends conflict, correlation presented as causation, small samples,
126
- outlier-dominated averages that need medians or distribution views, multiple testing, cherry-picked time ranges, and look-ahead bias.
127
-
128
- ### Spot-Check Recipes
129
-
130
- - Recompute a key metric from raw numerators and denominators.
131
- - Trace a few individual records through joins, filters, and final output.
132
- - Reconcile a key total against a trusted dashboard, prior report, or finance source.
133
- - Reverse engineer a headline number from component metrics, such as users times per-user revenue.
134
- - Run a one-day, one-segment, or one-entity boundary check to make sure filters and joins behave sensibly.
135
- - Compare the same metric through an alternate query path when a claim is surprising or high stakes.
136
-
137
- ### Visualization Checks
138
-
139
- - Bar charts should generally start at zero.
140
- - Comparison charts should use consistent scales unless the scale difference is explicit and justified.
141
- - Axes, units, legends, and date ranges should be labeled.
142
- - Category ordering should match the comparison the reader should make.
143
- - Truncated axes, dual axes, 3D effects, and inconsistent intervals require explicit justification or redesign.
144
- - Chart titles and annotations should match exactly what the data supports.
145
- - Titles should state the finding and include date range or scope when needed.
146
- - Caveats should be visible near the claims they qualify.
147
- - Number formatting should use appropriate precision and units.
148
- - Rendered artifacts should be checked in their final form when available, not only in source form.
82
+ ### 按风险选择方法
83
+
84
+ 核验方法、数据质量、计算、合理性或可视化时,按对应风险读取 [方法与抽查示例](references/validation-methods.md)。验证同一证据不重复逐项抄写;影响结论的错误必须修复或阻断,非阻断限制显式随结果交付。
149
85
 
150
86
  ### Confidence Ratings
151
87
 
@@ -0,0 +1,70 @@
1
+ ### Methodology Checks
2
+
3
+ - Question framing: the analysis answers the stated business or product question.
4
+ - Data selection: sources are appropriate and current enough for the decision.
5
+ - Population: inclusions, exclusions, eligibility rules, and sampling are explicit.
6
+ - Metric definitions: formulas, units, denominators, and timezones are clear and aligned with stakeholder definitions.
7
+ - Baselines: comparison periods, cohorts, and contexts are comparable.
8
+ - Causality: causal wording is backed by experimental or otherwise credible causal evidence.
9
+
10
+ ### Data Quality Checks
11
+
12
+ - Freshness: the analysis states or can recover the data "as of" date.
13
+ - Completeness: no unexpected missing partitions, segments, rows, or categories.
14
+ - Null handling: key columns have expected null rates or explicit treatment.
15
+ - Deduplication: primary entities are not double counted.
16
+ - Filter verification: filters and WHERE clauses do not silently exclude the population of interest.
17
+ - Join coverage: dimensions, experiments, and reference tables do not drop or multiply important rows.
18
+
19
+ ### Calculation Checks
20
+
21
+ - Grain: the aggregation level matches the intended analysis grain.
22
+ - Denominators: rates and percentages use the correct population and non-zero denominators.
23
+ - Period alignment: comparisons use equal or explicitly caveated windows.
24
+ - Weighted metrics: averages are weighted correctly when group sizes differ.
25
+ - Subtotals: parts add to totals where categories are mutually exclusive.
26
+ - Units: currency, token, user, request, account, day/week/month, and timezone units are consistent.
27
+
28
+ ### Reasonableness Checks
29
+
30
+ - Magnitudes are plausible relative to known dashboards, historical reports, or expected product scale.
31
+ - Percentages fall in expected ranges and segment shares sum to about 100% where expected.
32
+ - Trend jumps, drops, flatlines, exact round numbers, and 0% or 100% rates have an explanation.
33
+ - Results do not perfectly confirm the hypothesis without friction or exceptions.
34
+ - Edge cases such as empty segments, new entities, and boundary dates behave sensibly.
35
+
36
+ ### Common Pitfalls
37
+
38
+ - Join explosion: many-to-many joins silently multiply rows and inflate counts or sums. Compare row counts and distinct primary entities before and after the join, and check whether the right-hand table has multiple rows per join key.
39
+ Aggregate the right-hand table to the intended grain before joining when needed, use `COUNT(DISTINCT primary_id)` when counting entities through joins,
40
+ and comment intentional one-to-many joins.
41
+ - Survivorship bias: the analysis only includes entities that exist today and misses deleted, churned, failed, or otherwise absent entities. Ask who is not in the dataset and whether the missing population changes the conclusion.
42
+ - Incomplete period comparison: a partial period is compared with a complete period. Use complete periods, compare the same number of elapsed days, or label the partial-period caveat prominently.
43
+ - Denominator shifting: the eligible population changes between periods or segments. Validate that conversion, churn, activation, attach, and retention rates use stable definitions across compared groups.
44
+ - Average of averages: pre-computed averages are averaged without weighting for group size. Aggregate from raw numerators and denominators or use a weighted average.
45
+ - Timezone mismatch: sources use different timestamp conventions or daily cutoffs. Confirm the analysis standardizes timestamps or explicitly states the timezone and cutoff.
46
+ - Selection bias in segmentation: segments are defined by the outcome being measured. Define comparison groups by pre-treatment characteristics when making lift, causality, or behavior-difference claims.
47
+ - Other statistical traps: Simpson's paradox where aggregate and segment-level trends conflict, correlation presented as causation, small samples,
48
+ outlier-dominated averages that need medians or distribution views, multiple testing, cherry-picked time ranges, and look-ahead bias.
49
+
50
+ ### Spot-Check Recipes
51
+
52
+ - Recompute a key metric from raw numerators and denominators.
53
+ - Trace a few individual records through joins, filters, and final output.
54
+ - Reconcile a key total against a trusted dashboard, prior report, or finance source.
55
+ - Reverse engineer a headline number from component metrics, such as users times per-user revenue.
56
+ - Run a one-day, one-segment, or one-entity boundary check to make sure filters and joins behave sensibly.
57
+ - Compare the same metric through an alternate query path when a claim is surprising or high stakes.
58
+
59
+ ### Visualization Checks
60
+
61
+ - Bar charts should generally start at zero.
62
+ - Comparison charts should use consistent scales unless the scale difference is explicit and justified.
63
+ - Axes, units, legends, and date ranges should be labeled.
64
+ - Category ordering should match the comparison the reader should make.
65
+ - Truncated axes, dual axes, 3D effects, and inconsistent intervals require explicit justification or redesign.
66
+ - Chart titles and annotations should match exactly what the data supports.
67
+ - Titles should state the finding and include date range or scope when needed.
68
+ - Caveats should be visible near the claims they qualify.
69
+ - Number formatting should use appropriate precision and units.
70
+ - Rendered artifacts should be checked in their final form when available, not only in source form.