@cleocode/cleo 2026.2.8 → 2026.3.0

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 (62) hide show
  1. package/README.md +14 -13
  2. package/dist/cli/index.js +22676 -26012
  3. package/dist/cli/index.js.map +4 -4
  4. package/dist/mcp/index.js +1651 -802
  5. package/dist/mcp/index.js.map +4 -4
  6. package/drizzle/20260301053344_careless_changeling/migration.sql +27 -0
  7. package/drizzle/20260301053344_careless_changeling/snapshot.json +2598 -0
  8. package/package.json +3 -4
  9. package/packages/ct-skills/skills/ct-cleo/SKILL.md +49 -22
  10. package/templates/CLEO-INJECTION.md +32 -138
  11. package/templates/cleo-gitignore +66 -49
  12. package/templates/git-hooks/pre-commit +24 -6
  13. package/schemas/archive/agent-configs.schema.json +0 -120
  14. package/schemas/archive/agent-registry.schema.json +0 -132
  15. package/schemas/archive/archive.schema.json +0 -450
  16. package/schemas/archive/claudedocs-frontmatter.schema.json +0 -162
  17. package/schemas/archive/commands-index.schema.json +0 -158
  18. package/schemas/archive/contribution.schema.json +0 -722
  19. package/schemas/archive/critical-path.schema.json +0 -246
  20. package/schemas/archive/deps-cache.schema.json +0 -97
  21. package/schemas/archive/doctor-output.schema.json +0 -283
  22. package/schemas/archive/error.schema.json +0 -161
  23. package/schemas/archive/export-package.schema.json +0 -375
  24. package/schemas/archive/global-config.schema.json +0 -219
  25. package/schemas/archive/log.schema.json +0 -250
  26. package/schemas/archive/metrics.schema.json +0 -328
  27. package/schemas/archive/migrations.schema.json +0 -150
  28. package/schemas/archive/nexus-registry.schema.json +0 -90
  29. package/schemas/archive/output.schema.json +0 -164
  30. package/schemas/archive/rcsd-consensus-report.schema.json +0 -491
  31. package/schemas/archive/rcsd-hitl-resolution.schema.json +0 -216
  32. package/schemas/archive/rcsd-index.schema.json +0 -384
  33. package/schemas/archive/rcsd-manifest.schema.json +0 -264
  34. package/schemas/archive/rcsd-research-output.schema.json +0 -564
  35. package/schemas/archive/rcsd-spec-frontmatter.schema.json +0 -225
  36. package/schemas/archive/releases.schema.json +0 -267
  37. package/schemas/archive/skills-manifest.schema.json +0 -91
  38. package/schemas/archive/skillsmp.schema.json +0 -208
  39. package/schemas/archive/spec-index.schema.json +0 -196
  40. package/schemas/archive/todo.schema.json +0 -995
  41. package/schemas/claudedocs-frontmatter.schema.json +0 -162
  42. package/schemas/commands-index.schema.json +0 -158
  43. package/schemas/rcsd-consensus-report.schema.json +0 -494
  44. package/schemas/rcsd-hitl-resolution.schema.json +0 -219
  45. package/schemas/rcsd-index.schema.json +0 -387
  46. package/schemas/rcsd-manifest.schema.json +0 -267
  47. package/schemas/rcsd-research-output.schema.json +0 -567
  48. package/schemas/rcsd-spec-frontmatter.schema.json +0 -225
  49. package/schemas/todo.schema.json +0 -994
  50. package/skills/_shared/cleo-style-guide.md +0 -84
  51. package/skills/_shared/manifest-operations.md +0 -810
  52. package/skills/_shared/placeholders.json +0 -433
  53. package/skills/_shared/skill-chaining-patterns.md +0 -240
  54. package/skills/_shared/subagent-protocol-base.md +0 -221
  55. package/skills/_shared/task-system-integration.md +0 -232
  56. package/skills/_shared/testing-framework-config.md +0 -110
  57. package/skills/agentskills-integrate.md +0 -104
  58. package/skills/agentskills-specs.md +0 -255
  59. package/skills/agentskills-what-are-skills.md +0 -75
  60. package/skills/manifest.json +0 -510
  61. package/templates/AGENT-INJECTION.md +0 -166
  62. /package/schemas/{research-manifest.schema.json → archive/research-manifest.schema.json} +0 -0
