@isaacriehm/cairn-core 0.22.5 → 0.23.0

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.
Files changed (122) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/attention/index.d.ts +0 -1
  3. package/dist/attention/index.js +0 -1
  4. package/dist/attention/index.js.map +1 -1
  5. package/dist/cites/expand.d.ts +75 -0
  6. package/dist/cites/expand.js +197 -0
  7. package/dist/cites/expand.js.map +1 -0
  8. package/dist/doctor/index.d.ts +10 -4
  9. package/dist/doctor/index.js +25 -97
  10. package/dist/doctor/index.js.map +1 -1
  11. package/dist/gc/apply.d.ts +1 -1
  12. package/dist/gc/apply.js +1 -1
  13. package/dist/gc/classify.d.ts +4 -8
  14. package/dist/gc/classify.js +6 -12
  15. package/dist/gc/classify.js.map +1 -1
  16. package/dist/gc/completion-integrity.d.ts +0 -1
  17. package/dist/gc/completion-integrity.js +0 -6
  18. package/dist/gc/completion-integrity.js.map +1 -1
  19. package/dist/gc/index.d.ts +1 -1
  20. package/dist/gc/index.js +1 -1
  21. package/dist/gc/sweep.d.ts +1 -3
  22. package/dist/gc/sweep.js +2 -7
  23. package/dist/gc/sweep.js.map +1 -1
  24. package/dist/gc/types.d.ts +5 -6
  25. package/dist/gc/types.js +4 -5
  26. package/dist/gc/types.js.map +1 -1
  27. package/dist/hooks/post-tool-use/index.d.ts +1 -1
  28. package/dist/hooks/post-tool-use/index.js +1 -1
  29. package/dist/hooks/post-tool-use/index.js.map +1 -1
  30. package/dist/hooks/post-tool-use/sot-align.js +52 -21
  31. package/dist/hooks/post-tool-use/sot-align.js.map +1 -1
  32. package/dist/hooks/sot-align-common.d.ts +13 -0
  33. package/dist/hooks/sot-align-common.js +69 -0
  34. package/dist/hooks/sot-align-common.js.map +1 -1
  35. package/dist/index.d.ts +3 -0
  36. package/dist/index.js +3 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/init/baseline-audit.js +3 -16
  39. package/dist/init/baseline-audit.js.map +1 -1
  40. package/dist/init/claude-rule.d.ts +1 -0
  41. package/dist/init/claude-rule.js +1 -1
  42. package/dist/init/claude-rule.js.map +1 -1
  43. package/dist/init/index.d.ts +0 -2
  44. package/dist/init/index.js +0 -1
  45. package/dist/init/index.js.map +1 -1
  46. package/dist/init/init.d.ts +2 -2
  47. package/dist/init/init.js +12 -27
  48. package/dist/init/init.js.map +1 -1
  49. package/dist/init/mapper-merge.d.ts +1 -4
  50. package/dist/init/mapper-merge.js +6 -22
  51. package/dist/init/mapper-merge.js.map +1 -1
  52. package/dist/init/mapper-parallel.d.ts +0 -4
  53. package/dist/init/mapper-parallel.js +3 -69
  54. package/dist/init/mapper-parallel.js.map +1 -1
  55. package/dist/init/mapper-prompts.d.ts +1 -25
  56. package/dist/init/mapper-prompts.js +2 -20
  57. package/dist/init/mapper-prompts.js.map +1 -1
  58. package/dist/init/mapper.d.ts +0 -4
  59. package/dist/init/mapper.js +2 -9
  60. package/dist/init/mapper.js.map +1 -1
  61. package/dist/init/overlay.js +6 -8
  62. package/dist/init/overlay.js.map +1 -1
  63. package/dist/init/phases/11-baseline.js +0 -10
  64. package/dist/init/phases/11-baseline.js.map +1 -1
  65. package/dist/init/phases/4-seed.js +0 -4
  66. package/dist/init/phases/4-seed.js.map +1 -1
  67. package/dist/init/source-comments/ingest.d.ts +0 -8
  68. package/dist/init/source-comments/ingest.js +11 -8
  69. package/dist/init/source-comments/ingest.js.map +1 -1
  70. package/dist/init/walker.d.ts +2 -3
  71. package/dist/init/walker.js +2 -3
  72. package/dist/init/walker.js.map +1 -1
  73. package/dist/init/workflow-block.d.ts +0 -4
  74. package/dist/init/workflow-block.js +0 -16
  75. package/dist/init/workflow-block.js.map +1 -1
  76. package/dist/invariants/prune.d.ts +50 -0
  77. package/dist/invariants/prune.js +113 -0
  78. package/dist/invariants/prune.js.map +1 -0
  79. package/dist/mcp/schemas.d.ts +8 -8
  80. package/dist/mcp/tools/mission-set-exit-gate.d.ts +1 -1
  81. package/dist/migrate/migrations/0004-drop-glob-settings.d.ts +16 -0
  82. package/dist/migrate/migrations/0004-drop-glob-settings.js +34 -0
  83. package/dist/migrate/migrations/0004-drop-glob-settings.js.map +1 -0
  84. package/dist/migrate/registry.js +2 -0
  85. package/dist/migrate/registry.js.map +1 -1
  86. package/dist/profiles/types.d.ts +0 -2
  87. package/dist/profiles/unknown.d.ts +2 -2
  88. package/dist/profiles/unknown.js +2 -3
  89. package/dist/profiles/unknown.js.map +1 -1
  90. package/dist/sensors/diff.d.ts +1 -1
  91. package/dist/sensors/diff.js +1 -1
  92. package/dist/sensors/index.d.ts +2 -3
  93. package/dist/sensors/index.js +1 -2
  94. package/dist/sensors/index.js.map +1 -1
  95. package/dist/sensors/runner.d.ts +7 -10
  96. package/dist/sensors/runner.js +6 -39
  97. package/dist/sensors/runner.js.map +1 -1
  98. package/dist/sensors/types.d.ts +0 -13
  99. package/dist/uninstall/index.d.ts +44 -0
  100. package/dist/uninstall/index.js +185 -0
  101. package/dist/uninstall/index.js.map +1 -0
  102. package/package.json +2 -2
  103. package/templates/.cairn/config/sensors.yaml +12 -91
  104. package/templates/.cairn/config/workflow.md +2 -5
  105. package/dist/attention/scoring.d.ts +0 -47
  106. package/dist/attention/scoring.js +0 -87
  107. package/dist/attention/scoring.js.map +0 -1
  108. package/dist/hooks/read-enrich.d.ts +0 -6
  109. package/dist/hooks/read-enrich.js +0 -11
  110. package/dist/hooks/read-enrich.js.map +0 -1
  111. package/dist/hooks/write-guard.d.ts +0 -6
  112. package/dist/hooks/write-guard.js +0 -11
  113. package/dist/hooks/write-guard.js.map +0 -1
  114. package/dist/init/glob-inference.d.ts +0 -16
  115. package/dist/init/glob-inference.js +0 -132
  116. package/dist/init/glob-inference.js.map +0 -1
  117. package/dist/init/phases/12-strip.d.ts +0 -10
  118. package/dist/init/phases/12-strip.js +0 -88
  119. package/dist/init/phases/12-strip.js.map +0 -1
  120. package/dist/sensors/structural.d.ts +0 -31
  121. package/dist/sensors/structural.js +0 -196
  122. package/dist/sensors/structural.js.map +0 -1
