@cleocode/core 2026.3.45 → 2026.3.46

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 (137) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/index.js +1475 -372
  3. package/dist/index.js.map +4 -4
  4. package/dist/init.d.ts.map +1 -1
  5. package/dist/injection.d.ts +1 -1
  6. package/dist/injection.d.ts.map +1 -1
  7. package/dist/routing/capability-matrix.d.ts +6 -4
  8. package/dist/routing/capability-matrix.d.ts.map +1 -1
  9. package/dist/scaffold.d.ts +16 -9
  10. package/dist/scaffold.d.ts.map +1 -1
  11. package/dist/skills/agents/install.d.ts.map +1 -1
  12. package/dist/skills/routing-table.d.ts +17 -16
  13. package/dist/skills/routing-table.d.ts.map +1 -1
  14. package/dist/skills/skill-paths.d.ts.map +1 -1
  15. package/dist/system/health.d.ts.map +1 -1
  16. package/dist/ui/index.d.ts +0 -1
  17. package/dist/ui/index.d.ts.map +1 -1
  18. package/package.json +9 -4
  19. package/schemas/adr-frontmatter.schema.json +72 -0
  20. package/schemas/agent-configs.schema.json +120 -0
  21. package/schemas/agent-registry.json +243 -0
  22. package/schemas/agent-registry.schema.json +132 -0
  23. package/schemas/archive/research-manifest.schema.json +257 -0
  24. package/schemas/archive.schema.json +450 -0
  25. package/schemas/brain-decision.schema.json +69 -0
  26. package/schemas/brain-learning.schema.json +57 -0
  27. package/schemas/brain-pattern.schema.json +72 -0
  28. package/schemas/config.schema.json +2606 -0
  29. package/schemas/context-state.schema.json +137 -0
  30. package/schemas/contribution.schema.json +722 -0
  31. package/schemas/critical-path.schema.json +246 -0
  32. package/schemas/deps-cache.schema.json +97 -0
  33. package/schemas/doctor-output.schema.json +283 -0
  34. package/schemas/error.schema.json +161 -0
  35. package/schemas/export-package.schema.json +375 -0
  36. package/schemas/global-config.schema.json +219 -0
  37. package/schemas/grade.schema.json +49 -0
  38. package/schemas/log.schema.json +250 -0
  39. package/schemas/metrics.schema.json +328 -0
  40. package/schemas/migrations.schema.json +150 -0
  41. package/schemas/nexus-registry.schema.json +90 -0
  42. package/schemas/operation-constitution.schema.json +438 -0
  43. package/schemas/output.schema.json +164 -0
  44. package/schemas/project-context.schema.json +164 -0
  45. package/schemas/project-info.schema.json +180 -0
  46. package/schemas/projects-registry.schema.json +107 -0
  47. package/schemas/protocol-frontmatter.schema.json +72 -0
  48. package/schemas/rcasd-consensus-report.schema.json +10 -0
  49. package/schemas/rcasd-evidence.schema.json +42 -0
  50. package/schemas/rcasd-gate-result.schema.json +46 -0
  51. package/schemas/rcasd-hitl-resolution.schema.json +10 -0
  52. package/schemas/rcasd-index.schema.json +10 -0
  53. package/schemas/rcasd-manifest.schema.json +10 -0
  54. package/schemas/rcasd-research-output.schema.json +10 -0
  55. package/schemas/rcasd-spec-frontmatter.schema.json +10 -0
  56. package/schemas/rcasd-stage-transition.schema.json +38 -0
  57. package/schemas/releases.schema.json +267 -0
  58. package/schemas/skills-manifest.schema.json +91 -0
  59. package/schemas/skillsmp.schema.json +208 -0
  60. package/schemas/spec-index.schema.json +196 -0
  61. package/schemas/system-flow-atlas.schema.json +125 -0
  62. package/src/__tests__/injection-chain.test.ts +11 -10
  63. package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
  64. package/src/agents/__tests__/capacity.test.d.ts +7 -0
  65. package/src/agents/__tests__/capacity.test.d.ts.map +1 -0
  66. package/src/agents/__tests__/capacity.test.js +173 -0
  67. package/src/agents/__tests__/capacity.test.js.map +1 -0
  68. package/src/agents/__tests__/registry.test.d.ts +8 -0
  69. package/src/agents/__tests__/registry.test.d.ts.map +1 -0
  70. package/src/agents/__tests__/registry.test.js +348 -0
  71. package/src/agents/__tests__/registry.test.js.map +1 -0
  72. package/src/agents/__tests__/retry.test.d.ts +7 -0
  73. package/src/agents/__tests__/retry.test.d.ts.map +1 -0
  74. package/src/agents/__tests__/retry.test.js +225 -0
  75. package/src/agents/__tests__/retry.test.js.map +1 -0
  76. package/src/bootstrap.ts +3 -1
  77. package/src/init.ts +63 -18
  78. package/src/injection.ts +11 -5
  79. package/src/intelligence/__tests__/impact.test.d.ts +15 -0
  80. package/src/intelligence/__tests__/impact.test.d.ts.map +1 -0
  81. package/src/intelligence/__tests__/impact.test.js +384 -0
  82. package/src/intelligence/__tests__/impact.test.js.map +1 -0
  83. package/src/intelligence/__tests__/patterns.test.d.ts +8 -0
  84. package/src/intelligence/__tests__/patterns.test.d.ts.map +1 -0
  85. package/src/intelligence/__tests__/patterns.test.js +370 -0
  86. package/src/intelligence/__tests__/patterns.test.js.map +1 -0
  87. package/src/intelligence/__tests__/prediction.test.d.ts +8 -0
  88. package/src/intelligence/__tests__/prediction.test.d.ts.map +1 -0
  89. package/src/intelligence/__tests__/prediction.test.js +314 -0
  90. package/src/intelligence/__tests__/prediction.test.js.map +1 -0
  91. package/src/nexus/__tests__/nexus-e2e.test.d.ts +12 -0
  92. package/src/nexus/__tests__/nexus-e2e.test.d.ts.map +1 -0
  93. package/src/nexus/__tests__/nexus-e2e.test.js +1220 -0
  94. package/src/nexus/__tests__/nexus-e2e.test.js.map +1 -0
  95. package/src/nexus/__tests__/transfer.test.d.ts +8 -0
  96. package/src/nexus/__tests__/transfer.test.d.ts.map +1 -0
  97. package/src/nexus/__tests__/transfer.test.js +372 -0
  98. package/src/nexus/__tests__/transfer.test.js.map +1 -0
  99. package/src/nexus/__tests__/transfer.test.ts +1 -1
  100. package/src/routing/capability-matrix.ts +1435 -205
  101. package/src/scaffold.ts +18 -11
  102. package/src/skills/__tests__/routing-table.test.ts +53 -33
  103. package/src/skills/agents/install.ts +9 -1
  104. package/src/skills/routing-table.ts +39 -253
  105. package/src/skills/skill-paths.ts +3 -2
  106. package/src/store/__tests__/project-detect.test.ts +1 -1
  107. package/src/system/health.ts +18 -7
  108. package/src/ui/index.ts +0 -6
  109. package/src/validation/operation-gate-validators.ts +2 -2
  110. package/templates/CLEO-INJECTION.md +120 -0
  111. package/templates/README.md +29 -0
  112. package/templates/agent-registry.json +305 -0
  113. package/templates/cleo-gitignore +74 -0
  114. package/templates/config.template.json +187 -0
  115. package/templates/git-hooks/commit-msg +149 -0
  116. package/templates/git-hooks/pre-commit +40 -0
  117. package/templates/git-hooks/pre-push +79 -0
  118. package/templates/github/ISSUE_TEMPLATE/bug_report.yml +143 -0
  119. package/templates/github/ISSUE_TEMPLATE/config.yml +8 -0
  120. package/templates/github/ISSUE_TEMPLATE/feature_request.yml +125 -0
  121. package/templates/github/ISSUE_TEMPLATE/help_question.yml +99 -0
  122. package/templates/global-config.template.json +56 -0
  123. package/templates/hooks/precompact-safestop.sh +89 -0
  124. package/templates/issue-templates/bug_report.yml +143 -0
  125. package/templates/issue-templates/config.yml +8 -0
  126. package/templates/issue-templates/feature_request.yml +125 -0
  127. package/templates/issue-templates/help_question.yml +99 -0
  128. package/templates/skillsmp.json.example +28 -0
  129. package/templates/skillsmp.json.example.md +214 -0
  130. package/dist/ui/injection-legacy.d.ts +0 -26
  131. package/dist/ui/injection-legacy.d.ts.map +0 -1
  132. package/src/ui/__tests__/injection-registry.test.d.ts +0 -11
  133. package/src/ui/__tests__/injection-registry.test.d.ts.map +0 -1
  134. package/src/ui/__tests__/injection-registry.test.js +0 -46
  135. package/src/ui/__tests__/injection-registry.test.js.map +0 -1
  136. package/src/ui/__tests__/injection-registry.test.ts +0 -57
  137. package/src/ui/injection-legacy.ts +0 -44
