@zaip-ai/cli 2.2.0 → 2.6.0

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 (420) hide show
  1. package/dist/services/adapters.d.ts +1 -1
  2. package/dist/services/adapters.d.ts.map +1 -1
  3. package/dist/services/adapters.js +23 -9
  4. package/dist/services/adapters.js.map +1 -1
  5. package/dist/services/agent-adapters.js +25 -9
  6. package/dist/services/agent-adapters.js.map +1 -1
  7. package/dist/services/agent-discovery.d.ts +27 -0
  8. package/dist/services/agent-discovery.d.ts.map +1 -0
  9. package/dist/services/agent-discovery.js +73 -0
  10. package/dist/services/agent-discovery.js.map +1 -0
  11. package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
  12. package/dist/services/codex-conversation-lifecycle-hook.js +153 -24
  13. package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
  14. package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
  15. package/dist/services/codex-pre-tool-hook-template.js +146 -72
  16. package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
  17. package/dist/services/codex-rules.d.ts +1 -1
  18. package/dist/services/codex-rules.d.ts.map +1 -1
  19. package/dist/services/codex-rules.js +3 -3
  20. package/dist/services/codex-subagent-hook-template.d.ts +1 -1
  21. package/dist/services/codex-subagent-hook-template.d.ts.map +1 -1
  22. package/dist/services/codex-subagent-hook-template.js +117 -66
  23. package/dist/services/codex-subagent-hook-template.js.map +1 -1
  24. package/dist/services/install-agents-template.d.ts.map +1 -1
  25. package/dist/services/install-agents-template.js +56 -6
  26. package/dist/services/install-agents-template.js.map +1 -1
  27. package/dist/services/logger.js +1 -1
  28. package/dist/services/logger.js.map +1 -1
  29. package/dist/services/logger.test.js +22 -1
  30. package/dist/services/logger.test.js.map +1 -1
  31. package/dist/services/runtime-template.test.js +129 -0
  32. package/dist/services/runtime-template.test.js.map +1 -1
  33. package/package.json +1 -1
  34. package/templates/.agents/.env.example +9 -3
  35. package/templates/.agents/README-ENG.md +30 -5
  36. package/templates/.agents/README.md +30 -7
  37. package/templates/.agents/architecture/software-architecture.md +1 -59
  38. package/templates/.agents/branding/brandbook.md +3 -0
  39. package/templates/.agents/config/agents/catalog.yaml +22 -10
  40. package/templates/.agents/config/agents/discovery.json +319 -0
  41. package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +2 -2
  42. package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +2 -2
  43. package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +11 -8
  44. package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +2 -2
  45. package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +2 -2
  46. package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +2 -2
  47. package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +2 -2
  48. package/templates/.agents/config/pricing/models.json +9 -5
  49. package/templates/.agents/config/project.yaml +12 -1
  50. package/templates/.agents/dashboard/.zaip-managed.json +375 -95
  51. package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-CGxeQak4.js +1 -0
  52. package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-DaSllaJp.js → DashboardHelpDialog-tzS7YxYB.js} +57 -33
  53. package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-DEbCi1gP.js +1 -0
  54. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-1L7Qw-Gq.js +3 -0
  55. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-EInWr641.css +1 -0
  56. package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-t1Om0Abw.js +1 -0
  57. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-B6aZfo5f.js +68 -0
  58. package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-TPUT2IUt.js → icons-vendor-DiGC-dsJ.js} +1 -1
  59. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DgTmNHN5.js +2 -0
  60. package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-Ct48XHGL.js → react-vendor-kPO6yNed.js} +1 -1
  61. package/templates/.agents/dashboard/apps/frontend/dist/assets/rolldown-runtime-Bh1tDfsg.js +1 -0
  62. package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-DQpKX9c1.js +1 -0
  63. package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
  64. package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
  65. package/templates/.agents/dashboard/apps/frontend/src/App.tsx +3 -1264
  66. package/templates/.agents/dashboard/apps/frontend/src/AppDashboardContent.tsx +363 -0
  67. package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.dom.test.ts +99 -0
  68. package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +62 -6
  69. package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +3 -1
  70. package/templates/.agents/dashboard/apps/frontend/src/__tests__/app-composition-support.ts +7 -0
  71. package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +9 -7
  72. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-settings.ts +151 -0
  73. package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +28 -153
  74. package/templates/.agents/dashboard/apps/frontend/src/dashboard-app-shell.tsx +33 -0
  75. package/templates/.agents/dashboard/apps/frontend/src/dashboard-cost-facts.ts +30 -0
  76. package/templates/.agents/dashboard/apps/frontend/src/dashboard-project-overview.ts +7 -1
  77. package/templates/.agents/dashboard/apps/frontend/src/dashboard-retry.ts +17 -0
  78. package/templates/.agents/dashboard/apps/frontend/src/dashboard-setup-route.ts +29 -0
  79. package/templates/.agents/dashboard/apps/frontend/src/dashboard-view-actions.ts +66 -0
  80. package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +3 -2
  81. package/templates/.agents/dashboard/apps/frontend/src/overview-status-page.test.ts +2 -2
  82. package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.test.ts +48 -0
  83. package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.ts +29 -0
  84. package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +68 -0
  85. package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +2 -2
  86. package/templates/.agents/dashboard/apps/frontend/src/sao-paulo-day-rollover.test.ts +36 -0
  87. package/templates/.agents/dashboard/apps/frontend/src/sao-paulo-day-rollover.ts +30 -0
  88. package/templates/.agents/dashboard/apps/frontend/src/snapshot-banner-semantics.test.ts +2 -5
  89. package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +30 -19
  90. package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +9 -1
  91. package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-task-pagination.ts +77 -0
  92. package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.ts +397 -0
  93. package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +782 -0
  94. package/templates/.agents/dashboard/apps/frontend/src/use-snapshot-notice.tsx +49 -0
  95. package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
  96. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostDeveloperPanelSlot.tsx +16 -0
  97. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.tsx +459 -0
  98. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +27 -17
  99. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +62 -186
  100. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorRunDialog.tsx +20 -0
  101. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-hides-calls-that-have-no-collected.test.ts +80 -0
  102. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-keeps-legacy-codex-identity-fields-blank.test.ts +455 -0
  103. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +18 -525
  104. package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +32 -508
  105. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-export-sources.ts +74 -0
  106. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-actions.ts +19 -0
  107. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-selectors.ts +49 -0
  108. package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-formatters.ts +115 -0
  109. package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test-fixtures.ts +2 -0
  110. package/templates/.agents/dashboard/modules/operations/package.json +1 -1
  111. package/templates/.agents/dashboard/modules/operations/src/contracts.ts +4 -0
  112. package/templates/.agents/dashboard/modules/operations/src/react/EntityTableBadges.tsx +34 -0
  113. package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +8 -38
  114. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview-keeps-structure-classes-mutually-exclusive.test.ts +243 -0
  115. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +27 -275
  116. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +70 -247
  117. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewCharts.tsx +171 -0
  118. package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewPanels.tsx +64 -0
  119. package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +4 -3
  120. package/templates/.agents/dashboard/modules/operations/src/react/PrdDocumentDialog.test.tsx +2 -1
  121. package/templates/.agents/dashboard/modules/operations/src/react/manual-work-priority.test.ts +2 -1
  122. package/templates/.agents/dashboard/modules/operations/src/react/operations-coverage-toast.test.ts +6 -2
  123. package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +6 -14
  124. package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.status-cards.test.ts +3 -1
  125. package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +2 -0
  126. package/templates/.agents/dashboard/modules/operations/src/react/overview-metric-format.ts +32 -0
  127. package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
  128. package/templates/.agents/dashboard/packages/branding/package.json +1 -1
  129. package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
  130. package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
  131. package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
  132. package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +1458 -1458
  133. package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +1425 -1425
  134. package/templates/.agents/dashboard/packages/local-runtime/package.json +2 -1
  135. package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +7 -3
  136. package/templates/.agents/dashboard/packages/local-runtime/server.mjs +1458 -1459
  137. package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +25 -0
  138. package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +1 -1
  139. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +53 -8
  140. package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +79 -24
  141. package/templates/.agents/dashboard/packages/local-runtime/src/projection-refresh-diagnostics.ts +35 -0
  142. package/templates/.agents/dashboard/packages/local-runtime/src/server-costs-routes.ts +168 -0
  143. package/templates/.agents/dashboard/packages/local-runtime/src/server-dual-reads-manifest-summaries-without-losing.test.ts +344 -0
  144. package/templates/.agents/dashboard/packages/local-runtime/src/server-http-contracts.ts +31 -0
  145. package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-routes.ts +345 -0
  146. package/templates/.agents/dashboard/packages/local-runtime/src/server-read-projections.ts +461 -0
  147. package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +78 -0
  148. package/templates/.agents/dashboard/packages/local-runtime/src/server-route-context.ts +13 -0
  149. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +18 -0
  150. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +19 -3
  151. package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +22 -21
  152. package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-view-allowlist.test.ts +25 -0
  153. package/templates/.agents/dashboard/packages/local-runtime/src/server-trace-routes.ts +64 -0
  154. package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +2 -30
  155. package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +6 -23
  156. package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +1 -1
  157. package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +2 -330
  158. package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +73 -1060
  159. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-first-fold.ts +78 -0
  160. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-projections.ts +561 -0
  161. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-runs.ts +600 -0
  162. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-metric-contract.test.ts +1 -1
  163. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-agent-dimension.ts +269 -0
  164. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-context.ts +32 -0
  165. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.ts +244 -0
  166. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-filtered-dimension.ts +292 -0
  167. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-financial.ts +547 -0
  168. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-model-dimension.ts +360 -0
  169. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-provider-dimension.ts +169 -0
  170. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +475 -0
  171. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-temporal-dimension.ts +132 -0
  172. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-timing.ts +299 -0
  173. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +692 -0
  174. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +739 -0
  175. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-does-not-convert-delayed-historical-finalizer.test.ts +706 -0
  176. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-filesystem.ts +748 -0
  177. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-first-fold-types.ts +1 -1
  178. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +710 -0
  179. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-marks-token-cost-telemetry-unavailable-when.test.ts +618 -0
  180. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +755 -0
  181. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuilds-disposable-snapshot-serves-zaip-records.test.ts +276 -0
  182. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +193 -0
  183. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-types.ts +123 -0
  184. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +1 -2805
  185. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +17 -6930
  186. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +385 -0
  187. package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-dashboard-views.ts +412 -0
  188. package/templates/.agents/dashboard/packages/local-runtime/src/work-priority-contract.test.ts +4 -3
  189. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-build.mjs +195 -0
  190. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-lifecycle.test.mjs +2 -7
  191. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-logging.mjs +35 -0
  192. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-navigation.mjs +114 -0
  193. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-paths.mjs +90 -0
  194. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +89 -418
  195. package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +22 -12
  196. package/templates/.agents/dashboard/packages/ui/package.json +1 -1
  197. package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
  198. package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +4 -1
  199. package/templates/.agents/design/.zaip-managed.json +5 -5
  200. package/templates/.agents/design/DESIGN.md +2 -186
  201. package/templates/.agents/design/README.md +12 -2
  202. package/templates/.agents/design/apps/catalog/package.json +1 -1
  203. package/templates/.agents/design/packages/local-runtime/package.json +1 -1
  204. package/templates/.agents/growth/strategy.md +3 -0
  205. package/templates/.agents/marketing/strategy.md +3 -0
  206. package/templates/.agents/requirements/autonomous-assurance.md +2 -1
  207. package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
  208. package/templates/.agents/requirements/comparative-audit.md +1 -1
  209. package/templates/.agents/requirements/context-engine.md +1 -1
  210. package/templates/.agents/requirements/cost-observability.md +1 -1
  211. package/templates/.agents/requirements/dashboard-launch.md +1 -1
  212. package/templates/.agents/requirements/data-export.md +1 -1
  213. package/templates/.agents/requirements/design-system.md +13 -4
  214. package/templates/.agents/requirements/execution-engine.md +1 -1
  215. package/templates/.agents/requirements/kanban-dashboard.md +1 -1
  216. package/templates/.agents/requirements/model-orchestration.md +1 -1
  217. package/templates/.agents/requirements/public-distribution.md +4 -2
  218. package/templates/.agents/requirements/software-architecture.md +1 -1
  219. package/templates/.agents/requirements/strategic-improvements.md +1 -1
  220. package/templates/.agents/requirements/work-lifecycle.md +3 -3
  221. package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
  222. package/templates/.agents/rules/architecture.md +2 -0
  223. package/templates/.agents/rules/astra-diagnostic.md +1 -1
  224. package/templates/.agents/rules/autonomy-decision.md +3 -1
  225. package/templates/.agents/rules/cloud-hostinger-autonomy.md +2 -0
  226. package/templates/.agents/rules/context.md +2 -1
  227. package/templates/.agents/rules/core.md +3 -3
  228. package/templates/.agents/rules/design-system-central-contract.md +17 -0
  229. package/templates/.agents/rules/evolution.md +3 -1
  230. package/templates/.agents/rules/frontend-lite.md +3 -1
  231. package/templates/.agents/rules/local-sqlite-storage.md +2 -2
  232. package/templates/.agents/rules/meta-mcp.md +3 -1
  233. package/templates/.agents/rules/model-orchestration.md +1 -1
  234. package/templates/.agents/rules/run-lifecycle-closure.md +6 -4
  235. package/templates/.agents/rules/security.md +3 -1
  236. package/templates/.agents/rules/specialist-routing.md +3 -1
  237. package/templates/.agents/rules/text-writing-utf8.md +1 -1
  238. package/templates/.agents/rules/workflow.md +7 -5
  239. package/templates/.agents/runtime/VERSION +1 -1
  240. package/templates/.agents/runtime/bin/zaip.mjs +519 -247
  241. package/templates/.agents/runtime/checksums.sha256 +6 -6
  242. package/templates/.agents/runtime/manifest.json +1 -1
  243. package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
  244. package/templates/.agents/runtime/provenance.json +5 -5
  245. package/templates/.agents/runtime/sbom.cdx.json +1 -1
  246. package/templates/.agents/sales/playbook.md +3 -0
  247. package/templates/.agents/skills/zaip-aios/SKILL.md +5 -3
  248. package/templates/.agents/skills/zaip-skill-adapt-stack/SKILL.md +1 -0
  249. package/templates/.agents/skills/zaip-skill-api-contracts/SKILL.md +14 -0
  250. package/templates/.agents/skills/zaip-skill-api-contracts/agents/openai.yaml +4 -0
  251. package/templates/.agents/skills/zaip-skill-application-observability/SKILL.md +15 -0
  252. package/templates/.agents/skills/zaip-skill-application-observability/agents/openai.yaml +4 -0
  253. package/templates/.agents/skills/zaip-skill-application-observability/references/signal-design.md +3 -0
  254. package/templates/.agents/skills/zaip-skill-application-readiness/SKILL.md +15 -0
  255. package/templates/.agents/skills/zaip-skill-application-readiness/agents/openai.yaml +4 -0
  256. package/templates/.agents/skills/zaip-skill-application-readiness/references/evidence-matrix.md +3 -0
  257. package/templates/.agents/skills/zaip-skill-architecture-design/SKILL.md +14 -0
  258. package/templates/.agents/skills/zaip-skill-architecture-design/agents/openai.yaml +4 -0
  259. package/templates/.agents/skills/zaip-skill-async-jobs/SKILL.md +14 -0
  260. package/templates/.agents/skills/zaip-skill-async-jobs/agents/openai.yaml +4 -0
  261. package/templates/.agents/skills/zaip-skill-auth-tenancy/SKILL.md +15 -0
  262. package/templates/.agents/skills/zaip-skill-auth-tenancy/agents/openai.yaml +4 -0
  263. package/templates/.agents/skills/zaip-skill-auth-tenancy/references/data-access-paths.md +9 -0
  264. package/templates/.agents/skills/zaip-skill-auth-tenancy/references/worker-scenario.md +5 -0
  265. package/templates/.agents/skills/zaip-skill-auth-tenancy/scripts/worker-contract.test.mjs +27 -0
  266. package/templates/.agents/skills/zaip-skill-author-skills/SKILL.md +2 -0
  267. package/templates/.agents/skills/zaip-skill-author-skills/references/engineering-skill-index.md +9 -0
  268. package/templates/.agents/skills/zaip-skill-author-skills/scripts/audit-skill-catalog.mjs +5 -3
  269. package/templates/.agents/skills/zaip-skill-author-skills/scripts/author-skill-scripts.test.mjs +27 -0
  270. package/templates/.agents/skills/zaip-skill-backend/SKILL.md +4 -0
  271. package/templates/.agents/skills/zaip-skill-backend/references/deployment-environments.md +75 -0
  272. package/templates/.agents/skills/zaip-skill-backend/references/supabase-migration-contract.md +23 -0
  273. package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +2 -0
  274. package/templates/.agents/skills/zaip-skill-cache-strategy/SKILL.md +14 -0
  275. package/templates/.agents/skills/zaip-skill-cache-strategy/agents/openai.yaml +4 -0
  276. package/templates/.agents/skills/zaip-skill-change/SKILL.md +1 -1
  277. package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +7 -0
  278. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/SKILL.md +37 -0
  279. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/agents/openai.yaml +6 -0
  280. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workers-static-assets.md +26 -0
  281. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workflow-templates.md +71 -0
  282. package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/scripts/cloudflare-github-deploy-contract.test.mjs +77 -0
  283. package/templates/.agents/skills/zaip-skill-config/SKILL.md +21 -11
  284. package/templates/.agents/skills/zaip-skill-config/agents/openai.yaml +2 -2
  285. package/templates/.agents/skills/zaip-skill-container-runtime/SKILL.md +14 -0
  286. package/templates/.agents/skills/zaip-skill-container-runtime/agents/openai.yaml +4 -0
  287. package/templates/.agents/skills/zaip-skill-context/SKILL.md +6 -1
  288. package/templates/.agents/skills/zaip-skill-context/references/prd-spec-task-handoff.md +10 -0
  289. package/templates/.agents/skills/zaip-skill-context/references/rule-selection.md +20 -0
  290. package/templates/.agents/skills/zaip-skill-cqrs/SKILL.md +1 -0
  291. package/templates/.agents/skills/zaip-skill-cybersecurity/SKILL.md +18 -0
  292. package/templates/.agents/skills/zaip-skill-cybersecurity/agents/openai.yaml +4 -0
  293. package/templates/.agents/skills/zaip-skill-cybersecurity/references/audit-contract.md +94 -0
  294. package/templates/.agents/skills/zaip-skill-cybersecurity/scripts/score-audit.mjs +185 -0
  295. package/templates/.agents/skills/zaip-skill-cybersecurity/scripts/score-audit.test.mjs +101 -0
  296. package/templates/.agents/skills/zaip-skill-data-modeling/SKILL.md +14 -0
  297. package/templates/.agents/skills/zaip-skill-data-modeling/agents/openai.yaml +4 -0
  298. package/templates/.agents/skills/zaip-skill-database-migrations/SKILL.md +20 -0
  299. package/templates/.agents/skills/zaip-skill-database-migrations/agents/openai.yaml +4 -0
  300. package/templates/.agents/skills/zaip-skill-database-migrations/references/manual-mode.md +15 -0
  301. package/templates/.agents/skills/zaip-skill-database-migrations/references/promotion-example.md +5 -0
  302. package/templates/.agents/skills/zaip-skill-database-migrations/scripts/export-manual-sql.mjs +145 -0
  303. package/templates/.agents/skills/zaip-skill-database-migrations/scripts/export-manual-sql.test.mjs +178 -0
  304. package/templates/.agents/skills/zaip-skill-dependency-upgrade/SKILL.md +14 -0
  305. package/templates/.agents/skills/zaip-skill-dependency-upgrade/agents/openai.yaml +4 -0
  306. package/templates/.agents/skills/zaip-skill-deployment-pipeline/SKILL.md +15 -0
  307. package/templates/.agents/skills/zaip-skill-deployment-pipeline/agents/openai.yaml +4 -0
  308. package/templates/.agents/skills/zaip-skill-deployment-pipeline/references/runtime-shapes.md +3 -0
  309. package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +20 -9
  310. package/templates/.agents/skills/zaip-skill-dev-environment/SKILL.md +14 -0
  311. package/templates/.agents/skills/zaip-skill-dev-environment/agents/openai.yaml +4 -0
  312. package/templates/.agents/skills/zaip-skill-dev-environment/references/inventory-contract.md +7 -0
  313. package/templates/.agents/skills/zaip-skill-dev-environment/scripts/inventory.mjs +77 -0
  314. package/templates/.agents/skills/zaip-skill-disaster-recovery/SKILL.md +15 -0
  315. package/templates/.agents/skills/zaip-skill-disaster-recovery/agents/openai.yaml +4 -0
  316. package/templates/.agents/skills/zaip-skill-disaster-recovery/references/recovery-scope.md +3 -0
  317. package/templates/.agents/skills/zaip-skill-execution/SKILL.md +3 -3
  318. package/templates/.agents/skills/zaip-skill-execution/references/correction-cycle.md +7 -0
  319. package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +1 -5
  320. package/templates/.agents/skills/zaip-skill-external-integrations/SKILL.md +14 -0
  321. package/templates/.agents/skills/zaip-skill-external-integrations/agents/openai.yaml +4 -0
  322. package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +4 -0
  323. package/templates/.agents/skills/zaip-skill-frontend-componentization/SKILL.md +44 -0
  324. package/templates/.agents/skills/zaip-skill-frontend-componentization/agents/openai.yaml +4 -0
  325. package/templates/.agents/skills/zaip-skill-frontend-data-flows/SKILL.md +14 -0
  326. package/templates/.agents/skills/zaip-skill-frontend-data-flows/agents/openai.yaml +4 -0
  327. package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +2 -0
  328. package/templates/.agents/skills/zaip-skill-github-actions-setup/SKILL.md +36 -0
  329. package/templates/.agents/skills/zaip-skill-github-actions-setup/agents/openai.yaml +4 -0
  330. package/templates/.agents/skills/zaip-skill-github-actions-setup/references/cloudflare-pages.md +33 -0
  331. package/templates/.agents/skills/zaip-skill-github-actions-setup/references/github.md +63 -0
  332. package/templates/.agents/skills/zaip-skill-github-actions-setup/references/hostinger-vps.md +55 -0
  333. package/templates/.agents/skills/zaip-skill-github-actions-setup/references/npm.md +30 -0
  334. package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/check-skill.mjs +55 -0
  335. package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-cloudflare.mjs +61 -0
  336. package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-cloudflare.test.mjs +128 -0
  337. package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-ssh.integration.test.mjs +106 -0
  338. package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +43 -76
  339. package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +131 -0
  340. package/templates/.agents/skills/zaip-skill-github-deploy/references/github-release-workflow-template.md +31 -0
  341. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-gate-matrix.md +24 -0
  342. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +44 -0
  343. package/templates/.agents/skills/zaip-skill-github-deploy/references/release-notes.md +134 -0
  344. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.mjs +389 -0
  345. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.test.mjs +134 -0
  346. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +25 -2
  347. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness-api.test.mjs +134 -0
  348. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness.mjs +98 -0
  349. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness.test.mjs +25 -0
  350. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/install-github-readiness-workflow.mjs +159 -0
  351. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/install-github-readiness-workflow.test.mjs +160 -0
  352. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +149 -12
  353. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +64 -5
  354. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/release-notes-coverage.test.mjs +126 -0
  355. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.mjs +78 -0
  356. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.test.mjs +51 -0
  357. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/validate-release-notes.mjs +184 -0
  358. package/templates/.agents/skills/zaip-skill-github-deploy/scripts/validate-release-notes.test.mjs +109 -0
  359. package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +2 -0
  360. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +18 -10
  361. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/agents/openai.yaml +3 -4
  362. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/aws-cli-terraform.md +62 -0
  363. package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/guia-iniciante-hostinger-vps.md +183 -0
  364. package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +2 -0
  365. package/templates/.agents/skills/zaip-skill-module-scaffold/SKILL.md +14 -0
  366. package/templates/.agents/skills/zaip-skill-module-scaffold/agents/openai.yaml +4 -0
  367. package/templates/.agents/skills/zaip-skill-module-scaffold/references/scaffold-contract.md +9 -0
  368. package/templates/.agents/skills/zaip-skill-module-scaffold/scripts/helpers.test.mjs +121 -0
  369. package/templates/.agents/skills/zaip-skill-module-scaffold/scripts/scaffold.mjs +169 -0
  370. package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +1 -1
  371. package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +1 -1
  372. package/templates/.agents/skills/zaip-skill-performance-engineering/SKILL.md +14 -0
  373. package/templates/.agents/skills/zaip-skill-performance-engineering/agents/openai.yaml +4 -0
  374. package/templates/.agents/skills/zaip-skill-prd/SKILL.md +1 -1
  375. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +1 -0
  376. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +26 -9
  377. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +39 -13
  378. package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +1 -0
  379. package/templates/.agents/skills/zaip-skill-refactor-landing-page/SKILL.md +66 -0
  380. package/templates/.agents/skills/zaip-skill-refactor-landing-page/agents/openai.yaml +4 -0
  381. package/templates/.agents/skills/zaip-skill-refactor-landing-page/references/behavioral-dry-run.md +23 -0
  382. package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +40 -1
  383. package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +98 -0
  384. package/templates/.agents/skills/zaip-skill-review/SKILL.md +1 -0
  385. package/templates/.agents/skills/zaip-skill-rules/SKILL.md +3 -3
  386. package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +2 -0
  387. package/templates/.agents/skills/zaip-skill-setup/SKILL.md +19 -21
  388. package/templates/.agents/skills/zaip-skill-setup/agents/openai.yaml +2 -2
  389. package/templates/.agents/skills/zaip-skill-spec/SKILL.md +3 -2
  390. package/templates/.agents/skills/zaip-skill-storage-uploads/SKILL.md +14 -0
  391. package/templates/.agents/skills/zaip-skill-storage-uploads/agents/openai.yaml +4 -0
  392. package/templates/.agents/skills/zaip-skill-systematic-debugging/SKILL.md +14 -0
  393. package/templates/.agents/skills/zaip-skill-systematic-debugging/agents/openai.yaml +4 -0
  394. package/templates/.agents/skills/zaip-skill-task/SKILL.md +16 -7
  395. package/templates/.agents/skills/zaip-skill-task/references/commit-policy.md +25 -0
  396. package/templates/.agents/skills/zaip-skill-test-data/SKILL.md +14 -0
  397. package/templates/.agents/skills/zaip-skill-test-data/agents/openai.yaml +4 -0
  398. package/templates/.agents/skills/zaip-skill-test-data/scripts/generate.mjs +72 -0
  399. package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +15 -0
  400. package/templates/.agents/skills/zaip-skill-testing-strategy/agents/openai.yaml +4 -0
  401. package/templates/.agents/skills/zaip-skill-testing-strategy/references/example-map.md +3 -0
  402. package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +8 -0
  403. package/templates/.agents/zaip-aios/VERSION +1 -1
  404. package/templates/.agents/zaip-aios/guides/10-seguranca.md +2 -1
  405. package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +5 -3
  406. package/templates/scripts/validate-cloud-hostinger-contract.mjs +34 -0
  407. package/templates/template-manifest.json +955 -211
  408. package/templates/.agents/branding/.gitkeep +0 -0
  409. package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-snUCQYTC.js +0 -1
  410. package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-BPtVUGgs.js +0 -1
  411. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-3Awyaovx.js +0 -3
  412. package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-GgzpZ_PY.css +0 -1
  413. package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BCvZFMEf.js +0 -1
  414. package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DbaLbU2q.js +0 -68
  415. package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_MEktQNM.js +0 -2
  416. package/templates/.agents/dashboard/apps/frontend/dist/assets/rolldown-runtime-D9-fqq9M.js +0 -1
  417. package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-BDe4_Ubl.js +0 -1
  418. package/templates/.agents/growth/.gitkeep +0 -0
  419. package/templates/.agents/marketing/.gitkeep +0 -0
  420. package/templates/.agents/sales/.gitkeep +0 -0
