@mmnto/cli 1.53.5 → 1.53.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,186 @@
1
1
  /**
2
2
  * Parity-drift sensor for `totem doctor --parity` (mmnto-ai/totem-strategy#448).
3
3
  *
4
- * PR-1 (mmnto-ai/totem#2069): resolve the consumer-configured
5
- * `orient.parityManifest` config-path parse + Zod-validate the strategy-owned
6
- * `parity-manifest.yaml` emit `DiagnosticResult`s. The FIRST detection slice
7
- * is wired here: each `version-pinned` contract whose id resolves a deps package
8
- * name (`mmnto-cli-version`, `mmnto-totem-version`, `mmnto-mcp-version`,
9
- * `mmnto-pack-rust-architecture-version`) runs through the core
10
- * `detectVersionPinnedContract` engine (pin-currency verdict, local-only floor).
11
- * ALL other contracts — mechanical, manual-attestation, and the version-pinned
12
- * DOCTRINE pins (`governance-doctrine` / `agent-memory-doctrine`, which derive
13
- * no deps package name) — keep the `skip` info stub (their drift detection is a
14
- * follow-on).
4
+ * Detection is wired across all three tractability classes (mmnto-ai/totem#2073):
5
+ * - **version-pinned** (PR-1, mmnto-ai/totem#2069): each deps contract whose id
6
+ * resolves an `@mmnto/*` package name runs through the core
7
+ * `detectVersionPinnedContract` engine (pin-currency verdict, local-only floor).
8
+ * - **mechanical content-equality** (mmnto-ai/totem#2073): three artifact shapes,
9
+ * all local-read-only against the running `@mmnto/cli`'s OWN in-process template:
10
+ * · **skills** (`claude-skills`): managed-block equality of
11
+ * `.claude/skills/<name>/SKILL.md` via `detectMechanicalContract`.
12
+ * · **git-hooks**: per-repo REGENERATED whole-file/region equality of the four
13
+ * `.git/hooks/*` (package-manager + tier parameterized) via
14
+ * `detectGeneratedArtifactContract` — catches stale-version drift (#1854).
15
+ * · **session-start-orientation**: STATIC whole-file equality of the
16
+ * `.claude/hooks/SessionStart.cjs` + `.gemini/hooks/SessionStart.js` templates,
17
+ * also via `detectGeneratedArtifactContract` (no parameterization).
18
+ * - **manual-attestation** (mmnto-ai/totem#2080): the no-mechanical-sensor class —
19
+ * `detectManualAttestationContract` surfaces the doctrine-currency row / vendor-SDK
20
+ * pin as `info` (or honest-absent `skip`), NEVER pass/warn/fail (the "never fails"
21
+ * contract; structurally cannot gate under `--strict`).
15
22
  *
16
- * Sensor-not-gate: the core detector returns `skip`/`warn`/`pass` only — never
17
- * `fail`. The `--strict` exit-code decision lives at the CLI edge: a `warn` from
18
- * a `blocking: true` contract is promoted to `fail` (non-zero) ONLY under
19
- * `--strict`. The detector carries that promotion eligibility back via
20
- * `blockingDriftIds` so the command can gate without re-loading the manifest.
23
+ * The remaining contracts — the file-value-equality bot-configs (`cr-profile` etc.)
24
+ * and the structural-presence dimensions keep the `skip` "not yet implemented" stub;
25
+ * their detection is a follow-on.
21
26
  *
22
- * Honest-absent (Tenet 14): unconfigured exactly one `skip` line; never an
23
- * error. Configured-but-missing / unparseable / unsupported-schema `warn`,
24
- * never a crash (mirrors the `findStaleRules` best-effort fallback idiom in
25
- * doctor.ts). Dynamic-import `@mmnto/totem` to keep core off the CLI cold-start
26
- * graph, matching the other doctor checks.
27
+ * The parity sensor owns its OWN render + result type (`ParityLine`) carrying a
28
+ * WIDER status vocabulary (pass/warn/fail/info/unknown/skip) than the shared
29
+ * `CheckStatus`, so the verdict-state split (#2073 req #1) never ripples
30
+ * `CheckStatus` across the unrelated doctor checks.
31
+ *
32
+ * Sensor-not-gate: the detectors return `skip`/`warn`/`pass`/`info`/`unknown` —
33
+ * never `fail`. The `--strict` exit-code decision lives at the CLI edge: a
34
+ * `warn` from a `blocking: true` contract is promoted to `fail` (non-zero) ONLY
35
+ * under `--strict`. `info`/`unknown` are never gated. Honest-absent (Tenet 14):
36
+ * unconfigured → exactly one `skip` line; configured-but-missing / unparseable /
37
+ * unsupported-schema → `warn`, never a crash. Dynamic-import `@mmnto/totem` to
38
+ * keep core off the CLI cold-start graph, matching the other doctor checks.
27
39
  */
