@cleocode/cleo 2026.3.11 → 2026.3.13-beta.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cleocode/cleo",
3
- "version": "2026.3.11",
3
+ "version": "2026.3.13-beta.1",
4
4
  "description": "CLEO V2 - TypeScript task management CLI for AI coding agents",
5
5
  "mcpName": "io.github.kryptobaseddev/cleo-mcp-server",
6
6
  "type": "module",
@@ -65,7 +65,7 @@
65
65
  "bin"
66
66
  ],
67
67
  "dependencies": {
68
- "@cleocode/caamp": "^1.5.2",
68
+ "@cleocode/caamp": "^1.6.0",
69
69
  "@cleocode/lafs-protocol": "^1.6.0",
70
70
  "@modelcontextprotocol/sdk": "^1.26.0",
71
71
  "ajv": "^8.18.0",
@@ -0,0 +1,438 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "CLEO Operation Constitution",
4
+ "description": "Validates the complete CLEO Operation Constitution document including the full registry, gateway matrices, and domain tables",
5
+ "type": "object",
6
+ "required": ["schemaVersion", "metadata", "registry", "gateways", "domains"],
7
+ "additionalProperties": false,
8
+ "definitions": {
9
+ "Gateway": {
10
+ "type": "string",
11
+ "enum": ["query", "mutate"],
12
+ "description": "CQRS gateway: read-only queries or state-changing mutations"
13
+ },
14
+ "CanonicalDomain": {
15
+ "type": "string",
16
+ "enum": ["tasks", "session", "memory", "check", "pipeline", "orchestrate", "tools", "admin", "nexus", "sharing"],
17
+ "description": "One of 10 canonical CLEO domains"
18
+ },
19
+ "Tier": {
20
+ "type": "integer",
21
+ "enum": [0, 1, 2],
22
+ "description": "Progressive disclosure tier: 0=basic, 1=extended, 2=full"
23
+ },
24
+ "ParamDef": {
25
+ "type": "object",
26
+ "required": ["name", "type", "required", "description"],
27
+ "properties": {
28
+ "name": {
29
+ "type": "string",
30
+ "pattern": "^[a-zA-Z][a-zA-Z0-9]*$",
31
+ "description": "Canonical camelCase parameter name"
32
+ },
33
+ "type": {
34
+ "type": "string",
35
+ "enum": ["string", "number", "boolean", "array"],
36
+ "description": "Runtime value type"
37
+ },
38
+ "required": {
39
+ "type": "boolean",
40
+ "description": "Whether parameter is required"
41
+ },
42
+ "description": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "Human-readable description"
46
+ },
47
+ "cli": {
48
+ "type": "object",
49
+ "properties": {
50
+ "positional": { "type": "boolean" },
51
+ "short": { "type": "string", "pattern": "^-[a-zA-Z]$" },
52
+ "flag": { "type": "string" },
53
+ "variadic": { "type": "boolean" }
54
+ },
55
+ "additionalProperties": false
56
+ },
57
+ "mcp": {
58
+ "type": "object",
59
+ "properties": {
60
+ "hidden": { "type": "boolean" },
61
+ "enum": {
62
+ "type": "array",
63
+ "items": { "type": "string" }
64
+ }
65
+ },
66
+ "additionalProperties": false
67
+ }
68
+ },
69
+ "additionalProperties": false
70
+ },
71
+ "OperationDef": {
72
+ "type": "object",
73
+ "required": ["gateway", "domain", "operation", "description", "tier", "idempotent", "sessionRequired", "requiredParams"],
74
+ "properties": {
75
+ "gateway": { "$ref": "#/definitions/Gateway" },
76
+ "domain": { "$ref": "#/definitions/CanonicalDomain" },
77
+ "operation": {
78
+ "type": "string",
79
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$",
80
+ "description": "Dot-notation operation name (e.g. 'show', 'stage.validate')"
81
+ },
82
+ "description": {
83
+ "type": "string",
84
+ "minLength": 1,
85
+ "description": "Brief human-readable description of the operation"
86
+ },
87
+ "tier": { "$ref": "#/definitions/Tier" },
88
+ "idempotent": {
89
+ "type": "boolean",
90
+ "description": "Whether the operation is safe to retry without side effects"
91
+ },
92
+ "sessionRequired": {
93
+ "type": "boolean",
94
+ "description": "Whether the operation requires an active session"
95
+ },
96
+ "requiredParams": {
97
+ "type": "array",
98
+ "items": {
99
+ "type": "string",
100
+ "pattern": "^[a-zA-Z][a-zA-Z0-9]*$"
101
+ },
102
+ "description": "Parameter keys that MUST be present in the request"
103
+ },
104
+ "params": {
105
+ "type": "array",
106
+ "items": { "$ref": "#/definitions/ParamDef" },
107
+ "description": "Full parameter descriptors (optional, replaces requiredParams when populated)"
108
+ },
109
+ "aliases": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string",
113
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$"
114
+ },
115
+ "description": "Backward-compatible operation name aliases"
116
+ }
117
+ },
118
+ "additionalProperties": false
119
+ }
120
+ },
121
+ "properties": {
122
+ "schemaVersion": {
123
+ "type": "string",
124
+ "pattern": "^\\d{4}\\.\\d+\\.\\d+$",
125
+ "description": "Constitution schema version (e.g. '2026.3.3')"
126
+ },
127
+ "metadata": {
128
+ "type": "object",
129
+ "required": ["version", "status", "date", "totalOperations", "gateways", "domains"],
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "version": {
133
+ "type": "string",
134
+ "description": "Constitution document version"
135
+ },
136
+ "status": {
137
+ "type": "string",
138
+ "enum": ["DRAFT", "APPROVED", "DEPRECATED"],
139
+ "description": "Constitution approval status"
140
+ },
141
+ "date": {
142
+ "type": "string",
143
+ "format": "date",
144
+ "description": "Constitution approval date (ISO 8601)"
145
+ },
146
+ "task": {
147
+ "type": "string",
148
+ "pattern": "^T\\d+$",
149
+ "description": "Associated task ID (e.g. 'T5241')"
150
+ },
151
+ "supersedes": {
152
+ "type": "string",
153
+ "description": "Document this constitution supersedes"
154
+ },
155
+ "totalOperations": {
156
+ "type": "integer",
157
+ "minimum": 1,
158
+ "description": "Total number of operations in registry"
159
+ },
160
+ "gateways": {
161
+ "type": "object",
162
+ "required": ["query", "mutate"],
163
+ "additionalProperties": false,
164
+ "properties": {
165
+ "query": {
166
+ "type": "integer",
167
+ "minimum": 0,
168
+ "description": "Number of query operations"
169
+ },
170
+ "mutate": {
171
+ "type": "integer",
172
+ "minimum": 0,
173
+ "description": "Number of mutate operations"
174
+ }
175
+ }
176
+ },
177
+ "domains": {
178
+ "type": "object",
179
+ "required": ["count", "names"],
180
+ "additionalProperties": false,
181
+ "properties": {
182
+ "count": {
183
+ "type": "integer",
184
+ "minimum": 1,
185
+ "maximum": 10,
186
+ "description": "Number of canonical domains"
187
+ },
188
+ "names": {
189
+ "type": "array",
190
+ "items": { "$ref": "#/definitions/CanonicalDomain" },
191
+ "minItems": 10,
192
+ "maxItems": 10,
193
+ "description": "List of all canonical domain names"
194
+ }
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "registry": {
200
+ "type": "object",
201
+ "required": ["operations"],
202
+ "additionalProperties": false,
203
+ "properties": {
204
+ "operations": {
205
+ "type": "array",
206
+ "items": { "$ref": "#/definitions/OperationDef" },
207
+ "minItems": 1,
208
+ "description": "All 201 operations in the registry"
209
+ }
210
+ }
211
+ },
212
+ "gateways": {
213
+ "type": "object",
214
+ "required": ["query", "mutate"],
215
+ "additionalProperties": false,
216
+ "properties": {
217
+ "query": {
218
+ "type": "object",
219
+ "required": ["matrix", "operations"],
220
+ "additionalProperties": false,
221
+ "properties": {
222
+ "matrix": {
223
+ "type": "object",
224
+ "description": "Query gateway matrix: domain -> operations[]",
225
+ "patternProperties": {
226
+ "^(tasks|session|memory|check|pipeline|orchestrate|tools|admin|nexus|sharing)$": {
227
+ "type": "array",
228
+ "items": {
229
+ "type": "string",
230
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$"
231
+ }
232
+ }
233
+ },
234
+ "additionalProperties": false
235
+ },
236
+ "operations": {
237
+ "type": "array",
238
+ "items": { "$ref": "#/definitions/OperationDef" },
239
+ "description": "All query operations"
240
+ }
241
+ }
242
+ },
243
+ "mutate": {
244
+ "type": "object",
245
+ "required": ["matrix", "operations"],
246
+ "additionalProperties": false,
247
+ "properties": {
248
+ "matrix": {
249
+ "type": "object",
250
+ "description": "Mutate gateway matrix: domain -> operations[]",
251
+ "patternProperties": {
252
+ "^(tasks|session|memory|check|pipeline|orchestrate|tools|admin|nexus|sharing)$": {
253
+ "type": "array",
254
+ "items": {
255
+ "type": "string",
256
+ "pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)*$"
257
+ }
258
+ }
259
+ },
260
+ "additionalProperties": false
261
+ },
262
+ "operations": {
263
+ "type": "array",
264
+ "items": { "$ref": "#/definitions/OperationDef" },
265
+ "description": "All mutate operations"
266
+ }
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "domains": {
272
+ "type": "object",
273
+ "description": "Domain tables: operations grouped by domain",
274
+ "required": ["tasks", "session", "memory", "check", "pipeline", "orchestrate", "tools", "admin", "nexus", "sharing"],
275
+ "additionalProperties": false,
276
+ "properties": {
277
+ "tasks": {
278
+ "type": "object",
279
+ "required": ["name", "purpose", "operations"],
280
+ "properties": {
281
+ "name": { "const": "tasks" },
282
+ "purpose": { "type": "string" },
283
+ "primaryStore": { "type": "string" },
284
+ "operations": {
285
+ "type": "array",
286
+ "items": { "$ref": "#/definitions/OperationDef" }
287
+ }
288
+ }
289
+ },
290
+ "session": {
291
+ "type": "object",
292
+ "required": ["name", "purpose", "operations"],
293
+ "properties": {
294
+ "name": { "const": "session" },
295
+ "purpose": { "type": "string" },
296
+ "primaryStore": { "type": "string" },
297
+ "operations": {
298
+ "type": "array",
299
+ "items": { "$ref": "#/definitions/OperationDef" }
300
+ }
301
+ }
302
+ },
303
+ "memory": {
304
+ "type": "object",
305
+ "required": ["name", "purpose", "operations"],
306
+ "properties": {
307
+ "name": { "const": "memory" },
308
+ "purpose": { "type": "string" },
309
+ "primaryStore": { "type": "string" },
310
+ "operations": {
311
+ "type": "array",
312
+ "items": { "$ref": "#/definitions/OperationDef" }
313
+ }
314
+ }
315
+ },
316
+ "check": {
317
+ "type": "object",
318
+ "required": ["name", "purpose", "operations"],
319
+ "properties": {
320
+ "name": { "const": "check" },
321
+ "purpose": { "type": "string" },
322
+ "primaryStore": { "type": "string" },
323
+ "operations": {
324
+ "type": "array",
325
+ "items": { "$ref": "#/definitions/OperationDef" }
326
+ }
327
+ }
328
+ },
329
+ "pipeline": {
330
+ "type": "object",
331
+ "required": ["name", "purpose", "operations"],
332
+ "properties": {
333
+ "name": { "const": "pipeline" },
334
+ "purpose": { "type": "string" },
335
+ "primaryStore": { "type": "string" },
336
+ "operations": {
337
+ "type": "array",
338
+ "items": { "$ref": "#/definitions/OperationDef" }
339
+ }
340
+ }
341
+ },
342
+ "orchestrate": {
343
+ "type": "object",
344
+ "required": ["name", "purpose", "operations"],
345
+ "properties": {
346
+ "name": { "const": "orchestrate" },
347
+ "purpose": { "type": "string" },
348
+ "primaryStore": { "type": "string" },
349
+ "operations": {
350
+ "type": "array",
351
+ "items": { "$ref": "#/definitions/OperationDef" }
352
+ }
353
+ }
354
+ },
355
+ "tools": {
356
+ "type": "object",
357
+ "required": ["name", "purpose", "operations"],
358
+ "properties": {
359
+ "name": { "const": "tools" },
360
+ "purpose": { "type": "string" },
361
+ "primaryStore": { "type": "string" },
362
+ "operations": {
363
+ "type": "array",
364
+ "items": { "$ref": "#/definitions/OperationDef" }
365
+ }
366
+ }
367
+ },
368
+ "admin": {
369
+ "type": "object",
370
+ "required": ["name", "purpose", "operations"],
371
+ "properties": {
372
+ "name": { "const": "admin" },
373
+ "purpose": { "type": "string" },
374
+ "primaryStore": { "type": "string" },
375
+ "operations": {
376
+ "type": "array",
377
+ "items": { "$ref": "#/definitions/OperationDef" }
378
+ }
379
+ }
380
+ },
381
+ "nexus": {
382
+ "type": "object",
383
+ "required": ["name", "purpose", "operations"],
384
+ "properties": {
385
+ "name": { "const": "nexus" },
386
+ "purpose": { "type": "string" },
387
+ "primaryStore": { "type": "string" },
388
+ "operations": {
389
+ "type": "array",
390
+ "items": { "$ref": "#/definitions/OperationDef" }
391
+ }
392
+ }
393
+ },
394
+ "sharing": {
395
+ "type": "object",
396
+ "required": ["name", "purpose", "operations"],
397
+ "properties": {
398
+ "name": { "const": "sharing" },
399
+ "purpose": { "type": "string" },
400
+ "primaryStore": { "type": "string" },
401
+ "operations": {
402
+ "type": "array",
403
+ "items": { "$ref": "#/definitions/OperationDef" }
404
+ }
405
+ }
406
+ }
407
+ }
408
+ },
409
+ "progressiveDisclosure": {
410
+ "type": "object",
411
+ "description": "Progressive disclosure contract by tier",
412
+ "properties": {
413
+ "tiers": {
414
+ "type": "array",
415
+ "minItems": 3,
416
+ "maxItems": 3,
417
+ "items": {
418
+ "type": "object",
419
+ "required": ["tier", "name", "description", "operationCount", "domains"],
420
+ "properties": {
421
+ "tier": { "$ref": "#/definitions/Tier" },
422
+ "name": {
423
+ "type": "string",
424
+ "enum": ["Core", "Extended", "Full System"]
425
+ },
426
+ "description": { "type": "string" },
427
+ "operationCount": { "type": "integer", "minimum": 0 },
428
+ "domains": {
429
+ "type": "array",
430
+ "items": { "$ref": "#/definitions/CanonicalDomain" }
431
+ }
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "CLEO System Flow Atlas Structure",
4
+ "description": "Validates that a System Flow Atlas document contains all required sections",
5
+ "type": "object",
6
+ "properties": {
7
+ "title": {
8
+ "type": "string",
9
+ "const": "CLEO System Flow Atlas",
10
+ "description": "Document title"
11
+ },
12
+ "version": {
13
+ "type": "string",
14
+ "pattern": "^\\d{4}\\.\\d{1,2}\\.\\d{1,2}$",
15
+ "description": "CalVer version (YYYY.M.D)"
16
+ },
17
+ "status": {
18
+ "type": "string",
19
+ "enum": ["DRAFT", "REVIEW", "APPROVED", "STABLE", "SUPERSEDED", "ARCHIVED"],
20
+ "description": "Document lifecycle status"
21
+ },
22
+ "sections": {
23
+ "type": "object",
24
+ "description": "Required sections in the atlas document",
25
+ "properties": {
26
+ "purpose": {
27
+ "type": "boolean",
28
+ "description": "Section 1: Purpose exists"
29
+ },
30
+ "systemDomainMapping": {
31
+ "type": "boolean",
32
+ "description": "Section 2: Four systems mapped to 10 domains"
33
+ },
34
+ "requestFlow": {
35
+ "type": "boolean",
36
+ "description": "Section 3: End-to-end request flow diagram"
37
+ },
38
+ "domainInteractionGraph": {
39
+ "type": "boolean",
40
+ "description": "Section 4: Domain interaction graph"
41
+ },
42
+ "dataStores": {
43
+ "type": "boolean",
44
+ "description": "Section 5: Data stores and ownership boundaries"
45
+ },
46
+ "distillationFlow": {
47
+ "type": "boolean",
48
+ "description": "Section 6: LOOM distillation flow"
49
+ },
50
+ "flowExamples": {
51
+ "type": "boolean",
52
+ "description": "Section 7: Query/mutate flow examples"
53
+ },
54
+ "progressiveDisclosure": {
55
+ "type": "boolean",
56
+ "description": "Section 8: Progressive disclosure in practice"
57
+ },
58
+ "failureRecovery": {
59
+ "type": "boolean",
60
+ "description": "Section 9: Failure and recovery paths"
61
+ },
62
+ "observability": {
63
+ "type": "boolean",
64
+ "description": "Section 10: Observability and audit trails"
65
+ },
66
+ "invariants": {
67
+ "type": "boolean",
68
+ "description": "Section 11: Canonical invariants"
69
+ },
70
+ "glossary": {
71
+ "type": "boolean",
72
+ "description": "Section 12: Glossary"
73
+ }
74
+ },
75
+ "required": [
76
+ "purpose",
77
+ "systemDomainMapping",
78
+ "requestFlow",
79
+ "domainInteractionGraph",
80
+ "dataStores",
81
+ "distillationFlow",
82
+ "flowExamples",
83
+ "progressiveDisclosure",
84
+ "failureRecovery",
85
+ "observability",
86
+ "invariants",
87
+ "glossary"
88
+ ]
89
+ },
90
+ "domains": {
91
+ "type": "array",
92
+ "items": {
93
+ "type": "string",
94
+ "enum": [
95
+ "tasks",
96
+ "session",
97
+ "memory",
98
+ "check",
99
+ "pipeline",
100
+ "orchestrate",
101
+ "tools",
102
+ "admin",
103
+ "nexus",
104
+ "sharing"
105
+ ]
106
+ },
107
+ "minItems": 10,
108
+ "maxItems": 10,
109
+ "uniqueItems": true,
110
+ "description": "All 10 canonical domains MUST be referenced"
111
+ },
112
+ "systems": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "string",
116
+ "enum": ["BRAIN", "LOOM", "NEXUS", "LAFS"]
117
+ },
118
+ "minItems": 4,
119
+ "maxItems": 4,
120
+ "uniqueItems": true,
121
+ "description": "All 4 conceptual systems MUST be documented"
122
+ }
123
+ },
124
+ "required": ["title", "version", "status", "sections", "domains", "systems"]
125
+ }