@@ -1,11 +1,11 @@
1
1
  b146bd0c7c60b1ab43c4f71e0b1d2262c6df6da6f7053a0425f834ccb77a6b48 LICENSE
2
2
  bc02cba77e8d51e5c580f43668863dc868eda66f1ff663bfaa49fcf3ca16320e THIRD_PARTY_NOTICES.md
3
- c4a2383a03bdb6739d16a0e24058e4b9c7da4e63d203e0be2f448868cc03c530 VERSION
4
- 69de029dc9c40ea63988c9dc862833928c80d65b211818ec757be36f19f1e334 bin/zaip.mjs
5
- a110baef708470429aaf722e962c5698903380404b86113d3d5cd2bf04592f38 manifest.json
3
+ 6693435eadb673dda297a0652d241e293e361200bc40db949cf2501d18dd01ee VERSION
4
+ d0f72331e6ecf333e014dc5754b277167f905543324d6d94938d2b1af4c18718 bin/zaip.mjs
5
+ d0a3d5ade8b74dc85716a279e433dea7c2ace641e334ca6b28f11a79d0d15d40 manifest.json
6
6
  7f89219d7c567c82a51679ad136d84364bded7ac659492537e125d33b1d58a7a migrations/001-layout-v1.json
7
7
  5f8c48b286d0b44d8fbb57a9a5d009a8a500439aa3148d750b8f193f72995c9f migrations/002-layout-v2.json
