@zaip-ai/cli 2.2.0 → 3.0.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.
- package/README.md +36 -13
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +26 -9
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/agent-adapters.js +37 -18
- package/dist/services/agent-adapters.js.map +1 -1
- package/dist/services/agent-discovery.d.ts +27 -0
- package/dist/services/agent-discovery.d.ts.map +1 -0
- package/dist/services/agent-discovery.js +73 -0
- package/dist/services/agent-discovery.js.map +1 -0
- package/dist/services/codex-conversation-lifecycle-hook.d.ts.map +1 -1
- package/dist/services/codex-conversation-lifecycle-hook.js +164 -24
- package/dist/services/codex-conversation-lifecycle-hook.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +146 -72
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-rules.d.ts +1 -1
- package/dist/services/codex-rules.d.ts.map +1 -1
- package/dist/services/codex-rules.js +3 -3
- package/dist/services/codex-subagent-hook-template.d.ts +1 -1
- package/dist/services/codex-subagent-hook-template.d.ts.map +1 -1
- package/dist/services/codex-subagent-hook-template.js +117 -66
- package/dist/services/codex-subagent-hook-template.js.map +1 -1
- package/dist/services/install-agents-template.d.ts.map +1 -1
- package/dist/services/install-agents-template.js +65 -7
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/logger.js +1 -1
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +22 -1
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/runtime-template.test.js +153 -1
- package/dist/services/runtime-template.test.js.map +1 -1
- package/dist/services/transactional-files.d.ts.map +1 -1
- package/dist/services/transactional-files.js +59 -14
- package/dist/services/transactional-files.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/.env.example +9 -3
- package/templates/.agents/README-ENG.md +101 -15
- package/templates/.agents/README.md +102 -17
- package/templates/.agents/architecture/software-architecture.md +1 -59
- package/templates/.agents/branding/brandbook.md +3 -0
- package/templates/.agents/config/agents/catalog.yaml +25 -10
- package/templates/.agents/config/agents/discovery.json +319 -0
- package/templates/.agents/config/clients/codex/agents/zaip-agent-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-auditor.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-backend.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-brand-strategist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-builder.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-cloud-engineer.toml +12 -9
- package/templates/.agents/config/clients/codex/agents/zaip-agent-data-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-designer.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-finalizer.toml +2 -2
- package/templates/.agents/config/clients/codex/agents/zaip-agent-frontend.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-general-operations.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-governance-compliance.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-growth-strategist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-integrator.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-marketing-analyst.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-orchestrator.toml +13 -10
- package/templates/.agents/config/clients/codex/agents/zaip-agent-refactoring-specialist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-reviewer.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-sales-specialist.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-security-auditor.toml +1 -1
- package/templates/.agents/config/clients/codex/agents/zaip-agent-task-executor.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-website-developer.toml +3 -3
- package/templates/.agents/config/clients/codex/agents/zaip-agent-writer.toml +1 -1
- package/templates/.agents/config/pricing/models.json +9 -5
- package/templates/.agents/config/project.yaml +22 -2
- package/templates/.agents/dashboard/.zaip-managed.json +530 -138
- package/templates/.agents/dashboard/README.md +16 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-CEDZjl4V.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-DaSllaJp.js → DashboardHelpDialog-TnrL1ZyZ.js} +967 -578
- package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-DjQpBqGU.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-B9GWkEyN.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-BAvLPAee.js +3 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BQZXUnQu.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-06__WZco.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-Basaw1NR.js +824 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-TPUT2IUt.js → icons-vendor-DEmo6Tn2.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-BQe3zTvL.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-Ct48XHGL.js → react-vendor-CadYsm83.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/rolldown-runtime-Bh1tDfsg.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-BzKK8kK3.js +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +6 -6
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/apps/frontend/src/App.tsx +3 -1264
- package/templates/.agents/dashboard/apps/frontend/src/AppDashboardContent.tsx +368 -0
- package/templates/.agents/dashboard/apps/frontend/src/AutonomySettings.tsx +82 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.dom.test.ts +130 -0
- package/templates/.agents/dashboard/apps/frontend/src/ProjectSettingsPage.tsx +206 -157
- package/templates/.agents/dashboard/apps/frontend/src/ProjectStackEditor.tsx +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/__tests__/app-composition-support.ts +12 -0
- package/templates/.agents/dashboard/apps/frontend/src/cost-monitor-population.test.tsx +149 -0
- package/templates/.agents/dashboard/apps/frontend/src/cost-period-refresh.test.ts +9 -7
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-settings.ts +152 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +19 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +50 -154
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-app-shell.tsx +33 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-cost-facts.test.ts +54 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-cost-facts.ts +48 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.test.ts +37 -43
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-localization.ts +9 -251
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-project-overview.ts +35 -2
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-retry.ts +17 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-setup-route.ts +29 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-view-actions.test.ts +51 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-view-actions.ts +68 -0
- package/templates/.agents/dashboard/apps/frontend/src/operations-period-render.test.ts +38 -2
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.test.ts +19 -4
- package/templates/.agents/dashboard/apps/frontend/src/operations-period.ts +5 -3
- package/templates/.agents/dashboard/apps/frontend/src/overview-status-page.test.ts +2 -2
- package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.test.ts +137 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-installation-status.ts +66 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-copy.ts +181 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-model.ts +11 -1
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-page.css +102 -51
- package/templates/.agents/dashboard/apps/frontend/src/project-settings-state.css +55 -0
- package/templates/.agents/dashboard/apps/frontend/src/project-settings.test.ts +14 -2
- package/templates/.agents/dashboard/apps/frontend/src/sao-paulo-day-rollover.test.ts +36 -0
- package/templates/.agents/dashboard/apps/frontend/src/sao-paulo-day-rollover.ts +30 -0
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-banner-semantics.test.ts +2 -5
- package/templates/.agents/dashboard/apps/frontend/src/snapshot-coherence.test.ts +31 -20
- package/templates/.agents/dashboard/apps/frontend/src/traceability-task-pagination.ts +1 -2
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.test.ts +6 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-cost-loaders.ts +2 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-effects.ts +9 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-documents.ts +3 -1
- package/templates/.agents/dashboard/apps/frontend/src/use-app-trace-task-pagination.ts +66 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-app-work-board.ts +397 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +782 -0
- package/templates/.agents/dashboard/apps/frontend/src/use-snapshot-notice.tsx +49 -0
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/complete-cost-average.test.ts +73 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/contracts.ts +9 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/period-averages.ts +60 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostDeveloperPanelSlot.tsx +16 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostGroupsTable.tsx +459 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorContent.tsx +8 -22
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +27 -17
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +64 -189
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorRunDialog.tsx +20 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostPeriodAverageCards.tsx +32 -8
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-hides-calls-that-have-no-collected.test.ts +80 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables-keeps-legacy-codex-identity-fields-blank.test.ts +455 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.test.ts +18 -525
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostTables.tsx +32 -508
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-export-sources.ts +74 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-actions.ts +19 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-page-selectors.ts +49 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-monitor-summary.ts +3 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/cost-table-formatters.ts +115 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/period-cost-groups.ts +1 -42
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/use-cost-group-page.ts +2 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.test-fixtures.ts +2 -0
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-monitor-projection.ts +3 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/build-cost-summary-projection.ts +8 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/server/index.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/contracts.ts +4 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTableBadges.tsx +34 -0
- package/templates/.agents/dashboard/modules/operations/src/react/EntityTables.tsx +8 -38
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview-keeps-structure-classes-mutually-exclusive.test.ts +244 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.helpers.tsx +66 -3
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.test.ts +98 -276
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +105 -276
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewCharts.tsx +171 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverviewPanels.tsx +64 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +9 -17
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPageOverview.tsx +3 -0
- package/templates/.agents/dashboard/modules/operations/src/react/OverviewCostKpi.tsx +46 -0
- package/templates/.agents/dashboard/modules/operations/src/react/PrdDocumentDialog.test.tsx +2 -1
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.test.ts +28 -1
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkList.tsx +11 -4
- package/templates/.agents/dashboard/modules/operations/src/react/index.ts +1 -0
- package/templates/.agents/dashboard/modules/operations/src/react/manual-work-priority.test.ts +2 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-coverage-toast.test.ts +8 -4
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +34 -22
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview.status-cards.test.ts +3 -1
- package/templates/.agents/dashboard/modules/operations/src/react/operations-page-contract.ts +21 -2
- package/templates/.agents/dashboard/modules/operations/src/react/overview-cost-card.test.tsx +89 -0
- package/templates/.agents/dashboard/modules/operations/src/react/overview-metric-format.ts +32 -0
- package/templates/.agents/dashboard/modules/operations/src/react/work-board-model.test.ts +3 -3
- package/templates/.agents/dashboard/modules/operations/src/work-board-model.ts +2 -1
- package/templates/.agents/dashboard/modules/traceability/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/package.json +1 -1
- package/templates/.agents/dashboard/packages/branding/src/index.ts +1 -1
- package/templates/.agents/dashboard/packages/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +1625 -1613
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +1592 -1582
- package/templates/.agents/dashboard/packages/local-runtime/package.json +3 -2
- package/templates/.agents/dashboard/packages/local-runtime/scripts/build-sqlite-runtime.mjs +22 -28
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +1625 -1614
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +25 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/agent-catalog-settings.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.test.ts +142 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-installation-summary.ts +190 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.test.ts +118 -8
- package/templates/.agents/dashboard/packages/local-runtime/src/project-settings.ts +92 -36
- package/templates/.agents/dashboard/packages/local-runtime/src/projection-refresh-diagnostics.ts +35 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.test.ts +91 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-browser-lease.ts +24 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/server-costs-routes.ts +168 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-dual-reads-manifest-summaries-without-losing.test.ts +344 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-hono-security.test.ts +17 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-http-contracts.ts +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-operations-routes.ts +364 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-read-projections.ts +461 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-refresh.test.ts +78 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-route-context.ts +13 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.test.ts +94 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-refresh.ts +62 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +44 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +22 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot.test.ts +22 -21
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.test.ts +97 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-task-trace.ts +10 -13
- package/templates/.agents/dashboard/packages/local-runtime/src/server-sqlite-view-allowlist.test.ts +25 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-trace-routes.ts +56 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-traceability-index.test.ts +84 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +2 -30
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +6 -23
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test-fixtures.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +2 -330
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +87 -1060
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-dimension-facts.test.ts +12 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-file-index.test.ts +69 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-first-fold-cache.ts +3 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-force-canonical.test.ts +3 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-incremental-refresh.test.ts +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-first-fold.ts +78 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-projections.ts +570 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-materialize-runs.ts +600 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-metric-contract.test.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-period-averages.ts +46 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-alias-parity.test.ts +50 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-agent-dimension.ts +269 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-context.ts +32 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-entity-group.ts +244 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-filtered-dimension.ts +303 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-financial.ts +547 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-model-dimension.ts +360 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-provider-dimension.ts +169 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +493 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-temporal-dimension.ts +134 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-timing.ts +299 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +692 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +763 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-does-not-convert-delayed-historical-finalizer.test.ts +706 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-filesystem.ts +762 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-first-fold-types.ts +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-keeps-orphan-telemetry-out-kanban-without.test.ts +710 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-marks-token-cost-telemetry-unavailable-when.test.ts +618 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +764 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuilds-disposable-snapshot-serves-zaip-records.test.ts +276 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +193 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.test.ts +54 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +7 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-types.ts +123 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +5 -2806
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +17 -6930
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-risk-population.test.ts +98 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +390 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-dashboard-views.ts +413 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-snapshot-seed.test.ts +2 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/verify-project-settings.mjs +57 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/work-priority-contract.test.ts +4 -3
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-build.mjs +195 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-lifecycle.test.mjs +2 -7
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-logging.mjs +35 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-navigation.mjs +114 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-paths.mjs +90 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +89 -418
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.test.mjs +22 -12
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/scripts/qualify-observability.mjs +130 -0
- package/templates/.agents/dashboard/scripts/verify-autonomy-settings.mjs +175 -0
- package/templates/.agents/dashboard/scripts/verify-observability.mjs +254 -0
- package/templates/.agents/dashboard/scripts/verify-project-setup.mjs +64 -0
- package/templates/.agents/dashboard/tests/e2e/lease-global-setup.ts +37 -0
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/playwright.config.ts +9 -4
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-period-transition.spec.ts +22 -1
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-performance-matrix.spec.ts +17 -8
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +47 -6
- package/templates/.agents/dashboard/tests/e2e/specs/lease-lifetime.spec.ts +14 -0
- package/templates/.agents/dashboard/tests/observability-fixture.mjs +200 -0
- package/templates/.agents/design/.zaip-managed.json +86 -42
- package/templates/.agents/design/DESIGN.md +2 -186
- package/templates/.agents/design/README.md +12 -2
- package/templates/.agents/design/apps/catalog/dist/assets/index-BJV597iq.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-BOjCcUaU.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-B_WhrCZe.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-CqtYXZfV.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-D_lfqoyx.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/assets/index-i_PO2k9R.js +9 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-Cstn1UwA.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{Color-6AOWCN3U-B-kAgAjB.js → Color-6AOWCN3U-Cm-yJJz_.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-D1WopB2L.js +137 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DQ9PJ3N3.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{DocsRenderer-JROSPFPF-BVN7xHtv.js → DocsRenderer-JROSPFPF-Belk4jRr.js} +4 -4
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{WithTooltip-7X4HQR7L-CDHtKYkz.js → WithTooltip-7X4HQR7L-DoPvjkS1.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-DRQKCCAG-D6AsDkMK.js → chunk-DRQKCCAG-B1itKXEN.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{chunk-W22LQPXL-B4m5uloN.js → chunk-W22LQPXL-C-Eb5SPY.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{components-CN8YyTUg.js → components-DnyKLwhj.js} +5 -5
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-D0OSgxWz.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{iframe-9yZfIsdT.js → iframe-DcXBsFPz.js} +3 -3
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{react-18-BoCSnq6H.js → react-18-CRM89QRf.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-C3tkVMIp.js +1 -0
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{syntaxhighlighter-YFXUGROL-Bnn_nMwJ.js → syntaxhighlighter-YFXUGROL-B03jQGTF.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/{theming-DS_ue2sb.js → theming-4ZyufAga.js} +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/iframe.html +1 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/index.json +1 -1
- package/templates/.agents/design/apps/catalog/package.json +2 -2
- package/templates/.agents/design/apps/catalog/src/components/AutonomySpecimen.tsx +15 -0
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.test.tsx +19 -0
- package/templates/.agents/design/apps/catalog/src/components/CostPopulationSpecimen.tsx +45 -0
- package/templates/.agents/design/apps/catalog/src/components/EstimatedCostSpecimen.tsx +48 -0
- package/templates/.agents/design/apps/catalog/src/components/ProjectStatusSpecimen.tsx +169 -0
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +55 -0
- package/templates/.agents/design/apps/catalog/src/stories/Components.stories.tsx +60 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/growth/strategy.md +3 -0
- package/templates/.agents/marketing/strategy.md +3 -0
- package/templates/.agents/requirements/autonomous-assurance.md +2 -1
- package/templates/.agents/requirements/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/requirements/comparative-audit.md +1 -1
- package/templates/.agents/requirements/context-engine.md +1 -1
- package/templates/.agents/requirements/cost-observability.md +1 -1
- package/templates/.agents/requirements/dashboard-launch.md +1 -1
- package/templates/.agents/requirements/data-export.md +1 -1
- package/templates/.agents/requirements/design-system.md +13 -4
- package/templates/.agents/requirements/execution-engine.md +1 -1
- package/templates/.agents/requirements/kanban-dashboard.md +1 -1
- package/templates/.agents/requirements/model-orchestration.md +1 -1
- package/templates/.agents/requirements/public-distribution.md +4 -2
- package/templates/.agents/requirements/software-architecture.md +1 -1
- package/templates/.agents/requirements/strategic-improvements.md +1 -1
- package/templates/.agents/requirements/work-lifecycle.md +6 -6
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/architecture.md +2 -0
- package/templates/.agents/rules/astra-diagnostic.md +3 -1
- package/templates/.agents/rules/autonomy-decision.md +12 -2
- package/templates/.agents/rules/cloud-hostinger-autonomy.md +2 -0
- package/templates/.agents/rules/context.md +2 -1
- package/templates/.agents/rules/core.md +15 -4
- package/templates/.agents/rules/design-system-central-contract.md +17 -0
- package/templates/.agents/rules/evolution.md +3 -1
- package/templates/.agents/rules/frontend-lite.md +3 -1
- package/templates/.agents/rules/local-sqlite-storage.md +2 -2
- package/templates/.agents/rules/meta-mcp.md +3 -1
- package/templates/.agents/rules/model-orchestration.md +1 -1
- package/templates/.agents/rules/run-lifecycle-closure.md +11 -7
- package/templates/.agents/rules/security.md +3 -1
- package/templates/.agents/rules/specialist-routing.md +3 -1
- package/templates/.agents/rules/text-writing-utf8.md +1 -1
- package/templates/.agents/rules/workflow.md +7 -5
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +821 -516
- package/templates/.agents/runtime/checksums.sha256 +6 -6
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/pnpm-lock.sha256 +1 -1
- package/templates/.agents/runtime/provenance.json +5 -5
- package/templates/.agents/runtime/sbom.cdx.json +3 -3
- package/templates/.agents/sales/playbook.md +3 -0
- package/templates/.agents/skills/zaip-aios/SKILL.md +5 -3
- package/templates/.agents/skills/zaip-skill-adapt-stack/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-api-contracts/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-api-contracts/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-application-observability/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-application-observability/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-application-observability/references/signal-design.md +3 -0
- package/templates/.agents/skills/zaip-skill-application-readiness/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-application-readiness/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-application-readiness/references/evidence-matrix.md +3 -0
- package/templates/.agents/skills/zaip-skill-architecture-design/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-architecture-design/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-async-jobs/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-async-jobs/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-auth-tenancy/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-auth-tenancy/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-auth-tenancy/references/data-access-paths.md +9 -0
- package/templates/.agents/skills/zaip-skill-auth-tenancy/references/worker-scenario.md +5 -0
- package/templates/.agents/skills/zaip-skill-auth-tenancy/scripts/worker-contract.test.mjs +27 -0
- package/templates/.agents/skills/zaip-skill-author-skills/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-author-skills/references/engineering-skill-index.md +9 -0
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/audit-skill-catalog.mjs +5 -3
- package/templates/.agents/skills/zaip-skill-author-skills/scripts/author-skill-scripts.test.mjs +27 -0
- package/templates/.agents/skills/zaip-skill-backend/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-backend/references/deployment-environments.md +75 -0
- package/templates/.agents/skills/zaip-skill-backend/references/supabase-migration-contract.md +23 -0
- package/templates/.agents/skills/zaip-skill-brand-governance/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-cache-strategy/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-cache-strategy/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-change/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-cloud-engineering/SKILL.md +7 -0
- package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/SKILL.md +37 -0
- package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/agents/openai.yaml +6 -0
- package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workers-static-assets.md +26 -0
- package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/references/workflow-templates.md +71 -0
- package/templates/.agents/skills/zaip-skill-cloudflare-github-deploy/scripts/cloudflare-github-deploy-contract.test.mjs +77 -0
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +21 -11
- package/templates/.agents/skills/zaip-skill-config/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-container-runtime/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-container-runtime/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-context/SKILL.md +6 -1
- package/templates/.agents/skills/zaip-skill-context/references/prd-spec-task-handoff.md +10 -0
- package/templates/.agents/skills/zaip-skill-context/references/rule-selection.md +20 -0
- package/templates/.agents/skills/zaip-skill-cqrs/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-cybersecurity/SKILL.md +18 -0
- package/templates/.agents/skills/zaip-skill-cybersecurity/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-cybersecurity/references/audit-contract.md +94 -0
- package/templates/.agents/skills/zaip-skill-cybersecurity/scripts/score-audit.mjs +185 -0
- package/templates/.agents/skills/zaip-skill-cybersecurity/scripts/score-audit.test.mjs +101 -0
- package/templates/.agents/skills/zaip-skill-data-modeling/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-data-modeling/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/SKILL.md +20 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/references/manual-mode.md +15 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/references/promotion-example.md +5 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/scripts/export-manual-sql.mjs +145 -0
- package/templates/.agents/skills/zaip-skill-database-migrations/scripts/export-manual-sql.test.mjs +178 -0
- package/templates/.agents/skills/zaip-skill-dependency-upgrade/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-dependency-upgrade/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-deployment-pipeline/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-deployment-pipeline/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-deployment-pipeline/references/runtime-shapes.md +3 -0
- package/templates/.agents/skills/zaip-skill-design-system/SKILL.md +20 -9
- package/templates/.agents/skills/zaip-skill-dev-environment/SKILL.md +16 -0
- package/templates/.agents/skills/zaip-skill-dev-environment/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-dev-environment/references/inventory-contract.md +7 -0
- package/templates/.agents/skills/zaip-skill-dev-environment/scripts/inventory.mjs +77 -0
- package/templates/.agents/skills/zaip-skill-disaster-recovery/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-disaster-recovery/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-disaster-recovery/references/recovery-scope.md +3 -0
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +31 -8
- package/templates/.agents/skills/zaip-skill-execution/references/correction-cycle.md +7 -0
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +18 -8
- package/templates/.agents/skills/zaip-skill-external-integrations/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-external-integrations/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-frontend/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-frontend-componentization/SKILL.md +44 -0
- package/templates/.agents/skills/zaip-skill-frontend-componentization/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-frontend-data-flows/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-frontend-data-flows/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/SKILL.md +36 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/references/cloudflare-pages.md +33 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/references/github.md +63 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/references/hostinger-vps.md +55 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/references/npm.md +30 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/check-skill.mjs +55 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-cloudflare.mjs +61 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-cloudflare.test.mjs +128 -0
- package/templates/.agents/skills/zaip-skill-github-actions-setup/scripts/verify-ssh.integration.test.mjs +106 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +42 -76
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +135 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/references/github-release-workflow-template.md +31 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-gate-matrix.md +24 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +44 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-notes.md +134 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.mjs +389 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/consumer-release-preparation.test.mjs +134 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +25 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness-api.test.mjs +134 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness.mjs +98 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-readiness.test.mjs +25 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/install-github-readiness-workflow.mjs +159 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/install-github-readiness-workflow.test.mjs +160 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs +149 -12
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/preflight.test.mjs +64 -5
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/release-notes-coverage.test.mjs +126 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.mjs +78 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.test.mjs +51 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/validate-release-notes.mjs +184 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/validate-release-notes.test.mjs +109 -0
- package/templates/.agents/skills/zaip-skill-growth-strategy-revops/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/SKILL.md +18 -10
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/agents/openai.yaml +3 -4
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/aws-cli-terraform.md +62 -0
- package/templates/.agents/skills/zaip-skill-hostinger-cloudflare-terraform/references/guia-iniciante-hostinger-vps.md +183 -0
- package/templates/.agents/skills/zaip-skill-marketing/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-module-scaffold/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-module-scaffold/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-module-scaffold/references/scaffold-contract.md +9 -0
- package/templates/.agents/skills/zaip-skill-module-scaffold/scripts/helpers.test.mjs +121 -0
- package/templates/.agents/skills/zaip-skill-module-scaffold/scripts/scaffold.mjs +169 -0
- package/templates/.agents/skills/zaip-skill-move-prd/SKILL.md +3 -1
- package/templates/.agents/skills/zaip-skill-move-spec/SKILL.md +1 -1
- package/templates/.agents/skills/zaip-skill-performance-engineering/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-performance-engineering/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +3 -1
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-local-telemetry.mjs +1 -0
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.mjs +26 -9
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-lib.test.mjs +39 -13
- package/templates/.agents/skills/zaip-skill-reconcile-telemetry/scripts/reconcile-telemetry-remeasurement.mjs +1 -0
- package/templates/.agents/skills/zaip-skill-refactor-landing-page/SKILL.md +66 -0
- package/templates/.agents/skills/zaip-skill-refactor-landing-page/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-refactor-landing-page/references/behavioral-dry-run.md +23 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +38 -1
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +122 -0
- package/templates/.agents/skills/zaip-skill-review/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-rules/SKILL.md +3 -3
- package/templates/.agents/skills/zaip-skill-sales-methodology/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +21 -21
- package/templates/.agents/skills/zaip-skill-setup/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +3 -2
- package/templates/.agents/skills/zaip-skill-storage-uploads/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-storage-uploads/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-systematic-debugging/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-systematic-debugging/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-task/SKILL.md +16 -7
- package/templates/.agents/skills/zaip-skill-task/references/commit-policy.md +25 -0
- package/templates/.agents/skills/zaip-skill-test-data/SKILL.md +14 -0
- package/templates/.agents/skills/zaip-skill-test-data/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-test-data/scripts/generate.mjs +72 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/references/example-map.md +3 -0
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-website-readiness/SKILL.md +8 -0
- package/templates/.agents/zaip-aios/INDEX.md +9 -1
- package/templates/.agents/zaip-aios/README.md +23 -2
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/01-primeiros-passos.md +5 -1
- package/templates/.agents/zaip-aios/guides/03-tasks.md +15 -2
- package/templates/.agents/zaip-aios/guides/04-specs.md +13 -0
- package/templates/.agents/zaip-aios/guides/05-prds.md +13 -0
- package/templates/.agents/zaip-aios/guides/06-execucao.md +19 -4
- package/templates/.agents/zaip-aios/guides/07-revisao-e-validacao.md +14 -0
- package/templates/.agents/zaip-aios/guides/08-contexto-e-tokens.md +4 -3
- package/templates/.agents/zaip-aios/guides/09-agentes-e-squads.md +17 -9
- package/templates/.agents/zaip-aios/guides/10-seguranca.md +11 -1
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +69 -0
- package/templates/.agents/zaip-aios/guides/12-instalacao-e-upgrade.md +9 -4
- package/templates/.agents/zaip-aios/guides/13-boas-praticas.md +7 -1
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +18 -0
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +54 -3
- package/templates/.agents/zaip-aios/guides/18-catalogo-de-agentes.md +10 -2
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +186 -5
- package/templates/.agents/zaip-aios/guides/20-instalacao-detalhada.md +26 -18
- package/templates/.agents/zaip-aios/guides/21-telemetria-monitor-custos.md +18 -2
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +14 -2
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +190 -489
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +61 -13
- package/templates/.agents/zaip-aios/guides/27-telemetria-git-native.md +18 -0
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +18 -1
- package/templates/scripts/validate-cloud-hostinger-contract.mjs +34 -0
- package/templates/template-manifest.json +1229 -329
- package/templates/.agents/branding/.gitkeep +0 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/CostCalculationGuidePage-snUCQYTC.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/PricingSettingsDialog-BPtVUGgs.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-3Awyaovx.js +0 -3
- package/templates/.agents/dashboard/apps/frontend/dist/assets/ProjectSettingsPage-GgzpZ_PY.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/TraceabilityWorkspace-BCvZFMEf.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-DbaLbU2q.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/dashboard-localization-CLJ0lT9v.js +0 -231
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-_MEktQNM.js +0 -2
- package/templates/.agents/dashboard/apps/frontend/dist/assets/rolldown-runtime-D9-fqq9M.js +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/traceability-BDe4_Ubl.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/CatalogShell-BWY-80s4.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/Components.stories-Be2mDUQj.js +0 -27
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/DesignSystem.stories-DRx9blDs.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/formatter-L2YTDE3Q-EwuTh8Zk.js +0 -1
- package/templates/.agents/design/apps/catalog/dist/storybook/assets/react-DyL61NPT.js +0 -1
- package/templates/.agents/growth/.gitkeep +0 -0
- package/templates/.agents/marketing/.gitkeep +0 -0
- package/templates/.agents/sales/.gitkeep +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { chmod, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
5
|
+
import { tmpdir } from "node:os";
|
|
6
|
+
import { basename, dirname, join, resolve } from "node:path";
|
|
7
|
+
import test from "node:test";
|
|
8
|
+
|
|
9
|
+
function findBash() {
|
|
10
|
+
if (process.platform !== "win32") return "bash";
|
|
11
|
+
const git = spawnSync("where.exe", ["git.exe"], { encoding: "utf8" });
|
|
12
|
+
const candidates = (git.stdout ?? "")
|
|
13
|
+
.trim()
|
|
14
|
+
.split(/\r?\n/)
|
|
15
|
+
.filter(Boolean)
|
|
16
|
+
.flatMap((file) => [
|
|
17
|
+
resolve(dirname(file), "../bin/bash.exe"),
|
|
18
|
+
resolve(dirname(file), "../../bin/bash.exe"),
|
|
19
|
+
]);
|
|
20
|
+
const match = candidates.find(existsSync);
|
|
21
|
+
assert.ok(match, "Git for Windows with Bash must be available on PATH for this integration test");
|
|
22
|
+
return match;
|
|
23
|
+
}
|
|
24
|
+
const bash = findBash();
|
|
25
|
+
const guide = await readFile(new URL("../references/hostinger-vps.md", import.meta.url), "utf8");
|
|
26
|
+
const snippet = guide.match(/```bash\n([\s\S]*?)\n```/)[1];
|
|
27
|
+
const toPosix = (value) =>
|
|
28
|
+
process.platform === "win32"
|
|
29
|
+
? value.replaceAll("\\", "/").replace(/^([A-Za-z]):/, (_, drive) => "/" + drive.toLowerCase())
|
|
30
|
+
: value;
|
|
31
|
+
|
|
32
|
+
async function runProbe(overrides = {}) {
|
|
33
|
+
const dir = await mkdtemp(join(tmpdir(), "zaip-ssh-probe-"));
|
|
34
|
+
const stub = join(dir, "ssh");
|
|
35
|
+
// Execute the actual guide snippet, substituting only the external SSH process.
|
|
36
|
+
await writeFile(
|
|
37
|
+
stub,
|
|
38
|
+
'#!/usr/bin/env bash\nset -eu\nprintf "%s\\n" "$@" > "$PROBE_ARGS"\ntest -s "$4"\nprintf "%s" "$4" > "$PROBE_KEY_PATH"\nif env | grep -q "^VPS_SSH_PRIVATE_KEY="; then exit 99; fi\nexit "${PROBE_EXIT:-0}"\n',
|
|
39
|
+
);
|
|
40
|
+
await chmod(stub, 0o700);
|
|
41
|
+
const script = join(dir, "probe.sh");
|
|
42
|
+
await writeFile(script, 'export PATH="' + toPosix(dir) + ':$PATH"\n' + snippet);
|
|
43
|
+
const argsFile = join(dir, "args.txt");
|
|
44
|
+
const keyPathFile = join(dir, "key-path.txt");
|
|
45
|
+
const child = spawnSync(bash, [toPosix(script)], {
|
|
46
|
+
encoding: "utf8",
|
|
47
|
+
env: {
|
|
48
|
+
...process.env,
|
|
49
|
+
VPS_HOST: "example.invalid",
|
|
50
|
+
VPS_PORT: "2222",
|
|
51
|
+
VPS_USER: "deploy",
|
|
52
|
+
VPS_SSH_PRIVATE_KEY: "synthetic-multiline\nprivate-key",
|
|
53
|
+
VPS_KNOWN_HOSTS: "[example.invalid]:2222 ssh-ed25519 synthetic-public",
|
|
54
|
+
PROBE_ARGS: toPosix(argsFile),
|
|
55
|
+
PROBE_KEY_PATH: toPosix(keyPathFile),
|
|
56
|
+
...overrides,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
let args = null;
|
|
60
|
+
try {
|
|
61
|
+
args = await readFile(argsFile, "utf8");
|
|
62
|
+
} catch {}
|
|
63
|
+
let cleanupExit = null;
|
|
64
|
+
try {
|
|
65
|
+
const keyPath = await readFile(keyPathFile, "utf8");
|
|
66
|
+
cleanupExit = spawnSync(bash, [
|
|
67
|
+
"-c",
|
|
68
|
+
'test ! -e "$1" && test ! -d "$(dirname "$1")"',
|
|
69
|
+
"--",
|
|
70
|
+
keyPath,
|
|
71
|
+
]).status;
|
|
72
|
+
} catch {}
|
|
73
|
+
assert.equal(dirname(resolve(dir)), resolve(tmpdir()));
|
|
74
|
+
assert.ok(basename(dir).startsWith("zaip-ssh-probe-"));
|
|
75
|
+
await rm(dir, { recursive: true, force: true });
|
|
76
|
+
return { ...child, args, cleanupExit };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
test("guide SSH test uses verified host, fixed read-only command and cleans key", async () => {
|
|
80
|
+
const result = await runProbe();
|
|
81
|
+
assert.equal(result.status, 0, result.stderr);
|
|
82
|
+
assert.match(result.args, /StrictHostKeyChecking=yes/);
|
|
83
|
+
assert.match(result.args, /BatchMode=yes/);
|
|
84
|
+
assert.match(result.args, /deploy@example.invalid\ntrue\n$/);
|
|
85
|
+
assert.equal(result.cleanupExit, 0);
|
|
86
|
+
assert.ok(!result.stdout.includes("private-key"));
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test("SSH failure is propagated and private material removed", async () => {
|
|
90
|
+
const result = await runProbe({ PROBE_EXIT: "255" });
|
|
91
|
+
assert.equal(result.status, 255, result.stderr);
|
|
92
|
+
assert.equal(result.cleanupExit, 0);
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
for (const fields of [
|
|
96
|
+
{ VPS_HOST: "-oProxyCommand=bad" },
|
|
97
|
+
{ VPS_USER: "deploy;bad" },
|
|
98
|
+
{ VPS_PORT: "0" },
|
|
99
|
+
{ VPS_PORT: "65536" },
|
|
100
|
+
{ VPS_PORT: "22;bad" },
|
|
101
|
+
])
|
|
102
|
+
test("invalid SSH destination never executes SSH: " + JSON.stringify(fields), async () => {
|
|
103
|
+
const result = await runProbe(fields);
|
|
104
|
+
assert.equal(result.status, 2, result.stderr);
|
|
105
|
+
assert.equal(result.args, null);
|
|
106
|
+
});
|
|
@@ -5,99 +5,65 @@ description: Use only when the user explicitly asks in the current turn to deplo
|
|
|
5
5
|
|
|
6
6
|
# Deploy and repair GitHub publication
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Treat deploy as Git-only publication. An explicit current-turn request to `deploy`, `push`, `publicar`, `publicação` or GitHub publication selects this skill. It never authorizes provider deployment.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Read [the deployment workflow](references/deployment-workflow.md) for the detailed operational contract before publication. The steps below retain its authority, identity and completion boundaries.
|
|
11
11
|
|
|
12
|
-
## Authorization
|
|
12
|
+
## Authorization and scope
|
|
13
13
|
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
14
|
+
- The exact command “faça deploy” authorizes commits covering all versionable pending changes in the selected worktree, followed by push and Release, after secret, size and ignore checks. The selected worktree is the complete publication scope; other worktrees remain outside it.
|
|
15
|
+
- Resolve dirty state, untracked files, generated projections, branch divergence and repairable local/remote failures automatically within that scope. Limit repairs to the evidenced cause, with up to five repair cycles; stop when the same root cause remains after two repairs.
|
|
16
|
+
- Stop only for an unresolved index conflict after bounded repair, secrets, files at or above GitHub's 100 MB limit, unavailable authentication/authority, external outage, destructive requirement, or ambiguous scope expansion.
|
|
17
17
|
- Never force push, rewrite history, replace remotes, change credentials or Git/SSH configuration, bypass checks, or deploy to another service.
|
|
18
|
-
-
|
|
19
|
-
- Map a functional group to PRD/SPEC/Task only when evidence exists; otherwise use `[CODEX] <functional title>` without `ZAIP-Task`. Omit nonexistent lineage blocks and trailers. Complete inventoried-path staging is authorized only by the exact current-turn deploy request; force, destructive reset, history rewrite, and credential changes remain prohibited.
|
|
18
|
+
- Git-only publication of existing commits needs no artificial Task. Product edits or new product commits require real Task ownership; materialize missing authorized work before editing. Records/local-only snapshots are exempt.
|
|
20
19
|
|
|
21
20
|
## Mandatory authorization record
|
|
22
21
|
|
|
23
|
-
Before the first Git mutation, retain
|
|
22
|
+
Before the first Git mutation, retain sanitized authority in progress and the terminal report: current-turn intent; repository, remote, branch and selected worktree; push-only versus commit plus push; bounded rebase (default) or user-selected merge; allowed repairs and excluded scopes; preflight result and preservation reference. Never record credentials or environment values.
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
2. repository, remote, branch and selected worktree;
|
|
27
|
-
3. whether the grant is simple push or partitioned commit plus push;
|
|
28
|
-
4. the bounded history-reconciliation strategy (`rebase` by default, or user-selected `merge`);
|
|
29
|
-
5. allowed repair cycles, excluded worktrees/scopes and prohibited actions;
|
|
30
|
-
6. the preflight result and the recoverable preservation reference used before reconciliation.
|
|
24
|
+
## Prepare the selected worktree
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
1. Inspect Git status, pending paths and diff summary. Review every inventoried versionable file for secrets, size and ignore policy.
|
|
27
|
+
2. Read `.agents/config/project.yaml`. Resolve the explicit frontend/backend scope from `deploy.frontend.branch` or `deploy.backend.branch`; configured `main` is permitted. `deploy.database.branch` must remain literal `beta`. The legacy `deploy.branch` fallback remains non-production.
|
|
28
|
+
3. Prove folder-scoped SSH using `scripts/preflight.mjs --repository . --remote origin --scope frontend` (or the actual authorized scope). Run at most once per cycle; recheck only after an evidenced repair or changed target. Require SSH origin, configured key, Git identity and successful `ls-remote`; no process overrides or credential/config edits.
|
|
29
|
+
4. Fetch once per cycle and compute ahead/behind. Before reconciliation, create a recoverable branch reference and preserve tracked plus untracked changes in a named stash. Use bounded rebase by default. Restore with `git stash apply`; verify preservation, retain the stash until success, and combine conflicts from observed intent. Never reset or force.
|
|
30
|
+
5. Re-inventory after reconciliation. Stage the reviewed paths with `git add -- <explicit-pathspecs>`; never use `git add -A`, `git add -u`, broad globs or ignored files. Explicit deploy permits the whole inventoried selected worktree, without mandatory functional partitioning.
|
|
31
|
+
6. Run required or evidenced gates only. Reuse unchanged valid evidence; bypass Turbo cache for the failed remote gate when repairing CI. A failed gate starts a new cycle only after a concrete repair or new remote evidence.
|
|
33
32
|
|
|
34
|
-
##
|
|
33
|
+
## Task identity in commits
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
2. Select exactly one publishing worktree. A clean worktree on another branch or a detached verification worktree does not join the deploy. The selected worktree is the complete publication scope.
|
|
38
|
-
3. Report concurrent activity, but do not block solely because the selected worktree is dirty or contains mixed changes; the explicit “faça deploy” authorization includes those changes. Stop only for an unresolved index conflict, secret/oversize file, authentication failure, or destructive/rewrite requirement.
|
|
39
|
-
4. Prunable or missing worktrees are reported but never pruned automatically. Dirty detached or temporary worktrees are never deleted, reset, stashed or copied into the publishing worktree implicitly.
|
|
40
|
-
5. Fetch once and compute ahead/behind for the publishing branch. If it is behind or diverged, automatically reconcile only the selected branch under this deploy authorization and continue; divergence is not a blocker by itself.
|
|
41
|
-
6. Before reconciliation, create a recoverable branch reference and preserve tracked plus untracked changes in a named stash. Verify both references before proceeding. Use `rebase` unless the user explicitly selected `merge`.
|
|
42
|
-
7. Apply the bounded reconciliation without force. Restore with `git stash apply`, retain the stash until publication succeeds, and resolve generated aggregate conflicts by regenerating them from canonical sources. For ordinary textual conflicts, combine both sides when safe; use the selected worktree's intended version only when the diff and commit history establish that it supersedes the remote version.
|
|
43
|
-
8. After restoration, prove that no unmerged paths remain, re-inventory the diff, and only then begin functional partitioning. Continue automatically through recoverable conflicts and pending repairs; stop only for a genuine terminal blocker defined below.
|
|
35
|
+
Use `[CODEX|CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>` with evidenced lineage. The effective prefix is exclusively `CODEX` or `CLAUDE`; `AUTO` is not part of this policy.
|
|
44
36
|
|
|
45
|
-
|
|
37
|
+
Standalone Tasks use `[Task-first:XXXX]` followed by the canonical Task title; do not invent PRD/SPEC lineage. Keep the subject within 96 characters and full IDs in `ZAIP-*` trailers. Use `task commit TASK --run RUN --files PATHS`, retain the commit-msg hook, and validate the range with `commit validate`.
|
|
46
38
|
|
|
47
|
-
|
|
48
|
-
- Inventory the complete pending diff, run the safety gates, then stage the reviewed inventory with `git add -- <explicit-pathspecs>` and commit it. Generate pathspecs from the reviewed tracked and untracked inventory; do not use `git add -A`, broad globs, or paths outside the selected worktree. Do not require functional partitioning for this explicit broad-deploy mode.
|
|
49
|
-
- Run each diagnostic, gate, fetch, stage, commit, push, and hash verification at most once per cycle.
|
|
50
|
-
- Start a new cycle only after a repository change or new remote evidence. Never repeat an unchanged failing command hoping for a different result.
|
|
51
|
-
- Continue until all required checks pass or a terminal blocker occurs. Stop after five repair cycles, or when the same root cause remains after two repairs.
|
|
52
|
-
- Treat authentication, unavailable credentials, unresolved conflicts after bounded repair, secret exposure, destructive changes, GitHub outages, and ambiguous scope expansion as terminal blockers. Ordinary branch divergence, dirty state, untracked versionable files, generated projections, lint/format failures, and other repairable pending work are not blockers: repair them within the selected worktree and continue under the same authorization.
|
|
39
|
+
Every product commit requires causal Task/Change/Execution records and matching write scopes. Only `.agents/records/**` and `.local/**` changes are exempt. Conversation capture alone does not authorize a product commit; never borrow the latest global Task. See [commit policy](../zaip-skill-task/references/commit-policy.md).
|
|
53
40
|
|
|
54
|
-
##
|
|
41
|
+
## Qualify the exact candidate and deliver
|
|
55
42
|
|
|
56
|
-
|
|
43
|
+
1. Compose `$zaip-skill-release-qualification` and follow [local preparation](../zaip-skill-release-qualification/references/local-preparation.md). Synchronize and commit before preparing the clean exact SHA. Failed or stale evidence is not qualification.
|
|
44
|
+
2. Resolve the previous Release, next canonical version and package identity using [release identity](references/release-identity.md). For the framework, `vN.N` maps to package `N.N.0`; only GitHub Actions publishes `@zaip-ai/cli` to npm.
|
|
45
|
+
3. For `zaip-ai/zaip-aios`, use `scripts/local-release-deploy.mjs`. It prepares/verifies, pushes the exact SHA to configured `main`, uploads verified assets to a draft, then publishes the Release. Enable the thin publisher only after explicit rollout authority, public trust enrollment and signed full local qualification. It validates published assets and runs one read-only installation smoke before npm; no private-draft pilot or write token is needed. GitHub Release publication and npm completion remain separate.
|
|
46
|
+
4. Consumers use `scripts/consumer-release-preparation.mjs guarded-push` with their own policy and explicit branch, SHA and trusted receipt. They have no framework npm/TGZ requirement. See the preparation guide for bootstrap and guarded commands.
|
|
47
|
+
5. Immediately before delivery, reread the configured target; if changed, restart preparation. Helpers bind the exact candidate to `HEAD:refs/heads/<configured branch>` (or its equivalent immutable-SHA refspec); do not bypass them with a manual push.
|
|
48
|
+
6. After qualification, a missing Release is normal. Unless explicitly push-only, automatically create the draft for that SHA or resume a verified draft for the same SHA. Verify an already-published exact Release as a no-op; an API/authentication error never proves absence. Refuse conflicting tags/assets without overwrite.
|
|
49
|
+
7. Review complete categorized UTF-8 notes and their exact-range inventory under [release notes](references/release-notes.md). Never use `--generate-notes` as the Release body. Validate the notes, publish with the reviewed notes file, and compare the published body byte-for-byte on readback. Preserve a configured human-only review policy where applicable.
|
|
57
50
|
|
|
58
|
-
|
|
59
|
-
node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --remote origin
|
|
60
|
-
```
|
|
51
|
+
## Proportional validation
|
|
61
52
|
|
|
62
|
-
|
|
53
|
+
Guarded local framework delivery requires a valid `full-v2` receipt with the mandatory full gate.
|
|
54
|
+
Without explicit thin-path activation, the default GitHub publisher separately requires the legacy workflow's
|
|
55
|
+
exact-candidate qualification receipt after its full gate and TGZ matrix.
|
|
56
|
+
Rapid impact checks have no test-count ceiling and cannot substitute for release evidence.
|
|
57
|
+
Use the budgets and failure rules in [local preparation](../zaip-skill-release-qualification/references/local-preparation.md).
|
|
58
|
+
Consumer projects retain their own reviewed policy commands. Report qualification and
|
|
59
|
+
publication separately; neither preparation nor this policy grants publication authority.
|
|
63
60
|
|
|
64
|
-
|
|
61
|
+
## Verify and close
|
|
65
62
|
|
|
66
|
-
|
|
63
|
+
- After push, compare the local SHA with the configured remote ref. If the push result is uncertain, read remote state first; only one documented transient transport retry is allowed per cycle.
|
|
64
|
+
- Observe required GitHub checks for that exact SHA, waiting up to 20 minutes with concise progress at least once per minute. Read the exact failed step before repairing. Never repeat an unchanged failing command or disable a gate for green status.
|
|
65
|
+
- Reconcile recoverable prerequisites and continue through the same bounded repair policy; do not stop merely because a Release or generated file was absent.
|
|
66
|
+
- Success requires matching local/remote hashes, successful required observable checks, verified Release identity/body and a clean intended worktree. Distinguish GitHub publication, npm availability and formal lifecycle closure. If checks cannot be observed, report CI as unconfirmed.
|
|
67
|
+
- Retain terminal evidence and close every owned Task/Change/Execution correctly through the finalizer. Never finish with an owned Task executing/verifying; use completed, blocked, cancelled or failed according to observed outcome.
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
2. Inspect suspicious environment, key, certificate, state, or credential files without printing secret values. Block secrets and files at or above GitHub's 100 MB limit.
|
|
70
|
-
3. Reuse valid evidence for unchanged work. Run only gates required by repository Rules, the active Change, or the failed GitHub job.
|
|
71
|
-
- Turbo cache hits are valid only when the active work did not originate from a failed remote CI gate.
|
|
72
|
-
- When repairing failed CI, reproduce the exact failed gate once per repair cycle with Turbo cache bypassed when applicable.
|
|
73
|
-
4. If a local gate fails, capture the exact failing command and error, make the smallest authorized repair, update lifecycle evidence, and start the next cycle without asking for another deploy authorization.
|
|
74
|
-
5. After all required local gates pass, stage each reviewed selected-worktree path with `git add -- <explicit-pathspecs>`. If a file is secret, oversized, ignored by policy, or outside the selected worktree, exclude it and report the reason; otherwise include it.
|
|
75
|
-
|
|
76
|
-
## Synchronize and publish each cycle
|
|
77
|
-
|
|
78
|
-
Fetch the selected remote and configured branch once per publication cycle, without SSH overrides. Compute ahead/behind against `<selected remote>/<configured branch>`. When local is behind or diverged, apply the recorded bounded reconciliation strategy and continue after successful verification; stop only if it cannot be completed safely within the bounded repair cycles. Never reset or force.
|
|
79
|
-
|
|
80
|
-
Commits created during Task execution use `[CODEX|CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`: the effective executing-agent prefix followed by compact lineage.
|
|
81
|
-
|
|
82
|
-
- Codex: `[CODEX] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`
|
|
83
|
-
- Claude: `[CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`
|
|
84
|
-
|
|
85
|
-
The effective provider is exclusively `CODEX` or `CLAUDE`; `AUTO` is not part of a Task subject. P/S/T blocks are emitted only when their evidence exists; a Task with no PRD or SPEC uses `[Task-first:XXXX]`, and an unattributed functional commit uses `[CODEX] <functional title>` without `ZAIP-Task`. The subject remains ≤96 characters and only its title may truncate at a word boundary. Complete available PRD, SPEC, Task, Change, and Execution IDs remain in `ZAIP-*` trailers. An explicit deploy may create only its evidenced functional commits, without broad staging, force, destructive reset, or squashing.
|
|
86
|
-
|
|
87
|
-
Immediately before push, re-read the target with `node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --resolve-branch`. If it changed since preflight, restart validation and synchronization for the new target. Push once per publication cycle with the explicit configured refspec: `git push <remote> HEAD:refs/heads/<configured branch>`. Do not use a bare `git push` or infer a target from upstream. If there is no unpushed commit after the bounded reconciliation and functional-commit review, report a no-op.
|
|
88
|
-
|
|
89
|
-
- If push fails, treat it as terminal unless repository content caused a documented server-side rejection that can be repaired locally.
|
|
90
|
-
- Never switch keys, accounts, remotes, or transport, and never pass SSH/config overrides or force options.
|
|
91
|
-
|
|
92
|
-
## Verify and monitor GitHub checks
|
|
93
|
-
|
|
94
|
-
1. After every push, compare `git rev-parse HEAD` with one `git ls-remote <remote> refs/heads/<configured branch>` result.
|
|
95
|
-
2. Inspect required GitHub checks for that exact commit using an available authenticated GitHub CLI, API, connector, or browser session. Wait up to 20 minutes for terminal status and provide a concise progress update at least once per minute.
|
|
96
|
-
3. If all required checks pass, confirm the remote hash, commit title, SSH identity source, key path, and worktree status.
|
|
97
|
-
4. If a check fails, read the exact job and step logs before editing. Do not weaken or remove the check merely to obtain green status.
|
|
98
|
-
5. Repair the evidenced cause, complete lifecycle records, and start the next cycle under the same user authorization.
|
|
99
|
-
6. If checks cannot be observed, report the push as successful but CI as unconfirmed; never claim the deployment is fully validated.
|
|
100
|
-
|
|
101
|
-
## Success condition
|
|
102
|
-
|
|
103
|
-
Finish only when the local and remote hashes match, every required observable check is successful, and the intended worktree is clean. Otherwise report the exact terminal blocker and the repair cycles consumed.
|
|
69
|
+
Database request-branch PRs retain their separate policy. This Git-only skill never applies SQL, provisions paid resources or publishes database production. Read-only identities cannot substitute for deploy credentials.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
|
|
2
|
+
# Deploy and repair GitHub publication
|
|
3
|
+
|
|
4
|
+
The exact command “faça deploy” authorizes publication of everything versionable in the selected worktree, including tracked and untracked files, after the safety gates below. It does not authorize provider deployment.
|
|
5
|
+
|
|
6
|
+
Treat deploy as Git-only publication. An explicit current-turn request to `deploy`, `push`, `publicar`, `publicação` or GitHub publication selects this skill; it authorizes only the bounded Git publication described below, never a provider deployment or automatic publication.
|
|
7
|
+
|
|
8
|
+
## Authorization
|
|
9
|
+
|
|
10
|
+
- Require an explicit deploy, push, publicar, publicação, GitHub publication, or failed-deploy repair request in the current turn.
|
|
11
|
+
- The request authorizes the initial publication, automatic reconciliation needed to publish the selected branch, commits covering all versionable pending changes in the selected worktree, and up to five repair cycles needed to make required local and remote GitHub checks pass. Do not stop merely because the worktree is dirty, history is behind/diverged, generated files are pending, or a local gate has a repairable failure.
|
|
12
|
+
- Limit repairs to the intended repository state and the evidenced failure. Do not add unrelated features or broaden product scope.
|
|
13
|
+
- Never force push, rewrite history, replace remotes, change credentials or Git/SSH configuration, bypass checks, or deploy to another service.
|
|
14
|
+
- Do not create lifecycle artifacts for an explicit Git-only publication request. The deploy authorization permits staging every inventoried versionable path in the selected worktree after secret, size, and ignore checks; it never authorizes changes outside that worktree.
|
|
15
|
+
- Every product commit needs its evidenced Task and canonical Task title, including Task-first. If ownership is missing, materialize the authorized work before editing/committing; never borrow the latest global Task. Only records/local-only snapshots are exempt. Omit nonexistent PRD/SPEC lineage. Explicit deploy authorizes reviewed path staging, never force, destructive reset, history rewrite, or credential changes.
|
|
16
|
+
|
|
17
|
+
## Mandatory authorization record
|
|
18
|
+
|
|
19
|
+
Before the first Git mutation, retain a sanitized authorization record in the task's visible progress and terminal report. It must state:
|
|
20
|
+
|
|
21
|
+
1. the user's current-turn publication intent;
|
|
22
|
+
2. repository, remote, branch and selected worktree;
|
|
23
|
+
3. whether the grant is simple push or partitioned commit plus push;
|
|
24
|
+
4. the bounded history-reconciliation strategy (`rebase` by default, or user-selected `merge`);
|
|
25
|
+
5. allowed repair cycles, excluded worktrees/scopes and prohibited actions;
|
|
26
|
+
6. the preflight result and the recoverable preservation reference used before reconciliation.
|
|
27
|
+
|
|
28
|
+
For publication of existing commits, the conversation and terminal deploy report are the authority record; no artificial Task is needed. New product edits or commits require Task ownership under the workflow and commit policy. Never store credentials, private-key contents, tokens or environment values. Request only authority actually missing from the current request.
|
|
29
|
+
|
|
30
|
+
## Multiple worktrees and divergent history
|
|
31
|
+
|
|
32
|
+
1. Resolve the selected publishing worktree and inspect its `git status --porcelain`; use `git worktree list --porcelain` only to detect a path collision, never to scan every worktree.
|
|
33
|
+
2. Select exactly one publishing worktree. A clean worktree on another branch or a detached verification worktree does not join the deploy. The selected worktree is the complete publication scope.
|
|
34
|
+
3. Report a detected path collision, but do not block solely because the selected worktree is dirty or contains mixed changes; the explicit “faça deploy” authorization includes those changes. Stop only for an unresolved index conflict, secret/oversize file, authentication failure, or destructive/rewrite requirement.
|
|
35
|
+
4. Prunable or missing worktrees are reported but never pruned automatically. Dirty detached or temporary worktrees are never deleted, reset, stashed or copied into the publishing worktree implicitly.
|
|
36
|
+
5. Fetch once and compute ahead/behind for the publishing branch. If it is behind or diverged, automatically reconcile only the selected branch under this deploy authorization and continue; divergence is not a blocker by itself.
|
|
37
|
+
6. Before reconciliation, create a recoverable branch reference and preserve tracked plus untracked changes in a named stash. Verify both references before proceeding. Use `rebase` unless the user explicitly selected `merge`.
|
|
38
|
+
7. Apply the bounded reconciliation without force. Restore with `git stash apply`, retain the stash until publication succeeds, and resolve generated aggregate conflicts by regenerating them from canonical sources. For ordinary textual conflicts, combine both sides when safe; use the selected worktree's intended version only when the diff and commit history establish that it supersedes the remote version.
|
|
39
|
+
8. After restoration, prove that no unmerged paths remain, re-inventory the diff, and only then begin functional partitioning. Continue automatically through recoverable conflicts and pending repairs; stop only for a genuine terminal blocker defined below.
|
|
40
|
+
|
|
41
|
+
## Repair-loop integrity
|
|
42
|
+
|
|
43
|
+
- A publication cycle is: run deploy preflight, inventory the intended pending diff, synchronize, create any required functional commits with explicit pathspecs, push, and verify the remote hash. When no intended pending diff exists, publish already-formed commits. Run only gates required or evidenced by repository Rules, the active Change, or failed remote CI.
|
|
44
|
+
- Inventory the complete pending diff, run the safety gates, then stage the reviewed inventory with `git add -- <explicit-pathspecs>` and commit it. Generate pathspecs from the reviewed tracked and untracked inventory; do not use `git add -A`, broad globs, or paths outside the selected worktree. Do not require functional partitioning for this explicit broad-deploy mode.
|
|
45
|
+
- Run each diagnostic, gate, fetch, stage, commit, push, and hash verification at most once per cycle, except the single documented transient push retry below.
|
|
46
|
+
- Start a new cycle only after a repository change or new remote evidence. Never repeat an unchanged failing command hoping for a different result.
|
|
47
|
+
- Continue until all required checks pass or a terminal blocker occurs. Stop after five repair cycles, or when the same root cause remains after two repairs.
|
|
48
|
+
- Treat authentication, unavailable credentials, unresolved conflicts after bounded repair, secret exposure, destructive changes, GitHub outages, and ambiguous scope expansion as terminal blockers. Ordinary branch divergence, dirty state, untracked versionable files, generated projections, lint/format failures, and other repairable pending work are not blockers: repair them within the selected worktree and continue under the same authorization.
|
|
49
|
+
|
|
50
|
+
## Prove folder-scoped SSH first
|
|
51
|
+
|
|
52
|
+
From the repository root, read `.agents/config/project.yaml` immediately before deployment. `deploy.frontend.branch` and `deploy.backend.branch` are persistent authorization and may be `main`; pass their explicit `--scope`. `deploy.database.branch` is literal `beta`, never falls back to `main`, and requires `--scope database`. The internal `--scope framework` and a legacy preflight without `--scope` use `deploy.branch`, which must remain non-production. A malformed config is a terminal preflight failure. Preflight never creates, renames, or switches a branch.
|
|
53
|
+
|
|
54
|
+
For a database migration request, the database worktree may push only `HEAD:refs/heads/request/<id>` to open its PR against `beta`. That route never targets `main`, never applies SQL, and does not provision a beta branch or Supabase resource.
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
node .agents/skills/zaip-skill-github-deploy/scripts/preflight.mjs --repository . --remote origin
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The preflight must prove that the push URL uses SSH, no process override is active, the effective `core.sshCommand` comes from repository-local or matching folder configuration, its private key exists, Git identity exists, and `git ls-remote` succeeds.
|
|
61
|
+
|
|
62
|
+
Run preflight once at the start of the authorized deployment. Classify a failure before stopping: authentication, SSH configuration, unavailable authority, or an external access failure is a terminal blocker; an evidenced repository-content or missing-prerequisite failure within the authorized scope may be repaired in the bounded cycle and then rechecked. Do not edit Git/SSH configuration, use `git -c core.sshCommand=...`, set an environment override, or invoke `ssh -i` directly. Retain the sanitized result as evidence.
|
|
63
|
+
|
|
64
|
+
## Environment and access contract
|
|
65
|
+
|
|
66
|
+
- `READ-ONLY-BETA` and `READ-ONLY-PROD` are explicit query-only identities. They must have separate credentials and targets, remain unable to apply migrations, mutate backend data, change provider settings, or publish Git refs, and must never be substituted for a deploy credential.
|
|
67
|
+
- Database automation publishes only the literal `beta` branch through reviewed migration PRs. Backend follows `deploy.backend.branch`, including `main` when configured. Database production promotion remains a human GitHub merge after review and required checks.
|
|
68
|
+
- Frontend and site can publish their own validation builds from the configured validation branch. Their provider configuration remains project-owned and separate from production; this Git-only skill does not authorize a provider deployment.
|
|
69
|
+
- A central database repository is optional and configured by the consuming project. Do not infer a repository name, remote, service target, or credential from another repository.
|
|
70
|
+
|
|
71
|
+
## Validation budget
|
|
72
|
+
|
|
73
|
+
Guarded local framework preparation requires `full-v2` and its mandatory full gate.
|
|
74
|
+
The default legacy GitHub publisher accepts its separate exact-candidate qualification
|
|
75
|
+
receipt only after the remote full gate and TGZ matrix. Explicit administrator activation after signed full local qualification switches the
|
|
76
|
+
publisher to the verified local receipt. One read-only install smoke then gates npm;
|
|
77
|
+
no private-draft pilot is required. Activation is never implicit.
|
|
78
|
+
Follow [local preparation](../../zaip-skill-release-qualification/references/local-preparation.md)
|
|
79
|
+
for exact-candidate evidence, deadlines and rapid-preparation limits. Impact selection has
|
|
80
|
+
no test-count ceiling; rapid results are not release receipts. Preserve consumer policy
|
|
81
|
+
boundaries and reuse only valid matching evidence. On timeout, terminate the command tree,
|
|
82
|
+
retain the failed gate and repair its evidenced cause; never omit gates to obtain success.
|
|
83
|
+
|
|
84
|
+
## Review and validate
|
|
85
|
+
|
|
86
|
+
1. Snapshot `git status --short --branch`, file names, and the diff summary.
|
|
87
|
+
2. Inspect suspicious environment, key, certificate, state, or credential files without printing secret values. Block secrets and files at or above GitHub's 100 MB limit.
|
|
88
|
+
3. Reuse valid evidence for unchanged work. Run only gates required by repository Rules, the active Change, or the failed GitHub job.
|
|
89
|
+
- Turbo cache hits are valid only when the active work did not originate from a failed remote CI gate.
|
|
90
|
+
- When repairing failed CI, reproduce the exact failed gate once per repair cycle with Turbo cache bypassed when applicable.
|
|
91
|
+
4. If a local gate fails, capture the exact failing command and error, make the smallest authorized repair, update lifecycle evidence, and start the next cycle without asking for another deploy authorization.
|
|
92
|
+
5. After all required local gates pass, stage each reviewed selected-worktree path with `git add -- <explicit-pathspecs>`. If a file is secret, oversized, ignored by policy, or outside the selected worktree, exclude it and report the reason; otherwise include it.
|
|
93
|
+
|
|
94
|
+
## Consumer release preparation
|
|
95
|
+
|
|
96
|
+
Every authorized deploy must first compose `$zaip-skill-release-qualification` and use its guarded delivery entrypoint. Complete synchronization and commits before preparing the exact clean candidate. See [the executable preparation guide](../../zaip-skill-release-qualification/references/local-preparation.md). A prose review or an unsigned test result does not replace preparation.
|
|
97
|
+
|
|
98
|
+
For `zaip-ai/zaip-aios` framework releases, use `scripts/local-release-deploy.mjs`: it prepares and verifies the candidate, pushes the exact SHA to `main`, uploads the verified assets to a draft release, and publishes that release. npm publication remains exclusively in GitHub Actions. Run the folder-scoped SSH preflight with the explicitly configured frontend scope before this entrypoint.
|
|
99
|
+
|
|
100
|
+
After exact-candidate qualification, a missing GitHub Release is normal. Unless the request is explicitly push-only, use the configured entrypoint to create a draft for that SHA or resume a verified draft for the same SHA; do not recreate an existing Release. A published Release for the exact SHA is verified as a no-op, or its failed checks are repaired within the bounded cycle. An authentication or API error does not prove that a Release is absent.
|
|
101
|
+
|
|
102
|
+
For a consumer repository, bootstrap its own Ed25519 trust store and define `configured_branch`, GitHub version `vN.N`, and `required_commands` in its project policy. `prepare` runs only those policy commands and signs a receipt after the Git identity is unchanged before and after them. `verify` checks the configured branch, exact SHA/tree, policy digest and trusted key. `guarded-push` runs prepare and verify before its explicit push command; a failed required command, dirty checkout, changed SHA/policy, or unavailable key prevents that command from running. This consumer flow is GitHub-only: it has no npm channel, package manifest version, or TGZ contract.
|
|
103
|
+
|
|
104
|
+
## Synchronize and publish each cycle
|
|
105
|
+
|
|
106
|
+
Fetch the selected remote and configured branch once per publication cycle, without SSH overrides. Compute ahead/behind against `<selected remote>/<configured branch>`. When local is behind or diverged, apply the recorded bounded reconciliation strategy and continue after successful verification; stop only if it cannot be completed safely within the bounded repair cycles. Never reset or force.
|
|
107
|
+
|
|
108
|
+
Commits created during Task execution use `[CODEX|CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`: the effective executing-agent prefix followed by compact lineage.
|
|
109
|
+
|
|
110
|
+
- Codex: `[CODEX] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`
|
|
111
|
+
- Claude: `[CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`
|
|
112
|
+
|
|
113
|
+
The effective provider is `CODEX` or `CLAUDE`. P/S/T blocks require evidence; standalone Tasks use `[Task-first:XXXX]` followed by their canonical title. The subject remains ≤96 characters with title truncation at word boundaries; full IDs remain in `ZAIP-*` trailers. All product commits require a real Task, matching causal records and write scopes. Only `.agents/records/**` and `.local/**` changes are exempt; conversation capture does not authorize commits. Run `commit validate` and preserve the installed `commit-msg` hook. See `docs/task-commit-policy.md`. Explicit deploy never authorizes broad staging, force, destructive reset or squashing.
|
|
114
|
+
|
|
115
|
+
Immediately before delivery, re-read the configured target with preflight and the explicit scope. If it changed, restart preparation for the new target. Consumer frontend/backend publication must use `consumer-release-preparation.mjs guarded-push`; framework publication must use `scripts/local-release-deploy.mjs`. These entrypoints bind preparation to the exact SHA and explicit branch refspec. Do not bypass them with a manual push. The separately authorized database request-branch PR route retains its database-specific gates and is outside these release helpers. A default deploy completes the Release flow; only an explicit push-only request stops after the push. If there is no unpushed commit or pending release after reconciliation and review, report a no-op.
|
|
116
|
+
|
|
117
|
+
- If a push result is uncertain, read the remote state before acting. Reconcile a non-fast-forward through the existing bounded policy; retry one documented transient server or transport failure per cycle. Authentication, authorization, configuration, or other external-access failures are terminal blockers.
|
|
118
|
+
- Never switch keys, accounts, remotes, or transport, and never pass SSH/config overrides or force options.
|
|
119
|
+
|
|
120
|
+
## Verify and monitor GitHub checks
|
|
121
|
+
|
|
122
|
+
1. After every push, compare `git rev-parse HEAD` with one `git ls-remote <remote> refs/heads/<configured branch>` result.
|
|
123
|
+
2. Inspect required GitHub checks for that exact commit using an available authenticated GitHub CLI, API, connector, or browser session. Wait up to 20 minutes for terminal status and provide a concise progress update at least once per minute.
|
|
124
|
+
3. If all required checks pass, confirm the remote hash, commit title, SSH identity source, key path, and worktree status.
|
|
125
|
+
4. If a check fails, read the exact job and step logs before editing. Do not weaken or remove the check merely to obtain green status.
|
|
126
|
+
5. Repair the evidenced cause, complete lifecycle records, and start the next cycle under the same user authorization.
|
|
127
|
+
6. If checks cannot be observed, report the push as successful but CI as unconfirmed; never claim the deployment is fully validated.
|
|
128
|
+
|
|
129
|
+
## Release identity
|
|
130
|
+
|
|
131
|
+
Unless the request is push-only, resolve the release identity before mutation using the verified candidate SHA and tag list. Follow [the release identity contract](release-identity.md): consumer GitHub releases stay independent; framework `vN.N` maps to package `N.N.0`, and only qualified GitHub Actions can publish `@zaip-ai/cli` to npm.
|
|
132
|
+
|
|
133
|
+
## Success condition
|
|
134
|
+
|
|
135
|
+
Finish only when the local and remote hashes match, every required observable check is successful, and the intended worktree is clean. Otherwise report the exact terminal blocker and the repair cycles consumed.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Configure GitHub-only validation once
|
|
2
|
+
|
|
3
|
+
Run from the consumer project's root after selecting its actual validation commands:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
node .agents/skills/zaip-skill-github-deploy/scripts/install-github-readiness-workflow.mjs --repository owner/repo --checks-json '["validate"]' --commands-json '["npm run lint","npm test","npm run build"]'
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Use only commands the project defines. The generated workflow has one aggregate job named by the single `--checks-json` entry; all commands must succeed. Do not list step names as required jobs. Existing custom workflows may have multiple required jobs and can use the readiness command without running setup.
|
|
10
|
+
|
|
11
|
+
Setup detects `package-lock.json` or `pnpm-lock.yaml`, pins Node 22 by default, configures the matching dependency cache, installs dependencies once, then runs the selected commands. Override the application's runtime with `--node-version 24` when appropriate. pnpm uses the exact version in `package.json#packageManager`, or an explicit `--pnpm-version N.N.N`. Multiple lockfiles require an explicit `--package-manager npm|pnpm`.
|
|
12
|
+
|
|
13
|
+
For another stack, use `--package-manager none` and supply its environment setup and validation commands. This mode adds no Node dependency setup or cache. Node projects without lockfiles require explicit custom setup instead of a guessed installation command.
|
|
14
|
+
|
|
15
|
+
The default destination is `.github/workflows/zaip-github-release.yml`. A custom `--output` must stay inside this project's `.github/workflows`. Identical reruns return `changed: false`; a different existing file, symlink or symlinked parent is refused. Review the generated diff and commit it with the lockfile. npm installation of ZAIP only distributes these helpers; it never rewrites a project's workflows automatically.
|
|
16
|
+
|
|
17
|
+
# Deploy using the completed checks
|
|
18
|
+
|
|
19
|
+
The workflow runs on push, pull request or manual dispatch, uses read-only repository permission and cancels obsolete checks for the same ref. It does not create a release or publish npm packages.
|
|
20
|
+
|
|
21
|
+
After it completes, query GitHub from outside that workflow:
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
node .agents/skills/zaip-skill-github-deploy/scripts/github-readiness.mjs --repository owner/repo --sha <exact-40-character-sha> --checks-json '["validate"]'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Provide `GITHUB_TOKEN` through the environment with repository/Actions read access. Never put credentials in the command, generated file or logs. If using an existing custom workflow, also pass `--workflow-path .github/workflows/custom.yml` and its actual required job names.
|
|
28
|
+
|
|
29
|
+
The command queries the latest matching run and its exact attempt's jobs, including additional pages. It emits JSON and exits nonzero when required evidence is missing, pending, failed or belongs to another origin. Do not put this command inside the same workflow it waits to complete.
|
|
30
|
+
|
|
31
|
+
Only after readiness succeeds, use `resolve-release-identity.mjs` and the skill's guarded GitHub Release flow: initial `v1.0`, numeric minor increments, exact tag/SHA binding and validation prerelease metadata. Reuse matching evidence and tags on retry; changes to the candidate require new checks. This process does not publish npm packages.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Release gate retention matrix
|
|
2
|
+
|
|
3
|
+
| Gate | Qualification location | Publication cost |
|
|
4
|
+
|---|---|---|
|
|
5
|
+
| Architecture, CQRS, modules, profile, skills, tools, encoding, source size, lint, types and contracts | `prepare-and-qualify`: `validate:github:prepared` | None; reuse successful run for the same SHA |
|
|
6
|
+
| Dashboard and Design workspace unit tests | `validate:github:prepared`, separately from package coverage | None |
|
|
7
|
+
| `packages/**` unit coverage and ratchet | `create-coverage-qualification.mjs`, once | None |
|
|
8
|
+
| Public CLI units, integration and installer profiles | `test:qualification:prepared` | None |
|
|
9
|
+
| Release cleanroom, rollback, supply chain and client contracts | `test:release-e2e:prepared` and source validation | None |
|
|
10
|
+
| Production dependency audit | `pnpm audit --prod --audit-level high` | None |
|
|
11
|
+
| Dashboard and Design browser checks | Dashboard E2E workspace | None |
|
|
12
|
+
| Linux, Windows and macOS Node 22; Linux Node 24 | `exact-tgz-smoke`, SHA-256 checked TGZ, install and doctor | None |
|
|
13
|
+
| Literal consumer record identity through SQLite, API and UI | `consumer-identity --tarball` with the same TGZ | None |
|
|
14
|
+
| Package build, template sync and pack | Prepared once before artifact fan-out | No build or pack |
|
|
15
|
+
| Repository, workflow, SHA, latest run attempt, policy, expiration and artifact digests | Receipt created after all gates; GitHub API checked again by publisher | Small verification steps |
|
|
16
|
+
| GitHub release tag and npm registry integrity | `publish-cli.yml` | Required publication checks plus exact registry-version smoke |
|
|
17
|
+
|
|
18
|
+
`qualify-cli.yml` starts automatically on pushes to the configured validation or human-promoted production branch. A manual dispatch requires that branch head to equal the input SHA. A changed SHA requires a new qualification. Workflow run IDs and attempts identify evidence; a local receipt alone is never authority.
|
|
19
|
+
|
|
20
|
+
Publication uses an unexpired successful qualification (maximum seven days). It downloads the qualified artifact; it never invokes `release:artifacts`, `npm pack`, coverage, browser qualification or a broad agent review. Missing, altered, expired or failed qualification blocks publication.
|
|
21
|
+
|
|
22
|
+
A GitHub prerelease publishes to `beta`; a production Release after human promotion publishes to `latest`. Only the framework release workflow publishes npm. Consumer installations receive the single GitHub skill and its GitHub-only setup helpers.
|
|
23
|
+
|
|
24
|
+
Measure qualification and publication separately in GitHub Actions after rollout. No wall-clock improvement is claimed from local tests alone.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Release identity contract
|
|
2
|
+
|
|
3
|
+
Use the helper before a GitHub Release decision. It accepts a verified candidate SHA and either a verified tag list or an explicit canonical product version:
|
|
4
|
+
|
|
5
|
+
```powershell
|
|
6
|
+
node .agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.mjs --sha <sha> --channel <validation|production> --tags-json <verified-json>
|
|
7
|
+
node .agents/skills/zaip-skill-github-deploy/scripts/resolve-release-identity.mjs --sha <sha> --channel <validation|production> --version <N.N>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
- Product tags use canonical `vN.N`: begin at `v1.0`, increment the numeric minor by default, and change major only on an explicit request. The helper selects the numeric maximum across verified tags, including prereleases.
|
|
11
|
+
- A retry may reuse a tag only when it belongs to the exact candidate SHA. Never move, delete, or recreate a tag.
|
|
12
|
+
- Create a validation release only after preparing and validating the reviewed Markdown body required by the [release-notes contract](release-notes.md): `gh release create <tag> --repo <owner/repo> --target <sha> --title <title> --notes-file <reviewed-notes.md> --prerelease --latest=false`. Never use `--generate-notes`; a compare link alone does not describe a release. Read the published body back with `gh release view <tag> --repo <owner/repo> --json body` and validate it against the same inventory before declaring success. Production is human-promoted, has a new SHA, and must qualify and version again.
|
|
13
|
+
- Record the product version, tag, exact SHA, channel, prerelease flag, and GitHub Release URL. GitHub checks, registry integrity, smoke, and lifecycle closure remain separate evidence.
|
|
14
|
+
|
|
15
|
+
## Deterministic recovery
|
|
16
|
+
|
|
17
|
+
Resolve the candidate identity before any release mutation. A missing Release after exact-candidate qualification is normal: for a default deploy, create a new draft for the candidate SHA or resume an existing verified draft for that SHA. A published Release on that exact SHA must be verified as a no-op; retry only its observed failed CI within the bounded repair policy, never recreate the Release.
|
|
18
|
+
|
|
19
|
+
If the intended tag resolves to another SHA, never move, delete, or recreate it. For a consumer, select the next allowed minor under its release policy, then prepare its new exact candidate. For the framework, select the next allowed minor, update all required package manifests, commit the version change, and prepare and qualify the resulting candidate on its configured release branch. A changed candidate never inherits its predecessor's qualification.
|
|
20
|
+
|
|
21
|
+
For a missing or expired receipt, use the candidate's configured preparation mechanism: a consumer runs its existing local `prepare` and `verify`; the framework uses its local release helper and receipt; a legacy remote qualification workflow runs only where the configured pipeline requires it, on the exact candidate SHA, branch, and channel. Observe a pending run; repair an observed failure under the existing limit of five cycles, stopping when the same cause remains after two repairs. Authentication, authorization, transport, or API failures do not establish that a Release, tag, receipt, or workflow run is absent; report them as access blockers. Keep exact-SHA readiness gates, protected trust rules, and human-only production promotion intact. A push-only request creates no Release; otherwise the deploy completes the Release flow.
|
|
22
|
+
|
|
23
|
+
For a first release, prepare the missing local notes and inventory in initial mode and validate them with `--initial`; absence of a prior tag is not a blocker.
|
|
24
|
+
|
|
25
|
+
## Framework package contract
|
|
26
|
+
|
|
27
|
+
Consumer repositories remain GitHub-only and independent. Recognize the framework source only when the approved `origin` is `zaip-ai/zaip-aios`, the root package is `@zaip-ai/aios` and `public-cli/packages/cli/package.json` identifies `@zaip-ai/cli`. Read the versions from the root, `public-cli/package.json` and CLI package manifests; require the same canonical `N.N.0` version, then call the helper with explicit `--version N.N`. Never allocate an independent GitHub version in this repository. A version change must update the declared package metadata before the candidate is committed and qualified; do not replace version strings broadly.
|
|
28
|
+
|
|
29
|
+
Publishing a GitHub Release in this framework triggers its npm workflow. Report this consequence in the GitHub publication scope and follow the configured pipeline through terminal status; no second npm skill or local publication step is needed. A push-only request does not create a Release or publish npm. A successful GitHub Release with failed/unobserved npm checks is a partial result.
|
|
30
|
+
|
|
31
|
+
`qualify-cli.yml` runs on pushes to the configured validation (`beta` npm channel) and human-promoted
|
|
32
|
+
production (`latest` npm channel) branches. It qualifies the exact SHA and uploads one tested TGZ plus
|
|
33
|
+
a receipt. Other branch pushes do not qualify a release. For an authorized manual qualification retry,
|
|
34
|
+
dispatch that workflow on the candidate's configured branch with its exact current head `sha` and
|
|
35
|
+
matching `npm_channel`. Qualification is read-only; it does not publish npm or create a Release.
|
|
36
|
+
|
|
37
|
+
Before creating or resuming a draft Release, require the installed `github-readiness.mjs` command with `--repository zaip-ai/zaip-aios --sha <sha> --branch <configured-release-branch> --workflow-path .github/workflows/qualify-cli.yml --checks-json '["receipt"]'` to report ready.
|
|
38
|
+
The publisher independently checks the latest qualifying run and attempt, workflow path, repository,
|
|
39
|
+
SHA, channel, receipt lifetime and artifact digests. It waits for a pending qualification, refuses a
|
|
40
|
+
failed or missing one, and consumes the approved TGZ without repeating source tests or builds.
|
|
41
|
+
Receipts expire after seven days; a changed candidate requires new qualification. Preserve required
|
|
42
|
+
GitHub checks and investigate their failures, rather than replacing passing evidence with another AI review.
|
|
43
|
+
|
|
44
|
+
Only the qualified GitHub Actions workflow may publish `@zaip-ai/cli` to npm. Never run `npm publish`, `pnpm publish`, or an equivalent local publication command. The workflow must bind the publication to the exact qualified SHA, tag, package version, and artifact digest.
|