@cleocode/core 2026.4.5 → 2026.4.7
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/discovery.d.ts +69 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1643 -2349
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts +51 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/internal.d.ts +9 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/lifecycle/default-chain.d.ts +8 -2
- package/dist/lifecycle/default-chain.d.ts.map +1 -1
- package/dist/lifecycle/index.d.ts +1 -0
- package/dist/lifecycle/index.d.ts.map +1 -1
- package/dist/lifecycle/stage-guidance.d.ts +140 -0
- package/dist/lifecycle/stage-guidance.d.ts.map +1 -0
- package/dist/orchestration/protocol-validators.d.ts +122 -3
- package/dist/orchestration/protocol-validators.d.ts.map +1 -1
- package/dist/paths.d.ts +91 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/scaffold.d.ts +31 -1
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/skills/dispatch.d.ts +1 -1
- package/dist/skills/skill-paths.d.ts +9 -6
- package/dist/skills/skill-paths.d.ts.map +1 -1
- package/dist/validation/protocols/_shared.d.ts +40 -0
- package/dist/validation/protocols/_shared.d.ts.map +1 -0
- package/dist/validation/protocols/architecture-decision.d.ts +23 -0
- package/dist/validation/protocols/architecture-decision.d.ts.map +1 -0
- package/dist/validation/protocols/artifact-publish.d.ts +22 -0
- package/dist/validation/protocols/artifact-publish.d.ts.map +1 -0
- package/dist/validation/protocols/consensus.d.ts +11 -17
- package/dist/validation/protocols/consensus.d.ts.map +1 -1
- package/dist/validation/protocols/contribution.d.ts +12 -17
- package/dist/validation/protocols/contribution.d.ts.map +1 -1
- package/dist/validation/protocols/decomposition.d.ts +18 -21
- package/dist/validation/protocols/decomposition.d.ts.map +1 -1
- package/dist/validation/protocols/implementation.d.ts +9 -17
- package/dist/validation/protocols/implementation.d.ts.map +1 -1
- package/dist/validation/protocols/provenance.d.ts +23 -0
- package/dist/validation/protocols/provenance.d.ts.map +1 -0
- package/dist/validation/protocols/release.d.ts +25 -0
- package/dist/validation/protocols/release.d.ts.map +1 -0
- package/dist/validation/protocols/research.d.ts +9 -17
- package/dist/validation/protocols/research.d.ts.map +1 -1
- package/dist/validation/protocols/specification.d.ts +7 -17
- package/dist/validation/protocols/specification.d.ts.map +1 -1
- package/dist/validation/protocols/testing.d.ts +22 -0
- package/dist/validation/protocols/testing.d.ts.map +1 -0
- package/dist/validation/protocols/validation.d.ts +22 -0
- package/dist/validation/protocols/validation.d.ts.map +1 -0
- package/package.json +7 -7
- package/src/discovery.ts +235 -0
- package/src/index.ts +16 -0
- package/src/init.ts +196 -0
- package/src/internal.ts +31 -1
- package/src/lifecycle/default-chain.ts +11 -2
- package/src/lifecycle/index.ts +10 -0
- package/src/lifecycle/stage-guidance.ts +282 -0
- package/src/orchestration/__tests__/protocol-validators.test.ts +259 -7
- package/src/orchestration/protocol-validators.ts +419 -4
- package/src/paths.ts +110 -0
- package/src/scaffold.ts +240 -4
- package/src/skills/dispatch.ts +6 -6
- package/src/skills/skill-paths.ts +27 -23
- package/src/validation/protocols/_shared.ts +88 -0
- package/src/validation/protocols/architecture-decision.ts +52 -0
- package/src/validation/protocols/artifact-publish.ts +49 -0
- package/src/validation/protocols/consensus.ts +44 -74
- package/src/validation/protocols/contribution.ts +28 -65
- package/src/validation/protocols/decomposition.ts +37 -64
- package/src/validation/protocols/implementation.ts +25 -65
- package/src/validation/protocols/protocols-markdown/architecture-decision.md +303 -0
- package/src/validation/protocols/protocols-markdown/artifact-publish.md +600 -0
- package/src/validation/protocols/protocols-markdown/consensus.md +322 -0
- package/src/validation/protocols/protocols-markdown/contribution.md +388 -0
- package/src/validation/protocols/protocols-markdown/decomposition.md +421 -0
- package/src/validation/protocols/protocols-markdown/implementation.md +357 -0
- package/src/validation/protocols/protocols-markdown/provenance.md +613 -0
- package/src/validation/protocols/protocols-markdown/release.md +783 -0
- package/src/validation/protocols/protocols-markdown/research.md +261 -0
- package/src/validation/protocols/protocols-markdown/specification.md +300 -0
- package/src/validation/protocols/protocols-markdown/testing.md +287 -0
- package/src/validation/protocols/protocols-markdown/validation.md +242 -0
- package/src/validation/protocols/provenance.ts +50 -0
- package/src/validation/protocols/release.ts +44 -0
- package/src/validation/protocols/research.ts +25 -87
- package/src/validation/protocols/specification.ts +27 -89
- package/src/validation/protocols/testing.ts +46 -0
- package/src/validation/protocols/validation.ts +46 -0
- package/dist/cant/approval.d.ts +0 -110
- package/dist/cant/approval.d.ts.map +0 -1
- package/dist/cant/context-builder.d.ts +0 -79
- package/dist/cant/context-builder.d.ts.map +0 -1
- package/dist/cant/discretion.d.ts +0 -95
- package/dist/cant/discretion.d.ts.map +0 -1
- package/dist/cant/index.d.ts +0 -25
- package/dist/cant/index.d.ts.map +0 -1
- package/dist/cant/parallel-runner.d.ts +0 -38
- package/dist/cant/parallel-runner.d.ts.map +0 -1
- package/dist/cant/types.d.ts +0 -127
- package/dist/cant/types.d.ts.map +0 -1
- package/dist/cant/workflow-executor.d.ts +0 -105
- package/dist/cant/workflow-executor.d.ts.map +0 -1
- package/dist/validation/protocols/release-protocol.d.ts +0 -27
- package/dist/validation/protocols/release-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/testing-protocol.d.ts +0 -27
- package/dist/validation/protocols/testing-protocol.d.ts.map +0 -1
- package/dist/validation/protocols/validation-protocol.d.ts +0 -27
- package/dist/validation/protocols/validation-protocol.d.ts.map +0 -1
- package/schemas/agent-configs.schema.json +0 -120
- package/schemas/agent-registry.schema.json +0 -132
- package/schemas/archive.schema.json +0 -450
- package/schemas/brain-decision.schema.json +0 -69
- package/schemas/brain-learning.schema.json +0 -57
- package/schemas/brain-pattern.schema.json +0 -72
- package/schemas/critical-path.schema.json +0 -246
- package/schemas/deps-cache.schema.json +0 -97
- package/schemas/doctor-output.schema.json +0 -283
- package/schemas/error.schema.json +0 -161
- package/schemas/global-config.schema.json +0 -219
- package/schemas/grade.schema.json +0 -49
- package/schemas/log.schema.json +0 -250
- package/schemas/metrics.schema.json +0 -328
- package/schemas/migrations.schema.json +0 -150
- package/schemas/nexus-registry.schema.json +0 -90
- package/schemas/operation-constitution.schema.json +0 -438
- package/schemas/output.schema.json +0 -164
- package/schemas/projects-registry.schema.json +0 -107
- package/schemas/protocol-frontmatter.schema.json +0 -72
- package/schemas/rcasd-consensus-report.schema.json +0 -10
- package/schemas/rcasd-evidence.schema.json +0 -42
- package/schemas/rcasd-gate-result.schema.json +0 -46
- package/schemas/rcasd-hitl-resolution.schema.json +0 -10
- package/schemas/rcasd-index.schema.json +0 -10
- package/schemas/rcasd-manifest.schema.json +0 -10
- package/schemas/rcasd-research-output.schema.json +0 -10
- package/schemas/rcasd-spec-frontmatter.schema.json +0 -10
- package/schemas/rcasd-stage-transition.schema.json +0 -38
- package/schemas/releases.schema.json +0 -267
- package/schemas/skills-manifest.schema.json +0 -91
- package/schemas/spec-index.schema.json +0 -196
- package/schemas/system-flow-atlas.schema.json +0 -125
- package/src/__tests__/audit-prune.test.d.ts.map +0 -1
- package/src/__tests__/audit-prune.test.js +0 -162
- package/src/__tests__/audit-prune.test.js.map +0 -1
- package/src/__tests__/caamp-skill-install.test.d.ts.map +0 -1
- package/src/__tests__/caamp-skill-install.test.js +0 -147
- package/src/__tests__/caamp-skill-install.test.js.map +0 -1
- package/src/__tests__/cli-parity.test.d.ts.map +0 -1
- package/src/__tests__/cli-parity.test.js +0 -209
- package/src/__tests__/cli-parity.test.js.map +0 -1
- package/src/__tests__/config.test.d.ts.map +0 -1
- package/src/__tests__/config.test.js +0 -144
- package/src/__tests__/config.test.js.map +0 -1
- package/src/__tests__/core-parity.test.d.ts.map +0 -1
- package/src/__tests__/core-parity.test.js +0 -645
- package/src/__tests__/core-parity.test.js.map +0 -1
- package/src/__tests__/error-catalog.test.d.ts.map +0 -1
- package/src/__tests__/error-catalog.test.js +0 -127
- package/src/__tests__/error-catalog.test.js.map +0 -1
- package/src/__tests__/golden-parity.test.d.ts.map +0 -1
- package/src/__tests__/golden-parity.test.js +0 -212
- package/src/__tests__/golden-parity.test.js.map +0 -1
- package/src/__tests__/hooks.test.d.ts.map +0 -1
- package/src/__tests__/hooks.test.js +0 -201
- package/src/__tests__/hooks.test.js.map +0 -1
- package/src/__tests__/human-output.test.d.ts.map +0 -1
- package/src/__tests__/human-output.test.js +0 -158
- package/src/__tests__/human-output.test.js.map +0 -1
- package/src/__tests__/index-api-compat.test.d.ts.map +0 -1
- package/src/__tests__/index-api-compat.test.js +0 -16
- package/src/__tests__/index-api-compat.test.js.map +0 -1
- package/src/__tests__/init-e2e.test.d.ts.map +0 -1
- package/src/__tests__/init-e2e.test.js +0 -221
- package/src/__tests__/init-e2e.test.js.map +0 -1
- package/src/__tests__/injection-chain.test.d.ts.map +0 -1
- package/src/__tests__/injection-chain.test.js +0 -234
- package/src/__tests__/injection-chain.test.js.map +0 -1
- package/src/__tests__/injection-mvi-tiers.test.d.ts.map +0 -1
- package/src/__tests__/injection-mvi-tiers.test.js +0 -152
- package/src/__tests__/injection-mvi-tiers.test.js.map +0 -1
- package/src/__tests__/injection-shared.test.d.ts.map +0 -1
- package/src/__tests__/injection-shared.test.js +0 -194
- package/src/__tests__/injection-shared.test.js.map +0 -1
- package/src/__tests__/lafs-conformance.test.d.ts.map +0 -1
- package/src/__tests__/lafs-conformance.test.js +0 -786
- package/src/__tests__/lafs-conformance.test.js.map +0 -1
- package/src/__tests__/logger.test.d.ts.map +0 -1
- package/src/__tests__/logger.test.js +0 -75
- package/src/__tests__/logger.test.js.map +0 -1
- package/src/__tests__/paths.test.d.ts.map +0 -1
- package/src/__tests__/paths.test.js +0 -327
- package/src/__tests__/paths.test.js.map +0 -1
- package/src/__tests__/project-info.test.d.ts.map +0 -1
- package/src/__tests__/project-info.test.js +0 -156
- package/src/__tests__/project-info.test.js.map +0 -1
- package/src/__tests__/rcsd-pipeline-e2e.test.d.ts.map +0 -1
- package/src/__tests__/rcsd-pipeline-e2e.test.js +0 -263
- package/src/__tests__/rcsd-pipeline-e2e.test.js.map +0 -1
- package/src/__tests__/remote.test.d.ts.map +0 -1
- package/src/__tests__/remote.test.js +0 -149
- package/src/__tests__/remote.test.js.map +0 -1
- package/src/__tests__/scaffold.test.d.ts.map +0 -1
- package/src/__tests__/scaffold.test.js +0 -474
- package/src/__tests__/scaffold.test.js.map +0 -1
- package/src/__tests__/schema-management.test.d.ts.map +0 -1
- package/src/__tests__/schema-management.test.js +0 -287
- package/src/__tests__/schema-management.test.js.map +0 -1
- package/src/__tests__/schema.test.d.ts.map +0 -1
- package/src/__tests__/schema.test.js +0 -51
- package/src/__tests__/schema.test.js.map +0 -1
- package/src/__tests__/sharing.test.d.ts.map +0 -1
- package/src/__tests__/sharing.test.js +0 -160
- package/src/__tests__/sharing.test.js.map +0 -1
- package/src/__tests__/snapshot.test.d.ts.map +0 -1
- package/src/__tests__/snapshot.test.js +0 -72
- package/src/__tests__/snapshot.test.js.map +0 -1
- package/src/__tests__/upgrade.test.d.ts.map +0 -1
- package/src/__tests__/upgrade.test.js +0 -321
- package/src/__tests__/upgrade.test.js.map +0 -1
- package/src/adapters/__tests__/discovery.test.d.ts.map +0 -1
- package/src/adapters/__tests__/discovery.test.js +0 -56
- package/src/adapters/__tests__/discovery.test.js.map +0 -1
- package/src/adapters/__tests__/manager.test.d.ts.map +0 -1
- package/src/adapters/__tests__/manager.test.js +0 -260
- package/src/adapters/__tests__/manager.test.js.map +0 -1
- package/src/agents/__tests__/agent-registry.test.d.ts.map +0 -1
- package/src/agents/__tests__/agent-registry.test.js +0 -262
- package/src/agents/__tests__/agent-registry.test.js.map +0 -1
- package/src/agents/__tests__/capacity.test.d.ts.map +0 -1
- package/src/agents/__tests__/capacity.test.js +0 -173
- package/src/agents/__tests__/capacity.test.js.map +0 -1
- package/src/agents/__tests__/execution-learning.test.d.ts.map +0 -1
- package/src/agents/__tests__/execution-learning.test.js +0 -533
- package/src/agents/__tests__/execution-learning.test.js.map +0 -1
- package/src/agents/__tests__/health-monitor.test.d.ts.map +0 -1
- package/src/agents/__tests__/health-monitor.test.js +0 -259
- package/src/agents/__tests__/health-monitor.test.js.map +0 -1
- package/src/agents/__tests__/registry.test.d.ts.map +0 -1
- package/src/agents/__tests__/registry.test.js +0 -373
- package/src/agents/__tests__/registry.test.js.map +0 -1
- package/src/agents/__tests__/retry.test.d.ts.map +0 -1
- package/src/agents/__tests__/retry.test.js +0 -225
- package/src/agents/__tests__/retry.test.js.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.d.ts.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.js +0 -77
- package/src/cant/__tests__/cant-agent-parse.test.js.map +0 -1
- package/src/cant/__tests__/cant-agent-parse.test.ts +0 -94
- package/src/cant/approval.ts +0 -218
- package/src/cant/context-builder.ts +0 -135
- package/src/cant/discretion.ts +0 -149
- package/src/cant/index.ts +0 -58
- package/src/cant/parallel-runner.ts +0 -205
- package/src/cant/types.ts +0 -158
- package/src/cant/workflow-executor.ts +0 -618
- package/src/compliance/__tests__/sync.test.d.ts.map +0 -1
- package/src/compliance/__tests__/sync.test.js +0 -119
- package/src/compliance/__tests__/sync.test.js.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.d.ts.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.js +0 -178
- package/src/conduit/__tests__/dual-api-e2e.test.js.map +0 -1
- package/src/conduit/__tests__/dual-api-e2e.test.ts +0 -212
- package/src/conduit/__tests__/local-credential-flow.test.d.ts.map +0 -1
- package/src/conduit/__tests__/local-credential-flow.test.js +0 -185
- package/src/conduit/__tests__/local-credential-flow.test.js.map +0 -1
- package/src/conduit/__tests__/local-transport.test.d.ts.map +0 -1
- package/src/conduit/__tests__/local-transport.test.js +0 -404
- package/src/conduit/__tests__/local-transport.test.js.map +0 -1
- package/src/conduit/__tests__/sse-transport.test.d.ts.map +0 -1
- package/src/conduit/__tests__/sse-transport.test.js +0 -291
- package/src/conduit/__tests__/sse-transport.test.js.map +0 -1
- package/src/hooks/__tests__/provider-hooks.test.d.ts.map +0 -1
- package/src/hooks/__tests__/provider-hooks.test.js +0 -33
- package/src/hooks/__tests__/provider-hooks.test.js.map +0 -1
- package/src/hooks/__tests__/registry.test.d.ts.map +0 -1
- package/src/hooks/__tests__/registry.test.js +0 -37
- package/src/hooks/__tests__/registry.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/error-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/error-hooks.test.js +0 -90
- package/src/hooks/handlers/__tests__/error-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/file-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/file-hooks.test.js +0 -128
- package/src/hooks/handlers/__tests__/file-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +0 -501
- package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/session-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/session-hooks.test.js +0 -54
- package/src/hooks/handlers/__tests__/session-hooks.test.js.map +0 -1
- package/src/hooks/handlers/__tests__/task-hooks.test.d.ts.map +0 -1
- package/src/hooks/handlers/__tests__/task-hooks.test.js +0 -77
- package/src/hooks/handlers/__tests__/task-hooks.test.js.map +0 -1
- package/src/intelligence/__tests__/adaptive-validation.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/adaptive-validation.test.js +0 -517
- package/src/intelligence/__tests__/adaptive-validation.test.js.map +0 -1
- package/src/intelligence/__tests__/impact.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/impact.test.js +0 -515
- package/src/intelligence/__tests__/impact.test.js.map +0 -1
- package/src/intelligence/__tests__/patterns.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/patterns.test.js +0 -370
- package/src/intelligence/__tests__/patterns.test.js.map +0 -1
- package/src/intelligence/__tests__/prediction.test.d.ts.map +0 -1
- package/src/intelligence/__tests__/prediction.test.js +0 -314
- package/src/intelligence/__tests__/prediction.test.js.map +0 -1
- package/src/lib/__tests__/retry.test.d.ts.map +0 -1
- package/src/lib/__tests__/retry.test.js +0 -225
- package/src/lib/__tests__/retry.test.js.map +0 -1
- package/src/lifecycle/__tests__/chain-store.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/chain-store.test.js +0 -243
- package/src/lifecycle/__tests__/chain-store.test.js.map +0 -1
- package/src/lifecycle/__tests__/consolidate-rcasd.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/consolidate-rcasd.test.js +0 -210
- package/src/lifecycle/__tests__/consolidate-rcasd.test.js.map +0 -1
- package/src/lifecycle/__tests__/default-chain.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/default-chain.test.js +0 -74
- package/src/lifecycle/__tests__/default-chain.test.js.map +0 -1
- package/src/lifecycle/__tests__/frontmatter.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/frontmatter.test.js +0 -229
- package/src/lifecycle/__tests__/frontmatter.test.js.map +0 -1
- package/src/lifecycle/__tests__/lifecycle.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/lifecycle.test.js +0 -126
- package/src/lifecycle/__tests__/lifecycle.test.js.map +0 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/pipeline.integration.test.js +0 -977
- package/src/lifecycle/__tests__/pipeline.integration.test.js.map +0 -1
- package/src/lifecycle/__tests__/rcasd-paths.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/rcasd-paths.test.js +0 -206
- package/src/lifecycle/__tests__/rcasd-paths.test.js.map +0 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/resume-schema-contract.test.js +0 -246
- package/src/lifecycle/__tests__/resume-schema-contract.test.js.map +0 -1
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.js +0 -95
- package/src/lifecycle/__tests__/stage-record-provenance.integration.test.js.map +0 -1
- package/src/lifecycle/__tests__/tessera-engine.test.d.ts.map +0 -1
- package/src/lifecycle/__tests__/tessera-engine.test.js +0 -392
- package/src/lifecycle/__tests__/tessera-engine.test.js.map +0 -1
- package/src/memory/__tests__/auto-extract.test.d.ts.map +0 -1
- package/src/memory/__tests__/auto-extract.test.js +0 -197
- package/src/memory/__tests__/auto-extract.test.js.map +0 -1
- package/src/memory/__tests__/brain-automation.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-automation.test.js +0 -730
- package/src/memory/__tests__/brain-automation.test.js.map +0 -1
- package/src/memory/__tests__/brain-embedding.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-embedding.test.js +0 -92
- package/src/memory/__tests__/brain-embedding.test.js.map +0 -1
- package/src/memory/__tests__/brain-links.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-links.test.js +0 -221
- package/src/memory/__tests__/brain-links.test.js.map +0 -1
- package/src/memory/__tests__/brain-migration.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-migration.test.js +0 -180
- package/src/memory/__tests__/brain-migration.test.js.map +0 -1
- package/src/memory/__tests__/brain-retrieval.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-retrieval.test.js +0 -701
- package/src/memory/__tests__/brain-retrieval.test.js.map +0 -1
- package/src/memory/__tests__/brain-search.test.d.ts.map +0 -1
- package/src/memory/__tests__/brain-search.test.js +0 -180
- package/src/memory/__tests__/brain-search.test.js.map +0 -1
- package/src/memory/__tests__/claude-mem-migration.test.d.ts.map +0 -1
- package/src/memory/__tests__/claude-mem-migration.test.js +0 -424
- package/src/memory/__tests__/claude-mem-migration.test.js.map +0 -1
- package/src/memory/__tests__/decisions.test.d.ts.map +0 -1
- package/src/memory/__tests__/decisions.test.js +0 -253
- package/src/memory/__tests__/decisions.test.js.map +0 -1
- package/src/memory/__tests__/engine-compat.test.d.ts.map +0 -1
- package/src/memory/__tests__/engine-compat.test.js +0 -331
- package/src/memory/__tests__/engine-compat.test.js.map +0 -1
- package/src/memory/__tests__/memory-bridge.test.d.ts.map +0 -1
- package/src/memory/__tests__/memory-bridge.test.js +0 -231
- package/src/memory/__tests__/memory-bridge.test.js.map +0 -1
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.d.ts.map +0 -1
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.js +0 -516
- package/src/memory/__tests__/pipeline-manifest-sqlite.test.js.map +0 -1
- package/src/memory/__tests__/session-memory.test.d.ts.map +0 -1
- package/src/memory/__tests__/session-memory.test.js +0 -387
- package/src/memory/__tests__/session-memory.test.js.map +0 -1
- package/src/metrics/__tests__/model-provider-registry.test.d.ts.map +0 -1
- package/src/metrics/__tests__/model-provider-registry.test.js +0 -45
- package/src/metrics/__tests__/model-provider-registry.test.js.map +0 -1
- package/src/metrics/__tests__/provider-detection.test.d.ts.map +0 -1
- package/src/metrics/__tests__/provider-detection.test.js +0 -111
- package/src/metrics/__tests__/provider-detection.test.js.map +0 -1
- package/src/migration/__tests__/checksum.test.d.ts.map +0 -1
- package/src/migration/__tests__/checksum.test.js +0 -216
- package/src/migration/__tests__/checksum.test.js.map +0 -1
- package/src/migration/__tests__/logger.test.d.ts.map +0 -1
- package/src/migration/__tests__/logger.test.js +0 -256
- package/src/migration/__tests__/logger.test.js.map +0 -1
- package/src/migration/__tests__/migration-failure.integration.test.d.ts.map +0 -1
- package/src/migration/__tests__/migration-failure.integration.test.js +0 -515
- package/src/migration/__tests__/migration-failure.integration.test.js.map +0 -1
- package/src/migration/__tests__/migration.test.d.ts.map +0 -1
- package/src/migration/__tests__/migration.test.js +0 -82
- package/src/migration/__tests__/migration.test.js.map +0 -1
- package/src/migration/__tests__/state.test.d.ts.map +0 -1
- package/src/migration/__tests__/state.test.js +0 -330
- package/src/migration/__tests__/state.test.js.map +0 -1
- package/src/migration/__tests__/validate.test.d.ts.map +0 -1
- package/src/migration/__tests__/validate.test.js +0 -258
- package/src/migration/__tests__/validate.test.js.map +0 -1
- package/src/nexus/__tests__/deps.test.d.ts.map +0 -1
- package/src/nexus/__tests__/deps.test.js +0 -283
- package/src/nexus/__tests__/deps.test.js.map +0 -1
- package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +0 -1
- package/src/nexus/__tests__/nexus-e2e.test.js +0 -1220
- package/src/nexus/__tests__/nexus-e2e.test.js.map +0 -1
- package/src/nexus/__tests__/permissions.test.d.ts.map +0 -1
- package/src/nexus/__tests__/permissions.test.js +0 -119
- package/src/nexus/__tests__/permissions.test.js.map +0 -1
- package/src/nexus/__tests__/query.test.d.ts.map +0 -1
- package/src/nexus/__tests__/query.test.js +0 -168
- package/src/nexus/__tests__/query.test.js.map +0 -1
- package/src/nexus/__tests__/reconcile.test.d.ts.map +0 -1
- package/src/nexus/__tests__/reconcile.test.js +0 -135
- package/src/nexus/__tests__/reconcile.test.js.map +0 -1
- package/src/nexus/__tests__/registry.test.d.ts.map +0 -1
- package/src/nexus/__tests__/registry.test.js +0 -229
- package/src/nexus/__tests__/registry.test.js.map +0 -1
- package/src/nexus/__tests__/transfer.test.d.ts.map +0 -1
- package/src/nexus/__tests__/transfer.test.js +0 -372
- package/src/nexus/__tests__/transfer.test.js.map +0 -1
- package/src/observability/__tests__/index.test.d.ts.map +0 -1
- package/src/observability/__tests__/index.test.js +0 -288
- package/src/observability/__tests__/index.test.js.map +0 -1
- package/src/observability/__tests__/log-filter.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-filter.test.js +0 -151
- package/src/observability/__tests__/log-filter.test.js.map +0 -1
- package/src/observability/__tests__/log-parser.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-parser.test.js +0 -170
- package/src/observability/__tests__/log-parser.test.js.map +0 -1
- package/src/observability/__tests__/log-reader.test.d.ts.map +0 -1
- package/src/observability/__tests__/log-reader.test.js +0 -150
- package/src/observability/__tests__/log-reader.test.js.map +0 -1
- package/src/orchestration/__tests__/autonomous-spec.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/autonomous-spec.test.js +0 -419
- package/src/orchestration/__tests__/autonomous-spec.test.js.map +0 -1
- package/src/orchestration/__tests__/orchestration.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/orchestration.test.js +0 -205
- package/src/orchestration/__tests__/orchestration.test.js.map +0 -1
- package/src/orchestration/__tests__/protocol-validators.test.d.ts.map +0 -1
- package/src/orchestration/__tests__/protocol-validators.test.js +0 -382
- package/src/orchestration/__tests__/protocol-validators.test.js.map +0 -1
- package/src/phases/__tests__/deps.test.d.ts.map +0 -1
- package/src/phases/__tests__/deps.test.js +0 -210
- package/src/phases/__tests__/deps.test.js.map +0 -1
- package/src/phases/__tests__/phases.test.d.ts.map +0 -1
- package/src/phases/__tests__/phases.test.js +0 -215
- package/src/phases/__tests__/phases.test.js.map +0 -1
- package/src/release/__tests__/artifacts.test.d.ts.map +0 -1
- package/src/release/__tests__/artifacts.test.js +0 -65
- package/src/release/__tests__/artifacts.test.js.map +0 -1
- package/src/release/__tests__/cancel-release.test.d.ts.map +0 -1
- package/src/release/__tests__/cancel-release.test.js +0 -154
- package/src/release/__tests__/cancel-release.test.js.map +0 -1
- package/src/release/__tests__/changelog-writer.test.d.ts.map +0 -1
- package/src/release/__tests__/changelog-writer.test.js +0 -132
- package/src/release/__tests__/changelog-writer.test.js.map +0 -1
- package/src/release/__tests__/push-policy.test.d.ts.map +0 -1
- package/src/release/__tests__/push-policy.test.js +0 -142
- package/src/release/__tests__/push-policy.test.js.map +0 -1
- package/src/release/__tests__/release.test.d.ts.map +0 -1
- package/src/release/__tests__/release.test.js +0 -25
- package/src/release/__tests__/release.test.js.map +0 -1
- package/src/sequence/__tests__/allocate.test.d.ts.map +0 -1
- package/src/sequence/__tests__/allocate.test.js +0 -113
- package/src/sequence/__tests__/allocate.test.js.map +0 -1
- package/src/sessions/__tests__/briefing-blocked.test.d.ts.map +0 -1
- package/src/sessions/__tests__/briefing-blocked.test.js +0 -117
- package/src/sessions/__tests__/briefing-blocked.test.js.map +0 -1
- package/src/sessions/__tests__/briefing.test.d.ts.map +0 -1
- package/src/sessions/__tests__/briefing.test.js +0 -336
- package/src/sessions/__tests__/briefing.test.js.map +0 -1
- package/src/sessions/__tests__/handoff-integration.test.d.ts.map +0 -1
- package/src/sessions/__tests__/handoff-integration.test.js +0 -264
- package/src/sessions/__tests__/handoff-integration.test.js.map +0 -1
- package/src/sessions/__tests__/handoff.test.d.ts.map +0 -1
- package/src/sessions/__tests__/handoff.test.js +0 -435
- package/src/sessions/__tests__/handoff.test.js.map +0 -1
- package/src/sessions/__tests__/index.test.d.ts.map +0 -1
- package/src/sessions/__tests__/index.test.js +0 -82
- package/src/sessions/__tests__/index.test.js.map +0 -1
- package/src/sessions/__tests__/session-cleanup.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-cleanup.test.js +0 -201
- package/src/sessions/__tests__/session-cleanup.test.js.map +0 -1
- package/src/sessions/__tests__/session-edge-cases.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-edge-cases.test.js +0 -251
- package/src/sessions/__tests__/session-edge-cases.test.js.map +0 -1
- package/src/sessions/__tests__/session-find.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-find.test.js +0 -210
- package/src/sessions/__tests__/session-find.test.js.map +0 -1
- package/src/sessions/__tests__/session-grade.integration.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-grade.integration.test.js +0 -287
- package/src/sessions/__tests__/session-grade.integration.test.js.map +0 -1
- package/src/sessions/__tests__/session-grade.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-grade.test.js +0 -630
- package/src/sessions/__tests__/session-grade.test.js.map +0 -1
- package/src/sessions/__tests__/session-memory-bridge.test.d.ts.map +0 -1
- package/src/sessions/__tests__/session-memory-bridge.test.js +0 -52
- package/src/sessions/__tests__/session-memory-bridge.test.js.map +0 -1
- package/src/sessions/__tests__/sessions.test.d.ts.map +0 -1
- package/src/sessions/__tests__/sessions.test.js +0 -113
- package/src/sessions/__tests__/sessions.test.js.map +0 -1
- package/src/skills/__tests__/discovery.test.d.ts.map +0 -1
- package/src/skills/__tests__/discovery.test.js +0 -171
- package/src/skills/__tests__/discovery.test.js.map +0 -1
- package/src/skills/__tests__/dispatch.test.d.ts.map +0 -1
- package/src/skills/__tests__/dispatch.test.js +0 -99
- package/src/skills/__tests__/dispatch.test.js.map +0 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.d.ts.map +0 -1
- package/src/skills/__tests__/dynamic-skill-generator.test.js +0 -77
- package/src/skills/__tests__/dynamic-skill-generator.test.js.map +0 -1
- package/src/skills/__tests__/manifests.test.d.ts.map +0 -1
- package/src/skills/__tests__/manifests.test.js +0 -121
- package/src/skills/__tests__/manifests.test.js.map +0 -1
- package/src/skills/__tests__/precedence.test.d.ts.map +0 -1
- package/src/skills/__tests__/precedence.test.js +0 -325
- package/src/skills/__tests__/precedence.test.js.map +0 -1
- package/src/skills/__tests__/routing-table.test.d.ts.map +0 -1
- package/src/skills/__tests__/routing-table.test.js +0 -91
- package/src/skills/__tests__/routing-table.test.js.map +0 -1
- package/src/skills/__tests__/skill-paths.test.d.ts.map +0 -1
- package/src/skills/__tests__/skill-paths.test.js +0 -71
- package/src/skills/__tests__/skill-paths.test.js.map +0 -1
- package/src/skills/__tests__/test-utility.test.d.ts.map +0 -1
- package/src/skills/__tests__/test-utility.test.js +0 -59
- package/src/skills/__tests__/test-utility.test.js.map +0 -1
- package/src/skills/__tests__/token.test.d.ts.map +0 -1
- package/src/skills/__tests__/token.test.js +0 -135
- package/src/skills/__tests__/token.test.js.map +0 -1
- package/src/skills/__tests__/validation.test.d.ts.map +0 -1
- package/src/skills/__tests__/validation.test.js +0 -108
- package/src/skills/__tests__/validation.test.js.map +0 -1
- package/src/skills/__tests__/version.test.d.ts.map +0 -1
- package/src/skills/__tests__/version.test.js +0 -71
- package/src/skills/__tests__/version.test.js.map +0 -1
- package/src/skills/injection/__tests__/subagent.test.d.ts.map +0 -1
- package/src/skills/injection/__tests__/subagent.test.js +0 -122
- package/src/skills/injection/__tests__/subagent.test.js.map +0 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.d.ts.map +0 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +0 -228
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +0 -1
- package/src/spawn/__tests__/adapter-registry.test.d.ts.map +0 -1
- package/src/spawn/__tests__/adapter-registry.test.js +0 -76
- package/src/spawn/__tests__/adapter-registry.test.js.map +0 -1
- package/src/stats/__tests__/stats.test.d.ts.map +0 -1
- package/src/stats/__tests__/stats.test.js +0 -374
- package/src/stats/__tests__/stats.test.js.map +0 -1
- package/src/sticky/__tests__/purge.test.d.ts.map +0 -1
- package/src/sticky/__tests__/purge.test.js +0 -64
- package/src/sticky/__tests__/purge.test.js.map +0 -1
- package/src/store/__tests__/atomic.test.d.ts.map +0 -1
- package/src/store/__tests__/atomic.test.js +0 -81
- package/src/store/__tests__/atomic.test.js.map +0 -1
- package/src/store/__tests__/backup.test.d.ts.map +0 -1
- package/src/store/__tests__/backup.test.js +0 -131
- package/src/store/__tests__/backup.test.js.map +0 -1
- package/src/store/__tests__/brain-accessor-pageindex.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-accessor-pageindex.test.js +0 -179
- package/src/store/__tests__/brain-accessor-pageindex.test.js.map +0 -1
- package/src/store/__tests__/brain-accessor.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-accessor.test.js +0 -398
- package/src/store/__tests__/brain-accessor.test.js.map +0 -1
- package/src/store/__tests__/brain-pageindex.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-pageindex.test.js +0 -137
- package/src/store/__tests__/brain-pageindex.test.js.map +0 -1
- package/src/store/__tests__/brain-schema.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-schema.test.js +0 -137
- package/src/store/__tests__/brain-schema.test.js.map +0 -1
- package/src/store/__tests__/brain-vec.test.d.ts.map +0 -1
- package/src/store/__tests__/brain-vec.test.js +0 -100
- package/src/store/__tests__/brain-vec.test.js.map +0 -1
- package/src/store/__tests__/collision-detection.test.d.ts.map +0 -1
- package/src/store/__tests__/collision-detection.test.js +0 -165
- package/src/store/__tests__/collision-detection.test.js.map +0 -1
- package/src/store/__tests__/data-safety-central.test.d.ts.map +0 -1
- package/src/store/__tests__/data-safety-central.test.js +0 -408
- package/src/store/__tests__/data-safety-central.test.js.map +0 -1
- package/src/store/__tests__/db-helpers.test.d.ts.map +0 -1
- package/src/store/__tests__/db-helpers.test.js +0 -101
- package/src/store/__tests__/db-helpers.test.js.map +0 -1
- package/src/store/__tests__/e2e-safety-integration.test.d.ts.map +0 -1
- package/src/store/__tests__/e2e-safety-integration.test.js +0 -402
- package/src/store/__tests__/e2e-safety-integration.test.js.map +0 -1
- package/src/store/__tests__/git-checkpoint.test.d.ts.map +0 -1
- package/src/store/__tests__/git-checkpoint.test.js +0 -133
- package/src/store/__tests__/git-checkpoint.test.js.map +0 -1
- package/src/store/__tests__/idempotent-migration.test.d.ts.map +0 -1
- package/src/store/__tests__/idempotent-migration.test.js +0 -172
- package/src/store/__tests__/idempotent-migration.test.js.map +0 -1
- package/src/store/__tests__/import-logging.test.d.ts.map +0 -1
- package/src/store/__tests__/import-logging.test.js +0 -92
- package/src/store/__tests__/import-logging.test.js.map +0 -1
- package/src/store/__tests__/import-sort.test.d.ts.map +0 -1
- package/src/store/__tests__/import-sort.test.js +0 -109
- package/src/store/__tests__/import-sort.test.js.map +0 -1
- package/src/store/__tests__/json.test.d.ts.map +0 -1
- package/src/store/__tests__/json.test.js +0 -98
- package/src/store/__tests__/json.test.js.map +0 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.d.ts.map +0 -1
- package/src/store/__tests__/lifecycle-schema-parity.test.js +0 -90
- package/src/store/__tests__/lifecycle-schema-parity.test.js.map +0 -1
- package/src/store/__tests__/migration-integration.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-integration.test.js +0 -238
- package/src/store/__tests__/migration-integration.test.js.map +0 -1
- package/src/store/__tests__/migration-retry.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-retry.test.js +0 -178
- package/src/store/__tests__/migration-retry.test.js.map +0 -1
- package/src/store/__tests__/migration-safety.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-safety.test.js +0 -756
- package/src/store/__tests__/migration-safety.test.js.map +0 -1
- package/src/store/__tests__/migration-sqlite.test.d.ts.map +0 -1
- package/src/store/__tests__/migration-sqlite.test.js +0 -544
- package/src/store/__tests__/migration-sqlite.test.js.map +0 -1
- package/src/store/__tests__/performance-safety.test.d.ts.map +0 -1
- package/src/store/__tests__/performance-safety.test.js +0 -157
- package/src/store/__tests__/performance-safety.test.js.map +0 -1
- package/src/store/__tests__/project-detect.test.d.ts.map +0 -1
- package/src/store/__tests__/project-detect.test.js +0 -609
- package/src/store/__tests__/project-detect.test.js.map +0 -1
- package/src/store/__tests__/project-registry.test.d.ts.map +0 -1
- package/src/store/__tests__/project-registry.test.js +0 -28
- package/src/store/__tests__/project-registry.test.js.map +0 -1
- package/src/store/__tests__/provider.test.d.ts.map +0 -1
- package/src/store/__tests__/provider.test.js +0 -15
- package/src/store/__tests__/provider.test.js.map +0 -1
- package/src/store/__tests__/relations.test.d.ts.map +0 -1
- package/src/store/__tests__/relations.test.js +0 -318
- package/src/store/__tests__/relations.test.js.map +0 -1
- package/src/store/__tests__/safety-accessor.test.d.ts.map +0 -1
- package/src/store/__tests__/safety-accessor.test.js +0 -219
- package/src/store/__tests__/safety-accessor.test.js.map +0 -1
- package/src/store/__tests__/sequence-validation.test.d.ts.map +0 -1
- package/src/store/__tests__/sequence-validation.test.js +0 -94
- package/src/store/__tests__/sequence-validation.test.js.map +0 -1
- package/src/store/__tests__/session-store.test.d.ts.map +0 -1
- package/src/store/__tests__/session-store.test.js +0 -463
- package/src/store/__tests__/session-store.test.js.map +0 -1
- package/src/store/__tests__/sqlite-backup.test.d.ts.map +0 -1
- package/src/store/__tests__/sqlite-backup.test.js +0 -72
- package/src/store/__tests__/sqlite-backup.test.js.map +0 -1
- package/src/store/__tests__/sqlite.test.d.ts.map +0 -1
- package/src/store/__tests__/sqlite.test.js +0 -256
- package/src/store/__tests__/sqlite.test.js.map +0 -1
- package/src/store/__tests__/task-store.test.d.ts.map +0 -1
- package/src/store/__tests__/task-store.test.js +0 -514
- package/src/store/__tests__/task-store.test.js.map +0 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +0 -1
- package/src/store/__tests__/test-db-helper.js +0 -110
- package/src/store/__tests__/test-db-helper.js.map +0 -1
- package/src/store/__tests__/write-verification.test.d.ts.map +0 -1
- package/src/store/__tests__/write-verification.test.js +0 -185
- package/src/store/__tests__/write-verification.test.js.map +0 -1
- package/src/system/__tests__/cleanup.test.d.ts.map +0 -1
- package/src/system/__tests__/cleanup.test.js +0 -87
- package/src/system/__tests__/cleanup.test.js.map +0 -1
- package/src/system/__tests__/health.test.d.ts.map +0 -1
- package/src/system/__tests__/health.test.js +0 -55
- package/src/system/__tests__/health.test.js.map +0 -1
- package/src/task-work/__tests__/start-deps.test.d.ts.map +0 -1
- package/src/task-work/__tests__/start-deps.test.js +0 -152
- package/src/task-work/__tests__/start-deps.test.js.map +0 -1
- package/src/tasks/__tests__/add.test.d.ts.map +0 -1
- package/src/tasks/__tests__/add.test.js +0 -226
- package/src/tasks/__tests__/add.test.js.map +0 -1
- package/src/tasks/__tests__/archive.test.d.ts.map +0 -1
- package/src/tasks/__tests__/archive.test.js +0 -196
- package/src/tasks/__tests__/archive.test.js.map +0 -1
- package/src/tasks/__tests__/assignee.test.d.ts.map +0 -1
- package/src/tasks/__tests__/assignee.test.js +0 -125
- package/src/tasks/__tests__/assignee.test.js.map +0 -1
- package/src/tasks/__tests__/atomicity.test.d.ts.map +0 -1
- package/src/tasks/__tests__/atomicity.test.js +0 -192
- package/src/tasks/__tests__/atomicity.test.js.map +0 -1
- package/src/tasks/__tests__/cancel-ops.test.d.ts.map +0 -1
- package/src/tasks/__tests__/cancel-ops.test.js +0 -115
- package/src/tasks/__tests__/cancel-ops.test.js.map +0 -1
- package/src/tasks/__tests__/complete-unblocks.test.d.ts.map +0 -1
- package/src/tasks/__tests__/complete-unblocks.test.js +0 -151
- package/src/tasks/__tests__/complete-unblocks.test.js.map +0 -1
- package/src/tasks/__tests__/complete.test.d.ts.map +0 -1
- package/src/tasks/__tests__/complete.test.js +0 -230
- package/src/tasks/__tests__/complete.test.js.map +0 -1
- package/src/tasks/__tests__/delete.test.d.ts.map +0 -1
- package/src/tasks/__tests__/delete.test.js +0 -183
- package/src/tasks/__tests__/delete.test.js.map +0 -1
- package/src/tasks/__tests__/dependency-check.test.d.ts.map +0 -1
- package/src/tasks/__tests__/dependency-check.test.js +0 -293
- package/src/tasks/__tests__/dependency-check.test.js.map +0 -1
- package/src/tasks/__tests__/deps-ready.test.d.ts.map +0 -1
- package/src/tasks/__tests__/deps-ready.test.js +0 -68
- package/src/tasks/__tests__/deps-ready.test.js.map +0 -1
- package/src/tasks/__tests__/epic-enforcement.test.d.ts.map +0 -1
- package/src/tasks/__tests__/epic-enforcement.test.js +0 -669
- package/src/tasks/__tests__/epic-enforcement.test.js.map +0 -1
- package/src/tasks/__tests__/find.test.d.ts.map +0 -1
- package/src/tasks/__tests__/find.test.js +0 -163
- package/src/tasks/__tests__/find.test.js.map +0 -1
- package/src/tasks/__tests__/graph-ops.test.d.ts.map +0 -1
- package/src/tasks/__tests__/graph-ops.test.js +0 -174
- package/src/tasks/__tests__/graph-ops.test.js.map +0 -1
- package/src/tasks/__tests__/hierarchy-policy.test.d.ts.map +0 -1
- package/src/tasks/__tests__/hierarchy-policy.test.js +0 -399
- package/src/tasks/__tests__/hierarchy-policy.test.js.map +0 -1
- package/src/tasks/__tests__/hierarchy.test.d.ts.map +0 -1
- package/src/tasks/__tests__/hierarchy.test.js +0 -302
- package/src/tasks/__tests__/hierarchy.test.js.map +0 -1
- package/src/tasks/__tests__/id-generator.test.d.ts.map +0 -1
- package/src/tasks/__tests__/id-generator.test.js +0 -59
- package/src/tasks/__tests__/id-generator.test.js.map +0 -1
- package/src/tasks/__tests__/labels.test.d.ts.map +0 -1
- package/src/tasks/__tests__/labels.test.js +0 -173
- package/src/tasks/__tests__/labels.test.js.map +0 -1
- package/src/tasks/__tests__/list.test.d.ts.map +0 -1
- package/src/tasks/__tests__/list.test.js +0 -272
- package/src/tasks/__tests__/list.test.js.map +0 -1
- package/src/tasks/__tests__/minimal-test.test.d.ts.map +0 -1
- package/src/tasks/__tests__/minimal-test.test.js +0 -25
- package/src/tasks/__tests__/minimal-test.test.js.map +0 -1
- package/src/tasks/__tests__/phase-tracking.test.d.ts.map +0 -1
- package/src/tasks/__tests__/phase-tracking.test.js +0 -209
- package/src/tasks/__tests__/phase-tracking.test.js.map +0 -1
- package/src/tasks/__tests__/pipeline-stage.test.d.ts.map +0 -1
- package/src/tasks/__tests__/pipeline-stage.test.js +0 -277
- package/src/tasks/__tests__/pipeline-stage.test.js.map +0 -1
- package/src/tasks/__tests__/plan-priority.test.d.ts.map +0 -1
- package/src/tasks/__tests__/plan-priority.test.js +0 -133
- package/src/tasks/__tests__/plan-priority.test.js.map +0 -1
- package/src/tasks/__tests__/priority-normalization.test.d.ts.map +0 -1
- package/src/tasks/__tests__/priority-normalization.test.js +0 -117
- package/src/tasks/__tests__/priority-normalization.test.js.map +0 -1
- package/src/tasks/__tests__/relates.test.d.ts.map +0 -1
- package/src/tasks/__tests__/relates.test.js +0 -84
- package/src/tasks/__tests__/relates.test.js.map +0 -1
- package/src/tasks/__tests__/show-deps.test.d.ts.map +0 -1
- package/src/tasks/__tests__/show-deps.test.js +0 -182
- package/src/tasks/__tests__/show-deps.test.js.map +0 -1
- package/src/tasks/__tests__/show.test.d.ts.map +0 -1
- package/src/tasks/__tests__/show.test.js +0 -126
- package/src/tasks/__tests__/show.test.js.map +0 -1
- package/src/tasks/__tests__/staleness.test.d.ts.map +0 -1
- package/src/tasks/__tests__/staleness.test.js +0 -154
- package/src/tasks/__tests__/staleness.test.js.map +0 -1
- package/src/tasks/__tests__/task-ops-depends.test.d.ts.map +0 -1
- package/src/tasks/__tests__/task-ops-depends.test.js +0 -118
- package/src/tasks/__tests__/task-ops-depends.test.js.map +0 -1
- package/src/tasks/__tests__/update.test.d.ts.map +0 -1
- package/src/tasks/__tests__/update.test.js +0 -320
- package/src/tasks/__tests__/update.test.js.map +0 -1
- package/src/validation/__tests__/chain-validation.test.d.ts.map +0 -1
- package/src/validation/__tests__/chain-validation.test.js +0 -204
- package/src/validation/__tests__/chain-validation.test.js.map +0 -1
- package/src/validation/__tests__/compliance.test.d.ts.map +0 -1
- package/src/validation/__tests__/compliance.test.js +0 -83
- package/src/validation/__tests__/compliance.test.js.map +0 -1
- package/src/validation/__tests__/docs-sync.test.d.ts.map +0 -1
- package/src/validation/__tests__/docs-sync.test.js +0 -243
- package/src/validation/__tests__/docs-sync.test.js.map +0 -1
- package/src/validation/__tests__/doctor-gitignore.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor-gitignore.test.js +0 -154
- package/src/validation/__tests__/doctor-gitignore.test.js.map +0 -1
- package/src/validation/__tests__/doctor-injection.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor-injection.test.js +0 -230
- package/src/validation/__tests__/doctor-injection.test.js.map +0 -1
- package/src/validation/__tests__/doctor.test.d.ts.map +0 -1
- package/src/validation/__tests__/doctor.test.js +0 -202
- package/src/validation/__tests__/doctor.test.js.map +0 -1
- package/src/validation/__tests__/engine.test.d.ts.map +0 -1
- package/src/validation/__tests__/engine.test.js +0 -346
- package/src/validation/__tests__/engine.test.js.map +0 -1
- package/src/validation/__tests__/manifest.test.d.ts.map +0 -1
- package/src/validation/__tests__/manifest.test.js +0 -244
- package/src/validation/__tests__/manifest.test.js.map +0 -1
- package/src/validation/__tests__/protocol-common.test.d.ts.map +0 -1
- package/src/validation/__tests__/protocol-common.test.js +0 -112
- package/src/validation/__tests__/protocol-common.test.js.map +0 -1
- package/src/validation/__tests__/verification.test.d.ts.map +0 -1
- package/src/validation/__tests__/verification.test.js +0 -277
- package/src/validation/__tests__/verification.test.js.map +0 -1
- package/src/validation/protocols/release-protocol.ts +0 -80
- package/src/validation/protocols/testing-protocol.ts +0 -93
- package/src/validation/protocols/validation-protocol.ts +0 -93
package/src/scaffold.ts
CHANGED
|
@@ -12,14 +12,24 @@
|
|
|
12
12
|
|
|
13
13
|
import { execFile } from 'node:child_process';
|
|
14
14
|
import { randomUUID } from 'node:crypto';
|
|
15
|
+
import type { Dirent } from 'node:fs';
|
|
15
16
|
import { existsSync, constants as fsConstants, readFileSync, statSync } from 'node:fs';
|
|
16
|
-
import { access, mkdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
17
|
+
import { access, copyFile, mkdir, readdir, readFile, rm, writeFile } from 'node:fs/promises';
|
|
17
18
|
import { homedir as getHomedir } from 'node:os';
|
|
18
19
|
import { dirname, join, resolve } from 'node:path';
|
|
19
20
|
import { fileURLToPath } from 'node:url';
|
|
20
21
|
import { promisify } from 'node:util';
|
|
21
22
|
import { generateProjectHash } from './nexus/hash.js';
|
|
22
|
-
import {
|
|
23
|
+
import {
|
|
24
|
+
getCleoCantWorkflowsDir,
|
|
25
|
+
getCleoDirAbsolute,
|
|
26
|
+
getCleoGlobalAgentsDir,
|
|
27
|
+
getCleoGlobalRecipesDir,
|
|
28
|
+
getCleoHome,
|
|
29
|
+
getCleoPiExtensionsDir,
|
|
30
|
+
getCleoTemplatesDir,
|
|
31
|
+
getConfigPath,
|
|
32
|
+
} from './paths.js';
|
|
23
33
|
import { saveJson } from './store/json.js';
|
|
24
34
|
|
|
25
35
|
const execFileAsync = promisify(execFile);
|
|
@@ -1334,7 +1344,15 @@ export function checkMemoryBridge(projectRoot: string): CheckResult {
|
|
|
1334
1344
|
* Schemas are read at runtime from getPackageRoot()/schemas/ — no copy needed.
|
|
1335
1345
|
* Project-level dirs (adrs/, rcasd/, agent-outputs/, backups/) live in .cleo/ only.
|
|
1336
1346
|
*/
|
|
1337
|
-
export const REQUIRED_GLOBAL_SUBDIRS = [
|
|
1347
|
+
export const REQUIRED_GLOBAL_SUBDIRS = [
|
|
1348
|
+
'logs',
|
|
1349
|
+
'templates',
|
|
1350
|
+
// CleoOS hub (Phase 1): cross-project recipe library, Pi extensions, CANT workflows
|
|
1351
|
+
'global-recipes',
|
|
1352
|
+
'pi-extensions',
|
|
1353
|
+
'cant-workflows',
|
|
1354
|
+
'agents',
|
|
1355
|
+
] as const;
|
|
1338
1356
|
|
|
1339
1357
|
/**
|
|
1340
1358
|
* Stale entries that must NOT exist at the global ~/.cleo/ level.
|
|
@@ -1532,11 +1550,229 @@ export async function ensureGlobalTemplates(): Promise<ScaffoldResult> {
|
|
|
1532
1550
|
export async function ensureGlobalScaffold(): Promise<{
|
|
1533
1551
|
home: ScaffoldResult;
|
|
1534
1552
|
templates: ScaffoldResult;
|
|
1553
|
+
cleoosHub: ScaffoldResult;
|
|
1535
1554
|
}> {
|
|
1536
1555
|
const home = await ensureGlobalHome();
|
|
1537
1556
|
const templates = await ensureGlobalTemplates();
|
|
1557
|
+
const cleoosHub = await ensureCleoOsHub();
|
|
1558
|
+
|
|
1559
|
+
return { home, templates, cleoosHub };
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
// ── CleoOS Hub scaffolding (Phase 1) ─────────────────────────────────
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* Recursively copy a template tree from {@link srcDir} into {@link dstDir}.
|
|
1566
|
+
*
|
|
1567
|
+
* Never overwrites existing files: any file that already exists at the
|
|
1568
|
+
* destination is left untouched, preserving user/agent edits. Missing
|
|
1569
|
+
* subdirectories are created on demand. Symbolic links and special files
|
|
1570
|
+
* are skipped silently.
|
|
1571
|
+
*
|
|
1572
|
+
* @param srcDir - Absolute path to the template source directory
|
|
1573
|
+
* @param dstDir - Absolute path to the destination directory
|
|
1574
|
+
* @returns Counts of files copied vs files that already existed and were kept
|
|
1575
|
+
*
|
|
1576
|
+
* @remarks
|
|
1577
|
+
* Returns `{ copied: 0, kept: 0 }` if the source directory does not exist.
|
|
1578
|
+
* Designed as the workhorse for {@link ensureCleoOsHub} and any other
|
|
1579
|
+
* idempotent template scaffolding that ships with the npm package.
|
|
1580
|
+
*
|
|
1581
|
+
* @example
|
|
1582
|
+
* ```typescript
|
|
1583
|
+
* const { copied, kept } = await copyTemplateTree(
|
|
1584
|
+
* '/usr/lib/node_modules/@cleocode/cleo/templates/cleoos-hub/pi-extensions',
|
|
1585
|
+
* '/home/me/.local/share/cleo/pi-extensions',
|
|
1586
|
+
* );
|
|
1587
|
+
* console.log(`copied ${copied}, kept ${kept}`);
|
|
1588
|
+
* ```
|
|
1589
|
+
*/
|
|
1590
|
+
async function copyTemplateTree(
|
|
1591
|
+
srcDir: string,
|
|
1592
|
+
dstDir: string,
|
|
1593
|
+
): Promise<{ copied: number; kept: number }> {
|
|
1594
|
+
if (!existsSync(srcDir)) {
|
|
1595
|
+
return { copied: 0, kept: 0 };
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
await mkdir(dstDir, { recursive: true });
|
|
1599
|
+
|
|
1600
|
+
let copied = 0;
|
|
1601
|
+
let kept = 0;
|
|
1602
|
+
|
|
1603
|
+
let entries: Dirent[];
|
|
1604
|
+
try {
|
|
1605
|
+
entries = await readdir(srcDir, { withFileTypes: true });
|
|
1606
|
+
} catch (err) {
|
|
1607
|
+
// eslint-disable-next-line no-console
|
|
1608
|
+
console.warn(
|
|
1609
|
+
`[CLEO] Could not read template dir ${srcDir}: ${err instanceof Error ? err.message : String(err)}`,
|
|
1610
|
+
);
|
|
1611
|
+
return { copied: 0, kept: 0 };
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
for (const entry of entries) {
|
|
1615
|
+
const srcPath = join(srcDir, entry.name);
|
|
1616
|
+
const dstPath = join(dstDir, entry.name);
|
|
1617
|
+
|
|
1618
|
+
if (entry.isDirectory()) {
|
|
1619
|
+
const sub = await copyTemplateTree(srcPath, dstPath);
|
|
1620
|
+
copied += sub.copied;
|
|
1621
|
+
kept += sub.kept;
|
|
1622
|
+
continue;
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
if (!entry.isFile()) {
|
|
1626
|
+
// Skip symlinks, sockets, devices, etc.
|
|
1627
|
+
continue;
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
if (existsSync(dstPath)) {
|
|
1631
|
+
kept += 1;
|
|
1632
|
+
continue;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
try {
|
|
1636
|
+
await copyFile(srcPath, dstPath);
|
|
1637
|
+
copied += 1;
|
|
1638
|
+
} catch (err) {
|
|
1639
|
+
// eslint-disable-next-line no-console
|
|
1640
|
+
console.warn(
|
|
1641
|
+
`[CLEO] Could not copy template file ${srcPath} -> ${dstPath}: ${err instanceof Error ? err.message : String(err)}`,
|
|
1642
|
+
);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
return { copied, kept };
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
/**
|
|
1650
|
+
* Resolve the absolute root directory of the bundled CleoOS hub templates.
|
|
1651
|
+
*
|
|
1652
|
+
* The templates ship inside the `@cleocode/cleo` package at
|
|
1653
|
+
* `templates/cleoos-hub/`. Because `scaffold.ts` is authored in
|
|
1654
|
+
* `@cleocode/core` but is also esbuilt directly into the `@cleocode/cleo`
|
|
1655
|
+
* CLI bundle, the runtime location of `import.meta.url` (and therefore
|
|
1656
|
+
* {@link getPackageRoot}) varies across deployment shapes. The candidate
|
|
1657
|
+
* list below covers every layout we ship:
|
|
1658
|
+
*
|
|
1659
|
+
* 1. **Bundled cleo (npm install)** — `dist/cli/index.js` lives at
|
|
1660
|
+
* `node_modules/@cleocode/cleo/dist/cli/index.js`, so
|
|
1661
|
+
* `getPackageRoot()` resolves to `node_modules/@cleocode/cleo/dist`
|
|
1662
|
+
* and `../templates/cleoos-hub` reaches the package's templates dir.
|
|
1663
|
+
* 2. **Bundled cleo (dev workspace via build.mjs)** — `dist/cli/index.js`
|
|
1664
|
+
* lives at `packages/cleo/dist/cli/index.js`; same `../templates/...`
|
|
1665
|
+
* candidate as above.
|
|
1666
|
+
* 3. **Unbundled core (workspace tsc)** — scaffold.ts is loaded as
|
|
1667
|
+
* `packages/core/src/scaffold.ts`, so `getPackageRoot()` resolves to
|
|
1668
|
+
* `packages/core/` and `../cleo/templates/cleoos-hub` reaches the
|
|
1669
|
+
* sibling cleo package.
|
|
1670
|
+
* 4. **Unbundled core (npm install of just @cleocode/core)** — the
|
|
1671
|
+
* scope-sibling layout puts both packages under
|
|
1672
|
+
* `node_modules/@cleocode/`, so the same `../cleo/templates/...`
|
|
1673
|
+
* candidate works.
|
|
1674
|
+
* 5. **Legacy fallback** — if the cleo package ever bundles the templates
|
|
1675
|
+
* directly under core, fall through to
|
|
1676
|
+
* `getPackageRoot()/templates/cleoos-hub`.
|
|
1677
|
+
*
|
|
1678
|
+
* @returns Absolute path to the existing template root, or `null` if none found
|
|
1679
|
+
*
|
|
1680
|
+
* @remarks
|
|
1681
|
+
* Returning `null` allows callers to skip the scaffold gracefully instead of
|
|
1682
|
+
* crashing — important for the never-crash scaffold contract.
|
|
1683
|
+
*/
|
|
1684
|
+
function resolveCleoOsHubTemplateRoot(): string | null {
|
|
1685
|
+
const packageRoot = getPackageRoot();
|
|
1686
|
+
const candidates = [
|
|
1687
|
+
// Bundled cleo: getPackageRoot() = .../@cleocode/cleo/dist
|
|
1688
|
+
join(packageRoot, '..', 'templates', 'cleoos-hub'),
|
|
1689
|
+
// Unbundled core in workspace or scope-sibling install
|
|
1690
|
+
join(packageRoot, '..', 'cleo', 'templates', 'cleoos-hub'),
|
|
1691
|
+
// Workspace from monorepo root resolution (defensive)
|
|
1692
|
+
join(packageRoot, '..', '..', 'packages', 'cleo', 'templates', 'cleoos-hub'),
|
|
1693
|
+
// Legacy in-place fallback
|
|
1694
|
+
join(packageRoot, 'templates', 'cleoos-hub'),
|
|
1695
|
+
];
|
|
1696
|
+
return candidates.find((p) => existsSync(p)) ?? null;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Ensure the CleoOS Hub subdirectories exist under the global CLEO home,
|
|
1701
|
+
* and seed all bundled hub templates if they are not already present.
|
|
1702
|
+
*
|
|
1703
|
+
* This is the Phase 1 scaffolding entry point. Idempotent: re-running is
|
|
1704
|
+
* safe and will never overwrite a file that already exists — human and
|
|
1705
|
+
* agent edits to the installed copies are always preserved.
|
|
1706
|
+
*
|
|
1707
|
+
* @returns Scaffold result for the CleoOS hub root
|
|
1708
|
+
*
|
|
1709
|
+
* @remarks
|
|
1710
|
+
* The CleoOS hub currently consists of:
|
|
1711
|
+
* - `global-recipes/` (Justfile Hub: justfile + README)
|
|
1712
|
+
* - `pi-extensions/` (Pi extensions: orchestrator, stage-guide, cant-bridge)
|
|
1713
|
+
* - `cant-workflows/` (CANT workflow library — created empty for agents)
|
|
1714
|
+
* - `agents/` (Global CANT agent definitions — created empty)
|
|
1715
|
+
*
|
|
1716
|
+
* Templates are sourced from the `@cleocode/cleo` package's bundled
|
|
1717
|
+
* `templates/cleoos-hub/` tree. The directory is resolved at runtime through
|
|
1718
|
+
* {@link resolveCleoOsHubTemplateRoot} so the same code path works in the
|
|
1719
|
+
* monorepo workspace and in an installed npm package layout.
|
|
1720
|
+
*
|
|
1721
|
+
* @example
|
|
1722
|
+
* ```typescript
|
|
1723
|
+
* const result = await ensureCleoOsHub();
|
|
1724
|
+
* console.log(result.action); // "created" or "skipped"
|
|
1725
|
+
* ```
|
|
1726
|
+
*/
|
|
1727
|
+
export async function ensureCleoOsHub(): Promise<ScaffoldResult> {
|
|
1728
|
+
const recipesDir = getCleoGlobalRecipesDir();
|
|
1729
|
+
const piExtDir = getCleoPiExtensionsDir();
|
|
1730
|
+
const cantWorkflowsDir = getCleoCantWorkflowsDir();
|
|
1731
|
+
const agentsDir = getCleoGlobalAgentsDir();
|
|
1732
|
+
|
|
1733
|
+
// Always make sure the hub directory skeleton exists, even if templates
|
|
1734
|
+
// can't be located (so downstream tools writing into them don't ENOENT).
|
|
1735
|
+
try {
|
|
1736
|
+
await mkdir(recipesDir, { recursive: true });
|
|
1737
|
+
await mkdir(piExtDir, { recursive: true });
|
|
1738
|
+
await mkdir(cantWorkflowsDir, { recursive: true });
|
|
1739
|
+
await mkdir(agentsDir, { recursive: true });
|
|
1740
|
+
} catch (err) {
|
|
1741
|
+
return {
|
|
1742
|
+
action: 'skipped',
|
|
1743
|
+
path: recipesDir,
|
|
1744
|
+
details: `Failed to create CleoOS hub directories: ${err instanceof Error ? err.message : String(err)}`,
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
const templateRoot = resolveCleoOsHubTemplateRoot();
|
|
1749
|
+
if (!templateRoot) {
|
|
1750
|
+
return {
|
|
1751
|
+
action: 'skipped',
|
|
1752
|
+
path: recipesDir,
|
|
1753
|
+
details: 'CleoOS hub template directory not found in any expected location',
|
|
1754
|
+
};
|
|
1755
|
+
}
|
|
1538
1756
|
|
|
1539
|
-
|
|
1757
|
+
let piResult: { copied: number; kept: number };
|
|
1758
|
+
let recipesResult: { copied: number; kept: number };
|
|
1759
|
+
try {
|
|
1760
|
+
piResult = await copyTemplateTree(join(templateRoot, 'pi-extensions'), piExtDir);
|
|
1761
|
+
recipesResult = await copyTemplateTree(join(templateRoot, 'global-recipes'), recipesDir);
|
|
1762
|
+
} catch (err) {
|
|
1763
|
+
return {
|
|
1764
|
+
action: 'skipped',
|
|
1765
|
+
path: recipesDir,
|
|
1766
|
+
details: `Failed to seed CleoOS hub templates: ${err instanceof Error ? err.message : String(err)}`,
|
|
1767
|
+
};
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
const totalCopied = piResult.copied + recipesResult.copied;
|
|
1771
|
+
return {
|
|
1772
|
+
action: totalCopied > 0 ? 'created' : 'skipped',
|
|
1773
|
+
path: recipesDir,
|
|
1774
|
+
details: `pi-extensions: ${piResult.copied} created/${piResult.kept} kept, global-recipes: ${recipesResult.copied} created/${recipesResult.kept} kept`,
|
|
1775
|
+
};
|
|
1540
1776
|
}
|
|
1541
1777
|
|
|
1542
1778
|
// ── Global check* functions (read-only diagnostics) ──────────────────
|
package/src/skills/dispatch.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Implements multi-strategy dispatch:
|
|
6
6
|
* 1. Label-based: task labels match skill tags
|
|
7
|
-
* 2. Catalog-based:
|
|
7
|
+
* 2. Catalog-based: @cleocode/skills dispatch matrix (via CAAMP catalog bridge)
|
|
8
8
|
* 3. Type-based: task type maps to protocol
|
|
9
9
|
* 4. Keyword-based: title/description matches triggers
|
|
10
10
|
* 5. Fallback: ct-task-executor
|
|
@@ -70,15 +70,15 @@ const TYPE_PROTOCOL_MAP: Record<string, { skill: string; protocol: SkillProtocol
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
// ============================================================================
|
|
73
|
-
// Catalog Dispatch Matrix (from
|
|
73
|
+
// Catalog Dispatch Matrix (from @cleocode/skills via CAAMP)
|
|
74
74
|
// ============================================================================
|
|
75
75
|
|
|
76
|
-
/** Cached dispatch matrix from the
|
|
76
|
+
/** Cached dispatch matrix from the @cleocode/skills catalog. */
|
|
77
77
|
let _catalogMatrix: CtDispatchMatrix | null = null;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* Get the catalog dispatch matrix, caching on first access.
|
|
81
|
-
* Returns null if
|
|
81
|
+
* Returns null if the @cleocode/skills catalog is unavailable.
|
|
82
82
|
*/
|
|
83
83
|
function getCatalogMatrix(): CtDispatchMatrix | null {
|
|
84
84
|
if (_catalogMatrix !== null) return _catalogMatrix;
|
|
@@ -123,7 +123,7 @@ function dispatchByLabels(task: Task, skills: Skill[]): DispatchResult | null {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
|
-
* Attempt catalog-based dispatch: use
|
|
126
|
+
* Attempt catalog-based dispatch: use the @cleocode/skills dispatch matrix.
|
|
127
127
|
* Checks by_task_type and by_keyword from the catalog.
|
|
128
128
|
* @task T4517
|
|
129
129
|
*/
|
|
@@ -220,7 +220,7 @@ export function autoDispatch(task: Task, cwd?: string): DispatchResult {
|
|
|
220
220
|
const labelResult = dispatchByLabels(task, skills);
|
|
221
221
|
if (labelResult) return labelResult;
|
|
222
222
|
|
|
223
|
-
// Strategy 2: Catalog-based (
|
|
223
|
+
// Strategy 2: Catalog-based (@cleocode/skills dispatch matrix via CAAMP)
|
|
224
224
|
const catalogResult = dispatchByCatalog(task);
|
|
225
225
|
if (catalogResult) return catalogResult;
|
|
226
226
|
|
|
@@ -147,53 +147,57 @@ export function resolveSkillPath(skillName: string, projectRoot?: string): strin
|
|
|
147
147
|
/**
|
|
148
148
|
* Resolve a protocol .md file.
|
|
149
149
|
*
|
|
150
|
-
* Search order
|
|
151
|
-
* 1.
|
|
152
|
-
*
|
|
150
|
+
* Search order:
|
|
151
|
+
* 1. `<core-package>/src/validation/protocols/protocols-markdown/{name}.md`
|
|
152
|
+
* (canonical location, where the markdown lives in this monorepo)
|
|
153
|
+
* 2. `<base>/protocols/{name}.md` for each registered skill base path
|
|
154
|
+
* (project-local protocol overrides)
|
|
153
155
|
*
|
|
154
156
|
* @task T4552
|
|
157
|
+
* @task T260 — drop dead Strategy B paths, point at the real protocols-markdown dir
|
|
155
158
|
*/
|
|
156
159
|
export function resolveProtocolPath(protocolName: string, projectRoot?: string): string | null {
|
|
157
|
-
|
|
160
|
+
// Canonical location in @cleocode/core
|
|
161
|
+
const root = getProjectRoot(projectRoot);
|
|
162
|
+
const canonical = join(
|
|
163
|
+
root,
|
|
164
|
+
'packages',
|
|
165
|
+
'core',
|
|
166
|
+
'src',
|
|
167
|
+
'validation',
|
|
168
|
+
'protocols',
|
|
169
|
+
'protocols-markdown',
|
|
170
|
+
`${protocolName}.md`,
|
|
171
|
+
);
|
|
172
|
+
if (existsSync(canonical)) {
|
|
173
|
+
return safeRealpath(canonical);
|
|
174
|
+
}
|
|
158
175
|
|
|
159
|
-
//
|
|
176
|
+
// Per-skill-base override directory
|
|
177
|
+
const searchPaths = getSkillSearchPaths(projectRoot);
|
|
160
178
|
for (const { path: searchPath } of searchPaths) {
|
|
161
|
-
const candidate = join(searchPath, '
|
|
179
|
+
const candidate = join(searchPath, 'protocols', `${protocolName}.md`);
|
|
162
180
|
if (existsSync(candidate)) {
|
|
163
181
|
return safeRealpath(candidate);
|
|
164
182
|
}
|
|
165
183
|
}
|
|
166
184
|
|
|
167
|
-
// Legacy fallback: project root protocols directory
|
|
168
|
-
const root = getProjectRoot(projectRoot);
|
|
169
|
-
const legacy = join(root, 'src', 'protocols', `${protocolName}.md`);
|
|
170
|
-
if (existsSync(legacy)) {
|
|
171
|
-
return safeRealpath(legacy);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
185
|
return null;
|
|
175
186
|
}
|
|
176
187
|
|
|
177
188
|
/**
|
|
178
189
|
* Resolve a shared resource .md file.
|
|
179
190
|
*
|
|
180
|
-
* Search order per base path:
|
|
181
|
-
*
|
|
182
|
-
* 2. {base}/_shared/{resource_name}.md (legacy embedded layout)
|
|
191
|
+
* Search order per base path: `{base}/_shared/{resource_name}.md`. The
|
|
192
|
+
* `_shared/` directory is the canonical location in `@cleocode/skills`.
|
|
183
193
|
*
|
|
184
194
|
* @task T4552
|
|
195
|
+
* @task T260 — drop dead Strategy B path
|
|
185
196
|
*/
|
|
186
197
|
export function resolveSharedPath(resourceName: string, projectRoot?: string): string | null {
|
|
187
198
|
const searchPaths = getSkillSearchPaths(projectRoot);
|
|
188
199
|
|
|
189
200
|
for (const { path: searchPath } of searchPaths) {
|
|
190
|
-
// Strategy B: _ct-skills-shared/ directory
|
|
191
|
-
const candidate = join(searchPath, '_ct-skills-shared', `${resourceName}.md`);
|
|
192
|
-
if (existsSync(candidate)) {
|
|
193
|
-
return safeRealpath(candidate);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// Legacy: _shared/ directory within each base path
|
|
197
201
|
const legacy = join(searchPath, '_shared', `${resourceName}.md`);
|
|
198
202
|
if (existsSync(legacy)) {
|
|
199
203
|
return safeRealpath(legacy);
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared helpers for the per-protocol "load by task id" wrapper functions.
|
|
3
|
+
*
|
|
4
|
+
* The pure validators live in `orchestration/protocol-validators.ts` — this
|
|
5
|
+
* module is only about bridging the legacy taskId/manifestFile entry points
|
|
6
|
+
* (used by the CLI / dispatch layer) to those pure validators.
|
|
7
|
+
*
|
|
8
|
+
* @task T260
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
12
|
+
import { ExitCode } from '@cleocode/contracts';
|
|
13
|
+
import { CleoError } from '../../errors.js';
|
|
14
|
+
import type {
|
|
15
|
+
ManifestEntryInput,
|
|
16
|
+
ProtocolType,
|
|
17
|
+
ProtocolValidationResult,
|
|
18
|
+
} from '../../orchestration/protocol-validators.js';
|
|
19
|
+
import { PROTOCOL_EXIT_CODES } from '../../orchestration/protocol-validators.js';
|
|
20
|
+
import { getManifestPath } from '../../paths.js';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Locate the manifest line for a given task ID, reading from the end of the
|
|
24
|
+
* file so the most recent entry wins.
|
|
25
|
+
*
|
|
26
|
+
* @task T260
|
|
27
|
+
*/
|
|
28
|
+
export function findManifestEntry(taskId: string, manifestPath: string): string | null {
|
|
29
|
+
if (!existsSync(manifestPath)) return null;
|
|
30
|
+
const content = readFileSync(manifestPath, 'utf-8').trim();
|
|
31
|
+
if (content.length === 0) return null;
|
|
32
|
+
const lines = content.split('\n');
|
|
33
|
+
for (let i = lines.length - 1; i >= 0; i--) {
|
|
34
|
+
const line = lines[i];
|
|
35
|
+
if (line && line.includes(`"${taskId}"`)) return line;
|
|
36
|
+
}
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Load a manifest entry by task ID from the canonical manifest file.
|
|
42
|
+
*
|
|
43
|
+
* @task T260
|
|
44
|
+
*/
|
|
45
|
+
export function loadManifestEntryByTaskId(taskId: string): ManifestEntryInput {
|
|
46
|
+
const manifestPath = getManifestPath();
|
|
47
|
+
const entry = findManifestEntry(taskId, manifestPath);
|
|
48
|
+
if (!entry) {
|
|
49
|
+
throw new CleoError(ExitCode.NOT_FOUND, `No manifest entry found for task ${taskId}`);
|
|
50
|
+
}
|
|
51
|
+
return JSON.parse(entry) as ManifestEntryInput;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Load a manifest entry from an arbitrary JSON file (used by the `manifest`
|
|
56
|
+
* dispatch mode where the caller already has a serialized entry).
|
|
57
|
+
*
|
|
58
|
+
* @task T260
|
|
59
|
+
*/
|
|
60
|
+
export function loadManifestEntryFromFile(manifestFile: string): ManifestEntryInput {
|
|
61
|
+
if (!existsSync(manifestFile)) {
|
|
62
|
+
throw new CleoError(ExitCode.NOT_FOUND, `Manifest file not found: ${manifestFile}`);
|
|
63
|
+
}
|
|
64
|
+
return JSON.parse(readFileSync(manifestFile, 'utf-8')) as ManifestEntryInput;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Throw a CleoError with the protocol's canonical exit code when strict
|
|
69
|
+
* validation fails.
|
|
70
|
+
*
|
|
71
|
+
* @task T260
|
|
72
|
+
*/
|
|
73
|
+
export function throwIfStrictFailed(
|
|
74
|
+
result: ProtocolValidationResult,
|
|
75
|
+
opts: { strict?: boolean },
|
|
76
|
+
protocol: ProtocolType,
|
|
77
|
+
taskId: string,
|
|
78
|
+
): void {
|
|
79
|
+
if (!opts.strict || result.valid) return;
|
|
80
|
+
const code = PROTOCOL_EXIT_CODES[protocol];
|
|
81
|
+
throw new CleoError(
|
|
82
|
+
code,
|
|
83
|
+
`${protocol} protocol violations for ${taskId}: ${result.violations
|
|
84
|
+
.filter((v) => v.severity === 'error')
|
|
85
|
+
.map((v) => v.message)
|
|
86
|
+
.join('; ')}`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Decision Record protocol — thin wrapper delegating to the
|
|
3
|
+
* canonical pure validator.
|
|
4
|
+
*
|
|
5
|
+
* This file fills a long-standing gap: every other CLEO pipeline stage had
|
|
6
|
+
* a TS validator, but the architecture_decision stage (added when RCSD was
|
|
7
|
+
* renamed to RCASD) never got one. The ADR markdown spec at
|
|
8
|
+
* `protocols-markdown/architecture-decision.md` defines ADR-001..008 MUST
|
|
9
|
+
* requirements — all enforced by the pure validator in
|
|
10
|
+
* `../../orchestration/protocol-validators.ts`.
|
|
11
|
+
*
|
|
12
|
+
* @task T260 — create the missing ADR protocol validator
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import {
|
|
16
|
+
type ArchitectureDecisionOptions,
|
|
17
|
+
type ManifestEntryInput,
|
|
18
|
+
type ProtocolValidationResult,
|
|
19
|
+
validateArchitectureDecisionProtocol,
|
|
20
|
+
} from '../../orchestration/protocol-validators.js';
|
|
21
|
+
import {
|
|
22
|
+
loadManifestEntryByTaskId,
|
|
23
|
+
loadManifestEntryFromFile,
|
|
24
|
+
throwIfStrictFailed,
|
|
25
|
+
} from './_shared.js';
|
|
26
|
+
|
|
27
|
+
/** Validate architecture-decision protocol for a task. */
|
|
28
|
+
export async function validateArchitectureDecisionTask(
|
|
29
|
+
taskId: string,
|
|
30
|
+
opts: { strict?: boolean } & ArchitectureDecisionOptions,
|
|
31
|
+
): Promise<ProtocolValidationResult> {
|
|
32
|
+
const entry = loadManifestEntryByTaskId(taskId) as ManifestEntryInput & {
|
|
33
|
+
consensus_manifest_id?: string;
|
|
34
|
+
};
|
|
35
|
+
const result = validateArchitectureDecisionProtocol(entry, opts);
|
|
36
|
+
throwIfStrictFailed(result, opts, 'architecture-decision', taskId);
|
|
37
|
+
return result;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Validate architecture-decision protocol from a manifest file. */
|
|
41
|
+
export async function checkArchitectureDecisionManifest(
|
|
42
|
+
manifestFile: string,
|
|
43
|
+
opts: { strict?: boolean } & ArchitectureDecisionOptions,
|
|
44
|
+
): Promise<ProtocolValidationResult> {
|
|
45
|
+
const entry = loadManifestEntryFromFile(manifestFile) as ManifestEntryInput & {
|
|
46
|
+
consensus_manifest_id?: string;
|
|
47
|
+
};
|
|
48
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
49
|
+
const result = validateArchitectureDecisionProtocol(entry, opts);
|
|
50
|
+
throwIfStrictFailed(result, opts, 'architecture-decision', taskId);
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Artifact Publish protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
4
|
+
* Artifact-publish is a cross-cutting protocol that composes with release:
|
|
5
|
+
* release triggers artifact-publish for the distribution phase (see release.md
|
|
6
|
+
* Pipeline Integration and release-engine.ts releaseShip()). Not every release
|
|
7
|
+
* needs artifact-publish — source-only releases can skip it.
|
|
8
|
+
*
|
|
9
|
+
* @task T260 — create the missing artifact-publish protocol wrapper
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import {
|
|
13
|
+
type ProtocolValidationResult,
|
|
14
|
+
validateArtifactPublishProtocol,
|
|
15
|
+
} from '../../orchestration/protocol-validators.js';
|
|
16
|
+
import {
|
|
17
|
+
loadManifestEntryByTaskId,
|
|
18
|
+
loadManifestEntryFromFile,
|
|
19
|
+
throwIfStrictFailed,
|
|
20
|
+
} from './_shared.js';
|
|
21
|
+
|
|
22
|
+
interface ArtifactPublishOpts {
|
|
23
|
+
strict?: boolean;
|
|
24
|
+
artifactType?: string;
|
|
25
|
+
buildPassed?: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Validate artifact-publish protocol for a task. */
|
|
29
|
+
export async function validateArtifactPublishTask(
|
|
30
|
+
taskId: string,
|
|
31
|
+
opts: ArtifactPublishOpts,
|
|
32
|
+
): Promise<ProtocolValidationResult> {
|
|
33
|
+
const entry = loadManifestEntryByTaskId(taskId);
|
|
34
|
+
const result = validateArtifactPublishProtocol(entry, opts);
|
|
35
|
+
throwIfStrictFailed(result, opts, 'artifact-publish', taskId);
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Validate artifact-publish protocol from a manifest file. */
|
|
40
|
+
export async function checkArtifactPublishManifest(
|
|
41
|
+
manifestFile: string,
|
|
42
|
+
opts: ArtifactPublishOpts,
|
|
43
|
+
): Promise<ProtocolValidationResult> {
|
|
44
|
+
const entry = loadManifestEntryFromFile(manifestFile);
|
|
45
|
+
const taskId = entry.linked_tasks?.[0] ?? 'UNKNOWN';
|
|
46
|
+
const result = validateArtifactPublishProtocol(entry, opts);
|
|
47
|
+
throwIfStrictFailed(result, opts, 'artifact-publish', taskId);
|
|
48
|
+
return result;
|
|
49
|
+
}
|