Skip to main content
Type contracts exported by this package: interfaces, type aliases, and enums.

LoggerConfig

PropertyTypeRequiredDescription
levelstringYeslevel
filePathstringYesfilePath
maxFileSizenumberYesmaxFileSize
maxFilesnumberYesmaxFiles

PlatformPaths

OS-appropriate paths for CLEO’s global directories.
PropertyTypeRequiredDescription
datastringYesUser data dir. Override with CLEO_HOME env var.
configstringYesUser config dir (XDG_CONFIG_HOME / Library/Preferences / %APPDATA%).
cachestringYesUser cache dir (XDG_CACHE_HOME / Library/Caches / %LOCALAPPDATA%).
logstringYesUser log dir (XDG_STATE_HOME / Library/Logs / %LOCALAPPDATA%).
tempstringYesTemp dir for ephemeral files.

SystemInfo

Immutable system information snapshot, captured once per process.
PropertyTypeRequiredDescription
platformNodeJS.PlatformYesplatform
archstringYesarch
releasestringYesrelease
hostnamestringYeshostname
nodeVersionstringYesnodeVersion
pathsPlatformPathsYespaths

RequiredColumn

Required column definition for ensureColumns().
PropertyTypeRequiredDescription
namestringYesname
ddlstringYesALTER TABLE ADD COLUMN DDL suffix (e.g., ‘text’, ‘integer DEFAULT 0’).

VacuumOptions

PropertyTypeRequiredDescription
cwdstring | undefinedNocwd
forceboolean | undefinedNoforce

AgentInstanceRow

{ id: string; agentType: "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"; status: "error" | "active" | "starting" | "idle" | "crashed" | "stopped"; sessionId: string | null; taskId: string | null; startedAt: string; lastHeartbeat: string; stoppedAt: string | null; errorCount: number; totalTasksCompleted: number; capacity: string; metadataJson: string | null; parentAgentId: string | null; }

NewAgentInstanceRow

{ id: string; agentType: "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"; status?: "error" | "active" | "starting" | "idle" | "crashed" | "stopped" | undefined; sessionId?: string | null | undefined; taskId?: string | null | undefined; startedAt?: string | undefined; lastHeartbeat?: string | undefined; stoppedAt?: string | null | undefined; errorCount?: number | undefined; totalTasksCompleted?: number | undefined; capacity?: string | undefined; metadataJson?: string | null | undefined; parentAgentId?: string | null | undefined; }

AgentErrorLogRow

{ id: number; agentId: string; errorType: "unknown" | "retriable" | "permanent"; message: string; stack: string | null; occurredAt: string; resolved: boolean; }

NewAgentErrorLogRow

{ agentId: string; errorType: "unknown" | "retriable" | "permanent"; message: string; id?: number | undefined; stack?: string | null | undefined; occurredAt?: string | undefined; resolved?: boolean | undefined; }

AgentInstanceStatus

"error" | "active" | "starting" | "idle" | "crashed" | "stopped"

AgentType

"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"

AgentErrorType

AgentErrorType

WarpChainRow

{ name: string; id: string; version: string; description: string | null; definition: string; validated: boolean | null; createdAt: string | null; updatedAt: string | null; }

NewWarpChainRow

{ name: string; id: string; version: string; definition: string; description?: string | null | undefined; validated?: boolean | null | undefined; createdAt?: string | null | undefined; updatedAt?: string | null | undefined; }

WarpChainInstanceRow

{ id: string; status: string; createdAt: string | null; updatedAt: string | null; chainId: string; epicId: string; variables: string | null; stageToTask: string | null; currentStage: string | null; gateResults: string | null; }

NewWarpChainInstanceRow

{ id: string; chainId: string; epicId: string; status?: string | undefined; createdAt?: string | null | undefined; updatedAt?: string | null | undefined; variables?: string | null | undefined; stageToTask?: string | null | undefined; currentStage?: string | null | undefined; gateResults?: string | null | undefined; }

StatusRegistryRow

{ name: string; description: string; entityType: "session" | "task" | "manifest" | "gate" | "lifecycle_pipeline" | "lifecycle_stage" | "adr"; namespace: "workflow" | "manifest" | "governance"; isTerminal: boolean; }

TaskRow

{ id: string; status: "active" | "pending" | "cancelled" | "blocked" | "done" | "archived"; sessionId: string | null; description: string | null; createdAt: string; updatedAt: string | null; title: string; priority: "high" | "medium" | "low" | "critical"; type: "task" | "epic" | "subtask" | null; parentId: string | null; phase: string | null; size: "medium" | "small" | "large" | null; position: number | null; positionVersion: number | null; labelsJson: string | null; notesJson: string | null; acceptanceJson: string | null; filesJson: string | null; origin: string | null; blockedBy: string | null; epicLifecycle: string | null; noAutoComplete: boolean | null; completedAt: string | null; cancelledAt: string | null; cancellationReason: string | null; archivedAt: string | null; archiveReason: string | null; cycleTimeDays: number | null; verificationJson: string | null; createdBy: string | null; modifiedBy: string | null; pipelineStage: string | null; assignee: string | null; }

NewTaskRow