8
- ddc100b4d4ce1b96d27a50d1e66c1514636aceb36e72157dee07e2b12a5df2bd pnpm-lock.sha256
9
- 49097573922f2c330f5b1211b03a87a86db87243223ed9a38bd248f4f72f70f7 provenance.json
10
- fbfcc610258c437829e75846957255cc96202e585b4447dd3df14f2217ea734d sbom.cdx.json
8
+ 12aa001df694e40b5bfbacea33d0e7ea5fe4b28e17396ec640aaa52ede0371a3 pnpm-lock.sha256
9
+ 655631d84ef9c9d1fc763031f2510027b5bedcbe31933434b141bb811924b78a provenance.json
10
+ ea7aaa398e7ba981ec7b583059734ee05a085170da10b30118c900d23da7c4e2 sbom.cdx.json
11
11
  b3ffedf9e146be802a15b4009f33e031dec3071ca1525e12c67606fd964a3067 schemas/contracts.schema.json
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "name": "zaip-aios",
4
- "version": "2.2.0",
4
+ "version": "2.6.0",
5
5
  "node": ">=22",
6
6
  "files": [
7
7
  "LICENSE",
@@ -1 +1 @@
1
- 55e20a2b6d9239d9b31eace160d0e4ba08bc9b4641806639cab429d8a1e4076f pnpm-lock.yaml
1
+ 4a8b304fd8e27ed71d0d2c91a5e692e34fc240b477e3037b02a42301685c5601 pnpm-lock.yaml
@@ -2,10 +2,10 @@
2
2
  "schema_version": 1,
3
3
  "statement_type": "self_reported_build_integrity",
4
4
  "authenticity": "unverified",
5
- "version": "2.2.0",
5
+ "version": "2.6.0",
6
6
  "source_origin": "zaip-aios:local-build",
7
- "lockfile_sha256": "55e20a2b6d9239d9b31eace160d0e4ba08bc9b4641806639cab429d8a1e4076f",
8
- "sbom_sha256": "fbfcc610258c437829e75846957255cc96202e585b4447dd3df14f2217ea734d",
9
- "runtime_sha256": "2f75214582b6e6a333cadd62a2d20236c59dd44a771f912e7ab22a8b090b3bb1",
10
- "statement_sha256": "7977cc341adf229d5189b03d73c4b27b5f3c3f52d87f24b6092495c1fe2eb2b5"
7
+ "lockfile_sha256": "4a8b304fd8e27ed71d0d2c91a5e692e34fc240b477e3037b02a42301685c5601",
8
+ "sbom_sha256": "ea7aaa398e7ba981ec7b583059734ee05a085170da10b30118c900d23da7c4e2",
9
+ "runtime_sha256": "3a46f3bdbb6a04372c76f7b1ac6949056b690ba950e5ad412ef46b8e67f277ca",
10
+ "statement_sha256": "d6d5244320a24c2fcf48255f769796a862671609e3663240eb372606a5aa8c18"
11
11
  }