@@ -41,8 +41,6 @@ export interface Profile {
41
41
  extractors: ProfileExtractor[];
42
42
  /** Suggested off-limits paths on adoption. */
43
43
  offLimitsDefaults: string[];
44
- /** Suggested high-stakes globs on adoption. */
45
- highStakesDefaults: string[];
46
44
  /** Suggested start command for the project (e.g., `pnpm dev`). */
47
45
  startCommand?: string;
48
46
  }
@@ -3,7 +3,7 @@ import type { Profile } from "./types.js";
3
3
  * Fallback profile — applies when no other profile detects.
4
4
  *
5
5
  * Carries no extractors and no stack-specific sensors. The cairn still
6
- * runs every generic sensor (Layer A/B/C/D/E/U + decision-assertions +
7
- * invariant-suite) defined in templates/.cairn/config/sensors.yaml.
6
+ * runs the generic sensors (Layer A stub catalog + decision-assertions)
7
+ * defined in templates/.cairn/config/sensors.yaml.
8
8
  */
9
9
  export declare const unknownProfile: Profile;
@@ -2,8 +2,8 @@
2
2
  * Fallback profile — applies when no other profile detects.
3
3
  *
4
4
  * Carries no extractors and no stack-specific sensors. The cairn still
5
- * runs every generic sensor (Layer A/B/C/D/E/U + decision-assertions +
6
- * invariant-suite) defined in templates/.cairn/config/sensors.yaml.
5
+ * runs the generic sensors (Layer A stub catalog + decision-assertions)
6
+ * defined in templates/.cairn/config/sensors.yaml.
7
7
  */
