@cleocode/core 2026.4.5 → 2026.4.6

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 (144) hide show
  1. package/dist/discovery.d.ts +69 -0
  2. package/dist/discovery.d.ts.map +1 -0
  3. package/dist/index.d.ts +3 -2
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +1643 -2349
  6. package/dist/index.js.map +4 -4
  7. package/dist/init.d.ts +51 -0
  8. package/dist/init.d.ts.map +1 -1
  9. package/dist/internal.d.ts +9 -1
  10. package/dist/internal.d.ts.map +1 -1
  11. package/dist/lifecycle/default-chain.d.ts +8 -2
  12. package/dist/lifecycle/default-chain.d.ts.map +1 -1
  13. package/dist/lifecycle/index.d.ts +1 -0
  14. package/dist/lifecycle/index.d.ts.map +1 -1
  15. package/dist/lifecycle/stage-guidance.d.ts +140 -0
  16. package/dist/lifecycle/stage-guidance.d.ts.map +1 -0
  17. package/dist/orchestration/protocol-validators.d.ts +122 -3
  18. package/dist/orchestration/protocol-validators.d.ts.map +1 -1
  19. package/dist/paths.d.ts +91 -0
  20. package/dist/paths.d.ts.map +1 -1
  21. package/dist/scaffold.d.ts +31 -1
  22. package/dist/scaffold.d.ts.map +1 -1
  23. package/dist/skills/dispatch.d.ts +1 -1
  24. package/dist/skills/skill-paths.d.ts +9 -6
  25. package/dist/skills/skill-paths.d.ts.map +1 -1
  26. package/dist/validation/protocols/_shared.d.ts +40 -0
  27. package/dist/validation/protocols/_shared.d.ts.map +1 -0
  28. package/dist/validation/protocols/architecture-decision.d.ts +23 -0
  29. package/dist/validation/protocols/architecture-decision.d.ts.map +1 -0
  30. package/dist/validation/protocols/artifact-publish.d.ts +22 -0
  31. package/dist/validation/protocols/artifact-publish.d.ts.map +1 -0
  32. package/dist/validation/protocols/consensus.d.ts +11 -17
  33. package/dist/validation/protocols/consensus.d.ts.map +1 -1
  34. package/dist/validation/protocols/contribution.d.ts +12 -17
  35. package/dist/validation/protocols/contribution.d.ts.map +1 -1
  36. package/dist/validation/protocols/decomposition.d.ts +18 -21
  37. package/dist/validation/protocols/decomposition.d.ts.map +1 -1
  38. package/dist/validation/protocols/implementation.d.ts +9 -17
  39. package/dist/validation/protocols/implementation.d.ts.map +1 -1
  40. package/dist/validation/protocols/provenance.d.ts +23 -0
  41. package/dist/validation/protocols/provenance.d.ts.map +1 -0
  42. package/dist/validation/protocols/release.d.ts +25 -0
  43. package/dist/validation/protocols/release.d.ts.map +1 -0
  44. package/dist/validation/protocols/research.d.ts +9 -17
  45. package/dist/validation/protocols/research.d.ts.map +1 -1
  46. package/dist/validation/protocols/specification.d.ts +7 -17
  47. package/dist/validation/protocols/specification.d.ts.map +1 -1
  48. package/dist/validation/protocols/testing.d.ts +22 -0
  49. package/dist/validation/protocols/testing.d.ts.map +1 -0
  50. package/dist/validation/protocols/validation.d.ts +22 -0
  51. package/dist/validation/protocols/validation.d.ts.map +1 -0
  52. package/package.json +7 -7
  53. package/src/__tests__/injection-mvi-tiers.test.js +54 -90
  54. package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
  55. package/src/discovery.ts +235 -0
  56. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js +3 -1
  57. package/src/hooks/handlers/__tests__/hook-automation-e2e.test.js.map +1 -1
  58. package/src/index.ts +16 -0
  59. package/src/init.ts +196 -0
  60. package/src/internal.ts +31 -1
  61. package/src/lifecycle/default-chain.ts +11 -2
  62. package/src/lifecycle/index.ts +10 -0
  63. package/src/lifecycle/stage-guidance.ts +282 -0
  64. package/src/metrics/__tests__/provider-detection.test.js +19 -7
  65. package/src/metrics/__tests__/provider-detection.test.js.map +1 -1
  66. package/src/orchestration/__tests__/protocol-validators.test.js +228 -8
  67. package/src/orchestration/__tests__/protocol-validators.test.js.map +1 -1
  68. package/src/orchestration/__tests__/protocol-validators.test.ts +259 -7
  69. package/src/orchestration/protocol-validators.ts +419 -4
  70. package/src/paths.ts +110 -0
  71. package/src/scaffold.ts +240 -4
  72. package/src/skills/dispatch.ts +6 -6
  73. package/src/skills/skill-paths.ts +27 -23
  74. package/src/validation/protocols/_shared.ts +88 -0
  75. package/src/validation/protocols/architecture-decision.ts +52 -0
  76. package/src/validation/protocols/artifact-publish.ts +49 -0
  77. package/src/validation/protocols/consensus.ts +44 -74
  78. package/src/validation/protocols/contribution.ts +28 -65
  79. package/src/validation/protocols/decomposition.ts +37 -64
  80. package/src/validation/protocols/implementation.ts +25 -65
  81. package/src/validation/protocols/protocols-markdown/architecture-decision.md +303 -0
  82. package/src/validation/protocols/protocols-markdown/artifact-publish.md +600 -0
  83. package/src/validation/protocols/protocols-markdown/consensus.md +322 -0
  84. package/src/validation/protocols/protocols-markdown/contribution.md +388 -0
  85. package/src/validation/protocols/protocols-markdown/decomposition.md +421 -0
  86. package/src/validation/protocols/protocols-markdown/implementation.md +357 -0
  87. package/src/validation/protocols/protocols-markdown/provenance.md +613 -0
  88. package/src/validation/protocols/protocols-markdown/release.md +783 -0
  89. package/src/validation/protocols/protocols-markdown/research.md +261 -0
  90. package/src/validation/protocols/protocols-markdown/specification.md +300 -0
  91. package/src/validation/protocols/protocols-markdown/testing.md +287 -0
  92. package/src/validation/protocols/protocols-markdown/validation.md +242 -0
  93. package/src/validation/protocols/provenance.ts +50 -0
  94. package/src/validation/protocols/release.ts +44 -0
  95. package/src/validation/protocols/research.ts +25 -87
  96. package/src/validation/protocols/specification.ts +27 -89
  97. package/src/validation/protocols/testing.ts +46 -0
  98. package/src/validation/protocols/validation.ts +46 -0
  99. package/dist/validation/protocols/release-protocol.d.ts +0 -27
  100. package/dist/validation/protocols/release-protocol.d.ts.map +0 -1
  101. package/dist/validation/protocols/testing-protocol.d.ts +0 -27
  102. package/dist/validation/protocols/testing-protocol.d.ts.map +0 -1
  103. package/dist/validation/protocols/validation-protocol.d.ts +0 -27
  104. package/dist/validation/protocols/validation-protocol.d.ts.map +0 -1
  105. package/schemas/agent-configs.schema.json +0 -120
  106. package/schemas/agent-registry.schema.json +0 -132
  107. package/schemas/archive.schema.json +0 -450
  108. package/schemas/brain-decision.schema.json +0 -69
  109. package/schemas/brain-learning.schema.json +0 -57
  110. package/schemas/brain-pattern.schema.json +0 -72
  111. package/schemas/critical-path.schema.json +0 -246
  112. package/schemas/deps-cache.schema.json +0 -97
  113. package/schemas/doctor-output.schema.json +0 -283
  114. package/schemas/error.schema.json +0 -161
  115. package/schemas/global-config.schema.json +0 -219
  116. package/schemas/grade.schema.json +0 -49
  117. package/schemas/log.schema.json +0 -250
  118. package/schemas/metrics.schema.json +0 -328
  119. package/schemas/migrations.schema.json +0 -150
  120. package/schemas/nexus-registry.schema.json +0 -90
  121. package/schemas/operation-constitution.schema.json +0 -438
  122. package/schemas/output.schema.json +0 -164
  123. package/schemas/projects-registry.schema.json +0 -107
  124. package/schemas/protocol-frontmatter.schema.json +0 -72
  125. package/schemas/rcasd-consensus-report.schema.json +0 -10
  126. package/schemas/rcasd-evidence.schema.json +0 -42
  127. package/schemas/rcasd-gate-result.schema.json +0 -46
  128. package/schemas/rcasd-hitl-resolution.schema.json +0 -10
  129. package/schemas/rcasd-index.schema.json +0 -10
  130. package/schemas/rcasd-manifest.schema.json +0 -10
  131. package/schemas/rcasd-research-output.schema.json +0 -10
  132. package/schemas/rcasd-spec-frontmatter.schema.json +0 -10
  133. package/schemas/rcasd-stage-transition.schema.json +0 -38
  134. package/schemas/releases.schema.json +0 -267
  135. package/schemas/skills-manifest.schema.json +0 -91
  136. package/schemas/spec-index.schema.json +0 -196
  137. package/schemas/system-flow-atlas.schema.json +0 -125
  138. package/src/conduit/__tests__/dual-api-e2e.test.d.ts.map +0 -1
  139. package/src/conduit/__tests__/dual-api-e2e.test.js +0 -178
  140. package/src/conduit/__tests__/dual-api-e2e.test.js.map +0 -1
  141. package/src/conduit/__tests__/dual-api-e2e.test.ts +0 -212
  142. package/src/validation/protocols/release-protocol.ts +0 -80
  143. package/src/validation/protocols/testing-protocol.ts +0 -93
  144. package/src/validation/protocols/validation-protocol.ts +0 -93
