@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
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Specification protocol
|
|
2
|
+
* Specification protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
3
4
|
* @task T4537
|
|
4
|
-
* @
|
|
5
|
+
* @task T260
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
valid: boolean;
|
|
8
|
-
violations: Array<{
|
|
9
|
-
code: string;
|
|
10
|
-
severity: string;
|
|
11
|
-
message: string;
|
|
12
|
-
}>;
|
|
13
|
-
score: number;
|
|
14
|
-
protocol: string;
|
|
15
|
-
taskId: string;
|
|
16
|
-
}
|
|
7
|
+
import { type ProtocolValidationResult } from '../../orchestration/protocol-validators.js';
|
|
17
8
|
/** Validate specification protocol for a task. */
|
|
18
9
|
export declare function validateSpecificationTask(taskId: string, opts: {
|
|
19
10
|
strict?: boolean;
|
|
20
11
|
specFile?: string;
|
|
21
|
-
}): Promise<
|
|
22
|
-
/** Validate specification protocol from manifest file. */
|
|
12
|
+
}): Promise<ProtocolValidationResult>;
|
|
13
|
+
/** Validate specification protocol from a manifest file. */
|
|
23
14
|
export declare function checkSpecificationManifest(manifestFile: string, opts: {
|
|
24
15
|
strict?: boolean;
|
|
25
16
|
specFile?: string;
|
|
26
|
-
}): Promise<
|
|
27
|
-
export {};
|
|
17
|
+
}): Promise<ProtocolValidationResult>;
|
|
28
18
|
//# sourceMappingURL=specification.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specification.d.ts","sourceRoot":"","sources":["../../../src/validation/protocols/specification.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"specification.d.ts","sourceRoot":"","sources":["../../../src/validation/protocols/specification.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,4CAA4C,CAAC;AAOpD,kDAAkD;AAClD,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CAAC,wBAAwB,CAAC,CAOnC;AAED,4DAA4D;AAC5D,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CAAC,wBAAwB,CAAC,CAQnC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Testing protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
4
|
+
* Renamed from testing-protocol.ts in T260. The testing protocol is the
|
|
5
|
+
* project-agnostic IVT loop closure stage: it checks that a detected test
|
|
6
|
+
* framework ran, achieved 100% pass rate, and the Implement→Validate→Test
|
|
7
|
+
* loop converged on the specification. Framework detection and loop logic
|
|
8
|
+
* live in the `ct-ivt-looper` skill; this validator only certifies results.
|
|
9
|
+
*
|
|
10
|
+
* @task T4804
|
|
11
|
+
* @task T260 — drop -protocol suffix, delegate, project-agnostic IVT
|
|
12
|
+
*/
|
|
13
|
+
import { type ProtocolValidationResult, type TestingOptions } from '../../orchestration/protocol-validators.js';
|
|
14
|
+
/** Validate testing protocol for a task. */
|
|
15
|
+
export declare function validateTestingTask(taskId: string, opts: {
|
|
16
|
+
strict?: boolean;
|
|
17
|
+
} & TestingOptions): Promise<ProtocolValidationResult>;
|
|
18
|
+
/** Validate testing protocol from a manifest file. */
|
|
19
|
+
export declare function checkTestingManifest(manifestFile: string, opts: {
|
|
20
|
+
strict?: boolean;
|
|
21
|
+
} & TestingOptions): Promise<ProtocolValidationResult>;
|
|
22
|
+
//# sourceMappingURL=testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.d.ts","sourceRoot":"","sources":["../../../src/validation/protocols/testing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EAEpB,MAAM,4CAA4C,CAAC;AAOpD,4CAA4C;AAC5C,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,cAAc,GAC1C,OAAO,CAAC,wBAAwB,CAAC,CAKnC;AAED,sDAAsD;AACtD,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,cAAc,GAC1C,OAAO,CAAC,wBAAwB,CAAC,CAMnC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation protocol — thin wrapper delegating to the canonical pure validator.
|
|
3
|
+
*
|
|
4
|
+
* Renamed from validation-protocol.ts in T260. The validation stage runs
|
|
5
|
+
* static analysis, type checking, and pre-test quality gates. It is the
|
|
6
|
+
* first half of the IVT loop (Implement → Validate → Test); the validator
|
|
7
|
+
* here only verifies that a validation run produced a proper manifest
|
|
8
|
+
* entry — runtime gate enforcement is in the lifecycle state machine.
|
|
9
|
+
*
|
|
10
|
+
* @task T4804
|
|
11
|
+
* @task T260 — drop -protocol suffix, delegate to orchestration validator
|
|
12
|
+
*/
|
|
13
|
+
import { type ProtocolValidationResult, type ValidationStageOptions } from '../../orchestration/protocol-validators.js';
|
|
14
|
+
/** Validate validation-stage protocol for a task. */
|
|
15
|
+
export declare function validateValidationTask(taskId: string, opts: {
|
|
16
|
+
strict?: boolean;
|
|
17
|
+
} & ValidationStageOptions): Promise<ProtocolValidationResult>;
|
|
18
|
+
/** Validate validation-stage protocol from a manifest file. */
|
|
19
|
+
export declare function checkValidationManifest(manifestFile: string, opts: {
|
|
20
|
+
strict?: boolean;
|
|
21
|
+
} & ValidationStageOptions): Promise<ProtocolValidationResult>;
|
|
22
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/validation/protocols/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAE5B,MAAM,4CAA4C,CAAC;AAOpD,qDAAqD;AACrD,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,sBAAsB,GAClD,OAAO,CAAC,wBAAwB,CAAC,CAKnC;AAED,+DAA+D;AAC/D,wBAAsB,uBAAuB,CAC3C,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,sBAAsB,GAClD,OAAO,CAAC,wBAAwB,CAAC,CAMnC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleocode/core",
|
|
3
|
-
"version": "2026.4.
|
|
3
|
+
"version": "2026.4.7",
|
|
4
4
|
"description": "CLEO core business logic kernel — tasks, sessions, memory, orchestration, lifecycle, with bundled SQLite store",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"write-file-atomic": "^6.0.0",
|
|
36
36
|
"yaml": "^2.8.2",
|
|
37
37
|
"zod": "^3.25.76",
|
|
38
|
-
"@cleocode/adapters": "2026.4.
|
|
39
|
-
"@cleocode/
|
|
40
|
-
"@cleocode/contracts": "2026.4.
|
|
41
|
-
"@cleocode/
|
|
42
|
-
"@cleocode/lafs": "2026.4.
|
|
43
|
-
"@cleocode/skills": "2026.4.
|
|
38
|
+
"@cleocode/adapters": "2026.4.7",
|
|
39
|
+
"@cleocode/agents": "2026.4.7",
|
|
40
|
+
"@cleocode/contracts": "2026.4.7",
|
|
41
|
+
"@cleocode/caamp": "2026.4.7",
|
|
42
|
+
"@cleocode/lafs": "2026.4.7",
|
|
43
|
+
"@cleocode/skills": "2026.4.7"
|
|
44
44
|
},
|
|
45
45
|
"optionalDependencies": {
|
|
46
46
|
"tree-sitter-c": "^0.24.1",
|
package/src/discovery.ts
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Greenfield/Brownfield project discovery & classification (Phase 5).
|
|
3
|
+
*
|
|
4
|
+
* Classifies a project directory as either:
|
|
5
|
+
* - **greenfield**: empty or nearly-empty, no code, no git history
|
|
6
|
+
* - **brownfield**: existing codebase with files, possibly git history
|
|
7
|
+
*
|
|
8
|
+
* Used by `cleo init` (Phase 5 bootstrap) to choose the correct seed
|
|
9
|
+
* pipeline:
|
|
10
|
+
* - Greenfield → seed a Vision/PRD "research" epic so the agent starts
|
|
11
|
+
* from a blank-slate planning posture
|
|
12
|
+
* - Brownfield → invoke codebase mapping and anchor findings in BRAIN as
|
|
13
|
+
* baseline context (per ULTRAPLAN §1 "Context Anchoring")
|
|
14
|
+
*
|
|
15
|
+
* Classification is intentionally simple and transparent — no heuristics,
|
|
16
|
+
* no ML, just file/directory presence checks. A project qualifies as
|
|
17
|
+
* brownfield if ANY of these are true:
|
|
18
|
+
* - `.git/` directory exists (under a size threshold we still treat as
|
|
19
|
+
* brownfield since history matters)
|
|
20
|
+
* - source files exist under common source dirs (src, lib, app, packages)
|
|
21
|
+
* - any manifest file exists (package.json, Cargo.toml, go.mod, pyproject.toml)
|
|
22
|
+
* - markdown docs already exist (README.md, docs/)
|
|
23
|
+
*
|
|
24
|
+
* @task Phase 5 — Greenfield/brownfield bootstrap + context anchoring
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { existsSync, readdirSync, statSync } from 'node:fs';
|
|
28
|
+
import { join, resolve } from 'node:path';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Classification result for a project directory.
|
|
32
|
+
*/
|
|
33
|
+
export interface ProjectClassification {
|
|
34
|
+
/** Project type: 'greenfield' (empty/new) or 'brownfield' (existing). */
|
|
35
|
+
kind: 'greenfield' | 'brownfield';
|
|
36
|
+
/** Absolute path that was classified. */
|
|
37
|
+
directory: string;
|
|
38
|
+
/** Signal list — which indicators led to the classification. */
|
|
39
|
+
signals: ClassificationSignal[];
|
|
40
|
+
/** Total non-hidden files found at the top level (for reporting). */
|
|
41
|
+
topLevelFileCount: number;
|
|
42
|
+
/** Whether a `.git/` directory is present. */
|
|
43
|
+
hasGit: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** A single classification signal detected on the filesystem. */
|
|
47
|
+
export interface ClassificationSignal {
|
|
48
|
+
/** Canonical signal id for programmatic handling. */
|
|
49
|
+
id:
|
|
50
|
+
| 'git-dir'
|
|
51
|
+
| 'source-dir'
|
|
52
|
+
| 'package-manifest'
|
|
53
|
+
| 'docs'
|
|
54
|
+
| 'rust-manifest'
|
|
55
|
+
| 'go-manifest'
|
|
56
|
+
| 'python-manifest'
|
|
57
|
+
| 'readme'
|
|
58
|
+
| 'empty';
|
|
59
|
+
/** Human-readable description of what was detected. */
|
|
60
|
+
description: string;
|
|
61
|
+
/** File or directory that triggered this signal. */
|
|
62
|
+
path: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// ============================================================================
|
|
66
|
+
// Detection helpers
|
|
67
|
+
// ============================================================================
|
|
68
|
+
|
|
69
|
+
/** Common source directory names that indicate an existing codebase. */
|
|
70
|
+
const SOURCE_DIRS = ['src', 'lib', 'app', 'packages', 'crates', 'cmd', 'internal'];
|
|
71
|
+
|
|
72
|
+
/** Manifest files that indicate a managed project. */
|
|
73
|
+
const MANIFESTS: Array<{
|
|
74
|
+
file: string;
|
|
75
|
+
signal: ClassificationSignal['id'];
|
|
76
|
+
description: string;
|
|
77
|
+
}> = [
|
|
78
|
+
{ file: 'package.json', signal: 'package-manifest', description: 'Node.js manifest' },
|
|
79
|
+
{ file: 'Cargo.toml', signal: 'rust-manifest', description: 'Rust manifest' },
|
|
80
|
+
{ file: 'go.mod', signal: 'go-manifest', description: 'Go manifest' },
|
|
81
|
+
{ file: 'pyproject.toml', signal: 'python-manifest', description: 'Python manifest (PEP 621)' },
|
|
82
|
+
{ file: 'requirements.txt', signal: 'python-manifest', description: 'Python requirements.txt' },
|
|
83
|
+
{ file: 'setup.py', signal: 'python-manifest', description: 'Python setup.py' },
|
|
84
|
+
];
|
|
85
|
+
|
|
86
|
+
/** Docs files/directories that indicate prior work. */
|
|
87
|
+
const DOCS_MARKERS: Array<{ path: string; signal: ClassificationSignal['id'] }> = [
|
|
88
|
+
{ path: 'README.md', signal: 'readme' },
|
|
89
|
+
{ path: 'README.rst', signal: 'readme' },
|
|
90
|
+
{ path: 'docs', signal: 'docs' },
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Check if a directory (at the top level only) contains any files that are
|
|
95
|
+
* NOT part of the CLEO scaffolding itself. Used to decide whether the caller
|
|
96
|
+
* is about to `cleo init` into an already-populated directory.
|
|
97
|
+
*/
|
|
98
|
+
function countMeaningfulTopLevelFiles(directory: string): number {
|
|
99
|
+
if (!existsSync(directory)) return 0;
|
|
100
|
+
try {
|
|
101
|
+
const entries = readdirSync(directory);
|
|
102
|
+
let count = 0;
|
|
103
|
+
for (const entry of entries) {
|
|
104
|
+
// Ignore hidden files, the CLEO dir itself, and common CI/git debris
|
|
105
|
+
if (
|
|
106
|
+
entry.startsWith('.') ||
|
|
107
|
+
entry === '.cleo' ||
|
|
108
|
+
entry === 'node_modules' ||
|
|
109
|
+
entry === 'target' ||
|
|
110
|
+
entry === 'dist' ||
|
|
111
|
+
entry === 'build'
|
|
112
|
+
) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
count += 1;
|
|
116
|
+
}
|
|
117
|
+
return count;
|
|
118
|
+
} catch {
|
|
119
|
+
return 0;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// ============================================================================
|
|
124
|
+
// Public API
|
|
125
|
+
// ============================================================================
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Classify a project directory as greenfield or brownfield.
|
|
129
|
+
*
|
|
130
|
+
* Read-only — never mutates the filesystem. Safe to call at any time.
|
|
131
|
+
*
|
|
132
|
+
* @param directory - Absolute or relative path; defaults to process.cwd()
|
|
133
|
+
* @returns Classification result with signals and metadata
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```typescript
|
|
137
|
+
* const classification = classifyProject('/my/project');
|
|
138
|
+
* if (classification.kind === 'greenfield') {
|
|
139
|
+
* // Seed initial Vision epic
|
|
140
|
+
* } else {
|
|
141
|
+
* // Run codebase mapping
|
|
142
|
+
* }
|
|
143
|
+
* ```
|
|
144
|
+
*/
|
|
145
|
+
export function classifyProject(directory?: string): ProjectClassification {
|
|
146
|
+
const root = resolve(directory ?? process.cwd());
|
|
147
|
+
const signals: ClassificationSignal[] = [];
|
|
148
|
+
|
|
149
|
+
// Signal 1: .git directory
|
|
150
|
+
const gitPath = join(root, '.git');
|
|
151
|
+
const hasGit = existsSync(gitPath);
|
|
152
|
+
if (hasGit) {
|
|
153
|
+
signals.push({
|
|
154
|
+
id: 'git-dir',
|
|
155
|
+
description: '.git/ directory present — project has version history',
|
|
156
|
+
path: gitPath,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Signal 2: manifest files
|
|
161
|
+
for (const manifest of MANIFESTS) {
|
|
162
|
+
const manifestPath = join(root, manifest.file);
|
|
163
|
+
if (existsSync(manifestPath)) {
|
|
164
|
+
signals.push({
|
|
165
|
+
id: manifest.signal,
|
|
166
|
+
description: manifest.description,
|
|
167
|
+
path: manifestPath,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Signal 3: common source directories
|
|
173
|
+
for (const dir of SOURCE_DIRS) {
|
|
174
|
+
const srcPath = join(root, dir);
|
|
175
|
+
if (existsSync(srcPath) && isNonEmptyDir(srcPath)) {
|
|
176
|
+
signals.push({
|
|
177
|
+
id: 'source-dir',
|
|
178
|
+
description: `Source directory ${dir}/ contains files`,
|
|
179
|
+
path: srcPath,
|
|
180
|
+
});
|
|
181
|
+
break; // One source-dir signal is enough
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Signal 4: docs / README
|
|
186
|
+
for (const marker of DOCS_MARKERS) {
|
|
187
|
+
const markerPath = join(root, marker.path);
|
|
188
|
+
if (existsSync(markerPath)) {
|
|
189
|
+
signals.push({
|
|
190
|
+
id: marker.signal,
|
|
191
|
+
description: `${marker.path} present`,
|
|
192
|
+
path: markerPath,
|
|
193
|
+
});
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const topLevelFileCount = countMeaningfulTopLevelFiles(root);
|
|
199
|
+
|
|
200
|
+
// Empty signal if we have nothing
|
|
201
|
+
if (signals.length === 0 && topLevelFileCount === 0) {
|
|
202
|
+
signals.push({
|
|
203
|
+
id: 'empty',
|
|
204
|
+
description: 'No source files, manifests, git history, or docs detected',
|
|
205
|
+
path: root,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Classification rule: brownfield if ANY non-'empty' signal present
|
|
210
|
+
const kind: ProjectClassification['kind'] = signals.some((s) => s.id !== 'empty')
|
|
211
|
+
? 'brownfield'
|
|
212
|
+
: 'greenfield';
|
|
213
|
+
|
|
214
|
+
return {
|
|
215
|
+
kind,
|
|
216
|
+
directory: root,
|
|
217
|
+
signals,
|
|
218
|
+
topLevelFileCount,
|
|
219
|
+
hasGit,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* True if a directory exists AND contains at least one non-hidden entry.
|
|
225
|
+
*/
|
|
226
|
+
function isNonEmptyDir(dirPath: string): boolean {
|
|
227
|
+
try {
|
|
228
|
+
const stat = statSync(dirPath);
|
|
229
|
+
if (!stat.isDirectory()) return false;
|
|
230
|
+
const entries = readdirSync(dirPath).filter((e) => !e.startsWith('.'));
|
|
231
|
+
return entries.length > 0;
|
|
232
|
+
} catch {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -173,6 +173,12 @@ export {
|
|
|
173
173
|
} from './config.js';
|
|
174
174
|
// Constants
|
|
175
175
|
export { CORE_PROTECTED_FILES } from './constants.js';
|
|
176
|
+
// Discovery (Phase 5)
|
|
177
|
+
export {
|
|
178
|
+
type ClassificationSignal,
|
|
179
|
+
classifyProject,
|
|
180
|
+
type ProjectClassification,
|
|
181
|
+
} from './discovery.js';
|
|
176
182
|
// Engine result type (used by dispatch layer)
|
|
177
183
|
export type { EngineResult } from './engine-result.js';
|
|
178
184
|
export type { ErrorDefinition } from './error-catalog.js';
|
|
@@ -208,9 +214,18 @@ export { formatError, formatOutput, formatSuccess, pushWarning } from './output.
|
|
|
208
214
|
export { createPage, paginate } from './pagination.js';
|
|
209
215
|
// Paths
|
|
210
216
|
export {
|
|
217
|
+
getCleoCacheDir,
|
|
218
|
+
getCleoCantWorkflowsDir,
|
|
219
|
+
getCleoConfigDir,
|
|
211
220
|
getCleoDir,
|
|
212
221
|
getCleoDirAbsolute,
|
|
222
|
+
getCleoGlobalAgentsDir,
|
|
223
|
+
getCleoGlobalJustfilePath,
|
|
224
|
+
getCleoGlobalRecipesDir,
|
|
213
225
|
getCleoHome,
|
|
226
|
+
getCleoLogDir,
|
|
227
|
+
getCleoPiExtensionsDir,
|
|
228
|
+
getCleoTempDir,
|
|
214
229
|
getCleoTemplatesTildePath,
|
|
215
230
|
getConfigPath,
|
|
216
231
|
getGlobalConfigPath,
|
|
@@ -233,6 +248,7 @@ export type { ProjectInfo } from './project-info.js';
|
|
|
233
248
|
export { getProjectInfo, getProjectInfoSync, updateProjectName } from './project-info.js';
|
|
234
249
|
// Scaffold
|
|
235
250
|
export {
|
|
251
|
+
ensureCleoOsHub,
|
|
236
252
|
ensureCleoStructure,
|
|
237
253
|
ensureGlobalHome,
|
|
238
254
|
ensureGlobalScaffold,
|
package/src/init.ts
CHANGED
|
@@ -37,6 +37,7 @@ import { copyFile, lstat, mkdir, readFile, symlink, unlink, writeFile } from 'no
|
|
|
37
37
|
import { platform } from 'node:os';
|
|
38
38
|
import { basename, dirname, join } from 'node:path';
|
|
39
39
|
import { ExitCode } from '@cleocode/contracts';
|
|
40
|
+
import { classifyProject, type ProjectClassification } from './discovery.js';
|
|
40
41
|
import { CleoError } from './errors.js';
|
|
41
42
|
import { ensureGitHooks } from './hooks.js';
|
|
42
43
|
import { ensureInjection } from './injection.js';
|
|
@@ -47,6 +48,7 @@ import { getAgentsHome, getCleoDirAbsolute, getProjectRoot } from './paths.js';
|
|
|
47
48
|
import {
|
|
48
49
|
ensureBrainDb,
|
|
49
50
|
ensureCleoGitRepo,
|
|
51
|
+
ensureCleoOsHub,
|
|
50
52
|
ensureCleoStructure,
|
|
51
53
|
ensureConfig,
|
|
52
54
|
ensureGitignore,
|
|
@@ -70,6 +72,16 @@ export interface InitOptions {
|
|
|
70
72
|
detect?: boolean;
|
|
71
73
|
/** Run codebase analysis and store findings to brain.db. */
|
|
72
74
|
mapCodebase?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Install canonical CleoOS seed agents (cleo-prime, cleo-dev, cleo-historian,
|
|
77
|
+
* cleo-rust-lead, cleo-db-lead, cleoos-opus-orchestrator) into the project's
|
|
78
|
+
* `.cleo/agents/` directory. Default: false (operator opts in).
|
|
79
|
+
*
|
|
80
|
+
* The seeds ship with `@cleocode/agents` under `seed-agents/`. Existing
|
|
81
|
+
* project files are never overwritten — operators are free to delete or
|
|
82
|
+
* fork any seed.
|
|
83
|
+
*/
|
|
84
|
+
installSeedAgents?: boolean;
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
/** Result of the init operation. */
|
|
@@ -80,6 +92,22 @@ export interface InitResult {
|
|
|
80
92
|
skipped: string[];
|
|
81
93
|
warnings: string[];
|
|
82
94
|
updateDocsOnly?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Phase 5 — Greenfield/brownfield classification of the directory.
|
|
97
|
+
* Populated by the discovery module during init.
|
|
98
|
+
*/
|
|
99
|
+
classification?: {
|
|
100
|
+
kind: 'greenfield' | 'brownfield';
|
|
101
|
+
signalCount: number;
|
|
102
|
+
topLevelFileCount: number;
|
|
103
|
+
hasGit: boolean;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Phase 5 — Next-step guidance for the agent/operator, emitted as a
|
|
107
|
+
* LAFS-compatible suggestion list. Each entry has an action description
|
|
108
|
+
* and a copy-pasteable command.
|
|
109
|
+
*/
|
|
110
|
+
nextSteps?: Array<{ action: string; command: string }>;
|
|
83
111
|
}
|
|
84
112
|
|
|
85
113
|
// ── Helpers ──────────────────────────────────────────────────────────
|
|
@@ -93,6 +121,62 @@ const DIR_SYMLINK_TYPE: 'junction' | 'dir' = platform() === 'win32' ? 'junction'
|
|
|
93
121
|
|
|
94
122
|
// ── Init-specific operations ─────────────────────────────────────────
|
|
95
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Resolve the absolute path to the bundled `seed-agents/` directory inside
|
|
126
|
+
* the `@cleocode/agents` package.
|
|
127
|
+
*
|
|
128
|
+
* Mirrors the multi-candidate resolution pattern used by
|
|
129
|
+
* {@link initAgentDefinition} so the same code path works across all layouts:
|
|
130
|
+
* 1. **npm install** — `require.resolve('@cleocode/agents/package.json')`
|
|
131
|
+
* finds the package under `node_modules/@cleocode/agents/`.
|
|
132
|
+
* 2. **Workspace dev (bundled CLI)** — walks up from `getPackageRoot()`
|
|
133
|
+
* (which resolves to `packages/cleo/dist/` or `packages/core/`) to find
|
|
134
|
+
* `packages/agents/seed-agents/`.
|
|
135
|
+
* 3. **Monorepo dev (source)** — falls back to `packages/agents/seed-agents/`
|
|
136
|
+
* relative to `getPackageRoot()`.
|
|
137
|
+
*
|
|
138
|
+
* @returns Absolute path to an existing `seed-agents/` directory, or `null`
|
|
139
|
+
* if no candidate exists. Returning `null` lets callers skip the
|
|
140
|
+
* seed install gracefully without crashing.
|
|
141
|
+
*
|
|
142
|
+
* @task T283
|
|
143
|
+
* @epic T280
|
|
144
|
+
*/
|
|
145
|
+
export async function resolveSeedAgentsDir(): Promise<string | null> {
|
|
146
|
+
// Primary: resolve via Node module resolution (@cleocode/agents)
|
|
147
|
+
try {
|
|
148
|
+
const { createRequire } = await import('node:module');
|
|
149
|
+
const req = createRequire(import.meta.url);
|
|
150
|
+
const agentsPkgMain = req.resolve('@cleocode/agents/package.json');
|
|
151
|
+
const agentsPkgRoot = dirname(agentsPkgMain);
|
|
152
|
+
const candidate = join(agentsPkgRoot, 'seed-agents');
|
|
153
|
+
if (existsSync(candidate)) {
|
|
154
|
+
return candidate;
|
|
155
|
+
}
|
|
156
|
+
} catch {
|
|
157
|
+
// Not resolvable via require.resolve — fall through to bundled path
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Walk a series of candidate paths relative to getPackageRoot(), which
|
|
161
|
+
// can resolve to several different locations depending on whether we're
|
|
162
|
+
// running from packages/core/dist, packages/cleo/dist, or installed under
|
|
163
|
+
// node_modules/@cleocode/.
|
|
164
|
+
const packageRoot = getPackageRoot();
|
|
165
|
+
const candidates = [
|
|
166
|
+
// Workspace fallback: bundled alongside core under packages/agents/seed-agents
|
|
167
|
+
join(packageRoot, 'agents', 'seed-agents'),
|
|
168
|
+
// Sibling-package layout (e.g. node_modules/@cleocode/core -> ../agents)
|
|
169
|
+
join(packageRoot, '..', 'agents', 'seed-agents'),
|
|
170
|
+
// Bundled CLI: packages/cleo/dist -> ../../agents/seed-agents
|
|
171
|
+
join(packageRoot, '..', '..', 'agents', 'seed-agents'),
|
|
172
|
+
// Bundled CLI dist subdir: packages/cleo/dist/cli -> ../../../packages/agents
|
|
173
|
+
join(packageRoot, '..', '..', 'packages', 'agents', 'seed-agents'),
|
|
174
|
+
// Monorepo workspace from repo root
|
|
175
|
+
join(packageRoot, '..', '..', '..', 'packages', 'agents', 'seed-agents'),
|
|
176
|
+
];
|
|
177
|
+
return candidates.find((p) => existsSync(p)) ?? null;
|
|
178
|
+
}
|
|
179
|
+
|
|
96
180
|
/**
|
|
97
181
|
* Install cleo-subagent agent definition to ~/.agents/agents/.
|
|
98
182
|
* @task T4685
|
|
@@ -458,6 +542,17 @@ export async function initProject(opts: InitOptions = {}): Promise<InitResult> {
|
|
|
458
542
|
const skipped: string[] = [];
|
|
459
543
|
const warnings: string[] = [];
|
|
460
544
|
|
|
545
|
+
// Phase 5 — classify the directory BEFORE creating any files so the
|
|
546
|
+
// classification reflects the real pre-init state of the directory.
|
|
547
|
+
let classification: ProjectClassification | undefined;
|
|
548
|
+
try {
|
|
549
|
+
classification = classifyProject(projRoot);
|
|
550
|
+
} catch (err) {
|
|
551
|
+
warnings.push(
|
|
552
|
+
`Project classification failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
461
556
|
// T4681: Create .cleo/ directory structure
|
|
462
557
|
const structureResult = await ensureCleoStructure(projRoot);
|
|
463
558
|
if (structureResult.action === 'created') {
|
|
@@ -724,12 +819,113 @@ export async function initProject(opts: InitOptions = {}): Promise<InitResult> {
|
|
|
724
819
|
);
|
|
725
820
|
}
|
|
726
821
|
|
|
822
|
+
// T283: Optional install of canonical CleoOS seed agent personas
|
|
823
|
+
if (opts.installSeedAgents) {
|
|
824
|
+
try {
|
|
825
|
+
const seedDir = await resolveSeedAgentsDir();
|
|
826
|
+
if (seedDir && existsSync(seedDir)) {
|
|
827
|
+
const targetDir = join(projRoot, '.cleo', 'agents');
|
|
828
|
+
await mkdir(targetDir, { recursive: true });
|
|
829
|
+
const seeds = readdirSync(seedDir).filter((f) => f.endsWith('.cant'));
|
|
830
|
+
let installed = 0;
|
|
831
|
+
for (const seed of seeds) {
|
|
832
|
+
const dst = join(targetDir, seed);
|
|
833
|
+
if (!existsSync(dst)) {
|
|
834
|
+
await copyFile(join(seedDir, seed), dst);
|
|
835
|
+
installed++;
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
if (installed > 0) {
|
|
839
|
+
created.push(`seed-agents: ${installed} canonical .cant personas installed`);
|
|
840
|
+
}
|
|
841
|
+
} else {
|
|
842
|
+
warnings.push('seed-agents install: bundled seed-agents/ directory not found');
|
|
843
|
+
}
|
|
844
|
+
} catch (err) {
|
|
845
|
+
warnings.push(
|
|
846
|
+
`seed-agents install failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
847
|
+
);
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
// ────────────────────────────────────────────────────────────────────
|
|
852
|
+
// Phase 5 — Finalize classification report + CleoOS hub bootstrap
|
|
853
|
+
// (Classification already ran at the TOP of init, before file creation)
|
|
854
|
+
// ────────────────────────────────────────────────────────────────────
|
|
855
|
+
if (classification) {
|
|
856
|
+
created.push(
|
|
857
|
+
`classification: ${classification.kind} (${classification.signals.length} signals)`,
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// Ensure the CleoOS Hub exists globally (idempotent — only writes once)
|
|
862
|
+
try {
|
|
863
|
+
const hubResult = await ensureCleoOsHub();
|
|
864
|
+
if (hubResult.action === 'created') {
|
|
865
|
+
created.push(`cleoos-hub: ${hubResult.details ?? 'scaffolded'}`);
|
|
866
|
+
}
|
|
867
|
+
} catch (err) {
|
|
868
|
+
warnings.push(
|
|
869
|
+
`CleoOS hub scaffold failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
// Context anchoring: when brownfield and --map-codebase was NOT already run,
|
|
874
|
+
// surface a hint so the operator knows they can anchor the baseline in BRAIN.
|
|
875
|
+
// (We do NOT auto-run mapCodebase here — it's opt-in to avoid blocking init.)
|
|
876
|
+
if (classification?.kind === 'brownfield' && !opts.mapCodebase) {
|
|
877
|
+
warnings.push(
|
|
878
|
+
'Brownfield detected — run `cleo init --map-codebase` to anchor the existing codebase in BRAIN (Phase 5 context anchoring).',
|
|
879
|
+
);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
// LAFS next-step guidance for autonomous agents
|
|
883
|
+
const nextSteps: Array<{ action: string; command: string }> =
|
|
884
|
+
classification?.kind === 'greenfield'
|
|
885
|
+
? [
|
|
886
|
+
{
|
|
887
|
+
action: 'Start the session and record your first research findings',
|
|
888
|
+
command: 'cleo session start --scope global',
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
action: 'Create the seed epic for Vision/PRD research',
|
|
892
|
+
command: 'cleo add "Project vision and initial scope" --type epic',
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
action: 'Invoke the Conductor Loop once the seed epic is present',
|
|
896
|
+
command: 'pi /cleo:auto <seedEpicId>',
|
|
897
|
+
},
|
|
898
|
+
]
|
|
899
|
+
: [
|
|
900
|
+
{
|
|
901
|
+
action: 'Anchor the existing codebase in BRAIN as baseline context',
|
|
902
|
+
command: 'cleo init --map-codebase',
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
action: 'Review the detected project context',
|
|
906
|
+
command: 'cleo admin paths',
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
action: 'Start a session scoped to the work you want to continue',
|
|
910
|
+
command: 'cleo session start --scope global',
|
|
911
|
+
},
|
|
912
|
+
];
|
|
913
|
+
|
|
727
914
|
return {
|
|
728
915
|
initialized: true,
|
|
729
916
|
directory: cleoDir,
|
|
730
917
|
created,
|
|
731
918
|
skipped,
|
|
732
919
|
warnings,
|
|
920
|
+
classification: classification
|
|
921
|
+
? {
|
|
922
|
+
kind: classification.kind,
|
|
923
|
+
signalCount: classification.signals.length,
|
|
924
|
+
topLevelFileCount: classification.topLevelFileCount,
|
|
925
|
+
hasGit: classification.hasGit,
|
|
926
|
+
}
|
|
927
|
+
: undefined,
|
|
928
|
+
nextSteps,
|
|
733
929
|
};
|
|
734
930
|
}
|
|
735
931
|
|