@codeledger/cli 0.10.2 → 0.10.6
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/LICENSE +61 -0
- package/README.md +97 -0
- package/bin/codeledger.js +66 -0
- package/package.json +32 -46
- package/scripts/postinstall.js +285 -0
- package/bin/codeledger-open.cjs +0 -89
- package/bin/codeledger-standalone.cjs +0 -3182
- package/dist/ambient-activation.d.ts +0 -30
- package/dist/ambient-activation.d.ts.map +0 -1
- package/dist/ambient-activation.js +0 -449
- package/dist/ambient-activation.js.map +0 -1
- package/dist/arch-policy/resolve.d.ts +0 -11
- package/dist/arch-policy/resolve.d.ts.map +0 -1
- package/dist/arch-policy/resolve.js +0 -195
- package/dist/arch-policy/resolve.js.map +0 -1
- package/dist/arch-policy/simulate.d.ts +0 -9
- package/dist/arch-policy/simulate.d.ts.map +0 -1
- package/dist/arch-policy/simulate.js +0 -175
- package/dist/arch-policy/simulate.js.map +0 -1
- package/dist/architecture-graph/dependency-scanner.d.ts +0 -16
- package/dist/architecture-graph/dependency-scanner.d.ts.map +0 -1
- package/dist/architecture-graph/dependency-scanner.js +0 -96
- package/dist/architecture-graph/dependency-scanner.js.map +0 -1
- package/dist/architecture-graph/graph-builder.d.ts +0 -70
- package/dist/architecture-graph/graph-builder.d.ts.map +0 -1
- package/dist/architecture-graph/graph-builder.js +0 -231
- package/dist/architecture-graph/graph-builder.js.map +0 -1
- package/dist/architecture-graph/index.d.ts +0 -4
- package/dist/architecture-graph/index.d.ts.map +0 -1
- package/dist/architecture-graph/index.js +0 -7
- package/dist/architecture-graph/index.js.map +0 -1
- package/dist/architecture-graph/service-scanner.d.ts +0 -22
- package/dist/architecture-graph/service-scanner.d.ts.map +0 -1
- package/dist/architecture-graph/service-scanner.js +0 -181
- package/dist/architecture-graph/service-scanner.js.map +0 -1
- package/dist/artifacts/summary.d.ts +0 -6
- package/dist/artifacts/summary.d.ts.map +0 -1
- package/dist/artifacts/summary.js +0 -49
- package/dist/artifacts/summary.js.map +0 -1
- package/dist/command-activation.d.ts +0 -3
- package/dist/command-activation.d.ts.map +0 -1
- package/dist/command-activation.js +0 -2
- package/dist/command-activation.js.map +0 -1
- package/dist/commands/about.d.ts +0 -2
- package/dist/commands/about.d.ts.map +0 -1
- package/dist/commands/about.js +0 -18
- package/dist/commands/about.js.map +0 -1
- package/dist/commands/activate.d.ts +0 -18
- package/dist/commands/activate.d.ts.map +0 -1
- package/dist/commands/activate.js +0 -1110
- package/dist/commands/activate.js.map +0 -1
- package/dist/commands/apply-policy.d.ts +0 -7
- package/dist/commands/apply-policy.d.ts.map +0 -1
- package/dist/commands/apply-policy.js +0 -62
- package/dist/commands/apply-policy.js.map +0 -1
- package/dist/commands/arch-policy.d.ts +0 -8
- package/dist/commands/arch-policy.d.ts.map +0 -1
- package/dist/commands/arch-policy.js +0 -349
- package/dist/commands/arch-policy.js.map +0 -1
- package/dist/commands/audit-export.d.ts +0 -8
- package/dist/commands/audit-export.d.ts.map +0 -1
- package/dist/commands/audit-export.js +0 -192
- package/dist/commands/audit-export.js.map +0 -1
- package/dist/commands/audit.d.ts +0 -24
- package/dist/commands/audit.d.ts.map +0 -1
- package/dist/commands/audit.js +0 -1138
- package/dist/commands/audit.js.map +0 -1
- package/dist/commands/auto-refresh.d.ts +0 -17
- package/dist/commands/auto-refresh.d.ts.map +0 -1
- package/dist/commands/auto-refresh.js +0 -152
- package/dist/commands/auto-refresh.js.map +0 -1
- package/dist/commands/broker.d.ts +0 -22
- package/dist/commands/broker.d.ts.map +0 -1
- package/dist/commands/broker.js +0 -487
- package/dist/commands/broker.js.map +0 -1
- package/dist/commands/bundle.d.ts +0 -2
- package/dist/commands/bundle.d.ts.map +0 -1
- package/dist/commands/bundle.js +0 -230
- package/dist/commands/bundle.js.map +0 -1
- package/dist/commands/capsule-change.d.ts +0 -7
- package/dist/commands/capsule-change.d.ts.map +0 -1
- package/dist/commands/capsule-change.js +0 -177
- package/dist/commands/capsule-change.js.map +0 -1
- package/dist/commands/checkpoint.d.ts +0 -26
- package/dist/commands/checkpoint.d.ts.map +0 -1
- package/dist/commands/checkpoint.js +0 -382
- package/dist/commands/checkpoint.js.map +0 -1
- package/dist/commands/ci.d.ts +0 -16
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js +0 -287
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/claims.d.ts +0 -14
- package/dist/commands/claims.d.ts.map +0 -1
- package/dist/commands/claims.js +0 -93
- package/dist/commands/claims.js.map +0 -1
- package/dist/commands/claude.d.ts +0 -2
- package/dist/commands/claude.d.ts.map +0 -1
- package/dist/commands/claude.js +0 -5
- package/dist/commands/claude.js.map +0 -1
- package/dist/commands/clean.d.ts +0 -2
- package/dist/commands/clean.d.ts.map +0 -1
- package/dist/commands/clean.js +0 -28
- package/dist/commands/clean.js.map +0 -1
- package/dist/commands/coach.d.ts +0 -11
- package/dist/commands/coach.d.ts.map +0 -1
- package/dist/commands/coach.js +0 -169
- package/dist/commands/coach.js.map +0 -1
- package/dist/commands/codex.d.ts +0 -2
- package/dist/commands/codex.d.ts.map +0 -1
- package/dist/commands/codex.js +0 -5
- package/dist/commands/codex.js.map +0 -1
- package/dist/commands/commit-msg.d.ts +0 -58
- package/dist/commands/commit-msg.d.ts.map +0 -1
- package/dist/commands/commit-msg.js +0 -461
- package/dist/commands/commit-msg.js.map +0 -1
- package/dist/commands/compare-current.d.ts +0 -2
- package/dist/commands/compare-current.d.ts.map +0 -1
- package/dist/commands/compare-current.js +0 -186
- package/dist/commands/compare-current.js.map +0 -1
- package/dist/commands/compare.d.ts +0 -2
- package/dist/commands/compare.d.ts.map +0 -1
- package/dist/commands/compare.js +0 -253
- package/dist/commands/compare.js.map +0 -1
- package/dist/commands/complete-check.d.ts +0 -24
- package/dist/commands/complete-check.d.ts.map +0 -1
- package/dist/commands/complete-check.js +0 -287
- package/dist/commands/complete-check.js.map +0 -1
- package/dist/commands/conflicts.d.ts +0 -12
- package/dist/commands/conflicts.d.ts.map +0 -1
- package/dist/commands/conflicts.js +0 -55
- package/dist/commands/conflicts.js.map +0 -1
- package/dist/commands/context-handoff.d.ts +0 -2
- package/dist/commands/context-handoff.d.ts.map +0 -1
- package/dist/commands/context-handoff.js +0 -58
- package/dist/commands/context-handoff.js.map +0 -1
- package/dist/commands/context.d.ts +0 -22
- package/dist/commands/context.d.ts.map +0 -1
- package/dist/commands/context.js +0 -836
- package/dist/commands/context.js.map +0 -1
- package/dist/commands/coordination.d.ts +0 -6
- package/dist/commands/coordination.d.ts.map +0 -1
- package/dist/commands/coordination.js +0 -177
- package/dist/commands/coordination.js.map +0 -1
- package/dist/commands/cowork-refresh.d.ts +0 -8
- package/dist/commands/cowork-refresh.d.ts.map +0 -1
- package/dist/commands/cowork-refresh.js +0 -50
- package/dist/commands/cowork-refresh.js.map +0 -1
- package/dist/commands/cowork-snapshot.d.ts +0 -8
- package/dist/commands/cowork-snapshot.d.ts.map +0 -1
- package/dist/commands/cowork-snapshot.js +0 -34
- package/dist/commands/cowork-snapshot.js.map +0 -1
- package/dist/commands/cowork-start.d.ts +0 -8
- package/dist/commands/cowork-start.d.ts.map +0 -1
- package/dist/commands/cowork-start.js +0 -71
- package/dist/commands/cowork-start.js.map +0 -1
- package/dist/commands/cowork-stop.d.ts +0 -7
- package/dist/commands/cowork-stop.d.ts.map +0 -1
- package/dist/commands/cowork-stop.js +0 -43
- package/dist/commands/cowork-stop.js.map +0 -1
- package/dist/commands/daemon.d.ts +0 -2
- package/dist/commands/daemon.d.ts.map +0 -1
- package/dist/commands/daemon.js +0 -5
- package/dist/commands/daemon.js.map +0 -1
- package/dist/commands/dashboard.d.ts +0 -18
- package/dist/commands/dashboard.d.ts.map +0 -1
- package/dist/commands/dashboard.js +0 -481
- package/dist/commands/dashboard.js.map +0 -1
- package/dist/commands/detect-secrets.d.ts +0 -19
- package/dist/commands/detect-secrets.d.ts.map +0 -1
- package/dist/commands/detect-secrets.js +0 -210
- package/dist/commands/detect-secrets.js.map +0 -1
- package/dist/commands/discover-check.d.ts +0 -19
- package/dist/commands/discover-check.d.ts.map +0 -1
- package/dist/commands/discover-check.js +0 -256
- package/dist/commands/discover-check.js.map +0 -1
- package/dist/commands/discover-gate.d.ts +0 -20
- package/dist/commands/discover-gate.d.ts.map +0 -1
- package/dist/commands/discover-gate.js +0 -131
- package/dist/commands/discover-gate.js.map +0 -1
- package/dist/commands/discover.d.ts +0 -14
- package/dist/commands/discover.d.ts.map +0 -1
- package/dist/commands/discover.js +0 -132
- package/dist/commands/discover.js.map +0 -1
- package/dist/commands/doctor.d.ts +0 -9
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -277
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/drift.d.ts +0 -2
- package/dist/commands/drift.d.ts.map +0 -1
- package/dist/commands/drift.js +0 -171
- package/dist/commands/drift.js.map +0 -1
- package/dist/commands/ecl.d.ts +0 -11
- package/dist/commands/ecl.d.ts.map +0 -1
- package/dist/commands/ecl.js +0 -109
- package/dist/commands/ecl.js.map +0 -1
- package/dist/commands/enable.d.ts +0 -7
- package/dist/commands/enable.d.ts.map +0 -1
- package/dist/commands/enable.js +0 -75
- package/dist/commands/enable.js.map +0 -1
- package/dist/commands/evidence.d.ts +0 -2
- package/dist/commands/evidence.d.ts.map +0 -1
- package/dist/commands/evidence.js +0 -53
- package/dist/commands/evidence.js.map +0 -1
- package/dist/commands/features.d.ts +0 -2
- package/dist/commands/features.d.ts.map +0 -1
- package/dist/commands/features.js +0 -185
- package/dist/commands/features.js.map +0 -1
- package/dist/commands/fix.d.ts +0 -7
- package/dist/commands/fix.d.ts.map +0 -1
- package/dist/commands/fix.js +0 -107
- package/dist/commands/fix.js.map +0 -1
- package/dist/commands/fleet.d.ts +0 -17
- package/dist/commands/fleet.d.ts.map +0 -1
- package/dist/commands/fleet.js +0 -682
- package/dist/commands/fleet.js.map +0 -1
- package/dist/commands/graph.d.ts +0 -18
- package/dist/commands/graph.d.ts.map +0 -1
- package/dist/commands/graph.js +0 -370
- package/dist/commands/graph.js.map +0 -1
- package/dist/commands/guardrails.d.ts +0 -11
- package/dist/commands/guardrails.d.ts.map +0 -1
- package/dist/commands/guardrails.js +0 -112
- package/dist/commands/guardrails.js.map +0 -1
- package/dist/commands/harvest.d.ts +0 -2
- package/dist/commands/harvest.d.ts.map +0 -1
- package/dist/commands/harvest.js +0 -136
- package/dist/commands/harvest.js.map +0 -1
- package/dist/commands/health.d.ts +0 -8
- package/dist/commands/health.d.ts.map +0 -1
- package/dist/commands/health.js +0 -101
- package/dist/commands/health.js.map +0 -1
- package/dist/commands/hotspots.d.ts +0 -2
- package/dist/commands/hotspots.d.ts.map +0 -1
- package/dist/commands/hotspots.js +0 -20
- package/dist/commands/hotspots.js.map +0 -1
- package/dist/commands/init.d.ts +0 -12
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -423
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/insight-seed.d.ts +0 -2
- package/dist/commands/insight-seed.d.ts.map +0 -1
- package/dist/commands/insight-seed.js +0 -59
- package/dist/commands/insight-seed.js.map +0 -1
- package/dist/commands/insight-smoke-test.d.ts +0 -2
- package/dist/commands/insight-smoke-test.d.ts.map +0 -1
- package/dist/commands/insight-smoke-test.js +0 -44
- package/dist/commands/insight-smoke-test.js.map +0 -1
- package/dist/commands/insight.d.ts +0 -2
- package/dist/commands/insight.d.ts.map +0 -1
- package/dist/commands/insight.js +0 -183
- package/dist/commands/insight.js.map +0 -1
- package/dist/commands/intent.d.ts +0 -39
- package/dist/commands/intent.d.ts.map +0 -1
- package/dist/commands/intent.js +0 -539
- package/dist/commands/intent.js.map +0 -1
- package/dist/commands/intervene.d.ts +0 -11
- package/dist/commands/intervene.d.ts.map +0 -1
- package/dist/commands/intervene.js +0 -94
- package/dist/commands/intervene.js.map +0 -1
- package/dist/commands/interventions.d.ts +0 -8
- package/dist/commands/interventions.d.ts.map +0 -1
- package/dist/commands/interventions.js +0 -69
- package/dist/commands/interventions.js.map +0 -1
- package/dist/commands/learn.d.ts +0 -8
- package/dist/commands/learn.d.ts.map +0 -1
- package/dist/commands/learn.js +0 -33
- package/dist/commands/learn.js.map +0 -1
- package/dist/commands/ledger.d.ts +0 -15
- package/dist/commands/ledger.d.ts.map +0 -1
- package/dist/commands/ledger.js +0 -137
- package/dist/commands/ledger.js.map +0 -1
- package/dist/commands/lessons.d.ts +0 -14
- package/dist/commands/lessons.d.ts.map +0 -1
- package/dist/commands/lessons.js +0 -196
- package/dist/commands/lessons.js.map +0 -1
- package/dist/commands/license-utils.d.ts +0 -36
- package/dist/commands/license-utils.d.ts.map +0 -1
- package/dist/commands/license-utils.js +0 -74
- package/dist/commands/license-utils.js.map +0 -1
- package/dist/commands/license.d.ts +0 -50
- package/dist/commands/license.d.ts.map +0 -1
- package/dist/commands/license.js +0 -281
- package/dist/commands/license.js.map +0 -1
- package/dist/commands/manifest.d.ts +0 -8
- package/dist/commands/manifest.d.ts.map +0 -1
- package/dist/commands/manifest.js +0 -144
- package/dist/commands/manifest.js.map +0 -1
- package/dist/commands/mcp.d.ts +0 -14
- package/dist/commands/mcp.d.ts.map +0 -1
- package/dist/commands/mcp.js +0 -70
- package/dist/commands/mcp.js.map +0 -1
- package/dist/commands/memory.d.ts +0 -16
- package/dist/commands/memory.d.ts.map +0 -1
- package/dist/commands/memory.js +0 -621
- package/dist/commands/memory.js.map +0 -1
- package/dist/commands/merge-check.d.ts +0 -15
- package/dist/commands/merge-check.d.ts.map +0 -1
- package/dist/commands/merge-check.js +0 -164
- package/dist/commands/merge-check.js.map +0 -1
- package/dist/commands/open-init.d.ts +0 -13
- package/dist/commands/open-init.d.ts.map +0 -1
- package/dist/commands/open-init.js +0 -115
- package/dist/commands/open-init.js.map +0 -1
- package/dist/commands/open-license.d.ts +0 -11
- package/dist/commands/open-license.d.ts.map +0 -1
- package/dist/commands/open-license.js +0 -98
- package/dist/commands/open-license.js.map +0 -1
- package/dist/commands/orchestrate.d.ts +0 -12
- package/dist/commands/orchestrate.d.ts.map +0 -1
- package/dist/commands/orchestrate.js +0 -119
- package/dist/commands/orchestrate.js.map +0 -1
- package/dist/commands/outcome.d.ts +0 -2
- package/dist/commands/outcome.d.ts.map +0 -1
- package/dist/commands/outcome.js +0 -121
- package/dist/commands/outcome.js.map +0 -1
- package/dist/commands/pack.d.ts +0 -12
- package/dist/commands/pack.d.ts.map +0 -1
- package/dist/commands/pack.js +0 -75
- package/dist/commands/pack.js.map +0 -1
- package/dist/commands/policy-author.d.ts +0 -48
- package/dist/commands/policy-author.d.ts.map +0 -1
- package/dist/commands/policy-author.js +0 -396
- package/dist/commands/policy-author.js.map +0 -1
- package/dist/commands/policy-simulate.d.ts +0 -9
- package/dist/commands/policy-simulate.d.ts.map +0 -1
- package/dist/commands/policy-simulate.js +0 -46
- package/dist/commands/policy-simulate.js.map +0 -1
- package/dist/commands/policy.d.ts +0 -9
- package/dist/commands/policy.d.ts.map +0 -1
- package/dist/commands/policy.js +0 -121
- package/dist/commands/policy.js.map +0 -1
- package/dist/commands/post-merge-outcome.d.ts +0 -2
- package/dist/commands/post-merge-outcome.d.ts.map +0 -1
- package/dist/commands/post-merge-outcome.js +0 -32
- package/dist/commands/post-merge-outcome.js.map +0 -1
- package/dist/commands/pr-check.d.ts +0 -18
- package/dist/commands/pr-check.d.ts.map +0 -1
- package/dist/commands/pr-check.js +0 -299
- package/dist/commands/pr-check.js.map +0 -1
- package/dist/commands/pr-comment.d.ts +0 -2
- package/dist/commands/pr-comment.d.ts.map +0 -1
- package/dist/commands/pr-comment.js +0 -96
- package/dist/commands/pr-comment.js.map +0 -1
- package/dist/commands/pr-summary.d.ts +0 -59
- package/dist/commands/pr-summary.d.ts.map +0 -1
- package/dist/commands/pr-summary.js +0 -524
- package/dist/commands/pr-summary.js.map +0 -1
- package/dist/commands/pre-pr.d.ts +0 -14
- package/dist/commands/pre-pr.d.ts.map +0 -1
- package/dist/commands/pre-pr.js +0 -57
- package/dist/commands/pre-pr.js.map +0 -1
- package/dist/commands/preflight.d.ts +0 -2
- package/dist/commands/preflight.d.ts.map +0 -1
- package/dist/commands/preflight.js +0 -48
- package/dist/commands/preflight.js.map +0 -1
- package/dist/commands/progress-check.d.ts +0 -14
- package/dist/commands/progress-check.d.ts.map +0 -1
- package/dist/commands/progress-check.js +0 -153
- package/dist/commands/progress-check.js.map +0 -1
- package/dist/commands/provenance.d.ts +0 -10
- package/dist/commands/provenance.d.ts.map +0 -1
- package/dist/commands/provenance.js +0 -103
- package/dist/commands/provenance.js.map +0 -1
- package/dist/commands/pulse.d.ts +0 -12
- package/dist/commands/pulse.d.ts.map +0 -1
- package/dist/commands/pulse.js +0 -61
- package/dist/commands/pulse.js.map +0 -1
- package/dist/commands/reality-check.d.ts +0 -4
- package/dist/commands/reality-check.d.ts.map +0 -1
- package/dist/commands/reality-check.js +0 -133
- package/dist/commands/reality-check.js.map +0 -1
- package/dist/commands/refine.d.ts +0 -17
- package/dist/commands/refine.d.ts.map +0 -1
- package/dist/commands/refine.js +0 -250
- package/dist/commands/refine.js.map +0 -1
- package/dist/commands/release-check.d.ts +0 -14
- package/dist/commands/release-check.d.ts.map +0 -1
- package/dist/commands/release-check.js +0 -44
- package/dist/commands/release-check.js.map +0 -1
- package/dist/commands/release-decision.d.ts +0 -2
- package/dist/commands/release-decision.d.ts.map +0 -1
- package/dist/commands/release-decision.js +0 -26
- package/dist/commands/release-decision.js.map +0 -1
- package/dist/commands/release-history.d.ts +0 -2
- package/dist/commands/release-history.d.ts.map +0 -1
- package/dist/commands/release-history.js +0 -34
- package/dist/commands/release-history.js.map +0 -1
- package/dist/commands/release-insights.d.ts +0 -2
- package/dist/commands/release-insights.d.ts.map +0 -1
- package/dist/commands/release-insights.js +0 -34
- package/dist/commands/release-insights.js.map +0 -1
- package/dist/commands/release-truth.d.ts +0 -2
- package/dist/commands/release-truth.d.ts.map +0 -1
- package/dist/commands/release-truth.js +0 -15
- package/dist/commands/release-truth.js.map +0 -1
- package/dist/commands/replay.d.ts +0 -2
- package/dist/commands/replay.d.ts.map +0 -1
- package/dist/commands/replay.js +0 -181
- package/dist/commands/replay.js.map +0 -1
- package/dist/commands/review-coverage.d.ts +0 -12
- package/dist/commands/review-coverage.d.ts.map +0 -1
- package/dist/commands/review-coverage.js +0 -142
- package/dist/commands/review-coverage.js.map +0 -1
- package/dist/commands/review-gate.d.ts +0 -12
- package/dist/commands/review-gate.d.ts.map +0 -1
- package/dist/commands/review-gate.js +0 -130
- package/dist/commands/review-gate.js.map +0 -1
- package/dist/commands/run.d.ts +0 -2
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -84
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/runs.d.ts +0 -2
- package/dist/commands/runs.d.ts.map +0 -1
- package/dist/commands/runs.js +0 -61
- package/dist/commands/runs.js.map +0 -1
- package/dist/commands/scan.d.ts +0 -2
- package/dist/commands/scan.d.ts.map +0 -1
- package/dist/commands/scan.js +0 -349
- package/dist/commands/scan.js.map +0 -1
- package/dist/commands/serve.d.ts +0 -32
- package/dist/commands/serve.d.ts.map +0 -1
- package/dist/commands/serve.js +0 -904
- package/dist/commands/serve.js.map +0 -1
- package/dist/commands/session-cleanup.d.ts +0 -11
- package/dist/commands/session-cleanup.d.ts.map +0 -1
- package/dist/commands/session-cleanup.js +0 -85
- package/dist/commands/session-cleanup.js.map +0 -1
- package/dist/commands/session-init.d.ts +0 -10
- package/dist/commands/session-init.d.ts.map +0 -1
- package/dist/commands/session-init.js +0 -46
- package/dist/commands/session-init.js.map +0 -1
- package/dist/commands/session-progress.d.ts +0 -12
- package/dist/commands/session-progress.d.ts.map +0 -1
- package/dist/commands/session-progress.js +0 -287
- package/dist/commands/session-progress.js.map +0 -1
- package/dist/commands/session-summary.d.ts +0 -14
- package/dist/commands/session-summary.d.ts.map +0 -1
- package/dist/commands/session-summary.js +0 -1413
- package/dist/commands/session-summary.js.map +0 -1
- package/dist/commands/sessions.d.ts +0 -9
- package/dist/commands/sessions.d.ts.map +0 -1
- package/dist/commands/sessions.js +0 -60
- package/dist/commands/sessions.js.map +0 -1
- package/dist/commands/setup-ci.d.ts +0 -27
- package/dist/commands/setup-ci.d.ts.map +0 -1
- package/dist/commands/setup-ci.js +0 -487
- package/dist/commands/setup-ci.js.map +0 -1
- package/dist/commands/share.d.ts +0 -9
- package/dist/commands/share.d.ts.map +0 -1
- package/dist/commands/share.js +0 -275
- package/dist/commands/share.js.map +0 -1
- package/dist/commands/shared-summary.d.ts +0 -15
- package/dist/commands/shared-summary.d.ts.map +0 -1
- package/dist/commands/shared-summary.js +0 -194
- package/dist/commands/shared-summary.js.map +0 -1
- package/dist/commands/sign-manifest.d.ts +0 -8
- package/dist/commands/sign-manifest.d.ts.map +0 -1
- package/dist/commands/sign-manifest.js +0 -58
- package/dist/commands/sign-manifest.js.map +0 -1
- package/dist/commands/snapshot.d.ts +0 -4
- package/dist/commands/snapshot.d.ts.map +0 -1
- package/dist/commands/snapshot.js +0 -79
- package/dist/commands/snapshot.js.map +0 -1
- package/dist/commands/stats.d.ts +0 -8
- package/dist/commands/stats.d.ts.map +0 -1
- package/dist/commands/stats.js +0 -164
- package/dist/commands/stats.js.map +0 -1
- package/dist/commands/sync.d.ts +0 -9
- package/dist/commands/sync.d.ts.map +0 -1
- package/dist/commands/sync.js +0 -157
- package/dist/commands/sync.js.map +0 -1
- package/dist/commands/task.d.ts +0 -2
- package/dist/commands/task.d.ts.map +0 -1
- package/dist/commands/task.js +0 -315
- package/dist/commands/task.js.map +0 -1
- package/dist/commands/team-ledger.d.ts +0 -11
- package/dist/commands/team-ledger.d.ts.map +0 -1
- package/dist/commands/team-ledger.js +0 -77
- package/dist/commands/team-ledger.js.map +0 -1
- package/dist/commands/team-metrics.d.ts +0 -8
- package/dist/commands/team-metrics.d.ts.map +0 -1
- package/dist/commands/team-metrics.js +0 -57
- package/dist/commands/team-metrics.js.map +0 -1
- package/dist/commands/test-summary.d.ts +0 -2
- package/dist/commands/test-summary.d.ts.map +0 -1
- package/dist/commands/test-summary.js +0 -53
- package/dist/commands/test-summary.js.map +0 -1
- package/dist/commands/time-travel.d.ts +0 -2
- package/dist/commands/time-travel.d.ts.map +0 -1
- package/dist/commands/time-travel.js +0 -89
- package/dist/commands/time-travel.js.map +0 -1
- package/dist/commands/truth-utils.d.ts +0 -14
- package/dist/commands/truth-utils.d.ts.map +0 -1
- package/dist/commands/truth-utils.js +0 -70
- package/dist/commands/truth-utils.js.map +0 -1
- package/dist/commands/upgrade.d.ts +0 -2
- package/dist/commands/upgrade.d.ts.map +0 -1
- package/dist/commands/upgrade.js +0 -17
- package/dist/commands/upgrade.js.map +0 -1
- package/dist/commands/vendor.d.ts +0 -20
- package/dist/commands/vendor.d.ts.map +0 -1
- package/dist/commands/vendor.js +0 -205
- package/dist/commands/vendor.js.map +0 -1
- package/dist/commands/verify.d.ts +0 -36
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js +0 -761
- package/dist/commands/verify.js.map +0 -1
- package/dist/completion-integrity/claims.d.ts +0 -21
- package/dist/completion-integrity/claims.d.ts.map +0 -1
- package/dist/completion-integrity/claims.js +0 -99
- package/dist/completion-integrity/claims.js.map +0 -1
- package/dist/completion-integrity/confidence.d.ts +0 -30
- package/dist/completion-integrity/confidence.d.ts.map +0 -1
- package/dist/completion-integrity/confidence.js +0 -86
- package/dist/completion-integrity/confidence.js.map +0 -1
- package/dist/completion-integrity/ghost-detector.d.ts +0 -37
- package/dist/completion-integrity/ghost-detector.d.ts.map +0 -1
- package/dist/completion-integrity/ghost-detector.js +0 -93
- package/dist/completion-integrity/ghost-detector.js.map +0 -1
- package/dist/completion-integrity/history.d.ts +0 -19
- package/dist/completion-integrity/history.d.ts.map +0 -1
- package/dist/completion-integrity/history.js +0 -44
- package/dist/completion-integrity/history.js.map +0 -1
- package/dist/completion-integrity/index.d.ts +0 -25
- package/dist/completion-integrity/index.d.ts.map +0 -1
- package/dist/completion-integrity/index.js +0 -251
- package/dist/completion-integrity/index.js.map +0 -1
- package/dist/completion-integrity/neighborhood.d.ts +0 -21
- package/dist/completion-integrity/neighborhood.d.ts.map +0 -1
- package/dist/completion-integrity/neighborhood.js +0 -274
- package/dist/completion-integrity/neighborhood.js.map +0 -1
- package/dist/completion-integrity/notary.d.ts +0 -3
- package/dist/completion-integrity/notary.d.ts.map +0 -1
- package/dist/completion-integrity/notary.js +0 -124
- package/dist/completion-integrity/notary.js.map +0 -1
- package/dist/completion-integrity/output.d.ts +0 -11
- package/dist/completion-integrity/output.d.ts.map +0 -1
- package/dist/completion-integrity/output.js +0 -228
- package/dist/completion-integrity/output.js.map +0 -1
- package/dist/completion-integrity/self-audit.d.ts +0 -28
- package/dist/completion-integrity/self-audit.d.ts.map +0 -1
- package/dist/completion-integrity/self-audit.js +0 -194
- package/dist/completion-integrity/self-audit.js.map +0 -1
- package/dist/completion-integrity/semantic-drift.d.ts +0 -22
- package/dist/completion-integrity/semantic-drift.d.ts.map +0 -1
- package/dist/completion-integrity/semantic-drift.js +0 -138
- package/dist/completion-integrity/semantic-drift.js.map +0 -1
- package/dist/completion-integrity/state-machine.d.ts +0 -36
- package/dist/completion-integrity/state-machine.d.ts.map +0 -1
- package/dist/completion-integrity/state-machine.js +0 -138
- package/dist/completion-integrity/state-machine.js.map +0 -1
- package/dist/completion-integrity/types.d.ts +0 -69
- package/dist/completion-integrity/types.d.ts.map +0 -1
- package/dist/completion-integrity/types.js +0 -4
- package/dist/completion-integrity/types.js.map +0 -1
- package/dist/context-engine/contract.d.ts +0 -12
- package/dist/context-engine/contract.d.ts.map +0 -1
- package/dist/context-engine/contract.js +0 -227
- package/dist/context-engine/contract.js.map +0 -1
- package/dist/context-engine/delta.d.ts +0 -10
- package/dist/context-engine/delta.d.ts.map +0 -1
- package/dist/context-engine/delta.js +0 -78
- package/dist/context-engine/delta.js.map +0 -1
- package/dist/context-engine/index.d.ts +0 -6
- package/dist/context-engine/index.d.ts.map +0 -1
- package/dist/context-engine/index.js +0 -5
- package/dist/context-engine/index.js.map +0 -1
- package/dist/context-engine/policy-evaluator.d.ts +0 -32
- package/dist/context-engine/policy-evaluator.d.ts.map +0 -1
- package/dist/context-engine/policy-evaluator.js +0 -69
- package/dist/context-engine/policy-evaluator.js.map +0 -1
- package/dist/context-engine/renderer.d.ts +0 -9
- package/dist/context-engine/renderer.d.ts.map +0 -1
- package/dist/context-engine/renderer.js +0 -28
- package/dist/context-engine/renderer.js.map +0 -1
- package/dist/context-engine/renderers/claude.d.ts +0 -3
- package/dist/context-engine/renderers/claude.d.ts.map +0 -1
- package/dist/context-engine/renderers/claude.js +0 -223
- package/dist/context-engine/renderers/claude.js.map +0 -1
- package/dist/context-engine/renderers/cursor.d.ts +0 -3
- package/dist/context-engine/renderers/cursor.d.ts.map +0 -1
- package/dist/context-engine/renderers/cursor.js +0 -158
- package/dist/context-engine/renderers/cursor.js.map +0 -1
- package/dist/context-engine/renderers/generic.d.ts +0 -3
- package/dist/context-engine/renderers/generic.d.ts.map +0 -1
- package/dist/context-engine/renderers/generic.js +0 -180
- package/dist/context-engine/renderers/generic.js.map +0 -1
- package/dist/coordination/index.d.ts +0 -69
- package/dist/coordination/index.d.ts.map +0 -1
- package/dist/coordination/index.js +0 -1110
- package/dist/coordination/index.js.map +0 -1
- package/dist/discovery/blast-radius.d.ts +0 -15
- package/dist/discovery/blast-radius.d.ts.map +0 -1
- package/dist/discovery/blast-radius.js +0 -160
- package/dist/discovery/blast-radius.js.map +0 -1
- package/dist/discovery/cache.d.ts +0 -38
- package/dist/discovery/cache.d.ts.map +0 -1
- package/dist/discovery/cache.js +0 -87
- package/dist/discovery/cache.js.map +0 -1
- package/dist/discovery/diff-compliance.d.ts +0 -19
- package/dist/discovery/diff-compliance.d.ts.map +0 -1
- package/dist/discovery/diff-compliance.js +0 -96
- package/dist/discovery/diff-compliance.js.map +0 -1
- package/dist/discovery/duplicate-detection.d.ts +0 -29
- package/dist/discovery/duplicate-detection.d.ts.map +0 -1
- package/dist/discovery/duplicate-detection.js +0 -133
- package/dist/discovery/duplicate-detection.js.map +0 -1
- package/dist/discovery/gap-analysis.d.ts +0 -16
- package/dist/discovery/gap-analysis.d.ts.map +0 -1
- package/dist/discovery/gap-analysis.js +0 -199
- package/dist/discovery/gap-analysis.js.map +0 -1
- package/dist/discovery/index.d.ts +0 -18
- package/dist/discovery/index.d.ts.map +0 -1
- package/dist/discovery/index.js +0 -565
- package/dist/discovery/index.js.map +0 -1
- package/dist/discovery/override.d.ts +0 -19
- package/dist/discovery/override.d.ts.map +0 -1
- package/dist/discovery/override.js +0 -113
- package/dist/discovery/override.js.map +0 -1
- package/dist/discovery/scoring.d.ts +0 -35
- package/dist/discovery/scoring.d.ts.map +0 -1
- package/dist/discovery/scoring.js +0 -194
- package/dist/discovery/scoring.js.map +0 -1
- package/dist/discovery/source-of-truth.d.ts +0 -17
- package/dist/discovery/source-of-truth.d.ts.map +0 -1
- package/dist/discovery/source-of-truth.js +0 -182
- package/dist/discovery/source-of-truth.js.map +0 -1
- package/dist/discovery/symbol-growth.d.ts +0 -20
- package/dist/discovery/symbol-growth.d.ts.map +0 -1
- package/dist/discovery/symbol-growth.js +0 -111
- package/dist/discovery/symbol-growth.js.map +0 -1
- package/dist/ecl/git-sync.d.ts +0 -53
- package/dist/ecl/git-sync.d.ts.map +0 -1
- package/dist/ecl/git-sync.js +0 -182
- package/dist/ecl/git-sync.js.map +0 -1
- package/dist/ecl/lifecycle.d.ts +0 -107
- package/dist/ecl/lifecycle.d.ts.map +0 -1
- package/dist/ecl/lifecycle.js +0 -264
- package/dist/ecl/lifecycle.js.map +0 -1
- package/dist/ecl/persistence.d.ts +0 -108
- package/dist/ecl/persistence.d.ts.map +0 -1
- package/dist/ecl/persistence.js +0 -362
- package/dist/ecl/persistence.js.map +0 -1
- package/dist/ecl/sync.d.ts +0 -43
- package/dist/ecl/sync.d.ts.map +0 -1
- package/dist/ecl/sync.js +0 -155
- package/dist/ecl/sync.js.map +0 -1
- package/dist/feedback/index.d.ts +0 -35
- package/dist/feedback/index.d.ts.map +0 -1
- package/dist/feedback/index.js +0 -81
- package/dist/feedback/index.js.map +0 -1
- package/dist/guardrails/adversarial-trigger.d.ts +0 -15
- package/dist/guardrails/adversarial-trigger.d.ts.map +0 -1
- package/dist/guardrails/adversarial-trigger.js +0 -86
- package/dist/guardrails/adversarial-trigger.js.map +0 -1
- package/dist/guardrails/export-collision.d.ts +0 -11
- package/dist/guardrails/export-collision.d.ts.map +0 -1
- package/dist/guardrails/export-collision.js +0 -141
- package/dist/guardrails/export-collision.js.map +0 -1
- package/dist/guardrails/index.d.ts +0 -24
- package/dist/guardrails/index.d.ts.map +0 -1
- package/dist/guardrails/index.js +0 -24
- package/dist/guardrails/index.js.map +0 -1
- package/dist/guardrails/release-tag.d.ts +0 -10
- package/dist/guardrails/release-tag.d.ts.map +0 -1
- package/dist/guardrails/release-tag.js +0 -99
- package/dist/guardrails/release-tag.js.map +0 -1
- package/dist/guardrails/rename-integrity.d.ts +0 -13
- package/dist/guardrails/rename-integrity.d.ts.map +0 -1
- package/dist/guardrails/rename-integrity.js +0 -111
- package/dist/guardrails/rename-integrity.js.map +0 -1
- package/dist/guardrails/runner.d.ts +0 -10
- package/dist/guardrails/runner.d.ts.map +0 -1
- package/dist/guardrails/runner.js +0 -36
- package/dist/guardrails/runner.js.map +0 -1
- package/dist/guardrails/stale-artifact.d.ts +0 -11
- package/dist/guardrails/stale-artifact.d.ts.map +0 -1
- package/dist/guardrails/stale-artifact.js +0 -69
- package/dist/guardrails/stale-artifact.js.map +0 -1
- package/dist/guardrails/unused-parameter.d.ts +0 -11
- package/dist/guardrails/unused-parameter.d.ts.map +0 -1
- package/dist/guardrails/unused-parameter.js +0 -105
- package/dist/guardrails/unused-parameter.js.map +0 -1
- package/dist/guardrails/workspace-validation.d.ts +0 -12
- package/dist/guardrails/workspace-validation.d.ts.map +0 -1
- package/dist/guardrails/workspace-validation.js +0 -92
- package/dist/guardrails/workspace-validation.js.map +0 -1
- package/dist/health/advisor.d.ts +0 -18
- package/dist/health/advisor.d.ts.map +0 -1
- package/dist/health/advisor.js +0 -174
- package/dist/health/advisor.js.map +0 -1
- package/dist/health/dashboard.d.ts +0 -96
- package/dist/health/dashboard.d.ts.map +0 -1
- package/dist/health/dashboard.js +0 -470
- package/dist/health/dashboard.js.map +0 -1
- package/dist/hooks/discovery-enforcement.d.ts +0 -9
- package/dist/hooks/discovery-enforcement.d.ts.map +0 -1
- package/dist/hooks/discovery-enforcement.js +0 -137
- package/dist/hooks/discovery-enforcement.js.map +0 -1
- package/dist/hooks/discovery-hook.d.ts +0 -22
- package/dist/hooks/discovery-hook.d.ts.map +0 -1
- package/dist/hooks/discovery-hook.js +0 -199
- package/dist/hooks/discovery-hook.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -1499
- package/dist/index.js.map +0 -1
- package/dist/insight/emit.d.ts +0 -19
- package/dist/insight/emit.d.ts.map +0 -1
- package/dist/insight/emit.js +0 -107
- package/dist/insight/emit.js.map +0 -1
- package/dist/insight/engine-bridge.d.ts +0 -7
- package/dist/insight/engine-bridge.d.ts.map +0 -1
- package/dist/insight/engine-bridge.js +0 -6
- package/dist/insight/engine-bridge.js.map +0 -1
- package/dist/insight/index.d.ts +0 -3
- package/dist/insight/index.d.ts.map +0 -1
- package/dist/insight/index.js +0 -2
- package/dist/insight/index.js.map +0 -1
- package/dist/insight/telemetry.d.ts +0 -14
- package/dist/insight/telemetry.d.ts.map +0 -1
- package/dist/insight/telemetry.js +0 -87
- package/dist/insight/telemetry.js.map +0 -1
- package/dist/intake/candidate-paths/CandidatePathDetector.d.ts +0 -5
- package/dist/intake/candidate-paths/CandidatePathDetector.d.ts.map +0 -1
- package/dist/intake/candidate-paths/CandidatePathDetector.js +0 -173
- package/dist/intake/candidate-paths/CandidatePathDetector.js.map +0 -1
- package/dist/intake/candidate-paths/anchorRadiusExpansion.d.ts +0 -4
- package/dist/intake/candidate-paths/anchorRadiusExpansion.d.ts.map +0 -1
- package/dist/intake/candidate-paths/anchorRadiusExpansion.js +0 -66
- package/dist/intake/candidate-paths/anchorRadiusExpansion.js.map +0 -1
- package/dist/intake/candidate-paths/applyNegativeFiltering.d.ts +0 -4
- package/dist/intake/candidate-paths/applyNegativeFiltering.d.ts.map +0 -1
- package/dist/intake/candidate-paths/applyNegativeFiltering.js +0 -24
- package/dist/intake/candidate-paths/applyNegativeFiltering.js.map +0 -1
- package/dist/intake/candidate-paths/coCommitAnalyzer.d.ts +0 -3
- package/dist/intake/candidate-paths/coCommitAnalyzer.d.ts.map +0 -1
- package/dist/intake/candidate-paths/coCommitAnalyzer.js +0 -27
- package/dist/intake/candidate-paths/coCommitAnalyzer.js.map +0 -1
- package/dist/intake/candidate-paths/computeConfidence.d.ts +0 -3
- package/dist/intake/candidate-paths/computeConfidence.d.ts.map +0 -1
- package/dist/intake/candidate-paths/computeConfidence.js +0 -14
- package/dist/intake/candidate-paths/computeConfidence.js.map +0 -1
- package/dist/intake/candidate-paths/consolidateCandidates.d.ts +0 -5
- package/dist/intake/candidate-paths/consolidateCandidates.d.ts.map +0 -1
- package/dist/intake/candidate-paths/consolidateCandidates.js +0 -61
- package/dist/intake/candidate-paths/consolidateCandidates.js.map +0 -1
- package/dist/intake/candidate-paths/hierarchicalMatching.d.ts +0 -7
- package/dist/intake/candidate-paths/hierarchicalMatching.d.ts.map +0 -1
- package/dist/intake/candidate-paths/hierarchicalMatching.js +0 -46
- package/dist/intake/candidate-paths/hierarchicalMatching.js.map +0 -1
- package/dist/intake/candidate-paths/integration.d.ts +0 -7
- package/dist/intake/candidate-paths/integration.d.ts.map +0 -1
- package/dist/intake/candidate-paths/integration.js +0 -63
- package/dist/intake/candidate-paths/integration.js.map +0 -1
- package/dist/intake/candidate-paths/pathDetectionOverrides.d.ts +0 -3
- package/dist/intake/candidate-paths/pathDetectionOverrides.d.ts.map +0 -1
- package/dist/intake/candidate-paths/pathDetectionOverrides.js +0 -134
- package/dist/intake/candidate-paths/pathDetectionOverrides.js.map +0 -1
- package/dist/intake/candidate-paths/repoIndexAdapter.d.ts +0 -4
- package/dist/intake/candidate-paths/repoIndexAdapter.d.ts.map +0 -1
- package/dist/intake/candidate-paths/repoIndexAdapter.js +0 -99
- package/dist/intake/candidate-paths/repoIndexAdapter.js.map +0 -1
- package/dist/intake/candidate-paths/resolveExplicitTargets.d.ts +0 -8
- package/dist/intake/candidate-paths/resolveExplicitTargets.d.ts.map +0 -1
- package/dist/intake/candidate-paths/resolveExplicitTargets.js +0 -65
- package/dist/intake/candidate-paths/resolveExplicitTargets.js.map +0 -1
- package/dist/intake/candidate-paths/rules.d.ts +0 -13
- package/dist/intake/candidate-paths/rules.d.ts.map +0 -1
- package/dist/intake/candidate-paths/rules.js +0 -64
- package/dist/intake/candidate-paths/rules.js.map +0 -1
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.d.ts +0 -10
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.d.ts.map +0 -1
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.js +0 -73
- package/dist/intake/candidate-paths/scoreIntentSurfaceMatches.js.map +0 -1
- package/dist/intake/candidate-paths/shapeEstimator.d.ts +0 -3
- package/dist/intake/candidate-paths/shapeEstimator.d.ts.map +0 -1
- package/dist/intake/candidate-paths/shapeEstimator.js +0 -17
- package/dist/intake/candidate-paths/shapeEstimator.js.map +0 -1
- package/dist/intake/candidate-paths/types.d.ts +0 -148
- package/dist/intake/candidate-paths/types.d.ts.map +0 -1
- package/dist/intake/candidate-paths/types.js +0 -2
- package/dist/intake/candidate-paths/types.js.map +0 -1
- package/dist/intake/task-classifier/TaskClassifier.d.ts +0 -5
- package/dist/intake/task-classifier/TaskClassifier.d.ts.map +0 -1
- package/dist/intake/task-classifier/TaskClassifier.js +0 -96
- package/dist/intake/task-classifier/TaskClassifier.js.map +0 -1
- package/dist/intake/task-classifier/applyOverrides.d.ts +0 -3
- package/dist/intake/task-classifier/applyOverrides.d.ts.map +0 -1
- package/dist/intake/task-classifier/applyOverrides.js +0 -55
- package/dist/intake/task-classifier/applyOverrides.js.map +0 -1
- package/dist/intake/task-classifier/computeConfidence.d.ts +0 -3
- package/dist/intake/task-classifier/computeConfidence.d.ts.map +0 -1
- package/dist/intake/task-classifier/computeConfidence.js +0 -13
- package/dist/intake/task-classifier/computeConfidence.js.map +0 -1
- package/dist/intake/task-classifier/deriveRiskAndComplexity.d.ts +0 -4
- package/dist/intake/task-classifier/deriveRiskAndComplexity.d.ts.map +0 -1
- package/dist/intake/task-classifier/deriveRiskAndComplexity.js +0 -24
- package/dist/intake/task-classifier/deriveRiskAndComplexity.js.map +0 -1
- package/dist/intake/task-classifier/deriveTags.d.ts +0 -3
- package/dist/intake/task-classifier/deriveTags.d.ts.map +0 -1
- package/dist/intake/task-classifier/deriveTags.js +0 -43
- package/dist/intake/task-classifier/deriveTags.js.map +0 -1
- package/dist/intake/task-classifier/index.d.ts +0 -6
- package/dist/intake/task-classifier/index.d.ts.map +0 -1
- package/dist/intake/task-classifier/index.js +0 -6
- package/dist/intake/task-classifier/index.js.map +0 -1
- package/dist/intake/task-classifier/mergeScores.d.ts +0 -4
- package/dist/intake/task-classifier/mergeScores.d.ts.map +0 -1
- package/dist/intake/task-classifier/mergeScores.js +0 -68
- package/dist/intake/task-classifier/mergeScores.js.map +0 -1
- package/dist/intake/task-classifier/pathMatching.d.ts +0 -3
- package/dist/intake/task-classifier/pathMatching.d.ts.map +0 -1
- package/dist/intake/task-classifier/pathMatching.js +0 -33
- package/dist/intake/task-classifier/pathMatching.js.map +0 -1
- package/dist/intake/task-classifier/rules.d.ts +0 -28
- package/dist/intake/task-classifier/rules.d.ts.map +0 -1
- package/dist/intake/task-classifier/rules.js +0 -138
- package/dist/intake/task-classifier/rules.js.map +0 -1
- package/dist/intake/task-classifier/scoreKeywords.d.ts +0 -5
- package/dist/intake/task-classifier/scoreKeywords.d.ts.map +0 -1
- package/dist/intake/task-classifier/scoreKeywords.js +0 -41
- package/dist/intake/task-classifier/scoreKeywords.js.map +0 -1
- package/dist/intake/task-classifier/scoreMetadata.d.ts +0 -3
- package/dist/intake/task-classifier/scoreMetadata.d.ts.map +0 -1
- package/dist/intake/task-classifier/scoreMetadata.js +0 -29
- package/dist/intake/task-classifier/scoreMetadata.js.map +0 -1
- package/dist/intake/task-classifier/scorePaths.d.ts +0 -3
- package/dist/intake/task-classifier/scorePaths.d.ts.map +0 -1
- package/dist/intake/task-classifier/scorePaths.js +0 -38
- package/dist/intake/task-classifier/scorePaths.js.map +0 -1
- package/dist/intake/task-classifier/types.d.ts +0 -51
- package/dist/intake/task-classifier/types.d.ts.map +0 -1
- package/dist/intake/task-classifier/types.js +0 -2
- package/dist/intake/task-classifier/types.js.map +0 -1
- package/dist/integrations/github-actions.d.ts +0 -17
- package/dist/integrations/github-actions.d.ts.map +0 -1
- package/dist/integrations/github-actions.js +0 -77
- package/dist/integrations/github-actions.js.map +0 -1
- package/dist/intent/extractor.d.ts +0 -15
- package/dist/intent/extractor.d.ts.map +0 -1
- package/dist/intent/extractor.js +0 -149
- package/dist/intent/extractor.js.map +0 -1
- package/dist/intent/fetcher.d.ts +0 -33
- package/dist/intent/fetcher.d.ts.map +0 -1
- package/dist/intent/fetcher.js +0 -364
- package/dist/intent/fetcher.js.map +0 -1
- package/dist/intent/loader.d.ts +0 -26
- package/dist/intent/loader.d.ts.map +0 -1
- package/dist/intent/loader.js +0 -80
- package/dist/intent/loader.js.map +0 -1
- package/dist/intent/types.d.ts +0 -33
- package/dist/intent/types.d.ts.map +0 -1
- package/dist/intent/types.js +0 -9
- package/dist/intent/types.js.map +0 -1
- package/dist/intervention/drift-velocity.d.ts +0 -19
- package/dist/intervention/drift-velocity.d.ts.map +0 -1
- package/dist/intervention/drift-velocity.js +0 -107
- package/dist/intervention/drift-velocity.js.map +0 -1
- package/dist/intervention/engine.d.ts +0 -43
- package/dist/intervention/engine.d.ts.map +0 -1
- package/dist/intervention/engine.js +0 -356
- package/dist/intervention/engine.js.map +0 -1
- package/dist/intervention/templates.d.ts +0 -23
- package/dist/intervention/templates.d.ts.map +0 -1
- package/dist/intervention/templates.js +0 -167
- package/dist/intervention/templates.js.map +0 -1
- package/dist/manifest/build.d.ts +0 -19
- package/dist/manifest/build.d.ts.map +0 -1
- package/dist/manifest/build.js +0 -82
- package/dist/manifest/build.js.map +0 -1
- package/dist/manifest/schema.d.ts +0 -2
- package/dist/manifest/schema.d.ts.map +0 -1
- package/dist/manifest/schema.js +0 -2
- package/dist/manifest/schema.js.map +0 -1
- package/dist/manifest/write.d.ts +0 -13
- package/dist/manifest/write.d.ts.map +0 -1
- package/dist/manifest/write.js +0 -69
- package/dist/manifest/write.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -20
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -271
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/skill-template.d.ts +0 -10
- package/dist/mcp/skill-template.d.ts.map +0 -1
- package/dist/mcp/skill-template.js +0 -75
- package/dist/mcp/skill-template.js.map +0 -1
- package/dist/memory/TaskClassifier.d.ts +0 -6
- package/dist/memory/TaskClassifier.d.ts.map +0 -1
- package/dist/memory/TaskClassifier.js +0 -344
- package/dist/memory/TaskClassifier.js.map +0 -1
- package/dist/memory/context-injection.d.ts +0 -12
- package/dist/memory/context-injection.d.ts.map +0 -1
- package/dist/memory/context-injection.js +0 -550
- package/dist/memory/context-injection.js.map +0 -1
- package/dist/memory/evidence-gates.d.ts +0 -32
- package/dist/memory/evidence-gates.d.ts.map +0 -1
- package/dist/memory/evidence-gates.js +0 -168
- package/dist/memory/evidence-gates.js.map +0 -1
- package/dist/memory/golden-patterns.d.ts +0 -68
- package/dist/memory/golden-patterns.d.ts.map +0 -1
- package/dist/memory/golden-patterns.js +0 -260
- package/dist/memory/golden-patterns.js.map +0 -1
- package/dist/memory/index.d.ts +0 -11
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/index.js +0 -11
- package/dist/memory/index.js.map +0 -1
- package/dist/memory/lessons.d.ts +0 -88
- package/dist/memory/lessons.d.ts.map +0 -1
- package/dist/memory/lessons.js +0 -370
- package/dist/memory/lessons.js.map +0 -1
- package/dist/memory/ontology.d.ts +0 -34
- package/dist/memory/ontology.d.ts.map +0 -1
- package/dist/memory/ontology.js +0 -125
- package/dist/memory/ontology.js.map +0 -1
- package/dist/memory/policy-artifacts.d.ts +0 -31
- package/dist/memory/policy-artifacts.d.ts.map +0 -1
- package/dist/memory/policy-artifacts.js +0 -618
- package/dist/memory/policy-artifacts.js.map +0 -1
- package/dist/memory/preamble.d.ts +0 -35
- package/dist/memory/preamble.d.ts.map +0 -1
- package/dist/memory/preamble.js +0 -114
- package/dist/memory/preamble.js.map +0 -1
- package/dist/memory/recent-truth.d.ts +0 -21
- package/dist/memory/recent-truth.d.ts.map +0 -1
- package/dist/memory/recent-truth.js +0 -78
- package/dist/memory/recent-truth.js.map +0 -1
- package/dist/memory/storage.d.ts +0 -28
- package/dist/memory/storage.d.ts.map +0 -1
- package/dist/memory/storage.js +0 -204
- package/dist/memory/storage.js.map +0 -1
- package/dist/memory/structural-trust.d.ts +0 -36
- package/dist/memory/structural-trust.d.ts.map +0 -1
- package/dist/memory/structural-trust.js +0 -77
- package/dist/memory/structural-trust.js.map +0 -1
- package/dist/memory/taskClassifierOverrides.d.ts +0 -3
- package/dist/memory/taskClassifierOverrides.d.ts.map +0 -1
- package/dist/memory/taskClassifierOverrides.js +0 -153
- package/dist/memory/taskClassifierOverrides.js.map +0 -1
- package/dist/memory/taskClassifierRules.d.ts +0 -15
- package/dist/memory/taskClassifierRules.d.ts.map +0 -1
- package/dist/memory/taskClassifierRules.js +0 -277
- package/dist/memory/taskClassifierRules.js.map +0 -1
- package/dist/memory/taskClassifierTypes.d.ts +0 -40
- package/dist/memory/taskClassifierTypes.d.ts.map +0 -1
- package/dist/memory/taskClassifierTypes.js +0 -2
- package/dist/memory/taskClassifierTypes.js.map +0 -1
- package/dist/memory/validation-ledger.d.ts +0 -28
- package/dist/memory/validation-ledger.d.ts.map +0 -1
- package/dist/memory/validation-ledger.js +0 -90
- package/dist/memory/validation-ledger.js.map +0 -1
- package/dist/merge-check/hallucination-guard.d.ts +0 -49
- package/dist/merge-check/hallucination-guard.d.ts.map +0 -1
- package/dist/merge-check/hallucination-guard.js +0 -228
- package/dist/merge-check/hallucination-guard.js.map +0 -1
- package/dist/merge-check/intent-registry.d.ts +0 -42
- package/dist/merge-check/intent-registry.d.ts.map +0 -1
- package/dist/merge-check/intent-registry.js +0 -154
- package/dist/merge-check/intent-registry.js.map +0 -1
- package/dist/merge-check/sentinel.d.ts +0 -60
- package/dist/merge-check/sentinel.d.ts.map +0 -1
- package/dist/merge-check/sentinel.js +0 -399
- package/dist/merge-check/sentinel.js.map +0 -1
- package/dist/narrative/contextNarrative.d.ts +0 -22
- package/dist/narrative/contextNarrative.d.ts.map +0 -1
- package/dist/narrative/contextNarrative.js +0 -259
- package/dist/narrative/contextNarrative.js.map +0 -1
- package/dist/onboarding.d.ts +0 -37
- package/dist/onboarding.d.ts.map +0 -1
- package/dist/onboarding.js +0 -112
- package/dist/onboarding.js.map +0 -1
- package/dist/open-shell.d.ts +0 -14
- package/dist/open-shell.d.ts.map +0 -1
- package/dist/open-shell.js +0 -191
- package/dist/open-shell.js.map +0 -1
- package/dist/policy/load.d.ts +0 -21
- package/dist/policy/load.d.ts.map +0 -1
- package/dist/policy/load.js +0 -63
- package/dist/policy/load.js.map +0 -1
- package/dist/policy/realtime.d.ts +0 -17
- package/dist/policy/realtime.d.ts.map +0 -1
- package/dist/policy/realtime.js +0 -108
- package/dist/policy/realtime.js.map +0 -1
- package/dist/policy/resolve.d.ts +0 -18
- package/dist/policy/resolve.d.ts.map +0 -1
- package/dist/policy/resolve.js +0 -86
- package/dist/policy/resolve.js.map +0 -1
- package/dist/policy/schema.d.ts +0 -22
- package/dist/policy/schema.d.ts.map +0 -1
- package/dist/policy/schema.js +0 -220
- package/dist/policy/schema.js.map +0 -1
- package/dist/pr-comment/renderer.d.ts +0 -3
- package/dist/pr-comment/renderer.d.ts.map +0 -1
- package/dist/pr-comment/renderer.js +0 -32
- package/dist/pr-comment/renderer.js.map +0 -1
- package/dist/pr-comment/templates.d.ts +0 -4
- package/dist/pr-comment/templates.d.ts.map +0 -1
- package/dist/pr-comment/templates.js +0 -9
- package/dist/pr-comment/templates.js.map +0 -1
- package/dist/pr-comment/types.d.ts +0 -13
- package/dist/pr-comment/types.d.ts.map +0 -1
- package/dist/pr-comment/types.js +0 -2
- package/dist/pr-comment/types.js.map +0 -1
- package/dist/pre-pr/checks.d.ts +0 -18
- package/dist/pre-pr/checks.d.ts.map +0 -1
- package/dist/pre-pr/checks.js +0 -440
- package/dist/pre-pr/checks.js.map +0 -1
- package/dist/pre-pr/orchestrator.d.ts +0 -30
- package/dist/pre-pr/orchestrator.d.ts.map +0 -1
- package/dist/pre-pr/orchestrator.js +0 -104
- package/dist/pre-pr/orchestrator.js.map +0 -1
- package/dist/project-config.d.ts +0 -38
- package/dist/project-config.d.ts.map +0 -1
- package/dist/project-config.js +0 -206
- package/dist/project-config.js.map +0 -1
- package/dist/prompt-coach/admission.d.ts +0 -31
- package/dist/prompt-coach/admission.d.ts.map +0 -1
- package/dist/prompt-coach/admission.js +0 -105
- package/dist/prompt-coach/admission.js.map +0 -1
- package/dist/prompt-coach/feedback.d.ts +0 -49
- package/dist/prompt-coach/feedback.d.ts.map +0 -1
- package/dist/prompt-coach/feedback.js +0 -177
- package/dist/prompt-coach/feedback.js.map +0 -1
- package/dist/prompt-coach/format.d.ts +0 -56
- package/dist/prompt-coach/format.d.ts.map +0 -1
- package/dist/prompt-coach/format.js +0 -190
- package/dist/prompt-coach/format.js.map +0 -1
- package/dist/prompt-coach/index.d.ts +0 -13
- package/dist/prompt-coach/index.d.ts.map +0 -1
- package/dist/prompt-coach/index.js +0 -13
- package/dist/prompt-coach/index.js.map +0 -1
- package/dist/prompt-coach/interactive.d.ts +0 -28
- package/dist/prompt-coach/interactive.d.ts.map +0 -1
- package/dist/prompt-coach/interactive.js +0 -118
- package/dist/prompt-coach/interactive.js.map +0 -1
- package/dist/prompt-coach/policy.d.ts +0 -67
- package/dist/prompt-coach/policy.d.ts.map +0 -1
- package/dist/prompt-coach/policy.js +0 -502
- package/dist/prompt-coach/policy.js.map +0 -1
- package/dist/prompt-coach/summary.d.ts +0 -56
- package/dist/prompt-coach/summary.d.ts.map +0 -1
- package/dist/prompt-coach/summary.js +0 -304
- package/dist/prompt-coach/summary.js.map +0 -1
- package/dist/protected-runtime/core.d.ts +0 -7
- package/dist/protected-runtime/core.d.ts.map +0 -1
- package/dist/protected-runtime/core.js +0 -24
- package/dist/protected-runtime/core.js.map +0 -1
- package/dist/protected-runtime/module-loader.d.ts +0 -9
- package/dist/protected-runtime/module-loader.d.ts.map +0 -1
- package/dist/protected-runtime/module-loader.js +0 -54
- package/dist/protected-runtime/module-loader.js.map +0 -1
- package/dist/protected-shell.d.ts +0 -2
- package/dist/protected-shell.d.ts.map +0 -1
- package/dist/protected-shell.js +0 -41
- package/dist/protected-shell.js.map +0 -1
- package/dist/release-check/engine.d.ts +0 -30
- package/dist/release-check/engine.d.ts.map +0 -1
- package/dist/release-check/engine.js +0 -726
- package/dist/release-check/engine.js.map +0 -1
- package/dist/release-check/index.d.ts +0 -16
- package/dist/release-check/index.d.ts.map +0 -1
- package/dist/release-check/index.js +0 -16
- package/dist/release-check/index.js.map +0 -1
- package/dist/release-check/output.d.ts +0 -7
- package/dist/release-check/output.d.ts.map +0 -1
- package/dist/release-check/output.js +0 -123
- package/dist/release-check/output.js.map +0 -1
- package/dist/release-truth.d.ts +0 -20
- package/dist/release-truth.d.ts.map +0 -1
- package/dist/release-truth.js +0 -114
- package/dist/release-truth.js.map +0 -1
- package/dist/review-intelligence/baseline.d.ts +0 -58
- package/dist/review-intelligence/baseline.d.ts.map +0 -1
- package/dist/review-intelligence/baseline.js +0 -99
- package/dist/review-intelligence/baseline.js.map +0 -1
- package/dist/review-intelligence/companion-check.d.ts +0 -28
- package/dist/review-intelligence/companion-check.d.ts.map +0 -1
- package/dist/review-intelligence/companion-check.js +0 -71
- package/dist/review-intelligence/companion-check.js.map +0 -1
- package/dist/review-intelligence/detectors/architecture-graph.d.ts +0 -18
- package/dist/review-intelligence/detectors/architecture-graph.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/architecture-graph.js +0 -73
- package/dist/review-intelligence/detectors/architecture-graph.js.map +0 -1
- package/dist/review-intelligence/detectors/cjs-named-import.d.ts +0 -13
- package/dist/review-intelligence/detectors/cjs-named-import.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/cjs-named-import.js +0 -134
- package/dist/review-intelligence/detectors/cjs-named-import.js.map +0 -1
- package/dist/review-intelligence/detectors/exact-count-assertion.d.ts +0 -17
- package/dist/review-intelligence/detectors/exact-count-assertion.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/exact-count-assertion.js +0 -93
- package/dist/review-intelligence/detectors/exact-count-assertion.js.map +0 -1
- package/dist/review-intelligence/detectors/exports-map-missing.d.ts +0 -14
- package/dist/review-intelligence/detectors/exports-map-missing.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/exports-map-missing.js +0 -131
- package/dist/review-intelligence/detectors/exports-map-missing.js.map +0 -1
- package/dist/review-intelligence/detectors/fixture-keyword-drift.d.ts +0 -12
- package/dist/review-intelligence/detectors/fixture-keyword-drift.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/fixture-keyword-drift.js +0 -82
- package/dist/review-intelligence/detectors/fixture-keyword-drift.js.map +0 -1
- package/dist/review-intelligence/detectors/optional-infra-crash.d.ts +0 -12
- package/dist/review-intelligence/detectors/optional-infra-crash.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/optional-infra-crash.js +0 -97
- package/dist/review-intelligence/detectors/optional-infra-crash.js.map +0 -1
- package/dist/review-intelligence/detectors/outbound-io.d.ts +0 -14
- package/dist/review-intelligence/detectors/outbound-io.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/outbound-io.js +0 -122
- package/dist/review-intelligence/detectors/outbound-io.js.map +0 -1
- package/dist/review-intelligence/detectors/pack-rules.d.ts +0 -16
- package/dist/review-intelligence/detectors/pack-rules.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/pack-rules.js +0 -107
- package/dist/review-intelligence/detectors/pack-rules.js.map +0 -1
- package/dist/review-intelligence/detectors/platform-helpers.d.ts +0 -15
- package/dist/review-intelligence/detectors/platform-helpers.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/platform-helpers.js +0 -171
- package/dist/review-intelligence/detectors/platform-helpers.js.map +0 -1
- package/dist/review-intelligence/detectors/runtime-validation.d.ts +0 -10
- package/dist/review-intelligence/detectors/runtime-validation.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/runtime-validation.js +0 -109
- package/dist/review-intelligence/detectors/runtime-validation.js.map +0 -1
- package/dist/review-intelligence/detectors/undeclared-dependency.d.ts +0 -11
- package/dist/review-intelligence/detectors/undeclared-dependency.d.ts.map +0 -1
- package/dist/review-intelligence/detectors/undeclared-dependency.js +0 -100
- package/dist/review-intelligence/detectors/undeclared-dependency.js.map +0 -1
- package/dist/review-intelligence/engine/ast-parser.d.ts +0 -90
- package/dist/review-intelligence/engine/ast-parser.d.ts.map +0 -1
- package/dist/review-intelligence/engine/ast-parser.js +0 -266
- package/dist/review-intelligence/engine/ast-parser.js.map +0 -1
- package/dist/review-intelligence/engine/dataflow.d.ts +0 -34
- package/dist/review-intelligence/engine/dataflow.d.ts.map +0 -1
- package/dist/review-intelligence/engine/dataflow.js +0 -115
- package/dist/review-intelligence/engine/dataflow.js.map +0 -1
- package/dist/review-intelligence/engine/index.d.ts +0 -7
- package/dist/review-intelligence/engine/index.d.ts.map +0 -1
- package/dist/review-intelligence/engine/index.js +0 -7
- package/dist/review-intelligence/engine/index.js.map +0 -1
- package/dist/review-intelligence/engine/symbol-resolver.d.ts +0 -34
- package/dist/review-intelligence/engine/symbol-resolver.d.ts.map +0 -1
- package/dist/review-intelligence/engine/symbol-resolver.js +0 -106
- package/dist/review-intelligence/engine/symbol-resolver.js.map +0 -1
- package/dist/review-intelligence/fingerprint.d.ts +0 -15
- package/dist/review-intelligence/fingerprint.d.ts.map +0 -1
- package/dist/review-intelligence/fingerprint.js +0 -29
- package/dist/review-intelligence/fingerprint.js.map +0 -1
- package/dist/review-intelligence/fixes/index.d.ts +0 -54
- package/dist/review-intelligence/fixes/index.d.ts.map +0 -1
- package/dist/review-intelligence/fixes/index.js +0 -346
- package/dist/review-intelligence/fixes/index.js.map +0 -1
- package/dist/review-intelligence/index.d.ts +0 -24
- package/dist/review-intelligence/index.d.ts.map +0 -1
- package/dist/review-intelligence/index.js +0 -155
- package/dist/review-intelligence/index.js.map +0 -1
- package/dist/review-intelligence/invariants.d.ts +0 -25
- package/dist/review-intelligence/invariants.d.ts.map +0 -1
- package/dist/review-intelligence/invariants.js +0 -73
- package/dist/review-intelligence/invariants.js.map +0 -1
- package/dist/review-intelligence/learning/index.d.ts +0 -39
- package/dist/review-intelligence/learning/index.d.ts.map +0 -1
- package/dist/review-intelligence/learning/index.js +0 -265
- package/dist/review-intelligence/learning/index.js.map +0 -1
- package/dist/review-intelligence/output.d.ts +0 -31
- package/dist/review-intelligence/output.d.ts.map +0 -1
- package/dist/review-intelligence/output.js +0 -224
- package/dist/review-intelligence/output.js.map +0 -1
- package/dist/review-intelligence/packs/index.d.ts +0 -69
- package/dist/review-intelligence/packs/index.d.ts.map +0 -1
- package/dist/review-intelligence/packs/index.js +0 -168
- package/dist/review-intelligence/packs/index.js.map +0 -1
- package/dist/review-intelligence/repair-guidance.d.ts +0 -11
- package/dist/review-intelligence/repair-guidance.d.ts.map +0 -1
- package/dist/review-intelligence/repair-guidance.js +0 -137
- package/dist/review-intelligence/repair-guidance.js.map +0 -1
- package/dist/review-intelligence/severity.d.ts +0 -10
- package/dist/review-intelligence/severity.d.ts.map +0 -1
- package/dist/review-intelligence/severity.js +0 -36
- package/dist/review-intelligence/severity.js.map +0 -1
- package/dist/review-intelligence/standards-discovery.d.ts +0 -12
- package/dist/review-intelligence/standards-discovery.d.ts.map +0 -1
- package/dist/review-intelligence/standards-discovery.js +0 -221
- package/dist/review-intelligence/standards-discovery.js.map +0 -1
- package/dist/review-intelligence/suppressions.d.ts +0 -53
- package/dist/review-intelligence/suppressions.d.ts.map +0 -1
- package/dist/review-intelligence/suppressions.js +0 -86
- package/dist/review-intelligence/suppressions.js.map +0 -1
- package/dist/review-intelligence/triggers.d.ts +0 -15
- package/dist/review-intelligence/triggers.d.ts.map +0 -1
- package/dist/review-intelligence/triggers.js +0 -104
- package/dist/review-intelligence/triggers.js.map +0 -1
- package/dist/review-intelligence/types.d.ts +0 -186
- package/dist/review-intelligence/types.d.ts.map +0 -1
- package/dist/review-intelligence/types.js +0 -11
- package/dist/review-intelligence/types.js.map +0 -1
- package/dist/risk-detection/heuristics.d.ts +0 -13
- package/dist/risk-detection/heuristics.d.ts.map +0 -1
- package/dist/risk-detection/heuristics.js +0 -348
- package/dist/risk-detection/heuristics.js.map +0 -1
- package/dist/risk-detection/index.d.ts +0 -20
- package/dist/risk-detection/index.d.ts.map +0 -1
- package/dist/risk-detection/index.js +0 -128
- package/dist/risk-detection/index.js.map +0 -1
- package/dist/security/export-sanitizer.d.ts +0 -76
- package/dist/security/export-sanitizer.d.ts.map +0 -1
- package/dist/security/export-sanitizer.js +0 -176
- package/dist/security/export-sanitizer.js.map +0 -1
- package/dist/security/path-summary.d.ts +0 -4
- package/dist/security/path-summary.d.ts.map +0 -1
- package/dist/security/path-summary.js +0 -94
- package/dist/security/path-summary.js.map +0 -1
- package/dist/session-id.d.ts +0 -22
- package/dist/session-id.d.ts.map +0 -1
- package/dist/session-id.js +0 -49
- package/dist/session-id.js.map +0 -1
- package/dist/session-paths.d.ts +0 -35
- package/dist/session-paths.d.ts.map +0 -1
- package/dist/session-paths.js +0 -68
- package/dist/session-paths.js.map +0 -1
- package/dist/session-registry.d.ts +0 -19
- package/dist/session-registry.d.ts.map +0 -1
- package/dist/session-registry.js +0 -182
- package/dist/session-registry.js.map +0 -1
- package/dist/session-timeline.d.ts +0 -13
- package/dist/session-timeline.d.ts.map +0 -1
- package/dist/session-timeline.js +0 -134
- package/dist/session-timeline.js.map +0 -1
- package/dist/signing/canonicalize.d.ts +0 -17
- package/dist/signing/canonicalize.d.ts.map +0 -1
- package/dist/signing/canonicalize.js +0 -50
- package/dist/signing/canonicalize.js.map +0 -1
- package/dist/signing/hmac.d.ts +0 -8
- package/dist/signing/hmac.d.ts.map +0 -1
- package/dist/signing/hmac.js +0 -16
- package/dist/signing/hmac.js.map +0 -1
- package/dist/signing/signer.d.ts +0 -16
- package/dist/signing/signer.d.ts.map +0 -1
- package/dist/signing/signer.js +0 -2
- package/dist/signing/signer.js.map +0 -1
- package/dist/templates/claude-md.d.ts +0 -12
- package/dist/templates/claude-md.d.ts.map +0 -1
- package/dist/templates/claude-md.js +0 -113
- package/dist/templates/claude-md.js.map +0 -1
- package/dist/templates/config.d.ts +0 -3
- package/dist/templates/config.d.ts.map +0 -1
- package/dist/templates/config.js +0 -154
- package/dist/templates/config.js.map +0 -1
- package/dist/templates/harness-pack.d.ts +0 -3
- package/dist/templates/harness-pack.d.ts.map +0 -1
- package/dist/templates/harness-pack.js +0 -26
- package/dist/templates/harness-pack.js.map +0 -1
- package/dist/templates/hooks.d.ts +0 -36
- package/dist/templates/hooks.d.ts.map +0 -1
- package/dist/templates/hooks.js +0 -278
- package/dist/templates/hooks.js.map +0 -1
- package/dist/templates/runtime-resolution.d.ts +0 -4
- package/dist/templates/runtime-resolution.d.ts.map +0 -1
- package/dist/templates/runtime-resolution.js +0 -76
- package/dist/templates/runtime-resolution.js.map +0 -1
- package/dist/templates/scenarios.d.ts +0 -3
- package/dist/templates/scenarios.d.ts.map +0 -1
- package/dist/templates/scenarios.js +0 -335
- package/dist/templates/scenarios.js.map +0 -1
- package/dist/utils/two-loop.d.ts +0 -36
- package/dist/utils/two-loop.d.ts.map +0 -1
- package/dist/utils/two-loop.js +0 -75
- package/dist/utils/two-loop.js.map +0 -1
- package/dist/utils/upgrade-nudge.d.ts +0 -18
- package/dist/utils/upgrade-nudge.d.ts.map +0 -1
- package/dist/utils/upgrade-nudge.js +0 -57
- package/dist/utils/upgrade-nudge.js.map +0 -1
- package/dist/verify/evaluate.d.ts +0 -10
- package/dist/verify/evaluate.d.ts.map +0 -1
- package/dist/verify/evaluate.js +0 -117
- package/dist/verify/evaluate.js.map +0 -1
- package/dist/verify/insertion-point-lock.d.ts +0 -12
- package/dist/verify/insertion-point-lock.d.ts.map +0 -1
- package/dist/verify/insertion-point-lock.js +0 -208
- package/dist/verify/insertion-point-lock.js.map +0 -1
- package/dist/verify/policy-snapshot.d.ts +0 -7
- package/dist/verify/policy-snapshot.d.ts.map +0 -1
- package/dist/verify/policy-snapshot.js +0 -36
- package/dist/verify/policy-snapshot.js.map +0 -1
- package/dist/verify/report.d.ts +0 -11
- package/dist/verify/report.d.ts.map +0 -1
- package/dist/verify/report.js +0 -64
- package/dist/verify/report.js.map +0 -1
- package/dist/verify/symbol-growth.d.ts +0 -13
- package/dist/verify/symbol-growth.d.ts.map +0 -1
- package/dist/verify/symbol-growth.js +0 -143
- package/dist/verify/symbol-growth.js.map +0 -1
- package/dist/version.d.ts +0 -2
- package/dist/version.d.ts.map +0 -1
- package/dist/version.js +0 -11
- package/dist/version.js.map +0 -1
|
@@ -1,1110 +0,0 @@
|
|
|
1
|
-
import { readFileSync, writeFileSync, appendFileSync, existsSync, mkdirSync, statSync, readdirSync, unlinkSync } from 'node:fs';
|
|
2
|
-
import { join, dirname } from 'node:path';
|
|
3
|
-
import { execSync } from 'node:child_process';
|
|
4
|
-
import { buildBundleViaEngine } from '@codeledger/core-engine';
|
|
5
|
-
import { buildRepoIndex } from '@codeledger/repo';
|
|
6
|
-
import { renderBundleMarkdown } from '@codeledger/harness';
|
|
7
|
-
import { generateReviewCandidates, splitReviewCandidates } from '@codeledger/selector';
|
|
8
|
-
import { resolveSessionId } from '../session-id.js';
|
|
9
|
-
import { sessionBundlePath, sessionActivateRef, sessionStartRef, sessionTaskHistoryPath, sessionReviewConfigPath, legacyBundlePath, } from '../session-paths.js';
|
|
10
|
-
import { updateSession, findOverlappingFiles, getActiveSessions } from '../session-registry.js';
|
|
11
|
-
import { createCheckpoint } from './checkpoint.js';
|
|
12
|
-
import { autoInitIntent, evaluateDrift } from './intent.js';
|
|
13
|
-
import { getCachedDiscovery, cacheDiscoveryResult } from '../discovery/cache.js';
|
|
14
|
-
import { runDiscovery } from '../discovery/index.js';
|
|
15
|
-
import { memoryExists, loadMemory } from '../memory/storage.js';
|
|
16
|
-
import { generateContextPreamble } from '../memory/preamble.js';
|
|
17
|
-
import { appendDecisionEvent, newTimelineCommandId } from '../session-timeline.js';
|
|
18
|
-
import { migrateActiveBundle } from '../ecl/persistence.js';
|
|
19
|
-
import { maybeShowUpgradeNudge } from '../utils/upgrade-nudge.js';
|
|
20
|
-
import { registerSession, detectCollisions } from '../merge-check/intent-registry.js';
|
|
21
|
-
import { formatPostSummary, DEFAULT_PROMPT_COACH_CONFIG, } from '../prompt-coach/index.js';
|
|
22
|
-
import { refineTask, completeRefinement, DEFAULT_REFINEMENT_SETTINGS, buildSnapshot, deriveLogicalEdges, buildChangeCapsule } from '@codeledger/engine';
|
|
23
|
-
import { loadEntries, buildFailureHotspots, recordExecution, buildEntry, deriveIntentSignature } from '@codeledger/engine';
|
|
24
|
-
/**
|
|
25
|
-
* `codeledger activate [--task "..."] [--session <id>]`
|
|
26
|
-
*
|
|
27
|
-
* All-in-one command: scan if stale -> generate bundle -> write active-bundle.md.
|
|
28
|
-
* Designed to be called by agent hooks (Claude Code, Cursor, Codex) so that
|
|
29
|
-
* context is ready before the agent starts working on a task.
|
|
30
|
-
*
|
|
31
|
-
* When called without --task (e.g. from SessionStart hook), only scans the
|
|
32
|
-
* repo index so it's warm for future bundle generation. No bundle is written
|
|
33
|
-
* because there's no real task to select context for.
|
|
34
|
-
*
|
|
35
|
-
* Multi-session: when a --session ID is provided (or resolved from env/PID),
|
|
36
|
-
* all state files are written to .codeledger/sessions/{id}/ instead of the
|
|
37
|
-
* shared .codeledger/ root. A copy is also written to the legacy fallback
|
|
38
|
-
* path for non-session-aware agents.
|
|
39
|
-
*/
|
|
40
|
-
export async function runActivate(cwd, flags) {
|
|
41
|
-
let task = flags['task'];
|
|
42
|
-
if (task !== undefined && task.trim() === '') {
|
|
43
|
-
console.error('--task cannot be empty. Provide a task description: codeledger activate --task "describe your task"');
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
// Guard against --task without a value being parsed as boolean "true"
|
|
47
|
-
if (task === 'true' && !flags['_raw_task']) {
|
|
48
|
-
console.error('--task requires a value. Usage: codeledger activate --task "describe your task"');
|
|
49
|
-
process.exit(1);
|
|
50
|
-
}
|
|
51
|
-
const quiet = flags['quiet'] === 'true';
|
|
52
|
-
const log = quiet ? (..._args) => { } : console.log;
|
|
53
|
-
const sessionId = resolveSessionId({ session: flags['session'] });
|
|
54
|
-
const commandId = newTimelineCommandId('activate');
|
|
55
|
-
const configPath = join(cwd, '.codeledger', 'config.json');
|
|
56
|
-
if (!existsSync(configPath)) {
|
|
57
|
-
console.error('No .codeledger/config.json found. Run "codeledger init" first.');
|
|
58
|
-
process.exit(1);
|
|
59
|
-
}
|
|
60
|
-
let config;
|
|
61
|
-
try {
|
|
62
|
-
config = JSON.parse(readFileSync(configPath, 'utf-8'));
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
console.error('Failed to parse .codeledger/config.json. Check for syntax errors.');
|
|
66
|
-
process.exit(1);
|
|
67
|
-
}
|
|
68
|
-
const indexPath = join(cwd, config.workspace.cache_dir, 'repo-index.json');
|
|
69
|
-
// -- Step 1: Scan if stale ------------------------------------------------
|
|
70
|
-
const staleSec = flags['stale-after']
|
|
71
|
-
? parsePositiveInt(flags['stale-after'], 'stale-after')
|
|
72
|
-
: 3600; // default: re-scan if index is >1 hour old
|
|
73
|
-
if (isIndexStale(indexPath, staleSec)) {
|
|
74
|
-
log('Repo index is stale or missing -- rescanning...');
|
|
75
|
-
buildRepoIndex({
|
|
76
|
-
root: cwd,
|
|
77
|
-
repoConfig: config.repo,
|
|
78
|
-
outputPath: indexPath,
|
|
79
|
-
log,
|
|
80
|
-
});
|
|
81
|
-
log(' Scan complete.');
|
|
82
|
-
}
|
|
83
|
-
// -- Migrate legacy active-bundle.md to active/ directory (backward-compatible)
|
|
84
|
-
try {
|
|
85
|
-
migrateActiveBundle(cwd);
|
|
86
|
-
}
|
|
87
|
-
catch { /* non-fatal */ }
|
|
88
|
-
// -- Save session start ref for session-progress (full session view) ------
|
|
89
|
-
// Only write if no ref exists yet (first activate of the session)
|
|
90
|
-
saveSessionStartRef(cwd, sessionId);
|
|
91
|
-
// -- Scan-only mode: no task means just warm the index --------------------
|
|
92
|
-
if (!task) {
|
|
93
|
-
log('Index is warm. Run "codeledger activate --task ..." to generate a context bundle.');
|
|
94
|
-
// Only write a placeholder if no valid bundle already exists.
|
|
95
|
-
// This prevents overwriting a real task-specific bundle when the
|
|
96
|
-
// SessionStart hook runs activate without --task on editor restart.
|
|
97
|
-
const bundlePath = sessionBundlePath(cwd, sessionId);
|
|
98
|
-
const existingBundle = existsSync(bundlePath)
|
|
99
|
-
? readFileSync(bundlePath, 'utf-8')
|
|
100
|
-
: '';
|
|
101
|
-
const isPlaceholderOrEmpty = !existingBundle.trim() ||
|
|
102
|
-
existingBundle.includes('No task specified yet');
|
|
103
|
-
if (isPlaceholderOrEmpty) {
|
|
104
|
-
const placeholderContent = [
|
|
105
|
-
'# CodeLedger Context Bundle',
|
|
106
|
-
'',
|
|
107
|
-
'No task specified yet. The repo index has been scanned and is ready.',
|
|
108
|
-
'',
|
|
109
|
-
'To generate a context bundle for your task, run:',
|
|
110
|
-
'',
|
|
111
|
-
'```',
|
|
112
|
-
'codeledger activate --task "describe your task here"',
|
|
113
|
-
'```',
|
|
114
|
-
'',
|
|
115
|
-
'The bundle will list the most relevant files ranked by score with',
|
|
116
|
-
'relevance reasons and code excerpts.',
|
|
117
|
-
'',
|
|
118
|
-
].join('\n');
|
|
119
|
-
ensureDir(bundlePath);
|
|
120
|
-
writeFileSync(bundlePath, placeholderContent);
|
|
121
|
-
if (sessionId) {
|
|
122
|
-
const fallback = legacyBundlePath(cwd);
|
|
123
|
-
ensureDir(fallback);
|
|
124
|
-
writeFileSync(fallback, placeholderContent);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
let repoIndex;
|
|
130
|
-
try {
|
|
131
|
-
repoIndex = JSON.parse(readFileSync(indexPath, 'utf-8'));
|
|
132
|
-
}
|
|
133
|
-
catch {
|
|
134
|
-
console.error('Failed to parse repo index. Try running "codeledger scan" to rebuild it.');
|
|
135
|
-
process.exit(1);
|
|
136
|
-
}
|
|
137
|
-
// -- Step 2: Generate bundle ----------------------------------------------
|
|
138
|
-
const expand = flags['expand'] === 'true';
|
|
139
|
-
const defaultTokens = config.selector.default_budget.tokens;
|
|
140
|
-
const defaultMaxFiles = config.selector.default_budget.max_files;
|
|
141
|
-
const budgetTokens = flags['budget']
|
|
142
|
-
? parsePositiveInt(flags['budget'], 'budget')
|
|
143
|
-
: expand && defaultTokens ? defaultTokens * 2 : defaultTokens;
|
|
144
|
-
const maxFiles = flags['max-files']
|
|
145
|
-
? parsePositiveInt(flags['max-files'], 'max-files')
|
|
146
|
-
: expand && defaultMaxFiles ? Math.min(defaultMaxFiles * 2, 50) : defaultMaxFiles;
|
|
147
|
-
// -- Auto-close previous task: print mini-recap before overwriting ref ------
|
|
148
|
-
emitPreviousTaskRecap(cwd, config, sessionId, log);
|
|
149
|
-
// -- Semantic Fortress: Intent-Lock collision detection --------------------
|
|
150
|
-
if (task && sessionId) {
|
|
151
|
-
try {
|
|
152
|
-
const collisions = detectCollisions(cwd, sessionId, '.');
|
|
153
|
-
if (collisions.length > 0) {
|
|
154
|
-
for (const c of collisions) {
|
|
155
|
-
log(` ⚠️ ${c.message}`);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
registerSession(cwd, sessionId, task, '.');
|
|
159
|
-
}
|
|
160
|
-
catch {
|
|
161
|
-
// Non-fatal — don't block activation on registry errors
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
// -- Save activate ref for session-summary (per-task scoping) --------------
|
|
165
|
-
saveActivateRef(cwd, sessionId);
|
|
166
|
-
// -- Parse new flags: scope, branch-aware, continue --------------------------
|
|
167
|
-
const scopeRaw = flags['scope'];
|
|
168
|
-
const scope = scopeRaw
|
|
169
|
-
? scopeRaw.split(',').map((s) => s.trim()).filter(Boolean)
|
|
170
|
-
: undefined;
|
|
171
|
-
const branchAware = flags['branch-aware'] === 'true';
|
|
172
|
-
const continueMode = flags['continue'] === 'true';
|
|
173
|
-
// Resolve branch-changed files for work-in-progress awareness
|
|
174
|
-
let branchChangedFiles;
|
|
175
|
-
if (branchAware || continueMode) {
|
|
176
|
-
branchChangedFiles = detectBranchChangedFiles(cwd);
|
|
177
|
-
}
|
|
178
|
-
// -- Step 2.2: Prompt Coach — repo-aware task refinement ─────────────────
|
|
179
|
-
const refinementSettings = {
|
|
180
|
-
...DEFAULT_REFINEMENT_SETTINGS,
|
|
181
|
-
...config['refinement'],
|
|
182
|
-
};
|
|
183
|
-
// CLI flag overrides: --refine forces interactive, --no-refine disables
|
|
184
|
-
if (flags['refine'] === 'true') {
|
|
185
|
-
refinementSettings.enabled = true;
|
|
186
|
-
refinementSettings.mode = 'interactive';
|
|
187
|
-
}
|
|
188
|
-
if (flags['no-refine'] === 'true') {
|
|
189
|
-
refinementSettings.enabled = false;
|
|
190
|
-
}
|
|
191
|
-
let coachResult;
|
|
192
|
-
if (refinementSettings.enabled && refinementSettings.mode !== 'off') {
|
|
193
|
-
try {
|
|
194
|
-
coachResult = refineTask(task, repoIndex, refinementSettings);
|
|
195
|
-
if (!coachResult.bypassed && coachResult.candidates.length > 0) {
|
|
196
|
-
if (!quiet) {
|
|
197
|
-
console.log('');
|
|
198
|
-
console.log(' Prompt Coach — repo-aware refinement');
|
|
199
|
-
console.log(' ────────────────────────────────────');
|
|
200
|
-
console.log(` Raw task: ${truncate(task, 70)}`);
|
|
201
|
-
console.log('');
|
|
202
|
-
for (let i = 0; i < coachResult.candidates.length; i++) {
|
|
203
|
-
const c = coachResult.candidates[i];
|
|
204
|
-
console.log(` [${i + 1}] ${c.label} (confidence: ${(c.confidence * 100).toFixed(0)}%)`);
|
|
205
|
-
console.log(` ${truncate(c.text, 90)}`);
|
|
206
|
-
// Context scope summary (entity-based)
|
|
207
|
-
if (c.context_intent) {
|
|
208
|
-
const ci = c.context_intent;
|
|
209
|
-
const requiredEntities = ci.entities.filter((e) => e.disposition === 'required');
|
|
210
|
-
const supportingEntities = ci.entities.filter((e) => e.disposition === 'supporting');
|
|
211
|
-
const relCount = ci.relationships.length;
|
|
212
|
-
console.log(` entities: ${requiredEntities.length} required, ${supportingEntities.length} supporting (${relCount} relationships)`);
|
|
213
|
-
if (ci.scope_packages.length > 0) {
|
|
214
|
-
console.log(` packages: ${ci.scope_packages.join(', ')}`);
|
|
215
|
-
}
|
|
216
|
-
// Show top required entity labels
|
|
217
|
-
for (const ent of requiredEntities.slice(0, 3)) {
|
|
218
|
-
console.log(` ├ ${ent.kind}: ${ent.label}`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
if (c.evidence.length > 0) {
|
|
222
|
-
const topEvidence = c.evidence.slice(0, 2);
|
|
223
|
-
for (const e of topEvidence) {
|
|
224
|
-
console.log(` ↳ ${e.description}`);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
console.log('');
|
|
228
|
-
}
|
|
229
|
-
// Context reduction summary
|
|
230
|
-
if (coachResult.context_reduction) {
|
|
231
|
-
const cr = coachResult.context_reduction;
|
|
232
|
-
if (cr.reduction_ratio > 0) {
|
|
233
|
-
console.log(` context: ${cr.refined_file_count} files (~${cr.refined_tokens} tokens) vs ${cr.naive_file_count} naive (${(cr.reduction_ratio * 100).toFixed(0)}% smaller)`);
|
|
234
|
-
console.log('');
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
// Auto mode: accept top candidate silently
|
|
239
|
-
if (refinementSettings.mode === 'auto') {
|
|
240
|
-
const top = coachResult.candidates[0];
|
|
241
|
-
const decision = {
|
|
242
|
-
action: 'accept',
|
|
243
|
-
selected_index: 0,
|
|
244
|
-
final_task: top.text,
|
|
245
|
-
decision_time_ms: 0,
|
|
246
|
-
};
|
|
247
|
-
task = completeRefinement(cwd, coachResult, decision);
|
|
248
|
-
if (!quiet) {
|
|
249
|
-
console.log(` → Using refined task: "${truncate(task, 70)}"`);
|
|
250
|
-
console.log('');
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
// Interactive mode: readline-based user selection (TTY only)
|
|
254
|
-
else if (refinementSettings.mode === 'interactive') {
|
|
255
|
-
const isTTY = process.stdin.isTTY && process.stdout.isTTY;
|
|
256
|
-
if (isTTY) {
|
|
257
|
-
const selectedIndex = await promptUserSelection(coachResult.candidates.length);
|
|
258
|
-
const startTime = Date.now();
|
|
259
|
-
if (selectedIndex === -1) {
|
|
260
|
-
// User chose to keep original
|
|
261
|
-
const decision = {
|
|
262
|
-
action: 'keep_original',
|
|
263
|
-
final_task: task,
|
|
264
|
-
decision_time_ms: Date.now() - startTime,
|
|
265
|
-
};
|
|
266
|
-
completeRefinement(cwd, coachResult, decision);
|
|
267
|
-
console.log(' → Keeping original task');
|
|
268
|
-
console.log('');
|
|
269
|
-
}
|
|
270
|
-
else {
|
|
271
|
-
const selected = coachResult.candidates[selectedIndex];
|
|
272
|
-
const decision = {
|
|
273
|
-
action: 'accept',
|
|
274
|
-
selected_index: selectedIndex,
|
|
275
|
-
final_task: selected.text,
|
|
276
|
-
decision_time_ms: Date.now() - startTime,
|
|
277
|
-
};
|
|
278
|
-
task = completeRefinement(cwd, coachResult, decision);
|
|
279
|
-
console.log(` → Using option [${selectedIndex + 1}]: "${truncate(task, 70)}"`);
|
|
280
|
-
console.log('');
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
// Non-TTY (agent context): auto-accept top candidate
|
|
285
|
-
const top = coachResult.candidates[0];
|
|
286
|
-
const decision = {
|
|
287
|
-
action: 'accept',
|
|
288
|
-
selected_index: 0,
|
|
289
|
-
final_task: top.text,
|
|
290
|
-
decision_time_ms: 0,
|
|
291
|
-
};
|
|
292
|
-
task = completeRefinement(cwd, coachResult, decision);
|
|
293
|
-
if (!quiet) {
|
|
294
|
-
console.log(` → Using refined task: "${truncate(task, 70)}"`);
|
|
295
|
-
console.log('');
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
else if (!coachResult.bypassed && coachResult.candidates.length === 0) {
|
|
301
|
-
// No suggestions generated — proceed with raw task
|
|
302
|
-
}
|
|
303
|
-
else if (coachResult.bypassed && !quiet) {
|
|
304
|
-
// Bypassed — task is already well-specified, no output needed
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
catch {
|
|
308
|
-
// Prompt Coach must never break activation — fail silently
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
// -- Step 2.3: Apply context pack as scope constraint ──────────────────
|
|
312
|
-
// If context minimization produced a pack, use its file paths as a hard
|
|
313
|
-
// scope constraint for the downstream selector. This is the critical
|
|
314
|
-
// compound optimization: the pack's curated files become the ONLY files
|
|
315
|
-
// the selector considers, not just a budget hint.
|
|
316
|
-
let effectiveBudgetTokens = budgetTokens;
|
|
317
|
-
let effectiveMaxFiles = maxFiles;
|
|
318
|
-
let effectiveScope = scope;
|
|
319
|
-
if (coachResult?.context_pack && coachResult.context_reduction) {
|
|
320
|
-
const pack = coachResult.context_pack;
|
|
321
|
-
const packPaths = pack.candidates.map((c) => c.path);
|
|
322
|
-
// Hard scope constraint: selector only considers pack files
|
|
323
|
-
// Merge with any user-provided --scope (intersection if both set)
|
|
324
|
-
if (packPaths.length > 0) {
|
|
325
|
-
if (effectiveScope && effectiveScope.length > 0) {
|
|
326
|
-
// User scope takes precedence — only include pack files within user scope
|
|
327
|
-
const intersected = packPaths.filter((p) => effectiveScope.some((s) => p.startsWith(s)));
|
|
328
|
-
effectiveScope = intersected.length > 0 ? intersected : effectiveScope;
|
|
329
|
-
}
|
|
330
|
-
else {
|
|
331
|
-
effectiveScope = packPaths;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
// Budget: tighten to pack token estimate (with headroom for stubs/excerpts)
|
|
335
|
-
if (pack.total_tokens > 0 && budgetTokens && pack.total_tokens < budgetTokens) {
|
|
336
|
-
effectiveBudgetTokens = Math.ceil(pack.total_tokens * 1.3);
|
|
337
|
-
}
|
|
338
|
-
// File count: pack size + allowance for test pairs and stubs
|
|
339
|
-
const packFileCount = pack.candidates.length;
|
|
340
|
-
if (packFileCount > 0 && maxFiles && packFileCount + 4 < maxFiles) {
|
|
341
|
-
effectiveMaxFiles = packFileCount + 4;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
log(`Generating context bundle for: "${truncate(task, 80)}"`);
|
|
345
|
-
const includeNearMisses = flags['near-misses'] === 'true';
|
|
346
|
-
const includeBlastRadius = flags['blast-radius'] === 'true';
|
|
347
|
-
const layerOrder = flags['layer-order'] === 'true';
|
|
348
|
-
const explain = flags['explain'] === 'true';
|
|
349
|
-
let bundle = await buildBundleViaEngine({
|
|
350
|
-
taskText: task,
|
|
351
|
-
repoIndex,
|
|
352
|
-
selectorConfig: config.selector,
|
|
353
|
-
budget: { tokens: effectiveBudgetTokens, max_files: effectiveMaxFiles },
|
|
354
|
-
explain,
|
|
355
|
-
indexPath: indexPath,
|
|
356
|
-
scope: effectiveScope,
|
|
357
|
-
branchChangedFiles,
|
|
358
|
-
includeNearMisses,
|
|
359
|
-
includeBlastRadius,
|
|
360
|
-
layerOrder,
|
|
361
|
-
});
|
|
362
|
-
const strictMode = flags['strict'] === 'true';
|
|
363
|
-
const lowConfidenceThreshold = 0.45;
|
|
364
|
-
const currentScore = bundle.confidence?.score ?? 0;
|
|
365
|
-
const insufficientContext = bundle.files.length === 0 || currentScore < lowConfidenceThreshold;
|
|
366
|
-
if (insufficientContext) {
|
|
367
|
-
if (strictMode) {
|
|
368
|
-
console.error('INSUFFICIENT_CONTEXT: bundle is empty or low-confidence; strict mode enabled.');
|
|
369
|
-
process.exit(1);
|
|
370
|
-
}
|
|
371
|
-
log('⚠️ Low context confidence detected');
|
|
372
|
-
log('Auto-expanding search scope...');
|
|
373
|
-
const previousCount = bundle.files.length;
|
|
374
|
-
const previousScore = currentScore;
|
|
375
|
-
const baseTokens = effectiveBudgetTokens ?? defaultTokens ?? 8000;
|
|
376
|
-
const baseMaxFiles = effectiveMaxFiles ?? defaultMaxFiles ?? 25;
|
|
377
|
-
bundle = await buildBundleViaEngine({
|
|
378
|
-
taskText: task,
|
|
379
|
-
repoIndex,
|
|
380
|
-
selectorConfig: config.selector,
|
|
381
|
-
budget: {
|
|
382
|
-
tokens: Math.max(baseTokens, Math.ceil(baseTokens * 1.8)),
|
|
383
|
-
max_files: Math.min(Math.max(baseMaxFiles + 6, 12), 50),
|
|
384
|
-
},
|
|
385
|
-
explain,
|
|
386
|
-
indexPath: indexPath,
|
|
387
|
-
scope: undefined,
|
|
388
|
-
branchChangedFiles,
|
|
389
|
-
includeNearMisses: true,
|
|
390
|
-
includeBlastRadius: true,
|
|
391
|
-
layerOrder,
|
|
392
|
-
});
|
|
393
|
-
const added = Math.max(0, bundle.files.length - previousCount);
|
|
394
|
-
log(`→ Added ${added} related files`);
|
|
395
|
-
log(`→ New confidence: ${(bundle.confidence?.score ?? previousScore).toFixed(2)}`);
|
|
396
|
-
}
|
|
397
|
-
// -- Step 2.2b: Pre-change intelligence (Graph+ECL capsule) ─────────────
|
|
398
|
-
// If the bundle has a clear primary target, generate a change capsule
|
|
399
|
-
// and surface risk + validation guidance alongside the bundle.
|
|
400
|
-
if (bundle.files.length > 0 && !quiet) {
|
|
401
|
-
try {
|
|
402
|
-
const topFile = bundle.files[0].path;
|
|
403
|
-
let commitSha = 'unknown';
|
|
404
|
-
try {
|
|
405
|
-
commitSha = execSync('git rev-parse HEAD 2>/dev/null', { cwd, encoding: 'utf-8' }).trim();
|
|
406
|
-
}
|
|
407
|
-
catch { /* ok */ }
|
|
408
|
-
const snapshot = buildSnapshot(repoIndex, commitSha);
|
|
409
|
-
const eclEntries = loadEntries(cwd);
|
|
410
|
-
const eclEvents = eclEntries.map((e) => ({
|
|
411
|
-
timestamp: e.timestamp,
|
|
412
|
-
files: e.files,
|
|
413
|
-
outcome: e.outcome,
|
|
414
|
-
failureVector: e.failureVector,
|
|
415
|
-
}));
|
|
416
|
-
const logicalEdges = deriveLogicalEdges(eclEvents);
|
|
417
|
-
const hotspots = buildFailureHotspots(eclEntries);
|
|
418
|
-
const hotspotMap = new Map(hotspots.map((h) => [h.file, h.failureCount]));
|
|
419
|
-
const capsule = buildChangeCapsule({
|
|
420
|
-
target: topFile,
|
|
421
|
-
task,
|
|
422
|
-
snapshot,
|
|
423
|
-
repoIndex,
|
|
424
|
-
logicalEdges,
|
|
425
|
-
eclEventCount: eclEvents.length,
|
|
426
|
-
failureHotspots: hotspotMap,
|
|
427
|
-
});
|
|
428
|
-
// Surface risk summary if non-trivial
|
|
429
|
-
if (capsule.change_risk.classification !== 'low' || capsule.failure_hotspots.length > 0) {
|
|
430
|
-
console.log(` Risk: ${capsule.change_risk.classification} (${(capsule.change_risk.overall * 100).toFixed(0)}%) | confidence: ${(capsule.overall_confidence * 100).toFixed(0)}% | action: ${capsule.recommended_action}`);
|
|
431
|
-
}
|
|
432
|
-
if (capsule.likely_tests.length > 0) {
|
|
433
|
-
console.log(` Validate: ${capsule.likely_tests.slice(0, 3).join(', ')}`);
|
|
434
|
-
}
|
|
435
|
-
if (capsule.failure_hotspots.length > 0) {
|
|
436
|
-
console.log(` Hotspots: ${capsule.failure_hotspots.slice(0, 2).map((h) => h.path).join(', ')}`);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
catch {
|
|
440
|
-
// Capsule generation must never break activation
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
// -- Step 2.3: Review mode — attach review metadata + write review config -----
|
|
444
|
-
const bundleMode = (flags['mode'] === 'review') ? 'review' : 'edit';
|
|
445
|
-
if (bundleMode === 'review') {
|
|
446
|
-
const reviewCandidates = generateReviewCandidates(task, repoIndex, repoIndex.dep_graph);
|
|
447
|
-
const { mustRead, shouldRead } = splitReviewCandidates(reviewCandidates);
|
|
448
|
-
const coverageThreshold = flags['coverage-threshold']
|
|
449
|
-
? parseFloat(flags['coverage-threshold'])
|
|
450
|
-
: config.selector.review?.default_coverage_threshold ?? 0.90;
|
|
451
|
-
const minDepthCoverage = config.selector.review?.min_depth_coverage ?? 0.50;
|
|
452
|
-
const shallowReadThreshold = config.selector.review?.shallow_read_threshold ?? 0.25;
|
|
453
|
-
bundle.review_mode = {
|
|
454
|
-
must_read_files: mustRead,
|
|
455
|
-
should_read_files: shouldRead,
|
|
456
|
-
coverage_threshold: coverageThreshold,
|
|
457
|
-
};
|
|
458
|
-
// Persist review config for gatekeeper and review-coverage commands
|
|
459
|
-
const reviewConfigPath = sessionReviewConfigPath(cwd, sessionId);
|
|
460
|
-
ensureDir(reviewConfigPath);
|
|
461
|
-
writeFileSync(reviewConfigPath, JSON.stringify({
|
|
462
|
-
must_read_files: mustRead,
|
|
463
|
-
should_read_files: shouldRead,
|
|
464
|
-
coverage_threshold: coverageThreshold,
|
|
465
|
-
min_depth_coverage: minDepthCoverage,
|
|
466
|
-
shallow_read_threshold: shallowReadThreshold,
|
|
467
|
-
bundle_id: bundle.bundle_id,
|
|
468
|
-
}, null, 2) + '\n');
|
|
469
|
-
log(`Review mode: ${mustRead.length} MUST_READ + ${shouldRead.length} SHOULD_READ files (threshold: ${(coverageThreshold * 100).toFixed(0)}%)`);
|
|
470
|
-
}
|
|
471
|
-
// -- Step 2.4: Auto-initialize intent contract --------------------------------
|
|
472
|
-
autoInitIntent(cwd, sessionId, task, scope);
|
|
473
|
-
// -- Step 2.5: Derive scope contract from bundle + dep graph ----------------
|
|
474
|
-
const bundlePaths = new Set(bundle.files.map((f) => f.path));
|
|
475
|
-
const neighborPaths = new Set();
|
|
476
|
-
for (const filePath of bundlePaths) {
|
|
477
|
-
const imports = repoIndex.dep_graph.imports[filePath] ?? [];
|
|
478
|
-
const dependents = repoIndex.dep_graph.dependents[filePath] ?? [];
|
|
479
|
-
for (const dep of [...imports, ...dependents]) {
|
|
480
|
-
if (!bundlePaths.has(dep)) {
|
|
481
|
-
neighborPaths.add(dep);
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
// repo_scan tasks expect repo-wide edits — disable scope drift enforcement
|
|
486
|
-
const scopeEnforcement = bundle.task_type === 'repo_scan' ? 'off' : 'warn';
|
|
487
|
-
bundle.scope_contract = {
|
|
488
|
-
bundle_files: [...bundlePaths],
|
|
489
|
-
neighbor_files: [...neighborPaths],
|
|
490
|
-
enforcement: scopeEnforcement,
|
|
491
|
-
};
|
|
492
|
-
// -- Step 2.6: Detect cross-session conflict zones -------------------------
|
|
493
|
-
if (sessionId) {
|
|
494
|
-
const activeSessions = getActiveSessions(cwd);
|
|
495
|
-
const zones = [];
|
|
496
|
-
for (const session of activeSessions) {
|
|
497
|
-
if (session.session_id === sessionId)
|
|
498
|
-
continue;
|
|
499
|
-
for (const file of session.bundle_files) {
|
|
500
|
-
if (bundlePaths.has(file)) {
|
|
501
|
-
zones.push({
|
|
502
|
-
file,
|
|
503
|
-
other_session: session.session_id,
|
|
504
|
-
other_task: session.task,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
if (zones.length > 0) {
|
|
510
|
-
bundle.conflict_zones = zones;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
// -- Step 2.7: Attach intent drift metadata to bundle ----------------------
|
|
514
|
-
const intentData = evaluateDrift(cwd, sessionId);
|
|
515
|
-
if (intentData) {
|
|
516
|
-
bundle.bundle_intent_hash = intentData.currentHash;
|
|
517
|
-
bundle.baseline_intent_hash = intentData.baselineHash;
|
|
518
|
-
bundle.intent_drift_level = intentData.drift.drift_level;
|
|
519
|
-
}
|
|
520
|
-
// -- Step 3: Write active-bundle.md ----------------------------------------
|
|
521
|
-
const prefillTask = config.suggestions?.prefill_task === true;
|
|
522
|
-
const bundleMd = renderBundleMarkdown(bundle, { prefillTask });
|
|
523
|
-
// Write to session-specific path
|
|
524
|
-
const bundlePath = sessionBundlePath(cwd, sessionId);
|
|
525
|
-
ensureDir(bundlePath);
|
|
526
|
-
writeFileSync(bundlePath, bundleMd);
|
|
527
|
-
// Also update the legacy fallback for non-session-aware agents
|
|
528
|
-
if (sessionId) {
|
|
529
|
-
const fallback = legacyBundlePath(cwd);
|
|
530
|
-
ensureDir(fallback);
|
|
531
|
-
writeFileSync(fallback, bundleMd);
|
|
532
|
-
}
|
|
533
|
-
// Also save the JSON artifact
|
|
534
|
-
const bundleDir = join(cwd, config.workspace.artifacts_dir, 'bundles');
|
|
535
|
-
if (!existsSync(bundleDir)) {
|
|
536
|
-
mkdirSync(bundleDir, { recursive: true });
|
|
537
|
-
}
|
|
538
|
-
writeFileSync(join(bundleDir, `${bundle.bundle_id}.json`), JSON.stringify(bundle, null, 2) + '\n');
|
|
539
|
-
// -- Step 3.3: Append memory preamble if ledgers exist ---------------------
|
|
540
|
-
// If .codeledger/memory/ has been initialized, inject a preamble section
|
|
541
|
-
// into active-bundle.md so agents see recent truth, safe zones, terminology,
|
|
542
|
-
// and evidence rules alongside the file selection.
|
|
543
|
-
if (memoryExists(cwd)) {
|
|
544
|
-
try {
|
|
545
|
-
const memory = loadMemory(cwd);
|
|
546
|
-
// Extract task terms for ontology expansion (simple word split)
|
|
547
|
-
const termHints = task
|
|
548
|
-
? task.toLowerCase().replace(/[^a-z0-9 ]/g, ' ').split(/\s+/).filter((w) => w.length > 3)
|
|
549
|
-
: [];
|
|
550
|
-
const preamble = generateContextPreamble(memory, {
|
|
551
|
-
task,
|
|
552
|
-
termHints,
|
|
553
|
-
includeEvidenceRules: true,
|
|
554
|
-
evidenceTiersToWarn: ['possible'],
|
|
555
|
-
});
|
|
556
|
-
if (preamble.trim()) {
|
|
557
|
-
const section = '\n\n---\n\n## Memory Context\n\n' + preamble + '\n';
|
|
558
|
-
appendFileSync(bundlePath, section);
|
|
559
|
-
if (sessionId) {
|
|
560
|
-
const fallback = legacyBundlePath(cwd);
|
|
561
|
-
if (existsSync(fallback))
|
|
562
|
-
appendFileSync(fallback, section);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
catch {
|
|
567
|
-
// Memory injection is non-fatal — never break activate
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
// -- Step 3.5: Record activation in task history (JSONL) -------------------
|
|
571
|
-
recordTaskActivation(cwd, sessionId, task, bundle);
|
|
572
|
-
// -- Step 3.5b: Record ECL event with graph linkage ────────────────────────
|
|
573
|
-
// Write an ECL entry tied to the current graph snapshot so that future
|
|
574
|
-
// logical dependency derivation can trace events to structural context.
|
|
575
|
-
try {
|
|
576
|
-
let snapshotId;
|
|
577
|
-
try {
|
|
578
|
-
const snapPath = join(cwd, '.codeledger', 'cache', 'graph-snapshot.json');
|
|
579
|
-
if (existsSync(snapPath)) {
|
|
580
|
-
const snapData = JSON.parse(readFileSync(snapPath, 'utf-8'));
|
|
581
|
-
snapshotId = snapData['snapshot_id'];
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
catch { /* no snapshot yet — ok */ }
|
|
585
|
-
const bundleFiles = bundle.files.map((f) => f.path);
|
|
586
|
-
const graphLinkage = snapshotId
|
|
587
|
-
? { snapshot_id: snapshotId, node_ids: bundleFiles.map((f) => `file:${f}`) }
|
|
588
|
-
: undefined;
|
|
589
|
-
const eclEntry = buildEntry(deriveIntentSignature(task).hash, bundleFiles, [], // symbols — populated by downstream execution
|
|
590
|
-
0, // expansionLevel — initial activation
|
|
591
|
-
'success', // outcome — activation itself succeeded
|
|
592
|
-
bundle.confidence?.score ?? 0.5, undefined, // failureVector
|
|
593
|
-
undefined, // intentCategory
|
|
594
|
-
graphLinkage);
|
|
595
|
-
recordExecution(cwd, eclEntry);
|
|
596
|
-
}
|
|
597
|
-
catch {
|
|
598
|
-
// ECL recording must never break activation
|
|
599
|
-
}
|
|
600
|
-
// -- Step 3.6: Reset drift tracking on fresh activation --------------------
|
|
601
|
-
// Remove out-of-bundle edit counter and hook-reminded marker so the agent
|
|
602
|
-
// gets a fresh nudge cycle on the new bundle
|
|
603
|
-
const sessionDir = sessionId
|
|
604
|
-
? join(cwd, '.codeledger', 'sessions', sessionId)
|
|
605
|
-
: join(cwd, '.codeledger');
|
|
606
|
-
for (const driftFile of ['.out-of-bundle-edits', '.hook-reminded', '.task-activated']) {
|
|
607
|
-
const driftPath = join(sessionDir, driftFile);
|
|
608
|
-
if (existsSync(driftPath)) {
|
|
609
|
-
try {
|
|
610
|
-
unlinkSync(driftPath);
|
|
611
|
-
}
|
|
612
|
-
catch { /* non-fatal */ }
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
// -- Step 3.7: Mark task as activated for hook guard -------------------------
|
|
616
|
-
// The PreToolUse hook checks for this marker to know a real task is active
|
|
617
|
-
const activatedMarker = join(sessionDir, '.task-activated');
|
|
618
|
-
try {
|
|
619
|
-
writeFileSync(activatedMarker, task + '\n');
|
|
620
|
-
}
|
|
621
|
-
catch { /* non-fatal */ }
|
|
622
|
-
// -- Step 3.8: Auto-run discovery gate for implementation tasks -------------
|
|
623
|
-
// If the task implies building something new, run discovery to detect overlap
|
|
624
|
-
// before the agent starts coding. Results are cached by task hash (TTL: 60min).
|
|
625
|
-
const forceDiscover = flags['force-discover'] === 'true';
|
|
626
|
-
if (isImplementationTask(task)) {
|
|
627
|
-
try {
|
|
628
|
-
const discoveryTtl = config.selector.discovery_ttl_seconds ?? 3600;
|
|
629
|
-
const cached = forceDiscover ? null : getCachedDiscovery(cwd, task, discoveryTtl);
|
|
630
|
-
if (cached) {
|
|
631
|
-
log(`Discovery: cached result (${cached.verdict}) — ${cached.overlap}`);
|
|
632
|
-
emitDiscoveryGuidance(cached, log);
|
|
633
|
-
}
|
|
634
|
-
else {
|
|
635
|
-
const discoveryResult = runDiscovery(cwd, task, repoIndex);
|
|
636
|
-
cacheDiscoveryResult(cwd, task, discoveryResult, discoveryTtl);
|
|
637
|
-
log(`Discovery: ${discoveryResult.verdict} — ${discoveryResult.overlap}`);
|
|
638
|
-
emitDiscoveryGuidance(discoveryResult, log);
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
catch {
|
|
642
|
-
// Non-fatal: discovery failure should never block activation
|
|
643
|
-
}
|
|
644
|
-
}
|
|
645
|
-
// -- Step 4: Auto-checkpoint (save incremental snapshot for resume) --------
|
|
646
|
-
createCheckpoint(cwd, sessionId, true);
|
|
647
|
-
// -- Update session registry with task and bundle files --------------------
|
|
648
|
-
if (sessionId) {
|
|
649
|
-
const bundleFiles = bundle.files.map((f) => f.path);
|
|
650
|
-
// Capture git HEAD as the activation baseline for staleness detection
|
|
651
|
-
let activationRef;
|
|
652
|
-
try {
|
|
653
|
-
activationRef = execSync('git rev-parse HEAD 2>/dev/null', {
|
|
654
|
-
cwd,
|
|
655
|
-
encoding: 'utf-8',
|
|
656
|
-
timeout: 5000,
|
|
657
|
-
}).trim() || undefined;
|
|
658
|
-
}
|
|
659
|
-
catch {
|
|
660
|
-
// Non-git or no commits — leave undefined
|
|
661
|
-
}
|
|
662
|
-
updateSession(cwd, sessionId, {
|
|
663
|
-
task,
|
|
664
|
-
last_active_at: new Date().toISOString(),
|
|
665
|
-
bundle_files: bundleFiles,
|
|
666
|
-
activation_ref: activationRef,
|
|
667
|
-
});
|
|
668
|
-
// -- Conflict detection: check for overlapping files with other sessions --
|
|
669
|
-
emitOverlapWarnings(cwd, sessionId, bundleFiles, log);
|
|
670
|
-
}
|
|
671
|
-
appendDecisionEvent(cwd, sessionId ?? 'default', commandId, task, `Mapped task to bundle ${bundle.bundle_id} with ${bundle.files.length} files`, 'VERIFIED', join(config.workspace.artifacts_dir, 'bundles', `${bundle.bundle_id}.json`));
|
|
672
|
-
// Show bundle summary line
|
|
673
|
-
const confidenceTag = bundle.confidence
|
|
674
|
-
? ` | Confidence: ${bundle.confidence.level.toUpperCase()}`
|
|
675
|
-
: '';
|
|
676
|
-
log(`Bundle: ${bundle.files.length} files, ~${bundle.total_tokens} tokens${confidenceTag}`);
|
|
677
|
-
// Show confidence details only when it needs attention
|
|
678
|
-
if (bundle.confidence && bundle.confidence.level === 'low') {
|
|
679
|
-
log(' Why LOW confidence:');
|
|
680
|
-
for (const reason of bundle.confidence.reasons) {
|
|
681
|
-
log(` - ${reason}`);
|
|
682
|
-
}
|
|
683
|
-
log(' Tip: Use a more specific task or try --expand for broader coverage');
|
|
684
|
-
}
|
|
685
|
-
// Show intent drift (if contract exists and non-trivial)
|
|
686
|
-
const driftResult = evaluateDrift(cwd, sessionId);
|
|
687
|
-
if (driftResult && driftResult.drift.drift_level !== 'NONE') {
|
|
688
|
-
const d = driftResult.drift;
|
|
689
|
-
log(` Intent drift: ${d.drift_level} (${d.drift_score.toFixed(3)})`);
|
|
690
|
-
if (d.drift_level === 'MAJOR' || d.drift_level === 'CRITICAL') {
|
|
691
|
-
log(' The task has changed significantly from the original objective.');
|
|
692
|
-
log(' Run: codeledger intent ack (to acknowledge the change)');
|
|
693
|
-
}
|
|
694
|
-
}
|
|
695
|
-
const displayPath = sessionId
|
|
696
|
-
? `.codeledger/sessions/${sessionId}/active-bundle.md`
|
|
697
|
-
: config.injection.file_drop_path;
|
|
698
|
-
log(`Written to ${displayPath}`);
|
|
699
|
-
if (!quiet) {
|
|
700
|
-
const fullFiles = bundle.files.filter((f) => !f.is_stub);
|
|
701
|
-
log('\n Top files:');
|
|
702
|
-
for (const f of fullFiles.slice(0, 5)) {
|
|
703
|
-
log(` ${f.score.toFixed(3)} ${f.path} [${f.reasons.join(', ')}]`);
|
|
704
|
-
}
|
|
705
|
-
if (fullFiles.length > 5) {
|
|
706
|
-
log(` ... and ${fullFiles.length - 5} more`);
|
|
707
|
-
}
|
|
708
|
-
const stubs = bundle.files.filter((f) => f.is_stub);
|
|
709
|
-
if (stubs.length > 0) {
|
|
710
|
-
log(` + ${stubs.length} interface stubs`);
|
|
711
|
-
}
|
|
712
|
-
if (sessionId) {
|
|
713
|
-
log(` Session: ${sessionId}`);
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
// -- Team nudge: detect multiple authors in git history ----------------------
|
|
717
|
-
// Only show once per session (writes a marker file)
|
|
718
|
-
const nudgeMarker = join(cwd, '.codeledger', '.team-nudge-shown');
|
|
719
|
-
if (!existsSync(nudgeMarker)) {
|
|
720
|
-
try {
|
|
721
|
-
const configObj = JSON.parse(readFileSync(join(cwd, '.codeledger', 'config.json'), 'utf-8'));
|
|
722
|
-
const currentMode = configObj.mode ?? 'individual';
|
|
723
|
-
if (currentMode === 'individual') {
|
|
724
|
-
const authorOutput = execSync('git log --format="%ae" --since="6 months ago" | sort -u | wc -l', {
|
|
725
|
-
cwd,
|
|
726
|
-
encoding: 'utf-8',
|
|
727
|
-
timeout: 10000,
|
|
728
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
729
|
-
});
|
|
730
|
-
const authorCount = parseInt(authorOutput.trim(), 10) || 0;
|
|
731
|
-
if (authorCount >= 2) {
|
|
732
|
-
log('');
|
|
733
|
-
log(` Detected ${authorCount} developers in git history.`);
|
|
734
|
-
log(' Enable shared context learning: codeledger enable team');
|
|
735
|
-
log(' Explore capabilities: codeledger features');
|
|
736
|
-
try {
|
|
737
|
-
writeFileSync(nudgeMarker, new Date().toISOString());
|
|
738
|
-
}
|
|
739
|
-
catch { /* non-fatal */ }
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
catch { /* non-fatal: never block activation */ }
|
|
744
|
-
}
|
|
745
|
-
// -- Post-execution summary: confidence-building, short ----------------------
|
|
746
|
-
const coachConfig = DEFAULT_PROMPT_COACH_CONFIG;
|
|
747
|
-
if (!quiet && coachConfig.enabled && coachConfig.show_post_summary) {
|
|
748
|
-
log(formatPostSummary(bundle));
|
|
749
|
-
}
|
|
750
|
-
if (!quiet) {
|
|
751
|
-
log('');
|
|
752
|
-
log(' \u26A1 Now');
|
|
753
|
-
log(' Selected minimal working context for this task');
|
|
754
|
-
log(' Reduced search space before execution');
|
|
755
|
-
// ISC advisory warning (F9: consistent enforcement)
|
|
756
|
-
if (coachResult && typeof coachResult === 'object' && 'isc' in coachResult && coachResult.isc?.decision === 'INSUFFICIENT') {
|
|
757
|
-
const isc = coachResult.isc;
|
|
758
|
-
log('');
|
|
759
|
-
log(` \u26A0\uFE0F Intent sufficiency: ${isc.decision} (score: ${isc.score.toFixed(3)})`);
|
|
760
|
-
log(' Context selection may be unreliable for vague tasks.');
|
|
761
|
-
log(' Tip: add specifics — file paths, function names, domain keywords.');
|
|
762
|
-
}
|
|
763
|
-
log('');
|
|
764
|
-
log(' \uD83D\uDC8E Next');
|
|
765
|
-
log(' Session will generate evidence about what works');
|
|
766
|
-
log(' Successful flows may become reusable patterns');
|
|
767
|
-
log('');
|
|
768
|
-
// 🧠 Repo memory influence
|
|
769
|
-
log(' \uD83E\uDDE0 Repo memory influence');
|
|
770
|
-
log(' Activation used current repo signals + prompt refinement');
|
|
771
|
-
log('');
|
|
772
|
-
log(' \uD83D\uDCC2 Working context');
|
|
773
|
-
log(` ${displayPath}`);
|
|
774
|
-
log(' .codeledger/patterns/');
|
|
775
|
-
maybeShowUpgradeNudge(cwd, log);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
// ── Conflict Detection ────────────────────────────────────────────────────
|
|
779
|
-
function emitOverlapWarnings(cwd, sessionId, bundleFiles, log) {
|
|
780
|
-
const overlaps = findOverlappingFiles(cwd, sessionId, bundleFiles);
|
|
781
|
-
if (overlaps.size === 0)
|
|
782
|
-
return;
|
|
783
|
-
for (const [otherSessionId, files] of overlaps) {
|
|
784
|
-
const severity = files.length >= 4 ? '\u{1F534}' : '\u{1F7E1}';
|
|
785
|
-
log('');
|
|
786
|
-
log(`${severity} Session ${otherSessionId} has ${files.length} overlapping file${files.length === 1 ? '' : 's'}:`);
|
|
787
|
-
for (const f of files.slice(0, 5)) {
|
|
788
|
-
log(` ${f}`);
|
|
789
|
-
}
|
|
790
|
-
if (files.length > 5) {
|
|
791
|
-
log(` ... and ${files.length - 5} more`);
|
|
792
|
-
}
|
|
793
|
-
if (files.length >= 4) {
|
|
794
|
-
log(' Concurrent edits to these files may cause conflicts.');
|
|
795
|
-
log(' Action: run "codeledger checkpoint create" before editing contested files.');
|
|
796
|
-
log(' Action: run "codeledger shared-summary" to see all active sessions.');
|
|
797
|
-
}
|
|
798
|
-
else {
|
|
799
|
-
log(' Tip: coordinate with the other session or run "codeledger shared-summary" for details.');
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
// ── Helpers ─────────────────────────────────────────────────────────────────
|
|
804
|
-
function ensureDir(filePath) {
|
|
805
|
-
const dir = dirname(filePath);
|
|
806
|
-
if (!existsSync(dir))
|
|
807
|
-
mkdirSync(dir, { recursive: true });
|
|
808
|
-
}
|
|
809
|
-
function isIndexStale(indexPath, maxAgeSec) {
|
|
810
|
-
if (!existsSync(indexPath))
|
|
811
|
-
return true;
|
|
812
|
-
try {
|
|
813
|
-
const stat = statSync(indexPath);
|
|
814
|
-
const ageMs = Date.now() - stat.mtimeMs;
|
|
815
|
-
return ageMs > maxAgeSec * 1000;
|
|
816
|
-
}
|
|
817
|
-
catch {
|
|
818
|
-
return true;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
function parsePositiveInt(value, flagName) {
|
|
822
|
-
const n = parseInt(value, 10);
|
|
823
|
-
if (Number.isNaN(n) || n <= 0) {
|
|
824
|
-
console.error(`Invalid value for --${flagName}: "${value}" (expected a positive integer)`);
|
|
825
|
-
process.exit(1);
|
|
826
|
-
}
|
|
827
|
-
return n;
|
|
828
|
-
}
|
|
829
|
-
function truncate(s, max) {
|
|
830
|
-
return s.length <= max ? s : s.slice(0, max - 3) + '...';
|
|
831
|
-
}
|
|
832
|
-
/**
|
|
833
|
-
* Save the current HEAD sha for session-progress (full session view).
|
|
834
|
-
* Only writes once per session (first activate call).
|
|
835
|
-
*/
|
|
836
|
-
function saveSessionStartRef(cwd, sessionId) {
|
|
837
|
-
const refPath = sessionStartRef(cwd, sessionId);
|
|
838
|
-
if (existsSync(refPath))
|
|
839
|
-
return; // already saved this session
|
|
840
|
-
try {
|
|
841
|
-
const head = execSync('git rev-parse HEAD', {
|
|
842
|
-
cwd,
|
|
843
|
-
encoding: 'utf-8',
|
|
844
|
-
timeout: 5000,
|
|
845
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
846
|
-
}).trim();
|
|
847
|
-
ensureDir(refPath);
|
|
848
|
-
writeFileSync(refPath, head + '\n');
|
|
849
|
-
}
|
|
850
|
-
catch {
|
|
851
|
-
// Non-fatal: fresh repo with no commits, or not a git repo
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
/**
|
|
855
|
-
* If a previous task's `.activate-ref` exists, print a mini-recap before
|
|
856
|
-
* overwriting it. This ensures no task's metrics are silently lost when the
|
|
857
|
-
* developer moves to a new task without manually calling session-summary.
|
|
858
|
-
*/
|
|
859
|
-
function emitPreviousTaskRecap(cwd, config, sessionId, log) {
|
|
860
|
-
const activateRefPath = sessionActivateRef(cwd, sessionId);
|
|
861
|
-
if (!existsSync(activateRefPath))
|
|
862
|
-
return;
|
|
863
|
-
const startRef = readFileSync(activateRefPath, 'utf-8').trim();
|
|
864
|
-
if (!startRef)
|
|
865
|
-
return;
|
|
866
|
-
// Load the latest bundle to get previous task info
|
|
867
|
-
const bundleDir = join(cwd, config.workspace.artifacts_dir, 'bundles');
|
|
868
|
-
if (!existsSync(bundleDir))
|
|
869
|
-
return;
|
|
870
|
-
const bundleFiles = readdirSync(bundleDir)
|
|
871
|
-
.filter((f) => f.endsWith('.json'))
|
|
872
|
-
.map((f) => ({ name: f, mtime: statSync(join(bundleDir, f)).mtimeMs }))
|
|
873
|
-
.sort((a, b) => b.mtime - a.mtime);
|
|
874
|
-
if (bundleFiles.length === 0)
|
|
875
|
-
return;
|
|
876
|
-
let bundle;
|
|
877
|
-
try {
|
|
878
|
-
bundle = JSON.parse(readFileSync(join(bundleDir, bundleFiles[0].name), 'utf-8'));
|
|
879
|
-
}
|
|
880
|
-
catch {
|
|
881
|
-
return;
|
|
882
|
-
}
|
|
883
|
-
// Get files changed since previous activate-ref
|
|
884
|
-
let changedFiles;
|
|
885
|
-
try {
|
|
886
|
-
const diff = execSync(`git diff --name-only ${startRef}..HEAD`, {
|
|
887
|
-
cwd,
|
|
888
|
-
encoding: 'utf-8',
|
|
889
|
-
timeout: 5000,
|
|
890
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
891
|
-
}).trim();
|
|
892
|
-
changedFiles = diff ? diff.split('\n') : [];
|
|
893
|
-
}
|
|
894
|
-
catch {
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
if (changedFiles.length === 0)
|
|
898
|
-
return;
|
|
899
|
-
const paths = bundle.files.map((f) => f.path);
|
|
900
|
-
const overlap = changedFiles.filter((f) => paths.includes(f));
|
|
901
|
-
const recall = changedFiles.length > 0 ? overlap.length / changedFiles.length : 0;
|
|
902
|
-
const recallPct = Math.round(recall * 100);
|
|
903
|
-
log('');
|
|
904
|
-
log('-- Previous task recap ----------------------------------------');
|
|
905
|
-
log(` Task: "${truncate(bundle.task, 60)}"`);
|
|
906
|
-
log(` Bundle predicted ${overlap.length}/${changedFiles.length} files changed (${recallPct}% recall)`);
|
|
907
|
-
log('-'.repeat(61));
|
|
908
|
-
log('');
|
|
909
|
-
}
|
|
910
|
-
/**
|
|
911
|
-
* Detect files changed on the current branch vs the default branch.
|
|
912
|
-
* Returns a set of relative file paths, or undefined if detection fails.
|
|
913
|
-
*/
|
|
914
|
-
function detectBranchChangedFiles(cwd) {
|
|
915
|
-
const files = new Set();
|
|
916
|
-
try {
|
|
917
|
-
// Dynamically detect the default branch (origin/HEAD → main/master fallback)
|
|
918
|
-
let baseBranch = 'main';
|
|
919
|
-
try {
|
|
920
|
-
const originHead = execSync('git symbolic-ref --quiet --short refs/remotes/origin/HEAD', {
|
|
921
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
922
|
-
}).trim();
|
|
923
|
-
if (originHead)
|
|
924
|
-
baseBranch = originHead.replace(/^origin\//, '');
|
|
925
|
-
}
|
|
926
|
-
catch {
|
|
927
|
-
// No remote HEAD — fall back to checking local refs
|
|
928
|
-
try {
|
|
929
|
-
execSync('git rev-parse --verify main', {
|
|
930
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
931
|
-
});
|
|
932
|
-
}
|
|
933
|
-
catch {
|
|
934
|
-
baseBranch = 'master';
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
// Committed changes on branch
|
|
938
|
-
try {
|
|
939
|
-
const committed = execSync(`git diff --name-only ${baseBranch}...HEAD`, {
|
|
940
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
941
|
-
}).trim();
|
|
942
|
-
if (committed)
|
|
943
|
-
for (const f of committed.split('\n'))
|
|
944
|
-
files.add(f);
|
|
945
|
-
}
|
|
946
|
-
catch {
|
|
947
|
-
// May fail if no common ancestor — try simple diff
|
|
948
|
-
try {
|
|
949
|
-
const diff = execSync(`git diff --name-only ${baseBranch}..HEAD`, {
|
|
950
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
951
|
-
}).trim();
|
|
952
|
-
if (diff)
|
|
953
|
-
for (const f of diff.split('\n'))
|
|
954
|
-
files.add(f);
|
|
955
|
-
}
|
|
956
|
-
catch {
|
|
957
|
-
// Non-fatal
|
|
958
|
-
}
|
|
959
|
-
}
|
|
960
|
-
// Uncommitted changes
|
|
961
|
-
try {
|
|
962
|
-
const diff = execSync('git diff --name-only HEAD', {
|
|
963
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
964
|
-
}).trim();
|
|
965
|
-
if (diff)
|
|
966
|
-
for (const f of diff.split('\n'))
|
|
967
|
-
files.add(f);
|
|
968
|
-
}
|
|
969
|
-
catch {
|
|
970
|
-
// Non-fatal
|
|
971
|
-
}
|
|
972
|
-
// Untracked files
|
|
973
|
-
try {
|
|
974
|
-
const untracked = execSync('git ls-files --others --exclude-standard', {
|
|
975
|
-
cwd, encoding: 'utf-8', timeout: 5000, stdio: ['pipe', 'pipe', 'pipe'],
|
|
976
|
-
}).trim();
|
|
977
|
-
if (untracked)
|
|
978
|
-
for (const f of untracked.split('\n'))
|
|
979
|
-
files.add(f);
|
|
980
|
-
}
|
|
981
|
-
catch {
|
|
982
|
-
// Non-fatal
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
catch {
|
|
986
|
-
// Non-fatal: not a git repo, or other issue
|
|
987
|
-
}
|
|
988
|
-
return files;
|
|
989
|
-
}
|
|
990
|
-
function saveActivateRef(cwd, sessionId) {
|
|
991
|
-
const refPath = sessionActivateRef(cwd, sessionId);
|
|
992
|
-
try {
|
|
993
|
-
const head = execSync('git rev-parse HEAD', {
|
|
994
|
-
cwd,
|
|
995
|
-
encoding: 'utf-8',
|
|
996
|
-
timeout: 5000,
|
|
997
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
998
|
-
}).trim();
|
|
999
|
-
ensureDir(refPath);
|
|
1000
|
-
writeFileSync(refPath, head + '\n');
|
|
1001
|
-
}
|
|
1002
|
-
catch {
|
|
1003
|
-
// Non-fatal: fresh repo with no commits, or not a git repo
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
/**
|
|
1007
|
-
* Append one activation record to `.task-history.jsonl` so session-summary
|
|
1008
|
-
* can report per-task recall/precision at session end.
|
|
1009
|
-
*/
|
|
1010
|
-
// ── Discovery Integration ─────────────────────────────────────────────────
|
|
1011
|
-
/** Implementation-implying keywords. If the task contains any of these, discovery runs. */
|
|
1012
|
-
const IMPLEMENTATION_KEYWORDS = [
|
|
1013
|
-
'build', 'implement', 'add', 'create', 'new', 'introduce', 'develop',
|
|
1014
|
-
'write', 'design', 'scaffold', 'generate', 'setup', 'construct',
|
|
1015
|
-
];
|
|
1016
|
-
function isImplementationTask(task) {
|
|
1017
|
-
const lower = task.toLowerCase();
|
|
1018
|
-
return IMPLEMENTATION_KEYWORDS.some((kw) => lower.includes(kw));
|
|
1019
|
-
}
|
|
1020
|
-
/**
|
|
1021
|
-
* Emit discovery guidance to stdout when discovery finds overlap.
|
|
1022
|
-
* This is injected into the agent's context via the hook.
|
|
1023
|
-
*/
|
|
1024
|
-
function emitDiscoveryGuidance(result, log) {
|
|
1025
|
-
if (result.verdict === 'NO_GO_ALREADY_EXISTS') {
|
|
1026
|
-
log('');
|
|
1027
|
-
log(' DISCOVERY GATE: NO_GO — capability already exists');
|
|
1028
|
-
if (result.source_of_truth) {
|
|
1029
|
-
log(` Source of Truth: ${result.source_of_truth.system} (${result.source_of_truth.path})`);
|
|
1030
|
-
}
|
|
1031
|
-
log(` Risk: ${result.duplication_risk}`);
|
|
1032
|
-
log(' Action: Use or wrap the existing system. Do NOT build a parallel implementation.');
|
|
1033
|
-
log('');
|
|
1034
|
-
}
|
|
1035
|
-
else if (result.verdict === 'GO_EXTENSION_ONLY') {
|
|
1036
|
-
log('');
|
|
1037
|
-
log(' DISCOVERY GATE: EXTEND — strong overlap detected');
|
|
1038
|
-
if (result.source_of_truth) {
|
|
1039
|
-
log(` Source of Truth: ${result.source_of_truth.system} (${result.source_of_truth.path})`);
|
|
1040
|
-
}
|
|
1041
|
-
if (result.gap_analysis) {
|
|
1042
|
-
log(` Coverage: ${(result.gap_analysis.coverage_estimate * 100).toFixed(0)}%`);
|
|
1043
|
-
}
|
|
1044
|
-
if (result.insertion_points.length > 0) {
|
|
1045
|
-
log(` Insertion points: ${result.insertion_points.slice(0, 3).join(', ')}`);
|
|
1046
|
-
}
|
|
1047
|
-
if (result.must_reuse.length > 0) {
|
|
1048
|
-
log(` Must reuse: ${result.must_reuse.slice(0, 3).join(', ')}`);
|
|
1049
|
-
}
|
|
1050
|
-
if (result.prohibited_files.length > 0) {
|
|
1051
|
-
log(` Prohibited: ${result.prohibited_files.slice(0, 3).join(', ')}`);
|
|
1052
|
-
}
|
|
1053
|
-
log('');
|
|
1054
|
-
}
|
|
1055
|
-
// GO_GENUINELY_NEW — no guidance needed, proceed normally
|
|
1056
|
-
}
|
|
1057
|
-
// Coach telemetry is now handled by the engine-level prompt coach (completeRefinement).
|
|
1058
|
-
// ── Task History ──────────────────────────────────────────────────────────
|
|
1059
|
-
function recordTaskActivation(cwd, sessionId, task, bundle) {
|
|
1060
|
-
try {
|
|
1061
|
-
const head = execSync('git rev-parse HEAD', {
|
|
1062
|
-
cwd,
|
|
1063
|
-
encoding: 'utf-8',
|
|
1064
|
-
timeout: 5000,
|
|
1065
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
1066
|
-
}).trim();
|
|
1067
|
-
const record = {
|
|
1068
|
-
task,
|
|
1069
|
-
bundle_id: bundle.bundle_id,
|
|
1070
|
-
bundle_files: bundle.files.map((f) => f.path),
|
|
1071
|
-
bundle_tokens: bundle.total_tokens,
|
|
1072
|
-
activate_ref: head,
|
|
1073
|
-
activated_at: new Date().toISOString(),
|
|
1074
|
-
};
|
|
1075
|
-
const historyPath = sessionTaskHistoryPath(cwd, sessionId);
|
|
1076
|
-
ensureDir(historyPath);
|
|
1077
|
-
appendFileSync(historyPath, JSON.stringify(record) + '\n');
|
|
1078
|
-
}
|
|
1079
|
-
catch {
|
|
1080
|
-
// Non-fatal: task history is best-effort
|
|
1081
|
-
}
|
|
1082
|
-
}
|
|
1083
|
-
// ── Readline-based interactive selection ──────────────────────────────────
|
|
1084
|
-
/**
|
|
1085
|
-
* Prompt the user to select a refined task candidate via readline.
|
|
1086
|
-
* Returns the 0-based index, or -1 to keep the original task.
|
|
1087
|
-
*/
|
|
1088
|
-
function promptUserSelection(candidateCount) {
|
|
1089
|
-
const { createInterface } = require('node:readline');
|
|
1090
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
1091
|
-
return new Promise((resolve) => {
|
|
1092
|
-
const prompt = ` Select [1-${candidateCount}] or [k]eep original: `;
|
|
1093
|
-
rl.question(prompt, (answer) => {
|
|
1094
|
-
rl.close();
|
|
1095
|
-
const trimmed = answer.trim().toLowerCase();
|
|
1096
|
-
if (trimmed === 'k' || trimmed === 'keep') {
|
|
1097
|
-
resolve(-1);
|
|
1098
|
-
return;
|
|
1099
|
-
}
|
|
1100
|
-
const num = parseInt(trimmed, 10);
|
|
1101
|
-
if (!isNaN(num) && num >= 1 && num <= candidateCount) {
|
|
1102
|
-
resolve(num - 1);
|
|
1103
|
-
return;
|
|
1104
|
-
}
|
|
1105
|
-
// Invalid input → default to option 1
|
|
1106
|
-
resolve(0);
|
|
1107
|
-
});
|
|
1108
|
-
});
|
|
1109
|
-
}
|
|
1110
|
-
//# sourceMappingURL=activate.js.map
|