{ id: string; title: string; status?: "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined; sessionId?: string | null | undefined; description?: string | null | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; priority?: "high" | "medium" | "low" | "critical" | undefined; type?: "task" | "epic" | "subtask" | null | undefined; parentId?: string | null | undefined; phase?: string | null | undefined; size?: "medium" | "small" | "large" | null | undefined; position?: number | null | undefined; positionVersion?: number | null | undefined; labelsJson?: string | null | undefined; notesJson?: string | null | undefined; acceptanceJson?: string | null | undefined; filesJson?: string | null | undefined; origin?: string | null | undefined; blockedBy?: string | null | undefined; epicLifecycle?: string | null | undefined; noAutoComplete?: boolean | null | undefined; completedAt?: string | null | undefined; cancelledAt?: string | null | undefined; cancellationReason?: string | null | undefined; archivedAt?: string | null | undefined; archiveReason?: string | null | undefined; cycleTimeDays?: number | null | undefined; verificationJson?: string | null | undefined; createdBy?: string | null | undefined; modifiedBy?: string | null | undefined; pipelineStage?: string | null | undefined; assignee?: string | null | undefined; }

SessionRow

{ agent: string | null; name: string; id: string; status: "active" | "ended" | "orphaned" | "suspended"; startedAt: string; notesJson: string | null; scopeJson: string; currentTask: string | null; taskStartedAt: string | null; tasksCompletedJson: string | null; tasksCreatedJson: string | null; handoffJson: string | null; endedAt: string | null; previousSessionId: string | null; nextSessionId: string | null; agentIdentifier: string | null; handoffConsumedAt: string | null; handoffConsumedBy: string | null; debriefJson: string | null; providerId: string | null; statsJson: string | null; resumeCount: number | null; gradeMode: number | null; }

NewSessionRow

{ name: string; id: string; agent?: string | null | undefined; status?: "active" | "ended" | "orphaned" | "suspended" | undefined; startedAt?: string | undefined; notesJson?: string | null | undefined; scopeJson?: string | undefined; currentTask?: string | null | undefined; taskStartedAt?: string | null | undefined; tasksCompletedJson?: string | null | undefined; tasksCreatedJson?: string | null | undefined; handoffJson?: string | null | undefined; endedAt?: string | null | undefined; previousSessionId?: string | null | undefined; nextSessionId?: string | null | undefined; agentIdentifier?: string | null | undefined; handoffConsumedAt?: string | null | undefined; handoffConsumedBy?: string | null | undefined; debriefJson?: string | null | undefined; providerId?: string | null | undefined; statsJson?: string | null | undefined; resumeCount?: number | null | undefined; gradeMode?: number | null | undefined; }

TaskDependencyRow

{ taskId: string; dependsOn: string; }

TaskRelationRow

{ taskId: string; relatedTo: string; relationType: "related" | "blocks" | "duplicates" | "absorbs" | "fixes" | "extends" | "supersedes"; reason: string | null; }

WorkHistoryRow

{ id: number; sessionId: string; taskId: string; setAt: string; clearedAt: string | null; }

LifecyclePipelineRow

{ id: string; status: "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted"; taskId: string; startedAt: string; version: number; updatedAt: string | null; completedAt: string | null; currentStageId: string | null; }

NewLifecyclePipelineRow

{ id: string; taskId: string; status?: "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | undefined; startedAt?: string | undefined; version?: number | undefined; updatedAt?: string | null | undefined; completedAt?: string | null | undefined; currentStageId?: string | null | undefined; }

LifecycleStageRow

{ id: string; status: "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"; startedAt: string | null; metadataJson: string | null; notesJson: string | null; completedAt: string | null; createdBy: string | null; pipelineId: string; stageName: "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution"; sequence: number; blockedAt: string | null; blockReason: string | null; skippedAt: string | null; skipReason: string | null; outputFile: string | null; validatedBy: string | null; validatedAt: string | null; validationStatus: "pending" | "in_review" | "approved" | "rejected" | "needs_revision" | null; provenanceChainJson: string | null; }

NewLifecycleStageRow

{ id: string; pipelineId: string; stageName: "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution"; sequence: number; status?: "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | undefined; startedAt?: string | null | undefined; metadataJson?: string | null | undefined; notesJson?: string | null | undefined; completedAt?: string | null | undefined; createdBy?: string | null | undefined; blockedAt?: string | null | undefined; blockReason?: string | null | undefined; skippedAt?: string | null | undefined; skipReason?: string | null | undefined; outputFile?: string | null | undefined; validatedBy?: string | null | undefined; validatedAt?: string | null | undefined; validationStatus?: "pending" | "in_review" | "approved" | "rejected" | "needs_revision" | null | undefined; provenanceChainJson?: string | null | undefined; }

LifecycleGateResultRow

{ id: string; reason: string | null; stageId: string; gateName: string; result: "warn" | "pass" | "fail"; checkedAt: string; checkedBy: string; details: string | null; }

NewLifecycleGateResultRow

{ id: string; stageId: string; gateName: string; result: "warn" | "pass" | "fail"; checkedBy: string; reason?: string | null | undefined; checkedAt?: string | undefined; details?: string | null | undefined; }

LifecycleEvidenceRow

{ id: string; description: string | null; type: "file" | "url" | "manifest"; stageId: string; uri: string; recordedAt: string; recordedBy: string | null; }

NewLifecycleEvidenceRow

{ id: string; type: "file" | "url" | "manifest"; stageId: string; uri: string; description?: string | null | undefined; recordedAt?: string | undefined; recordedBy?: string | null | undefined; }

LifecycleTransitionRow

{ id: string; createdAt: string; pipelineId: string; fromStageId: string; toStageId: string; transitionType: "automatic" | "manual" | "forced"; transitionedBy: string | null; }

NewLifecycleTransitionRow

{ id: string; pipelineId: string; fromStageId: string; toStageId: string; createdAt?: string | undefined; transitionType?: "automatic" | "manual" | "forced" | undefined; transitionedBy?: string | null | undefined; }

AuditLogRow

{ domain: string | null; timestamp: string; id: string; sessionId: string | null; taskId: string; action: string; actor: string; detailsJson: string | null; beforeJson: string | null; afterJson: string | null; operation: string | null; requestId: string | null; durationMs: number | null; success: number | null; source: string | null; gateway: string | null; errorMessage: string | null; projectHash: string | null; }

NewAuditLogRow

{ id: string; taskId: string; action: string; domain?: string | null | undefined; timestamp?: string | undefined; sessionId?: string | null | undefined; actor?: string | undefined; detailsJson?: string | null | undefined; beforeJson?: string | null | undefined; afterJson?: string | null | undefined; operation?: string | null | undefined; requestId?: string | null | undefined; durationMs?: number | null | undefined; success?: number | null | undefined; source?: string | null | undefined; gateway?: string | null | undefined; errorMessage?: string | null | undefined; projectHash?: string | null | undefined; }

TokenUsageRow

{ domain: string | null; provider: string; id: string; sessionId: string | null; taskId: string | null; metadataJson: string; createdAt: string; operation: string | null; requestId: string | null; gateway: string | null; model: string | null; transport: "cli" | "api" | "agent" | "unknown"; inputChars: number; outputChars: number; inputTokens: number; outputTokens: number; totalTokens: number; method: "otel" | "provider_api" | "tokenizer" | "heuristic"; confidence: "high" | "real" | "estimated" | "coarse"; requestHash: string | null; responseHash: string | null; }

NewTokenUsageRow

{ id: string; domain?: string | null | undefined; provider?: string | undefined; sessionId?: string | null | undefined; taskId?: string | null | undefined; metadataJson?: string | undefined; createdAt?: string | undefined; operation?: string | null | undefined; requestId?: string | null | undefined; gateway?: string | null | undefined; model?: string | null | undefined; transport?: "cli" | "api" | "agent" | "unknown" | undefined; inputChars?: number | undefined; outputChars?: number | undefined; inputTokens?: number | undefined; outputTokens?: number | undefined; totalTokens?: number | undefined; method?: "otel" | "provider_api" | "tokenizer" | "heuristic" | undefined; confidence?: "high" | "real" | "estimated" | "coarse" | undefined; requestHash?: string | null | undefined; responseHash?: string | null | undefined; }

ArchitectureDecisionRow

{ date: string; id: string; status: "deprecated" | "proposed" | "accepted" | "superseded"; createdAt: string; updatedAt: string | null; title: string; content: string; supersedesId: string | null; supersededById: string | null; consensusManifestId: string | null; acceptedAt: string | null; gate: "HITL" | "automated" | null; gateStatus: "failed" | "pending" | "passed" | "waived" | null; amendsId: string | null; filePath: string; summary: string | null; keywords: string | null; topics: string | null; }

NewArchitectureDecisionRow

{ id: string; title: string; content: string; date?: string | undefined; status?: "deprecated" | "proposed" | "accepted" | "superseded" | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; supersedesId?: string | null | undefined; supersededById?: string | null | undefined; consensusManifestId?: string | null | undefined; acceptedAt?: string | null | undefined; gate?: "HITL" | "automated" | null | undefined; gateStatus?: "failed" | "pending" | "passed" | "waived" | null | undefined; amendsId?: string | null | undefined; filePath?: string | undefined; summary?: string | null | undefined; keywords?: string | null | undefined; topics?: string | null | undefined; }

AdrTaskLinkRow

{ taskId: string; adrId: string; linkType: "related" | "governed_by" | "implements"; }

NewAdrTaskLinkRow

{ taskId: string; adrId: string; linkType?: "related" | "governed_by" | "implements" | undefined; }

AdrRelationRow

{ relationType: "related" | "supersedes" | "amends"; fromAdrId: string; toAdrId: string; }

NewAdrRelationRow

{ relationType: "related" | "supersedes" | "amends"; fromAdrId: string; toAdrId: string; }

ManifestEntryRow

{ date: string; id: string; agentType: string | null; status: "completed" | "blocked" | "archived" | "partial"; createdAt: string; title: string; createdBy: string | null; pipelineId: string | null; outputFile: string | null; stageId: string | null; topicsJson: string | null; findingsJson: string | null; linkedTasksJson: string | null; }

NewManifestEntryRow

{ date: string; id: string; status: "completed" | "blocked" | "archived" | "partial"; title: string; agentType?: string | null | undefined; createdAt?: string | undefined; createdBy?: string | null | undefined; pipelineId?: string | null | undefined; outputFile?: string | null | undefined; stageId?: string | null | undefined; topicsJson?: string | null | undefined; findingsJson?: string | null | undefined; linkedTasksJson?: string | null | undefined; }

PipelineManifestRow

{ id: string; status: string; sessionId: string | null; taskId: string | null; metadataJson: string | null; createdAt: string; epicId: string | null; type: string; archivedAt: string | null; content: string; contentHash: string | null; distilled: boolean; brainObsId: string | null; sourceFile: string | null; }

NewPipelineManifestRow

{ id: string; createdAt: string; type: string; content: string; status?: string | undefined; sessionId?: string | null | undefined; taskId?: string | null | undefined; metadataJson?: string | null | undefined; epicId?: string | null | undefined; archivedAt?: string | null | undefined; contentHash?: string | null | undefined; distilled?: boolean | undefined; brainObsId?: string | null | undefined; sourceFile?: string | null | undefined; }

ReleaseManifestRow

{ id: string; status: string; version: string; createdAt: string; epicId: string | null; pipelineId: string | null; tasksJson: string; changelog: string | null; notes: string | null; previousVersion: string | null; commitSha: string | null; gitTag: string | null; npmDistTag: string | null; preparedAt: string | null; committedAt: string | null; taggedAt: string | null; pushedAt: string | null; }

NewReleaseManifestRow

{ id: string; version: string; createdAt: string; status?: string | undefined; epicId?: string | null | undefined; pipelineId?: string | null | undefined; tasksJson?: string | undefined; changelog?: string | null | undefined; notes?: string | null | undefined; previousVersion?: string | null | undefined; commitSha?: string | null | undefined; gitTag?: string | null | undefined; npmDistTag?: string | null | undefined; preparedAt?: string | null | undefined; committedAt?: string | null | undefined; taggedAt?: string | null | undefined; pushedAt?: string | null | undefined; }

ExternalTaskLinkRow

{ id: string; taskId: string; metadataJson: string | null; providerId: string; linkType: "created" | "manual" | "matched" | "transferred"; externalId: string; externalUrl: string | null; externalTitle: string | null; syncDirection: "inbound" | "outbound" | "bidirectional"; linkedAt: string; lastSyncAt: string | null; }

NewExternalTaskLinkRow

{ id: string; taskId: string; providerId: string; linkType: "created" | "manual" | "matched" | "transferred"; externalId: string; metadataJson?: string | null | undefined; externalUrl?: string | null | undefined; externalTitle?: string | null | undefined; syncDirection?: "inbound" | "outbound" | "bidirectional" | undefined; linkedAt?: string | undefined; lastSyncAt?: string | null | undefined; }

BrainDecisionRow

{ id: string; createdAt: string; updatedAt: string | null; type: "architecture" | "technical" | "process" | "strategic" | "tactical"; confidence: "high" | "medium" | "low"; decision: string; rationale: string; outcome: "pending" | "success" | "failure" | "mixed" | null; alternativesJson: string | null; contextEpicId: string | null; contextTaskId: string | null; contextPhase: string | null; }

NewBrainDecisionRow

{ id: string; type: "architecture" | "technical" | "process" | "strategic" | "tactical"; confidence: "high" | "medium" | "low"; decision: string; rationale: string; createdAt?: string | undefined; updatedAt?: string | null | undefined; outcome?: "pending" | "success" | "failure" | "mixed" | null | undefined; alternativesJson?: string | null | undefined; contextEpicId?: string | null | undefined; contextTaskId?: string | null | undefined; contextPhase?: string | null | undefined; }

BrainPatternRow

{ context: string; id: string; updatedAt: string | null; type: "workflow" | "success" | "failure" | "blocker" | "optimization"; pattern: string; frequency: number; successRate: number | null; impact: "high" | "medium" | "low" | null; antiPattern: string | null; mitigation: string | null; examplesJson: string | null; extractedAt: string; }

NewBrainPatternRow

{ context: string; id: string; type: "workflow" | "success" | "failure" | "blocker" | "optimization"; pattern: string; updatedAt?: string | null | undefined; frequency?: number | undefined; successRate?: number | null | undefined; impact?: "high" | "medium" | "low" | null | undefined; antiPattern?: string | null | undefined; mitigation?: string | null | undefined; examplesJson?: string | null | undefined; extractedAt?: string | undefined; }

BrainLearningRow

{ actionable: boolean; id: string; createdAt: string; updatedAt: string | null; source: string; confidence: number; insight: string; application: string | null; applicableTypesJson: string | null; }

NewBrainLearningRow

{ id: string; source: string; confidence: number; insight: string; actionable?: boolean | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; application?: string | null | undefined; applicableTypesJson?: string | null | undefined; }

BrainObservationRow

{ project: string | null; id: string; createdAt: string; updatedAt: string | null; title: string; type: "discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor"; contentHash: string | null; subtitle: string | null; narrative: string | null; factsJson: string | null; conceptsJson: string | null; filesReadJson: string | null; filesModifiedJson: string | null; sourceSessionId: string | null; sourceType: "agent" | "manual" | "session-debrief" | "claude-mem"; discoveryTokens: number | null; }

NewBrainObservationRow

{ id: string; title: string; type: "discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor"; project?: string | null | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; contentHash?: string | null | undefined; subtitle?: string | null | undefined; narrative?: string | null | undefined; factsJson?: string | null | undefined; conceptsJson?: string | null | undefined; filesReadJson?: string | null | undefined; filesModifiedJson?: string | null | undefined; sourceSessionId?: string | null | undefined; sourceType?: "agent" | "manual" | "session-debrief" | "claude-mem" | undefined; discoveryTokens?: number | null | undefined; }

BrainMemoryLinkRow

{ taskId: string; createdAt: string; linkType: "produced_by" | "applies_to" | "informed_by" | "contradicts"; memoryType: "decision" | "pattern" | "learning" | "observation"; memoryId: string; }

NewBrainMemoryLinkRow

{ taskId: string; linkType: "produced_by" | "applies_to" | "informed_by" | "contradicts"; memoryType: "decision" | "pattern" | "learning" | "observation"; memoryId: string; createdAt?: string | undefined; }

BrainPageNodeRow

{ id: string; metadataJson: string | null; createdAt: string; nodeType: "task" | "file" | "doc" | "concept"; label: string; }

NewBrainPageNodeRow

{ id: string; nodeType: "task" | "file" | "doc" | "concept"; label: string; metadataJson?: string | null | undefined; createdAt?: string | undefined; }

BrainPageEdgeRow

{ createdAt: string; fromId: string; toId: string; edgeType: "depends_on" | "implements" | "relates_to" | "documents"; weight: number | null; }

NewBrainPageEdgeRow

{ fromId: string; toId: string; edgeType: "depends_on" | "implements" | "relates_to" | "documents"; createdAt?: string | undefined; weight?: number | null | undefined; }

BrainStickyNoteRow

{ id: string; status: "active" | "archived" | "converted"; createdAt: string; updatedAt: string | null; priority: "high" | "medium" | "low" | null; content: string; sourceType: string | null; tagsJson: string | null; convertedToJson: string | null; color: "yellow" | "blue" | "green" | "red" | "purple" | null; }

NewBrainStickyNoteRow

{ id: string; content: string; status?: "active" | "archived" | "converted" | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; priority?: "high" | "medium" | "low" | null | undefined; sourceType?: string | null | undefined; tagsJson?: string | null | undefined; convertedToJson?: string | null | undefined; color?: "yellow" | "blue" | "green" | "red" | "purple" | null | undefined; }

ProjectRegistryRow

{ name: string; permissions: string; labelsJson: string; projectHash: string; projectId: string; projectPath: string; registeredAt: string; lastSeen: string; healthStatus: string; healthLastCheck: string | null; lastSync: string; taskCount: number; }

NewProjectRegistryRow

{ name: string; projectHash: string; projectId: string; projectPath: string; permissions?: string | undefined; labelsJson?: string | undefined; registeredAt?: string | undefined; lastSeen?: string | undefined; healthStatus?: string | undefined; healthLastCheck?: string | null | undefined; lastSync?: string | undefined; taskCount?: number | undefined; }

NexusAuditLogRow

{ domain: string | null; timestamp: string; id: string; sessionId: string | null; action: string; detailsJson: string | null; operation: string | null; requestId: string | null; durationMs: number | null; success: number | null; source: string | null; gateway: string | null; errorMessage: string | null; projectHash: string | null; projectId: string | null; }

NewNexusAuditLogRow

{ id: string; action: string; domain?: string | null | undefined; timestamp?: string | undefined; sessionId?: string | null | undefined; detailsJson?: string | null | undefined; operation?: string | null | undefined; requestId?: string | null | undefined; durationMs?: number | null | undefined; success?: number | null | undefined; source?: string | null | undefined; gateway?: string | null | undefined; errorMessage?: string | null | undefined; projectHash?: string | null | undefined; projectId?: string | null | undefined; }

NexusSchemaMetaRow

{ key: string; value: string; }

NewNexusSchemaMetaRow

{ key: string; value: string; }

ErrorDefinition

A single entry in the unified error catalog.
PropertyTypeRequiredDescription
codenumberYesNumeric exit code from ExitCode enum.
namestringYesMachine-readable name (matches ExitCode enum key).
categoryLAFSErrorCategoryYesLAFS error category for protocol conformance.
messagestringYesDefault human-readable message.
fixstring | undefinedNoDefault fix suggestion (copy-paste command or instruction).
httpStatusnumberYesHTTP status code for API responses.
recoverablebooleanYesWhether retry may succeed.
lafsCodestringYesLAFS-style string error code (E_CLEO_*).

ProblemDetails

RFC 9457 Problem Details object. Structured error representation for API responses. T5240
PropertyTypeRequiredDescription
typestringYestype
titlestringYestitle
statusnumberYesstatus
detailstringYesdetail
instancestring | undefinedNoinstance
extensionsRecord<string, unknown> | undefinedNoextensions

ArchiveFields

Archive-specific fields for task upsert.
PropertyTypeRequiredDescription
archivedAtstring | undefinedNoarchivedAt
archiveReasonstring | undefinedNoarchiveReason
cycleTimeDaysnumber | null | undefinedNocycleTimeDays

RegisterAgentOptions

Options for registering a new agent instance.
PropertyTypeRequiredDescription
agentType"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"YesagentType
sessionIdstring | undefinedNosessionId
taskIdstring | undefinedNotaskId
parentAgentIdstring | undefinedNoparentAgentId
metadataRecord<string, unknown> | undefinedNometadata

UpdateStatusOptions

Options for updating agent status.
PropertyTypeRequiredDescription
status"error" | "active" | "starting" | "idle" | "crashed" | "stopped"Yesstatus
errorstring | undefinedNoerror
taskIdstring | undefinedNotaskId

ListAgentFilters

Filters for listing agent instances.
PropertyTypeRequiredDescription
status"error" | "active" | "starting" | "idle" | "crashed" | "stopped" | ("error" | "active" | "starting" | "idle" | "crashed" | "stopped")[] | undefinedNostatus
agentType"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | ("orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor")[] | undefinedNoagentType
sessionIdstring | undefinedNosessionId
parentAgentIdstring | undefinedNoparentAgentId

AgentHealthReport

Agent health report summary.
PropertyTypeRequiredDescription
totalnumberYestotal
activenumberYesactive
idlenumberYesidle
startingnumberYesstarting
errornumberYeserror
crashednumberYescrashed
stoppednumberYesstopped
totalErrorsnumberYestotalErrors
staleAgents{ id: string; agentType: "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"; status: "error" | "active" | "starting" | "idle" | "crashed" | "stopped"; sessionId: string | null; taskId: string | null; startedAt: string; lastHeartbeat: string; stoppedAt: string | null; errorCount: number; totalTasksCompleted: number; capacity: string; metadataJson: string | null; parentAgentId: string | null; }[]YesstaleAgents

AtomicMigrationResult

Atomic database migration result.
PropertyTypeRequiredDescription
successbooleanYessuccess
tempPathstringYestempPath
backupPathstring | undefinedNobackupPath
errorstring | undefinedNoerror

ReleaseFn

A release function returned by acquireLock.
ReleaseFn

ProviderHookEvent

CAAMP canonical hook event type. This is the normalized 16-event taxonomy from CAAMP 1.9.1.
"ConfigChange" | "Notification" | "PermissionRequest" | "PostCompact" | "PostModel" | "PostToolUse" | "PostToolUseFailure" | "PreCompact" | "PreModel" | "PreToolUse" | "PromptSubmit" | "ResponseComplete" | "SessionEnd" | "SessionStart" | "SubagentStart" | "SubagentStop" | "ApprovalExpired" | "ApprovalGranted" | "ApprovalRequested" | "MemoryDecisionStored" | "MemoryLearningStored" | "MemoryObserved" | "MemoryPatternStored" | "PipelineManifestAppended" | "PipelineStageCompleted" | "SessionEnded" | "SessionStarted" | "TaskBlocked" | "TaskCompleted" | "TaskCreated" | "TaskStarted"

InternalHookEvent

"onWorkAvailable" | "onAgentSpawn" | "onAgentComplete" | "onCascadeStart" | "onPatrol"

HookEvent

Full CLEO hook event union. CAAMP defines provider-facing canonical events; CLEO extends the registry with local coordination events for autonomous execution.
HookEvent

HookPayload

Base interface for all hook payloads Provides common fields available across all hook events
PropertyTypeRequiredDescription
timestampstringYesISO 8601 timestamp when the hook fired
sessionIdstring | undefinedNoOptional session ID if firing within a session context
taskIdstring | undefinedNoOptional task ID if firing within a task context
providerIdstring | undefinedNoOptional provider ID that triggered the hook
metadataRecord<string, unknown> | undefinedNoOptional metadata for extensibility

SessionStartPayload

Payload for SessionStart hook (canonical: was onSessionStart) Fired when a CLEO session begins
PropertyTypeRequiredDescription
sessionIdstringYesSession identifier (required for session events)
namestringYesHuman-readable session name
scopestringYesSession scope/area of work
agentstring | undefinedNoOptional agent identifier

OnSessionStartPayload

Deprecated: Use SessionStartPayload instead. Kept for backward compatibility.
SessionStartPayload

SessionEndPayload

Payload for SessionEnd hook (canonical: was onSessionEnd) Fired when a CLEO session ends
PropertyTypeRequiredDescription
sessionIdstringYesSession identifier
durationnumberYesSession duration in seconds
tasksCompletedstring[]YesArray of task IDs completed during this session

OnSessionEndPayload

Deprecated: Use SessionEndPayload instead. Kept for backward compatibility.
SessionEndPayload

PreToolUsePayload

Payload for PreToolUse hook (canonical: was onToolStart) Fired when a task/tool operation begins
PropertyTypeRequiredDescription
taskIdstringYesTask identifier
taskTitlestringYesHuman-readable task title
previousTaskstring | undefinedNoOptional ID of the previous task if sequential
toolNamestring | undefinedNoOptional tool name being invoked
toolInputRecord<string, unknown> | undefinedNoOptional structured input to the tool

OnToolStartPayload

Deprecated: Use PreToolUsePayload instead. Kept for backward compatibility.
PreToolUsePayload

PostToolUsePayload

Payload for PostToolUse hook (canonical: was onToolComplete) Fired when a task/tool operation completes
PropertyTypeRequiredDescription
taskIdstringYesTask identifier
taskTitlestringYesHuman-readable task title
status"cancelled" | "done" | "archived"YesFinal status of the completed task
toolResultRecord<string, unknown> | undefinedNoOptional structured result from the tool

OnToolCompletePayload

Deprecated: Use PostToolUsePayload instead. Kept for backward compatibility.
PostToolUsePayload

HookHandler

Handler function type for hook events Handlers receive project root and typed payload
HookHandler<T>

HookRegistration

Hook registration metadata Tracks registered handlers with priority and event binding
PropertyTypeRequiredDescription
idstringYesUnique identifier for this registration
eventHookEventYesCAAMP hook event this handler listens for
handlerHookHandler<T>YesHandler function to execute when event fires
prioritynumberYesPriority for execution order (higher = earlier)

HookConfig

Configuration for the hook system Controls which events are enabled/disabled
PropertyTypeRequiredDescription
enabledbooleanYesMaster switch for hook system
eventsRecord<HookEvent, boolean>YesPer-event enable/disable configuration

NotificationPayload

Payload for Notification hook (canonical: was onFileChange) Fired when a tracked file is written, created, or deleted, or for general-purpose notifications.
PropertyTypeRequiredDescription
filePathstring | undefinedNoAbsolute or project-relative path of the changed file
changeType"write" | "create" | "delete" | undefinedNoKind of filesystem change (for file-change notifications)
sizeBytesnumber | undefinedNoFile size in bytes after the change (absent for deletes)
messagestring | undefinedNoOptional notification message for non-file notifications

OnFileChangePayload

Deprecated: Use NotificationPayload instead. Kept for backward compatibility.
OnFileChangePayload

PostToolUseFailurePayload

Payload for PostToolUseFailure hook (canonical: was onError) Fired when an operation fails with a structured error
PropertyTypeRequiredDescription
errorCodestring | numberYesNumeric exit code or string error code
messagestringYesHuman-readable error message
domainstring | undefinedNoDomain where the error occurred
operationstring | undefinedNoOperation that failed
gatewaystring | undefinedNoGateway (query / mutate) that received the error
stackstring | undefinedNoOptional stack trace

OnErrorPayload

Deprecated: Use PostToolUseFailurePayload instead. Kept for backward compatibility.
PostToolUseFailurePayload

PromptSubmitPayload

Payload for PromptSubmit hook (canonical: was onPromptSubmit) Fired when an agent submits a prompt through a gateway
PropertyTypeRequiredDescription
gatewaystringYesGateway that received the prompt (query / mutate)
domainstringYesTarget domain
operationstringYesTarget operation
sourcestring | undefinedNoOptional source identifier (e.g. agent name)

OnPromptSubmitPayload

Deprecated: Use PromptSubmitPayload instead. Kept for backward compatibility.
PromptSubmitPayload

ResponseCompletePayload

Payload for ResponseComplete hook (canonical: was onResponseComplete) Fired when a gateway operation finishes (success or failure)
PropertyTypeRequiredDescription
gatewaystringYesGateway that handled the operation
domainstringYesTarget domain
operationstringYesTarget operation
successbooleanYesWhether the operation succeeded
durationMsnumber | undefinedNoWall-clock duration in milliseconds
errorCodestring | undefinedNoError code if the operation failed

OnResponseCompletePayload

Deprecated: Use ResponseCompletePayload instead. Kept for backward compatibility.
ResponseCompletePayload

SubagentStartPayload

Payload for SubagentStart hook Fired when a subagent process is launched
PropertyTypeRequiredDescription
agentIdstringYesSubagent or worker identifier
rolestring | undefinedNoSubagent role or archetype
taskIdstring | undefinedNoTask assigned to the subagent

SubagentStopPayload

Payload for SubagentStop hook Fired when a subagent process completes
PropertyTypeRequiredDescription
agentIdstringYesSubagent or worker identifier
status"failed" | "blocked" | "partial" | "complete" | undefinedNoCompletion status
taskIdstring | undefinedNoTask that was completed
summarystring | undefinedNoOptional summary reference

PreCompactPayload

Payload for PreCompact hook Fired before context compaction begins
PropertyTypeRequiredDescription
tokensBeforenumber | undefinedNoEstimated token count before compaction
reasonstring | undefinedNoReason for compaction

PostCompactPayload

Payload for PostCompact hook Fired after context compaction completes
PropertyTypeRequiredDescription
tokensBeforenumber | undefinedNoToken count before compaction
tokensAfternumber | undefinedNoToken count after compaction
successbooleanYesWhether compaction succeeded

ConfigChangePayload

Payload for ConfigChange hook Fired when configuration is updated
PropertyTypeRequiredDescription
keystringYesConfiguration key that changed
previousValueunknownYesPrevious value
newValueunknownYesNew value

OnWorkAvailablePayload

Payload for onWorkAvailable hook Fired when the system detects ready work on a Loom/Tapestry
PropertyTypeRequiredDescription
taskIdsstring[]YesIDs of tasks now ready for execution
epicIdstring | undefinedNoOptional epic / Loom identifier
chainIdstring | undefinedNoOptional chain or tessera instance identifier
reason"manual" | "dependency-cleared" | "new-task" | "retry" | "patrol" | undefinedNoWhy the work became available

OnAgentSpawnPayload

Payload for onAgentSpawn hook Fired when a worker session/process is launched
PropertyTypeRequiredDescription
agentIdstringYesWorker or session identifier
rolestringYesWorker role / archetype name
adapterIdstring | undefinedNoProvider or adapter used to launch the worker
taskIdstring | undefinedNoOptional task assignment at spawn time

OnAgentCompletePayload

Payload for onAgentComplete hook Fired when a worker finishes its assigned run
PropertyTypeRequiredDescription
agentIdstringYesWorker or session identifier
rolestringYesWorker role / archetype name
status"failed" | "blocked" | "partial" | "complete"YesCompletion status for the run
taskIdstring | undefinedNoOptional task assignment that was completed
summarystring | undefinedNoOptional summary or manifest reference

OnCascadeStartPayload

Payload for onCascadeStart hook Fired when autonomous execution begins flowing through a chain or wave
PropertyTypeRequiredDescription
cascadeIdstringYesIdentifier for the cascade / execution wave
chainIdstring | undefinedNoOptional chain identifier
tesseraIdstring | undefinedNoOptional tessera template / instance identifier
taskIdsstring[] | undefinedNoTask IDs participating in the cascade

OnPatrolPayload

Payload for onPatrol hook Fired when a watcher performs a periodic health/sweep cycle
PropertyTypeRequiredDescription
watcherIdstringYesWatcher / patrol identifier
patrolType"custom" | "health" | "sweep" | "refinery" | "watcher"YesPatrol category
scopestring | undefinedNoOptional scope being patrolled

CLEOLifecycleEvent

Type for CLEO lifecycle event names These are the internal events CLEO fires that get mapped to CAAMP events
"session.start" | "session.end" | "task.start" | "task.complete" | "file.change" | "system.error" | "prompt.submit" | "response.complete"

CLEOAutonomousLifecycleEvent

Type for autonomous CLEO lifecycle events.
"agent.work.available" | "agent.spawn" | "agent.complete" | "cascade.start" | "watcher.patrol"

SaveJsonOptions

Options for saveJson.
PropertyTypeRequiredDescription
backupDirstring | undefinedNoDirectory for backups. If omitted, no backup is created.
maxBackupsnumber | undefinedNoMaximum number of backups to retain. Default: 5.
indentnumber | undefinedNoJSON indentation. Default: 2.
validate((data: unknown) => void | Promise<void>) | undefinedNoValidation function. Called before write; throw to abort.

CheckpointConfig

Checkpoint configuration.
PropertyTypeRequiredDescription
enabledbooleanYesenabled
debounceMinutesnumberYesdebounceMinutes
messagePrefixstringYesmessagePrefix
noVerifybooleanYesnoVerify

CheckpointStatus

Checkpoint status information.
PropertyTypeRequiredDescription
configCheckpointConfigYesconfig
status{ isGitRepo: boolean; lastCheckpoint: string; lastCheckpointEpoch: number; pendingChanges: number; suppressed: boolean; }Yesstatus

ChangedFile

Changed file with its status.
PropertyTypeRequiredDescription
pathstringYespath
status"modified" | "untracked"Yesstatus

SafetyOptions

Safety configuration - can be overridden per-operation
PropertyTypeRequiredDescription
verifybooleanYesVerify data was written (default: true)
checkpointbooleanYesCreate git checkpoint (default: true)
validateSequencebooleanYesValidate sequence (default: true)
strictbooleanYesStrict mode - throw on any issue (default: true)

RepairResult

Repair result with proper typing.
PropertyTypeRequiredDescription
repairedbooleanYesrepaired
messagestringYesmessage
counternumberYescounter
oldCounternumber | undefinedNooldCounter
newCounternumber | undefinedNonewCounter

SafetyConfig

Safety configuration options.
PropertyTypeRequiredDescription
verifyWritesbooleanYesEnable write verification (default: true)
detectCollisionsbooleanYesEnable collision detection (default: true)
validateSequencebooleanYesEnable sequence validation (default: true)
autoCheckpointbooleanYesEnable auto-checkpoint (default: true)
strictModebooleanYesThrow on safety violations (default: true)

NextDirectives

Map of follow-up operation names to CLI command strings.
NextDirectives

TaskDetail

Enriched task with hierarchy info.
PropertyTypeRequiredDescription
childrenstring[] | undefinedNochildren
dependencyStatusTaskRef[] | undefinedNodependencyStatus
unresolvedDepsTaskRef[] | undefinedNounresolvedDeps
dependentsstring[] | undefinedNodependents
hierarchyPathstring[] | undefinedNohierarchyPath
isArchivedboolean | undefinedNoisArchived
_nextNextDirectives | undefinedNoProgressive disclosure directives for follow-up operations.

PaginateInput

Input parameters for paginating a result set. T4668 T4663
PropertyTypeRequiredDescription
totalnumberYesTotal number of items before pagination.
limitnumber | undefinedNoNumber of items to return per page.
offsetnumber | undefinedNoNumber of items to skip.

CompactTask

Compact task representation — minimal fields for list responses.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
prioritystringYespriority
typestring | undefinedNotype
parentIdstring | null | undefinedNoparentId
_nextNextDirectives | undefinedNoProgressive disclosure directives for follow-up operations.

ListTasksOptions

Filter options for listing tasks.
PropertyTypeRequiredDescription
status"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNostatus
priorityTaskPriority | undefinedNopriority
typeTaskType | undefinedNotype
parentIdstring | undefinedNoparentId
phasestring | undefinedNophase
labelstring | undefinedNolabel
childrenboolean | undefinedNochildren
limitnumber | undefinedNolimit
offsetnumber | undefinedNooffset

ListTasksResult

Result of listing tasks.
PropertyTypeRequiredDescription
tasksTask[]Yestasks
totalnumberYestotal
filterednumberYesfiltered
pageLAFSPageYespage
pagination{ limit: number; offset: number; hasMore: boolean; } | undefinedNopagination

FindResult

Minimal task info for search results.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
prioritystringYespriority
typestring | undefinedNotype
parentIdstring | null | undefinedNoparentId
scorenumberYesscore
_nextNextDirectives | undefinedNoProgressive disclosure directives for follow-up operations.

FindTasksOptions

Options for finding tasks.
PropertyTypeRequiredDescription
querystring | undefinedNoquery
idstring | undefinedNoid
exactboolean | undefinedNoexact
status"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNostatus
fieldstring | undefinedNofield
includeArchiveboolean | undefinedNoincludeArchive
limitnumber | undefinedNolimit
offsetnumber | undefinedNooffset

FindTasksResult

Result of finding tasks.
PropertyTypeRequiredDescription
resultsFindResult[]Yesresults
totalnumberYestotal
querystringYesquery
searchType"id" | "fuzzy" | "exact"YessearchType

AdrFrontmatter

Parsed ADR frontmatter from .md file
PropertyTypeRequiredDescription
DatestringYesDate
Status"deprecated" | "proposed" | "accepted" | "superseded"YesStatus
Acceptedstring | undefinedNoAccepted
Supersedesstring | undefinedNoSupersedes
'Superseded By'string | undefinedNo’Superseded By’
Amendsstring | undefinedNoAmends
'Amended By'string | undefinedNo’Amended By’
'Related ADRs'string | undefinedNo’Related ADRs’
'Related Tasks'string | undefinedNo’Related Tasks’
Gate"HITL" | "automated" | undefinedNoGate
'Gate Status'"pending" | "passed" | "waived" | undefinedNo’Gate Status’
Summarystring | undefinedNoSummary
Keywordsstring | undefinedNoKeywords
Topicsstring | undefinedNoTopics

AdrRecord

PropertyTypeRequiredDescription
idstringYesid
filestringYesfile
titlestringYestitle
frontmatterAdrFrontmatterYesfrontmatter

AdrSyncResult

PropertyTypeRequiredDescription
insertednumberYesinserted
updatednumberYesupdated
skippednumberYesskipped
errors{ file: string; error: string; }[]Yeserrors

AdrListResult

PropertyTypeRequiredDescription
adrs{ id: string; title: string; status: string; date: string; filePath: string; }[]Yesadrs
totalnumberYestotal
filterednumberYesfiltered

AdrFindResult

PropertyTypeRequiredDescription
adrs{ id: string; title: string; status: string; date: string; filePath: string; summary?: string; keywords?: string; topics?: string; score: number; matchedFields: string[]; }[]Noadrs
querystringYesquery
totalnumberYestotal

PipelineAdrLinkResult

PropertyTypeRequiredDescription
linked{ adrId: string; taskId: string; }[]Yeslinked
syncednumberYessynced
skippednumberYesskipped
errors{ file: string; error: string; }[]Yeserrors

EvidenceType

EvidenceType

EvidenceRecord

PropertyTypeRequiredDescription
idstringYesid
stageIdstringYesstageId
uristringYesuri
typeEvidenceTypeYestype
recordedAtstringYesrecordedAt
recordedBystring | undefinedNorecordedBy
descriptionstring | undefinedNodescription
Related link in frontmatter.
PropertyTypeRequiredDescription
type"task" | "research" | "consensus" | "contribution" | "file" | "adr" | "spec"Yestype
pathstring | undefinedNopath
idstring | undefinedNoid

FrontmatterMetadata

Frontmatter metadata for an RCASD artifact.
PropertyTypeRequiredDescription
epicstringYesepic
stagestringYesstage
taskstring | undefinedNotask
relatedRelatedLink[] | undefinedNorelated
createdstring | undefinedNocreated
updatedstring | undefinedNoupdated

ParsedFrontmatter

Result of parsing frontmatter from a markdown file.
PropertyTypeRequiredDescription
frontmatterFrontmatterMetadata | nullYesfrontmatter
bodystringYesbody
rawstringYesraw

Stage

Stage type derived from canonical stage list. T4800
"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"

StageCategory

Stage category for grouping related stages. T4800
StageCategory

StageDefinition

Stage metadata with descriptive information. T4800
PropertyTypeRequiredDescription
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesStage identifier
namestringYesDisplay name for the stage
descriptionstringYesDetailed description of what happens in this stage
ordernumberYesExecution order (1-based)
categoryStageCategoryYesCategory for grouping
skippablebooleanYesWhether this stage can be skipped
defaultTimeoutHoursnumber | nullYesDefault timeout in hours (null = no timeout)
requiredGatesstring[]YesRequired gate checks before completing this stage
expectedArtifactsstring[]YesExpected artifacts produced by this stage

TransitionRule

Transition rule - defines if a transition is allowed. T4800
PropertyTypeRequiredDescription
from"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "any"Yesfrom
to"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "any"Yesto
allowedbooleanYesallowed
requiresForceboolean | undefinedNorequiresForce
reasonstring | undefinedNoreason

StageArtifactResult

PropertyTypeRequiredDescription
absolutePathstringYesabsolutePath
outputFilestringYesoutputFile
relatedRelatedLink[]Yesrelated

SkillFrontmatter

Skill frontmatter parsed from SKILL.md YAML header. This is CLEO’s extended skill metadata — a functional superset of CAAMP’s SkillMetadata. All fields from CaampSkillMetadata (name, description, version, allowedTools) are present here. CLEO adds: tags, triggers, dispatchPriority, model, invocable, command, protocol. Use this type when working with CLEO’s skill loading, dispatch, and orchestration systems. Use CaampSkillMetadata when interfacing directly with CAAMP’s discovery/install APIs.
PropertyTypeRequiredDescription
namestringYesSkill name (lowercase, hyphens). Maps to CaampSkillMetadata.name.
descriptionstringYesHuman-readable description. Maps to CaampSkillMetadata.description.
versionstring | undefinedNoSemantic version string. Maps to CaampSkillMetadata.version.
authorstring | undefinedNoSkill author (CLEO extension).
tagsstring[] | undefinedNoClassification tags for search/filter (CLEO extension).
triggersstring[] | undefinedNoTrigger patterns for auto-dispatch (CLEO extension).
dispatchPrioritynumber | undefinedNoPriority for dispatch selection (CLEO extension).
modelstring | undefinedNoPreferred LLM model (CLEO extension).
allowedToolsstring[] | undefinedNoAllowed tool names. Maps to CaampSkillMetadata.allowedTools.
invocableboolean | undefinedNoWhether the skill can be invoked directly (CLEO extension).
commandstring | undefinedNoCLI command for direct invocation (CLEO extension).
protocolSkillProtocolType | undefinedNoRCASD-IVTR+C protocol type (CLEO extension).

Skill

Skill definition loaded from disk. CLEO-specific type that wraps a SkillFrontmatter with filesystem context. For CAAMP’s equivalent, see CtSkillEntry which wraps CaampSkillMetadata with install/discovery metadata instead.
PropertyTypeRequiredDescription
namestringYesname
dirNamestringYesdirName
pathstringYespath
skillMdPathstringYesskillMdPath
frontmatterSkillFrontmatterYesfrontmatter
contentstring | undefinedNocontent

SkillSummary

Lightweight skill summary for manifest/listing. Projected from Skill for efficient caching in SkillManifest. Contains only the fields needed for CLI display and dispatch selection.
PropertyTypeRequiredDescription
namestringYesname
dirNamestringYesdirName
descriptionstringYesdescription
tagsstring[]Yestags
versionstringYesversion
invocablebooleanYesinvocable
commandstring | undefinedNocommand
protocolSkillProtocolType | undefinedNoprotocol

SkillManifest

Skill manifest (cached aggregate of all discovered skills).
PropertyTypeRequiredDescription
_meta{ generatedAt: string; ttlSeconds: number; skillCount: number; searchPaths: string[]; }Yes_meta
skillsSkillSummary[]Yesskills

SkillProtocolType

RCASD-IVTR+C protocol types.
SkillProtocolType

AgentConfig

Agent configuration from AGENT.md or agent definition.
PropertyTypeRequiredDescription
namestringYesname
descriptionstringYesdescription
modelstring | undefinedNomodel
allowedToolsstring[] | undefinedNoallowedTools
customInstructionsstring | undefinedNocustomInstructions

AgentRegistryEntry

Agent registry entry.
PropertyTypeRequiredDescription
namestringYesname
pathstringYespath
configAgentConfigYesconfig
installedAtstringYesinstalledAt

AgentRegistry

Agent registry (persisted).
PropertyTypeRequiredDescription
_meta{ version: string; lastUpdated: string; }Yes_meta
agentsAgentRegistryEntry[]Yesagents

SkillSearchScope

CAAMP search order for skill discovery.
SkillSearchScope

SkillSearchPath

Ordered search path entry.
PropertyTypeRequiredDescription
scopeSkillSearchScopeYesscope
pathstringYespath
prioritynumberYespriority

DispatchStrategy

Dispatch strategy for skill selection.
DispatchStrategy

DispatchResult

Dispatch result from skill_auto_dispatch.
PropertyTypeRequiredDescription
skillstringYesskill
strategyDispatchStrategyYesstrategy
confidencenumberYesconfidence
protocolSkillProtocolType | undefinedNoprotocol

TokenDefinition

Token definition from placeholders.json.
PropertyTypeRequiredDescription
tokenstringYestoken
descriptionstring | undefinedNodescription
requiredboolean | undefinedNorequired
defaultstring | undefinedNodefault
patternstring | undefinedNopattern

TokenValidationResult

Token validation result.
PropertyTypeRequiredDescription
validbooleanYesvalid
tokenstringYestoken
valuestring | undefinedNovalue
errorstring | undefinedNoerror

TokenContext

Token injection context.
PropertyTypeRequiredDescription
taskIdstringYestaskId
datestringYesdate
topicSlugstringYestopicSlug
epicIdstring | undefinedNoepicId
sessionIdstring | undefinedNosessionId
outputDirstring | undefinedNooutputDir
manifestPathstring | undefinedNomanifestPath

OrchestratorThresholds

Orchestrator context thresholds.
PropertyTypeRequiredDescription
warningnumberYeswarning
criticalnumberYescritical

PreSpawnCheckResult

Pre-spawn check result.
PropertyTypeRequiredDescription
canSpawnbooleanYescanSpawn
spawnStatus"warning" | "blocked" | "ok" | "stale"YesspawnStatus
recommendation"continue" | "wrap_up" | "stop" | "verify_compliance"Yesrecommendation
context{ percentage: number; currentTokens: number; maxTokens: number; warningThreshold: number; criticalThreshold: number; status: string; stale: boolean; }Yescontext
reasons{ code: string; message: string; }[]Yesreasons
taskValidation{ exists: boolean; taskId: string; status?: string; title?: string; spawnable: boolean; } | null | undefinedNotaskValidation
complianceValidationRecord<string, unknown> | null | undefinedNocomplianceValidation

SpawnPromptResult

Spawn prompt result.
PropertyTypeRequiredDescription
taskIdstringYestaskId
templatestringYestemplate
topicSlugstringYestopicSlug
datestringYesdate
outputDirstringYesoutputDir
outputFilestringYesoutputFile
promptstringYesprompt

DependencyWave

Dependency wave for parallel execution.
PropertyTypeRequiredDescription
wavenumberYeswave
tasks{ id: string; title: string; priority?: string; status: string; depends: string[]; }[]Notasks

DependencyAnalysis

Dependency analysis result.
PropertyTypeRequiredDescription
epicIdstringYesepicId
totalTasksnumberYestotalTasks
completedTasksnumberYescompletedTasks
pendingTasksnumberYespendingTasks
activeTasksnumberYesactiveTasks
wavesDependencyWave[]Yeswaves
readyToSpawn{ id: string; title: string; priority?: string; wave: number; }[]NoreadyToSpawn
blockedTasks{ id: string; title: string; depends: string[]; wave: number; }[]YesblockedTasks

HitlSummary

HITL summary for session handoff.
PropertyTypeRequiredDescription
timestampstringYestimestamp
stopReasonstringYesstopReason
session{ id: string | null; epicId: string | null; focusedTask: string | null; progressNote: string | null; }Yessession
progress{ completed: number; pending: number; active: number; blocked: number; total: number; percentComplete: number; }Yesprogress
completedTasksPick<TaskRef, "id" | "title">[]YescompletedTasks
remainingTasks(TaskRef & { priority?: string; })[]NoremainingTasks
readyToSpawnTaskRefPriority[]YesreadyToSpawn
handoff{ resumeCommand: string; nextSteps: string[]; }Yeshandoff

ManifestEntry

Research manifest entry (pipeline_manifest table, ADR-027).
PropertyTypeRequiredDescription
idstringYesid
filestringYesfile
titlestringYestitle
datestringYesdate
status"completed" | "blocked" | "archived" | "partial"Yesstatus
agent_typestring | undefinedNoagent_type
topicsstring[]Yestopics
key_findingsstring[]Yeskey_findings
actionablebooleanYesactionable
needs_followupstring[]Yesneeds_followup
linked_tasksstring[] | undefinedNolinked_tasks
auditRecord<string, unknown> | undefinedNoaudit

ManifestValidationResult

Manifest validation result.
PropertyTypeRequiredDescription
existsbooleanYesexists
passedbooleanYespassed
stats{ totalLines: number; validEntries: number; invalidEntries: number; } | undefinedNostats
issuesstring[]Yesissues

ComplianceResult

Compliance verification result.
PropertyTypeRequiredDescription
previousTaskIdstringYespreviousTaskId
researchIdstring | nullYesresearchId
checks{ manifestEntryExists: boolean; researchLinkedToTask: boolean; returnStatusValid: boolean | null; }Yeschecks
canSpawnNextbooleanYescanSpawnNext
violationsstring[]Yesviolations
warningsstring[]Yeswarnings

InstalledSkill

Installed skill tracking.
PropertyTypeRequiredDescription
namestringYesname
versionstringYesversion
installedAtstringYesinstalledAt
sourcePathstringYessourcePath
symlinkPathstringYessymlinkPath

InstalledSkillsFile

Installed skills file.
PropertyTypeRequiredDescription
_meta{ version: string; lastUpdated: string; }Yes_meta
skillsRecord<string, InstalledSkill>Yesskills

TokenValues

Token values map: TOKEN_NAME - value.
TokenValues

MultiSkillComposition

Result of multi-skill composition.
PropertyTypeRequiredDescription
skillCountnumberYesskillCount
primarySkillstringYesprimarySkill
skills{ skill: string; mode: "full" | "progressive"; estimatedTokens: number; }[]Yesskills
totalEstimatedTokensnumberYestotalEstimatedTokens
promptstringYesprompt

StageGuidance

Structured guidance for a single pipeline stage. Pi extensions consume the .prompt field directly (render via { systemPrompt } in before_agent_start). The structured fields are exposed for TUI widgets, badges, and logging.
PropertyTypeRequiredDescription
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesThe canonical stage identifier.
namestringYesHuman-readable stage name (e.g. “Research”).
ordernumberYesNumeric stage order (1-9).
primarySkillstringYesPrimary skill loaded for this stage (SSoT from STAGE_SKILL_MAP).
loadedSkillsreadonly string[]YesAll skills loaded (Tier 0 + stage primary).
requiredGatesreadonly string[]YesGates that must pass before the stage can be completed.
expectedArtifactsreadonly string[]YesArtifacts the agent is expected to produce before advancing.
promptstringYesComposed prompt text, ready for LLM system prompt injection.
source"fallback" | "skills"YesSource of the prompt: ‘skills’ (real SKILL.md files) or ‘fallback’.

EnforcementMode

Lifecycle enforcement modes.
EnforcementMode

GateData

Gate data within a stage.
PropertyTypeRequiredDescription
status"failed" | "pending" | "passed"Yesstatus
agentstring | undefinedNoagent
notesstring | undefinedNonotes
reasonstring | undefinedNoreason
timestampstring | undefinedNotimestamp

ManifestStageData

Stage data in an on-disk manifest.
PropertyTypeRequiredDescription
status"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"Yesstatus
completedAtstring | undefinedNocompletedAt
skippedAtstring | undefinedNoskippedAt
skippedReasonstring | undefinedNoskippedReason
artifactsstring[] | undefinedNoartifacts
notesstring | undefinedNonotes
gatesRecord<string, GateData> | undefinedNogates

RcasdManifest

Canonical RCASD manifest-shaped interface for compatibility payloads. Lifecycle persistence is SQLite-native; this shape is used for API responses that present stage+gate state in a manifest-like structure. Stage keys use full canonical names matching the DB CHECK constraint: research, consensus, architecture_decision, specification, decomposition, implementation, validation, testing, release. T4798
PropertyTypeRequiredDescription
epicIdstringYesepicId
titlestring | undefinedNotitle
stagesRecord<string, ManifestStageData>Yesstages

GateCheckResult

Gate check result.
PropertyTypeRequiredDescription
allowedbooleanYesallowed
modeEnforcementModeYesmode
missingPrerequisitesstring[]YesmissingPrerequisites
currentStagestringYescurrentStage
messagestringYesmessage

StageTransitionResult

Stage transition result.
PropertyTypeRequiredDescription
epicIdstringYesepicId
stagestringYesstage
previousStatusstringYespreviousStatus
newStatusstringYesnewStatus
timestampstringYestimestamp

LifecycleHistoryEntry

History entry for stage transitions.
PropertyTypeRequiredDescription
stagestringYesstage
actionstringYesaction
timestampstringYestimestamp
notesstring | undefinedNonotes

AlertLevel

Alert level names.
AlertLevel

AlertCheckResult

Alert result from check_context_alert.
PropertyTypeRequiredDescription
alertedbooleanYesalerted
levelAlertLevel | nullYeslevel
percentagenumberYespercentage
currentTokensnumberYescurrentTokens
maxTokensnumberYesmaxTokens
actionstring | nullYesaction

FormatOptions

Options for envelope formatting. T4668 T4670 T4663
PropertyTypeRequiredDescription
operationstring | undefinedNooperation
pageLAFSPage | undefinedNopage
extensionsRecord<string, unknown> | undefinedNoextensions
mviimport("/mnt/projects/cleocode/packages/lafs/dist/src/types").MVILevel | undefinedNoMVI level to embed in the envelope _meta. Defaults to ‘standard’. T4957

CleoRegistryEntry

Entry in the CLEO-to-LAFS error registry. T4671 T4663
PropertyTypeRequiredDescription
exitCodeExitCodeYesexitCode
lafsCodestringYeslafsCode
categoryLAFSErrorCategoryYescategory
descriptionstringYesdescription
retryablebooleanYesretryable
httpStatusnumberYeshttpStatus

TestDbEnv

Result of creating a test database environment.
PropertyTypeRequiredDescription
tempDirstringYesTemporary directory (the project root).
cleoDirstringYesPath to .cleo directory.
accessorDataAccessorYesSQLite-backed DataAccessor.
cleanup() => Promise<void>YesClean up temp dir and close DB.

HierarchyValidation

Validate that adding a child to a parent would not violate constraints.
PropertyTypeRequiredDescription
validbooleanYesvalid
error{ code: string; message: string; } | undefinedNoerror

TaskTreeNode

Build a tree structure from flat task list.
PropertyTypeRequiredDescription
taskTaskYestask
childrenTaskTreeNode[]Yeschildren

HierarchyPolicy

PropertyTypeRequiredDescription
maxDepthnumberYesmaxDepth
maxSiblingsnumberYesmaxSiblings
maxActiveSiblingsnumberYesmaxActiveSiblings
countDoneInLimitbooleanYescountDoneInLimit
enforcementProfile"custom" | "llm-agent-first" | "human-cognitive"YesenforcementProfile

HierarchyValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
error{ code: string; message: string; } | undefinedNoerror

StrictnessPreset

Valid preset names.
StrictnessPreset

PresetDefinition

A preset definition: the config keys it sets and a human description.
PropertyTypeRequiredDescription
descriptionstringYesShort summary of what this preset enforces.
valuesRecord<string, unknown>YesFlat dot-notation key/value pairs applied to project config.

ApplyPresetResult

Result of applying a preset.
PropertyTypeRequiredDescription
presetStrictnessPresetYespreset
descriptionstringYesdescription
appliedRecord<string, unknown>Yesapplied
scope"project" | "global"Yesscope

SessionRecord

Session object (engine-compatible).
PropertyTypeRequiredDescription
idstringYesid
status"active" | "archived" | "ended" | "suspended"Yesstatus
agentIdstring | undefinedNoagentId
namestring | undefinedNoname
scope{ type: string; rootTaskId: string; phaseFilter?: string | null; labelFilter?: string[] | null; includeDescendants?: boolean; maxDepth?: number | null; explicitTaskIds?: string[] | null; excludeTaskIds?: string[] | null; computedTaskIds?: string[]; computedAt?: string; }Noscope
focus{ currentTask?: string | null; currentPhase?: string | null; previousTask?: string | null; sessionNote?: string | null; nextAction?: string | null; blockedReason?: string | null; focusHistory?: Array<{ taskId: string; timestamp: string; }>; }Nofocus
startedAtstringYesstartedAt
lastActivitystringYeslastActivity
suspendedAtstring | null | undefinedNosuspendedAt
endedAtstring | null | undefinedNoendedAt
archivedAtstring | null | undefinedNoarchivedAt
resumeCountnumber | undefinedNoresumeCount
gradeModeboolean | undefinedNoWhether full query+mutation audit logging is enabled (behavioral grading).
stats{ tasksCompleted: number; tasksCreated: number; tasksUpdated: number; focusChanges: number; totalActiveMinutes: number; suspendCount: number; } | undefinedNostats
previousSessionIdstring | null | undefinedNoSoft FK to predecessor session.
nextSessionIdstring | null | undefinedNoSoft FK to successor session.
agentIdentifierstring | null | undefinedNoLLM agent/conversation identifier.
handoffConsumedAtstring | null | undefinedNoWhen the successor read this session’s handoff/debrief.
handoffConsumedBystring | null | undefinedNoWho consumed the handoff.
debriefJsonstring | null | undefinedNoRich debrief data (superset of handoffJson).

TaskWorkStateExt

Task work state from the task store. Extends the strict contracts TaskWorkState with required-null fields for session engine compatibility. The engine layer always expects these fields to be present (even if null), whereas the contracts type marks them as optional.
PropertyTypeRequiredDescription
currentTaskstring | nullYescurrentTask
currentPhasestring | nullYescurrentPhase
blockedUntilstring | nullYesblockedUntil
sessionNotestring | nullYessessionNote
sessionNotesSessionNote[]YessessionNotes
nextActionstring | nullYesnextAction
primarySessionstring | nullYesprimarySession

DecisionRecord

Decision record stored in decisions.jsonl.
PropertyTypeRequiredDescription
idstringYesid
sessionIdstringYessessionId
taskIdstringYestaskId
decisionstringYesdecision
rationalestringYesrationale
alternativesstring[]Yesalternatives
timestampstringYestimestamp

AssumptionRecord

Assumption record stored in assumptions.jsonl.
PropertyTypeRequiredDescription
idstringYesid
sessionIdstringYessessionId
taskIdstring | nullYestaskId
assumptionstringYesassumption
confidence"high" | "medium" | "low"Yesconfidence
validatedAtstring | nullYesvalidatedAt
timestampstringYestimestamp

RecordDecisionParams

PropertyTypeRequiredDescription
sessionIdstringYessessionId
taskIdstringYestaskId
decisionstringYesdecision
rationalestringYesrationale
alternativesstring[] | undefinedNoalternatives

DecisionLogParams

PropertyTypeRequiredDescription
sessionIdstring | undefinedNosessionId
taskIdstring | undefinedNotaskId

HandoffData

Handoff data schema - structured state for session transition.
PropertyTypeRequiredDescription
lastTaskstring | nullYesLast task being worked on
tasksCompletedstring[]YesTasks completed in session
tasksCreatedstring[]YesTasks created in session
decisionsRecordednumberYesCount of decisions recorded
nextSuggestedstring[]YesTop-3 from tasks.next
openBlockersstring[]YesTasks with blockers
openBugsstring[]YesOpen bugs
notestring | undefinedNoHuman override note
nextActionstring | undefinedNoHuman override next action

ComputeHandoffOptions

Options for computing handoff data.
PropertyTypeRequiredDescription
sessionIdstringYessessionId
notestring | undefinedNoOptional human note override
nextActionstring | undefinedNoOptional human next action override

GitState

Git state snapshot captured at session end.
PropertyTypeRequiredDescription
branchstringYesbranch
commitCountnumberYescommitCount
lastCommitHashstring | nullYeslastCommitHash
uncommittedChangesbooleanYesuncommittedChanges

DebriefDecision

Decision summary for debrief output.
PropertyTypeRequiredDescription
idstringYesid
decisionstringYesdecision
rationalestringYesrationale
taskIdstringYestaskId

DebriefData

Rich debrief data — superset of HandoffData. Captures comprehensive session state for cross-conversation continuity. T4959
PropertyTypeRequiredDescription
handoffHandoffDataYesStandard handoff data (backward compat).
sessionIdstringYesSession that produced this debrief.
agentIdentifierstring | nullYesAgent/conversation identifier (if known).
startedAtstringYesSession start time.
endedAtstringYesSession end time.
durationMinutesnumberYesDuration in minutes.
decisionsDebriefDecision[]YesDecisions made during the session.
gitStateGitState | nullYesGit state at session end (best-effort).
chainPositionnumberYesPosition in the session chain (1-based).
chainLengthnumberYesTotal length of the session chain.

ComputeDebriefOptions

Options for computing debrief data.
PropertyTypeRequiredDescription
agentIdentifierstring | null | undefinedNoAgent/conversation identifier.
startedAtstring | undefinedNoSession start time.
endedAtstring | undefinedNoSession end time.

BrainFtsRow

Row returned by FTS content_hash duplicate check (brain-retrieval.ts observeBrain).
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
created_atstringYescreated_at

BrainNarrativeRow

Row returned by narrative backfill query (brain-retrieval.ts populateEmbeddings).
PropertyTypeRequiredDescription
idstringYesid
narrativestringYesnarrative
titlestringYestitle

BrainSearchHit

Flattened FTS hit used in hybrid search scoring (brain-search.ts hybridSearch).
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
titlestringYestitle
textstringYestext

BrainKnnRow

Row returned by KNN vector similarity query (brain-similarity.ts searchSimilar).
PropertyTypeRequiredDescription
idstringYesid
distancenumberYesdistance

BrainDecisionNode

Decision node attached to a blocker in causal traces (brain-reasoning.ts reasonWhy).
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
rationalestring | undefinedNorationale

BrainAnchor

Anchor entry in a timeline result (brain-retrieval.ts timelineBrain).
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
dataunknownYesdata

BrainTimelineNeighborRow

Row returned by timeline UNION ALL neighbor queries (brain-retrieval.ts timelineBrain). Represents an entry from any of the four brain tables projected to a common id, type, date shape for chronological ordering.
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
datestringYesdate

BrainConsolidationObservationRow

Row returned by the consolidation observation query (brain-lifecycle.ts consolidateMemories). Fetches old observations for keyword-based clustering and archival. Uses snake_case column names matching the raw SQLite row shape.
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
titlestringYestitle
narrativestring | nullYesnarrative
projectstring | nullYesproject
created_atstringYescreated_at

BrainIdCheckRow

Row returned by ID existence check queries (claude-mem-migration.ts). Used by SELECT id FROM brain_observations WHERE id = ? and similar single-column lookups for idempotent migration dedup.
PropertyTypeRequiredDescription
idstringYesid

EmbeddingProvider

Contract for embedding providers (local models, API services, etc.).
PropertyTypeRequiredDescription
embed(text: string) => Promise<Float32Array>YesConvert text into a fixed-dimension float vector.
dimensionsnumberYesNumber of dimensions the provider produces. Must match vec0 table.
isAvailable() => booleanYesWhether the provider is ready to produce embeddings.

SimilarityResult

PropertyTypeRequiredDescription
idstringYesid
distancenumberYesdistance
typestringYestype
titlestringYestitle
textstringYestext

BrainSearchResult

Search result with BM25 rank.
PropertyTypeRequiredDescription
decisions{ id: string; createdAt: string; updatedAt: string | null; type: "architecture" | "technical" | "process" | "strategic" | "tactical"; confidence: "high" | "medium" | "low"; decision: string; rationale: string; outcome: "pending" | "success" | "failure" | "mixed" | null; alternativesJson: string | null; contextEpicId: string | null; contextTaskId: string | null; contextPhase: string | null; }[]Yesdecisions
patterns{ context: string; id: string; updatedAt: string | null; type: "workflow" | "success" | "failure" | "blocker" | "optimization"; pattern: string; frequency: number; successRate: number | null; impact: "high" | "medium" | "low" | null; antiPattern: string | null; mitigation: string | null; examplesJson: string | null; extractedAt: string; }[]Yespatterns
learnings{ actionable: boolean; id: string; createdAt: string; updatedAt: string | null; source: string; confidence: number; insight: string; application: string | null; applicableTypesJson: string | null; }[]Yeslearnings
observations{ project: string | null; id: string; createdAt: string; updatedAt: string | null; title: string; type: "discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor"; contentHash: string | null; subtitle: string | null; narrative: string | null; factsJson: string | null; conceptsJson: string | null; filesReadJson: string | null; filesModifiedJson: string | null; sourceSessionId: string | null; sourceType: "agent" | "manual" | "session-debrief" | "claude-mem"; discoveryTokens: number | null; }[]Yesobservations

BrainSearchOptions

Search options.
PropertyTypeRequiredDescription
limitnumber | undefinedNoMax results per table. Default 10.
tables("decisions" | "patterns" | "learnings" | "observations")[] | undefinedNoWhich tables to search. Default: all four.

HybridResult

Result from hybridSearch combining multiple search signals.
PropertyTypeRequiredDescription
idstringYesid
scorenumberYesscore
typestringYestype
titlestringYestitle
textstringYestext
sources("fts" | "vec" | "graph")[]Yessources

HybridSearchOptions

Options for hybridSearch weighting and limits.
PropertyTypeRequiredDescription
ftsWeightnumber | undefinedNoftsWeight
vecWeightnumber | undefinedNovecWeight
graphWeightnumber | undefinedNographWeight
limitnumber | undefinedNolimit

MemoryBridgeConfig

Configuration for memory bridge content generation.
PropertyTypeRequiredDescription
maxObservationsnumberYesmaxObservations
maxLearningsnumberYesmaxLearnings
maxPatternsnumberYesmaxPatterns
maxDecisionsnumberYesmaxDecisions
includeHandoffbooleanYesincludeHandoff
includeAntiPatternsbooleanYesincludeAntiPatterns

BrainCompactHit

Compact search hit — minimal fields for index-level results.
PropertyTypeRequiredDescription
idstringYesid
type"decision" | "pattern" | "learning" | "observation"Yestype
titlestringYestitle
datestringYesdate
relevancenumber | undefinedNorelevance
_nextNextDirectives | undefinedNoProgressive disclosure directives for follow-up operations.

SearchBrainCompactParams

Parameters for searchBrainCompact.
PropertyTypeRequiredDescription
querystringYesquery
limitnumber | undefinedNolimit
tables("decisions" | "patterns" | "learnings" | "observations")[] | undefinedNotables
dateStartstring | undefinedNodateStart
dateEndstring | undefinedNodateEnd

SearchBrainCompactResult

Result from searchBrainCompact.
PropertyTypeRequiredDescription
resultsBrainCompactHit[]Yesresults
totalnumberYestotal
tokensEstimatednumberYestokensEstimated

TimelineBrainParams

Parameters for timelineBrain.
PropertyTypeRequiredDescription
anchorstringYesanchor
depthBeforenumber | undefinedNodepthBefore
depthAfternumber | undefinedNodepthAfter

TimelineNeighbor

Timeline entry — compact id/type/date tuple.
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
datestringYesdate

TimelineBrainResult

Result from timelineBrain.
PropertyTypeRequiredDescription
anchorBrainAnchor | nullYesanchor
beforeTimelineNeighbor[]Yesbefore
afterTimelineNeighbor[]Yesafter

FetchBrainEntriesParams

Parameters for fetchBrainEntries.
PropertyTypeRequiredDescription
idsstring[]Yesids

FetchedBrainEntry

Fetched entry with full data.
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
dataunknownYesdata

FetchBrainEntriesResult

Result from fetchBrainEntries.
PropertyTypeRequiredDescription
resultsFetchedBrainEntry[]Yesresults
notFoundstring[]YesnotFound
tokensEstimatednumberYestokensEstimated

BrainObservationType

Observation type from schema.
"discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor"

BrainObservationSourceType

Observation source type from schema.
"agent" | "manual" | "session-debrief" | "claude-mem"

ObserveBrainParams

Parameters for observeBrain.
PropertyTypeRequiredDescription
textstringYestext
titlestring | undefinedNotitle
type"discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor" | undefinedNotype
projectstring | undefinedNoproject
sourceSessionIdstring | undefinedNosourceSessionId
sourceType"agent" | "manual" | "session-debrief" | "claude-mem" | undefinedNosourceType

ObserveBrainResult

Result from observeBrain.
PropertyTypeRequiredDescription
idstringYesid
typestringYestype
createdAtstringYescreatedAt

PopulateEmbeddingsResult

Result from populateEmbeddings backfill.
PropertyTypeRequiredDescription
processednumberYesprocessed
skippednumberYesskipped
errorsnumberYeserrors

PopulateEmbeddingsOptions

Options for the embedding backfill pipeline.
PropertyTypeRequiredDescription
batchSizenumber | undefinedNoMaximum items processed per batch cycle. Defaults to 50.
onProgress((current: number, total: number) => void) | undefinedNoProgress callback invoked after each observation is attempted. current is the 1-based count of observations attempted so far; total is the full count of observations that need embeddings.

AuditEntry

Audit entry interface. Used by session-grade and system-engine for behavioral analysis.
PropertyTypeRequiredDescription
timestampstringYestimestamp
sessionIdstring | nullYessessionId
domainstringYesdomain
operationstringYesoperation
paramsRecord<string, unknown>Yesparams
result{ success: boolean; exitCode: number; duration: number; }Yesresult
metadata{ taskId?: string; userId?: string; source: "dispatch" | "cli"; gateway?: "mutate" | "query"; }Nometadata
errorstring | undefinedNoerror

StoreLearningParams

Parameters for storing a new learning.
PropertyTypeRequiredDescription
insightstringYesinsight
sourcestringYessource
confidencenumberYesconfidence
actionableboolean | undefinedNoactionable
applicationstring | undefinedNoapplication
applicableTypesstring[] | undefinedNoapplicableTypes

SearchLearningParams

Parameters for searching learnings.
PropertyTypeRequiredDescription
querystring | undefinedNoquery
minConfidencenumber | undefinedNominConfidence
actionableOnlyboolean | undefinedNoactionableOnly
applicableTypestring | undefinedNoapplicableType
limitnumber | undefinedNolimit

DimensionScore

PropertyTypeRequiredDescription
scorenumberYesscore
maxnumberYesmax
evidencestring[]Yesevidence

GradeResult

PropertyTypeRequiredDescription
sessionIdstringYessessionId
taskIdstring | undefinedNotaskId
totalScorenumberYestotalScore
maxScorenumberYesmaxScore
dimensions{ sessionDiscipline: DimensionScore; discoveryEfficiency: DimensionScore; taskHygiene: DimensionScore; errorProtocol: DimensionScore; disclosureUse: DimensionScore; }Yesdimensions
flagsstring[]Yesflags
timestampstringYestimestamp
entryCountnumberYesentryCount

AdapterInfo

Summary info for an adapter without exposing the full instance.
PropertyTypeRequiredDescription
idstringYesid
namestringYesname
versionstringYesversion
providerstringYesprovider
healthybooleanYeshealthy
activebooleanYesactive

SessionBridgeData

Session data needed to create a memory bridge observation.
PropertyTypeRequiredDescription
sessionIdstringYessessionId
scopestringYesscope
tasksCompletedstring[]YestasksCompleted
durationnumberYesduration

StoreDecisionParams

Parameters for storing a new decision.
PropertyTypeRequiredDescription
type"architecture" | "technical" | "process" | "strategic" | "tactical"Yestype
decisionstringYesdecision
rationalestringYesrationale
confidence"high" | "medium" | "low"Yesconfidence
outcome"pending" | "success" | "failure" | "mixed" | null | undefinedNooutcome
alternativesstring[] | undefinedNoalternatives
contextEpicIdstring | undefinedNocontextEpicId
contextTaskIdstring | undefinedNocontextTaskId
contextPhasestring | undefinedNocontextPhase

SearchDecisionParams

Parameters for searching decisions.
PropertyTypeRequiredDescription
type"architecture" | "technical" | "process" | "strategic" | "tactical" | undefinedNotype
confidence"high" | "medium" | "low" | undefinedNoconfidence
outcome"pending" | "success" | "failure" | "mixed" | null | undefinedNooutcome
querystring | undefinedNoquery
limitnumber | undefinedNolimit

ListDecisionParams

Parameters for listing decisions.
PropertyTypeRequiredDescription
limitnumber | undefinedNolimit
offsetnumber | undefinedNooffset

PatternType

Pattern types from ADR-009.
PatternType

PatternImpact

Impact level.
PatternImpact

StorePatternParams

Parameters for storing a new pattern.
PropertyTypeRequiredDescription
typePatternTypeYestype
patternstringYespattern
contextstringYescontext
impactPatternImpact | undefinedNoimpact
antiPatternstring | undefinedNoantiPattern
mitigationstring | undefinedNomitigation
examplesstring[] | undefinedNoexamples
successRatenumber | undefinedNosuccessRate

SearchPatternParams

Parameters for searching patterns.
PropertyTypeRequiredDescription
typePatternType | undefinedNotype
impactPatternImpact | undefinedNoimpact
querystring | undefinedNoquery
minFrequencynumber | undefinedNominFrequency
limitnumber | undefinedNolimit

RecordAssumptionParams

PropertyTypeRequiredDescription
sessionIdstring | undefinedNosessionId
taskIdstring | undefinedNotaskId
assumptionstringYesassumption
confidence"high" | "medium" | "low"Yesconfidence

BulkLinkEntry

A link to be created in bulk.
PropertyTypeRequiredDescription
memoryType"decision" | "pattern" | "learning" | "observation"YesmemoryType
memoryIdstringYesmemoryId
taskIdstringYestaskId
linkType"produced_by" | "applies_to" | "informed_by" | "contradicts"YeslinkType

SessionMemoryResult

Result of persisting session memory to brain.db.
PropertyTypeRequiredDescription
observationsCreatednumberYesNumber of observations created
linksCreatednumberYesNumber of links created
observationIdsstring[]YesIDs of created observations
errorsstring[]YesWhether any errors occurred (best-effort — errors don’t fail the operation)

MemoryItem

A memory item to be persisted to brain.db.
PropertyTypeRequiredDescription
textstringYestext
titlestringYestitle
type"discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor"Yestype
sourceSessionIdstringYessourceSessionId
sourceType"session-debrief"YessourceType
linkTaskIdstring | undefinedNoOptional task ID to link this observation to

SessionMemoryContext

Memory context returned for session start/resume enrichment.
PropertyTypeRequiredDescription
recentDecisionsBrainCompactHit[]YesRecent decisions relevant to this scope
relevantPatternsBrainCompactHit[]YesPatterns relevant to this scope
recentObservationsBrainCompactHit[]YesRecent observations from prior sessions
recentLearningsBrainCompactHit[]YesRecent learnings relevant to this scope
tokensEstimatednumberYesTotal token estimate for this context

Pipeline

Pipeline entity representing a task’s lifecycle state. T4800 T4799 - Unified pipeline structure replaces scattered manifests
PropertyTypeRequiredDescription
idstringYesUnique identifier (task ID format: T####)
currentStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesCurrent stage in the pipeline
createdAtDateYesWhen the pipeline was created
updatedAtDateYesWhen the pipeline was last updated
status"active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted"YesOverall pipeline status
isActivebooleanYesWhether the pipeline is currently active (not completed/cancelled)
completedAtDate | undefinedNoWhen the pipeline completed (if applicable)
cancelledReasonstring | undefinedNoCancellation reason (if cancelled)
transitionCountnumberYesNumber of stage transitions made
versionnumberYesVersion for optimistic locking

PipelineStageRecord

Pipeline stage record linking pipeline to individual stages. T4800 T4801 - Requires pipeline_stages table
PropertyTypeRequiredDescription
idstring | undefinedNoUnique identifier
pipelineIdstringYesReference to the pipeline
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesStage name
status"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"YesStage status
startedAtDate | undefinedNoWhen the stage was started
completedAtDate | undefinedNoWhen the stage was completed
durationMsnumber | undefinedNoStage duration in milliseconds (computed)
assignedAgentstring | undefinedNoAssigned agent for this stage
notesstring | undefinedNoStage-specific metadata/notes
ordernumberYesStage order in pipeline

PipelineTransition

Pipeline transition record for audit trail. T4800 T4801 - Requires pipeline_transitions table
PropertyTypeRequiredDescription
idstring | undefinedNoUnique identifier
pipelineIdstringYesPipeline reference
fromStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesFrom stage
toStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesTo stage
transitionedAtDateYesWhen the transition occurred
transitionedBystringYesAgent/user who initiated the transition
reasonstring | undefinedNoReason for the transition
prerequisitesCheckedbooleanYesWhether prerequisites were checked
validationErrorsstring[] | undefinedNoAny validation errors that occurred

InitializePipelineOptions

Options for initializing a pipeline. T4800
PropertyTypeRequiredDescription
startStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefinedNoStarting stage (defaults to ‘research’)
initialStatus"active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | undefinedNoInitial status (defaults to ‘active’)
assignedAgentstring | undefinedNoAssigning agent

AdvanceStageOptions

Options for advancing pipeline stage. T4800
PropertyTypeRequiredDescription
toStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesTarget stage to advance to
reasonstring | undefinedNoReason for the advancement
initiatedBystringYesAgent/user initiating the transition
skipPrerequisitesboolean | undefinedNoWhether to skip prerequisite check (emergency only)
forceboolean | undefinedNoWhether to force transition even if blocked

PipelineQueryOptions

Pipeline query options. T4800
PropertyTypeRequiredDescription
status"active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | undefinedNoFilter by status
currentStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefinedNoFilter by current stage
isActiveboolean | undefinedNoFilter by active state
limitnumber | undefinedNoLimit results
offsetnumber | undefinedNoOffset for pagination
orderBy"createdAt" | "updatedAt" | "currentStage" | undefinedNoOrder by (default: createdAt desc)
order"asc" | "desc" | undefinedNoOrder direction

BriefingTask

Task summary for briefing output.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
leveragenumberYesleverage
scorenumberYesscore

BriefingBug

Bug summary for briefing output.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
prioritystringYespriority

BriefingBlockedTask

Blocked task summary for briefing output.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
blockedBystring[]YesblockedBy

BriefingEpic

Active epic summary for briefing output.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
completionPercentnumberYescompletionPercent

PipelineStageInfo

Pipeline stage data for briefing output.
PropertyTypeRequiredDescription
currentStagestringYescurrentStage
stageStatusstringYesstageStatus

LastSessionInfo

Last session info with handoff data.
PropertyTypeRequiredDescription
endedAtstringYesendedAt
durationnumberYesduration
handoffHandoffDataYeshandoff

CurrentTaskInfo

Currently active task info.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
blockedBystring[] | undefinedNoblockedBy

SessionBriefing

Session briefing result.
PropertyTypeRequiredDescription
lastSessionLastSessionInfo | nullYeslastSession
currentTaskCurrentTaskInfo | nullYescurrentTask
nextTasksBriefingTask[]YesnextTasks
openBugsBriefingBug[]YesopenBugs
blockedTasksBriefingBlockedTask[]YesblockedTasks
activeEpicsBriefingEpic[]YesactiveEpics
pipelineStagePipelineStageInfo | undefinedNopipelineStage
warningsstring[] | undefinedNowarnings
memoryContextSessionMemoryContext | undefinedNoBrain memory context — decisions/patterns/observations relevant to this scope.

BriefingOptions

Options for computing session briefing.
PropertyTypeRequiredDescription
maxNextTasksnumber | undefinedNoMaximum number of next tasks to include (default: 5)
maxBugsnumber | undefinedNoMaximum number of bugs to include (default: 10)
maxBlockednumber | undefinedNoMaximum number of blocked tasks to include (default: 10)
maxEpicsnumber | undefinedNoMaximum number of active epics to include (default: 5)
scopestring | undefinedNoScope filter: ‘global’ or ‘epic:T###‘

MinimalSessionRecord

Minimal session record returned by findSessions().
PropertyTypeRequiredDescription
idstringYesid
namestringYesname
statusstringYesstatus
startedAtstringYesstartedAt
scopeSessionScopeYesscope
_nextNextDirectives | undefinedNoProgressive disclosure directives for follow-up operations.

FindSessionsParams

Parameters for findSessions().
PropertyTypeRequiredDescription
statusstring | undefinedNostatus
scopestring | undefinedNoscope
querystring | undefinedNoquery
limitnumber | undefinedNolimit

ContextDriftResult

PropertyTypeRequiredDescription
scorenumberYesscore
factorsstring[]Yesfactors
completedInScopenumberYescompletedInScope
totalInScopenumberYestotalInScope
outOfScopenumberYesoutOfScope

SessionHistoryEntry

PropertyTypeRequiredDescription
idstringYesid
namestring | undefinedNoname
statusstringYesstatus
startedAtstringYesstartedAt
endedAtstring | null | undefinedNoendedAt
tasksCompletednumberYestasksCompleted
focusChangesnumberYesfocusChanges
focusHistory{ taskId: string; timestamp: string; }[]YesfocusHistory

SessionHistoryParams

PropertyTypeRequiredDescription
sessionIdstring | undefinedNosessionId
limitnumber | undefinedNolimit

SessionStatsResult

PropertyTypeRequiredDescription
totalSessionsnumberYestotalSessions
activeSessionsnumberYesactiveSessions
suspendedSessionsnumberYessuspendedSessions
endedSessionsnumberYesendedSessions
archivedSessionsnumberYesarchivedSessions
totalTasksCompletednumberYestotalTasksCompleted
totalFocusChangesnumberYestotalFocusChanges
averageResumeCountnumberYesaverageResumeCount
session{ id: string; status: string; tasksCompleted: number; focusChanges: number; resumeCount: number; durationMinutes: number; } | undefinedNosession

RuntimeProviderContext

PropertyTypeRequiredDescription
runtimeProviderIdstring | undefinedNoruntimeProviderId
runtimeToolNamestring | undefinedNoruntimeToolName
runtimeVendorstring | undefinedNoruntimeVendor
runtimeInstructionFilestring | undefinedNoruntimeInstructionFile
runtimeProjectDetectedboolean | undefinedNoruntimeProjectDetected
runtimeDetectionMethodsstring[] | undefinedNoruntimeDetectionMethods
runtimeCandidatesstring[] | undefinedNoruntimeCandidates
inferredModelProviderstring | undefinedNoinferredModelProvider

RuntimeProviderSnapshot

PropertyTypeRequiredDescription
cwdstring | undefinedNocwd
argvstring[] | undefinedNoargv
envNodeJS.ProcessEnv | undefinedNoenv

StartSessionOptions

Options for starting a session.
PropertyTypeRequiredDescription
namestringYesname
scopestringYesscope
autoStartboolean | undefinedNoautoStart
startTaskstring | undefinedNostartTask
focusstring | undefinedNofocus
agentstring | undefinedNoagent
gradeboolean | undefinedNoEnable full query+mutation audit logging for this session (behavioral grading).
providerIdstring | undefinedNoProvider adapter ID active for this session (T5240).

EndSessionOptions

Options for ending a session.
PropertyTypeRequiredDescription
sessionIdstring | undefinedNosessionId
notestring | undefinedNonote

ListSessionsOptions

Options for listing sessions.
PropertyTypeRequiredDescription
statusstring | undefinedNostatus
limitnumber | undefinedNolimit

EnforcementMode

Enforcement modes.
EnforcementMode

ActiveSessionInfo

Session info for enforcement checks.
PropertyTypeRequiredDescription
idstringYesid
namestringYesname
scope{ type: string; epicId?: string; }Noscope

EnforcementResult

Enforcement result.
PropertyTypeRequiredDescription
allowedbooleanYesallowed
modeEnforcementModeYesmode
sessionActiveSessionInfo | nullYessession
warningstring | undefinedNowarning

ValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
errorstring | undefinedNoerror
fixstring | undefinedNofix
exitCodeExitCode | undefinedNoexitCode

AddTaskEnforcementOptions

PropertyTypeRequiredDescription
acceptancestring[] | undefinedNoacceptance
prioritystring | undefinedNopriority

UpdateTaskEnforcementOptions

PropertyTypeRequiredDescription
acceptancestring[] | undefinedNoacceptance

AcceptanceEnforcement

PropertyTypeRequiredDescription
validateCreation(options: AddTaskEnforcementOptions) => ValidationResultYesvalidateCreation
validateUpdate(task: Task, updates: UpdateTaskEnforcementOptions) => ValidationResultYesvalidateUpdate
validateCompletion(task: Task) => ValidationResultYesvalidateCompletion
checkMinimumCriteria(criteria: string[], minCriteria: number) => booleanYescheckMinimumCriteria

ResolvedParent

Minimal parent task shape needed for pipeline stage resolution. T060
PropertyTypeRequiredDescription
pipelineStagestring | null | undefinedNopipelineStage
typeTaskType | null | undefinedNotype

TaskPipelineStage

Union type of all valid pipeline stage names.
"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution"

LifecycleMode

The resolved enforcement mode (from lifecycle.mode config key).
LifecycleMode

EpicEnforcementResult

Result of an enforcement check. warning is populated in advisory mode.
PropertyTypeRequiredDescription
validbooleanYesTrue unless a hard block was raised.
warningstring | undefinedNoAdvisory message (non-blocking) or error message (blocked).

AddTaskOptions

Options for creating a task. description is required per CLEO’s anti-hallucination rules — every task must have both a title and a description, and they must differ.
PropertyTypeRequiredDescription
titlestringYestitle
descriptionstringYesdescription
status"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNostatus
priorityTaskPriority | undefinedNopriority
typeTaskType | undefinedNotype
parentIdstring | null | undefinedNoparentId
sizeTaskSize | undefinedNosize
phasestring | undefinedNophase
labelsstring[] | undefinedNolabels
filesstring[] | undefinedNofiles
acceptancestring[] | undefinedNoacceptance
dependsstring[] | undefinedNodepends
notesstring | undefinedNonotes
positionnumber | undefinedNoposition
addPhaseboolean | undefinedNoaddPhase
dryRunboolean | undefinedNodryRun
pipelineStagestring | undefinedNoRCASD-IVTR+C pipeline stage to assign. Auto-resolved if not provided. T060

AddTaskResult

Result of adding a task.
PropertyTypeRequiredDescription
taskTaskYestask
duplicateboolean | undefinedNoduplicate
dryRunboolean | undefinedNodryRun

ListPhasesResult

Options for listing phases.
PropertyTypeRequiredDescription
currentPhasestring | nullYescurrentPhase
phases{ slug: string; name: string; order: number; status: PhaseStatus; startedAt: string | null; completedAt: string | null; isCurrent: boolean; }[]Yesphases
summary{ total: number; pending: number; active: number; completed: number; }Yessummary

SetPhaseOptions

Options for setting current phase.
PropertyTypeRequiredDescription
slugstringYesslug
rollbackboolean | undefinedNorollback
forceboolean | undefinedNoforce
dryRunboolean | undefinedNodryRun

SetPhaseResult

Result of a phase set operation.
PropertyTypeRequiredDescription
previousPhasestring | nullYespreviousPhase
currentPhasestringYescurrentPhase
isRollbackbooleanYesisRollback
isSkipbooleanYesisSkip
skippedPhasesnumber | undefinedNoskippedPhases
warningstring | undefinedNowarning
dryRunboolean | undefinedNodryRun

ShowPhaseResult

Phase show result.
PropertyTypeRequiredDescription
slugstringYesslug
namestringYesname
statusPhaseStatusYesstatus
ordernumberYesorder
startedAtstring | nullYesstartedAt
completedAtstring | nullYescompletedAt
taskCountnumberYestaskCount
completedTaskCountnumberYescompletedTaskCount

AdvancePhaseResult

Phase advance result.
PropertyTypeRequiredDescription
previousPhasestringYespreviousPhase
currentPhasestringYescurrentPhase
forcedbooleanYesforced

RenamePhaseResult

Phase rename result.
PropertyTypeRequiredDescription
oldNamestringYesoldName
newNamestringYesnewName
tasksUpdatednumberYestasksUpdated
currentPhaseUpdatedbooleanYescurrentPhaseUpdated

DeletePhaseResult

Phase delete result.
PropertyTypeRequiredDescription
deletedPhasestringYesdeletedPhase
tasksReassignednumberYestasksReassigned
reassignedTostring | nullYesreassignedTo

PruneResult

PropertyTypeRequiredDescription
rowsArchivednumberYesrowsArchived
rowsDeletednumberYesrowsDeleted
archivePathstring | undefinedNoarchivePath

SchemaInstallResult

PropertyTypeRequiredDescription
installednumberYesinstalled
updatednumberYesupdated
totalnumberYestotal

StalenessReport

PropertyTypeRequiredDescription
stalestring[]Yesstale
currentstring[]Yescurrent
missingstring[]Yesmissing

InstalledSchema

PropertyTypeRequiredDescription
namestringYesname
pathstringYespath
versionstring | nullYesversion

CheckResult

PropertyTypeRequiredDescription
okbooleanYesok
installednumberYesinstalled
bundlednumberYesbundled
missingstring[]Yesmissing
stalestring[]Yesstale

JsonFileIntegrityResult

Result for a single file check.
PropertyTypeRequiredDescription
labelstringYeslabel
status"missing" | "ok" | "invalid" | "version_mismatch" | "schema_not_found"Yesstatus
errorsstring[]Yeserrors
dataVersionstring | undefinedNoVersion found in the data file.
expectedVersionstring | undefinedNoVersion declared in the schema file.

SchemaIntegrityReport

Full integrity report for all JSON files.
PropertyTypeRequiredDescription
filesJsonFileIntegrityResult[]Yesfiles
sqliteVersionstring | nullYesSQLite schema_meta.schemaVersion — null if DB not accessible.
allOkbooleanYesallOk

ProjectType

Detected project type.
ProjectType

TestFramework

Test framework.
TestFramework

FileNamingConvention

FileNamingConvention

ImportStyle

ImportStyle

ProjectContext

Schema-compliant project context for LLM agent consumption.
PropertyTypeRequiredDescription
schemaVersionstringYesschemaVersion
detectedAtstringYesdetectedAt
projectTypesProjectType[]YesprojectTypes
primaryTypeProjectType | undefinedNoprimaryType
monorepobooleanYesmonorepo
testing{ framework?: TestFramework; command?: string; testFilePatterns?: string[]; directories?: { unit?: string; integration?: string; }; } | undefinedNotesting
build{ command?: string; outputDir?: string; } | undefinedNobuild
directories{ source?: string; tests?: string; docs?: string; } | undefinedNodirectories
conventions{ fileNaming?: FileNamingConvention; importStyle?: ImportStyle; typeSystem?: string; } | undefinedNoconventions
llmHints{ preferredTestStyle?: string; typeSystem?: string; commonPatterns?: string[]; avoidPatterns?: string[]; } | undefinedNollmHints

ScaffoldResult

PropertyTypeRequiredDescription
action"created" | "skipped" | "repaired"Yesaction
pathstringYespath
detailsstring | undefinedNodetails

InjectionCheckResult

PropertyTypeRequiredDescription
idstringYesid
categorystringYescategory
status"info" | "warning" | "failed" | "passed"Yesstatus
messagestringYesmessage
detailsRecord<string, unknown>Yesdetails
fixstring | nullYesfix

ScaffoldResult

Result of an ensure* scaffolding operation.
PropertyTypeRequiredDescription
action"created" | "skipped" | "repaired"YesWhat action was taken: created, repaired, or skipped.
pathstringYesFilesystem path that was operated on.
detailsstring | undefinedNoHuman-readable explanation of the result.

CheckStatus

Status of a check* diagnostic.
CheckStatus

CheckResult

Result of a check* diagnostic (compatible with doctor/checks.ts CheckResult).
PropertyTypeRequiredDescription
idstringYesUnique check identifier (e.g. “cleo_structure”, “sqlite_db”).
categorystringYesCategory grouping (e.g. “scaffold”, “global”).
statusCheckStatusYesDiagnostic outcome: passed, failed, warning, or info.
messagestringYesHuman-readable description of the check result.
detailsRecord<string, unknown>YesStructured metadata about the check (paths, sizes, missing items).
fixstring | nullYesSuggested CLI command to fix the issue, or null if passed.

ProjectClassification

Classification result for a project directory.
PropertyTypeRequiredDescription
kind"greenfield" | "brownfield"YesProject type: ‘greenfield’ (empty/new) or ‘brownfield’ (existing).
directorystringYesAbsolute path that was classified.
signalsClassificationSignal[]YesSignal list — which indicators led to the classification.
topLevelFileCountnumberYesTotal non-hidden files found at the top level (for reporting).
hasGitbooleanYesWhether a .git/ directory is present.

ClassificationSignal

A single classification signal detected on the filesystem.
PropertyTypeRequiredDescription
id"docs" | "git-dir" | "source-dir" | "package-manifest" | "rust-manifest" | "go-manifest" | "python-manifest" | "readme" | "empty"YesCanonical signal id for programmatic handling.
descriptionstringYesHuman-readable description of what was detected.
pathstringYesFile or directory that triggered this signal.

ScaffoldResult

PropertyTypeRequiredDescription
action"created" | "skipped" | "repaired"Yesaction
pathstringYespath
detailsstring | undefinedNodetails

HookCheckResult

PropertyTypeRequiredDescription
hookstringYeshook
installedbooleanYesinstalled
currentbooleanYescurrent
sourcePathstringYessourcePath
installedPathstringYesinstalledPath

EnsureGitHooksOptions

PropertyTypeRequiredDescription
forceboolean | undefinedNoforce

ManagedHook

"commit-msg" | "pre-commit" | "pre-push"

LegacyDetectionResult

Result of detecting legacy agent-output directories.
PropertyTypeRequiredDescription
hasLegacybooleanYesWhether any legacy directories were found.
hasResearchOutputsbooleanYesclaudedocs/research-outputs/ exists.
hasLegacyAgentOutputsbooleanYesclaudedocs/agent-outputs/ exists.
hasCanonicalbooleanYes.cleo/agent-outputs/ already exists.
legacyPathsstring[]YesHuman-readable list of found legacy paths.

AgentOutputsMigrationResult

Result of running the agent-outputs migration.
PropertyTypeRequiredDescription
migratedbooleanYesWhether migration was performed.
filesCopiednumberYesNumber of files copied to canonical location.
manifestEntriesnumberYesNumber of manifest entries in the merged pipeline_manifest.
removedstring[]YesLegacy directories that were removed.
summarystringYesHuman-readable summary of what happened.

NexusPermissionLevel

NexusPermissionLevel

NexusHealthStatus

NexusHealthStatus

NexusProject

Domain representation of a registered Nexus project.
PropertyTypeRequiredDescription
hashstringYeshash
projectIdstringYesprojectId
pathstringYespath
namestringYesname
registeredAtstringYesregisteredAt
lastSeenstringYeslastSeen
healthStatusNexusHealthStatusYeshealthStatus
healthLastCheckstring | nullYeshealthLastCheck
permissionsNexusPermissionLevelYespermissions
lastSyncstringYeslastSync
taskCountnumberYestaskCount
labelsstring[]Yeslabels

NexusRegistryFile

Legacy registry file shape (pre-SQLite). Retained for migration compatibility.
PropertyTypeRequiredDescription
$schemastring | undefinedNo$schema
schemaVersionstringYesschemaVersion
lastUpdatedstringYeslastUpdated
projectsRecord<string, NexusProject>Yesprojects

StackAnalysis

PropertyTypeRequiredDescription
languagesstring[]Yeslanguages
frameworksstring[]Yesframeworks
dependencies{ name: string; version: string; dev: boolean; }[]Yesdependencies
packageManagerstring | undefinedNopackageManager
runtimestring | undefinedNoruntime

ArchAnalysis

PropertyTypeRequiredDescription
layers{ name: string; path: string; purpose: string; }[]Yeslayers
entryPoints{ path: string; type: string; }[]YesentryPoints
patternsstring[]Yespatterns

StructureAnalysis

PropertyTypeRequiredDescription
directories{ path: string; purpose: string; fileCount: number; }[]Yesdirectories
totalFilesnumberYestotalFiles
totalLinesnumber | undefinedNototalLines

ConventionAnalysis

PropertyTypeRequiredDescription
fileNamingstringYesfileNaming
importStylestringYesimportStyle
linterstring | undefinedNolinter
formatterstring | undefinedNoformatter
typeSystemstring | undefinedNotypeSystem
errorHandlingstring | undefinedNoerrorHandling

TestingAnalysis

PropertyTypeRequiredDescription
frameworkstringYesframework
patternsstring[]Yespatterns
directoriesstring[]Yesdirectories
hasFixturesbooleanYeshasFixtures
hasMocksbooleanYeshasMocks
coverageConfiguredbooleanYescoverageConfigured

IntegrationAnalysis

PropertyTypeRequiredDescription
apisstring[]Yesapis
databasesstring[]Yesdatabases
authstring[]Yesauth
cicdstring[]Yescicd
containerizedbooleanYescontainerized

ConcernAnalysis

PropertyTypeRequiredDescription
todos{ file: string; line: number; text: string; }[]Yestodos
largeFiles{ path: string; lines: number; }[]YeslargeFiles
complexity{ high: number; medium: number; low: number; }Yescomplexity

CodebaseMapResult

PropertyTypeRequiredDescription
projectContextProjectContextYesprojectContext
stackStackAnalysisYesstack
architectureArchAnalysisYesarchitecture
structureStructureAnalysisYesstructure
conventionsConventionAnalysisYesconventions
testingTestingAnalysisYestesting
integrationsIntegrationAnalysisYesintegrations
concernsConcernAnalysisYesconcerns
analyzedAtstringYesanalyzedAt

MapCodebaseOptions

PropertyTypeRequiredDescription
focus"stack" | "testing" | "architecture" | "structure" | "conventions" | "integrations" | "concerns" | undefinedNofocus
storeToBrainboolean | undefinedNostoreToBrain

InitOptions

Options for the init operation.
PropertyTypeRequiredDescription
namestring | undefinedNoProject name override.
forceboolean | undefinedNoOverwrite existing files.
detectboolean | undefinedNoAuto-detect project configuration.
mapCodebaseboolean | undefinedNoRun codebase analysis and store findings to brain.db.

InitResult

Result of the init operation.
PropertyTypeRequiredDescription
initializedbooleanYesinitialized
directorystringYesdirectory
createdstring[]Yescreated
skippedstring[]Yesskipped
warningsstring[]Yeswarnings
updateDocsOnlyboolean | undefinedNoupdateDocsOnly
classification{ kind: "greenfield" | "brownfield"; signalCount: number; topLevelFileCount: number; hasGit: boolean; } | undefinedNoPhase 5 — Greenfield/brownfield classification of the directory. Populated by the discovery module during init.
nextSteps{ action: string; command: string; }[] | undefinedNoPhase 5 — Next-step guidance for the agent/operator, emitted as a LAFS-compatible suggestion list. Each entry has an action description and a copy-pasteable command.

BootstrapContext

Result tracking arrays passed through each bootstrap step.
PropertyTypeRequiredDescription
createdstring[]Yescreated
warningsstring[]Yeswarnings
isDryRunbooleanYesisDryRun

BootstrapOptions

Options for bootstrapGlobalCleo.
PropertyTypeRequiredDescription
dryRunboolean | undefinedNoPreview changes without applying.
packageRootstring | undefinedNoOverride package root for template/skill discovery.

ExportFormat

ExportFormat

ExportParams

PropertyTypeRequiredDescription
formatExportFormat | undefinedNoformat
outputstring | undefinedNooutput
statusstring | undefinedNostatus
parentstring | undefinedNoparent
phasestring | undefinedNophase
cwdstring | undefinedNocwd

ExportResult

PropertyTypeRequiredDescription
formatExportFormatYesformat
taskCountnumberYestaskCount
filestring | undefinedNofile
contentstring | undefinedNocontent

ImportParams

PropertyTypeRequiredDescription
filestringYesfile
parentstring | undefinedNoparent
phasestring | undefinedNophase
onDuplicateDuplicateStrategy | undefinedNoonDuplicate
addLabelstring | undefinedNoaddLabel
dryRunboolean | undefinedNodryRun
cwdstring | undefinedNocwd

ImportResult

PropertyTypeRequiredDescription
importednumberYesimported
skippednumberYesskipped
renamed{ oldId: string; newId: string; }[]Yesrenamed
totalTasksnumberYestotalTasks
dryRunboolean | undefinedNodryRun

AgentExecutionOutcome

The outcome of an agent’s execution attempt on a task.
AgentExecutionOutcome

AgentExecutionEvent

Context recorded when an agent completes or fails a task.
PropertyTypeRequiredDescription
agentIdstringYesAgent instance ID (agt_…).
agentType"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"YesAgent type classification.
taskIdstringYesTask ID that was attempted.
taskTypestringYesTask type: ‘epic’ | ‘task’ | ‘subtask’.
taskLabelsstring[] | undefinedNoTask labels for richer pattern classification.
outcomeAgentExecutionOutcomeYesExecution outcome.
errorMessagestring | undefinedNoError message if outcome is ‘failure’.
errorType"unknown" | "retriable" | "permanent" | undefinedNoError classification if outcome is ‘failure’.
sessionIdstring | undefinedNoSession ID the agent was running under.
durationMsnumber | undefinedNoDuration of execution in milliseconds (optional).

AgentPerformanceSummary

Summary of an agent type’s execution performance on a task type.
PropertyTypeRequiredDescription
agentType"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"YesAgent type.
taskTypestringYesTask type this summary is for.
totalAttemptsnumberYesTotal execution attempts tracked.
successCountnumberYesNumber of successful attempts.
failureCountnumberYesNumber of failed attempts.
successRatenumberYesSuccess rate [0.0 – 1.0].
lastOutcomeAgentExecutionOutcome | nullYesMost recent attempt outcome.
lastSeenAtstring | nullYesTimestamp of the most recent tracked decision.

HealingSuggestion

A self-healing suggestion derived from failure pattern history.
PropertyTypeRequiredDescription
patternIdstringYesPattern ID from brain_patterns.
failurePatternstringYesHuman-readable description of the failure pattern.
frequencynumberYesTimes this pattern has been seen.
suggestionstringYesMitigation / suggested next action.
confidencenumberYesHow confident the system is in this suggestion [0.0 – 1.0].

AgentCapacity

Task-count-based capacity for a single agent instance.
PropertyTypeRequiredDescription
agentIdstringYesAgent instance ID.
agentType"orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor"YesAgent type classification.
status"error" | "active" | "starting" | "idle" | "crashed" | "stopped"YesCurrent status of the agent.
activeTasksnumberYesNumber of tasks currently assigned to this agent.
remainingCapacitynumberYesNumber of additional tasks this agent can accept (max - active).
maxCapacitynumberYesMaximum tasks this agent can hold (MAX_TASKS_PER_AGENT).
availablebooleanYesWhether this agent can accept new tasks.

AgentPerformanceMetrics

Metrics provided when recording agent performance.
PropertyTypeRequiredDescription
taskIdstringYesTask ID that was processed.
taskTypestringYesTask type label (e.g. “epic”, “task”, “subtask”).
outcomeAgentExecutionOutcomeYesOutcome of the agent’s work on the task.
taskLabelsstring[] | undefinedNoOptional task labels for richer pattern classification.
sessionIdstring | undefinedNoSession ID the agent was operating under.
durationMsnumber | undefinedNoDuration of execution in milliseconds.
errorMessagestring | undefinedNoError message if outcome is “failure”.
errorType"unknown" | "retriable" | "permanent" | undefinedNoError classification if outcome is “failure”.

CapacitySummary

Capacity summary for reporting.
PropertyTypeRequiredDescription
totalCapacitynumberYestotalCapacity
activeAgentCountnumberYesactiveAgentCount
averageCapacitynumberYesaverageCapacity
overloadedbooleanYesoverloaded
thresholdnumberYesthreshold

AgentHealthStatus

Health status of a specific agent instance.
PropertyTypeRequiredDescription
agentIdstringYesAgent instance ID.
status"error" | "active" | "starting" | "idle" | "crashed" | "stopped"YesCurrent DB status.
lastHeartbeatstringYesISO timestamp of the last recorded heartbeat.
heartbeatAgeMsnumberYesMilliseconds since the last heartbeat (at call time).
healthybooleanYesWhether the agent is considered healthy (heartbeat within threshold).
stalebooleanYesWhether the agent is considered stale (heartbeat older than threshold).
thresholdMsnumberYesThreshold used for staleness determination (ms).

RetryPolicy

Configuration for retry behavior.
PropertyTypeRequiredDescription
maxRetriesnumberYesMaximum number of retry attempts. Default: 3.
baseDelayMsnumberYesBase delay in milliseconds before first retry. Default: 1000.
maxDelayMsnumberYesMaximum delay in milliseconds between retries. Default: 30000.
backoffMultipliernumberYesMultiplier for exponential backoff. Default: 2.
jitterbooleanYesWhether to add random jitter to delays. Default: true.
retryOnUnknownbooleanYesWhether to retry on ‘unknown’ error classification. Default: true.

RetryResult

Result of a retried operation.
PropertyTypeRequiredDescription
successbooleanYessuccess
valueT | undefinedNovalue
errorError | undefinedNoerror
attemptsnumberYesattempts
totalDelayMsnumberYestotalDelayMs

AgentRecoveryResult

Result of a recovery attempt for a single agent.
PropertyTypeRequiredDescription
agentIdstringYesagentId
recoveredbooleanYesrecovered
action"skipped" | "restarted" | "abandoned"Yesaction
reasonstringYesreason

RiskFactor

A single factor contributing to a task’s overall risk score. Each factor has a weight (how much it matters) and a value (current level, 0-1). The weighted sum of all factors produces the aggregate risk score.
PropertyTypeRequiredDescription
namestringYesHuman-readable factor name (e.g., “complexity”, “blocking_risk”).
weightnumberYesHow much this factor contributes to the total score (0-1).
valuenumberYesCurrent measured value for this factor (0-1, where 1 = highest risk).
descriptionstringYesExplanation of why this factor has its current value.

RiskAssessment

Complete risk assessment for a single task. Returned by calculateTaskRisk. The riskScore is the weighted aggregate of all RiskFactor entries in factors.
PropertyTypeRequiredDescription
taskIdstringYesThe task ID this assessment applies to.
riskScorenumberYesAggregate risk score (0-1, where 1 = highest risk).
confidencenumberYesConfidence in the assessment (0-1). Higher when more data is available.
factorsRiskFactor[]YesIndividual risk factors that contributed to the score.
recommendationstringYesHuman-readable recommendation based on the risk level.

ValidationPrediction

Predicted outcome for a lifecycle validation gate. Returned by predictValidationOutcome. Combines historical pattern data with the task’s current state to estimate pass likelihood.
PropertyTypeRequiredDescription
taskIdstringYesThe task ID being evaluated.
stagestringYesThe lifecycle stage being predicted (e.g., “specification”, “implementation”).
passLikelihoodnumberYesProbability of passing the gate (0-1).
blockersstring[]YesKnown blockers that may prevent passing.
suggestionsstring[]YesActionable suggestions to improve pass likelihood.

DetectedPattern

A pattern automatically detected from historical brain/task data. Detected patterns may be stored in the existing brain_patterns table if they meet frequency and confidence thresholds.
PropertyTypeRequiredDescription
type"workflow" | "success" | "failure" | "blocker" | "optimization"YesPattern type classification.
patternstringYesHuman-readable pattern description.
contextstringYesContext in which the pattern was observed.
frequencynumberYesHow many times this pattern was observed.
successRatenumber | nullYesSuccess rate when this pattern appears (0-1, null if unknown).
impact"high" | "medium" | "low"YesEstimated impact level.
antiPatternstring | nullYesIf this is an anti-pattern, describe the negative behavior.
mitigationstring | nullYesRecommended mitigation for anti-patterns.
examplesstring[]YesExample task IDs or descriptions where this pattern occurred.
confidencenumberYesConfidence in this pattern’s validity (0-1).

PatternMatch

Result of matching a task against known patterns from brain_patterns. Includes the original pattern row and a relevance score indicating how strongly the pattern applies to the target task.
PropertyTypeRequiredDescription
pattern{ context: string; id: string; updatedAt: string | null; type: "workflow" | "success" | "failure" | "blocker" | "optimization"; pattern: string; frequency: number; successRate: number | null; impact: "high" | "medium" | "low" | null; antiPattern: string | null; mitigation: string | null; examplesJson: string | null; extractedAt: string; }YesThe matched brain_patterns row.
relevanceScorenumberYesHow relevant this pattern is to the target task (0-1).
matchReasonstringYesWhy this pattern was matched.
isAntiPatternbooleanYesWhether this is an anti-pattern match (warns about potential issues).

PatternExtractionOptions

Options for pattern extraction from historical data.
PropertyTypeRequiredDescription
minFrequencynumber | undefinedNoMinimum number of occurrences to consider something a pattern. Default: 2.
minConfidencenumber | undefinedNoMinimum confidence threshold (0-1). Default: 0.3.
limitnumber | undefinedNoMaximum number of patterns to return. Default: 50.
type"workflow" | "success" | "failure" | "blocker" | "optimization" | undefinedNoFilter by pattern type.

PatternStatsUpdate

Result of updating pattern statistics after an outcome.
PropertyTypeRequiredDescription
patternIdstringYesThe pattern ID that was updated.
newFrequencynumberYesNew frequency value.
newSuccessRatenumber | nullYesNew success rate (0-1).
outcomeSuccessbooleanYesWhether the outcome was successful.

LearningContext

Summary of applicable learnings for a task, used in prediction.
PropertyTypeRequiredDescription
applicable{ actionable: boolean; id: string; createdAt: string; updatedAt: string | null; source: string; confidence: number; insight: string; application: string | null; applicableTypesJson: string | null; }[]YesLearnings that apply to this task’s context.
averageConfidencenumberYesAverage confidence of applicable learnings.
actionableCountnumberYesCount of actionable learnings.

ImpactAssessment

Full impact assessment for a task within its dependency graph. Captures direct dependents, transitive dependents, lifecycle pipeline effects, blocked work counts, and critical path membership.
PropertyTypeRequiredDescription
taskIdstringYesThe task being assessed.
directDependentsstring[]YesTasks that directly depend on this task.
transitiveDependentsstring[]YesAll downstream tasks (direct + transitive).
affectedPipelinesstring[]YesEpic IDs whose lifecycle pipelines are affected.
blockedWorkCountnumberYesCount of tasks that would be blocked if this task is not completed.
isOnCriticalPathbooleanYesWhether this task lies on the project’s critical path.
blastRadiusBlastRadiusYesQuantified scope of the impact.

ChangeType

The type of change being analyzed.
ChangeType

ChangeImpact

Predicted downstream effects of a specific change to a task. Models what happens when a task is cancelled, blocked, completed, or reprioritized — including cascading status changes and recommendations.
PropertyTypeRequiredDescription
taskIdstringYesThe task being changed.
changeTypeChangeTypeYesThe type of change being analyzed.
affectedTasksAffectedTask[]YesTasks affected by this change, with predicted new status.
cascadeDepthnumberYesMaximum depth of cascading effects in the dependency graph.
recommendationstringYesHuman-readable recommendation based on the analysis.

AffectedTask

A single task affected by a change, with its predicted new state.
PropertyTypeRequiredDescription
idstringYesTask ID.
titlestringYesTask title.
currentStatusstringYesCurrent status before the change.
newStatusstring | undefinedNoPredicted new status after the change (if it would change).
reasonstringYesWhy this task is affected.

ImpactedTask

A single task predicted to be affected by a free-text change description. Produced by predictImpact after matching candidate tasks against the change description and running downstream dependency analysis.
PropertyTypeRequiredDescription
idstringYesTask ID.
titlestringYesTask title.
statusstringYesCurrent task status.
prioritystringYesCurrent task priority.
exposure"direct" | "dependent" | "transitive"YesSeverity estimate for this task’s exposure to the change. - direct — task title/description matched the change description - dependent — task depends on a matched task - transitive — downstream of a dependent via the dependency graph
downstreamCountnumberYesNumber of downstream tasks that depend on this task. Higher values indicate higher cascading risk.
reasonstringYesWhy this task is predicted to be affected.

ImpactReport

Full impact prediction report for a free-text change description. Returned by predictImpact. Combines fuzzy task search with reverse dependency analysis to enumerate which tasks are at risk.
PropertyTypeRequiredDescription
changestringYesThe original free-text change description.
matchedTasksImpactedTask[]YesTasks directly matched by the change description (fuzzy search). These are the “seed” tasks from which downstream impact is traced.
affectedTasksImpactedTask[]YesAll tasks predicted to be affected, ordered by exposure severity (direct first, then dependents, then transitive) and then by descending downstream count.
totalAffectednumberYesTotal count of distinct affected tasks (including direct matches).
summarystringYesHuman-readable summary of predicted impact scope.

BlastRadiusSeverity

Severity classification for blast radius.
BlastRadiusSeverity

BlastRadius

Quantified scope of a task’s impact across the project.
PropertyTypeRequiredDescription
directCountnumberYesNumber of direct dependents.
transitiveCountnumberYesNumber of transitive dependents (full downstream tree).
epicCountnumberYesNumber of distinct epics affected.
projectPercentagenumberYesPercentage of the total project impacted (0-100).
severityBlastRadiusSeverityYesClassification of impact severity.

GateFocusRecommendation

A gate-level focus recommendation produced by adaptive validation.
PropertyTypeRequiredDescription
gateVerificationGateYesThe verification gate this recommendation applies to.
priority"high" | "medium" | "low"YesPriority level: high gates should be checked first; low gates are lower risk for this task type and can be reviewed last.
rationalestringYesHuman-readable rationale for this priority level.
estimatedPassLikelihoodnumber | nullYesEstimated pass likelihood for this gate (0-1) based on historical patterns and task metadata. Null when no historical data is available.

AdaptiveValidationSuggestion

Full adaptive validation suggestion set for a task.
PropertyTypeRequiredDescription
taskIdstringYesTask ID this suggestion applies to.
gateFocusGateFocusRecommendation[]YesOrdered gate recommendations (highest priority first).
overallConfidencenumberYesOverall confidence that the task will pass all required gates.
tipsstring[]YesActionable tips derived from gate focus analysis. Includes failure-pattern mitigations where available.

VerificationConfidenceScore

Result of scoring and persisting a completed verification round.
PropertyTypeRequiredDescription
taskIdstringYesTask ID.
confidenceScorenumberYesComputed confidence score (0-1). Score derivation: - Gates passed vs required gates: up to 0.6 - Failure log length (fewer failures = higher confidence): up to 0.2 - Round number (fewer rounds = higher confidence): up to 0.2
passedbooleanYesWhether the overall verification passed.
gatesPassedVerificationGate[]YesIDs of gates that passed.
gatesFailedVerificationGate[]YesIDs of gates that failed or are missing.
observationIdstring | undefinedNoBrain observation ID if the score was persisted (may be undefined on dry run).
learningIdstring | undefinedNoBrain learning ID if a learning was extracted (may be undefined).

StorePredictionOptions

Parameters for storing a quality prediction as a brain observation.
PropertyTypeRequiredDescription
dryRunboolean | undefinedNoWhether to skip persisting to brain (useful in tests). Default: false.
sessionIdstring | undefinedNoSession ID to attach to the observation (optional).
projectstring | undefinedNoProject identifier to attach to the observation (optional).

DependencyCheckResult

Result of a dependency validation check.
PropertyTypeRequiredDescription
validbooleanYesvalid
errorsDependencyError[]Yeserrors
warningsDependencyWarning[]Yeswarnings

DependencyError

A dependency error.
PropertyTypeRequiredDescription
codestringYescode
taskIdstringYestaskId
messagestringYesmessage
relatedIdsstring[] | undefinedNorelatedIds

DependencyWarning

A dependency warning.
PropertyTypeRequiredDescription
codestringYescode
taskIdstringYestaskId
messagestringYesmessage

DependencyWave

A wave of parallelizable tasks.
PropertyTypeRequiredDescription
wavenumberYeswave
taskIdsstring[]YestaskIds

NexusParsedQuery

PropertyTypeRequiredDescription
projectstringYesproject
taskIdstringYestaskId
wildcardbooleanYeswildcard

NexusResolvedTask

Task with project context annotation.
NexusResolvedTask

DiscoverResult

PropertyTypeRequiredDescription
projectstringYesproject
taskIdstringYestaskId
titlestringYestitle
scorenumberYesscore
typestringYestype
reasonstringYesreason

NexusDiscoverResult

PropertyTypeRequiredDescription
querystringYesquery
methodstringYesmethod
resultsDiscoverResult[]Yesresults
totalnumberYestotal

SearchResult

PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
prioritystring | undefinedNopriority
descriptionstring | undefinedNodescription
_projectstringYes_project

NexusSearchResult

PropertyTypeRequiredDescription
patternstringYespattern
resultsSearchResult[]Yesresults
resultCountnumberYesresultCount

PermissionCheckResult

PropertyTypeRequiredDescription
projectstringYesproject
requiredNexusPermissionLevelYesrequired
grantedNexusPermissionLevelYesgranted
allowedbooleanYesallowed

SharingStatus

Result of a sharing status check.
PropertyTypeRequiredDescription
modestringYesmode
allowliststring[]Yesallowlist
denyliststring[]Yesdenylist
trackedstring[]Yestracked
ignoredstring[]Yesignored
hasGitbooleanYesWhether the .cleo/.git isolated repo exists and is initialized.
remotesstring[]YesGit remote names configured in .cleo/.git (e.g. ['origin']).
pendingChangesbooleanYesWhether the .cleo/.git working tree has uncommitted changes.
lastSyncstring | nullYesISO 8601 timestamp of the last push or pull to/from a remote, or null if no remote sync has ever occurred.

TaskCurrentResult

Result of getting current task.
PropertyTypeRequiredDescription
currentTaskstring | nullYescurrentTask
currentPhasestring | nullYescurrentPhase
sessionNotestring | nullYessessionNote
nextActionstring | nullYesnextAction

TaskStartResult

Result of starting work on a task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
taskTitlestringYestaskTitle
previousTaskstring | nullYespreviousTask

TaskWorkHistoryEntry

Task work history entry.
PropertyTypeRequiredDescription
taskIdstringYestaskId
timestampstringYestimestamp

CompleteTaskOptions

Options for completing a task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
notesstring | undefinedNonotes
changesetstring | undefinedNochangeset

CompleteTaskResult

Result of completing a task.
PropertyTypeRequiredDescription
taskTaskYestask
autoCompletedstring[] | undefinedNoautoCompleted
unblockedTasksPick<TaskRef, "id" | "title">[] | undefinedNounblockedTasks

RuleViolation

Validation error from anti-hallucination checks
PropertyTypeRequiredDescription
rulestringYesrule
fieldstringYesfield
messagestringYesmessage
severity"error" | "warning"Yesseverity

UpdateTaskOptions

Options for updating a task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestring | undefinedNotitle
status"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNostatus
priorityTaskPriority | undefinedNopriority
typeTaskType | undefinedNotype
sizeTaskSize | undefinedNosize
phasestring | undefinedNophase
descriptionstring | undefinedNodescription
labelsstring[] | undefinedNolabels
addLabelsstring[] | undefinedNoaddLabels
removeLabelsstring[] | undefinedNoremoveLabels
dependsstring[] | undefinedNodepends
addDependsstring[] | undefinedNoaddDepends
removeDependsstring[] | undefinedNoremoveDepends
notesstring | undefinedNonotes
acceptancestring[] | undefinedNoacceptance
filesstring[] | undefinedNofiles
blockedBystring | undefinedNoblockedBy
parentIdstring | null | undefinedNoparentId
noAutoCompleteboolean | undefinedNonoAutoComplete
pipelineStagestring | undefinedNoRCASD-IVTR+C pipeline stage transition target. Must be = current stage. T060

UpdateTaskResult

Result of updating a task.
PropertyTypeRequiredDescription
taskTaskYestask
changesstring[]Yeschanges

ParsedDirective

Parsed directive from a Conduit message.
PropertyTypeRequiredDescription
verbstringYesThe directive verb (claim, done, blocked, action, etc.).
taskRefsstring[]YesTask references extracted from the message (e.g., T042, T1234).
agentIdstringYesThe agent ID that sent the directive.
messageIdstringYesOriginal message ID for audit trail.
timestampstringYesTimestamp of the directive.

RouteResult

Result of routing a directive to a project.
PropertyTypeRequiredDescription
successbooleanYesWhether the routing succeeded.
projectstringYesThe project that was routed to.
projectPathstringYesThe project’s filesystem path.
taskIdstringYesThe task that was affected.
operationstringYesWhat operation was performed.
errorstring | undefinedNoError message if routing failed.

WorkspaceStatus

Aggregated task status across all projects.
PropertyTypeRequiredDescription
projectCountnumberYesTotal projects in the workspace.
projectsWorkspaceProjectSummary[]YesPer-project task summaries.
totals{ pending: number; active: number; done: number; total: number; }YesAggregated totals.
computedAtstringYesWhen the status was computed.

WorkspaceProjectSummary

Task summary for a single project.
PropertyTypeRequiredDescription
namestringYesProject name.
pathstringYesProject path.
counts{ pending: number; active: number; done: number; total: number; }YesTask counts by status.
healthstringYesHealth status from the Nexus registry.
lastSyncstringYesLast sync time.

WorkspaceAgent

Agent info aggregated across projects.
PropertyTypeRequiredDescription
agentIdstringYesAgent instance ID.
agentTypestringYesAgent type.
statusstringYesCurrent status.
projectstringYesWhich project this agent is registered in.
taskIdstring | nullYesCurrent task (if any).
lastHeartbeatstringYesLast heartbeat.

ProjectACL

Project-level ACL entry.
PropertyTypeRequiredDescription
authorizedAgentsstring[]YesAgent IDs with write access.

DepNode

A node in the dependency graph.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
dependsstring[]Yesdepends
dependentsstring[]Yesdependents

DepsOverviewResult

Dependency overview result.
PropertyTypeRequiredDescription
nodesDepNode[]Yesnodes
totalTasksnumberYestotalTasks
withDependenciesnumberYeswithDependencies
withDependentsnumberYeswithDependents
rootsstring[]Yesroots
leavesstring[]Yesleaves

TaskDepsResult

Single task dependency result.
PropertyTypeRequiredDescription
taskTaskRefYestask
upstreamTaskRef[]Yesupstream
downstreamTaskRef[]Yesdownstream
blockedByTaskRef[]YesblockedBy

ExecutionWave

Execution wave (group of parallelizable tasks).
PropertyTypeRequiredDescription
wavenumberYeswave
tasks(TaskRef & { depends: string[]; })[]Yestasks

CriticalPathResult

Critical path result.
PropertyTypeRequiredDescription
pathTaskRef[]Yespath
lengthnumberYeslength

CycleResult

Cycle detection result.
PropertyTypeRequiredDescription
hasCyclesbooleanYeshasCycles
cyclesstring[][]Yescycles

TreeNode

Tree node representation.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
typestring | undefinedNotype
childrenTreeNode[]Yeschildren

CircularDependency

A circular dependency cycle found via DFS traversal.
CircularDependency

MissingDependency

A missing dependency reference within an epic.
PropertyTypeRequiredDescription
taskIdstringYestaskId
missingDepstringYesmissingDep

DependencyAnalysis

Full dependency analysis result for an epic.
PropertyTypeRequiredDescription
dependencyGraphRecord<string, string[]>YesdependencyGraph
circularDependenciesCircularDependency[]YescircularDependencies
missingDependenciesMissingDependency[]YesmissingDependencies

ContextEstimation

Context estimation result.
PropertyTypeRequiredDescription
epicIdstring | nullYesepicId
taskCountnumberYestaskCount
manifestEntriesnumberYesmanifestEntries
estimatedTokensnumberYesestimatedTokens
recommendationstringYesrecommendation
limits{ orchestratorBudget: number; maxFilesPerAgent: number; currentUsage: number; }Yeslimits

Wave

PropertyTypeRequiredDescription
waveNumbernumberYeswaveNumber
tasksstring[]Yestasks
status"completed" | "pending" | "in_progress"Yesstatus

EnrichedWave

PropertyTypeRequiredDescription
waveNumbernumberYeswaveNumber
tasksTaskRef[]Yestasks
status"completed" | "pending" | "in_progress"Yesstatus

StatusCounts

Status counts by task state.
PropertyTypeRequiredDescription
pendingnumberYespending
activenumberYesactive
blockednumberYesblocked
donenumberYesdone
cancellednumber | undefinedNocancelled

EpicStatus

Epic-specific status result.
PropertyTypeRequiredDescription
epicIdstringYesepicId
epicTitlestringYesepicTitle
totalTasksnumberYestotalTasks
byStatusStatusCountsYesbyStatus
wavesnumberYeswaves
currentWavenumber | nullYescurrentWave

OverallStatus

Overall orchestration status (no specific epic).
PropertyTypeRequiredDescription
totalEpicsnumberYestotalEpics
totalTasksnumberYestotalTasks
byStatusStatusCountsYesbyStatus

ProgressMetrics

Progress metrics for orchestration check.
PropertyTypeRequiredDescription
totalnumberYestotal
donenumberYesdone
pendingnumberYespending
blockednumberYesblocked
activenumberYesactive
percentCompletenumberYespercentComplete

StartupSummary

Startup summary for an epic.
PropertyTypeRequiredDescription
epicIdstringYesepicId
epicTitlestringYesepicTitle
initializedbooleanYesinitialized
summary{ totalTasks: number; totalWaves: number; readyTasks: number; byStatus: StatusCounts; }Yessummary
firstWaveimport("/mnt/projects/cleocode/packages/core/src/orchestration/waves").Wave | nullYesfirstWave

OrchestratorSession

Orchestrator session state.
PropertyTypeRequiredDescription
epicIdstringYesepicId
startedAtstringYesstartedAt
status"active" | "completed" | "paused"Yesstatus
currentWavenumberYescurrentWave
completedTasksstring[]YescompletedTasks
spawnedAgentsstring[]YesspawnedAgents

SpawnContext

Spawn context for a subagent.
PropertyTypeRequiredDescription
taskIdstringYestaskId
protocolstringYesprotocol
promptstringYesprompt
tokenResolution{ fullyResolved: boolean; unresolvedTokens: string[]; }YestokenResolution

TaskReadiness

Task readiness assessment.
PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
readybooleanYesready
blockersstring[]Yesblockers
protocolstringYesprotocol

AnalysisResult

Orchestrator analysis result.
PropertyTypeRequiredDescription
epicIdstringYesepicId
totalTasksnumberYestotalTasks
waves{ wave: number; tasks: TaskRef[]; }[]Yeswaves
readyTasksstring[]YesreadyTasks
blockedTasksstring[]YesblockedTasks
completedTasksstring[]YescompletedTasks

ArtifactType

Supported artifact types.
ArtifactType

ArtifactConfig

Artifact configuration from release config.
PropertyTypeRequiredDescription
typeArtifactTypeYestype
buildCommandstring | undefinedNobuildCommand
publishCommandstring | undefinedNopublishCommand
packagestring | undefinedNopackage
registrystring | undefinedNoregistry
options{ [key: string]: unknown; provenance?: boolean; access?: string; tag?: string; attestations?: boolean; } | undefinedNooptions

ArtifactResult

Result of an artifact operation.
PropertyTypeRequiredDescription
successbooleanYessuccess
outputstringYesoutput
dryRunbooleanYesdryRun

ArtifactHandler

Artifact handler interface.
PropertyTypeRequiredDescription
build(config: ArtifactConfig, dryRun?: boolean) => Promise<ArtifactResult>Nobuild
validate(config: ArtifactConfig) => Promise<ArtifactResult>Yesvalidate
publish(config: ArtifactConfig, dryRun?: boolean) => Promise<ArtifactResult>Nopublish

ReleaseConfig

Release configuration shape.
PropertyTypeRequiredDescription
versioningSchemestringYesversioningScheme
tagPrefixstringYestagPrefix
changelogFormatstringYeschangelogFormat
changelogFilestringYeschangelogFile
artifactTypestringYesartifactType
gatesReleaseGate[]Yesgates
versionBump{ files: Array<{ file: string; strategy: string; field?: string; }>; }NoversionBump
security{ enableProvenance: boolean; slsaLevel: number; requireSignedCommits: boolean; }Yessecurity
gitflowGitFlowConfig | undefinedNogitflow
channelsChannelConfig | undefinedNochannels
push{ mode?: PushMode; } | undefinedNopush

ReleaseGate

Release gate definition.
PropertyTypeRequiredDescription
namestringYesname
type"custom" | "tests" | "lint" | "audit"Yestype
commandstringYescommand
requiredbooleanYesrequired

GitFlowConfig

GitFlow branch configuration.
PropertyTypeRequiredDescription
enabledbooleanYesenabled
branches{ main: string; develop: string; featurePrefix: string; hotfixPrefix: string; releasePrefix: string; }Yesbranches

ChannelConfig

Channel-to-branch mapping for npm dist-tag resolution.
PropertyTypeRequiredDescription
mainstringYesmain
developstringYesdevelop
featurestringYesfeature
customRecord<string, string> | undefinedNocustom

PushMode

Push mode: direct push vs PR creation vs auto-detect.
PushMode

ReleaseChannel

npm dist-tag channel for a release.
ReleaseChannel

ChannelValidationResult

Result of validating a version string against a channel’s expectations.
PropertyTypeRequiredDescription
validbooleanYesvalid
expectedstring | undefinedNoexpected
actualstring | undefinedNoactual
messagestringYesmessage

CIPlatform

Supported CI/CD platforms.
CIPlatform

BranchProtectionResult

PropertyTypeRequiredDescription
protectedbooleanYesprotected
detectionMethod"unknown" | "gh-api" | "push-dry-run"YesdetectionMethod
errorstring | undefinedNoerror

PRCreateOptions

PropertyTypeRequiredDescription
basestringYesbase
headstringYeshead
titlestringYestitle
bodystringYesbody
labelsstring[] | undefinedNolabels
versionstringYesversion
epicIdstring | undefinedNoepicId
projectRootstring | undefinedNoprojectRoot

PRResult

PropertyTypeRequiredDescription
mode"created" | "manual" | "skipped"Yesmode
prUrlstring | undefinedNoprUrl
prNumbernumber | undefinedNoprNumber
instructionsstring | undefinedNoinstructions
errorstring | undefinedNoerror

RepoIdentity

PropertyTypeRequiredDescription
ownerstringYesowner
repostringYesrepo

EpicCompletenessResult

Epic completeness result.
PropertyTypeRequiredDescription
hasIncompletebooleanYeshasIncomplete
epics{ epicId: string; epicTitle: string; totalChildren: number; includedChildren: number; missingChildren: TaskRef[]; }[]Yesepics
orphanTasksstring[]YesorphanTasks

DoubleListingResult

Double-listing check result.
PropertyTypeRequiredDescription
hasDoubleListingbooleanYeshasDoubleListing
duplicates{ taskId: string; releases: string[]; }[]Yesduplicates

BumpType

Bump type for version calculation.
BumpType

VersionBumpTarget

Version bump target config from .cleo/config.json.
PropertyTypeRequiredDescription
filestringYesfile
strategy"json" | "toml" | "plain" | "sed"Yesstrategy
fieldstring | undefinedNofield
keystring | undefinedNokey
sectionstring | undefinedNosection
patternstring | undefinedNopattern

BumpResult

Bump result for a single file.
PropertyTypeRequiredDescription
filestringYesfile
strategystringYesstrategy
successbooleanYessuccess
previousVersionstring | undefinedNopreviousVersion
newVersionstring | undefinedNonewVersion
errorstring | undefinedNoerror

ReleaseManifest

Release manifest structure.
PropertyTypeRequiredDescription
versionstringYesversion
status"draft" | "prepared" | "committed" | "tagged" | "pushed" | "rolled_back"Yesstatus
createdAtstringYescreatedAt
preparedAtstring | undefinedNopreparedAt
committedAtstring | undefinedNocommittedAt
taggedAtstring | undefinedNotaggedAt
pushedAtstring | undefinedNopushedAt
tasksstring[]Yestasks
notesstring | undefinedNonotes
changelogstring | undefinedNochangelog
previousVersionstring | undefinedNopreviousVersion
commitShastring | undefinedNocommitSha
gitTagstring | undefinedNogitTag

ReleaseListOptions

PropertyTypeRequiredDescription
status"draft" | "prepared" | "committed" | "tagged" | "pushed" | "rolled_back" | undefinedNostatus
limitnumber | undefinedNolimit
offsetnumber | undefinedNooffset

ReleaseTaskRecord

Task record shape needed for release operations.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
parentIdstring | undefinedNoparentId
completedAtstring | null | undefinedNocompletedAt
labelsstring[] | undefinedNolabels
typestring | undefinedNoStructured task type — ‘epic’ | ‘task’ | ‘subtask’. Used for changelog filtering and categorization.
descriptionstring | undefinedNoTask description. Used to enrich changelog entries when meaningfully different from the title.

ReleaseGateMetadata

Metadata captured during gate evaluation, returned alongside gate results. Downstream (engine layer) uses this to determine PR vs direct push.
PropertyTypeRequiredDescription
channelReleaseChannelYesnpm dist-tag channel resolved from the current branch.
requiresPRbooleanYesWhether the target branch requires a PR (branch protection detected or mode=‘pr’).
targetBranchstringYesBranch that should be targeted for this release type.
currentBranchstringYesBranch the repo is currently on.

PushPolicy

Push policy configuration from config.release.push.
PropertyTypeRequiredDescription
enabledboolean | undefinedNoenabled
remotestring | undefinedNoremote
requireCleanTreeboolean | undefinedNorequireCleanTree
allowedBranchesstring[] | undefinedNoallowedBranches
modePushMode | undefinedNoPush mode override: ‘direct’ | ‘pr’ | ‘auto’ (default: ‘direct’).
prBasestring | undefinedNoOverride PR target branch (default: auto-detected from GitFlow config).

SnapshotDecision

A decision recorded during the session.
PropertyTypeRequiredDescription
decisionstringYesDecision text.
rationalestringYesRationale for the decision.
taskIdstringYesTask ID context.
recordedAtstringYesWhen the decision was recorded.

SnapshotObservation

Brain observation linked to this session.
PropertyTypeRequiredDescription
idstringYesObservation ID.
textstringYesObservation text.
typestringYesObservation type (discovery, change, feature, etc.).
createdAtstringYesWhen the observation was created.

SnapshotTaskContext

Active task context at snapshot time.
PropertyTypeRequiredDescription
taskIdstringYesTask ID currently in focus.
titlestringYesTask title.
statusstringYesTask status.
prioritystringYesTask priority.
descriptionstringYesTask description (truncated to save space).
acceptancestring | undefinedNoAcceptance criteria if any.

SessionSnapshot

Complete session snapshot — everything needed to resume. This is the serialization format. It is JSON-safe and can be stored in a file, database column, or transmitted over the network.
PropertyTypeRequiredDescription
versionnumberYesSchema version for forward compatibility.
capturedAtstringYesWhen the snapshot was created.
sessionSessionYesThe full session object.
handoffHandoffDataYesComputed handoff data.
decisionsSnapshotDecision[]YesDecisions recorded in this session.
observationsSnapshotObservation[]YesRecent brain observations linked to this session.
activeTaskSnapshotTaskContext | nullYesCurrent task context (if a task is focused).
durationMinutesnumberYesSession duration in minutes at snapshot time.

SerializeOptions

Options for serializing a session.
PropertyTypeRequiredDescription
sessionIdstring | undefinedNoSession ID to serialize. If omitted, uses the active session.
maxObservationsnumber | undefinedNoMaximum number of brain observations to include. Default: 10.
maxDescriptionLengthnumber | undefinedNoMaximum description length for active task. Default: 500.

RestoreOptions

Options for restoring a session.
PropertyTypeRequiredDescription
agentstring | undefinedNoAgent identifier for the new agent taking over.
activateboolean | undefinedNoWhether to resume the session (set status to active). Default: true.

StickyNoteStatus

Sticky note status values.
StickyNoteStatus

StickyNoteColor

Sticky note color options.
StickyNoteColor

StickyNotePriority

Sticky note priority levels.
StickyNotePriority

ConvertedTargetType

Converted target type.
ConvertedTargetType

ConvertedTarget

Converted target reference.
PropertyTypeRequiredDescription
typeConvertedTargetTypeYestype
idstringYesid

StickyNote

Core sticky note interface.
PropertyTypeRequiredDescription
idstringYesUnique ID (SN-001, SN-002…)
contentstringYesRaw note text
createdAtstringYesISO 8601 creation timestamp
updatedAtstring | undefinedNoISO 8601 last update timestamp
tagsstring[]YesArray of tags
statusStickyNoteStatusYesCurrent status
convertedToConvertedTarget | undefinedNoConversion target if converted
colorStickyNoteColor | undefinedNoVisual color
priorityStickyNotePriority | undefinedNoPriority level
sourceTypestringYesSource type for BRAIN queries

CreateStickyParams

Parameters for creating a sticky note.
PropertyTypeRequiredDescription
contentstringYescontent
tagsstring[] | undefinedNotags
colorStickyNoteColor | undefinedNocolor
priorityStickyNotePriority | undefinedNopriority

ListStickiesParams

Parameters for listing sticky notes.
PropertyTypeRequiredDescription
statusStickyNoteStatus | undefinedNostatus
colorStickyNoteColor | undefinedNocolor
priorityStickyNotePriority | undefinedNopriority
limitnumber | undefinedNolimit

ConvertStickyParams

Parameters for converting a sticky note.
PropertyTypeRequiredDescription
targetTypeConvertedTargetTypeYestargetType
titlestring | undefinedNoOptional title when converting to task
memoryTypestring | undefinedNoOptional memory type when converting to memory
taskIdstring | undefinedNoOptional taskId when converting to task note

ArchiveTasksOptions

Options for archiving tasks.
PropertyTypeRequiredDescription
beforestring | undefinedNoOnly archive tasks completed before this date (ISO string).
taskIdsstring[] | undefinedNoSpecific task IDs to archive.
includeCancelledboolean | undefinedNoArchive cancelled tasks too. Default: true.
dryRunboolean | undefinedNoDry run mode.

ArchiveTasksResult

Result of archiving tasks.
PropertyTypeRequiredDescription
archivedstring[]Yesarchived
skippedstring[]Yesskipped
totalnumberYestotal
dryRunboolean | undefinedNodryRun

DeleteTaskOptions

Options for deleting a task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
forceboolean | undefinedNoforce
cascadeboolean | undefinedNocascade

DeleteTaskResult

Result of deleting a task.
PropertyTypeRequiredDescription
deletedTaskTaskYesdeletedTask
cascadeDeletedstring[] | undefinedNocascadeDeleted

EngineResult

Canonical EngineResult type used by all engines and core engine-compat modules.
PropertyTypeRequiredDescription
successbooleanYessuccess
dataT | undefinedNodata
pageLAFSPage | undefinedNopage
error{ code: string; message: string; exitCode?: number; details?: unknown; fix?: string; alternatives?: Array<{ action: string; command: string; }>; } | undefinedNoerror

ExportMeta

Export package metadata.
PropertyTypeRequiredDescription
format"cleo-export"Yesformat
versionstringYesversion
exportedAtstringYesexportedAt
source{ project: string; cleo_version: string; nextId: number; }Yessource
checksumstringYeschecksum
taskCountnumberYestaskCount
exportModestringYesexportMode

ExportSelection

Export selection criteria.
PropertyTypeRequiredDescription
modestringYesmode
rootTaskIdsstring[]YesrootTaskIds
includeChildrenbooleanYesincludeChildren
filtersunknownYesfilters

IdMapEntry

ID map entry.
PropertyTypeRequiredDescription
typestringYestype
titlestringYestitle
statusstringYesstatus
parentIdstring | nullYesparentId
dependsstring[]Yesdepends

RelationshipGraph

Relationship graph.
PropertyTypeRequiredDescription
hierarchyRecord<string, string[]>Yeshierarchy
dependenciesRecord<string, string[]>Yesdependencies
rootsstring[]Yesroots

ExportPackage

Complete export package.
PropertyTypeRequiredDescription
$schemastringYes$schema
_metaExportMetaYes_meta
selectionExportSelectionYesselection
idMapRecord<string, IdMapEntry>YesidMap
tasksTask[]Yestasks
relationshipGraphRelationshipGraphYesrelationshipGraph

ExportTasksParams

PropertyTypeRequiredDescription
taskIdsstring[] | undefinedNotaskIds
outputstring | undefinedNooutput
subtreeboolean | undefinedNosubtree
filterstring[] | undefinedNofilter
includeDepsboolean | undefinedNoincludeDeps
dryRunboolean | undefinedNodryRun
cwdstring | undefinedNocwd

ExportTasksResult

PropertyTypeRequiredDescription
exportModestringYesexportMode
taskCountnumberYestaskCount
taskIdsstring[]YestaskIds
outputPathstring | undefinedNooutputPath
contentstring | undefinedNocontent
dryRunboolean | undefinedNodryRun

HelpOperationDef

Minimal operation definition consumed by help logic.
PropertyTypeRequiredDescription
gateway"query" | "mutate"Yesgateway
domainstringYesdomain
operationstringYesoperation
descriptionstringYesdescription
tiernumberYestier

CostHint

Cost hint classification for an operation.
CostHint

GroupedOperations

Domain-grouped operation format (compact).

VerboseOperation

Verbose operation entry with cost hints.
PropertyTypeRequiredDescription
gatewaystringYesgateway
domainstringYesdomain
operationstringYesoperation
descriptionstringYesdescription
costHintCostHintYescostHint

HelpResult

Result of the help computation.
PropertyTypeRequiredDescription
tiernumberYestier
operationCountnumberYesoperationCount
quickStartstring[] | undefinedNoquickStart
operationsGroupedOperations | VerboseOperation[]Yesoperations
guidancestringYesguidance
escalationstringYesescalation

TransferMode

Transfer mode: copy keeps source tasks, move archives them.
TransferMode

TransferScope

Transfer scope: single task or full subtree.
TransferScope

TransferOnConflict

Conflict resolution when target has tasks with duplicate titles.
TransferOnConflict

TransferOnMissingDep

How to handle missing dependencies in the target project.
TransferOnMissingDep

TransferParams

Parameters for a cross-project transfer operation.
PropertyTypeRequiredDescription
taskIdsstring[]YesTask IDs to transfer from the source project.
sourceProjectstringYesSource project name or hash.
targetProjectstringYesTarget project name or hash.
modeTransferMode | undefinedNoCopy (default) keeps source tasks; move archives them.
scopeTransferScope | undefinedNoSingle transfers individual tasks; subtree transfers tasks + all descendants.
onConflictTransferOnConflict | undefinedNoHow to handle title conflicts in the target.
onMissingDepTransferOnMissingDep | undefinedNoHow to handle missing deps in the target.
provenanceboolean | undefinedNoWhether to add provenance notes to transferred tasks.
targetParentstring | undefinedNoOverride parent ID in target project.
transferBrainboolean | undefinedNoWhether to transfer brain observations linked to source tasks.
dryRunboolean | undefinedNoDry run: preview without writing.

TransferManifestEntry

A single task entry in the transfer manifest.
PropertyTypeRequiredDescription
sourceIdstringYesOriginal task ID in source project.
targetIdstringYesNew task ID in target project.
titlestringYesTask title.
typestringYesTask type (task, epic, milestone, etc.).

TransferManifest

Manifest describing what was (or would be) transferred.
PropertyTypeRequiredDescription
sourceProjectstringYesSource project name.
targetProjectstringYesTarget project name.
modeTransferModeYesTransfer mode used.
scopeTransferScopeYesTransfer scope used.
entriesTransferManifestEntry[]YesTasks included in the transfer.
idRemapRecord<string, string>YesID remap table: sourceId - targetId.
brainObservationsTransferrednumberYesNumber of brain observations transferred.

TransferResult

Result of a transfer operation.
PropertyTypeRequiredDescription
dryRunbooleanYesWhether this was a dry run.
transferrednumberYesNumber of tasks transferred.
skippednumberYesNumber of tasks skipped (conflict resolution).
archivednumberYesNumber of source tasks archived (move mode only).
linksCreatednumberYesNumber of external links created.
brainObservationsTransferrednumberYesNumber of brain observations transferred.
manifestTransferManifestYesTransfer manifest with full details.

ImportFromPackageOptions

Options passed to importFromPackage (extracted from importTasksPackage).
PropertyTypeRequiredDescription
cwdstring | undefinedNoWorking directory for the target project.
dryRunboolean | undefinedNoDry run: preview without writing.
parentstring | undefinedNoParent task ID in target.
phasestring | undefinedNoPhase override.
addLabelstring | undefinedNoLabel to add to imported tasks.
provenanceboolean | undefinedNoWhether to add provenance notes.
resetStatus"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNoStatus to reset imported tasks to.
onConflictTransferOnConflict | undefinedNoConflict resolution strategy.
onMissingDepTransferOnMissingDep | undefinedNoMissing dependency strategy.
forceboolean | undefinedNoForce import (skip duplicate checks).

ImportFromPackageResult

Result from importFromPackage.
PropertyTypeRequiredDescription
importednumberYesimported
skippednumberYesskipped
idRemapRecord<string, string>YesidRemap
dryRunboolean | undefinedNodryRun
preview{ tasks: Array<{ id: string; title: string; type: string; }>; } | undefinedNopreview

RemapTable

Forward and reverse remap tables.
PropertyTypeRequiredDescription
forwardMap<string, string>Yesforward
reverseMap<string, string>Yesreverse

ImportTasksParams

PropertyTypeRequiredDescription
filestringYesfile
dryRunboolean | undefinedNodryRun
parentstring | undefinedNoparent
phasestring | undefinedNophase
addLabelstring | undefinedNoaddLabel
provenanceboolean | undefinedNoprovenance
resetStatus"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNoresetStatus
onConflictOnConflict | undefinedNoonConflict
onMissingDepOnMissingDep | undefinedNoonMissingDep
forceboolean | undefinedNoforce
cwdstring | undefinedNocwd

ImportTasksResult

PropertyTypeRequiredDescription
importednumberYesimported
skippednumberYesskipped
idRemapRecord<string, string>YesidRemap
dryRunboolean | undefinedNodryRun
preview{ tasks: Array<{ id: string; title: string; type: string; }>; } | undefinedNopreview

ValidationError

PropertyTypeRequiredDescription
filestringYesfile
fieldstringYesfield
messagestringYesmessage

ValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
errorsValidationError[]Yeserrors
checkednumberYeschecked

AdrValidationError

ValidationError — canonical name per ADR-017 spec
ValidationError

AdrValidationResult

ValidationResult — canonical name per ADR-017 spec
ValidationResult

TreeSitterLanguage

Supported tree-sitter language identifiers.
TreeSitterLanguage

OutlineNode

A symbol node in the outline tree, with optional children.
PropertyTypeRequiredDescription
namestringYesSymbol name.
kindstringYesSymbol kind (function, class, method, etc.).
startLinenumberYesStart line (1-based).
endLinenumberYesEnd line (1-based).
signaturestringYesSignature line(s) — the declaration without the body.
exportedbooleanYesWhether this symbol is exported.
childrenOutlineNode[]YesNested symbols (methods inside classes, etc.).

SmartOutlineResult

Result of generating a smart outline for a file.
PropertyTypeRequiredDescription
filePathstringYesSource file path (relative).
languagestringYesDetected language.
symbolsOutlineNode[]YesTop-level symbol tree.
estimatedTokensnumberYesEstimated token count for this outline.
errorsstring[]YesParse errors (non-fatal).

SmartSearchResult

A search result with relevance score.
PropertyTypeRequiredDescription
symbolCodeSymbolYesThe matched symbol.
scorenumberYesRelevance score (higher = better match).
matchType"substring" | "fuzzy" | "exact" | "path"YesHow the query matched (exact, substring, fuzzy, path).

SmartSearchOptions

Options for smart_search.
PropertyTypeRequiredDescription
maxResultsnumber | undefinedNoMaximum results to return (default: 20).
filePatternstring | undefinedNoGlob-like file pattern filter (e.g. “*.ts”, “src/**”).
languageTreeSitterLanguage | undefinedNoRestrict to specific language.
rootDirstring | undefinedNoRoot directory to search (default: cwd).

SmartUnfoldResult

Result of unfolding a single symbol.
PropertyTypeRequiredDescription
foundbooleanYesWhether the symbol was found.
symbolCodeSymbol | undefinedNoThe matched symbol metadata.
sourcestringYesComplete source text including JSDoc, decorators, and body.
startLinenumberYesStart line (1-based, inclusive of leading doc comment).
endLinenumberYesEnd line (1-based).
estimatedTokensnumberYesEstimated token count for this extraction.
filePathstringYesFile path (relative).
errorsstring[]YesErrors encountered.

ComplianceJsonlEntry

ComplianceJsonlEntry

PayloadValidationResult

Result of payload validation.
PropertyTypeRequiredDescription
validbooleanYesWhether the payload passed validation.
errorsstring[]YesValidation errors (empty when valid).

BuildConfig

{ readonly name: "@cleocode/cleo"; readonly version: "2026.3.36"; readonly description: "CLEO V2 - TypeScript task management CLI for AI coding agents"; readonly repository: { readonly owner: "kryptobaseddev"; readonly name: "cleo"; readonly fullName: "kryptobaseddev/cleo"; readonly url: "https://github.com/kryptobaseddev/cleo.git"; readonly issuesUrl: "https://github.com/kryptobaseddev/cleo/issues"; }; readonly buildDate: "2026-03-18T09:06:32.935Z"; readonly templates: { readonly issueTemplatesDir: "templates/issue-templates"; }; }

RepositoryConfig

{ readonly owner: "kryptobaseddev"; readonly name: "cleo"; readonly fullName: "kryptobaseddev/cleo"; readonly url: "https://github.com/kryptobaseddev/cleo.git"; readonly issuesUrl: "https://github.com/kryptobaseddev/cleo/issues"; }

IssueTemplate

Parsed issue template.
PropertyTypeRequiredDescription
namestringYesname
descriptionstringYesdescription
titlestringYestitle
labelsstring[]Yeslabels
subcommandstringYessubcommand
fileNamestringYesfileName

AddIssueParams

PropertyTypeRequiredDescription
issueTypestringYesissueType
titlestringYestitle
bodystringYesbody
severitystring | undefinedNoseverity
areastring | undefinedNoarea
dryRunboolean | undefinedNodryRun

AddIssueResult

PropertyTypeRequiredDescription
typestringYestype
urlstring | undefinedNourl
numberstring | number | undefinedNonumber
titlestringYestitle
labelsstring[]Yeslabels
bodystringYesbody
repostringYesrepo
dryRunbooleanYesdryRun

RetryablePredicate

A predicate or pattern used to decide whether an error is retryable. - RegExp — matched against error.message (or String(error)) - (error: unknown) => boolean — arbitrary predicate function
RetryablePredicate

RetryOptions

Options that control retry behavior for withRetry.
PropertyTypeRequiredDescription
maxAttemptsnumber | undefinedNoMaximum total number of attempts (initial + retries). 3
baseDelayMsnumber | undefinedNoDelay before the second attempt in milliseconds. Each subsequent delay is baseDelayMs * 2^(attempt - 1). 2000
maxDelayMsnumber | undefinedNoUpper bound on computed delay in milliseconds. Prevents unbounded growth with many retries. 30000
retryableErrorsreadonly RetryablePredicate[] | undefinedNoExplicit list of patterns or predicates that identify retryable errors. When provided, ONLY errors matching at least one entry are retried. Errors that match none of the entries cause immediate failure. When omitted, all errors are treated as retryable (up to maxAttempts).

RetryContext

Metadata attached to errors thrown after all retry attempts are exhausted. The last error from the final attempt is augmented with these fields so callers can distinguish a retry-exhausted failure from a first-attempt one.
PropertyTypeRequiredDescription
attemptsnumberYesTotal number of attempts made (always equal to maxAttempts).
totalDelayMsnumberYesCumulative delay applied across all retry waits in milliseconds.

DecayResult

Result from applying temporal decay.
PropertyTypeRequiredDescription
updatednumberYesupdated
tablesProcessedstring[]YestablesProcessed

ConsolidationResult

Result from consolidating memories.
PropertyTypeRequiredDescription
groupednumberYesgrouped
mergednumberYesmerged
archivednumberYesarchived

BrainMigrationResult

Result from a migration run.
PropertyTypeRequiredDescription
patternsImportednumberYespatternsImported
learningsImportednumberYeslearningsImported
duplicatesSkippednumberYesduplicatesSkipped
errorsstring[]Yeserrors

ResearchEntry

Research entry attached to a task.
PropertyTypeRequiredDescription
idstringYesUnique research entry identifier.
taskIdstringYesTask ID this research is linked to.
topicstringYesResearch topic or question.
findingsstring[]YesAccumulated research findings.
sourcesstring[]YesSource URLs or references.
status"pending" | "partial" | "complete"YesCurrent research status.
createdAtstringYesISO timestamp of creation.
updatedAtstringYesISO timestamp of last update.

ManifestEntry

Manifest entry (JSONL line).
PropertyTypeRequiredDescription
idstringYesUnique manifest entry identifier.
filestringYesOutput file path for this entry.
titlestringYesHuman-readable title of the research output.
datestringYesISO date string when the entry was created.
status"completed" | "blocked" | "partial"YesCompletion status of the research.
agent_typestringYesType of agent that produced this entry.
topicsstring[]YesTopic tags associated with the entry.
key_findingsstring[]YesKey findings from the research.
actionablebooleanYesWhether the findings are actionable.
needs_followupstring[]YesItems that need follow-up investigation.
linked_tasksstring[]YesTask IDs linked to this manifest entry.

AddResearchOptions

Options for adding research.
PropertyTypeRequiredDescription
taskIdstringYesTask ID to attach the research to.
topicstringYesResearch topic or question.
findingsstring[] | undefinedNoInitial findings (if any).
sourcesstring[] | undefinedNoSource URLs or references.

ListResearchOptions

Options for listing research.
PropertyTypeRequiredDescription
taskIdstring | undefinedNoFilter by linked task ID.
status"pending" | "partial" | "complete" | undefinedNoFilter by research status.

ManifestQueryOptions

Manifest query options.
PropertyTypeRequiredDescription
statusstring | undefinedNoFilter by completion status.
agentTypestring | undefinedNoFilter by agent type.
topicstring | undefinedNoFilter by topic tag.
taskIdstring | undefinedNoFilter by linked task ID.
limitnumber | undefinedNoMaximum entries to return.

ExtendedManifestEntry

Extended manifest entry with optional fields used by the engine.
PropertyTypeRequiredDescription
confidencenumber | undefinedNoConfidence score for the research findings.
file_checksumstring | undefinedNoSHA checksum of the output file.
duration_secondsnumber | undefinedNoDuration of the research in seconds.

ResearchFilter

Research filter criteria used by the engine.
PropertyTypeRequiredDescription
taskIdstring | undefinedNoFilter by linked task ID.
statusstring | undefinedNoFilter by completion status.
agent_typestring | undefinedNoFilter by agent type.
topicstring | undefinedNoFilter by topic tag.
limitnumber | undefinedNoMaximum entries to return.
offsetnumber | undefinedNoNumber of entries to skip before applying limit.
actionableboolean | undefinedNoFilter by actionable flag.
dateAfterstring | undefinedNoFilter entries created after this ISO date.
dateBeforestring | undefinedNoFilter entries created before this ISO date.

ContradictionDetail

Contradiction detail between two manifest entries.
PropertyTypeRequiredDescription
entryAExtendedManifestEntryYesFirst conflicting entry.
entryBExtendedManifestEntryYesSecond conflicting entry.
topicstringYesShared topic where the conflict was detected.
conflictDetailsstringYesDescription of the conflicting findings.

SupersededDetail

Superseded entry detail.
PropertyTypeRequiredDescription
oldExtendedManifestEntryYesold
replacementExtendedManifestEntryYesreplacement
topicstringYestopic

ComplianceSummary

Compliance summary shape.
PropertyTypeRequiredDescription
totalnumberYestotal
passnumberYespass
failnumberYesfail
ratenumberYesrate

OtelCaptureMode

OTel capture mode.
OtelCaptureMode

OtelTokenDataPoint

Token data point parsed from OTel metrics.
PropertyTypeRequiredDescription
timestampstring | numberYestimestamp
typestringYestype
modelstringYesmodel
tokensnumberYestokens

AggregatedTokens

Aggregated token counts.
PropertyTypeRequiredDescription
session_idstring | nullYessession_id
tokens{ input: number; output: number; cache_read: number; cache_creation: number; total: number; effective: number; }Yestokens
api_requestsnumberYesapi_requests
source"otel"Yessource

ABVariant

A/B test variant.
ABVariant

ABEventType

A/B test event types.
ABEventType

ABTestSummary

A/B test summary result.
PropertyTypeRequiredDescription
test_namestringYestest_name
variantABVariantYesvariant
start_timestringYesstart_time
end_timestringYesend_time
duration_secondsnumberYesduration_seconds
tokens_consumednumberYestokens_consumed
token_sourcestringYestoken_source
tasks_completednumberYestasks_completed
validations{ passed: number; failed: number; total: number; pass_rate_percent: number; }Yesvalidations
notesstringYesnotes

Severity

Violation severity levels.
Severity
PropertyTypeRequiredDescription
LowSeverity.LowYesLow
MediumSeverity.MediumYesMedium
HighSeverity.HighYesHigh
CriticalSeverity.CriticalYesCritical

ManifestIntegrity

Manifest integrity states.
ManifestIntegrity
PropertyTypeRequiredDescription
ValidManifestIntegrity.ValidYesValid
PartialManifestIntegrity.PartialYesPartial
InvalidManifestIntegrity.InvalidYesInvalid
MissingManifestIntegrity.MissingYesMissing

InstructionStability

Instruction stability levels.
InstructionStability
PropertyTypeRequiredDescription
StableInstructionStability.StableYesStable
ClarifiedInstructionStability.ClarifiedYesClarified
RevisedInstructionStability.RevisedYesRevised
UnstableInstructionStability.UnstableYesUnstable

SessionDegradation

Session degradation levels.
SessionDegradation
PropertyTypeRequiredDescription
NoneSessionDegradation.NoneYesNone
MildSessionDegradation.MildYesMild
ModerateSessionDegradation.ModerateYesModerate
SevereSessionDegradation.SevereYesSevere

AgentReliability

Agent reliability levels.
AgentReliability
PropertyTypeRequiredDescription
HighAgentReliability.HighYesHigh
MediumAgentReliability.MediumYesMedium
LowAgentReliability.LowYesLow
UnreliableAgentReliability.UnreliableYesUnreliable

MetricCategory

Metric categories.
MetricCategory
PropertyTypeRequiredDescription
ComplianceMetricCategory.ComplianceYesCompliance
EfficiencyMetricCategory.EfficiencyYesEfficiency
SessionMetricCategory.SessionYesSession
ImprovementMetricCategory.ImprovementYesImprovement

MetricSource

Metric sources.
MetricSource
PropertyTypeRequiredDescription
TaskMetricSource.TaskYesTask
SessionMetricSource.SessionYesSession
AgentMetricSource.AgentYesAgent
SystemMetricSource.SystemYesSystem
OrchestratorMetricSource.OrchestratorYesOrchestrator

AggregationPeriod

Aggregation periods.
AggregationPeriod
PropertyTypeRequiredDescription
InstantAggregationPeriod.InstantYesInstant
HourlyAggregationPeriod.HourlyYesHourly
DailyAggregationPeriod.DailyYesDaily
WeeklyAggregationPeriod.WeeklyYesWeekly
MonthlyAggregationPeriod.MonthlyYesMonthly

TokenEventType

Token event types.
TokenEventType

TokenEvent

A token usage event entry.
PropertyTypeRequiredDescription
timestampstringYestimestamp
event_typeTokenEventTypeYesevent_type
estimated_tokensnumberYesestimated_tokens
sourcestringYessource
task_idstring | nullYestask_id
session_idstring | nullYessession_id
contextRecord<string, unknown>Yescontext

TokenSessionSummary

Token session summary shape.
PropertyTypeRequiredDescription
session_idstringYessession_id
startstringYesstart
endstringYesend
tokens{ manifest_reads: number; full_file_reads: number; skill_injections: number; prompt_builds: number; total: number; }Yestokens
savings{ avoided_tokens: number; savings_percent: number; }Yessavings

VerificationResult

Result of a backup verification operation.
PropertyTypeRequiredDescription
validbooleanYesWhether the backup is valid
errorstring | undefinedNoError message if verification failed
sourceChecksumstringYesSHA-256 checksum of the source file
backupChecksumstringYesSHA-256 checksum of the backup file

LogLevel

Log entry severity level
LogLevel

MigrationLogEntry

Single migration log entry
PropertyTypeRequiredDescription
timestampstringYesISO 8601 timestamp
levelLogLevelYesLog level
phasestringYesMigration phase (init, backup, import, verify, complete, etc.)
operationstringYesSpecific operation within phase
messagestringYesHuman-readable message
durationMsnumberYesDuration since migration start in milliseconds
dataRecord<string, unknown> | undefinedNoAdditional structured data

MigrationLoggerConfig

Migration logger configuration
PropertyTypeRequiredDescription
maxLogFilesnumber | undefinedNoMaximum number of log files to retain
minLevelLogLevel | undefinedNoMinimum log level to record
consoleOutputboolean | undefinedNoEnable console output in addition to file logging

PreflightResult

Pre-flight check result.
PropertyTypeRequiredDescription
migrationNeededbooleanYesWhether a storage migration is needed.
currentEngine"none" | "sqlite"YesCurrent detected storage engine. Always ‘sqlite’ or ‘none’.
summarystringYesHuman-readable summary of what was detected.
fixstring | nullYesActionable fix command.
details{ todoJsonExists: boolean; todoJsonTaskCount: number; archiveJsonExists: boolean; archiveJsonTaskCount: number; sessionsJsonExists: boolean; sessionsJsonCount: number; tasksDbExists: boolean; tasksDbSize: number; configEngine: string | null; }YesDetailed diagnostics.

MigrationPhase

Migration phase - tracks current step in the migration process
MigrationPhase

SourceFileInfo

Source file info with checksum for integrity verification
PropertyTypeRequiredDescription
pathstringYespath
checksumstringYeschecksum
taskCountnumber | undefinedNotaskCount
sessionCountnumber | undefinedNosessionCount
archivedCountnumber | undefinedNoarchivedCount

MigrationProgress

Migration progress tracking
PropertyTypeRequiredDescription
tasksImportednumberYestasksImported
archivedImportednumberYesarchivedImported
sessionsImportednumberYessessionsImported
totalTasksnumberYestotalTasks
totalArchivednumberYestotalArchived
totalSessionsnumberYestotalSessions

MigrationState

Complete migration state structure
PropertyTypeRequiredDescription
version"1.0.0"Yesversion
startedAtstringYesstartedAt
phaseMigrationPhaseYesphase
sourceFiles{ todoJson?: SourceFileInfo; sessionsJson?: SourceFileInfo; archiveJson?: SourceFileInfo; }NosourceFiles
backupPathstring | undefinedNobackupPath
tempPathstring | undefinedNotempPath
progressMigrationProgressYesprogress
errorsstring[]Yeserrors
warningsstring[]Yeswarnings
completedAtstring | undefinedNocompletedAt

JsonFileValidation

Result of validating a single JSON file.
PropertyTypeRequiredDescription
validbooleanYesvalid
existsbooleanYesexists
countnumberYescount
errorstring | undefinedNoerror
linenumber | undefinedNoline
columnnumber | undefinedNocolumn

JsonValidationResult

Complete validation result for all source files.
PropertyTypeRequiredDescription
validbooleanYesvalid
todoJsonJsonFileValidationYestodoJson
sessionsJsonJsonFileValidationYessessionsJson
archiveJsonJsonFileValidationYesarchiveJson
totalTasksnumberYestotalTasks
warningsstring[]Yeswarnings

SchemaVersion

Schema version info.
PropertyTypeRequiredDescription
currentstringYescurrent
targetstringYestarget
needsMigrationbooleanYesneedsMigration

MigrationFn

Migration function signature.
MigrationFn

MigrationDef

Migration definition.
PropertyTypeRequiredDescription
fromVersionstringYesfromVersion
toVersionstringYestoVersion
descriptionstringYesdescription
migrateMigrationFnYesmigrate

MigrationResult

Migration run result.
PropertyTypeRequiredDescription
filestringYesfile
fromVersionstringYesfromVersion
toVersionstringYestoVersion
migrationsAppliedstring[]YesmigrationsApplied
successbooleanYessuccess
errorsstring[]Yeserrors
dryRunbooleanYesdryRun

MigrationStatus

Status of all data files.
PropertyTypeRequiredDescription
todoJsonSchemaVersion | nullYestodoJson
configJsonSchemaVersion | nullYesconfigJson
archiveJsonSchemaVersion | nullYesarchiveJson

NexusGraphNode

PropertyTypeRequiredDescription
idstringYesid
projectstringYesproject
statusstringYesstatus
titlestringYestitle

NexusGraphEdge

PropertyTypeRequiredDescription
fromstringYesfrom
fromProjectstringYesfromProject
tostringYesto
toProjectstringYestoProject

NexusGlobalGraph

PropertyTypeRequiredDescription
nodesNexusGraphNode[]Yesnodes
edgesNexusGraphEdge[]Yesedges

DepsResult

Result of a dependency query.
PropertyTypeRequiredDescription
taskstringYestask
projectstringYesproject
dependsDepsEntry[]Yesdepends
blockingDepsEntry[]Yesblocking

DepsEntry

Single dependency entry with resolution status.
PropertyTypeRequiredDescription
querystringYesquery
projectstringYesproject
statusstringYesstatus
titlestring | undefinedNotitle

CriticalPathResult

Critical path result.
PropertyTypeRequiredDescription
criticalPath{ query: string; title: string; }[]YescriticalPath
lengthnumberYeslength
blockedBystringYesblockedBy

BlockingAnalysisResult

Blocking analysis result.
PropertyTypeRequiredDescription
taskstringYestask
blocking{ query: string; project: string; }[]Yesblocking
impactScorenumberYesimpactScore

OrphanEntry

Orphan detection result.
PropertyTypeRequiredDescription
sourceProjectstringYessourceProject
sourceTaskstringYessourceTask
targetProjectstringYestargetProject
targetTaskstringYestargetTask
reason"project_not_registered" | "task_not_found"Yesreason

PinoLevel

Pino log levels as written by CLEO’s logger (uppercase).
PinoLevel

PinoLogEntry

A parsed pino log entry from a CLEO log file. Core fields are always present; additional fields are captured in extra.
PropertyTypeRequiredDescription
levelPinoLevelYesUppercase log level
timestringYesISO 8601 UTC timestamp
pidnumberYesProcess ID
hostnamestringYesMachine hostname
msgstringYesHuman-readable log message
subsystemstring | undefinedNoLogical subsystem name (from child logger)
codestring | undefinedNoCLEO error code (on warn/error entries)
exitCodenumber | undefinedNoNumeric exit code (on warn/error entries)
extraRecord<string, unknown>YesAny additional fields not in the core schema

LogFileInfo

Metadata about a discovered log file.
PropertyTypeRequiredDescription
pathstringYesAbsolute path to the log file
namestringYesFile name (e.g., ‘cleo.2026-02-28.1.log’)
sizenumberYesFile size in bytes
mtimestringYesLast modification time (ISO string)
datestring | nullYesParsed date from filename, or null if unparseable
isActivebooleanYesWhether this is the currently active (latest) log file

LogFilter

Filter criteria for log queries. All fields are optional; when multiple are provided, they are ANDed.
PropertyTypeRequiredDescription
minLevelPinoLevel | undefinedNoMinimum log level (inclusive). E.g., ‘WARN’ returns WARN + ERROR + FATAL
levelPinoLevel | undefinedNoExact log level match
sincestring | undefinedNoStart time (inclusive, ISO 8601)
untilstring | undefinedNoEnd time (inclusive, ISO 8601)
subsystemstring | undefinedNoFilter by subsystem name (exact match)
codestring | undefinedNoFilter by CLEO error code (exact match)
exitCodenumber | undefinedNoFilter by exit code (exact match)
msgContainsstring | undefinedNoText search in msg field (case-insensitive substring)
pidnumber | undefinedNoFilter by PID
limitnumber | undefinedNoMaximum entries to return
offsetnumber | undefinedNoNumber of entries to skip (for pagination)

LogQueryResult

Result of a log query operation.
PropertyTypeRequiredDescription
entriesPinoLogEntry[]YesMatched entries
totalScannednumberYesTotal entries scanned (before limit/offset)
totalMatchednumberYesTotal entries matching filters (before limit/offset)
filesstring[]YesFiles that were read

LogDiscoveryOptions

Options for discovering log files.
PropertyTypeRequiredDescription
scope"project" | "global" | "both" | undefinedNoWhich log directory to scan: ‘project’, ‘global’, or ‘both’ (default: ‘project’)
sincestring | undefinedNoOnly include files modified after this date (ISO 8601)
includeMigrationboolean | undefinedNoInclude migration log files (default: false)

LogSummary

Summary of log activity across files.
PropertyTypeRequiredDescription
totalEntriesnumberYestotalEntries
byLevelRecord<string, number>YesbyLevel
bySubsystemRecord<string, number>YesbySubsystem
dateRange{ earliest: string; latest: string; } | nullYesdateRange
filesLogFileInfo[]Yesfiles

RemoteConfig

Remote configuration.
PropertyTypeRequiredDescription
namestringYesname
urlstringYesurl

PushResult

Result of a push operation.
PropertyTypeRequiredDescription
successbooleanYessuccess
branchstringYesbranch
remotestringYesremote
messagestringYesmessage

PullResult

Result of a pull operation.
PropertyTypeRequiredDescription
successbooleanYessuccess
branchstringYesbranch
remotestringYesremote
messagestringYesmessage
hasConflictsbooleanYeshasConflicts
conflictFilesstring[]YesconflictFiles

RemoteInfo

Result of a remote list operation.
PropertyTypeRequiredDescription
namestringYesname
fetchUrlstringYesfetchUrl
pushUrlstringYespushUrl

ExecutionMode

Execution mode for an operation
ExecutionMode

GatewayType

Gateway type
GatewayType

PreferredChannel

Preferred communication channel for token efficiency. CLI is the only dispatch channel. T5240
PreferredChannel

OperationCapability

PropertyTypeRequiredDescription
domainstringYesdomain
operationstringYesoperation
gatewayGatewayTypeYesgateway
modeExecutionModeYesmode
preferredChannelPreferredChannelYespreferredChannel

CapabilityReport

Capability report returned by system.doctor
PropertyTypeRequiredDescription
totalOperationsnumberYestotalOperations
nativenumberYesnative
clinumberYescli
hybridnumberYeshybrid
domainsRecord<string, { native: string[]; cli: string[]; hybrid: string[]; }>Yesdomains

RateLimitConfig

Rate limiter configuration
PropertyTypeRequiredDescription
maxRequestsnumberYesmaxRequests
windowMsnumberYeswindowMs

RateLimitResult

Rate limit check result
PropertyTypeRequiredDescription
allowedbooleanYesallowed
remainingnumberYesremaining
resetMsnumberYesresetMs
limitnumberYeslimit

ContributionDecision

A contribution decision from an agent.
PropertyTypeRequiredDescription
agentIdstringYesagentId
taskIdstringYestaskId
decisionstringYesdecision
confidencenumberYesconfidence
rationalestringYesrationale

ContributionConflict

Conflict between two agent decisions.
PropertyTypeRequiredDescription
fieldstringYesfield
agent1stringYesagent1
agent2stringYesagent2
value1stringYesvalue1
value2stringYesvalue2
severity"high" | "medium" | "low"Yesseverity

ConsensusResult

Consensus result from weighted voting.
PropertyTypeRequiredDescription
decisionstringYesdecision
confidencenumberYesconfidence
votes{ agentId: string; weight: number; vote: string; }[]Yesvotes
conflictsContributionConflict[]Yesconflicts

SkillsMpConfig

SkillsMP configuration.
PropertyTypeRequiredDescription
enabledbooleanYesenabled
cacheDirstringYescacheDir

MarketplaceSkill

Marketplace skill result (CLEO-specific shape).
PropertyTypeRequiredDescription
idstringYesid
namestringYesname
descriptionstringYesdescription
versionstringYesversion
authorstringYesauthor
tagsstring[]Yestags
downloadUrlstring | undefinedNodownloadUrl

BatchSpawnEntry

Result of a single spawn within a batch.
PropertyTypeRequiredDescription
taskIdstringYestaskId
successbooleanYessuccess
result(SpawnPromptResult & { spawnTimestamp: string; }) | undefinedNoresult
errorstring | undefinedNoerror

BatchSpawnResult

Result of a batch spawn operation.
PropertyTypeRequiredDescription
countnumberYescount
succeedednumberYessucceeded
failednumberYesfailed
spawnsBatchSpawnEntry[]Yesspawns

SessionInitResult

Session init result.
PropertyTypeRequiredDescription
activeSessionsnumberYesactiveSessions
activeSessionIdstring | nullYesactiveSessionId
activeScopestring | nullYesactiveScope
hasFocusbooleanYeshasFocus
focusedTaskstring | nullYesfocusedTask
hasPendingbooleanYeshasPending
recommendedAction"resume" | "spawn_followup" | "create_and_spawn" | "request_direction"YesrecommendedAction
actionReasonstringYesactionReason

PauseStatus

Pause status result.
PropertyTypeRequiredDescription
pauseStatus"critical" | "warning" | "ok"YespauseStatus
pauseCode0 | 1 | 2YespauseCode
shouldPausebooleanYesshouldPause
shouldWrapUpbooleanYesshouldWrapUp
contextPercentagenumberYescontextPercentage
recommendationstringYesrecommendation

SkillSourceType

Source type classification for a skill directory.
SkillSourceType

SkillSourceMode

Skill source mode.
SkillSourceMode

SkillSearchPath

Search path entry with its origin.
PropertyTypeRequiredDescription
pathstringYespath
origin"override" | "embedded" | "caamp"Yesorigin

IssueSeverity

Validation issue severity.
IssueSeverity

ValidationIssue

Single validation issue.
PropertyTypeRequiredDescription
severityIssueSeverityYesseverity
codestringYescode
messagestringYesmessage
pathstring | undefinedNopath

SkillValidationResult

Validation result for a skill.
PropertyTypeRequiredDescription
validbooleanYesvalid
skillNamestringYesskillName
skillPathstringYesskillPath
issuesValidationIssue[]Yesissues
errorCountnumberYeserrorCount
warningCountnumberYeswarningCount

SnapshotMeta

Snapshot metadata.
PropertyTypeRequiredDescription
format"cleo-snapshot"Yesformat
versionstringYesversion
createdAtstringYescreatedAt
source{ project: string; cleoVersion: string; }Yessource
checksumstringYeschecksum
taskCountnumberYestaskCount

SnapshotTask

Portable task representation (subset of Task, omitting local-only fields).
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
prioritystringYespriority
typestring | undefinedNotype
parentIdstring | null | undefinedNoparentId
sizestring | null | undefinedNosize
phasestring | undefinedNophase
descriptionstring | undefinedNodescription
dependsstring[] | undefinedNodepends
labelsstring[] | undefinedNolabels
createdAtstringYescreatedAt
updatedAtstring | null | undefinedNoupdatedAt
completedAtstring | undefinedNocompletedAt

Snapshot

Complete snapshot package.
PropertyTypeRequiredDescription
$schemastringYes$schema
_metaSnapshotMetaYes_meta
project{ name: string; currentPhase?: string | null; }Noproject
tasksSnapshotTask[]Yestasks

ImportResult

Import result summary.
PropertyTypeRequiredDescription
addednumberYesadded
updatednumberYesupdated
skippednumberYesskipped
conflictsstring[]Yesconflicts

SpawnCapability

Spawn capability type - subset of provider capabilities related to spawning
SpawnCapability

WorkflowRuleMetric

Per-rule compliance breakdown.
PropertyTypeRequiredDescription
rulestringYesRule identifier, e.g. WF-001.
descriptionstringYesHuman-readable rule description.
totalnumberYesTotal tasks or events that were subject to this rule.
violationsnumberYesNumber that violated the rule.
complianceRatenumberYesCompliance rate 0..1 (1 = fully compliant).

WorkflowComplianceReport

Full workflow compliance report.
PropertyTypeRequiredDescription
generatedAtstringYesISO timestamp when metrics were computed.
sincestring | nullYesTime window filtered (ISO cutoff) or null for all-time.
overallScorenumberYesOverall compliance score 0..1 (average of all rule rates).
gradestringYesGrade letter derived from overallScore.
rulesWorkflowRuleMetric[]YesPer-rule breakdown.
violationSamples{ taskId: string; rule: string; detail: string; }[]YesTask-level violation samples (up to 20).
summary{ totalTasks: number; completedTasks: number; tasksWithAC: number; tasksWithoutAC: number; completionsInSession: number; completionsOutsideSession: number; tasksWithGates: number; avgGatesSet: number; }YesRaw counts for context.

ArchiveMetadata

Archive metadata that may be attached to archived task records.
PropertyTypeRequiredDescription
archivedAtstring | undefinedNoarchivedAt
cycleTimeDaysnumber | undefinedNocycleTimeDays
archiveSourcestring | undefinedNoarchiveSource

AnalyticsTask

Archived task shape used internally for analytics.
PropertyTypeRequiredDescription
idstringYesid
titlestringYestitle
statusstringYesstatus
prioritystring | undefinedNopriority
phasestring | undefinedNophase
labelsstring[] | undefinedNolabels
archiveArchiveMetadataYesarchive

ArchiveReportType

ArchiveReportType

SummaryReportData

Summary report result.
PropertyTypeRequiredDescription
totalArchivednumberYestotalArchived
byStatusRecord<string, number>YesbyStatus
byPriorityRecord<string, number>YesbyPriority
averageCycleTimenumber | nullYesaverageCycleTime
oldestArchivedstring | nullYesoldestArchived
newestArchivedstring | nullYesnewestArchived
archiveSourceBreakdownRecord<string, number>YesarchiveSourceBreakdown

PhaseGroupEntry

Phase group entry.
PropertyTypeRequiredDescription
phasestringYesphase
countnumberYescount
avgCycleTimenumber | nullYesavgCycleTime

LabelFrequencyEntry

Label frequency entry.
PropertyTypeRequiredDescription
labelstringYeslabel
countnumberYescount

PriorityGroupEntry

Priority group entry.
PropertyTypeRequiredDescription
prioritystringYespriority
countnumberYescount
avgCycleTimenumber | nullYesavgCycleTime

CycleTimeDistribution

Cycle time distribution buckets.
PropertyTypeRequiredDescription
'0-1 days'numberYes’0-1 days’
'2-7 days'numberYes’2-7 days’
'8-30 days'numberYes’8-30 days’
'30+ days'numberYes’30+ days’

CycleTimePercentiles

Cycle time percentiles.
PropertyTypeRequiredDescription
p25number | nullYesp25
p50number | nullYesp50
p75number | nullYesp75
p90number | nullYesp90

CycleTimesReportData

Cycle times report result.
PropertyTypeRequiredDescription
countnumberYescount
minnumber | nullYesmin
maxnumber | nullYesmax
avgnumber | nullYesavg
mediannumber | nullYesmedian
distributionCycleTimeDistributionYesdistribution
percentilesCycleTimePercentiles | undefinedNopercentiles

DailyArchiveEntry

Daily archive entry.
PropertyTypeRequiredDescription
datestringYesdate
countnumberYescount

MonthlyArchiveEntry

Monthly archive entry.
PropertyTypeRequiredDescription
monthstringYesmonth
countnumberYescount

TrendsReportData

Trends report result.
PropertyTypeRequiredDescription
byDayDailyArchiveEntry[]YesbyDay
byMonthMonthlyArchiveEntry[]YesbyMonth
totalPeriodnumberYestotalPeriod
averagePerDaynumberYesaveragePerDay

EmptyArchiveData

Empty archive sentinel (when totalArchived is 0).
PropertyTypeRequiredDescription
totalArchived0YestotalArchived
messagestringYesmessage

ArchiveReportDataMap

Union type mapping report types to their data shapes.
ArchiveReportDataMap

ArchiveAnalyticsResult

The envelope returned by analyzeArchive.
PropertyTypeRequiredDescription
reportRYesreport
filters{ since: string | null; until: string | null; } | nullYesfilters
dataEmptyArchiveData | ArchiveReportDataMap[R]Yesdata

AnalyzeArchiveOptions

Options for analyzeArchive.
PropertyTypeRequiredDescription
reportArchiveReportType | undefinedNoreport
sincestring | undefinedNosince
untilstring | undefinedNountil
cwdstring | undefinedNocwd

ArchiveStatsResult

PropertyTypeRequiredDescription
totalArchivednumberYestotalArchived
byReasonRecord<string, number>YesbyReason
averageCycleTimeDaysnumber | nullYesaverageCycleTimeDays
archiveRate{ periodDays: number; archivedInPeriod: number; }YesarchiveRate
lastArchivedstring | nullYeslastArchived

AuditIssue

PropertyTypeRequiredDescription
severity"error" | "info" | "warning"Yesseverity
categorystringYescategory
messagestringYesmessage
fixstring | undefinedNofix

AuditResult

PropertyTypeRequiredDescription
scopestringYesscope
issuesAuditIssue[]Yesissues
summary{ errors: number; warnings: number; fixed: number; }Yessummary

BackupResult

PropertyTypeRequiredDescription
backupIdstringYesbackupId
pathstringYespath
timestampstringYestimestamp
typestringYestype
filesstring[]Yesfiles

RestoreResult

PropertyTypeRequiredDescription
restoredbooleanYesrestored
backupIdstringYesbackupId
timestampstringYestimestamp
filesRestoredstring[]YesfilesRestored

BackupEntry

A single backup entry returned by listSystemBackups.
PropertyTypeRequiredDescription
backupIdstringYesbackupId
typestringYestype
timestampstringYestimestamp
notestring | undefinedNonote
filesstring[]Yesfiles

CleanupResult

PropertyTypeRequiredDescription
targetstringYestarget
deletednumberYesdeleted
itemsstring[]Yesitems
dryRunbooleanYesdryRun
prunedRowsnumber | undefinedNoprunedRows
archivedRowsnumber | undefinedNoarchivedRows
archivePathstring | undefinedNoarchivePath

Platform

Detected platform.
Platform

SystemInfo

Structured snapshot of the host system for diagnostics, error reports, and logging.
PropertyTypeRequiredDescription
platformstringYesOS platform (linux, darwin, win32, etc.)
archstringYesCPU architecture (x64, arm64, etc.)
osTypestringYesOS type (Linux, Darwin, Windows_NT, etc.)
osReleasestringYesOS kernel release version
nodeVersionstringYesNode.js version (without ‘v’ prefix)
totalMemorynumberYesTotal system memory in bytes
freeMemorynumberYesFree system memory in bytes
hostnamestringYesMachine hostname (useful for multi-machine correlation)
homeDirstringYesUser home directory path

CheckStatus

CheckStatus

CheckResult

PropertyTypeRequiredDescription
idstringYesid
categorystringYescategory
statusCheckStatusYesstatus
messagestringYesmessage
detailsRecord<string, unknown>Yesdetails
fixstring | nullYesfix

HealthCheck

PropertyTypeRequiredDescription
namestringYesname
status"warn" | "pass" | "fail"Yesstatus
messagestring | undefinedNomessage

HealthResult

PropertyTypeRequiredDescription
overall"error" | "warning" | "healthy"Yesoverall
checksHealthCheck[]Yeschecks
versionstringYesversion
installation"ok" | "degraded"Yesinstallation

DiagnosticsCheck

PropertyTypeRequiredDescription
namestringYesname
status"warn" | "pass" | "fail"Yesstatus
detailsstring | undefinedNodetails
fixstring | undefinedNofix

DiagnosticsResult

PropertyTypeRequiredDescription
timestampstringYestimestamp
checksDiagnosticsCheck[]Yeschecks
summary{ total: number; passed: number; warned: number; failed: number; }Yessummary

DoctorCheck

PropertyTypeRequiredDescription
checkstringYescheck
status"error" | "warning" | "ok"Yesstatus
messagestringYesmessage
detailsRecord<string, unknown> | undefinedNodetails
fixstring | undefinedNofix

DoctorReport

PropertyTypeRequiredDescription
healthybooleanYeshealthy
errorsnumberYeserrors
warningsnumberYeswarnings
checksDoctorCheck[]Yeschecks

FixResult

PropertyTypeRequiredDescription
checkstringYescheck
action"failed" | "fixed" | "skipped"Yesaction
messagestringYesmessage

StartupState

Outcome of a startup health check. Tells the caller exactly what state the system is in so it can route to init, upgrade, or proceed normally.
StartupState

StartupHealthCheck

PropertyTypeRequiredDescription
checkstringYescheck
status"warn" | "pass" | "fail"Yesstatus
messagestringYesmessage
repairedboolean | undefinedNorepaired

StartupHealthResult

PropertyTypeRequiredDescription
stateStartupStateYesOverall system state after health check + auto-repair.
globalHealthybooleanYesTrue if the global ~/.cleo scaffold is healthy (after auto-repair).
projectHealthybooleanYesTrue if the project .cleo/ scaffold is present and healthy.
checksStartupHealthCheck[]YesIndividual check results for logging/diagnostics.
failuresStartupHealthCheck[]YesChecks that failed and could not be auto-repaired.
systemSystemInfoYesHost system snapshot for diagnostics, error reports, and logging.

InjectGenerateResult

PropertyTypeRequiredDescription
injectionstringYesinjection
sizeBytesnumberYessizeBytes
versionstringYesversion

LabelsResult

PropertyTypeRequiredDescription
labels{ label: string; count: number; tasks: string[]; }[]Yeslabels
totalLabelsnumberYestotalLabels
totalTaggednumberYestotalTagged
totalUntaggednumberYestotalUntagged

SystemMetricsResult

PropertyTypeRequiredDescription
tokens{ input: number; output: number; cache: number; total: number; }Yestokens
compliance{ total: number; passed: number; failed: number; score: number; }Yescompliance
sessions{ total: number; active: number; completed: number; }Yessessions

MigrateResult

PropertyTypeRequiredDescription
fromstringYesfrom
tostringYesto
migrations{ name: string; applied: boolean; }[]Yesmigrations
dryRunbooleanYesdryRun

RuntimeDiagnostics

PropertyTypeRequiredDescription
channelRuntimeChannelYeschannel
modestringYesmode
sourcestringYessource
versionstringYesversion
installedstringYesinstalled
dataRootstringYesdataRoot
invocation{ executable: string; script: string; args: string[]; }Yesinvocation
naming{ cli: string; mcp: string; server: string; }Yesnaming
nodestringYesnode
platformstringYesplatform
archstringYesarch
binariesRecord<string, string> | undefinedNobinaries
package{ name: string; version: string; } | undefinedNopackage
warningsstring[]Yeswarnings

SafestopResult

PropertyTypeRequiredDescription
stoppedbooleanYesstopped
reasonstringYesreason
sessionEndedbooleanYessessionEnded
handoffstring | undefinedNohandoff
dryRunbooleanYesdryRun

UncancelResult

PropertyTypeRequiredDescription
taskIdstringYestaskId
uncancelledbooleanYesuncancelled
previousStatusstringYespreviousStatus
newStatusstringYesnewStatus
cascadeCountnumberYescascadeCount
dryRunbooleanYesdryRun

TemplateSection

A single section/field within an issue template.
PropertyTypeRequiredDescription
idstringYesid
type"markdown" | "input" | "textarea" | "dropdown" | "checkboxes"Yestype
labelstringYeslabel
requiredbooleanYesrequired
optionsstring[] | undefinedNooptions
placeholderstring | undefinedNoplaceholder

IssueTemplate

A parsed issue template.
PropertyTypeRequiredDescription
filenamestringYesfilename
subcommandstringYessubcommand
namestringYesname
titlePrefixstringYestitlePrefix
labelsstring[]Yeslabels
sectionsTemplateSection[]Yessections

TemplateConfig

The full template config output.
PropertyTypeRequiredDescription
templatesIssueTemplate[]Yestemplates
generatedAtstringYesgeneratedAt
sourceDirstringYessourceDir

TemplateResult

Result type for template parser operations.
PropertyTypeRequiredDescription
successbooleanYessuccess
dataT | undefinedNodata
error{ code: string; message: string; details?: Record<string, unknown>; } | undefinedNoerror

ShellType

Supported shell types.
ShellType

ChangelogSection

Grouped changelog sections.
PropertyTypeRequiredDescription
titlestringYestitle
entries{ taskId: string; description: string; }[]Yesentries

CommandMeta

Parsed command metadata.
PropertyTypeRequiredDescription
commandstringYescommand
categorystringYescategory
synopsisstringYessynopsis
aliasesstring[]Yesaliases
relevancestringYesrelevance
flagsstring[]Yesflags
exitsstring[]Yesexits
jsonOutputbooleanYesjsonOutput
jsonDefaultbooleanYesjsonDefault
subcommandsstring[]Yessubcommands
notestringYesnote
aliasForstringYesaliasFor
scriptNamestringYesscriptName

ParsedFlags

Parsed flag state.
PropertyTypeRequiredDescription
format"" | "json" | "human"Yesformat
quietbooleanYesquiet
dryRunbooleanYesdryRun
verbosebooleanYesverbose
helpbooleanYeshelp
forcebooleanYesforce
remainingstring[]Yesremaining

InsertTask

{ id: string; title: string; description: string | null; status?: string | undefined; priority?: string | undefined; type?: string | null | undefined; parentId?: string | null | undefined; phase?: string | null | undefined; size?: string | null | undefined; position?: number | null | undefined; positionVersion?: number | null | undefined; labelsJson?: string | null | undefined; notesJson?: string | null | undefined; acceptanceJson?: string | null | undefined; filesJson?: string | null | undefined; origin?: string | null | undefined; blockedBy?: string | null | undefined; epicLifecycle?: string | null | undefined; noAutoComplete?: boolean | null | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; completedAt?: string | null | undefined; cancelledAt?: string | null | undefined; cancellationReason?: string | null | undefined; archivedAt?: string | null | undefined; archiveReason?: string | null | undefined; cycleTimeDays?: number | null | undefined; verificationJson?: string | null | undefined; createdBy?: string | null | undefined; modifiedBy?: string | null | undefined; sessionId?: string | null | undefined; pipelineStage?: string | null | undefined; assignee?: string | null | undefined; }

SelectTask

{ id: string; title: string; description: string | null; status: string; priority: string; type: string | null; parentId: string | null; phase: string | null; size: string | null; position: number | null; positionVersion: number | null; labelsJson: string | null; notesJson: string | null; acceptanceJson: string | null; filesJson: string | null; origin: string | null; blockedBy: string | null; epicLifecycle: string | null; noAutoComplete: boolean | null; createdAt: string; updatedAt: string | null; completedAt: string | null; cancelledAt: string | null; cancellationReason: string | null; archivedAt: string | null; archiveReason: string | null; cycleTimeDays: number | null; verificationJson: string | null; createdBy: string | null; modifiedBy: string | null; sessionId: string | null; pipelineStage: string | null; assignee: string | null; }

InsertTaskDependency

{ taskId: string; dependsOn: string; }

SelectTaskDependency

{ taskId: string; dependsOn: string; }

InsertTaskRelation

{ taskId: string; relatedTo: string; reason: string | null; relationType?: string | undefined; }

SelectTaskRelation

{ taskId: string; relatedTo: string; relationType: string; reason: string | null; }

InsertSession

{ id: string; name: string; status?: string | undefined; scopeJson?: string | undefined; currentTask?: string | null | undefined; taskStartedAt?: string | null | undefined; agent?: string | null | undefined; notesJson?: string | null | undefined; tasksCompletedJson?: string | null | undefined; tasksCreatedJson?: string | null | undefined; handoffJson?: string | null | undefined; startedAt?: string | undefined; endedAt?: string | null | undefined; previousSessionId?: string | null | undefined; nextSessionId?: string | null | undefined; agentIdentifier?: string | null | undefined; handoffConsumedAt?: string | null | undefined; handoffConsumedBy?: string | null | undefined; debriefJson?: string | null | undefined; providerId?: string | null | undefined; statsJson?: string | null | undefined; resumeCount?: number | null | undefined; gradeMode?: number | null | undefined; }

SelectSession

{ id: string; name: string; status: string; scopeJson: string; currentTask: string | null; taskStartedAt: string | null; agent: string | null; notesJson: string | null; tasksCompletedJson: string | null; tasksCreatedJson: string | null; handoffJson: string | null; startedAt: string; endedAt: string | null; previousSessionId: string | null; nextSessionId: string | null; agentIdentifier: string | null; handoffConsumedAt: string | null; handoffConsumedBy: string | null; debriefJson: string | null; providerId: string | null; statsJson: string | null; resumeCount: number | null; gradeMode: number | null; }

InsertWorkHistory

{ sessionId: string; taskId: string; id?: number | undefined; setAt?: string | undefined; clearedAt?: string | null | undefined; }

SelectWorkHistory

{ id: number; sessionId: string; taskId: string; setAt: string; clearedAt: string | null; }

InsertLifecyclePipeline

{ id: string; taskId: string; status?: string | undefined; currentStageId?: string | null | undefined; startedAt?: string | undefined; completedAt?: string | null | undefined; updatedAt?: string | null | undefined; version?: number | undefined; }

SelectLifecyclePipeline

{ id: string; taskId: string; status: string; currentStageId: string | null; startedAt: string; completedAt: string | null; updatedAt: string | null; version: number; }

InsertLifecycleStage

{ id: string; pipelineId: string; stageName: string; sequence: number; blockReason: string | null; skipReason: string | null; status?: string | undefined; startedAt?: string | null | undefined; completedAt?: string | null | undefined; blockedAt?: string | null | undefined; skippedAt?: string | null | undefined; notesJson?: string | null | undefined; metadataJson?: string | null | undefined; outputFile?: string | null | undefined; createdBy?: string | null | undefined; validatedBy?: string | null | undefined; validatedAt?: string | null | undefined; validationStatus?: string | null | undefined; provenanceChainJson?: string | null | undefined; }

SelectLifecycleStage

{ id: string; pipelineId: string; stageName: string; status: string; sequence: number; startedAt: string | null; completedAt: string | null; blockedAt: string | null; blockReason: string | null; skippedAt: string | null; skipReason: string | null; notesJson: string | null; metadataJson: string | null; outputFile: string | null; createdBy: string | null; validatedBy: string | null; validatedAt: string | null; validationStatus: string | null; provenanceChainJson: string | null; }

InsertLifecycleGateResult

{ id: string; stageId: string; gateName: string; result: string; checkedBy: string; details: string | null; reason: string | null; checkedAt?: string | undefined; }

SelectLifecycleGateResult

{ id: string; stageId: string; gateName: string; result: string; checkedAt: string; checkedBy: string; details: string | null; reason: string | null; }

InsertLifecycleEvidence

{ id: string; stageId: string; uri: string; type: string; recordedAt?: string | undefined; recordedBy?: string | null | undefined; description?: string | null | undefined; }

SelectLifecycleEvidence

{ id: string; stageId: string; uri: string; type: string; recordedAt: string; recordedBy: string | null; description: string | null; }

InsertLifecycleTransition

{ id: string; pipelineId: string; fromStageId: string; toStageId: string; transitionType?: string | undefined; transitionedBy?: string | null | undefined; createdAt?: string | undefined; }

SelectLifecycleTransition

{ id: string; pipelineId: string; fromStageId: string; toStageId: string; transitionType: string; transitionedBy: string | null; createdAt: string; }

InsertSchemaMeta

{ key: string; value: string; }

SelectSchemaMeta

{ key: string; value: string; }

InsertAuditLog

{ id: string; timestamp: string; action: string; taskId: string; actor: string; detailsJson?: string | null | undefined; beforeJson?: string | null | undefined; afterJson?: string | null | undefined; domain?: string | null | undefined; operation?: string | null | undefined; sessionId?: string | null | undefined; requestId?: string | null | undefined; durationMs?: number | null | undefined; success?: number | null | undefined; source?: string | null | undefined; gateway?: string | null | undefined; errorMessage?: string | null | undefined; projectHash?: string | null | undefined; }

SelectAuditLog

{ id: string; timestamp: string; action: string; taskId: string; actor: string; detailsJson: string | null; beforeJson: string | null; afterJson: string | null; domain: string | null; operation: string | null; sessionId: string | null; requestId: string | null; durationMs: number | null; success: number | null; source: string | null; gateway: string | null; errorMessage: string | null; projectHash: string | null; }

AuditLogInsert

Canonical type alias for audit log insert (T4848).
{ id: string; timestamp: string; action: string; taskId: string; actor: string; detailsJson?: string | null | undefined; beforeJson?: string | null | undefined; afterJson?: string | null | undefined; domain?: string | null | undefined; operation?: string | null | undefined; sessionId?: string | null | undefined; requestId?: string | null | undefined; durationMs?: number | null | undefined; success?: number | null | undefined; source?: string | null | undefined; gateway?: string | null | undefined; errorMessage?: string | null | undefined; projectHash?: string | null | undefined; }

AuditLogSelect

Canonical type alias for audit log select (T4848).
{ id: string; timestamp: string; action: string; taskId: string; actor: string; detailsJson: string | null; beforeJson: string | null; afterJson: string | null; domain: string | null; operation: string | null; sessionId: string | null; requestId: string | null; durationMs: number | null; success: number | null; source: string | null; gateway: string | null; errorMessage: string | null; projectHash: string | null; }

InsertTokenUsage

{ id: string; provider: string; model: string | null; createdAt?: string | undefined; transport?: string | undefined; gateway?: string | null | undefined; domain?: string | null | undefined; operation?: string | null | undefined; sessionId?: string | null | undefined; taskId?: string | null | undefined; requestId?: string | null | undefined; inputChars?: number | undefined; outputChars?: number | undefined; inputTokens?: number | undefined; outputTokens?: number | undefined; totalTokens?: number | undefined; method?: string | undefined; confidence?: string | undefined; requestHash?: string | null | undefined; responseHash?: string | null | undefined; metadataJson?: string | undefined; }

SelectTokenUsage

{ id: string; createdAt: string; provider: string; model: string | null; transport: string; gateway: string | null; domain: string | null; operation: string | null; sessionId: string | null; taskId: string | null; requestId: string | null; inputChars: number; outputChars: number; inputTokens: number; outputTokens: number; totalTokens: number; method: string; confidence: string; requestHash: string | null; responseHash: string | null; metadataJson: string; }

InsertArchitectureDecision

{ id: string; title: string; content: string; summary: string | null; status?: string | undefined; supersedesId?: string | null | undefined; supersededById?: string | null | undefined; consensusManifestId?: string | null | undefined; createdAt?: string | undefined; updatedAt?: string | null | undefined; date?: string | undefined; acceptedAt?: string | null | undefined; gate?: string | null | undefined; gateStatus?: string | null | undefined; amendsId?: string | null | undefined; filePath?: string | undefined; keywords?: string | null | undefined; topics?: string | null | undefined; }

SelectArchitectureDecision

{ id: string; title: string; status: string; supersedesId: string | null; supersededById: string | null; consensusManifestId: string | null; content: string; createdAt: string; updatedAt: string | null; date: string; acceptedAt: string | null; gate: string | null; gateStatus: string | null; amendsId: string | null; filePath: string; summary: string | null; keywords: string | null; topics: string | null; }

InsertManifestEntry

{ id: string; title: string; date: string; status: string; pipelineId?: string | null | undefined; stageId?: string | null | undefined; agentType?: string | null | undefined; outputFile?: string | null | undefined; topicsJson?: string | null | undefined; findingsJson?: string | null | undefined; linkedTasksJson?: string | null | undefined; createdBy?: string | null | undefined; createdAt?: string | undefined; }

SelectManifestEntry

{ id: string; pipelineId: string | null; stageId: string | null; title: string; date: string; status: string; agentType: string | null; outputFile: string | null; topicsJson: string | null; findingsJson: string | null; linkedTasksJson: string | null; createdBy: string | null; createdAt: string; }

InsertPipelineManifest

{ id: string; type: string; content: string; createdAt: string; sessionId?: string | null | undefined; taskId?: string | null | undefined; epicId?: string | null | undefined; contentHash?: string | null | undefined; status?: string | undefined; distilled?: boolean | undefined; brainObsId?: string | null | undefined; sourceFile?: string | null | undefined; metadataJson?: string | null | undefined; archivedAt?: string | null | undefined; }

SelectPipelineManifest

{ id: string; sessionId: string | null; taskId: string | null; epicId: string | null; type: string; content: string; contentHash: string | null; status: string; distilled: boolean; brainObsId: string | null; sourceFile: string | null; metadataJson: string | null; createdAt: string; archivedAt: string | null; }

InsertReleaseManifest

{ id: string; version: string; createdAt: string; status?: string | undefined; pipelineId?: string | null | undefined; epicId?: string | null | undefined; tasksJson?: string | undefined; changelog?: string | null | undefined; notes?: string | null | undefined; previousVersion?: string | null | undefined; commitSha?: string | null | undefined; gitTag?: string | null | undefined; npmDistTag?: string | null | undefined; preparedAt?: string | null | undefined; committedAt?: string | null | undefined; taggedAt?: string | null | undefined; pushedAt?: string | null | undefined; }

SelectReleaseManifest

{ id: string; version: string; status: string; pipelineId: string | null; epicId: string | null; tasksJson: string; changelog: string | null; notes: string | null; previousVersion: string | null; commitSha: string | null; gitTag: string | null; npmDistTag: string | null; createdAt: string; preparedAt: string | null; committedAt: string | null; taggedAt: string | null; pushedAt: string | null; }
{ id: string; taskId: string; providerId: string; externalId: string; externalUrl: string | null; externalTitle: string | null; linkType: string; syncDirection?: string | undefined; metadataJson?: string | null | undefined; linkedAt?: string | undefined; lastSyncAt?: string | null | undefined; }
{ id: string; taskId: string; providerId: string; externalId: string; externalUrl: string | null; externalTitle: string | null; linkType: string; syncDirection: string; metadataJson: string | null; linkedAt: string; lastSyncAt: string | null; }

InsertAgentInstance

{ id: string; agentType: string; status?: string | undefined; sessionId?: string | null | undefined; taskId?: string | null | undefined; startedAt?: string | undefined; lastHeartbeat?: string | undefined; stoppedAt?: string | null | undefined; errorCount?: number | undefined; totalTasksCompleted?: number | undefined; capacity?: string | undefined; metadataJson?: string | null | undefined; parentAgentId?: string | null | undefined; }

SelectAgentInstance

{ id: string; agentType: string; status: string; sessionId: string | null; taskId: string | null; startedAt: string; lastHeartbeat: string; stoppedAt: string | null; errorCount: number; totalTasksCompleted: number; capacity: string; metadataJson: string | null; parentAgentId: string | null; }

InsertAgentErrorLog

{ agentId: string; errorType: string; message: string; id?: number | undefined; stack?: string | null | undefined; occurredAt?: string | undefined; resolved?: boolean | undefined; }

SelectAgentErrorLog

{ id: number; agentId: string; errorType: string; message: string; stack: string | null; occurredAt: string; resolved: boolean; }

ManifestIntegrity

ManifestIntegrity

Severity

Severity

ComplianceMetrics

PropertyTypeRequiredDescription
timestampstringYestimestamp
categorystringYescategory
sourcestringYessource
sourceIdstringYessourceId
periodstringYesperiod
compliance{ compliancePassRate: number; ruleAdherenceScore: number; violationCount: number; violationSeverity: Severity; manifestIntegrity: ManifestIntegrity; }Yescompliance
tagsstring[]Yestags
context{ taskId: string; researchLinked: boolean; returnFormatValid: boolean; }Yescontext

ManifestEntry

PropertyTypeRequiredDescription
idstring | undefinedNoid
research_idstring | undefinedNoresearch_id
titlestring | undefinedNotitle
statusstring | undefinedNostatus
key_findingsstring[] | undefinedNokey_findings
findings_summarystring | undefinedNofindings_summary
linked_tasksstring[] | undefinedNolinked_tasks
task_idsstring[] | undefinedNotask_ids
agent_typestring | undefinedNoagent_type

TokenMetrics

PropertyTypeRequiredDescription
inputTokensnumberYesinputTokens
outputTokensnumberYesoutputTokens
totalTokensnumberYestotalTokens
maxTokensnumberYesmaxTokens
percentagenumberYespercentage
statusstringYesstatus

TokenEfficiency

PropertyTypeRequiredDescription
tokensUsednumberYestokensUsed
maxTokensnumberYesmaxTokens
tasksCompletednumberYestasksCompleted
contextUtilizationnumberYescontextUtilization
tokenUtilizationRatenumberYestokenUtilizationRate
contextEfficiencynumberYescontextEfficiency
inputTokensnumberYesinputTokens
outputTokensnumberYesoutputTokens

OrchestrationOverhead

PropertyTypeRequiredDescription
orchestratorTokensnumberYesorchestratorTokens
totalSubagentTokensnumberYestotalSubagentTokens
numSubagentsnumberYesnumSubagents
overheadRationumberYesoverheadRatio
tokensPerSubagentnumberYestokensPerSubagent

DriftIssue

PropertyTypeRequiredDescription
type"missing_from_index" | "orphaned_index" | "missing_from_wrapper" | "missing_from_readme"Yestype
severity"error" | "warning"Yesseverity
itemstringYesitem
messagestringYesmessage

DriftReport

PropertyTypeRequiredDescription
mode"full" | "quick"Yesmode
issuesDriftIssue[]Yesissues
exitCode0 | 1 | 2YesexitCode

CommandIndexEntry

PropertyTypeRequiredDescription
namestringYesname
scriptstring | undefinedNoscript
aliasForstring | null | undefinedNoaliasFor
notestring | null | undefinedNonote

CommandIndex

PropertyTypeRequiredDescription
commandsCommandIndexEntry[]Yescommands

SchemaVersions

PropertyTypeRequiredDescription
todostring | undefinedNotodo
configstring | undefinedNoconfig
archivestring | undefinedNoarchive
logstring | undefinedNolog

FileHashes

PropertyTypeRequiredDescription
'tasks.db'string | undefinedNo’tasks.db’
'config.json'string | undefinedNo’config.json’

ProjectCacheEntry

PropertyTypeRequiredDescription
pathstringYespath
lastValidatedstringYeslastValidated
validationStatus"warning" | "failed" | "passed"YesvalidationStatus
schemaVersionsSchemaVersionsYesschemaVersions
fileHashesFileHashesYesfileHashes
issuesstring[]Yesissues
ttlnumberYesttl

DoctorProjectCache

PropertyTypeRequiredDescription
versionstringYesversion
lastUpdatedstringYeslastUpdated
projectsRecord<string, ProjectCacheEntry>Yesprojects

ProjectDetail

PropertyTypeRequiredDescription
namestringYesname
pathstringYespath
status"warning" | "failed" | "orphaned" | "healthy"Yesstatus
issuesstring[] | undefinedNoissues
isTempbooleanYesisTemp
isOrphanedboolean | undefinedNoisOrphaned
reasonstring | undefinedNoreason

CategorizedProjects

PropertyTypeRequiredDescription
activeProjectDetail[]Yesactive
tempProjectDetail[]Yestemp
orphanedProjectDetail[]Yesorphaned

UserJourneyStage

UserJourneyStage

HealthSummary

PropertyTypeRequiredDescription
totalnumberYestotal
healthynumberYeshealthy
warningsnumberYeswarnings
failednumberYesfailed
orphanednumberYesorphaned
tempnumberYestemp

ValidationError

PropertyTypeRequiredDescription
fieldstring | undefinedNofield
messagestringYesmessage
severity"error" | "warning"Yesseverity
fixstring | undefinedNofix

ValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
errorsValidationError[]Yeserrors
warningsValidationError[]Yeswarnings

Task

PropertyTypeRequiredDescription
idstring | undefinedNoid
contentstring | undefinedNocontent
titlestring | undefinedNotitle
statusstring | undefinedNostatus
activeFormstring | undefinedNoactiveForm
created_atstring | undefinedNocreated_at
completed_atstring | undefinedNocompleted_at
parentIdstring | null | undefinedNoparentId
typestring | undefinedNotype
dependsstring[] | undefinedNodepends
cancelledAtstring | undefinedNocancelledAt
cancellationReasonstring | undefinedNocancellationReason

TaskData

Task data shape for validation functions.
PropertyTypeRequiredDescription
tasksTask[]Yestasks
project{ currentPhase?: string; phases?: Record<string, { status?: string; startedAt?: string; completedAt?: string; }>; } | undefinedNoproject

ArchiveData

Archive data shape for validation functions.
PropertyTypeRequiredDescription
archived_tasksTask[]Yesarchived_tasks

ComprehensiveValidationResult

PropertyTypeRequiredDescription
schemaErrorsnumberYesschemaErrors
semanticErrorsnumberYessemanticErrors
exitCodenumberYesexitCode
checks{ name: string; passed: boolean; message: string; }[]Yeschecks

ManifestDoc

PropertyTypeRequiredDescription
idstringYesid
filestringYesfile
titlestringYestitle
topicsstring[]Yestopics
linked_tasksstring[]Yeslinked_tasks
statusstringYesstatus

GapEntry

PropertyTypeRequiredDescription
typestringYestype
severitystringYesseverity
documentstringYesdocument
topicstringYestopic
fixstringYesfix

CoverageEntry

PropertyTypeRequiredDescription
documentstringYesdocument
topicstringYestopic

GapReport

PropertyTypeRequiredDescription
epicIdstringYesepicId
timestampstringYestimestamp
reviewDocsManifestDoc[]YesreviewDocs
gapsGapEntry[]Yesgaps
coverageCoverageEntry[]Yescoverage
status"no_review_docs" | "ready_to_archive" | "gaps_detected"Yesstatus
canArchivebooleanYescanArchive

ManifestEntry

PropertyTypeRequiredDescription
idstringYesid
filestringYesfile
titlestringYestitle
datestringYesdate
status"completed" | "blocked" | "partial"Yesstatus
agent_typestringYesagent_type
topicsstring[] | undefinedNotopics
key_findingsstring[] | undefinedNokey_findings
actionableboolean | undefinedNoactionable
needs_followupstring[] | undefinedNoneeds_followup
linked_tasksstring[] | undefinedNolinked_tasks

ManifestViolation

PropertyTypeRequiredDescription
requirementstringYesrequirement
severity"error" | "warning"Yesseverity
messagestringYesmessage
fixstring | undefinedNofix

ManifestValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
scorenumberYesscore
passbooleanYespass
agent_typestring | undefinedNoagent_type
violationsManifestViolation[]Yesviolations
notestring | undefinedNonote

ComplianceEntry

PropertyTypeRequiredDescription
timestampstringYestimestamp
source_idstringYessource_id
source_typestringYessource_type
compliance{ compliance_pass_rate: number; rule_adherence_score: number; violation_count: number; violation_severity: "none" | "warning" | "error"; manifest_integrity: "valid" | "violations_found"; }Yescompliance
efficiency{ input_tokens: number; output_tokens: number; context_utilization: number; token_utilization_rate: number; }Yesefficiency
_context{ agent_type: string; validation_score: number; violations: ManifestViolation[]; }Yes_context

ProtocolViolation

PropertyTypeRequiredDescription
requirementstringYesrequirement
severity"error" | "warning"Yesseverity
messagestringYesmessage
fixstring | undefinedNofix

ProtocolValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
violationsProtocolViolation[]Yesviolations
scorenumberYesscore

GateName

"implemented" | "testsPassed" | "qaPassed" | "cleanupDone" | "securityPassed" | "documented"

AgentName

"testing" | "security" | "planner" | "coder" | "qa" | "cleanup" | "docs"

FailureLogEntry

PropertyTypeRequiredDescription
gate"implemented" | "testsPassed" | "qaPassed" | "cleanupDone" | "securityPassed" | "documented"Yesgate
agentstringYesagent
reasonstringYesreason
timestampstringYestimestamp
roundnumberYesround

VerificationGates

PropertyTypeRequiredDescription
implementedboolean | nullYesimplemented
testsPassedboolean | nullYestestsPassed
qaPassedboolean | nullYesqaPassed
cleanupDoneboolean | nullYescleanupDone
securityPassedboolean | nullYessecurityPassed
documentedboolean | nullYesdocumented

Verification

PropertyTypeRequiredDescription
passedbooleanYespassed
roundnumberYesround
gatesVerificationGatesYesgates
lastAgentstring | nullYeslastAgent
lastUpdatedstringYeslastUpdated
failureLogFailureLogEntry[]YesfailureLog

VerificationStatus

VerificationStatus

CircularValidationResult

PropertyTypeRequiredDescription
validbooleanYesvalid
errorstring | undefinedNoerror
codenumber | undefinedNocode

TaskForVerification

PropertyTypeRequiredDescription
idstringYesid
statusstringYesstatus
parentIdstring | null | undefinedNoparentId
typestring | undefinedNotype
verificationVerification | null | undefinedNoverification
epicLifecyclestring | undefinedNoepicLifecycle

ProjectInfo

Fields consumed by logging, audit, and correlation subsystems.
PropertyTypeRequiredDescription
projectHashstringYes12-char SHA-256 hex of the normalized project path (per-install identity).
projectIdstringYesStable UUID that survives directory moves (added by T5333).
projectRootstringYesAbsolute path to the project root directory.
projectNamestringYesHuman-readable project name (last segment of projectRoot).

BackfillOptions

Options for backfillTasks().
PropertyTypeRequiredDescription
dryRunboolean | undefinedNoPreview changes only — do not modify the database. Default: false.
rollbackboolean | undefinedNoRevert a previous backfill (remove auto-generated AC + verification). Default: false.
taskIdsstring[] | undefinedNoRestrict backfill to specific task IDs. Default: all tasks.

BackfillTaskChange

Summary of what was (or would be) changed for a single task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
addedAcbooleanYesaddedAc
generatedAcstring[]YesgeneratedAc
addedVerificationbooleanYesaddedVerification
addedNotebooleanYesaddedNote
rolledBackstring[] | undefinedNoPopulated during rollback: fields that were cleared.

BackfillResult

Overall result returned by backfillTasks().
PropertyTypeRequiredDescription
dryRunbooleanYesdryRun
rollbackbooleanYesrollback
tasksScannednumberYestasksScanned
tasksChangednumberYestasksChanged
acAddednumberYesacAdded
verificationAddednumberYesverificationAdded
changesBackfillTaskChange[]Yeschanges

RequirementLevel

RFC 2119 requirement levels
RequirementLevel

ViolationSeverity

Violation severity
ViolationSeverity

ProtocolRule

Protocol rule definition
PropertyTypeRequiredDescription
idstringYesRule identifier (e.g., RSCH-001)
levelRequirementLevelYesRFC 2119 level
messagestringYesRule description
fixstringYesSuggested fix command
validate(manifestEntry: Record<string, unknown>, additionalData?: Record<string, unknown>) => Promise<boolean> | booleanNoValidation function

ProtocolViolation

Protocol violation result
PropertyTypeRequiredDescription
requirementstringYesrequirement
severityViolationSeverityYesseverity
messagestringYesmessage
fixstringYesfix

ProtocolValidationResult

Protocol validation result
PropertyTypeRequiredDescription
validbooleanYesvalid
violationsProtocolViolation[]Yesviolations
scorenumberYesscore

ErrorSeverity

Error severity levels for protocol/gate validation.
ErrorSeverity
PropertyTypeRequiredDescription
INFOErrorSeverity.INFOYesINFO
WARNINGErrorSeverity.WARNINGYesWARNING
ERRORErrorSeverity.ERRORYesERROR
CRITICALErrorSeverity.CRITICALYesCRITICAL

ErrorCategory

Error category for grouping protocol/gate violations.
ErrorCategory
PropertyTypeRequiredDescription
GENERALErrorCategory.GENERALYesGENERAL
HIERARCHYErrorCategory.HIERARCHYYesHIERARCHY
CONCURRENCYErrorCategory.CONCURRENCYYesCONCURRENCY
SESSIONErrorCategory.SESSIONYesSESSION
VERIFICATIONErrorCategory.VERIFICATIONYesVERIFICATION
CONTEXTErrorCategory.CONTEXTYesCONTEXT
PROTOCOLErrorCategory.PROTOCOLYesPROTOCOL
NEXUSErrorCategory.NEXUSYesNEXUS
LIFECYCLEErrorCategory.LIFECYCLEYesLIFECYCLE
SPECIALErrorCategory.SPECIALYesSPECIAL

ProtocolExitCode

Protocol-specific exit codes used by the RCASD-IVTR+C enforcement system. These map to the protocol violation range (60-70) and lifecycle enforcement range (80-84) defined in the protocol specification. The values here align with the protocol enforcement layer’s own exit code semantics, which differ from the canonical CLI exit codes in src/types/exit-codes.ts. The canonical CLI ExitCode enum at src/types/exit-codes.ts maps range 60-67 to orchestrator errors, while this enum maps them to protocol violations. Both are valid in their respective contexts — CLI vs protocol enforcement.
ProtocolExitCode
PropertyTypeRequiredDescription
SUCCESSProtocolExitCode.SUCCESSYesSUCCESS
E_GENERAL_ERRORProtocolExitCode.E_GENERAL_ERRORYesE_GENERAL_ERROR
E_INVALID_INPUTProtocolExitCode.E_INVALID_INPUTYesE_INVALID_INPUT
E_FILE_ERRORProtocolExitCode.E_FILE_ERRORYesE_FILE_ERROR
E_NOT_FOUNDProtocolExitCode.E_NOT_FOUNDYesE_NOT_FOUND
E_DEPENDENCY_ERRORProtocolExitCode.E_DEPENDENCY_ERRORYesE_DEPENDENCY_ERROR
E_VALIDATION_ERRORProtocolExitCode.E_VALIDATION_ERRORYesE_VALIDATION_ERROR
E_PARENT_NOT_FOUNDProtocolExitCode.E_PARENT_NOT_FOUNDYesE_PARENT_NOT_FOUND
E_DEPTH_EXCEEDEDProtocolExitCode.E_DEPTH_EXCEEDEDYesE_DEPTH_EXCEEDED
E_SIBLING_LIMITProtocolExitCode.E_SIBLING_LIMITYesE_SIBLING_LIMIT
E_CIRCULAR_REFERENCEProtocolExitCode.E_CIRCULAR_REFERENCEYesE_CIRCULAR_REFERENCE
E_SESSION_REQUIREDProtocolExitCode.E_SESSION_REQUIREDYesE_SESSION_REQUIRED
E_PROTOCOL_RESEARCHProtocolExitCode.E_PROTOCOL_RESEARCHYesE_PROTOCOL_RESEARCH
E_PROTOCOL_CONSENSUSProtocolExitCode.E_PROTOCOL_CONSENSUSYesE_PROTOCOL_CONSENSUS
E_PROTOCOL_SPECIFICATIONProtocolExitCode.E_PROTOCOL_SPECIFICATIONYesE_PROTOCOL_SPECIFICATION
E_PROTOCOL_DECOMPOSITIONProtocolExitCode.E_PROTOCOL_DECOMPOSITIONYesE_PROTOCOL_DECOMPOSITION
E_PROTOCOL_IMPLEMENTATIONProtocolExitCode.E_PROTOCOL_IMPLEMENTATIONYesE_PROTOCOL_IMPLEMENTATION
E_PROTOCOL_CONTRIBUTIONProtocolExitCode.E_PROTOCOL_CONTRIBUTIONYesE_PROTOCOL_CONTRIBUTION
E_PROTOCOL_RELEASEProtocolExitCode.E_PROTOCOL_RELEASEYesE_PROTOCOL_RELEASE
E_PROTOCOL_GENERICProtocolExitCode.E_PROTOCOL_GENERICYesE_PROTOCOL_GENERIC
E_PROTOCOL_VALIDATIONProtocolExitCode.E_PROTOCOL_VALIDATIONYesE_PROTOCOL_VALIDATION
E_TESTS_SKIPPEDProtocolExitCode.E_TESTS_SKIPPEDYesE_TESTS_SKIPPED
E_LIFECYCLE_GATE_FAILEDProtocolExitCode.E_LIFECYCLE_GATE_FAILEDYesE_LIFECYCLE_GATE_FAILED

ProtocolRequest

Request shape used by the protocol enforcement system. Minimal interface matching the fields needed by ProtocolEnforcer.
PropertyTypeRequiredDescription
gateway"query" | "mutate"Yesgateway
domainstringYesdomain
operationstringYesoperation
paramsRecord<string, unknown> | undefinedNoparams

ProtocolResponse

Response shape used by the protocol enforcement system.
PropertyTypeRequiredDescription
_meta{ [key: string]: unknown; gateway: string; domain: string; operation: string; timestamp: string; duration_ms: number; }Yes_meta
successbooleanYessuccess
dataunknownYesdata
partialboolean | undefinedNopartial
error{ code: string; exitCode?: number; message: string; details?: Record<string, unknown>; fix?: string; alternatives?: Array<{ action: string; command: string; }>; } | undefinedNoerror

ProtocolType

Protocol types aligned with RCASD-IVTR+C lifecycle
ProtocolType
PropertyTypeRequiredDescription
RESEARCHProtocolType.RESEARCHYesRESEARCH
CONSENSUSProtocolType.CONSENSUSYesCONSENSUS
SPECIFICATIONProtocolType.SPECIFICATIONYesSPECIFICATION
DECOMPOSITIONProtocolType.DECOMPOSITIONYesDECOMPOSITION
IMPLEMENTATIONProtocolType.IMPLEMENTATIONYesIMPLEMENTATION
CONTRIBUTIONProtocolType.CONTRIBUTIONYesCONTRIBUTION
RELEASEProtocolType.RELEASEYesRELEASE
VALIDATIONProtocolType.VALIDATIONYesVALIDATION
TESTINGProtocolType.TESTINGYesTESTING

ViolationLogEntry

Violation log entry
PropertyTypeRequiredDescription
timestampstringYestimestamp
taskIdstring | undefinedNotaskId
protocolProtocolTypeYesprotocol
violationsProtocolViolation[]Yesviolations
scorenumberYesscore
blockedbooleanYesblocked

ChainFindCriteria

PropertyTypeRequiredDescription
querystring | undefinedNoquery
category"custom" | "research" | "consensus" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution" | "architecture" | undefinedNocategory
tesserastring | undefinedNotessera
archetypestring | undefinedNoarchetype
limitnumber | undefinedNolimit

ProtocolViolation

Protocol violation entry.
PropertyTypeRequiredDescription
requirementstringYesrequirement
severity"error" | "warning"Yesseverity
messagestringYesmessage
fixstringYesfix

ProtocolValidationResult

Protocol validation result.
PropertyTypeRequiredDescription
validbooleanYesvalid
protocolstringYesprotocol
violationsProtocolViolation[]Yesviolations
scorenumberYesscore

ManifestEntryInput

Manifest entry structure for validation.
PropertyTypeRequiredDescription
idstring | undefinedNoid
filestring | undefinedNofile
titlestring | undefinedNotitle
datestring | undefinedNodate
statusstring | undefinedNostatus
agent_typestring | undefinedNoagent_type
topicsstring[] | undefinedNotopics
key_findingsstring[] | undefinedNokey_findings
actionableboolean | undefinedNoactionable
needs_followupstring[] | undefinedNoneeds_followup
linked_tasksstring[] | undefinedNolinked_tasks
sourcesstring[] | undefinedNosources

ProtocolType

"research" | "consensus" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution" | "provenance" | "artifact-publish" | "architecture-decision"

VotingMatrix

PropertyTypeRequiredDescription
options{ name: string; confidence: number; rationale?: string; }[]Nooptions
thresholdnumber | undefinedNothreshold

AdrStatus

ADR lifecycle status values. T260
AdrStatus

ArchitectureDecisionOptions

Architecture decision options for validator.
PropertyTypeRequiredDescription
adrContentstring | undefinedNoContent of the ADR markdown document, used to verify required sections.
statusAdrStatus | undefinedNoCurrent status of the decision record.
hitlReviewedboolean | undefinedNoWhether a human-in-the-loop review has been completed (ADR-003).
downstreamFlaggedboolean | undefinedNoWhether downstream artifacts are flagged for review after supersession.
persistedInDbboolean | undefinedNoWhether the record is persisted in the canonical SQLite decisions table.

ValidationStageOptions

Validation-stage options for validator.
PropertyTypeRequiredDescription
specMatchConfirmedboolean | undefinedNoWhether static analysis / type check passed (VALID-001).
testSuitePassedboolean | undefinedNoWhether the existing test suite ran successfully (VALID-002).
protocolComplianceCheckedboolean | undefinedNoWhether upstream protocol compliance checks passed (VALID-003).

TestFramework

Project-agnostic test framework identifiers. The testing protocol is deliberately framework-neutral. Whichever framework the project uses, the protocol only cares that tests run autonomously via a framework adapter and loop until the spec is met. T260
TestFramework

TestingOptions

Testing-stage options for validator.
PropertyTypeRequiredDescription
frameworkTestFramework | undefinedNoDetected or declared test framework for the current worktree.
testsRunnumber | undefinedNoTotal number of tests executed.
testsPassednumber | undefinedNoNumber of tests that passed.
testsFailednumber | undefinedNoNumber of tests that failed.
coveragePercentnumber | undefinedNoCoverage percentage achieved (0-100).
coverageThresholdnumber | undefinedNoMinimum coverage threshold from project config.
ivtLoopConvergedboolean | undefinedNoWhether the implementation→validate→test loop converged (spec met).
ivtLoopIterationsnumber | undefinedNoNumber of IVT loop iterations until convergence.

BrainMaintenanceDecayResult

Temporal decay step result subset used in maintenance output.
PropertyTypeRequiredDescription
affectednumberYesNumber of learnings whose confidence was updated.

BrainMaintenanceConsolidationResult

Memory consolidation step result subset used in maintenance output.
PropertyTypeRequiredDescription
mergednumberYesNumber of new summary observations created.
removednumberYesNumber of original observations archived.

BrainMaintenanceReconciliationResult

Orphaned reference reconciliation step result.
PropertyTypeRequiredDescription
decisionsFixednumberYesDecisions with stale task/epic references fixed.
observationsFixednumberYesObservations with stale session references fixed.
linksRemovednumberYesMemory links with stale task references removed.

BrainMaintenanceEmbeddingsResult

Embedding backfill step result.
PropertyTypeRequiredDescription
processednumberYesObservations successfully embedded.
skippednumberYesObservations skipped (no provider or no narrative).
errorsnumberYesObservations that failed embedding.

BrainMaintenanceResult

Aggregated result from a full brain maintenance run. All counts are zero when a step is skipped via the corresponding skip* option.
PropertyTypeRequiredDescription
decayBrainMaintenanceDecayResultYesResults from the temporal decay step.
consolidationBrainMaintenanceConsolidationResultYesResults from the memory consolidation step.
reconciliationBrainMaintenanceReconciliationResultYesResults from the cross-DB orphaned reference reconciliation step.
embeddingsBrainMaintenanceEmbeddingsResultYesResults from the embedding backfill step.
durationnumberYesTotal wall-clock duration of the maintenance run in milliseconds.

BrainMaintenanceOptions

Options for runBrainMaintenance. All skip* flags default to false — the full maintenance pass runs unless specific steps are disabled.
PropertyTypeRequiredDescription
skipDecayboolean | undefinedNoSkip the temporal decay step. Default: false.
skipConsolidationboolean | undefinedNoSkip the memory consolidation step. Default: false.
skipReconciliationboolean | undefinedNoSkip the cross-DB orphaned reference reconciliation step. Default: false.
skipEmbeddingsboolean | undefinedNoSkip the embedding backfill step. Default: false.
onProgress((step: string, current: number, total: number) => void) | undefinedNoProgress callback invoked before each step starts and after completion of each sub-item.

ClaudeMemMigrationResult

Result from a claude-mem migration run.
PropertyTypeRequiredDescription
observationsImportednumberYesobservationsImported
observationsSkippednumberYesobservationsSkipped
learningsImportednumberYeslearningsImported
decisionsImportednumberYesdecisionsImported
errorsstring[]Yeserrors
dryRunbooleanYesdryRun

ClaudeMemMigrationOptions

Options for the claude-mem migration.
PropertyTypeRequiredDescription
sourcePathstring | undefinedNoPath to claude-mem.db. Default: ~/.claude-mem/claude-mem.db
projectstring | undefinedNoProject tag for imported entries.
dryRunboolean | undefinedNoIf true, count what would be imported without inserting.
batchSizenumber | undefinedNoNumber of rows to insert per transaction batch. Default: 100.

BlockerNode

PropertyTypeRequiredDescription
taskIdstringYestaskId
statusstringYesstatus
reasonstring | undefinedNoreason
decisionsBrainDecisionNode[]Yesdecisions

CausalTrace

PropertyTypeRequiredDescription
taskIdstringYestaskId
blockersBlockerNode[]Yesblockers
rootCausesstring[]YesrootCauses
depthnumberYesdepth

SimilarEntry

PropertyTypeRequiredDescription
idstringYesid
distancenumberYesdistance
typestringYestype
titlestringYestitle
textstringYestext

ManifestEntry

ExtendedManifestEntry

ModelProviderLookup

PropertyTypeRequiredDescription
providerstring | undefinedNoprovider
source"none" | "model-prefix" | "models.dev-exact" | "models.dev-suffix"Yessource
candidatesstring[] | undefinedNocandidates

TokenMethod

TokenMethod

TokenConfidence

TokenConfidence

TokenTransport

TokenTransport

TokenExchangeInput

PropertyTypeRequiredDescription
requestPayloadunknownYesrequestPayload
responsePayloadunknownYesresponsePayload
providerstring | undefinedNoprovider
modelstring | undefinedNomodel
transportTokenTransport | undefinedNotransport
gatewaystring | undefinedNogateway
domainstring | undefinedNodomain
operationstring | undefinedNooperation
sessionIdstring | undefinedNosessionId
taskIdstring | undefinedNotaskId
requestIdstring | undefinedNorequestId
cwdstring | undefinedNocwd
metadataRecord<string, unknown> | undefinedNometadata

TokenMeasurement

PropertyTypeRequiredDescription
inputCharsnumberYesinputChars
outputCharsnumberYesoutputChars
inputTokensnumberYesinputTokens
outputTokensnumberYesoutputTokens
totalTokensnumberYestotalTokens
methodTokenMethodYesmethod
confidenceTokenConfidenceYesconfidence
providerstringYesprovider
modelstring | undefinedNomodel
requestHashstring | undefinedNorequestHash
responseHashstring | undefinedNoresponseHash
metadataRecord<string, unknown>Yesmetadata

TokenUsageFilters

PropertyTypeRequiredDescription
providerstring | undefinedNoprovider
transportTokenTransport | undefinedNotransport
gatewaystring | undefinedNogateway
domainstring | undefinedNodomain
operationstring | undefinedNooperation
sessionIdstring | undefinedNosessionId
taskIdstring | undefinedNotaskId
methodTokenMethod | undefinedNomethod
confidenceTokenConfidence | undefinedNoconfidence
requestIdstring | undefinedNorequestId
sincestring | undefinedNosince
untilstring | undefinedNountil
limitnumber | undefinedNolimit
offsetnumber | undefinedNooffset

TokenUsageSummary

PropertyTypeRequiredDescription
totalRecordsnumberYestotalRecords
inputTokensnumberYesinputTokens
outputTokensnumberYesoutputTokens
totalTokensnumberYestotalTokens
byMethod{ method: string; count: number; totalTokens: number; }[]YesbyMethod
byTransport{ transport: string; count: number; totalTokens: number; }[]YesbyTransport
byOperation{ key: string; count: number; totalTokens: number; }[]YesbyOperation

SkillEntry

PropertyTypeRequiredDescription
namestringYesname
pathstringYespath
hasSkillFilebooleanYeshasSkillFile
descriptionstringYesdescription

SkillContent

PropertyTypeRequiredDescription
skillstringYesskill
contentstringYescontent
contentLengthnumberYescontentLength
estimatedTokensnumberYesestimatedTokens
references{ name: string; path: string; }[]Yesreferences
pathstringYespath

HighImpactTask

PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
wouldUnblocknumberYeswouldUnblock
dependentsstring[]Yesdependents

SingleBlockerTask

PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
remainingBlockerPick<TaskRef, "id" | "title">YesremainingBlocker

CommonBlocker

PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
blocksCountnumberYesblocksCount
blockedTasksstring[]YesblockedTasks

UnblockResult

PropertyTypeRequiredDescription
highImpactHighImpactTask[]YeshighImpact
singleBlockerSingleBlockerTask[]YessingleBlocker
commonBlockersCommonBlocker[]YescommonBlockers

ValidationIssue

PropertyTypeRequiredDescription
codestringYescode
messagestringYesmessage
severitystringYesseverity

SpawnValidationResult

PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
readybooleanYesready
issuesValidationIssue[]Yesissues

ContextInjectionData

Data returned by context injection.
PropertyTypeRequiredDescription
protocolTypestringYesprotocolType
contentstringYescontent
pathstring | nullYespath
contentLengthnumberYescontentLength
estimatedTokensnumberYesestimatedTokens
taskIdstring | nullYestaskId
variantstring | nullYesvariant

CancelResult

Result of a cancel operation.
PropertyTypeRequiredDescription
successbooleanYessuccess
taskIdstringYestaskId
reasonstring | undefinedNoreason
cancelledAtstring | undefinedNocancelledAt
error{ code: string; message: string; } | undefinedNoerror

FlatTreeNode

Tree node representation for task hierarchy.
PropertyTypeRequiredDescription
idstringYesUnique task identifier (e.g. “T001”).
titlestringYesHuman-readable task title.
statusstringYesCurrent task status (e.g. “pending”, “done”).
typestring | undefinedNoTask type classification.
childrenFlatTreeNode[]YesChild nodes in the hierarchy tree.

ComplexityFactor

Complexity factor contributing to a task’s size estimate.
PropertyTypeRequiredDescription
namestringYesFactor name (e.g. “descriptionLength”, “dependencyDepth”).
valuenumberYesNumeric score contribution from this factor.
detailstringYesHuman-readable explanation of the score (e.g. “short (42 chars)”).

AnalysisResult

PropertyTypeRequiredDescription
autoStartedboolean | undefinedNoautoStarted

StoreEngine

Store engine type. SQLite is the only supported engine (ADR-006). T4647
"sqlite"

TaskFilters

Common task filter options.
PropertyTypeRequiredDescription
status"active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefinedNostatus
parentIdstring | null | undefinedNoparentId
typeTaskType | undefinedNotype
phasestring | undefinedNophase
limitnumber | undefinedNolimit

SessionFilters

Common session filter options.
PropertyTypeRequiredDescription
activeboolean | undefinedNoactive
limitnumber | undefinedNolimit

StoreProvider

Store provider interface. Backed by SQLite (ADR-006 canonical storage).
PropertyTypeRequiredDescription
engine"sqlite"Yesengine
createTask(task: Task) => Promise<Task>YescreateTask
getTask(taskId: string) => Promise<Task | null>YesgetTask
updateTask(taskId: string, updates: Partial<Task>) => Promise<Task | null>YesupdateTask
deleteTask(taskId: string) => Promise<boolean>YesdeleteTask
listTasks(filters?: TaskFilters) => Promise<Task[]>NolistTasks
findTasks(query: string, limit?: number) => Promise<Task[]>NofindTasks
archiveTask(taskId: string, reason?: string) => Promise<boolean>NoarchiveTask
createSession(session: Session) => Promise<Session>YescreateSession
getSession(sessionId: string) => Promise<Session | null>YesgetSession
updateSession(sessionId: string, updates: Partial<Session>) => Promise<Session | null>YesupdateSession
listSessions(filters?: SessionFilters) => Promise<Session[]>NolistSessions
endSession(sessionId: string, note?: string) => Promise<Session | null>NoendSession
startTaskOnSession(sessionId: string, taskId: string) => Promise<void>YesstartTaskOnSession
getCurrentTaskForSession(sessionId: string) => Promise<{ taskId: string | null; since: string | null; }>YesgetCurrentTaskForSession
stopTaskOnSession(sessionId: string) => Promise<void>YesstopTaskOnSession
close() => Promise<void>Yesclose
addTask(options: AddTaskOptions) => Promise<AddTaskResult>YesAdd a task with full validation, ID generation, and logging.
completeTask(options: CompleteTaskOptions) => Promise<CompleteTaskResult>YesComplete a task with dependency checks and optional auto-completion.
richUpdateTask(options: UpdateTaskOptions) => Promise<UpdateTaskResult>YesUpdate a task with rich options (addLabels, removeDepends, etc.).
showTask(taskId: string) => Promise<Task>YesShow a task by ID (throws CleoError if not found).
richDeleteTask(options: DeleteTaskOptions) => Promise<DeleteTaskResult>YesDelete a task with force/cascade options.
richFindTasks(options: FindTasksOptions) => Promise<FindTasksResult>YesFind tasks with fuzzy/ID/exact search and filtering.
richListTasks(options: ListTasksOptions) => Promise<ListTasksResult>YesList tasks with full filtering and pagination.
richArchiveTasks(options: ArchiveTasksOptions) => Promise<ArchiveTasksResult>YesArchive tasks in batch with filtering options.
startSession(options: { name: string; scope: string; autoStart?: boolean; startTask?: string; agent?: string; }) => Promise<Session>NoStart a new session with scope, auto-start, etc.
richEndSession(options?: { sessionId?: string; note?: string; }) => Promise<Session>NoEnd a session, optionally by ID with a note.
sessionStatus() => Promise<Session | null>YesGet the current active session status.
resumeSession(sessionId: string) => Promise<Session>YesResume a previously ended session.
richListSessions(options?: { status?: string; limit?: number; }) => Promise<Session[]>NoList sessions with status/limit filters.
gcSessions(maxAgeHours?: number) => Promise<{ orphaned: string[]; removed: string[]; }>NoGarbage collect old sessions.
currentTask() => Promise<TaskCurrentResult>YesShow current task work state.
startTask(taskId: string) => Promise<TaskStartResult>YesStart working on a task by ID.
stopTask() => Promise<{ previousTask: string | null; }>YesStop working on the current task.
getWorkHistory() => Promise<TaskWorkHistoryEntry[]>YesGet task work history.
listLabels() => Promise<Array<{ label: string; count: number; statuses: Record<string, number>; }>>YesList all labels with task counts.
showLabelTasks(label: string) => Promise<Record<string, unknown>>YesShow tasks with a specific label.
getLabelStats() => Promise<Record<string, unknown>>YesGet detailed label statistics.
suggestRelated(taskId: string, opts?: { threshold?: number; }) => Promise<Record<string, unknown>>NoSuggest related tasks based on shared attributes.
addRelation(from: string, to: string, type: string, reason: string) => Promise<Record<string, unknown>>YesAdd a relationship between two tasks.
discoverRelated(taskId: string) => Promise<Record<string, unknown>>YesDiscover related tasks using various methods.
listRelations(taskId: string) => Promise<Record<string, unknown>>YesList existing relations for a task.
analyzeTaskPriority(opts?: { autoStart?: boolean; }) => Promise<AnalysisResult>NoAnalyze task priority with leverage scoring.

MigrationResult

Migration result.
PropertyTypeRequiredDescription
successbooleanYessuccess
tasksImportednumberYestasksImported
archivedImportednumberYesarchivedImported
sessionsImportednumberYessessionsImported
errorsstring[]Yeserrors
warningsstring[]Yeswarnings
existingCounts{ tasks: number; archived: number; sessions: number; } | undefinedNoexistingCounts
jsonCounts{ tasks: number; archived: number; sessions: number; } | undefinedNojsonCounts

MigrationOptions

Options for migration.
PropertyTypeRequiredDescription
forceboolean | undefinedNoforce
dryRunboolean | undefinedNodryRun

RepairAction

A single repair action with status.
PropertyTypeRequiredDescription
actionstringYesaction
status"skipped" | "applied" | "preview"Yesstatus
detailsstringYesdetails

UpgradeAction

A single upgrade action with status.
PropertyTypeRequiredDescription
actionstringYesaction
status"error" | "skipped" | "applied" | "preview"Yesstatus
detailsstringYesdetails
reasonstring | undefinedNoreason
fixstring | undefinedNofix

UpgradeResult

Full upgrade result.
PropertyTypeRequiredDescription
successbooleanYessuccess
upToDatebooleanYesupToDate
dryRunbooleanYesdryRun
actionsUpgradeAction[]Yesactions
appliednumberYesapplied
errorsstring[]Yeserrors
summaryUpgradeSummary | undefinedNoSummary of what was checked (added for —diagnose and bare upgrade).
storageMigration{ migrated: boolean; tasksImported: number; archivedImported: number; sessionsImported: number; warnings: string[]; } | undefinedNoStorage migration sub-result (if migration was triggered).

UpgradeSummary

Counts of what upgrade checked/applied/skipped.
PropertyTypeRequiredDescription
checkednumberYeschecked
appliednumberYesapplied
skippednumberYesskipped
errorsnumberYeserrors
warningsstring[]Yeswarnings

DiagnoseFinding

A single diagnostic finding from —diagnose.
PropertyTypeRequiredDescription
checkstringYescheck
status"error" | "warning" | "ok"Yesstatus
detailsstringYesdetails
fixstring | undefinedNofix

DiagnoseResult

Result from diagnoseUpgrade().
PropertyTypeRequiredDescription
successbooleanYessuccess
findingsDiagnoseFinding[]Yesfindings
summary{ ok: number; warnings: number; errors: number; }Yessummary

GateLayer

Gate layer enumeration
GateLayer
PropertyTypeRequiredDescription
SCHEMAGateLayer.SCHEMAYesSCHEMA
SEMANTICGateLayer.SEMANTICYesSEMANTIC
REFERENTIALGateLayer.REFERENTIALYesREFERENTIAL
PROTOCOLGateLayer.PROTOCOLYesPROTOCOL

GateStatus

Gate status for each layer
GateStatus
PropertyTypeRequiredDescription
PENDINGGateStatus.PENDINGYesPENDING
PASSEDGateStatus.PASSEDYesPASSED
FAILEDGateStatus.FAILEDYesFAILED
BLOCKEDGateStatus.BLOCKEDYesBLOCKED
SKIPPEDGateStatus.SKIPPEDYesSKIPPED

GateViolation

Violation detail for a specific gate layer
PropertyTypeRequiredDescription
layerGateLayerYeslayer
severityErrorSeverityYesseverity
codestringYescode
messagestringYesmessage
fieldstring | undefinedNofield
valueunknownYesvalue
constraintstring | undefinedNoconstraint
fixstring | undefinedNofix

LayerResult

Result from a single gate layer validation
PropertyTypeRequiredDescription
layerGateLayerYeslayer
statusGateStatusYesstatus
passedbooleanYespassed
violationsGateViolation[]Yesviolations
duration_msnumberYesduration_ms

VerificationResult

Complete verification result across all 4 layers
PropertyTypeRequiredDescription
passedbooleanYespassed
layersRecord<GateLayer, LayerResult>Yeslayers
totalViolationsnumberYestotalViolations
exitCodeProtocolExitCodeYesexitCode
categoryErrorCategoryYescategory
summarystringYessummary
blockedAtGateLayer | undefinedNoblockedAt

OperationContext

Operation context for gate validation
PropertyTypeRequiredDescription
domainstringYesdomain
operationstringYesoperation
gateway"query" | "mutate"Yesgateway
paramsRecord<string, unknown> | undefinedNoparams
taskIdstring | undefinedNotaskId
protocolTypeProtocolType | undefinedNoprotocolType

WorkflowGateName

Workflow gate names per protocol specification Section 7.1 T3141
WorkflowGateName
PropertyTypeRequiredDescription
IMPLEMENTEDWorkflowGateName.IMPLEMENTEDYesIMPLEMENTED
TESTS_PASSEDWorkflowGateName.TESTS_PASSEDYesTESTS_PASSED
QA_PASSEDWorkflowGateName.QA_PASSEDYesQA_PASSED
CLEANUP_DONEWorkflowGateName.CLEANUP_DONEYesCLEANUP_DONE
SECURITY_PASSEDWorkflowGateName.SECURITY_PASSEDYesSECURITY_PASSED
DOCUMENTEDWorkflowGateName.DOCUMENTEDYesDOCUMENTED

WorkflowGateStatus

Workflow gate status values per Section 7.3
WorkflowGateStatus

WorkflowGateAgent

Agent responsible for each gate per Section 7.2
WorkflowGateAgent

WorkflowGateDefinition

Individual workflow gate definition per Section 7.2
PropertyTypeRequiredDescription
nameWorkflowGateNameYesname
agentWorkflowGateAgentYesagent
dependsOnWorkflowGateName[]YesdependsOn
descriptionstringYesdescription

WorkflowGateState

State of a single workflow gate
PropertyTypeRequiredDescription
nameWorkflowGateNameYesname
statusWorkflowGateStatusYesstatus
agentWorkflowGateAgentYesagent
updatedAtstring | nullYesupdatedAt
failureReasonstring | undefinedNofailureReason

JsonSchemaType

JsonSchemaType

JsonSchemaProperty

PropertyTypeRequiredDescription
typeJsonSchemaTypeYestype
descriptionstringYesdescription
enumreadonly string[] | undefinedNoenum
items{ type: JsonSchemaType; } | undefinedNoitems

JSONSchemaObject

PropertyTypeRequiredDescription
type"object"Yestype
propertiesRecord<string, JsonSchemaProperty>Yesproperties
requiredstring[]Yesrequired

CommanderArgSplit

PropertyTypeRequiredDescription
positionalsParamDef[]YesParams that map to .argument('<name>') or .argument('[name]').
optionsParamDef[]YesParams that map to .option(...) calls.

ValidationResult

Validation result
PropertyTypeRequiredDescription
validbooleanYesvalid
errorsValidationError[]Yeserrors

ValidationError

Individual validation error
PropertyTypeRequiredDescription
pathstringYespath
messagestringYesmessage
keywordstringYeskeyword
paramsRecord<string, unknown>Yesparams

SchemaType

Schema types that can be validated via AJV/JSON Schema. SQLite-backed types (todo, archive, log, sessions) use drizzle-zod validation instead.
"config"

ComplianceEntry

Compliance entry stored in COMPLIANCE.jsonl
PropertyTypeRequiredDescription
timestampstringYestimestamp
taskIdstringYestaskId
protocolstringYesprotocol
result"pass" | "fail" | "partial"Yesresult
violations{ code: string; message: string; severity: "error" | "warning"; }[] | undefinedNoviolations
linkedTaskstring | undefinedNolinkedTask
agentstring | undefinedNoagent

CoherenceIssue

Coherence issue found during graph validation.
PropertyTypeRequiredDescription
typestringYestype
taskIdstringYestaskId
messagestringYesmessage
severity"error" | "info" | "warning"Yesseverity

ValidateCheckDetail

PropertyTypeRequiredDescription
checkstringYescheck
status"error" | "warning" | "ok"Yesstatus
messagestringYesmessage

ValidateReportResult

PropertyTypeRequiredDescription
validbooleanYesvalid
schemaVersionstringYesschemaVersion
errorsnumberYeserrors
warningsnumberYeswarnings
detailsValidateCheckDetail[]Yesdetails

ValidateAndFixResult

Result from validate + fix operation.
PropertyTypeRequiredDescription
repairsAppliednumberYesrepairsApplied
repairsRepairAction[]Yesrepairs

CriticalPathNode

PropertyTypeRequiredDescription
taskIdstringYestaskId
titlestringYestitle
statusstringYesstatus
sizestringYessize
blockerCountnumberYesblockerCount

CriticalPathResult

PropertyTypeRequiredDescription
pathCriticalPathNode[]Yespath
lengthnumberYeslength
totalEffortnumberYestotalEffort
completedInPathnumberYescompletedInPath
remainingInPathnumberYesremainingInPath

SkillsPrecedenceConfig

Configuration for skill precedence resolution across providers.
PropertyTypeRequiredDescription
defaultPrecedenceSkillsPrecedence | undefinedNoDefault precedence mode when no provider-specific override exists.
providerOverridesRecord<string, SkillsPrecedence> | undefinedNoPer-provider precedence overrides (provider ID - precedence).

ResolvedSkillPath

A resolved skill path with full provenance metadata.
PropertyTypeRequiredDescription
pathstringYesAbsolute filesystem path to the skill directory.
source"marketplace" | "agents" | "vendor"YesWhere the skill was sourced from.
scope"project" | "global"YesWhether this is a global or project-scoped skill.
precedenceSkillsPrecedenceYesThe precedence mode that selected this path.
providerIdstringYesThe provider that owns this skill path.

SkillInstallationContext

Context for a skill installation operation.
PropertyTypeRequiredDescription
skillNamestringYesName of the skill being installed.
sourcestringYesSource URL or path to install from.
targetProvidersstring[]YesProvider IDs to install the skill for.
precedenceModeSkillsPrecedence | undefinedNoPrecedence mode for the installation.
projectRootstring | undefinedNoProject root for project-scoped installations.

InProgressEpic

In-progress epic entry.
PropertyTypeRequiredDescription
epicIdstringYesepicId
epicTitlestringYesepicTitle
activeTasksnumberYesactiveTasks
completionPercentnumberYescompletionPercent

ReadyTask

Ready task entry with leverage analysis.
PropertyTypeRequiredDescription
epicIdstringYesepicId
leveragenumberYesleverage
scorenumberYesscore
reasonsstring[]Yesreasons

BlockedTask

Blocked task entry.
PropertyTypeRequiredDescription
blockedBystring[]YesblockedBy
blocksCountnumberYesblocksCount

OpenBug

Open bug entry.
PropertyTypeRequiredDescription
epicIdstringYesepicId

PlanMetrics

Planning metrics.
PropertyTypeRequiredDescription
totalEpicsnumberYestotalEpics
activeEpicsnumberYesactiveEpics
totalTasksnumberYestotalTasks
actionablenumberYesactionable
blockednumberYesblocked
openBugsnumberYesopenBugs
avgLeveragenumberYesavgLeverage

PlanResult

Composite planning view result.
PropertyTypeRequiredDescription
inProgressInProgressEpic[]YesinProgress
readyReadyTask[]Yesready
blockedBlockedTask[]Yesblocked
openBugsOpenBug[]YesopenBugs
metricsPlanMetricsYesmetrics

RcasdIndex

RCASD-INDEX.json top-level structure.
PropertyTypeRequiredDescription
$schemastringYes$schema
_metaIndexMetaYes_meta
authoritiesRecord<string, string>Yesauthorities
taskAnchoredRecord<string, TaskAnchor>YestaskAnchored
specsSpecEntry[]Yesspecs
reportsReportEntry[]Yesreports
pipelinePipelineState | undefinedNopipeline
recentChangesChangeEntry[] | undefinedNorecentChanges

IndexMeta

Index metadata.
PropertyTypeRequiredDescription
versionstringYesversion
lastUpdatedstringYeslastUpdated
totalsIndexTotalsYestotals
checksumstring | undefinedNochecksum

IndexTotals

Aggregate counts.
PropertyTypeRequiredDescription
tasksnumberYestasks
specsnumberYesspecs
reportsnumberYesreports
activeResearchnumberYesactiveResearch
pendingConsensusnumberYespendingConsensus

TaskAnchor

Task-anchored RCASD artifact reference.
PropertyTypeRequiredDescription
shortNamestringYesshortName
directorystringYesdirectory
specstring | undefinedNospec
reportstring | undefinedNoreport
status"active" | "completed" | "failed" | "archived" | "paused" | undefinedNostatus
pipelineStagestringYespipelineStage
createdAtstring | undefinedNocreatedAt
updatedAtstring | undefinedNoupdatedAt

SpecEntry

Specification entry.
PropertyTypeRequiredDescription
filestringYesfile
versionstringYesversion
status"DRAFT" | "APPROVED" | "ACTIVE" | "IMMUTABLE" | "DEPRECATED"Yesstatus
domainstringYesdomain
taskIdstringYestaskId
lastUpdatedstringYeslastUpdated
categorystring | undefinedNocategory
shortNamestring | undefinedNoshortName
synopsisstring | undefinedNosynopsis

ReportEntry

Report entry.
PropertyTypeRequiredDescription
filestringYesfile
relatedSpecstringYesrelatedSpec
taskIdstringYestaskId
progressstringYesprogress
lastUpdatedstringYeslastUpdated
phasestring | undefinedNophase
notesstring | undefinedNonotes

PipelineState

Pipeline state.
PropertyTypeRequiredDescription
activeOperationsPipelineOperation[]YesactiveOperations
queuedTasksstring[]YesqueuedTasks
lastCompleted{ taskId: string; stage: string; completedAt: string; } | undefinedNolastCompleted

PipelineOperation

Active pipeline operation.
PropertyTypeRequiredDescription
operationIdstringYesoperationId
taskIdstringYestaskId
stagestringYesstage
startedAtstringYesstartedAt
progressnumber | undefinedNoprogress
messagestring | undefinedNomessage

ChangeEntry

Change entry.
PropertyTypeRequiredDescription
timestampstringYestimestamp
taskIdstringYestaskId
changeTypestringYeschangeType
stagestring | undefinedNostage
descriptionstringYesdescription

ExecutionResult

The aggregate result of executing a CANT workflow.
PropertyTypeRequiredDescription
successbooleanYesWhether the workflow completed without errors.
outputsRecord<string, unknown>YesOutput bindings from output name = expr statements.
stepsStepResult[]YesResults for each executed step in order.
durationnumberYesTotal wall-clock execution duration in milliseconds.

StepResult

The result of a single workflow statement execution.
PropertyTypeRequiredDescription
namestringYesThe step or statement name.
type"pipeline" | "session" | "output" | "parallel" | "conditional" | "loop" | "approval" | "binding" | "directive"YesThe type of statement that was executed.
successbooleanYesWhether this step completed successfully.
outputunknownYesThe output value produced by this step, if any.
errorstring | undefinedNoError message if the step failed.
durationnumberYesWall-clock execution duration in milliseconds.

DiscretionContext

Context provided to a discretion evaluator for AI-judged conditions.
PropertyTypeRequiredDescription
sessionIdstringYesThe current session identifier.
taskRefsstring[]YesTask references currently in scope.
agentIdstringYesThe agent performing the evaluation.
variablesRecord<string, unknown>YesAll variables in the current workflow scope.
conditionstringYesThe raw discretion condition text (between ** delimiters).
precedingResultsRecord<string, unknown>YesOutput from preceding pipeline steps or session results.

ApprovalTokenStatus

Valid states for an approval token.
ApprovalTokenStatus

ApprovalToken

An approval token for human-in-the-loop workflow gates. Tokens are bound to a specific session and workflow. The workflowHash provides TOCTOU protection: if the workflow is modified between token creation and approval, the token is invalidated. Security invariants: - Token values MUST NOT appear in audit logs, summaries, or error messages. - approvalTokensJson is NEVER included in handoff/debrief serialization. - Status transitions use atomic CAS (pending - approved|rejected|expired only).
PropertyTypeRequiredDescription
tokenstringYesUUID v4 generated via CSPRNG (crypto.randomUUID).
sessionIdstringYesThe session that generated this token. Token is bound to this session.
workflowNamestringYesThe workflow that contains the approval gate.
gateNamestringYesThe name label of the specific approval gate.
workflowHashstringYesSHA-256 hash of the workflow definition text at the time the token was created. Used for TOCTOU protection.
messagestringYesThe message displayed to the approver.
createdAtstringYesISO 8601 timestamp of token creation.
expiresAtstringYesISO 8601 timestamp of token expiration. REQUIRED. Default 24h.
statusApprovalTokenStatusYesCurrent token state.
approvedBystring | undefinedNoIdentifier of the actor who approved/rejected (informational).
approvedAtstring | undefinedNoISO 8601 timestamp of the approval/rejection action.
usedAtstring | undefinedNoISO 8601 timestamp of when the token was consumed by the runtime.
requestedBystringYesIdentifier of the agent/workflow that requested approval.

TokenValidation

Result of validating an approval token.
PropertyTypeRequiredDescription
validbooleanYesWhether the token is valid and can be consumed.
reason"not_found" | "expired" | "wrong_session" | "not_pending" | "hash_mismatch" | undefinedNoIf invalid, the reason for rejection.
tokenApprovalToken | undefinedNoThe token object if found.

JoinStrategy

Join strategy for parallel block execution.
JoinStrategy

SettleResult

Result of a parallel block execution with the settle strategy.
PropertyTypeRequiredDescription
successes{ name: string; result: unknown; }[]YesArms that completed successfully.
failures{ name: string; error: string; }[]YesArms that failed.

ExecutionScope

Variable scope for workflow execution.
PropertyTypeRequiredDescription
variablesRecord<string, unknown>YesVariable bindings in the current scope.
parentExecutionScope | undefinedNoParent scope for nested blocks (parallel arms, loops, etc.).

DiscretionEvaluator

Evaluates a discretion condition and returns a boolean judgment.
PropertyTypeRequiredDescription
evaluate(condition: string, context: DiscretionContext) => Promise<boolean>YesEvaluate whether a discretion condition is met.

ParallelArm

A single parallel arm to execute.
PropertyTypeRequiredDescription
namestringYesThe arm name (used for binding results to scope).
execute() => Promise<unknown>YesThe async function that executes the arm’s body.

ParallelResult

Result of a parallel block execution.
PropertyTypeRequiredDescription
successbooleanYesWhether the parallel block succeeded according to its join strategy.
resultsRecord<string, unknown>YesPer-arm results mapped by arm name.
stepsStepResult[]YesStep results for audit/logging.
settleResultSettleResult | undefinedNoSettle-mode detailed breakdown (only for settle strategy).

WorkflowExecutorConfig

Configuration options for the workflow executor.
PropertyTypeRequiredDescription
maxDiscretionEvaluationsnumber | undefinedNoMaximum number of discretion evaluations per workflow run (default: 100).
sessionIdstring | undefinedNoThe session ID for this execution.
agentIdstring | undefinedNoThe agent ID performing the execution.

ResumablePipeline

Resumable pipeline information returned to callers. T4805 T4798
PropertyTypeRequiredDescription
taskIdstringYesTask ID (e.g., T4805)
pipelineIdstringYesPipeline ID
currentStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesCurrent stage in the pipeline
status"active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted"YesPipeline status
startedAtDateYesWhen the pipeline started
updatedAtDateYesWhen the pipeline was last updated
taskTitlestringYesTask title
stageStatus"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"YesCurrent stage status
stageStartedAtDate | undefinedNoStage started at (if active)
blockReasonstring | undefinedNoBlock reason if blocked
previousSessionIdstring | undefinedNoPrevious session ID if known
resumePrioritynumberYesResume priority (lower = higher priority)

PipelineContext

Pipeline context for session resume. T4805
PropertyTypeRequiredDescription
taskIdstringYesTask ID
pipelineIdstringYesPipeline ID
currentStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesCurrent stage
stagesStageContext[]YesAll stages with their status
gateResultsGateResultContext[]YesGate results for current stage
evidenceEvidenceContext[]YesEvidence linked to current stage
recentTransitionsTransitionContext[]YesRecent transitions
taskTaskContextYesTask details

StageContext

Stage context within a pipeline. T4805
PropertyTypeRequiredDescription
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesStage name
status"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"YesStage status
sequencenumberYesSequence order
startedAtDate | undefinedNoWhen started
completedAtDate | undefinedNoWhen completed
blockedAtDate | undefinedNoBlock information
blockReasonstring | undefinedNoblockReason
skippedAtDate | undefinedNoSkip information
skipReasonstring | undefinedNoskipReason
notesstring[]YesStage notes
metadataRecord<string, unknown>YesStage metadata

GateResultContext

Gate result context. T4805 T4804
PropertyTypeRequiredDescription
gateNamestringYesGate name
result"warn" | "pass" | "fail"YesResult status
checkedAtDateYesWhen checked
checkedBystringYesWho checked
detailsstring | undefinedNoDetails
reasonstring | undefinedNoReason if failed

EvidenceContext

Evidence context. T4805 T4804
PropertyTypeRequiredDescription
idstringYesEvidence ID
uristringYesURI to evidence
type"file" | "url" | "manifest"YesEvidence type
recordedAtDateYesWhen recorded
recordedBystring | undefinedNoWho recorded
descriptionstring | undefinedNoDescription

TransitionContext

Transition context. T4805
PropertyTypeRequiredDescription
fromStagestringYesFrom stage
toStagestringYesTo stage
transitionedAtDateYesWhen transitioned
transitionedBystringYesWho initiated
reasonstring | undefinedNoReason

TaskContext

Task context. T4805
PropertyTypeRequiredDescription
idstringYesTask ID
titlestringYesTask title
descriptionstring | undefinedNoTask description
statusstringYesTask status
prioritystringYesTask priority
parentIdstring | undefinedNoParent task ID

ResumeResult

Result of a resume operation. T4805
PropertyTypeRequiredDescription
successbooleanYesWhether resume was successful
taskIdstringYesTask ID
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesStage resumed
previousStatus"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"YesPrevious status
newStatus"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"YesNew status
resumedAtDateYesResume timestamp
messagestringYesMessage for user
warningsstring[]YesAny warnings

AutoResumeResult

Auto-resume detection result. T4805
PropertyTypeRequiredDescription
canResumebooleanYesWhether auto-resume is possible
taskIdstring | undefinedNoTask ID to resume
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefinedNoStage to resume
contextPipelineContext | undefinedNoPipeline context if available
optionsResumablePipeline[] | undefinedNoResume options if multiple
recommendation"none" | "resume" | "choose"YesRecommended action
messagestringYesMessage for user

FindResumableOptions

Options for finding resumable pipelines. T4805
PropertyTypeRequiredDescription
taskIdsstring[] | undefinedNoFilter by specific task IDs
stages("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | undefinedNoFilter by stages
includeBlockedboolean | undefinedNoInclude blocked pipelines
includeAbortedboolean | undefinedNoInclude aborted pipelines
limitnumber | undefinedNoMaximum results
minPriority"high" | "medium" | "low" | "critical" | undefinedNoMinimum priority (tasks with priority = this)

SessionResumeCheckOptions

Options for session start with resume check. T4805
PropertyTypeRequiredDescription
autoResumeboolean | undefinedNoWhether to auto-resume if only one candidate
scope{ type: "epic" | "global"; epicId?: string; } | undefinedNoScope to filter resumable pipelines
minPriority"high" | "medium" | "low" | "critical" | undefinedNoMinimum priority to consider
includeBlockedboolean | undefinedNoWhether to include blocked pipelines

SessionResumeCheckResult

Result of session resume check. T4805
PropertyTypeRequiredDescription
didResumebooleanYesWhether resume was performed
resumedTaskIdstring | undefinedNoResumed task ID if auto-resumed
resumedStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefinedNoResumed stage if auto-resumed
optionsResumablePipeline[] | undefinedNoAvailable resume options if not auto-resumed
messagestringYesMessage for user
requiresUserChoicebooleanYesWhether user action is required

PrereqCheck

Prerequisite check result. T4800
PropertyTypeRequiredDescription
metbooleanYesWhether all prerequisites are met
prerequisites("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[]YesList of prerequisite stages
completed("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[]YesStages that are completed or skipped
pending("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[]YesStages that are pending or blocked
failed("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[]YesStages that failed
blockers{ stage: Stage; reason: string; severity: "error" | "warning" | "info"; }[]YesBlocking issues preventing progression
canForcebooleanYesWhether the check can be overridden with force
summarystringYesHuman-readable summary

TransitionValidation

Transition validation result. T4800
PropertyTypeRequiredDescription
validbooleanYesWhether the transition is valid
from"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesSource stage
to"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YesTarget stage
prerequisitesMetbooleanYesWhether prerequisites are met
ruleAllowedbooleanYesWhether the transition rule allows it
requiresForcebooleanYesWhether force is required
errorsstring[]YesList of validation errors
warningsstring[]YesList of warnings
prereqCheckPrereqCheck | undefinedNoPrerequisite check details

StageState

Stage state snapshot for state machine. T4800
PropertyTypeRequiredDescription
stage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"Yesstage
status"completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"Yesstatus
startedAtDate | undefinedNostartedAt
completedAtDate | undefinedNocompletedAt
assignedAgentstring | undefinedNoassignedAgent
notesstring | undefinedNonotes

StateMachineContext

State machine context for a pipeline. T4800
PropertyTypeRequiredDescription
pipelineIdstringYespipelineId
currentStage"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"YescurrentStage
stagesRecord<"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release", StageState>Yesstages
transitionCountnumberYestransitionCount
versionnumberYesversion

StateTransition

State transition request. T4800
PropertyTypeRequiredDescription
from"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"Yesfrom
to"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release"Yesto
reasonstring | undefinedNoreason
initiatedBystringYesinitiatedBy
forceboolean | undefinedNoforce
skipValidationboolean | undefinedNoskipValidation

StateTransitionResult

State transition result. T4800
PropertyTypeRequiredDescription
successbooleanYessuccess
transitionStateTransitionYestransition
previousStateStageStateYespreviousState
newStateStageStateYesnewState
contextStateMachineContextYescontext
timestampDateYestimestamp
errorsstring[] | undefinedNoerrors

ContextWindowInput

Context window input from Claude Code.
PropertyTypeRequiredDescription
context_window{ context_window_size?: number; current_usage?: { input_tokens?: number; output_tokens?: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; }; }Nocontext_window

ContextStatus

Context status derived from input.
ContextStatus

HITLLevel

HITL warning level.
HITLLevel

HITLWarning

HITL warning entry.
PropertyTypeRequiredDescription
level"INFO" | "WARN" | "BLOCK"Yeslevel
typestringYestype
messagestringYesmessage
detailsunknownYesdetails
actionstringYesaction

HITLWarningsResult

HITL warnings result.
PropertyTypeRequiredDescription
enabledbooleanYesenabled
levelHITLLevelYeslevel
requiresHumanbooleanYesrequiresHuman
warningsHITLWarning[]Yeswarnings
activeLocksLockInfo[]YesactiveLocks
summary{ total: number; byLevel: { block: number; warn: number; info: number; }; } | nullYessummary

StatuslineStatus

Statusline integration status.
StatuslineStatus

RoutingEntry

Routing entry describing the preferred channel for an operation. Derived from OperationCapability in the capability matrix. Use this type when consuming domain-level routing results from getRoutingForDomain() or getOperationsByChannel().
PropertyTypeRequiredDescription
domainstringYesDomain name (e.g. ‘tasks’, ‘memory’, ‘session’)
operationstringYesOperation name (e.g. ‘show’, ‘find’)
preferredChannel"cli" | "either"YesPreferred channel for token efficiency
reasonstringYesReason for the channel preference

ProviderContext

Provider capability context for dynamic skill generation.
PropertyTypeRequiredDescription
providerIdstringYesproviderId
providerNamestringYesproviderName
supportsMcpbooleanYesAlways false. CLI dispatch only.
supportsHooksbooleanYessupportsHooks
supportsSpawnbooleanYessupportsSpawn
instructionFilePatternstring | undefinedNoinstructionFilePattern

IndexMap

Cache index mapping labels/phases to task IDs.
IndexMap

ImportPackageMeta

Import package metadata extracted from the export file.
PropertyTypeRequiredDescription
sourceFilestringYessourceFile
sourceProjectstringYessourceProject
exportedAtstringYesexportedAt
packageChecksumstringYespackageChecksum
taskCountnumberYestaskCount

ImportConflictType

Import conflict types.
ImportConflictType

ImportConflictResolution

Import conflict resolution strategies.
ImportConflictResolution

ImportOptions

Import options for logging context.
PropertyTypeRequiredDescription
parentstring | undefinedNoparent
phasestring | undefinedNophase
resetStatusboolean | undefinedNoresetStatus

SortableTask

Minimal task shape needed for topological sorting.
PropertyTypeRequiredDescription
idstringYesid
parentIdstring | null | undefinedNoparentId
dependsstring[] | undefinedNodepends

PipelineStageTaskRow

Row shape for pipeline + stage + task JOIN.
PropertyTypeRequiredDescription
pipeline{ id: string; status: "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted"; taskId: string; startedAt: string; version: number; updatedAt: string | null; completedAt: string | null; currentStageId: string | null; }Yespipeline
stage{ id: string; status: "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"; startedAt: string | null; metadataJson: string | null; notesJson: string | null; completedAt: string | null; createdBy: string | null; pipelineId: string; stageName: "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution"; sequence: number; blockedAt: string | null; blockReason: string | null; skippedAt: string | null; skipReason: string | null; outputFile: string | null; validatedBy: string | null; validatedAt: string | null; validationStatus: "pending" | "in_review" | "approved" | "rejected" | "needs_revision" | null; provenanceChainJson: string | null; }Yesstage
task{ id: string; status: "active" | "pending" | "cancelled" | "blocked" | "done" | "archived"; sessionId: string | null; description: string | null; createdAt: string; updatedAt: string | null; title: string; priority: "high" | "medium" | "low" | "critical"; type: "task" | "epic" | "subtask" | null; parentId: string | null; phase: string | null; size: "medium" | "small" | "large" | null; position: number | null; positionVersion: number | null; labelsJson: string | null; notesJson: string | null; acceptanceJson: string | null; filesJson: string | null; origin: string | null; blockedBy: string | null; epicLifecycle: string | null; noAutoComplete: boolean | null; completedAt: string | null; cancelledAt: string | null; cancellationReason: string | null; archivedAt: string | null; archiveReason: string | null; cycleTimeDays: number | null; verificationJson: string | null; createdBy: string | null; modifiedBy: string | null; pipelineStage: string | null; assignee: string | null; }Yestask

PipelineStageRow

Row shape for pipeline + stage JOIN.
PropertyTypeRequiredDescription
pipeline{ id: string; status: "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted"; taskId: string; startedAt: string; version: number; updatedAt: string | null; completedAt: string | null; currentStageId: string | null; }Yespipeline
stageRecord{ id: string; status: "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped"; startedAt: string | null; metadataJson: string | null; notesJson: string | null; completedAt: string | null; createdBy: string | null; pipelineId: string; stageName: "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution"; sequence: number; blockedAt: string | null; blockReason: string | null; skippedAt: string | null; skipReason: string | null; outputFile: string | null; validatedBy: string | null; validatedAt: string | null; validationStatus: "pending" | "in_review" | "approved" | "rejected" | "needs_revision" | null; provenanceChainJson: string | null; }YesstageRecord

InsertProjectRegistry

{ projectId: string; projectHash: string; projectPath: string; name: string; registeredAt?: string | undefined; lastSeen?: string | undefined; healthStatus?: string | undefined; healthLastCheck?: string | null | undefined; permissions?: string | undefined; lastSync?: string | undefined; taskCount?: number | undefined; labelsJson?: string | undefined; }

SelectProjectRegistry

{ projectId: string; projectHash: string; projectPath: string; name: string; registeredAt: string; lastSeen: string; healthStatus: string; healthLastCheck: string | null; permissions: string; lastSync: string; taskCount: number; labelsJson: string; }

InsertNexusAuditLog

{ id: string; action: string; timestamp?: string | undefined; projectHash?: string | null | undefined; projectId?: string | null | undefined; domain?: string | null | undefined; operation?: string | null | undefined; sessionId?: string | null | undefined; requestId?: string | null | undefined; source?: string | null | undefined; gateway?: string | null | undefined; success?: number | null | undefined; durationMs?: number | null | undefined; detailsJson?: string | null | undefined; errorMessage?: string | null | undefined; }

SelectNexusAuditLog

{ id: string; timestamp: string; action: string; projectHash: string | null; projectId: string | null; domain: string | null; operation: string | null; sessionId: string | null; requestId: string | null; source: string | null; gateway: string | null; success: number | null; durationMs: number | null; detailsJson: string | null; errorMessage: string | null; }

InsertNexusSchemaMeta

{ key: string; value: string; }

SelectNexusSchemaMeta

{ key: string; value: string; }

AtomicityResult

PropertyTypeRequiredDescription
scorenumberYesscore
passedbooleanYespassed
violationsstring[]Yesviolations

AtomicityCriterion

"single-file-scope" | "single-cognitive-concern" | "clear-acceptance-criteria" | "no-context-switching" | "no-hidden-decisions" | "programmatic-validation-possible"

RelatesType

Valid relationship types for relates entries.
RelatesType

RelatesEntry

A single relates entry.
PropertyTypeRequiredDescription
taskIdstringYestaskId
typeRelatesTypeYestype
reasonstring | undefinedNoreason

Severity

Impact severity levels.
Severity

DeleteWarning

An impact warning.
PropertyTypeRequiredDescription
severitySeverityYesseverity
codestringYescode
messagestringYesmessage

AffectedTasks

Affected tasks info.
PropertyTypeRequiredDescription
primaryPick<Task, "id" | "status" | "title" | "type" | "parentId" | "labels"> | nullYesprimary
childrenPick<Task, "id" | "status" | "title" | "type" | "parentId" | "labels">[]Yeschildren
totalCountnumberYestotalCount
errorstring | undefinedNoerror

DeleteImpact

Impact analysis.
PropertyTypeRequiredDescription
pendingLostnumberYespendingLost
activeLostnumberYesactiveLost
blockedLostnumberYesblockedLost
doneLostnumberYesdoneLost
dependentsAffectedstring[]YesdependentsAffected

DeletePreview

Full preview result.
PropertyTypeRequiredDescription
successbooleanYessuccess
dryRuntrueYesdryRun
wouldDeleteAffectedTasks | undefinedNowouldDelete
impactDeleteImpact | undefinedNoimpact
warningsDeleteWarning[] | undefinedNowarnings
warningCountnumber | undefinedNowarningCount
strategystring | undefinedNostrategy
reasonstring | null | undefinedNoreason
timestampstring | undefinedNotimestamp
error{ code: string; message: string; suggestion?: string; childCount?: number; } | undefinedNoerror

ChildStrategy

Valid child handling strategies.
ChildStrategy

StrategyResult

Result from a strategy handler.
PropertyTypeRequiredDescription
successbooleanYessuccess
strategyChildStrategyYesstrategy
taskIdstringYestaskId
affectedTasksstring[]YesaffectedTasks
affectedCountnumber | undefinedNoaffectedCount
messagestringYesmessage
error{ code: string; message: string; childCount?: number; childIds?: string[]; suggestion?: string; } | undefinedNoerror

DiscoveryMethod

Discovery method.
DiscoveryMethod

DiscoveryMatch

A single discovery match.
PropertyTypeRequiredDescription
taskIdstringYestaskId
typeRelatesTypeYestype
reasonstringYesreason
scorenumberYesscore
_hierarchyBoostnumber | undefinedNo_hierarchyBoost
_relationshipstring | undefinedNo_relationship

PhaseProgress

Phase progress information.
PropertyTypeRequiredDescription
namestringYesname
statusPhaseStatusYesstatus
totalnumberYestotal
donenumberYesdone
activenumberYesactive
pendingnumberYespending
blockednumberYesblocked
percentCompletenumberYespercentComplete

PhaseTransitionValidation

Validate a phase transition.
PropertyTypeRequiredDescription
validbooleanYesvalid
errorstring | undefinedNoerror

StalenessThresholds

Staleness thresholds in days.
PropertyTypeRequiredDescription
stalenumberYesDays before a task is considered stale.
criticalnumberYesDays before a task is critically stale.
abandonednumberYesDays before a task is considered abandoned.

StalenessLevel

Staleness classification.
StalenessLevel

StalenessInfo

Staleness assessment for a single task.
PropertyTypeRequiredDescription
taskIdstringYestaskId
levelStalenessLevelYeslevel
daysSinceUpdatenumberYesdaysSinceUpdate
lastActivitystringYeslastActivity

StalenessSummary

Get staleness summary statistics.
PropertyTypeRequiredDescription
totalnumberYestotal
freshnumberYesfresh
stalenumberYesstale
criticalnumberYescritical
abandonednumberYesabandoned