@cleocode/contracts 2026.5.111 → 2026.5.113

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 (118) hide show
  1. package/dist/__tests__/cli-meta-suggested-next.test.d.ts +21 -0
  2. package/dist/__tests__/cli-meta-suggested-next.test.d.ts.map +1 -0
  3. package/dist/__tests__/cli-meta-suggested-next.test.js +70 -0
  4. package/dist/__tests__/cli-meta-suggested-next.test.js.map +1 -0
  5. package/dist/__tests__/evidence-atom-schema.test.d.ts +16 -0
  6. package/dist/__tests__/evidence-atom-schema.test.d.ts.map +1 -0
  7. package/dist/__tests__/evidence-atom-schema.test.js +394 -0
  8. package/dist/__tests__/evidence-atom-schema.test.js.map +1 -0
  9. package/dist/config/__tests__/manifest.test.d.ts +13 -0
  10. package/dist/config/__tests__/manifest.test.d.ts.map +1 -0
  11. package/dist/config/__tests__/manifest.test.js +143 -0
  12. package/dist/config/__tests__/manifest.test.js.map +1 -0
  13. package/dist/config/manifest.d.ts +158 -0
  14. package/dist/config/manifest.d.ts.map +1 -0
  15. package/dist/config/manifest.js +123 -0
  16. package/dist/config/manifest.js.map +1 -0
  17. package/dist/docs/__tests__/provenance.test.d.ts +14 -0
  18. package/dist/docs/__tests__/provenance.test.d.ts.map +1 -0
  19. package/dist/docs/__tests__/provenance.test.js +579 -0
  20. package/dist/docs/__tests__/provenance.test.js.map +1 -0
  21. package/dist/docs/provenance.d.ts +731 -0
  22. package/dist/docs/provenance.d.ts.map +1 -0
  23. package/dist/docs/provenance.js +258 -0
  24. package/dist/docs/provenance.js.map +1 -0
  25. package/dist/docs-taxonomy.d.ts +24 -0
  26. package/dist/docs-taxonomy.d.ts.map +1 -1
  27. package/dist/docs-taxonomy.js +27 -0
  28. package/dist/docs-taxonomy.js.map +1 -1
  29. package/dist/doctor.d.ts +101 -0
  30. package/dist/doctor.d.ts.map +1 -1
  31. package/dist/errors.d.ts +4 -0
  32. package/dist/errors.d.ts.map +1 -1
  33. package/dist/errors.js +4 -0
  34. package/dist/errors.js.map +1 -1
  35. package/dist/evidence-atom-schema.d.ts +407 -0
  36. package/dist/evidence-atom-schema.d.ts.map +1 -0
  37. package/dist/evidence-atom-schema.js +505 -0
  38. package/dist/evidence-atom-schema.js.map +1 -0
  39. package/dist/exit-codes.d.ts +37 -0
  40. package/dist/exit-codes.d.ts.map +1 -1
  41. package/dist/exit-codes.js +37 -0
  42. package/dist/exit-codes.js.map +1 -1
  43. package/dist/index.d.ts +13 -2
  44. package/dist/index.d.ts.map +1 -1
  45. package/dist/index.js +8 -1
  46. package/dist/index.js.map +1 -1
  47. package/dist/invariants/__tests__/adr-056-release.test.d.ts +16 -0
  48. package/dist/invariants/__tests__/adr-056-release.test.d.ts.map +1 -0
  49. package/dist/invariants/__tests__/adr-056-release.test.js +88 -0
  50. package/dist/invariants/__tests__/adr-056-release.test.js.map +1 -0
  51. package/dist/invariants/__tests__/adr-070-orchestration.test.d.ts +22 -0
  52. package/dist/invariants/__tests__/adr-070-orchestration.test.d.ts.map +1 -0
  53. package/dist/invariants/__tests__/adr-070-orchestration.test.js +151 -0
  54. package/dist/invariants/__tests__/adr-070-orchestration.test.js.map +1 -0
  55. package/dist/invariants/__tests__/registry.test.d.ts +14 -0
  56. package/dist/invariants/__tests__/registry.test.d.ts.map +1 -0
  57. package/dist/invariants/__tests__/registry.test.js +113 -0
  58. package/dist/invariants/__tests__/registry.test.js.map +1 -0
  59. package/dist/invariants/adr-056-release.d.ts +42 -0
  60. package/dist/invariants/adr-056-release.d.ts.map +1 -0
  61. package/dist/invariants/adr-056-release.js +143 -0
  62. package/dist/invariants/adr-056-release.js.map +1 -0
  63. package/dist/invariants/adr-070-orchestration.d.ts +73 -0
  64. package/dist/invariants/adr-070-orchestration.d.ts.map +1 -0
  65. package/dist/invariants/adr-070-orchestration.js +290 -0
  66. package/dist/invariants/adr-070-orchestration.js.map +1 -0
  67. package/dist/invariants/adr-073-saga.d.ts +32 -0
  68. package/dist/invariants/adr-073-saga.d.ts.map +1 -0
  69. package/dist/invariants/adr-073-saga.js +155 -0
  70. package/dist/invariants/adr-073-saga.js.map +1 -0
  71. package/dist/invariants/index.d.ts +162 -0
  72. package/dist/invariants/index.d.ts.map +1 -0
  73. package/dist/invariants/index.js +118 -0
  74. package/dist/invariants/index.js.map +1 -0
  75. package/dist/operations/__tests__/input-contract.test.d.ts +20 -0
  76. package/dist/operations/__tests__/input-contract.test.d.ts.map +1 -0
  77. package/dist/operations/__tests__/input-contract.test.js +158 -0
  78. package/dist/operations/__tests__/input-contract.test.js.map +1 -0
  79. package/dist/operations/docs.d.ts +16 -0
  80. package/dist/operations/docs.d.ts.map +1 -1
  81. package/dist/operations/input-contract.d.ts +267 -0
  82. package/dist/operations/input-contract.d.ts.map +1 -0
  83. package/dist/operations/input-contract.js +29 -0
  84. package/dist/operations/input-contract.js.map +1 -0
  85. package/dist/templates/__tests__/manifest.test.d.ts +18 -0
  86. package/dist/templates/__tests__/manifest.test.d.ts.map +1 -0
  87. package/dist/templates/__tests__/manifest.test.js +123 -0
  88. package/dist/templates/__tests__/manifest.test.js.map +1 -0
  89. package/dist/templates/manifest.d.ts +186 -0
  90. package/dist/templates/manifest.d.ts.map +1 -0
  91. package/dist/templates/manifest.js +165 -0
  92. package/dist/templates/manifest.js.map +1 -0
  93. package/package.json +2 -2
  94. package/src/__tests__/cli-meta-suggested-next.test.ts +76 -0
  95. package/src/__tests__/evidence-atom-schema.test.ts +499 -0
  96. package/src/config/__tests__/manifest.test.ts +176 -0
  97. package/src/config/manifest.ts +218 -0
  98. package/src/docs/__tests__/__snapshots__/provenance.test.ts.snap +252 -0
  99. package/src/docs/__tests__/provenance.test.ts +648 -0
  100. package/src/docs/provenance.ts +601 -0
  101. package/src/docs-taxonomy.ts +55 -0
  102. package/src/doctor.ts +111 -0
  103. package/src/errors.ts +4 -0
  104. package/src/evidence-atom-schema.ts +628 -0
  105. package/src/exit-codes.ts +39 -0
  106. package/src/index.ts +129 -0
  107. package/src/invariants/__tests__/adr-056-release.test.ts +102 -0
  108. package/src/invariants/__tests__/adr-070-orchestration.test.ts +186 -0
  109. package/src/invariants/__tests__/registry.test.ts +136 -0
  110. package/src/invariants/adr-056-release.ts +154 -0
  111. package/src/invariants/adr-070-orchestration.ts +317 -0
  112. package/src/invariants/adr-073-saga.ts +167 -0
  113. package/src/invariants/index.ts +222 -0
  114. package/src/operations/__tests__/input-contract.test.ts +188 -0
  115. package/src/operations/docs.ts +16 -0
  116. package/src/operations/input-contract.ts +301 -0
  117. package/src/templates/__tests__/manifest.test.ts +140 -0
  118. package/src/templates/manifest.ts +208 -0
