@cleocode/contracts 2026.5.114 → 2026.5.121

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 (49) hide show
  1. package/dist/__tests__/changesets.test.d.ts +8 -0
  2. package/dist/__tests__/changesets.test.d.ts.map +1 -0
  3. package/dist/__tests__/changesets.test.js +146 -0
  4. package/dist/__tests__/changesets.test.js.map +1 -0
  5. package/dist/__tests__/evidence-atom-schema.test.js +75 -1
  6. package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
  7. package/dist/__tests__/meta-tokens.test.d.ts +16 -0
  8. package/dist/__tests__/meta-tokens.test.d.ts.map +1 -0
  9. package/dist/__tests__/meta-tokens.test.js +99 -0
  10. package/dist/__tests__/meta-tokens.test.js.map +1 -0
  11. package/dist/boundary.js +3 -3
  12. package/dist/boundary.js.map +1 -1
  13. package/dist/changesets.d.ts +91 -0
  14. package/dist/changesets.d.ts.map +1 -1
  15. package/dist/changesets.js +72 -2
  16. package/dist/changesets.js.map +1 -1
  17. package/dist/dispatch/operations-registry.d.ts.map +1 -1
  18. package/dist/dispatch/operations-registry.js +148 -0
  19. package/dist/dispatch/operations-registry.js.map +1 -1
  20. package/dist/evidence-atom-schema.d.ts +52 -8
  21. package/dist/evidence-atom-schema.d.ts.map +1 -1
  22. package/dist/evidence-atom-schema.js +96 -0
  23. package/dist/evidence-atom-schema.js.map +1 -1
  24. package/dist/index.d.ts +2 -2
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/operations/docs.d.ts +166 -8
  29. package/dist/operations/docs.d.ts.map +1 -1
  30. package/dist/operations/docs.js +9 -7
  31. package/dist/operations/docs.js.map +1 -1
  32. package/dist/operations/tasks.d.ts +39 -0
  33. package/dist/operations/tasks.d.ts.map +1 -1
  34. package/dist/operations/tasks.js.map +1 -1
  35. package/dist/task-record.d.ts +7 -0
  36. package/dist/task-record.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
  39. package/src/__tests__/changesets.test.ts +176 -0
  40. package/src/__tests__/evidence-atom-schema.test.ts +88 -0
  41. package/src/__tests__/meta-tokens.test.ts +107 -0
  42. package/src/boundary.ts +3 -3
  43. package/src/changesets.ts +93 -2
  44. package/src/dispatch/operations-registry.ts +155 -0
  45. package/src/evidence-atom-schema.ts +131 -7
  46. package/src/index.ts +2 -0
  47. package/src/operations/docs.ts +187 -9
  48. package/src/operations/tasks.ts +39 -0
  49. package/src/task-record.ts +7 -0
@@ -52,6 +52,64 @@ import { z } from 'zod';
52
52
  export declare const CHANGESET_KINDS: readonly ["feat", "fix", "perf", "refactor", "docs", "test", "chore", "breaking"];
53
53
  /** Allowed values of {@link ChangesetEntry.kind}. */
54
54
  export type ChangesetKind = (typeof CHANGESET_KINDS)[number];
