@cleocode/core 2026.3.44 → 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.
- package/dist/admin/import-tasks.d.ts +10 -2
- package/dist/admin/import-tasks.d.ts.map +1 -1
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/index.js +1890 -504
- 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/internal.d.ts +3 -1
- package/dist/internal.d.ts.map +1 -1
- package/dist/nexus/index.d.ts +2 -0
- package/dist/nexus/index.d.ts.map +1 -1
- package/dist/nexus/transfer-types.d.ts +123 -0
- package/dist/nexus/transfer-types.d.ts.map +1 -0
- package/dist/nexus/transfer.d.ts +31 -0
- package/dist/nexus/transfer.d.ts.map +1 -0
- package/dist/routing/capability-matrix.d.ts +6 -4
- package/dist/routing/capability-matrix.d.ts.map +1 -1
- package/dist/scaffold.d.ts +16 -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/store/brain-sqlite.d.ts +4 -1
- package/dist/store/brain-sqlite.d.ts.map +1 -1
- package/dist/store/nexus-sqlite.d.ts +4 -1
- package/dist/store/nexus-sqlite.d.ts.map +1 -1
- package/dist/store/sqlite.d.ts +4 -1
- package/dist/store/sqlite.d.ts.map +1 -1
- package/dist/store/tasks-schema.d.ts +3 -3
- package/dist/store/tasks-schema.d.ts.map +1 -1
- package/dist/store/validation-schemas.d.ts +5 -4
- package/dist/store/validation-schemas.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.ts +11 -10
- package/src/__tests__/injection-mvi-tiers.test.ts +4 -2
- package/src/admin/import-tasks.ts +53 -29
- 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 +3 -1
- 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/internal.ts +7 -1
- 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 +446 -0
- package/src/nexus/index.ts +14 -0
- package/src/nexus/transfer-types.ts +129 -0
- package/src/nexus/transfer.ts +314 -0
- package/src/routing/capability-matrix.ts +1435 -205
- package/src/scaffold.ts +18 -11
- package/src/skills/__tests__/routing-table.test.ts +53 -33
- package/src/skills/agents/install.ts +9 -1
- package/src/skills/routing-table.ts +39 -253
- package/src/skills/skill-paths.ts +3 -2
- package/src/store/__tests__/project-detect.test.ts +1 -1
- package/src/store/brain-sqlite.ts +7 -3
- package/src/store/nexus-sqlite.ts +7 -3
- package/src/store/sqlite.ts +9 -3
- package/src/store/tasks-schema.ts +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,161 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"schemaVersion": "1.0.0",
|
|
4
|
+
"$id": "https://cleo-dev.com/schemas/v1/error.schema.json",
|
|
5
|
+
"title": "CLEO Error Envelope",
|
|
6
|
+
"description": "Standard JSON envelope for all cleo error responses",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["_meta", "success", "error"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Schema URL for validation",
|
|
13
|
+
"const": "https://cleo-dev.com/schemas/v1/error.schema.json"
|
|
14
|
+
},
|
|
15
|
+
"_meta": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"description": "Response metadata",
|
|
18
|
+
"required": ["command", "timestamp", "version"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"format": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"const": "json",
|
|
23
|
+
"description": "Output format identifier"
|
|
24
|
+
},
|
|
25
|
+
"version": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+",
|
|
28
|
+
"description": "cleo version (semver)"
|
|
29
|
+
},
|
|
30
|
+
"command": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"description": "Command name that generated this error"
|
|
34
|
+
},
|
|
35
|
+
"timestamp": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"format": "date-time",
|
|
38
|
+
"description": "ISO-8601 UTC timestamp of error generation"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
},
|
|
43
|
+
"success": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"const": false,
|
|
46
|
+
"description": "Always false for error responses"
|
|
47
|
+
},
|
|
48
|
+
"error": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Error details",
|
|
51
|
+
"required": ["code", "message", "exitCode"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"code": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"pattern": "^E_[A-Z_]+$",
|
|
56
|
+
"description": "Error code (E_ prefix convention)",
|
|
57
|
+
"enum": [
|
|
58
|
+
"E_TASK_NOT_FOUND",
|
|
59
|
+
"E_TASK_ALREADY_EXISTS",
|
|
60
|
+
"E_TASK_INVALID_ID",
|
|
61
|
+
"E_TASK_INVALID_STATUS",
|
|
62
|
+
"E_FILE_NOT_FOUND",
|
|
63
|
+
"E_FILE_READ_ERROR",
|
|
64
|
+
"E_FILE_WRITE_ERROR",
|
|
65
|
+
"E_FILE_PERMISSION",
|
|
66
|
+
"E_VALIDATION_SCHEMA",
|
|
67
|
+
"E_VALIDATION_CHECKSUM",
|
|
68
|
+
"E_VALIDATION_REQUIRED",
|
|
69
|
+
"E_INPUT_MISSING",
|
|
70
|
+
"E_INPUT_INVALID",
|
|
71
|
+
"E_INPUT_FORMAT",
|
|
72
|
+
"E_DEPENDENCY_MISSING",
|
|
73
|
+
"E_DEPENDENCY_VERSION",
|
|
74
|
+
"E_PHASE_NOT_FOUND",
|
|
75
|
+
"E_PHASE_INVALID",
|
|
76
|
+
"E_SESSION_ACTIVE",
|
|
77
|
+
"E_SESSION_NOT_ACTIVE",
|
|
78
|
+
"E_UNKNOWN",
|
|
79
|
+
"E_NOT_INITIALIZED",
|
|
80
|
+
"E_PARENT_NOT_FOUND",
|
|
81
|
+
"E_DEPTH_EXCEEDED",
|
|
82
|
+
"E_SIBLING_LIMIT",
|
|
83
|
+
"E_INVALID_PARENT_TYPE",
|
|
84
|
+
"E_CIRCULAR_REFERENCE",
|
|
85
|
+
"E_ORPHAN_DETECTED",
|
|
86
|
+
"E_HAS_CHILDREN",
|
|
87
|
+
"E_TASK_COMPLETED",
|
|
88
|
+
"E_CASCADE_FAILED",
|
|
89
|
+
"E_CANCEL_REASON_REQUIRED",
|
|
90
|
+
"E_CHECKSUM_MISMATCH",
|
|
91
|
+
"E_CONCURRENT_MODIFICATION",
|
|
92
|
+
"E_ID_COLLISION",
|
|
93
|
+
"E_SESSION_EXISTS",
|
|
94
|
+
"E_SESSION_NOT_FOUND",
|
|
95
|
+
"E_SCOPE_CONFLICT",
|
|
96
|
+
"E_SCOPE_INVALID",
|
|
97
|
+
"E_TASK_NOT_IN_SCOPE",
|
|
98
|
+
"E_TASK_CLAIMED",
|
|
99
|
+
"E_SESSION_REQUIRED",
|
|
100
|
+
"E_SESSION_CLOSE_BLOCKED",
|
|
101
|
+
"E_FOCUS_REQUIRED",
|
|
102
|
+
"E_NOTES_REQUIRED",
|
|
103
|
+
"E_SESSION_DISCOVERY_MODE",
|
|
104
|
+
"E_SESSION_RESUME_ACTIVE",
|
|
105
|
+
"E_ALREADY_INITIALIZED",
|
|
106
|
+
"E_CONFIRMATION_REQUIRED",
|
|
107
|
+
"E_HAS_DEPENDENTS"
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"message": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"description": "Human-readable error message"
|
|
114
|
+
},
|
|
115
|
+
"exitCode": {
|
|
116
|
+
"type": "integer",
|
|
117
|
+
"minimum": 1,
|
|
118
|
+
"maximum": 127,
|
|
119
|
+
"description": "Shell exit code for this error"
|
|
120
|
+
},
|
|
121
|
+
"recoverable": {
|
|
122
|
+
"type": "boolean",
|
|
123
|
+
"description": "Whether the error can be recovered from"
|
|
124
|
+
},
|
|
125
|
+
"suggestion": {
|
|
126
|
+
"type": ["string", "null"],
|
|
127
|
+
"description": "Suggested action to resolve the error"
|
|
128
|
+
},
|
|
129
|
+
"fix": {
|
|
130
|
+
"type": ["string", "null"],
|
|
131
|
+
"description": "Concrete command to fix the error (copy-paste ready)"
|
|
132
|
+
},
|
|
133
|
+
"alternatives": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"description": "Alternative recovery actions with executable commands",
|
|
136
|
+
"items": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"required": ["action", "command"],
|
|
139
|
+
"properties": {
|
|
140
|
+
"action": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "Short description of what this alternative does"
|
|
143
|
+
},
|
|
144
|
+
"command": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Executable command (copy-paste ready)"
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"context": {
|
|
152
|
+
"type": "object",
|
|
153
|
+
"description": "Additional error context (varies by error type)",
|
|
154
|
+
"additionalProperties": true
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"additionalProperties": false
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
}
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://cleo-dev.com/schemas/v1/export-package.schema.json",
|
|
4
|
+
"schemaVersion": "1.0.0",
|
|
5
|
+
"title": "CLEO Export Package Schema",
|
|
6
|
+
"description": "Schema for cleo task import/export packages. Enables cross-project task transfer with ID remapping and relationship preservation.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": ["_meta", "selection", "tasks"],
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
|
|
11
|
+
"properties": {
|
|
12
|
+
"$schema": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "JSON Schema reference"
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
"_meta": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"description": "Export metadata for validation and provenance tracking",
|
|
20
|
+
"required": ["format", "version", "exportedAt", "source", "taskCount"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"format": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "cleo-export",
|
|
26
|
+
"description": "Package format identifier"
|
|
27
|
+
},
|
|
28
|
+
"version": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
31
|
+
"description": "Export format version (semver)"
|
|
32
|
+
},
|
|
33
|
+
"exportedAt": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"format": "date-time",
|
|
36
|
+
"description": "ISO 8601 timestamp of export"
|
|
37
|
+
},
|
|
38
|
+
"source": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "Source project metadata",
|
|
41
|
+
"required": ["project", "cleo_version"],
|
|
42
|
+
"additionalProperties": false,
|
|
43
|
+
"properties": {
|
|
44
|
+
"project": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"description": "Source project name"
|
|
48
|
+
},
|
|
49
|
+
"cleo_version": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+",
|
|
52
|
+
"description": "cleo version used for export"
|
|
53
|
+
},
|
|
54
|
+
"nextId": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"description": "Next available task ID in source project at export time"
|
|
58
|
+
},
|
|
59
|
+
"exportedBy": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Optional identifier of who/what performed the export"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"checksum": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"pattern": "^[a-f0-9]{16}$",
|
|
68
|
+
"description": "SHA-256 truncated hash of tasks array for integrity verification"
|
|
69
|
+
},
|
|
70
|
+
"taskCount": {
|
|
71
|
+
"type": "integer",
|
|
72
|
+
"minimum": 0,
|
|
73
|
+
"description": "Number of tasks in export"
|
|
74
|
+
},
|
|
75
|
+
"exportMode": {
|
|
76
|
+
"type": "string",
|
|
77
|
+
"enum": ["single", "subtree", "filter", "interactive", "full"],
|
|
78
|
+
"description": "Mode used for task selection"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
"selection": {
|
|
84
|
+
"type": "object",
|
|
85
|
+
"description": "Selection criteria used for export (for documentation/debugging)",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"properties": {
|
|
88
|
+
"mode": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": ["single", "subtree", "filter", "interactive", "full"],
|
|
91
|
+
"description": "Selection mode"
|
|
92
|
+
},
|
|
93
|
+
"rootTaskIds": {
|
|
94
|
+
"type": "array",
|
|
95
|
+
"items": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"pattern": "^T\\d{3,}$"
|
|
98
|
+
},
|
|
99
|
+
"description": "Root task IDs that were explicitly selected"
|
|
100
|
+
},
|
|
101
|
+
"includeChildren": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"default": false,
|
|
104
|
+
"description": "Whether children were auto-included"
|
|
105
|
+
},
|
|
106
|
+
"includeDeps": {
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": false,
|
|
109
|
+
"description": "Whether dependencies were auto-included"
|
|
110
|
+
},
|
|
111
|
+
"filters": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"description": "Filters applied during selection",
|
|
114
|
+
"additionalProperties": false,
|
|
115
|
+
"properties": {
|
|
116
|
+
"status": {
|
|
117
|
+
"type": ["array", "null"],
|
|
118
|
+
"items": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"enum": ["pending", "active", "blocked", "done", "cancelled"]
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"phase": {
|
|
124
|
+
"type": ["string", "null"]
|
|
125
|
+
},
|
|
126
|
+
"labels": {
|
|
127
|
+
"type": ["array", "null"],
|
|
128
|
+
"items": { "type": "string" }
|
|
129
|
+
},
|
|
130
|
+
"priority": {
|
|
131
|
+
"type": ["string", "null"],
|
|
132
|
+
"enum": ["critical", "high", "medium", "low", null]
|
|
133
|
+
},
|
|
134
|
+
"type": {
|
|
135
|
+
"type": ["string", "null"],
|
|
136
|
+
"enum": ["epic", "task", "subtask", null]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
"idMap": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"description": "Quick-reference map of task IDs to their key properties. Used for relationship validation without parsing full task objects.",
|
|
146
|
+
"additionalProperties": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"required": ["title"],
|
|
149
|
+
"additionalProperties": false,
|
|
150
|
+
"properties": {
|
|
151
|
+
"type": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"enum": ["epic", "task", "subtask"]
|
|
154
|
+
},
|
|
155
|
+
"title": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
},
|
|
158
|
+
"status": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"enum": ["pending", "active", "blocked", "done", "cancelled"]
|
|
161
|
+
},
|
|
162
|
+
"parentId": {
|
|
163
|
+
"type": ["string", "null"],
|
|
164
|
+
"pattern": "^T\\d{3,}$"
|
|
165
|
+
},
|
|
166
|
+
"depends": {
|
|
167
|
+
"type": "array",
|
|
168
|
+
"items": {
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "^T\\d{3,}$"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
|
|
177
|
+
"tasks": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"description": "Full task objects to be imported",
|
|
180
|
+
"items": { "$ref": "#/definitions/exportedTask" }
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
"relationshipGraph": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"description": "Pre-computed relationship graph for efficient import ordering",
|
|
186
|
+
"additionalProperties": false,
|
|
187
|
+
"properties": {
|
|
188
|
+
"hierarchy": {
|
|
189
|
+
"type": "object",
|
|
190
|
+
"description": "Map of parent IDs to their children: { 'T001': ['T002', 'T003'] }",
|
|
191
|
+
"additionalProperties": {
|
|
192
|
+
"type": "array",
|
|
193
|
+
"items": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "^T\\d{3,}$"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"dependencies": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"description": "Map of task IDs to their dependencies: { 'T003': ['T002'] }",
|
|
202
|
+
"additionalProperties": {
|
|
203
|
+
"type": "array",
|
|
204
|
+
"items": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"pattern": "^T\\d{3,}$"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"roots": {
|
|
211
|
+
"type": "array",
|
|
212
|
+
"description": "Task IDs with no parent and no dependencies (import entry points)",
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"pattern": "^T\\d{3,}$"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
|
|
221
|
+
"phases": {
|
|
222
|
+
"type": "object",
|
|
223
|
+
"description": "Phase definitions from source project (for reference during import)",
|
|
224
|
+
"additionalProperties": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"properties": {
|
|
227
|
+
"order": { "type": "integer" },
|
|
228
|
+
"name": { "type": "string" },
|
|
229
|
+
"description": { "type": "string" }
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
"labels": {
|
|
235
|
+
"type": "array",
|
|
236
|
+
"description": "All unique labels used by exported tasks",
|
|
237
|
+
"items": {
|
|
238
|
+
"type": "string",
|
|
239
|
+
"pattern": "^[a-z][a-z0-9.-]*$"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
"definitions": {
|
|
245
|
+
"exportedTask": {
|
|
246
|
+
"type": "object",
|
|
247
|
+
"description": "Task object for export/import. Mirrors todo.schema.json task definition.",
|
|
248
|
+
"required": ["id", "title", "status", "priority", "createdAt"],
|
|
249
|
+
"additionalProperties": false,
|
|
250
|
+
"properties": {
|
|
251
|
+
"id": {
|
|
252
|
+
"type": "string",
|
|
253
|
+
"pattern": "^T\\d{3,}$",
|
|
254
|
+
"description": "Original task ID from source project. Will be remapped on import."
|
|
255
|
+
},
|
|
256
|
+
"title": {
|
|
257
|
+
"type": "string",
|
|
258
|
+
"minLength": 1,
|
|
259
|
+
"maxLength": 120
|
|
260
|
+
},
|
|
261
|
+
"description": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"maxLength": 2000
|
|
264
|
+
},
|
|
265
|
+
"type": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"enum": ["epic", "task", "subtask"],
|
|
268
|
+
"default": "task"
|
|
269
|
+
},
|
|
270
|
+
"status": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"enum": ["pending", "active", "blocked", "done", "cancelled"]
|
|
273
|
+
},
|
|
274
|
+
"priority": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"enum": ["critical", "high", "medium", "low"]
|
|
277
|
+
},
|
|
278
|
+
"phase": {
|
|
279
|
+
"type": ["string", "null"],
|
|
280
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
281
|
+
},
|
|
282
|
+
"size": {
|
|
283
|
+
"type": ["string", "null"],
|
|
284
|
+
"enum": ["small", "medium", "large", null]
|
|
285
|
+
},
|
|
286
|
+
"labels": {
|
|
287
|
+
"type": "array",
|
|
288
|
+
"items": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"pattern": "^[a-z][a-z0-9.-]*$"
|
|
291
|
+
},
|
|
292
|
+
"uniqueItems": true
|
|
293
|
+
},
|
|
294
|
+
"parentId": {
|
|
295
|
+
"type": ["string", "null"],
|
|
296
|
+
"pattern": "^T\\d{3,}$",
|
|
297
|
+
"description": "Original parent ID. Will be remapped on import if parent is in export."
|
|
298
|
+
},
|
|
299
|
+
"depends": {
|
|
300
|
+
"type": "array",
|
|
301
|
+
"items": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"pattern": "^T\\d{3,}$"
|
|
304
|
+
},
|
|
305
|
+
"uniqueItems": true,
|
|
306
|
+
"description": "Original dependency IDs. Will be remapped on import."
|
|
307
|
+
},
|
|
308
|
+
"position": {
|
|
309
|
+
"type": ["integer", "null"],
|
|
310
|
+
"minimum": 1
|
|
311
|
+
},
|
|
312
|
+
"notes": {
|
|
313
|
+
"type": "array",
|
|
314
|
+
"items": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"maxLength": 5000
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
"acceptance": {
|
|
320
|
+
"type": "array",
|
|
321
|
+
"items": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"maxLength": 200
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"files": {
|
|
327
|
+
"type": "array",
|
|
328
|
+
"items": { "type": "string" }
|
|
329
|
+
},
|
|
330
|
+
"blockedBy": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"maxLength": 300
|
|
333
|
+
},
|
|
334
|
+
"createdAt": {
|
|
335
|
+
"type": "string",
|
|
336
|
+
"format": "date-time"
|
|
337
|
+
},
|
|
338
|
+
"completedAt": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"format": "date-time"
|
|
341
|
+
},
|
|
342
|
+
"cancelledAt": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"format": "date-time"
|
|
345
|
+
},
|
|
346
|
+
"cancellationReason": {
|
|
347
|
+
"type": "string",
|
|
348
|
+
"maxLength": 300
|
|
349
|
+
},
|
|
350
|
+
"epicLifecycle": {
|
|
351
|
+
"type": ["string", "null"],
|
|
352
|
+
"enum": ["backlog", "planning", "active", "review", "released", "archived", null]
|
|
353
|
+
},
|
|
354
|
+
"verification": {
|
|
355
|
+
"type": ["object", "null"],
|
|
356
|
+
"description": "Verification state (preserved but not validated on import)"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"allOf": [
|
|
360
|
+
{
|
|
361
|
+
"if": { "properties": { "status": { "const": "blocked" } } },
|
|
362
|
+
"then": { "required": ["blockedBy"] }
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"if": { "properties": { "status": { "const": "done" } } },
|
|
366
|
+
"then": { "required": ["completedAt"] }
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"if": { "properties": { "status": { "const": "cancelled" } } },
|
|
370
|
+
"then": { "required": ["cancelledAt", "cancellationReason"] }
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|