@@ -0,0 +1,505 @@
1
+ /**
2
+ * Zod schema + gate-to-atom mapping for the ADR-051 evidence atom grammar.
3
+ *
4
+ * `cleo verify <task-id> --evidence "<atoms>"` accepts a semicolon-delimited
5
+ * list of evidence atoms. Each atom carries a kind prefix and a payload. The
6
+ * grammar lives in three places today:
7
+ *
8
+ * 1. {@link EvidenceAtomSchema} — Zod discriminated union covering every
9
+ * parseable atom shape (this file).
10
+ * 2. {@link GATE_EVIDENCE_REQUIREMENTS} — gate → satisfying atom-combination
11
+ * map (this file).
12
+ * 3. `packages/core/src/tasks/evidence.ts` — runtime parser + filesystem /
13
+ * git / tool validators. The runtime parser delegates to
14
+ * {@link parseEvidenceString} below for the syntactic split.
15
+ *
16
+ * The schema is exposed for LLM agents and IDE tooling that want to validate
17
+ * an evidence string client-side BEFORE invoking `cleo verify`. The CLI
18
+ * runtime continues to perform the full filesystem-aware validation pass
19
+ * because Zod cannot check that a commit SHA is reachable or that a file
20
+ * exists on disk.
21
+ *
22
+ * The atom shapes here mirror the `ParsedAtom` union in
23
+ * `packages/core/src/tasks/evidence.ts` exactly. Behavior parity with the
24
+ * pre-T10337 ad-hoc parser is required — see the T10337 test suite for the
25
+ * full parity matrix.
26
+ *
27
+ * @task T10337
28
+ * @saga T10326
29
+ * @adr ADR-051
30
+ */
31
+ import { z } from 'zod';
32
+ // ---------------------------------------------------------------------------
33
+ // Per-atom Zod schemas
34
+ // ---------------------------------------------------------------------------
35
+ /**
36
+ * `commit:<sha>` atom — references a git commit by full or short SHA.
37
+ *
38
+ * Format: `commit:<7-40 hex chars>`. The schema accepts any 7-40-character
39
+ * lowercase hex SHA; the runtime validator additionally checks reachability
40
+ * from the task branch and the AC-file content-intersect rule (T9245).
41
+ *
42
+ * @task T832
43
+ */
44
+ export const commitAtomSchema = z.object({
45
+ kind: z.literal('commit'),
46
+ sha: z.string().regex(/^[0-9a-f]{7,40}$/i, 'commit sha must be 7-40 hex characters'),
47
+ });
48
+ /**
49
+ * `files:<p1,p2,...>` atom — list of file paths that the task touched.
50
+ *
51
+ * Format: `files:<comma-separated paths>`. The runtime validator additionally
52
+ * stats each path and records its sha256.
53
+ *
54
+ * @task T832
55
+ */
56
+ export const filesAtomSchema = z.object({
57
+ kind: z.literal('files'),
58
+ paths: z.array(z.string().min(1)).min(1, 'files atom requires at least one path'),
59
+ });
60
+ /**
61
+ * `test-run:<path>` atom — path to a structured test runner JSON output
62
+ * (vitest, jest, pytest, cargo-nextest, etc.).
63
+ *
64
+ * Format: `test-run:<absolute or project-relative path>`. The runtime validator
65
+ * loads the file, parses the JSON, and rejects when failedTests > 0 or
66
+ * totalTests === 0.
67
+ *
68
+ * @task T832
69
+ */
70
+ export const testRunAtomSchema = z.object({
71
+ kind: z.literal('test-run'),
72
+ path: z.string().min(1, 'test-run atom requires a non-empty path'),
73
+ });
74
+ /**
75
+ * `tool:<name>` atom — runs a project-resolved canonical tool and accepts
76
+ * exit-code 0.
77
+ *
78
+ * Format: `tool:<canonical name or legacy alias>`. Canonical names: `test`,
79
+ * `build`, `lint`, `typecheck`, `audit`, `security-scan`. Legacy aliases
80
+ * (`pnpm-test`, `tsc`, `biome`, `cargo-test`, `pytest`, …) still resolve via
81
+ * the runtime resolver (ADR-061 / T1534).
82
+ *
83
+ * @task T832
84
+ * @task T1534
85
+ */
86
+ export const toolAtomSchema = z.object({
87
+ kind: z.literal('tool'),
88
+ tool: z.string().min(1, 'tool atom requires a non-empty tool name'),
89
+ });
90
+ /**
91
+ * `url:<href>` atom — soft evidence pointing to an external artifact (docs,
92
+ * dashboard, etc.).
93
+ *
94
+ * Format: `url:<http(s)://...>`. The runtime validator requires the
95
+ * `http://` or `https://` scheme.
96
+ *
97
+ * @task T832
98
+ */
99
+ export const urlAtomSchema = z.object({
100
+ kind: z.literal('url'),
101
+ url: z
102
+ .string()
103
+ .min(1)
104
+ .regex(/^https?:\/\//, 'url atom must start with http:// or https://'),
105
+ });
106
+ /**
107
+ * `note:<text>` atom — free-form note used for soft evidence and waivers.
108
+ *
109
+ * Format: `note:<1-512 chars>`. The runtime validator caps the note at 512
110
+ * characters to keep the gate-evidence record bounded.
111
+ *
112
+ * @task T832
113
+ */
114
+ export const noteAtomSchema = z.object({
115
+ kind: z.literal('note'),
116
+ note: z
117
+ .string()
118
+ .min(1, 'note atom must be non-empty')
119
+ .max(512, 'note atom is too long (max 512 chars)'),
120
+ });
121
+ /**
122
+ * `decision:<id>` atom — references a `brain_decisions` row that IS the
123
+ * canonical artifact for a decision-only task. Satisfies the `implemented`
124
+ * gate when combined with `files:` pointing to a research note or with
125
+ * `note:` (T1875).
126
+ *
127
+ * Format: `decision:<id>` (e.g. `decision:D-arch-001`). The runtime validator
128
+ * looks up the row and requires `confirmation_state` ∈ {`accepted`,
129
+ * `proposed`}.
130
+ *
131
+ * @task T1875
132
+ */
133
+ export const decisionAtomSchema = z.object({
134
+ kind: z.literal('decision'),
135
+ decisionId: z.string().min(1, 'decision atom requires a non-empty decision ID'),
136
+ });
137
+ /**
138
+ * `pr:<number>` atom — references a GitHub PR by number. Satisfies BOTH
139
+ * `testsPassed` and `qaPassed` simultaneously when the PR is MERGED and every
140
+ * required-workflow check is green (T9764). Extended in T9838 to satisfy
141
+ * `implemented` because the merge commit IS the landing artifact.
142
+ *
143
+ * Format: `pr:<positive integer>` (e.g. `pr:357`).
144
+ *
145
+ * @task T9764
146
+ * @task T9838
147
+ */
148
+ export const prAtomSchema = z.object({
149
+ kind: z.literal('pr'),
150
+ prNumber: z.number().int().positive('pr atom requires a positive integer PR number'),
151
+ });
152
+ /**
153
+ * `loc-drop:<fromLines>:<toLines>` atom — proves that a migrated engine shed
154
+ * lines. Required for the `implemented` gate when the task carries the
155
+ * `engine-migration` label (T1604).
156
+ *
157
+ * Format: `loc-drop:<non-negative integer>:<non-negative integer>`.
158
+ * The schema admits any non-negative pair; the runtime validator additionally
159
+ * requires `fromLines > 0` and `toLines <= fromLines`.
160
+ *
161
+ * @task T1604
162
+ */
163
+ export const locDropAtomSchema = z.object({
164
+ kind: z.literal('loc-drop'),
165
+ fromLines: z.number().int().nonnegative('loc-drop fromLines must be ≥ 0'),
166
+ toLines: z.number().int().nonnegative('loc-drop toLines must be ≥ 0'),
167
+ });
168
+ /**
169
+ * `callsite-coverage:<symbol>:<sourcePath>` atom — proves that an exported
170
+ * symbol has ≥1 production callsite outside its own source file, test files,
171
+ * and dist directories. Required for the `implemented` gate when the task
172
+ * carries the `callsite-coverage` label (T1605).
173
+ *
174
+ * @task T1605
175
+ */
176
+ export const callsiteCoverageAtomSchema = z.object({
177
+ kind: z.literal('callsite-coverage'),
178
+ symbolName: z.string().min(1, 'callsite-coverage atom requires a non-empty symbolName'),
179
+ relativeSourcePath: z
180
+ .string()
181
+ .min(1, 'callsite-coverage atom requires a non-empty relativeSourcePath'),
182
+ });
183
+ // ---------------------------------------------------------------------------
184
+ // Discriminated union
185
+ // ---------------------------------------------------------------------------
186
+ /**
187
+ * Zod discriminated union covering every parseable evidence atom prefix.
188
+ *
189
+ * Use `EvidenceAtomSchema.safeParse(atom)` to validate a single atom client-
190
+ * side BEFORE invoking `cleo verify`. The runtime parser in
191
+ * `packages/core/src/tasks/evidence.ts` performs filesystem/git/tool checks
192
+ * on top of this syntactic schema.
193
+ *
194
+ * Atom kinds:
195
+ * - `commit` — git commit SHA (T832)
196
+ * - `files` — touched file paths (T832)
197
+ * - `test-run` — structured test runner JSON (T832)
198
+ * - `tool` — project-resolved tool exit code (T832 / T1534)
199
+ * - `url` — soft external pointer (T832)
200
+ * - `note` — free-form note (T832)
201
+ * - `decision` — brain_decisions row reference (T1875)
202
+ * - `pr` — merged-PR retroactive proof (T9764 / T9838)
203
+ * - `loc-drop` — engine-migration LOC reduction (T1604)
204
+ * - `callsite-coverage` — exported-symbol production callsite (T1605)
205
+ *
206
+ * @task T10337
207
+ * @adr ADR-051
208
+ */
209
+ export const EvidenceAtomSchema = z.discriminatedUnion('kind', [
210
+ commitAtomSchema,
211
+ filesAtomSchema,
212
+ testRunAtomSchema,
213
+ toolAtomSchema,
214
+ urlAtomSchema,
215
+ noteAtomSchema,
216
+ decisionAtomSchema,
217
+ prAtomSchema,
218
+ locDropAtomSchema,
219
+ callsiteCoverageAtomSchema,
220
+ ]);
221
+ /**
222
+ * Mapping from each {@link VerificationGate} to its satisfying atom
223
+ * combinations. Mirrors the legacy `GATE_EVIDENCE_MINIMUMS` table in
224
+ * `packages/core/src/tasks/evidence.ts` exactly — behavior parity required
225
+ * by T10337.
226
+ *
227
+ * ## Why two alternatives for `implemented`?
228
+ *
229
+ * The `implemented` gate accepts six different evidence shapes:
230
+ *
231
+ * - `[commit, files]` — standard: commit SHA + touched file list.
232
+ * - `[commit, note]` — deletion-safe: commit SHA + descriptive note
233
+ * (when the implementation deleted files there
234
+ * are none left to anchor `files:`).
235
+ * - `[decision, files]` — decision-only task: brain_decisions row +
236
+ * research-note file (T1875).
237
+ * - `[decision, note]` — decision-only task without research note.
238
+ * - `[pr]` — merged-PR retroactive proof (T9838 extension
239
+ * of T9764).
240
+ *
241
+ * ## Why is `qaPassed` listed as `['tool']` not `['tool', 'tool']`?
242
+ *
243
+ * The pre-T10337 runtime enforced "at least one atom of kind `tool` is
244
+ * present" — it did NOT count distinct tool names. The convention `tool:lint`
245
+ * + `tool:typecheck` is documented in AGENTS.md as best-practice but the
246
+ * gate is satisfied by a single tool atom (e.g. `tool:test` when test
247
+ * already runs lint + typecheck pre-flight). Behavior parity requires that
248
+ * single-tool atoms continue to pass.
249
+ *
250
+ * @task T10337
251
+ * @adr ADR-051 §2.3
252
+ */
253
+ export const GATE_EVIDENCE_REQUIREMENTS = Object.freeze({
254
+ implemented: {
255
+ oneOf: [
256
+ ['commit', 'files'],
257
+ ['commit', 'note'],
258
+ ['decision', 'files'],
259
+ ['decision', 'note'],
260
+ ['pr'],
261
+ ],
262
+ },
263
+ testsPassed: { oneOf: [['test-run'], ['tool'], ['pr']] },
264
+ qaPassed: { oneOf: [['tool'], ['pr']] },
265
+ documented: { oneOf: [['files'], ['url']] },
266
+ securityPassed: { oneOf: [['tool'], ['note']] },
267
+ cleanupDone: { oneOf: [['note']] },
268
+ nexusImpact: { oneOf: [['tool'], ['note']] },
269
+ });
270
+ /**
271
+ * Format the satisfying-combinations spec for a gate as the legacy
272
+ * `[commit AND files] OR [pr]` string used in CLI error messages.
273
+ *
274
+ * Exposed so consumers can render the same hint text without re-computing it.
275
+ *
276
+ * @task T10337
277
+ */
278
+ export function formatGateRequirement(gate) {
279
+ const requirement = GATE_EVIDENCE_REQUIREMENTS[gate];
280
+ return requirement.oneOf.map((set) => `[${set.join(' AND ')}]`).join(' OR ');
281
+ }
282
+ /**
283
+ * Check whether a set of parsed atoms satisfies the requirement spec for
284
+ * `gate`.
285
+ *
286
+ * Returns `{ ok: true }` when ANY combination in `GATE_EVIDENCE_REQUIREMENTS[gate].oneOf`
287
+ * is fully present in `atoms` (matched by kind). Returns
288
+ * `{ ok: false, message }` otherwise — the message matches the legacy
289
+ * `checkGateEvidenceMinimum()` format byte-for-byte so error surfaces do not
290
+ * regress.
291
+ *
292
+ * Atoms must already be parsed (via {@link parseEvidenceString} or
293
+ * {@link EvidenceAtomSchema}); the helper does NOT re-validate the atom
294
+ * payload. Use {@link EvidenceAtomSchema.safeParse} first if the input came
295
+ * from an untrusted source.
296
+ *
297
+ * @param gate - Verification gate being checked.
298
+ * @param atoms - Already-parsed evidence atoms.
299
+ * @returns Pass / fail with a human-readable failure message.
300
+ *
301
+ * @example
302
+ * ```ts
303
+ * const atoms = parseEvidenceString('commit:abc1234;files:src/foo.ts');
304
+ * validateEvidenceForGate('implemented', atoms); // { ok: true }
305
+ * validateEvidenceForGate('testsPassed', atoms);
306
+ * // { ok: false, message: "Gate 'testsPassed' requires evidence: [test-run] OR [tool] OR [pr]" }
307
+ * ```
308
+ *
309
+ * @task T10337
310
+ * @adr ADR-051 §2.3
311
+ */
312
+ export function validateEvidenceForGate(gate, atoms) {
313
+ const requirement = GATE_EVIDENCE_REQUIREMENTS[gate];
314
+ if (!requirement) {
315
+ // Unknown gate — defensive default: accept (preserves legacy "no minimum"
316
+ // behavior from checkGateEvidenceMinimum when the gate had no entry).
317
+ return { ok: true };
318
+ }
319
+ for (const combination of requirement.oneOf) {
320
+ const satisfied = combination.every((kind) => atoms.some((a) => a.kind === kind));
321
+ if (satisfied)
322
+ return { ok: true };
323
+ }
324
+ return {
325
+ ok: false,
326
+ message: `Gate '${gate}' requires evidence: ${formatGateRequirement(gate)}`,
327
+ };
328
+ }
329
+ /**
330
+ * Error class thrown by {@link parseEvidenceString} when the input is
331
+ * malformed. Carries a {@link reason} suitable for the CLI `fix:` hint.
332
+ *
333
+ * Pure data — no dependency on `@cleocode/contracts/errors` (which would
334
+ * pull the CleoError import surface into every consumer that just wants
335
+ * syntactic validation).
336
+ *
337
+ * @task T10337
338
+ */
339
+ export class EvidenceParseError extends Error {
340
+ /** Hint text suitable for an `fix:` message in the CLI surface. */
341
+ fix;
342
+ constructor(message, fix) {
343
+ super(message);
344
+ this.name = 'EvidenceParseError';
345
+ this.fix = fix;
346
+ }
347
+ }
348
+ /**
349
+ * Parse the raw CLI `--evidence` string into structured atoms.
350
+ *
351
+ * Syntax:
352
+ * ```
353
+ * evidence-list := atom (';' atom)*
354
+ * atom := kind ':' payload
355
+ * ```
356
+ *
357
+ * The payload format depends on `kind`:
358
+ *
359
+ * - `files` — comma-separated paths
360
+ * - `loc-drop` — `<fromLines>:<toLines>` (two integers)
361
+ * - `callsite-coverage` — `<symbolName>:<relativeSourcePath>`
362
+ * - `pr` — positive integer
363
+ * - everything else — opaque payload string until the next `;`
364
+ *
365
+ * A `state:MERGED` modifier may follow a `pr:<num>` atom and is consumed
366
+ * in-place (no separate atom is emitted) — see T9838. Any other usage of
367
+ * `state:` is rejected.
368
+ *
369
+ * Whitespace surrounding the `;` separators and around `kind`/`payload` is
370
+ * trimmed. Empty chunks are skipped (consecutive `;;` is tolerated).
371
+ *
372
+ * @param raw - Raw `--evidence` string.
373
+ * @returns Parsed atoms ready for {@link validateEvidenceForGate} or for
374
+ * the runtime validator in `packages/core/src/tasks/evidence.ts`.
375
+ * @throws {@link EvidenceParseError} when the input is malformed.
376
+ *
377
+ * @example
378
+ * ```ts
379
+ * parseEvidenceString('commit:abc1234;files:src/foo.ts,src/bar.ts;tool:lint');
380
+ * // [
381
+ * // { kind: 'commit', sha: 'abc1234' },
382
+ * // { kind: 'files', paths: ['src/foo.ts', 'src/bar.ts'] },
383
+ * // { kind: 'tool', tool: 'lint' },
384
+ * // ]
385
+ * ```
386
+ *
387
+ * @task T10337
388
+ * @adr ADR-051
389
+ */
390
+ export function parseEvidenceString(raw) {
391
+ if (!raw || typeof raw !== 'string') {
392
+ throw new EvidenceParseError('Evidence string is empty', "Pass evidence like '--evidence commit:<sha>;files:<path>;...'");
393
+ }
394
+ const chunks = raw
395
+ .split(';')
396
+ .map((s) => s.trim())
397
+ .filter(Boolean);
398
+ if (chunks.length === 0) {
399
+ throw new EvidenceParseError('Evidence string contained no atoms', "Pass evidence like '--evidence commit:<sha>;files:<path>;...'");
400
+ }
401
+ const atoms = [];
402
+ for (const chunk of chunks) {
403
+ const colon = chunk.indexOf(':');
404
+ if (colon < 1 || colon === chunk.length - 1) {
405
+ throw new EvidenceParseError(`Malformed evidence atom: "${chunk}" (expected <kind>:<payload>)`, 'Each atom must be of form "<kind>:<payload>" separated by ";".');
406
+ }
407
+ const kind = chunk.slice(0, colon).trim();
408
+ const payload = chunk.slice(colon + 1).trim();
409
+ switch (kind) {
410
+ case 'commit':
411
+ atoms.push({ kind: 'commit', sha: payload });
412
+ break;
413
+ case 'files':
414
+ atoms.push({
415
+ kind: 'files',
416
+ paths: payload
417
+ .split(',')
418
+ .map((p) => p.trim())
419
+ .filter(Boolean),
420
+ });
421
+ break;
422
+ case 'test-run':
423
+ atoms.push({ kind: 'test-run', path: payload });
424
+ break;
425
+ case 'tool':
426
+ atoms.push({ kind: 'tool', tool: payload });
427
+ break;
428
+ case 'url':
429
+ atoms.push({ kind: 'url', url: payload });
430
+ break;
431
+ case 'note':
432
+ atoms.push({ kind: 'note', note: payload });
433
+ break;
434
+ case 'decision': {
435
+ if (!payload) {
436
+ throw new EvidenceParseError(`decision atom requires a non-empty decision ID in "${chunk}"`, 'Use format: decision:<decisionId> e.g. decision:D-arch-001');
437
+ }
438
+ atoms.push({ kind: 'decision', decisionId: payload });
439
+ break;
440
+ }
441
+ case 'pr': {
442
+ const prNumber = Number(payload);
443
+ if (!Number.isInteger(prNumber) || prNumber <= 0) {
444
+ throw new EvidenceParseError(`pr atom requires a positive integer PR number, got "${payload}" in "${chunk}"`, 'Use format: pr:<number> e.g. pr:357');
445
+ }
446
+ atoms.push({ kind: 'pr', prNumber });
447
+ break;
448
+ }
449
+ case 'loc-drop': {
450
+ const firstColon = payload.indexOf(':');
451
+ if (firstColon < 1 || firstColon === payload.length - 1) {
452
+ throw new EvidenceParseError(`Malformed loc-drop atom: "${chunk}" (expected loc-drop:<fromLines>:<toLines>)`, 'Use format: loc-drop:<fromLines>:<toLines> e.g. loc-drop:1200:800');
453
+ }
454
+ const fromRaw = payload.slice(0, firstColon).trim();
455
+ const toRaw = payload.slice(firstColon + 1).trim();
456
+ const fromLines = Number(fromRaw);
457
+ const toLines = Number(toRaw);
458
+ if (!Number.isInteger(fromLines) || fromLines < 0) {
459
+ throw new EvidenceParseError(`loc-drop: fromLines must be a non-negative integer, got "${fromRaw}"`, 'Use format: loc-drop:<fromLines>:<toLines> e.g. loc-drop:1200:800');
460
+ }
461
+ if (!Number.isInteger(toLines) || toLines < 0) {
462
+ throw new EvidenceParseError(`loc-drop: toLines must be a non-negative integer, got "${toRaw}"`, 'Use format: loc-drop:<fromLines>:<toLines> e.g. loc-drop:1200:800');
463
+ }
464
+ atoms.push({ kind: 'loc-drop', fromLines, toLines });
465
+ break;
466
+ }
467
+ case 'callsite-coverage': {
468
+ const colonIdx = payload.indexOf(':');
469
+ if (colonIdx < 1 || colonIdx === payload.length - 1) {
470
+ throw new EvidenceParseError(`Malformed callsite-coverage atom: "${chunk}" (expected callsite-coverage:<symbolName>:<relativeSourcePath>)`, 'Use format: callsite-coverage:<symbolName>:<relativeSourcePath> e.g. callsite-coverage:myFn:packages/core/src/myFn.ts');
471
+ }
472
+ const symbolName = payload.slice(0, colonIdx).trim();
473
+ const relativeSourcePath = payload.slice(colonIdx + 1).trim();
474
+ if (!symbolName) {
475
+ throw new EvidenceParseError(`callsite-coverage: symbolName must not be empty in "${chunk}"`, 'Use format: callsite-coverage:<symbolName>:<relativeSourcePath>');
476
+ }
477
+ if (!relativeSourcePath) {
478
+ throw new EvidenceParseError(`callsite-coverage: relativeSourcePath must not be empty in "${chunk}"`, 'Use format: callsite-coverage:<symbolName>:<relativeSourcePath>');
479
+ }
480
+ atoms.push({ kind: 'callsite-coverage', symbolName, relativeSourcePath });
481
+ break;
482
+ }
483
+ case 'state': {
484
+ // T9838: explicit-form modifier for the preceding pr: atom.
485
+ // Format: pr:<num>;state:MERGED. The resolver always requires
486
+ // state === 'MERGED' so the modifier is intent-documenting — it
487
+ // asserts the caller knows the contract.
488
+ if (payload !== 'MERGED') {
489
+ throw new EvidenceParseError(`state atom only accepts "MERGED", got "${payload}" in "${chunk}"`, 'Use format: pr:<num>;state:MERGED (state is only meaningful paired with a pr: atom)');
490
+ }
491
+ const lastAtom = atoms[atoms.length - 1];
492
+ if (!lastAtom || lastAtom.kind !== 'pr') {
493
+ throw new EvidenceParseError(`state:MERGED must immediately follow a pr:<num> atom in the same evidence string ` +
494
+ `(got "${chunk}" with no preceding pr: atom)`, 'Use format: --evidence "pr:357;state:MERGED" (state modifier requires a pr: predecessor)');
495
+ }
496
+ // Modifier consumed — no new atom emitted.
497
+ break;
498
+ }
499
+ default:
500
+ throw new EvidenceParseError(`Unknown evidence kind: "${kind}" in atom "${chunk}"`, 'Valid kinds: commit, files, test-run, tool, url, note, loc-drop, callsite-coverage, decision, pr, state');
501
+ }
502
+ }
503
+ return atoms;
504
+ }
505
+ //# sourceMappingURL=evidence-atom-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidence-atom-schema.js","sourceRoot":"","sources":["../src/evidence-atom-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;IACzB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,mBAAmB,EAAE,wCAAwC,CAAC;CACrF,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACxB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,uCAAuC,CAAC;CAClF,CAAC,CAAC;AAEH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAA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AC;gBACD,2CAA2C;gBAC3C,MAAM;YACR,CAAC;YACD;gBACE,MAAM,IAAI,kBAAkB,CAC1B,2BAA2B,IAAI,cAAc,KAAK,GAAG,EACrD,yGAAyG,CAC1G,CAAC;QACN,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -272,6 +272,43 @@ export declare const E_WORKFLOW_NOT_FOUND: "E_WORKFLOW_NOT_FOUND";
272
272
  * @task T9839
273
273
  */
274
274
  export declare const E_WRITE_CONTENTION: "E_WRITE_CONTENTION";
275
+ /**
276
+ * E_INVALID_SEVERITY_VALUE — `--severity` was passed a value that is not one
277
+ * of the canonical {@link TASK_SEVERITIES} members (`P0|P1|P2|P3`).
278
+ *
279
+ * Returned by the `cleo add` and `cleo update` CLI commands at the dispatch
280
+ * boundary BEFORE the request reaches the database. Replaces the previous
281
+ * late-stage failure mode where SQLite surfaced a cryptic
282
+ * `CHECK constraint failed: severity` error after the write attempt.
283
+ *
284
+ * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
285
+ *
286
+ * @task T10341
287
+ * @epic T10327
288
+ * @saga T10326
289
+ */
290
+ export declare const E_INVALID_SEVERITY_VALUE: "E_INVALID_SEVERITY_VALUE";
291
+ /**
292
+ * E_INVALID_PIPELINE_STAGE — `--pipeline-stage` was passed a value that
293
+ * either (a) is not a recognised stage name in the canonical RCASD-IVTR+C
294
+ * pipeline (`research|consensus|architecture_decision|specification|`
295
+ * `decomposition|implementation|validation|testing|release|contribution|`
296
+ * `cancelled`), or (b) would move the task BACKWARD relative to its
297
+ * current stage. Pipeline stages are forward-only.
298
+ *
299
+ * Returned by the `cleo update` CLI command at the dispatch boundary BEFORE
300
+ * the request reaches the database. Replaces the previous late-stage
301
+ * failure mode where SQLite surfaced a cryptic
302
+ * `CHECK constraint failed: pipeline_stage` error or the core engine threw
303
+ * an opaque {@link CleoError} after a partial round-trip.
304
+ *
305
+ * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
306
+ *
307
+ * @task T10341
308
+ * @epic T10327
309
+ * @saga T10326
310
+ */
311
+ export declare const E_INVALID_PIPELINE_STAGE: "E_INVALID_PIPELINE_STAGE";
275
312
  /** Check if an exit code represents an error (1-99). */
276
313
  export declare function isErrorCode(code: ExitCode): boolean;
277
314
  /** Check if an exit code represents success (0 or 100+). */
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.d.ts","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,QAAQ;IAElB,OAAO,IAAI;IAGX,aAAa,IAAI;IACjB,aAAa,IAAI;IACjB,UAAU,IAAI;IACd,SAAS,IAAI;IACb,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,YAAY,IAAI;IAChB,YAAY,IAAI;IAGhB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IACnB,aAAa,KAAK;IAClB,mBAAmB,KAAK;IACxB,kBAAkB,KAAK;IACvB,eAAe,KAAK;IACpB,YAAY,KAAK;IACjB,cAAc,KAAK;IACnB,cAAc,KAAK;IACnB,cAAc,KAAK;IAGnB,iBAAiB,KAAK;IACtB,uBAAuB,KAAK;IAC5B,YAAY,KAAK;IAGjB,cAAc,KAAK;IACnB,iBAAiB,KAAK;IACtB,cAAc,KAAK;IACnB,aAAa,KAAK;IAClB,iBAAiB,KAAK;IACtB,YAAY,KAAK;IACjB,gBAAgB,KAAK;IACrB,qBAAqB,KAAK;IAC1B,oBAAoB,KAAK;IACzB,cAAc,KAAK;IAGnB,wBAAwB,KAAK;IAC7B,kBAAkB,KAAK;IACvB,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,mBAAmB,KAAK;IACxB,eAAe,KAAK;IACpB,mBAAmB,KAAK;IACxB,cAAc,KAAK;IACnB;;;;;;;;;;;;;;OAcG;IACH,SAAS,KAAK;IAEd;;;;;;;;;;OAUG;IACH,yBAAyB,KAAK;IAG9B,eAAe,KAAK;IACpB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VALID_SEVERITY_VALUE — `--severity` was passed a value that is not one
305
+ * of the canonical {@link TASK_SEVERITIES} members (`P0|P1|P2|P3`).
306
+ *
307
+ * Returned by the `cleo add` and `cleo update` CLI commands at the dispatch
308
+ * boundary BEFORE the request reaches the database. Replaces the previous
309
+ * late-stage failure mode where SQLite surfaced a cryptic
310
+ * `CHECK constraint failed: severity` error after the write attempt.
311
+ *
312
+ * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
313
+ *
314
+ * @task T10341
315
+ * @epic T10327
316
+ * @saga T10326
317
+ */
318
+ export const E_INVALID_SEVERITY_VALUE = 'E_INVALID_SEVERITY_VALUE';
319
+ /**
320
+ * E_INVALID_PIPELINE_STAGE — `--pipeline-stage` was passed a value that
321
+ * either (a) is not a recognised stage name in the canonical RCASD-IVTR+C
322
+ * pipeline (`research|consensus|architecture_decision|specification|`
323
+ * `decomposition|implementation|validation|testing|release|contribution|`
324
+ * `cancelled`), or (b) would move the task BACKWARD relative to its
325
+ * current stage. Pipeline stages are forward-only.
326
+ *
327
+ * Returned by the `cleo update` CLI command at the dispatch boundary BEFORE
328
+ * the request reaches the database. Replaces the previous late-stage
329
+ * failure mode where SQLite surfaced a cryptic
330
+ * `CHECK constraint failed: pipeline_stage` error or the core engine threw
331
+ * an opaque {@link CleoError} after a partial round-trip.
332
+ *
333
+ * Maps to {@link ExitCode.VALIDATION_ERROR} (6) at the CLI boundary.
334
+ *
335
+ * @task T10341
336
+ * @epic T10327
337
+ * @saga T10326
338
+ */
339
+ export const E_INVALID_PIPELINE_STAGE = 'E_INVALID_PIPELINE_STAGE';
303
340
  /** Check if an exit code represents an error (1-99). */
304
341
  export function isErrorCode(code) {
305
342
  return code >= 1 && code < 100;
@@ -1 +1 @@
1
- {"version":3,"file":"exit-codes.js","sourceRoot":"","sources":["../src/exit-codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAN,IAAY,QAwNX;AAxND,WAAY,QAAQ;IACl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