ctxr-cli 0.4.0 → 0.5.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 (137) hide show
  1. package/dist/adapters/harness/claude-code.d.ts +0 -6
  2. package/dist/adapters/harness/claude-code.d.ts.map +1 -1
  3. package/dist/adapters/harness/claude-code.js +44 -25
  4. package/dist/adapters/harness/claude-code.js.map +1 -1
  5. package/dist/adapters/types.d.ts +28 -9
  6. package/dist/adapters/types.d.ts.map +1 -1
  7. package/dist/commands/adapters-generate.d.ts.map +1 -1
  8. package/dist/commands/adapters-generate.js +15 -3
  9. package/dist/commands/adapters-generate.js.map +1 -1
  10. package/dist/commands/adapters-write-gate.d.ts +20 -0
  11. package/dist/commands/adapters-write-gate.d.ts.map +1 -0
  12. package/dist/commands/adapters-write-gate.js +77 -0
  13. package/dist/commands/adapters-write-gate.js.map +1 -0
  14. package/dist/commands/init.d.ts.map +1 -1
  15. package/dist/commands/init.js +57 -9
  16. package/dist/commands/init.js.map +1 -1
  17. package/dist/commands/rollup-write.d.ts.map +1 -1
  18. package/dist/commands/rollup-write.js +8 -0
  19. package/dist/commands/rollup-write.js.map +1 -1
  20. package/dist/commands/session-land.d.ts.map +1 -1
  21. package/dist/commands/session-land.js +55 -24
  22. package/dist/commands/session-land.js.map +1 -1
  23. package/dist/commands/verify.d.ts +9 -2
  24. package/dist/commands/verify.d.ts.map +1 -1
  25. package/dist/commands/verify.js +50 -27
  26. package/dist/commands/verify.js.map +1 -1
  27. package/dist/config/defaults.d.ts +20 -4
  28. package/dist/config/defaults.d.ts.map +1 -1
  29. package/dist/config/defaults.js +20 -4
  30. package/dist/config/defaults.js.map +1 -1
  31. package/dist/config/schema.d.ts +29 -5
  32. package/dist/config/schema.d.ts.map +1 -1
  33. package/dist/config/schema.js +73 -5
  34. package/dist/config/schema.js.map +1 -1
  35. package/dist/core/agents-doc.d.ts +71 -16
  36. package/dist/core/agents-doc.d.ts.map +1 -1
  37. package/dist/core/agents-doc.js +220 -139
  38. package/dist/core/agents-doc.js.map +1 -1
  39. package/dist/core/checks/harness-portability-checks.d.ts +12 -0
  40. package/dist/core/checks/harness-portability-checks.d.ts.map +1 -0
  41. package/dist/core/checks/harness-portability-checks.js +39 -0
  42. package/dist/core/checks/harness-portability-checks.js.map +1 -0
  43. package/dist/core/checks/integrity-checks.d.ts +25 -1
  44. package/dist/core/checks/integrity-checks.d.ts.map +1 -1
  45. package/dist/core/checks/integrity-checks.js +136 -3
  46. package/dist/core/checks/integrity-checks.js.map +1 -1
  47. package/dist/core/checks/manifest.d.ts.map +1 -1
  48. package/dist/core/checks/manifest.js +2 -0
  49. package/dist/core/checks/manifest.js.map +1 -1
  50. package/dist/core/checks/organize-checks.d.ts +12 -0
  51. package/dist/core/checks/organize-checks.d.ts.map +1 -1
  52. package/dist/core/checks/organize-checks.js +51 -1
  53. package/dist/core/checks/organize-checks.js.map +1 -1
  54. package/dist/core/convention-doc.d.ts +33 -0
  55. package/dist/core/convention-doc.d.ts.map +1 -0
  56. package/dist/core/convention-doc.js +110 -0
  57. package/dist/core/convention-doc.js.map +1 -0
  58. package/dist/core/conventions.d.ts +25 -5
  59. package/dist/core/conventions.d.ts.map +1 -1
  60. package/dist/core/conventions.js +65 -3
  61. package/dist/core/conventions.js.map +1 -1
  62. package/dist/core/errors.d.ts.map +1 -1
  63. package/dist/core/errors.js +2 -1
  64. package/dist/core/errors.js.map +1 -1
  65. package/dist/core/fs/fenced-region.d.ts +38 -0
  66. package/dist/core/fs/fenced-region.d.ts.map +1 -1
  67. package/dist/core/fs/fenced-region.js +88 -2
  68. package/dist/core/fs/fenced-region.js.map +1 -1
  69. package/dist/core/git/repo.d.ts +10 -0
  70. package/dist/core/git/repo.d.ts.map +1 -1
  71. package/dist/core/git/repo.js +28 -0
  72. package/dist/core/git/repo.js.map +1 -1
  73. package/dist/core/git/worktree.d.ts +8 -0
  74. package/dist/core/git/worktree.d.ts.map +1 -1
  75. package/dist/core/git/worktree.js +11 -0
  76. package/dist/core/git/worktree.js.map +1 -1
  77. package/dist/core/hooks.d.ts +10 -0
  78. package/dist/core/hooks.d.ts.map +1 -1
  79. package/dist/core/hooks.js +37 -10
  80. package/dist/core/hooks.js.map +1 -1
  81. package/dist/core/json-config-merge.d.ts +26 -2
  82. package/dist/core/json-config-merge.d.ts.map +1 -1
  83. package/dist/core/json-config-merge.js +61 -7
  84. package/dist/core/json-config-merge.js.map +1 -1
  85. package/dist/core/migrations/registry.d.ts.map +1 -1
  86. package/dist/core/migrations/registry.js +7 -1
  87. package/dist/core/migrations/registry.js.map +1 -1
  88. package/dist/core/migrations/rename-conventions-path.d.ts +26 -0
  89. package/dist/core/migrations/rename-conventions-path.d.ts.map +1 -0
  90. package/dist/core/migrations/rename-conventions-path.js +86 -0
  91. package/dist/core/migrations/rename-conventions-path.js.map +1 -0
  92. package/dist/core/migrations/rename-procedures-path.d.ts +17 -0
  93. package/dist/core/migrations/rename-procedures-path.d.ts.map +1 -0
  94. package/dist/core/migrations/rename-procedures-path.js +45 -0
  95. package/dist/core/migrations/rename-procedures-path.js.map +1 -0
  96. package/dist/core/notes/list.js +5 -5
  97. package/dist/core/notes/list.js.map +1 -1
  98. package/dist/core/reconcile.d.ts.map +1 -1
  99. package/dist/core/reconcile.js +32 -5
  100. package/dist/core/reconcile.js.map +1 -1
  101. package/dist/core/rollup.d.ts +2 -2
  102. package/dist/core/rollup.d.ts.map +1 -1
  103. package/dist/core/rollup.js +24 -3
  104. package/dist/core/rollup.js.map +1 -1
  105. package/dist/core/{procedures.d.ts → skills.d.ts} +12 -12
  106. package/dist/core/skills.d.ts.map +1 -0
  107. package/dist/core/{procedures.js → skills.js} +25 -41
  108. package/dist/core/skills.js.map +1 -0
  109. package/dist/core/templates.d.ts +20 -0
  110. package/dist/core/templates.d.ts.map +1 -0
  111. package/dist/core/templates.js +68 -0
  112. package/dist/core/templates.js.map +1 -0
  113. package/dist/core/write-lifecycle/path-gate.d.ts +28 -0
  114. package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
  115. package/dist/core/write-lifecycle/path-gate.js +78 -22
  116. package/dist/core/write-lifecycle/path-gate.js.map +1 -1
  117. package/dist/run.d.ts.map +1 -1
  118. package/dist/run.js +12 -1
  119. package/dist/run.js.map +1 -1
  120. package/dist/version.d.ts +1 -1
  121. package/dist/version.js +1 -1
  122. package/package.json +1 -1
  123. package/templates/agents/canonical.md +20 -0
  124. package/templates/agents/capture-and-ingest.md +17 -0
  125. package/templates/agents/conventions.md +5 -0
  126. package/templates/agents/mission.md +5 -0
  127. package/templates/agents/placement-no-layers.md +5 -0
  128. package/templates/agents/placement.md +7 -0
  129. package/templates/agents/retrieval-leg-routing.md +14 -0
  130. package/templates/conventions/baseline-convention.md +60 -0
  131. package/templates/conventions/custom-convention-seed.md +21 -0
  132. package/templates/hooks/claude-code-write-gate.sh +15 -0
  133. package/templates/skills/ctxr-connection-finding.md +1 -1
  134. package/templates/skills/ctxr-ingest-orchestration.md +1 -1
  135. package/templates/skills/ctxr-land.md +11 -6
  136. package/dist/core/procedures.d.ts.map +0 -1
  137. package/dist/core/procedures.js.map +0 -1