@@ -6,7 +6,7 @@
6
6
  "component": {
7
7
  "type": "application",
8
8
  "name": "zaip-aios",
9
- "version": "2.2.0"
9
+ "version": "2.6.0"
10
10
  }
11
11
  },
12
12
  "components": [
@@ -0,0 +1,3 @@
1
+ # Playbook de Sales
2
+
3
+ Em construção.
@@ -1,11 +1,13 @@
1
1
  ---
2
- # zaip-managed generated-do-not-edit source=discovery-skill version=2.2.0 sha256=d530dbf54b4fc554a533e0ac300d6c148b598a82f1dcc0680b9d9bdaf4103696
2
+ # zaip-managed generated-do-not-edit source=discovery-skill version=2.5.0 sha256=76f3edc1dc8dfecc8c1b3c5b789557a515d05e270c044bf35e758923dff0aa0f
3
3
  name: zaip-aios
4
4
  description: Discover and apply the repository-local ZAIP-AIOS framework.
5
5
  ---
6
6
 
7
7
  # ZAIP-AIOS adapter
8
8
 
9
- Keep this native client bootstrap. After reading project configuration, load the applicable `.agents/requirements/`, `.agents/rules/`, and `.agents/skills/` from their canonical locations.
9
+ This compatibility bootstrap is retained in native client skill directories; its metadata keeps implicit invocation. It routes to canonical `.agents/` guidance and does not duplicate Rules or skills.
10
10
 
11
- Read `.agents/config/project.yaml` first. Apply ZAIP only for literal boolean `zaip.enabled: true`; otherwise ignore it except maintenance or `zaip enable`. When enabled, capture once: analysis is `conversation`, continuation reuses focus, and independent edits use semantic `new-work`. Thinking about PRD/SPEC is conversation; explicit creation persists complete draft artifacts and PreparedPlan blueprints under interaction telemetry, with Tasks materialized only at ready/execute. Ask at most five critical questions per turn and stop after three turns, then record delegable AI decisions. Resolve finalize/implement/develop using target plus persisted status, and create a linked rework successor instead of reopening cancelled PRDs. Read `.agents/rules/core.md`, then only applicable context from runtime projections and explicit records—never normal history. Publication is Git-only.
11
+ Read `.agents/config/project.yaml` first. Apply ZAIP only for literal boolean `zaip.enabled: true`; otherwise ignore it except maintenance or `zaip enable`. When enabled, read `.agents/rules/core.md`, Rules marked `always`, and only applicable Rules, Requirements in .agents/requirements/ and canonical skills in .agents/skills/, selected by explicit ID, phase, path or domain. Do not preload the corpus, lifecycle history or Run payloads. Follow the applicable canonical workflow for execution.
12
+
13
+ Before delegation, use `context agents` for discovery and `context agents --agent <id>` for the selected canonical contract; the resolver validates provenance and recomputes invalid discovery locally. Purpose never authorizes. For agent context, prefer `context build --view compact` with the known ID, role and phase: it is one view of the governing pack. Follow `zaip-skill-context` and validate continuity with `context handoff`; preserve required content and references.
@@ -9,3 +9,4 @@ description: Adapt the ZAIP profile when the default stack or repository shape d
9
9
  2. Define extensions, layer/module detection, parser, commands, storage boundaries and composition roots.
10
10
  3. Add positive and negative fixtures for every critical rule.
11
11
  4. Validate the profile contract and commands; mark supported only after offline evals pass.
12
+ 5. Compare declared stack components with installed manifests and runtime evidence. Report unsupported, unavailable, and drifted components separately; do not infer a capability from a dependency name.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: zaip-skill-api-contracts
3
+ description: Define and validate stable Hono API request, response, error, authorization, and compatibility contracts.
4
+ ---
5
+
6
+ # Define API contracts
7
+
8
+ Use for a new or changed HTTP endpoint consumed beyond its implementation.
9
+
10
+ 1. Specify route ownership, authentication, input validation, status codes, error body, pagination, idempotency, and versioning behavior.
11
+ 2. Keep Hono routing thin; dispatch use cases through module contracts and avoid leaking database rows.
12
+ 3. Decide compatibility before implementation. Additive changes are preferred; make breaking changes explicit with consumer migration evidence.
13
+ 4. Test valid, malformed, unauthorized, forbidden, empty, and failure responses using the app request path.
14
+ 5. Generate or update an OpenAPI artifact only when it is a supported consumer contract, then test it against the implementation.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "API Contracts"
3
+ short_description: "Define stable Hono API behavior contracts"
4
+ default_prompt: "Use $zaip-skill-api-contracts to define and test this HTTP API contract."
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: zaip-skill-application-observability
3
+ description: Instrument application logs, metrics, traces, dashboards, and alerts with actionable correlation and ownership.
4
+ ---
5
+
6
+ # Observe application behavior
7
+
8
+ Use when adding or repairing runtime observability for APIs, workers, jobs, or integrations.
9
+ Read `references/signal-design.md` before adding metric labels or correlation fields.
10
+
11
+ 1. Define the user or operational question before choosing logs, metrics, or traces. Include owner, threshold, and expected response for each alert.
12
+ 2. Correlate request, job, and integration work with safe identifiers; exclude secrets, credentials, and sensitive payloads.
13
+ 3. Measure service level signals, dependency failures, queue depth, retries, and resource saturation where they affect behavior.
14
+ 4. Verify a controlled error and a successful flow appear in the intended signals and can be traced to the affected operation.
15
+ 5. Keep telemetry availability distinct from a fabricated zero or presumed healthy value.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Application Observability"
3
+ short_description: "Instrument actionable application runtime signals"
4
+ default_prompt: "Use $zaip-skill-application-observability to instrument this API or worker flow."
@@ -0,0 +1,3 @@
1
+ # Signal design
2
+
3
+ Prometheus metrics use bounded labels such as route, status family, worker, and queue. Grafana panels answer an owner question. Correlation IDs belong in structured logs and traces, not metric labels. Verify a request that enqueues a job by following request correlation to job correlation, duration, retry, and final effect. An unavailable measurement remains unavailable.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: zaip-skill-application-readiness
3
+ description: Assess application readiness across configuration, security, data, jobs, capacity, observability, and recovery evidence.
4
+ ---
5
+
6
+ # Assess application readiness
7
+
8
+ Use before a first production rollout or a material production-affecting change.
9
+ Use the `references/evidence-matrix.md` fields for the final assessment.
10
+
11
+ 1. Build a candidate-specific checklist from actual requirements: artifact, configuration, authorization, data migration, queues, performance, monitoring, backup, and rollback.
12
+ 2. Consume evidence from specialized skills rather than recreating their checks. Mark each item passed, pending, not applicable, or unavailable with a locator.
13
+ 3. Verify that runtime and environment identities match the candidate under review.
14
+ 4. Escalate unknown critical dependencies and missing recovery evidence; never convert absence into a passing status.
15
+ 5. Readiness is an assessment only and never authorizes deployment or final lifecycle approval.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Application Readiness"
3
+ short_description: "Assess evidence for production application readiness"
4
+ default_prompt: "Use $zaip-skill-application-readiness to assess this release candidate readiness."
@@ -0,0 +1,3 @@
1
+ # Evidence matrix
2
+
3
+ Record one row per readiness condition: candidate, environment, check, expected result, observed result, status, and evidence locator. State the rollout conclusion separately. Missing or unavailable checks remain pending and cannot be self-approved.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: zaip-skill-architecture-design
3
+ description: Design application modules, boundaries, data ownership, and runtime flows before structural implementation.
4
+ ---
5
+
6
+ # Design architecture
7
+
8
+ Use when a new capability needs module boundaries, a cross-cutting design, or a documented tradeoff before code changes.
9
+
10
+ 1. Read the declared stack, active Requirements, existing module inventory, and `.agents/architecture/software-architecture.md`. Treat that architecture file as a generated projection; change approved config or Decisions, then regenerate it through the relevant workflow.
11
+ 2. Identify actors, commands, queries, owned data, public contracts, synchronous calls, and asynchronous handoffs.
12
+ 3. Assign every dependency direction and infrastructure concern to a module boundary. Record assumptions and unresolved decisions with `$zaip-skill-decisions`.
13
+ 4. Produce a concise boundary map with failure, authorization, tenancy, and rollback implications. Use `$zaip-skill-enforce-architecture` to check a proposed implementation.
14
+ 5. Keep design separate from execution authority; create a SPEC or Task only on an explicit request.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Architecture Design"
3
+ short_description: "Design modules and runtime boundaries"
4
+ default_prompt: "Use $zaip-skill-architecture-design to design the modules, ownership, and flows for this capability."
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: zaip-skill-async-jobs
3
+ description: Design and verify BullMQ producers and workers with idempotency, retries, recovery, and observable failure handling.
4
+ ---
5
+
6
+ # Operate asynchronous jobs
7
+
8
+ Use for BullMQ queues, jobs, workers, retries, scheduling, or cancellation.
9
+
10
+ 1. Define a versioned payload schema, ownership, tenant context, actor or validated authorization snapshot, idempotency key, success effect, retry policy, concurrency, and dead-letter handling. A worker validates it and re-authorizes in a fresh transaction unless snapshot semantics are explicitly defined and validated.
11
+ 2. Persist or derive enough state to make a repeated delivery safe. Never use a queue job as the sole source of durable business truth.
12
+ 3. Ensure workers perform bounded work, shut down cleanly, and emit correlation identifiers without secrets.
13
+ 4. Test duplicate delivery, partial failure, retry exhaustion, worker restart, cancellation, missing/forged/stale/mismatched authorization payload, and tenant A job followed by tenant B job where supported.
14
+ 5. Report operational limits and manual recovery steps; do not silently discard failed work.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Async Jobs"
3
+ short_description: "Build reliable BullMQ jobs and workers"
4
+ default_prompt: "Use $zaip-skill-async-jobs to design this queue producer and worker safely."
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: zaip-skill-auth-tenancy
3
+ description: Design and verify identity, authorization, tenant isolation, and role propagation across application boundaries.
4
+ ---
5
+
6
+ # Secure identity and tenancy
7
+
8
+ Use for login, roles, accounts, organizations, authorization, or tenant-scoped resources.
9
+
10
+ 1. Discover the project tenant naming and trace identity from authenticated request to account context, API authorization, database query, queue payload, cache key, and storage policy. Read `references/data-access-paths.md` before deciding Supabase policy is effective.
11
+ 2. Define permitted actions and ownership rules before route or policy changes. Never infer tenancy from a request parameter alone.
12
+ 3. Direct Kysely application and worker roles must be non-`BYPASSRLS`; isolate migration or break-glass administration in a separately selected privileged role that normal runtime paths cannot assume.
13
+ 4. Keep authorization decisions near application use cases and database policy as a defense-in-depth boundary. For an async worker, validate a versioned payload then re-authorize actor, tenant membership, and action in a fresh transaction, or document and validate authorization-snapshot semantics.
14
+ 5. Test observed role attributes, allowed access, denied access, and cross-tenant attempts through the effective application connection and relevant Supabase policy. Fail if the runtime role has `BYPASSRLS`, if a forged/missing/stale/mismatched job payload mutates state, or if tenant A state reaches a subsequent tenant B job.
15
+ 6. Redact tokens and identity claims from artifacts and logs; record only the minimum evidence needed. Use `references/worker-scenario.md` for the minimum forward-use proof.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Auth and Tenancy"
3
+ short_description: "Verify identity, roles, and tenant isolation"
4
+ default_prompt: "Use $zaip-skill-auth-tenancy to design authorization and tenant isolation for this flow."
@@ -0,0 +1,9 @@
1
+ # Data access paths
2
+
3
+ Discover whether the application uses the Supabase Data API or a direct PostgreSQL connection through Kysely. Data API requests can propagate the authenticated JWT to Row Level Security; direct Kysely connections normally do not. For direct access, set a transaction-local tenant or role context through a reviewed adapter and verify reset at pool release.
4
+
5
+ Read `rolbypassrls`, superuser status, and tenant-table ownership for the exact application and worker connections. Runtime roles must have `rolbypassrls = false`, be non-superuser, and not own tenant tables. Where ownership is unavoidable, use `FORCE ROW LEVEL SECURITY` and prove enforcement through the effective application or worker path. A privileged migration or admin role may have elevated access only when it is isolated from normal app and worker credentials, composition roots, pools, and job paths.
6
+
7
+ This role behavior follows [PostgreSQL Row Security §5.9](https://www.postgresql.org/docs/current/ddl-rowsecurity.html).
8
+
9
+ Test the actual query path with a normal runtime role, a deliberately rejected `BYPASSRLS` role, and reused pooled connections. A proof must show tenant A cannot read or mutate tenant B after a prior tenant A request, including a worker or job path. Do not treat a browser JWT test as proof for a direct database connection.
@@ -0,0 +1,5 @@
1
+ # Worker forward-use scenario
2
+
3
+ Queue a version `1` action for tenant A and actor A. The worker validates schema and version, loads membership and permission in a new transaction, then writes only tenant A state. Immediately process tenant B with a different actor and assert that no tenant A context, rows, cache key, or authorization decision is reused.
4
+
5
+ Repeat with a missing actor, forged tenant, stale membership, unsupported version, a runtime role with `rolbypassrls = true`, a superuser, or a tenant-table owner without `FORCE ROW LEVEL SECURITY`. Each case must be rejected before mutation. The test fails if any denied case writes data or if effective-path enforcement is absent for normal application or worker roles.
@@ -0,0 +1,27 @@
1
+ import assert from "node:assert/strict";
2
+ import { readFile } from "node:fs/promises";
3
+ import { resolve } from "node:path";
4
+ import test from "node:test";
5
+
6
+ const root = resolve(import.meta.dirname, "..");
7
+ test("tenancy guidance requires non-bypass runtime roles and worker reauthorization", async () => {
8
+ const [skill, paths, scenario] = await Promise.all(
9
+ ["SKILL.md", "references/data-access-paths.md", "references/worker-scenario.md"].map((path) =>
10
+ readFile(resolve(root, path), "utf8"),
11
+ ),
12
+ );
13
+ const source = `${skill}\n${paths}\n${scenario}`;
14
+ for (const requirement of [
15
+ "non-`BYPASSRLS`",
16
+ "rolbypassrls",
17
+ "non-superuser",
18
+ "tenant tables",
19
+ "FORCE ROW LEVEL SECURITY",
20
+ "fresh transaction",
21
+ "forged",
22
+ "tenant A",
23
+ "tenant B",
24
+ "before mutation",
25
+ ])
26
+ assert.ok(source.includes(requirement));
27
+ });
@@ -19,4 +19,6 @@ description: Create and audit portable ZAIP skills, triggers, resources, and rel
19
19
  10. Valide links relativos, encoding UTF-8, placeholders, tamanho, políticas de invocação, triggers sobrepostos e comandos citados.
20
20
  11. No framework source, rode `pnpm sync:framework-lock`, validação, testes relevantes, sync do template público, build e parity; no consumer, rode somente validação da skill, `zaip doctor` e adapters aplicáveis.
21
21
 
22
+ Para orientar uma pessoa entre skills de engenharia, consulte `references/engineering-skill-index.md`.
23
+
22
24
  Não copie paths pessoais, portas, credenciais, integrações específicas do projeto ou runners inexistentes para uma skill core.
@@ -0,0 +1,9 @@
1
+ # Engineering skill index
2
+
3
+ Use `architecture-design` before a cross-module capability; `dev-environment` for checkout prerequisites; and `module-scaffold` for a minimal owned module. Use `data-modeling`, `database-migrations`, and `auth-tenancy` before persistent tenant data changes.
4
+
5
+ Use `api-contracts`, `async-jobs`, `cache-strategy`, `external-integrations`, `storage-uploads`, and `frontend-data-flows` for their named runtime boundaries. Use `testing-strategy`, `test-data`, `systematic-debugging`, `performance-engineering`, and `dependency-upgrade` for verification and maintenance.
6
+
7
+ Use `container-runtime`, `deployment-pipeline`, `application-observability`, `disaster-recovery`, and `application-readiness` for application operations. These skills assess or prepare their domain; they do not authorize deployment, production mutation, or lifecycle approval.
8
+
9
+ Use [github-actions-setup](../../zaip-skill-github-actions-setup/SKILL.md) for guided GitHub Actions onboarding: npm trust/tokens, Cloudflare Pages credentials or Hostinger VPS SSH, exact secret names, workflows and end-to-end verification. Use `github-deploy` for an explicitly requested GitHub publication; installing the setup skill does not activate any pipeline.
@@ -9,9 +9,8 @@ const skillDirectories = (await readdir(skillsRoot, { withFileTypes: true }))
9
9
  .map((entry) => entry.name);
10
10
  const knownSkills = new Set(skillDirectories);
11
11
  const errors = [];
12
- const catalog = parseYaml(
13
- await readFile(resolve(root, ".agents/config/agents/catalog.yaml"), "utf8"),
14
- );
12
+ const catalogPath = process.argv[2] ?? resolve(root, ".agents/config/agents/catalog.yaml");
13
+ const catalog = parseYaml(await readFile(catalogPath, "utf8"));
15
14
 
16
15
  for (const agent of catalog.agents ?? []) {
17
16
  for (const skill of agent.skills ?? []) {
@@ -20,8 +19,11 @@ for (const agent of catalog.agents ?? []) {
20
19
  }
21
20
  for (const [agentId, requiredSkill] of [
22
21
  ["agent-frontend", "zaip-skill-frontend"],
22
+ ["agent-frontend", "zaip-skill-frontend-componentization"],
23
23
  ["agent-backend", "zaip-skill-backend"],
24
24
  ["agent-designer", "zaip-skill-design-system"],
25
+ ["agent-designer", "zaip-skill-frontend-componentization"],
26
+ ["agent-website-developer", "zaip-skill-frontend-componentization"],
25
27
  ]) {
26
28
  const agent = (catalog.agents ?? []).find((entry) => entry.id === agentId);
27
29
  if (!agent?.skills?.includes(requiredSkill))
@@ -1,8 +1,11 @@
1
1
  import assert from "node:assert/strict";
2
2
  import { execFile } from "node:child_process";
3
+ import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
4
+ import { tmpdir } from "node:os";
3
5
  import { resolve } from "node:path";
4
6
  import test from "node:test";
5
7
  import { promisify } from "node:util";
8
+ import { parseDocument, stringify } from "yaml";
6
9
 
7
10
  const run = promisify(execFile);
8
11
  const root = resolve(import.meta.dirname, "..", "..", "..", "..");
@@ -25,3 +28,27 @@ test("skill catalog audit validates the checked-in catalog and technical contrac
25
28
  });
26
29
  assert.match(stdout, /Audited \d+ skills and \d+ agents/);
27
30
  });
31
+
32
+ test("skill catalog audit rejects missing componentization bindings by agent id", async () => {
33
+ const temporary = await mkdtemp(resolve(tmpdir(), "zaip-skill-audit-"));
34
+ const catalog = resolve(temporary, "catalog.yaml");
35
+ try {
36
+ const source = await readFile(resolve(root, ".agents/config/agents/catalog.yaml"), "utf8");
37
+ const parsed = parseDocument(source).toJS();
38
+ const requiredAgents = ["agent-frontend", "agent-designer", "agent-website-developer"];
39
+ for (const agentId of requiredAgents) {
40
+ const agent = parsed.agents.find((entry) => entry.id === agentId);
41
+ assert.ok(agent, `expected ${agentId} in the catalog fixture`);
42
+ agent.skills = agent.skills.filter(
43
+ (skill) => skill !== "zaip-skill-frontend-componentization",
44
+ );
45
+ }
46
+ await writeFile(catalog, stringify(parsed));
47
+ await assert.rejects(
48
+ run(process.execPath, [resolve(scripts, "audit-skill-catalog.mjs"), catalog], { cwd: root }),
49
+ /agent-frontend: must load zaip-skill-frontend-componentization[\s\S]*agent-designer: must load zaip-skill-frontend-componentization[\s\S]*agent-website-developer: must load zaip-skill-frontend-componentization/,
50
+ );
51
+ } finally {
52
+ await rm(temporary, { force: true, recursive: true });
53
+ }
54
+ });
@@ -9,3 +9,7 @@ description: Implement backend APIs, persistence, and integration boundaries ins
9
9
  2. Preservar a direção de dependências e manter detalhes de infraestrutura atrás da fronteira do módulo.
10
10
  3. Aplicar arquitetura e CQRS proporcionalmente ao contrato alterado: não introduzir camadas, migrações ou gates pesados quando a mudança local não os exige. Cobrir o comportamento alterado com testes focados e registrar incompatibilidades, migrações ou riscos de integração.
11
11
  4. Aplicar [o contrato de prova observável](../zaip-skill-change/references/observable-evidence.md): metadados para estrutura/migração, fluxo autorizado e registros específicos para persistência, logs correlacionados para correções e observação direta de API/fila/cache/integração. SQL não é obrigatório quando inaplicável. Correlacionar UI e backend quando o AC exigir o fluxo completo; registrar ambiente, versão, limitações e fallback finito sem expor dados sensíveis.
12
+ 5. Para uma fronteira recorrente, carregue somente a especialização pertinente: `$zaip-skill-api-contracts`, `$zaip-skill-database-migrations`, `$zaip-skill-auth-tenancy`, `$zaip-skill-async-jobs`, `$zaip-skill-cache-strategy` ou `$zaip-skill-external-integrations`.
13
+ 6. Para Supabase, migrações, branch de deploy ou consultas de ambiente, aplicar o [contrato de ambientes e acessos](references/deployment-environments.md). READ-ONLY-BETA e READ-ONLY-PROD são consultas separadas; migrations de banco são beta-only, enquanto backend segue `deploy.backend.branch`, inclusive `main` quando configurada.
14
+ 7. Quando uma mudança de persistência exigir schema Supabase em repositório separado, prepare a proposta e valide o [contrato de migrations](references/supabase-migration-contract.md) com `zaip supabase migration plan`. Use `prepare`/`submit` para o pedido revisável; ele identifica o `owner/repository` solicitante e não aplica SQL. A execução no repositório de banco segue a autorização e as regras daquele repositório. `deploy.database.branch` não admite `main` nem fallback de produção: sem beta configurada, informe o bloqueio e não provisione uma branch hospedada ou integração automaticamente. Depois da promoção humana, `zaip supabase migration validate --evidence PATH` separa a SHA e os checks candidatos da observação `trust: unverified` do histórico de migrations. Grants, RLS e exposição Data API exigem evidências próprias e a Data API permanece opt-in.
15
+ 8. Se o usuário recusou explicitamente a beta hospedada, siga o [modo manual](../zaip-skill-database-migrations/references/manual-mode.md). Ele exporta a migration futura para `/db-migrations/YYYY-MM-DD-HH-mm-nome.sql`; uma pessoa a executa no Supabase SQL Editor e o trabalho dependente aguarda a evidência humana do resultado.
@@ -0,0 +1,75 @@
1
+ # Ambientes de deploy e acesso Supabase
2
+
3
+ Este contrato separa validação e produção para qualquer projeto ZAIP-AIOS. Ele orienta agentes, mas não substitui as proteções do GitHub, do provedor de deploy ou do Supabase.
4
+
5
+ ## Branches e promoção
6
+
7
+ - `deploy.frontend.branch` e `deploy.backend.branch` são autorizações persistidas de publicação para cada aplicação. O padrão é `beta`; se o usuário configurar `main`, a publicação da aplicação pode seguir para `main` sem nova confirmação.
8
+ - `deploy.database.branch` é literalmente `beta`. Banco nunca herda `deploy.branch`, frontend ou backend, e nunca faz fallback para `main`.
9
+ - `deploy.branch` é legado e serve exclusivamente ao release/npm do framework.
10
+ - `deploy.production_branch` é a branch de produção. O padrão é `main`.
11
+ - Banco de dados nunca faz deploy automatizado para `main`. Frontend e backend seguem seus campos próprios, inclusive `main` quando foi configurado pelo usuário.
12
+ - Produção exige promoção humana por PR/merge, com as proteções e aprovações definidas no repositório remoto. A branch atual e o upstream local não decidem o destino.
13
+ - Para um banco compartilhado, o repositório central de migrações é uma convenção documentada do projeto, não um campo implícito de `project.yaml`. Cada contribuição é integrada nele pela branch de validação configurada. Não se envia o histórico inteiro de outro repositório para esse destino.
14
+ - Frontend e site publicam a própria versão de validação a partir da branch de validação. A promoção de seus ambientes de produção continua humana.
15
+
16
+ ## Configuração esperada
17
+
18
+ ```yaml
19
+ deploy:
20
+ frontend: { branch: beta }
21
+ backend: { branch: beta }
22
+ database: { branch: beta }
23
+ branch: beta
24
+ production_branch: main
25
+ ```
26
+
27
+ O nome `beta` é um padrão, não um requisito semântico. O mesmo valor configurado deve ser usado por preflight, workflow e provedor de hospedagem. Uma instalação legada que só tenha `deploy.branch: main` continua legível em runtime, mas o deploy automatizado fica bloqueado até que uma escolha segura seja registrada: uma branch de validação diferente da branch de produção.
28
+
29
+ ## READ-ONLY-BETA e READ-ONLY-PROD
30
+
31
+ Os dois acessos são contextos distintos de consulta. O exemplo `.mcp.json` abaixo é para Claude Code ou outro cliente compatível; ele não é configuração nativa do Codex. Para Codex, use o exemplo `.codex/config.toml` seguinte. Ambos seguem o [MCP oficial do Supabase](https://supabase.com/docs/guides/getting-started/mcp) e são placeholders: eles **não criam uma conexão autenticada**, não incluem segredo e não concedem acesso por si mesmos.
32
+
33
+ `.mcp.json` para Claude Code ou cliente compatível, com os dois servidores no mesmo arquivo:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "supabase-read-only-beta": {
39
+ "type": "http",
40
+ "url": "https://mcp.supabase.com/mcp?project_ref=<BETA_PROJECT_REF>&read_only=true&features=database,docs"
41
+ },
42
+ "supabase-read-only-prod": {
43
+ "type": "http",
44
+ "url": "https://mcp.supabase.com/mcp?project_ref=<PROD_PROJECT_REF>&read_only=true&features=database,docs"
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ `.codex/config.toml` para Codex, com os dois servidores:
51
+
52
+ ```toml
53
+ [mcp_servers.supabase-read-only-beta]
54
+ url = "https://mcp.supabase.com/mcp?project_ref=<BETA_PROJECT_REF>&read_only=true&features=database,docs"
55
+ enabled = true
56
+
57
+ [mcp_servers.supabase-read-only-prod]
58
+ url = "https://mcp.supabase.com/mcp?project_ref=<PROD_PROJECT_REF>&read_only=true&features=database,docs"
59
+ enabled = true
60
+ ```
61
+
62
+ Antes de habilitar qualquer um deles, confirme todos os pontos abaixo:
63
+
64
+ 1. O parâmetro `project_ref` está definido para os dois ambientes e os valores são distintos.
65
+ 2. A credencial de consulta tem somente as permissões mínimas de leitura e é diferente da credencial usada pelo pipeline de migração/deploy.
66
+ 3. A identidade do pipeline só é disponibilizada ao pipeline do ambiente correspondente; ela não é compartilhada com o agente de consulta.
67
+ 4. Os manifests e políticas do MCP permitem somente `database` e `docs` no contexto read-only, sem ferramentas de escrita, DDL, migração ou deploy.
68
+
69
+ Se faltar uma referência, se as duas referências forem iguais, ou se a capacidade read-only não puder ser demonstrada, o estado é **não configurado**. Não há fallback de beta para produção, de produção para beta, nem para um projeto padrão. O agente deve relatar a lacuna e parar a consulta dependente, sem inferir o destino ou usar credenciais de pipeline.
70
+
71
+ ## Operação de banco compartilhado
72
+
73
+ Vários repositórios podem propor mudanças para o repositório central de banco. Cada mudança deve ter uma migração própria, ordenada e revisável, com testes executados em validação antes da promoção humana. O PR inclui `[owner/repo]`, SHA de origem e ID estável para deduplicação. A integração deve ser serializada quando houver dependência ou conflito de schema. O agente pode consultar READ-ONLY-BETA e READ-ONLY-PROD para diagnóstico autorizado, mas não aplica DDL, dados ou migrações com essas identidades. A branch beta persistente pode gerar custo no Supabase; instalação/configuração não a cria, e qualquer provisionamento exige confirmação informada separada.
74
+
75
+ Após uma recusa explícita da beta, o [modo manual](../../zaip-skill-database-migrations/references/manual-mode.md) é o único caminho alternativo: SQL futuro é exportado no repositório solicitante, uma pessoa o executa no SQL Editor e confirma o resultado antes de liberar dependências. Não há fallback de deploy nem criação de custo.
@@ -0,0 +1,23 @@
1
+ # Contrato de migrations Supabase
2
+
3
+ O ZAIP-AIOS pode coordenar a entrega de frontend e backend no mesmo repositório. Quando a mudança exige schema, ela produz uma proposta de migration para o repositório de banco configurado; este contrato não executa SQL, não edita o repositório de banco e não publica commits.
4
+
5
+ Ative o contrato copiando os valores abaixo para `supabase_migrations` em `.agents/config/project.yaml`. O caminho é absoluto e local de propósito: cada consumidor informa sua própria cópia de `zaip-db-supabase`; não inclua caminhos pessoais no template distribuído.
6
+
7
+ ```yaml
8
+ supabase_migrations:
9
+ repository:
10
+ id: zaip-db-supabase
11
+ path: C:/workspace/zaip-db-supabase
12
+ origin: git@github.com:zaip-ai/zaip-db-supabase.git
13
+ branch: beta
14
+ hosted_applicator: github-integration
15
+ ```
16
+
17
+ `zaip supabase migration plan --json` confirma a identidade, caminho, origin e branch. `zaip supabase migration validate --evidence .agents/evidence/migration.json --json` também exige uma migration catalogada e rastreada, SHA candidato igual ao `HEAD` limpo de `beta`, checks passados e uma observação separada do histórico de migrations do Supabase. A observação local declara `trust: unverified`: ela é evidência reportada, não uma confirmação remota por esta CLI.
18
+
19
+ Git registra arquivos de migration; o Supabase mantém separadamente as versões aplicadas. O GitHub Integration é o único aplicador hospedado automatizado autorizado e só aplica arquivos pendentes. No modo manual, uma pessoa pode executar o SQL exportado no SQL Editor após recusar explicitamente a beta hospedada. Um SHA enviado ou presente em `beta` nunca prova que a migration foi aplicada. Grants, RLS e alcance da Data API são evidências independentes; a exposição na Data API continua opt-in.
20
+
21
+ A CLI também lê `refs/remotes/origin/beta` sem executar `fetch`, push ou outra operação remota. Mesmo quando essa ref coincide com a SHA candidata, ela é uma observação local que pode estar desatualizada. Por isso `validate` permanece pendente com `origin-beta-unverified`; a confirmação de publicação depende de uma observação externa fresca e autorizada.
22
+
23
+ `zaip tool copy --task TASK --run RUN` resolve os escopos canônicos de uma Task ativa vinculada à Run e usa o guard antes de escrever, incluindo a resolução física de symlinks. Ele protege apenas esta API controlada do ZAIP. Prompts, `apply_patch`, shell do host e permissões de sandbox não fornecem por si só isolamento de escrita no nível do sistema operacional.
@@ -36,3 +36,5 @@ Use as referências para montar ou enriquecer a plataforma e pergunte somente pe
36
36
  5. Não gere imagens, mockups ou outros ativos visuais sem solicitação explícita.
37
37
 
38
38
  Consulte [padrões de Brandbook](references/brandbook-standards.md) e o [framework de domínios](references/brandbook-framework.md) ao estruturar entregáveis internos ou externos.
39
+
40
+ Para aplicar conteúdo já aprovado em uma entrega editorial simples, delimitada e de baixo impacto, use o [perfil editorial `lite`](../zaip-skill-task/SKILL.md#assurance-proporcional) e selecione `--risk lite`. Ele não se aplica à criação ou mudança estratégica de plataforma, identidade, arquétipo ou Brandbook.
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: zaip-skill-cache-strategy
3
+ description: Design safe Redis cache keys, lifetime, invalidation, tenant isolation, and degradation behavior.
4
+ ---
5
+
6
+ # Design caching
7
+
8
+ Use before adding or changing Redis caching. It does not govern BullMQ job semantics.
9
+
10
+ 1. State the source of truth, cached representation, key namespace, tenant identity, TTL, invalidation trigger, and staleness tolerance.
11
+ 2. Never share account-scoped values across tenants or use cached authorization as the only access control.
12
+ 3. Design for cache miss, eviction, unavailability, and concurrent regeneration without corrupting source data.
13
+ 4. Measure or test hit/miss behavior, write invalidation, expiration, and degraded operation.
14
+ 5. Keep Redis server assumptions separate from the client package version declared in the stack.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Cache Strategy"
3
+ short_description: "Design Redis cache isolation and invalidation"
4
+ default_prompt: "Use $zaip-skill-cache-strategy to define caching behavior for this data flow."
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: zaip-skill-change
3
- description: Maintain Change narrative, decisions, evidence, rollback, and results.
3
+ description: Maintain a materialized Change's decisions, evidence, rollback, and observed result.
4
4
  ---
5
5
 
6
6
  # Manter a Change
@@ -5,6 +5,13 @@ description: Design, provision, and validate infrastructure as code inside decla
5
5
 
6
6
  # Engenharia de cloud
7
7
 
8
+ Para uma pessoa começando uma VPS/Hostinger, conduza primeiro o [guia inicial de VPS e Terraform](../zaip-skill-hostinger-cloudflare-terraform/references/guia-iniciante-hostinger-vps.md). Faça no máximo três perguntas simples e avance uma etapa por vez: objetivo, ação humana, ação do Codex, resultado observável e retomada segura. O guia não autoriza compra, SSH, API, Terraform apply ou deploy.
9
+
8
10
  1. Delimitar ambiente, recurso, provider, estado atual e rollback antes da mudança.
9
11
  2. Preferir infraestrutura declarativa e revisável; não aplicar deploy, credenciais ou mudança externa sem autorização explícita.
10
12
  3. Validar sintaxe, plano ou build aplicável e registrar impacto, dependências e caminho de reversão.
13
+ 4. Para AWS, exigir `account_id`, região e profile explícitos. SSO é preferível: preparar com `aws configure sso`, autenticar com `aws sso login --profile PERFIL` e confirmar com `aws sts get-caller-identity --profile PERFIL --region REGIAO`. Profile existente, OIDC ou role já autorizada também são válidos quando a identidade STS corresponde ao contrato; nunca assumir que o profile padrão é o alvo.
14
+ 5. Quando a execução usar role, validar ARN, conta destino e sessão limitada. Preferir profile AWS com `role_arn` e `source_profile` ou OIDC; se `aws sts assume-role` for inevitável, não imprimir nem persistir seu stdout. A identidade que acessa o backend Terraform pode ser diferente da identidade/role do provider: declarar, autenticar e verificar cada uma separadamente.
15
+ 6. Para state remoto AWS, usar backend S3 com bucket e key aprovados, região explícita, `encrypt = true` e `use_lockfile = true` em Terraform >= 1.10. Versionamento, IAM mínimo e recuperação do bucket são requisitos do ambiente; não use DynamoDB para novo locking.
16
+ 7. Nunca rastrear segredos em `backend-config`, state, planos binários/JSON ou credenciais; configuração de backend sem segredos pode ser versionada. Durante preparação executar `terraform init`, `fmt`, `validate` e `plan` revisável. A Task AWS ativa e explicitamente autorizada pode cobrir bootstrap e provisionamento com AWS CLI/Terraform somente sob contrato AWS delimitado e plano salvo revisado; `apply` consome exclusivamente aquele plano.
17
+ 8. Para aplicações, mantenha containers de API e worker separados de assets estáticos de Vite/Astro; use `$zaip-skill-container-runtime`, `$zaip-skill-application-observability` e `$zaip-skill-disaster-recovery` conforme a fronteira alterada.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: zaip-skill-cloudflare-github-deploy
3
+ description: Configure and review GitHub Actions deployments to Cloudflare Workers Static Assets or Pages when a repository needs automatic Cloudflare delivery.
4
+ ---
5
+
6
+ # Deploy Cloudflare via GitHub
7
+
8
+ Use for an authorized change that creates or changes a GitHub Actions workflow which deploys a built application to Cloudflare. It configures delivery; it does not authorize a push, a provider deployment, credential exposure, DNS changes, or Cloudflare account changes.
9
+
10
+ ## Choose the target
11
+
12
+ 1. Read the repository's `deploy.frontend.branch` or `deploy.backend.branch`, package manifest, lockfile, build output, and existing `wrangler` configuration before writing. The persisted application branch may be `main`; database migrations never use this workflow and remain beta-only. Follow the shared [environment and read-only contract](../zaip-skill-backend/references/deployment-environments.md).
13
+ 2. Select **Workers Static Assets** when existing Worker configuration uses static assets, whether it has Worker code or is pure static. Select **Pages** when existing Pages configuration is the target; Pages can also use Functions. Declare one deployment owner: either this workflow or the provider's Git integration, never both.
14
+ 3. Start from the matching [workflow template](references/workflow-templates.md). Keep repository-root install, package filter/build location, application deployment cwd, lockfile, build output, and Cloudflare project or Worker identifier distinct. Resolve `wrangler` config paths relative to its deployment cwd. Never copy account IDs, domains, routes, email addresses, project names, or secret values from another repository.
15
+
16
+ ## Workflow contract
17
+
18
+ - The workflow uses `push` on `deploy.branch`, `workflow_dispatch`, least-privilege `permissions: { contents: read }`, and one concurrency group with `cancel-in-progress: true`. Its deploy job accepts either trigger only when `github.ref` is the configured validation branch, rejecting `main`, the configured production branch, and every other ref.
19
+ - A Workers workflow deploys an explicit validation environment and target; it never falls through to Wrangler's default production environment. A Pages workflow publishes a preview branch equal to `deploy.branch`, which must differ from `deploy.production_branch`; production stays a human promotion.
20
+ - Pin actions to reviewed immutable commit SHAs and pin Node, the package-manager release, and Wrangler. A floating major reference such as `@v4` is only a review-time convenience, never a final deployment reference. Install with the declared frozen-lock option (`pnpm --frozen-lockfile`, `npm ci`, or equivalent).
21
+ - Keep bundled public variables (for example, `VITE_*`) separate from runtime secrets; a public build variable is never a server secret. Pass only the scoped Cloudflare API-token secret and account identifier to the deployment command; put runtime secrets in the Cloudflare target's secret store through a separately authorized operation.
22
+ - Default to a scoped `CLOUDFLARE_API_TOKEN` with only the deployment permissions required by the selected account and target. Accept `CLOUDFLARE_API_KEY` plus email only when the Task explicitly selects a documented legacy mode. If a separately authorized operation needs a local credential, follow `$zaip-skill-local-credentials` and pass it only to the minimal authorized subprocess; never expose, migrate, or automatically reauthorize it.
23
+ - In a monorepo, install from the workspace root, run the app's package filter/build command from its declared location, and deploy from the application cwd. Optional filters include root lockfiles, workspace manifests, shared packages, and the workflow itself whenever they affect the selected application.
24
+
25
+ ## Workers Static Assets
26
+
27
+ Read [the Workers configuration contract](references/workers-static-assets.md) before creating its `wrangler` file. Its configuration must explicitly decide `main`, `assets.directory`, an assets `binding`, SPA fallback, and optional `run_worker_first`; `_redirects` is supported for asset routing. Do not invent a Worker entrypoint when the project is only Pages-compatible.
28
+
29
+ ## Verify and hand off
30
+
31
+ 1. Render the workflow from repository facts, validate YAML locally, and run the repository build with a frozen install when dependencies are available. Use `wrangler deploy --dry-run` only when it is supported for the selected target and does not require credential inspection; it is not a deployment claim.
32
+ 2. After an authorized push and provider deploy, collect the exact GitHub run URL/SHA, selected target, and Cloudflare deployment URL or version as remote evidence. A green build alone does not prove publication.
33
+ 3. Document the rollback before enabling delivery: redeploy the prior known-good Git SHA or Cloudflare version through the same single owner, then verify the target. Do not execute rollback without authorization.
34
+
35
+ ## Sources and comparison
36
+
37
+ Use the current [setup-node cache guidance](https://github.com/actions/setup-node), [Workers Static Assets guide](https://developers.cloudflare.com/workers/static-assets/get-started/), and [Pages Functions guide](https://developers.cloudflare.com/pages/functions/) when a provider detail changes. The local `zaip-ai` comparison workflow last changed at `f11bea0ed58978763c2a604060c73ab43a7719d1`; separately, [GitHub Actions run 34074776525](https://github.com/zaip-ai/zaip-ai/actions/runs/34074776525) succeeded for SHA `81c602ded4a45bd9174ccc22279981b9fd34a57d`.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Cloudflare via GitHub"
3
+ short_description: "Configura CI Cloudflare segura e verificavel"
4
+ default_prompt: "Use $zaip-skill-cloudflare-github-deploy para criar ou revisar um workflow GitHub Actions para Cloudflare Workers Static Assets ou Pages."
5
+ policy:
6
+ allow_implicit_invocation: true