@cleocode/core 2026.3.45 → 2026.3.47
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/dist/bootstrap.d.ts.map +1 -1
- package/dist/index.js +1508 -377
- package/dist/index.js.map +4 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/injection.d.ts +1 -1
- package/dist/injection.d.ts.map +1 -1
- package/dist/routing/capability-matrix.d.ts +6 -4
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/scaffold.d.ts +35 -9
- package/dist/scaffold.d.ts.map +1 -1
- package/dist/skills/agents/install.d.ts.map +1 -1
- package/dist/skills/routing-table.d.ts +17 -16
- package/dist/skills/routing-table.d.ts.map +1 -1
- package/dist/skills/skill-paths.d.ts.map +1 -1
- package/dist/system/health.d.ts.map +1 -1
- package/dist/ui/index.d.ts +0 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +9 -4
- package/schemas/adr-frontmatter.schema.json +72 -0
- package/schemas/agent-configs.schema.json +120 -0
- package/schemas/agent-registry.json +243 -0
- package/schemas/agent-registry.schema.json +132 -0
- package/schemas/archive/research-manifest.schema.json +257 -0
- package/schemas/archive.schema.json +450 -0
- package/schemas/brain-decision.schema.json +69 -0
- package/schemas/brain-learning.schema.json +57 -0
- package/schemas/brain-pattern.schema.json +72 -0
- package/schemas/config.schema.json +2606 -0
- package/schemas/context-state.schema.json +137 -0
- package/schemas/contribution.schema.json +722 -0
- package/schemas/critical-path.schema.json +246 -0
- package/schemas/deps-cache.schema.json +97 -0
- package/schemas/doctor-output.schema.json +283 -0
- package/schemas/error.schema.json +161 -0
- package/schemas/export-package.schema.json +375 -0
- package/schemas/global-config.schema.json +219 -0
- package/schemas/grade.schema.json +49 -0
- package/schemas/log.schema.json +250 -0
- package/schemas/metrics.schema.json +328 -0
- package/schemas/migrations.schema.json +150 -0
- package/schemas/nexus-registry.schema.json +90 -0
- package/schemas/operation-constitution.schema.json +438 -0
- package/schemas/output.schema.json +164 -0
- package/schemas/project-context.schema.json +164 -0
- package/schemas/project-info.schema.json +180 -0
- package/schemas/projects-registry.schema.json +107 -0
- package/schemas/protocol-frontmatter.schema.json +72 -0
- package/schemas/rcasd-consensus-report.schema.json +10 -0
- package/schemas/rcasd-evidence.schema.json +42 -0
- package/schemas/rcasd-gate-result.schema.json +46 -0
- package/schemas/rcasd-hitl-resolution.schema.json +10 -0
- package/schemas/rcasd-index.schema.json +10 -0
- package/schemas/rcasd-manifest.schema.json +10 -0
- package/schemas/rcasd-research-output.schema.json +10 -0
- package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
- package/schemas/rcasd-stage-transition.schema.json +38 -0
- package/schemas/releases.schema.json +267 -0
- package/schemas/skills-manifest.schema.json +91 -0
- package/schemas/skillsmp.schema.json +208 -0
- package/schemas/spec-index.schema.json +196 -0
- package/schemas/system-flow-atlas.schema.json +125 -0
- package/src/__tests__/injection-chain.test.d.ts +4 -3
- package/src/__tests__/injection-chain.test.d.ts.map +1 -1
- package/src/__tests__/injection-chain.test.js +11 -10
- package/src/__tests__/injection-chain.test.js.map +1 -1
- package/src/__tests__/injection-chain.test.ts +11 -10
- package/src/__tests__/injection-mvi-tiers.test.js +4 -2
- package/src/__tests__/injection-mvi-tiers.test.js.map +1 -1
- package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
- package/src/agents/__tests__/capacity.test.d.ts +7 -0
- package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
- package/src/agents/__tests__/capacity.test.js +173 -0
- package/src/agents/__tests__/capacity.test.js.map +1 -0
- package/src/agents/__tests__/registry.test.d.ts +8 -0
- package/src/agents/__tests__/registry.test.d.ts.map +1 -0
- package/src/agents/__tests__/registry.test.js +348 -0
- package/src/agents/__tests__/registry.test.js.map +1 -0
- package/src/agents/__tests__/retry.test.d.ts +7 -0
- package/src/agents/__tests__/retry.test.d.ts.map +1 -0
- package/src/agents/__tests__/retry.test.js +225 -0
- package/src/agents/__tests__/retry.test.js.map +1 -0
- package/src/bootstrap.ts +37 -6
- package/src/init.ts +63 -18
- package/src/injection.ts +11 -5
- package/src/intelligence/__tests__/impact.test.d.ts +15 -0
- package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/impact.test.js +384 -0
- package/src/intelligence/__tests__/impact.test.js.map +1 -0
- package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
- package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/patterns.test.js +370 -0
- package/src/intelligence/__tests__/patterns.test.js.map +1 -0
- package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
- package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
- package/src/intelligence/__tests__/prediction.test.js +314 -0
- package/src/intelligence/__tests__/prediction.test.js.map +1 -0
- package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
- package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
- package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
- package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
- package/src/nexus/__tests__/transfer.test.d.ts +8 -0
- package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
- package/src/nexus/__tests__/transfer.test.js +372 -0
- package/src/nexus/__tests__/transfer.test.js.map +1 -0
- package/src/nexus/__tests__/transfer.test.ts +1 -1
- package/src/routing/capability-matrix.ts +1435 -205
- package/src/scaffold.ts +70 -13
- package/src/sessions/__tests__/briefing.test.js +28 -2
- package/src/sessions/__tests__/briefing.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.js +48 -31
- package/src/skills/__tests__/routing-table.test.js.map +1 -1
- package/src/skills/__tests__/routing-table.test.ts +53 -33
- package/src/skills/agents/install.ts +9 -1
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js +41 -32
- package/src/skills/orchestrator/__tests__/spawn-tier.test.js.map +1 -1
- package/src/skills/routing-table.ts +39 -253
- package/src/skills/skill-paths.ts +3 -2
- package/src/store/__tests__/project-detect.test.js +1 -1
- package/src/store/__tests__/project-detect.test.js.map +1 -1
- package/src/store/__tests__/project-detect.test.ts +1 -1
- package/src/store/__tests__/test-db-helper.d.ts.map +1 -1
- package/src/store/__tests__/test-db-helper.js +0 -1
- package/src/store/__tests__/test-db-helper.js.map +1 -1
- package/src/system/health.ts +18 -7
- package/src/ui/index.ts +0 -6
- package/src/validation/operation-gate-validators.ts +2 -2
- package/templates/CLEO-INJECTION.md +120 -0
- package/templates/README.md +29 -0
- package/templates/agent-registry.json +305 -0
- package/templates/cleo-gitignore +74 -0
- package/templates/config.template.json +187 -0
- package/templates/git-hooks/commit-msg +149 -0
- package/templates/git-hooks/pre-commit +40 -0
- package/templates/git-hooks/pre-push +79 -0
- package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
- package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
- package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
- package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
- package/templates/global-config.template.json +56 -0
- package/templates/hooks/precompact-safestop.sh +89 -0
- package/templates/issue-templates/bug_report.yml +143 -0
- package/templates/issue-templates/config.yml +8 -0
- package/templates/issue-templates/feature_request.yml +125 -0
- package/templates/issue-templates/help_question.yml +99 -0
- package/templates/skillsmp.json.example +28 -0
- package/templates/skillsmp.json.example.md +214 -0
- package/dist/ui/injection-legacy.d.ts +0 -26
- package/dist/ui/injection-legacy.d.ts.map +0 -1
- package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
- package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
- package/src/ui/__tests__/injection-registry.test.js +0 -46
- package/src/ui/__tests__/injection-registry.test.js.map +0 -1
- package/src/ui/__tests__/injection-registry.test.ts +0 -57
- package/src/ui/injection-legacy.ts +0 -44
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cleo-dev.com/schemas/v3.1/archive.schema.json",
|
|
4
|
+
"schemaVersion": "2.4.0",
|
|
5
|
+
"title": "CLEO Archive Schema",
|
|
6
|
+
"description": "Storage for completed and cancelled tasks. Archived tasks are IMMUTABLE - never modify after archival.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"version",
|
|
10
|
+
"project",
|
|
11
|
+
"archivedTasks",
|
|
12
|
+
"_meta"
|
|
13
|
+
],
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {
|
|
16
|
+
"version": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
19
|
+
"description": "Legacy schema version field (deprecated, use _meta.schemaVersion)"
|
|
20
|
+
},
|
|
21
|
+
"project": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Project identifier. Must match todo.json project."
|
|
24
|
+
},
|
|
25
|
+
"_meta": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"required": [
|
|
28
|
+
"schemaVersion",
|
|
29
|
+
"totalArchived",
|
|
30
|
+
"lastArchived"
|
|
31
|
+
],
|
|
32
|
+
"additionalProperties": false,
|
|
33
|
+
"properties": {
|
|
34
|
+
"schemaVersion": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
37
|
+
"description": "Schema version for this file (semver). Canonical source for schema version (replaces root version field)."
|
|
38
|
+
},
|
|
39
|
+
"totalArchived": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": 0,
|
|
42
|
+
"description": "Total count of archived tasks."
|
|
43
|
+
},
|
|
44
|
+
"lastArchived": {
|
|
45
|
+
"type": [
|
|
46
|
+
"string",
|
|
47
|
+
"null"
|
|
48
|
+
],
|
|
49
|
+
"format": "date-time",
|
|
50
|
+
"description": "Timestamp of most recent archival operation."
|
|
51
|
+
},
|
|
52
|
+
"oldestTask": {
|
|
53
|
+
"type": [
|
|
54
|
+
"string",
|
|
55
|
+
"null"
|
|
56
|
+
],
|
|
57
|
+
"format": "date-time",
|
|
58
|
+
"description": "Completion date of oldest archived task."
|
|
59
|
+
},
|
|
60
|
+
"newestTask": {
|
|
61
|
+
"type": [
|
|
62
|
+
"string",
|
|
63
|
+
"null"
|
|
64
|
+
],
|
|
65
|
+
"format": "date-time",
|
|
66
|
+
"description": "Completion date of newest archived task."
|
|
67
|
+
},
|
|
68
|
+
"lastUnarchived": {
|
|
69
|
+
"type": [
|
|
70
|
+
"string",
|
|
71
|
+
"null"
|
|
72
|
+
],
|
|
73
|
+
"format": "date-time",
|
|
74
|
+
"description": "Timestamp of most recent unarchive/restore operation."
|
|
75
|
+
},
|
|
76
|
+
"totalUnarchived": {
|
|
77
|
+
"type": "integer",
|
|
78
|
+
"minimum": 0,
|
|
79
|
+
"default": 0,
|
|
80
|
+
"description": "Total count of tasks restored from archive."
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"archivedTasks": {
|
|
85
|
+
"type": "array",
|
|
86
|
+
"description": "Completed tasks moved from todo.json. IMMUTABLE after archival.",
|
|
87
|
+
"items": {
|
|
88
|
+
"$ref": "#/definitions/archivedTask"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"phaseSummary": {
|
|
92
|
+
"type": "object",
|
|
93
|
+
"description": "Aggregated phase completion statistics from archived tasks.",
|
|
94
|
+
"patternProperties": {
|
|
95
|
+
"^[a-z][a-z0-9-]*$": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"properties": {
|
|
98
|
+
"totalTasks": {
|
|
99
|
+
"type": "integer",
|
|
100
|
+
"minimum": 0,
|
|
101
|
+
"description": "Total tasks archived from this phase."
|
|
102
|
+
},
|
|
103
|
+
"firstCompleted": {
|
|
104
|
+
"type": [
|
|
105
|
+
"string",
|
|
106
|
+
"null"
|
|
107
|
+
],
|
|
108
|
+
"format": "date-time",
|
|
109
|
+
"description": "Earliest completion timestamp in this phase."
|
|
110
|
+
},
|
|
111
|
+
"lastCompleted": {
|
|
112
|
+
"type": [
|
|
113
|
+
"string",
|
|
114
|
+
"null"
|
|
115
|
+
],
|
|
116
|
+
"format": "date-time",
|
|
117
|
+
"description": "Latest completion timestamp in this phase."
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"additionalProperties": false
|
|
124
|
+
},
|
|
125
|
+
"statistics": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"description": "Computed statistics. Regenerate on archive operations.",
|
|
128
|
+
"properties": {
|
|
129
|
+
"cancelled": {
|
|
130
|
+
"type": "integer",
|
|
131
|
+
"minimum": 0,
|
|
132
|
+
"default": 0,
|
|
133
|
+
"description": "Total count of cancelled tasks archived."
|
|
134
|
+
},
|
|
135
|
+
"byPhase": {
|
|
136
|
+
"type": "object",
|
|
137
|
+
"description": "Task counts by phase.",
|
|
138
|
+
"patternProperties": {
|
|
139
|
+
"^[a-z][a-z0-9-]*$": {
|
|
140
|
+
"type": "integer"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"byPriority": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"description": "Task counts by priority.",
|
|
147
|
+
"properties": {
|
|
148
|
+
"critical": {
|
|
149
|
+
"type": "integer"
|
|
150
|
+
},
|
|
151
|
+
"high": {
|
|
152
|
+
"type": "integer"
|
|
153
|
+
},
|
|
154
|
+
"medium": {
|
|
155
|
+
"type": "integer"
|
|
156
|
+
},
|
|
157
|
+
"low": {
|
|
158
|
+
"type": "integer"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"byLabel": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"description": "Task counts by label.",
|
|
165
|
+
"patternProperties": {
|
|
166
|
+
"^[a-z][a-z0-9-]*$": {
|
|
167
|
+
"type": "integer"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"averageCycleTime": {
|
|
172
|
+
"type": [
|
|
173
|
+
"number",
|
|
174
|
+
"null"
|
|
175
|
+
],
|
|
176
|
+
"description": "Average days from creation to completion."
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"definitions": {
|
|
182
|
+
"archivedTask": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"required": [
|
|
185
|
+
"id",
|
|
186
|
+
"title",
|
|
187
|
+
"status",
|
|
188
|
+
"priority",
|
|
189
|
+
"createdAt",
|
|
190
|
+
"completedAt",
|
|
191
|
+
"_archive"
|
|
192
|
+
],
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"description": "Archived task with original data plus archive metadata.",
|
|
195
|
+
"properties": {
|
|
196
|
+
"id": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"pattern": "^T\\d{3,}$"
|
|
199
|
+
},
|
|
200
|
+
"title": {
|
|
201
|
+
"type": "string"
|
|
202
|
+
},
|
|
203
|
+
"status": {
|
|
204
|
+
"type": "string",
|
|
205
|
+
"enum": [
|
|
206
|
+
"done",
|
|
207
|
+
"cancelled"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
"priority": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"enum": [
|
|
213
|
+
"critical",
|
|
214
|
+
"high",
|
|
215
|
+
"medium",
|
|
216
|
+
"low"
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
"phase": {
|
|
220
|
+
"type": "string"
|
|
221
|
+
},
|
|
222
|
+
"description": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"files": {
|
|
226
|
+
"type": "array",
|
|
227
|
+
"items": {
|
|
228
|
+
"type": "string"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"acceptance": {
|
|
232
|
+
"type": "array",
|
|
233
|
+
"items": {
|
|
234
|
+
"type": "string"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"depends": {
|
|
238
|
+
"type": "array",
|
|
239
|
+
"items": {
|
|
240
|
+
"type": "string"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"notes": {
|
|
244
|
+
"type": "array",
|
|
245
|
+
"items": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"labels": {
|
|
250
|
+
"type": "array",
|
|
251
|
+
"items": {
|
|
252
|
+
"type": "string"
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"createdAt": {
|
|
256
|
+
"type": "string",
|
|
257
|
+
"format": "date-time"
|
|
258
|
+
},
|
|
259
|
+
"completedAt": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"format": "date-time"
|
|
262
|
+
},
|
|
263
|
+
"cancelledAt": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"format": "date-time"
|
|
266
|
+
},
|
|
267
|
+
"cancellationReason": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"minLength": 5,
|
|
270
|
+
"maxLength": 300,
|
|
271
|
+
"pattern": "^[^`$;|&<>]*$"
|
|
272
|
+
},
|
|
273
|
+
"_archive": {
|
|
274
|
+
"type": "object",
|
|
275
|
+
"required": [
|
|
276
|
+
"archivedAt",
|
|
277
|
+
"reason"
|
|
278
|
+
],
|
|
279
|
+
"additionalProperties": false,
|
|
280
|
+
"description": "Archive metadata added during archival.",
|
|
281
|
+
"properties": {
|
|
282
|
+
"archivedAt": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"format": "date-time",
|
|
285
|
+
"description": "When this task was archived."
|
|
286
|
+
},
|
|
287
|
+
"reason": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"enum": [
|
|
290
|
+
"auto",
|
|
291
|
+
"manual",
|
|
292
|
+
"stale",
|
|
293
|
+
"force",
|
|
294
|
+
"cascade",
|
|
295
|
+
"phase-complete",
|
|
296
|
+
"label-policy",
|
|
297
|
+
"cancelled"
|
|
298
|
+
],
|
|
299
|
+
"description": "Archival trigger: auto=config rules, manual=user request, stale=exceeded retention, force=forced archive, cascade=parent archived, phase-complete=phase finished, label-policy=label rule matched, cancelled=task was cancelled/soft-deleted."
|
|
300
|
+
},
|
|
301
|
+
"sessionId": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"description": "Session that performed the archival."
|
|
304
|
+
},
|
|
305
|
+
"cycleTimeDays": {
|
|
306
|
+
"type": "number",
|
|
307
|
+
"description": "Days from creation to completion."
|
|
308
|
+
},
|
|
309
|
+
"archiveSource": {
|
|
310
|
+
"type": "string",
|
|
311
|
+
"enum": [
|
|
312
|
+
"auto",
|
|
313
|
+
"manual",
|
|
314
|
+
"force",
|
|
315
|
+
"all",
|
|
316
|
+
"cascade",
|
|
317
|
+
"phase-trigger",
|
|
318
|
+
"unarchive-restore"
|
|
319
|
+
],
|
|
320
|
+
"description": "How the archive operation was initiated: auto=automatic config rules, manual=user-initiated single task, force=forced regardless of state, all=bulk archive all eligible, cascade=triggered by parent archive, phase-trigger=phase completion triggered, unarchive-restore=metadata preserved from restore operation."
|
|
321
|
+
},
|
|
322
|
+
"triggerDetails": {
|
|
323
|
+
"type": "object",
|
|
324
|
+
"additionalProperties": false,
|
|
325
|
+
"description": "Details about what triggered the archive operation.",
|
|
326
|
+
"properties": {
|
|
327
|
+
"phase": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"description": "Phase that triggered the archive (if phase-triggered)."
|
|
330
|
+
},
|
|
331
|
+
"parentId": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"pattern": "^T\\d{3,}$",
|
|
334
|
+
"description": "Parent task ID that triggered cascade archive."
|
|
335
|
+
},
|
|
336
|
+
"configRule": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "Name or identifier of the config rule that matched."
|
|
339
|
+
},
|
|
340
|
+
"labelPolicy": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "Label policy name that triggered the archive."
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
},
|
|
346
|
+
"relationshipState": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"additionalProperties": false,
|
|
349
|
+
"description": "State of task relationships at archive time for restoration.",
|
|
350
|
+
"properties": {
|
|
351
|
+
"hadChildren": {
|
|
352
|
+
"type": "boolean",
|
|
353
|
+
"description": "Whether this task had child tasks at archive time."
|
|
354
|
+
},
|
|
355
|
+
"childIds": {
|
|
356
|
+
"type": "array",
|
|
357
|
+
"items": {
|
|
358
|
+
"type": "string",
|
|
359
|
+
"pattern": "^T\\d{3,}$"
|
|
360
|
+
},
|
|
361
|
+
"description": "IDs of child tasks that were archived with this task."
|
|
362
|
+
},
|
|
363
|
+
"hadDependents": {
|
|
364
|
+
"type": "boolean",
|
|
365
|
+
"description": "Whether other tasks depended on this task at archive time."
|
|
366
|
+
},
|
|
367
|
+
"dependentIds": {
|
|
368
|
+
"type": "array",
|
|
369
|
+
"items": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"pattern": "^T\\d{3,}$"
|
|
372
|
+
},
|
|
373
|
+
"description": "IDs of tasks that depended on this task."
|
|
374
|
+
},
|
|
375
|
+
"parentId": {
|
|
376
|
+
"type": [
|
|
377
|
+
"string",
|
|
378
|
+
"null"
|
|
379
|
+
],
|
|
380
|
+
"pattern": "^T\\d{3,}$",
|
|
381
|
+
"description": "Parent task ID if this was a child task, null if root."
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
"restoreInfo": {
|
|
386
|
+
"type": "object",
|
|
387
|
+
"additionalProperties": false,
|
|
388
|
+
"description": "Information for potential restoration of this task.",
|
|
389
|
+
"properties": {
|
|
390
|
+
"originalStatus": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"enum": [
|
|
393
|
+
"pending",
|
|
394
|
+
"active",
|
|
395
|
+
"blocked",
|
|
396
|
+
"done"
|
|
397
|
+
],
|
|
398
|
+
"description": "Task status before it was completed (for restoration context)."
|
|
399
|
+
},
|
|
400
|
+
"canRestore": {
|
|
401
|
+
"type": "boolean",
|
|
402
|
+
"default": true,
|
|
403
|
+
"description": "Whether this task can be safely restored."
|
|
404
|
+
},
|
|
405
|
+
"restoreBlockers": {
|
|
406
|
+
"type": "array",
|
|
407
|
+
"items": {
|
|
408
|
+
"type": "string"
|
|
409
|
+
},
|
|
410
|
+
"description": "Reasons why restoration might fail or require manual intervention."
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"cancellationDetails": {
|
|
415
|
+
"type": "object",
|
|
416
|
+
"additionalProperties": false,
|
|
417
|
+
"description": "Details about task cancellation. Present when reason='cancelled'.",
|
|
418
|
+
"properties": {
|
|
419
|
+
"cancelledAt": {
|
|
420
|
+
"type": "string",
|
|
421
|
+
"format": "date-time",
|
|
422
|
+
"description": "ISO 8601 timestamp when the task was cancelled."
|
|
423
|
+
},
|
|
424
|
+
"cancellationReason": {
|
|
425
|
+
"type": "string",
|
|
426
|
+
"minLength": 5,
|
|
427
|
+
"maxLength": 300,
|
|
428
|
+
"description": "User-provided reason for cancellation."
|
|
429
|
+
},
|
|
430
|
+
"cancelledBy": {
|
|
431
|
+
"type": "string",
|
|
432
|
+
"description": "Session ID or user that performed the cancellation."
|
|
433
|
+
},
|
|
434
|
+
"previousStatus": {
|
|
435
|
+
"type": "string",
|
|
436
|
+
"enum": [
|
|
437
|
+
"pending",
|
|
438
|
+
"active",
|
|
439
|
+
"blocked"
|
|
440
|
+
],
|
|
441
|
+
"description": "Task status before cancellation."
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cleo-dev.com/schemas/v1/brain-decision.schema.json",
|
|
4
|
+
"schemaVersion": "1.0.0",
|
|
5
|
+
"title": "CLEO BRAIN Decision Memory Schema",
|
|
6
|
+
"description": "Schema for decision memory entries. Runtime store is SQLite (brain_decisions table). JSONL format is used for export/import portability. See ADR-009 Section 3.2.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["id", "type", "decision", "rationale", "confidence", "createdAt"],
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"properties": {
|
|
11
|
+
"id": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"pattern": "^D\\d+$",
|
|
14
|
+
"description": "Decision identifier (e.g., 'D001')."
|
|
15
|
+
},
|
|
16
|
+
"type": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["architecture", "technical", "process", "strategic", "tactical"],
|
|
19
|
+
"description": "Category of the decision."
|
|
20
|
+
},
|
|
21
|
+
"decision": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"description": "The decision statement."
|
|
25
|
+
},
|
|
26
|
+
"rationale": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1,
|
|
29
|
+
"description": "Why this decision was made."
|
|
30
|
+
},
|
|
31
|
+
"confidence": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["low", "medium", "high"],
|
|
34
|
+
"description": "Confidence level in the decision."
|
|
35
|
+
},
|
|
36
|
+
"outcome": {
|
|
37
|
+
"type": ["string", "null"],
|
|
38
|
+
"enum": ["success", "failure", "mixed", "pending", null],
|
|
39
|
+
"description": "Observed outcome of the decision. Null if not yet evaluated."
|
|
40
|
+
},
|
|
41
|
+
"alternatives": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "type": "string" },
|
|
44
|
+
"description": "Alternative approaches that were considered."
|
|
45
|
+
},
|
|
46
|
+
"contextEpicId": {
|
|
47
|
+
"type": ["string", "null"],
|
|
48
|
+
"description": "Epic ID this decision relates to."
|
|
49
|
+
},
|
|
50
|
+
"contextTaskId": {
|
|
51
|
+
"type": ["string", "null"],
|
|
52
|
+
"description": "Task ID this decision relates to."
|
|
53
|
+
},
|
|
54
|
+
"contextPhase": {
|
|
55
|
+
"type": ["string", "null"],
|
|
56
|
+
"description": "Lifecycle phase when the decision was made."
|
|
57
|
+
},
|
|
58
|
+
"createdAt": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "date-time",
|
|
61
|
+
"description": "ISO 8601 timestamp when the decision was recorded."
|
|
62
|
+
},
|
|
63
|
+
"updatedAt": {
|
|
64
|
+
"type": ["string", "null"],
|
|
65
|
+
"format": "date-time",
|
|
66
|
+
"description": "ISO 8601 timestamp of last update."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
}
|