Overview
The Output schema defines the standard JSON envelope for all successful CLEO command responses. It provides a consistent structure for returning data from commands, including metadata, task objects, task arrays, change tracking, and warnings.Schema Definition
Properties
Root Properties
| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | No | Schema URL for validation (must be https://cleo-dev.com/schemas/v1/output.schema.json) |
_meta | object | Yes | Response metadata |
success | boolean | Yes | Always true for successful responses |
summary | object | No | Aggregated statistics or summary data |
data | any | No | Generic data payload (type depends on command) |
task | object | No | Single task object (for add, update, show commands) |
tasks | array | No | Array of task objects (for list commands) |
taskId | string | No | Task ID affected by operation |
changes | object | No | Change tracking for update operations |
warnings | array | No | Non-fatal warnings |
_meta Object
| Property | Type | Required | Description |
|---|---|---|---|
format | string | No | Output format identifier (always “json”) |
version | string | Yes | CLEO version (semver format) |
command | string | Yes | Command name that generated this response |
timestamp | string | Yes | ISO-8601 UTC timestamp of response generation |
checksum | string | No | SHA256 checksum of source file (64 hex chars) |
execution_ms | integer | No | Execution time in milliseconds |
Task Object
| Property | Type | Required | Description |
|---|---|---|---|
id | string | No | Task identifier (T001+, expandable) |
type | string | No | Hierarchy type: epic, task, or subtask |
parentId | string/null | No | Parent task ID or null for root tasks |
size | string/null | No | Task size estimate: small, medium, large, or null |
title | string | No | Task title (minLength: 1) |
description | string | No | Task description |
status | string | No | Task status: pending, active, blocked, or done |
priority | string | No | Task priority: critical, high, medium, or low |
createdAt | string | No | ISO 8601 timestamp when task was created |
completedAt | string/null | No | ISO 8601 timestamp when task was completed |
Changes Object
Thechanges object tracks modifications made during update operations. Each property represents a changed field with before and after values:
Warnings Array Items
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Warning code with W_ prefix (e.g., W_DEPRECATED) |
message | string | Yes | Human-readable warning message |
suggestion | string/null | No | Suggested action to address the warning |
Examples
Task Creation Response
Task List Response
Task Update Response with Changes
Response with Warnings
Validation Response
Usage
The output schema is used throughout CLEO:- CLI Success Output: All successful
cleocommands output in this format when using--format json - API Responses: Success responses from any CLEO API endpoints
- Script Integration: Bash scripts can parse structured responses
- Agent Communication: LLM agents receive consistent response structures
Response Patterns
Different commands populate different fields:| Command Type | Populated Fields |
|---|---|
cleo add, cleo show | task, taskId |
cleo list | tasks, summary |
cleo update | task, taskId, changes |
cleo complete | task, taskId, warnings |
cleo validate | summary, data |
cleo config | data |
Warning Codes
Common warning codes include:| Warning Code | Description |
|---|---|
W_DEPRECATED | Feature or option is deprecated |
W_CHILDREN_ACTIVE | Parent task has active children |
W_SCOPE_OVERLAP | Session scope overlaps with another session |
W_LARGE_TASK | Task size is large, consider breaking down |
W_STALE_DATA | Data hasn’t been updated recently |
Additional Properties
The schema allowsadditionalProperties: true at the root level, enabling commands to include command-specific fields as needed while maintaining the core structure.