@@ -1,328 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1/metrics.schema.json",
4
- "schemaVersion": "1.0.0",
5
- "title": "CLEO Metrics Schema",
6
- "description": "Self-auditing metrics system for compliance, efficiency, session, and self-improvement tracking. ALL fields use STRICT ENUMS - NO freetext allowed.",
7
- "type": "object",
8
- "additionalProperties": false,
9
-
10
- "definitions": {
11
- "severityEnum": {
12
- "type": "string",
13
- "enum": ["low", "medium", "high", "critical"],
14
- "description": "Violation severity level"
15
- },
16
- "manifestIntegrityEnum": {
17
- "type": "string",
18
- "enum": ["valid", "partial", "invalid", "missing"],
19
- "description": "Manifest file integrity state"
20
- },
21
- "instructionStabilityEnum": {
22
- "type": "string",
23
- "enum": ["stable", "clarified", "revised", "unstable"],
24
- "description": "User instruction consistency within session"
25
- },
26
- "sessionDegradationEnum": {
27
- "type": "string",
28
- "enum": ["none", "mild", "moderate", "severe"],
29
- "description": "Performance degradation over session lifetime"
30
- },
31
- "agentReliabilityEnum": {
32
- "type": "string",
33
- "enum": ["high", "medium", "low", "unreliable"],
34
- "description": "Agent task completion reliability rating"
35
- },
36
- "metricCategoryEnum": {
37
- "type": "string",
38
- "enum": ["compliance", "efficiency", "session", "improvement"],
39
- "description": "Metric category classification"
40
- },
41
- "metricSourceEnum": {
42
- "type": "string",
43
- "enum": ["task", "session", "agent", "system", "orchestrator"],
44
- "description": "Entity that generated this metric"
45
- },
46
- "aggregationPeriodEnum": {
47
- "type": "string",
48
- "enum": ["instant", "hourly", "daily", "weekly", "monthly"],
49
- "description": "Time aggregation period for metric"
50
- },
51
-
52
- "complianceMetric": {
53
- "type": "object",
54
- "description": "Compliance-related metrics for rule adherence tracking",
55
- "additionalProperties": false,
56
- "properties": {
57
- "compliance_pass_rate": {
58
- "type": "number",
59
- "minimum": 0,
60
- "maximum": 1,
61
- "description": "Percent tasks with zero violations (0.0-1.0)"
62
- },
63
- "rule_adherence_score": {
64
- "type": "number",
65
- "minimum": 0,
66
- "maximum": 1,
67
- "description": "Required rules satisfied / total rules (0.0-1.0)"
68
- },
69
- "violation_count": {
70
- "type": "integer",
71
- "minimum": 0,
72
- "description": "Total violations per task/agent/session"
73
- },
74
- "violation_severity": {
75
- "$ref": "#/definitions/severityEnum"
76
- },
77
- "critical_breach_rate": {
78
- "type": "number",
79
- "minimum": 0,
80
- "maximum": 1,
81
- "description": "Percent tasks with >=1 critical violation (0.0-1.0)"
82
- },
83
- "policy_drift_indicator": {
84
- "type": "number",
85
- "minimum": -1,
86
- "maximum": 1,
87
- "description": "Violation increase over time (-1.0 to 1.0, positive = worsening)"
88
- },
89
- "compliance_latency_ms": {
90
- "type": "integer",
91
- "minimum": 0,
92
- "description": "Time to verdict after task completion (milliseconds)"
93
- },
94
- "manifest_integrity": {
95
- "$ref": "#/definitions/manifestIntegrityEnum"
96
- }
97
- }
98
- },
99
-
100
- "efficiencyMetric": {
101
- "type": "object",
102
- "description": "Efficiency-related metrics for resource utilization tracking",
103
- "additionalProperties": false,
104
- "properties": {
105
- "token_utilization_rate": {
106
- "type": "number",
107
- "minimum": 0,
108
- "maximum": 2,
109
- "description": "Tokens used / tokens allocated (0.0-2.0, >1 means over budget)"
110
- },
111
- "context_retention_efficiency": {
112
- "type": "number",
113
- "minimum": 0,
114
- "maximum": 1,
115
- "description": "Relevant tokens / total tokens (0.0-1.0)"
116
- },
117
- "token_waste_ratio": {
118
- "type": "number",
119
- "minimum": 0,
120
- "maximum": 1,
121
- "description": "Tokens in failed/discarded tasks / total tokens (0.0-1.0)"
122
- },
123
- "cost_per_successful_task": {
124
- "type": "number",
125
- "minimum": 0,
126
- "description": "Cost / compliant tasks (USD cents)"
127
- },
128
- "task_completion_time_ms": {
129
- "type": "integer",
130
- "minimum": 0,
131
- "description": "Start to return time (milliseconds)"
132
- },
133
- "agent_turn_count": {
134
- "type": "integer",
135
- "minimum": 1,
136
- "description": "Back-and-forth interactions required"
137
- },
138
- "retry_rate": {
139
- "type": "number",
140
- "minimum": 0,
141
- "maximum": 1,
142
- "description": "Re-executions due to failure / total executions (0.0-1.0)"
143
- },
144
- "sub_agent_yield": {
145
- "type": "number",
146
- "minimum": 0,
147
- "maximum": 1,
148
- "description": "Useful outputs / agents invoked (0.0-1.0)"
149
- },
150
- "orchestration_overhead": {
151
- "type": "number",
152
- "minimum": 0,
153
- "description": "Orchestrator tokens / subagent tokens ratio"
154
- }
155
- }
156
- },
157
-
158
- "sessionMetric": {
159
- "type": "object",
160
- "description": "Session-related metrics for work session tracking",
161
- "additionalProperties": false,
162
- "properties": {
163
- "session_efficiency_score": {
164
- "type": "number",
165
- "minimum": 0,
166
- "maximum": 1,
167
- "description": "Composite session score (0.0-1.0)"
168
- },
169
- "human_intervention_rate": {
170
- "type": "number",
171
- "minimum": 0,
172
- "maximum": 1,
173
- "description": "Percent tasks needing correction (0.0-1.0)"
174
- },
175
- "instruction_stability": {
176
- "$ref": "#/definitions/instructionStabilityEnum"
177
- },
178
- "session_degradation": {
179
- "$ref": "#/definitions/sessionDegradationEnum"
180
- }
181
- }
182
- },
183
-
184
- "improvementMetric": {
185
- "type": "object",
186
- "description": "Self-improvement metrics for agent learning tracking",
187
- "additionalProperties": false,
188
- "properties": {
189
- "improvement_delta": {
190
- "type": "number",
191
- "minimum": -1,
192
- "maximum": 1,
193
- "description": "Change vs last N sessions (-1.0 to 1.0)"
194
- },
195
- "rule_friction_score": {
196
- "type": "number",
197
- "minimum": 0,
198
- "description": "Violations per rule (lower = better)"
199
- },
200
- "agent_reliability": {
201
- "$ref": "#/definitions/agentReliabilityEnum"
202
- },
203
- "prompt_effectiveness": {
204
- "type": "number",
205
- "minimum": 0,
206
- "maximum": 1,
207
- "description": "Pass rate per prompt version (0.0-1.0)"
208
- },
209
- "regression_signal": {
210
- "type": "boolean",
211
- "description": "True if sudden metric drop detected"
212
- }
213
- }
214
- },
215
-
216
- "metricEntry": {
217
- "type": "object",
218
- "description": "Single metrics JSONL line format",
219
- "required": ["timestamp", "category", "source", "source_id"],
220
- "additionalProperties": false,
221
- "properties": {
222
- "timestamp": {
223
- "type": "string",
224
- "format": "date-time",
225
- "description": "ISO 8601 timestamp when metric was recorded"
226
- },
227
- "category": {
228
- "$ref": "#/definitions/metricCategoryEnum"
229
- },
230
- "source": {
231
- "$ref": "#/definitions/metricSourceEnum"
232
- },
233
- "source_id": {
234
- "type": "string",
235
- "pattern": "^[A-Za-z0-9_-]+$",
236
- "minLength": 1,
237
- "maxLength": 64,
238
- "description": "ID of source entity (task ID, session ID, agent name)"
239
- },
240
- "period": {
241
- "$ref": "#/definitions/aggregationPeriodEnum"
242
- },
243
- "compliance": {
244
- "$ref": "#/definitions/complianceMetric"
245
- },
246
- "efficiency": {
247
- "$ref": "#/definitions/efficiencyMetric"
248
- },
249
- "session": {
250
- "$ref": "#/definitions/sessionMetric"
251
- },
252
- "improvement": {
253
- "$ref": "#/definitions/improvementMetric"
254
- },
255
- "project": {
256
- "type": "string",
257
- "minLength": 1,
258
- "maxLength": 128,
259
- "description": "Project name (for global metrics file)"
260
- },
261
- "tags": {
262
- "type": "array",
263
- "items": {
264
- "type": "string",
265
- "pattern": "^[a-z][a-z0-9-]*$",
266
- "minLength": 1,
267
- "maxLength": 32
268
- },
269
- "maxItems": 10,
270
- "uniqueItems": true,
271
- "description": "Classification tags for filtering"
272
- }
273
- }
274
- },
275
-
276
- "metricsFile": {
277
- "type": "object",
278
- "description": "Full metrics JSON file format (alternative to JSONL)",
279
- "required": ["version", "_meta", "entries"],
280
- "additionalProperties": false,
281
- "properties": {
282
- "version": {
283
- "type": "string",
284
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
285
- "description": "Schema version"
286
- },
287
- "_meta": {
288
- "type": "object",
289
- "required": ["schemaVersion", "lastModified", "entryCount"],
290
- "additionalProperties": false,
291
- "properties": {
292
- "schemaVersion": {
293
- "type": "string",
294
- "pattern": "^\\d+\\.\\d+\\.\\d+$"
295
- },
296
- "lastModified": {
297
- "type": "string",
298
- "format": "date-time"
299
- },
300
- "entryCount": {
301
- "type": "integer",
302
- "minimum": 0
303
- },
304
- "oldestEntry": {
305
- "type": "string",
306
- "format": "date-time"
307
- },
308
- "newestEntry": {
309
- "type": "string",
310
- "format": "date-time"
311
- }
312
- }
313
- },
314
- "entries": {
315
- "type": "array",
316
- "items": {
317
- "$ref": "#/definitions/metricEntry"
318
- }
319
- }
320
- }
321
- }
322
- },
323
-
324
- "oneOf": [
325
- { "$ref": "#/definitions/metricEntry" },
326
- { "$ref": "#/definitions/metricsFile" }
327
- ]
328
- }
@@ -1,150 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1/migrations.schema.json",
4
- "schemaVersion": "1.0.0",
5
- "title": "CLEO Migration Journal Schema",
6
- "description": "Audit trail of schema migration operations. Tracks applied migrations with checksums and execution metadata for data integrity verification.",
7
- "type": "object",
8
- "required": [
9
- "_meta",
10
- "appliedMigrations"
11
- ],
12
- "additionalProperties": false,
13
- "properties": {
14
- "_meta": {
15
- "type": "object",
16
- "required": [
17
- "schemaVersion"
18
- ],
19
- "additionalProperties": false,
20
- "properties": {
21
- "schemaVersion": {
22
- "type": "string",
23
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
24
- "description": "Schema version for this migrations journal (semver)."
25
- },
26
- "lastChecked": {
27
- "type": [
28
- "string",
29
- "null"
30
- ],
31
- "format": "date-time",
32
- "description": "Last time migration status was checked."
33
- }
34
- }
35
- },
36
- "appliedMigrations": {
37
- "type": "array",
38
- "description": "Chronologically ordered list of applied migrations. Append-only for audit trail.",
39
- "items": {
40
- "$ref": "#/definitions/migrationEntry"
41
- }
42
- }
43
- },
44
- "definitions": {
45
- "migrationEntry": {
46
- "type": "object",
47
- "required": [
48
- "version",
49
- "fileType",
50
- "checksum",
51
- "appliedAt",
52
- "status"
53
- ],
54
- "additionalProperties": false,
55
- "properties": {
56
- "version": {
57
- "type": "string",
58
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
59
- "description": "Target schema version of this migration (semver)."
60
- },
61
- "fileType": {
62
- "type": "string",
63
- "enum": [
64
- "todo",
65
- "config",
66
- "archive",
67
- "log",
68
- "sessions",
69
- "migrations"
70
- ],
71
- "description": "Type of file that was migrated."
72
- },
73
- "functionName": {
74
- "type": [
75
- "string",
76
- "null"
77
- ],
78
- "description": "Migration function name that was executed (e.g., 'migrate_todo_to_2_3_0'). Null for version-bump-only migrations."
79
- },
80
- "checksum": {
81
- "type": "string",
82
- "pattern": "^[a-f0-9]{64}$",
83
- "description": "SHA256 checksum of the migration function source code (for verification)."
84
- },
85
- "appliedAt": {
86
- "type": "string",
87
- "format": "date-time",
88
- "description": "When this migration was executed (UTC)."
89
- },
90
- "status": {
91
- "type": "string",
92
- "enum": [
93
- "success",
94
- "failed",
95
- "skipped"
96
- ],
97
- "description": "Outcome of the migration operation."
98
- },
99
- "executionTimeMs": {
100
- "type": [
101
- "integer",
102
- "null"
103
- ],
104
- "minimum": 0,
105
- "description": "Time taken to execute migration in milliseconds."
106
- },
107
- "previousVersion": {
108
- "type": [
109
- "string",
110
- "null"
111
- ],
112
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
113
- "description": "Schema version before this migration was applied."
114
- },
115
- "logs": {
116
- "type": "array",
117
- "description": "Log messages generated during migration execution.",
118
- "items": {
119
- "type": "string"
120
- }
121
- },
122
- "backupPath": {
123
- "type": [
124
- "string",
125
- "null"
126
- ],
127
- "description": "Path to backup created before migration (for rollback)."
128
- },
129
- "error": {
130
- "type": [
131
- "object",
132
- "null"
133
- ],
134
- "description": "Error details if migration failed.",
135
- "properties": {
136
- "code": {
137
- "type": "string"
138
- },
139
- "message": {
140
- "type": "string"
141
- },
142
- "recoverable": {
143
- "type": "boolean"
144
- }
145
- }
146
- }
147
- }
148
- }
149
- }
150
- }
@@ -1,90 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://cleo-dev.com/schemas/v1/nexus-registry.schema.json",
4
- "title": "CLEO Nexus Registry Schema (DEPRECATED)",
5
- "description": "DEPRECATED: This schema is superseded by projects-registry.schema.json (v2.0.0). The unified registry at ~/.cleo/projects-registry.json now serves both global project management and Nexus cross-project coordination. This file is retained for reference only.",
6
- "type": "object",
7
- "required": ["version", "lastUpdated", "projects"],
8
- "additionalProperties": false,
9
- "properties": {
10
- "$schema": {
11
- "type": "string",
12
- "description": "JSON Schema reference for validation."
13
- },
14
- "version": {
15
- "type": "string",
16
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
17
- "description": "Schema version (semver). MUST match semantic versioning."
18
- },
19
- "lastUpdated": {
20
- "type": "string",
21
- "format": "date-time",
22
- "description": "ISO 8601 timestamp of last registry modification."
23
- },
24
- "projects": {
25
- "type": "object",
26
- "description": "Map of project_hash → project metadata. Keyed by 12-character hexadecimal hash.",
27
- "patternProperties": {
28
- "^[a-f0-9]{12}$": {
29
- "$ref": "#/definitions/project"
30
- }
31
- },
32
- "additionalProperties": false
33
- }
34
- },
35
- "definitions": {
36
- "project": {
37
- "type": "object",
38
- "description": "A registered CLEO project with metadata and access timestamps.",
39
- "required": ["hash", "path", "name", "lastAccess"],
40
- "additionalProperties": false,
41
- "properties": {
42
- "hash": {
43
- "type": "string",
44
- "pattern": "^[a-f0-9]{12}$",
45
- "description": "12-character hexadecimal identifier. MUST match object key. Generated via generate_project_hash() (stable SHA256 of path)."
46
- },
47
- "path": {
48
- "type": "string",
49
- "minLength": 1,
50
- "description": "Absolute filesystem path to project root. MUST contain .cleo/todo.json to be valid."
51
- },
52
- "name": {
53
- "type": "string",
54
- "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$",
55
- "minLength": 1,
56
- "maxLength": 64,
57
- "description": "Human-readable project identifier. MUST be unique across all registered projects. Lowercase with hyphens allowed."
58
- },
59
- "aliases": {
60
- "type": "array",
61
- "items": {
62
- "type": "string",
63
- "pattern": "^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$",
64
- "minLength": 1,
65
- "maxLength": 32
66
- },
67
- "uniqueItems": true,
68
- "default": [],
69
- "description": "Alternative names for project resolution. MUST NOT conflict with any project names."
70
- },
71
- "lastAccess": {
72
- "type": "string",
73
- "format": "date-time",
74
- "description": "ISO 8601 timestamp of last read operation. Used for pruning inactive projects."
75
- },
76
- "taskCount": {
77
- "type": "integer",
78
- "minimum": 0,
79
- "default": 0,
80
- "description": "Number of tasks in project. Cached for quick reference."
81
- },
82
- "checksum": {
83
- "type": "string",
84
- "pattern": "^[a-f0-9]{16}$",
85
- "description": "SHA-256 truncated hash of project's todo.json tasks array. Used for cache invalidation."
86
- }
87
- }
88
- }
89
- }
90
- }