8
8
  export const unknownProfile = {
9
9
  id: "unknown",
@@ -12,6 +12,5 @@ export const unknownProfile = {
12
12
  sensors: [],
13
13
  extractors: [],
14
14
  offLimitsDefaults: [".git/**", ".archive/**", "node_modules/**", ".env", ".env.local"],
15
- highStakesDefaults: [],
16
15
  };
17
16
  //# sourceMappingURL=unknown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../src/profiles/unknown.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;IAClB,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,EAAE;IACd,iBAAiB,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,CAAC;IACtF,kBAAkB,EAAE,EAAE;CACvB,CAAC"}
1
+ {"version":3,"file":"unknown.js","sourceRoot":"","sources":["../../src/profiles/unknown.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,EAAE,EAAE,SAAS;IACb,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI;IAClB,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,EAAE;IACd,iBAAiB,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,CAAC;CACvF,CAAC"}
@@ -34,6 +34,6 @@ export declare function getRangeDiff(repoRoot: string, range: string): Promise<D
34
34
  export declare function diffHasGlobMatch(diff: DiffEntry[], globs: readonly string[], matcher: (path: string, glob: string) => boolean): boolean;
35
35
  /**
36
36
  * Filter a diff to entries whose path matches any of the supplied globs.
37
- * Useful for layered sensors that scope to e.g. route_handler_globs.
37
+ * Useful for any check that scopes to a glob set (e.g. a decision's scope_globs).
38
38
  */
39
39
  export declare function filterDiffByGlobs(diff: DiffEntry[], globs: readonly string[], matcher: (path: string, glob: string) => boolean): DiffEntry[];
@@ -267,7 +267,7 @@ export function diffHasGlobMatch(diff, globs, matcher) {
267
267
  }
268
268
  /**
269
269
  * Filter a diff to entries whose path matches any of the supplied globs.
270
- * Useful for layered sensors that scope to e.g. route_handler_globs.
270
+ * Useful for any check that scopes to a glob set (e.g. a decision's scope_globs).
271
271
  */
272
272
  export function filterDiffByGlobs(diff, globs, matcher) {
273
273
  return diff.filter((d) => globs.some((g) => matcher(d.path, g)));
@@ -1,12 +1,11 @@
1
- export type { DiffEntry, ProjectGlobs, SensorFinding, SensorLanguage, SensorResult, SensorSweepResult, StubCatalog, StubPattern, } from "./types.js";
1
+ export type { DiffEntry, SensorFinding, SensorLanguage, SensorResult, SensorSweepResult, StubCatalog, StubPattern, } from "./types.js";
2
2
  export { getDiff, getStagedDiff, getRangeDiff, diffHasGlobMatch, filterDiffByGlobs, } from "./diff.js";
3
3
  export { loadStubCatalog, parseStubCatalog, loadSensorRegistry } from "./catalog.js";
4
4
  export type { SensorRegistry, SensorRegistryEntry } from "./catalog.js";
5
5
  export { detectStubMatches, runStubCatalog, detectLanguage } from "./stub-catalog.js";
6
6
  export type { StubMatch } from "./stub-catalog.js";
7
- export { runRouteHandlerNonEmpty, runDtoNoFakeFields, } from "./structural.js";
8
7
  export { loadAcceptedDecisions, decisionsInScope, listMirrorFiles, runDecisionAssertions, } from "./decisions.js";
9
8
  export { formatRemediation } from "./remediation.js";
10
9
  export type { RemediationOptions } from "./remediation.js";
11
- export { runSensorsOnDiff, loadProjectGlobs } from "./runner.js";
10
+ export { runSensorsOnDiff } from "./runner.js";
12
11
  export type { RunSensorsOnDiffArgs } from "./runner.js";
@@ -1,8 +1,7 @@
1
1
  export { getDiff, getStagedDiff, getRangeDiff, diffHasGlobMatch, filterDiffByGlobs, } from "./diff.js";
2
2
  export { loadStubCatalog, parseStubCatalog, loadSensorRegistry } from "./catalog.js";
3
3
  export { detectStubMatches, runStubCatalog, detectLanguage } from "./stub-catalog.js";
4
- export { runRouteHandlerNonEmpty, runDtoNoFakeFields, } from "./structural.js";
5
4
  export { loadAcceptedDecisions, decisionsInScope, listMirrorFiles, runDecisionAssertions, } from "./decisions.js";
6
5
  export { formatRemediation } from "./remediation.js";
7
- export { runSensorsOnDiff, loadProjectGlobs } from "./runner.js";
6
+ export { runSensorsOnDiff } from "./runner.js";
8
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sensors/index.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/sensors/index.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAErF,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC"}
@@ -3,19 +3,20 @@
3
3
  *
4
4
  * Composes the sensors that actually have teeth into one diff-scoped sweep:
5
5
  * - Layer A — stub-pattern catalog (mechanical debt regex)
6
- * - Layer C — generic structural sensors (route handlers, DTOs)
7
6
  * - decision-assertions — "was the in-scope DEC honored?"
8
7
  *
9
8
  * Runs at the real gates: pre-commit (staged diff), CI (`--diff` range), and
10
9
  * advisory at the Stop hook (working-tree diff). The diff + repoRoot are the
11
10
  * only inputs — there is no mirror checkout or orchestrator runtime.
12
11
  *
13
- * Layer-B attestation cross-check was removed: it depended on an
14
- * agent-emitted attestation block that no production path produced, so it
15
- * never ran. Project-specific "proposed sensors" were likewise never wired
16
- * to an executor and have been dropped.
12
+ * Two theatre layers have been removed. (1) Layer-B attestation cross-check:
13
+ * depended on an agent-emitted attestation block no production path produced.
14
+ * (2) The Layer C structural sensors (route-handler / DTO) + their
15
+ * `project_globs` targeting: stack-specific regex fed by LLM-guessed globs that
16
+ * were never validated or refreshed, so they failed silent and never fired.
17
+ * Both are gone; the spine (Layer A + decision-assertions) is glob-independent.
17
18
  */
18
- import type { DiffEntry, ProjectGlobs, SensorLanguage, SensorSweepResult } from "./types.js";
19
+ import type { DiffEntry, SensorLanguage, SensorSweepResult } from "./types.js";
19
20
  export interface RunSensorsOnDiffArgs {
20
21
  /** Repo root — decisions, stub catalog, and config are read from here. */
21
22
  repoRoot: string;
@@ -23,8 +24,6 @@ export interface RunSensorsOnDiffArgs {
23
24
  diff: DiffEntry[];
24
25
  /** Languages to filter Layer A patterns. Omit = scan all known languages. */
25
26
  languages?: SensorLanguage[];
26
- /** Route/DTO globs. Omit = loaded from `.cairn/config.yaml`. */
27
- projectGlobs?: ProjectGlobs;
28
27
  /** Label for log lines (e.g. the gate name). */
29
28
  runId?: string;
30
29
  /** Retry context for the remediation prompt. Defaults to a single 1/1 pass. */
@@ -37,5 +36,3 @@ export interface RunSensorsOnDiffArgs {
37
36
  * the caller can surface to the agent.
38
37
  */
39
38
  export declare function runSensorsOnDiff(args: RunSensorsOnDiffArgs): Promise<SensorSweepResult>;
40
- /** Read route/DTO/high-stakes globs from `.cairn/config.yaml`. */
41
- export declare function loadProjectGlobs(repoRoot: string): ProjectGlobs;
@@ -3,25 +3,24 @@
3
3
  *
4
4
  * Composes the sensors that actually have teeth into one diff-scoped sweep:
5
5
  * - Layer A — stub-pattern catalog (mechanical debt regex)
6
- * - Layer C — generic structural sensors (route handlers, DTOs)
7
6
  * - decision-assertions — "was the in-scope DEC honored?"
8
7
  *
9
8
  * Runs at the real gates: pre-commit (staged diff), CI (`--diff` range), and
10
9
  * advisory at the Stop hook (working-tree diff). The diff + repoRoot are the
11
10
  * only inputs — there is no mirror checkout or orchestrator runtime.
12
11
  *
13
- * Layer-B attestation cross-check was removed: it depended on an
14
- * agent-emitted attestation block that no production path produced, so it
15
- * never ran. Project-specific "proposed sensors" were likewise never wired
16
- * to an executor and have been dropped.
12
+ * Two theatre layers have been removed. (1) Layer-B attestation cross-check:
13
+ * depended on an agent-emitted attestation block no production path produced.
14
+ * (2) The Layer C structural sensors (route-handler / DTO) + their
15
+ * `project_globs` targeting: stack-specific regex fed by LLM-guessed globs that
16
+ * were never validated or refreshed, so they failed silent and never fired.
17
+ * Both are gone; the spine (Layer A + decision-assertions) is glob-independent.
17
18
  */
18
19
  import { logger } from "../logger.js";
19
- import { loadCairnConfig } from "@isaacriehm/cairn-state";
20
20
  import { decisionsInScope, loadAcceptedDecisions, runDecisionAssertions, } from "./decisions.js";
21
21
  import { loadStubCatalog } from "./catalog.js";
22
22
  import { formatRemediation } from "./remediation.js";
23
23
  import { runStubCatalog } from "./stub-catalog.js";
24
- import { runDtoNoFakeFields, runRouteHandlerNonEmpty } from "./structural.js";
25
24
  const log = logger("sensors.runner");
26
25
  /**
27
26
  * Run the live sensor sweep over a diff. Returns per-sensor results, the
@@ -31,16 +30,12 @@ const log = logger("sensors.runner");
31
30
  export async function runSensorsOnDiff(args) {
32
31
  const startedAt = Date.now();
33
32
  const { repoRoot, diff } = args;
34
- const projectGlobs = args.projectGlobs ?? loadProjectGlobs(repoRoot);
35
33
  const stubCatalog = loadStubCatalog(repoRoot);
36
34
  const acceptedDecisions = loadAcceptedDecisions(repoRoot);
37
35
  const inScope = decisionsInScope(acceptedDecisions, diff);
38
36
  const results = [
39
37
  // Layer A — stub-pattern catalog.
40
38
  runStubCatalog({ diff, catalog: stubCatalog, languages: args.languages }),
41
- // Layer C — generic structural sensors.
42
- runRouteHandlerNonEmpty({ diff, globs: projectGlobs.route_handler_globs }),
43
- runDtoNoFakeFields({ diff, globs: projectGlobs.dto_globs }),
44
39
  // Decision-assertions — the core value prop.
45
40
  runDecisionAssertions({ mirrorPath: repoRoot, diff, decisions: inScope }),
46
41
  ];
@@ -74,32 +69,4 @@ export async function runSensorsOnDiff(args) {
74
69
  duration_ms: Date.now() - startedAt,
75
70
  };
76
71
  }
77
- /** Read route/DTO/high-stakes globs from `.cairn/config.yaml`. */
78
- export function loadProjectGlobs(repoRoot) {
79
- const cfg = loadCairnConfig(repoRoot);
80
- const out = {};
81
- const asStrings = (v) => Array.isArray(v) ? v.filter((x) => typeof x === "string") : undefined;
82
- const pg = cfg["project_globs"];
83
- if (typeof pg === "object" && pg !== null) {
84
- const p = pg;
85
- const rh = asStrings(p["route_handler_globs"]);
86
- if (rh)
87
- out.route_handler_globs = rh;
88
- const dto = asStrings(p["dto_globs"]);
89
- if (dto)
90
- out.dto_globs = dto;
91
- const gen = asStrings(p["generator_source_globs"]);
92
- if (gen)
93
- out.generator_source_globs = gen;
94
- const hs = asStrings(p["high_stakes_globs"]);
95
- if (hs)
96
- out.high_stakes_globs = hs;
97
- }
98
- if (out.high_stakes_globs === undefined) {
99
- const topHs = asStrings(cfg["high_stakes_globs"]);
100
- if (topHs)
101
- out.high_stakes_globs = topHs;
102
- }
103
- return out;
104
- }
105
72
  //# sourceMappingURL=runner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/sensors/runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,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AAM,CAAC;IAC1D,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAClC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC,MAAM,EACpE,CAAC,CACF,CAAC;IACF,MAAM,EAAE,GAAG,aAAa,KAAK,CAAC,CAAC;IAC/B,MAAM,kBAAkB,GAAG,EAAE;QAC3B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,iBAAiB,CAAC,OAAO,EAAE;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,CAAC;YAC1B,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC;SACnC,CAAC,CAAC;IAEP,GAAG,CAAC,IAAI,CACN;QACE,MAAM,EAAE,IAAI,CAAC,KAAK,IAAI,cAAc;QACpC,EAAE;QACF,aAAa;QACb,aAAa;QACb,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3B,EAAE,EAAE,CAAC,CAAC,SAAS;YACf,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM;YAC3B,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM;SAC3B,CAAC,CAAC;KACJ,EACD,uBAAuB,CACxB,CAAC;IAEF,OAAO;QACL,EAAE;QACF,aAAa;QACb,aAAa;QACb,OAAO;QACP,kBAAkB;QAClB,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;KACpC,CAAC;AACJ,CAAC"}
@@ -56,19 +56,6 @@ export interface StubCatalog {
56
56
  version: number;
57
57
  patterns: StubPattern[];
58
58
  }
59
- /**
60
- * Project-extension block resolved from workflow.md `<project>:` extension.
61
- * Sensors that trigger on `glob_keys` look up the matching key here.
62
- */
63
- export interface ProjectGlobs {
64
- route_handler_globs?: string[];
65
- dto_globs?: string[];
66
- generator_source_globs?: string[];
67
- high_stakes_globs?: string[];
68
- /** Off-limits — file_must_not_be_modified assertions also enforce these. */
69
- off_limits?: string[];
70
- [key: string]: string[] | undefined;
71
- }
72
59
  export interface SensorFinding {
73
60
  /** id from sensors.yaml — e.g., "stub-pattern-catalog". */
74
61
  sensor_id: string;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * `cairn uninstall` — remove Cairn from a repo, cleanly.
3
+ *
4
+ * The inverse of adoption (`cairn init`) + per-clone bootstrap
5
+ * (`cairn join`). The install footprint is:
6
+ *
7
+ * - `.cairn/` the ground state + config + hooks
8
+ * - `.claude/rules/cairn.md` the plugin-absent onboarding notice
9
+ * - an `@.claude/rules/cairn.md` import block in CLAUDE.md / AGENTS.md
10
+ * - `git config core.hooksPath` pointed at `.cairn/git-hooks`
11
+ * - in-source `// §DEC-/§INV-` citations from sot-align strip-replace
12
+ *
13
+ * Uninstall reverses these in dependency order. Cites are expanded FIRST
14
+ * (while `.cairn/ground/` still exists to resolve them), so removing
15
+ * `.cairn/` doesn't leave dangling `§` references — the source ends up
16
+ * self-documenting. `core.hooksPath` is only unset when it is Cairn's own
17
+ * value (a foreign husky/lefthook path is never clobbered).
18
+ *
19
+ * Every step reports a status; nothing throws on a recoverable issue. The
20
+ * machine-level Claude Code plugin (`/plugin install`) is user-scoped, not
21
+ * repo-scoped — uninstall can't remove it and says so.
22
+ */
23
+ export type UninstallStepStatus = "ok" | "skipped" | "warn";
24
+ export interface UninstallStep {
25
+ step: string;
26
+ status: UninstallStepStatus;
27
+ detail: string;
28
+ }
29
+ export interface UninstallOptions {
30
+ repoRoot: string;
31
+ /** Expand DEC/INV cites to inline comments first. Default true. */
32
+ expandCites?: boolean;
33
+ /** Report what would happen; change nothing. */
34
+ dryRun?: boolean;
35
+ }
36
+ export interface UninstallResult {
37
+ repoRoot: string;
38
+ steps: UninstallStep[];
39
+ /** True when `.cairn/` was (or would be) removed. */
40
+ removed: boolean;
41
+ }
42
+ export declare function uninstallCairn(opts: UninstallOptions): UninstallResult;
43
+ /** Remove the marker + import lines, then collapse the blank-line run they left. */
44
+ export declare function stripImportBlock(content: string): string;
@@ -0,0 +1,185 @@
1
+ /**
2
+ * `cairn uninstall` — remove Cairn from a repo, cleanly.
3
+ *
4
+ * The inverse of adoption (`cairn init`) + per-clone bootstrap
5
+ * (`cairn join`). The install footprint is:
6
+ *
7
+ * - `.cairn/` the ground state + config + hooks
8
+ * - `.claude/rules/cairn.md` the plugin-absent onboarding notice
9
+ * - an `@.claude/rules/cairn.md` import block in CLAUDE.md / AGENTS.md
10
+ * - `git config core.hooksPath` pointed at `.cairn/git-hooks`
11
+ * - in-source `// §DEC-/§INV-` citations from sot-align strip-replace
12
+ *
13
+ * Uninstall reverses these in dependency order. Cites are expanded FIRST
14
+ * (while `.cairn/ground/` still exists to resolve them), so removing
15
+ * `.cairn/` doesn't leave dangling `§` references — the source ends up
16
+ * self-documenting. `core.hooksPath` is only unset when it is Cairn's own
17
+ * value (a foreign husky/lefthook path is never clobbered).
18
+ *
19
+ * Every step reports a status; nothing throws on a recoverable issue. The
20
+ * machine-level Claude Code plugin (`/plugin install`) is user-scoped, not
21
+ * repo-scoped — uninstall can't remove it and says so.
22
+ */
23
+ import { execFileSync } from "node:child_process";
24
+ import { existsSync, readFileSync, readdirSync, rmSync, writeFileSync, } from "node:fs";
25
+ import { join } from "node:path";
26
+ import { cairnDir, COMMITTED_HOOKS_PATH } from "@isaacriehm/cairn-state";
27
+ import { expandCitesInRepo } from "../cites/expand.js";
28
+ import { CAIRN_RULE_IMPORT, IMPORT_MARKER } from "../init/claude-rule.js";
29
+ export function uninstallCairn(opts) {
30
+ const root = opts.repoRoot;
31
+ const dryRun = opts.dryRun ?? false;
32
+ const doExpand = opts.expandCites ?? true;
33
+ const steps = [];
34
+ // 1. Expand cites FIRST — needs `.cairn/ground/` to resolve bodies.
35
+ if (doExpand) {
36
+ const r = expandCitesInRepo({ repoRoot: root, dryRun });
37
+ const bits = [`${r.expanded} citation(s) inlined across ${r.filesChanged} file(s)`];
38
+ if (r.danglingSkipped > 0)
39
+ bits.push(`${r.danglingSkipped} dangling left in place`);
40
+ if (r.inlineSkipped > 0)
41
+ bits.push(`${r.inlineSkipped} inline left in place`);
42
+ steps.push({ step: "expand-cites", status: "ok", detail: bits.join("; ") });
43
+ }
44
+ else {
45
+ steps.push({
46
+ step: "expand-cites",
47
+ status: "skipped",
48
+ detail: "--keep-cites: in-source §DEC-/§INV- tokens will dangle after removal",
49
+ });
50
+ }
51
+ // 2. Remove the `@.claude/rules/cairn.md` import block from the memory file.
52
+ steps.push(unwireRuleImport(root, dryRun));
53
+ // 3. Remove `.claude/rules/cairn.md` and prune the dirs if they empty out.
54
+ steps.push(removeRuleFile(root, dryRun));
55
+ // 4. Unset `core.hooksPath` — only when it is Cairn's own value.
56
+ steps.push(unsetHooksPath(root, dryRun));
57
+ // 5. Remove `.cairn/`.
58
+ const cairnPath = cairnDir(root);
59
+ let removed = false;
60
+ if (existsSync(cairnPath)) {
61
+ removed = true;
62
+ if (!dryRun)
63
+ rmSync(cairnPath, { recursive: true, force: true });
64
+ steps.push({ step: "remove-cairn-dir", status: "ok", detail: `${dryRun ? "would remove" : "removed"} .cairn/` });
65
+ }
66
+ else {
67
+ steps.push({ step: "remove-cairn-dir", status: "skipped", detail: ".cairn/ not present" });
68
+ }
69
+ // 6. Advisory — the machine-level plugin is user-scoped.
70
+ steps.push({
71
+ step: "plugin",
72
+ status: "skipped",
73
+ detail: "Claude Code plugin is machine-scoped — remove with `/plugin uninstall cairn` if no other repo uses it",
74
+ });
75
+ return { repoRoot: root, steps, removed };
76
+ }
77
+ /* -------------------------------------------------------------------------- */
78
+ function unwireRuleImport(root, dryRun) {
79
+ for (const rel of ["CLAUDE.md", "AGENTS.md"]) {
80
+ const abs = join(root, rel);
81
+ if (!existsSync(abs))
82
+ continue;
83
+ let content;
84
+ try {
85
+ content = readFileSync(abs, "utf8");
86
+ }
87
+ catch {
88
+ continue;
89
+ }
90
+ if (!content.includes(CAIRN_RULE_IMPORT))
91
+ continue;
92
+ const next = stripImportBlock(content);
93
+ if (!dryRun)
94
+ writeFileSync(abs, next, "utf8");
95
+ return {
96
+ step: "unwire-import",
97
+ status: "ok",
98
+ detail: `${dryRun ? "would remove" : "removed"} the cairn rule import from ${rel}`,
99
+ };
100
+ }
101
+ return { step: "unwire-import", status: "skipped", detail: "no cairn rule import found in CLAUDE.md / AGENTS.md" };
102
+ }
103
+ /** Remove the marker + import lines, then collapse the blank-line run they left. */
104
+ export function stripImportBlock(content) {
105
+ const lines = content.split(/\r?\n/);
106
+ const kept = lines.filter((l) => l.trim() !== IMPORT_MARKER && l.trim() !== CAIRN_RULE_IMPORT);
107
+ // Collapse 3+ consecutive blank lines (the import block was fenced by blanks)
108
+ // down to a single blank, then normalize the trailing newline.
109
+ const collapsed = [];
110
+ let blanks = 0;
111
+ for (const l of kept) {
112
+ if (l.trim() === "") {
113
+ blanks += 1;
114
+ if (blanks >= 2)
115
+ continue;
116
+ }
117
+ else {
118
+ blanks = 0;
119
+ }
120
+ collapsed.push(l);
121
+ }
122
+ return `${collapsed.join("\n").replace(/\s*$/, "")}\n`;
123
+ }
124
+ function removeRuleFile(root, dryRun) {
125
+ const ruleAbs = join(root, ".claude", "rules", "cairn.md");
126
+ if (!existsSync(ruleAbs)) {
127
+ return { step: "remove-rule", status: "skipped", detail: ".claude/rules/cairn.md not present" };
128
+ }
129
+ if (!dryRun) {
130
+ rmSync(ruleAbs, { force: true });
131
+ pruneIfEmpty(join(root, ".claude", "rules"));
132
+ pruneIfEmpty(join(root, ".claude"));
133
+ }
134
+ return { step: "remove-rule", status: "ok", detail: `${dryRun ? "would remove" : "removed"} .claude/rules/cairn.md` };
135
+ }
136
+ function pruneIfEmpty(dir) {
137
+ try {
138
+ if (existsSync(dir) && readdirSync(dir).length === 0)
139
+ rmSync(dir, { recursive: true, force: true });
140
+ }
141
+ catch {
142
+ /* best-effort */
143
+ }
144
+ }
145
+ function unsetHooksPath(root, dryRun) {
146
+ if (!existsSync(join(root, ".git"))) {
147
+ return { step: "unset-hooks", status: "skipped", detail: "not a git repo" };
148
+ }
149
+ const current = readGitConfig(root, "core.hooksPath");
150
+ if (current === null) {
151
+ return { step: "unset-hooks", status: "skipped", detail: "core.hooksPath not set" };
152
+ }
153
+ const ours = current === COMMITTED_HOOKS_PATH || current === cairnDir(root, "git-hooks");
154
+ if (!ours) {
155
+ return {
156
+ step: "unset-hooks",
157
+ status: "warn",
158
+ detail: `core.hooksPath is '${current}' (not Cairn's) — left untouched`,
159
+ };
160
+ }
161
+ if (!dryRun) {
162
+ try {
163
+ execFileSync("git", ["config", "--unset", "core.hooksPath"], { cwd: root, stdio: "ignore" });
164
+ }
165
+ catch {
166
+ return { step: "unset-hooks", status: "warn", detail: "failed to unset core.hooksPath" };
167
+ }
168
+ }
169
+ return { step: "unset-hooks", status: "ok", detail: `${dryRun ? "would unset" : "unset"} core.hooksPath` };
170
+ }
171
+ function readGitConfig(root, key) {
172
+ try {
173
+ const out = execFileSync("git", ["config", "--get", key], {
174
+ cwd: root,
175
+ encoding: "utf8",
176
+ stdio: ["ignore", "pipe", "ignore"],
177
+ });
178
+ const trimmed = out.trim();
179
+ return trimmed.length === 0 ? null : trimmed;
180
+ }
181
+ catch {
182
+ return null;
183
+ }
184
+ }
185
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/uninstall/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,MAAM,EACN,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ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C3F,CAAC;IACH,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,iBAAiB,EAAE,CAAC;AAC7G,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,GAAW;IAC9C,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;YACxD,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC;SACpC,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC;QAC3B,OAAO,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isaacriehm/cairn-core",
3
- "version": "0.22.5",
3
+ "version": "0.23.0",
4
4
  "description": "Cairn core — state + context layer. Curated `.cairn/ground/` (decisions, §INV invariants, canonical-map, brand, quality-grades), MCP server, init wizard, hook runners, sensors, GC drift sweep.",
5
5
  "author": "Isaac Riehm",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  "simple-git": "^3.36.0",
40
40
  "yaml": "^2.9.0",
41
41
  "zod": "^4.4.3",
42
- "@isaacriehm/cairn-state": "0.22.5"
42
+ "@isaacriehm/cairn-state": "0.23.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/cli-progress": "^3.11.6",