@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/internal.ts
CHANGED
|
@@ -122,19 +122,29 @@ export {
|
|
|
122
122
|
} from './lifecycle/chain-store.js';
|
|
123
123
|
// Lifecycle
|
|
124
124
|
export {
|
|
125
|
+
buildStageGuidance,
|
|
125
126
|
checkGate,
|
|
126
127
|
checkStagePrerequisites,
|
|
127
128
|
failGate,
|
|
129
|
+
formatStageGuidance,
|
|
128
130
|
getLifecycleGates,
|
|
129
131
|
getLifecycleHistory,
|
|
130
132
|
getLifecycleStatus,
|
|
131
133
|
getStagePrerequisites,
|
|
134
|
+
isValidStage,
|
|
132
135
|
listEpicsWithLifecycle,
|
|
136
|
+
PIPELINE_STAGES,
|
|
133
137
|
passGate,
|
|
134
138
|
recordStageProgress,
|
|
139
|
+
renderStageGuidance,
|
|
135
140
|
resetStage,
|
|
141
|
+
STAGE_SKILL_MAP,
|
|
142
|
+
type Stage,
|
|
143
|
+
type StageGuidance,
|
|
136
144
|
skipStageWithReason,
|
|
145
|
+
TIER_0_SKILLS,
|
|
137
146
|
} from './lifecycle/index.js';
|
|
147
|
+
export { STAGE_DEFINITIONS } from './lifecycle/stages.js';
|
|
138
148
|
export { instantiateTessera, showTessera } from './lifecycle/tessera-engine.js';
|
|
139
149
|
// Memory — brain lifecycle (temporal decay + consolidation)
|
|
140
150
|
export type { ConsolidationResult, DecayResult } from './memory/brain-lifecycle.js';
|
|
@@ -568,7 +578,16 @@ export {
|
|
|
568
578
|
camelToKebab,
|
|
569
579
|
validateRequiredParamsDef,
|
|
570
580
|
} from './validation/param-utils.js';
|
|
571
|
-
// Validation — protocols
|
|
581
|
+
// Validation — protocols (thin wrappers around orchestration/protocol-validators)
|
|
582
|
+
// Covers all 9 pipeline stages + 3 cross-cutting protocols (12 total).
|
|
583
|
+
export {
|
|
584
|
+
checkArchitectureDecisionManifest,
|
|
585
|
+
validateArchitectureDecisionTask,
|
|
586
|
+
} from './validation/protocols/architecture-decision.js';
|
|
587
|
+
export {
|
|
588
|
+
checkArtifactPublishManifest,
|
|
589
|
+
validateArtifactPublishTask,
|
|
590
|
+
} from './validation/protocols/artifact-publish.js';
|
|
572
591
|
export { checkConsensusManifest, validateConsensusTask } from './validation/protocols/consensus.js';
|
|
573
592
|
export {
|
|
574
593
|
checkContributionManifest,
|
|
@@ -582,10 +601,21 @@ export {
|
|
|
582
601
|
checkImplementationManifest,
|
|
583
602
|
validateImplementationTask,
|
|
584
603
|
} from './validation/protocols/implementation.js';
|
|
604
|
+
export {
|
|
605
|
+
checkProvenanceManifest,
|
|
606
|
+
validateProvenanceTask,
|
|
607
|
+
} from './validation/protocols/provenance.js';
|
|
608
|
+
export { checkReleaseManifest, validateReleaseTask } from './validation/protocols/release.js';
|
|
609
|
+
export { checkResearchManifest, validateResearchTask } from './validation/protocols/research.js';
|
|
585
610
|
export {
|
|
586
611
|
checkSpecificationManifest,
|
|
587
612
|
validateSpecificationTask,
|
|
588
613
|
} from './validation/protocols/specification.js';
|
|
614
|
+
export { checkTestingManifest, validateTestingTask } from './validation/protocols/testing.js';
|
|
615
|
+
export {
|
|
616
|
+
checkValidationManifest,
|
|
617
|
+
validateValidationTask,
|
|
618
|
+
} from './validation/protocols/validation.js';
|
|
589
619
|
export type { CoherenceIssue } from './validation/validate-ops.js';
|
|
590
620
|
// Validation — validate-ops
|
|
591
621
|
export {
|
|
@@ -20,18 +20,27 @@ export const DEFAULT_CHAIN_ID = 'rcasd-ivtrc';
|
|
|
20
20
|
/**
|
|
21
21
|
* Stage mapping for protocol validation gates in the default chain.
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* Cross-cutting protocols compose with specific host stages:
|
|
24
|
+
* - `contribution` is validated at implementation (author attribution).
|
|
25
|
+
* - `artifact-publish` and `provenance` are validated at release
|
|
26
|
+
* (see release.md composition: release triggers artifact-publish for the
|
|
27
|
+
* distribution phase, which delegates signing/attestation to provenance).
|
|
28
|
+
*
|
|
29
|
+
* Pipeline stages map 1:1 to their own protocol validators.
|
|
25
30
|
*
|
|
26
31
|
* @task T5419
|
|
32
|
+
* @task T260 — add architecture-decision, validation, testing mappings
|
|
27
33
|
*/
|
|
28
34
|
export const DEFAULT_PROTOCOL_STAGE_MAP: Record<ProtocolType, Stage> = {
|
|
29
35
|
research: 'research',
|
|
30
36
|
consensus: 'consensus',
|
|
37
|
+
'architecture-decision': 'architecture_decision',
|
|
31
38
|
specification: 'specification',
|
|
32
39
|
decomposition: 'decomposition',
|
|
33
40
|
implementation: 'implementation',
|
|
34
41
|
contribution: 'implementation',
|
|
42
|
+
validation: 'validation',
|
|
43
|
+
testing: 'testing',
|
|
35
44
|
release: 'release',
|
|
36
45
|
'artifact-publish': 'release',
|
|
37
46
|
provenance: 'release',
|
package/src/lifecycle/index.ts
CHANGED
|
@@ -29,6 +29,16 @@ import { ensureStageArtifact } from './stage-artifacts.js';
|
|
|
29
29
|
// CANONICAL RE-EXPORTS from stages.ts (single source of truth)
|
|
30
30
|
// =============================================================================
|
|
31
31
|
|
|
32
|
+
// Phase 2 — stage-aware prompt guidance for Pi extensions
|
|
33
|
+
// Phase 4 — refactored to load from real SKILL.md files via prepareSpawnMulti
|
|
34
|
+
export {
|
|
35
|
+
buildStageGuidance,
|
|
36
|
+
formatStageGuidance,
|
|
37
|
+
renderStageGuidance,
|
|
38
|
+
STAGE_SKILL_MAP,
|
|
39
|
+
type StageGuidance,
|
|
40
|
+
TIER_0_SKILLS,
|
|
41
|
+
} from './stage-guidance.js';
|
|
32
42
|
export {
|
|
33
43
|
CONTRIBUTION_STAGE,
|
|
34
44
|
checkTransition,
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stage-Aware LLM Prompt Guidance (Phase 2, refactored Phase 4).
|
|
3
|
+
*
|
|
4
|
+
* **Architecture (SSoT)**: The protocol text for each RCASD-IVTR+C stage is
|
|
5
|
+
* authoritatively encoded in the `@cleocode/skills` package at
|
|
6
|
+
* `packages/skills/skills/ct-*` — specifically:
|
|
7
|
+
*
|
|
8
|
+
* - Tier 0 (always loaded): `ct-cleo`, `ct-orchestrator`, `ct-task-executor`
|
|
9
|
+
* - Stage-specific (per RCASD-IVTR+C stage): see `STAGE_SKILL_MAP` below
|
|
10
|
+
*
|
|
11
|
+
* This module is a **thin loader** — it does NOT embed protocol text. It
|
|
12
|
+
* resolves stage → skill names via `STAGE_SKILL_MAP`, then calls the
|
|
13
|
+
* existing `prepareSpawnMulti()` helper (from `../skills/dispatch.ts`) to
|
|
14
|
+
* compose the full prompt from real `SKILL.md` files.
|
|
15
|
+
*
|
|
16
|
+
* If the skill files are unavailable at runtime (e.g. fresh install, skills
|
|
17
|
+
* package missing), we fall back to a minimal structured description built
|
|
18
|
+
* from `STAGE_DEFINITIONS` alone — never hand-authored prose.
|
|
19
|
+
*
|
|
20
|
+
* @task Phase 2 — Pi harness registration + stage guidance injection
|
|
21
|
+
* @task Phase 4 — SSoT alignment: pull from skill files, not inline text
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
import { findSkill } from '../skills/discovery.js';
|
|
25
|
+
import { prepareSpawnMulti } from '../skills/dispatch.js';
|
|
26
|
+
import { STAGE_DEFINITIONS, type Stage } from './stages.js';
|
|
27
|
+
|
|
28
|
+
// ============================================================================
|
|
29
|
+
// SSoT: Stage → Skill mapping
|
|
30
|
+
// ============================================================================
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Canonical mapping from RCASD-IVTR+C pipeline stages to the primary skill
|
|
34
|
+
* that encodes the protocol for that stage.
|
|
35
|
+
*
|
|
36
|
+
* Each pipeline stage maps to exactly one **dedicated** skill that owns
|
|
37
|
+
* the protocol contract for that stage. The keys here are the canonical
|
|
38
|
+
* `Stage` union from `./stages.ts`; the values are skill names that MUST
|
|
39
|
+
* exist under `packages/skills/skills/` and be registered in the global
|
|
40
|
+
* manifest at `packages/skills/skills/manifest.json`.
|
|
41
|
+
*
|
|
42
|
+
* **Relationship to manifest.json:** This table is the runtime authority
|
|
43
|
+
* for stage→skill resolution by `buildStageGuidance()`. The manifest's
|
|
44
|
+
* `dispatch_matrix.by_protocol` table is the broader catalog (it also
|
|
45
|
+
* covers cross-cutting protocols like contribution, artifact-publish, and
|
|
46
|
+
* provenance which are NOT pipeline stages and therefore are not in this
|
|
47
|
+
* map). When the two tables overlap, they MUST agree on the skill name.
|
|
48
|
+
*
|
|
49
|
+
* **Cross-cutting protocols** (`contribution`, `artifact-publish`,
|
|
50
|
+
* `provenance`) compose with pipeline stages but are not themselves
|
|
51
|
+
* stages — see `lifecycle/default-chain.ts#DEFAULT_PROTOCOL_STAGE_MAP`
|
|
52
|
+
* for the cross-cutting → host-stage mapping.
|
|
53
|
+
*
|
|
54
|
+
* @task T260 — replace overloaded ct-validator/ct-dev-workflow assignments
|
|
55
|
+
* with dedicated skills (ct-adr-recorder, ct-consensus-voter,
|
|
56
|
+
* ct-ivt-looper, ct-release-orchestrator). Validation stays on
|
|
57
|
+
* ct-validator now that consensus duties are split out.
|
|
58
|
+
*/
|
|
59
|
+
export const STAGE_SKILL_MAP: Record<Stage, string> = {
|
|
60
|
+
research: 'ct-research-agent',
|
|
61
|
+
consensus: 'ct-consensus-voter',
|
|
62
|
+
architecture_decision: 'ct-adr-recorder',
|
|
63
|
+
specification: 'ct-spec-writer',
|
|
64
|
+
decomposition: 'ct-epic-architect',
|
|
65
|
+
implementation: 'ct-task-executor',
|
|
66
|
+
validation: 'ct-validator',
|
|
67
|
+
testing: 'ct-ivt-looper',
|
|
68
|
+
release: 'ct-release-orchestrator',
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Tier 0 skills — always loaded alongside the stage-specific skill.
|
|
73
|
+
*
|
|
74
|
+
* - `ct-cleo`: CLEO task management protocol (session, task, memory CLI)
|
|
75
|
+
* - `ct-orchestrator`: pipeline-aware orchestration constraints (ORC-001..009)
|
|
76
|
+
*
|
|
77
|
+
* `ct-task-executor` is NOT unconditionally included because most stages
|
|
78
|
+
* already resolve to a more-specific executor skill; it's only added when
|
|
79
|
+
* no stage-specific skill exists.
|
|
80
|
+
*/
|
|
81
|
+
export const TIER_0_SKILLS: readonly string[] = ['ct-cleo', 'ct-orchestrator'];
|
|
82
|
+
|
|
83
|
+
// ============================================================================
|
|
84
|
+
// Public types
|
|
85
|
+
// ============================================================================
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Structured guidance for a single pipeline stage.
|
|
89
|
+
*
|
|
90
|
+
* Pi extensions consume the `.prompt` field directly (render via
|
|
91
|
+
* `{ systemPrompt }` in `before_agent_start`). The structured fields are
|
|
92
|
+
* exposed for TUI widgets, badges, and logging.
|
|
93
|
+
*/
|
|
94
|
+
export interface StageGuidance {
|
|
95
|
+
/** The canonical stage identifier. */
|
|
96
|
+
stage: Stage;
|
|
97
|
+
/** Human-readable stage name (e.g. "Research"). */
|
|
98
|
+
name: string;
|
|
99
|
+
/** Numeric stage order (1-9). */
|
|
100
|
+
order: number;
|
|
101
|
+
/** Primary skill loaded for this stage (SSoT from STAGE_SKILL_MAP). */
|
|
102
|
+
primarySkill: string;
|
|
103
|
+
/** All skills loaded (Tier 0 + stage primary). */
|
|
104
|
+
loadedSkills: readonly string[];
|
|
105
|
+
/** Gates that must pass before the stage can be completed. */
|
|
106
|
+
requiredGates: readonly string[];
|
|
107
|
+
/** Artifacts the agent is expected to produce before advancing. */
|
|
108
|
+
expectedArtifacts: readonly string[];
|
|
109
|
+
/** Composed prompt text, ready for LLM system prompt injection. */
|
|
110
|
+
prompt: string;
|
|
111
|
+
/** Source of the prompt: 'skills' (real SKILL.md files) or 'fallback'. */
|
|
112
|
+
source: 'skills' | 'fallback';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// ============================================================================
|
|
116
|
+
// Fallback prompt builder — used only when skills are unavailable
|
|
117
|
+
// ============================================================================
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Build a minimal stage prompt from canonical metadata when the skill files
|
|
121
|
+
* cannot be resolved. Uses only `STAGE_DEFINITIONS` — no hand-authored prose.
|
|
122
|
+
*
|
|
123
|
+
* This intentionally produces a compact prompt that tells the agent what
|
|
124
|
+
* stage it's in and where to find the authoritative protocol. It is NOT a
|
|
125
|
+
* substitute for the real skill content.
|
|
126
|
+
*/
|
|
127
|
+
function buildFallbackPrompt(stage: Stage, primarySkill: string): string {
|
|
128
|
+
const def = STAGE_DEFINITIONS[stage];
|
|
129
|
+
const lines: string[] = [];
|
|
130
|
+
lines.push(`## CLEO Pipeline Stage: ${def.name} (stage ${def.order}/9)`);
|
|
131
|
+
lines.push('');
|
|
132
|
+
lines.push(`**Description**: ${def.description}`);
|
|
133
|
+
lines.push(`**Category**: ${def.category}`);
|
|
134
|
+
lines.push(`**Skippable**: ${def.skippable ? 'yes' : 'no'}`);
|
|
135
|
+
lines.push('');
|
|
136
|
+
lines.push('### Required Gates');
|
|
137
|
+
for (const gate of def.requiredGates) {
|
|
138
|
+
lines.push(`- \`${gate}\``);
|
|
139
|
+
}
|
|
140
|
+
lines.push('');
|
|
141
|
+
lines.push('### Expected Artifacts');
|
|
142
|
+
for (const artifact of def.expectedArtifacts) {
|
|
143
|
+
lines.push(`- \`${artifact}\``);
|
|
144
|
+
}
|
|
145
|
+
lines.push('');
|
|
146
|
+
lines.push('### Primary Skill');
|
|
147
|
+
lines.push(
|
|
148
|
+
`- **${primarySkill}** — protocol unavailable at runtime. Install \`@cleocode/skills\` or run \`cleo admin scaffold-hub\` to provision.`,
|
|
149
|
+
);
|
|
150
|
+
lines.push('');
|
|
151
|
+
lines.push('### Tier 0 Skills (always loaded)');
|
|
152
|
+
for (const s of TIER_0_SKILLS) {
|
|
153
|
+
lines.push(`- ${s}`);
|
|
154
|
+
}
|
|
155
|
+
lines.push('');
|
|
156
|
+
lines.push(
|
|
157
|
+
'> Fallback guidance — the full `SKILL.md` files could not be resolved. ' +
|
|
158
|
+
'Check skill installation with `cleo skills list`.',
|
|
159
|
+
);
|
|
160
|
+
return lines.join('\n');
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// ============================================================================
|
|
164
|
+
// Public API
|
|
165
|
+
// ============================================================================
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Build structured stage guidance for a given pipeline stage.
|
|
169
|
+
*
|
|
170
|
+
* Resolves the primary skill for the stage from `STAGE_SKILL_MAP`, composes
|
|
171
|
+
* a prompt from the real `SKILL.md` files via `prepareSpawnMulti()`, and
|
|
172
|
+
* returns a `StageGuidance` object suitable for Pi extension injection or
|
|
173
|
+
* direct CLI rendering.
|
|
174
|
+
*
|
|
175
|
+
* If the skills cannot be resolved, returns a fallback prompt built from
|
|
176
|
+
* `STAGE_DEFINITIONS` metadata only — no hand-authored protocol text.
|
|
177
|
+
*
|
|
178
|
+
* @param stage - The canonical pipeline stage identifier
|
|
179
|
+
* @param cwd - Optional project root override for skill resolution
|
|
180
|
+
* @returns Structured guidance with `.prompt` ready for LLM injection
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```typescript
|
|
184
|
+
* const guidance = buildStageGuidance('implementation');
|
|
185
|
+
* // guidance.primarySkill === 'ct-task-executor'
|
|
186
|
+
* // guidance.loadedSkills === ['ct-task-executor', 'ct-cleo', 'ct-orchestrator']
|
|
187
|
+
* // guidance.prompt starts with "## Skills Loaded (3 total)"
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
export function buildStageGuidance(stage: Stage, cwd?: string): StageGuidance {
|
|
191
|
+
const def = STAGE_DEFINITIONS[stage];
|
|
192
|
+
const primarySkill = STAGE_SKILL_MAP[stage];
|
|
193
|
+
|
|
194
|
+
// Primary first, then Tier 0 (de-dup if the primary is itself tier 0)
|
|
195
|
+
const skillNames = [primarySkill, ...TIER_0_SKILLS.filter((s) => s !== primarySkill)];
|
|
196
|
+
|
|
197
|
+
// Verify every skill can actually be found before calling prepareSpawnMulti
|
|
198
|
+
const allFound = skillNames.every((name) => findSkill(name, cwd) !== null);
|
|
199
|
+
|
|
200
|
+
if (!allFound) {
|
|
201
|
+
return {
|
|
202
|
+
stage,
|
|
203
|
+
name: def.name,
|
|
204
|
+
order: def.order,
|
|
205
|
+
primarySkill,
|
|
206
|
+
loadedSkills: skillNames,
|
|
207
|
+
requiredGates: def.requiredGates,
|
|
208
|
+
expectedArtifacts: def.expectedArtifacts,
|
|
209
|
+
prompt: buildFallbackPrompt(stage, primarySkill),
|
|
210
|
+
source: 'fallback',
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
try {
|
|
215
|
+
const composition = prepareSpawnMulti(skillNames, {}, cwd);
|
|
216
|
+
return {
|
|
217
|
+
stage,
|
|
218
|
+
name: def.name,
|
|
219
|
+
order: def.order,
|
|
220
|
+
primarySkill,
|
|
221
|
+
loadedSkills: skillNames,
|
|
222
|
+
requiredGates: def.requiredGates,
|
|
223
|
+
expectedArtifacts: def.expectedArtifacts,
|
|
224
|
+
prompt: composition.prompt,
|
|
225
|
+
source: 'skills',
|
|
226
|
+
};
|
|
227
|
+
} catch {
|
|
228
|
+
return {
|
|
229
|
+
stage,
|
|
230
|
+
name: def.name,
|
|
231
|
+
order: def.order,
|
|
232
|
+
primarySkill,
|
|
233
|
+
loadedSkills: skillNames,
|
|
234
|
+
requiredGates: def.requiredGates,
|
|
235
|
+
expectedArtifacts: def.expectedArtifacts,
|
|
236
|
+
prompt: buildFallbackPrompt(stage, primarySkill),
|
|
237
|
+
source: 'fallback',
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Format stage guidance as a Markdown-wrapped system prompt.
|
|
244
|
+
*
|
|
245
|
+
* Since `buildStageGuidance()` now returns the already-composed prompt in
|
|
246
|
+
* `.prompt`, this helper simply passes it through with a header banner
|
|
247
|
+
* identifying which skills are loaded and which stage is active.
|
|
248
|
+
*
|
|
249
|
+
* @param guidance - The structured guidance from `buildStageGuidance()`
|
|
250
|
+
* @returns Markdown text suitable for LLM system prompt injection
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```typescript
|
|
254
|
+
* const g = buildStageGuidance('research');
|
|
255
|
+
* const text = formatStageGuidance(g);
|
|
256
|
+
* return { systemPrompt: text }; // Pi before_agent_start hook return
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
259
|
+
export function formatStageGuidance(guidance: StageGuidance): string {
|
|
260
|
+
const banner = [
|
|
261
|
+
`## CLEO Stage-Aware Injection`,
|
|
262
|
+
`**Stage**: ${guidance.name} (${guidance.order}/9) — primary skill: \`${guidance.primarySkill}\``,
|
|
263
|
+
`**Loaded skills**: ${guidance.loadedSkills.join(', ')}`,
|
|
264
|
+
`**Source**: ${guidance.source}`,
|
|
265
|
+
`**Required gates**: ${guidance.requiredGates.map((g) => `\`${g}\``).join(', ')}`,
|
|
266
|
+
'',
|
|
267
|
+
'---',
|
|
268
|
+
'',
|
|
269
|
+
].join('\n');
|
|
270
|
+
return banner + guidance.prompt;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Convenience wrapper: build AND format in a single call.
|
|
275
|
+
*
|
|
276
|
+
* @param stage - The canonical pipeline stage identifier
|
|
277
|
+
* @param cwd - Optional project root override for skill resolution
|
|
278
|
+
* @returns Markdown text ready for LLM system prompt injection
|
|
279
|
+
*/
|
|
280
|
+
export function renderStageGuidance(stage: Stage, cwd?: string): string {
|
|
281
|
+
return formatStageGuidance(buildStageGuidance(stage, cwd));
|
|
282
|
+
}
|