28
40
  import * as path from 'node:path';
41
+ // init-templates (large canonical strings) + the node:url / node:module builtins
42
+ // are dynamic-imported inside checkParity per the packages/cli lazy-load
43
+ // guideline — see the `ok` branch.
29
44
  const CHECK_NAME = 'Parity';
30
45
  /**
31
- * Resolve, parse, and report the parity manifest as `DiagnosticResult`s.
46
+ * Resolve the on-disk artifact(s) a mechanical contract checks, or `undefined`
47
+ * when this slice doesn't handle the contract (hooks / presence / value-equality
48
+ * → kept as `skip` stubs). `claude-skills` yields one artifact PER distributed
49
+ * skill; `review-reply-skill-content` is the single review-reply skill (it
50
+ * overlaps `claude-skills` by design — both are distinct manifest contracts on
51
+ * the same file; flagged to strategy as a manifest observation).
52
+ *
53
+ * The canonical block is extracted from the running CLI's OWN `init-templates`
54
+ * export (passed-in `extract` is the core `extractManagedBlock`, dynamic-imported
55
+ * by the caller to keep `@mmnto/totem` off the cold-start graph) — local-read-only.
56
+ */
57
+ function mechanicalArtifactsFor(contractId, gitRoot, extract, templates) {
58
+ const { markers } = templates;
59
+ switch (contractId) {
60
+ case 'claude-skills':
61
+ return templates.distributedSkills.map((s) => ({
62
+ consumerPath: path.join(gitRoot, '.claude', 'skills', s.name, 'SKILL.md'),
63
+ markers,
64
+ canonicalBlock: extract(s.content, markers),
65
+ lineName: `Parity: claude-skills (${s.name})`,
66
+ }));
67
+ case 'review-reply-skill-content':
68
+ return [
69
+ {
70
+ consumerPath: path.join(gitRoot, '.claude', 'skills', 'review-reply', 'SKILL.md'),
71
+ markers,
72
+ canonicalBlock: extract(templates.reviewReplyContent, markers),
73
+ lineName: 'Parity: review-reply-skill-content',
74
+ },
75
+ ];
76
+ default:
77
+ return undefined;
78
+ }
79
+ }
80
+ /**
81
+ * Resolve the four git-hook artifacts the `git-hooks` contract checks, each with a
82
+ * per-repo regenerated canonical. Checks `.git/hooks/*` only — hook-manager installs
83
+ * (`.totem/hooks/*.sh` for husky / lefthook) are a follow-on (no cohort consumer uses
84
+ * one today); the detector's present-without-marker → `skip` keeps a manager repo
85
+ * honest in the meantime.
86
+ */
87
+ function gitHookArtifactsFor(gitRoot, tier, fallbackCmd, builders) {
88
+ const hooksDir = path.join(gitRoot, '.git', 'hooks');
89
+ const m = builders.markers;
90
+ return [
91
+ {
92
+ consumerPath: path.join(hooksDir, 'pre-commit'),
93
+ canonicalContent: builders.buildPreCommitHook(tier),
94
+ ownershipMarker: m.preCommit,
95
+ lineName: 'Parity: git-hooks (pre-commit)',
96
+ },
97
+ {
98
+ consumerPath: path.join(hooksDir, 'pre-push'),
99
+ canonicalContent: builders.buildPrePushHook(fallbackCmd, tier),
100
+ ownershipMarker: m.prePush,
101
+ lineName: 'Parity: git-hooks (pre-push)',
102
+ },
103
+ {
104
+ consumerPath: path.join(hooksDir, 'post-merge'),
105
+ canonicalContent: builders.buildHookContent(fallbackCmd),
106
+ ownershipMarker: m.postMerge.start,
107
+ endMarker: m.postMerge.end,
108
+ lineName: 'Parity: git-hooks (post-merge)',
109
+ },
110
+ {
111
+ consumerPath: path.join(hooksDir, 'post-checkout'),
112
+ canonicalContent: builders.buildPostCheckoutHookContent(fallbackCmd),
113
+ ownershipMarker: m.postCheckout.start,
114
+ endMarker: m.postCheckout.end,
115
+ lineName: 'Parity: git-hooks (post-checkout)',
116
+ },
117
+ ];
118
+ }
119
+ /**
120
+ * Resolve the two whole-file SessionStart hook artifacts the `session-start-orientation`
121
+ * contract checks: `.claude/hooks/SessionStart.cjs` (canonical `CLAUDE_SESSION_START`)
122
+ * and `.gemini/hooks/SessionStart.js` (canonical `GEMINI_SESSION_START`). Whole-file
123
+ * static canonical, no end marker, no regeneration. A vendor file absent here is
124
+ * honest-absent `skip` (cohort permits absence) via the detector's presence semantics;
125
+ * a present file whose marker opens it but whose body drifted is `warn` (the orientation
126
+ * slice generalized `isOwnedGeneratedFile` to treat a marker-at-start JS file as owned).
127
+ */
128
+ function sessionStartArtifactsFor(gitRoot, templates) {
129
+ return [
130
+ {
131
+ consumerPath: path.join(gitRoot, '.claude', 'hooks', 'SessionStart.cjs'),
132
+ canonicalContent: templates.claude,
133
+ ownershipMarker: templates.marker,
134
+ lineName: 'Parity: session-start-orientation (claude)',
135
+ },
136
+ {
137
+ consumerPath: path.join(gitRoot, '.gemini', 'hooks', 'SessionStart.js'),
138
+ canonicalContent: templates.gemini,
139
+ ownershipMarker: templates.marker,
140
+ lineName: 'Parity: session-start-orientation (gemini)',
141
+ },
142
+ ];
143
+ }
144
+ /**
145
+ * Resolve the running `@mmnto/cli`'s version + install path for the req-#5
146
+ * binary self-report (the Stale-Doctor-Paradox guard — surface WHICH binary
147
+ * computed the skills verdict so a shadowed/stale global is visible). Best-effort:
148
+ * a resolution failure degrades the self-report to absent (the verdict still
149
+ * renders, just without provenance), never a crash. Resolves from THIS module's
150
+ * own URL, so it names the actual running install (workspace dist vs a
151
+ * node_modules vendor vs a global shadow).
152
+ */
153
+ function resolveRunningBinary(urlMod, createRequireFn) {
154
+ try {
155
+ const here = urlMod.fileURLToPath(import.meta.url);
156
+ // dist/commands/doctor-parity.js → up two → the @mmnto/cli package root.
157
+ const cliRoot = path.resolve(path.dirname(here), '..', '..');
158
+ const req = createRequireFn(import.meta.url);
159
+ const pkg = req('../../package.json');
160
+ if (typeof pkg.version !== 'string')
161
+ return undefined;
162
+ return { version: pkg.version, path: cliRoot };
163
+ // totem-context: best-effort cosmetic read — the binary self-report degrades to absent on ANY resolution failure and NEVER re-throws (GCA review), so a shadowed / broken install can't crash the doctor pipeline (Tenet 13: a cosmetic read must not break the sensor).
164
+ }
165
+ catch {
166
+ return undefined;
167
+ }
168
+ }
169
+ /**
170
+ * Resolve, parse, and report the parity manifest as `ParityLine`s.
32
171
  *
33
172
  * Returns `{ results, blockingDriftIds }`: `results[0]` is always the section
34
- * summary line; in the `ok` path it is followed by one line per contract — a
35
- * pin-currency verdict for the deps version-pinned contracts, a `skip` stub for
36
- * everything else. All non-`ok` paths return a single summary entry and an empty
37
- * `blockingDriftIds`.
173
+ * summary line; in the `ok` path it is followed by one line per contract (or
174
+ * per artifact, for multi-artifact mechanical contracts) a pin-currency
175
+ * verdict for the deps version-pinned contracts, a content-equality verdict for
176
+ * the mechanical skills contracts, and a `skip` stub for everything else. All
177
+ * non-`ok` paths return a single summary entry and an empty `blockingDriftIds`.
38
178
  *
39
179
  * @param cwd The directory to resolve config + manifest against (config/repo root).
40
180
  */