55
+ /**
56
+ * Deterministic release-note section override used by zero-token renderers.
57
+ *
58
+ * These values intentionally mirror Keep-a-Changelog style headings so release
59
+ * tooling can render higher-quality notes without an LLM/API/token dependency.
60
+ */
61
+ export declare const CHANGESET_RELEASE_NOTE_SECTIONS: readonly ["added", "changed", "fixed", "deprecated", "removed", "security", "breaking"];
62
+ /** Allowed values of {@link ChangesetReleaseNotesMetadata.section}. */
63
+ export type ChangesetReleaseNoteSection = (typeof CHANGESET_RELEASE_NOTE_SECTIONS)[number];
64
+ /** Audience labels for deterministic release-note routing. */
65
+ export declare const CHANGESET_RELEASE_NOTE_AUDIENCES: readonly ["users", "operators", "developers", "maintainers"];
66
+ /** Allowed values of {@link ChangesetReleaseNotesMetadata.audience}. */
67
+ export type ChangesetReleaseNoteAudience = (typeof CHANGESET_RELEASE_NOTE_AUDIENCES)[number];
68
+ /** Scope labels for deterministic release-note routing. */
69
+ export declare const CHANGESET_RELEASE_NOTE_SCOPES: readonly ["project", "package", "component", "docs", "ops", "security"];
70
+ /** Allowed values of {@link ChangesetReleaseNotesMetadata.scope}. */
71
+ export type ChangesetReleaseNoteScope = (typeof CHANGESET_RELEASE_NOTE_SCOPES)[number];
72
+ /**
73
+ * Optional deterministic metadata for release-note rendering.
74
+ *
75
+ * This is deliberately small, explicit, and strict: it gives release tooling
76
+ * structured author-provided facts (section, audience, target, impact, etc.)
77
+ * while preserving zero-token defaults and failing loudly on misspelled fields.
78
+ */
79
+ export declare const ChangesetReleaseNotesMetadataSchema: z.ZodObject<{
80
+ section: z.ZodOptional<z.ZodEnum<{
81
+ removed: "removed";
82
+ deprecated: "deprecated";
83
+ security: "security";
84
+ fixed: "fixed";
85
+ breaking: "breaking";
86
+ added: "added";
87
+ changed: "changed";
88
+ }>>;
89
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
90
+ users: "users";
91
+ operators: "operators";
92
+ developers: "developers";
93
+ maintainers: "maintainers";
94
+ }>>>;
95
+ scope: z.ZodOptional<z.ZodEnum<{
96
+ project: "project";
97
+ security: "security";
98
+ docs: "docs";
99
+ package: "package";
100
+ component: "component";
101
+ ops: "ops";
102
+ }>>;
103
+ targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
104
+ impact: z.ZodOptional<z.ZodString>;
105
+ migration: z.ZodOptional<z.ZodString>;
106
+ deprecation: z.ZodOptional<z.ZodString>;
107
+ security: z.ZodOptional<z.ZodString>;
108
+ operatorNotes: z.ZodOptional<z.ZodString>;
109
+ includeInChangelog: z.ZodOptional<z.ZodBoolean>;
110
+ }, z.core.$strict>;
111
+ /** Inferred TypeScript type for deterministic release-note metadata. */
112
+ export type ChangesetReleaseNotesMetadata = z.infer<typeof ChangesetReleaseNotesMetadataSchema>;
55
113
  /**
56
114
  * Zod schema for a single changeset entry. Validates frontmatter fields
57
115
  * + markdown body of a file under `.changeset/*.md`.
@@ -66,6 +124,7 @@ export type ChangesetKind = (typeof CHANGESET_KINDS)[number];
66
124
  * - `prs` — linked PR numbers
67
125
  * - `notes` — longer-form markdown body
68
126
  * - `breaking` — required migration note when `kind === 'breaking'`
127
+ * - `releaseNotes` — deterministic zero-token release-note metadata
69
128
  */
