@isaacriehm/cairn-core 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.tsbuildinfo +1 -1
- package/dist/align-undo/undo.js +2 -2
- package/dist/align-undo/undo.js.map +1 -1
- package/dist/attention/bulk-accept.js +48 -40
- package/dist/attention/bulk-accept.js.map +1 -1
- package/dist/attention/dedup.js +23 -10
- package/dist/attention/dedup.js.map +1 -1
- package/dist/attention/restore.js +2 -2
- package/dist/attention/restore.js.map +1 -1
- package/dist/attention/scoring.js +1 -1
- package/dist/attention/scoring.js.map +1 -1
- package/dist/attention/serve/api.d.ts +1 -0
- package/dist/attention/serve/api.js +127 -80
- package/dist/attention/serve/api.js.map +1 -1
- package/dist/attention/serve/index.d.ts +1 -0
- package/dist/attention/serve/index.js +21 -7
- package/dist/attention/serve/index.js.map +1 -1
- package/dist/attention/source-strip.js +41 -46
- package/dist/attention/source-strip.js.map +1 -1
- package/dist/claude/cache.d.ts +10 -19
- package/dist/claude/cache.js +0 -0
- package/dist/claude/cache.js.map +1 -1
- package/dist/claude/runner.d.ts +4 -6
- package/dist/claude/runner.js +242 -203
- package/dist/claude/runner.js.map +1 -1
- package/dist/claude/types.d.ts +5 -5
- package/dist/context/handoff-builder.d.ts +28 -4
- package/dist/context/handoff-builder.js +75 -157
- package/dist/context/handoff-builder.js.map +1 -1
- package/dist/context/spec-delta.js +61 -9
- package/dist/context/spec-delta.js.map +1 -1
- package/dist/context/task-summary.js +5 -1
- package/dist/context/task-summary.js.map +1 -1
- package/dist/decision-capture/id.js +1 -1
- package/dist/decision-capture/id.js.map +1 -1
- package/dist/doctor/index.d.ts +9 -11
- package/dist/doctor/index.js +118 -175
- package/dist/doctor/index.js.map +1 -1
- package/dist/drain/drain.d.ts +1 -1
- package/dist/drain/drain.js +16 -16
- package/dist/drain/drain.js.map +1 -1
- package/dist/drain/index.d.ts +1 -1
- package/dist/drain/index.js +1 -1
- package/dist/events/reader.d.ts +9 -10
- package/dist/events/reader.js +46 -57
- package/dist/events/reader.js.map +1 -1
- package/dist/events/writer.js +1 -1
- package/dist/events/writer.js.map +1 -1
- package/dist/fix-align/index.d.ts +1 -1
- package/dist/fix-align/index.js +1 -1
- package/dist/fix-align/run.d.ts +1 -1
- package/dist/fix-align/run.js +4 -3
- package/dist/fix-align/run.js.map +1 -1
- package/dist/fix-align/sentinel.d.ts +1 -2
- package/dist/fix-align/sentinel.js +3 -4
- package/dist/fix-align/sentinel.js.map +1 -1
- package/dist/gc/apply.js +1 -1
- package/dist/gc/apply.js.map +1 -1
- package/dist/gc/attested-commits.d.ts +19 -0
- package/dist/gc/attested-commits.js +48 -0
- package/dist/gc/attested-commits.js.map +1 -0
- package/dist/gc/canary.d.ts +11 -21
- package/dist/gc/canary.js +18 -24
- package/dist/gc/canary.js.map +1 -1
- package/dist/gc/citation-integrity.d.ts +11 -14
- package/dist/gc/citation-integrity.js +124 -125
- package/dist/gc/citation-integrity.js.map +1 -1
- package/dist/gc/classify.d.ts +1 -1
- package/dist/gc/classify.js +2 -2
- package/dist/gc/classify.js.map +1 -1
- package/dist/gc/completion-integrity.d.ts +6 -7
- package/dist/gc/completion-integrity.js +45 -53
- package/dist/gc/completion-integrity.js.map +1 -1
- package/dist/gc/doc-gardening.js +1 -9
- package/dist/gc/doc-gardening.js.map +1 -1
- package/dist/gc/frontmatter.js +2 -2
- package/dist/gc/frontmatter.js.map +1 -1
- package/dist/gc/index.d.ts +7 -6
- package/dist/gc/index.js +3 -2
- package/dist/gc/index.js.map +1 -1
- package/dist/gc/quality-update.d.ts +6 -10
- package/dist/gc/quality-update.js +12 -15
- package/dist/gc/quality-update.js.map +1 -1
- package/dist/gc/scope-coverage.js +1 -1
- package/dist/gc/scope-coverage.js.map +1 -1
- package/dist/gc/stub-hits.d.ts +7 -25
- package/dist/gc/stub-hits.js +14 -40
- package/dist/gc/stub-hits.js.map +1 -1
- package/dist/gc/sweep.js +15 -6
- package/dist/gc/sweep.js.map +1 -1
- package/dist/gc/types.d.ts +5 -5
- package/dist/gc/types.js +2 -2
- package/dist/gc/walk-source.js +8 -28
- package/dist/gc/walk-source.js.map +1 -1
- package/dist/hooks/defer.d.ts +9 -20
- package/dist/hooks/defer.js +10 -27
- package/dist/hooks/defer.js.map +1 -1
- package/dist/hooks/post-tool-use/allowlist-reader.d.ts +2 -1
- package/dist/hooks/post-tool-use/allowlist-reader.js +49 -34
- package/dist/hooks/post-tool-use/allowlist-reader.js.map +1 -1
- package/dist/hooks/post-tool-use/index.d.ts +3 -4
- package/dist/hooks/post-tool-use/index.js +3 -3
- package/dist/hooks/post-tool-use/index.js.map +1 -1
- package/dist/hooks/post-tool-use/legend-builder.d.ts +2 -2
- package/dist/hooks/post-tool-use/legend-builder.js +2 -2
- package/dist/hooks/post-tool-use/legend-builder.js.map +1 -1
- package/dist/hooks/post-tool-use/post-write.d.ts +8 -0
- package/dist/hooks/post-tool-use/post-write.js +112 -0
- package/dist/hooks/post-tool-use/post-write.js.map +1 -0
- package/dist/hooks/post-tool-use/read-enricher.d.ts +10 -5
- package/dist/hooks/post-tool-use/read-enricher.js +114 -155
- package/dist/hooks/post-tool-use/read-enricher.js.map +1 -1
- package/dist/hooks/post-tool-use/sot-align.d.ts +12 -0
- package/dist/hooks/post-tool-use/sot-align.js +73 -49
- package/dist/hooks/post-tool-use/sot-align.js.map +1 -1
- package/dist/hooks/post-tool-use/write-guardian.d.ts +40 -8
- package/dist/hooks/post-tool-use/write-guardian.js +202 -254
- package/dist/hooks/post-tool-use/write-guardian.js.map +1 -1
- package/dist/hooks/pre-commit/sot-align-precommit.js +2 -2
- package/dist/hooks/pre-commit/sot-align-precommit.js.map +1 -1
- package/dist/hooks/runners/index.d.ts +2 -2
- package/dist/hooks/runners/index.js +1 -1
- package/dist/hooks/runners/index.js.map +1 -1
- package/dist/hooks/runners/payload.d.ts +34 -19
- package/dist/hooks/runners/payload.js +47 -44
- package/dist/hooks/runners/payload.js.map +1 -1
- package/dist/hooks/runners/session-end.js +12 -11
- package/dist/hooks/runners/session-end.js.map +1 -1
- package/dist/hooks/runners/session-start.d.ts +4 -2
- package/dist/hooks/runners/session-start.js +88 -261
- package/dist/hooks/runners/session-start.js.map +1 -1
- package/dist/hooks/runners/stop.js +27 -8
- package/dist/hooks/runners/stop.js.map +1 -1
- package/dist/hooks/runners/user-prompt-submit.js +7 -1
- package/dist/hooks/runners/user-prompt-submit.js.map +1 -1
- package/dist/hooks/sot-align-common.d.ts +1 -2
- package/dist/hooks/sot-align-common.js +2 -2
- package/dist/hooks/sot-align-common.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/init/baseline-audit.d.ts +14 -58
- package/dist/init/baseline-audit.js +92 -320
- package/dist/init/baseline-audit.js.map +1 -1
- package/dist/init/brand-derive.d.ts +11 -15
- package/dist/init/brand-derive.js +21 -46
- package/dist/init/brand-derive.js.map +1 -1
- package/dist/init/brand-setup.d.ts +1 -1
- package/dist/init/brand-setup.js +1 -1
- package/dist/init/detect.d.ts +25 -6
- package/dist/init/detect.js +107 -136
- package/dist/init/detect.js.map +1 -1
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +1 -1
- package/dist/init/index.js.map +1 -1
- package/dist/init/ingest-docs.d.ts +2 -2
- package/dist/init/ingest-docs.js +31 -43
- package/dist/init/ingest-docs.js.map +1 -1
- package/dist/init/init.d.ts +21 -21
- package/dist/init/init.js +41 -61
- package/dist/init/init.js.map +1 -1
- package/dist/init/mapper-merge.js +1 -1
- package/dist/init/mapper-merge.js.map +1 -1
- package/dist/init/mapper-parallel.d.ts +1 -1
- package/dist/init/mapper-parallel.js +2 -1
- package/dist/init/mapper-parallel.js.map +1 -1
- package/dist/init/mapper.js +1 -1
- package/dist/init/mapper.js.map +1 -1
- package/dist/init/multi-dev/install.d.ts +5 -5
- package/dist/init/multi-dev/install.js +4 -4
- package/dist/init/overlay.js +1 -0
- package/dist/init/overlay.js.map +1 -1
- package/dist/init/phases/1-detect.js +1 -1
- package/dist/init/phases/1-detect.js.map +1 -1
- package/dist/init/phases/{7c-rules-merge.d.ts → 10-rules-merge.d.ts} +2 -2
- package/dist/init/phases/{7c-rules-merge.js → 10-rules-merge.js} +6 -12
- package/dist/init/phases/10-rules-merge.js.map +1 -0
- package/dist/init/phases/11-baseline.d.ts +7 -0
- package/dist/init/phases/{8-baseline.js → 11-baseline.js} +5 -9
- package/dist/init/phases/11-baseline.js.map +1 -0
- package/dist/init/phases/12-strip.d.ts +10 -0
- package/dist/init/phases/{10-strip.js → 12-strip.js} +10 -14
- package/dist/init/phases/12-strip.js.map +1 -0
- package/dist/init/phases/{12-multidev.d.ts → 13-multidev.d.ts} +2 -2
- package/dist/init/phases/{12-multidev.js → 13-multidev.js} +4 -4
- package/dist/init/phases/{12-multidev.js.map → 13-multidev.js.map} +1 -1
- package/dist/init/phases/3-mapper.d.ts +1 -1
- package/dist/init/phases/3-mapper.js +2 -2
- package/dist/init/phases/3-mapper.js.map +1 -1
- package/dist/init/phases/{3b-seed.d.ts → 4-seed.d.ts} +2 -2
- package/dist/init/phases/{3b-seed.js → 4-seed.js} +7 -7
- package/dist/init/phases/4-seed.js.map +1 -0
- package/dist/init/phases/{4-pilot.d.ts → 5-pilot.d.ts} +2 -2
- package/dist/init/phases/{4-pilot.js → 5-pilot.js} +9 -9
- package/dist/init/phases/{4-pilot.js.map → 5-pilot.js.map} +1 -1
- package/dist/init/phases/{5-brand.d.ts → 6-brand.d.ts} +2 -7
- package/dist/init/phases/{5-brand.js → 6-brand.js} +6 -14
- package/dist/init/phases/6-brand.js.map +1 -0
- package/dist/init/phases/{5b-topic-index.d.ts → 7-topic-index.d.ts} +2 -11
- package/dist/init/phases/{5b-topic-index.js → 7-topic-index.js} +9 -18
- package/dist/init/phases/7-topic-index.js.map +1 -0
- package/dist/init/phases/8-docs-ingest.d.ts +10 -0
- package/dist/init/phases/{6-docs-ingest.js → 8-docs-ingest.js} +6 -11
- package/dist/init/phases/8-docs-ingest.js.map +1 -0
- package/dist/init/phases/9-source-comments.d.ts +6 -0
- package/dist/init/phases/{7b-source-comments.js → 9-source-comments.js} +7 -26
- package/dist/init/phases/9-source-comments.js.map +1 -0
- package/dist/init/phases/index.d.ts +12 -12
- package/dist/init/phases/index.js +11 -11
- package/dist/init/phases/index.js.map +1 -1
- package/dist/init/phases/{parallel-678.d.ts → parallel-8910.d.ts} +7 -8
- package/dist/init/phases/{parallel-678.js → parallel-8910.js} +26 -44
- package/dist/init/phases/parallel-8910.js.map +1 -0
- package/dist/init/phases/source-comments-output-io.d.ts +3 -3
- package/dist/init/phases/source-comments-output-io.js +3 -3
- package/dist/init/phases/types.d.ts +1 -1
- package/dist/init/phases/types.js +10 -10
- package/dist/init/phases/types.js.map +1 -1
- package/dist/init/rules-merge/discover.d.ts +2 -2
- package/dist/init/rules-merge/discover.js +28 -43
- package/dist/init/rules-merge/discover.js.map +1 -1
- package/dist/init/rules-merge/ingest.d.ts +6 -6
- package/dist/init/rules-merge/ingest.js +9 -10
- package/dist/init/rules-merge/ingest.js.map +1 -1
- package/dist/init/rules-merge/keep-markers.d.ts +1 -1
- package/dist/init/rules-merge/keep-markers.js +1 -1
- package/dist/init/rules-merge/regenerate.d.ts +3 -3
- package/dist/init/rules-merge/regenerate.js +3 -3
- package/dist/init/seed.js +17 -24
- package/dist/init/seed.js.map +1 -1
- package/dist/init/sot-emit.d.ts +27 -9
- package/dist/init/sot-emit.js +39 -7
- package/dist/init/sot-emit.js.map +1 -1
- package/dist/init/source-comments/classify.d.ts +2 -2
- package/dist/init/source-comments/classify.js +9 -1
- package/dist/init/source-comments/classify.js.map +1 -1
- package/dist/init/source-comments/index.d.ts +1 -1
- package/dist/init/source-comments/index.js.map +1 -1
- package/dist/init/source-comments/ingest.d.ts +2 -2
- package/dist/init/source-comments/ingest.js +6 -8
- package/dist/init/source-comments/ingest.js.map +1 -1
- package/dist/init/source-comments/strip-replace.js +3 -2
- package/dist/init/source-comments/strip-replace.js.map +1 -1
- package/dist/init/source-comments/walker.d.ts +3 -26
- package/dist/init/source-comments/walker.js +18 -30
- package/dist/init/source-comments/walker.js.map +1 -1
- package/dist/init/topic-index/index.d.ts +1 -1
- package/dist/init/topic-index/index.js +3 -3
- package/dist/init/topic-index/index.js.map +1 -1
- package/dist/init/topic-index/judge.d.ts +5 -9
- package/dist/init/topic-index/judge.js +17 -22
- package/dist/init/topic-index/judge.js.map +1 -1
- package/dist/init/topic-index/resolve.d.ts +5 -4
- package/dist/init/topic-index/resolve.js +6 -6
- package/dist/init/topic-index/resolve.js.map +1 -1
- package/dist/init/topic-index/walk.d.ts +6 -6
- package/dist/init/topic-index/walk.js +9 -9
- package/dist/init/topic-index/walk.js.map +1 -1
- package/dist/join/index.js +5 -1
- package/dist/join/index.js.map +1 -1
- package/dist/lock.js +4 -1
- package/dist/lock.js.map +1 -1
- package/dist/logger.js +3 -0
- package/dist/logger.js.map +1 -1
- package/dist/mcp/history/summarizer.js +1 -1
- package/dist/mcp/history/summarizer.js.map +1 -1
- package/dist/mcp/history/walker.js +1 -1
- package/dist/mcp/history/walker.js.map +1 -1
- package/dist/mcp/path-allowlist.js +1 -1
- package/dist/mcp/path-allowlist.js.map +1 -1
- package/dist/mcp/schemas.d.ts +16 -38
- package/dist/mcp/schemas.js +8 -22
- package/dist/mcp/schemas.js.map +1 -1
- package/dist/mcp/server.js +10 -0
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/archive.js +1 -1
- package/dist/mcp/tools/archive.js.map +1 -1
- package/dist/mcp/tools/attention-wait.js +12 -2
- package/dist/mcp/tools/attention-wait.js.map +1 -1
- package/dist/mcp/tools/bulk-accept-attention.js +29 -30
- package/dist/mcp/tools/bulk-accept-attention.js.map +1 -1
- package/dist/mcp/tools/canonical-for-topic.js +37 -15
- package/dist/mcp/tools/canonical-for-topic.js.map +1 -1
- package/dist/mcp/tools/decision-get.js +2 -2
- package/dist/mcp/tools/decision-get.js.map +1 -1
- package/dist/mcp/tools/decisions-for-symbol.js +2 -2
- package/dist/mcp/tools/decisions-for-symbol.js.map +1 -1
- package/dist/mcp/tools/get-full.js +1 -1
- package/dist/mcp/tools/get-full.js.map +1 -1
- package/dist/mcp/tools/ground-get.js +1 -1
- package/dist/mcp/tools/ground-get.js.map +1 -1
- package/dist/mcp/tools/in-scope.d.ts +8 -0
- package/dist/mcp/tools/in-scope.js +125 -0
- package/dist/mcp/tools/in-scope.js.map +1 -0
- package/dist/mcp/tools/index.js +7 -12
- package/dist/mcp/tools/index.js.map +1 -1
- package/dist/mcp/tools/init-phases.d.ts +18 -10
- package/dist/mcp/tools/init-phases.js +139 -192
- package/dist/mcp/tools/init-phases.js.map +1 -1
- package/dist/mcp/tools/invariant-get.js +2 -2
- package/dist/mcp/tools/invariant-get.js.map +1 -1
- package/dist/mcp/tools/record-decision.d.ts +4 -3
- package/dist/mcp/tools/record-decision.js +111 -36
- package/dist/mcp/tools/record-decision.js.map +1 -1
- package/dist/mcp/tools/reject-candidate.d.ts +1 -1
- package/dist/mcp/tools/reject-candidate.js +3 -3
- package/dist/mcp/tools/reject-candidate.js.map +1 -1
- package/dist/mcp/tools/resolve-attention.d.ts +5 -18
- package/dist/mcp/tools/resolve-attention.js +58 -158
- package/dist/mcp/tools/resolve-attention.js.map +1 -1
- package/dist/mcp/tools/search-candidates.d.ts +1 -1
- package/dist/mcp/tools/search-candidates.js +4 -4
- package/dist/mcp/tools/search-candidates.js.map +1 -1
- package/dist/mcp/tools/search.js +5 -4
- package/dist/mcp/tools/search.js.map +1 -1
- package/dist/mcp/tools/supersedes-chain.js +2 -2
- package/dist/mcp/tools/supersedes-chain.js.map +1 -1
- package/dist/mcp/tools/task-create.d.ts +1 -0
- package/dist/mcp/tools/task-create.js +2 -0
- package/dist/mcp/tools/task-create.js.map +1 -1
- package/dist/mcp/tools/timeline.js +1 -1
- package/dist/mcp/tools/timeline.js.map +1 -1
- package/dist/mcp/tools/types.d.ts +1 -0
- package/dist/mcp/tools/types.js +9 -1
- package/dist/mcp/tools/types.js.map +1 -1
- package/dist/sensors/attestation.d.ts +1 -1
- package/dist/sensors/attestation.js +2 -2
- package/dist/sensors/attestation.js.map +1 -1
- package/dist/sensors/catalog.d.ts +26 -28
- package/dist/sensors/catalog.js +79 -81
- package/dist/sensors/catalog.js.map +1 -1
- package/dist/sensors/decisions.d.ts +1 -1
- package/dist/sensors/decisions.js +15 -14
- package/dist/sensors/decisions.js.map +1 -1
- package/dist/sensors/diff.js +46 -22
- package/dist/sensors/diff.js.map +1 -1
- package/dist/sensors/runner.d.ts +2 -2
- package/dist/sensors/runner.js +3 -3
- package/dist/sensors/shell.d.ts +4 -0
- package/dist/sensors/shell.js +16 -0
- package/dist/sensors/shell.js.map +1 -0
- package/dist/sensors/structural.d.ts +3 -2
- package/dist/sensors/structural.js +3 -11
- package/dist/sensors/structural.js.map +1 -1
- package/dist/sensors/stub-catalog.d.ts +2 -1
- package/dist/sensors/stub-catalog.js +2 -9
- package/dist/sensors/stub-catalog.js.map +1 -1
- package/dist/sensors/types.d.ts +3 -4
- package/dist/sensors/types.js +1 -2
- package/dist/sensors/types.js.map +1 -1
- package/dist/session-start/build.js +1 -1
- package/dist/session-start/build.js.map +1 -1
- package/dist/status-line/event-queue.js +1 -1
- package/dist/status-line/index.d.ts +1 -1
- package/package.json +3 -2
- package/templates/.cairn/config/sensors.yaml +8 -8
- package/templates/attention-ui/app.js +61 -36
- package/dist/fs.d.ts +0 -5
- package/dist/fs.js +0 -11
- package/dist/fs.js.map +0 -1
- package/dist/ground/alignment-pending.d.ts +0 -28
- package/dist/ground/alignment-pending.js +0 -83
- package/dist/ground/alignment-pending.js.map +0 -1
- package/dist/ground/anchor-map.d.ts +0 -14
- package/dist/ground/anchor-map.js +0 -56
- package/dist/ground/anchor-map.js.map +0 -1
- package/dist/ground/drift.d.ts +0 -8
- package/dist/ground/drift.js +0 -23
- package/dist/ground/drift.js.map +0 -1
- package/dist/ground/file-candidates-map.d.ts +0 -23
- package/dist/ground/file-candidates-map.js +0 -76
- package/dist/ground/file-candidates-map.js.map +0 -1
- package/dist/ground/frontmatter.d.ts +0 -32
- package/dist/ground/frontmatter.js +0 -77
- package/dist/ground/frontmatter.js.map +0 -1
- package/dist/ground/glob.d.ts +0 -10
- package/dist/ground/glob.js +0 -46
- package/dist/ground/glob.js.map +0 -1
- package/dist/ground/index.d.ts +0 -25
- package/dist/ground/index.js +0 -19
- package/dist/ground/index.js.map +0 -1
- package/dist/ground/ledgers.d.ts +0 -14
- package/dist/ground/ledgers.js +0 -105
- package/dist/ground/ledgers.js.map +0 -1
- package/dist/ground/manifest.d.ts +0 -10
- package/dist/ground/manifest.js +0 -84
- package/dist/ground/manifest.js.map +0 -1
- package/dist/ground/paths.d.ts +0 -43
- package/dist/ground/paths.js +0 -109
- package/dist/ground/paths.js.map +0 -1
- package/dist/ground/quality-grades.d.ts +0 -11
- package/dist/ground/quality-grades.js +0 -100
- package/dist/ground/quality-grades.js.map +0 -1
- package/dist/ground/rejected.d.ts +0 -42
- package/dist/ground/rejected.js +0 -100
- package/dist/ground/rejected.js.map +0 -1
- package/dist/ground/schemas.d.ts +0 -582
- package/dist/ground/schemas.js +0 -372
- package/dist/ground/schemas.js.map +0 -1
- package/dist/ground/scope-index.d.ts +0 -96
- package/dist/ground/scope-index.js +0 -290
- package/dist/ground/scope-index.js.map +0 -1
- package/dist/ground/slug.d.ts +0 -60
- package/dist/ground/slug.js +0 -103
- package/dist/ground/slug.js.map +0 -1
- package/dist/ground/sot-bindings.d.ts +0 -14
- package/dist/ground/sot-bindings.js +0 -79
- package/dist/ground/sot-bindings.js.map +0 -1
- package/dist/ground/sot-cache.d.ts +0 -18
- package/dist/ground/sot-cache.js +0 -62
- package/dist/ground/sot-cache.js.map +0 -1
- package/dist/ground/topic-index.d.ts +0 -27
- package/dist/ground/topic-index.js +0 -82
- package/dist/ground/topic-index.js.map +0 -1
- package/dist/ground/walk.d.ts +0 -7
- package/dist/ground/walk.js +0 -53
- package/dist/ground/walk.js.map +0 -1
- package/dist/hooks/post-tool-use/ledger-cache.d.ts +0 -53
- package/dist/hooks/post-tool-use/ledger-cache.js +0 -338
- package/dist/hooks/post-tool-use/ledger-cache.js.map +0 -1
- package/dist/init/phases/10-strip.d.ts +0 -11
- package/dist/init/phases/10-strip.js.map +0 -1
- package/dist/init/phases/3b-seed.js.map +0 -1
- package/dist/init/phases/5-brand.js.map +0 -1
- package/dist/init/phases/5b-topic-index.js.map +0 -1
- package/dist/init/phases/6-docs-ingest.d.ts +0 -15
- package/dist/init/phases/6-docs-ingest.js.map +0 -1
- package/dist/init/phases/7b-source-comments.d.ts +0 -15
- package/dist/init/phases/7b-source-comments.js.map +0 -1
- package/dist/init/phases/7c-rules-merge.js.map +0 -1
- package/dist/init/phases/8-baseline.d.ts +0 -10
- package/dist/init/phases/8-baseline.js.map +0 -1
- package/dist/init/phases/parallel-678.js.map +0 -1
- package/dist/mcp/tools/decisions-in-scope.d.ts +0 -7
- package/dist/mcp/tools/decisions-in-scope.js +0 -66
- package/dist/mcp/tools/decisions-in-scope.js.map +0 -1
- package/dist/mcp/tools/invariants-in-scope.d.ts +0 -7
- package/dist/mcp/tools/invariants-in-scope.js +0 -81
- package/dist/mcp/tools/invariants-in-scope.js.map +0 -1
- package/dist/mcp/tools/propose-decision.d.ts +0 -34
- package/dist/mcp/tools/propose-decision.js +0 -200
- package/dist/mcp/tools/propose-decision.js.map +0 -1
package/dist/gc/canary.js
CHANGED
|
@@ -4,39 +4,31 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Two checks run after the batch lands locally and BEFORE any push:
|
|
6
6
|
*
|
|
7
|
-
* 1. Manifest rebuild
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* broke ground.
|
|
11
|
-
*
|
|
12
|
-
* 2. workflow.md sanity — file exists, is readable, has parseable YAML
|
|
13
|
-
* frontmatter (the project-extension block that `sensors/runner.ts`
|
|
14
|
-
* reads via Object.keys). Catches a GC batch that mangled the
|
|
15
|
-
* frontmatter or removed the file entirely.
|
|
16
|
-
*
|
|
17
|
-
* Both checks are pure-mechanical — no LLM burn — and run in milliseconds.
|
|
18
|
-
*
|
|
19
|
-
* The earlier prompt-template re-render check was retired with the
|
|
20
|
-
* orchestrator (the workflow.md body no longer carries Liquid-style
|
|
21
|
-
* tokens; cairn-direction writes spec.tightened.md per task instead).
|
|
7
|
+
* 1. Manifest rebuild — verifies all files in `.cairn/ground/` are still
|
|
8
|
+
* valid, parseable, and linked.
|
|
9
|
+
* 2. workflow.md check — verifies the project config hasn't been corrupted.
|
|
22
10
|
*/
|
|
23
11
|
import { existsSync, readFileSync } from "node:fs";
|
|
24
12
|
import { join } from "node:path";
|
|
25
13
|
import { parse as parseYaml } from "yaml";
|
|
26
|
-
import {
|
|
27
|
-
|
|
14
|
+
import { writeManifest } from "@isaacriehm/cairn-state";
|
|
15
|
+
/**
|
|
16
|
+
* Verifies the monorepo is still healthy after a GC batch lands.
|
|
17
|
+
*/
|
|
18
|
+
export function runGcCanary(opts) {
|
|
28
19
|
const failures = [];
|
|
29
|
-
// 1. Manifest rebuild (canonical-zone integrity).
|
|
30
20
|
let manifestFiles = 0;
|
|
21
|
+
// 1. Manifest rebuild.
|
|
31
22
|
try {
|
|
32
|
-
const
|
|
33
|
-
manifestFiles = manifest.files.length;
|
|
23
|
+
const result = writeManifest({ repoRoot: opts.repoRoot });
|
|
24
|
+
manifestFiles = result.manifest.files.length;
|
|
34
25
|
if (manifestFiles === 0) {
|
|
35
|
-
failures.push("manifest
|
|
26
|
+
failures.push("manifest is empty — ground state likely wiped");
|
|
36
27
|
}
|
|
37
28
|
}
|
|
38
29
|
catch (err) {
|
|
39
|
-
|
|
30
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
31
|
+
failures.push(`manifest rebuild threw: ${message}`);
|
|
40
32
|
}
|
|
41
33
|
// 2. workflow.md sanity — file present, readable, frontmatter parseable.
|
|
42
34
|
const workflowPath = join(opts.repoRoot, ".cairn", "config", "workflow.md");
|
|
@@ -49,7 +41,8 @@ export function verifyBatchCanary(opts) {
|
|
|
49
41
|
body = readFileSync(workflowPath, "utf8");
|
|
50
42
|
}
|
|
51
43
|
catch (err) {
|
|
52
|
-
|
|
44
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
45
|
+
failures.push(`workflow.md unreadable post-batch: ${message}`);
|
|
53
46
|
}
|
|
54
47
|
if (body.length > 0) {
|
|
55
48
|
const fmMatch = body.match(/^---\n([\s\S]*?)\n---/);
|
|
@@ -64,7 +57,8 @@ export function verifyBatchCanary(opts) {
|
|
|
64
57
|
}
|
|
65
58
|
}
|
|
66
59
|
catch (err) {
|
|
67
|
-
|
|
60
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
61
|
+
failures.push(`workflow.md frontmatter parse failed: ${message}`);
|
|
68
62
|
}
|
|
69
63
|
}
|
|
70
64
|
}
|
package/dist/gc/canary.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canary.js","sourceRoot":"","sources":["../../src/gc/canary.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"canary.js","sourceRoot":"","sources":["../../src/gc/canary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAYxD;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,IAAqB;IAC/C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,uBAAuB;IACvB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE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,iDAAiD,CAAC,CAAC;YACnE,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC;oBACH,MAAM,EAAE,GAAY,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;oBAChD,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;wBAC1C,QAAQ,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;oBAChE,CAAC;gBACH,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACjE,QAAQ,CAAC,IAAI,CAAC,yCAAyC,OAAO,EAAE,CAAC,CAAC;gBACpE,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,EAAE,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;QACzB,QAAQ;QACR,cAAc,EAAE,aAAa;KAC9B,CAAC;AACJ,CAAC"}
|
|
@@ -4,21 +4,18 @@
|
|
|
4
4
|
* Walks every source file in the repo and scans for cairn citations
|
|
5
5
|
* (§INV invariants, §DEC decisions, TODO(TSK-...) linked todos). Each
|
|
6
6
|
* citation is resolved against the appropriate source of truth:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - §DEC
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* - §INV-NNNN resolved against `invariants.ledger.yaml` (Active/Superseded)
|
|
9
|
+
* - §DEC-NNNN resolved against `decisions.ledger.yaml` (Accepted/Superseded)
|
|
10
|
+
* - TODO(TSK-) resolved against `tasks/{active,done}/`
|
|
11
|
+
*
|
|
12
|
+
* Findings surface orphaned citations (target missing) or stale citations
|
|
13
|
+
* (target superseded by a newer version).
|
|
14
14
|
*/
|
|
15
15
|
import type { GcFinding } from "./types.js";
|
|
16
|
-
|
|
16
|
+
/** Run citation-integrity against all source files in repoRoot. */
|
|
17
|
+
export declare function runCitationIntegrity(opts: {
|
|
17
18
|
repoRoot: string;
|
|
18
|
-
|
|
19
|
-
maxFileBytes?: number;
|
|
20
|
-
}
|
|
21
|
-
export interface CitationIntegrityResult {
|
|
19
|
+
}): Promise<{
|
|
22
20
|
findings: GcFinding[];
|
|
23
|
-
}
|
|
24
|
-
export declare function runCitationIntegrity(opts: CitationIntegrityOptions): CitationIntegrityResult;
|
|
21
|
+
}>;
|
|
@@ -4,28 +4,25 @@
|
|
|
4
4
|
* Walks every source file in the repo and scans for cairn citations
|
|
5
5
|
* (§INV invariants, §DEC decisions, TODO(TSK-...) linked todos). Each
|
|
6
6
|
* citation is resolved against the appropriate source of truth:
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* - §DEC
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* - §INV-NNNN resolved against `invariants.ledger.yaml` (Active/Superseded)
|
|
9
|
+
* - §DEC-NNNN resolved against `decisions.ledger.yaml` (Accepted/Superseded)
|
|
10
|
+
* - TODO(TSK-) resolved against `tasks/{active,done}/`
|
|
11
|
+
*
|
|
12
|
+
* Findings surface orphaned citations (target missing) or stale citations
|
|
13
|
+
* (target superseded by a newer version).
|
|
14
14
|
*/
|
|
15
|
-
import { existsSync, readFileSync
|
|
15
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
16
16
|
import { join } from "node:path";
|
|
17
17
|
import { parse as parseYaml } from "yaml";
|
|
18
|
-
import { buildDecisionsLedger, buildInvariantsLedger } from "
|
|
19
|
-
import { decisionsLedgerPath, invariantsLedgerPath } from "../ground/paths.js";
|
|
20
|
-
import { scanCitations } from "../hooks/post-tool-use/citation-scanner.js";
|
|
18
|
+
import { buildDecisionsLedger, buildInvariantsLedger, decisionsLedgerPath, invariantsLedgerPath, } from "@isaacriehm/cairn-state";
|
|
21
19
|
import { walkSourceTree } from "./walk-source.js";
|
|
20
|
+
import { z } from "zod";
|
|
22
21
|
const PASS_ID = "citation-integrity";
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
".sql", ".html", ".vue", ".svelte", ".css", ".scss",
|
|
28
|
-
]);
|
|
22
|
+
const LedgerEntrySchema = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
superseded_by: z.string().nullable().optional(),
|
|
25
|
+
}).passthrough();
|
|
29
26
|
function loadInvariants(repoRoot) {
|
|
30
27
|
const active = new Set();
|
|
31
28
|
for (const e of buildInvariantsLedger({ repoRoot })) {
|
|
@@ -35,24 +32,22 @@ function loadInvariants(repoRoot) {
|
|
|
35
32
|
const path = invariantsLedgerPath(repoRoot);
|
|
36
33
|
if (!existsSync(path))
|
|
37
34
|
return { active, superseded };
|
|
38
|
-
let parsed;
|
|
39
35
|
try {
|
|
40
|
-
|
|
36
|
+
const raw = readFileSync(path, "utf8");
|
|
37
|
+
const parsed = parseYaml(raw);
|
|
38
|
+
const result = z.array(LedgerEntrySchema).safeParse(parsed);
|
|
39
|
+
if (result.success) {
|
|
40
|
+
for (const e of result.data) {
|
|
41
|
+
const id = e.id;
|
|
42
|
+
const supBy = e.superseded_by ?? null;
|
|
43
|
+
if (supBy !== null && supBy.length > 0) {
|
|
44
|
+
superseded.set(id, supBy);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
41
48
|
}
|
|
42
49
|
catch {
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
if (!Array.isArray(parsed))
|
|
46
|
-
return { active, superseded };
|
|
47
|
-
for (const entry of parsed) {
|
|
48
|
-
if (typeof entry !== "object" || entry === null)
|
|
49
|
-
continue;
|
|
50
|
-
const e = entry;
|
|
51
|
-
const id = typeof e["id"] === "string" ? e["id"] : null;
|
|
52
|
-
const supBy = typeof e["superseded_by"] === "string" ? e["superseded_by"] : null;
|
|
53
|
-
if (id !== null && supBy !== null && supBy.length > 0) {
|
|
54
|
-
superseded.set(id, supBy);
|
|
55
|
-
}
|
|
50
|
+
/* ignore */
|
|
56
51
|
}
|
|
57
52
|
return { active, superseded };
|
|
58
53
|
}
|
|
@@ -65,52 +60,48 @@ function loadDecisions(repoRoot) {
|
|
|
65
60
|
const path = decisionsLedgerPath(repoRoot);
|
|
66
61
|
if (!existsSync(path))
|
|
67
62
|
return { active, superseded };
|
|
68
|
-
let parsed;
|
|
69
63
|
try {
|
|
70
|
-
|
|
64
|
+
const raw = readFileSync(path, "utf8");
|
|
65
|
+
const parsed = parseYaml(raw);
|
|
66
|
+
const result = z.array(LedgerEntrySchema).safeParse(parsed);
|
|
67
|
+
if (result.success) {
|
|
68
|
+
for (const e of result.data) {
|
|
69
|
+
const id = e.id;
|
|
70
|
+
const supBy = e.superseded_by ?? null;
|
|
71
|
+
if (supBy !== null && supBy.length > 0) {
|
|
72
|
+
superseded.set(id, supBy);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
71
76
|
}
|
|
72
77
|
catch {
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
if (!Array.isArray(parsed))
|
|
76
|
-
return { active, superseded };
|
|
77
|
-
for (const entry of parsed) {
|
|
78
|
-
if (typeof entry !== "object" || entry === null)
|
|
79
|
-
continue;
|
|
80
|
-
const e = entry;
|
|
81
|
-
const id = typeof e["id"] === "string" ? e["id"] : null;
|
|
82
|
-
const supBy = typeof e["superseded_by"] === "string" ? e["superseded_by"] : null;
|
|
83
|
-
if (id !== null && supBy !== null && supBy.length > 0) {
|
|
84
|
-
superseded.set(id, supBy);
|
|
85
|
-
}
|
|
78
|
+
/* ignore */
|
|
86
79
|
}
|
|
87
80
|
return { active, superseded };
|
|
88
81
|
}
|
|
89
82
|
function fileExt(path) {
|
|
90
83
|
const idx = path.lastIndexOf(".");
|
|
91
|
-
|
|
92
|
-
return "";
|
|
93
|
-
return path.slice(idx).toLowerCase();
|
|
84
|
+
return idx === -1 ? "" : path.slice(idx).toLowerCase();
|
|
94
85
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
const SOURCE_EXTENSIONS = new Set([
|
|
87
|
+
".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs",
|
|
88
|
+
".py", ".rb", ".go", ".rs", ".java", ".c", ".cc", ".cpp", ".h", ".hpp",
|
|
89
|
+
".swift", ".kt", ".sh", ".bash", ".zsh",
|
|
90
|
+
".sql", ".html", ".vue", ".svelte", ".css", ".scss",
|
|
91
|
+
]);
|
|
92
|
+
const INV_RE = /§INV-([0-9a-f]{7,})\b/g;
|
|
93
|
+
const DEC_RE = /§DEC-([0-9a-f]{7,})\b/g;
|
|
94
|
+
const TSK_RE = /TODO\((TSK-\d{4}-\d{2}-\d{2}-[\w-]+-\d{5})\)/g;
|
|
95
|
+
/** Run citation-integrity against all source files in repoRoot. */
|
|
96
|
+
export async function runCitationIntegrity(opts) {
|
|
97
|
+
const files = walkSourceTree(opts.repoRoot);
|
|
98
98
|
const invariants = loadInvariants(opts.repoRoot);
|
|
99
99
|
const decisions = loadDecisions(opts.repoRoot);
|
|
100
|
-
const
|
|
100
|
+
const findings = [];
|
|
101
101
|
for (const rel of files) {
|
|
102
|
-
if (!
|
|
102
|
+
if (!SOURCE_EXTENSIONS.has(fileExt(rel)))
|
|
103
103
|
continue;
|
|
104
104
|
const abs = join(opts.repoRoot, rel);
|
|
105
|
-
let size;
|
|
106
|
-
try {
|
|
107
|
-
size = statSync(abs).size;
|
|
108
|
-
}
|
|
109
|
-
catch {
|
|
110
|
-
continue;
|
|
111
|
-
}
|
|
112
|
-
if (size > maxBytes)
|
|
113
|
-
continue;
|
|
114
105
|
let content;
|
|
115
106
|
try {
|
|
116
107
|
content = readFileSync(abs, "utf8");
|
|
@@ -118,77 +109,85 @@ export function runCitationIntegrity(opts) {
|
|
|
118
109
|
catch {
|
|
119
110
|
continue;
|
|
120
111
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
112
|
+
const lines = content.split(/\r?\n/);
|
|
113
|
+
for (let i = 0; i < lines.length; i++) {
|
|
114
|
+
const lineText = lines[i] ?? "";
|
|
115
|
+
const lineNumber = i + 1;
|
|
116
|
+
// 1. Invariants
|
|
117
|
+
for (const m of lineText.matchAll(INV_RE)) {
|
|
118
|
+
const id = `INV-${m[1]}`;
|
|
119
|
+
if (invariants.active.has(id))
|
|
120
|
+
continue;
|
|
121
|
+
const supBy = invariants.superseded.get(id);
|
|
122
|
+
if (supBy !== undefined) {
|
|
123
|
+
findings.push({
|
|
124
|
+
pass: PASS_ID,
|
|
125
|
+
kind: "stale_citation",
|
|
126
|
+
path: rel,
|
|
127
|
+
detail: `${rel}:${lineNumber} references ${id}, which is superseded by ${supBy}`,
|
|
128
|
+
severity: "warn",
|
|
129
|
+
line: lineNumber,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
findings.push({
|
|
134
|
+
pass: PASS_ID,
|
|
135
|
+
kind: "orphaned_citation",
|
|
136
|
+
path: rel,
|
|
137
|
+
detail: `${rel}:${lineNumber} references ${id}, which is not in the active ledger`,
|
|
138
|
+
severity: "warn",
|
|
139
|
+
line: lineNumber,
|
|
140
|
+
});
|
|
141
|
+
}
|
|
137
142
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
143
|
+
// 2. Decisions
|
|
144
|
+
for (const m of lineText.matchAll(DEC_RE)) {
|
|
145
|
+
const id = `DEC-${m[1]}`;
|
|
146
|
+
if (decisions.active.has(id))
|
|
147
|
+
continue;
|
|
148
|
+
const supBy = decisions.superseded.get(id);
|
|
149
|
+
if (supBy !== undefined) {
|
|
150
|
+
findings.push({
|
|
151
|
+
pass: PASS_ID,
|
|
152
|
+
kind: "stale_citation",
|
|
153
|
+
path: rel,
|
|
154
|
+
detail: `${rel}:${lineNumber} references ${id}, which is superseded by ${supBy}`,
|
|
155
|
+
severity: "warn",
|
|
156
|
+
line: lineNumber,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
findings.push({
|
|
161
|
+
pass: PASS_ID,
|
|
162
|
+
kind: "orphaned_citation",
|
|
163
|
+
path: rel,
|
|
164
|
+
detail: `${rel}:${lineNumber} references ${id}, which is not in the accepted ledger`,
|
|
165
|
+
severity: "warn",
|
|
166
|
+
line: lineNumber,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
162
169
|
}
|
|
163
|
-
|
|
170
|
+
// 3. Task todos
|
|
171
|
+
for (const m of lineText.matchAll(TSK_RE)) {
|
|
172
|
+
const taskId = m[1];
|
|
173
|
+
if (taskId === undefined)
|
|
174
|
+
continue;
|
|
175
|
+
const activeDir = join(opts.repoRoot, ".cairn", "tasks", "active", taskId);
|
|
176
|
+
const doneDir = join(opts.repoRoot, ".cairn", "tasks", "done", taskId);
|
|
177
|
+
if (existsSync(activeDir))
|
|
178
|
+
continue;
|
|
179
|
+
if (existsSync(doneDir))
|
|
180
|
+
continue;
|
|
164
181
|
findings.push({
|
|
165
182
|
pass: PASS_ID,
|
|
166
183
|
kind: "orphaned_citation",
|
|
167
184
|
path: rel,
|
|
168
|
-
detail: `${rel}:${
|
|
185
|
+
detail: `${rel}:${lineNumber} references ${taskId}, which is not in tasks/{active,done}/`,
|
|
169
186
|
severity: "warn",
|
|
170
|
-
line:
|
|
187
|
+
line: lineNumber,
|
|
171
188
|
});
|
|
172
189
|
}
|
|
173
190
|
}
|
|
174
|
-
// TODO(TSK-...) — check active/done dirs
|
|
175
|
-
for (const m of matches.todos) {
|
|
176
|
-
const taskId = m.id; // already "TSK-..."
|
|
177
|
-
const activeDir = join(opts.repoRoot, ".cairn", "tasks", "active", taskId);
|
|
178
|
-
const doneDir = join(opts.repoRoot, ".cairn", "tasks", "done", taskId);
|
|
179
|
-
if (existsSync(activeDir))
|
|
180
|
-
continue; // active TODO — fine
|
|
181
|
-
if (existsSync(doneDir))
|
|
182
|
-
continue; // done — agent will remove eventually; not a finding
|
|
183
|
-
findings.push({
|
|
184
|
-
pass: PASS_ID,
|
|
185
|
-
kind: "orphaned_citation",
|
|
186
|
-
path: rel,
|
|
187
|
-
detail: `${rel}:${m.line} references ${taskId}, which is not in tasks/{active,done}/`,
|
|
188
|
-
severity: "warn",
|
|
189
|
-
line: m.line,
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
191
|
}
|
|
193
192
|
return { findings };
|
|
194
193
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citation-integrity.js","sourceRoot":"","sources":["../../src/gc/citation-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"citation-integrity.js","sourceRoot":"","sources":["../../src/gc/citation-integrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,o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,EAAE,MAAM;wBAChB,IAAI,EAAE,UAAU;qBACjB,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;YAED,gBAAgB;YAChB,KAAK,MAAM,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;gBAC1C,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;gBACpB,IAAI,MAAM,KAAK,SAAS;oBAAE,SAAS;gBACnC,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;gBAC3E,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;gBACvE,IAAI,UAAU,CAAC,SAAS,CAAC;oBAAE,SAAS;gBACpC,IAAI,UAAU,CAAC,OAAO,CAAC;oBAAE,SAAS;gBAClC,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAE,OAAO;oBACb,IAAI,EAAE,mBAAmB;oBACzB,IAAI,EAAE,GAAG;oBACT,MAAM,EAAE,GAAG,GAAG,IAAI,UAAU,eAAe,MAAM,wCAAwC;oBACzF,QAAQ,EAAE,MAAM;oBAChB,IAAI,EAAE,UAAU;iBACjB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,CAAC;AACtB,CAAC"}
|
package/dist/gc/classify.d.ts
CHANGED
package/dist/gc/classify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto-merge classification
|
|
2
|
+
* Auto-merge classification.
|
|
3
3
|
*
|
|
4
4
|
* Given a set of repo-relative paths a commit will touch, return one of:
|
|
5
5
|
* safe — formatting, doc regen, frontmatter refresh, generated content,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* single high-stakes hit dominates the result. A single code hit dominates
|
|
12
12
|
* over safe.
|
|
13
13
|
*/
|
|
14
|
-
import { matchAnyGlob } from "
|
|
14
|
+
import { matchAnyGlob } from "@isaacriehm/cairn-state";
|
|
15
15
|
/** Patterns the classifier always treats as safe regardless of file type. */
|
|
16
16
|
const SAFE_PATH_PREFIXES = [
|
|
17
17
|
".cairn/ground/",
|
package/dist/gc/classify.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/gc/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"classify.js","sourceRoot":"","sources":["../../src/gc/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAIvD,6EAA6E;AAC7E,MAAM,kBAAkB,GAAG;IACzB,gBAAgB;IAChB,mBAAmB;IACnB,uBAAuB;IACvB,WAAW;CACZ,CAAC;AAEF;yCACyC;AACzC,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AAEhE,0DAA0D;AAC1D,MAAM,SAAS,GAAG;IAChB,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACN,CAAC;AAYF,MAAM,UAAU,iBAAiB,CAAC,IAAkB;IAClD,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,EAAE,iBAAiB,IAAI,EAAE,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,qBAAqB,IAAI,IAAI,CAAC,YAAY,EAAE,sBAAsB,IAAI,EAAE,CAAC;IAEhG,IAAI,GAAG,GAAqB,MAAM,CAAC;IACnC,KA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CAAC;YAAE,OAAO,IAAI,CAAC;IACtC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,IAAY;IAC9B,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IACjC,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
* For every task in `.cairn/tasks/done/`, validate that:
|
|
5
5
|
* - status.yaml indicates phase: succeeded
|
|
6
6
|
* - related_run_ids has at least one entry (last entry is "the run")
|
|
7
|
-
* - the
|
|
8
|
-
* - meta.json
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
11
|
-
* -
|
|
12
|
-
*
|
|
13
|
-
* All findings are kind: "task_integrity_error" with severity: "warn".
|
|
7
|
+
* - the run directory exists in runs/terminal/ (or fallback runs/active/)
|
|
8
|
+
* - the run's meta.json contains a sha_pin
|
|
9
|
+
* - the sha_pin is reachable in the current git history
|
|
10
|
+
* - attestation.yaml is present in the run dir
|
|
11
|
+
* - sensor-results.yaml (if present) indicates all sensors passed
|
|
14
12
|
*/
|
|
15
13
|
import type { GcFinding } from "./types.js";
|
|
16
14
|
export interface CompletionIntegrityOptions {
|
|
@@ -19,4 +17,5 @@ export interface CompletionIntegrityOptions {
|
|
|
19
17
|
export interface CompletionIntegrityResult {
|
|
20
18
|
findings: GcFinding[];
|
|
21
19
|
}
|
|
20
|
+
/** Run the completion-integrity pass. */
|
|
22
21
|
export declare function runCompletionIntegrity(opts: CompletionIntegrityOptions): Promise<CompletionIntegrityResult>;
|