@zaip-ai/cli 4.5.0 → 4.7.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 +2 -0
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.d.ts.map +1 -1
- package/dist/services/adapters.js +6 -6
- package/dist/services/adapters.js.map +1 -1
- package/dist/services/codex-config-overlay.d.ts.map +1 -1
- package/dist/services/codex-config-overlay.js +27 -10
- package/dist/services/codex-config-overlay.js.map +1 -1
- package/dist/services/codex-native-tool-authority-template.d.ts.map +1 -1
- package/dist/services/codex-native-tool-authority-template.js +188 -9
- package/dist/services/codex-native-tool-authority-template.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 +50 -128
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.test.js +4 -0
- package/dist/services/codex-pre-tool-hook-template.test.js.map +1 -1
- package/dist/services/codex-pre-tool-support-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-support-template.js +1 -4
- package/dist/services/codex-pre-tool-support-template.js.map +1 -1
- package/dist/services/codex-stale-git-lock-template.d.ts +2 -0
- package/dist/services/codex-stale-git-lock-template.d.ts.map +1 -0
- package/dist/services/codex-stale-git-lock-template.js +64 -0
- package/dist/services/codex-stale-git-lock-template.js.map +1 -0
- package/dist/services/global-codex-config-migration.test.js +1 -4
- package/dist/services/global-codex-config-migration.test.js.map +1 -1
- package/dist/services/global-codex-config.d.ts.map +1 -1
- package/dist/services/global-codex-config.js +2 -1
- package/dist/services/global-codex-config.js.map +1 -1
- package/dist/services/global-codex-config.test.js +3 -1
- package/dist/services/global-codex-config.test.js.map +1 -1
- package/dist/services/hook-readiness.d.ts.map +1 -1
- package/dist/services/hook-readiness.js.map +1 -1
- package/dist/services/install-agents-template.js +2 -2
- package/dist/services/install-agents-template.js.map +1 -1
- package/dist/services/install-template-policy.d.ts.map +1 -1
- package/dist/services/install-template-policy.js +2 -0
- package/dist/services/install-template-policy.js.map +1 -1
- package/dist/services/logger.d.ts +1 -1
- package/dist/services/logger.d.ts.map +1 -1
- package/dist/services/logger.js +2 -1
- package/dist/services/logger.js.map +1 -1
- package/dist/services/logger.test.js +77 -0
- package/dist/services/logger.test.js.map +1 -1
- package/dist/services/runtime-template-integrity.test.d.ts +2 -0
- package/dist/services/runtime-template-integrity.test.d.ts.map +1 -0
- package/dist/services/runtime-template-integrity.test.js +26 -0
- package/dist/services/runtime-template-integrity.test.js.map +1 -0
- package/dist/services/runtime-template-test-support.d.ts +3 -0
- package/dist/services/runtime-template-test-support.d.ts.map +1 -0
- package/dist/services/runtime-template-test-support.js +32 -0
- package/dist/services/runtime-template-test-support.js.map +1 -0
- package/dist/services/runtime-template.test.js +37 -48
- package/dist/services/runtime-template.test.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README.md +8 -0
- package/templates/.agents/config/agents/discovery.json +1 -1
- package/templates/.agents/config/deploy-policy.json +5 -0
- package/templates/.agents/dashboard/.zaip-managed.json +235 -83
- package/templates/.agents/dashboard/README.md +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{CostCalculationGuidePage-f4ZGJRg3.js → CostCalculationGuidePage-OUjdwEcM.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-CkQ_y8kg.js → DashboardHelpDialog-Cei1ChjE.js} +99 -10
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{PricingSettingsDialog-v9zGRTlk.js → PricingSettingsDialog-_woNCrTT.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-doIMhei7.js → ProjectSettingsPage-B2_7MVOP.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-C_4ftjyB.js → TraceabilityWorkspace-C_jCsSZe.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-C8zQDBT7.js +68 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{icons-vendor-Cv3WBFIF.js → icons-vendor-iMPXot7Y.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DZhppOIk.css +1 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-DiCwz0sr.js +2 -0
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{react-vendor-mHgsmxb6.js → react-vendor-721Re3Ss.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{traceability-B0CPyEVq.js → traceability-BjdTkWS0.js} +1 -1
- 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/AppOverlays.tsx +6 -34
- package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.dom.test.ts +130 -0
- package/templates/.agents/dashboard/apps/frontend/src/ReconciliationFeedback.tsx +226 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api-sqlite-view.ts +45 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.test.ts +15 -0
- package/templates/.agents/dashboard/apps/frontend/src/dashboard-api.ts +17 -46
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-fixtures.ts +23 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-model.test.ts +69 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback-model.ts +59 -0
- package/templates/.agents/dashboard/apps/frontend/src/reconciliation-feedback.css +131 -0
- package/templates/.agents/dashboard/apps/frontend/src/styles.css +0 -32
- package/templates/.agents/dashboard/apps/frontend/src/use-dashboard-app-model.tsx +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.test.ts +2 -2
- package/templates/.agents/dashboard/modules/cost-monitor/src/react/CostMonitorPage.tsx +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.macro-metrics.test.ts +7 -2
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsOverview.tsx +6 -6
- package/templates/.agents/dashboard/modules/operations/src/react/OperationsPage.tsx +1 -4
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.navigation.test.ts +236 -0
- package/templates/.agents/dashboard/modules/operations/src/react/UnifiedWorkBoard.tsx +1 -24
- package/templates/.agents/dashboard/modules/operations/src/react/operations-overview-period-filter.test.ts +3 -2
- package/templates/.agents/dashboard/modules/operations/src/react/overview-duration-hint.ts +14 -0
- 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/contracts/package.json +1 -1
- package/templates/.agents/dashboard/packages/data-export/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/DIAGNOSTICS.md +42 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.d.mts +10 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.mjs +101 -0
- package/templates/.agents/dashboard/packages/local-runtime/dashboard-diagnostics.test.mjs +58 -0
- package/templates/.agents/dashboard/packages/local-runtime/dist/server.cjs +318 -236
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +285 -205
- package/templates/.agents/dashboard/packages/local-runtime/package.json +1 -1
- package/templates/.agents/dashboard/packages/local-runtime/scripts/test-sqlite-dashboard-startup.mjs +233 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/validate-provider-nonzero.mjs +45 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-executable-startup.mjs +107 -0
- package/templates/.agents/dashboard/packages/local-runtime/scripts/verify-dashboard-reconciliation-executable.mjs +271 -0
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +318 -236
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +78 -12
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +36 -56
- package/templates/.agents/dashboard/packages/local-runtime/src/canonical-source-revision-cache.test.ts +125 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/canonical-source-revision-cache.ts +168 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/dashboard-diagnostics.test.ts +57 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-agent-catalog-routes.ts +76 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-dual-reads-manifest-summaries-without-losing.test.ts +5 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-diagnostics.test.ts +118 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-result.test.ts +35 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/server-reconciliation-route.ts +105 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.test.ts +64 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/server-snapshot-synchronization.ts +19 -27
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-command.test.ts +111 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-refresh.test.ts +59 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-telemetry-refresh.ts +44 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.test.ts +20 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/server-work-reconciliation.ts +12 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/server-workspace.ts +48 -6
- package/templates/.agents/dashboard/packages/local-runtime/src/server.test.ts +2 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +126 -134
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-agent-page.ts +14 -2
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-cost-summary-elapsed.ts +107 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-dashboard-startup.test.ts +163 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-dashboard-startup.ts +78 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-header-timestamp.test.ts +31 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-nonzero.test.ts +271 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-provider-visibility.ts +32 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-operations-duration.ts +58 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-provider-dimension.ts +12 -3
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-summary.ts +41 -54
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-query-view-page.ts +9 -58
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-canonical.ts +7 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-counts-every-root-execution-day-returns.test.ts +5 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-multi-provider.test.ts +4 -4
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-rebuild.ts +9 -35
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-schema.ts +13 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model-source-fingerprint.ts +43 -45
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.test.ts +5 -9
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-read-model.ts +5 -1
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-base-views.ts +9 -7
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-schema-dashboard-views.ts +10 -8
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-spec-root-elapsed-view.ts +61 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-spec-root-elapsed.test.ts +210 -0
- package/templates/.agents/dashboard/packages/local-runtime/src/sqlite-startup-seed.test.ts +87 -0
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-logging.mjs +6 -2
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard-server.mjs +7 -1
- package/templates/.agents/dashboard/packages/local-runtime/start-dashboard.mjs +4 -5
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.test.mjs +33 -4
- package/templates/.agents/dashboard/packages/ui/src/DashboardHeader.tsx +8 -7
- package/templates/.agents/dashboard/packages/windows-launcher/Program.cs +46 -3
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/qualify-kanban-popup.mjs +56 -0
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard-update-label.spec.ts +49 -0
- package/templates/.agents/design/.zaip-managed.json +17 -5
- package/templates/.agents/design/apps/catalog/dist/assets/index-D3uhpycC.js +72 -0
- package/templates/.agents/design/apps/catalog/dist/index.html +1 -1
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/apps/catalog/src/pages/ComponentsPage.tsx +13 -1
- package/templates/.agents/design/apps/catalog/src/specimens/ReconciliationSpecimen.stories.tsx +6 -0
- package/templates/.agents/design/apps/catalog/src/specimens/ReconciliationSpecimen.tsx +101 -0
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +1 -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 +1 -1
- 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 +21 -6
- package/templates/.agents/requirements/public-distribution.md +4 -4
- 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 +1 -1
- package/templates/.agents/requirements/zaip-strategic-95.md +1 -1
- package/templates/.agents/rules/core.md +3 -1
- package/templates/.agents/rules/workflow.md +3 -2
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +368 -199
- package/templates/.agents/runtime/checksums.sha256 +5 -5
- package/templates/.agents/runtime/manifest.json +1 -1
- package/templates/.agents/runtime/provenance.json +4 -4
- package/templates/.agents/runtime/sbom.cdx.json +1 -1
- package/templates/.agents/skills/zaip-skill-config/SKILL.md +25 -3
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-execution/references/autonomous-continuation.md +4 -0
- package/templates/.agents/skills/zaip-skill-execution/references/candidate-workflow.md +1 -1
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +2 -2
- package/templates/.agents/skills/zaip-skill-general-operations/SKILL.md +1 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +38 -48
- package/templates/.agents/skills/zaip-skill-github-deploy/agents/openai.yaml +2 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/references/deployment-workflow.md +67 -99
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-identity.md +33 -30
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +307 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs +337 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +41 -28
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/guarded-commits.mjs +212 -0
- package/templates/.agents/skills/zaip-skill-lifecycle-closure/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +46 -68
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +100 -44
- package/templates/.agents/skills/zaip-skill-send-email/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-send-email/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-setup/SKILL.md +5 -2
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-task/SKILL.md +4 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +19 -0
- package/templates/.agents/skills/zaip-skill-tool-setup/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/SKILL.md +15 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/agents/openai.yaml +4 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/scripts/connector-guidance.test.mjs +29 -0
- package/templates/.agents/skills/zaip-skill-use-connectors/scripts/verify-connector-lock.mjs +30 -0
- package/templates/.agents/tools/cloud-runner.integration.test.mjs +3 -0
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/03-tasks.md +6 -0
- package/templates/.agents/zaip-aios/guides/04-specs.md +6 -0
- package/templates/.agents/zaip-aios/guides/05-prds.md +4 -0
- package/templates/.agents/zaip-aios/guides/06-execucao.md +6 -0
- package/templates/.agents/zaip-aios/guides/16-lifecycle-e-reconciliacao.md +6 -0
- package/templates/.agents/zaip-aios/guides/19-assurance-e-autonomia.md +4 -0
- package/templates/.agents/zaip-aios/guides/22-fluxos-e-roteamento.md +6 -0
- package/templates/.agents/zaip-aios/guides/23-orquestracao-de-modelos.md +36 -4
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +15 -4
- package/templates/.agents/zaip-aios/guides/28-lifecycle-completo.md +8 -0
- package/templates/template-manifest.json +354 -150
- package/templates/.agents/dashboard/apps/frontend/dist/assets/cost-monitor-D7PrDZy9.js +0 -68
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-OBJXZOwe.css +0 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/index-Rbmpz4UO.js +0 -2
package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs
CHANGED
|
@@ -16,6 +16,9 @@ const managedDeployFiles = [
|
|
|
16
16
|
"skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs",
|
|
17
17
|
"skills/zaip-skill-github-deploy/scripts/preflight.mjs",
|
|
18
18
|
"skills/zaip-skill-github-deploy/scripts/preflight.test.mjs",
|
|
19
|
+
"skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs",
|
|
20
|
+
"skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs",
|
|
21
|
+
"skills/zaip-skill-github-deploy/scripts/guarded-commits.mjs",
|
|
19
22
|
];
|
|
20
23
|
|
|
21
24
|
test("framework lock matches the deploy guidance and executable contract", async () => {
|
|
@@ -41,11 +44,14 @@ test("explicit Git publication verbs select the guarded deploy skill", async ()
|
|
|
41
44
|
readFile(resolve(skillRoot, "agents", "openai.yaml"), "utf8"),
|
|
42
45
|
readFile(resolve(root, "rules", "core.md"), "utf8"),
|
|
43
46
|
]);
|
|
44
|
-
assert.match(skill, /
|
|
45
|
-
assert.match(
|
|
47
|
+
assert.match(skill, /affirmative request to deploy, push, publish to GitHub/);
|
|
48
|
+
assert.match(
|
|
49
|
+
skill,
|
|
50
|
+
/Discussing, quoting, editing or negating a release is not publication authority/,
|
|
51
|
+
);
|
|
46
52
|
assert.doesNotMatch(skill, /standing automatic deployment|activate it automatically/);
|
|
47
53
|
assert.match(openai, /\$zaip-skill-github-deploy/);
|
|
48
|
-
assert.match(openai, /
|
|
54
|
+
assert.match(openai, /deploy solicitado pela política do projeto/);
|
|
49
55
|
assert.match(core, /seleciona/);
|
|
50
56
|
});
|
|
51
57
|
|
|
@@ -55,13 +61,16 @@ test("deploy guidance preserves canonical Task identity and builder-versus-consu
|
|
|
55
61
|
readFile(resolve(root, "rules", "workflow.md"), "utf8"),
|
|
56
62
|
]);
|
|
57
63
|
assert.ok(skill.includes("[CODEX|CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>"));
|
|
58
|
-
assert.match(skill,
|
|
59
|
-
assert.match(skill, /
|
|
64
|
+
assert.match(skill, /\[CODEX\|CLAUDE\]/);
|
|
65
|
+
assert.match(skill, /consumers create only their GitHub Release under their own checks/);
|
|
60
66
|
assert.match(
|
|
61
67
|
skill,
|
|
62
|
-
|
|
68
|
+
/verified builder means Release plus npm through Actions; a consumer means commits plus push/,
|
|
69
|
+
);
|
|
70
|
+
assert.match(
|
|
71
|
+
workflow,
|
|
72
|
+
/Preserve trabalho\/index concorrentes e causalidade de todos os commits publicados/,
|
|
63
73
|
);
|
|
64
|
-
assert.match(workflow, /commitar o diff evidenciado com pathspecs explícitos/);
|
|
65
74
|
});
|
|
66
75
|
|
|
67
76
|
test("framework deploy follows Release-triggered npm publication without claiming partial success", async () => {
|
|
@@ -78,22 +87,25 @@ test("framework deploy follows Release-triggered npm publication without claimin
|
|
|
78
87
|
assert.match(publishWorkflow, /release:\s*\n\s*types: \[published\]/);
|
|
79
88
|
assert.match(publishWorkflow, /npm publish /);
|
|
80
89
|
}
|
|
81
|
-
assert.match(skill, /publish-cli\.yml.*registry
|
|
82
|
-
assert.match(skill, /
|
|
83
|
-
assert.match(
|
|
90
|
+
assert.match(skill, /publish-cli\.yml.*registry version, dist-tag and integrity/s);
|
|
91
|
+
assert.match(skill, /Release with failed or unobserved npm is partial/);
|
|
92
|
+
assert.match(
|
|
93
|
+
skill,
|
|
94
|
+
/Do not enter release qualification, change a version or create a Release merely for this mode/,
|
|
95
|
+
);
|
|
84
96
|
assert.match(
|
|
85
97
|
workflow,
|
|
86
98
|
/private Ed25519 release key is distinct from the Git SSH key and a local `\.env` npm token/,
|
|
87
99
|
);
|
|
88
|
-
assert.match(
|
|
100
|
+
assert.match(skill, /Release with failed or unobserved npm is partial/);
|
|
89
101
|
});
|
|
90
102
|
|
|
91
|
-
test("
|
|
103
|
+
test("generic deploy scopes current work; all-worktree needs an explicit request", async () => {
|
|
92
104
|
const skill = await readFile(resolve(skillRoot, "SKILL.md"), "utf8");
|
|
93
|
-
assert.match(skill, /
|
|
94
|
-
assert.match(skill, /`
|
|
95
|
-
assert.match(skill, /
|
|
96
|
-
assert.match(skill, /
|
|
105
|
+
assert.match(skill, /Default scope is `current-work`/);
|
|
106
|
+
assert.match(skill, /`all-worktree` requires explicit “deploy de tudo”/);
|
|
107
|
+
assert.match(skill, /never `git add -A`/);
|
|
108
|
+
assert.match(skill, /Integrity, authentication, destructive operations/);
|
|
97
109
|
});
|
|
98
110
|
|
|
99
111
|
test("deploy permission and reconciliation remain explicit and recoverable", async () => {
|
|
@@ -101,20 +113,21 @@ test("deploy permission and reconciliation remain explicit and recoverable", asy
|
|
|
101
113
|
readFile(resolve(skillRoot, "SKILL.md"), "utf8"),
|
|
102
114
|
readFile(resolve(skillRoot, "agents", "openai.yaml"), "utf8"),
|
|
103
115
|
]);
|
|
104
|
-
assert.match(skill, /
|
|
105
|
-
assert.match(skill, /
|
|
106
|
-
assert.match(skill, /
|
|
107
|
-
assert.match(skill, /
|
|
108
|
-
assert.match(skill, /
|
|
109
|
-
assert.match(skill, /
|
|
110
|
-
assert.match(skill, /configured deploy branch is the remote target/);
|
|
116
|
+
assert.match(skill, /Record sanitized intent, resolved mode\/scope, selected checkout/);
|
|
117
|
+
assert.match(skill, /source SHA\/branch, configured remote target/);
|
|
118
|
+
assert.match(skill, /verified recovery ref and named stash/);
|
|
119
|
+
assert.match(skill, /Restore with `stash apply`/);
|
|
120
|
+
assert.match(skill, /Source recovery branches and detached HEAD are valid candidates/);
|
|
121
|
+
assert.match(skill, /configured branch is only the remote target/);
|
|
111
122
|
assert.match(openai, /\$zaip-skill-github-deploy/);
|
|
112
|
-
assert.match(openai, /builder
|
|
123
|
+
assert.match(openai, /npm via Actions somente em release do builder verificado/);
|
|
113
124
|
});
|
|
114
125
|
|
|
115
126
|
test("workflow retains the explicit publication routing contract", async () => {
|
|
116
127
|
const workflow = await readFile(resolve(root, "rules", "workflow.md"), "utf8");
|
|
117
|
-
assert.match(workflow,
|
|
128
|
+
assert.match(workflow, /\$zaip-skill-github-deploy/);
|
|
129
|
+
assert.match(workflow, /deploy-policy\.json/);
|
|
130
|
+
assert.match(workflow, /current-work/);
|
|
118
131
|
});
|
|
119
132
|
|
|
120
133
|
test("release guidance requires reviewed categorized notes and published-body readback", async () => {
|
|
@@ -124,9 +137,9 @@ test("release guidance requires reviewed categorized notes and published-body re
|
|
|
124
137
|
readFile(resolve(skillRoot, "references", "release-notes.md"), "utf8"),
|
|
125
138
|
readFile(resolve(skillRoot, "scripts", "validate-release-notes.mjs"), "utf8"),
|
|
126
139
|
]);
|
|
127
|
-
assert.match(skill, /
|
|
128
|
-
assert.match(identity,
|
|
129
|
-
assert.match(identity,
|
|
140
|
+
assert.match(skill, /never use generated notes alone/);
|
|
141
|
+
assert.match(identity, /reviewed UTF-8 notes file/);
|
|
142
|
+
assert.match(identity, /read back the body byte-for-byte/);
|
|
130
143
|
assert.match(notes, /exact previous Release tag/);
|
|
131
144
|
assert.match(notes, /Novidades \(feat\)/);
|
|
132
145
|
assert.match(notes, /Read the release back after creation/);
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
|
+
import { parseArgs } from "node:util";
|
|
6
|
+
import { commands, configuredBranch, run } from "./consumer-release-preparation.mjs";
|
|
7
|
+
import { readDeploymentInput, verifyContract } from "./deploy-contract.mjs";
|
|
8
|
+
|
|
9
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const git = (root, args) =>
|
|
11
|
+
execFileSync("git", args, {
|
|
12
|
+
cwd: root,
|
|
13
|
+
encoding: "utf8",
|
|
14
|
+
windowsHide: true,
|
|
15
|
+
timeout: 15000,
|
|
16
|
+
}).trim();
|
|
17
|
+
function assert(ok, message) {
|
|
18
|
+
if (!ok) throw new Error(message);
|
|
19
|
+
}
|
|
20
|
+
function identity(root, sha) {
|
|
21
|
+
assert(/^[a-f0-9]{40}$/i.test(sha), "Exact candidate SHA required");
|
|
22
|
+
assert(
|
|
23
|
+
git(root, ["rev-parse", "HEAD"]).toLowerCase() === sha.toLowerCase(),
|
|
24
|
+
"Candidate HEAD changed",
|
|
25
|
+
);
|
|
26
|
+
assert(
|
|
27
|
+
git(root, ["status", "--porcelain"]) === "",
|
|
28
|
+
"Commit only the authorized scope before push",
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export async function criticalTaskInRange(root, sha, remote = "origin") {
|
|
32
|
+
const base = git(root, ["ls-remote", remote, "refs/heads/main"]).split(/\s+/)[0];
|
|
33
|
+
assert(/^[a-f0-9]{40}$/i.test(base), "Remote main is unavailable for critical Task audit");
|
|
34
|
+
git(root, ["merge-base", "--is-ancestor", base, sha]);
|
|
35
|
+
const commits = git(root, ["rev-list", "--reverse", `${base}..${sha}`])
|
|
36
|
+
.split(/\r?\n/)
|
|
37
|
+
.filter(Boolean);
|
|
38
|
+
const ids = new Set();
|
|
39
|
+
let critical = false;
|
|
40
|
+
for (const commit of commits) {
|
|
41
|
+
const message = git(root, ["show", "-s", "--format=%B", commit]);
|
|
42
|
+
for (const match of message.matchAll(/^ZAIP-Task:\s*(TASK-[A-Z0-9-]+)\s*$/gim)) {
|
|
43
|
+
const id = match[1];
|
|
44
|
+
ids.add(id);
|
|
45
|
+
const date = /^TASK-(\d{4})-(\d{2})-/.exec(id);
|
|
46
|
+
assert(date, "Invalid Task identity in candidate");
|
|
47
|
+
const path = `.agents/records/tasks/${date[1]}/${date[2]}/${id}.md`;
|
|
48
|
+
let source;
|
|
49
|
+
try {
|
|
50
|
+
source = git(root, ["show", `${commit}:${path}`]);
|
|
51
|
+
} catch {
|
|
52
|
+
throw new Error(`Critical gate cannot verify Task record at commit: ${id}`);
|
|
53
|
+
}
|
|
54
|
+
const front = /^---\r?\n([\s\S]*?)\r?\n---/.exec(source)?.[1];
|
|
55
|
+
assert(
|
|
56
|
+
front && front.split(/\r?\n/).includes("id: " + id),
|
|
57
|
+
"Critical gate cannot verify Task identity at commit",
|
|
58
|
+
);
|
|
59
|
+
if (/^risk: critical\s*$/m.test(front)) critical = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const id of ids) {
|
|
63
|
+
const match = /^TASK-(\d{4})-(\d{2})-/.exec(id);
|
|
64
|
+
assert(match, "Invalid Task identity in candidate");
|
|
65
|
+
const path = `.agents/records/tasks/${match[1]}/${match[2]}/${id}.md`;
|
|
66
|
+
let source;
|
|
67
|
+
try {
|
|
68
|
+
source = git(root, ["show", `${sha}:${path}`]);
|
|
69
|
+
} catch {
|
|
70
|
+
throw new Error(`Critical gate cannot verify candidate Task record: ${id}`);
|
|
71
|
+
}
|
|
72
|
+
const front = /^---\r?\n([\s\S]*?)\r?\n---/.exec(source)?.[1];
|
|
73
|
+
assert(
|
|
74
|
+
front && front.split(/\r?\n/).includes("id: " + id),
|
|
75
|
+
"Critical gate cannot verify candidate Task record",
|
|
76
|
+
);
|
|
77
|
+
if (/^risk: critical\s*$/m.test(front)) critical = true;
|
|
78
|
+
}
|
|
79
|
+
return critical;
|
|
80
|
+
}
|
|
81
|
+
/** Commit creation remains Task-owned. This route sends an already committed candidate;
|
|
82
|
+
* it never allocates a version, calls gh release or obtains npm publication credentials. */
|
|
83
|
+
export async function guardedCommits(input, operations = {}) {
|
|
84
|
+
const root = resolve(input.repository);
|
|
85
|
+
const readInput = operations.readInput ?? readDeploymentInput;
|
|
86
|
+
const checkIdentity = operations.identity ?? identity;
|
|
87
|
+
const branchFor = operations.branchFor ?? configuredBranch;
|
|
88
|
+
const checkCommands = commands(input.checks);
|
|
89
|
+
assert(/^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(input.remote ?? "origin"), "Invalid remote name");
|
|
90
|
+
const initial = await readInput(root, input.request);
|
|
91
|
+
verifyContract(input.plan, initial, "commits", input.dryRun ? input.plan.phase : "publish");
|
|
92
|
+
assert(input.plan.phase === "publish" || input.dryRun, "Preparation never sends commits");
|
|
93
|
+
const branch = await branchFor(root, input.scope ?? "frontend");
|
|
94
|
+
assert(branch === input.branch, "Target must match the current project branch");
|
|
95
|
+
checkIdentity(root, input.sha);
|
|
96
|
+
await (operations.checks ?? ((items) => run(items, root, "scoped commit validation")))(
|
|
97
|
+
checkCommands,
|
|
98
|
+
);
|
|
99
|
+
checkIdentity(root, input.sha);
|
|
100
|
+
const recheck = async () => {
|
|
101
|
+
verifyContract(input.plan, await readInput(root, input.request), "commits", input.plan.phase);
|
|
102
|
+
assert(
|
|
103
|
+
(await branchFor(root, input.scope ?? "frontend")) === branch,
|
|
104
|
+
"Configured target changed",
|
|
105
|
+
);
|
|
106
|
+
checkIdentity(root, input.sha);
|
|
107
|
+
};
|
|
108
|
+
await recheck();
|
|
109
|
+
if (input.dryRun) return { mode: "commits", verified: true, pushed: false, release: false };
|
|
110
|
+
await (
|
|
111
|
+
operations.preflight ??
|
|
112
|
+
(() =>
|
|
113
|
+
execFileSync(
|
|
114
|
+
process.execPath,
|
|
115
|
+
[
|
|
116
|
+
resolve(here, "preflight.mjs"),
|
|
117
|
+
"--repository",
|
|
118
|
+
root,
|
|
119
|
+
"--remote",
|
|
120
|
+
input.remote ?? "origin",
|
|
121
|
+
"--scope",
|
|
122
|
+
input.scope ?? "frontend",
|
|
123
|
+
"--branch",
|
|
124
|
+
branch,
|
|
125
|
+
],
|
|
126
|
+
{ cwd: root, windowsHide: true, stdio: "inherit" },
|
|
127
|
+
))
|
|
128
|
+
)();
|
|
129
|
+
await recheck();
|
|
130
|
+
const critical =
|
|
131
|
+
input.plan.kind === "builder" &&
|
|
132
|
+
(await (operations.isCritical ?? criticalTaskInRange)(
|
|
133
|
+
root,
|
|
134
|
+
input.sha,
|
|
135
|
+
input.remote ?? "origin",
|
|
136
|
+
));
|
|
137
|
+
const candidateGate = critical
|
|
138
|
+
? await import(pathToFileURL(resolve(root, "scripts/remote-candidate-gate.mjs")).href)
|
|
139
|
+
: null;
|
|
140
|
+
if (critical) {
|
|
141
|
+
await (operations.qualifyPreMain ?? candidateGate.qualifyLocalCandidate)({
|
|
142
|
+
repository: root,
|
|
143
|
+
sha: input.sha,
|
|
144
|
+
kind: "critical",
|
|
145
|
+
remote: input.remote ?? "origin",
|
|
146
|
+
});
|
|
147
|
+
await recheck();
|
|
148
|
+
}
|
|
149
|
+
const refspec = `${input.sha}:refs/heads/${branch}`;
|
|
150
|
+
await (
|
|
151
|
+
operations.push ??
|
|
152
|
+
(() =>
|
|
153
|
+
execFileSync("git", ["push", input.remote ?? "origin", refspec], {
|
|
154
|
+
cwd: root,
|
|
155
|
+
windowsHide: true,
|
|
156
|
+
stdio: "inherit",
|
|
157
|
+
}))
|
|
158
|
+
)({ repository: root, refspec });
|
|
159
|
+
const remoteSha = await (
|
|
160
|
+
operations.remoteSha ??
|
|
161
|
+
(() =>
|
|
162
|
+
git(root, ["ls-remote", input.remote ?? "origin", `refs/heads/${branch}`]).split(/\s+/)[0])
|
|
163
|
+
)();
|
|
164
|
+
assert(
|
|
165
|
+
remoteSha === input.sha.toLowerCase(),
|
|
166
|
+
"Remote SHA does not match the delivered candidate",
|
|
167
|
+
);
|
|
168
|
+
if (critical) {
|
|
169
|
+
await (operations.verifyMainCi ?? candidateGate.waitMainCandidate)({
|
|
170
|
+
repository: root,
|
|
171
|
+
sha: input.sha,
|
|
172
|
+
kind: "critical",
|
|
173
|
+
remote: input.remote ?? "origin",
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
return { mode: "commits", verified: true, pushed: true, release: false, sha: input.sha };
|
|
177
|
+
}
|
|
178
|
+
async function main() {
|
|
179
|
+
const { values } = parseArgs({
|
|
180
|
+
strict: true,
|
|
181
|
+
options: {
|
|
182
|
+
repository: { type: "string", default: "." },
|
|
183
|
+
sha: { type: "string" },
|
|
184
|
+
branch: { type: "string" },
|
|
185
|
+
scope: { type: "string", default: "frontend" },
|
|
186
|
+
remote: { type: "string", default: "origin" },
|
|
187
|
+
"request-file": { type: "string" },
|
|
188
|
+
"plan-file": { type: "string" },
|
|
189
|
+
"checks-file": { type: "string" },
|
|
190
|
+
"dry-run": { type: "boolean", default: false },
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
for (const field of ["sha", "branch", "request-file", "plan-file", "checks-file"])
|
|
194
|
+
assert(values[field], `--${field} is required`);
|
|
195
|
+
const result = await guardedCommits({
|
|
196
|
+
repository: values.repository,
|
|
197
|
+
sha: values.sha,
|
|
198
|
+
branch: values.branch,
|
|
199
|
+
scope: values.scope,
|
|
200
|
+
remote: values.remote,
|
|
201
|
+
dryRun: values["dry-run"],
|
|
202
|
+
request: await readFile(resolve(values["request-file"]), "utf8"),
|
|
203
|
+
plan: JSON.parse(await readFile(resolve(values["plan-file"]), "utf8")),
|
|
204
|
+
checks: JSON.parse(await readFile(resolve(values["checks-file"]), "utf8")),
|
|
205
|
+
});
|
|
206
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
207
|
+
}
|
|
208
|
+
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url))
|
|
209
|
+
main().catch((error) => {
|
|
210
|
+
process.stderr.write(`${error.message}\n`);
|
|
211
|
+
process.exitCode = 1;
|
|
212
|
+
});
|
|
@@ -38,6 +38,10 @@ the supplied ID and canonical record; never scan ordinary history to guess a tar
|
|
|
38
38
|
a chain of cleanup Tasks to compensate for an incomplete scope or preparation error.
|
|
39
39
|
Await every delegated result, make the finalizer the last child, and only report
|
|
40
40
|
closure after all owned work is terminal. A progress handoff is not completion.
|
|
41
|
+
9. Before dispatching the finalizer, run the known candidate gates and repair failures
|
|
42
|
+
while the responsible root is active. A finalizer stop may close that root, so do not
|
|
43
|
+
send it an unfinished framework lock, failed local check, or outdated SHA evidence.
|
|
44
|
+
Rebind validation and independent review after each candidate-changing commit.
|
|
41
45
|
|
|
42
46
|
Use `$zaip-skill-reconcile-telemetry` only for missing observed usage after lifecycle
|
|
43
47
|
identity is correct; it is not a substitute for closure.
|
|
@@ -64,3 +64,7 @@ Ao receber “execute esse PRD”, inclusive no mesmo turno da preparação, reu
|
|
|
64
64
|
# Referência visual condicional
|
|
65
65
|
|
|
66
66
|
Quando a PRD citar UI ou referência visual, registre rota/aba, família de componente, colunas/linhas/paginação, estados e responsividade como invariantes observáveis, sem prometer prova visual inexistente.
|
|
67
|
+
|
|
68
|
+
## Release alvo
|
|
69
|
+
|
|
70
|
+
Ao criar PRD, registre `--target-release major.minor`; sem opção, a CLI usa a release corrente de `.agents/config/release-cycle.json`. Um alvo futuro, por exemplo `4.6` enquanto `4.5` está corrente, pode manter PRD e SPECs filhas em `draft`, inclusive com PreparedPlan. `prd ready` e `prd execute` falham antes de materializar Tasks até que a transição auditada torne `4.6` corrente. As SPECs selecionadas devem carregar o mesmo alvo. Não antecipe código futuro para a release corrente só para contornar o gate.
|
|
@@ -1,74 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zaip-skill-release-qualification
|
|
3
|
-
description: Qualify
|
|
3
|
+
description: Qualify a release candidate after deploy mode resolution or an explicit preparation request; verify exact-candidate evidence for the actual builder or consumer distribution surface without publishing.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Qualify a release candidate
|
|
7
7
|
|
|
8
|
-
Use
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
local qualification and public trust enrollment. The guarded helper publishes the exact signed
|
|
54
|
-
GitHub Release assets. The read-only verifier validates receipt, policy, SHA and TGZ,
|
|
55
|
-
then runs one Linux installation/doctor smoke before the isolated npm job receives
|
|
56
|
-
publication credentials. No private-draft pilot or contents-write token is required.
|
|
57
|
-
The publisher reverifies artifacts and registry integrity; additional registry installation
|
|
58
|
-
is opt-in manual `extended_verification=true`. Missing proof never falls back to publishing.
|
|
59
|
-
A published GitHub Release alone does not prove npm delivery. Never upload a private key.
|
|
60
|
-
|
|
61
|
-
1. Identify the exact candidate revision, version, and intended distribution surface.
|
|
62
|
-
Do not substitute current working-tree checks for candidate evidence.
|
|
63
|
-
2. Validate framework lock, source-to-public-template parity, generated artifacts,
|
|
64
|
-
package contents, and version alignment. Treat any source/template/package drift as
|
|
65
|
-
a failed candidate.
|
|
66
|
-
3. Run the relevant smoke and cleanroom checks against that candidate and preserve the
|
|
67
|
-
commands, revision, outcomes, and unresolved limits as evidence.
|
|
68
|
-
4. Separate local qualification, remote GitHub CI, registry publication, and formal
|
|
69
|
-
lifecycle closure. A matching SHA or passing local gate does not prove terminal CI.
|
|
70
|
-
5. Route an explicit push, deploy, or GitHub publication request to
|
|
71
|
-
`$zaip-skill-github-deploy`; never publish as part of qualification. Consumers remain independent
|
|
72
|
-
and GitHub-only. A framework candidate maps its helper-resolved `vN.N` tag to package `N.N.0`, and
|
|
73
|
-
only the qualified GitHub Actions workflow may publish `@zaip-ai/cli` to npm; no local npm command
|
|
74
|
-
may publish it.
|
|
8
|
+
Use after `$zaip-skill-github-deploy` resolves release mode, or when local preparation/qualification is explicitly requested. Resolve deploy mode first using [the deployment contract](../zaip-skill-github-deploy/references/deployment-workflow.md). Generic consumer deploy under auto and explicit commits mode use scoped checks and `guarded-commits.mjs`; they do not acquire a release gate from this skill.
|
|
9
|
+
|
|
10
|
+
Preparation, verification and dry-run do not publish. The request's resolved route supplies publication authority separately.
|
|
11
|
+
|
|
12
|
+
## Select the distribution surface
|
|
13
|
+
|
|
14
|
+
- Verified ZAIP builder requires approved `zaip-ai/zaip-aios` origin and both `@zaip-ai/aios` root/`@zaip-ai/cli` public CLI package identities. Apply `zaip-skill-update-version-doc`; root manifest defines candidate `N.N.0`, aligned to GitHub `vN.N`.
|
|
15
|
+
- Consumers use their actual project checks and GitHub release contract. They have no builder npm, TGZ, signing-key or protected-policy requirements. Existing project-specific signed preparation applies only when that project adopted it.
|
|
16
|
+
- Contradictory identity blocks routing. Never infer builder capability from a project name or installed skills, and never infer beta creation. Application targets follow literal project configuration, including main.
|
|
17
|
+
|
|
18
|
+
Read [local preparation](references/local-preparation.md) for the selected surface. Synchronize and commit first; evidence must bind the clean exact candidate. An already-published candidate SHA is a no-op, not a reason to allocate an empty new Release. Retry/resume preserves the exact SHA and assigned identity.
|
|
19
|
+
|
|
20
|
+
## Builder release qualification
|
|
21
|
+
|
|
22
|
+
Local builder preparation defaults to signed `essential-v3`: deterministic source/lock/parity, build/type integrity, dependency audit, prioritized installer/rollback/release regressions, package/SBOM/TGZ binding and one clean installed-consumer doctor/SQLite/API smoke.
|
|
23
|
+
|
|
24
|
+
These dense distribution checks are release gates. Change validation outside release remains targeted, with installer/security checks selected when directly impacted. Do not automatically run the full suite for generic commits, impose a test-count ceiling or classify a Task by wallclock duration.
|
|
25
|
+
|
|
26
|
+
Use `--profile full` for explicitly requested extended `full-v2` qualification, including full source, browser and XLSX coverage. Changed dashboard/export behavior still needs its relevant tests in the current Change. Rapid impact checks emit no signed release receipt and cannot substitute for release qualification.
|
|
27
|
+
|
|
28
|
+
The framework helper uses an isolated exact-SHA clone, builds once, verifies the exact TGZ and signs a receipt. Cache validity requires matching candidate, policy, gate definitions, runtime, channel, version, trusted key, expiry and artifact digests. Failed/timed-out gates emit no successful receipt; changed candidates or invalid evidence require new qualification.
|
|
29
|
+
|
|
30
|
+
Resolve builder signing material from the configured stable private directory and run `scripts/local-release-key.mjs preflight` before expensive gates. Inspect actual key/trust/policy configuration before claiming absence. Missing/mismatched required material fails closed; never generate replacement keys, rotate trust or remove signatures during routine deploy.
|
|
31
|
+
|
|
32
|
+
## Protected publisher and evidence
|
|
33
|
+
|
|
34
|
+
The reduced path is explicitly enabled by an administrator after signed qualification and public trust enrollment. Its helper publishes exact signed Release assets; a read-only GitHub verifier validates policy/SHA/TGZ and runs one Linux installation/doctor smoke before the isolated npm job gets credentials. No private-draft pilot is required. Keep the existing protected route; ordinary requested deploy needs no repeated pipeline confirmation.
|
|
35
|
+
|
|
36
|
+
Where the legacy path remains configured, retain its separate exact-candidate qualification receipt and matrix. Extended GitHub qualification is manual-only. An optional registry installation is explicit; registry digest and channel verification remain mandatory in builder publication. Only GitHub Actions publishes `@zaip-ai/cli`; never upload private keys or publish npm locally.
|
|
37
|
+
|
|
38
|
+
1. Identify exact revision, version, target and actual distribution surface; do not substitute current dirty-worktree checks.
|
|
39
|
+
2. Prove the selected checks, candidate-bound artifact integrity and source/template/package parity where the builder requires it.
|
|
40
|
+
3. Preserve actual commands, candidate, environment, outcomes and limits as evidence; unavailable checks stay unverified.
|
|
41
|
+
4. Separate local qualification, remote CI, registry publication and formal lifecycle closure. A passed local check or Release URL alone proves none of the other outcomes.
|
|
42
|
+
5. Return the qualification result to the resolved deploy route. Consumer GitHub release stays independent; builder delivery binds SHA/tag/version/digest and observes npm terminal status.
|
|
43
|
+
|
|
44
|
+
Recover under the frozen Task autonomy profile: balanced permits 10 executions total and 3 replans. Individual tests/tool calls and elapsed time are not executions, and continuation never resets the ledger.
|
|
45
|
+
|
|
46
|
+
The framework release cut uses `node scripts/release-cycle-gate.mjs freeze --repository ROOT --version N.N --release-task TASK-ID --release-run RUN-ID`. The exceptional coordinator is the critical, release-only Task at the end of the owner SPEC's exact Execution DAG. Every predecessor Task must be completed; only the release Task may still execute. Its delegated Task orchestrator Run must be active under that SPEC's active macro Run. `audit` and `advance` recheck predecessor status and authenticate the same Task, Run, SPEC, Execution and committed candidate records; only the release Task and owner SPEC are exempt from the open-work gate. Unrelated work remains blocked. The candidate commits the frozen cycle before qualification. The deploy helper checks its exact SHA, pushes only `main`, and requires successful CI on that SHA before publication.
|
|
47
|
+
|
|
48
|
+
For an authorized Task-first request that combines a product fix and its release in one direct Task root, use the explicit `--integrated-task` freeze option with that Task and active root Run. The Task must be critical, target the current release, own the release-cycle config scope and have a delivery Execution bound to its Change. `audit` and `advance` authenticate its committed Task and Run start, while all other current-release work, secondary worktrees and remote branches still block. This route avoids creating a second root Run or asking the user for a new turn solely to publish already authorized work. Do not use it for a delegated SPEC release Task or as a general waiver for release checks.
|
|
49
|
+
|
|
50
|
+
For the one-time 4.5→4.6 recovery, `adopt-published` requires the published 4.5 tag to be an ancestor of remote `main`, remote `main` to be an ancestor of clean local `main`, and observed stable GitHub Release/npm integrity. Pass the exact owner `--owner-spec`, `--owner-execution`, `--owner-run`, planned `--release-task` and active delegated Task orchestrator `--actor-run`. That actor must own the release Task's unique direct predecessor; all earlier DAG Tasks must be completed. Only the actor Task, planned release Task and owner SPEC are exempt from the open-work gate. After review/Evidence and a clean metadata checkpoint, perform adoption while that predecessor Task and its actor Run are still active. Then use `spec retarget-release SPEC --from 4.5 --to 4.6 --run DELEGATED_TASK_RUN` with the same actor Run. Close the predecessor Task through Gui only after retarget; start the release Task afterward. The revision records adoption SHA and actor Run, and the release Task's missing target resolves through its owner SPEC. Do not edit records directly to retarget.
|
|
51
|
+
|
|
52
|
+
After exact Release, npm and candidate CI are observed, `advance --from N.N --to NEXT --sha CANDIDATE --ci-run-id ID` opens the next cycle while the coordinator remains active. Bind Task/SPEC Evidence to the immutable published candidate before Gui, then close Task and parent SPEC. Make one reviewed metadata-only closure commit; push that exact local main SHA through `scripts/local-release-deploy.mjs push-closure` with published SHA, expected remote SHA and the exact metadata path inventory. The tag remains on the published candidate. Confirm CI on the new main SHA; local closure alone is not complete publication. This contract does not prove provider deployment.
|