@cleocode/core 2026.10.27 → 2026.11.1-canary.3
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/binaries/README.md +30 -10
- package/dist/.source-stamp.json +4 -0
- package/dist/audit/reconstruct.d.ts.map +1 -1
- package/dist/audit/reconstruct.js +3 -13
- package/dist/audit/reconstruct.js.map +1 -1
- package/dist/build-provenance.json +2 -2
- package/dist/cloud/nexus-cloud.d.ts.map +1 -1
- package/dist/cloud/nexus-cloud.js +3 -3
- package/dist/cloud/nexus-cloud.js.map +1 -1
- package/dist/cloud/nexus-device.d.ts +1 -1
- package/dist/cloud/nexus-link.d.ts +18 -2
- package/dist/cloud/nexus-link.d.ts.map +1 -1
- package/dist/cloud/nexus-link.js +26 -6
- package/dist/cloud/nexus-link.js.map +1 -1
- package/dist/cloud/nexus-vault.d.ts.map +1 -1
- package/dist/cloud/nexus-vault.js +3 -9
- package/dist/cloud/nexus-vault.js.map +1 -1
- package/dist/decide/sites/registry.d.ts +40 -0
- package/dist/decide/sites/registry.d.ts.map +1 -1
- package/dist/decide/sites/registry.js +38 -0
- package/dist/decide/sites/registry.js.map +1 -1
- package/dist/docs/adr-allocator.d.ts +3 -3
- package/dist/docs/adr-allocator.d.ts.map +1 -1
- package/dist/docs/adr-allocator.js +8 -5
- package/dist/docs/adr-allocator.js.map +1 -1
- package/dist/docs/blob-consolidation.d.ts.map +1 -1
- package/dist/docs/blob-consolidation.js +3 -2
- package/dist/docs/blob-consolidation.js.map +1 -1
- package/dist/docs/derive-links.d.ts +12 -0
- package/dist/docs/derive-links.d.ts.map +1 -1
- package/dist/docs/derive-links.js +19 -0
- package/dist/docs/derive-links.js.map +1 -1
- package/dist/docs/doc-name-rule.d.ts +105 -0
- package/dist/docs/doc-name-rule.d.ts.map +1 -0
- package/dist/docs/doc-name-rule.js +212 -0
- package/dist/docs/doc-name-rule.js.map +1 -0
- package/dist/docs/docs-inconsistency-detector.d.ts.map +1 -1
- package/dist/docs/docs-inconsistency-detector.js +4 -3
- package/dist/docs/docs-inconsistency-detector.js.map +1 -1
- package/dist/docs/docs-ops.d.ts +27 -5
- package/dist/docs/docs-ops.d.ts.map +1 -1
- package/dist/docs/docs-ops.js +149 -17
- package/dist/docs/docs-ops.js.map +1 -1
- package/dist/docs/docs-read-model.d.ts +45 -15
- package/dist/docs/docs-read-model.d.ts.map +1 -1
- package/dist/docs/docs-read-model.js +22 -102
- package/dist/docs/docs-read-model.js.map +1 -1
- package/dist/docs/docs-update.d.ts.map +1 -1
- package/dist/docs/docs-update.js +8 -2
- package/dist/docs/docs-update.js.map +1 -1
- package/dist/docs/doctor.d.ts +71 -4
- package/dist/docs/doctor.d.ts.map +1 -1
- package/dist/docs/doctor.js +324 -23
- package/dist/docs/doctor.js.map +1 -1
- package/dist/docs/duplicate-check.d.ts +138 -0
- package/dist/docs/duplicate-check.d.ts.map +1 -0
- package/dist/docs/duplicate-check.js +286 -0
- package/dist/docs/duplicate-check.js.map +1 -0
- package/dist/docs/fetch-result.d.ts.map +1 -1
- package/dist/docs/fetch-result.js +27 -0
- package/dist/docs/fetch-result.js.map +1 -1
- package/dist/docs/import/scanner.d.ts +2 -0
- package/dist/docs/import/scanner.d.ts.map +1 -1
- package/dist/docs/import/scanner.js +3 -1
- package/dist/docs/import/scanner.js.map +1 -1
- package/dist/docs/lineage.d.ts +66 -0
- package/dist/docs/lineage.d.ts.map +1 -0
- package/dist/docs/lineage.js +190 -0
- package/dist/docs/lineage.js.map +1 -0
- package/dist/docs/modernize/apply.d.ts +139 -0
- package/dist/docs/modernize/apply.d.ts.map +1 -0
- package/dist/docs/modernize/apply.js +760 -0
- package/dist/docs/modernize/apply.js.map +1 -0
- package/dist/docs/modernize/guard.d.ts +92 -0
- package/dist/docs/modernize/guard.d.ts.map +1 -0
- package/dist/docs/modernize/guard.js +214 -0
- package/dist/docs/modernize/guard.js.map +1 -0
- package/dist/docs/modernize/index.d.ts +68 -0
- package/dist/docs/modernize/index.d.ts.map +1 -0
- package/dist/docs/modernize/index.js +97 -0
- package/dist/docs/modernize/index.js.map +1 -0
- package/dist/docs/modernize/judge.d.ts +85 -0
- package/dist/docs/modernize/judge.d.ts.map +1 -0
- package/dist/docs/modernize/judge.js +186 -0
- package/dist/docs/modernize/judge.js.map +1 -0
- package/dist/docs/modernize/plan.d.ts +77 -0
- package/dist/docs/modernize/plan.d.ts.map +1 -0
- package/dist/docs/modernize/plan.js +510 -0
- package/dist/docs/modernize/plan.js.map +1 -0
- package/dist/docs/modernize/restore.d.ts +41 -0
- package/dist/docs/modernize/restore.d.ts.map +1 -0
- package/dist/docs/modernize/restore.js +103 -0
- package/dist/docs/modernize/restore.js.map +1 -0
- package/dist/docs/modernize/rules.d.ts +197 -0
- package/dist/docs/modernize/rules.d.ts.map +1 -0
- package/dist/docs/modernize/rules.js +510 -0
- package/dist/docs/modernize/rules.js.map +1 -0
- package/dist/docs/modernize/store.d.ts +64 -0
- package/dist/docs/modernize/store.d.ts.map +1 -0
- package/dist/docs/modernize/store.js +390 -0
- package/dist/docs/modernize/store.js.map +1 -0
- package/dist/docs/publications-store.d.ts +16 -2
- package/dist/docs/publications-store.d.ts.map +1 -1
- package/dist/docs/publications-store.js +23 -2
- package/dist/docs/publications-store.js.map +1 -1
- package/dist/docs/publish-pr.d.ts.map +1 -1
- package/dist/docs/publish-pr.js +12 -1
- package/dist/docs/publish-pr.js.map +1 -1
- package/dist/docs/rot.d.ts +94 -0
- package/dist/docs/rot.d.ts.map +1 -0
- package/dist/docs/rot.js +298 -0
- package/dist/docs/rot.js.map +1 -0
- package/dist/docs/similarity-check.d.ts +2 -0
- package/dist/docs/similarity-check.d.ts.map +1 -1
- package/dist/docs/similarity-check.js +6 -49
- package/dist/docs/similarity-check.js.map +1 -1
- package/dist/docs/slug-rename.d.ts +84 -0
- package/dist/docs/slug-rename.d.ts.map +1 -0
- package/dist/docs/slug-rename.js +166 -0
- package/dist/docs/slug-rename.js.map +1 -0
- package/dist/docs/slug-similarity.d.ts +24 -0
- package/dist/docs/slug-similarity.d.ts.map +1 -0
- package/dist/docs/slug-similarity.js +63 -0
- package/dist/docs/slug-similarity.js.map +1 -0
- package/dist/docs/wikilinks.d.ts +20 -4
- package/dist/docs/wikilinks.d.ts.map +1 -1
- package/dist/docs/wikilinks.js +52 -7
- package/dist/docs/wikilinks.js.map +1 -1
- package/dist/docs/writer-registry.d.ts.map +1 -1
- package/dist/docs/writer-registry.js +33 -0
- package/dist/docs/writer-registry.js.map +1 -1
- package/dist/doctor/type-matrix-repair.d.ts +194 -0
- package/dist/doctor/type-matrix-repair.d.ts.map +1 -0
- package/dist/doctor/type-matrix-repair.js +662 -0
- package/dist/doctor/type-matrix-repair.js.map +1 -0
- package/dist/gateway-client/generated/index.d.ts +2 -2
- package/dist/gateway-client/generated/index.d.ts.map +1 -1
- package/dist/gateway-client/generated/index.js +1 -1
- package/dist/gateway-client/generated/index.js.map +1 -1
- package/dist/gateway-client/generated/namespaces.gen.d.ts +5 -0
- package/dist/gateway-client/generated/namespaces.gen.d.ts.map +1 -1
- package/dist/gateway-client/generated/namespaces.gen.js +6 -1
- package/dist/gateway-client/generated/namespaces.gen.js.map +1 -1
- package/dist/gateway-client/generated/sdk.gen.d.ts +21 -1
- package/dist/gateway-client/generated/sdk.gen.d.ts.map +1 -1
- package/dist/gateway-client/generated/sdk.gen.js +55 -0
- package/dist/gateway-client/generated/sdk.gen.js.map +1 -1
- package/dist/gateway-client/generated/types.gen.d.ts +222 -0
- package/dist/gateway-client/generated/types.gen.d.ts.map +1 -1
- package/dist/gc/gc-subsystem.d.ts +4 -0
- package/dist/gc/gc-subsystem.d.ts.map +1 -1
- package/dist/gc/gc-subsystem.js +16 -0
- package/dist/gc/gc-subsystem.js.map +1 -1
- package/dist/git/work-tree.d.ts +48 -0
- package/dist/git/work-tree.d.ts.map +1 -1
- package/dist/git/work-tree.js +63 -1
- package/dist/git/work-tree.js.map +1 -1
- package/dist/hooks/handlers/session-hooks.d.ts +5 -4
- package/dist/hooks/handlers/session-hooks.d.ts.map +1 -1
- package/dist/hooks/handlers/session-hooks.js +5 -21
- package/dist/hooks/handlers/session-hooks.js.map +1 -1
- package/dist/internal.d.ts +5 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +5 -1
- package/dist/internal.js.map +1 -1
- package/dist/memory/brain-doctor.d.ts.map +1 -1
- package/dist/memory/brain-doctor.js +6 -1
- package/dist/memory/brain-doctor.js.map +1 -1
- package/dist/memory/engine-compat.d.ts.map +1 -1
- package/dist/memory/engine-compat.js +6 -0
- package/dist/memory/engine-compat.js.map +1 -1
- package/dist/nexus/analyze-orchestrator.d.ts +24 -0
- package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
- package/dist/nexus/analyze-orchestrator.js +43 -5
- package/dist/nexus/analyze-orchestrator.js.map +1 -1
- package/dist/nexus/user-profile.d.ts +2 -1
- package/dist/nexus/user-profile.d.ts.map +1 -1
- package/dist/nexus/user-profile.js +13 -5
- package/dist/nexus/user-profile.js.map +1 -1
- package/dist/orchestrate/admission.d.ts +8 -0
- package/dist/orchestrate/admission.d.ts.map +1 -1
- package/dist/orchestrate/admission.js +3 -1
- package/dist/orchestrate/admission.js.map +1 -1
- package/dist/orchestrate/query-ops.d.ts.map +1 -1
- package/dist/orchestrate/query-ops.js +15 -4
- package/dist/orchestrate/query-ops.js.map +1 -1
- package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
- package/dist/orchestrate/spawn-ops.js +43 -2
- package/dist/orchestrate/spawn-ops.js.map +1 -1
- package/dist/orchestration/index.d.ts +6 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +3 -0
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/spawn-prompt.d.ts.map +1 -1
- package/dist/orchestration/spawn-prompt.js +3 -1
- package/dist/orchestration/spawn-prompt.js.map +1 -1
- package/dist/paths.d.ts +43 -1
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +51 -1
- package/dist/paths.js.map +1 -1
- package/dist/project-lifecycle.d.ts.map +1 -1
- package/dist/project-lifecycle.js +31 -0
- package/dist/project-lifecycle.js.map +1 -1
- package/dist/release/authorization.d.ts +156 -0
- package/dist/release/authorization.d.ts.map +1 -0
- package/dist/release/authorization.js +460 -0
- package/dist/release/authorization.js.map +1 -0
- package/dist/release/ci-evidence.d.ts +55 -4
- package/dist/release/ci-evidence.d.ts.map +1 -1
- package/dist/release/ci-evidence.js +251 -22
- package/dist/release/ci-evidence.js.map +1 -1
- package/dist/release/ci-run-evidence.d.ts +107 -0
- package/dist/release/ci-run-evidence.d.ts.map +1 -0
- package/dist/release/ci-run-evidence.js +234 -0
- package/dist/release/ci-run-evidence.js.map +1 -0
- package/dist/release/cut.d.ts +231 -0
- package/dist/release/cut.d.ts.map +1 -0
- package/dist/release/cut.js +775 -0
- package/dist/release/cut.js.map +1 -0
- package/dist/release/deploy-evidence.d.ts +173 -0
- package/dist/release/deploy-evidence.d.ts.map +1 -0
- package/dist/release/deploy-evidence.js +381 -0
- package/dist/release/deploy-evidence.js.map +1 -0
- package/dist/release/engine-ops.d.ts.map +1 -1
- package/dist/release/engine-ops.js +10 -4
- package/dist/release/engine-ops.js.map +1 -1
- package/dist/release/index.d.ts +3 -0
- package/dist/release/index.d.ts.map +1 -1
- package/dist/release/index.js +2 -0
- package/dist/release/index.js.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.d.ts.map +1 -1
- package/dist/release/invariants/archive-reason-invariant.js +4 -1
- package/dist/release/invariants/archive-reason-invariant.js.map +1 -1
- package/dist/release/open.d.ts.map +1 -1
- package/dist/release/open.js +2 -6
- package/dist/release/open.js.map +1 -1
- package/dist/release/plan.d.ts +34 -2
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +30 -6
- package/dist/release/plan.js.map +1 -1
- package/dist/release/preflight-skip.d.ts +4 -19
- package/dist/release/preflight-skip.d.ts.map +1 -1
- package/dist/release/preflight-skip.js +5 -110
- package/dist/release/preflight-skip.js.map +1 -1
- package/dist/release/reconcile-latest.d.ts +29 -0
- package/dist/release/reconcile-latest.d.ts.map +1 -0
- package/dist/release/reconcile-latest.js +71 -0
- package/dist/release/reconcile-latest.js.map +1 -0
- package/dist/release/reconcile.d.ts +3 -1
- package/dist/release/reconcile.d.ts.map +1 -1
- package/dist/release/reconcile.js +18 -6
- package/dist/release/reconcile.js.map +1 -1
- package/dist/release/release-published.d.ts +27 -0
- package/dist/release/release-published.d.ts.map +1 -0
- package/dist/release/release-published.js +35 -0
- package/dist/release/release-published.js.map +1 -0
- package/dist/release/tty-confirm.d.ts +23 -0
- package/dist/release/tty-confirm.d.ts.map +1 -0
- package/dist/release/tty-confirm.js +50 -0
- package/dist/release/tty-confirm.js.map +1 -0
- package/dist/remote/index.js +1 -1
- package/dist/remote/index.js.map +1 -1
- package/dist/resources/admission-ledger.d.ts +103 -1
- package/dist/resources/admission-ledger.d.ts.map +1 -1
- package/dist/resources/admission-ledger.js +200 -17
- package/dist/resources/admission-ledger.js.map +1 -1
- package/dist/resources/agent-lease.d.ts +82 -0
- package/dist/resources/agent-lease.d.ts.map +1 -0
- package/dist/resources/agent-lease.js +167 -0
- package/dist/resources/agent-lease.js.map +1 -0
- package/dist/resources/governor.d.ts +27 -1
- package/dist/resources/governor.d.ts.map +1 -1
- package/dist/resources/governor.js +88 -4
- package/dist/resources/governor.js.map +1 -1
- package/dist/resources/hook-footprint.d.ts +13 -1
- package/dist/resources/hook-footprint.d.ts.map +1 -1
- package/dist/resources/hook-footprint.js +33 -7
- package/dist/resources/hook-footprint.js.map +1 -1
- package/dist/resources/run-governed.d.ts +25 -0
- package/dist/resources/run-governed.d.ts.map +1 -1
- package/dist/resources/run-governed.js +44 -3
- package/dist/resources/run-governed.js.map +1 -1
- package/dist/sagas/reconcile.d.ts.map +1 -1
- package/dist/sagas/reconcile.js +11 -0
- package/dist/sagas/reconcile.js.map +1 -1
- package/dist/scaffold/ensure-dirs.d.ts.map +1 -1
- package/dist/scaffold/ensure-dirs.js +8 -6
- package/dist/scaffold/ensure-dirs.js.map +1 -1
- package/dist/security/override-cap-setting.d.ts +132 -0
- package/dist/security/override-cap-setting.d.ts.map +1 -1
- package/dist/security/override-cap-setting.js +88 -10
- package/dist/security/override-cap-setting.js.map +1 -1
- package/dist/security/owner-override-authority.d.ts.map +1 -1
- package/dist/security/owner-override-authority.js +5 -1
- package/dist/security/owner-override-authority.js.map +1 -1
- package/dist/selfimprove/draft-pr.d.ts.map +1 -1
- package/dist/selfimprove/draft-pr.js +4 -1
- package/dist/selfimprove/draft-pr.js.map +1 -1
- package/dist/session/engine-ops.d.ts.map +1 -1
- package/dist/session/engine-ops.js +4 -16
- package/dist/session/engine-ops.js.map +1 -1
- package/dist/sessions/briefing.d.ts +6 -0
- package/dist/sessions/briefing.d.ts.map +1 -1
- package/dist/sessions/briefing.js +34 -0
- package/dist/sessions/briefing.js.map +1 -1
- package/dist/sessions/session-end-snapshot-entry.js +2 -2
- package/dist/sessions/session-end-snapshot-entry.js.map +1 -1
- package/dist/sessions/session-end-snapshot.js +4 -4
- package/dist/sessions/session-end-snapshot.js.map +1 -1
- package/dist/skills/injection/token.d.ts.map +1 -1
- package/dist/skills/injection/token.js +3 -6
- package/dist/skills/injection/token.js.map +1 -1
- package/dist/skills/orchestrator/spawn.d.ts.map +1 -1
- package/dist/skills/orchestrator/spawn.js +3 -4
- package/dist/skills/orchestrator/spawn.js.map +1 -1
- package/dist/skills/propose-patch.d.ts.map +1 -1
- package/dist/skills/propose-patch.js +4 -1
- package/dist/skills/propose-patch.js.map +1 -1
- package/dist/spawn/branch-integration.d.ts.map +1 -1
- package/dist/spawn/branch-integration.js +5 -2
- package/dist/spawn/branch-integration.js.map +1 -1
- package/dist/store/attachment-repair.d.ts.map +1 -1
- package/dist/store/attachment-repair.js +5 -4
- package/dist/store/attachment-repair.js.map +1 -1
- package/dist/store/attachment-store.d.ts +6 -0
- package/dist/store/attachment-store.d.ts.map +1 -1
- package/dist/store/attachment-store.js +19 -2
- package/dist/store/attachment-store.js.map +1 -1
- package/dist/store/blob-ops.d.ts +1 -1
- package/dist/store/blob-ops.d.ts.map +1 -1
- package/dist/store/blob-ops.js +7 -3
- package/dist/store/blob-ops.js.map +1 -1
- package/dist/store/conduit-doc-history.d.ts +15 -1
- package/dist/store/conduit-doc-history.d.ts.map +1 -1
- package/dist/store/conduit-doc-history.js +16 -10
- package/dist/store/conduit-doc-history.js.map +1 -1
- package/dist/store/db-helpers.d.ts +29 -0
- package/dist/store/db-helpers.d.ts.map +1 -1
- package/dist/store/db-helpers.js +89 -1
- package/dist/store/db-helpers.js.map +1 -1
- package/dist/store/decision-adr-links.d.ts.map +1 -1
- package/dist/store/decision-adr-links.js +5 -2
- package/dist/store/decision-adr-links.js.map +1 -1
- package/dist/store/git-checkpoint.d.ts +11 -1
- package/dist/store/git-checkpoint.d.ts.map +1 -1
- package/dist/store/git-checkpoint.js +14 -3
- package/dist/store/git-checkpoint.js.map +1 -1
- package/dist/store/llmtxt-blob-adapter.d.ts.map +1 -1
- package/dist/store/llmtxt-blob-adapter.js +4 -1
- package/dist/store/llmtxt-blob-adapter.js.map +1 -1
- package/dist/store/schema/attachments.d.ts +7 -5
- package/dist/store/schema/attachments.d.ts.map +1 -1
- package/dist/store/schema/attachments.js +5 -2
- package/dist/store/schema/attachments.js.map +1 -1
- package/dist/store/session-store.d.ts.map +1 -1
- package/dist/store/session-store.js +6 -0
- package/dist/store/session-store.js.map +1 -1
- package/dist/store/sqlite-backup.d.ts +6 -1
- package/dist/store/sqlite-backup.d.ts.map +1 -1
- package/dist/store/sqlite-backup.js +9 -5
- package/dist/store/sqlite-backup.js.map +1 -1
- package/dist/store/sqlite-data-accessor.d.ts.map +1 -1
- package/dist/store/sqlite-data-accessor.js +63 -36
- package/dist/store/sqlite-data-accessor.js.map +1 -1
- package/dist/system/backup.d.ts +29 -0
- package/dist/system/backup.d.ts.map +1 -1
- package/dist/system/backup.js +240 -37
- package/dist/system/backup.js.map +1 -1
- package/dist/system/dependencies.d.ts +22 -0
- package/dist/system/dependencies.d.ts.map +1 -1
- package/dist/system/dependencies.js +49 -2
- package/dist/system/dependencies.js.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/system/health.js +23 -1
- package/dist/system/health.js.map +1 -1
- package/dist/task-work/claims.d.ts.map +1 -1
- package/dist/task-work/claims.js +14 -0
- package/dist/task-work/claims.js.map +1 -1
- package/dist/task-work/index.d.ts.map +1 -1
- package/dist/task-work/index.js +22 -0
- package/dist/task-work/index.js.map +1 -1
- package/dist/tasks/ac-coverage-gate.d.ts +27 -0
- package/dist/tasks/ac-coverage-gate.d.ts.map +1 -1
- package/dist/tasks/ac-coverage-gate.js +63 -28
- package/dist/tasks/ac-coverage-gate.js.map +1 -1
- package/dist/tasks/affected-packages.d.ts +26 -30
- package/dist/tasks/affected-packages.d.ts.map +1 -1
- package/dist/tasks/affected-packages.js +27 -50
- package/dist/tasks/affected-packages.js.map +1 -1
- package/dist/tasks/affected-scope.d.ts +13 -3
- package/dist/tasks/affected-scope.d.ts.map +1 -1
- package/dist/tasks/affected-scope.js +29 -11
- package/dist/tasks/affected-scope.js.map +1 -1
- package/dist/tasks/change-set.d.ts.map +1 -1
- package/dist/tasks/change-set.js +39 -20
- package/dist/tasks/change-set.js.map +1 -1
- package/dist/tasks/command-gate-cmd.d.ts +33 -0
- package/dist/tasks/command-gate-cmd.d.ts.map +1 -0
- package/dist/tasks/command-gate-cmd.js +45 -0
- package/dist/tasks/command-gate-cmd.js.map +1 -0
- package/dist/tasks/complete-ci.d.ts +9 -0
- package/dist/tasks/complete-ci.d.ts.map +1 -1
- package/dist/tasks/complete-ci.js +21 -4
- package/dist/tasks/complete-ci.js.map +1 -1
- package/dist/tasks/complete.d.ts.map +1 -1
- package/dist/tasks/complete.js +14 -0
- package/dist/tasks/complete.js.map +1 -1
- package/dist/tasks/component-pr.d.ts +37 -0
- package/dist/tasks/component-pr.d.ts.map +1 -1
- package/dist/tasks/component-pr.js +106 -14
- package/dist/tasks/component-pr.js.map +1 -1
- package/dist/tasks/done-plan.d.ts +14 -1
- package/dist/tasks/done-plan.d.ts.map +1 -1
- package/dist/tasks/done-plan.js +125 -15
- package/dist/tasks/done-plan.js.map +1 -1
- package/dist/tasks/done-record.d.ts.map +1 -1
- package/dist/tasks/done-record.js +4 -0
- package/dist/tasks/done-record.js.map +1 -1
- package/dist/tasks/engine-converters.d.ts.map +1 -1
- package/dist/tasks/engine-converters.js +2 -0
- package/dist/tasks/engine-converters.js.map +1 -1
- package/dist/tasks/evidence-tree.d.ts +28 -1
- package/dist/tasks/evidence-tree.d.ts.map +1 -1
- package/dist/tasks/evidence-tree.js +66 -2
- package/dist/tasks/evidence-tree.js.map +1 -1
- package/dist/tasks/evidence.d.ts +39 -27
- package/dist/tasks/evidence.d.ts.map +1 -1
- package/dist/tasks/evidence.js +382 -188
- package/dist/tasks/evidence.js.map +1 -1
- package/dist/tasks/gate-notes.d.ts +17 -0
- package/dist/tasks/gate-notes.d.ts.map +1 -1
- package/dist/tasks/gate-notes.js.map +1 -1
- package/dist/tasks/gate-preview.d.ts +7 -1
- package/dist/tasks/gate-preview.d.ts.map +1 -1
- package/dist/tasks/gate-preview.js +30 -4
- package/dist/tasks/gate-preview.js.map +1 -1
- package/dist/tasks/gate-runner.d.ts +42 -0
- package/dist/tasks/gate-runner.d.ts.map +1 -1
- package/dist/tasks/gate-runner.js +234 -94
- package/dist/tasks/gate-runner.js.map +1 -1
- package/dist/tasks/manifest-scope.d.ts +115 -0
- package/dist/tasks/manifest-scope.d.ts.map +1 -0
- package/dist/tasks/manifest-scope.js +352 -0
- package/dist/tasks/manifest-scope.js.map +1 -0
- package/dist/tasks/merge-close.d.ts +376 -0
- package/dist/tasks/merge-close.d.ts.map +1 -0
- package/dist/tasks/merge-close.js +1497 -0
- package/dist/tasks/merge-close.js.map +1 -0
- package/dist/tasks/qa-run-binding.d.ts +5 -0
- package/dist/tasks/qa-run-binding.d.ts.map +1 -1
- package/dist/tasks/qa-run-binding.js +6 -1
- package/dist/tasks/qa-run-binding.js.map +1 -1
- package/dist/tasks/req.d.ts.map +1 -1
- package/dist/tasks/req.js +29 -1
- package/dist/tasks/req.js.map +1 -1
- package/dist/tasks/review-verdict.d.ts +159 -0
- package/dist/tasks/review-verdict.d.ts.map +1 -0
- package/dist/tasks/review-verdict.js +442 -0
- package/dist/tasks/review-verdict.js.map +1 -0
- package/dist/tasks/task-reparent.d.ts.map +1 -1
- package/dist/tasks/task-reparent.js +22 -3
- package/dist/tasks/task-reparent.js.map +1 -1
- package/dist/tasks/test-report-counts.d.ts +274 -0
- package/dist/tasks/test-report-counts.d.ts.map +1 -0
- package/dist/tasks/test-report-counts.js +746 -0
- package/dist/tasks/test-report-counts.js.map +1 -0
- package/dist/tasks/test-run-binding.d.ts +20 -45
- package/dist/tasks/test-run-binding.d.ts.map +1 -1
- package/dist/tasks/test-run-binding.js +34 -119
- package/dist/tasks/test-run-binding.js.map +1 -1
- package/dist/tasks/update.d.ts.map +1 -1
- package/dist/tasks/update.js +42 -0
- package/dist/tasks/update.js.map +1 -1
- package/dist/tasks/verification-policy.d.ts +12 -0
- package/dist/tasks/verification-policy.d.ts.map +1 -1
- package/dist/tasks/verification-policy.js +13 -0
- package/dist/tasks/verification-policy.js.map +1 -1
- package/dist/tasks/workspace-resolution.d.ts +225 -0
- package/dist/tasks/workspace-resolution.d.ts.map +1 -0
- package/dist/tasks/workspace-resolution.js +497 -0
- package/dist/tasks/workspace-resolution.js.map +1 -0
- package/dist/validation/doctor/checks.d.ts +20 -0
- package/dist/validation/doctor/checks.d.ts.map +1 -1
- package/dist/validation/doctor/checks.js +112 -0
- package/dist/validation/doctor/checks.js.map +1 -1
- package/dist/validation/engine-ops.d.ts.map +1 -1
- package/dist/validation/engine-ops.js +37 -3
- package/dist/validation/engine-ops.js.map +1 -1
- package/dist/validation/validate-ops.d.ts +4 -0
- package/dist/validation/validate-ops.d.ts.map +1 -1
- package/dist/validation/validate-ops.js +79 -2
- package/dist/validation/validate-ops.js.map +1 -1
- package/dist/worktree/list.d.ts +4 -21
- package/dist/worktree/list.d.ts.map +1 -1
- package/dist/worktree/list.js +14 -44
- package/dist/worktree/list.js.map +1 -1
- package/dist/worktree/merged-cleanup.d.ts +63 -0
- package/dist/worktree/merged-cleanup.d.ts.map +1 -0
- package/dist/worktree/merged-cleanup.js +571 -0
- package/dist/worktree/merged-cleanup.js.map +1 -0
- package/dist/worktree/prune.d.ts +64 -2
- package/dist/worktree/prune.d.ts.map +1 -1
- package/dist/worktree/prune.js +151 -6
- package/dist/worktree/prune.js.map +1 -1
- package/dist/worktree/sentinel-index.d.ts +14 -0
- package/dist/worktree/sentinel-index.d.ts.map +1 -1
- package/dist/worktree/sentinel-index.js +17 -0
- package/dist/worktree/sentinel-index.js.map +1 -1
- package/dist/worktree/worktree-adopt.d.ts +1 -13
- package/dist/worktree/worktree-adopt.d.ts.map +1 -1
- package/dist/worktree/worktree-adopt.js +2 -17
- package/dist/worktree/worktree-adopt.js.map +1 -1
- package/package.json +12 -12
- package/schemas/project-context.schema.json +33 -0
- package/templates/CLEO-INJECTION.md +6 -16
- package/templates/CLEO-REFERENCE.md +27 -4
- package/templates/git-hooks/legacy-hashes.json +2 -1
- package/templates/git-hooks/pre-commit +43 -11
- package/templates/workflows/release-prepare.yml.tmpl +9 -88
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLEO Protocol
|
|
2
2
|
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.25.1 | CLI-only dispatch | `cleo <command> [args]`
|
|
4
4
|
|
|
5
5
|
<!-- CLEO-INJECTION:section=session-start -->
|
|
6
6
|
## Universal protocol
|
|
@@ -40,7 +40,7 @@ Everything else is one command away — print a section with `cleo briefing inje
|
|
|
40
40
|
1. `cleo current` or `cleo next` → pick task
|
|
41
41
|
2. `cleo focus {id}` → orient: identity + blockers + ready wave + docs + brain context
|
|
42
42
|
3. Check authority, coverage, and source evidence; do the work
|
|
43
|
-
4.
|
|
43
|
+
4. Close it. PR work: work on a branch, open a PR whose body has `Closes: T#### AC1,AC2` (`Refs:` for partial delivery), get a non-author per-AC verdict (`cleo review verdict`), merge on green `CI`; the merge sweep closes the task (ADR-099). No-PR work: `cleo done {id} --plan`, record what it names, then `cleo complete {id}`
|
|
44
44
|
5. `cleo next` → continue or end session
|
|
45
45
|
|
|
46
46
|
Discovery: `cleo find "query"` to search (default page 20; `--limit 0` for all), `cleo list --parent <id>` for direct children only — never bare `cleo list` for browsing. Create: `cleo add --type task --parent <epicId> --title "..." --acceptance "..."` (`--acceptance` is required on every task). Before editing a symbol: `cleo nexus impact <symbol>`; an empty footprint alone never establishes `NONE`.
|
|
@@ -55,8 +55,9 @@ Discovery: `cleo find "query"` to search (default page 20; `--limit 0` for all),
|
|
|
55
55
|
| Task acceptance criterion contains "test" | Propose an `AcceptanceGate` with `kind:"test"` via `cleo req add` |
|
|
56
56
|
| Session token budget ≈ 80% consumed | Run `cleo session end --note "..."` and hand off |
|
|
57
57
|
| Multiple related tasks ready in parallel | Run `cleo orchestrate ready <epicId>` for the wave set |
|
|
58
|
-
|
|
|
59
|
-
|
|
|
58
|
+
| Before merging a PR | `cleo done --from-merge <pr> --dry-run` checks its `Closes:`/`Refs:` lines against the store |
|
|
59
|
+
| No-PR work, about to call `cleo complete` | `cleo done <id> --plan`, record what it names, then complete |
|
|
60
|
+
| Writing a canonical doc (spec/adr/research/handoff/note/llm-readme) | Update the existing doc first (`cleo docs update <slug>`); else `cleo docs add --type <kind> --slug <kebab-handle>` — NEVER raw fs write to `.cleo/adrs/`, `.cleo/research/`, `.cleo/agent-outputs/`, or `docs/` |
|
|
60
61
|
| Reading an ADR/spec/research note/handoff | `cleo docs fetch <slug>` — never grep the filesystem for canonical docs |
|
|
61
62
|
| New device, restore or migration; known repo "Not inside a CLEO project"; unreachable registry path; nexus `ENOENT` | `cleo doctor global-delivery` (hub + skills resolve; `--repair`), `cleo doctor projects` (dry run; `--apply`/`--rollback <id>`), `cleo doctor project-identity`, `cleo doctor --all-projects`, `cleo nexus projects clean --orphans --dry-run` (`--dry-run` mandatory: it deletes moved projects), `cleo doctor credentials`; report. Never delete rows of projects that may have moved |
|
|
62
63
|
<!-- /CLEO-INJECTION:section=triggers -->
|
|
@@ -121,18 +122,7 @@ Missing output is equally inconclusive; teardown may hang after commit. **Never
|
|
|
121
122
|
<!-- CLEO-INJECTION:section=pre-complete-gate -->
|
|
122
123
|
## Pre-Complete Gate Ritual (ADR-051 — evidence required)
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
| gate | evidence that satisfies it |
|
|
127
|
-
|------|----------------------------|
|
|
128
|
-
| `implemented` | `commit:<sha>;files:path/a.ts,path/b.ts` — or `pr:<number>` with `files:<changed-paths>`, or `decision:<id>` for decision-only tasks |
|
|
129
|
-
| `testsPassed` | `ci:<pr>` if merged and `evidence.ciSatisfies`; else `tool:test-affected` (needs `testing.affectedCommand`), changed-file `test-run:<json>`, or `tool:test` |
|
|
130
|
-
| `qaPassed` | `ci:<pr>` likewise, else `tool:lint;tool:typecheck` or a `qa-run:<json>` per check |
|
|
131
|
-
| `documented` | `files:docs/spec.md` |
|
|
132
|
-
| `securityPassed` | `tool:security-scan` |
|
|
133
|
-
| `cleanupDone` | `note:removed dead branches` |
|
|
134
|
-
|
|
135
|
-
Name the acceptance criteria each result proves: `cleo verify T1234 --gate implemented --evidence "commit:abc123;files:src/fix.ts;satisfies:T1234#AC1"`. Record `testsPassed` and `qaPassed` separately with actual verification results and explicit criterion links. Documentation-only PRs cannot implement a code-fix task; changed criteria require fresh evidence, and a child waiver does not waive parent criteria. Then `cleo complete T###` re-validates every hard atom (commit reachable, file sha256, test-run hash); tampering → `E_EVIDENCE_STALE`. Typed gates, `pr:` rules, tool timeouts and the audited owner override: `cleo briefing inject --section evidence`. Typed gates execute only via `cleo verify --run`.
|
|
125
|
+
PR work: the merge sweep records `pr:`, `ci:` and reviewer-bound `satisfies:` when it closes a PR's `Closes:` tasks, so no agent step follows the merge (ADR-099). No-PR work, typed gates no CI job runs, and PRs merged before the sweep: `cleo done <id> --plan`, then record each gate it names with `cleo verify T### --gate <gate> --evidence "<atoms>;satisfies:T####AC1"` (bare `cleo verify --all` rejects with `E_EVIDENCE_MISSING`), then `cleo complete T###`, which re-validates every hard atom (tampering → `E_EVIDENCE_STALE`). Record `testsPassed` and `qaPassed` separately with actual verification results and explicit criterion links. Documentation-only PRs cannot implement a code-fix task; changed criteria require fresh evidence, and a child waiver does not waive parent criteria. Atoms per gate, typed gates (`cleo verify --run`), `pr:` rules and the audited owner override: `cleo briefing inject --section evidence`.
|
|
136
126
|
|
|
137
127
|
Anti-patterns: completing without running tests · self-attesting without programmatic proof · running tests by hand, then again via `tool:test` · modifying files between `cleo verify` and `cleo complete`.
|
|
138
128
|
<!-- /CLEO-INJECTION:section=pre-complete-gate -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# CLEO Protocol — on-demand reference
|
|
2
2
|
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.25.1 | Companion to the always-loaded `CLEO-INJECTION.md` core
|
|
4
4
|
|
|
5
5
|
Not injected into agent context. Print one section with `cleo briefing inject --section <name>`; tier-2 spawn prompts embed this whole file. Section names are the `CLEO-INJECTION:section` markers below.
|
|
6
6
|
|
|
@@ -264,7 +264,18 @@ Before dispatch, assert these required sections: `## Task Identity` · `## File
|
|
|
264
264
|
<!-- CLEO-INJECTION:section=evidence -->
|
|
265
265
|
## Evidence reference (ADR-051 · ADR-061)
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
| gate | evidence that satisfies it |
|
|
268
|
+
|------|----------------------------|
|
|
269
|
+
| `implemented` | `commit:<sha>;files:path/a.ts,path/b.ts` — or `pr:<number>` with `files:<changed-paths>`, or `decision:<id>` for decision-only tasks |
|
|
270
|
+
| `testsPassed` | `tool:test-affected` (needs `testing.affectedCommand`), changed-file `test-run:<json>`, `tool:test`, or `ci:<pr>` for a PR merged before the sweep (needs `evidence.ciSatisfies`) |
|
|
271
|
+
| `qaPassed` | `tool:lint;tool:typecheck`, a `qa-run:<json>` per check, or `ci:<pr>` likewise |
|
|
272
|
+
| `documented` | `files:docs/spec.md` |
|
|
273
|
+
| `securityPassed` | `tool:security-scan` |
|
|
274
|
+
| `cleanupDone` | `note:removed dead branches` |
|
|
275
|
+
|
|
276
|
+
Name the acceptance criteria each result proves: `cleo verify T1234 --gate implemented --evidence "commit:abc123;files:src/fix.ts;satisfies:T1234#AC1"`.
|
|
277
|
+
|
|
278
|
+
A merged PR closes the tasks its body names (`Closes: T#### AC1,AC2`; `Refs:` binds ACs without closing) once `CI` is green on its exact head and a non-author reviewer recorded `met` for each AC on that head (`cleo review verdict`). The merge sweep then records `pr:<n>;files:<changed paths>` and `ci:<n>` with those `satisfies:` links; the PR text never waives an AC (ADR-099). Preview with `cleo done --from-merge <pr> --dry-run`. For a hand-recorded `implemented`, pair `pr:<number>` with `files:<changed-paths>`; CLEO checks task linkage, complete changed-file coverage, and the actual merge commit's bytes. Documentation and research tasks may use appropriate documentary artifacts. The receipt retains criterion hashes, artifact paths, and result references. A valid child completion leaves any parent with unproven criteria open.
|
|
268
279
|
|
|
269
280
|
| Exit | Code | Fix |
|
|
270
281
|
|:----:|------|-----|
|
|
@@ -338,7 +349,7 @@ The evidence run is the one run. Start with `cleo done <id> --plan`, which picks
|
|
|
338
349
|
|
|
339
350
|
### `pr:<number>` retroactive atom (T9764)
|
|
340
351
|
|
|
341
|
-
`pr:` proves merge provenance, not completion. CLEO checks actual `mergeCommit`, task linkage and changed files; incomplete inventories or unavailable merge artifacts remain unverified. Fetch the merge commit before `files:` evidence. Task `files` must intersect its diff; prose mentions cannot establish scope. Explicit research/spike and documentation scope retain documentary evidence. Such a task owes `verification.requiredGatesByKind` for its kind (default: the required gates without `testsPassed`/`qaPassed`, T14001), but any non-document path its work touches restores the full code gates: `files:` paths, a `pr:` atom's changed files (a legacy atom without them counts as code), a `commit:` diff, any branch whose name cites the task (`task/`, `feat/`, `fix/`, …), default-branch commits whose subject cites it (merges, squash merges, direct commits), and merged PRs from such a branch. Work CLEO cannot inspect (no origin default branch, a failed GitHub lookup, an unreadable commit) counts as code, and `cleo complete` and `cleo done --plan` say why. A README, LICENSE or CHANGELOG counts as a document only when bare or with a document extension, and a bare `.txt` never does.
|
|
352
|
+
`pr:` proves merge provenance, not completion. Work that shipped under another task's PR is credited with that PR plus `satisfies:<id>#AC<n>` for the criteria it delivers (T14094): each named criterion must name files the PR changed and must predate its merge; a task another task fully covers is closed with `cleo cancel <id> --reason "covered by T<n>"` and `cleo relates add <id> T<n> duplicates "<reason>"`. CLEO checks actual `mergeCommit`, task linkage and changed files; incomplete inventories or unavailable merge artifacts remain unverified. Fetch the merge commit before `files:` evidence. Task `files` must intersect its diff; prose mentions cannot establish scope. Explicit research/spike and documentation scope retain documentary evidence. Such a task owes `verification.requiredGatesByKind` for its kind (default: the required gates without `testsPassed`/`qaPassed`, T14001), but any non-document path its work touches restores the full code gates: `files:` paths, a `pr:` atom's changed files (a legacy atom without them counts as code), a `commit:` diff, any branch whose name cites the task (`task/`, `feat/`, `fix/`, …), default-branch commits whose subject cites it (merges, squash merges, direct commits), and merged PRs from such a branch. Work CLEO cannot inspect (no origin default branch, a failed GitHub lookup, an unreadable commit) counts as code, and `cleo complete` and `cleo done --plan` say why. A README, LICENSE or CHANGELOG counts as a document only when bare or with a document extension, and a bare `.txt` never does.
|
|
342
353
|
|
|
343
354
|
A task PR merged into an integration branch is a component: `pr:<component>@<integration>` (and `ci:<component>@<integration>`) takes the merge commit and CI from the integration PR that landed it, and the task linkage and changed files from the component PR — only its files that survive the integration merge, never the whole integration diff (T12671). `cleo done` derives this from either PR number. A file a later change also edited still counts while the component's own hunks apply to the landed version. A component that only deleted files implements with `pr:<component>@<integration>;note:<deleted paths>`, because a deletion has no bytes for `files:`. A PR merged directly into the default branch that only deleted files implements with `pr:<number>;note:<deleted paths>` (T14024). Its note is a comma-separated list of the deleted paths, optionally after a label ending at the first `:` — `note:dropped old schema: db/schema.ts, db/relations.ts`; there is no other prose in it. Every listed path must be one the PR deleted (absent from its merged tree) that is still absent at HEAD; a path it did not delete, or one that exists again at HEAD, is refused by name, and the refusal quotes the paths it parsed. Every `note:` atom in that evidence write is read as such a list, so do not add a second, explanatory note: its words are refused as paths the PR did not delete. Put the explanation in the label instead. The component form's note stays free-form.
|
|
344
355
|
|
|
@@ -350,9 +361,21 @@ With `evidence.ciSatisfies: true`, `ci:<number>` attests `testsPassed`/`qaPassed
|
|
|
350
361
|
|
|
351
362
|
Required checks: explicit configuration or target repository protection. `release.prRequiredWorkflows: []` requires no checks; it proves neither testing nor review. `.cleo/cache/evidence/pr-<num>.json` retains provenance and changed files; obsolete versions reject. Use `tool:test-affected` when `testing.affectedCommand` is configured (a full `tool:test` then only for root-config changes, which affected planning refuses), otherwise a targeted `test-run:<json>` or `tool:test`, plus appropriate QA tools, linking each result to verified criteria.
|
|
352
363
|
|
|
364
|
+
**Merged work with no required CI (T14163).** `pr:<n>` proves provenance only: it never satisfies `testsPassed` or `qaPassed`, with or without required workflows; tests need a run. A change whose only paths outside every workspace package are the root `package.json` (dependency fields only) and `pnpm-lock.yaml` is otherwise workspace-wide, so with no `ci:` route only the whole suite would speak for it. After the merge it is scoped instead: a targeted `test-run:` recorded on the default branch after the merge (the T13673 stand-in) covers it when it passes a test file in every package whose lockfile importer the merge changed, the root importer counting as every package, plus their dependents and the change's own packages. The stand-in names the importers (`manifestScoped`). Anything the lockfile diff cannot attribute to a changed importer (settings, overrides, catalogs, a package no changed importer reaches), any other root `package.json` field such as `scripts`, and other lockfiles keep the change workspace-wide.
|
|
365
|
+
|
|
366
|
+
### `deploy:` probed-deployment atom (T14083)
|
|
367
|
+
|
|
368
|
+
`deploy:<provider>/<deploymentId>@<sha>|<probe-url>` proves a deployment of `<sha>` (e.g. `deploy:railway/dpl_9f3c@1a2b3c4d|https://api.example.com/health`). At verify CLEO itself runs one bounded GET of the probe URL (10 s, first 64 KiB of the body): it must return 2xx and name the deployed SHA (full or a 7+ character prefix) in an `X-Commit` or `X-Version` response header or in the body. A probe naming no SHA is refused with that fix, and a bare 2xx never stands in. A probe URL whose path or query names the SHA is refused before it is sent, since an endpoint that echoes its request would name it without proving which build is live; a 5xx, a timeout, an unreachable host or a probe naming another commit is refused too. The atom records the status, probe time and a sha256 of the body read, and the deployed SHA resolved in git. That SHA must contain the task's implemented commits (an ancestor or a patch-equivalent copy, the T13003 rule); `cleo complete` re-checks that containment only and never re-probes. For `railway`, CLEO also asks Railway's API, with the user's own token from the environment (`RAILWAY_API_TOKEN`, sent as Bearer, or `RAILWAY_TOKEN`, a project token; read at verify, never stored), that the deployment exists, is the live one, and was built from exactly that commit; any mismatch refuses and names the deployment and both commits (T14091). For other providers, or without a credential, the probe alone stands and the atom records `providerCheck: { verified: false, reason }`.
|
|
369
|
+
|
|
370
|
+
The atom satisfies only the gates the project lists in `evidence.deploySatisfies` (e.g. `"evidence": { "deploySatisfies": ["documented"] }`). There is no default mapping: unset or empty, `deploy:` is refused and satisfies nothing, and it never stands for `testsPassed` unless that gate is listed.
|
|
371
|
+
|
|
372
|
+
### `ci-run:` repeated run in CI (T14149)
|
|
373
|
+
|
|
374
|
+
A criterion that needs a heavy or repeated run (e.g. "50 consecutive runs pass") is proven in CI, never waived or run on the owner's machine. Dispatch `gh workflow run repeat-run.yml -f test=<repo-relative test file> -f runs=50` on the default branch; it runs that file N times and fails on the first failing run. Then record `ci-run:<runId>` in the same write as the gate's other evidence, e.g. `cleo verify T### --gate testsPassed --evidence "ci:<pr>;ci-run:<runId>;satisfies:T####AC2"`. CLEO reads the run from GitHub: it must be `repeat-run.yml`, dispatched on the default branch, with its latest attempt green. Its uploaded report must match its title (same test file, count and commit, every run green). Its commit must contain the task's implemented work. The repeated test must be a file the task changed, or one a linked criterion names. `ci-run:` links criteria; it never satisfies `testsPassed` on its own. `cleo complete` re-reads the run and refuses a newer attempt that is not green.
|
|
375
|
+
|
|
353
376
|
### CLEO config and generated clients in targeted test evidence (T13778 · T13783)
|
|
354
377
|
|
|
355
|
-
A change to CLEO's own config (`.cleo/project-context.json`, `.cleo/config.json`) never makes a change workspace-wide. `tool:config-schema` validates those files against CLEO's schema, and a targeted run covers the rest, composed in one write: `--evidence "test-run:<report>;tool:config-schema"` (or `qa-run:` receipts for `qaPassed`). Neither stands alone. A test-run that left config to config-schema needs it, and a config-schema result on a change with other paths needs another result for them, so a config edit never hides an untested source change. For an already-merged change, name the task's own merge: `commit:<sha>;tool:config-schema` (a commit recorded on its `implemented` gate) or `pr:<n>;tool:config-schema`; any other commit is refused, and after the merge config-schema never carries the change's code files. When a change edits `.cleo/project-context.json`, evidence reads its test, lint and typecheck commands from the default branch's copy, so a change cannot relax its own checks.
|
|
378
|
+
A change to CLEO's own config (`.cleo/project-context.json`, `.cleo/config.json`) never makes a change workspace-wide. `tool:config-schema` validates those files against CLEO's schema, and a targeted run covers the rest, composed in one write: `--evidence "test-run:<report>;tool:config-schema"` (or `qa-run:` receipts for `qaPassed`). Neither stands alone. A test-run that left config to config-schema needs it, and a config-schema result on a change with other paths needs another result for them, so a config edit never hides an untested source change. For an already-merged change, name the task's own merge: `commit:<sha>;tool:config-schema` (a commit recorded on its `implemented` gate) or `pr:<n>;tool:config-schema`; any other commit is refused, and after the merge config-schema never carries the change's code files. When a change edits `.cleo/project-context.json`, evidence reads its test, lint and typecheck commands from the default branch's copy, so a change cannot relax its own checks. A change is its commits against the default branch plus uncommitted tracked edits, including staged and `git add -N` files. An untracked file never widens it: `cleo done --plan` names each one under `untrackedSetAside`, the evidence records them, and `cleo complete` refuses that evidence once one is committed. Stage a new file the task created (`git add`, or `git add -N`) before the run so it counts.
|
|
356
379
|
|
|
357
380
|
Generated clients and seed data (owner decision, T13783): `evidence.typecheckOnlyDependents` lists repo globs, read from the default branch only and never guessed from names (a generated client: `lib/api-zod/**`; seed or data files: `lib/db/src/seed-data/**`, T13786; a catch-all glob such as `**` is ignored with a warning). A changed package whose every changed path matches is typecheck-only (test files edited beside the data are left out of that judgement and must be run), and a package that depends on the change ONLY through typecheck-only packages owes a typecheck instead of a test file: a whole-project `tool:typecheck`, or a qa-run typecheck receipt whose roots hold it, in the same `testsPassed` write. The trust boundary: the typecheck proves the dependent still compiles against the regenerated code, not that its behaviour is unchanged. A dependent whose own source changed, or that also depends on another changed package, still owes tests, and the run must pass every changed package's tests and every edited test file. A typecheck or lint `tool:` result is never a test run: it neither carries `testsPassed` alone nor exempts scoped evidence from post-merge supersession.
|
|
358
381
|
<!-- /CLEO-INJECTION:section=evidence -->
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"52046b0d489bf6f3ef00e5a4c4b09a4cc1a25531ee70ae07dfad55ff6e2d26dc",
|
|
12
12
|
"5ad02ab6d7f5b515a219af8f7d058b6e1a0d4e3f1d730b9147bce64b7a96a7b4",
|
|
13
13
|
"dfec66f4d0a420dfce49d142995b3554a2af44b25b140f2cb6acc739a3fde89e",
|
|
14
|
-
"f809a52be3f180c6d6913597460b480f12307f7036f87cdf7a42a0010ade7013"
|
|
14
|
+
"f809a52be3f180c6d6913597460b480f12307f7036f87cdf7a42a0010ade7013",
|
|
15
|
+
"9bf703257c82b714bf1e861558a3ab9aed0522f89036a30c249258e12f17e792"
|
|
15
16
|
],
|
|
16
17
|
"pre-push": [
|
|
17
18
|
"8a48d9672f27ae1ea9ebc40d7181ab737a1889e32b451594ba30ac7c2558c07c",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# Pre-commit guardrails:
|
|
4
4
|
# 1. Reject SQLite WAL/SHM files (data corruption risk).
|
|
5
5
|
# 2. Block commits when core CLEO files are gitignored (data integrity).
|
|
6
|
+
# 3. Refuse CLEO runtime state staged at ANY path (T14189).
|
|
6
7
|
#
|
|
7
8
|
# Installation: Automatically installed via `cleo init`
|
|
8
9
|
|
|
@@ -44,18 +45,49 @@ if [ -n "$IGNORED_CORE" ]; then
|
|
|
44
45
|
exit 1
|
|
45
46
|
fi
|
|
46
47
|
|
|
47
|
-
# ── 3. Block staging of
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
|
|
48
|
+
# ── 3. Block staging of CLEO runtime state at ANY path (T14189) ─────
|
|
49
|
+
# cleo.db / brain.db / tasks.db (and their WAL files), project-info.json
|
|
50
|
+
# carrying a "projectId", and a config.json byte-identical to
|
|
51
|
+
# .cleo/config.json must NEVER be committed: ADR-013 §9 (T5158 data-loss
|
|
52
|
+
# vector), and T14189 (a cleo call inside a git hook once staged .cleo state
|
|
53
|
+
# files into this index as ROOT paths). `cleo doctor` runs the same rule.
|
|
54
|
+
LEAKED=""
|
|
55
|
+
CLEO_CONFIG_BLOB=""
|
|
56
|
+
if [ -f .cleo/config.json ]; then
|
|
57
|
+
CLEO_CONFIG_BLOB=$(git hash-object .cleo/config.json 2>/dev/null || true)
|
|
58
|
+
fi
|
|
59
|
+
STAGED_RAW=$(git -c core.quotePath=false diff --cached --raw --no-abbrev --no-renames --diff-filter=d)
|
|
60
|
+
TAB=$(printf '\t')
|
|
61
|
+
while IFS= read -r line; do
|
|
62
|
+
[ -n "$line" ] || continue
|
|
63
|
+
meta=${line%%"$TAB"*}
|
|
64
|
+
path=${line#*"$TAB"}
|
|
65
|
+
blob=$(echo "$meta" | awk '{print $4}')
|
|
66
|
+
case "${path##*/}" in
|
|
67
|
+
cleo.db|cleo.db-wal|cleo.db-shm|cleo.db-journal|\
|
|
68
|
+
brain.db|brain.db-wal|brain.db-shm|brain.db-journal|\
|
|
69
|
+
tasks.db|tasks.db-wal|tasks.db-shm|tasks.db-journal)
|
|
70
|
+
LEAKED="$LEAKED $path" ;;
|
|
71
|
+
project-info.json)
|
|
72
|
+
if git cat-file -p "$blob" 2>/dev/null | grep -q '"projectId"'; then
|
|
73
|
+
LEAKED="$LEAKED $path"
|
|
74
|
+
fi ;;
|
|
75
|
+
config.json)
|
|
76
|
+
if [ "$path" = ".cleo/config.json" ] || { [ -n "$CLEO_CONFIG_BLOB" ] && [ "$blob" = "$CLEO_CONFIG_BLOB" ]; }; then
|
|
77
|
+
LEAKED="$LEAKED $path"
|
|
78
|
+
fi ;;
|
|
79
|
+
esac
|
|
80
|
+
done <<EOF_STAGED
|
|
81
|
+
$STAGED_RAW
|
|
82
|
+
EOF_STAGED
|
|
51
83
|
|
|
52
|
-
if [ -n "$
|
|
53
|
-
echo "ERROR: Refusing to commit
|
|
54
|
-
echo "$
|
|
84
|
+
if [ -n "$LEAKED" ]; then
|
|
85
|
+
echo "ERROR: Refusing to commit CLEO runtime state (ADR-013 §9, T14189):"
|
|
86
|
+
for f in $LEAKED; do echo " $f"; done
|
|
55
87
|
echo ""
|
|
56
|
-
echo "These
|
|
57
|
-
echo "
|
|
58
|
-
echo "
|
|
59
|
-
echo "To fix: git
|
|
88
|
+
echo "These are .cleo runtime files (databases, project identity, config)"
|
|
89
|
+
echo "that must never be tracked; committing them re-opens the T5158"
|
|
90
|
+
echo "data-loss vector."
|
|
91
|
+
echo "To fix: git reset -q --$LEAKED"
|
|
60
92
|
exit 1
|
|
61
93
|
fi
|
|
@@ -60,13 +60,8 @@ on:
|
|
|
60
60
|
type: boolean
|
|
61
61
|
required: false
|
|
62
62
|
default: false
|
|
63
|
-
skip-macos-tests:
|
|
64
|
-
description: 'Skip the macOS test shards in Preflight (set by `cleo release open` only when the nightly macOS run for this exact commit is green).'
|
|
65
|
-
type: boolean
|
|
66
|
-
required: false
|
|
67
|
-
default: false
|
|
68
63
|
verified-sha:
|
|
69
|
-
description: 'Commit the skip-tests
|
|
64
|
+
description: 'Commit the skip-tests decision was verified against. REQUIRED for any skip: when empty, or when the run checks out a different commit (main moved after the check), every skip is ignored and all tests run.'
|
|
70
65
|
type: string
|
|
71
66
|
required: false
|
|
72
67
|
skip-reason:
|
|
@@ -133,7 +128,6 @@ jobs:
|
|
|
133
128
|
timeout-minutes: 3
|
|
134
129
|
outputs:
|
|
135
130
|
run-linux-tests: ${{ steps.tests.outputs.linux }}
|
|
136
|
-
run-macos-tests: ${{ steps.tests.outputs.macos }}
|
|
137
131
|
reused-ci-run-url: ${{ steps.tests.outputs.reused_url }}
|
|
138
132
|
steps:
|
|
139
133
|
- uses: actions/checkout@v4
|
|
@@ -154,7 +148,6 @@ jobs:
|
|
|
154
148
|
id: tests
|
|
155
149
|
env:
|
|
156
150
|
SKIP_TESTS: ${{ inputs.skip-tests }}
|
|
157
|
-
SKIP_MACOS_TESTS: ${{ inputs.skip-macos-tests }}
|
|
158
151
|
VERIFIED_SHA: ${{ inputs.verified-sha }}
|
|
159
152
|
SKIP_REASON: ${{ inputs.skip-reason }}
|
|
160
153
|
REUSED_RUN: ${{ inputs.reused-ci-run }}
|
|
@@ -202,11 +195,10 @@ jobs:
|
|
|
202
195
|
' "$dir" "$HEAD_SHA" "$DEFAULT_BRANCH"
|
|
203
196
|
}
|
|
204
197
|
linux=true
|
|
205
|
-
macos=true
|
|
206
198
|
note=""
|
|
207
199
|
reused_url=""
|
|
208
200
|
skip_requested=false
|
|
209
|
-
if [ "$SKIP_TESTS" = "true" ]
|
|
201
|
+
if [ "$SKIP_TESTS" = "true" ]; then skip_requested=true; fi
|
|
210
202
|
if [ "$skip_requested" = "true" ] && [ -z "$VERIFIED_SHA" ]; then
|
|
211
203
|
# A skip is a claim that CI already tested THIS tree. Without the
|
|
212
204
|
# commit it was verified against, nothing ties the claim to what
|
|
@@ -225,10 +217,8 @@ jobs:
|
|
|
225
217
|
note="skip-tests was requested, but reused-ci-run does not prove this commit's Linux shards: $verdict. Ignoring it: the Linux shards run."
|
|
226
218
|
fi
|
|
227
219
|
fi
|
|
228
|
-
if [ "$SKIP_MACOS_TESTS" = "true" ]; then macos=false; fi
|
|
229
220
|
fi
|
|
230
221
|
echo "linux=$linux" >> "$GITHUB_OUTPUT"
|
|
231
|
-
echo "macos=$macos" >> "$GITHUB_OUTPUT"
|
|
232
222
|
echo "reused_url=$reused_url" >> "$GITHUB_OUTPUT"
|
|
233
223
|
describe() { if [ "$1" = "true" ]; then echo "runs"; else echo "skipped"; fi; }
|
|
234
224
|
{
|
|
@@ -237,7 +227,6 @@ jobs:
|
|
|
237
227
|
echo "| suite | decision |"
|
|
238
228
|
echo "|---|---|"
|
|
239
229
|
echo "| Linux test shards | $(describe "$linux") |"
|
|
240
|
-
echo "| macOS test shards | $(describe "$macos") |"
|
|
241
230
|
echo ""
|
|
242
231
|
echo "Commit: \`$HEAD_SHA\`"
|
|
243
232
|
if [ -n "$VERIFIED_SHA" ]; then echo "Skips verified against: \`$VERIFIED_SHA\`"; fi
|
|
@@ -245,7 +234,7 @@ jobs:
|
|
|
245
234
|
if [ -n "$SKIP_REASON" ]; then echo ""; echo "Reason: $SKIP_REASON"; fi
|
|
246
235
|
if [ -n "$note" ]; then echo ""; echo "**$note**"; fi
|
|
247
236
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
248
|
-
echo "linux tests: $(describe "$linux"); macOS tests:
|
|
237
|
+
echo "linux tests: $(describe "$linux"); macOS tests: never on the release path (T14104)"
|
|
249
238
|
if [ -n "$note" ]; then echo "::warning::$note"; fi
|
|
250
239
|
- name: A scoped dispatch needs a committed plan
|
|
251
240
|
run: |
|
|
@@ -399,76 +388,11 @@ jobs:
|
|
|
399
388
|
# could not be prepared from a release-ready commit.
|
|
400
389
|
timeout-minutes: 55
|
|
401
390
|
|
|
402
|
-
#
|
|
403
|
-
#
|
|
404
|
-
#
|
|
405
|
-
#
|
|
406
|
-
#
|
|
407
|
-
# shards and a generous ceiling; retry=2 matches ci.yml's macOS shards.
|
|
408
|
-
preflight-test-macos:
|
|
409
|
-
name: Preflight (macOS test shard ${{ matrix.shard }}/8)
|
|
410
|
-
if: ${{ needs.dispatch-preconditions.outputs.run-macos-tests == 'true' }}
|
|
411
|
-
needs: [dispatch-preconditions]
|
|
412
|
-
runs-on: macos-latest
|
|
413
|
-
timeout-minutes: 90
|
|
414
|
-
strategy:
|
|
415
|
-
fail-fast: true
|
|
416
|
-
matrix:
|
|
417
|
-
shard: [1, 2, 3, 4, 5, 6, 7, 8]
|
|
418
|
-
steps:
|
|
419
|
-
- name: Checkout
|
|
420
|
-
uses: actions/checkout@v4
|
|
421
|
-
with:
|
|
422
|
-
fetch-depth: 0
|
|
423
|
-
timeout-minutes: 5
|
|
424
|
-
|
|
425
|
-
- name: Set up pnpm
|
|
426
|
-
uses: pnpm/action-setup@v4
|
|
427
|
-
timeout-minutes: 2
|
|
428
|
-
|
|
429
|
-
- name: Set up Node.js
|
|
430
|
-
uses: actions/setup-node@v4
|
|
431
|
-
with:
|
|
432
|
-
node-version: '{{NODE_VERSION}}'
|
|
433
|
-
timeout-minutes: 3
|
|
434
|
-
|
|
435
|
-
- name: Build worktree-napi native addon BEFORE pnpm install (T9982)
|
|
436
|
-
# Same reason as the Linux shards: the file: link to crates/worktree-napi
|
|
437
|
-
# only copies .node artifacts that exist at install time.
|
|
438
|
-
shell: bash
|
|
439
|
-
run: |
|
|
440
|
-
cargo build --release -p worktree-napi
|
|
441
|
-
triple="darwin-x64"
|
|
442
|
-
if [[ "$(uname -m)" == "arm64" ]]; then
|
|
443
|
-
triple="darwin-arm64"
|
|
444
|
-
fi
|
|
445
|
-
cp target/release/libworktree_napi.dylib "crates/worktree-napi/worktree-napi.${triple}.node"
|
|
446
|
-
timeout-minutes: 20
|
|
447
|
-
|
|
448
|
-
- name: Install dependencies
|
|
449
|
-
run: {{INSTALL_CMD}}
|
|
450
|
-
timeout-minutes: 10
|
|
451
|
-
|
|
452
|
-
- name: Install ripgrep (required for T1605 callsite-coverage validator)
|
|
453
|
-
uses: ./.github/actions/install-ripgrep
|
|
454
|
-
|
|
455
|
-
- name: Build cant-napi native addon for CANT tests (T12382)
|
|
456
|
-
shell: bash
|
|
457
|
-
run: pnpm --filter @cleocode/cant run build:napi
|
|
458
|
-
timeout-minutes: 20
|
|
459
|
-
|
|
460
|
-
- name: Build packages (required for cross-package imports)
|
|
461
|
-
run: {{BUILD_CMD}}
|
|
462
|
-
timeout-minutes: 15
|
|
463
|
-
|
|
464
|
-
- name: Generate SvelteKit type stubs (required for studio tests)
|
|
465
|
-
run: pnpm --filter @cleocode/studio exec svelte-kit sync
|
|
466
|
-
timeout-minutes: 2
|
|
467
|
-
|
|
468
|
-
- name: Test macOS (shard ${{ matrix.shard }}/8)
|
|
469
|
-
run: pnpm exec vitest run --shard=${{ matrix.shard }}/8 --retry=2
|
|
470
|
-
timeout-minutes: 75
|
|
471
|
-
|
|
391
|
+
# T14104: no macOS job. Release never waits on GitHub macOS runners (five
|
|
392
|
+
# concurrent jobs on the free plan; ~75 min per release). macOS is validated
|
|
393
|
+
# on main by macos-main.yml (every push, nightly, on demand; a failure files a
|
|
394
|
+
# macos-regression issue) and on the owner's Mac by
|
|
395
|
+
# scripts/release-mac-smoke.mjs.
|
|
472
396
|
preflight-build:
|
|
473
397
|
name: Preflight (build)
|
|
474
398
|
runs-on: ubuntu-latest
|
|
@@ -516,15 +440,13 @@ jobs:
|
|
|
516
440
|
- dispatch-preconditions
|
|
517
441
|
- preflight-lint-typecheck
|
|
518
442
|
- preflight-test
|
|
519
|
-
- preflight-test-macos
|
|
520
443
|
- preflight-build
|
|
521
444
|
if: |
|
|
522
445
|
always() &&
|
|
523
446
|
needs.dispatch-preconditions.result == 'success' &&
|
|
524
447
|
needs.preflight-lint-typecheck.result == 'success' &&
|
|
525
448
|
needs.preflight-build.result == 'success' &&
|
|
526
|
-
(needs.preflight-test.result == 'success' || needs.preflight-test.result == 'skipped')
|
|
527
|
-
(needs.preflight-test-macos.result == 'success' || needs.preflight-test-macos.result == 'skipped')
|
|
449
|
+
(needs.preflight-test.result == 'success' || needs.preflight-test.result == 'skipped')
|
|
528
450
|
timeout-minutes: 20
|
|
529
451
|
outputs:
|
|
530
452
|
branch: ${{ steps.branch.outputs.name }}
|
|
@@ -838,7 +760,6 @@ jobs:
|
|
|
838
760
|
needs:
|
|
839
761
|
- preflight-lint-typecheck
|
|
840
762
|
- preflight-test
|
|
841
|
-
- preflight-test-macos
|
|
842
763
|
- preflight-build
|
|
843
764
|
- prepare
|
|
844
765
|
if: failure()
|