70
129
  export declare const ChangesetEntrySchema: z.ZodObject<{
71
130
  id: z.ZodString;
@@ -84,6 +143,38 @@ export declare const ChangesetEntrySchema: z.ZodObject<{
84
143
  prs: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
85
144
  notes: z.ZodOptional<z.ZodString>;
86
145
  breaking: z.ZodOptional<z.ZodString>;
146
+ releaseNotes: z.ZodOptional<z.ZodObject<{
147
+ section: z.ZodOptional<z.ZodEnum<{
148
+ removed: "removed";
149
+ deprecated: "deprecated";
150
+ security: "security";
151
+ fixed: "fixed";
152
+ breaking: "breaking";
153
+ added: "added";
154
+ changed: "changed";
155
+ }>>;
156
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
157
+ users: "users";
158
+ operators: "operators";
159
+ developers: "developers";
160
+ maintainers: "maintainers";
161
+ }>>>;
162
+ scope: z.ZodOptional<z.ZodEnum<{
163
+ project: "project";
164
+ security: "security";
165
+ docs: "docs";
166
+ package: "package";
167
+ component: "component";
168
+ ops: "ops";
169
+ }>>;
170
+ targets: z.ZodOptional<z.ZodArray<z.ZodString>>;
171
+ impact: z.ZodOptional<z.ZodString>;
172
+ migration: z.ZodOptional<z.ZodString>;
173
+ deprecation: z.ZodOptional<z.ZodString>;
174
+ security: z.ZodOptional<z.ZodString>;
175
+ operatorNotes: z.ZodOptional<z.ZodString>;
176
+ includeInChangelog: z.ZodOptional<z.ZodBoolean>;
177
+ }, z.core.$strict>>;
87
178
  }, z.core.$strip>;
88
179
  /**
89
180
  * Inferred TypeScript type for a parsed changeset entry.
@@ -1 +1 @@
1
- {"version":3,"file":"changesets.d.ts","sourceRoot":"","sources":["../src/changesets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,mF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AC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAchG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8B7B,CAAC;AAEL;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -60,6 +60,73 @@ export const CHANGESET_KINDS = [
60
60
  'chore',
61
61
  'breaking',
62
62
  ];
63
+ // ─── Release-note metadata ───────────────────────────────────────────────────
64
+ /**
65
+ * Deterministic release-note section override used by zero-token renderers.
66
+ *
67
+ * These values intentionally mirror Keep-a-Changelog style headings so release
68
+ * tooling can render higher-quality notes without an LLM/API/token dependency.
69
+ */
70
+ export const CHANGESET_RELEASE_NOTE_SECTIONS = [
71
+ 'added',
72
+ 'changed',
73
+ 'fixed',
74
+ 'deprecated',
75
+ 'removed',
76
+ 'security',
77
+ 'breaking',
78
+ ];
79
+ /** Audience labels for deterministic release-note routing. */
80
+ export const CHANGESET_RELEASE_NOTE_AUDIENCES = [
81
+ 'users',
82
+ 'operators',
83
+ 'developers',
84
+ 'maintainers',
85
+ ];
86
+ /** Scope labels for deterministic release-note routing. */
87
+ export const CHANGESET_RELEASE_NOTE_SCOPES = [
88
+ 'project',
89
+ 'package',
90
+ 'component',
91
+ 'docs',
92
+ 'ops',
93
+ 'security',
94
+ ];
95
+ const nonEmptyReleaseNoteText = z.string().min(1, 'release-note metadata text must be non-empty');
96
+ const nonEmptyReleaseNoteList = z
97
+ .array(nonEmptyReleaseNoteText)
98
+ .min(1, 'release-note metadata list must contain at least one item');
99
+ /**
100
+ * Optional deterministic metadata for release-note rendering.
101
+ *
102
+ * This is deliberately small, explicit, and strict: it gives release tooling
103
+ * structured author-provided facts (section, audience, target, impact, etc.)
104
+ * while preserving zero-token defaults and failing loudly on misspelled fields.
105
+ */
106
+ export const ChangesetReleaseNotesMetadataSchema = z
107
+ .object({
108
+ /** Keep-a-Changelog style section/category override. */
109
+ section: z.enum(CHANGESET_RELEASE_NOTE_SECTIONS).optional(),
110
+ /** Intended readers for the note. */
111
+ audience: z.array(z.enum(CHANGESET_RELEASE_NOTE_AUDIENCES)).min(1).optional(),
112
+ /** Release-note scope. */
113
+ scope: z.enum(CHANGESET_RELEASE_NOTE_SCOPES).optional(),
114
+ /** Package/project/component targets affected by this entry. */
115
+ targets: nonEmptyReleaseNoteList.optional(),
116
+ /** User- or operator-visible impact statement. */
117
+ impact: nonEmptyReleaseNoteText.optional(),
118
+ /** Deterministic migration/action text, separate from breaking changes. */
119
+ migration: nonEmptyReleaseNoteText.optional(),
120
+ /** Deprecation detail for Deprecated sections. */
121
+ deprecation: nonEmptyReleaseNoteText.optional(),
122
+ /** Security detail for Security sections. */
123
+ security: nonEmptyReleaseNoteText.optional(),
124
+ /** Operator-facing rollout/verification note. */
125
+ operatorNotes: nonEmptyReleaseNoteText.optional(),
126
+ /** Explicit inclusion toggle for future release-scope filters. */
127
+ includeInChangelog: z.boolean().optional(),
128
+ })
129
+ .strict();
63
130
  // ─── Task ID validator ────────────────────────────────────────────────────────