41
181
  export async function checkParity(cwd) {
42
182
  const { loadConfig, resolveConfigPath, isGlobalConfigPath } = await import('../utils.js');
43
- const { deriveCohortRepoId, detectVersionPinnedContract, loadParityManifest, packageNameForContract, resolveGitRoot, SUPPORTED_PARITY_SCHEMA_VERSION, } = await import('@mmnto/totem');
183
+ const { deriveCohortRepoId, detectGeneratedArtifactContract, detectManualAttestationContract, detectMechanicalContract, detectVersionPinnedContract, extractManagedBlock, loadParityManifest, packageNameForContract, resolveGitRoot, SUPPORTED_PARITY_SCHEMA_VERSION, } = await import('@mmnto/totem');
44
184
  // Read the config best-effort: a missing/corrupt config is the honest-absent
45
185
  // path (no parity manifest configured), not a crash. Mirrors the config-load
46
186
  // fallback in doctorCommand — surface only on a defective error object so
@@ -52,6 +192,11 @@ export async function checkParity(cwd) {
52
192
  // today (no upward walk), so this equals cwd for the local case — the explicit
53
193
  // anchor just keeps it correct if resolution ever changes.
54
194
  let manifestRoot = cwd;
195
+ // Tier the git hooks were generated at. Resolved the SAME way `hooksCommand` does
196
+ // (config.hooks.tier, default 'standard') so the doctor regenerates the canonical
197
+ // at the CONFIGURED tier — a hook on disk that does not match its repo's configured
198
+ // tier is genuine drift, which the content compare correctly surfaces.
199
+ let hookTier = 'standard';
55
200
  try {
56
201
  const configPath = resolveConfigPath(cwd);
57
202
  // Repo-scoped by design: the manifest location is per-repo, so a config-less
@@ -66,6 +211,7 @@ export async function checkParity(cwd) {
66
211
  manifestRoot = path.dirname(configPath);
67
212
  const config = await loadConfig(configPath);
68
213
  configValue = config.orient?.parityManifest;
214
+ hookTier = config.hooks?.tier ?? 'standard';
69
215
  }
70
216
  // totem-context: a missing/corrupt totem config is the honest-absent path (treated as "no parity manifest configured"), not a sensor failure — the doctor runs against config-less repos by design.
71
217
  }
@@ -75,6 +221,10 @@ export async function checkParity(cwd) {
75
221
  }
76
222
  configValue = undefined;
77
223
  }
224
+ // Single source of truth for "is parity configured here" — derived from the
225
+ // SAME resolution (incl. the isGlobalConfigPath guard above) so the CLI edge
226
+ // never re-derives config and never leaks a global manifest into the fold.
227
+ const configured = configValue !== undefined;
78
228
  const result = loadParityManifest(configValue, manifestRoot);
79
229
  switch (result.status) {
80
230
  case 'not-configured':
@@ -83,28 +233,28 @@ export async function checkParity(cwd) {
83
233
  name: CHECK_NAME,
84
234
  status: 'skip',
85
235
  message: 'no parity manifest configured',
86
- });
236
+ }, configured);
87
237
  case 'not-found':