@@ -1,57 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1/brain-learning.schema.json",
4
- "schemaVersion": "1.0.0",
5
- "title": "CLEO BRAIN Learning Memory Schema",
6
- "description": "Schema for learning memory entries. Runtime store is SQLite (brain_learnings table). JSONL format is used for export/import portability. See ADR-009 Section 3.2.",
7
- "type": "object",
8
- "required": ["id", "insight", "source", "confidence", "createdAt"],
9
- "additionalProperties": false,
10
- "properties": {
11
- "id": {
12
- "type": "string",
13
- "pattern": "^L\\d+$",
14
- "description": "Learning identifier (e.g., 'L001')."
15
- },
16
- "insight": {
17
- "type": "string",
18
- "minLength": 1,
19
- "description": "The learned insight."
20
- },
21
- "source": {
22
- "type": "string",
23
- "minLength": 1,
24
- "description": "Source of the insight (e.g., task completion analysis, blocker patterns)."
25
- },
26
- "confidence": {
27
- "type": "number",
28
- "minimum": 0.0,
29
- "maximum": 1.0,
30
- "description": "Confidence score (0.0-1.0) in the insight."
31
- },
32
- "actionable": {
33
- "type": "boolean",
34
- "default": false,
35
- "description": "Whether this insight has a concrete actionable recommendation."
36
- },
37
- "application": {
38
- "type": ["string", "null"],
39
- "description": "How to apply this insight in future work."
40
- },
41
- "applicableTypes": {
42
- "type": "array",
43
- "items": { "type": "string" },
44
- "description": "Task types this insight applies to."
45
- },
46
- "createdAt": {
47
- "type": "string",
48
- "format": "date-time",
49
- "description": "ISO 8601 timestamp when the learning was recorded."
50
- },
51
- "updatedAt": {
52
- "type": ["string", "null"],
53
- "format": "date-time",
54
- "description": "ISO 8601 timestamp of last update."
55
- }
56
- }
57
- }
@@ -1,72 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1/brain-pattern.schema.json",
4
- "schemaVersion": "1.0.0",
5
- "title": "CLEO BRAIN Pattern Memory Schema",
6
- "description": "Schema for pattern memory entries. Runtime store is SQLite (brain_patterns table). JSONL format is used for export/import portability. See ADR-009 Section 3.2.",
7
- "type": "object",
8
- "required": ["id", "type", "pattern", "context", "extractedAt"],
9
- "additionalProperties": false,
10
- "properties": {
11
- "id": {
12
- "type": "string",
13
- "pattern": "^P\\d+$",
14
- "description": "Pattern identifier (e.g., 'P001')."
15
- },
16
- "type": {
17
- "type": "string",
18
- "enum": ["workflow", "blocker", "success", "failure", "optimization"],
19
- "description": "Category of the pattern."
20
- },
21
- "pattern": {
22
- "type": "string",
23
- "minLength": 1,
24
- "description": "Description of the observed pattern."
25
- },
26
- "context": {
27
- "type": "string",
28
- "minLength": 1,
29
- "description": "Context in which the pattern was observed."
30
- },
31
- "frequency": {
32
- "type": "integer",
33
- "minimum": 1,
34
- "default": 1,
35
- "description": "Number of times this pattern has been observed."
36
- },
37
- "successRate": {
38
- "type": ["number", "null"],
39
- "minimum": 0.0,
40
- "maximum": 1.0,
41
- "description": "Success rate for workflow patterns (0.0-1.0)."
42
- },
43
- "impact": {
44
- "type": ["string", "null"],
45
- "enum": ["low", "medium", "high", null],
46
- "description": "Impact level of the pattern."
47
- },
48
- "antiPattern": {
49
- "type": ["string", "null"],
50
- "description": "The anti-pattern to avoid, if applicable."
51
- },
52
- "mitigation": {
53
- "type": ["string", "null"],
54
- "description": "Recommended mitigation for blocker/failure patterns."
55
- },
56
- "examples": {
57
- "type": "array",
58
- "items": { "type": "string" },
59
- "description": "Task IDs that exemplify this pattern."
60
- },
61
- "extractedAt": {
62
- "type": "string",
63
- "format": "date-time",
64
- "description": "ISO 8601 timestamp when the pattern was first extracted."
65
- },
66
- "updatedAt": {
67
- "type": ["string", "null"],
68
- "format": "date-time",
69
- "description": "ISO 8601 timestamp of last update."
70
- }
71
- }
72
- }
@@ -1,246 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "schemaVersion": "1.0.0",
4
- "$id": "https://cleo-dev.com/schemas/v1/critical-path.schema.json",
5
- "title": "Claude-TODO Critical Path Analysis Response",
6
- "description": "Schema for critical path analysis output from blockers analyze command",
7
- "type": "object",
8
- "required": ["_meta", "summary", "criticalPath"],
9
- "properties": {
10
- "$schema": {
11
- "type": "string",
12
- "description": "Schema URL for validation"
13
- },
14
- "_meta": {
15
- "type": "object",
16
- "description": "Response metadata",
17
- "required": ["command", "timestamp", "version"],
18
- "properties": {
19
- "format": {
20
- "type": "string",
21
- "const": "json",
22
- "description": "Output format identifier"
23
- },
24
- "version": {
25
- "type": "string",
26
- "pattern": "^\\d+\\.\\d+\\.\\d+",
27
- "description": "cleo version (semver)"
28
- },
29
- "command": {
30
- "type": "string",
31
- "const": "blockers analyze",
32
- "description": "Command name that generated this response"
33
- },
34
- "timestamp": {
35
- "type": "string",
36
- "format": "date-time",
37
- "description": "ISO-8601 UTC timestamp of response generation"
38
- },
39
- "execution_ms": {
40
- "type": "integer",
41
- "minimum": 0,
42
- "description": "Execution time in milliseconds (optional)"
43
- }
44
- },
45
- "additionalProperties": false
46
- },
47
- "summary": {
48
- "type": "object",
49
- "description": "Summary statistics about blocked tasks and analysis",
50
- "required": ["blockedCount"],
51
- "properties": {
52
- "blockedCount": {
53
- "type": "integer",
54
- "minimum": 0,
55
- "description": "Number of blocked tasks"
56
- },
57
- "maxChainDepth": {
58
- "type": "integer",
59
- "minimum": 0,
60
- "description": "Maximum dependency chain depth"
61
- },
62
- "totalImpactedTasks": {
63
- "type": "integer",
64
- "minimum": 0,
65
- "description": "Total tasks affected by blockers"
66
- },
67
- "criticalPathLength": {
68
- "type": "integer",
69
- "minimum": 0,
70
- "description": "Length of the critical path"
71
- },
72
- "bottleneckCount": {
73
- "type": "integer",
74
- "minimum": 0,
75
- "description": "Number of identified bottlenecks"
76
- }
77
- },
78
- "additionalProperties": false
79
- },
80
- "criticalPath": {
81
- "type": "object",
82
- "description": "The task at the root of the longest dependency chain",
83
- "properties": {
84
- "id": {
85
- "type": "string",
86
- "pattern": "^T\\d{3}$",
87
- "description": "Task ID at critical path root"
88
- },
89
- "title": {
90
- "type": "string",
91
- "description": "Title of the critical path task"
92
- },
93
- "chainDepth": {
94
- "type": "integer",
95
- "minimum": 0,
96
- "description": "Depth of the dependency chain"
97
- },
98
- "impactCount": {
99
- "type": "integer",
100
- "minimum": 0,
101
- "description": "Number of tasks impacted by this task"
102
- },
103
- "length": {
104
- "type": "integer",
105
- "minimum": 0,
106
- "description": "Total path length"
107
- },
108
- "path": {
109
- "type": "array",
110
- "description": "Ordered list of tasks in the critical path",
111
- "items": {
112
- "type": "object",
113
- "properties": {
114
- "id": {
115
- "type": "string",
116
- "pattern": "^T\\d{3}$"
117
- },
118
- "title": {
119
- "type": "string"
120
- },
121
- "status": {
122
- "type": "string",
123
- "enum": ["pending", "active", "blocked", "done"]
124
- }
125
- }
126
- }
127
- }
128
- },
129
- "additionalProperties": true
130
- },
131
- "bottlenecks": {
132
- "type": "array",
133
- "description": "Tasks blocking multiple other tasks",
134
- "items": {
135
- "type": "object",
136
- "properties": {
137
- "id": {
138
- "type": "string",
139
- "pattern": "^T\\d{3}$",
140
- "description": "ID of the bottleneck task"
141
- },
142
- "title": {
143
- "type": "string",
144
- "description": "Title of the bottleneck task"
145
- },
146
- "impactCount": {
147
- "type": "integer",
148
- "minimum": 1,
149
- "description": "Number of tasks blocked by this task"
150
- },
151
- "blockedTasks": {
152
- "type": "array",
153
- "description": "List of task IDs blocked by this bottleneck",
154
- "items": {
155
- "type": "string",
156
- "pattern": "^T\\d{3}$"
157
- }
158
- }
159
- },
160
- "additionalProperties": true
161
- }
162
- },
163
- "recommendations": {
164
- "type": "object",
165
- "description": "Prioritized action recommendations",
166
- "properties": {
167
- "highImpact": {
168
- "type": "array",
169
- "description": "High-impact tasks to prioritize",
170
- "items": {
171
- "type": "object",
172
- "properties": {
173
- "id": {
174
- "type": "string",
175
- "pattern": "^T\\d{3}$"
176
- },
177
- "title": {
178
- "type": "string"
179
- },
180
- "impactCount": {
181
- "type": "integer",
182
- "minimum": 1
183
- },
184
- "reason": {
185
- "type": "string"
186
- }
187
- }
188
- }
189
- },
190
- "quickWins": {
191
- "type": "array",
192
- "description": "Tasks with short dependency chains",
193
- "items": {
194
- "type": "object",
195
- "properties": {
196
- "id": {
197
- "type": "string",
198
- "pattern": "^T\\d{3}$"
199
- },
200
- "title": {
201
- "type": "string"
202
- },
203
- "chainDepth": {
204
- "type": "integer",
205
- "minimum": 0
206
- },
207
- "reason": {
208
- "type": "string"
209
- }
210
- }
211
- }
212
- }
213
- },
214
- "additionalProperties": true
215
- },
216
- "blockedTasks": {
217
- "type": "array",
218
- "description": "List of all blocked tasks with details",
219
- "items": {
220
- "type": "object",
221
- "properties": {
222
- "id": {
223
- "type": "string",
224
- "pattern": "^T\\d{3}$"
225
- },
226
- "title": {
227
- "type": "string"
228
- },
229
- "status": {
230
- "type": "string"
231
- },
232
- "blockedBy": {
233
- "type": "string"
234
- },
235
- "chainDepth": {
236
- "type": "integer"
237
- },
238
- "impactCount": {
239
- "type": "integer"
240
- }
241
- }
242
- }
243
- }
244
- },
245
- "additionalProperties": true
246
- }
@@ -1,97 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1.0/deps-cache.schema.json",
4
- "schemaVersion": "1.0.0",
5
- "title": "CLEO Dependency Graph Cache Schema",
6
- "description": "Pre-computed dependency graph cache for O(1) dependency lookups. Generated from todo.json tasks array.",
7
- "type": "object",
8
- "required": ["_meta", "forward", "reverse", "hierarchy", "relates"],
9
- "additionalProperties": false,
10
-
11
- "properties": {
12
- "_meta": {
13
- "type": "object",
14
- "description": "Cache metadata for staleness detection and diagnostics.",
15
- "required": ["schemaVersion", "generatedAt", "sourceChecksum", "taskCount"],
16
- "additionalProperties": false,
17
- "properties": {
18
- "schemaVersion": {
19
- "type": "string",
20
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
21
- "description": "Schema version for this cache format."
22
- },
23
- "generatedAt": {
24
- "type": "string",
25
- "format": "date-time",
26
- "description": "ISO 8601 timestamp when cache was generated."
27
- },
28
- "sourceChecksum": {
29
- "type": "string",
30
- "description": "Checksum from todo.json._meta.checksum at generation time. Used for staleness detection."
31
- },
32
- "sourceTimestamp": {
33
- "type": "string",
34
- "format": "date-time",
35
- "description": "lastModified timestamp from todo.json._meta at generation time."
36
- },
37
- "taskCount": {
38
- "type": "integer",
39
- "minimum": 0,
40
- "description": "Number of tasks in todo.json when cache was generated."
41
- }
42
- }
43
- },
44
-
45
- "forward": {
46
- "type": "object",
47
- "description": "Forward dependency map: task_id -> [task_ids this task depends on]. Key is task ID, value is array of dependency task IDs from the 'depends' field.",
48
- "additionalProperties": {
49
- "type": "array",
50
- "items": {
51
- "type": "string",
52
- "pattern": "^T\\d{3,}$"
53
- },
54
- "uniqueItems": true
55
- }
56
- },
57
-
58
- "reverse": {
59
- "type": "object",
60
- "description": "Reverse dependency map: task_id -> [task_ids that depend on this task]. Inverse of forward map for O(1) 'who depends on me' lookups.",
61
- "additionalProperties": {
62
- "type": "array",
63
- "items": {
64
- "type": "string",
65
- "pattern": "^T\\d{3,}$"
66
- },
67
- "uniqueItems": true
68
- }
69
- },
70
-
71
- "hierarchy": {
72
- "type": "object",
73
- "description": "Hierarchy map: parent_id -> [child_task_ids]. Built from parentId field for O(1) 'get children' lookups.",
74
- "additionalProperties": {
75
- "type": "array",
76
- "items": {
77
- "type": "string",
78
- "pattern": "^T\\d{3,}$"
79
- },
80
- "uniqueItems": true
81
- }
82
- },
83
-
84
- "relates": {
85
- "type": "object",
86
- "description": "Relates map: task_id -> [related_task_ids]. Extracted from 'relates' array for O(1) relationship lookups.",
87
- "additionalProperties": {
88
- "type": "array",
89
- "items": {
90
- "type": "string",
91
- "pattern": "^T\\d{3,}$"
92
- },
93
- "uniqueItems": true
94
- }
95
- }
96
- }
97
- }