64
131
  /**
65
132
  * Matches a CLEO task identifier: `T####` (task) or `E-####` (epic display
@@ -83,14 +150,15 @@ const TASK_ID_RE = /^(T\d+(-[A-Z][A-Za-z0-9]*)?|E-\d+(-[A-Z][A-Za-z0-9]*)?)$/;
83
150
  * - `prs` — linked PR numbers
84
151
  * - `notes` — longer-form markdown body
85
152
  * - `breaking` — required migration note when `kind === 'breaking'`
153
+ * - `releaseNotes` — deterministic zero-token release-note metadata
86
154
  */
87
155
  export const ChangesetEntrySchema = z
88
156
  .object({
89
- /** Filename slug (without the `.md` extension). */
157
+ /** Filename identifier (without the `.md` extension); lowercase kebab-case for new files, legacy uppercase task IDs accepted. */
90
158
  id: z
91
159
  .string()
92
160
  .min(1, 'id must be non-empty')
93
- .regex(/^[a-z0-9][a-z0-9-]*$/, 'id must be kebab-case (lowercase, digits, hyphens)'),
161
+ .regex(/^[A-Za-z0-9][A-Za-z0-9-]*$/, 'id must contain only ASCII letters, digits, and hyphens'),
94
162
  /** One or more CLEO task IDs this change is anchored to. */
95
163
  tasks: z
96
164
  .array(z.string().regex(TASK_ID_RE, 'task ID must match T#### or E-#### format'))
@@ -105,6 +173,8 @@ export const ChangesetEntrySchema = z
105
173
  notes: z.string().optional(),
106
174
  /** Migration note. Required iff `kind === 'breaking'`. */
107
175
  breaking: z.string().optional(),
176
+ /** Structured author-provided metadata for deterministic release notes. */
177
+ releaseNotes: ChangesetReleaseNotesMetadataSchema.optional(),
108
178
  })