@@ -0,0 +1,246 @@
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
+ }
@@ -0,0 +1,97 @@
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
+ }
@@ -0,0 +1,283 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://cleo-dev.com/schemas/v1/doctor-output.schema.json",
4
+ "schemaVersion": "1.0.0",
5
+ "title": "CLEO Doctor Output Schema",
6
+ "description": "JSON output structure for `cleo doctor` diagnostic command. Defines health check results, severity levels, and actionable fixes for global CLEO installation, agent configurations, and registered projects. Exit code mapping: 0 (ok), 50 (warning), 52 (failed/critical), 100 (special/no_config).",
7
+ "type": "object",
8
+ "required": ["_meta", "success", "severity", "checks", "summary", "projects"],
9
+ "additionalProperties": false,
10
+
11
+ "properties": {
12
+ "_meta": {
13
+ "type": "object",
14
+ "description": "Standard envelope metadata for command output.",
15
+ "required": ["format", "command", "timestamp", "version"],
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "format": {
19
+ "type": "string",
20
+ "const": "cleo-doctor-output",
21
+ "description": "Output format identifier for parsing."
22
+ },
23
+ "command": {
24
+ "type": "string",
25
+ "const": "doctor",
26
+ "description": "Command that generated this output."
27
+ },
28
+ "timestamp": {
29
+ "type": "string",
30
+ "format": "date-time",
31
+ "description": "ISO 8601 timestamp when diagnostic was run."
32
+ },
33
+ "version": {
34
+ "type": "string",
35
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
36
+ "description": "CLEO CLI version that ran the diagnostic."
37
+ },
38
+ "schemaVersion": {
39
+ "type": "string",
40
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
41
+ "default": "1.0.0",
42
+ "description": "Schema version for this output format."
43
+ }
44
+ }
45
+ },
46
+
47
+ "success": {
48
+ "type": "boolean",
49
+ "description": "Overall success status. True only if ALL checks passed without warnings or failures."
50
+ },
51
+
52
+ "severity": {
53
+ "type": "string",
54
+ "enum": ["ok", "warning", "failed"],
55
+ "description": "Overall severity level. ok=all passed (exit 0), warning=minor issues (exit 50), failed=critical problems requiring action (exit 52)."
56
+ },
57
+
58
+ "checks": {
59
+ "type": "array",
60
+ "description": "Array of individual health check results.",
61
+ "items": {
62
+ "$ref": "#/definitions/check"
63
+ }
64
+ },
65
+
66
+ "summary": {
67
+ "type": "object",
68
+ "description": "Summary statistics across all checks.",
69
+ "required": ["totalChecks", "passed", "warnings", "failed", "severity"],
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "totalChecks": {
73
+ "type": "integer",
74
+ "minimum": 0,
75
+ "description": "Total number of checks performed."
76
+ },
77
+ "passed": {
78
+ "type": "integer",
79
+ "minimum": 0,
80
+ "description": "Number of checks that passed without issues."
81
+ },
82
+ "warnings": {
83
+ "type": "integer",
84
+ "minimum": 0,
85
+ "description": "Number of checks with warnings (non-critical)."
86
+ },
87
+ "failed": {
88
+ "type": "integer",
89
+ "minimum": 0,
90
+ "description": "Number of checks that failed."
91
+ },
92
+ "severity": {
93
+ "type": "string",
94
+ "enum": ["ok", "warning", "failed"],
95
+ "description": "Overall severity across all checks. ok=all passed, warning=minor issues, failed=critical problems."
96
+ }
97
+ }
98
+ },
99
+
100
+ "projects": {
101
+ "type": "object",
102
+ "description": "Project registry validation results. Summary of all registered CLEO projects and their health status.",
103
+ "required": ["total", "healthy", "warnings", "failed", "orphaned", "projects"],
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "total": {
107
+ "type": "integer",
108
+ "minimum": 0,
109
+ "description": "Total number of registered projects."
110
+ },
111
+ "healthy": {
112
+ "type": "integer",
113
+ "minimum": 0,
114
+ "description": "Number of projects with no issues."
115
+ },
116
+ "warnings": {
117
+ "type": "integer",
118
+ "minimum": 0,
119
+ "description": "Number of projects with warnings (non-critical issues)."
120
+ },
121
+ "failed": {
122
+ "type": "integer",
123
+ "minimum": 0,
124
+ "description": "Number of projects with critical issues."
125
+ },
126
+ "orphaned": {
127
+ "type": "integer",
128
+ "minimum": 0,
129
+ "description": "Number of projects in registry with missing paths."
130
+ },
131
+ "projects": {
132
+ "type": "array",
133
+ "description": "Array of individual project health results.",
134
+ "items": {
135
+ "$ref": "#/definitions/projectHealth"
136
+ }
137
+ }
138
+ }
139
+ }
140
+ },
141
+
142
+ "definitions": {
143
+ "check": {
144
+ "type": "object",
145
+ "description": "Individual health check result with diagnostic data and actionable fixes.",
146
+ "required": ["id", "category", "status", "message"],
147
+ "additionalProperties": false,
148
+ "properties": {
149
+ "id": {
150
+ "type": "string",
151
+ "pattern": "^[a-z_][a-z0-9_]*$",
152
+ "description": "Unique check identifier (snake_case, e.g., 'cli_installation', 'agent_config_exists')."
153
+ },
154
+ "category": {
155
+ "type": "string",
156
+ "enum": ["installation", "configuration", "registry", "projects"],
157
+ "description": "Check category for grouping related diagnostics. installation=CLI setup, configuration=agent configs, registry=project registry, projects=per-project checks."
158
+ },
159
+ "status": {
160
+ "type": "string",
161
+ "enum": ["passed", "warning", "failed"],
162
+ "description": "Check result status. passed=no issues, warning=non-critical, failed=requires action."
163
+ },
164
+ "message": {
165
+ "type": "string",
166
+ "minLength": 1,
167
+ "maxLength": 500,
168
+ "description": "Human-readable description of check result."
169
+ },
170
+ "details": {
171
+ "type": "object",
172
+ "description": "Structured diagnostic data specific to this check. Schema varies by check ID.",
173
+ "additionalProperties": true
174
+ },
175
+ "fix": {
176
+ "type": ["string", "null"],
177
+ "maxLength": 500,
178
+ "description": "Copy-paste command to resolve issue. Null if check passed or no automated fix available."
179
+ }
180
+ }
181
+ },
182
+
183
+ "projectHealth": {
184
+ "type": "object",
185
+ "description": "Individual project health check result. Tracks project path, status, schema versions, injection status, and issues.",
186
+ "required": ["hash", "path", "name", "status"],
187
+ "additionalProperties": false,
188
+ "properties": {
189
+ "hash": {
190
+ "type": "string",
191
+ "pattern": "^[a-f0-9]{8}$",
192
+ "description": "Project hash identifier (first 8 chars of path hash)."
193
+ },
194
+ "path": {
195
+ "type": "string",
196
+ "minLength": 1,
197
+ "description": "Absolute path to project directory."
198
+ },
199
+ "name": {
200
+ "type": "string",
201
+ "minLength": 1,
202
+ "description": "Project name from todo.json or directory name."
203
+ },
204
+ "status": {
205
+ "type": "string",
206
+ "enum": ["healthy", "warning", "failed", "orphaned"],
207
+ "description": "Project health status. healthy=no issues, warning=minor issues, failed=critical problems, orphaned=path missing."
208
+ },
209
+ "schemas": {
210
+ "type": ["object", "null"],
211
+ "description": "Schema version information for project files.",
212
+ "additionalProperties": false,
213
+ "properties": {
214
+ "todo": {
215
+ "type": ["string", "null"],
216
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
217
+ "description": "todo.json schema version."
218
+ },
219
+ "config": {
220
+ "type": ["string", "null"],
221
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
222
+ "description": "config.json schema version."
223
+ },
224
+ "archive": {
225
+ "type": ["string", "null"],
226
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
227
+ "description": "archive.json schema version."
228
+ },
229
+ "log": {
230
+ "type": ["string", "null"],
231
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
232
+ "description": "log.json schema version."
233
+ }
234
+ }
235
+ },
236
+ "injection": {
237
+ "type": ["object", "null"],
238
+ "description": "Agent file injection status for this project.",
239
+ "additionalProperties": false,
240
+ "properties": {
241
+ "status": {
242
+ "type": "string",
243
+ "enum": ["current", "outdated", "missing"],
244
+ "description": "Injection status. current=up-to-date, outdated=old version, missing=not injected."
245
+ },
246
+ "version": {
247
+ "type": ["string", "null"],
248
+ "pattern": "^\\d+\\.\\d+\\.\\d+$",
249
+ "description": "Version of injected content in agent files."
250
+ }
251
+ }
252
+ },
253
+ "issues": {
254
+ "type": "array",
255
+ "description": "Array of issues found in this project.",
256
+ "items": {
257
+ "type": "object",
258
+ "required": ["severity", "message"],
259
+ "additionalProperties": false,
260
+ "properties": {
261
+ "severity": {
262
+ "type": "string",
263
+ "enum": ["warning", "error"],
264
+ "description": "Issue severity level."
265
+ },
266
+ "message": {
267
+ "type": "string",
268
+ "minLength": 1,
269
+ "maxLength": 500,
270
+ "description": "Human-readable issue description."
271
+ },
272
+ "fix": {
273
+ "type": ["string", "null"],
274
+ "maxLength": 200,
275
+ "description": "Suggested fix command. Null if no automated fix available."
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
281
+ }
282
+ }
283
+ }