88
238
  return single({
89
239
  name: CHECK_NAME,
90
240
  status: 'warn',
91
241
  message: `parity manifest not found at ${rel(cwd, result.path)}`,
92
242
  remediation: 'Fix orient.parityManifest in your totem config to point at the manifest.',
93
- });
243
+ }, configured);
94
244
  case 'unparseable':
95
245
  return single({
96
246
  name: CHECK_NAME,
97
247
  status: 'warn',
98
248
  message: `parity manifest unreadable at ${rel(cwd, result.path)}: ${result.reason}`,
99
249
  remediation: 'Fix the manifest YAML / schema, then re-run totem doctor --parity.',
100
- });
250
+ }, configured);
101
251
  case 'unsupported-schema':
102
252
  return single({
103
253
  name: CHECK_NAME,
104
254
  status: 'warn',
105
255
  message: `parity manifest schema v${result.schemaVersion} unsupported (this doctor supports v${SUPPORTED_PARITY_SCHEMA_VERSION})`,
106
256
  remediation: 'Upgrade @mmnto/cli or align the manifest schema-version.',
107
- });
257
+ }, configured);
108
258
  case 'ok': {
109
259
  const { contracts } = result.manifest;
110
260
  const summary = {
@@ -112,49 +262,206 @@ export async function checkParity(cwd) {
112
262
  status: 'pass',
113
263
  message: `parity manifest: ${contracts.length} contract(s) loaded`,
114
264
  };
265
+ // Lazy-load init-templates (large canonical strings) + the node builtins
266
+ // only on the ok path — the honest-absent cases above never pay for them
267
+ // (packages/cli lazy-load guideline).
268
+ const { createRequire } = await import('node:module');
269
+ const url = await import('node:url');
270
+ const { DISTRIBUTED_CLAUDE_SKILLS, REVIEW_REPLY_SKILL_CONTENT, SKILL_MARKER_START, SKILL_MARKER_END, CLAUDE_SESSION_START, GEMINI_SESSION_START, SESSION_START_MARKER, } = await import('./init-templates.js');
271
+ const skillTemplates = {
272
+ distributedSkills: DISTRIBUTED_CLAUDE_SKILLS,
273
+ reviewReplyContent: REVIEW_REPLY_SKILL_CONTENT,
274
+ markers: { start: SKILL_MARKER_START, end: SKILL_MARKER_END },
275
+ };
276
+ // The running CLI's own whole-file SessionStart hook templates (static — no
277
+ // parameterization), lazy-loaded on the ok path only (mmnto-ai/totem#2073 orientation slice).
278
+ const sessionStartTemplates = {
279
+ claude: CLAUDE_SESSION_START,
280
+ gemini: GEMINI_SESSION_START,
281
+ marker: SESSION_START_MARKER,
282
+ };
283
+ // The running CLI's own hook generators + markers + package-manager probe,
284
+ // lazy-loaded on the ok path only (cold-start guideline). The canonical for
285
+ // each git hook is regenerated per-repo from these (mmnto-ai/totem#2073 hooks slice).
286
+ const { buildPreCommitHook, buildPrePushHook, buildHookContent, buildPostCheckoutHookContent, getFallbackCommand, TOTEM_PRECOMMIT_MARKER, TOTEM_PREPUSH_MARKER, TOTEM_HOOK_MARKER, TOTEM_HOOK_END, TOTEM_CHECKOUT_MARKER, TOTEM_CHECKOUT_END, } = await import('./install-hooks.js');
287
+ const hookBuilders = {
288
+ buildPreCommitHook,
289
+ buildPrePushHook,
290
+ buildHookContent,
291
+ buildPostCheckoutHookContent,
292
+ markers: {
293
+ preCommit: TOTEM_PRECOMMIT_MARKER,
294
+ prePush: TOTEM_PREPUSH_MARKER,
295
+ postMerge: { start: TOTEM_HOOK_MARKER, end: TOTEM_HOOK_END },
296
+ postCheckout: { start: TOTEM_CHECKOUT_MARKER, end: TOTEM_CHECKOUT_END },
297
+ },
298
+ };
115
299
  // Shared detection context. The cohort floor + repoId derive from the git
116
300
  // root (anchored there, not the deep cwd — mirrors the core resolver).
117
301
  // resolveGitRoot returns null outside a repo; fall back to cwd so the
118
302
  // local self-in-tree / sibling probes still have an anchor.
119
303
  const gitRoot = safeGitRoot(resolveGitRoot, cwd) ?? cwd;
120
304
  const repoId = deriveCohortRepoId(cwd, { gitRoot });
305
+ const binary = resolveRunningBinary(url, createRequire);
306
+ // Derived from the repo's lockfile (the SAME probe the installer uses), so the
307
+ // regenerated git-hook canonical matches THIS repo's package manager — no false drift.
308
+ const fallbackCmd = getFallbackCommand(gitRoot);
121
309
  const blockingDriftIds = [];
122
- const perContract = contracts.map((c) => {
123
- // PR-1 only senses version-pinned DEPS contracts (those that resolve a
124
- // package name). Everything else — mechanical, manual-attestation, and
125
- // the version-pinned doctrine pins (no deps package name) keeps the
126
- // skip stub until its detection slice lands.
127
- const packageName = c.tractability === 'version-pinned' ? packageNameForContract(c, gitRoot) : undefined;
128
- if (packageName === undefined) {
129
- return {
130
- name: `Parity: ${c.id}`,
131
- status: 'skip',
132
- message: `${c.dimension} (${c.tractability}) — drift detection not yet implemented`,
133
- };
310
+ // flatMap, not map: a mechanical contract (claude-skills) expands to one
311
+ // line PER distributed skill, so the per-contract count can exceed the
312
+ // contract count.
313
+ const perContract = contracts.flatMap((c) => {
314
+ // ── version-pinned deps (PR-1) ──
315
+ if (c.tractability === 'version-pinned') {
316
+ const packageName = packageNameForContract(c, gitRoot);
317
+ if (packageName === undefined) {
318
+ return [
319
+ stub(c, `${c.dimension} (version-pinned) — drift detection not yet implemented`),
320
+ ];
321
+ }
322
+ const verdict = detectVersionPinnedContract(c, { cwd, gitRoot, repoId, packageName });
323
+ if (verdict.status === 'warn' && c.blocking === true)
324
+ blockingDriftIds.push(c.id);
325
+ return [verdictToLine(c, verdict)];
326
+ }
327
+ // ── mechanical content-equality (mmnto-ai/totem#2073) ──
328
+ if (c.tractability === 'mechanical') {
329
+ // Honor the contract's `consumers` scope before sensing drift (mirrors
330
+ // detectVersionPinnedContract, which self-guards). A scoped mechanical
331
+ // contract must not emit drift — or, under --strict, fail — in a repo that
332
+ // is not an intended consumer (CodeRabbit review on mmnto-ai/totem#2079).
333
+ if (c.consumers !== undefined) {
334
+ if (repoId === undefined) {
335
+ return [
336
+ lineFor(`Parity: ${c.id}`, {
337
+ status: 'skip',
338
+ message: `cannot determine applicability — repo id unresolvable; contract is scoped to consumers [${c.consumers.join(', ')}]`,
339
+ }),
340
+ ];
341
+ }
342
+ if (!c.consumers.includes(repoId)) {
343
+ return [
344
+ lineFor(`Parity: ${c.id}`, {
345
+ status: 'skip',
346
+ message: `cohort permits absence here (${repoId} not in consumers)`,
347
+ }),
348
+ ];
349
+ }
350
+ }
351
+ // Generated-artifact contracts (whole-file / region content-equality): the git
352
+ // hooks (regenerated per-repo for this package manager + tier — catches the
353
+ // stale-version drift half of mmnto-ai/totem#1854) and the static whole-file
354
+ // SessionStart hooks (orientation slice). Both resolve a GeneratedArtifact[] and
355
+ // run the same presence-aware detector + once-per-contract blocking tag.
356
+ let generatedArtifacts;
357
+ // Artifact-class copy threaded into the detector so the absence/drift
358
+ // remediation names the RIGHT installer per class (Greptile review on
359
+ // mmnto-ai/totem#2082): git hooks → `totem hook install`; the static
360
+ // SessionStart hooks → `totem init`.
361
+ let artifactLabel = 'artifact';
362
+ let installCommand = 'totem init';
363
+ if (c.id === 'git-hooks') {
364
+ generatedArtifacts = gitHookArtifactsFor(gitRoot, hookTier, fallbackCmd, hookBuilders);
365
+ artifactLabel = 'git hook';
366
+ installCommand = 'totem hook install';
367
+ }
368
+ else if (c.id === 'session-start-orientation') {
369
+ generatedArtifacts = sessionStartArtifactsFor(gitRoot, sessionStartTemplates);
370
+ artifactLabel = 'SessionStart hook';
371
+ installCommand = 'totem init';
372
+ }
373
+ if (generatedArtifacts !== undefined) {
374
+ // A drift on any artifact tags the contract id at most ONCE so the --strict
375
+ // count reflects contracts, not artifacts (mirrors the skills branch).
376
+ let blockingDrift = false;
377
+ const lines = generatedArtifacts.map((a) => {
378
+ const verdict = detectGeneratedArtifactContract({
379
+ canonicalContent: a.canonicalContent,
380
+ consumerPath: a.consumerPath,
381
+ ownershipMarker: a.ownershipMarker,
382
+ artifactLabel,
383
+ installCommand,
384
+ ...(a.endMarker !== undefined ? { endMarker: a.endMarker } : {}),
385
+ ...(binary !== undefined ? { binary } : {}),
386
+ });
387
+ if (verdict.status === 'warn' && c.blocking === true)
388
+ blockingDrift = true;
389
+ return lineFor(a.lineName, verdict);
390
+ });
391
+ if (blockingDrift)
392
+ blockingDriftIds.push(c.id);
393
+ return lines;
394
+ }
395
+ // skills: managed-block content equality against the in-process template.
396
+ const artifacts = mechanicalArtifactsFor(c.id, gitRoot, extractManagedBlock, skillTemplates);
397
+ if (artifacts === undefined) {
398
+ return [
399
+ stub(c, `${c.dimension} (mechanical) — drift detection not yet implemented for this sub-class`),
400
+ ];
401
+ }
402
+ // A multi-artifact contract (claude-skills) can drift on several
403
+ // artifacts; tag the contract id at most ONCE so the --strict count
404
+ // reflects contracts, not artifacts.
405
+ let blockingDrift = false;
406
+ const lines = artifacts.map((a) => {
407
+ const verdict = detectMechanicalContract({
408
+ canonicalBlock: a.canonicalBlock,
409
+ consumerPath: a.consumerPath,
410
+ markers: a.markers,
411
+ ...(binary !== undefined ? { binary } : {}),
412
+ });
413
+ if (verdict.status === 'warn' && c.blocking === true)
414
+ blockingDrift = true;
415
+ return lineFor(a.lineName, verdict);
416
+ });
417
+ if (blockingDrift)
418
+ blockingDriftIds.push(c.id);
419
+ return lines;
134
420
  }
135
- const verdict = detectVersionPinnedContract(c, { cwd, gitRoot, repoId, packageName });
136
- if (verdict.status === 'warn' && c.blocking === true) {
137
- blockingDriftIds.push(c.id);
421
+ // ── manual-attestation (mmnto-ai/totem#2073 manual-attestation slice) ──
422
+ // The claim-class with no mechanical sensor: the detector surfaces the
423
+ // tracked vendor-SDK pin (package set) or doctrine-currency row (no package)
424
+ // as `info`, or honest-absent `skip` — NEVER pass/warn/fail/unknown. An
425
+ // `info` can't enter blockingDriftIds, so these contracts cannot fail even
426
+ // under --strict (the manifest's "never fails" contract).
427
+ if (c.tractability === 'manual-attestation') {
428
+ // The detector reads the sub-class discriminant (`c.package`) + the
429
+ // canonical source directly off the contract. `package:` set ⇒ vendor-SDK
430
+ // pin read; unset ⇒ doctrine-row pure-info surface. No `attested` yet (the
431
+ // schema has no last-attested field — strategy's follow-on lane).
432
+ const verdict = detectManualAttestationContract(c, { cwd, repoId });
433
+ return [verdictToLine(c, verdict)];
138
434
  }
139
- return verdictToDiagnostic(c, verdict);
435
+ // ── anything else (a future tractability) → skip stub; the slice boundary stays observable ──
436
+ return [
437
+ stub(c, `${c.dimension} (${c.tractability}) — drift detection not yet implemented`),
438
+ ];
140
439
  });
141
- return { results: [summary, ...perContract], blockingDriftIds };
440
+ return { results: [summary, ...perContract], blockingDriftIds, configured };
142
441
  }
143
442
  }
144
443
  }
145
444
  /** Wrap a single summary line in the `ParityCheckResult` shape (no blocking ids). */
146
- function single(result) {
147
- return { results: [result], blockingDriftIds: [] };
445
+ function single(result, configured) {
446
+ return { results: [result], blockingDriftIds: [], configured };
148
447
  }
149
- /** Map a core `ParityContractVerdict` to a CLI `DiagnosticResult` for one contract. */
150
- function verdictToDiagnostic(contract, verdict) {
448
+ /** Map a core `ParityContractVerdict` to a `ParityLine` keyed by the contract id. */
449
+ function verdictToLine(contract, verdict) {
450
+ return lineFor(`Parity: ${contract.id}`, verdict);
451
+ }
452
+ /** Build a `ParityLine` from an explicit display name + a core verdict. */
453
+ function lineFor(name, verdict) {
151
454
  return {
152
- name: `Parity: ${contract.id}`,
455
+ name,
153
456
  status: verdict.status,
154
457
  message: verdict.message,
155
458
  ...(verdict.remediation !== undefined ? { remediation: verdict.remediation } : {}),
156
459
  };
157
460
  }
461
+ /** The `skip` "not yet implemented" stub for a contract this build doesn't sense. */
462
+ function stub(contract, message) {
463
+ return { name: `Parity: ${contract.id}`, status: 'skip', message };
464
+ }
158
465
  /**
159
466
  * Resolve the git root, swallowing the `TotemGitError` that `resolveGitRoot`
160
467
  * throws on a git hiccup (permission error / corrupted index) — the parity
@@ -178,7 +485,7 @@ function rel(cwd, target) {
178
485
  // Same value as CHECK_NAME — aliased (not re-literal'd) so the two can't drift.
179
486
  const TAG = CHECK_NAME;
180
487
  /**
181
- * CLI entry — runs `checkParity`, renders each `DiagnosticResult`, and throws a
488
+ * CLI entry — runs `checkParity`, renders each `ParityLine`, and throws a
182
489
  * `TotemError` when a blocking contract drifted under `--strict` so the
183
490
  * top-level `handleError` produces the non-zero exit code (no direct
184
491
  * `process.exit` per AGENTS.md).
@@ -195,14 +502,23 @@ export async function doctorParityCliCommand(options = {}) {
195
502
  .replace(/ {2,}/g, ' ')
196
503
  .trim();
197
504
  const cwd = options.cwdForTest ?? process.cwd();
198
- const { results, blockingDriftIds } = await checkParity(cwd);
505
+ const { results, blockingDriftIds, configured } = await checkParity(cwd);
506
+ // Folded-into-`--strict` no-op: when this run is the strict fold (not an explicit
507
+ // `doctor --parity`) and no repo-local manifest is configured, render and gate
508
+ // nothing — a non-adopter's `doctor --strict` stays byte-identical to before the
509
+ // fold. Explicit `--parity` (onlyWhenConfigured omitted) still shows the SKIP.
510
+ if (options.onlyWhenConfigured && !configured)
511
+ return;
199
512
  // Under --strict, a blocking contract's drift `warn` is rendered + gated as a
200
- // FAIL. We match by the `Parity: <id>` line name so the rendered status agrees
201
- // with the exit code. blockingDriftIds is empty in the non-strict path's
202
- // effect (the promotion only fires under --strict), so this Set is cheap.
203
- const promotable = new Set(blockingDriftIds.map((id) => `Parity: ${id}`));
513
+ // FAIL. A contract's drift can render across MULTIPLE artifact lines
514
+ // (e.g. `Parity: claude-skills (signoff)`), so a line is promotable when its
515
+ // name is the `Parity: <id>` summary OR a `Parity: <id> (…)` artifact line —
516
+ // an exact-name Set would leave the artifact lines rendered as WARN while the
517
+ // command still exits non-zero (GCA review on the PR). The trailing space
518
+ // guards against a contract id that is a prefix of another.
519
+ const isPromotable = (name) => blockingDriftIds.some((id) => name === `Parity: ${id}` || name.startsWith(`Parity: ${id} `));
204
520
  for (const r of results) {
205
- const status = options.strict && r.status === 'warn' && promotable.has(r.name) ? 'fail' : r.status;
521
+ const status = options.strict && r.status === 'warn' && isPromotable(r.name) ? 'fail' : r.status;
206
522
  switch (status) {
207
523
  case 'pass':
208
524
  log.success(TAG, `${successColor(bold('PASS'))} — ${render(r.message)}`);
@@ -212,6 +528,20 @@ export async function doctorParityCliCommand(options = {}) {
212
528
  if (r.remediation)
213
529
  log.dim(TAG, `→ ${render(r.remediation)}`);
214
530
  break;
531
+ case 'info':
532
+ // An attested, intentional fork — neutral/informational, never gated.
533
+ log.info(TAG, `${bold('INFO')} — ${render(r.message)}`);
534
+ if (r.remediation)
535
+ log.dim(TAG, `→ ${render(r.remediation)}`);
536
+ break;
537
+ case 'unknown':
538
+ // The Stale-Doctor-Paradox state: the canonical was unresolvable, so the
539
+ // verdict is unprovable (NOT a pass — no self-certification). A caution,
540
+ // not drift; never gated.
541
+ log.warn(TAG, `${warnColor(bold('UNKNOWN'))} — ${render(r.message)}`);
542
+ if (r.remediation)
543
+ log.dim(TAG, `→ ${render(r.remediation)}`);
544
+ break;
215
545
  case 'fail':
216
546
  // Mandated 'Totem Error' tag (packages/cli convention) — marks internal
217
547
  // error output, distinct from the contextual TAG used for pass/warn/skip.
@@ -226,11 +556,11 @@ export async function doctorParityCliCommand(options = {}) {
226
556
  }
227
557
  // Sensor-not-gate: drift is report-only by default (exit 0). Only `--strict`
228
558
  // promotes a `blocking: true` contract's drift to a non-zero exit; non-blocking
229
- // drift never gates. PR-1's detector emits no raw `fail` status (version-pinned
230
- // is pass/warn/skip), so the gate is purely the strict+blocking promotion — the
231
- // gating model for a future slice that DOES emit a `fail` is settled when that
232
- // slice lands (CR review #2071: keep the gate from suggesting a non-strict path
233
- // that would break sensor-not-gate).
559
+ // drift never gates, and `info`/`unknown` are never promoted. The detectors
560
+ // emit no raw `fail` status, so the gate is purely the strict+blocking
561
+ // promotion — the gating model for a future slice that DOES emit a `fail` is
562
+ // settled when that slice lands (CR review mmnto-ai/totem#2071: keep the gate from
563
+ // suggesting a non-strict path that would break sensor-not-gate).
234
564
  if (options.strict && blockingDriftIds.length > 0) {
235
565
  throw new TotemError('PARITY_DRIFT_DETECTED', `${blockingDriftIds.length} parity contract(s) reported blocking drift under --strict.`, 'Reconcile each blocking contract against its canonical source, then re-run totem doctor --parity --strict.');
236
566
  }
@@ -1 +1 @@
1
- {"version":3,"file":"doctor-parity.js","sourceRoot":"","sources":["../../src/commands/doctor-parity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAMlC,MAAM,UAAU,GAAG,QAAQ,CAAC;AAe5B;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAC1F,MAAM,EACJ,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,GAChC,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAC;IAEjC,6EAA6E;IAC7E,6EAA6E;IAC7E,0EAA0E;IAC1E,6BAA6B;IAC7B,IAAI,WAA+B,CAAC;IACpC,wEAAwE;IACxE,4EAA4E;IAC5E,+EAA+E;IAC/E,+EAA+E;IAC/E,2DAA2D;IAC3D,IAAI,YAAY,GAAG,GAAG,CAAC;IACvB,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC1C,6EAA6E;QAC7E,2EAA2E;QAC3E,4EAA4E;QAC5E,4EAA4E;QAC5E,yBAAyB;QACzB,IAAI,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YACnC,WAAW,GAAG,SAAS,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,YA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