109
179
  .refine((entry) => entry.kind !== 'breaking' || (entry.breaking?.length ?? 0) > 0, {
110
180
  message: 'breaking entries must include a non-empty `breaking` migration note',
@@ -1 +1 @@
1
- {"version":3,"file":"changesets.js","sourceRoot":"","sources":["../src/changesets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,MAAM;IACN,KAAK;IACL,MAAM;IACN,UAAU;IACV,MAAM;IACN,MAAM;IACN,OAAO;IACP,UAAU;CACF,CAAC;AAKX,iFAAiF;AAEjF;;;;;GAKG;AACH,MAAM,UAAU,GAAG,0DAA0D,CAAC;AAE9E,iFAAiF;AAEjF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,mDAAmD;IACnD,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC;SAC9B,KAAK,CAAC,sBAAsB,EAAE,oDAAoD,CAAC;IACtF,4DAA4D;IAC5D,KAAK,EAAE,CAAC;SACL,KAA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/B,2EAA2E;IAC3E,YAAY,EAAE,mCAAmC,CAAC,QAAQ,EAAE;CAC7D,CAAC;KACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE;IACjF,OAAO,EAAE,qEAAqE;IAC9E,IAAI,EAAE,CAAC,UAAU,CAAC;CACnB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"operations-registry.d.ts","sourceRoot":"","sources":["../../src/dispatch/operations-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEjG,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAMvE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAE1F;AAMD,6DAA6D;AAC7D,eAAO,MAAM,UAAU,EAAE,YAAY,EAu1PpC,CAAC"}
1
+ {"version":3,"file":"operations-registry.d.ts","sourceRoot":"","sources":["../../src/dispatch/operations-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEjG,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAMvE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAE1F;AAMD,6DAA6D;AAC7D,eAAO,MAAM,UAAU,EAAE,YAAY,EAk/PpC,CAAC"}
@@ -2286,6 +2286,39 @@ export const OPERATIONS = [
2286
2286
  },
2287
2287
  ],
2288
2288
  },
2289
+ {
2290
+ gateway: 'mutate',
2291
+ domain: 'tasks',
2292
+ operation: 'relates.remove',
2293
+ description: 'tasks.relates.remove (mutate) — delete a relation between two tasks. Pass `type` to scope deletion to a single relation kind; omit to remove any type.',
2294
+ tier: 1,
2295
+ idempotent: true,
2296
+ sessionRequired: false,
2297
+ requiredParams: ['taskId', 'relatedId'],
2298
+ params: [
2299
+ {
2300
+ name: 'taskId',
2301
+ type: 'string',
2302
+ required: true,
2303
+ description: 'Source task ID',
2304
+ cli: { positional: true },
2305
+ },
2306
+ {
2307
+ name: 'relatedId',
2308
+ type: 'string',
2309
+ required: true,
2310
+ description: 'Target task ID to remove the relation to',
2311
+ cli: { positional: true },
2312
+ },
2313
+ {
2314
+ name: 'type',
2315
+ type: 'string',
2316
+ required: false,
2317
+ description: 'Optional relation type (blocks|related|duplicates|absorbs|fixes|extends|supersedes). Omit to remove any type.',
2318
+ cli: { flag: 'type' },
2319
+ },
2320
+ ],
2321
+ },
2289
2322
  // === saga sub-domain (ADR-073 — above-epic grouping tier) ===
2290
2323
  {
2291
2324
  gateway: 'mutate',
@@ -6577,6 +6610,39 @@ export const OPERATIONS = [
6577
6610
  },
6578
6611
  ],
6579
6612
  },
6613
+ // ── docs.supersede (T10162) ──────────────────────────────────────────────
6614
+ {
6615
+ gateway: 'mutate',
6616
+ domain: 'docs',
6617
+ operation: 'supersede',
6618
+ description: 'docs.supersede (mutate) — atomically flip an older doc to `superseded` and link both rows via the supersedes/superseded_by self-FK pointers (T10162 · Saga T9855)',
6619
+ tier: 1,
6620
+ idempotent: true,
6621
+ sessionRequired: false,
6622
+ requiredParams: ['oldSlug', 'newSlug'],
6623
+ params: [
6624
+ {
6625
+ name: 'oldSlug',
6626
+ type: 'string',
6627
+ required: true,
6628
+ description: 'Slug of the doc being replaced',
6629
+ cli: { positional: true },
6630
+ },
6631
+ {
6632
+ name: 'newSlug',
6633
+ type: 'string',
6634
+ required: true,
6635
+ description: 'Slug of the doc that replaces oldSlug',
6636
+ cli: { positional: true },
6637
+ },
6638
+ {
6639
+ name: 'reason',
6640
+ type: 'string',
6641
+ required: false,
6642
+ description: 'Optional human-readable reason carried back on the response',
6643
+ },
6644
+ ],
6645
+ },
6580
6646
  // ── docs.generate (T798) ─────────────────────────────────────────────────
6581
6647
  {
6582
6648
  gateway: 'query',
@@ -6602,6 +6668,59 @@ export const OPERATIONS = [
6602
6668
  },
6603
6669
  ],
6604
6670
  },
6671
+ // ── docs.update (T10161 — Epic T10157 / Saga T9855) ──────────────────────
6672
+ {
6673
+ gateway: 'mutate',
6674
+ domain: 'docs',
6675
+ operation: 'update',
6676
+ description: 'docs.update (mutate) — replace blob content for an existing slug while preserving the slug. ' +
6677
+ 'New sha256 + new attachment row; the old row stays reachable by ID for history. ' +
6678
+ 'NO supersession edge (use `cleo docs supersede` for that). ' +
6679
+ 'Audit log entry appended to .cleo/audit/docs-versioning.jsonl (squashed within a 5-min window).',
6680
+ tier: 1,
6681
+ idempotent: false,
6682
+ sessionRequired: false,
6683
+ requiredParams: ['slug'],
6684
+ params: [
6685
+ {
6686
+ name: 'slug',
6687
+ type: 'string',
6688
+ required: true,
6689
+ description: 'Slug of the existing attachment to update',
6690
+ },
6691
+ {
6692
+ name: 'file',
6693
+ type: 'string',
6694
+ required: false,
6695
+ description: 'Path to a local file containing the new content',
6696
+ },
6697
+ {
6698
+ name: 'content',
6699
+ type: 'string',
6700
+ required: false,
6701
+ description: 'Inline UTF-8 content (mutually exclusive with file)',
6702
+ },
6703
+ {
6704
+ name: 'message',
6705
+ type: 'string',
6706
+ required: false,
6707
+ description: 'One-line summary describing the change (recorded in the audit log)',
6708
+ },
6709
+ {
6710
+ name: 'status',
6711
+ type: 'string',
6712
+ required: false,
6713
+ description: 'Override the new lifecycle status. Defaults to "draft" on every update. ' +
6714
+ 'Valid: draft|proposed|accepted|superseded|archived|deprecated.',
6715
+ },
6716
+ {
6717
+ name: 'attachedBy',
6718
+ type: 'string',
6719
+ required: false,
6720
+ description: 'Agent identity that performed the update (defaults to "human")',
6721
+ },
6722
+ ],
6723
+ },
6605
6724
  // ── playbook.* HITL CLI surface (T935) ───────────────────────────────────
6606
6725
  {
6607
6726
  gateway: 'mutate',
@@ -7262,6 +7381,35 @@ export const OPERATIONS = [
7262
7381
  },
7263
7382
  ],
7264
7383
  },
