@zaip-ai/cli 4.8.0 → 4.9.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/dist/services/adapters.d.ts +1 -1
- package/dist/services/adapters.js +1 -1
- package/dist/services/codex-hook-activation.js +3 -3
- package/dist/services/codex-pre-tool-hook-template.d.ts.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.js +85 -9
- package/dist/services/codex-pre-tool-hook-template.js.map +1 -1
- package/dist/services/codex-pre-tool-hook-template.test.js +36 -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 +19 -2
- package/dist/services/codex-pre-tool-support-template.js.map +1 -1
- 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 +46 -13
- package/dist/services/codex-subagent-hook-template.js.map +1 -1
- package/dist/services/codex-validation-runtime-template.d.ts.map +1 -1
- package/dist/services/codex-validation-runtime-template.js +31 -10
- package/dist/services/codex-validation-runtime-template.js.map +1 -1
- package/dist/services/runtime-template.test.js +3 -1
- package/dist/services/runtime-template.test.js.map +1 -1
- package/package.json +1 -1
- package/templates/.agents/README.md +6 -2
- package/templates/.agents/config/agents/discovery.json +1 -1
- package/templates/.agents/dashboard/.zaip-managed.json +34 -30
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{DashboardHelpDialog-BN8KQPrr.js → DashboardHelpDialog-Cp_hEVd8.js} +43 -8
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{ProjectSettingsPage-HqGUImIG.js → ProjectSettingsPage-Cu40wAFF.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{TraceabilityWorkspace-CNpmQMO4.js → TraceabilityWorkspace-Bh3YBd3C.js} +1 -1
- package/templates/.agents/dashboard/apps/frontend/dist/assets/{index-DX65Ufuu.js → index-qVSJnJ0_.js} +2 -2
- package/templates/.agents/dashboard/apps/frontend/dist/index.html +1 -1
- package/templates/.agents/dashboard/apps/frontend/package.json +1 -1
- package/templates/.agents/dashboard/modules/cost-monitor/package.json +1 -1
- package/templates/.agents/dashboard/modules/operations/package.json +1 -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/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 +226 -221
- package/templates/.agents/dashboard/packages/local-runtime/dist/sqlite-read-model.cjs +147 -147
- package/templates/.agents/dashboard/packages/local-runtime/package.json +3 -3
- package/templates/.agents/dashboard/packages/local-runtime/server.mjs +226 -221
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.test.ts +17 -5
- package/templates/.agents/dashboard/packages/local-runtime/src/active-codex-telemetry.ts +44 -14
- package/templates/.agents/dashboard/packages/local-runtime/src/server.ts +9 -3
- package/templates/.agents/dashboard/packages/local-runtime/vitest.config.ts +12 -0
- package/templates/.agents/dashboard/packages/ui/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/package.json +1 -1
- package/templates/.agents/dashboard/tests/e2e/specs/cost-monitor-pagination.spec.ts +13 -6
- package/templates/.agents/dashboard/tests/e2e/specs/dashboard.spec.ts +1 -1
- package/templates/.agents/design/.zaip-managed.json +3 -3
- package/templates/.agents/design/apps/catalog/package.json +1 -1
- package/templates/.agents/design/packages/local-runtime/package.json +1 -1
- package/templates/.agents/requirements/autonomous-assurance.md +30 -3
- 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 +3 -3
- 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 +11 -2
- 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 +1 -1
- 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/cloud-hostinger-autonomy.md +1 -1
- package/templates/.agents/rules/production-readiness.md +24 -0
- package/templates/.agents/rules/security.md +2 -2
- package/templates/.agents/rules/workflow.md +3 -3
- package/templates/.agents/runtime/VERSION +1 -1
- package/templates/.agents/runtime/bin/zaip.mjs +303 -142
- 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 +13 -13
- package/templates/.agents/skills/zaip-skill-execution/SKILL.md +4 -2
- package/templates/.agents/skills/zaip-skill-execution/references/controlled-release-recovery.md +30 -0
- package/templates/.agents/skills/zaip-skill-execution/references/runtime-governance.md +1 -1
- package/templates/.agents/skills/zaip-skill-github-deploy/SKILL.md +2 -0
- package/templates/.agents/skills/zaip-skill-github-deploy/references/release-gate-matrix.md +15 -20
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.mjs +26 -2
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/deploy-contract.test.mjs +37 -4
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs +8 -6
- package/templates/.agents/skills/zaip-skill-github-deploy/scripts/guarded-commits.mjs +5 -3
- package/templates/.agents/skills/zaip-skill-lifecycle-closure/SKILL.md +7 -0
- package/templates/.agents/skills/zaip-skill-prd/SKILL.md +6 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/SKILL.md +24 -0
- package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md +9 -3
- package/templates/.agents/skills/zaip-skill-spec/SKILL.md +9 -0
- package/templates/.agents/skills/zaip-skill-testing-strategy/SKILL.md +15 -0
- package/templates/.agents/zaip-aios/VERSION +1 -1
- package/templates/.agents/zaip-aios/guides/11-observabilidade-e-custos.md +22 -0
- package/templates/.agents/zaip-aios/guides/14-troubleshooting.md +1 -1
- package/templates/.agents/zaip-aios/guides/26-qualidade-e-release.md +14 -5
- package/templates/template-manifest.json +95 -83
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
b146bd0c7c60b1ab43c4f71e0b1d2262c6df6da6f7053a0425f834ccb77a6b48 LICENSE
|
|
2
2
|
bc02cba77e8d51e5c580f43668863dc868eda66f1ff663bfaa49fcf3ca16320e THIRD_PARTY_NOTICES.md
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
b9c635e14ee1fd055bbf8779b20efb85b5eff17d66df342c4735683297373176 VERSION
|
|
4
|
+
825a4900d32a38c686a1affd449f213eb745628e13059095d69bc076cc55aea8 bin/zaip.mjs
|
|
5
|
+
5cd860165138336d4fdf2da60d1c282d75ddcbea3ff8b6774ee8e319142e4d23 manifest.json
|
|
6
6
|
7f89219d7c567c82a51679ad136d84364bded7ac659492537e125d33b1d58a7a migrations/001-layout-v1.json
|
|
7
7
|
5f8c48b286d0b44d8fbb57a9a5d009a8a500439aa3148d750b8f193f72995c9f migrations/002-layout-v2.json
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
31194079d919ebf882b75cde4de4cd444347e0a051a81602affac0822dbf4c7c pnpm-lock.sha256
|
|
9
|
+
a7f6f1a4965c4233969ccb664e91373f5630db915bcc3244dab27dc445fb8bfd provenance.json
|
|
10
|
+
1e00d2087311d109edea35e1dfbd315d731e1e671c6bd5798211a4ade0a25f52 sbom.cdx.json
|
|
11
11
|
b3ffedf9e146be802a15b4009f33e031dec3071ca1525e12c67606fd964a3067 schemas/contracts.schema.json
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
74609eb6b1aa005a6924bb2785e313c76e6459983687560ba08b6eff8b184721 pnpm-lock.yaml
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"statement_type": "self_reported_build_integrity",
|
|
4
4
|
"authenticity": "unverified",
|
|
5
|
-
"version": "4.
|
|
5
|
+
"version": "4.9.0",
|
|
6
6
|
"source_origin": "zaip-aios:local-build",
|
|
7
|
-
"lockfile_sha256": "
|
|
8
|
-
"sbom_sha256": "
|
|
9
|
-
"runtime_sha256": "
|
|
10
|
-
"statement_sha256": "
|
|
7
|
+
"lockfile_sha256": "74609eb6b1aa005a6924bb2785e313c76e6459983687560ba08b6eff8b184721",
|
|
8
|
+
"sbom_sha256": "1e00d2087311d109edea35e1dfbd315d731e1e671c6bd5798211a4ade0a25f52",
|
|
9
|
+
"runtime_sha256": "ce179d284aea950e6ba2f0bdfcfb1464194c0a808b82a044f5e89c2b72e96b06",
|
|
10
|
+
"statement_sha256": "44d1925ba9300d711c60d5b10e6f2045bbb2f9d26c5a3a2e19948c10645f6eac"
|
|
11
11
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"component": {
|
|
7
7
|
"type": "application",
|
|
8
8
|
"name": "zaip-aios",
|
|
9
|
-
"version": "4.
|
|
9
|
+
"version": "4.9.0"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"components": [
|
|
@@ -1885,20 +1885,20 @@
|
|
|
1885
1885
|
{
|
|
1886
1886
|
"type": "library",
|
|
1887
1887
|
"name": "brace-expansion",
|
|
1888
|
-
"version": "1.1.
|
|
1889
|
-
"purl": "pkg:npm/brace-expansion@1.1.
|
|
1888
|
+
"version": "1.1.21",
|
|
1889
|
+
"purl": "pkg:npm/brace-expansion@1.1.21"
|
|
1890
1890
|
},
|
|
1891
1891
|
{
|
|
1892
1892
|
"type": "library",
|
|
1893
1893
|
"name": "brace-expansion",
|
|
1894
|
-
"version": "2.1.
|
|
1895
|
-
"purl": "pkg:npm/brace-expansion@2.1.
|
|
1894
|
+
"version": "2.1.7",
|
|
1895
|
+
"purl": "pkg:npm/brace-expansion@2.1.7"
|
|
1896
1896
|
},
|
|
1897
1897
|
{
|
|
1898
1898
|
"type": "library",
|
|
1899
1899
|
"name": "brace-expansion",
|
|
1900
|
-
"version": "5.0.
|
|
1901
|
-
"purl": "pkg:npm/brace-expansion@5.0.
|
|
1900
|
+
"version": "5.0.12",
|
|
1901
|
+
"purl": "pkg:npm/brace-expansion@5.0.12"
|
|
1902
1902
|
},
|
|
1903
1903
|
{
|
|
1904
1904
|
"type": "library",
|
|
@@ -2197,8 +2197,8 @@
|
|
|
2197
2197
|
{
|
|
2198
2198
|
"type": "library",
|
|
2199
2199
|
"name": "devalue",
|
|
2200
|
-
"version": "5.9.
|
|
2201
|
-
"purl": "pkg:npm/devalue@5.9.
|
|
2200
|
+
"version": "5.9.3",
|
|
2201
|
+
"purl": "pkg:npm/devalue@5.9.3"
|
|
2202
2202
|
},
|
|
2203
2203
|
{
|
|
2204
2204
|
"type": "library",
|
|
@@ -2527,8 +2527,8 @@
|
|
|
2527
2527
|
{
|
|
2528
2528
|
"type": "library",
|
|
2529
2529
|
"name": "hono",
|
|
2530
|
-
"version": "4.13.
|
|
2531
|
-
"purl": "pkg:npm/hono@4.13.
|
|
2530
|
+
"version": "4.13.7",
|
|
2531
|
+
"purl": "pkg:npm/hono@4.13.7"
|
|
2532
2532
|
},
|
|
2533
2533
|
{
|
|
2534
2534
|
"type": "library",
|
|
@@ -3733,8 +3733,8 @@
|
|
|
3733
3733
|
{
|
|
3734
3734
|
"type": "library",
|
|
3735
3735
|
"name": "undici",
|
|
3736
|
-
"version": "8.10.
|
|
3737
|
-
"purl": "pkg:npm/undici@8.10.
|
|
3736
|
+
"version": "8.10.2",
|
|
3737
|
+
"purl": "pkg:npm/undici@8.10.2"
|
|
3738
3738
|
},
|
|
3739
3739
|
{
|
|
3740
3740
|
"type": "library",
|
|
@@ -35,6 +35,8 @@ Antes de encerrar com trabalho pendente ou responder a uma falha, aplique [conti
|
|
|
35
35
|
8. Respeite a política do plano: use `zaip verify --changed --risk <risk>` no modo `scoped`; reserve `pnpm verify` para `full`, risco critical ou gate final exigido.
|
|
36
36
|
9. Em cada `run usage`, leia `budget.context_refresh_required` e `budget.checkpoint_required`. O runtime grava o checkpoint sanitizado em `.local/checkpoints/`; quando sinalizado, reconstrua contexto somente de IDs ativos, diff e findings, descarte outputs brutos antigos e continue apenas com autoridade.
|
|
37
37
|
10. Falha operacional transitória recebe retry limitado; impedimento essencial deixa a Task `blocked`; falha lógica exige correção localizada ou repair/rework explícito. Antes de uma próxima correção, carregue o [ciclo de correção e bloqueio](references/correction-cycle.md). Nunca esconda uma tentativa.
|
|
38
|
+
|
|
39
|
+
Recuperação de SPEC materializada com versão de pnpm defasada e Task bloqueada sob release frozen usa somente as prévias e operações atribuídas `spec revise-implementation` e `task recover-release` descritas em [recuperação controlada](references/controlled-release-recovery.md). Decision humana operacional exata, Run/turno observados, journal e refreeze são obrigatórios. O grant permite somente a retomada da Task alvo; audit/publicação continuam bloqueados até novo freeze e qualificação.
|
|
38
40
|
11. Cada tentativa usa uma Run raiz do `zaip-agent-orchestrator`; subagentes e fases materialmente distintas usam Sub-Runs relacionadas por `parent_run_id`. Cada Run/Sub-Run fixa agente, modelo e effort; retry técnico preserva a configuração e qualquer mudança deliberada abre outra chamada de agente.
|
|
39
41
|
12. Para delegação Codex, Sub-Run é somente subagente nativo de colaboração (`spawn_agent`). `create_thread` e `fork_thread` criam chats independentes e só podem ocorrer por pedido explícito do usuário; nunca os use como Sub-Run, fallback, retry ou prova de delegação. Se delegação nativa estiver indisponível, relate a limitação em vez de criar chat independente. Nome de catálogo, `task_name`, título ou prompt não provam ancestralidade nativa. Antes de repetir a mesma delegação limitada, aguarde ou reutilize seu filho pendente; capture somente ancestralidade/metadados observados em resultados nativos de spawn/terminal do host ou eventos SubagentStart/SubagentStop.
|
|
40
42
|
13. Interaction read-only sem descendentes termina após a resposta, sem executor/finalizador. Para interaction com descendente delegado e para delivery, depois que todos os Sub-Runs de trabalho terminarem invoque `zaip-agent-finalizer` como último filho com propósito `finalization`. Não inicie novos filhos depois dele; auto-settlement nunca fecha interaction com descendente ativo. Isso também vale para `cancelled`: o orquestrador aplica a decisão Gui pela CLI; comandos diretos Task/SPEC/PRD nunca terminalizam. Ausência, interrupção ou falha do Gui deixa a Execution inconclusiva como `blocked`.
|
|
@@ -48,8 +50,8 @@ Antes de encerrar com trabalho pendente ou responder a uma falha, aplique [conti
|
|
|
48
50
|
- Resolva o alcance completo antes de iniciar a primeira parte. Em “Task X e o restante do PRD”, se X pertence à DAG, capture o PRD e delegue suas Tasks; mantenha Gui por Task e Gui parental ao final. Se X é uma entrega avulsa fora da DAG, não finja que pertence ao PRD: este runtime não possui coordenador multi-Execution. Identifique essa limitação antes de executar, preserve entregas já concluídas e não prometa uma sequência que exija trocar a raiz capturada. Uma correção avulsa já concluída não precisa ser reaberta para retomar o PRD.
|
|
49
51
|
|
|
50
52
|
- Pedido para executar um PRD/SPEC existente é continuação da entrega, não nova autoria. Resolva o ID canônico e use `conversation start --intent continue --prd ID` (ou `--spec ID` / `--task ID` no menor grão pedido); inspecione a Run retornada e reutilize sua identidade. Não use `--definition` para executar um macro já criado.
|
|
51
|
-
- `conversation start --intent new-work` já materializa e inicia Task, Change, Execution e Run. Não abra outra Run raiz para o mesmo turno.
|
|
52
|
-
- Antes de iniciar Tasks ou delegar, confira `execution_kind: delivery`, atribuição ao alvo e Execution correta. Uma Run `interaction` de definição não autoriza a implementação. Não reescreva
|
|
53
|
+
- `conversation start --intent new-work` já materializa e inicia Task, Change, Execution e Run. Não abra outra Run raiz para o mesmo turno. A única transição de segmento admitida é `spec execute` para a SPEC pronta cuja definição no mesmo turno físico terminou com Gui e recebeu autorização explícita observada para aquele alvo. O comando vincula claim, predecessor, sucessor e hash da autorização; não reabre nem reescreve a Run anterior. Repetição compatível reutiliza a identidade; intenção, alvo, modelo ou atribuição diferentes não são repetição compatível.
|
|
54
|
+
- Antes de iniciar Tasks ou delegar, confira `execution_kind: delivery`, atribuição ao alvo e Execution correta. Uma Run `interaction` de definição não autoriza a implementação; a sucessora só existe após o handoff validado. Não reescreva o header anterior, altere IDs do cliente ou duplique telemetria sem fronteira observável.
|
|
53
55
|
- Quando a CLI rejeitar uma captura incompatível, preserve o estado e os IDs existentes e explique a divergência. Não avance manualmente as entidades para `executing` nem crie outro PRD/DAG como tentativa de recuperação. A proteção de um proprietário por invocação permanece obrigatória.
|
|
54
56
|
|
|
55
57
|
## Paralelismo
|
package/templates/.agents/skills/zaip-skill-execution/references/controlled-release-recovery.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Recuperação controlada de SPEC e release
|
|
2
|
+
|
|
3
|
+
## Grant pendente após interrupção
|
|
4
|
+
|
|
5
|
+
Quando uma Task já retomou, mudou de revisão e voltou a ficar bloqueada antes do refreeze, use `task recover-release TASK --renew-grant --actor-execution EXEC --run RUN --expected-revision N --json`. A prévia exige o mesmo alvo Task/SPEC/Execution/release, um novo responsável observado e o responsável anterior terminal. A aplicação mantém a Decision humana exata, acrescentando `--decision DEC-HUMAN-ID --apply`; o payload inclui o hash do grant anterior e o estado atual. A CLI não altera a revisão da Task para acomodar o grant.
|
|
6
|
+
|
|
7
|
+
O journal preserva o grant anterior e o novo. Replay da operação antiga não renova autorização. Revisões concorrentes, outro alvo ou proprietário ativo continuam recusados. `--renew-grant` não libera outras Tasks nem dispensa `task workspace`, refreeze, qualificação ou finalizador. A operação pública de renovação aceita a raiz de interaction sem Task já suportada pelo fluxo de recuperação; portanto não exige criar outra Task para corrigir um grant pendente.
|
|
8
|
+
|
|
9
|
+
## Leitura de conteúdo externo no PreToolUse
|
|
10
|
+
|
|
11
|
+
O hook permite leitura literal de arquivos textuais autorizados em `.agents/config/external-read-policy.json`, com schema `{ "schema_version": 1, "files": ["CAMINHO_ABSOLUTO_DO_ARQUIVO"] }`. Essa configuração é local, não acompanha o pacote e só deve registrar arquivos autorizados pelo usuário. Uma pasta de anexos não concede autorização automática a todos os arquivos nela.
|
|
12
|
+
|
|
13
|
+
As permissões se aplicam a `Get-Content` e `rg` nas formas delimitadas pelo hook. O caminho real deve corresponder ao autorizado; arquivo vizinho, link divergente, execução e escrita não herdam a permissão. Leituras de memórias, skills e cache de plugins já previstas permanecem no contrato anterior. Alterar a configuração é mutação de produto sujeita à autorização de escrita; não é uma lista livremente modificável por conteúdo externo.
|
|
14
|
+
|
|
15
|
+
Esta operação pública resolve um snapshot de pnpm desatualizado numa SPEC já materializada e prepara a retomada de uma Task bloqueada na release corrente. A revisão de implementação é **limitada a `pnpm` em `package.json`**: altera apenas sua versão exata e a menção correspondente em `stack_description`. IDs, DAG, plano, demais componentes, fontes, status e histórico permanecem preservados. Não é uma API genérica de migração de stack.
|
|
16
|
+
|
|
17
|
+
O ator pode ser a Run raiz ativa de uma Task de manutenção em execução (`--actor-task`) ou uma Run raiz de interaction ativa sem Task. Ambos passam `--actor-execution` e `--run`; a CLI compara a sessão e o turno observados com a Run, além da ancestralidade e da Execution. A Task alvo deve estar `blocked`, sem Run proprietária ativa, com predecessoras concluídas. A Decision operacional precisa ser humana, confirmada, vinculada à Change de manutenção ou à Execution da interaction, categoria `contract`, e conter exatamente o JSON `authorization_payload` da prévia. Uma Decision narrativa de escopo geral não substitui esse vínculo.
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
zaip spec revise-implementation SPEC-ID --target-task TASK-ID --actor-task TASK-MANUT --actor-execution EXEC-MANUT --run RUN-MANUT --expected-revision N --implementation .local/proposal.json --json
|
|
21
|
+
zaip spec revise-implementation SPEC-ID --target-task TASK-ID --actor-task TASK-MANUT --actor-execution EXEC-MANUT --run RUN-MANUT --expected-revision N --implementation .local/proposal.json --decision DEC-HUMAN-ID --apply --json
|
|
22
|
+
zaip task recover-release TASK-ID --actor-task TASK-MANUT --actor-execution EXEC-MANUT --run RUN-MANUT --expected-revision N --json
|
|
23
|
+
zaip task recover-release TASK-ID --actor-task TASK-MANUT --actor-execution EXEC-MANUT --run RUN-MANUT --expected-revision N --decision DEC-HUMAN-ID --apply --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
No caminho sem Task de manutenção, omita `--actor-task` e use a Execution da interaction em `--actor-execution`. Faça prévia de cada ação, registre uma Decision operacional distinta com o payload exato e só então aplique. O journal limitado em `.local/recovery/` conserva hashes e textos antes/depois, ator e Decision. Repetir a mesma aplicação devolve o resultado já aplicado; se a escrita interrompeu após o journal, a mesma chamada retoma apenas se o conteúdo original e a Run ativa ainda corresponderem. Conteúdo independente divergente bloqueia replay.
|
|
27
|
+
|
|
28
|
+
`recover-release` muda `frozen` para `open` com um grant que admite apenas `task resume` da Task/SPEC/Execution autorizadas. A Task continua bloqueada até sua retomada pública sob proprietário legítimo. Outras Tasks não podem iniciar enquanto o grant existir. O refreeze consome o grant somente pela mesma Task de coordenação delegada da SPEC, validada pela política de release existente; o audit e o advance recusam grant pendente. O novo candidato precisa ser qualificado e revisado no SHA final depois desse refreeze. Nenhuma prova histórica é aprovada retroativamente.
|
|
29
|
+
|
|
30
|
+
No repositório mantenedor, em candidato isolado com Node 24 e pnpm offline disponível, `node scripts/qualification/v49-recovery.mjs test` executa testes focais e typechecks. O gate geral de source-size segue separado. `node scripts/qualification/v49-recovery.mjs mutation --isolated` executa mutantes de autorização, grant, preflight e audit, restaurando os bytes originais no `finally` e verificando seus hashes. Esse harness pertence exclusivamente ao repositório mantenedor; não está disponível no pacote nem no template público.
|
|
@@ -5,7 +5,7 @@ Carregue antes de executar uma entrega ou delegar. Este contrato detalha o kerne
|
|
|
5
5
|
- `RULE-CORE` e `RULE-WORKFLOW`, já carregadas antes desta referência, são a fonte para configuração, autoridade externa, captura, PRD/SPEC/Task lifecycle, Git-only/deploy, perguntas, verbos, credenciais e plano visível. Aplique-as integralmente; esta referência só acrescenta a governança de execução e delegação abaixo.
|
|
6
6
|
- Em modo manual carregue `RULE-MODEL-ORCHESTRATION` antes da primeira resposta visível; aviso não bloqueia nem altera seleção. Com Codex/delegação use apenas `codex_name` do catálogo, formato `zaip-agent-NOME`, recursivamente; proíba `default`, `worker`, `explorer` e tipos ad-hoc.
|
|
7
7
|
- Para delegação Codex, Sub-Run ZAIP é somente subagente nativo de colaboração (`spawn_agent`). `create_thread` e `fork_thread` criam chats independentes e exigem pedido explícito do usuário; nunca são Sub-Run, fallback, retry ou prova de delegação. Se delegação nativa estiver indisponível, relate a limitação em vez de criar chat independente. Nome de catálogo, `task_name`, título ou prompt não prova ancestralidade nativa. Antes de repetir a mesma delegação limitada, aguarde ou reutilize seu filho pendente e capture somente ancestralidade/metadados observados em resultados nativos de spawn/terminal do host ou eventos SubagentStart/SubagentStop.
|
|
8
|
-
- Cada `client_turn_id` observável tem uma Execution idempotente/claim atômico; sem ele use identidade local sem prometer idempotência. `interaction` read-only sem descendentes é conversa sem Task artificial e termina após a resposta entregue, sem executor ou finalizador; interaction com trabalho delegado e `delivery` exigem executor/finalizador. `delivery` é trabalho materializado e reuso exige kind/origem compatíveis. A raiz é `zaip-agent-orchestrator`; quando a barreira é exigida escolha executor por capacidade, permita reviewer/auditor/integrator e termine com `zaip-agent-finalizer` em `finalization`, após descendentes, bloqueando novas chamadas.
|
|
8
|
+
- Cada `client_turn_id` observável tem por padrão uma Execution idempotente/claim atômico; sem ele use identidade local sem prometer idempotência. A exceção versionada de `spec execute` permite uma Execution delivery sucessiva à interaction de definição no mesmo turno físico somente após definição terminal+Gui, SPEC pronta e autorização explícita observada para o alvo exato. O claim vincula as duas Executions e Runs, preserva a anterior e impede dois proprietários ativos; não fabrica novo turno ou child. `interaction` read-only sem descendentes é conversa sem Task artificial e termina após a resposta entregue, sem executor ou finalizador; interaction com trabalho delegado e `delivery` exigem executor/finalizador. `delivery` é trabalho materializado e reuso exige kind/origem compatíveis. A raiz é `zaip-agent-orchestrator`; quando a barreira é exigida escolha executor por capacidade, permita reviewer/auditor/integrator e termine com `zaip-agent-finalizer` em `finalization`, após descendentes, bloqueando novas chamadas.
|
|
9
9
|
- Hooks são best-effort: após cada spawn/terminal, o host autorizado a serviço do orquestrador executa `zaip subagent capture` idempotente com metadados reais. Na captura rica, preserve session/turn observados, `agent-id` com a identidade nativa retornada e `parent-agent-id`/`parent-run-id` do pai imediato exato; cada invocação preserva seu turn. Quando um evento terminal observado expõe somente agent_path, status, identidade catalogada e pai exato, `capture-terminal` aceita apenas `zaip-agent-finalizer` ou executor elegível para delivery com capacidade `task-delivery`; exige também `parent-run-id` igual ao `run_id` da raiz ativa exata, pois um client thread pode conter raízes concorrentes. O último segmento do agent_path deve ser seu `codex_task_name` canônico. O propósito deriva da identidade validada e session/turn/model/provider/usage permanecem indisponíveis; o fallback nunca substitui captura rica nem inventa modelo, effort, tokens ou custo.
|
|
10
10
|
- Antes da primeira edição do executor nativo, capture seu início observado. Na captura manual de executor cujo pai é orquestrador de Task delegado por uma SPEC, `--session` continua sendo o UUID físico da raiz macro; informe também `--native-session CHILD_UUID` com o UUID do filho observado no retorno do spawn. O PreToolUse pode receber a sessão do pai junto com o turno do filho: a CLI grava correlações locais exatas para esse formato e para a sessão nativa do filho, somente após verificar ancestralidade, modelo/effort, Task e Execution ativos. A autorização de patch fica limitada aos write scopes da Task; reviewers, identidades desconhecidas, outro turno e Runs terminais não recebem essa capacidade. Não copie nem fabrique recibos. Ao reutilizar um subagente, capture seu novo turno ativo; o recibo anterior não autoriza a retomada.
|
|
11
11
|
- Em `autonomy-v1`, carregue `RULE-AUTONOMY-DECISION`. Conversation sem entrega responde diretamente; Task avulsa no padrão `codex_native` usa executor e Gui nativos. O principal preserva a seleção manual do host; cada filho segue a seleção ZAIP por papel/risco/fase, registrada conforme o modelo/esforço efetivamente observados. Capacidade ausente bloqueia a tentativa, nunca é substituída por prompt. Sem `autonomy`, preserve o contrato legado de `automatic_sources` (`spec`,`prd`).
|
|
@@ -45,6 +45,8 @@ Commit subjects retain `[CODEX|CLAUDE] [P:XXXX] [S:XXXX] [T:XXXX] <Task title>`
|
|
|
45
45
|
|
|
46
46
|
Dense source/template/package/TGZ gates belong to builder release qualification. Generic commits use targeted validation, without an automatic full suite, test-count cap or Task wallclock limit. Apply the frozen autonomy profile: balanced permits 10 executions total and 3 replans; tests/tool calls are not executions and resumption does not reset the budget. Do not add an independent five-cycle limit.
|
|
47
47
|
|
|
48
|
+
For post-receipt rapid reuse in the verified builder, follow `docs/quality/v49-deploy-cache-controls.md`: the host reviews and promotes each group proof and its index before a later candidate; a failed result must become a tombstone before retry, never an older PASS hit.
|
|
49
|
+
|
|
48
50
|
## Verify and report
|
|
49
51
|
|
|
50
52
|
Compare the exact pushed SHA with the configured remote ref. If a push result is uncertain, read remote state before retrying. Observe required checks for that SHA, inspect failed steps and repair their evidenced cause within the frozen profile; do not repeat unchanged failures or bypass a gate.
|
|
@@ -1,24 +1,19 @@
|
|
|
1
1
|
# Release gate retention matrix
|
|
2
2
|
|
|
3
|
-
| Gate |
|
|
3
|
+
| Gate | When it runs | Evidence boundary |
|
|
4
4
|
|---|---|---|
|
|
5
|
-
|
|
|
6
|
-
|
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
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 |
|
|
5
|
+
| Focused code, type, contract and security regressions; applicable mutation and independent review | Per changed Task on its exact candidate SHA | Reuse only while SHA, scope, risk and impact remain valid |
|
|
6
|
+
| Final `essential-v3` source, package, installer, upgrade, rollback, audit and consumer qualification | Once in the isolated local checkout of the final release SHA | A failed gate emits no signed success receipt; repair creates a new candidate |
|
|
7
|
+
| Full source suite, browser navigation and XLSX coverage | Only when explicit impact/profile requires `full-v2` | Never infer a pass from an unrun optional gate |
|
|
8
|
+
| Signed receipt, profile, repository/SHA, manifest, SBOM and TGZ digest | Local preparation; reverified before each delivery transition | The same file and digest must reach the Release and publisher |
|
|
9
|
+
| Pushed `main` checkout, previous-main ancestry, workflow integrity and commit policy | `pre-main-candidate.yml` on push to `main` | Exact successful workflow run on the pushed SHA; no future Release asset is needed |
|
|
10
|
+
| Release asset signature/policy/expiration, SHA, TGZ/SBOM digest and bounded Linux install/doctor smoke | `publish-cli.yml` after the draft Release exists | Publish the same checked TGZ; no rebuild, repack or repeat of the local source suite |
|
|
11
|
+
| Registry version, integrity and channel | Publisher after npm publication | Observe the registry result separately from local qualification and GitHub Release |
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
The local candidate gate runs lint, types, commit policy and impact-selected regressions
|
|
14
|
+
before `main` moves. The push-triggered main job checks its own checkout and workflow
|
|
15
|
+
state without rerunning that local suite or installing Chromium unconditionally. The
|
|
16
|
+
publisher rechecks the signed artifact because custody changes at the Release boundary.
|
|
17
|
+
Any changed SHA, receipt, profile or artifact digest requires requalification; a successful
|
|
18
|
+
main job alone never authorizes publication. An unavailable branch-protection setting
|
|
19
|
+
is reported as unavailable, not inferred from signing or a green workflow.
|
|
@@ -93,6 +93,27 @@ export function requestedDeployment(request) {
|
|
|
93
93
|
/^(?:ativei\s+(?:o\s+hook|os\s+hooks)[, ]+)?(?:faca|realize|execute)\s+(?:as\s+validacoes\s+finais(?:\s+e\s+os\s+ajustes\s+necessarios)?|os\s+ajustes\s+necessarios)\s+(?:pra|para)\s+publicar\s+(?:a\s+)?v\d+\.\d+\b/.test(
|
|
94
94
|
withoutCourtesy,
|
|
95
95
|
);
|
|
96
|
+
const unit = "zero|um|uma|dois|duas|tres|quatro|cinco|seis|sete|oito|nove";
|
|
97
|
+
const shortPublication = new RegExp(
|
|
98
|
+
`^(?:boa, boa\\.\\s*)?(?:eu\\s+)?quero publicar\\s+(?:(?:a\\s+)?versao\\s+)?(?:v?((?:0|[1-9]\\d*)\\.(?:0|[1-9]\\d*))|(${unit})\\s+ponto\\s+(${unit}))(?:,?\\s+sim)?\\.?$`,
|
|
99
|
+
).exec(withoutCourtesy);
|
|
100
|
+
const unitValue = {
|
|
101
|
+
zero: "0",
|
|
102
|
+
um: "1",
|
|
103
|
+
uma: "1",
|
|
104
|
+
dois: "2",
|
|
105
|
+
duas: "2",
|
|
106
|
+
tres: "3",
|
|
107
|
+
quatro: "4",
|
|
108
|
+
cinco: "5",
|
|
109
|
+
seis: "6",
|
|
110
|
+
sete: "7",
|
|
111
|
+
oito: "8",
|
|
112
|
+
nove: "9",
|
|
113
|
+
};
|
|
114
|
+
const shortPublicationVersion = shortPublication
|
|
115
|
+
? (shortPublication[1] ?? `${unitValue[shortPublication[2]]}.${unitValue[shortPublication[3]]}`)
|
|
116
|
+
: null;
|
|
96
117
|
const waitsForAuthorization =
|
|
97
118
|
/\b(?:quando|se|apos|depois)\b[^?]*\b(?:autorizar|aprovar|confirmar|autorizacao|aprovacao|confirmacao)\b/.test(
|
|
98
119
|
text,
|
|
@@ -104,7 +125,8 @@ export function requestedDeployment(request) {
|
|
|
104
125
|
sequencedDirect ||
|
|
105
126
|
releaseDirective ||
|
|
106
127
|
proceedToVersion ||
|
|
107
|
-
finalAdjustmentsToPublish
|
|
128
|
+
finalAdjustmentsToPublish ||
|
|
129
|
+
shortPublicationVersion !== null;
|
|
108
130
|
if (!direct || /\?/.test(text) || waitsForAuthorization)
|
|
109
131
|
return { authorized: false, reason: "not-a-direct-deployment-request" };
|
|
110
132
|
const noRelease =
|
|
@@ -121,7 +143,8 @@ export function requestedDeployment(request) {
|
|
|
121
143
|
).test(text) ||
|
|
122
144
|
/^release\b/.test(withoutCourtesy) ||
|
|
123
145
|
releaseDirective ||
|
|
124
|
-
proceedToVersion
|
|
146
|
+
proceedToVersion ||
|
|
147
|
+
shortPublicationVersion !== null;
|
|
125
148
|
const nonPublication = text.replace(
|
|
126
149
|
/\bnao\s+(?:publique|publicar)\s+(?:(?:um|uma|o|a|novo|nova)\s+)*release\b/g,
|
|
127
150
|
"",
|
|
@@ -142,6 +165,7 @@ export function requestedDeployment(request) {
|
|
|
142
165
|
);
|
|
143
166
|
if (releaseDirective)
|
|
144
167
|
versions.push(/\bpreciso que crie (?:uma |a )?nova versao\s+v?(\d+\.\d+)\b/.exec(text)[1]);
|
|
168
|
+
if (shortPublicationVersion !== null) versions.push(shortPublicationVersion);
|
|
145
169
|
assert(new Set(versions).size <= 1, "Conflicting explicit release versions");
|
|
146
170
|
return {
|
|
147
171
|
authorized: true,
|
|
@@ -127,6 +127,28 @@ test("final adjustments with an explicit publication goal preserve the actual hu
|
|
|
127
127
|
assert.equal(prepare.phase, "prepare");
|
|
128
128
|
assert.equal(prepare.npm_publication, false);
|
|
129
129
|
});
|
|
130
|
+
test("short positive publication statements bind their stated version without promoting questions or conditions", () => {
|
|
131
|
+
const request = "Boa, boa. Eu quero publicar quatro ponto nove, sim";
|
|
132
|
+
for (const [utterance, version] of [
|
|
133
|
+
[request, "4.9"],
|
|
134
|
+
["Eu quero publicar quatro ponto oito, sim", "4.8"],
|
|
135
|
+
["Quero publicar a versão v5.0", "5.0"],
|
|
136
|
+
]) {
|
|
137
|
+
const plan = resolveDeployment(input(utterance, builder));
|
|
138
|
+
assert.equal(plan.mode, "release", utterance);
|
|
139
|
+
assert.equal(plan.phase, "publish", utterance);
|
|
140
|
+
assert.equal(plan.scope, "current-work", utterance);
|
|
141
|
+
assert.equal(plan.version, version, utterance);
|
|
142
|
+
}
|
|
143
|
+
for (const unsafe of [
|
|
144
|
+
`${request}?`,
|
|
145
|
+
"Boa, boa. Eu não quero publicar quatro ponto nove, sim",
|
|
146
|
+
`Se estiver pronto, ${request}`,
|
|
147
|
+
`O usuário disse '${request}'`,
|
|
148
|
+
"Eu quero publicar quatro ponto nove se vocês aprovarem",
|
|
149
|
+
])
|
|
150
|
+
assert.equal(resolveDeployment(input(unsafe, builder)).mode, "none", unsafe);
|
|
151
|
+
});
|
|
130
152
|
test("preferences are project-owned; one-shot overrides, scope and invalid config are explicit", () => {
|
|
131
153
|
const preference = { ...DEFAULT_POLICY, default_mode: "release" };
|
|
132
154
|
assert.equal(resolveDeployment(input("faça deploy", consumer, preference)).mode, "release");
|
|
@@ -220,19 +242,21 @@ test("commits route checks before push, sends the exact SHA and never creates re
|
|
|
220
242
|
assert.equal((await guardedCommits({ ...value, dryRun: true }, operations)).pushed, false);
|
|
221
243
|
assert.ok(!events.includes("preflight"));
|
|
222
244
|
});
|
|
223
|
-
test("critical builder commit
|
|
245
|
+
test("critical builder commit uses portable injected gates and fails closed if either is missing", async (t) => {
|
|
246
|
+
const root = await mkdtemp(join(tmpdir(), "zaip-critical-portable-"));
|
|
247
|
+
t.after(() => rm(root, { recursive: true, force: true }));
|
|
224
248
|
const current = input("faça deploy apenas commits", builder);
|
|
225
249
|
const sha = "a".repeat(40);
|
|
226
250
|
const events = [];
|
|
227
251
|
const value = {
|
|
228
|
-
repository:
|
|
252
|
+
repository: root,
|
|
229
253
|
request: current.request,
|
|
230
254
|
plan: resolveDeployment(current),
|
|
231
255
|
sha,
|
|
232
256
|
branch: "main",
|
|
233
257
|
checks: [{ command: "node", args: ["--test", "fixture.test.mjs"] }],
|
|
234
258
|
};
|
|
235
|
-
|
|
259
|
+
const operations = {
|
|
236
260
|
readInput: async () => current,
|
|
237
261
|
identity: () => {},
|
|
238
262
|
branchFor: async () => "main",
|
|
@@ -243,8 +267,17 @@ test("critical builder commit qualifies locally and waits for exact main CI", as
|
|
|
243
267
|
push: async () => events.push("main"),
|
|
244
268
|
remoteSha: async () => sha,
|
|
245
269
|
verifyMainCi: async () => events.push("main-ci"),
|
|
246
|
-
}
|
|
270
|
+
};
|
|
271
|
+
await guardedCommits(value, operations);
|
|
247
272
|
assert.deepEqual(events, ["checks", "preflight", "qualify", "main", "main-ci"]);
|
|
273
|
+
for (const missing of ["qualifyPreMain", "verifyMainCi"]) {
|
|
274
|
+
events.length = 0;
|
|
275
|
+
await assert.rejects(
|
|
276
|
+
guardedCommits(value, { ...operations, [missing]: undefined }),
|
|
277
|
+
/remote-candidate-gate\.mjs/,
|
|
278
|
+
);
|
|
279
|
+
assert.ok(!events.includes("main"), `${missing} must fail before push`);
|
|
280
|
+
}
|
|
248
281
|
});
|
|
249
282
|
test("critical Task in an earlier candidate commit requires candidate-bound proof", async (t) => {
|
|
250
283
|
const root = await mkdtemp(join(tmpdir(), "zaip-critical-range-"));
|
package/templates/.agents/skills/zaip-skill-github-deploy/scripts/github-deploy-contract.test.mjs
CHANGED
|
@@ -67,10 +67,7 @@ test("deploy guidance preserves canonical Task identity and builder-versus-consu
|
|
|
67
67
|
skill,
|
|
68
68
|
/verified builder means Release plus npm through Actions; a consumer means commits plus push/,
|
|
69
69
|
);
|
|
70
|
-
assert.match(
|
|
71
|
-
workflow,
|
|
72
|
-
/Preserve trabalho\/index concorrentes e causalidade de todos os commits publicados/,
|
|
73
|
-
);
|
|
70
|
+
assert.match(workflow, /Preserve trabalho, index, causalidade, SHA, integridade e autorização/);
|
|
74
71
|
});
|
|
75
72
|
|
|
76
73
|
test("framework deploy follows Release-triggered npm publication without claiming partial success", async () => {
|
|
@@ -124,10 +121,15 @@ test("deploy permission and reconciliation remain explicit and recoverable", asy
|
|
|
124
121
|
});
|
|
125
122
|
|
|
126
123
|
test("workflow retains the explicit publication routing contract", async () => {
|
|
127
|
-
const workflow = await
|
|
124
|
+
const [workflow, core, skill] = await Promise.all([
|
|
125
|
+
readFile(resolve(root, "rules", "workflow.md"), "utf8"),
|
|
126
|
+
readFile(resolve(root, "rules", "core.md"), "utf8"),
|
|
127
|
+
readFile(resolve(skillRoot, "SKILL.md"), "utf8"),
|
|
128
|
+
]);
|
|
128
129
|
assert.match(workflow, /\$zaip-skill-github-deploy/);
|
|
129
130
|
assert.match(workflow, /deploy-policy\.json/);
|
|
130
|
-
assert.match(
|
|
131
|
+
assert.match(core, /Escopo `current-work`/);
|
|
132
|
+
assert.match(skill, /Default scope is `current-work`/);
|
|
131
133
|
});
|
|
132
134
|
|
|
133
135
|
test("release guidance requires reviewed categorized notes and published-body readback", async () => {
|
|
@@ -134,9 +134,11 @@ export async function guardedCommits(input, operations = {}) {
|
|
|
134
134
|
input.sha,
|
|
135
135
|
input.remote ?? "origin",
|
|
136
136
|
));
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
// Portable callers can supply both gates; otherwise load the real gate before push.
|
|
138
|
+
const candidateGate =
|
|
139
|
+
critical && (!operations.qualifyPreMain || !operations.verifyMainCi)
|
|
140
|
+
? await import(pathToFileURL(resolve(root, "scripts/remote-candidate-gate.mjs")).href)
|
|
141
|
+
: null;
|
|
140
142
|
if (critical) {
|
|
141
143
|
await (operations.qualifyPreMain ?? candidateGate.qualifyLocalCandidate)({
|
|
142
144
|
repository: root,
|
|
@@ -42,6 +42,13 @@ the supplied ID and canonical record; never scan ordinary history to guess a tar
|
|
|
42
42
|
while the responsible root is active. A finalizer stop may close that root, so do not
|
|
43
43
|
send it an unfinished framework lock, failed local check, or outdated SHA evidence.
|
|
44
44
|
Rebind validation and independent review after each candidate-changing commit.
|
|
45
|
+
10. For a confirmed residual Git `index.lock`, use the official `git-lock recover --task TASK
|
|
46
|
+
--run RUN --decision DEC-HUMAN-ID --json` command before claiming a Task workspace.
|
|
47
|
+
The Decision must explicitly authorize this lock recovery. The command verifies the real
|
|
48
|
+
Git dir (including linked worktrees), a regular empty lock older than ten minutes,
|
|
49
|
+
no active Git process or operation marker, and a stable second stat; it moves the lock
|
|
50
|
+
to a verified backup. An inconclusive check refuses recovery. Preserve that backup
|
|
51
|
+
and report its path; use the existing Task workspace flow afterwards.
|
|
45
52
|
|
|
46
53
|
Use `$zaip-skill-reconcile-telemetry` only for missing observed usage after lifecycle
|
|
47
54
|
identity is correct; it is not a substitute for closure.
|
|
@@ -5,6 +5,12 @@ description: Create, refine, prepare, or analyze a ZAIP PRD on explicit PRD work
|
|
|
5
5
|
|
|
6
6
|
# Trabalhar com PRDs
|
|
7
7
|
|
|
8
|
+
Antes de promover um PRD novo, aplique o aceite binário `proportional-acceptance-v1` de `@zaip-ai/specs` conforme `docs/quality/production-readiness.md` via `zaip plan build --acceptance <contrato.json>` e valide o plano embutido. Registre por outcome obrigatório origem, aplicabilidade, resultado observável, prova suficiente, responsável e condição de parada. Só adicione obrigação ligada ao pedido, Requirement ativo ou risco concreto. Melhoria opcional não bloqueia a promoção; resultado ausente não é aprovação. Preserve snapshots anteriores até migração explícita versionada e atribuída.
|
|
9
|
+
|
|
10
|
+
Ao definir ACs, selecione testes de código e fluxos de dashboard pelo impacto; a
|
|
11
|
+
qualificação integral do pacote pertence ao candidato final antes da publicação.
|
|
12
|
+
Reuso de prova exige identidade e contrato ainda válidos.
|
|
13
|
+
|
|
8
14
|
PRD é opcional e permanece em Definição com `status: draft` durante criação, revisão, refinamento e `prepare`. Ter SPECs ou PreparedPlan válido não autoriza promoção.
|
|
9
15
|
|
|
10
16
|
## Limite de autoridade
|
|
@@ -5,10 +5,20 @@ description: Qualify a release candidate after deploy mode resolution or an expl
|
|
|
5
5
|
|
|
6
6
|
# Qualify a release candidate
|
|
7
7
|
|
|
8
|
+
For new release evaluations, use the versioned binary `proportional-acceptance-v1` contract in `@zaip-ai/specs` and `docs/quality/production-readiness.md` through `zaip plan acceptance --input <contract.json>`. This command only checks self-reported data and never authorizes publication; authenticated pipeline receipts remain the gate. Map each mandatory outcome to its origin, applicability, sufficient proof, owner and stop condition; bind release proof to the exact candidate. Optional improvements do not block. The historical technical grade remains informative and unchanged. Local qualification uses the declared Windows host; the GitHub Linux smoke is a remote publication check. Do not require local Docker, WSL or another OS by inference.
|
|
9
|
+
|
|
8
10
|
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
11
|
|
|
10
12
|
Preparation, verification and dry-run do not publish. The request's resolved route supplies publication authority separately.
|
|
11
13
|
|
|
14
|
+
For readiness grades, load `RULE-PRODUCTION-READINESS` and apply
|
|
15
|
+
`technical-essential-v1` from `docs/quality/production-readiness.md`. Grade 9
|
|
16
|
+
requires the six essential criteria; grade 10 adds reviewed concurrency,
|
|
17
|
+
process interruption/recovery and representative load. There is no minimum
|
|
18
|
+
observation period or production-cycle count. This technical assessment never
|
|
19
|
+
waives the distribution gates below, changes a historical audit, or proves
|
|
20
|
+
long-term stability. Keep operational history and publication status separate.
|
|
21
|
+
|
|
12
22
|
## Select the distribution surface
|
|
13
23
|
|
|
14
24
|
- 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`.
|
|
@@ -23,8 +33,16 @@ Local builder preparation defaults to signed `essential-v3`: deterministic sourc
|
|
|
23
33
|
|
|
24
34
|
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
35
|
|
|
36
|
+
For a multi-Task delivery, verify changed code and affected dashboard flows by
|
|
37
|
+
impact during the Tasks, integrate modified contracts, and run full package
|
|
38
|
+
qualification once against the final candidate before publication. Reuse
|
|
39
|
+
prior evidence only when candidate identity, environment and contract remain
|
|
40
|
+
valid; later changes revalidate affected proof.
|
|
41
|
+
|
|
26
42
|
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
43
|
|
|
44
|
+
Post-receipt rapid group reuse follows `docs/quality/v49-deploy-cache-controls.md`. Only a reviewed Git-versioned group proof may yield a HIT; promote a failed result as the latest tombstone before retry. This never replaces signed candidate qualification.
|
|
45
|
+
|
|
28
46
|
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
47
|
|
|
30
48
|
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.
|
|
@@ -43,6 +61,12 @@ Where the legacy path remains configured, retain its separate exact-candidate qu
|
|
|
43
61
|
|
|
44
62
|
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
63
|
|
|
64
|
+
Use eligible recovery before a terminal block: the three balanced replans use
|
|
65
|
+
Sol/high, Sol/high and Astra/high and each releases up to three repairs. A real
|
|
66
|
+
authority/access/capability blocker may stop earlier; do not manufacture three
|
|
67
|
+
attempts against an unchanged unavailable prerequisite. Keep the exhausted
|
|
68
|
+
ledger, actual findings and resume condition; never lower acceptance criteria.
|
|
69
|
+
|
|
46
70
|
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
71
|
|
|
48
72
|
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.
|
package/templates/.agents/skills/zaip-skill-release-qualification/references/local-preparation.md
CHANGED
|
@@ -121,6 +121,9 @@ doctor/SQLite/API smoke. It does not run browser navigation across every dashboa
|
|
|
121
121
|
exports. `--profile full` explicitly selects `full-v2`, which also runs the full source suite,
|
|
122
122
|
browser and XLSX qualification. Dense distribution checks belong to builder release; a normal
|
|
123
123
|
Change runs targeted validation, including installer/security regressions when directly impacted.
|
|
124
|
+
The essential source-size gate reports 401–800-line debt and stale warning ceilings as visible
|
|
125
|
+
warnings, while files above 800 lines and provenance or baseline tampering remain blocking.
|
|
126
|
+
The explicit `full-v2` profile keeps the strict source-size debt gate.
|
|
124
127
|
Individual process/test timeouts remain technical limits, not a Task wallclock or abandonment rule.
|
|
125
128
|
Retain failed-gate evidence and cleanup outcomes; a failed/timed-out gate emits no success receipt.
|
|
126
129
|
Receipts bind the selected profile and fixed gate list, so stale receipts require requalification.
|
|
@@ -131,9 +134,12 @@ critical baseline and affected consumers without a test-count cap. An unmapped i
|
|
|
131
134
|
an evidenced broader selection; it does not make every generic commits deploy run the full suite.
|
|
132
135
|
Rapid checks never prove full release qualification. Observe pending commands through the host's
|
|
133
136
|
wait mechanism instead of treating elapsed Task time as a result.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
Qualify the exact TGZ on the authorized local host and record its actual OS, Node patch
|
|
138
|
+
version and digest. The GitHub publisher performs the bounded Linux smoke on that same
|
|
139
|
+
digest before npm publication. A configured matrix is not proof that its jobs ran;
|
|
140
|
+
unavailable runtime execution remains unverified, never passed. The Windows/Linux
|
|
141
|
+
Node 22.16.0 and 24.x matrix remains historical v4.6 evidence, not a default gate
|
|
142
|
+
for each later release.
|
|
137
143
|
Reuse an existing output directory only with its complete valid signed candidate; an invalid cache
|
|
138
144
|
is refused. Choose a new output path after repair instead of deleting or overwriting evidence.
|
|
139
145
|
|
|
@@ -5,6 +5,13 @@ description: Create, refine, prepare, or analyze a technical ZAIP SPEC on explic
|
|
|
5
5
|
|
|
6
6
|
# Trabalhar com SPECs
|
|
7
7
|
|
|
8
|
+
Antes de promover uma SPEC ou sua DAG nova, avalie suficiência pelo contrato binário `proportional-acceptance-v1` de `@zaip-ai/specs` (`docs/quality/production-readiness.md`) via `zaip plan build --acceptance <contrato.json>` e valide o plano embutido. Cada AC obrigatório registra origem, aplicabilidade, resultado observável, prova suficiente, responsável e parada; toda dependência da DAG tem resultado verificável. Critério local fora do ambiente declarado falha no preparo. Pendência opcional não bloqueia; finding novo ou candidato alterado justifica outra rodada. Snapshots antigos só mudam por migração explícita versionada e atribuída.
|
|
9
|
+
|
|
10
|
+
Mapeie cada mudança da DAG a testes de código e aos fluxos de dashboard
|
|
11
|
+
afetados. Integre contratos modificados antes do release; qualifique o pacote
|
|
12
|
+
completo uma vez no candidato final antes de publicar, revalidando provas
|
|
13
|
+
atingidas por correções posteriores.
|
|
14
|
+
|
|
8
15
|
SPEC é opcional para trabalho técnico amplo; Task-first continua válida para uma mudança pontual. A SPEC permanece em Planejamento com `status: draft` durante criação, revisão, refinamento e `prepare`.
|
|
9
16
|
|
|
10
17
|
## Limite de autoridade
|
|
@@ -25,6 +32,8 @@ SPEC é opcional para trabalho técnico amplo; Task-first continua válida para
|
|
|
25
32
|
6. A criação, o rework e o prepare da SPEC exigem uma Run delegada e ativa do Rafa (`zaip-agent-builder`), com propósito `execution`, sob o orquestrador do turno raiz atual; passe essa Run em `--run`, ou em `--spec-run` quando a SPEC for materializada por `prd create --plan`. Não aceite replay histórico nem a Run da Bia como autoria técnica. Não crie registros Task, Change ou Execution antes de `ready|execute`; vincule sempre a Run realmente observada e o `creation_run_id` à SPEC e agregue telemetria somente quando observada ou reconciliada.
|
|
26
33
|
7. Depois de materialização, use rework rastreável e preserve snapshots/tentativas.
|
|
27
34
|
|
|
35
|
+
Para o defeito específico de versão de `pnpm` em snapshot já materializado, a [revisão controlada](../zaip-skill-execution/references/controlled-release-recovery.md) altera somente a versão comprovada em `package.json` e sua descrição, com Decision humana exata, revisão esperada e histórico de implementação. Não edite o frontmatter diretamente.
|
|
36
|
+
|
|
28
37
|
## Prepare
|
|
29
38
|
|
|
30
39
|
1. Valide referências, cobertura de AC, IDs, ciclos, conflitos de paralelismo, comandos de verificação e o snapshot de stack contra a configuração atual do projeto.
|
|
@@ -28,6 +28,21 @@ requires its relevant integrity and regression checks outside release. Consumer
|
|
|
28
28
|
its own project checks, without builder npm, signing-key or protected-policy requirements.
|
|
29
29
|
Preparation is evidence, never publication authority.
|
|
30
30
|
|
|
31
|
+
When defining PRD, SPEC and ACs, map each changed behavior to focused code
|
|
32
|
+
checks and dashboard flows actually affected. Integrate modified contracts
|
|
33
|
+
before release, then qualify the full package once on the final candidate
|
|
34
|
+
before publication. Reuse proof only when candidate identity, environment,
|
|
35
|
+
contract and impact still match; code checks do not establish served behavior.
|
|
36
|
+
|
|
37
|
+
For the 4.9 consolidation, the recovery Task proves changed code with focused
|
|
38
|
+
regressions, independent review and finalization. Operational collection and
|
|
39
|
+
project settings without served proof remain `unverified`. Integrate only
|
|
40
|
+
changed flows and contracts in the integration phase; run full package
|
|
41
|
+
qualification once on the final candidate before publication. Preserve exact
|
|
42
|
+
candidate and applicable critical assurance requirements. See Decisions
|
|
43
|
+
`DEC-AI-2026-10-03-22-18-TAREFA2-ACEITE-CODIGO-XFQFBLLYRN` and
|
|
44
|
+
`DEC-AI-2026-10-03-22-16-QUALIFICACAO-FINAL-UNICA-UPQGEC6JJV`.
|
|
45
|
+
|
|
31
46
|
Keep failure evidence and recover within the frozen Task profile. Balanced allows 10 executions
|
|
32
47
|
total and 3 replans; individual tests, tool calls and elapsed time are not executions, and a
|
|
33
48
|
continuation does not reset the ledger. Individual test/tool timeouts remain technical limits;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
4.
|
|
1
|
+
4.9
|