@@ -5,7 +5,7 @@ import { isInteractive } from '../core/env.js';
5
5
  import { MergeNotConfirmedError, NoForgeConfiguredError, PullRequestClosedError, PullRequestHeadMismatchError, PullRequestNotMergeableError, SessionLandConsentRequiredError, SessionLandOnDefaultBranchError, } from '../core/errors.js';
6
6
  import { ExitCode } from '../core/exit-codes.js';
7
7
  import { currentBranch } from '../core/git/repo.js';
8
- import { fetchOrigin, listWorktrees, removeWorktree, deleteBranch, hasRemote } from '../core/git/worktree.js';
8
+ import { fetchOrigin, listWorktrees, mainWorktreePath, removeWorktree, deleteBranch, hasRemote } from '../core/git/worktree.js';
9
9
  import { isWorkingTreeClean } from '../core/git/repo.js';
10
10
  import { isSessionBranch, isSessionWorktreePath } from '../core/session.js';
11
11
  export const requires = { store: 'required' };
@@ -23,19 +23,31 @@ export async function execute(env, store, flags, registry = BUILTIN_ADAPTERS) {
23
23
  throw new SessionLandConsentRequiredError();
24
24
  }
25
25
  const defaultBranch = store.config.git.default_branch;
26
- const branch = flags.branch ?? (await currentBranch(env.git, store.root));
27
- if (branch === defaultBranch) {
28
- throw new SessionLandOnDefaultBranchError(branch);
26
+ // The target comes from exactly one source: --branch names it outright,
27
+ // --pr defers to the pull request's head branch, and with neither it is the
28
+ // branch checked out where the command was invoked. Only the first two are
29
+ // knowable without the forge, so only they can be refused before contacting it.
30
+ const requested = flags.branch ?? (flags.pr === undefined ? await currentBranch(env.git, store.root) : undefined);
31
+ if (requested === defaultBranch) {
32
+ throw new SessionLandOnDefaultBranchError(requested);
29
33
  }
30
34
  const [forgeAdapter] = configuredAdapters(store.config, 'forge', registry);
31
35
  if (!forgeAdapter || !(await forgeAdapter.isAvailable(store.root))) {
32
36
  throw new NoForgeConfiguredError();
33
37
  }
34
- const ref = flags.pr !== undefined ? String(flags.pr) : branch;
38
+ const ref = flags.pr !== undefined ? String(flags.pr) : requested;
35
39
  let pr = await forgeAdapter.pullRequest(store.root, ref);
36
- if (pr.headBranch !== branch) {
37
- throw new PullRequestHeadMismatchError(branch, pr.headBranch);
40
+ if (requested === undefined) {
41
+ // The target IS the head branch, so there is nothing to mismatch — but the
42
+ // default branch is still refused, now on the branch the forge reported.
43
+ if (pr.headBranch === defaultBranch) {
44
+ throw new SessionLandOnDefaultBranchError(pr.headBranch);
45
+ }
46
+ }
47
+ else if (pr.headBranch !== requested) {
48
+ throw new PullRequestHeadMismatchError(requested, pr.headBranch);
38
49
  }
50
+ const branch = requested ?? pr.headBranch;
39
51
  let merged = pr.state === 'merged';
40
52
  let gate = 'not_required';
41
53
  if (pr.state === 'closed') {
@@ -62,38 +74,43 @@ export async function execute(env, store, flags, registry = BUILTIN_ADAPTERS) {
62
74
  pr = after;
63
75
  merged = true;
64
76
  }
65
- const sync = await syncRootCheckout(env, store, defaultBranch);
66
- const reap = await reapWorktree(env, store, branch, flags.reap ?? false);
77
+ const clone = await mainWorktreePath(env.git, store.root);
78
+ const sync = await syncCanonicalClone(env, clone, defaultBranch);
79
+ const reap = await reapWorktree(env, store, clone, branch, flags.reap ?? false);
67
80
  return outcome(store, branch, pr, gate, merged, sync, reap);
68
81
  }
69
82
  function gateMessage(pr) {
70
83
  return `PR #${pr.number} "${pr.title}" (${pr.url}) — OPEN, MERGEABLE. Merge?`;
71
84
  }
72
- /** D2: fast-forward only, in whatever checkout this command runs from — never checked out, reset, or discarded. */
73
- async function syncRootCheckout(env, store, defaultBranch) {
74
- const branch = await currentBranch(env.git, store.root);
85
+ /**
86
+ * D2: fast-forward only, in the store's canonical clone — the checkout the
87
+ * default branch lives in, whichever checkout the command was invoked from
88
+ * (a session worktree, most often). Never checked out, reset, or discarded.
89
+ */
90
+ async function syncCanonicalClone(env, clone, defaultBranch) {
91
+ const branch = await currentBranch(env.git, clone);
75
92
  if (branch !== defaultBranch) {
76
- return { attempted: false, synced: false, reason: 'root checkout is not on the default branch' };
93
+ return { attempted: false, synced: false, reason: `the canonical clone (${clone}) is not on the default branch` };
77
94
  }
78
- if (!(await hasRemote(env.git, store.root))) {
95
+ if (!(await hasRemote(env.git, clone))) {
79
96
  return { attempted: false, synced: false, reason: 'no remote configured' };
80
97
  }
81
- const fetched = await fetchOrigin(env.git, store.root, defaultBranch);
98
+ const fetched = await fetchOrigin(env.git, clone, defaultBranch);
82
99
  if (!fetched) {
83
100
  return { attempted: true, synced: false, reason: 'fetch failed' };
84
101
  }
85
- const merge = await env.git.run(['merge', '--ff-only', `origin/${defaultBranch}`], { cwd: store.root, allowFailure: true });
102
+ const merge = await env.git.run(['merge', '--ff-only', `origin/${defaultBranch}`], { cwd: clone, allowFailure: true });
86
103
  if (merge.exitCode !== 0) {
87
104
  return { attempted: true, synced: false, reason: 'cannot fast-forward (diverged from origin)' };
88
105
  }
89
106
  return { attempted: true, synced: true };
90
107
  }
91
108
  /** D3: opt-in, and scoped to a worktree `session start` made — never the one this command is currently running from. */
92
- async function reapWorktree(env, store, branch, requested) {
109
+ async function reapWorktree(env, store, clone, branch, requested) {
93
110
  if (!requested) {
94
111
  return { attempted: false, reaped: false, reason: 'pass --reap, or run `ctxr session reap`' };
95
112
  }
96
- const worktrees = await listWorktrees(env.git, store.root);
113
+ const worktrees = await listWorktrees(env.git, clone);
97
114
  const target = worktrees.find((w) => w.branch === branch);
98
115
  if (!target) {
99
116
  return { attempted: true, reaped: false, reason: 'no worktree found for this branch' };
@@ -101,26 +118,40 @@ async function reapWorktree(env, store, branch, requested) {
101
118
  if (!isSessionBranch(store.config, branch) && !isSessionWorktreePath(store.config, target.path)) {
102
119
  return { attempted: true, reaped: false, reason: 'not a session worktree' };
103
120
  }
104
- if (path.resolve(target.path) === path.resolve(store.root)) {
121
+ // The hazard is the INVOKING directory, not the resolved store root: removing
122
+ // the worktree this process stands in pulls the caller's cwd out from under it.
123
+ if (isInside(env.cwd, target.path)) {
105
124
  return {
106
125
  attempted: true,
107
126
  reaped: false,
108
- reason: 'cannot remove the worktree this command is currently running from; run `ctxr session reap` from elsewhere',
127
+ reason: `cannot remove the worktree this command is running from; re-run from the canonical clone (${clone}), or run \`ctxr session reap\` there`,
109
128
  };
110
129
  }
111
130
  if (!(await isWorkingTreeClean(env.git, target.path))) {
112
131
  return { attempted: true, reaped: false, reason: 'worktree has uncommitted changes' };
113
132
  }
114
- await removeWorktree(env.git, store.root, target.path);
115
- await deleteBranch(env.git, store.root, branch);
133
+ await removeWorktree(env.git, clone, target.path);
134
+ await deleteBranch(env.git, clone, branch);
116
135
  return { attempted: true, reaped: true };
117
136
  }
137
+ /** True when `dir` IS `parent` or lies anywhere beneath it. */
138
+ function isInside(dir, parent) {
139
+ const resolved = path.resolve(dir);
140
+ const root = path.resolve(parent);
141
+ return resolved === root || resolved.startsWith(root + path.sep);
142
+ }
143
+ /** A step that did not happen names why, whether or not it was attempted — `attempted` stays on the JSON outcome for callers that distinguish the two. */
144
+ function stepSummary(done, reason) {
145
+ if (done)
146
+ return 'ok';
147
+ return reason ? `skipped: ${reason}` : 'not attempted';
148
+ }
118
149
  function outcome(store, branch, pr, gate, merged, sync, reap) {
119
150
  const summary = gate === 'declined'
120
151
  ? `Merge declined for PR #${pr.number}; nothing landed.`
121
152
  : `PR #${pr.number} ${merged ? 'merged' : 'not merged'}` +
122
- `; sync ${sync.synced ? 'ok' : sync.attempted ? 'skipped: ' + sync.reason : 'not attempted'}` +
123
- `; reap ${reap.reaped ? 'ok' : reap.attempted ? 'skipped: ' + reap.reason : 'not attempted'}.`;
153
+ `; sync ${stepSummary(sync.synced, sync.reason)}` +
154
+ `; reap ${stepSummary(reap.reaped, reap.reason)}.`;
124
155
  return {
125
156
  exitCode: ExitCode.Ok,
126
157
  data: {
@@ -1 +1 @@
1
- {"version":3,"file":"session-land.js","sourceRoot":"","sources":["../../src/commands/session-land.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,EAAE,aAAa,EAAe,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,4BAA4B,EAC5B,4BAA4B,EAC5B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAC9G,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG5E,MAAM,CAAC,MAAM,QAAQ,GAAoB,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AAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE;YACjG,IAAI;YACJ,MAAM;YACN,IAAI;YACJ,IAAI;SACL;QACD,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,OAAO;QACrB,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
@@ -16,8 +16,15 @@ export interface VerifyData {
16
16
  * harness-portability spec: exercises core store operations "from an
17
17
  * environment with no harness-specific state present" — nothing here reads
18
18
  * any harness-specific file or env var, so the property under test holds
19
- * by construction; this command just runs the three named operations in
20
- * order and stops at the first failure, naming it (never running the rest).
19
+ * by construction; this command runs each named operation in order and
20
+ * stops at the first failure, naming it (never running the rest).
21
+ *
22
+ * inline-conventions-and-mission: the old "every skill has an index entry"
23
+ * check is gone along with the index itself. Portability is now verified by
24
+ * confirming every managed AGENTS.md section is present, that its inlined
25
+ * conventions/mission content matches the source files on disk (the same
26
+ * drift `ctxr doctor` checks — see `integrity-checks.ts`), and that a skill
27
+ * is reachable by path at the configured skills path.
21
28
  */
22
29
  export declare function execute(store: Store, _flags?: VerifyFlags): Promise<CommandOutcome<VerifyData>>;
23
30
  //# sourceMappingURL=verify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAU1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAMD;;;;;;GAMG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,GAAE,WAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAkFzG"}
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAoB1E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B;AAWD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,GAAE,WAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CA8FzG"}
@@ -1,23 +1,36 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
- import { agentsMdPath } from '../core/agents-doc.js';
3
+ import { AGENTS_MD_CANONICAL_FENCE, AGENTS_MD_CAPTURE_FENCE, AGENTS_MD_CONVENTIONS_FENCE, AGENTS_MD_LEG_ROUTING_FENCE, AGENTS_MD_PLACEMENT_FENCE, agentsMdPath, checkAgentsMdDrift, } from '../core/agents-doc.js';
4
4
  import { readCatalogSection } from '../core/catalog/build.js';
5
5
  import { catalogSectionsFor } from '../core/catalog/model.js';
6
6
  import { ExitCode } from '../core/exit-codes.js';
7
+ import { readFencedRegionFromFile } from '../core/fs/fenced-region.js';
7
8
  import { buildGraphFromNotes, graphBuildOptions } from '../core/graph/model.js';
8
9
  import { writeGraph } from '../core/graph/persist.js';
9
10
  import { listNotes } from '../core/notes/list.js';
10
- import { scanProcedures } from '../core/procedures.js';
11
+ import { scanSkills } from '../core/skills.js';
11
12
  export const requires = { store: 'required' };
12
- function procedureIndexEntry(name, relativePath) {
13
- return `[${name}](${relativePath})`;
14
- }
13
+ /** Every section that renders unconditionally — Mission is checked separately since it's optional. */
14
+ const ALWAYS_PRESENT_SECTIONS = [
15
+ { label: 'store fundamentals', fence: AGENTS_MD_CANONICAL_FENCE },
16
+ { label: 'retrieval routing', fence: AGENTS_MD_LEG_ROUTING_FENCE },
17
+ { label: 'capture', fence: AGENTS_MD_CAPTURE_FENCE },
18
+ { label: 'placement', fence: AGENTS_MD_PLACEMENT_FENCE },
19
+ { label: 'store conventions', fence: AGENTS_MD_CONVENTIONS_FENCE },
20
+ ];
15
21
  /**
16
22
  * harness-portability spec: exercises core store operations "from an
17
23
  * environment with no harness-specific state present" — nothing here reads
18
24
  * any harness-specific file or env var, so the property under test holds
19
- * by construction; this command just runs the three named operations in
20
- * order and stops at the first failure, naming it (never running the rest).
25
+ * by construction; this command runs each named operation in order and
26
+ * stops at the first failure, naming it (never running the rest).
27
+ *
28
+ * inline-conventions-and-mission: the old "every skill has an index entry"
29
+ * check is gone along with the index itself. Portability is now verified by
30
+ * confirming every managed AGENTS.md section is present, that its inlined
31
+ * conventions/mission content matches the source files on disk (the same
32
+ * drift `ctxr doctor` checks — see `integrity-checks.ts`), and that a skill
33
+ * is reachable by path at the configured skills path.
21
34
  */
22
35
  export async function execute(store, _flags = {}) {
23
36
  const steps = [];
@@ -51,49 +64,59 @@ export async function execute(store, _flags = {}) {
51
64
  });
52
65
  return finish(store, steps);
53
66
  }
54
- // 3. Follow one procedure via the AGENTS.md index: every canonical
55
- // procedure must have an index entry, and at least one must be readable.
56
- let agentsMdContent;
57
- try {
58
- agentsMdContent = await readFile(agentsMdPath(store.root), 'utf8');
67
+ // 3. Every managed AGENTS.md section is present.
68
+ for (const { label, fence } of ALWAYS_PRESENT_SECTIONS) {
69
+ const region = await readFencedRegionFromFile(agentsMdPath(store.root), fence);
70
+ if (region.length === 0) {
71
+ steps.push({
72
+ operation: `AGENTS.md section: ${label}`,
73
+ status: 'fail',
74
+ detail: `The "${label}" section is missing from AGENTS.md — run \`ctxr update\`.`,
75
+ });
76
+ return finish(store, steps);
77
+ }
59
78
  }
60
- catch (err) {
79
+ steps.push({ operation: 'AGENTS.md sections present', status: 'pass' });
80
+ // 4. Inlined conventions/mission content matches its source files.
81
+ const drift = await checkAgentsMdDrift(store.root, store.config);
82
+ if (drift.driftedConventions.length > 0) {
61
83
  steps.push({
62
- operation: 'procedure index (AGENTS.md)',
84
+ operation: 'inlined conventions match source',
63
85
  status: 'fail',
64
- detail: err instanceof Error ? err.message : String(err),
86
+ detail: `AGENTS.md's "Store conventions" section no longer matches: ${drift.driftedConventions.join(', ')} — run \`ctxr update\`.`,
65
87
  });
66
88
  return finish(store, steps);
67
89
  }
68
- // entry-doc-generation spec: the index must cover every procedure actually
69
- // on disk — shipped seeds and operator-added files alike.
70
- const procedures = await scanProcedures(store.root, store.config);
71
- for (const procedure of procedures) {
72
- if (!agentsMdContent.includes(procedureIndexEntry(procedure.title, procedure.path))) {
90
+ steps.push({ operation: 'inlined conventions match source', status: 'pass' });
91
+ if (store.config.organize.mission_path) {
92
+ if (drift.driftedMission) {
73
93
  steps.push({
74
- operation: `procedure index entry for "${procedure.title}"`,
94
+ operation: 'inlined mission matches source',
75
95
  status: 'fail',
76
- detail: `AGENTS.md's procedure index has no entry for "${procedure.title}".`,
96
+ detail: `AGENTS.md's "Mission" section no longer matches "${drift.driftedMission}" — run \`ctxr update\`.`,
77
97
  });
78
98
  return finish(store, steps);
79
99
  }
100
+ steps.push({ operation: 'inlined mission matches source', status: 'pass' });
80
101
  }
81
- const first = procedures[0];
102
+ // 6. Follow one skill by path at the configured skills path.
103
+ const skills = await scanSkills(store.root, store.config);
104
+ const first = skills[0];
82
105
  if (!first) {
83
106
  steps.push({
84
- operation: 'follow a procedure',
107
+ operation: 'follow a skill',
85
108
  status: 'fail',
86
- detail: `No procedure files exist at "${store.config.harness.procedures_path}".`,
109
+ detail: `No skill files exist at "${store.config.harness.skills_path}".`,
87
110
  });
88
111
  return finish(store, steps);
89
112
  }
90
113
  try {
91
114
  await readFile(path.join(store.root, first.path), 'utf8');
92
- steps.push({ operation: `follow procedure "${first.title}"`, status: 'pass' });
115
+ steps.push({ operation: `follow skill "${first.title}" by path`, status: 'pass' });
93
116
  }
94
117
  catch (err) {
95
118
  steps.push({
96
- operation: `follow procedure "${first.title}"`,
119
+ operation: `follow skill "${first.title}" by path`,
97
120
  status: 'fail',
98
121
  detail: err instanceof Error ? err.message : String(err),
99
122
  });
@@ -1 +1 @@
1
- {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/commands/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAA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MAAM;QAChC,CAAC,CAAC;YACE;gBACE,IAAI,EAAE,wBAAwB;gBAC9B,QAAQ,EAAE,OAAO;gBACjB,OAAO,EAAE,IAAI,MAAM,CAAC,SAAS,aAAa,MAAM,CAAC,MAAM,IAAI,aAAa,EAAE;gBAC1E,OAAO,EAAE,MAAM,CAAC,SAAS;aAC1B;SACF;QACH,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO;QACL,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE;QACrD,IAAI,EAAE,EAAE,KAAK,EAAE;QACf,QAAQ;QACR,YAAY,EAAE,MAAM;YAClB,CAAC,CAAC,gCAAgC,MAAM,CAAC,SAAS,EAAE;YACpD,CAAC,CAAC,0BAA0B,KAAK,CAAC,MAAM,0BAA0B;QACpE,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
@@ -25,7 +25,7 @@ export declare const DEFAULT_VISIBILITY_CONTEXT = "private";
25
25
  /**
26
26
  * context-store spec (contexture-home-layout): `.contexture/` is the tool's
27
27
  * home directory. Only its cache subpath is derived/gitignored — the
28
- * catalog and procedure subdirectories are authored-but-tool-owned and stay
28
+ * catalog and skill subdirectories are authored-but-tool-owned and stay
29
29
  * tracked.
30
30
  */
31
31
  export declare const DEFAULT_DERIVED_PATHS: readonly ['.contexture/cache/'];
@@ -35,9 +35,25 @@ export declare const DEFAULT_DERIVED_PATHS: readonly ['.contexture/cache/'];
35
35
  * harnesses with skill auto-discovery read — one file, one hop. A store
36
36
  * driven by another harness points this at that harness's skills directory.
37
37
  */
38
- export declare const DEFAULT_PROCEDURES_PATH = ".claude/skills/";
39
- /** harness-portability spec (entry-doc-generation): operator-authored convention docs, indexed by AGENTS.md. */
40
- export declare const DEFAULT_CONVENTIONS_PATH = ".contexture/conventions/";
38
+ export declare const DEFAULT_SKILLS_PATH = ".claude/skills/";
39
+ /**
40
+ * harness-portability spec: the guidance directory holding contexture's
41
+ * shipped baseline convention file, the operator's own convention files
42
+ * (inlined into AGENTS.md's "Store conventions" section — see
43
+ * agents-doc.ts, from inline-conventions-and-mission), and (per
44
+ * context-organize) the mission document.
45
+ */
46
+ export declare const DEFAULT_GUIDANCE_PATH = ".contexture/guidance/";
47
+ /** The shipped, contexture-owned baseline convention — never hand-edited; refreshed by `ctxr update` like a skill copy. */
48
+ export declare const DEFAULT_BASELINE_CONVENTION_FILE_NAME = "baseline-convention.md";
49
+ /** The operator-authored convention file seeded at init. */
50
+ export declare const DEFAULT_CUSTOM_CONVENTION_FILE_NAME = "custom-convention.md";
51
+ /** context-organize spec: the store's standing current-state document's filename, under the guidance directory. */
52
+ export declare const DEFAULT_MISSION_FILE_NAME = "mission.md";
53
+ /** context-organize spec: `organize.mission_path`'s shipped default — every store gets a mission document from `init` onward, seeded there. */
54
+ export declare const DEFAULT_MISSION_PATH = ".contexture/guidance/mission.md";
55
+ /** store-integrity spec: AGENTS.md's inlined "Store conventions" section's size ceiling when `harness.convention_max_bytes` is unset. */
56
+ export declare const DEFAULT_CONVENTION_MAX_BYTES: number;
41
57
  /** Paths excluded from every retrieval leg by default. */
42
58
  export declare const DEFAULT_EXCLUDE_PATHS: readonly ['.contexture/'];
43
59
  /** graph-context-document spec: no relation vocabulary by default — no typed edges until a store declares names. */
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,UAAU,CAAC;AAEtD,gFAAgF;AAChF,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAEpD;;;;;GAKG;A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AC3H,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,6GAA6G;AAC7G,eAAO,MAAM,iCAAiC,QAAY,CAAC;AAE3D,8JAA8J;AAC9J,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAAO,CAAC;AAChE,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAAO,CAAC;AAEhE,uGAAuG;AACvG,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,gJAAgJ;AAChJ,eAAO,MAAM,uBAAuB,UAA6F,CAAC;AAElI,4FAA4F;AAC5F,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C,iHAAiH;AACjH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAGzD,CAAC"}
@@ -24,7 +24,7 @@ export const DEFAULT_VISIBILITY_CONTEXT = 'private';
24
24
  /**
25
25
  * context-store spec (contexture-home-layout): `.contexture/` is the tool's
26
26
  * home directory. Only its cache subpath is derived/gitignored — the
27
- * catalog and procedure subdirectories are authored-but-tool-owned and stay
27
+ * catalog and skill subdirectories are authored-but-tool-owned and stay
28
28
  * tracked.
29
29
  */
30
30
  export const DEFAULT_DERIVED_PATHS = ['.contexture/cache/'];
@@ -34,9 +34,25 @@ export const DEFAULT_DERIVED_PATHS = ['.contexture/cache/'];
34
34
  * harnesses with skill auto-discovery read — one file, one hop. A store
35
35
  * driven by another harness points this at that harness's skills directory.
36
36
  */
37
- export const DEFAULT_PROCEDURES_PATH = '.claude/skills/';
38
- /** harness-portability spec (entry-doc-generation): operator-authored convention docs, indexed by AGENTS.md. */
39
- export const DEFAULT_CONVENTIONS_PATH = '.contexture/conventions/';
37
+ export const DEFAULT_SKILLS_PATH = '.claude/skills/';
38
+ /**
39
+ * harness-portability spec: the guidance directory holding contexture's
40
+ * shipped baseline convention file, the operator's own convention files
41
+ * (inlined into AGENTS.md's "Store conventions" section — see
42
+ * agents-doc.ts, from inline-conventions-and-mission), and (per
43
+ * context-organize) the mission document.
44
+ */
45
+ export const DEFAULT_GUIDANCE_PATH = '.contexture/guidance/';
46
+ /** The shipped, contexture-owned baseline convention — never hand-edited; refreshed by `ctxr update` like a skill copy. */
47
+ export const DEFAULT_BASELINE_CONVENTION_FILE_NAME = 'baseline-convention.md';
48
+ /** The operator-authored convention file seeded at init. */
49
+ export const DEFAULT_CUSTOM_CONVENTION_FILE_NAME = 'custom-convention.md';
50
+ /** context-organize spec: the store's standing current-state document's filename, under the guidance directory. */
51
+ export const DEFAULT_MISSION_FILE_NAME = 'mission.md';
52
+ /** context-organize spec: `organize.mission_path`'s shipped default — every store gets a mission document from `init` onward, seeded there. */
53
+ export const DEFAULT_MISSION_PATH = `${DEFAULT_GUIDANCE_PATH}${DEFAULT_MISSION_FILE_NAME}`;
54
+ /** store-integrity spec: AGENTS.md's inlined "Store conventions" section's size ceiling when `harness.convention_max_bytes` is unset. */
55
+ export const DEFAULT_CONVENTION_MAX_BYTES = 32 * 1024;
40
56
  /** Paths excluded from every retrieval leg by default. */
41
57
  export const DEFAULT_EXCLUDE_PATHS = ['.contexture/'];
42
58
  /** graph-context-document spec: no relation vocabulary by default — no typed edges until a store declares names. */
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,OAAO,CAAC;AAEtD,gFAAgF;AAChF,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,oBAAoB,CAAU,CAAC;AAErE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,iBAAiB,CAAC;AAEzD,gHAAgH;AAChH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AAE;CAClD,CAAC"}
@@ -10,8 +10,19 @@ import { z } from 'zod';
10
10
  * is "a config-default change plus a migration, never a spec or code
11
11
  * rewrite" (design.md D7): every consumer already reads
12
12
  * config.fields.visibility, never a literal key, so nothing else changed.
13
+ *
14
+ * Bumped to 3 by the procedures-to-skills key rename migration
15
+ * (rename-procedures-to-skills, 0003-rename-procedures-path-to-skills):
16
+ * `harness.procedures_path` -> `harness.skills_path`. HarnessSchema's
17
+ * transform accepts the old key through this version so an unmigrated
18
+ * store still loads (see schema.ts's HarnessSchema comment).
19
+ *
20
+ * Bumped to 4 by the conventions-to-guidance key rename migration
21
+ * (rename-conventions-path-to-guidance-path, 0004-rename-conventions-path-to-guidance-path):
22
+ * `harness.conventions_path` -> `harness.guidance_path`. HarnessSchema's
23
+ * transform accepts the old key through this version too, the same way.
13
24
  */
14
- export declare const SUPPORTED_SCHEMA_VERSION = 2;
25
+ export declare const SUPPORTED_SCHEMA_VERSION = 4;
15
26
  export declare const TaxonomyLayerSchema: z.ZodObject<{
16
27
  name: z.ZodString;
17
28
  path: z.ZodString;
@@ -124,10 +135,23 @@ export declare const StoreConfigSchema: z.ZodObject<{
124
135
  rollup_stale_days: z.ZodDefault<z.ZodNumber>;
125
136
  mission_path: z.ZodOptional<z.ZodString>;
126
137
  }, z.core.$strip>;
127
- harness: z.ZodObject<{
128
- procedures_path: z.ZodString;
129
- conventions_path: z.ZodDefault<z.ZodString>;
130
- }, z.core.$strip>;
138
+ harness: z.ZodPipe<z.ZodObject<{
139
+ skills_path: z.ZodOptional<z.ZodString>;
140
+ procedures_path: z.ZodOptional<z.ZodString>;
141
+ guidance_path: z.ZodOptional<z.ZodString>;
142
+ conventions_path: z.ZodOptional<z.ZodString>;
143
+ convention_max_bytes: z.ZodOptional<z.ZodNumber>;
144
+ }, z.core.$strip>, z.ZodTransform<{
145
+ skills_path: string;
146
+ guidance_path: string;
147
+ convention_max_bytes?: number | undefined;
148
+ }, {
149
+ skills_path?: string | undefined;
150
+ procedures_path?: string | undefined;
151
+ guidance_path?: string | undefined;
152
+ conventions_path?: string | undefined;
153
+ convention_max_bytes?: number | undefined;
154
+ }>>;
131
155
  adapters: z.ZodArray<z.ZodObject<{
132
156
  id: z.ZodString;
133
157
  kind: z.ZodEnum<{
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAqCH;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB;;;;;iBAKvB,CAAC;AA2CH;;;;;GAKG;AACH,QAAA,MAAM,cAAc;;;;;;;;;iBAQlB,CAAC;AAgDH,QAAA,MAAM,wBAAwB;;;;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBd,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAqCH;;;;;;GAMG;AACH,QAAA,MAAM,mBAAmB;;;;;iBAKvB,CAAC;AA2CH;;;;;GAKG;AACH,QAAA,MAAM,cAAc;;;;;;;;;iBAQlB,CAAC;AAyGH,QAAA,MAAM,wBAAwB;;;;;;;iBAI5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkBd,CAAC;AAEjB,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -10,8 +10,19 @@ import { z } from 'zod';
10
10
  * is "a config-default change plus a migration, never a spec or code
11
11
  * rewrite" (design.md D7): every consumer already reads
12
12
  * config.fields.visibility, never a literal key, so nothing else changed.
13
+ *
14
+ * Bumped to 3 by the procedures-to-skills key rename migration
15
+ * (rename-procedures-to-skills, 0003-rename-procedures-path-to-skills):
16
+ * `harness.procedures_path` -> `harness.skills_path`. HarnessSchema's
17
+ * transform accepts the old key through this version so an unmigrated
18
+ * store still loads (see schema.ts's HarnessSchema comment).
19
+ *
20
+ * Bumped to 4 by the conventions-to-guidance key rename migration
21
+ * (rename-conventions-path-to-guidance-path, 0004-rename-conventions-path-to-guidance-path):
22
+ * `harness.conventions_path` -> `harness.guidance_path`. HarnessSchema's
23
+ * transform accepts the old key through this version too, the same way.
13
24
  */
14
- export const SUPPORTED_SCHEMA_VERSION = 2;
25
+ export const SUPPORTED_SCHEMA_VERSION = 4;
15
26
  export const TaxonomyLayerSchema = z.object({
16
27
  name: z.string().min(1),
17
28
  path: z.string().min(1),
@@ -141,10 +152,67 @@ const OrganizeSchema = z.object({
141
152
  */
142
153
  mission_path: z.string().min(1).optional(),
143
154
  });
144
- /** harness-portability spec: the portable procedure pack and operator convention docs AGENTS.md's indexes point into. */
145
- const HarnessSchema = z.object({
146
- procedures_path: z.string().min(1),
147
- conventions_path: z.string().min(1).default('.contexture/conventions/'),
155
+ /**
156
+ * harness-portability spec: the portable skill pack and the guidance
157
+ * documents (a shipped baseline convention file, the operator's own
158
+ * convention files, and the mission document) AGENTS.md's generated
159
+ * sections read from and inline.
160
+ *
161
+ * rename-procedures-to-skills migration (0003): `skills_path` is the
162
+ * current key; `procedures_path` is its pre-migration name, accepted here
163
+ * so a store on schema 2 still loads (with a message pointing at `ctxr
164
+ * migrate`, not a raw shape-validation error) rather than failing the
165
+ * moment this schema starts requiring the new key.
166
+ *
167
+ * rename-conventions-path-to-guidance-path migration (0004): `guidance_path`
168
+ * is the current key; `conventions_path` is its pre-migration name. Unlike
169
+ * `skills_path`, this key always had a workable default, so an unmigrated
170
+ * store loads silently onto that default rather than erroring — `ctxr
171
+ * migrate` moves the directory and rewrites the key, but nothing breaks if
172
+ * it hasn't run yet.
173
+ *
174
+ * The transform below is the ONLY place any of these spellings is read —
175
+ * every other consumer in the codebase sees `config.harness.skills_path` /
176
+ * `config.harness.guidance_path` and nothing else, so no old key ever leaks
177
+ * past config loading.
178
+ */
179
+ const HarnessSchema = z
180
+ .object({
181
+ skills_path: z.string().min(1).optional(),
182
+ procedures_path: z.string().min(1).optional(),
183
+ guidance_path: z.string().min(1).optional(),
184
+ conventions_path: z.string().min(1).optional(),
185
+ /**
186
+ * compose-store-guidance-documents design.md D6: a size ceiling on
187
+ * AGENTS.md's inlined "Store conventions" section, guarding against
188
+ * unbounded growth now that its content is inlined rather than indexed
189
+ * (inline-conventions-and-mission). Optional with no schema-level
190
+ * default (falls back to `DEFAULT_CONVENTION_MAX_BYTES` at the one
191
+ * doctor check that reads it) so this stays purely additive — no
192
+ * existing `StoreConfig` object literal needs updating to compile.
193
+ */
194
+ convention_max_bytes: z.number().int().positive().optional(),
195
+ })
196
+ .transform((value, ctx) => {
197
+ const skillsPath = value.skills_path ?? value.procedures_path;
198
+ if (skillsPath === undefined) {
199
+ ctx.addIssue({
200
+ code: z.ZodIssueCode.custom,
201
+ path: ['skills_path'],
202
+ message: 'harness.skills_path is missing. If this store predates the skills-path rename, run `ctxr migrate`.',
203
+ });
204
+ return z.NEVER;
205
+ }
206
+ const guidancePath = value.guidance_path ?? value.conventions_path ?? '.contexture/guidance/';
207
+ // Spread, not a plain key, so the output type keeps `convention_max_bytes`
208
+ // genuinely optional (`key?: number`) rather than always-present-but-possibly-undefined
209
+ // (`key: number | undefined`) — the latter would require every existing
210
+ // `StoreConfig` object literal in the codebase to add the key just to compile.
211
+ return {
212
+ skills_path: skillsPath,
213
+ guidance_path: guidancePath,
214
+ ...(value.convention_max_bytes !== undefined ? { convention_max_bytes: value.convention_max_bytes } : {}),
215
+ };
148
216
  });
149
217
  /**
150
218
  * adapters spec: the one declared-registration mechanism shared by every