7384
+ // release query: validate-changelog (T9937 / Saga T9862 — canonical CHANGELOG
7385
+ // header validator that replaces the brittle inline grep step in
7386
+ // .github/workflows/release.yml). Read-only — exposed only under the query
7387
+ // gateway because no DB or filesystem mutation occurs.
7388
+ {
7389
+ gateway: 'query',
7390
+ domain: 'release',
7391
+ operation: 'validate-changelog',
7392
+ description: 'release.validate-changelog (query) — validate that CHANGELOG.md contains the canonical `## [VERSION]` header per ADR-028 §2.5. Replaces the brittle inline grep in .github/workflows/release.yml (T9937 / Saga T9862).',
7393
+ tier: 1,
7394
+ idempotent: true,
7395
+ sessionRequired: false,
7396
+ requiredParams: ['version'],
7397
+ params: [
7398
+ {
7399
+ name: 'version',
7400
+ type: 'string',
7401
+ required: true,
7402
+ description: 'Release version (accepts v2026.5.94 or 2026.5.94)',
7403
+ cli: { positional: true },
7404
+ },
7405
+ {
7406
+ name: 'changelogPath',
7407
+ type: 'string',
7408
+ required: false,
7409
+ description: 'Override the CHANGELOG file path (default: <projectRoot>/CHANGELOG.md)',
7410
+ },
7411
+ ],
7412
+ },
7265
7413
  // ---------------------------------------------------------------------------
7266
7414
  // Provenance domain — `cleo provenance` CLI surface (T9528 · Phase 2 of T9493)
7267
7415
  // ---------------------------------------------------------------------------