LoggerConfig
| Property | Type | Required | Description |
|---|---|---|---|
level | string | Yes | level |
filePath | string | Yes | filePath |
maxFileSize | number | Yes | maxFileSize |
maxFiles | number | Yes | maxFiles |
PlatformPaths
OS-appropriate paths for CLEO’s global directories.| Property | Type | Required | Description |
|---|---|---|---|
data | string | Yes | User data dir. Override with CLEO_HOME env var. |
config | string | Yes | User config dir (XDG_CONFIG_HOME / Library/Preferences / %APPDATA%). |
cache | string | Yes | User cache dir (XDG_CACHE_HOME / Library/Caches / %LOCALAPPDATA%). |
log | string | Yes | User log dir (XDG_STATE_HOME / Library/Logs / %LOCALAPPDATA%). |
temp | string | Yes | Temp dir for ephemeral files. |
SystemInfo
Immutable system information snapshot, captured once per process.| Property | Type | Required | Description |
|---|---|---|---|
platform | NodeJS.Platform | Yes | platform |
arch | string | Yes | arch |
release | string | Yes | release |
hostname | string | Yes | hostname |
nodeVersion | string | Yes | nodeVersion |
paths | PlatformPaths | Yes | paths |
RequiredColumn
Required column definition for ensureColumns().| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
ddl | string | Yes | ALTER TABLE ADD COLUMN DDL suffix (e.g., ‘text’, ‘integer DEFAULT 0’). |
VacuumOptions
| Property | Type | Required | Description |
|---|---|---|---|
cwd | string | undefined | No | cwd |
force | boolean | undefined | No | force |
AgentInstanceRow
NewAgentInstanceRow
AgentErrorLogRow
NewAgentErrorLogRow
AgentInstanceStatus
AgentType
AgentErrorType
WarpChainRow
NewWarpChainRow
WarpChainInstanceRow
NewWarpChainInstanceRow
StatusRegistryRow
TaskRow
NewTaskRow
SessionRow
NewSessionRow
TaskDependencyRow
TaskRelationRow
WorkHistoryRow
LifecyclePipelineRow
NewLifecyclePipelineRow
LifecycleStageRow
NewLifecycleStageRow
LifecycleGateResultRow
NewLifecycleGateResultRow
LifecycleEvidenceRow
NewLifecycleEvidenceRow
LifecycleTransitionRow
NewLifecycleTransitionRow
AuditLogRow
NewAuditLogRow
TokenUsageRow
NewTokenUsageRow
ArchitectureDecisionRow
NewArchitectureDecisionRow
AdrTaskLinkRow
NewAdrTaskLinkRow
AdrRelationRow
NewAdrRelationRow
ManifestEntryRow
NewManifestEntryRow
PipelineManifestRow
NewPipelineManifestRow
ReleaseManifestRow
NewReleaseManifestRow
ExternalTaskLinkRow
NewExternalTaskLinkRow
BrainDecisionRow
NewBrainDecisionRow
BrainPatternRow
NewBrainPatternRow
BrainLearningRow
NewBrainLearningRow
BrainObservationRow
NewBrainObservationRow
BrainMemoryLinkRow
NewBrainMemoryLinkRow
BrainPageNodeRow
NewBrainPageNodeRow
BrainPageEdgeRow
NewBrainPageEdgeRow
BrainStickyNoteRow
NewBrainStickyNoteRow
ProjectRegistryRow
NewProjectRegistryRow
NexusAuditLogRow
NewNexusAuditLogRow
NexusSchemaMetaRow
NewNexusSchemaMetaRow
ErrorDefinition
A single entry in the unified error catalog.| Property | Type | Required | Description |
|---|---|---|---|
code | number | Yes | Numeric exit code from ExitCode enum. |
name | string | Yes | Machine-readable name (matches ExitCode enum key). |
category | LAFSErrorCategory | Yes | LAFS error category for protocol conformance. |
message | string | Yes | Default human-readable message. |
fix | string | undefined | No | Default fix suggestion (copy-paste command or instruction). |
httpStatus | number | Yes | HTTP status code for API responses. |
recoverable | boolean | Yes | Whether retry may succeed. |
lafsCode | string | Yes | LAFS-style string error code (E_CLEO_*). |
ProblemDetails
RFC 9457 Problem Details object. Structured error representation for API responses. T5240| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | type |
title | string | Yes | title |
status | number | Yes | status |
detail | string | Yes | detail |
instance | string | undefined | No | instance |
extensions | Record<string, unknown> | undefined | No | extensions |
ArchiveFields
Archive-specific fields for task upsert.| Property | Type | Required | Description |
|---|---|---|---|
archivedAt | string | undefined | No | archivedAt |
archiveReason | string | undefined | No | archiveReason |
cycleTimeDays | number | null | undefined | No | cycleTimeDays |
RegisterAgentOptions
Options for registering a new agent instance.| Property | Type | Required | Description |
|---|---|---|---|
agentType | "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | Yes | agentType |
sessionId | string | undefined | No | sessionId |
taskId | string | undefined | No | taskId |
parentAgentId | string | undefined | No | parentAgentId |
metadata | Record<string, unknown> | undefined | No | metadata |
UpdateStatusOptions
Options for updating agent status.| Property | Type | Required | Description |
|---|---|---|---|
status | "error" | "active" | "starting" | "idle" | "crashed" | "stopped" | Yes | status |
error | string | undefined | No | error |
taskId | string | undefined | No | taskId |
ListAgentFilters
Filters for listing agent instances.| Property | Type | Required | Description |
|---|---|---|---|
status | "error" | "active" | "starting" | "idle" | "crashed" | "stopped" | ("error" | "active" | "starting" | "idle" | "crashed" | "stopped")[] | undefined | No | status |
agentType | "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | ("orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor")[] | undefined | No | agentType |
sessionId | string | undefined | No | sessionId |
parentAgentId | string | undefined | No | parentAgentId |
AgentHealthReport
Agent health report summary.| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | total |
active | number | Yes | active |
idle | number | Yes | idle |
starting | number | Yes | starting |
error | number | Yes | error |
crashed | number | Yes | crashed |
stopped | number | Yes | stopped |
totalErrors | number | Yes | totalErrors |
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; }[] | Yes | staleAgents |
AtomicMigrationResult
Atomic database migration result.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
tempPath | string | Yes | tempPath |
backupPath | string | undefined | No | backupPath |
error | string | undefined | No | error |
ReleaseFn
A release function returned by acquireLock.ProviderHookEvent
CAAMP canonical hook event type. This is the normalized 16-event taxonomy from CAAMP 1.9.1.InternalHookEvent
HookEvent
Full CLEO hook event union. CAAMP defines provider-facing canonical events; CLEO extends the registry with local coordination events for autonomous execution.HookPayload
Base interface for all hook payloads Provides common fields available across all hook events| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | ISO 8601 timestamp when the hook fired |
sessionId | string | undefined | No | Optional session ID if firing within a session context |
taskId | string | undefined | No | Optional task ID if firing within a task context |
providerId | string | undefined | No | Optional provider ID that triggered the hook |
metadata | Record<string, unknown> | undefined | No | Optional metadata for extensibility |
SessionStartPayload
Payload for SessionStart hook (canonical: was onSessionStart) Fired when a CLEO session begins| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | Session identifier (required for session events) |
name | string | Yes | Human-readable session name |
scope | string | Yes | Session scope/area of work |
agent | string | undefined | No | Optional agent identifier |
OnSessionStartPayload
Deprecated: Use SessionStartPayload instead. Kept for backward compatibility.
SessionEndPayload
Payload for SessionEnd hook (canonical: was onSessionEnd) Fired when a CLEO session ends| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | Session identifier |
duration | number | Yes | Session duration in seconds |
tasksCompleted | string[] | Yes | Array of task IDs completed during this session |
OnSessionEndPayload
Deprecated: Use SessionEndPayload instead. Kept for backward compatibility.
PreToolUsePayload
Payload for PreToolUse hook (canonical: was onToolStart) Fired when a task/tool operation begins| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task identifier |
taskTitle | string | Yes | Human-readable task title |
previousTask | string | undefined | No | Optional ID of the previous task if sequential |
toolName | string | undefined | No | Optional tool name being invoked |
toolInput | Record<string, unknown> | undefined | No | Optional structured input to the tool |
OnToolStartPayload
Deprecated: Use PreToolUsePayload instead. Kept for backward compatibility.
PostToolUsePayload
Payload for PostToolUse hook (canonical: was onToolComplete) Fired when a task/tool operation completes| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task identifier |
taskTitle | string | Yes | Human-readable task title |
status | "cancelled" | "done" | "archived" | Yes | Final status of the completed task |
toolResult | Record<string, unknown> | undefined | No | Optional structured result from the tool |
OnToolCompletePayload
Deprecated: Use PostToolUsePayload instead. Kept for backward compatibility.
HookHandler
Handler function type for hook events Handlers receive project root and typed payloadHookRegistration
Hook registration metadata Tracks registered handlers with priority and event binding| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier for this registration |
event | HookEvent | Yes | CAAMP hook event this handler listens for |
handler | HookHandler<T> | Yes | Handler function to execute when event fires |
priority | number | Yes | Priority for execution order (higher = earlier) |
HookConfig
Configuration for the hook system Controls which events are enabled/disabled| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | Master switch for hook system |
events | Record<HookEvent, boolean> | Yes | Per-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.| Property | Type | Required | Description |
|---|---|---|---|
filePath | string | undefined | No | Absolute or project-relative path of the changed file |
changeType | "write" | "create" | "delete" | undefined | No | Kind of filesystem change (for file-change notifications) |
sizeBytes | number | undefined | No | File size in bytes after the change (absent for deletes) |
message | string | undefined | No | Optional notification message for non-file notifications |
OnFileChangePayload
Deprecated: Use NotificationPayload instead. Kept for backward compatibility.
PostToolUseFailurePayload
Payload for PostToolUseFailure hook (canonical: was onError) Fired when an operation fails with a structured error| Property | Type | Required | Description |
|---|---|---|---|
errorCode | string | number | Yes | Numeric exit code or string error code |
message | string | Yes | Human-readable error message |
domain | string | undefined | No | Domain where the error occurred |
operation | string | undefined | No | Operation that failed |
gateway | string | undefined | No | Gateway (query / mutate) that received the error |
stack | string | undefined | No | Optional stack trace |
OnErrorPayload
Deprecated: Use PostToolUseFailurePayload instead. Kept for backward compatibility.
PromptSubmitPayload
Payload for PromptSubmit hook (canonical: was onPromptSubmit) Fired when an agent submits a prompt through a gateway| Property | Type | Required | Description |
|---|---|---|---|
gateway | string | Yes | Gateway that received the prompt (query / mutate) |
domain | string | Yes | Target domain |
operation | string | Yes | Target operation |
source | string | undefined | No | Optional source identifier (e.g. agent name) |
OnPromptSubmitPayload
Deprecated: Use PromptSubmitPayload instead. Kept for backward compatibility.
ResponseCompletePayload
Payload for ResponseComplete hook (canonical: was onResponseComplete) Fired when a gateway operation finishes (success or failure)| Property | Type | Required | Description |
|---|---|---|---|
gateway | string | Yes | Gateway that handled the operation |
domain | string | Yes | Target domain |
operation | string | Yes | Target operation |
success | boolean | Yes | Whether the operation succeeded |
durationMs | number | undefined | No | Wall-clock duration in milliseconds |
errorCode | string | undefined | No | Error code if the operation failed |
OnResponseCompletePayload
Deprecated: Use ResponseCompletePayload instead. Kept for backward compatibility.
SubagentStartPayload
Payload for SubagentStart hook Fired when a subagent process is launched| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Subagent or worker identifier |
role | string | undefined | No | Subagent role or archetype |
taskId | string | undefined | No | Task assigned to the subagent |
SubagentStopPayload
Payload for SubagentStop hook Fired when a subagent process completes| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Subagent or worker identifier |
status | "failed" | "blocked" | "partial" | "complete" | undefined | No | Completion status |
taskId | string | undefined | No | Task that was completed |
summary | string | undefined | No | Optional summary reference |
PreCompactPayload
Payload for PreCompact hook Fired before context compaction begins| Property | Type | Required | Description |
|---|---|---|---|
tokensBefore | number | undefined | No | Estimated token count before compaction |
reason | string | undefined | No | Reason for compaction |
PostCompactPayload
Payload for PostCompact hook Fired after context compaction completes| Property | Type | Required | Description |
|---|---|---|---|
tokensBefore | number | undefined | No | Token count before compaction |
tokensAfter | number | undefined | No | Token count after compaction |
success | boolean | Yes | Whether compaction succeeded |
ConfigChangePayload
Payload for ConfigChange hook Fired when configuration is updated| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Configuration key that changed |
previousValue | unknown | Yes | Previous value |
newValue | unknown | Yes | New value |
OnWorkAvailablePayload
Payload for onWorkAvailable hook Fired when the system detects ready work on a Loom/Tapestry| Property | Type | Required | Description |
|---|---|---|---|
taskIds | string[] | Yes | IDs of tasks now ready for execution |
epicId | string | undefined | No | Optional epic / Loom identifier |
chainId | string | undefined | No | Optional chain or tessera instance identifier |
reason | "manual" | "dependency-cleared" | "new-task" | "retry" | "patrol" | undefined | No | Why the work became available |
OnAgentSpawnPayload
Payload for onAgentSpawn hook Fired when a worker session/process is launched| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Worker or session identifier |
role | string | Yes | Worker role / archetype name |
adapterId | string | undefined | No | Provider or adapter used to launch the worker |
taskId | string | undefined | No | Optional task assignment at spawn time |
OnAgentCompletePayload
Payload for onAgentComplete hook Fired when a worker finishes its assigned run| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Worker or session identifier |
role | string | Yes | Worker role / archetype name |
status | "failed" | "blocked" | "partial" | "complete" | Yes | Completion status for the run |
taskId | string | undefined | No | Optional task assignment that was completed |
summary | string | undefined | No | Optional summary or manifest reference |
OnCascadeStartPayload
Payload for onCascadeStart hook Fired when autonomous execution begins flowing through a chain or wave| Property | Type | Required | Description |
|---|---|---|---|
cascadeId | string | Yes | Identifier for the cascade / execution wave |
chainId | string | undefined | No | Optional chain identifier |
tesseraId | string | undefined | No | Optional tessera template / instance identifier |
taskIds | string[] | undefined | No | Task IDs participating in the cascade |
OnPatrolPayload
Payload for onPatrol hook Fired when a watcher performs a periodic health/sweep cycle| Property | Type | Required | Description |
|---|---|---|---|
watcherId | string | Yes | Watcher / patrol identifier |
patrolType | "custom" | "health" | "sweep" | "refinery" | "watcher" | Yes | Patrol category |
scope | string | undefined | No | Optional scope being patrolled |
CLEOLifecycleEvent
Type for CLEO lifecycle event names These are the internal events CLEO fires that get mapped to CAAMP eventsCLEOAutonomousLifecycleEvent
Type for autonomous CLEO lifecycle events.SaveJsonOptions
Options for saveJson.| Property | Type | Required | Description |
|---|---|---|---|
backupDir | string | undefined | No | Directory for backups. If omitted, no backup is created. |
maxBackups | number | undefined | No | Maximum number of backups to retain. Default: 5. |
indent | number | undefined | No | JSON indentation. Default: 2. |
validate | ((data: unknown) => void | Promise<void>) | undefined | No | Validation function. Called before write; throw to abort. |
CheckpointConfig
Checkpoint configuration.| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | enabled |
debounceMinutes | number | Yes | debounceMinutes |
messagePrefix | string | Yes | messagePrefix |
noVerify | boolean | Yes | noVerify |
CheckpointStatus
Checkpoint status information.| Property | Type | Required | Description |
|---|---|---|---|
config | CheckpointConfig | Yes | config |
status | { isGitRepo: boolean; lastCheckpoint: string; lastCheckpointEpoch: number; pendingChanges: number; suppressed: boolean; } | Yes | status |
ChangedFile
Changed file with its status.| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | path |
status | "modified" | "untracked" | Yes | status |
SafetyOptions
Safety configuration - can be overridden per-operation| Property | Type | Required | Description |
|---|---|---|---|
verify | boolean | Yes | Verify data was written (default: true) |
checkpoint | boolean | Yes | Create git checkpoint (default: true) |
validateSequence | boolean | Yes | Validate sequence (default: true) |
strict | boolean | Yes | Strict mode - throw on any issue (default: true) |
RepairResult
Repair result with proper typing.| Property | Type | Required | Description |
|---|---|---|---|
repaired | boolean | Yes | repaired |
message | string | Yes | message |
counter | number | Yes | counter |
oldCounter | number | undefined | No | oldCounter |
newCounter | number | undefined | No | newCounter |
SafetyConfig
Safety configuration options.| Property | Type | Required | Description |
|---|---|---|---|
verifyWrites | boolean | Yes | Enable write verification (default: true) |
detectCollisions | boolean | Yes | Enable collision detection (default: true) |
validateSequence | boolean | Yes | Enable sequence validation (default: true) |
autoCheckpoint | boolean | Yes | Enable auto-checkpoint (default: true) |
strictMode | boolean | Yes | Throw on safety violations (default: true) |
NextDirectives
Map of follow-up operation names to CLI command strings.TaskDetail
Enriched task with hierarchy info.| Property | Type | Required | Description |
|---|---|---|---|
children | string[] | undefined | No | children |
dependencyStatus | TaskRef[] | undefined | No | dependencyStatus |
unresolvedDeps | TaskRef[] | undefined | No | unresolvedDeps |
dependents | string[] | undefined | No | dependents |
hierarchyPath | string[] | undefined | No | hierarchyPath |
isArchived | boolean | undefined | No | isArchived |
_next | NextDirectives | undefined | No | Progressive disclosure directives for follow-up operations. |
PaginateInput
Input parameters for paginating a result set. T4668 T4663| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | Total number of items before pagination. |
limit | number | undefined | No | Number of items to return per page. |
offset | number | undefined | No | Number of items to skip. |
CompactTask
Compact task representation — minimal fields for list responses.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
priority | string | Yes | priority |
type | string | undefined | No | type |
parentId | string | null | undefined | No | parentId |
_next | NextDirectives | undefined | No | Progressive disclosure directives for follow-up operations. |
ListTasksOptions
Filter options for listing tasks.| Property | Type | Required | Description |
|---|---|---|---|
status | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | status |
priority | TaskPriority | undefined | No | priority |
type | TaskType | undefined | No | type |
parentId | string | undefined | No | parentId |
phase | string | undefined | No | phase |
label | string | undefined | No | label |
children | boolean | undefined | No | children |
limit | number | undefined | No | limit |
offset | number | undefined | No | offset |
ListTasksResult
Result of listing tasks.| Property | Type | Required | Description |
|---|---|---|---|
tasks | Task[] | Yes | tasks |
total | number | Yes | total |
filtered | number | Yes | filtered |
page | LAFSPage | Yes | page |
pagination | { limit: number; offset: number; hasMore: boolean; } | undefined | No | pagination |
FindResult
Minimal task info for search results.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
priority | string | Yes | priority |
type | string | undefined | No | type |
parentId | string | null | undefined | No | parentId |
score | number | Yes | score |
_next | NextDirectives | undefined | No | Progressive disclosure directives for follow-up operations. |
FindTasksOptions
Options for finding tasks.| Property | Type | Required | Description |
|---|---|---|---|
query | string | undefined | No | query |
id | string | undefined | No | id |
exact | boolean | undefined | No | exact |
status | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | status |
field | string | undefined | No | field |
includeArchive | boolean | undefined | No | includeArchive |
limit | number | undefined | No | limit |
offset | number | undefined | No | offset |
FindTasksResult
Result of finding tasks.| Property | Type | Required | Description |
|---|---|---|---|
results | FindResult[] | Yes | results |
total | number | Yes | total |
query | string | Yes | query |
searchType | "id" | "fuzzy" | "exact" | Yes | searchType |
AdrFrontmatter
Parsed ADR frontmatter from .md file| Property | Type | Required | Description |
|---|---|---|---|
Date | string | Yes | Date |
Status | "deprecated" | "proposed" | "accepted" | "superseded" | Yes | Status |
Accepted | string | undefined | No | Accepted |
Supersedes | string | undefined | No | Supersedes |
'Superseded By' | string | undefined | No | ’Superseded By’ |
Amends | string | undefined | No | Amends |
'Amended By' | string | undefined | No | ’Amended By’ |
'Related ADRs' | string | undefined | No | ’Related ADRs’ |
'Related Tasks' | string | undefined | No | ’Related Tasks’ |
Gate | "HITL" | "automated" | undefined | No | Gate |
'Gate Status' | "pending" | "passed" | "waived" | undefined | No | ’Gate Status’ |
Summary | string | undefined | No | Summary |
Keywords | string | undefined | No | Keywords |
Topics | string | undefined | No | Topics |
AdrRecord
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
file | string | Yes | file |
title | string | Yes | title |
frontmatter | AdrFrontmatter | Yes | frontmatter |
AdrSyncResult
| Property | Type | Required | Description |
|---|---|---|---|
inserted | number | Yes | inserted |
updated | number | Yes | updated |
skipped | number | Yes | skipped |
errors | { file: string; error: string; }[] | Yes | errors |
AdrListResult
| Property | Type | Required | Description |
|---|---|---|---|
adrs | { id: string; title: string; status: string; date: string; filePath: string; }[] | Yes | adrs |
total | number | Yes | total |
filtered | number | Yes | filtered |
AdrFindResult
| Property | Type | Required | Description |
|---|---|---|---|
adrs | { id: string; title: string; status: string; date: string; filePath: string; summary?: string; keywords?: string; topics?: string; score: number; matchedFields: string[]; }[] | No | adrs |
query | string | Yes | query |
total | number | Yes | total |
PipelineAdrLinkResult
| Property | Type | Required | Description |
|---|---|---|---|
linked | { adrId: string; taskId: string; }[] | Yes | linked |
synced | number | Yes | synced |
skipped | number | Yes | skipped |
errors | { file: string; error: string; }[] | Yes | errors |
EvidenceType
EvidenceRecord
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
stageId | string | Yes | stageId |
uri | string | Yes | uri |
type | EvidenceType | Yes | type |
recordedAt | string | Yes | recordedAt |
recordedBy | string | undefined | No | recordedBy |
description | string | undefined | No | description |
RelatedLink
Related link in frontmatter.| Property | Type | Required | Description |
|---|---|---|---|
type | "task" | "research" | "consensus" | "contribution" | "file" | "adr" | "spec" | Yes | type |
path | string | undefined | No | path |
id | string | undefined | No | id |
FrontmatterMetadata
Frontmatter metadata for an RCASD artifact.| Property | Type | Required | Description |
|---|---|---|---|
epic | string | Yes | epic |
stage | string | Yes | stage |
task | string | undefined | No | task |
related | RelatedLink[] | undefined | No | related |
created | string | undefined | No | created |
updated | string | undefined | No | updated |
ParsedFrontmatter
Result of parsing frontmatter from a markdown file.| Property | Type | Required | Description |
|---|---|---|---|
frontmatter | FrontmatterMetadata | null | Yes | frontmatter |
body | string | Yes | body |
raw | string | Yes | raw |
Stage
Stage type derived from canonical stage list. T4800StageCategory
Stage category for grouping related stages. T4800StageDefinition
Stage metadata with descriptive information. T4800| Property | Type | Required | Description |
|---|---|---|---|
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Stage identifier |
name | string | Yes | Display name for the stage |
description | string | Yes | Detailed description of what happens in this stage |
order | number | Yes | Execution order (1-based) |
category | StageCategory | Yes | Category for grouping |
skippable | boolean | Yes | Whether this stage can be skipped |
defaultTimeoutHours | number | null | Yes | Default timeout in hours (null = no timeout) |
requiredGates | string[] | Yes | Required gate checks before completing this stage |
expectedArtifacts | string[] | Yes | Expected artifacts produced by this stage |
TransitionRule
Transition rule - defines if a transition is allowed. T4800| Property | Type | Required | Description |
|---|---|---|---|
from | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "any" | Yes | from |
to | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "any" | Yes | to |
allowed | boolean | Yes | allowed |
requiresForce | boolean | undefined | No | requiresForce |
reason | string | undefined | No | reason |
StageArtifactResult
| Property | Type | Required | Description |
|---|---|---|---|
absolutePath | string | Yes | absolutePath |
outputFile | string | Yes | outputFile |
related | RelatedLink[] | Yes | related |
SkillFrontmatter
Skill frontmatter parsed from SKILL.md YAML header. This is CLEO’s extended skill metadata — a functional superset of CAAMP’sSkillMetadata. 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.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Skill name (lowercase, hyphens). Maps to CaampSkillMetadata.name. |
description | string | Yes | Human-readable description. Maps to CaampSkillMetadata.description. |
version | string | undefined | No | Semantic version string. Maps to CaampSkillMetadata.version. |
author | string | undefined | No | Skill author (CLEO extension). |
tags | string[] | undefined | No | Classification tags for search/filter (CLEO extension). |
triggers | string[] | undefined | No | Trigger patterns for auto-dispatch (CLEO extension). |
dispatchPriority | number | undefined | No | Priority for dispatch selection (CLEO extension). |
model | string | undefined | No | Preferred LLM model (CLEO extension). |
allowedTools | string[] | undefined | No | Allowed tool names. Maps to CaampSkillMetadata.allowedTools. |
invocable | boolean | undefined | No | Whether the skill can be invoked directly (CLEO extension). |
command | string | undefined | No | CLI command for direct invocation (CLEO extension). |
protocol | SkillProtocolType | undefined | No | RCASD-IVTR+C protocol type (CLEO extension). |
Skill
Skill definition loaded from disk. CLEO-specific type that wraps aSkillFrontmatter with filesystem context. For CAAMP’s equivalent, see CtSkillEntry which wraps CaampSkillMetadata with install/discovery metadata instead.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
dirName | string | Yes | dirName |
path | string | Yes | path |
skillMdPath | string | Yes | skillMdPath |
frontmatter | SkillFrontmatter | Yes | frontmatter |
content | string | undefined | No | content |
SkillSummary
Lightweight skill summary for manifest/listing. Projected fromSkill for efficient caching in SkillManifest. Contains only the fields needed for CLI display and dispatch selection.
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
dirName | string | Yes | dirName |
description | string | Yes | description |
tags | string[] | Yes | tags |
version | string | Yes | version |
invocable | boolean | Yes | invocable |
command | string | undefined | No | command |
protocol | SkillProtocolType | undefined | No | protocol |
SkillManifest
Skill manifest (cached aggregate of all discovered skills).| Property | Type | Required | Description |
|---|---|---|---|
_meta | { generatedAt: string; ttlSeconds: number; skillCount: number; searchPaths: string[]; } | Yes | _meta |
skills | SkillSummary[] | Yes | skills |
SkillProtocolType
RCASD-IVTR+C protocol types.AgentConfig
Agent configuration from AGENT.md or agent definition.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
description | string | Yes | description |
model | string | undefined | No | model |
allowedTools | string[] | undefined | No | allowedTools |
customInstructions | string | undefined | No | customInstructions |
AgentRegistryEntry
Agent registry entry.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
path | string | Yes | path |
config | AgentConfig | Yes | config |
installedAt | string | Yes | installedAt |
AgentRegistry
Agent registry (persisted).| Property | Type | Required | Description |
|---|---|---|---|
_meta | { version: string; lastUpdated: string; } | Yes | _meta |
agents | AgentRegistryEntry[] | Yes | agents |
SkillSearchScope
CAAMP search order for skill discovery.SkillSearchPath
Ordered search path entry.| Property | Type | Required | Description |
|---|---|---|---|
scope | SkillSearchScope | Yes | scope |
path | string | Yes | path |
priority | number | Yes | priority |
DispatchStrategy
Dispatch strategy for skill selection.DispatchResult
Dispatch result from skill_auto_dispatch.| Property | Type | Required | Description |
|---|---|---|---|
skill | string | Yes | skill |
strategy | DispatchStrategy | Yes | strategy |
confidence | number | Yes | confidence |
protocol | SkillProtocolType | undefined | No | protocol |
TokenDefinition
Token definition from placeholders.json.| Property | Type | Required | Description |
|---|---|---|---|
token | string | Yes | token |
description | string | undefined | No | description |
required | boolean | undefined | No | required |
default | string | undefined | No | default |
pattern | string | undefined | No | pattern |
TokenValidationResult
Token validation result.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
token | string | Yes | token |
value | string | undefined | No | value |
error | string | undefined | No | error |
TokenContext
Token injection context.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
date | string | Yes | date |
topicSlug | string | Yes | topicSlug |
epicId | string | undefined | No | epicId |
sessionId | string | undefined | No | sessionId |
outputDir | string | undefined | No | outputDir |
manifestPath | string | undefined | No | manifestPath |
OrchestratorThresholds
Orchestrator context thresholds.| Property | Type | Required | Description |
|---|---|---|---|
warning | number | Yes | warning |
critical | number | Yes | critical |
PreSpawnCheckResult
Pre-spawn check result.| Property | Type | Required | Description |
|---|---|---|---|
canSpawn | boolean | Yes | canSpawn |
spawnStatus | "warning" | "blocked" | "ok" | "stale" | Yes | spawnStatus |
recommendation | "continue" | "wrap_up" | "stop" | "verify_compliance" | Yes | recommendation |
context | { percentage: number; currentTokens: number; maxTokens: number; warningThreshold: number; criticalThreshold: number; status: string; stale: boolean; } | Yes | context |
reasons | { code: string; message: string; }[] | Yes | reasons |
taskValidation | { exists: boolean; taskId: string; status?: string; title?: string; spawnable: boolean; } | null | undefined | No | taskValidation |
complianceValidation | Record<string, unknown> | null | undefined | No | complianceValidation |
SpawnPromptResult
Spawn prompt result.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
template | string | Yes | template |
topicSlug | string | Yes | topicSlug |
date | string | Yes | date |
outputDir | string | Yes | outputDir |
outputFile | string | Yes | outputFile |
prompt | string | Yes | prompt |
DependencyWave
Dependency wave for parallel execution.| Property | Type | Required | Description |
|---|---|---|---|
wave | number | Yes | wave |
tasks | { id: string; title: string; priority?: string; status: string; depends: string[]; }[] | No | tasks |
DependencyAnalysis
Dependency analysis result.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
totalTasks | number | Yes | totalTasks |
completedTasks | number | Yes | completedTasks |
pendingTasks | number | Yes | pendingTasks |
activeTasks | number | Yes | activeTasks |
waves | DependencyWave[] | Yes | waves |
readyToSpawn | { id: string; title: string; priority?: string; wave: number; }[] | No | readyToSpawn |
blockedTasks | { id: string; title: string; depends: string[]; wave: number; }[] | Yes | blockedTasks |
HitlSummary
HITL summary for session handoff.| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
stopReason | string | Yes | stopReason |
session | { id: string | null; epicId: string | null; focusedTask: string | null; progressNote: string | null; } | Yes | session |
progress | { completed: number; pending: number; active: number; blocked: number; total: number; percentComplete: number; } | Yes | progress |
completedTasks | Pick<TaskRef, "id" | "title">[] | Yes | completedTasks |
remainingTasks | (TaskRef & { priority?: string; })[] | No | remainingTasks |
readyToSpawn | TaskRefPriority[] | Yes | readyToSpawn |
handoff | { resumeCommand: string; nextSteps: string[]; } | Yes | handoff |
ManifestEntry
Research manifest entry (pipeline_manifest table, ADR-027).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
file | string | Yes | file |
title | string | Yes | title |
date | string | Yes | date |
status | "completed" | "blocked" | "archived" | "partial" | Yes | status |
agent_type | string | undefined | No | agent_type |
topics | string[] | Yes | topics |
key_findings | string[] | Yes | key_findings |
actionable | boolean | Yes | actionable |
needs_followup | string[] | Yes | needs_followup |
linked_tasks | string[] | undefined | No | linked_tasks |
audit | Record<string, unknown> | undefined | No | audit |
ManifestValidationResult
Manifest validation result.| Property | Type | Required | Description |
|---|---|---|---|
exists | boolean | Yes | exists |
passed | boolean | Yes | passed |
stats | { totalLines: number; validEntries: number; invalidEntries: number; } | undefined | No | stats |
issues | string[] | Yes | issues |
ComplianceResult
Compliance verification result.| Property | Type | Required | Description |
|---|---|---|---|
previousTaskId | string | Yes | previousTaskId |
researchId | string | null | Yes | researchId |
checks | { manifestEntryExists: boolean; researchLinkedToTask: boolean; returnStatusValid: boolean | null; } | Yes | checks |
canSpawnNext | boolean | Yes | canSpawnNext |
violations | string[] | Yes | violations |
warnings | string[] | Yes | warnings |
InstalledSkill
Installed skill tracking.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
version | string | Yes | version |
installedAt | string | Yes | installedAt |
sourcePath | string | Yes | sourcePath |
symlinkPath | string | Yes | symlinkPath |
InstalledSkillsFile
Installed skills file.| Property | Type | Required | Description |
|---|---|---|---|
_meta | { version: string; lastUpdated: string; } | Yes | _meta |
skills | Record<string, InstalledSkill> | Yes | skills |
TokenValues
Token values map: TOKEN_NAME - value.MultiSkillComposition
Result of multi-skill composition.| Property | Type | Required | Description |
|---|---|---|---|
skillCount | number | Yes | skillCount |
primarySkill | string | Yes | primarySkill |
skills | { skill: string; mode: "full" | "progressive"; estimatedTokens: number; }[] | Yes | skills |
totalEstimatedTokens | number | Yes | totalEstimatedTokens |
prompt | string | Yes | prompt |
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.
| Property | Type | Required | Description |
|---|---|---|---|
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | The canonical stage identifier. |
name | string | Yes | Human-readable stage name (e.g. “Research”). |
order | number | Yes | Numeric stage order (1-9). |
primarySkill | string | Yes | Primary skill loaded for this stage (SSoT from STAGE_SKILL_MAP). |
loadedSkills | readonly string[] | Yes | All skills loaded (Tier 0 + stage primary). |
requiredGates | readonly string[] | Yes | Gates that must pass before the stage can be completed. |
expectedArtifacts | readonly string[] | Yes | Artifacts the agent is expected to produce before advancing. |
prompt | string | Yes | Composed prompt text, ready for LLM system prompt injection. |
source | "fallback" | "skills" | Yes | Source of the prompt: ‘skills’ (real SKILL.md files) or ‘fallback’. |
EnforcementMode
Lifecycle enforcement modes.GateData
Gate data within a stage.| Property | Type | Required | Description |
|---|---|---|---|
status | "failed" | "pending" | "passed" | Yes | status |
agent | string | undefined | No | agent |
notes | string | undefined | No | notes |
reason | string | undefined | No | reason |
timestamp | string | undefined | No | timestamp |
ManifestStageData
Stage data in an on-disk manifest.| Property | Type | Required | Description |
|---|---|---|---|
status | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | status |
completedAt | string | undefined | No | completedAt |
skippedAt | string | undefined | No | skippedAt |
skippedReason | string | undefined | No | skippedReason |
artifacts | string[] | undefined | No | artifacts |
notes | string | undefined | No | notes |
gates | Record<string, GateData> | undefined | No | gates |
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| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
title | string | undefined | No | title |
stages | Record<string, ManifestStageData> | Yes | stages |
GateCheckResult
Gate check result.| Property | Type | Required | Description |
|---|---|---|---|
allowed | boolean | Yes | allowed |
mode | EnforcementMode | Yes | mode |
missingPrerequisites | string[] | Yes | missingPrerequisites |
currentStage | string | Yes | currentStage |
message | string | Yes | message |
StageTransitionResult
Stage transition result.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
stage | string | Yes | stage |
previousStatus | string | Yes | previousStatus |
newStatus | string | Yes | newStatus |
timestamp | string | Yes | timestamp |
LifecycleHistoryEntry
History entry for stage transitions.| Property | Type | Required | Description |
|---|---|---|---|
stage | string | Yes | stage |
action | string | Yes | action |
timestamp | string | Yes | timestamp |
notes | string | undefined | No | notes |
AlertLevel
Alert level names.AlertCheckResult
Alert result from check_context_alert.| Property | Type | Required | Description |
|---|---|---|---|
alerted | boolean | Yes | alerted |
level | AlertLevel | null | Yes | level |
percentage | number | Yes | percentage |
currentTokens | number | Yes | currentTokens |
maxTokens | number | Yes | maxTokens |
action | string | null | Yes | action |
FormatOptions
Options for envelope formatting. T4668 T4670 T4663| Property | Type | Required | Description |
|---|---|---|---|
operation | string | undefined | No | operation |
page | LAFSPage | undefined | No | page |
extensions | Record<string, unknown> | undefined | No | extensions |
mvi | import("/mnt/projects/cleocode/packages/lafs/dist/src/types").MVILevel | undefined | No | MVI level to embed in the envelope _meta. Defaults to ‘standard’. T4957 |
CleoRegistryEntry
Entry in the CLEO-to-LAFS error registry. T4671 T4663| Property | Type | Required | Description |
|---|---|---|---|
exitCode | ExitCode | Yes | exitCode |
lafsCode | string | Yes | lafsCode |
category | LAFSErrorCategory | Yes | category |
description | string | Yes | description |
retryable | boolean | Yes | retryable |
httpStatus | number | Yes | httpStatus |
TestDbEnv
Result of creating a test database environment.| Property | Type | Required | Description |
|---|---|---|---|
tempDir | string | Yes | Temporary directory (the project root). |
cleoDir | string | Yes | Path to .cleo directory. |
accessor | DataAccessor | Yes | SQLite-backed DataAccessor. |
cleanup | () => Promise<void> | Yes | Clean up temp dir and close DB. |
HierarchyValidation
Validate that adding a child to a parent would not violate constraints.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
error | { code: string; message: string; } | undefined | No | error |
TaskTreeNode
Build a tree structure from flat task list.| Property | Type | Required | Description |
|---|---|---|---|
task | Task | Yes | task |
children | TaskTreeNode[] | Yes | children |
HierarchyPolicy
| Property | Type | Required | Description |
|---|---|---|---|
maxDepth | number | Yes | maxDepth |
maxSiblings | number | Yes | maxSiblings |
maxActiveSiblings | number | Yes | maxActiveSiblings |
countDoneInLimit | boolean | Yes | countDoneInLimit |
enforcementProfile | "custom" | "llm-agent-first" | "human-cognitive" | Yes | enforcementProfile |
HierarchyValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
error | { code: string; message: string; } | undefined | No | error |
StrictnessPreset
Valid preset names.PresetDefinition
A preset definition: the config keys it sets and a human description.| Property | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Short summary of what this preset enforces. |
values | Record<string, unknown> | Yes | Flat dot-notation key/value pairs applied to project config. |
ApplyPresetResult
Result of applying a preset.| Property | Type | Required | Description |
|---|---|---|---|
preset | StrictnessPreset | Yes | preset |
description | string | Yes | description |
applied | Record<string, unknown> | Yes | applied |
scope | "project" | "global" | Yes | scope |
SessionRecord
Session object (engine-compatible).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
status | "active" | "archived" | "ended" | "suspended" | Yes | status |
agentId | string | undefined | No | agentId |
name | string | undefined | No | name |
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; } | No | scope |
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; }>; } | No | focus |
startedAt | string | Yes | startedAt |
lastActivity | string | Yes | lastActivity |
suspendedAt | string | null | undefined | No | suspendedAt |
endedAt | string | null | undefined | No | endedAt |
archivedAt | string | null | undefined | No | archivedAt |
resumeCount | number | undefined | No | resumeCount |
gradeMode | boolean | undefined | No | Whether full query+mutation audit logging is enabled (behavioral grading). |
stats | { tasksCompleted: number; tasksCreated: number; tasksUpdated: number; focusChanges: number; totalActiveMinutes: number; suspendCount: number; } | undefined | No | stats |
previousSessionId | string | null | undefined | No | Soft FK to predecessor session. |
nextSessionId | string | null | undefined | No | Soft FK to successor session. |
agentIdentifier | string | null | undefined | No | LLM agent/conversation identifier. |
handoffConsumedAt | string | null | undefined | No | When the successor read this session’s handoff/debrief. |
handoffConsumedBy | string | null | undefined | No | Who consumed the handoff. |
debriefJson | string | null | undefined | No | Rich debrief data (superset of handoffJson). |
TaskWorkStateExt
Task work state from the task store. Extends the strict contractsTaskWorkState 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.
| Property | Type | Required | Description |
|---|---|---|---|
currentTask | string | null | Yes | currentTask |
currentPhase | string | null | Yes | currentPhase |
blockedUntil | string | null | Yes | blockedUntil |
sessionNote | string | null | Yes | sessionNote |
sessionNotes | SessionNote[] | Yes | sessionNotes |
nextAction | string | null | Yes | nextAction |
primarySession | string | null | Yes | primarySession |
DecisionRecord
Decision record stored in decisions.jsonl.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
sessionId | string | Yes | sessionId |
taskId | string | Yes | taskId |
decision | string | Yes | decision |
rationale | string | Yes | rationale |
alternatives | string[] | Yes | alternatives |
timestamp | string | Yes | timestamp |
AssumptionRecord
Assumption record stored in assumptions.jsonl.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
sessionId | string | Yes | sessionId |
taskId | string | null | Yes | taskId |
assumption | string | Yes | assumption |
confidence | "high" | "medium" | "low" | Yes | confidence |
validatedAt | string | null | Yes | validatedAt |
timestamp | string | Yes | timestamp |
RecordDecisionParams
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | sessionId |
taskId | string | Yes | taskId |
decision | string | Yes | decision |
rationale | string | Yes | rationale |
alternatives | string[] | undefined | No | alternatives |
DecisionLogParams
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | undefined | No | sessionId |
taskId | string | undefined | No | taskId |
HandoffData
Handoff data schema - structured state for session transition.| Property | Type | Required | Description |
|---|---|---|---|
lastTask | string | null | Yes | Last task being worked on |
tasksCompleted | string[] | Yes | Tasks completed in session |
tasksCreated | string[] | Yes | Tasks created in session |
decisionsRecorded | number | Yes | Count of decisions recorded |
nextSuggested | string[] | Yes | Top-3 from tasks.next |
openBlockers | string[] | Yes | Tasks with blockers |
openBugs | string[] | Yes | Open bugs |
note | string | undefined | No | Human override note |
nextAction | string | undefined | No | Human override next action |
ComputeHandoffOptions
Options for computing handoff data.| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | sessionId |
note | string | undefined | No | Optional human note override |
nextAction | string | undefined | No | Optional human next action override |
GitState
Git state snapshot captured at session end.| Property | Type | Required | Description |
|---|---|---|---|
branch | string | Yes | branch |
commitCount | number | Yes | commitCount |
lastCommitHash | string | null | Yes | lastCommitHash |
uncommittedChanges | boolean | Yes | uncommittedChanges |
DebriefDecision
Decision summary for debrief output.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
decision | string | Yes | decision |
rationale | string | Yes | rationale |
taskId | string | Yes | taskId |
DebriefData
Rich debrief data — superset of HandoffData. Captures comprehensive session state for cross-conversation continuity. T4959| Property | Type | Required | Description |
|---|---|---|---|
handoff | HandoffData | Yes | Standard handoff data (backward compat). |
sessionId | string | Yes | Session that produced this debrief. |
agentIdentifier | string | null | Yes | Agent/conversation identifier (if known). |
startedAt | string | Yes | Session start time. |
endedAt | string | Yes | Session end time. |
durationMinutes | number | Yes | Duration in minutes. |
decisions | DebriefDecision[] | Yes | Decisions made during the session. |
gitState | GitState | null | Yes | Git state at session end (best-effort). |
chainPosition | number | Yes | Position in the session chain (1-based). |
chainLength | number | Yes | Total length of the session chain. |
ComputeDebriefOptions
Options for computing debrief data.| Property | Type | Required | Description |
|---|---|---|---|
agentIdentifier | string | null | undefined | No | Agent/conversation identifier. |
startedAt | string | undefined | No | Session start time. |
endedAt | string | undefined | No | Session end time. |
BrainFtsRow
Row returned by FTS content_hash duplicate check (brain-retrieval.ts observeBrain).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
created_at | string | Yes | created_at |
BrainNarrativeRow
Row returned by narrative backfill query (brain-retrieval.ts populateEmbeddings).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
narrative | string | Yes | narrative |
title | string | Yes | title |
BrainSearchHit
Flattened FTS hit used in hybrid search scoring (brain-search.ts hybridSearch).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
title | string | Yes | title |
text | string | Yes | text |
BrainKnnRow
Row returned by KNN vector similarity query (brain-similarity.ts searchSimilar).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
distance | number | Yes | distance |
BrainDecisionNode
Decision node attached to a blocker in causal traces (brain-reasoning.ts reasonWhy).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
rationale | string | undefined | No | rationale |
BrainAnchor
Anchor entry in a timeline result (brain-retrieval.ts timelineBrain).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
data | unknown | Yes | data |
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.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
date | string | Yes | date |
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.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
title | string | Yes | title |
narrative | string | null | Yes | narrative |
project | string | null | Yes | project |
created_at | string | Yes | created_at |
BrainIdCheckRow
Row returned by ID existence check queries (claude-mem-migration.ts). Used bySELECT id FROM brain_observations WHERE id = ? and similar single-column lookups for idempotent migration dedup.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
EmbeddingProvider
Contract for embedding providers (local models, API services, etc.).| Property | Type | Required | Description |
|---|---|---|---|
embed | (text: string) => Promise<Float32Array> | Yes | Convert text into a fixed-dimension float vector. |
dimensions | number | Yes | Number of dimensions the provider produces. Must match vec0 table. |
isAvailable | () => boolean | Yes | Whether the provider is ready to produce embeddings. |
SimilarityResult
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
distance | number | Yes | distance |
type | string | Yes | type |
title | string | Yes | title |
text | string | Yes | text |
BrainSearchResult
Search result with BM25 rank.| Property | Type | Required | Description |
|---|---|---|---|
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; }[] | Yes | decisions |
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; }[] | Yes | patterns |
learnings | { actionable: boolean; id: string; createdAt: string; updatedAt: string | null; source: string; confidence: number; insight: string; application: string | null; applicableTypesJson: string | null; }[] | Yes | learnings |
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; }[] | Yes | observations |
BrainSearchOptions
Search options.| Property | Type | Required | Description |
|---|---|---|---|
limit | number | undefined | No | Max results per table. Default 10. |
tables | ("decisions" | "patterns" | "learnings" | "observations")[] | undefined | No | Which tables to search. Default: all four. |
HybridResult
Result from hybridSearch combining multiple search signals.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
score | number | Yes | score |
type | string | Yes | type |
title | string | Yes | title |
text | string | Yes | text |
sources | ("fts" | "vec" | "graph")[] | Yes | sources |
HybridSearchOptions
Options for hybridSearch weighting and limits.| Property | Type | Required | Description |
|---|---|---|---|
ftsWeight | number | undefined | No | ftsWeight |
vecWeight | number | undefined | No | vecWeight |
graphWeight | number | undefined | No | graphWeight |
limit | number | undefined | No | limit |
MemoryBridgeConfig
Configuration for memory bridge content generation.| Property | Type | Required | Description |
|---|---|---|---|
maxObservations | number | Yes | maxObservations |
maxLearnings | number | Yes | maxLearnings |
maxPatterns | number | Yes | maxPatterns |
maxDecisions | number | Yes | maxDecisions |
includeHandoff | boolean | Yes | includeHandoff |
includeAntiPatterns | boolean | Yes | includeAntiPatterns |
BrainCompactHit
Compact search hit — minimal fields for index-level results.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | "decision" | "pattern" | "learning" | "observation" | Yes | type |
title | string | Yes | title |
date | string | Yes | date |
relevance | number | undefined | No | relevance |
_next | NextDirectives | undefined | No | Progressive disclosure directives for follow-up operations. |
SearchBrainCompactParams
Parameters for searchBrainCompact.| Property | Type | Required | Description |
|---|---|---|---|
query | string | Yes | query |
limit | number | undefined | No | limit |
tables | ("decisions" | "patterns" | "learnings" | "observations")[] | undefined | No | tables |
dateStart | string | undefined | No | dateStart |
dateEnd | string | undefined | No | dateEnd |
SearchBrainCompactResult
Result from searchBrainCompact.| Property | Type | Required | Description |
|---|---|---|---|
results | BrainCompactHit[] | Yes | results |
total | number | Yes | total |
tokensEstimated | number | Yes | tokensEstimated |
TimelineBrainParams
Parameters for timelineBrain.| Property | Type | Required | Description |
|---|---|---|---|
anchor | string | Yes | anchor |
depthBefore | number | undefined | No | depthBefore |
depthAfter | number | undefined | No | depthAfter |
TimelineNeighbor
Timeline entry — compact id/type/date tuple.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
date | string | Yes | date |
TimelineBrainResult
Result from timelineBrain.| Property | Type | Required | Description |
|---|---|---|---|
anchor | BrainAnchor | null | Yes | anchor |
before | TimelineNeighbor[] | Yes | before |
after | TimelineNeighbor[] | Yes | after |
FetchBrainEntriesParams
Parameters for fetchBrainEntries.| Property | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | ids |
FetchedBrainEntry
Fetched entry with full data.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
data | unknown | Yes | data |
FetchBrainEntriesResult
Result from fetchBrainEntries.| Property | Type | Required | Description |
|---|---|---|---|
results | FetchedBrainEntry[] | Yes | results |
notFound | string[] | Yes | notFound |
tokensEstimated | number | Yes | tokensEstimated |
BrainObservationType
Observation type from schema.BrainObservationSourceType
Observation source type from schema.ObserveBrainParams
Parameters for observeBrain.| Property | Type | Required | Description |
|---|---|---|---|
text | string | Yes | text |
title | string | undefined | No | title |
type | "discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor" | undefined | No | type |
project | string | undefined | No | project |
sourceSessionId | string | undefined | No | sourceSessionId |
sourceType | "agent" | "manual" | "session-debrief" | "claude-mem" | undefined | No | sourceType |
ObserveBrainResult
Result from observeBrain.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | string | Yes | type |
createdAt | string | Yes | createdAt |
PopulateEmbeddingsResult
Result from populateEmbeddings backfill.| Property | Type | Required | Description |
|---|---|---|---|
processed | number | Yes | processed |
skipped | number | Yes | skipped |
errors | number | Yes | errors |
PopulateEmbeddingsOptions
Options for the embedding backfill pipeline.| Property | Type | Required | Description |
|---|---|---|---|
batchSize | number | undefined | No | Maximum items processed per batch cycle. Defaults to 50. |
onProgress | ((current: number, total: number) => void) | undefined | No | Progress 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.| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
sessionId | string | null | Yes | sessionId |
domain | string | Yes | domain |
operation | string | Yes | operation |
params | Record<string, unknown> | Yes | params |
result | { success: boolean; exitCode: number; duration: number; } | Yes | result |
metadata | { taskId?: string; userId?: string; source: "dispatch" | "cli"; gateway?: "mutate" | "query"; } | No | metadata |
error | string | undefined | No | error |
StoreLearningParams
Parameters for storing a new learning.| Property | Type | Required | Description |
|---|---|---|---|
insight | string | Yes | insight |
source | string | Yes | source |
confidence | number | Yes | confidence |
actionable | boolean | undefined | No | actionable |
application | string | undefined | No | application |
applicableTypes | string[] | undefined | No | applicableTypes |
SearchLearningParams
Parameters for searching learnings.| Property | Type | Required | Description |
|---|---|---|---|
query | string | undefined | No | query |
minConfidence | number | undefined | No | minConfidence |
actionableOnly | boolean | undefined | No | actionableOnly |
applicableType | string | undefined | No | applicableType |
limit | number | undefined | No | limit |
DimensionScore
| Property | Type | Required | Description |
|---|---|---|---|
score | number | Yes | score |
max | number | Yes | max |
evidence | string[] | Yes | evidence |
GradeResult
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | sessionId |
taskId | string | undefined | No | taskId |
totalScore | number | Yes | totalScore |
maxScore | number | Yes | maxScore |
dimensions | { sessionDiscipline: DimensionScore; discoveryEfficiency: DimensionScore; taskHygiene: DimensionScore; errorProtocol: DimensionScore; disclosureUse: DimensionScore; } | Yes | dimensions |
flags | string[] | Yes | flags |
timestamp | string | Yes | timestamp |
entryCount | number | Yes | entryCount |
AdapterInfo
Summary info for an adapter without exposing the full instance.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
name | string | Yes | name |
version | string | Yes | version |
provider | string | Yes | provider |
healthy | boolean | Yes | healthy |
active | boolean | Yes | active |
SessionBridgeData
Session data needed to create a memory bridge observation.| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | sessionId |
scope | string | Yes | scope |
tasksCompleted | string[] | Yes | tasksCompleted |
duration | number | Yes | duration |
StoreDecisionParams
Parameters for storing a new decision.| Property | Type | Required | Description |
|---|---|---|---|
type | "architecture" | "technical" | "process" | "strategic" | "tactical" | Yes | type |
decision | string | Yes | decision |
rationale | string | Yes | rationale |
confidence | "high" | "medium" | "low" | Yes | confidence |
outcome | "pending" | "success" | "failure" | "mixed" | null | undefined | No | outcome |
alternatives | string[] | undefined | No | alternatives |
contextEpicId | string | undefined | No | contextEpicId |
contextTaskId | string | undefined | No | contextTaskId |
contextPhase | string | undefined | No | contextPhase |
SearchDecisionParams
Parameters for searching decisions.| Property | Type | Required | Description |
|---|---|---|---|
type | "architecture" | "technical" | "process" | "strategic" | "tactical" | undefined | No | type |
confidence | "high" | "medium" | "low" | undefined | No | confidence |
outcome | "pending" | "success" | "failure" | "mixed" | null | undefined | No | outcome |
query | string | undefined | No | query |
limit | number | undefined | No | limit |
ListDecisionParams
Parameters for listing decisions.| Property | Type | Required | Description |
|---|---|---|---|
limit | number | undefined | No | limit |
offset | number | undefined | No | offset |
PatternType
Pattern types from ADR-009.PatternImpact
Impact level.StorePatternParams
Parameters for storing a new pattern.| Property | Type | Required | Description |
|---|---|---|---|
type | PatternType | Yes | type |
pattern | string | Yes | pattern |
context | string | Yes | context |
impact | PatternImpact | undefined | No | impact |
antiPattern | string | undefined | No | antiPattern |
mitigation | string | undefined | No | mitigation |
examples | string[] | undefined | No | examples |
successRate | number | undefined | No | successRate |
SearchPatternParams
Parameters for searching patterns.| Property | Type | Required | Description |
|---|---|---|---|
type | PatternType | undefined | No | type |
impact | PatternImpact | undefined | No | impact |
query | string | undefined | No | query |
minFrequency | number | undefined | No | minFrequency |
limit | number | undefined | No | limit |
RecordAssumptionParams
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | undefined | No | sessionId |
taskId | string | undefined | No | taskId |
assumption | string | Yes | assumption |
confidence | "high" | "medium" | "low" | Yes | confidence |
BulkLinkEntry
A link to be created in bulk.| Property | Type | Required | Description |
|---|---|---|---|
memoryType | "decision" | "pattern" | "learning" | "observation" | Yes | memoryType |
memoryId | string | Yes | memoryId |
taskId | string | Yes | taskId |
linkType | "produced_by" | "applies_to" | "informed_by" | "contradicts" | Yes | linkType |
SessionMemoryResult
Result of persisting session memory to brain.db.| Property | Type | Required | Description |
|---|---|---|---|
observationsCreated | number | Yes | Number of observations created |
linksCreated | number | Yes | Number of links created |
observationIds | string[] | Yes | IDs of created observations |
errors | string[] | Yes | Whether any errors occurred (best-effort — errors don’t fail the operation) |
MemoryItem
A memory item to be persisted to brain.db.| Property | Type | Required | Description |
|---|---|---|---|
text | string | Yes | text |
title | string | Yes | title |
type | "discovery" | "change" | "feature" | "bugfix" | "decision" | "refactor" | Yes | type |
sourceSessionId | string | Yes | sourceSessionId |
sourceType | "session-debrief" | Yes | sourceType |
linkTaskId | string | undefined | No | Optional task ID to link this observation to |
SessionMemoryContext
Memory context returned for session start/resume enrichment.| Property | Type | Required | Description |
|---|---|---|---|
recentDecisions | BrainCompactHit[] | Yes | Recent decisions relevant to this scope |
relevantPatterns | BrainCompactHit[] | Yes | Patterns relevant to this scope |
recentObservations | BrainCompactHit[] | Yes | Recent observations from prior sessions |
recentLearnings | BrainCompactHit[] | Yes | Recent learnings relevant to this scope |
tokensEstimated | number | Yes | Total token estimate for this context |
Pipeline
Pipeline entity representing a task’s lifecycle state. T4800 T4799 - Unified pipeline structure replaces scattered manifests| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier (task ID format: T####) |
currentStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Current stage in the pipeline |
createdAt | Date | Yes | When the pipeline was created |
updatedAt | Date | Yes | When the pipeline was last updated |
status | "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | Yes | Overall pipeline status |
isActive | boolean | Yes | Whether the pipeline is currently active (not completed/cancelled) |
completedAt | Date | undefined | No | When the pipeline completed (if applicable) |
cancelledReason | string | undefined | No | Cancellation reason (if cancelled) |
transitionCount | number | Yes | Number of stage transitions made |
version | number | Yes | Version for optimistic locking |
PipelineStageRecord
Pipeline stage record linking pipeline to individual stages. T4800 T4801 - Requires pipeline_stages table| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | Unique identifier |
pipelineId | string | Yes | Reference to the pipeline |
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Stage name |
status | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | Stage status |
startedAt | Date | undefined | No | When the stage was started |
completedAt | Date | undefined | No | When the stage was completed |
durationMs | number | undefined | No | Stage duration in milliseconds (computed) |
assignedAgent | string | undefined | No | Assigned agent for this stage |
notes | string | undefined | No | Stage-specific metadata/notes |
order | number | Yes | Stage order in pipeline |
PipelineTransition
Pipeline transition record for audit trail. T4800 T4801 - Requires pipeline_transitions table| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | Unique identifier |
pipelineId | string | Yes | Pipeline reference |
fromStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | From stage |
toStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | To stage |
transitionedAt | Date | Yes | When the transition occurred |
transitionedBy | string | Yes | Agent/user who initiated the transition |
reason | string | undefined | No | Reason for the transition |
prerequisitesChecked | boolean | Yes | Whether prerequisites were checked |
validationErrors | string[] | undefined | No | Any validation errors that occurred |
InitializePipelineOptions
Options for initializing a pipeline. T4800| Property | Type | Required | Description |
|---|---|---|---|
startStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefined | No | Starting stage (defaults to ‘research’) |
initialStatus | "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | undefined | No | Initial status (defaults to ‘active’) |
assignedAgent | string | undefined | No | Assigning agent |
AdvanceStageOptions
Options for advancing pipeline stage. T4800| Property | Type | Required | Description |
|---|---|---|---|
toStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Target stage to advance to |
reason | string | undefined | No | Reason for the advancement |
initiatedBy | string | Yes | Agent/user initiating the transition |
skipPrerequisites | boolean | undefined | No | Whether to skip prerequisite check (emergency only) |
force | boolean | undefined | No | Whether to force transition even if blocked |
PipelineQueryOptions
Pipeline query options. T4800| Property | Type | Required | Description |
|---|---|---|---|
status | "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | undefined | No | Filter by status |
currentStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefined | No | Filter by current stage |
isActive | boolean | undefined | No | Filter by active state |
limit | number | undefined | No | Limit results |
offset | number | undefined | No | Offset for pagination |
orderBy | "createdAt" | "updatedAt" | "currentStage" | undefined | No | Order by (default: createdAt desc) |
order | "asc" | "desc" | undefined | No | Order direction |
BriefingTask
Task summary for briefing output.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
leverage | number | Yes | leverage |
score | number | Yes | score |
BriefingBug
Bug summary for briefing output.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
priority | string | Yes | priority |
BriefingBlockedTask
Blocked task summary for briefing output.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
blockedBy | string[] | Yes | blockedBy |
BriefingEpic
Active epic summary for briefing output.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
completionPercent | number | Yes | completionPercent |
PipelineStageInfo
Pipeline stage data for briefing output.| Property | Type | Required | Description |
|---|---|---|---|
currentStage | string | Yes | currentStage |
stageStatus | string | Yes | stageStatus |
LastSessionInfo
Last session info with handoff data.| Property | Type | Required | Description |
|---|---|---|---|
endedAt | string | Yes | endedAt |
duration | number | Yes | duration |
handoff | HandoffData | Yes | handoff |
CurrentTaskInfo
Currently active task info.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
blockedBy | string[] | undefined | No | blockedBy |
SessionBriefing
Session briefing result.| Property | Type | Required | Description |
|---|---|---|---|
lastSession | LastSessionInfo | null | Yes | lastSession |
currentTask | CurrentTaskInfo | null | Yes | currentTask |
nextTasks | BriefingTask[] | Yes | nextTasks |
openBugs | BriefingBug[] | Yes | openBugs |
blockedTasks | BriefingBlockedTask[] | Yes | blockedTasks |
activeEpics | BriefingEpic[] | Yes | activeEpics |
pipelineStage | PipelineStageInfo | undefined | No | pipelineStage |
warnings | string[] | undefined | No | warnings |
memoryContext | SessionMemoryContext | undefined | No | Brain memory context — decisions/patterns/observations relevant to this scope. |
BriefingOptions
Options for computing session briefing.| Property | Type | Required | Description |
|---|---|---|---|
maxNextTasks | number | undefined | No | Maximum number of next tasks to include (default: 5) |
maxBugs | number | undefined | No | Maximum number of bugs to include (default: 10) |
maxBlocked | number | undefined | No | Maximum number of blocked tasks to include (default: 10) |
maxEpics | number | undefined | No | Maximum number of active epics to include (default: 5) |
scope | string | undefined | No | Scope filter: ‘global’ or ‘epic:T###‘ |
MinimalSessionRecord
Minimal session record returned by findSessions().| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
name | string | Yes | name |
status | string | Yes | status |
startedAt | string | Yes | startedAt |
scope | SessionScope | Yes | scope |
_next | NextDirectives | undefined | No | Progressive disclosure directives for follow-up operations. |
FindSessionsParams
Parameters for findSessions().| Property | Type | Required | Description |
|---|---|---|---|
status | string | undefined | No | status |
scope | string | undefined | No | scope |
query | string | undefined | No | query |
limit | number | undefined | No | limit |
ContextDriftResult
| Property | Type | Required | Description |
|---|---|---|---|
score | number | Yes | score |
factors | string[] | Yes | factors |
completedInScope | number | Yes | completedInScope |
totalInScope | number | Yes | totalInScope |
outOfScope | number | Yes | outOfScope |
SessionHistoryEntry
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
name | string | undefined | No | name |
status | string | Yes | status |
startedAt | string | Yes | startedAt |
endedAt | string | null | undefined | No | endedAt |
tasksCompleted | number | Yes | tasksCompleted |
focusChanges | number | Yes | focusChanges |
focusHistory | { taskId: string; timestamp: string; }[] | Yes | focusHistory |
SessionHistoryParams
| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | undefined | No | sessionId |
limit | number | undefined | No | limit |
SessionStatsResult
| Property | Type | Required | Description |
|---|---|---|---|
totalSessions | number | Yes | totalSessions |
activeSessions | number | Yes | activeSessions |
suspendedSessions | number | Yes | suspendedSessions |
endedSessions | number | Yes | endedSessions |
archivedSessions | number | Yes | archivedSessions |
totalTasksCompleted | number | Yes | totalTasksCompleted |
totalFocusChanges | number | Yes | totalFocusChanges |
averageResumeCount | number | Yes | averageResumeCount |
session | { id: string; status: string; tasksCompleted: number; focusChanges: number; resumeCount: number; durationMinutes: number; } | undefined | No | session |
RuntimeProviderContext
| Property | Type | Required | Description |
|---|---|---|---|
runtimeProviderId | string | undefined | No | runtimeProviderId |
runtimeToolName | string | undefined | No | runtimeToolName |
runtimeVendor | string | undefined | No | runtimeVendor |
runtimeInstructionFile | string | undefined | No | runtimeInstructionFile |
runtimeProjectDetected | boolean | undefined | No | runtimeProjectDetected |
runtimeDetectionMethods | string[] | undefined | No | runtimeDetectionMethods |
runtimeCandidates | string[] | undefined | No | runtimeCandidates |
inferredModelProvider | string | undefined | No | inferredModelProvider |
RuntimeProviderSnapshot
| Property | Type | Required | Description |
|---|---|---|---|
cwd | string | undefined | No | cwd |
argv | string[] | undefined | No | argv |
env | NodeJS.ProcessEnv | undefined | No | env |
StartSessionOptions
Options for starting a session.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
scope | string | Yes | scope |
autoStart | boolean | undefined | No | autoStart |
startTask | string | undefined | No | startTask |
focus | string | undefined | No | focus |
agent | string | undefined | No | agent |
grade | boolean | undefined | No | Enable full query+mutation audit logging for this session (behavioral grading). |
providerId | string | undefined | No | Provider adapter ID active for this session (T5240). |
EndSessionOptions
Options for ending a session.| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | undefined | No | sessionId |
note | string | undefined | No | note |
ListSessionsOptions
Options for listing sessions.| Property | Type | Required | Description |
|---|---|---|---|
status | string | undefined | No | status |
limit | number | undefined | No | limit |
EnforcementMode
Enforcement modes.ActiveSessionInfo
Session info for enforcement checks.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
name | string | Yes | name |
scope | { type: string; epicId?: string; } | No | scope |
EnforcementResult
Enforcement result.| Property | Type | Required | Description |
|---|---|---|---|
allowed | boolean | Yes | allowed |
mode | EnforcementMode | Yes | mode |
session | ActiveSessionInfo | null | Yes | session |
warning | string | undefined | No | warning |
ValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
error | string | undefined | No | error |
fix | string | undefined | No | fix |
exitCode | ExitCode | undefined | No | exitCode |
AddTaskEnforcementOptions
| Property | Type | Required | Description |
|---|---|---|---|
acceptance | string[] | undefined | No | acceptance |
priority | string | undefined | No | priority |
UpdateTaskEnforcementOptions
| Property | Type | Required | Description |
|---|---|---|---|
acceptance | string[] | undefined | No | acceptance |
AcceptanceEnforcement
| Property | Type | Required | Description |
|---|---|---|---|
validateCreation | (options: AddTaskEnforcementOptions) => ValidationResult | Yes | validateCreation |
validateUpdate | (task: Task, updates: UpdateTaskEnforcementOptions) => ValidationResult | Yes | validateUpdate |
validateCompletion | (task: Task) => ValidationResult | Yes | validateCompletion |
checkMinimumCriteria | (criteria: string[], minCriteria: number) => boolean | Yes | checkMinimumCriteria |
ResolvedParent
Minimal parent task shape needed for pipeline stage resolution. T060| Property | Type | Required | Description |
|---|---|---|---|
pipelineStage | string | null | undefined | No | pipelineStage |
type | TaskType | null | undefined | No | type |
TaskPipelineStage
Union type of all valid pipeline stage names.LifecycleMode
The resolved enforcement mode (from lifecycle.mode config key).EpicEnforcementResult
Result of an enforcement check.warning is populated in advisory mode.
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | True unless a hard block was raised. |
warning | string | undefined | No | Advisory 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.
| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | title |
description | string | Yes | description |
status | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | status |
priority | TaskPriority | undefined | No | priority |
type | TaskType | undefined | No | type |
parentId | string | null | undefined | No | parentId |
size | TaskSize | undefined | No | size |
phase | string | undefined | No | phase |
labels | string[] | undefined | No | labels |
files | string[] | undefined | No | files |
acceptance | string[] | undefined | No | acceptance |
depends | string[] | undefined | No | depends |
notes | string | undefined | No | notes |
position | number | undefined | No | position |
addPhase | boolean | undefined | No | addPhase |
dryRun | boolean | undefined | No | dryRun |
pipelineStage | string | undefined | No | RCASD-IVTR+C pipeline stage to assign. Auto-resolved if not provided. T060 |
AddTaskResult
Result of adding a task.| Property | Type | Required | Description |
|---|---|---|---|
task | Task | Yes | task |
duplicate | boolean | undefined | No | duplicate |
dryRun | boolean | undefined | No | dryRun |
ListPhasesResult
Options for listing phases.| Property | Type | Required | Description |
|---|---|---|---|
currentPhase | string | null | Yes | currentPhase |
phases | { slug: string; name: string; order: number; status: PhaseStatus; startedAt: string | null; completedAt: string | null; isCurrent: boolean; }[] | Yes | phases |
summary | { total: number; pending: number; active: number; completed: number; } | Yes | summary |
SetPhaseOptions
Options for setting current phase.| Property | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | slug |
rollback | boolean | undefined | No | rollback |
force | boolean | undefined | No | force |
dryRun | boolean | undefined | No | dryRun |
SetPhaseResult
Result of a phase set operation.| Property | Type | Required | Description |
|---|---|---|---|
previousPhase | string | null | Yes | previousPhase |
currentPhase | string | Yes | currentPhase |
isRollback | boolean | Yes | isRollback |
isSkip | boolean | Yes | isSkip |
skippedPhases | number | undefined | No | skippedPhases |
warning | string | undefined | No | warning |
dryRun | boolean | undefined | No | dryRun |
ShowPhaseResult
Phase show result.| Property | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | slug |
name | string | Yes | name |
status | PhaseStatus | Yes | status |
order | number | Yes | order |
startedAt | string | null | Yes | startedAt |
completedAt | string | null | Yes | completedAt |
taskCount | number | Yes | taskCount |
completedTaskCount | number | Yes | completedTaskCount |
AdvancePhaseResult
Phase advance result.| Property | Type | Required | Description |
|---|---|---|---|
previousPhase | string | Yes | previousPhase |
currentPhase | string | Yes | currentPhase |
forced | boolean | Yes | forced |
RenamePhaseResult
Phase rename result.| Property | Type | Required | Description |
|---|---|---|---|
oldName | string | Yes | oldName |
newName | string | Yes | newName |
tasksUpdated | number | Yes | tasksUpdated |
currentPhaseUpdated | boolean | Yes | currentPhaseUpdated |
DeletePhaseResult
Phase delete result.| Property | Type | Required | Description |
|---|---|---|---|
deletedPhase | string | Yes | deletedPhase |
tasksReassigned | number | Yes | tasksReassigned |
reassignedTo | string | null | Yes | reassignedTo |
PruneResult
| Property | Type | Required | Description |
|---|---|---|---|
rowsArchived | number | Yes | rowsArchived |
rowsDeleted | number | Yes | rowsDeleted |
archivePath | string | undefined | No | archivePath |
SchemaInstallResult
| Property | Type | Required | Description |
|---|---|---|---|
installed | number | Yes | installed |
updated | number | Yes | updated |
total | number | Yes | total |
StalenessReport
| Property | Type | Required | Description |
|---|---|---|---|
stale | string[] | Yes | stale |
current | string[] | Yes | current |
missing | string[] | Yes | missing |
InstalledSchema
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
path | string | Yes | path |
version | string | null | Yes | version |
CheckResult
| Property | Type | Required | Description |
|---|---|---|---|
ok | boolean | Yes | ok |
installed | number | Yes | installed |
bundled | number | Yes | bundled |
missing | string[] | Yes | missing |
stale | string[] | Yes | stale |
JsonFileIntegrityResult
Result for a single file check.| Property | Type | Required | Description |
|---|---|---|---|
label | string | Yes | label |
status | "missing" | "ok" | "invalid" | "version_mismatch" | "schema_not_found" | Yes | status |
errors | string[] | Yes | errors |
dataVersion | string | undefined | No | Version found in the data file. |
expectedVersion | string | undefined | No | Version declared in the schema file. |
SchemaIntegrityReport
Full integrity report for all JSON files.| Property | Type | Required | Description |
|---|---|---|---|
files | JsonFileIntegrityResult[] | Yes | files |
sqliteVersion | string | null | Yes | SQLite schema_meta.schemaVersion — null if DB not accessible. |
allOk | boolean | Yes | allOk |
ProjectType
Detected project type.TestFramework
Test framework.FileNamingConvention
ImportStyle
ProjectContext
Schema-compliant project context for LLM agent consumption.| Property | Type | Required | Description |
|---|---|---|---|
schemaVersion | string | Yes | schemaVersion |
detectedAt | string | Yes | detectedAt |
projectTypes | ProjectType[] | Yes | projectTypes |
primaryType | ProjectType | undefined | No | primaryType |
monorepo | boolean | Yes | monorepo |
testing | { framework?: TestFramework; command?: string; testFilePatterns?: string[]; directories?: { unit?: string; integration?: string; }; } | undefined | No | testing |
build | { command?: string; outputDir?: string; } | undefined | No | build |
directories | { source?: string; tests?: string; docs?: string; } | undefined | No | directories |
conventions | { fileNaming?: FileNamingConvention; importStyle?: ImportStyle; typeSystem?: string; } | undefined | No | conventions |
llmHints | { preferredTestStyle?: string; typeSystem?: string; commonPatterns?: string[]; avoidPatterns?: string[]; } | undefined | No | llmHints |
ScaffoldResult
| Property | Type | Required | Description |
|---|---|---|---|
action | "created" | "skipped" | "repaired" | Yes | action |
path | string | Yes | path |
details | string | undefined | No | details |
InjectionCheckResult
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
category | string | Yes | category |
status | "info" | "warning" | "failed" | "passed" | Yes | status |
message | string | Yes | message |
details | Record<string, unknown> | Yes | details |
fix | string | null | Yes | fix |
ScaffoldResult
Result of an ensure* scaffolding operation.| Property | Type | Required | Description |
|---|---|---|---|
action | "created" | "skipped" | "repaired" | Yes | What action was taken: created, repaired, or skipped. |
path | string | Yes | Filesystem path that was operated on. |
details | string | undefined | No | Human-readable explanation of the result. |
CheckStatus
Status of a check* diagnostic.CheckResult
Result of a check* diagnostic (compatible with doctor/checks.ts CheckResult).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique check identifier (e.g. “cleo_structure”, “sqlite_db”). |
category | string | Yes | Category grouping (e.g. “scaffold”, “global”). |
status | CheckStatus | Yes | Diagnostic outcome: passed, failed, warning, or info. |
message | string | Yes | Human-readable description of the check result. |
details | Record<string, unknown> | Yes | Structured metadata about the check (paths, sizes, missing items). |
fix | string | null | Yes | Suggested CLI command to fix the issue, or null if passed. |
ProjectClassification
Classification result for a project directory.| Property | Type | Required | Description |
|---|---|---|---|
kind | "greenfield" | "brownfield" | Yes | Project type: ‘greenfield’ (empty/new) or ‘brownfield’ (existing). |
directory | string | Yes | Absolute path that was classified. |
signals | ClassificationSignal[] | Yes | Signal list — which indicators led to the classification. |
topLevelFileCount | number | Yes | Total non-hidden files found at the top level (for reporting). |
hasGit | boolean | Yes | Whether a .git/ directory is present. |
ClassificationSignal
A single classification signal detected on the filesystem.| Property | Type | Required | Description |
|---|---|---|---|
id | "docs" | "git-dir" | "source-dir" | "package-manifest" | "rust-manifest" | "go-manifest" | "python-manifest" | "readme" | "empty" | Yes | Canonical signal id for programmatic handling. |
description | string | Yes | Human-readable description of what was detected. |
path | string | Yes | File or directory that triggered this signal. |
ScaffoldResult
| Property | Type | Required | Description |
|---|---|---|---|
action | "created" | "skipped" | "repaired" | Yes | action |
path | string | Yes | path |
details | string | undefined | No | details |
HookCheckResult
| Property | Type | Required | Description |
|---|---|---|---|
hook | string | Yes | hook |
installed | boolean | Yes | installed |
current | boolean | Yes | current |
sourcePath | string | Yes | sourcePath |
installedPath | string | Yes | installedPath |
EnsureGitHooksOptions
| Property | Type | Required | Description |
|---|---|---|---|
force | boolean | undefined | No | force |
ManagedHook
LegacyDetectionResult
Result of detecting legacy agent-output directories.| Property | Type | Required | Description |
|---|---|---|---|
hasLegacy | boolean | Yes | Whether any legacy directories were found. |
hasResearchOutputs | boolean | Yes | claudedocs/research-outputs/ exists. |
hasLegacyAgentOutputs | boolean | Yes | claudedocs/agent-outputs/ exists. |
hasCanonical | boolean | Yes | .cleo/agent-outputs/ already exists. |
legacyPaths | string[] | Yes | Human-readable list of found legacy paths. |
AgentOutputsMigrationResult
Result of running the agent-outputs migration.| Property | Type | Required | Description |
|---|---|---|---|
migrated | boolean | Yes | Whether migration was performed. |
filesCopied | number | Yes | Number of files copied to canonical location. |
manifestEntries | number | Yes | Number of manifest entries in the merged pipeline_manifest. |
removed | string[] | Yes | Legacy directories that were removed. |
summary | string | Yes | Human-readable summary of what happened. |
NexusPermissionLevel
NexusHealthStatus
NexusProject
Domain representation of a registered Nexus project.| Property | Type | Required | Description |
|---|---|---|---|
hash | string | Yes | hash |
projectId | string | Yes | projectId |
path | string | Yes | path |
name | string | Yes | name |
registeredAt | string | Yes | registeredAt |
lastSeen | string | Yes | lastSeen |
healthStatus | NexusHealthStatus | Yes | healthStatus |
healthLastCheck | string | null | Yes | healthLastCheck |
permissions | NexusPermissionLevel | Yes | permissions |
lastSync | string | Yes | lastSync |
taskCount | number | Yes | taskCount |
labels | string[] | Yes | labels |
NexusRegistryFile
Legacy registry file shape (pre-SQLite). Retained for migration compatibility.| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | undefined | No | $schema |
schemaVersion | string | Yes | schemaVersion |
lastUpdated | string | Yes | lastUpdated |
projects | Record<string, NexusProject> | Yes | projects |
StackAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
languages | string[] | Yes | languages |
frameworks | string[] | Yes | frameworks |
dependencies | { name: string; version: string; dev: boolean; }[] | Yes | dependencies |
packageManager | string | undefined | No | packageManager |
runtime | string | undefined | No | runtime |
ArchAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
layers | { name: string; path: string; purpose: string; }[] | Yes | layers |
entryPoints | { path: string; type: string; }[] | Yes | entryPoints |
patterns | string[] | Yes | patterns |
StructureAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
directories | { path: string; purpose: string; fileCount: number; }[] | Yes | directories |
totalFiles | number | Yes | totalFiles |
totalLines | number | undefined | No | totalLines |
ConventionAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
fileNaming | string | Yes | fileNaming |
importStyle | string | Yes | importStyle |
linter | string | undefined | No | linter |
formatter | string | undefined | No | formatter |
typeSystem | string | undefined | No | typeSystem |
errorHandling | string | undefined | No | errorHandling |
TestingAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
framework | string | Yes | framework |
patterns | string[] | Yes | patterns |
directories | string[] | Yes | directories |
hasFixtures | boolean | Yes | hasFixtures |
hasMocks | boolean | Yes | hasMocks |
coverageConfigured | boolean | Yes | coverageConfigured |
IntegrationAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
apis | string[] | Yes | apis |
databases | string[] | Yes | databases |
auth | string[] | Yes | auth |
cicd | string[] | Yes | cicd |
containerized | boolean | Yes | containerized |
ConcernAnalysis
| Property | Type | Required | Description |
|---|---|---|---|
todos | { file: string; line: number; text: string; }[] | Yes | todos |
largeFiles | { path: string; lines: number; }[] | Yes | largeFiles |
complexity | { high: number; medium: number; low: number; } | Yes | complexity |
CodebaseMapResult
| Property | Type | Required | Description |
|---|---|---|---|
projectContext | ProjectContext | Yes | projectContext |
stack | StackAnalysis | Yes | stack |
architecture | ArchAnalysis | Yes | architecture |
structure | StructureAnalysis | Yes | structure |
conventions | ConventionAnalysis | Yes | conventions |
testing | TestingAnalysis | Yes | testing |
integrations | IntegrationAnalysis | Yes | integrations |
concerns | ConcernAnalysis | Yes | concerns |
analyzedAt | string | Yes | analyzedAt |
MapCodebaseOptions
| Property | Type | Required | Description |
|---|---|---|---|
focus | "stack" | "testing" | "architecture" | "structure" | "conventions" | "integrations" | "concerns" | undefined | No | focus |
storeToBrain | boolean | undefined | No | storeToBrain |
InitOptions
Options for the init operation.| Property | Type | Required | Description |
|---|---|---|---|
name | string | undefined | No | Project name override. |
force | boolean | undefined | No | Overwrite existing files. |
detect | boolean | undefined | No | Auto-detect project configuration. |
mapCodebase | boolean | undefined | No | Run codebase analysis and store findings to brain.db. |
InitResult
Result of the init operation.| Property | Type | Required | Description |
|---|---|---|---|
initialized | boolean | Yes | initialized |
directory | string | Yes | directory |
created | string[] | Yes | created |
skipped | string[] | Yes | skipped |
warnings | string[] | Yes | warnings |
updateDocsOnly | boolean | undefined | No | updateDocsOnly |
classification | { kind: "greenfield" | "brownfield"; signalCount: number; topLevelFileCount: number; hasGit: boolean; } | undefined | No | Phase 5 — Greenfield/brownfield classification of the directory. Populated by the discovery module during init. |
nextSteps | { action: string; command: string; }[] | undefined | No | Phase 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.| Property | Type | Required | Description |
|---|---|---|---|
created | string[] | Yes | created |
warnings | string[] | Yes | warnings |
isDryRun | boolean | Yes | isDryRun |
BootstrapOptions
Options for bootstrapGlobalCleo.| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | undefined | No | Preview changes without applying. |
packageRoot | string | undefined | No | Override package root for template/skill discovery. |
ExportFormat
ExportParams
| Property | Type | Required | Description |
|---|---|---|---|
format | ExportFormat | undefined | No | format |
output | string | undefined | No | output |
status | string | undefined | No | status |
parent | string | undefined | No | parent |
phase | string | undefined | No | phase |
cwd | string | undefined | No | cwd |
ExportResult
| Property | Type | Required | Description |
|---|---|---|---|
format | ExportFormat | Yes | format |
taskCount | number | Yes | taskCount |
file | string | undefined | No | file |
content | string | undefined | No | content |
ImportParams
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
parent | string | undefined | No | parent |
phase | string | undefined | No | phase |
onDuplicate | DuplicateStrategy | undefined | No | onDuplicate |
addLabel | string | undefined | No | addLabel |
dryRun | boolean | undefined | No | dryRun |
cwd | string | undefined | No | cwd |
ImportResult
| Property | Type | Required | Description |
|---|---|---|---|
imported | number | Yes | imported |
skipped | number | Yes | skipped |
renamed | { oldId: string; newId: string; }[] | Yes | renamed |
totalTasks | number | Yes | totalTasks |
dryRun | boolean | undefined | No | dryRun |
AgentExecutionOutcome
The outcome of an agent’s execution attempt on a task.AgentExecutionEvent
Context recorded when an agent completes or fails a task.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent instance ID (agt_…). |
agentType | "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | Yes | Agent type classification. |
taskId | string | Yes | Task ID that was attempted. |
taskType | string | Yes | Task type: ‘epic’ | ‘task’ | ‘subtask’. |
taskLabels | string[] | undefined | No | Task labels for richer pattern classification. |
outcome | AgentExecutionOutcome | Yes | Execution outcome. |
errorMessage | string | undefined | No | Error message if outcome is ‘failure’. |
errorType | "unknown" | "retriable" | "permanent" | undefined | No | Error classification if outcome is ‘failure’. |
sessionId | string | undefined | No | Session ID the agent was running under. |
durationMs | number | undefined | No | Duration of execution in milliseconds (optional). |
AgentPerformanceSummary
Summary of an agent type’s execution performance on a task type.| Property | Type | Required | Description |
|---|---|---|---|
agentType | "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | Yes | Agent type. |
taskType | string | Yes | Task type this summary is for. |
totalAttempts | number | Yes | Total execution attempts tracked. |
successCount | number | Yes | Number of successful attempts. |
failureCount | number | Yes | Number of failed attempts. |
successRate | number | Yes | Success rate [0.0 – 1.0]. |
lastOutcome | AgentExecutionOutcome | null | Yes | Most recent attempt outcome. |
lastSeenAt | string | null | Yes | Timestamp of the most recent tracked decision. |
HealingSuggestion
A self-healing suggestion derived from failure pattern history.| Property | Type | Required | Description |
|---|---|---|---|
patternId | string | Yes | Pattern ID from brain_patterns. |
failurePattern | string | Yes | Human-readable description of the failure pattern. |
frequency | number | Yes | Times this pattern has been seen. |
suggestion | string | Yes | Mitigation / suggested next action. |
confidence | number | Yes | How confident the system is in this suggestion [0.0 – 1.0]. |
AgentCapacity
Task-count-based capacity for a single agent instance.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent instance ID. |
agentType | "orchestrator" | "custom" | "executor" | "researcher" | "architect" | "validator" | "documentor" | Yes | Agent type classification. |
status | "error" | "active" | "starting" | "idle" | "crashed" | "stopped" | Yes | Current status of the agent. |
activeTasks | number | Yes | Number of tasks currently assigned to this agent. |
remainingCapacity | number | Yes | Number of additional tasks this agent can accept (max - active). |
maxCapacity | number | Yes | Maximum tasks this agent can hold (MAX_TASKS_PER_AGENT). |
available | boolean | Yes | Whether this agent can accept new tasks. |
AgentPerformanceMetrics
Metrics provided when recording agent performance.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID that was processed. |
taskType | string | Yes | Task type label (e.g. “epic”, “task”, “subtask”). |
outcome | AgentExecutionOutcome | Yes | Outcome of the agent’s work on the task. |
taskLabels | string[] | undefined | No | Optional task labels for richer pattern classification. |
sessionId | string | undefined | No | Session ID the agent was operating under. |
durationMs | number | undefined | No | Duration of execution in milliseconds. |
errorMessage | string | undefined | No | Error message if outcome is “failure”. |
errorType | "unknown" | "retriable" | "permanent" | undefined | No | Error classification if outcome is “failure”. |
CapacitySummary
Capacity summary for reporting.| Property | Type | Required | Description |
|---|---|---|---|
totalCapacity | number | Yes | totalCapacity |
activeAgentCount | number | Yes | activeAgentCount |
averageCapacity | number | Yes | averageCapacity |
overloaded | boolean | Yes | overloaded |
threshold | number | Yes | threshold |
AgentHealthStatus
Health status of a specific agent instance.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent instance ID. |
status | "error" | "active" | "starting" | "idle" | "crashed" | "stopped" | Yes | Current DB status. |
lastHeartbeat | string | Yes | ISO timestamp of the last recorded heartbeat. |
heartbeatAgeMs | number | Yes | Milliseconds since the last heartbeat (at call time). |
healthy | boolean | Yes | Whether the agent is considered healthy (heartbeat within threshold). |
stale | boolean | Yes | Whether the agent is considered stale (heartbeat older than threshold). |
thresholdMs | number | Yes | Threshold used for staleness determination (ms). |
RetryPolicy
Configuration for retry behavior.| Property | Type | Required | Description |
|---|---|---|---|
maxRetries | number | Yes | Maximum number of retry attempts. Default: 3. |
baseDelayMs | number | Yes | Base delay in milliseconds before first retry. Default: 1000. |
maxDelayMs | number | Yes | Maximum delay in milliseconds between retries. Default: 30000. |
backoffMultiplier | number | Yes | Multiplier for exponential backoff. Default: 2. |
jitter | boolean | Yes | Whether to add random jitter to delays. Default: true. |
retryOnUnknown | boolean | Yes | Whether to retry on ‘unknown’ error classification. Default: true. |
RetryResult
Result of a retried operation.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
value | T | undefined | No | value |
error | Error | undefined | No | error |
attempts | number | Yes | attempts |
totalDelayMs | number | Yes | totalDelayMs |
AgentRecoveryResult
Result of a recovery attempt for a single agent.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | agentId |
recovered | boolean | Yes | recovered |
action | "skipped" | "restarted" | "abandoned" | Yes | action |
reason | string | Yes | reason |
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.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable factor name (e.g., “complexity”, “blocking_risk”). |
weight | number | Yes | How much this factor contributes to the total score (0-1). |
value | number | Yes | Current measured value for this factor (0-1, where 1 = highest risk). |
description | string | Yes | Explanation of why this factor has its current value. |
RiskAssessment
Complete risk assessment for a single task. Returned bycalculateTaskRisk. The riskScore is the weighted aggregate of all RiskFactor entries in factors.
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | The task ID this assessment applies to. |
riskScore | number | Yes | Aggregate risk score (0-1, where 1 = highest risk). |
confidence | number | Yes | Confidence in the assessment (0-1). Higher when more data is available. |
factors | RiskFactor[] | Yes | Individual risk factors that contributed to the score. |
recommendation | string | Yes | Human-readable recommendation based on the risk level. |
ValidationPrediction
Predicted outcome for a lifecycle validation gate. Returned bypredictValidationOutcome. Combines historical pattern data with the task’s current state to estimate pass likelihood.
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | The task ID being evaluated. |
stage | string | Yes | The lifecycle stage being predicted (e.g., “specification”, “implementation”). |
passLikelihood | number | Yes | Probability of passing the gate (0-1). |
blockers | string[] | Yes | Known blockers that may prevent passing. |
suggestions | string[] | Yes | Actionable 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.| Property | Type | Required | Description |
|---|---|---|---|
type | "workflow" | "success" | "failure" | "blocker" | "optimization" | Yes | Pattern type classification. |
pattern | string | Yes | Human-readable pattern description. |
context | string | Yes | Context in which the pattern was observed. |
frequency | number | Yes | How many times this pattern was observed. |
successRate | number | null | Yes | Success rate when this pattern appears (0-1, null if unknown). |
impact | "high" | "medium" | "low" | Yes | Estimated impact level. |
antiPattern | string | null | Yes | If this is an anti-pattern, describe the negative behavior. |
mitigation | string | null | Yes | Recommended mitigation for anti-patterns. |
examples | string[] | Yes | Example task IDs or descriptions where this pattern occurred. |
confidence | number | Yes | Confidence 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.| Property | Type | Required | Description |
|---|---|---|---|
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; } | Yes | The matched brain_patterns row. |
relevanceScore | number | Yes | How relevant this pattern is to the target task (0-1). |
matchReason | string | Yes | Why this pattern was matched. |
isAntiPattern | boolean | Yes | Whether this is an anti-pattern match (warns about potential issues). |
PatternExtractionOptions
Options for pattern extraction from historical data.| Property | Type | Required | Description |
|---|---|---|---|
minFrequency | number | undefined | No | Minimum number of occurrences to consider something a pattern. Default: 2. |
minConfidence | number | undefined | No | Minimum confidence threshold (0-1). Default: 0.3. |
limit | number | undefined | No | Maximum number of patterns to return. Default: 50. |
type | "workflow" | "success" | "failure" | "blocker" | "optimization" | undefined | No | Filter by pattern type. |
PatternStatsUpdate
Result of updating pattern statistics after an outcome.| Property | Type | Required | Description |
|---|---|---|---|
patternId | string | Yes | The pattern ID that was updated. |
newFrequency | number | Yes | New frequency value. |
newSuccessRate | number | null | Yes | New success rate (0-1). |
outcomeSuccess | boolean | Yes | Whether the outcome was successful. |
LearningContext
Summary of applicable learnings for a task, used in prediction.| Property | Type | Required | Description |
|---|---|---|---|
applicable | { actionable: boolean; id: string; createdAt: string; updatedAt: string | null; source: string; confidence: number; insight: string; application: string | null; applicableTypesJson: string | null; }[] | Yes | Learnings that apply to this task’s context. |
averageConfidence | number | Yes | Average confidence of applicable learnings. |
actionableCount | number | Yes | Count 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.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | The task being assessed. |
directDependents | string[] | Yes | Tasks that directly depend on this task. |
transitiveDependents | string[] | Yes | All downstream tasks (direct + transitive). |
affectedPipelines | string[] | Yes | Epic IDs whose lifecycle pipelines are affected. |
blockedWorkCount | number | Yes | Count of tasks that would be blocked if this task is not completed. |
isOnCriticalPath | boolean | Yes | Whether this task lies on the project’s critical path. |
blastRadius | BlastRadius | Yes | Quantified scope of the impact. |
ChangeType
The type of change being analyzed.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.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | The task being changed. |
changeType | ChangeType | Yes | The type of change being analyzed. |
affectedTasks | AffectedTask[] | Yes | Tasks affected by this change, with predicted new status. |
cascadeDepth | number | Yes | Maximum depth of cascading effects in the dependency graph. |
recommendation | string | Yes | Human-readable recommendation based on the analysis. |
AffectedTask
A single task affected by a change, with its predicted new state.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID. |
title | string | Yes | Task title. |
currentStatus | string | Yes | Current status before the change. |
newStatus | string | undefined | No | Predicted new status after the change (if it would change). |
reason | string | Yes | Why this task is affected. |
ImpactedTask
A single task predicted to be affected by a free-text change description. Produced bypredictImpact after matching candidate tasks against the change description and running downstream dependency analysis.
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID. |
title | string | Yes | Task title. |
status | string | Yes | Current task status. |
priority | string | Yes | Current task priority. |
exposure | "direct" | "dependent" | "transitive" | Yes | Severity 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 |
downstreamCount | number | Yes | Number of downstream tasks that depend on this task. Higher values indicate higher cascading risk. |
reason | string | Yes | Why this task is predicted to be affected. |
ImpactReport
Full impact prediction report for a free-text change description. Returned bypredictImpact. Combines fuzzy task search with reverse dependency analysis to enumerate which tasks are at risk.
| Property | Type | Required | Description |
|---|---|---|---|
change | string | Yes | The original free-text change description. |
matchedTasks | ImpactedTask[] | Yes | Tasks directly matched by the change description (fuzzy search). These are the “seed” tasks from which downstream impact is traced. |
affectedTasks | ImpactedTask[] | Yes | All tasks predicted to be affected, ordered by exposure severity (direct first, then dependents, then transitive) and then by descending downstream count. |
totalAffected | number | Yes | Total count of distinct affected tasks (including direct matches). |
summary | string | Yes | Human-readable summary of predicted impact scope. |
BlastRadiusSeverity
Severity classification for blast radius.BlastRadius
Quantified scope of a task’s impact across the project.| Property | Type | Required | Description |
|---|---|---|---|
directCount | number | Yes | Number of direct dependents. |
transitiveCount | number | Yes | Number of transitive dependents (full downstream tree). |
epicCount | number | Yes | Number of distinct epics affected. |
projectPercentage | number | Yes | Percentage of the total project impacted (0-100). |
severity | BlastRadiusSeverity | Yes | Classification of impact severity. |
GateFocusRecommendation
A gate-level focus recommendation produced by adaptive validation.| Property | Type | Required | Description |
|---|---|---|---|
gate | VerificationGate | Yes | The verification gate this recommendation applies to. |
priority | "high" | "medium" | "low" | Yes | Priority level: high gates should be checked first; low gates are lower risk for this task type and can be reviewed last. |
rationale | string | Yes | Human-readable rationale for this priority level. |
estimatedPassLikelihood | number | null | Yes | Estimated 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.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID this suggestion applies to. |
gateFocus | GateFocusRecommendation[] | Yes | Ordered gate recommendations (highest priority first). |
overallConfidence | number | Yes | Overall confidence that the task will pass all required gates. |
tips | string[] | Yes | Actionable tips derived from gate focus analysis. Includes failure-pattern mitigations where available. |
VerificationConfidenceScore
Result of scoring and persisting a completed verification round.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID. |
confidenceScore | number | Yes | Computed 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 |
passed | boolean | Yes | Whether the overall verification passed. |
gatesPassed | VerificationGate[] | Yes | IDs of gates that passed. |
gatesFailed | VerificationGate[] | Yes | IDs of gates that failed or are missing. |
observationId | string | undefined | No | Brain observation ID if the score was persisted (may be undefined on dry run). |
learningId | string | undefined | No | Brain learning ID if a learning was extracted (may be undefined). |
StorePredictionOptions
Parameters for storing a quality prediction as a brain observation.| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | undefined | No | Whether to skip persisting to brain (useful in tests). Default: false. |
sessionId | string | undefined | No | Session ID to attach to the observation (optional). |
project | string | undefined | No | Project identifier to attach to the observation (optional). |
DependencyCheckResult
Result of a dependency validation check.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
errors | DependencyError[] | Yes | errors |
warnings | DependencyWarning[] | Yes | warnings |
DependencyError
A dependency error.| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | code |
taskId | string | Yes | taskId |
message | string | Yes | message |
relatedIds | string[] | undefined | No | relatedIds |
DependencyWarning
A dependency warning.| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | code |
taskId | string | Yes | taskId |
message | string | Yes | message |
DependencyWave
A wave of parallelizable tasks.| Property | Type | Required | Description |
|---|---|---|---|
wave | number | Yes | wave |
taskIds | string[] | Yes | taskIds |
NexusParsedQuery
| Property | Type | Required | Description |
|---|---|---|---|
project | string | Yes | project |
taskId | string | Yes | taskId |
wildcard | boolean | Yes | wildcard |
NexusResolvedTask
Task with project context annotation.DiscoverResult
| Property | Type | Required | Description |
|---|---|---|---|
project | string | Yes | project |
taskId | string | Yes | taskId |
title | string | Yes | title |
score | number | Yes | score |
type | string | Yes | type |
reason | string | Yes | reason |
NexusDiscoverResult
| Property | Type | Required | Description |
|---|---|---|---|
query | string | Yes | query |
method | string | Yes | method |
results | DiscoverResult[] | Yes | results |
total | number | Yes | total |
SearchResult
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
priority | string | undefined | No | priority |
description | string | undefined | No | description |
_project | string | Yes | _project |
NexusSearchResult
| Property | Type | Required | Description |
|---|---|---|---|
pattern | string | Yes | pattern |
results | SearchResult[] | Yes | results |
resultCount | number | Yes | resultCount |
PermissionCheckResult
| Property | Type | Required | Description |
|---|---|---|---|
project | string | Yes | project |
required | NexusPermissionLevel | Yes | required |
granted | NexusPermissionLevel | Yes | granted |
allowed | boolean | Yes | allowed |
SharingStatus
Result of a sharing status check.| Property | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | mode |
allowlist | string[] | Yes | allowlist |
denylist | string[] | Yes | denylist |
tracked | string[] | Yes | tracked |
ignored | string[] | Yes | ignored |
hasGit | boolean | Yes | Whether the .cleo/.git isolated repo exists and is initialized. |
remotes | string[] | Yes | Git remote names configured in .cleo/.git (e.g. ['origin']). |
pendingChanges | boolean | Yes | Whether the .cleo/.git working tree has uncommitted changes. |
lastSync | string | null | Yes | ISO 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.| Property | Type | Required | Description |
|---|---|---|---|
currentTask | string | null | Yes | currentTask |
currentPhase | string | null | Yes | currentPhase |
sessionNote | string | null | Yes | sessionNote |
nextAction | string | null | Yes | nextAction |
TaskStartResult
Result of starting work on a task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
taskTitle | string | Yes | taskTitle |
previousTask | string | null | Yes | previousTask |
TaskWorkHistoryEntry
Task work history entry.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
timestamp | string | Yes | timestamp |
CompleteTaskOptions
Options for completing a task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
notes | string | undefined | No | notes |
changeset | string | undefined | No | changeset |
CompleteTaskResult
Result of completing a task.| Property | Type | Required | Description |
|---|---|---|---|
task | Task | Yes | task |
autoCompleted | string[] | undefined | No | autoCompleted |
unblockedTasks | Pick<TaskRef, "id" | "title">[] | undefined | No | unblockedTasks |
RuleViolation
Validation error from anti-hallucination checks| Property | Type | Required | Description |
|---|---|---|---|
rule | string | Yes | rule |
field | string | Yes | field |
message | string | Yes | message |
severity | "error" | "warning" | Yes | severity |
UpdateTaskOptions
Options for updating a task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | undefined | No | title |
status | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | status |
priority | TaskPriority | undefined | No | priority |
type | TaskType | undefined | No | type |
size | TaskSize | undefined | No | size |
phase | string | undefined | No | phase |
description | string | undefined | No | description |
labels | string[] | undefined | No | labels |
addLabels | string[] | undefined | No | addLabels |
removeLabels | string[] | undefined | No | removeLabels |
depends | string[] | undefined | No | depends |
addDepends | string[] | undefined | No | addDepends |
removeDepends | string[] | undefined | No | removeDepends |
notes | string | undefined | No | notes |
acceptance | string[] | undefined | No | acceptance |
files | string[] | undefined | No | files |
blockedBy | string | undefined | No | blockedBy |
parentId | string | null | undefined | No | parentId |
noAutoComplete | boolean | undefined | No | noAutoComplete |
pipelineStage | string | undefined | No | RCASD-IVTR+C pipeline stage transition target. Must be = current stage. T060 |
UpdateTaskResult
Result of updating a task.| Property | Type | Required | Description |
|---|---|---|---|
task | Task | Yes | task |
changes | string[] | Yes | changes |
ParsedDirective
Parsed directive from a Conduit message.| Property | Type | Required | Description |
|---|---|---|---|
verb | string | Yes | The directive verb (claim, done, blocked, action, etc.). |
taskRefs | string[] | Yes | Task references extracted from the message (e.g., T042, T1234). |
agentId | string | Yes | The agent ID that sent the directive. |
messageId | string | Yes | Original message ID for audit trail. |
timestamp | string | Yes | Timestamp of the directive. |
RouteResult
Result of routing a directive to a project.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether the routing succeeded. |
project | string | Yes | The project that was routed to. |
projectPath | string | Yes | The project’s filesystem path. |
taskId | string | Yes | The task that was affected. |
operation | string | Yes | What operation was performed. |
error | string | undefined | No | Error message if routing failed. |
WorkspaceStatus
Aggregated task status across all projects.| Property | Type | Required | Description |
|---|---|---|---|
projectCount | number | Yes | Total projects in the workspace. |
projects | WorkspaceProjectSummary[] | Yes | Per-project task summaries. |
totals | { pending: number; active: number; done: number; total: number; } | Yes | Aggregated totals. |
computedAt | string | Yes | When the status was computed. |
WorkspaceProjectSummary
Task summary for a single project.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Project name. |
path | string | Yes | Project path. |
counts | { pending: number; active: number; done: number; total: number; } | Yes | Task counts by status. |
health | string | Yes | Health status from the Nexus registry. |
lastSync | string | Yes | Last sync time. |
WorkspaceAgent
Agent info aggregated across projects.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | Agent instance ID. |
agentType | string | Yes | Agent type. |
status | string | Yes | Current status. |
project | string | Yes | Which project this agent is registered in. |
taskId | string | null | Yes | Current task (if any). |
lastHeartbeat | string | Yes | Last heartbeat. |
ProjectACL
Project-level ACL entry.| Property | Type | Required | Description |
|---|---|---|---|
authorizedAgents | string[] | Yes | Agent IDs with write access. |
DepNode
A node in the dependency graph.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
depends | string[] | Yes | depends |
dependents | string[] | Yes | dependents |
DepsOverviewResult
Dependency overview result.| Property | Type | Required | Description |
|---|---|---|---|
nodes | DepNode[] | Yes | nodes |
totalTasks | number | Yes | totalTasks |
withDependencies | number | Yes | withDependencies |
withDependents | number | Yes | withDependents |
roots | string[] | Yes | roots |
leaves | string[] | Yes | leaves |
TaskDepsResult
Single task dependency result.| Property | Type | Required | Description |
|---|---|---|---|
task | TaskRef | Yes | task |
upstream | TaskRef[] | Yes | upstream |
downstream | TaskRef[] | Yes | downstream |
blockedBy | TaskRef[] | Yes | blockedBy |
ExecutionWave
Execution wave (group of parallelizable tasks).| Property | Type | Required | Description |
|---|---|---|---|
wave | number | Yes | wave |
tasks | (TaskRef & { depends: string[]; })[] | Yes | tasks |
CriticalPathResult
Critical path result.| Property | Type | Required | Description |
|---|---|---|---|
path | TaskRef[] | Yes | path |
length | number | Yes | length |
CycleResult
Cycle detection result.| Property | Type | Required | Description |
|---|---|---|---|
hasCycles | boolean | Yes | hasCycles |
cycles | string[][] | Yes | cycles |
TreeNode
Tree node representation.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
type | string | undefined | No | type |
children | TreeNode[] | Yes | children |
CircularDependency
A circular dependency cycle found via DFS traversal.MissingDependency
A missing dependency reference within an epic.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
missingDep | string | Yes | missingDep |
DependencyAnalysis
Full dependency analysis result for an epic.| Property | Type | Required | Description |
|---|---|---|---|
dependencyGraph | Record<string, string[]> | Yes | dependencyGraph |
circularDependencies | CircularDependency[] | Yes | circularDependencies |
missingDependencies | MissingDependency[] | Yes | missingDependencies |
ContextEstimation
Context estimation result.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | null | Yes | epicId |
taskCount | number | Yes | taskCount |
manifestEntries | number | Yes | manifestEntries |
estimatedTokens | number | Yes | estimatedTokens |
recommendation | string | Yes | recommendation |
limits | { orchestratorBudget: number; maxFilesPerAgent: number; currentUsage: number; } | Yes | limits |
Wave
| Property | Type | Required | Description |
|---|---|---|---|
waveNumber | number | Yes | waveNumber |
tasks | string[] | Yes | tasks |
status | "completed" | "pending" | "in_progress" | Yes | status |
EnrichedWave
| Property | Type | Required | Description |
|---|---|---|---|
waveNumber | number | Yes | waveNumber |
tasks | TaskRef[] | Yes | tasks |
status | "completed" | "pending" | "in_progress" | Yes | status |
StatusCounts
Status counts by task state.| Property | Type | Required | Description |
|---|---|---|---|
pending | number | Yes | pending |
active | number | Yes | active |
blocked | number | Yes | blocked |
done | number | Yes | done |
cancelled | number | undefined | No | cancelled |
EpicStatus
Epic-specific status result.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
epicTitle | string | Yes | epicTitle |
totalTasks | number | Yes | totalTasks |
byStatus | StatusCounts | Yes | byStatus |
waves | number | Yes | waves |
currentWave | number | null | Yes | currentWave |
OverallStatus
Overall orchestration status (no specific epic).| Property | Type | Required | Description |
|---|---|---|---|
totalEpics | number | Yes | totalEpics |
totalTasks | number | Yes | totalTasks |
byStatus | StatusCounts | Yes | byStatus |
ProgressMetrics
Progress metrics for orchestration check.| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | total |
done | number | Yes | done |
pending | number | Yes | pending |
blocked | number | Yes | blocked |
active | number | Yes | active |
percentComplete | number | Yes | percentComplete |
StartupSummary
Startup summary for an epic.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
epicTitle | string | Yes | epicTitle |
initialized | boolean | Yes | initialized |
summary | { totalTasks: number; totalWaves: number; readyTasks: number; byStatus: StatusCounts; } | Yes | summary |
firstWave | import("/mnt/projects/cleocode/packages/core/src/orchestration/waves").Wave | null | Yes | firstWave |
OrchestratorSession
Orchestrator session state.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
startedAt | string | Yes | startedAt |
status | "active" | "completed" | "paused" | Yes | status |
currentWave | number | Yes | currentWave |
completedTasks | string[] | Yes | completedTasks |
spawnedAgents | string[] | Yes | spawnedAgents |
SpawnContext
Spawn context for a subagent.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
protocol | string | Yes | protocol |
prompt | string | Yes | prompt |
tokenResolution | { fullyResolved: boolean; unresolvedTokens: string[]; } | Yes | tokenResolution |
TaskReadiness
Task readiness assessment.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
ready | boolean | Yes | ready |
blockers | string[] | Yes | blockers |
protocol | string | Yes | protocol |
AnalysisResult
Orchestrator analysis result.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
totalTasks | number | Yes | totalTasks |
waves | { wave: number; tasks: TaskRef[]; }[] | Yes | waves |
readyTasks | string[] | Yes | readyTasks |
blockedTasks | string[] | Yes | blockedTasks |
completedTasks | string[] | Yes | completedTasks |
ArtifactType
Supported artifact types.ArtifactConfig
Artifact configuration from release config.| Property | Type | Required | Description |
|---|---|---|---|
type | ArtifactType | Yes | type |
buildCommand | string | undefined | No | buildCommand |
publishCommand | string | undefined | No | publishCommand |
package | string | undefined | No | package |
registry | string | undefined | No | registry |
options | { [key: string]: unknown; provenance?: boolean; access?: string; tag?: string; attestations?: boolean; } | undefined | No | options |
ArtifactResult
Result of an artifact operation.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
output | string | Yes | output |
dryRun | boolean | Yes | dryRun |
ArtifactHandler
Artifact handler interface.| Property | Type | Required | Description |
|---|---|---|---|
build | (config: ArtifactConfig, dryRun?: boolean) => Promise<ArtifactResult> | No | build |
validate | (config: ArtifactConfig) => Promise<ArtifactResult> | Yes | validate |
publish | (config: ArtifactConfig, dryRun?: boolean) => Promise<ArtifactResult> | No | publish |
ReleaseConfig
Release configuration shape.| Property | Type | Required | Description |
|---|---|---|---|
versioningScheme | string | Yes | versioningScheme |
tagPrefix | string | Yes | tagPrefix |
changelogFormat | string | Yes | changelogFormat |
changelogFile | string | Yes | changelogFile |
artifactType | string | Yes | artifactType |
gates | ReleaseGate[] | Yes | gates |
versionBump | { files: Array<{ file: string; strategy: string; field?: string; }>; } | No | versionBump |
security | { enableProvenance: boolean; slsaLevel: number; requireSignedCommits: boolean; } | Yes | security |
gitflow | GitFlowConfig | undefined | No | gitflow |
channels | ChannelConfig | undefined | No | channels |
push | { mode?: PushMode; } | undefined | No | push |
ReleaseGate
Release gate definition.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
type | "custom" | "tests" | "lint" | "audit" | Yes | type |
command | string | Yes | command |
required | boolean | Yes | required |
GitFlowConfig
GitFlow branch configuration.| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | enabled |
branches | { main: string; develop: string; featurePrefix: string; hotfixPrefix: string; releasePrefix: string; } | Yes | branches |
ChannelConfig
Channel-to-branch mapping for npm dist-tag resolution.| Property | Type | Required | Description |
|---|---|---|---|
main | string | Yes | main |
develop | string | Yes | develop |
feature | string | Yes | feature |
custom | Record<string, string> | undefined | No | custom |
PushMode
Push mode: direct push vs PR creation vs auto-detect.ReleaseChannel
npm dist-tag channel for a release.ChannelValidationResult
Result of validating a version string against a channel’s expectations.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
expected | string | undefined | No | expected |
actual | string | undefined | No | actual |
message | string | Yes | message |
CIPlatform
Supported CI/CD platforms.BranchProtectionResult
| Property | Type | Required | Description |
|---|---|---|---|
protected | boolean | Yes | protected |
detectionMethod | "unknown" | "gh-api" | "push-dry-run" | Yes | detectionMethod |
error | string | undefined | No | error |
PRCreateOptions
| Property | Type | Required | Description |
|---|---|---|---|
base | string | Yes | base |
head | string | Yes | head |
title | string | Yes | title |
body | string | Yes | body |
labels | string[] | undefined | No | labels |
version | string | Yes | version |
epicId | string | undefined | No | epicId |
projectRoot | string | undefined | No | projectRoot |
PRResult
| Property | Type | Required | Description |
|---|---|---|---|
mode | "created" | "manual" | "skipped" | Yes | mode |
prUrl | string | undefined | No | prUrl |
prNumber | number | undefined | No | prNumber |
instructions | string | undefined | No | instructions |
error | string | undefined | No | error |
RepoIdentity
| Property | Type | Required | Description |
|---|---|---|---|
owner | string | Yes | owner |
repo | string | Yes | repo |
EpicCompletenessResult
Epic completeness result.| Property | Type | Required | Description |
|---|---|---|---|
hasIncomplete | boolean | Yes | hasIncomplete |
epics | { epicId: string; epicTitle: string; totalChildren: number; includedChildren: number; missingChildren: TaskRef[]; }[] | Yes | epics |
orphanTasks | string[] | Yes | orphanTasks |
DoubleListingResult
Double-listing check result.| Property | Type | Required | Description |
|---|---|---|---|
hasDoubleListing | boolean | Yes | hasDoubleListing |
duplicates | { taskId: string; releases: string[]; }[] | Yes | duplicates |
BumpType
Bump type for version calculation.VersionBumpTarget
Version bump target config from .cleo/config.json.| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
strategy | "json" | "toml" | "plain" | "sed" | Yes | strategy |
field | string | undefined | No | field |
key | string | undefined | No | key |
section | string | undefined | No | section |
pattern | string | undefined | No | pattern |
BumpResult
Bump result for a single file.| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
strategy | string | Yes | strategy |
success | boolean | Yes | success |
previousVersion | string | undefined | No | previousVersion |
newVersion | string | undefined | No | newVersion |
error | string | undefined | No | error |
ReleaseManifest
Release manifest structure.| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | version |
status | "draft" | "prepared" | "committed" | "tagged" | "pushed" | "rolled_back" | Yes | status |
createdAt | string | Yes | createdAt |
preparedAt | string | undefined | No | preparedAt |
committedAt | string | undefined | No | committedAt |
taggedAt | string | undefined | No | taggedAt |
pushedAt | string | undefined | No | pushedAt |
tasks | string[] | Yes | tasks |
notes | string | undefined | No | notes |
changelog | string | undefined | No | changelog |
previousVersion | string | undefined | No | previousVersion |
commitSha | string | undefined | No | commitSha |
gitTag | string | undefined | No | gitTag |
ReleaseListOptions
| Property | Type | Required | Description |
|---|---|---|---|
status | "draft" | "prepared" | "committed" | "tagged" | "pushed" | "rolled_back" | undefined | No | status |
limit | number | undefined | No | limit |
offset | number | undefined | No | offset |
ReleaseTaskRecord
Task record shape needed for release operations.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
parentId | string | undefined | No | parentId |
completedAt | string | null | undefined | No | completedAt |
labels | string[] | undefined | No | labels |
type | string | undefined | No | Structured task type — ‘epic’ | ‘task’ | ‘subtask’. Used for changelog filtering and categorization. |
description | string | undefined | No | Task 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.| Property | Type | Required | Description |
|---|---|---|---|
channel | ReleaseChannel | Yes | npm dist-tag channel resolved from the current branch. |
requiresPR | boolean | Yes | Whether the target branch requires a PR (branch protection detected or mode=‘pr’). |
targetBranch | string | Yes | Branch that should be targeted for this release type. |
currentBranch | string | Yes | Branch the repo is currently on. |
PushPolicy
Push policy configuration from config.release.push.| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | undefined | No | enabled |
remote | string | undefined | No | remote |
requireCleanTree | boolean | undefined | No | requireCleanTree |
allowedBranches | string[] | undefined | No | allowedBranches |
mode | PushMode | undefined | No | Push mode override: ‘direct’ | ‘pr’ | ‘auto’ (default: ‘direct’). |
prBase | string | undefined | No | Override PR target branch (default: auto-detected from GitFlow config). |
SnapshotDecision
A decision recorded during the session.| Property | Type | Required | Description |
|---|---|---|---|
decision | string | Yes | Decision text. |
rationale | string | Yes | Rationale for the decision. |
taskId | string | Yes | Task ID context. |
recordedAt | string | Yes | When the decision was recorded. |
SnapshotObservation
Brain observation linked to this session.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Observation ID. |
text | string | Yes | Observation text. |
type | string | Yes | Observation type (discovery, change, feature, etc.). |
createdAt | string | Yes | When the observation was created. |
SnapshotTaskContext
Active task context at snapshot time.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID currently in focus. |
title | string | Yes | Task title. |
status | string | Yes | Task status. |
priority | string | Yes | Task priority. |
description | string | Yes | Task description (truncated to save space). |
acceptance | string | undefined | No | Acceptance 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.| Property | Type | Required | Description |
|---|---|---|---|
version | number | Yes | Schema version for forward compatibility. |
capturedAt | string | Yes | When the snapshot was created. |
session | Session | Yes | The full session object. |
handoff | HandoffData | Yes | Computed handoff data. |
decisions | SnapshotDecision[] | Yes | Decisions recorded in this session. |
observations | SnapshotObservation[] | Yes | Recent brain observations linked to this session. |
activeTask | SnapshotTaskContext | null | Yes | Current task context (if a task is focused). |
durationMinutes | number | Yes | Session duration in minutes at snapshot time. |
SerializeOptions
Options for serializing a session.| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | undefined | No | Session ID to serialize. If omitted, uses the active session. |
maxObservations | number | undefined | No | Maximum number of brain observations to include. Default: 10. |
maxDescriptionLength | number | undefined | No | Maximum description length for active task. Default: 500. |
RestoreOptions
Options for restoring a session.| Property | Type | Required | Description |
|---|---|---|---|
agent | string | undefined | No | Agent identifier for the new agent taking over. |
activate | boolean | undefined | No | Whether to resume the session (set status to active). Default: true. |
StickyNoteStatus
Sticky note status values.StickyNoteColor
Sticky note color options.StickyNotePriority
Sticky note priority levels.ConvertedTargetType
Converted target type.ConvertedTarget
Converted target reference.| Property | Type | Required | Description |
|---|---|---|---|
type | ConvertedTargetType | Yes | type |
id | string | Yes | id |
StickyNote
Core sticky note interface.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique ID (SN-001, SN-002…) |
content | string | Yes | Raw note text |
createdAt | string | Yes | ISO 8601 creation timestamp |
updatedAt | string | undefined | No | ISO 8601 last update timestamp |
tags | string[] | Yes | Array of tags |
status | StickyNoteStatus | Yes | Current status |
convertedTo | ConvertedTarget | undefined | No | Conversion target if converted |
color | StickyNoteColor | undefined | No | Visual color |
priority | StickyNotePriority | undefined | No | Priority level |
sourceType | string | Yes | Source type for BRAIN queries |
CreateStickyParams
Parameters for creating a sticky note.| Property | Type | Required | Description |
|---|---|---|---|
content | string | Yes | content |
tags | string[] | undefined | No | tags |
color | StickyNoteColor | undefined | No | color |
priority | StickyNotePriority | undefined | No | priority |
ListStickiesParams
Parameters for listing sticky notes.| Property | Type | Required | Description |
|---|---|---|---|
status | StickyNoteStatus | undefined | No | status |
color | StickyNoteColor | undefined | No | color |
priority | StickyNotePriority | undefined | No | priority |
limit | number | undefined | No | limit |
ConvertStickyParams
Parameters for converting a sticky note.| Property | Type | Required | Description |
|---|---|---|---|
targetType | ConvertedTargetType | Yes | targetType |
title | string | undefined | No | Optional title when converting to task |
memoryType | string | undefined | No | Optional memory type when converting to memory |
taskId | string | undefined | No | Optional taskId when converting to task note |
ArchiveTasksOptions
Options for archiving tasks.| Property | Type | Required | Description |
|---|---|---|---|
before | string | undefined | No | Only archive tasks completed before this date (ISO string). |
taskIds | string[] | undefined | No | Specific task IDs to archive. |
includeCancelled | boolean | undefined | No | Archive cancelled tasks too. Default: true. |
dryRun | boolean | undefined | No | Dry run mode. |
ArchiveTasksResult
Result of archiving tasks.| Property | Type | Required | Description |
|---|---|---|---|
archived | string[] | Yes | archived |
skipped | string[] | Yes | skipped |
total | number | Yes | total |
dryRun | boolean | undefined | No | dryRun |
DeleteTaskOptions
Options for deleting a task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
force | boolean | undefined | No | force |
cascade | boolean | undefined | No | cascade |
DeleteTaskResult
Result of deleting a task.| Property | Type | Required | Description |
|---|---|---|---|
deletedTask | Task | Yes | deletedTask |
cascadeDeleted | string[] | undefined | No | cascadeDeleted |
EngineResult
Canonical EngineResult type used by all engines and core engine-compat modules.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
data | T | undefined | No | data |
page | LAFSPage | undefined | No | page |
error | { code: string; message: string; exitCode?: number; details?: unknown; fix?: string; alternatives?: Array<{ action: string; command: string; }>; } | undefined | No | error |
ExportMeta
Export package metadata.| Property | Type | Required | Description |
|---|---|---|---|
format | "cleo-export" | Yes | format |
version | string | Yes | version |
exportedAt | string | Yes | exportedAt |
source | { project: string; cleo_version: string; nextId: number; } | Yes | source |
checksum | string | Yes | checksum |
taskCount | number | Yes | taskCount |
exportMode | string | Yes | exportMode |
ExportSelection
Export selection criteria.| Property | Type | Required | Description |
|---|---|---|---|
mode | string | Yes | mode |
rootTaskIds | string[] | Yes | rootTaskIds |
includeChildren | boolean | Yes | includeChildren |
filters | unknown | Yes | filters |
IdMapEntry
ID map entry.| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | type |
title | string | Yes | title |
status | string | Yes | status |
parentId | string | null | Yes | parentId |
depends | string[] | Yes | depends |
RelationshipGraph
Relationship graph.| Property | Type | Required | Description |
|---|---|---|---|
hierarchy | Record<string, string[]> | Yes | hierarchy |
dependencies | Record<string, string[]> | Yes | dependencies |
roots | string[] | Yes | roots |
ExportPackage
Complete export package.| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | Yes | $schema |
_meta | ExportMeta | Yes | _meta |
selection | ExportSelection | Yes | selection |
idMap | Record<string, IdMapEntry> | Yes | idMap |
tasks | Task[] | Yes | tasks |
relationshipGraph | RelationshipGraph | Yes | relationshipGraph |
ExportTasksParams
| Property | Type | Required | Description |
|---|---|---|---|
taskIds | string[] | undefined | No | taskIds |
output | string | undefined | No | output |
subtree | boolean | undefined | No | subtree |
filter | string[] | undefined | No | filter |
includeDeps | boolean | undefined | No | includeDeps |
dryRun | boolean | undefined | No | dryRun |
cwd | string | undefined | No | cwd |
ExportTasksResult
| Property | Type | Required | Description |
|---|---|---|---|
exportMode | string | Yes | exportMode |
taskCount | number | Yes | taskCount |
taskIds | string[] | Yes | taskIds |
outputPath | string | undefined | No | outputPath |
content | string | undefined | No | content |
dryRun | boolean | undefined | No | dryRun |
HelpOperationDef
Minimal operation definition consumed by help logic.| Property | Type | Required | Description |
|---|---|---|---|
gateway | "query" | "mutate" | Yes | gateway |
domain | string | Yes | domain |
operation | string | Yes | operation |
description | string | Yes | description |
tier | number | Yes | tier |
CostHint
Cost hint classification for an operation.GroupedOperations
Domain-grouped operation format (compact).VerboseOperation
Verbose operation entry with cost hints.| Property | Type | Required | Description |
|---|---|---|---|
gateway | string | Yes | gateway |
domain | string | Yes | domain |
operation | string | Yes | operation |
description | string | Yes | description |
costHint | CostHint | Yes | costHint |
HelpResult
Result of the help computation.| Property | Type | Required | Description |
|---|---|---|---|
tier | number | Yes | tier |
operationCount | number | Yes | operationCount |
quickStart | string[] | undefined | No | quickStart |
operations | GroupedOperations | VerboseOperation[] | Yes | operations |
guidance | string | Yes | guidance |
escalation | string | Yes | escalation |
TransferMode
Transfer mode: copy keeps source tasks, move archives them.TransferScope
Transfer scope: single task or full subtree.TransferOnConflict
Conflict resolution when target has tasks with duplicate titles.TransferOnMissingDep
How to handle missing dependencies in the target project.TransferParams
Parameters for a cross-project transfer operation.| Property | Type | Required | Description |
|---|---|---|---|
taskIds | string[] | Yes | Task IDs to transfer from the source project. |
sourceProject | string | Yes | Source project name or hash. |
targetProject | string | Yes | Target project name or hash. |
mode | TransferMode | undefined | No | Copy (default) keeps source tasks; move archives them. |
scope | TransferScope | undefined | No | Single transfers individual tasks; subtree transfers tasks + all descendants. |
onConflict | TransferOnConflict | undefined | No | How to handle title conflicts in the target. |
onMissingDep | TransferOnMissingDep | undefined | No | How to handle missing deps in the target. |
provenance | boolean | undefined | No | Whether to add provenance notes to transferred tasks. |
targetParent | string | undefined | No | Override parent ID in target project. |
transferBrain | boolean | undefined | No | Whether to transfer brain observations linked to source tasks. |
dryRun | boolean | undefined | No | Dry run: preview without writing. |
TransferManifestEntry
A single task entry in the transfer manifest.| Property | Type | Required | Description |
|---|---|---|---|
sourceId | string | Yes | Original task ID in source project. |
targetId | string | Yes | New task ID in target project. |
title | string | Yes | Task title. |
type | string | Yes | Task type (task, epic, milestone, etc.). |
TransferManifest
Manifest describing what was (or would be) transferred.| Property | Type | Required | Description |
|---|---|---|---|
sourceProject | string | Yes | Source project name. |
targetProject | string | Yes | Target project name. |
mode | TransferMode | Yes | Transfer mode used. |
scope | TransferScope | Yes | Transfer scope used. |
entries | TransferManifestEntry[] | Yes | Tasks included in the transfer. |
idRemap | Record<string, string> | Yes | ID remap table: sourceId - targetId. |
brainObservationsTransferred | number | Yes | Number of brain observations transferred. |
TransferResult
Result of a transfer operation.| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | Yes | Whether this was a dry run. |
transferred | number | Yes | Number of tasks transferred. |
skipped | number | Yes | Number of tasks skipped (conflict resolution). |
archived | number | Yes | Number of source tasks archived (move mode only). |
linksCreated | number | Yes | Number of external links created. |
brainObservationsTransferred | number | Yes | Number of brain observations transferred. |
manifest | TransferManifest | Yes | Transfer manifest with full details. |
ImportFromPackageOptions
Options passed to importFromPackage (extracted from importTasksPackage).| Property | Type | Required | Description |
|---|---|---|---|
cwd | string | undefined | No | Working directory for the target project. |
dryRun | boolean | undefined | No | Dry run: preview without writing. |
parent | string | undefined | No | Parent task ID in target. |
phase | string | undefined | No | Phase override. |
addLabel | string | undefined | No | Label to add to imported tasks. |
provenance | boolean | undefined | No | Whether to add provenance notes. |
resetStatus | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | Status to reset imported tasks to. |
onConflict | TransferOnConflict | undefined | No | Conflict resolution strategy. |
onMissingDep | TransferOnMissingDep | undefined | No | Missing dependency strategy. |
force | boolean | undefined | No | Force import (skip duplicate checks). |
ImportFromPackageResult
Result from importFromPackage.| Property | Type | Required | Description |
|---|---|---|---|
imported | number | Yes | imported |
skipped | number | Yes | skipped |
idRemap | Record<string, string> | Yes | idRemap |
dryRun | boolean | undefined | No | dryRun |
preview | { tasks: Array<{ id: string; title: string; type: string; }>; } | undefined | No | preview |
RemapTable
Forward and reverse remap tables.| Property | Type | Required | Description |
|---|---|---|---|
forward | Map<string, string> | Yes | forward |
reverse | Map<string, string> | Yes | reverse |
ImportTasksParams
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
dryRun | boolean | undefined | No | dryRun |
parent | string | undefined | No | parent |
phase | string | undefined | No | phase |
addLabel | string | undefined | No | addLabel |
provenance | boolean | undefined | No | provenance |
resetStatus | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | resetStatus |
onConflict | OnConflict | undefined | No | onConflict |
onMissingDep | OnMissingDep | undefined | No | onMissingDep |
force | boolean | undefined | No | force |
cwd | string | undefined | No | cwd |
ImportTasksResult
| Property | Type | Required | Description |
|---|---|---|---|
imported | number | Yes | imported |
skipped | number | Yes | skipped |
idRemap | Record<string, string> | Yes | idRemap |
dryRun | boolean | undefined | No | dryRun |
preview | { tasks: Array<{ id: string; title: string; type: string; }>; } | undefined | No | preview |
ValidationError
| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
field | string | Yes | field |
message | string | Yes | message |
ValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
errors | ValidationError[] | Yes | errors |
checked | number | Yes | checked |
AdrValidationError
ValidationError — canonical name per ADR-017 specAdrValidationResult
ValidationResult — canonical name per ADR-017 specTreeSitterLanguage
Supported tree-sitter language identifiers.OutlineNode
A symbol node in the outline tree, with optional children.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Symbol name. |
kind | string | Yes | Symbol kind (function, class, method, etc.). |
startLine | number | Yes | Start line (1-based). |
endLine | number | Yes | End line (1-based). |
signature | string | Yes | Signature line(s) — the declaration without the body. |
exported | boolean | Yes | Whether this symbol is exported. |
children | OutlineNode[] | Yes | Nested symbols (methods inside classes, etc.). |
SmartOutlineResult
Result of generating a smart outline for a file.| Property | Type | Required | Description |
|---|---|---|---|
filePath | string | Yes | Source file path (relative). |
language | string | Yes | Detected language. |
symbols | OutlineNode[] | Yes | Top-level symbol tree. |
estimatedTokens | number | Yes | Estimated token count for this outline. |
errors | string[] | Yes | Parse errors (non-fatal). |
SmartSearchResult
A search result with relevance score.| Property | Type | Required | Description |
|---|---|---|---|
symbol | CodeSymbol | Yes | The matched symbol. |
score | number | Yes | Relevance score (higher = better match). |
matchType | "substring" | "fuzzy" | "exact" | "path" | Yes | How the query matched (exact, substring, fuzzy, path). |
SmartSearchOptions
Options for smart_search.| Property | Type | Required | Description |
|---|---|---|---|
maxResults | number | undefined | No | Maximum results to return (default: 20). |
filePattern | string | undefined | No | Glob-like file pattern filter (e.g. “*.ts”, “src/**”). |
language | TreeSitterLanguage | undefined | No | Restrict to specific language. |
rootDir | string | undefined | No | Root directory to search (default: cwd). |
SmartUnfoldResult
Result of unfolding a single symbol.| Property | Type | Required | Description |
|---|---|---|---|
found | boolean | Yes | Whether the symbol was found. |
symbol | CodeSymbol | undefined | No | The matched symbol metadata. |
source | string | Yes | Complete source text including JSDoc, decorators, and body. |
startLine | number | Yes | Start line (1-based, inclusive of leading doc comment). |
endLine | number | Yes | End line (1-based). |
estimatedTokens | number | Yes | Estimated token count for this extraction. |
filePath | string | Yes | File path (relative). |
errors | string[] | Yes | Errors encountered. |
ComplianceJsonlEntry
PayloadValidationResult
Result of payload validation.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | Whether the payload passed validation. |
errors | string[] | Yes | Validation errors (empty when valid). |
BuildConfig
RepositoryConfig
IssueTemplate
Parsed issue template.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
description | string | Yes | description |
title | string | Yes | title |
labels | string[] | Yes | labels |
subcommand | string | Yes | subcommand |
fileName | string | Yes | fileName |
AddIssueParams
| Property | Type | Required | Description |
|---|---|---|---|
issueType | string | Yes | issueType |
title | string | Yes | title |
body | string | Yes | body |
severity | string | undefined | No | severity |
area | string | undefined | No | area |
dryRun | boolean | undefined | No | dryRun |
AddIssueResult
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | type |
url | string | undefined | No | url |
number | string | number | undefined | No | number |
title | string | Yes | title |
labels | string[] | Yes | labels |
body | string | Yes | body |
repo | string | Yes | repo |
dryRun | boolean | Yes | dryRun |
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
RetryOptions
Options that control retry behavior forwithRetry.
| Property | Type | Required | Description |
|---|---|---|---|
maxAttempts | number | undefined | No | Maximum total number of attempts (initial + retries). 3 |
baseDelayMs | number | undefined | No | Delay before the second attempt in milliseconds. Each subsequent delay is baseDelayMs * 2^(attempt - 1). 2000 |
maxDelayMs | number | undefined | No | Upper bound on computed delay in milliseconds. Prevents unbounded growth with many retries. 30000 |
retryableErrors | readonly RetryablePredicate[] | undefined | No | Explicit 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.| Property | Type | Required | Description |
|---|---|---|---|
attempts | number | Yes | Total number of attempts made (always equal to maxAttempts). |
totalDelayMs | number | Yes | Cumulative delay applied across all retry waits in milliseconds. |
DecayResult
Result from applying temporal decay.| Property | Type | Required | Description |
|---|---|---|---|
updated | number | Yes | updated |
tablesProcessed | string[] | Yes | tablesProcessed |
ConsolidationResult
Result from consolidating memories.| Property | Type | Required | Description |
|---|---|---|---|
grouped | number | Yes | grouped |
merged | number | Yes | merged |
archived | number | Yes | archived |
BrainMigrationResult
Result from a migration run.| Property | Type | Required | Description |
|---|---|---|---|
patternsImported | number | Yes | patternsImported |
learningsImported | number | Yes | learningsImported |
duplicatesSkipped | number | Yes | duplicatesSkipped |
errors | string[] | Yes | errors |
ResearchEntry
Research entry attached to a task.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique research entry identifier. |
taskId | string | Yes | Task ID this research is linked to. |
topic | string | Yes | Research topic or question. |
findings | string[] | Yes | Accumulated research findings. |
sources | string[] | Yes | Source URLs or references. |
status | "pending" | "partial" | "complete" | Yes | Current research status. |
createdAt | string | Yes | ISO timestamp of creation. |
updatedAt | string | Yes | ISO timestamp of last update. |
ManifestEntry
Manifest entry (JSONL line).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique manifest entry identifier. |
file | string | Yes | Output file path for this entry. |
title | string | Yes | Human-readable title of the research output. |
date | string | Yes | ISO date string when the entry was created. |
status | "completed" | "blocked" | "partial" | Yes | Completion status of the research. |
agent_type | string | Yes | Type of agent that produced this entry. |
topics | string[] | Yes | Topic tags associated with the entry. |
key_findings | string[] | Yes | Key findings from the research. |
actionable | boolean | Yes | Whether the findings are actionable. |
needs_followup | string[] | Yes | Items that need follow-up investigation. |
linked_tasks | string[] | Yes | Task IDs linked to this manifest entry. |
AddResearchOptions
Options for adding research.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID to attach the research to. |
topic | string | Yes | Research topic or question. |
findings | string[] | undefined | No | Initial findings (if any). |
sources | string[] | undefined | No | Source URLs or references. |
ListResearchOptions
Options for listing research.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | undefined | No | Filter by linked task ID. |
status | "pending" | "partial" | "complete" | undefined | No | Filter by research status. |
ManifestQueryOptions
Manifest query options.| Property | Type | Required | Description |
|---|---|---|---|
status | string | undefined | No | Filter by completion status. |
agentType | string | undefined | No | Filter by agent type. |
topic | string | undefined | No | Filter by topic tag. |
taskId | string | undefined | No | Filter by linked task ID. |
limit | number | undefined | No | Maximum entries to return. |
ExtendedManifestEntry
Extended manifest entry with optional fields used by the engine.| Property | Type | Required | Description |
|---|---|---|---|
confidence | number | undefined | No | Confidence score for the research findings. |
file_checksum | string | undefined | No | SHA checksum of the output file. |
duration_seconds | number | undefined | No | Duration of the research in seconds. |
ResearchFilter
Research filter criteria used by the engine.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | undefined | No | Filter by linked task ID. |
status | string | undefined | No | Filter by completion status. |
agent_type | string | undefined | No | Filter by agent type. |
topic | string | undefined | No | Filter by topic tag. |
limit | number | undefined | No | Maximum entries to return. |
offset | number | undefined | No | Number of entries to skip before applying limit. |
actionable | boolean | undefined | No | Filter by actionable flag. |
dateAfter | string | undefined | No | Filter entries created after this ISO date. |
dateBefore | string | undefined | No | Filter entries created before this ISO date. |
ContradictionDetail
Contradiction detail between two manifest entries.| Property | Type | Required | Description |
|---|---|---|---|
entryA | ExtendedManifestEntry | Yes | First conflicting entry. |
entryB | ExtendedManifestEntry | Yes | Second conflicting entry. |
topic | string | Yes | Shared topic where the conflict was detected. |
conflictDetails | string | Yes | Description of the conflicting findings. |
SupersededDetail
Superseded entry detail.| Property | Type | Required | Description |
|---|---|---|---|
old | ExtendedManifestEntry | Yes | old |
replacement | ExtendedManifestEntry | Yes | replacement |
topic | string | Yes | topic |
ComplianceSummary
Compliance summary shape.| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | total |
pass | number | Yes | pass |
fail | number | Yes | fail |
rate | number | Yes | rate |
OtelCaptureMode
OTel capture mode.OtelTokenDataPoint
Token data point parsed from OTel metrics.| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | number | Yes | timestamp |
type | string | Yes | type |
model | string | Yes | model |
tokens | number | Yes | tokens |
AggregatedTokens
Aggregated token counts.| Property | Type | Required | Description |
|---|---|---|---|
session_id | string | null | Yes | session_id |
tokens | { input: number; output: number; cache_read: number; cache_creation: number; total: number; effective: number; } | Yes | tokens |
api_requests | number | Yes | api_requests |
source | "otel" | Yes | source |
ABVariant
A/B test variant.ABEventType
A/B test event types.ABTestSummary
A/B test summary result.| Property | Type | Required | Description |
|---|---|---|---|
test_name | string | Yes | test_name |
variant | ABVariant | Yes | variant |
start_time | string | Yes | start_time |
end_time | string | Yes | end_time |
duration_seconds | number | Yes | duration_seconds |
tokens_consumed | number | Yes | tokens_consumed |
token_source | string | Yes | token_source |
tasks_completed | number | Yes | tasks_completed |
validations | { passed: number; failed: number; total: number; pass_rate_percent: number; } | Yes | validations |
notes | string | Yes | notes |
Severity
Violation severity levels.| Property | Type | Required | Description |
|---|---|---|---|
Low | Severity.Low | Yes | Low |
Medium | Severity.Medium | Yes | Medium |
High | Severity.High | Yes | High |
Critical | Severity.Critical | Yes | Critical |
ManifestIntegrity
Manifest integrity states.| Property | Type | Required | Description |
|---|---|---|---|
Valid | ManifestIntegrity.Valid | Yes | Valid |
Partial | ManifestIntegrity.Partial | Yes | Partial |
Invalid | ManifestIntegrity.Invalid | Yes | Invalid |
Missing | ManifestIntegrity.Missing | Yes | Missing |
InstructionStability
Instruction stability levels.| Property | Type | Required | Description |
|---|---|---|---|
Stable | InstructionStability.Stable | Yes | Stable |
Clarified | InstructionStability.Clarified | Yes | Clarified |
Revised | InstructionStability.Revised | Yes | Revised |
Unstable | InstructionStability.Unstable | Yes | Unstable |
SessionDegradation
Session degradation levels.| Property | Type | Required | Description |
|---|---|---|---|
None | SessionDegradation.None | Yes | None |
Mild | SessionDegradation.Mild | Yes | Mild |
Moderate | SessionDegradation.Moderate | Yes | Moderate |
Severe | SessionDegradation.Severe | Yes | Severe |
AgentReliability
Agent reliability levels.| Property | Type | Required | Description |
|---|---|---|---|
High | AgentReliability.High | Yes | High |
Medium | AgentReliability.Medium | Yes | Medium |
Low | AgentReliability.Low | Yes | Low |
Unreliable | AgentReliability.Unreliable | Yes | Unreliable |
MetricCategory
Metric categories.| Property | Type | Required | Description |
|---|---|---|---|
Compliance | MetricCategory.Compliance | Yes | Compliance |
Efficiency | MetricCategory.Efficiency | Yes | Efficiency |
Session | MetricCategory.Session | Yes | Session |
Improvement | MetricCategory.Improvement | Yes | Improvement |
MetricSource
Metric sources.| Property | Type | Required | Description |
|---|---|---|---|
Task | MetricSource.Task | Yes | Task |
Session | MetricSource.Session | Yes | Session |
Agent | MetricSource.Agent | Yes | Agent |
System | MetricSource.System | Yes | System |
Orchestrator | MetricSource.Orchestrator | Yes | Orchestrator |
AggregationPeriod
Aggregation periods.| Property | Type | Required | Description |
|---|---|---|---|
Instant | AggregationPeriod.Instant | Yes | Instant |
Hourly | AggregationPeriod.Hourly | Yes | Hourly |
Daily | AggregationPeriod.Daily | Yes | Daily |
Weekly | AggregationPeriod.Weekly | Yes | Weekly |
Monthly | AggregationPeriod.Monthly | Yes | Monthly |
TokenEventType
Token event types.TokenEvent
A token usage event entry.| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
event_type | TokenEventType | Yes | event_type |
estimated_tokens | number | Yes | estimated_tokens |
source | string | Yes | source |
task_id | string | null | Yes | task_id |
session_id | string | null | Yes | session_id |
context | Record<string, unknown> | Yes | context |
TokenSessionSummary
Token session summary shape.| Property | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | session_id |
start | string | Yes | start |
end | string | Yes | end |
tokens | { manifest_reads: number; full_file_reads: number; skill_injections: number; prompt_builds: number; total: number; } | Yes | tokens |
savings | { avoided_tokens: number; savings_percent: number; } | Yes | savings |
VerificationResult
Result of a backup verification operation.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | Whether the backup is valid |
error | string | undefined | No | Error message if verification failed |
sourceChecksum | string | Yes | SHA-256 checksum of the source file |
backupChecksum | string | Yes | SHA-256 checksum of the backup file |
LogLevel
Log entry severity levelMigrationLogEntry
Single migration log entry| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | ISO 8601 timestamp |
level | LogLevel | Yes | Log level |
phase | string | Yes | Migration phase (init, backup, import, verify, complete, etc.) |
operation | string | Yes | Specific operation within phase |
message | string | Yes | Human-readable message |
durationMs | number | Yes | Duration since migration start in milliseconds |
data | Record<string, unknown> | undefined | No | Additional structured data |
MigrationLoggerConfig
Migration logger configuration| Property | Type | Required | Description |
|---|---|---|---|
maxLogFiles | number | undefined | No | Maximum number of log files to retain |
minLevel | LogLevel | undefined | No | Minimum log level to record |
consoleOutput | boolean | undefined | No | Enable console output in addition to file logging |
PreflightResult
Pre-flight check result.| Property | Type | Required | Description |
|---|---|---|---|
migrationNeeded | boolean | Yes | Whether a storage migration is needed. |
currentEngine | "none" | "sqlite" | Yes | Current detected storage engine. Always ‘sqlite’ or ‘none’. |
summary | string | Yes | Human-readable summary of what was detected. |
fix | string | null | Yes | Actionable fix command. |
details | { todoJsonExists: boolean; todoJsonTaskCount: number; archiveJsonExists: boolean; archiveJsonTaskCount: number; sessionsJsonExists: boolean; sessionsJsonCount: number; tasksDbExists: boolean; tasksDbSize: number; configEngine: string | null; } | Yes | Detailed diagnostics. |
MigrationPhase
Migration phase - tracks current step in the migration processSourceFileInfo
Source file info with checksum for integrity verification| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | path |
checksum | string | Yes | checksum |
taskCount | number | undefined | No | taskCount |
sessionCount | number | undefined | No | sessionCount |
archivedCount | number | undefined | No | archivedCount |
MigrationProgress
Migration progress tracking| Property | Type | Required | Description |
|---|---|---|---|
tasksImported | number | Yes | tasksImported |
archivedImported | number | Yes | archivedImported |
sessionsImported | number | Yes | sessionsImported |
totalTasks | number | Yes | totalTasks |
totalArchived | number | Yes | totalArchived |
totalSessions | number | Yes | totalSessions |
MigrationState
Complete migration state structure| Property | Type | Required | Description |
|---|---|---|---|
version | "1.0.0" | Yes | version |
startedAt | string | Yes | startedAt |
phase | MigrationPhase | Yes | phase |
sourceFiles | { todoJson?: SourceFileInfo; sessionsJson?: SourceFileInfo; archiveJson?: SourceFileInfo; } | No | sourceFiles |
backupPath | string | undefined | No | backupPath |
tempPath | string | undefined | No | tempPath |
progress | MigrationProgress | Yes | progress |
errors | string[] | Yes | errors |
warnings | string[] | Yes | warnings |
completedAt | string | undefined | No | completedAt |
JsonFileValidation
Result of validating a single JSON file.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
exists | boolean | Yes | exists |
count | number | Yes | count |
error | string | undefined | No | error |
line | number | undefined | No | line |
column | number | undefined | No | column |
JsonValidationResult
Complete validation result for all source files.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
todoJson | JsonFileValidation | Yes | todoJson |
sessionsJson | JsonFileValidation | Yes | sessionsJson |
archiveJson | JsonFileValidation | Yes | archiveJson |
totalTasks | number | Yes | totalTasks |
warnings | string[] | Yes | warnings |
SchemaVersion
Schema version info.| Property | Type | Required | Description |
|---|---|---|---|
current | string | Yes | current |
target | string | Yes | target |
needsMigration | boolean | Yes | needsMigration |
MigrationFn
Migration function signature.MigrationDef
Migration definition.| Property | Type | Required | Description |
|---|---|---|---|
fromVersion | string | Yes | fromVersion |
toVersion | string | Yes | toVersion |
description | string | Yes | description |
migrate | MigrationFn | Yes | migrate |
MigrationResult
Migration run result.| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
fromVersion | string | Yes | fromVersion |
toVersion | string | Yes | toVersion |
migrationsApplied | string[] | Yes | migrationsApplied |
success | boolean | Yes | success |
errors | string[] | Yes | errors |
dryRun | boolean | Yes | dryRun |
MigrationStatus
Status of all data files.| Property | Type | Required | Description |
|---|---|---|---|
todoJson | SchemaVersion | null | Yes | todoJson |
configJson | SchemaVersion | null | Yes | configJson |
archiveJson | SchemaVersion | null | Yes | archiveJson |
NexusGraphNode
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
project | string | Yes | project |
status | string | Yes | status |
title | string | Yes | title |
NexusGraphEdge
| Property | Type | Required | Description |
|---|---|---|---|
from | string | Yes | from |
fromProject | string | Yes | fromProject |
to | string | Yes | to |
toProject | string | Yes | toProject |
NexusGlobalGraph
| Property | Type | Required | Description |
|---|---|---|---|
nodes | NexusGraphNode[] | Yes | nodes |
edges | NexusGraphEdge[] | Yes | edges |
DepsResult
Result of a dependency query.| Property | Type | Required | Description |
|---|---|---|---|
task | string | Yes | task |
project | string | Yes | project |
depends | DepsEntry[] | Yes | depends |
blocking | DepsEntry[] | Yes | blocking |
DepsEntry
Single dependency entry with resolution status.| Property | Type | Required | Description |
|---|---|---|---|
query | string | Yes | query |
project | string | Yes | project |
status | string | Yes | status |
title | string | undefined | No | title |
CriticalPathResult
Critical path result.| Property | Type | Required | Description |
|---|---|---|---|
criticalPath | { query: string; title: string; }[] | Yes | criticalPath |
length | number | Yes | length |
blockedBy | string | Yes | blockedBy |
BlockingAnalysisResult
Blocking analysis result.| Property | Type | Required | Description |
|---|---|---|---|
task | string | Yes | task |
blocking | { query: string; project: string; }[] | Yes | blocking |
impactScore | number | Yes | impactScore |
OrphanEntry
Orphan detection result.| Property | Type | Required | Description |
|---|---|---|---|
sourceProject | string | Yes | sourceProject |
sourceTask | string | Yes | sourceTask |
targetProject | string | Yes | targetProject |
targetTask | string | Yes | targetTask |
reason | "project_not_registered" | "task_not_found" | Yes | reason |
PinoLevel
Pino log levels as written by CLEO’s logger (uppercase).PinoLogEntry
A parsed pino log entry from a CLEO log file. Core fields are always present; additional fields are captured inextra.
| Property | Type | Required | Description |
|---|---|---|---|
level | PinoLevel | Yes | Uppercase log level |
time | string | Yes | ISO 8601 UTC timestamp |
pid | number | Yes | Process ID |
hostname | string | Yes | Machine hostname |
msg | string | Yes | Human-readable log message |
subsystem | string | undefined | No | Logical subsystem name (from child logger) |
code | string | undefined | No | CLEO error code (on warn/error entries) |
exitCode | number | undefined | No | Numeric exit code (on warn/error entries) |
extra | Record<string, unknown> | Yes | Any additional fields not in the core schema |
LogFileInfo
Metadata about a discovered log file.| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Absolute path to the log file |
name | string | Yes | File name (e.g., ‘cleo.2026-02-28.1.log’) |
size | number | Yes | File size in bytes |
mtime | string | Yes | Last modification time (ISO string) |
date | string | null | Yes | Parsed date from filename, or null if unparseable |
isActive | boolean | Yes | Whether 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.| Property | Type | Required | Description |
|---|---|---|---|
minLevel | PinoLevel | undefined | No | Minimum log level (inclusive). E.g., ‘WARN’ returns WARN + ERROR + FATAL |
level | PinoLevel | undefined | No | Exact log level match |
since | string | undefined | No | Start time (inclusive, ISO 8601) |
until | string | undefined | No | End time (inclusive, ISO 8601) |
subsystem | string | undefined | No | Filter by subsystem name (exact match) |
code | string | undefined | No | Filter by CLEO error code (exact match) |
exitCode | number | undefined | No | Filter by exit code (exact match) |
msgContains | string | undefined | No | Text search in msg field (case-insensitive substring) |
pid | number | undefined | No | Filter by PID |
limit | number | undefined | No | Maximum entries to return |
offset | number | undefined | No | Number of entries to skip (for pagination) |
LogQueryResult
Result of a log query operation.| Property | Type | Required | Description |
|---|---|---|---|
entries | PinoLogEntry[] | Yes | Matched entries |
totalScanned | number | Yes | Total entries scanned (before limit/offset) |
totalMatched | number | Yes | Total entries matching filters (before limit/offset) |
files | string[] | Yes | Files that were read |
LogDiscoveryOptions
Options for discovering log files.| Property | Type | Required | Description |
|---|---|---|---|
scope | "project" | "global" | "both" | undefined | No | Which log directory to scan: ‘project’, ‘global’, or ‘both’ (default: ‘project’) |
since | string | undefined | No | Only include files modified after this date (ISO 8601) |
includeMigration | boolean | undefined | No | Include migration log files (default: false) |
LogSummary
Summary of log activity across files.| Property | Type | Required | Description |
|---|---|---|---|
totalEntries | number | Yes | totalEntries |
byLevel | Record<string, number> | Yes | byLevel |
bySubsystem | Record<string, number> | Yes | bySubsystem |
dateRange | { earliest: string; latest: string; } | null | Yes | dateRange |
files | LogFileInfo[] | Yes | files |
RemoteConfig
Remote configuration.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
url | string | Yes | url |
PushResult
Result of a push operation.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
branch | string | Yes | branch |
remote | string | Yes | remote |
message | string | Yes | message |
PullResult
Result of a pull operation.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
branch | string | Yes | branch |
remote | string | Yes | remote |
message | string | Yes | message |
hasConflicts | boolean | Yes | hasConflicts |
conflictFiles | string[] | Yes | conflictFiles |
RemoteInfo
Result of a remote list operation.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
fetchUrl | string | Yes | fetchUrl |
pushUrl | string | Yes | pushUrl |
ExecutionMode
Execution mode for an operationGatewayType
Gateway typePreferredChannel
Preferred communication channel for token efficiency. CLI is the only dispatch channel. T5240OperationCapability
| Property | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | domain |
operation | string | Yes | operation |
gateway | GatewayType | Yes | gateway |
mode | ExecutionMode | Yes | mode |
preferredChannel | PreferredChannel | Yes | preferredChannel |
CapabilityReport
Capability report returned by system.doctor| Property | Type | Required | Description |
|---|---|---|---|
totalOperations | number | Yes | totalOperations |
native | number | Yes | native |
cli | number | Yes | cli |
hybrid | number | Yes | hybrid |
domains | Record<string, { native: string[]; cli: string[]; hybrid: string[]; }> | Yes | domains |
RateLimitConfig
Rate limiter configuration| Property | Type | Required | Description |
|---|---|---|---|
maxRequests | number | Yes | maxRequests |
windowMs | number | Yes | windowMs |
RateLimitResult
Rate limit check result| Property | Type | Required | Description |
|---|---|---|---|
allowed | boolean | Yes | allowed |
remaining | number | Yes | remaining |
resetMs | number | Yes | resetMs |
limit | number | Yes | limit |
ContributionDecision
A contribution decision from an agent.| Property | Type | Required | Description |
|---|---|---|---|
agentId | string | Yes | agentId |
taskId | string | Yes | taskId |
decision | string | Yes | decision |
confidence | number | Yes | confidence |
rationale | string | Yes | rationale |
ContributionConflict
Conflict between two agent decisions.| Property | Type | Required | Description |
|---|---|---|---|
field | string | Yes | field |
agent1 | string | Yes | agent1 |
agent2 | string | Yes | agent2 |
value1 | string | Yes | value1 |
value2 | string | Yes | value2 |
severity | "high" | "medium" | "low" | Yes | severity |
ConsensusResult
Consensus result from weighted voting.| Property | Type | Required | Description |
|---|---|---|---|
decision | string | Yes | decision |
confidence | number | Yes | confidence |
votes | { agentId: string; weight: number; vote: string; }[] | Yes | votes |
conflicts | ContributionConflict[] | Yes | conflicts |
SkillsMpConfig
SkillsMP configuration.| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | enabled |
cacheDir | string | Yes | cacheDir |
MarketplaceSkill
Marketplace skill result (CLEO-specific shape).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
name | string | Yes | name |
description | string | Yes | description |
version | string | Yes | version |
author | string | Yes | author |
tags | string[] | Yes | tags |
downloadUrl | string | undefined | No | downloadUrl |
BatchSpawnEntry
Result of a single spawn within a batch.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
success | boolean | Yes | success |
result | (SpawnPromptResult & { spawnTimestamp: string; }) | undefined | No | result |
error | string | undefined | No | error |
BatchSpawnResult
Result of a batch spawn operation.| Property | Type | Required | Description |
|---|---|---|---|
count | number | Yes | count |
succeeded | number | Yes | succeeded |
failed | number | Yes | failed |
spawns | BatchSpawnEntry[] | Yes | spawns |
SessionInitResult
Session init result.| Property | Type | Required | Description |
|---|---|---|---|
activeSessions | number | Yes | activeSessions |
activeSessionId | string | null | Yes | activeSessionId |
activeScope | string | null | Yes | activeScope |
hasFocus | boolean | Yes | hasFocus |
focusedTask | string | null | Yes | focusedTask |
hasPending | boolean | Yes | hasPending |
recommendedAction | "resume" | "spawn_followup" | "create_and_spawn" | "request_direction" | Yes | recommendedAction |
actionReason | string | Yes | actionReason |
PauseStatus
Pause status result.| Property | Type | Required | Description |
|---|---|---|---|
pauseStatus | "critical" | "warning" | "ok" | Yes | pauseStatus |
pauseCode | 0 | 1 | 2 | Yes | pauseCode |
shouldPause | boolean | Yes | shouldPause |
shouldWrapUp | boolean | Yes | shouldWrapUp |
contextPercentage | number | Yes | contextPercentage |
recommendation | string | Yes | recommendation |
SkillSourceType
Source type classification for a skill directory.SkillSourceMode
Skill source mode.SkillSearchPath
Search path entry with its origin.| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | path |
origin | "override" | "embedded" | "caamp" | Yes | origin |
IssueSeverity
Validation issue severity.ValidationIssue
Single validation issue.| Property | Type | Required | Description |
|---|---|---|---|
severity | IssueSeverity | Yes | severity |
code | string | Yes | code |
message | string | Yes | message |
path | string | undefined | No | path |
SkillValidationResult
Validation result for a skill.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
skillName | string | Yes | skillName |
skillPath | string | Yes | skillPath |
issues | ValidationIssue[] | Yes | issues |
errorCount | number | Yes | errorCount |
warningCount | number | Yes | warningCount |
SnapshotMeta
Snapshot metadata.| Property | Type | Required | Description |
|---|---|---|---|
format | "cleo-snapshot" | Yes | format |
version | string | Yes | version |
createdAt | string | Yes | createdAt |
source | { project: string; cleoVersion: string; } | Yes | source |
checksum | string | Yes | checksum |
taskCount | number | Yes | taskCount |
SnapshotTask
Portable task representation (subset of Task, omitting local-only fields).| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
priority | string | Yes | priority |
type | string | undefined | No | type |
parentId | string | null | undefined | No | parentId |
size | string | null | undefined | No | size |
phase | string | undefined | No | phase |
description | string | undefined | No | description |
depends | string[] | undefined | No | depends |
labels | string[] | undefined | No | labels |
createdAt | string | Yes | createdAt |
updatedAt | string | null | undefined | No | updatedAt |
completedAt | string | undefined | No | completedAt |
Snapshot
Complete snapshot package.| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | Yes | $schema |
_meta | SnapshotMeta | Yes | _meta |
project | { name: string; currentPhase?: string | null; } | No | project |
tasks | SnapshotTask[] | Yes | tasks |
ImportResult
Import result summary.| Property | Type | Required | Description |
|---|---|---|---|
added | number | Yes | added |
updated | number | Yes | updated |
skipped | number | Yes | skipped |
conflicts | string[] | Yes | conflicts |
SpawnCapability
Spawn capability type - subset of provider capabilities related to spawningWorkflowRuleMetric
Per-rule compliance breakdown.| Property | Type | Required | Description |
|---|---|---|---|
rule | string | Yes | Rule identifier, e.g. WF-001. |
description | string | Yes | Human-readable rule description. |
total | number | Yes | Total tasks or events that were subject to this rule. |
violations | number | Yes | Number that violated the rule. |
complianceRate | number | Yes | Compliance rate 0..1 (1 = fully compliant). |
WorkflowComplianceReport
Full workflow compliance report.| Property | Type | Required | Description |
|---|---|---|---|
generatedAt | string | Yes | ISO timestamp when metrics were computed. |
since | string | null | Yes | Time window filtered (ISO cutoff) or null for all-time. |
overallScore | number | Yes | Overall compliance score 0..1 (average of all rule rates). |
grade | string | Yes | Grade letter derived from overallScore. |
rules | WorkflowRuleMetric[] | Yes | Per-rule breakdown. |
violationSamples | { taskId: string; rule: string; detail: string; }[] | Yes | Task-level violation samples (up to 20). |
summary | { totalTasks: number; completedTasks: number; tasksWithAC: number; tasksWithoutAC: number; completionsInSession: number; completionsOutsideSession: number; tasksWithGates: number; avgGatesSet: number; } | Yes | Raw counts for context. |
ArchiveMetadata
Archive metadata that may be attached to archived task records.| Property | Type | Required | Description |
|---|---|---|---|
archivedAt | string | undefined | No | archivedAt |
cycleTimeDays | number | undefined | No | cycleTimeDays |
archiveSource | string | undefined | No | archiveSource |
AnalyticsTask
Archived task shape used internally for analytics.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
title | string | Yes | title |
status | string | Yes | status |
priority | string | undefined | No | priority |
phase | string | undefined | No | phase |
labels | string[] | undefined | No | labels |
archive | ArchiveMetadata | Yes | archive |
ArchiveReportType
SummaryReportData
Summary report result.| Property | Type | Required | Description |
|---|---|---|---|
totalArchived | number | Yes | totalArchived |
byStatus | Record<string, number> | Yes | byStatus |
byPriority | Record<string, number> | Yes | byPriority |
averageCycleTime | number | null | Yes | averageCycleTime |
oldestArchived | string | null | Yes | oldestArchived |
newestArchived | string | null | Yes | newestArchived |
archiveSourceBreakdown | Record<string, number> | Yes | archiveSourceBreakdown |
PhaseGroupEntry
Phase group entry.| Property | Type | Required | Description |
|---|---|---|---|
phase | string | Yes | phase |
count | number | Yes | count |
avgCycleTime | number | null | Yes | avgCycleTime |
LabelFrequencyEntry
Label frequency entry.| Property | Type | Required | Description |
|---|---|---|---|
label | string | Yes | label |
count | number | Yes | count |
PriorityGroupEntry
Priority group entry.| Property | Type | Required | Description |
|---|---|---|---|
priority | string | Yes | priority |
count | number | Yes | count |
avgCycleTime | number | null | Yes | avgCycleTime |
CycleTimeDistribution
Cycle time distribution buckets.| Property | Type | Required | Description |
|---|---|---|---|
'0-1 days' | number | Yes | ’0-1 days’ |
'2-7 days' | number | Yes | ’2-7 days’ |
'8-30 days' | number | Yes | ’8-30 days’ |
'30+ days' | number | Yes | ’30+ days’ |
CycleTimePercentiles
Cycle time percentiles.| Property | Type | Required | Description |
|---|---|---|---|
p25 | number | null | Yes | p25 |
p50 | number | null | Yes | p50 |
p75 | number | null | Yes | p75 |
p90 | number | null | Yes | p90 |
CycleTimesReportData
Cycle times report result.| Property | Type | Required | Description |
|---|---|---|---|
count | number | Yes | count |
min | number | null | Yes | min |
max | number | null | Yes | max |
avg | number | null | Yes | avg |
median | number | null | Yes | median |
distribution | CycleTimeDistribution | Yes | distribution |
percentiles | CycleTimePercentiles | undefined | No | percentiles |
DailyArchiveEntry
Daily archive entry.| Property | Type | Required | Description |
|---|---|---|---|
date | string | Yes | date |
count | number | Yes | count |
MonthlyArchiveEntry
Monthly archive entry.| Property | Type | Required | Description |
|---|---|---|---|
month | string | Yes | month |
count | number | Yes | count |
TrendsReportData
Trends report result.| Property | Type | Required | Description |
|---|---|---|---|
byDay | DailyArchiveEntry[] | Yes | byDay |
byMonth | MonthlyArchiveEntry[] | Yes | byMonth |
totalPeriod | number | Yes | totalPeriod |
averagePerDay | number | Yes | averagePerDay |
EmptyArchiveData
Empty archive sentinel (when totalArchived is 0).| Property | Type | Required | Description |
|---|---|---|---|
totalArchived | 0 | Yes | totalArchived |
message | string | Yes | message |
ArchiveReportDataMap
Union type mapping report types to their data shapes.ArchiveAnalyticsResult
The envelope returned by analyzeArchive.| Property | Type | Required | Description |
|---|---|---|---|
report | R | Yes | report |
filters | { since: string | null; until: string | null; } | null | Yes | filters |
data | EmptyArchiveData | ArchiveReportDataMap[R] | Yes | data |
AnalyzeArchiveOptions
Options for analyzeArchive.| Property | Type | Required | Description |
|---|---|---|---|
report | ArchiveReportType | undefined | No | report |
since | string | undefined | No | since |
until | string | undefined | No | until |
cwd | string | undefined | No | cwd |
ArchiveStatsResult
| Property | Type | Required | Description |
|---|---|---|---|
totalArchived | number | Yes | totalArchived |
byReason | Record<string, number> | Yes | byReason |
averageCycleTimeDays | number | null | Yes | averageCycleTimeDays |
archiveRate | { periodDays: number; archivedInPeriod: number; } | Yes | archiveRate |
lastArchived | string | null | Yes | lastArchived |
AuditIssue
| Property | Type | Required | Description |
|---|---|---|---|
severity | "error" | "info" | "warning" | Yes | severity |
category | string | Yes | category |
message | string | Yes | message |
fix | string | undefined | No | fix |
AuditResult
| Property | Type | Required | Description |
|---|---|---|---|
scope | string | Yes | scope |
issues | AuditIssue[] | Yes | issues |
summary | { errors: number; warnings: number; fixed: number; } | Yes | summary |
BackupResult
| Property | Type | Required | Description |
|---|---|---|---|
backupId | string | Yes | backupId |
path | string | Yes | path |
timestamp | string | Yes | timestamp |
type | string | Yes | type |
files | string[] | Yes | files |
RestoreResult
| Property | Type | Required | Description |
|---|---|---|---|
restored | boolean | Yes | restored |
backupId | string | Yes | backupId |
timestamp | string | Yes | timestamp |
filesRestored | string[] | Yes | filesRestored |
BackupEntry
A single backup entry returned by listSystemBackups.| Property | Type | Required | Description |
|---|---|---|---|
backupId | string | Yes | backupId |
type | string | Yes | type |
timestamp | string | Yes | timestamp |
note | string | undefined | No | note |
files | string[] | Yes | files |
CleanupResult
| Property | Type | Required | Description |
|---|---|---|---|
target | string | Yes | target |
deleted | number | Yes | deleted |
items | string[] | Yes | items |
dryRun | boolean | Yes | dryRun |
prunedRows | number | undefined | No | prunedRows |
archivedRows | number | undefined | No | archivedRows |
archivePath | string | undefined | No | archivePath |
Platform
Detected platform.SystemInfo
Structured snapshot of the host system for diagnostics, error reports, and logging.| Property | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | OS platform (linux, darwin, win32, etc.) |
arch | string | Yes | CPU architecture (x64, arm64, etc.) |
osType | string | Yes | OS type (Linux, Darwin, Windows_NT, etc.) |
osRelease | string | Yes | OS kernel release version |
nodeVersion | string | Yes | Node.js version (without ‘v’ prefix) |
totalMemory | number | Yes | Total system memory in bytes |
freeMemory | number | Yes | Free system memory in bytes |
hostname | string | Yes | Machine hostname (useful for multi-machine correlation) |
homeDir | string | Yes | User home directory path |
CheckStatus
CheckResult
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
category | string | Yes | category |
status | CheckStatus | Yes | status |
message | string | Yes | message |
details | Record<string, unknown> | Yes | details |
fix | string | null | Yes | fix |
HealthCheck
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
status | "warn" | "pass" | "fail" | Yes | status |
message | string | undefined | No | message |
HealthResult
| Property | Type | Required | Description |
|---|---|---|---|
overall | "error" | "warning" | "healthy" | Yes | overall |
checks | HealthCheck[] | Yes | checks |
version | string | Yes | version |
installation | "ok" | "degraded" | Yes | installation |
DiagnosticsCheck
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
status | "warn" | "pass" | "fail" | Yes | status |
details | string | undefined | No | details |
fix | string | undefined | No | fix |
DiagnosticsResult
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
checks | DiagnosticsCheck[] | Yes | checks |
summary | { total: number; passed: number; warned: number; failed: number; } | Yes | summary |
DoctorCheck
| Property | Type | Required | Description |
|---|---|---|---|
check | string | Yes | check |
status | "error" | "warning" | "ok" | Yes | status |
message | string | Yes | message |
details | Record<string, unknown> | undefined | No | details |
fix | string | undefined | No | fix |
DoctorReport
| Property | Type | Required | Description |
|---|---|---|---|
healthy | boolean | Yes | healthy |
errors | number | Yes | errors |
warnings | number | Yes | warnings |
checks | DoctorCheck[] | Yes | checks |
FixResult
| Property | Type | Required | Description |
|---|---|---|---|
check | string | Yes | check |
action | "failed" | "fixed" | "skipped" | Yes | action |
message | string | Yes | message |
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.StartupHealthCheck
| Property | Type | Required | Description |
|---|---|---|---|
check | string | Yes | check |
status | "warn" | "pass" | "fail" | Yes | status |
message | string | Yes | message |
repaired | boolean | undefined | No | repaired |
StartupHealthResult
| Property | Type | Required | Description |
|---|---|---|---|
state | StartupState | Yes | Overall system state after health check + auto-repair. |
globalHealthy | boolean | Yes | True if the global ~/.cleo scaffold is healthy (after auto-repair). |
projectHealthy | boolean | Yes | True if the project .cleo/ scaffold is present and healthy. |
checks | StartupHealthCheck[] | Yes | Individual check results for logging/diagnostics. |
failures | StartupHealthCheck[] | Yes | Checks that failed and could not be auto-repaired. |
system | SystemInfo | Yes | Host system snapshot for diagnostics, error reports, and logging. |
InjectGenerateResult
| Property | Type | Required | Description |
|---|---|---|---|
injection | string | Yes | injection |
sizeBytes | number | Yes | sizeBytes |
version | string | Yes | version |
LabelsResult
| Property | Type | Required | Description |
|---|---|---|---|
labels | { label: string; count: number; tasks: string[]; }[] | Yes | labels |
totalLabels | number | Yes | totalLabels |
totalTagged | number | Yes | totalTagged |
totalUntagged | number | Yes | totalUntagged |
SystemMetricsResult
| Property | Type | Required | Description |
|---|---|---|---|
tokens | { input: number; output: number; cache: number; total: number; } | Yes | tokens |
compliance | { total: number; passed: number; failed: number; score: number; } | Yes | compliance |
sessions | { total: number; active: number; completed: number; } | Yes | sessions |
MigrateResult
| Property | Type | Required | Description |
|---|---|---|---|
from | string | Yes | from |
to | string | Yes | to |
migrations | { name: string; applied: boolean; }[] | Yes | migrations |
dryRun | boolean | Yes | dryRun |
RuntimeDiagnostics
| Property | Type | Required | Description |
|---|---|---|---|
channel | RuntimeChannel | Yes | channel |
mode | string | Yes | mode |
source | string | Yes | source |
version | string | Yes | version |
installed | string | Yes | installed |
dataRoot | string | Yes | dataRoot |
invocation | { executable: string; script: string; args: string[]; } | Yes | invocation |
naming | { cli: string; mcp: string; server: string; } | Yes | naming |
node | string | Yes | node |
platform | string | Yes | platform |
arch | string | Yes | arch |
binaries | Record<string, string> | undefined | No | binaries |
package | { name: string; version: string; } | undefined | No | package |
warnings | string[] | Yes | warnings |
SafestopResult
| Property | Type | Required | Description |
|---|---|---|---|
stopped | boolean | Yes | stopped |
reason | string | Yes | reason |
sessionEnded | boolean | Yes | sessionEnded |
handoff | string | undefined | No | handoff |
dryRun | boolean | Yes | dryRun |
UncancelResult
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
uncancelled | boolean | Yes | uncancelled |
previousStatus | string | Yes | previousStatus |
newStatus | string | Yes | newStatus |
cascadeCount | number | Yes | cascadeCount |
dryRun | boolean | Yes | dryRun |
TemplateSection
A single section/field within an issue template.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
type | "markdown" | "input" | "textarea" | "dropdown" | "checkboxes" | Yes | type |
label | string | Yes | label |
required | boolean | Yes | required |
options | string[] | undefined | No | options |
placeholder | string | undefined | No | placeholder |
IssueTemplate
A parsed issue template.| Property | Type | Required | Description |
|---|---|---|---|
filename | string | Yes | filename |
subcommand | string | Yes | subcommand |
name | string | Yes | name |
titlePrefix | string | Yes | titlePrefix |
labels | string[] | Yes | labels |
sections | TemplateSection[] | Yes | sections |
TemplateConfig
The full template config output.| Property | Type | Required | Description |
|---|---|---|---|
templates | IssueTemplate[] | Yes | templates |
generatedAt | string | Yes | generatedAt |
sourceDir | string | Yes | sourceDir |
TemplateResult
Result type for template parser operations.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
data | T | undefined | No | data |
error | { code: string; message: string; details?: Record<string, unknown>; } | undefined | No | error |
ShellType
Supported shell types.ChangelogSection
Grouped changelog sections.| Property | Type | Required | Description |
|---|---|---|---|
title | string | Yes | title |
entries | { taskId: string; description: string; }[] | Yes | entries |
CommandMeta
Parsed command metadata.| Property | Type | Required | Description |
|---|---|---|---|
command | string | Yes | command |
category | string | Yes | category |
synopsis | string | Yes | synopsis |
aliases | string[] | Yes | aliases |
relevance | string | Yes | relevance |
flags | string[] | Yes | flags |
exits | string[] | Yes | exits |
jsonOutput | boolean | Yes | jsonOutput |
jsonDefault | boolean | Yes | jsonDefault |
subcommands | string[] | Yes | subcommands |
note | string | Yes | note |
aliasFor | string | Yes | aliasFor |
scriptName | string | Yes | scriptName |
ParsedFlags
Parsed flag state.| Property | Type | Required | Description |
|---|---|---|---|
format | "" | "json" | "human" | Yes | format |
quiet | boolean | Yes | quiet |
dryRun | boolean | Yes | dryRun |
verbose | boolean | Yes | verbose |
help | boolean | Yes | help |
force | boolean | Yes | force |
remaining | string[] | Yes | remaining |
InsertTask
SelectTask
InsertTaskDependency
SelectTaskDependency
InsertTaskRelation
SelectTaskRelation
InsertSession
SelectSession
InsertWorkHistory
SelectWorkHistory
InsertLifecyclePipeline
SelectLifecyclePipeline
InsertLifecycleStage
SelectLifecycleStage
InsertLifecycleGateResult
SelectLifecycleGateResult
InsertLifecycleEvidence
SelectLifecycleEvidence
InsertLifecycleTransition
SelectLifecycleTransition
InsertSchemaMeta
SelectSchemaMeta
InsertAuditLog
SelectAuditLog
AuditLogInsert
Canonical type alias for audit log insert (T4848).AuditLogSelect
Canonical type alias for audit log select (T4848).InsertTokenUsage
SelectTokenUsage
InsertArchitectureDecision
SelectArchitectureDecision
InsertManifestEntry
SelectManifestEntry
InsertPipelineManifest
SelectPipelineManifest
InsertReleaseManifest
SelectReleaseManifest
InsertExternalTaskLink
SelectExternalTaskLink
InsertAgentInstance
SelectAgentInstance
InsertAgentErrorLog
SelectAgentErrorLog
ManifestIntegrity
Severity
ComplianceMetrics
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
category | string | Yes | category |
source | string | Yes | source |
sourceId | string | Yes | sourceId |
period | string | Yes | period |
compliance | { compliancePassRate: number; ruleAdherenceScore: number; violationCount: number; violationSeverity: Severity; manifestIntegrity: ManifestIntegrity; } | Yes | compliance |
tags | string[] | Yes | tags |
context | { taskId: string; researchLinked: boolean; returnFormatValid: boolean; } | Yes | context |
ManifestEntry
| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | id |
research_id | string | undefined | No | research_id |
title | string | undefined | No | title |
status | string | undefined | No | status |
key_findings | string[] | undefined | No | key_findings |
findings_summary | string | undefined | No | findings_summary |
linked_tasks | string[] | undefined | No | linked_tasks |
task_ids | string[] | undefined | No | task_ids |
agent_type | string | undefined | No | agent_type |
TokenMetrics
| Property | Type | Required | Description |
|---|---|---|---|
inputTokens | number | Yes | inputTokens |
outputTokens | number | Yes | outputTokens |
totalTokens | number | Yes | totalTokens |
maxTokens | number | Yes | maxTokens |
percentage | number | Yes | percentage |
status | string | Yes | status |
TokenEfficiency
| Property | Type | Required | Description |
|---|---|---|---|
tokensUsed | number | Yes | tokensUsed |
maxTokens | number | Yes | maxTokens |
tasksCompleted | number | Yes | tasksCompleted |
contextUtilization | number | Yes | contextUtilization |
tokenUtilizationRate | number | Yes | tokenUtilizationRate |
contextEfficiency | number | Yes | contextEfficiency |
inputTokens | number | Yes | inputTokens |
outputTokens | number | Yes | outputTokens |
OrchestrationOverhead
| Property | Type | Required | Description |
|---|---|---|---|
orchestratorTokens | number | Yes | orchestratorTokens |
totalSubagentTokens | number | Yes | totalSubagentTokens |
numSubagents | number | Yes | numSubagents |
overheadRatio | number | Yes | overheadRatio |
tokensPerSubagent | number | Yes | tokensPerSubagent |
DriftIssue
| Property | Type | Required | Description |
|---|---|---|---|
type | "missing_from_index" | "orphaned_index" | "missing_from_wrapper" | "missing_from_readme" | Yes | type |
severity | "error" | "warning" | Yes | severity |
item | string | Yes | item |
message | string | Yes | message |
DriftReport
| Property | Type | Required | Description |
|---|---|---|---|
mode | "full" | "quick" | Yes | mode |
issues | DriftIssue[] | Yes | issues |
exitCode | 0 | 1 | 2 | Yes | exitCode |
CommandIndexEntry
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
script | string | undefined | No | script |
aliasFor | string | null | undefined | No | aliasFor |
note | string | null | undefined | No | note |
CommandIndex
| Property | Type | Required | Description |
|---|---|---|---|
commands | CommandIndexEntry[] | Yes | commands |
SchemaVersions
| Property | Type | Required | Description |
|---|---|---|---|
todo | string | undefined | No | todo |
config | string | undefined | No | config |
archive | string | undefined | No | archive |
log | string | undefined | No | log |
FileHashes
| Property | Type | Required | Description |
|---|---|---|---|
'tasks.db' | string | undefined | No | ’tasks.db’ |
'config.json' | string | undefined | No | ’config.json’ |
ProjectCacheEntry
| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | path |
lastValidated | string | Yes | lastValidated |
validationStatus | "warning" | "failed" | "passed" | Yes | validationStatus |
schemaVersions | SchemaVersions | Yes | schemaVersions |
fileHashes | FileHashes | Yes | fileHashes |
issues | string[] | Yes | issues |
ttl | number | Yes | ttl |
DoctorProjectCache
| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | version |
lastUpdated | string | Yes | lastUpdated |
projects | Record<string, ProjectCacheEntry> | Yes | projects |
ProjectDetail
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
path | string | Yes | path |
status | "warning" | "failed" | "orphaned" | "healthy" | Yes | status |
issues | string[] | undefined | No | issues |
isTemp | boolean | Yes | isTemp |
isOrphaned | boolean | undefined | No | isOrphaned |
reason | string | undefined | No | reason |
CategorizedProjects
| Property | Type | Required | Description |
|---|---|---|---|
active | ProjectDetail[] | Yes | active |
temp | ProjectDetail[] | Yes | temp |
orphaned | ProjectDetail[] | Yes | orphaned |
UserJourneyStage
HealthSummary
| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | total |
healthy | number | Yes | healthy |
warnings | number | Yes | warnings |
failed | number | Yes | failed |
orphaned | number | Yes | orphaned |
temp | number | Yes | temp |
ValidationError
| Property | Type | Required | Description |
|---|---|---|---|
field | string | undefined | No | field |
message | string | Yes | message |
severity | "error" | "warning" | Yes | severity |
fix | string | undefined | No | fix |
ValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
errors | ValidationError[] | Yes | errors |
warnings | ValidationError[] | Yes | warnings |
Task
| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | id |
content | string | undefined | No | content |
title | string | undefined | No | title |
status | string | undefined | No | status |
activeForm | string | undefined | No | activeForm |
created_at | string | undefined | No | created_at |
completed_at | string | undefined | No | completed_at |
parentId | string | null | undefined | No | parentId |
type | string | undefined | No | type |
depends | string[] | undefined | No | depends |
cancelledAt | string | undefined | No | cancelledAt |
cancellationReason | string | undefined | No | cancellationReason |
TaskData
Task data shape for validation functions.| Property | Type | Required | Description |
|---|---|---|---|
tasks | Task[] | Yes | tasks |
project | { currentPhase?: string; phases?: Record<string, { status?: string; startedAt?: string; completedAt?: string; }>; } | undefined | No | project |
ArchiveData
Archive data shape for validation functions.| Property | Type | Required | Description |
|---|---|---|---|
archived_tasks | Task[] | Yes | archived_tasks |
ComprehensiveValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
schemaErrors | number | Yes | schemaErrors |
semanticErrors | number | Yes | semanticErrors |
exitCode | number | Yes | exitCode |
checks | { name: string; passed: boolean; message: string; }[] | Yes | checks |
ManifestDoc
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
file | string | Yes | file |
title | string | Yes | title |
topics | string[] | Yes | topics |
linked_tasks | string[] | Yes | linked_tasks |
status | string | Yes | status |
GapEntry
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | type |
severity | string | Yes | severity |
document | string | Yes | document |
topic | string | Yes | topic |
fix | string | Yes | fix |
CoverageEntry
| Property | Type | Required | Description |
|---|---|---|---|
document | string | Yes | document |
topic | string | Yes | topic |
GapReport
| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
timestamp | string | Yes | timestamp |
reviewDocs | ManifestDoc[] | Yes | reviewDocs |
gaps | GapEntry[] | Yes | gaps |
coverage | CoverageEntry[] | Yes | coverage |
status | "no_review_docs" | "ready_to_archive" | "gaps_detected" | Yes | status |
canArchive | boolean | Yes | canArchive |
ManifestEntry
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
file | string | Yes | file |
title | string | Yes | title |
date | string | Yes | date |
status | "completed" | "blocked" | "partial" | Yes | status |
agent_type | string | Yes | agent_type |
topics | string[] | undefined | No | topics |
key_findings | string[] | undefined | No | key_findings |
actionable | boolean | undefined | No | actionable |
needs_followup | string[] | undefined | No | needs_followup |
linked_tasks | string[] | undefined | No | linked_tasks |
ManifestViolation
| Property | Type | Required | Description |
|---|---|---|---|
requirement | string | Yes | requirement |
severity | "error" | "warning" | Yes | severity |
message | string | Yes | message |
fix | string | undefined | No | fix |
ManifestValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
score | number | Yes | score |
pass | boolean | Yes | pass |
agent_type | string | undefined | No | agent_type |
violations | ManifestViolation[] | Yes | violations |
note | string | undefined | No | note |
ComplianceEntry
| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
source_id | string | Yes | source_id |
source_type | string | Yes | source_type |
compliance | { compliance_pass_rate: number; rule_adherence_score: number; violation_count: number; violation_severity: "none" | "warning" | "error"; manifest_integrity: "valid" | "violations_found"; } | Yes | compliance |
efficiency | { input_tokens: number; output_tokens: number; context_utilization: number; token_utilization_rate: number; } | Yes | efficiency |
_context | { agent_type: string; validation_score: number; violations: ManifestViolation[]; } | Yes | _context |
ProtocolViolation
| Property | Type | Required | Description |
|---|---|---|---|
requirement | string | Yes | requirement |
severity | "error" | "warning" | Yes | severity |
message | string | Yes | message |
fix | string | undefined | No | fix |
ProtocolValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
violations | ProtocolViolation[] | Yes | violations |
score | number | Yes | score |
GateName
AgentName
FailureLogEntry
| Property | Type | Required | Description |
|---|---|---|---|
gate | "implemented" | "testsPassed" | "qaPassed" | "cleanupDone" | "securityPassed" | "documented" | Yes | gate |
agent | string | Yes | agent |
reason | string | Yes | reason |
timestamp | string | Yes | timestamp |
round | number | Yes | round |
VerificationGates
| Property | Type | Required | Description |
|---|---|---|---|
implemented | boolean | null | Yes | implemented |
testsPassed | boolean | null | Yes | testsPassed |
qaPassed | boolean | null | Yes | qaPassed |
cleanupDone | boolean | null | Yes | cleanupDone |
securityPassed | boolean | null | Yes | securityPassed |
documented | boolean | null | Yes | documented |
Verification
| Property | Type | Required | Description |
|---|---|---|---|
passed | boolean | Yes | passed |
round | number | Yes | round |
gates | VerificationGates | Yes | gates |
lastAgent | string | null | Yes | lastAgent |
lastUpdated | string | Yes | lastUpdated |
failureLog | FailureLogEntry[] | Yes | failureLog |
VerificationStatus
CircularValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
error | string | undefined | No | error |
code | number | undefined | No | code |
TaskForVerification
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
status | string | Yes | status |
parentId | string | null | undefined | No | parentId |
type | string | undefined | No | type |
verification | Verification | null | undefined | No | verification |
epicLifecycle | string | undefined | No | epicLifecycle |
ProjectInfo
Fields consumed by logging, audit, and correlation subsystems.| Property | Type | Required | Description |
|---|---|---|---|
projectHash | string | Yes | 12-char SHA-256 hex of the normalized project path (per-install identity). |
projectId | string | Yes | Stable UUID that survives directory moves (added by T5333). |
projectRoot | string | Yes | Absolute path to the project root directory. |
projectName | string | Yes | Human-readable project name (last segment of projectRoot). |
BackfillOptions
Options for backfillTasks().| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | undefined | No | Preview changes only — do not modify the database. Default: false. |
rollback | boolean | undefined | No | Revert a previous backfill (remove auto-generated AC + verification). Default: false. |
taskIds | string[] | undefined | No | Restrict backfill to specific task IDs. Default: all tasks. |
BackfillTaskChange
Summary of what was (or would be) changed for a single task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
addedAc | boolean | Yes | addedAc |
generatedAc | string[] | Yes | generatedAc |
addedVerification | boolean | Yes | addedVerification |
addedNote | boolean | Yes | addedNote |
rolledBack | string[] | undefined | No | Populated during rollback: fields that were cleared. |
BackfillResult
Overall result returned by backfillTasks().| Property | Type | Required | Description |
|---|---|---|---|
dryRun | boolean | Yes | dryRun |
rollback | boolean | Yes | rollback |
tasksScanned | number | Yes | tasksScanned |
tasksChanged | number | Yes | tasksChanged |
acAdded | number | Yes | acAdded |
verificationAdded | number | Yes | verificationAdded |
changes | BackfillTaskChange[] | Yes | changes |
RequirementLevel
RFC 2119 requirement levelsViolationSeverity
Violation severityProtocolRule
Protocol rule definition| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Rule identifier (e.g., RSCH-001) |
level | RequirementLevel | Yes | RFC 2119 level |
message | string | Yes | Rule description |
fix | string | Yes | Suggested fix command |
validate | (manifestEntry: Record<string, unknown>, additionalData?: Record<string, unknown>) => Promise<boolean> | boolean | No | Validation function |
ProtocolViolation
Protocol violation result| Property | Type | Required | Description |
|---|---|---|---|
requirement | string | Yes | requirement |
severity | ViolationSeverity | Yes | severity |
message | string | Yes | message |
fix | string | Yes | fix |
ProtocolValidationResult
Protocol validation result| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
violations | ProtocolViolation[] | Yes | violations |
score | number | Yes | score |
ErrorSeverity
Error severity levels for protocol/gate validation.| Property | Type | Required | Description |
|---|---|---|---|
INFO | ErrorSeverity.INFO | Yes | INFO |
WARNING | ErrorSeverity.WARNING | Yes | WARNING |
ERROR | ErrorSeverity.ERROR | Yes | ERROR |
CRITICAL | ErrorSeverity.CRITICAL | Yes | CRITICAL |
ErrorCategory
Error category for grouping protocol/gate violations.| Property | Type | Required | Description |
|---|---|---|---|
GENERAL | ErrorCategory.GENERAL | Yes | GENERAL |
HIERARCHY | ErrorCategory.HIERARCHY | Yes | HIERARCHY |
CONCURRENCY | ErrorCategory.CONCURRENCY | Yes | CONCURRENCY |
SESSION | ErrorCategory.SESSION | Yes | SESSION |
VERIFICATION | ErrorCategory.VERIFICATION | Yes | VERIFICATION |
CONTEXT | ErrorCategory.CONTEXT | Yes | CONTEXT |
PROTOCOL | ErrorCategory.PROTOCOL | Yes | PROTOCOL |
NEXUS | ErrorCategory.NEXUS | Yes | NEXUS |
LIFECYCLE | ErrorCategory.LIFECYCLE | Yes | LIFECYCLE |
SPECIAL | ErrorCategory.SPECIAL | Yes | SPECIAL |
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.| Property | Type | Required | Description |
|---|---|---|---|
SUCCESS | ProtocolExitCode.SUCCESS | Yes | SUCCESS |
E_GENERAL_ERROR | ProtocolExitCode.E_GENERAL_ERROR | Yes | E_GENERAL_ERROR |
E_INVALID_INPUT | ProtocolExitCode.E_INVALID_INPUT | Yes | E_INVALID_INPUT |
E_FILE_ERROR | ProtocolExitCode.E_FILE_ERROR | Yes | E_FILE_ERROR |
E_NOT_FOUND | ProtocolExitCode.E_NOT_FOUND | Yes | E_NOT_FOUND |
E_DEPENDENCY_ERROR | ProtocolExitCode.E_DEPENDENCY_ERROR | Yes | E_DEPENDENCY_ERROR |
E_VALIDATION_ERROR | ProtocolExitCode.E_VALIDATION_ERROR | Yes | E_VALIDATION_ERROR |
E_PARENT_NOT_FOUND | ProtocolExitCode.E_PARENT_NOT_FOUND | Yes | E_PARENT_NOT_FOUND |
E_DEPTH_EXCEEDED | ProtocolExitCode.E_DEPTH_EXCEEDED | Yes | E_DEPTH_EXCEEDED |
E_SIBLING_LIMIT | ProtocolExitCode.E_SIBLING_LIMIT | Yes | E_SIBLING_LIMIT |
E_CIRCULAR_REFERENCE | ProtocolExitCode.E_CIRCULAR_REFERENCE | Yes | E_CIRCULAR_REFERENCE |
E_SESSION_REQUIRED | ProtocolExitCode.E_SESSION_REQUIRED | Yes | E_SESSION_REQUIRED |
E_PROTOCOL_RESEARCH | ProtocolExitCode.E_PROTOCOL_RESEARCH | Yes | E_PROTOCOL_RESEARCH |
E_PROTOCOL_CONSENSUS | ProtocolExitCode.E_PROTOCOL_CONSENSUS | Yes | E_PROTOCOL_CONSENSUS |
E_PROTOCOL_SPECIFICATION | ProtocolExitCode.E_PROTOCOL_SPECIFICATION | Yes | E_PROTOCOL_SPECIFICATION |
E_PROTOCOL_DECOMPOSITION | ProtocolExitCode.E_PROTOCOL_DECOMPOSITION | Yes | E_PROTOCOL_DECOMPOSITION |
E_PROTOCOL_IMPLEMENTATION | ProtocolExitCode.E_PROTOCOL_IMPLEMENTATION | Yes | E_PROTOCOL_IMPLEMENTATION |
E_PROTOCOL_CONTRIBUTION | ProtocolExitCode.E_PROTOCOL_CONTRIBUTION | Yes | E_PROTOCOL_CONTRIBUTION |
E_PROTOCOL_RELEASE | ProtocolExitCode.E_PROTOCOL_RELEASE | Yes | E_PROTOCOL_RELEASE |
E_PROTOCOL_GENERIC | ProtocolExitCode.E_PROTOCOL_GENERIC | Yes | E_PROTOCOL_GENERIC |
E_PROTOCOL_VALIDATION | ProtocolExitCode.E_PROTOCOL_VALIDATION | Yes | E_PROTOCOL_VALIDATION |
E_TESTS_SKIPPED | ProtocolExitCode.E_TESTS_SKIPPED | Yes | E_TESTS_SKIPPED |
E_LIFECYCLE_GATE_FAILED | ProtocolExitCode.E_LIFECYCLE_GATE_FAILED | Yes | E_LIFECYCLE_GATE_FAILED |
ProtocolRequest
Request shape used by the protocol enforcement system. Minimal interface matching the fields needed by ProtocolEnforcer.| Property | Type | Required | Description |
|---|---|---|---|
gateway | "query" | "mutate" | Yes | gateway |
domain | string | Yes | domain |
operation | string | Yes | operation |
params | Record<string, unknown> | undefined | No | params |
ProtocolResponse
Response shape used by the protocol enforcement system.| Property | Type | Required | Description |
|---|---|---|---|
_meta | { [key: string]: unknown; gateway: string; domain: string; operation: string; timestamp: string; duration_ms: number; } | Yes | _meta |
success | boolean | Yes | success |
data | unknown | Yes | data |
partial | boolean | undefined | No | partial |
error | { code: string; exitCode?: number; message: string; details?: Record<string, unknown>; fix?: string; alternatives?: Array<{ action: string; command: string; }>; } | undefined | No | error |
ProtocolType
Protocol types aligned with RCASD-IVTR+C lifecycle| Property | Type | Required | Description |
|---|---|---|---|
RESEARCH | ProtocolType.RESEARCH | Yes | RESEARCH |
CONSENSUS | ProtocolType.CONSENSUS | Yes | CONSENSUS |
SPECIFICATION | ProtocolType.SPECIFICATION | Yes | SPECIFICATION |
DECOMPOSITION | ProtocolType.DECOMPOSITION | Yes | DECOMPOSITION |
IMPLEMENTATION | ProtocolType.IMPLEMENTATION | Yes | IMPLEMENTATION |
CONTRIBUTION | ProtocolType.CONTRIBUTION | Yes | CONTRIBUTION |
RELEASE | ProtocolType.RELEASE | Yes | RELEASE |
VALIDATION | ProtocolType.VALIDATION | Yes | VALIDATION |
TESTING | ProtocolType.TESTING | Yes | TESTING |
ViolationLogEntry
Violation log entry| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
taskId | string | undefined | No | taskId |
protocol | ProtocolType | Yes | protocol |
violations | ProtocolViolation[] | Yes | violations |
score | number | Yes | score |
blocked | boolean | Yes | blocked |
ChainFindCriteria
| Property | Type | Required | Description |
|---|---|---|---|
query | string | undefined | No | query |
category | "custom" | "research" | "consensus" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | "contribution" | "architecture" | undefined | No | category |
tessera | string | undefined | No | tessera |
archetype | string | undefined | No | archetype |
limit | number | undefined | No | limit |
ProtocolViolation
Protocol violation entry.| Property | Type | Required | Description |
|---|---|---|---|
requirement | string | Yes | requirement |
severity | "error" | "warning" | Yes | severity |
message | string | Yes | message |
fix | string | Yes | fix |
ProtocolValidationResult
Protocol validation result.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
protocol | string | Yes | protocol |
violations | ProtocolViolation[] | Yes | violations |
score | number | Yes | score |
ManifestEntryInput
Manifest entry structure for validation.| Property | Type | Required | Description |
|---|---|---|---|
id | string | undefined | No | id |
file | string | undefined | No | file |
title | string | undefined | No | title |
date | string | undefined | No | date |
status | string | undefined | No | status |
agent_type | string | undefined | No | agent_type |
topics | string[] | undefined | No | topics |
key_findings | string[] | undefined | No | key_findings |
actionable | boolean | undefined | No | actionable |
needs_followup | string[] | undefined | No | needs_followup |
linked_tasks | string[] | undefined | No | linked_tasks |
sources | string[] | undefined | No | sources |
ProtocolType
VotingMatrix
| Property | Type | Required | Description |
|---|---|---|---|
options | { name: string; confidence: number; rationale?: string; }[] | No | options |
threshold | number | undefined | No | threshold |
AdrStatus
ADR lifecycle status values. T260ArchitectureDecisionOptions
Architecture decision options for validator.| Property | Type | Required | Description |
|---|---|---|---|
adrContent | string | undefined | No | Content of the ADR markdown document, used to verify required sections. |
status | AdrStatus | undefined | No | Current status of the decision record. |
hitlReviewed | boolean | undefined | No | Whether a human-in-the-loop review has been completed (ADR-003). |
downstreamFlagged | boolean | undefined | No | Whether downstream artifacts are flagged for review after supersession. |
persistedInDb | boolean | undefined | No | Whether the record is persisted in the canonical SQLite decisions table. |
ValidationStageOptions
Validation-stage options for validator.| Property | Type | Required | Description |
|---|---|---|---|
specMatchConfirmed | boolean | undefined | No | Whether static analysis / type check passed (VALID-001). |
testSuitePassed | boolean | undefined | No | Whether the existing test suite ran successfully (VALID-002). |
protocolComplianceChecked | boolean | undefined | No | Whether 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. T260TestingOptions
Testing-stage options for validator.| Property | Type | Required | Description |
|---|---|---|---|
framework | TestFramework | undefined | No | Detected or declared test framework for the current worktree. |
testsRun | number | undefined | No | Total number of tests executed. |
testsPassed | number | undefined | No | Number of tests that passed. |
testsFailed | number | undefined | No | Number of tests that failed. |
coveragePercent | number | undefined | No | Coverage percentage achieved (0-100). |
coverageThreshold | number | undefined | No | Minimum coverage threshold from project config. |
ivtLoopConverged | boolean | undefined | No | Whether the implementation→validate→test loop converged (spec met). |
ivtLoopIterations | number | undefined | No | Number of IVT loop iterations until convergence. |
BrainMaintenanceDecayResult
Temporal decay step result subset used in maintenance output.| Property | Type | Required | Description |
|---|---|---|---|
affected | number | Yes | Number of learnings whose confidence was updated. |
BrainMaintenanceConsolidationResult
Memory consolidation step result subset used in maintenance output.| Property | Type | Required | Description |
|---|---|---|---|
merged | number | Yes | Number of new summary observations created. |
removed | number | Yes | Number of original observations archived. |
BrainMaintenanceReconciliationResult
Orphaned reference reconciliation step result.| Property | Type | Required | Description |
|---|---|---|---|
decisionsFixed | number | Yes | Decisions with stale task/epic references fixed. |
observationsFixed | number | Yes | Observations with stale session references fixed. |
linksRemoved | number | Yes | Memory links with stale task references removed. |
BrainMaintenanceEmbeddingsResult
Embedding backfill step result.| Property | Type | Required | Description |
|---|---|---|---|
processed | number | Yes | Observations successfully embedded. |
skipped | number | Yes | Observations skipped (no provider or no narrative). |
errors | number | Yes | Observations that failed embedding. |
BrainMaintenanceResult
Aggregated result from a full brain maintenance run. All counts are zero when a step is skipped via the correspondingskip* option.
| Property | Type | Required | Description |
|---|---|---|---|
decay | BrainMaintenanceDecayResult | Yes | Results from the temporal decay step. |
consolidation | BrainMaintenanceConsolidationResult | Yes | Results from the memory consolidation step. |
reconciliation | BrainMaintenanceReconciliationResult | Yes | Results from the cross-DB orphaned reference reconciliation step. |
embeddings | BrainMaintenanceEmbeddingsResult | Yes | Results from the embedding backfill step. |
duration | number | Yes | Total wall-clock duration of the maintenance run in milliseconds. |
BrainMaintenanceOptions
Options forrunBrainMaintenance. All skip* flags default to false — the full maintenance pass runs unless specific steps are disabled.
| Property | Type | Required | Description |
|---|---|---|---|
skipDecay | boolean | undefined | No | Skip the temporal decay step. Default: false. |
skipConsolidation | boolean | undefined | No | Skip the memory consolidation step. Default: false. |
skipReconciliation | boolean | undefined | No | Skip the cross-DB orphaned reference reconciliation step. Default: false. |
skipEmbeddings | boolean | undefined | No | Skip the embedding backfill step. Default: false. |
onProgress | ((step: string, current: number, total: number) => void) | undefined | No | Progress callback invoked before each step starts and after completion of each sub-item. |
ClaudeMemMigrationResult
Result from a claude-mem migration run.| Property | Type | Required | Description |
|---|---|---|---|
observationsImported | number | Yes | observationsImported |
observationsSkipped | number | Yes | observationsSkipped |
learningsImported | number | Yes | learningsImported |
decisionsImported | number | Yes | decisionsImported |
errors | string[] | Yes | errors |
dryRun | boolean | Yes | dryRun |
ClaudeMemMigrationOptions
Options for the claude-mem migration.| Property | Type | Required | Description |
|---|---|---|---|
sourcePath | string | undefined | No | Path to claude-mem.db. Default: ~/.claude-mem/claude-mem.db |
project | string | undefined | No | Project tag for imported entries. |
dryRun | boolean | undefined | No | If true, count what would be imported without inserting. |
batchSize | number | undefined | No | Number of rows to insert per transaction batch. Default: 100. |
BlockerNode
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
status | string | Yes | status |
reason | string | undefined | No | reason |
decisions | BrainDecisionNode[] | Yes | decisions |
CausalTrace
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
blockers | BlockerNode[] | Yes | blockers |
rootCauses | string[] | Yes | rootCauses |
depth | number | Yes | depth |
SimilarEntry
| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
distance | number | Yes | distance |
type | string | Yes | type |
title | string | Yes | title |
text | string | Yes | text |
ManifestEntry
ModelProviderLookup
| Property | Type | Required | Description |
|---|---|---|---|
provider | string | undefined | No | provider |
source | "none" | "model-prefix" | "models.dev-exact" | "models.dev-suffix" | Yes | source |
candidates | string[] | undefined | No | candidates |
TokenMethod
TokenConfidence
TokenTransport
TokenExchangeInput
| Property | Type | Required | Description |
|---|---|---|---|
requestPayload | unknown | Yes | requestPayload |
responsePayload | unknown | Yes | responsePayload |
provider | string | undefined | No | provider |
model | string | undefined | No | model |
transport | TokenTransport | undefined | No | transport |
gateway | string | undefined | No | gateway |
domain | string | undefined | No | domain |
operation | string | undefined | No | operation |
sessionId | string | undefined | No | sessionId |
taskId | string | undefined | No | taskId |
requestId | string | undefined | No | requestId |
cwd | string | undefined | No | cwd |
metadata | Record<string, unknown> | undefined | No | metadata |
TokenMeasurement
| Property | Type | Required | Description |
|---|---|---|---|
inputChars | number | Yes | inputChars |
outputChars | number | Yes | outputChars |
inputTokens | number | Yes | inputTokens |
outputTokens | number | Yes | outputTokens |
totalTokens | number | Yes | totalTokens |
method | TokenMethod | Yes | method |
confidence | TokenConfidence | Yes | confidence |
provider | string | Yes | provider |
model | string | undefined | No | model |
requestHash | string | undefined | No | requestHash |
responseHash | string | undefined | No | responseHash |
metadata | Record<string, unknown> | Yes | metadata |
TokenUsageFilters
| Property | Type | Required | Description |
|---|---|---|---|
provider | string | undefined | No | provider |
transport | TokenTransport | undefined | No | transport |
gateway | string | undefined | No | gateway |
domain | string | undefined | No | domain |
operation | string | undefined | No | operation |
sessionId | string | undefined | No | sessionId |
taskId | string | undefined | No | taskId |
method | TokenMethod | undefined | No | method |
confidence | TokenConfidence | undefined | No | confidence |
requestId | string | undefined | No | requestId |
since | string | undefined | No | since |
until | string | undefined | No | until |
limit | number | undefined | No | limit |
offset | number | undefined | No | offset |
TokenUsageSummary
| Property | Type | Required | Description |
|---|---|---|---|
totalRecords | number | Yes | totalRecords |
inputTokens | number | Yes | inputTokens |
outputTokens | number | Yes | outputTokens |
totalTokens | number | Yes | totalTokens |
byMethod | { method: string; count: number; totalTokens: number; }[] | Yes | byMethod |
byTransport | { transport: string; count: number; totalTokens: number; }[] | Yes | byTransport |
byOperation | { key: string; count: number; totalTokens: number; }[] | Yes | byOperation |
SkillEntry
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
path | string | Yes | path |
hasSkillFile | boolean | Yes | hasSkillFile |
description | string | Yes | description |
SkillContent
| Property | Type | Required | Description |
|---|---|---|---|
skill | string | Yes | skill |
content | string | Yes | content |
contentLength | number | Yes | contentLength |
estimatedTokens | number | Yes | estimatedTokens |
references | { name: string; path: string; }[] | Yes | references |
path | string | Yes | path |
HighImpactTask
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
wouldUnblock | number | Yes | wouldUnblock |
dependents | string[] | Yes | dependents |
SingleBlockerTask
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
remainingBlocker | Pick<TaskRef, "id" | "title"> | Yes | remainingBlocker |
CommonBlocker
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
blocksCount | number | Yes | blocksCount |
blockedTasks | string[] | Yes | blockedTasks |
UnblockResult
| Property | Type | Required | Description |
|---|---|---|---|
highImpact | HighImpactTask[] | Yes | highImpact |
singleBlocker | SingleBlockerTask[] | Yes | singleBlocker |
commonBlockers | CommonBlocker[] | Yes | commonBlockers |
ValidationIssue
| Property | Type | Required | Description |
|---|---|---|---|
code | string | Yes | code |
message | string | Yes | message |
severity | string | Yes | severity |
SpawnValidationResult
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
ready | boolean | Yes | ready |
issues | ValidationIssue[] | Yes | issues |
ContextInjectionData
Data returned by context injection.| Property | Type | Required | Description |
|---|---|---|---|
protocolType | string | Yes | protocolType |
content | string | Yes | content |
path | string | null | Yes | path |
contentLength | number | Yes | contentLength |
estimatedTokens | number | Yes | estimatedTokens |
taskId | string | null | Yes | taskId |
variant | string | null | Yes | variant |
CancelResult
Result of a cancel operation.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
taskId | string | Yes | taskId |
reason | string | undefined | No | reason |
cancelledAt | string | undefined | No | cancelledAt |
error | { code: string; message: string; } | undefined | No | error |
FlatTreeNode
Tree node representation for task hierarchy.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique task identifier (e.g. “T001”). |
title | string | Yes | Human-readable task title. |
status | string | Yes | Current task status (e.g. “pending”, “done”). |
type | string | undefined | No | Task type classification. |
children | FlatTreeNode[] | Yes | Child nodes in the hierarchy tree. |
ComplexityFactor
Complexity factor contributing to a task’s size estimate.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Factor name (e.g. “descriptionLength”, “dependencyDepth”). |
value | number | Yes | Numeric score contribution from this factor. |
detail | string | Yes | Human-readable explanation of the score (e.g. “short (42 chars)”). |
AnalysisResult
| Property | Type | Required | Description |
|---|---|---|---|
autoStarted | boolean | undefined | No | autoStarted |
StoreEngine
Store engine type. SQLite is the only supported engine (ADR-006). T4647TaskFilters
Common task filter options.| Property | Type | Required | Description |
|---|---|---|---|
status | "active" | "pending" | "cancelled" | "blocked" | "done" | "archived" | undefined | No | status |
parentId | string | null | undefined | No | parentId |
type | TaskType | undefined | No | type |
phase | string | undefined | No | phase |
limit | number | undefined | No | limit |
SessionFilters
Common session filter options.| Property | Type | Required | Description |
|---|---|---|---|
active | boolean | undefined | No | active |
limit | number | undefined | No | limit |
StoreProvider
Store provider interface. Backed by SQLite (ADR-006 canonical storage).| Property | Type | Required | Description |
|---|---|---|---|
engine | "sqlite" | Yes | engine |
createTask | (task: Task) => Promise<Task> | Yes | createTask |
getTask | (taskId: string) => Promise<Task | null> | Yes | getTask |
updateTask | (taskId: string, updates: Partial<Task>) => Promise<Task | null> | Yes | updateTask |
deleteTask | (taskId: string) => Promise<boolean> | Yes | deleteTask |
listTasks | (filters?: TaskFilters) => Promise<Task[]> | No | listTasks |
findTasks | (query: string, limit?: number) => Promise<Task[]> | No | findTasks |
archiveTask | (taskId: string, reason?: string) => Promise<boolean> | No | archiveTask |
createSession | (session: Session) => Promise<Session> | Yes | createSession |
getSession | (sessionId: string) => Promise<Session | null> | Yes | getSession |
updateSession | (sessionId: string, updates: Partial<Session>) => Promise<Session | null> | Yes | updateSession |
listSessions | (filters?: SessionFilters) => Promise<Session[]> | No | listSessions |
endSession | (sessionId: string, note?: string) => Promise<Session | null> | No | endSession |
startTaskOnSession | (sessionId: string, taskId: string) => Promise<void> | Yes | startTaskOnSession |
getCurrentTaskForSession | (sessionId: string) => Promise<{ taskId: string | null; since: string | null; }> | Yes | getCurrentTaskForSession |
stopTaskOnSession | (sessionId: string) => Promise<void> | Yes | stopTaskOnSession |
close | () => Promise<void> | Yes | close |
addTask | (options: AddTaskOptions) => Promise<AddTaskResult> | Yes | Add a task with full validation, ID generation, and logging. |
completeTask | (options: CompleteTaskOptions) => Promise<CompleteTaskResult> | Yes | Complete a task with dependency checks and optional auto-completion. |
richUpdateTask | (options: UpdateTaskOptions) => Promise<UpdateTaskResult> | Yes | Update a task with rich options (addLabels, removeDepends, etc.). |
showTask | (taskId: string) => Promise<Task> | Yes | Show a task by ID (throws CleoError if not found). |
richDeleteTask | (options: DeleteTaskOptions) => Promise<DeleteTaskResult> | Yes | Delete a task with force/cascade options. |
richFindTasks | (options: FindTasksOptions) => Promise<FindTasksResult> | Yes | Find tasks with fuzzy/ID/exact search and filtering. |
richListTasks | (options: ListTasksOptions) => Promise<ListTasksResult> | Yes | List tasks with full filtering and pagination. |
richArchiveTasks | (options: ArchiveTasksOptions) => Promise<ArchiveTasksResult> | Yes | Archive tasks in batch with filtering options. |
startSession | (options: { name: string; scope: string; autoStart?: boolean; startTask?: string; agent?: string; }) => Promise<Session> | No | Start a new session with scope, auto-start, etc. |
richEndSession | (options?: { sessionId?: string; note?: string; }) => Promise<Session> | No | End a session, optionally by ID with a note. |
sessionStatus | () => Promise<Session | null> | Yes | Get the current active session status. |
resumeSession | (sessionId: string) => Promise<Session> | Yes | Resume a previously ended session. |
richListSessions | (options?: { status?: string; limit?: number; }) => Promise<Session[]> | No | List sessions with status/limit filters. |
gcSessions | (maxAgeHours?: number) => Promise<{ orphaned: string[]; removed: string[]; }> | No | Garbage collect old sessions. |
currentTask | () => Promise<TaskCurrentResult> | Yes | Show current task work state. |
startTask | (taskId: string) => Promise<TaskStartResult> | Yes | Start working on a task by ID. |
stopTask | () => Promise<{ previousTask: string | null; }> | Yes | Stop working on the current task. |
getWorkHistory | () => Promise<TaskWorkHistoryEntry[]> | Yes | Get task work history. |
listLabels | () => Promise<Array<{ label: string; count: number; statuses: Record<string, number>; }>> | Yes | List all labels with task counts. |
showLabelTasks | (label: string) => Promise<Record<string, unknown>> | Yes | Show tasks with a specific label. |
getLabelStats | () => Promise<Record<string, unknown>> | Yes | Get detailed label statistics. |
suggestRelated | (taskId: string, opts?: { threshold?: number; }) => Promise<Record<string, unknown>> | No | Suggest related tasks based on shared attributes. |
addRelation | (from: string, to: string, type: string, reason: string) => Promise<Record<string, unknown>> | Yes | Add a relationship between two tasks. |
discoverRelated | (taskId: string) => Promise<Record<string, unknown>> | Yes | Discover related tasks using various methods. |
listRelations | (taskId: string) => Promise<Record<string, unknown>> | Yes | List existing relations for a task. |
analyzeTaskPriority | (opts?: { autoStart?: boolean; }) => Promise<AnalysisResult> | No | Analyze task priority with leverage scoring. |
MigrationResult
Migration result.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
tasksImported | number | Yes | tasksImported |
archivedImported | number | Yes | archivedImported |
sessionsImported | number | Yes | sessionsImported |
errors | string[] | Yes | errors |
warnings | string[] | Yes | warnings |
existingCounts | { tasks: number; archived: number; sessions: number; } | undefined | No | existingCounts |
jsonCounts | { tasks: number; archived: number; sessions: number; } | undefined | No | jsonCounts |
MigrationOptions
Options for migration.| Property | Type | Required | Description |
|---|---|---|---|
force | boolean | undefined | No | force |
dryRun | boolean | undefined | No | dryRun |
RepairAction
A single repair action with status.| Property | Type | Required | Description |
|---|---|---|---|
action | string | Yes | action |
status | "skipped" | "applied" | "preview" | Yes | status |
details | string | Yes | details |
UpgradeAction
A single upgrade action with status.| Property | Type | Required | Description |
|---|---|---|---|
action | string | Yes | action |
status | "error" | "skipped" | "applied" | "preview" | Yes | status |
details | string | Yes | details |
reason | string | undefined | No | reason |
fix | string | undefined | No | fix |
UpgradeResult
Full upgrade result.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
upToDate | boolean | Yes | upToDate |
dryRun | boolean | Yes | dryRun |
actions | UpgradeAction[] | Yes | actions |
applied | number | Yes | applied |
errors | string[] | Yes | errors |
summary | UpgradeSummary | undefined | No | Summary of what was checked (added for —diagnose and bare upgrade). |
storageMigration | { migrated: boolean; tasksImported: number; archivedImported: number; sessionsImported: number; warnings: string[]; } | undefined | No | Storage migration sub-result (if migration was triggered). |
UpgradeSummary
Counts of what upgrade checked/applied/skipped.| Property | Type | Required | Description |
|---|---|---|---|
checked | number | Yes | checked |
applied | number | Yes | applied |
skipped | number | Yes | skipped |
errors | number | Yes | errors |
warnings | string[] | Yes | warnings |
DiagnoseFinding
A single diagnostic finding from —diagnose.| Property | Type | Required | Description |
|---|---|---|---|
check | string | Yes | check |
status | "error" | "warning" | "ok" | Yes | status |
details | string | Yes | details |
fix | string | undefined | No | fix |
DiagnoseResult
Result from diagnoseUpgrade().| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
findings | DiagnoseFinding[] | Yes | findings |
summary | { ok: number; warnings: number; errors: number; } | Yes | summary |
GateLayer
Gate layer enumeration| Property | Type | Required | Description |
|---|---|---|---|
SCHEMA | GateLayer.SCHEMA | Yes | SCHEMA |
SEMANTIC | GateLayer.SEMANTIC | Yes | SEMANTIC |
REFERENTIAL | GateLayer.REFERENTIAL | Yes | REFERENTIAL |
PROTOCOL | GateLayer.PROTOCOL | Yes | PROTOCOL |
GateStatus
Gate status for each layer| Property | Type | Required | Description |
|---|---|---|---|
PENDING | GateStatus.PENDING | Yes | PENDING |
PASSED | GateStatus.PASSED | Yes | PASSED |
FAILED | GateStatus.FAILED | Yes | FAILED |
BLOCKED | GateStatus.BLOCKED | Yes | BLOCKED |
SKIPPED | GateStatus.SKIPPED | Yes | SKIPPED |
GateViolation
Violation detail for a specific gate layer| Property | Type | Required | Description |
|---|---|---|---|
layer | GateLayer | Yes | layer |
severity | ErrorSeverity | Yes | severity |
code | string | Yes | code |
message | string | Yes | message |
field | string | undefined | No | field |
value | unknown | Yes | value |
constraint | string | undefined | No | constraint |
fix | string | undefined | No | fix |
LayerResult
Result from a single gate layer validation| Property | Type | Required | Description |
|---|---|---|---|
layer | GateLayer | Yes | layer |
status | GateStatus | Yes | status |
passed | boolean | Yes | passed |
violations | GateViolation[] | Yes | violations |
duration_ms | number | Yes | duration_ms |
VerificationResult
Complete verification result across all 4 layers| Property | Type | Required | Description |
|---|---|---|---|
passed | boolean | Yes | passed |
layers | Record<GateLayer, LayerResult> | Yes | layers |
totalViolations | number | Yes | totalViolations |
exitCode | ProtocolExitCode | Yes | exitCode |
category | ErrorCategory | Yes | category |
summary | string | Yes | summary |
blockedAt | GateLayer | undefined | No | blockedAt |
OperationContext
Operation context for gate validation| Property | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | domain |
operation | string | Yes | operation |
gateway | "query" | "mutate" | Yes | gateway |
params | Record<string, unknown> | undefined | No | params |
taskId | string | undefined | No | taskId |
protocolType | ProtocolType | undefined | No | protocolType |
WorkflowGateName
Workflow gate names per protocol specification Section 7.1 T3141| Property | Type | Required | Description |
|---|---|---|---|
IMPLEMENTED | WorkflowGateName.IMPLEMENTED | Yes | IMPLEMENTED |
TESTS_PASSED | WorkflowGateName.TESTS_PASSED | Yes | TESTS_PASSED |
QA_PASSED | WorkflowGateName.QA_PASSED | Yes | QA_PASSED |
CLEANUP_DONE | WorkflowGateName.CLEANUP_DONE | Yes | CLEANUP_DONE |
SECURITY_PASSED | WorkflowGateName.SECURITY_PASSED | Yes | SECURITY_PASSED |
DOCUMENTED | WorkflowGateName.DOCUMENTED | Yes | DOCUMENTED |
WorkflowGateStatus
Workflow gate status values per Section 7.3WorkflowGateAgent
Agent responsible for each gate per Section 7.2WorkflowGateDefinition
Individual workflow gate definition per Section 7.2| Property | Type | Required | Description |
|---|---|---|---|
name | WorkflowGateName | Yes | name |
agent | WorkflowGateAgent | Yes | agent |
dependsOn | WorkflowGateName[] | Yes | dependsOn |
description | string | Yes | description |
WorkflowGateState
State of a single workflow gate| Property | Type | Required | Description |
|---|---|---|---|
name | WorkflowGateName | Yes | name |
status | WorkflowGateStatus | Yes | status |
agent | WorkflowGateAgent | Yes | agent |
updatedAt | string | null | Yes | updatedAt |
failureReason | string | undefined | No | failureReason |
JsonSchemaType
JsonSchemaProperty
| Property | Type | Required | Description |
|---|---|---|---|
type | JsonSchemaType | Yes | type |
description | string | Yes | description |
enum | readonly string[] | undefined | No | enum |
items | { type: JsonSchemaType; } | undefined | No | items |
JSONSchemaObject
| Property | Type | Required | Description |
|---|---|---|---|
type | "object" | Yes | type |
properties | Record<string, JsonSchemaProperty> | Yes | properties |
required | string[] | Yes | required |
CommanderArgSplit
| Property | Type | Required | Description |
|---|---|---|---|
positionals | ParamDef[] | Yes | Params that map to .argument('<name>') or .argument('[name]'). |
options | ParamDef[] | Yes | Params that map to .option(...) calls. |
ValidationResult
Validation result| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
errors | ValidationError[] | Yes | errors |
ValidationError
Individual validation error| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | path |
message | string | Yes | message |
keyword | string | Yes | keyword |
params | Record<string, unknown> | Yes | params |
SchemaType
Schema types that can be validated via AJV/JSON Schema. SQLite-backed types (todo, archive, log, sessions) use drizzle-zod validation instead.ComplianceEntry
Compliance entry stored in COMPLIANCE.jsonl| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
taskId | string | Yes | taskId |
protocol | string | Yes | protocol |
result | "pass" | "fail" | "partial" | Yes | result |
violations | { code: string; message: string; severity: "error" | "warning"; }[] | undefined | No | violations |
linkedTask | string | undefined | No | linkedTask |
agent | string | undefined | No | agent |
CoherenceIssue
Coherence issue found during graph validation.| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | type |
taskId | string | Yes | taskId |
message | string | Yes | message |
severity | "error" | "info" | "warning" | Yes | severity |
ValidateCheckDetail
| Property | Type | Required | Description |
|---|---|---|---|
check | string | Yes | check |
status | "error" | "warning" | "ok" | Yes | status |
message | string | Yes | message |
ValidateReportResult
| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
schemaVersion | string | Yes | schemaVersion |
errors | number | Yes | errors |
warnings | number | Yes | warnings |
details | ValidateCheckDetail[] | Yes | details |
ValidateAndFixResult
Result from validate + fix operation.| Property | Type | Required | Description |
|---|---|---|---|
repairsApplied | number | Yes | repairsApplied |
repairs | RepairAction[] | Yes | repairs |
CriticalPathNode
| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
title | string | Yes | title |
status | string | Yes | status |
size | string | Yes | size |
blockerCount | number | Yes | blockerCount |
CriticalPathResult
| Property | Type | Required | Description |
|---|---|---|---|
path | CriticalPathNode[] | Yes | path |
length | number | Yes | length |
totalEffort | number | Yes | totalEffort |
completedInPath | number | Yes | completedInPath |
remainingInPath | number | Yes | remainingInPath |
SkillsPrecedenceConfig
Configuration for skill precedence resolution across providers.| Property | Type | Required | Description |
|---|---|---|---|
defaultPrecedence | SkillsPrecedence | undefined | No | Default precedence mode when no provider-specific override exists. |
providerOverrides | Record<string, SkillsPrecedence> | undefined | No | Per-provider precedence overrides (provider ID - precedence). |
ResolvedSkillPath
A resolved skill path with full provenance metadata.| Property | Type | Required | Description |
|---|---|---|---|
path | string | Yes | Absolute filesystem path to the skill directory. |
source | "marketplace" | "agents" | "vendor" | Yes | Where the skill was sourced from. |
scope | "project" | "global" | Yes | Whether this is a global or project-scoped skill. |
precedence | SkillsPrecedence | Yes | The precedence mode that selected this path. |
providerId | string | Yes | The provider that owns this skill path. |
SkillInstallationContext
Context for a skill installation operation.| Property | Type | Required | Description |
|---|---|---|---|
skillName | string | Yes | Name of the skill being installed. |
source | string | Yes | Source URL or path to install from. |
targetProviders | string[] | Yes | Provider IDs to install the skill for. |
precedenceMode | SkillsPrecedence | undefined | No | Precedence mode for the installation. |
projectRoot | string | undefined | No | Project root for project-scoped installations. |
InProgressEpic
In-progress epic entry.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
epicTitle | string | Yes | epicTitle |
activeTasks | number | Yes | activeTasks |
completionPercent | number | Yes | completionPercent |
ReadyTask
Ready task entry with leverage analysis.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
leverage | number | Yes | leverage |
score | number | Yes | score |
reasons | string[] | Yes | reasons |
BlockedTask
Blocked task entry.| Property | Type | Required | Description |
|---|---|---|---|
blockedBy | string[] | Yes | blockedBy |
blocksCount | number | Yes | blocksCount |
OpenBug
Open bug entry.| Property | Type | Required | Description |
|---|---|---|---|
epicId | string | Yes | epicId |
PlanMetrics
Planning metrics.| Property | Type | Required | Description |
|---|---|---|---|
totalEpics | number | Yes | totalEpics |
activeEpics | number | Yes | activeEpics |
totalTasks | number | Yes | totalTasks |
actionable | number | Yes | actionable |
blocked | number | Yes | blocked |
openBugs | number | Yes | openBugs |
avgLeverage | number | Yes | avgLeverage |
PlanResult
Composite planning view result.| Property | Type | Required | Description |
|---|---|---|---|
inProgress | InProgressEpic[] | Yes | inProgress |
ready | ReadyTask[] | Yes | ready |
blocked | BlockedTask[] | Yes | blocked |
openBugs | OpenBug[] | Yes | openBugs |
metrics | PlanMetrics | Yes | metrics |
RcasdIndex
RCASD-INDEX.json top-level structure.| Property | Type | Required | Description |
|---|---|---|---|
$schema | string | Yes | $schema |
_meta | IndexMeta | Yes | _meta |
authorities | Record<string, string> | Yes | authorities |
taskAnchored | Record<string, TaskAnchor> | Yes | taskAnchored |
specs | SpecEntry[] | Yes | specs |
reports | ReportEntry[] | Yes | reports |
pipeline | PipelineState | undefined | No | pipeline |
recentChanges | ChangeEntry[] | undefined | No | recentChanges |
IndexMeta
Index metadata.| Property | Type | Required | Description |
|---|---|---|---|
version | string | Yes | version |
lastUpdated | string | Yes | lastUpdated |
totals | IndexTotals | Yes | totals |
checksum | string | undefined | No | checksum |
IndexTotals
Aggregate counts.| Property | Type | Required | Description |
|---|---|---|---|
tasks | number | Yes | tasks |
specs | number | Yes | specs |
reports | number | Yes | reports |
activeResearch | number | Yes | activeResearch |
pendingConsensus | number | Yes | pendingConsensus |
TaskAnchor
Task-anchored RCASD artifact reference.| Property | Type | Required | Description |
|---|---|---|---|
shortName | string | Yes | shortName |
directory | string | Yes | directory |
spec | string | undefined | No | spec |
report | string | undefined | No | report |
status | "active" | "completed" | "failed" | "archived" | "paused" | undefined | No | status |
pipelineStage | string | Yes | pipelineStage |
createdAt | string | undefined | No | createdAt |
updatedAt | string | undefined | No | updatedAt |
SpecEntry
Specification entry.| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
version | string | Yes | version |
status | "DRAFT" | "APPROVED" | "ACTIVE" | "IMMUTABLE" | "DEPRECATED" | Yes | status |
domain | string | Yes | domain |
taskId | string | Yes | taskId |
lastUpdated | string | Yes | lastUpdated |
category | string | undefined | No | category |
shortName | string | undefined | No | shortName |
synopsis | string | undefined | No | synopsis |
ReportEntry
Report entry.| Property | Type | Required | Description |
|---|---|---|---|
file | string | Yes | file |
relatedSpec | string | Yes | relatedSpec |
taskId | string | Yes | taskId |
progress | string | Yes | progress |
lastUpdated | string | Yes | lastUpdated |
phase | string | undefined | No | phase |
notes | string | undefined | No | notes |
PipelineState
Pipeline state.| Property | Type | Required | Description |
|---|---|---|---|
activeOperations | PipelineOperation[] | Yes | activeOperations |
queuedTasks | string[] | Yes | queuedTasks |
lastCompleted | { taskId: string; stage: string; completedAt: string; } | undefined | No | lastCompleted |
PipelineOperation
Active pipeline operation.| Property | Type | Required | Description |
|---|---|---|---|
operationId | string | Yes | operationId |
taskId | string | Yes | taskId |
stage | string | Yes | stage |
startedAt | string | Yes | startedAt |
progress | number | undefined | No | progress |
message | string | undefined | No | message |
ChangeEntry
Change entry.| Property | Type | Required | Description |
|---|---|---|---|
timestamp | string | Yes | timestamp |
taskId | string | Yes | taskId |
changeType | string | Yes | changeType |
stage | string | undefined | No | stage |
description | string | Yes | description |
ExecutionResult
The aggregate result of executing a CANT workflow.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether the workflow completed without errors. |
outputs | Record<string, unknown> | Yes | Output bindings from output name = expr statements. |
steps | StepResult[] | Yes | Results for each executed step in order. |
duration | number | Yes | Total wall-clock execution duration in milliseconds. |
StepResult
The result of a single workflow statement execution.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The step or statement name. |
type | "pipeline" | "session" | "output" | "parallel" | "conditional" | "loop" | "approval" | "binding" | "directive" | Yes | The type of statement that was executed. |
success | boolean | Yes | Whether this step completed successfully. |
output | unknown | Yes | The output value produced by this step, if any. |
error | string | undefined | No | Error message if the step failed. |
duration | number | Yes | Wall-clock execution duration in milliseconds. |
DiscretionContext
Context provided to a discretion evaluator for AI-judged conditions.| Property | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The current session identifier. |
taskRefs | string[] | Yes | Task references currently in scope. |
agentId | string | Yes | The agent performing the evaluation. |
variables | Record<string, unknown> | Yes | All variables in the current workflow scope. |
condition | string | Yes | The raw discretion condition text (between ** delimiters). |
precedingResults | Record<string, unknown> | Yes | Output from preceding pipeline steps or session results. |
ApprovalTokenStatus
Valid states for an approval token.ApprovalToken
An approval token for human-in-the-loop workflow gates. Tokens are bound to a specific session and workflow. TheworkflowHash 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).
| Property | Type | Required | Description |
|---|---|---|---|
token | string | Yes | UUID v4 generated via CSPRNG (crypto.randomUUID). |
sessionId | string | Yes | The session that generated this token. Token is bound to this session. |
workflowName | string | Yes | The workflow that contains the approval gate. |
gateName | string | Yes | The name label of the specific approval gate. |
workflowHash | string | Yes | SHA-256 hash of the workflow definition text at the time the token was created. Used for TOCTOU protection. |
message | string | Yes | The message displayed to the approver. |
createdAt | string | Yes | ISO 8601 timestamp of token creation. |
expiresAt | string | Yes | ISO 8601 timestamp of token expiration. REQUIRED. Default 24h. |
status | ApprovalTokenStatus | Yes | Current token state. |
approvedBy | string | undefined | No | Identifier of the actor who approved/rejected (informational). |
approvedAt | string | undefined | No | ISO 8601 timestamp of the approval/rejection action. |
usedAt | string | undefined | No | ISO 8601 timestamp of when the token was consumed by the runtime. |
requestedBy | string | Yes | Identifier of the agent/workflow that requested approval. |
TokenValidation
Result of validating an approval token.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | Whether the token is valid and can be consumed. |
reason | "not_found" | "expired" | "wrong_session" | "not_pending" | "hash_mismatch" | undefined | No | If invalid, the reason for rejection. |
token | ApprovalToken | undefined | No | The token object if found. |
JoinStrategy
Join strategy for parallel block execution.SettleResult
Result of a parallel block execution with the settle strategy.| Property | Type | Required | Description |
|---|---|---|---|
successes | { name: string; result: unknown; }[] | Yes | Arms that completed successfully. |
failures | { name: string; error: string; }[] | Yes | Arms that failed. |
ExecutionScope
Variable scope for workflow execution.| Property | Type | Required | Description |
|---|---|---|---|
variables | Record<string, unknown> | Yes | Variable bindings in the current scope. |
parent | ExecutionScope | undefined | No | Parent scope for nested blocks (parallel arms, loops, etc.). |
DiscretionEvaluator
Evaluates a discretion condition and returns a boolean judgment.| Property | Type | Required | Description |
|---|---|---|---|
evaluate | (condition: string, context: DiscretionContext) => Promise<boolean> | Yes | Evaluate whether a discretion condition is met. |
ParallelArm
A single parallel arm to execute.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The arm name (used for binding results to scope). |
execute | () => Promise<unknown> | Yes | The async function that executes the arm’s body. |
ParallelResult
Result of a parallel block execution.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether the parallel block succeeded according to its join strategy. |
results | Record<string, unknown> | Yes | Per-arm results mapped by arm name. |
steps | StepResult[] | Yes | Step results for audit/logging. |
settleResult | SettleResult | undefined | No | Settle-mode detailed breakdown (only for settle strategy). |
WorkflowExecutorConfig
Configuration options for the workflow executor.| Property | Type | Required | Description |
|---|---|---|---|
maxDiscretionEvaluations | number | undefined | No | Maximum number of discretion evaluations per workflow run (default: 100). |
sessionId | string | undefined | No | The session ID for this execution. |
agentId | string | undefined | No | The agent ID performing the execution. |
ResumablePipeline
Resumable pipeline information returned to callers. T4805 T4798| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID (e.g., T4805) |
pipelineId | string | Yes | Pipeline ID |
currentStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Current stage in the pipeline |
status | "active" | "completed" | "failed" | "cancelled" | "blocked" | "aborted" | Yes | Pipeline status |
startedAt | Date | Yes | When the pipeline started |
updatedAt | Date | Yes | When the pipeline was last updated |
taskTitle | string | Yes | Task title |
stageStatus | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | Current stage status |
stageStartedAt | Date | undefined | No | Stage started at (if active) |
blockReason | string | undefined | No | Block reason if blocked |
previousSessionId | string | undefined | No | Previous session ID if known |
resumePriority | number | Yes | Resume priority (lower = higher priority) |
PipelineContext
Pipeline context for session resume. T4805| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | Task ID |
pipelineId | string | Yes | Pipeline ID |
currentStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Current stage |
stages | StageContext[] | Yes | All stages with their status |
gateResults | GateResultContext[] | Yes | Gate results for current stage |
evidence | EvidenceContext[] | Yes | Evidence linked to current stage |
recentTransitions | TransitionContext[] | Yes | Recent transitions |
task | TaskContext | Yes | Task details |
StageContext
Stage context within a pipeline. T4805| Property | Type | Required | Description |
|---|---|---|---|
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Stage name |
status | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | Stage status |
sequence | number | Yes | Sequence order |
startedAt | Date | undefined | No | When started |
completedAt | Date | undefined | No | When completed |
blockedAt | Date | undefined | No | Block information |
blockReason | string | undefined | No | blockReason |
skippedAt | Date | undefined | No | Skip information |
skipReason | string | undefined | No | skipReason |
notes | string[] | Yes | Stage notes |
metadata | Record<string, unknown> | Yes | Stage metadata |
GateResultContext
Gate result context. T4805 T4804| Property | Type | Required | Description |
|---|---|---|---|
gateName | string | Yes | Gate name |
result | "warn" | "pass" | "fail" | Yes | Result status |
checkedAt | Date | Yes | When checked |
checkedBy | string | Yes | Who checked |
details | string | undefined | No | Details |
reason | string | undefined | No | Reason if failed |
EvidenceContext
Evidence context. T4805 T4804| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Evidence ID |
uri | string | Yes | URI to evidence |
type | "file" | "url" | "manifest" | Yes | Evidence type |
recordedAt | Date | Yes | When recorded |
recordedBy | string | undefined | No | Who recorded |
description | string | undefined | No | Description |
TransitionContext
Transition context. T4805| Property | Type | Required | Description |
|---|---|---|---|
fromStage | string | Yes | From stage |
toStage | string | Yes | To stage |
transitionedAt | Date | Yes | When transitioned |
transitionedBy | string | Yes | Who initiated |
reason | string | undefined | No | Reason |
TaskContext
Task context. T4805| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Task ID |
title | string | Yes | Task title |
description | string | undefined | No | Task description |
status | string | Yes | Task status |
priority | string | Yes | Task priority |
parentId | string | undefined | No | Parent task ID |
ResumeResult
Result of a resume operation. T4805| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | Whether resume was successful |
taskId | string | Yes | Task ID |
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Stage resumed |
previousStatus | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | Previous status |
newStatus | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | New status |
resumedAt | Date | Yes | Resume timestamp |
message | string | Yes | Message for user |
warnings | string[] | Yes | Any warnings |
AutoResumeResult
Auto-resume detection result. T4805| Property | Type | Required | Description |
|---|---|---|---|
canResume | boolean | Yes | Whether auto-resume is possible |
taskId | string | undefined | No | Task ID to resume |
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefined | No | Stage to resume |
context | PipelineContext | undefined | No | Pipeline context if available |
options | ResumablePipeline[] | undefined | No | Resume options if multiple |
recommendation | "none" | "resume" | "choose" | Yes | Recommended action |
message | string | Yes | Message for user |
FindResumableOptions
Options for finding resumable pipelines. T4805| Property | Type | Required | Description |
|---|---|---|---|
taskIds | string[] | undefined | No | Filter by specific task IDs |
stages | ("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | undefined | No | Filter by stages |
includeBlocked | boolean | undefined | No | Include blocked pipelines |
includeAborted | boolean | undefined | No | Include aborted pipelines |
limit | number | undefined | No | Maximum results |
minPriority | "high" | "medium" | "low" | "critical" | undefined | No | Minimum priority (tasks with priority = this) |
SessionResumeCheckOptions
Options for session start with resume check. T4805| Property | Type | Required | Description |
|---|---|---|---|
autoResume | boolean | undefined | No | Whether to auto-resume if only one candidate |
scope | { type: "epic" | "global"; epicId?: string; } | undefined | No | Scope to filter resumable pipelines |
minPriority | "high" | "medium" | "low" | "critical" | undefined | No | Minimum priority to consider |
includeBlocked | boolean | undefined | No | Whether to include blocked pipelines |
SessionResumeCheckResult
Result of session resume check. T4805| Property | Type | Required | Description |
|---|---|---|---|
didResume | boolean | Yes | Whether resume was performed |
resumedTaskId | string | undefined | No | Resumed task ID if auto-resumed |
resumedStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | undefined | No | Resumed stage if auto-resumed |
options | ResumablePipeline[] | undefined | No | Available resume options if not auto-resumed |
message | string | Yes | Message for user |
requiresUserChoice | boolean | Yes | Whether user action is required |
PrereqCheck
Prerequisite check result. T4800| Property | Type | Required | Description |
|---|---|---|---|
met | boolean | Yes | Whether all prerequisites are met |
prerequisites | ("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | Yes | List of prerequisite stages |
completed | ("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | Yes | Stages that are completed or skipped |
pending | ("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | Yes | Stages that are pending or blocked |
failed | ("research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release")[] | Yes | Stages that failed |
blockers | { stage: Stage; reason: string; severity: "error" | "warning" | "info"; }[] | Yes | Blocking issues preventing progression |
canForce | boolean | Yes | Whether the check can be overridden with force |
summary | string | Yes | Human-readable summary |
TransitionValidation
Transition validation result. T4800| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | Whether the transition is valid |
from | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Source stage |
to | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | Target stage |
prerequisitesMet | boolean | Yes | Whether prerequisites are met |
ruleAllowed | boolean | Yes | Whether the transition rule allows it |
requiresForce | boolean | Yes | Whether force is required |
errors | string[] | Yes | List of validation errors |
warnings | string[] | Yes | List of warnings |
prereqCheck | PrereqCheck | undefined | No | Prerequisite check details |
StageState
Stage state snapshot for state machine. T4800| Property | Type | Required | Description |
|---|---|---|---|
stage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | stage |
status | "completed" | "failed" | "blocked" | "not_started" | "in_progress" | "skipped" | Yes | status |
startedAt | Date | undefined | No | startedAt |
completedAt | Date | undefined | No | completedAt |
assignedAgent | string | undefined | No | assignedAgent |
notes | string | undefined | No | notes |
StateMachineContext
State machine context for a pipeline. T4800| Property | Type | Required | Description |
|---|---|---|---|
pipelineId | string | Yes | pipelineId |
currentStage | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | currentStage |
stages | Record<"research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release", StageState> | Yes | stages |
transitionCount | number | Yes | transitionCount |
version | number | Yes | version |
StateTransition
State transition request. T4800| Property | Type | Required | Description |
|---|---|---|---|
from | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | from |
to | "research" | "consensus" | "architecture_decision" | "specification" | "decomposition" | "implementation" | "validation" | "testing" | "release" | Yes | to |
reason | string | undefined | No | reason |
initiatedBy | string | Yes | initiatedBy |
force | boolean | undefined | No | force |
skipValidation | boolean | undefined | No | skipValidation |
StateTransitionResult
State transition result. T4800| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
transition | StateTransition | Yes | transition |
previousState | StageState | Yes | previousState |
newState | StageState | Yes | newState |
context | StateMachineContext | Yes | context |
timestamp | Date | Yes | timestamp |
errors | string[] | undefined | No | errors |
ContextWindowInput
Context window input from Claude Code.| Property | Type | Required | Description |
|---|---|---|---|
context_window | { context_window_size?: number; current_usage?: { input_tokens?: number; output_tokens?: number; cache_creation_input_tokens?: number; cache_read_input_tokens?: number; }; } | No | context_window |
ContextStatus
Context status derived from input.HITLLevel
HITL warning level.HITLWarning
HITL warning entry.| Property | Type | Required | Description |
|---|---|---|---|
level | "INFO" | "WARN" | "BLOCK" | Yes | level |
type | string | Yes | type |
message | string | Yes | message |
details | unknown | Yes | details |
action | string | Yes | action |
HITLWarningsResult
HITL warnings result.| Property | Type | Required | Description |
|---|---|---|---|
enabled | boolean | Yes | enabled |
level | HITLLevel | Yes | level |
requiresHuman | boolean | Yes | requiresHuman |
warnings | HITLWarning[] | Yes | warnings |
activeLocks | LockInfo[] | Yes | activeLocks |
summary | { total: number; byLevel: { block: number; warn: number; info: number; }; } | null | Yes | summary |
StatuslineStatus
Statusline integration status.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().| Property | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | Domain name (e.g. ‘tasks’, ‘memory’, ‘session’) |
operation | string | Yes | Operation name (e.g. ‘show’, ‘find’) |
preferredChannel | "cli" | "either" | Yes | Preferred channel for token efficiency |
reason | string | Yes | Reason for the channel preference |
ProviderContext
Provider capability context for dynamic skill generation.| Property | Type | Required | Description |
|---|---|---|---|
providerId | string | Yes | providerId |
providerName | string | Yes | providerName |
supportsMcp | boolean | Yes | Always false. CLI dispatch only. |
supportsHooks | boolean | Yes | supportsHooks |
supportsSpawn | boolean | Yes | supportsSpawn |
instructionFilePattern | string | undefined | No | instructionFilePattern |
IndexMap
Cache index mapping labels/phases to task IDs.ImportPackageMeta
Import package metadata extracted from the export file.| Property | Type | Required | Description |
|---|---|---|---|
sourceFile | string | Yes | sourceFile |
sourceProject | string | Yes | sourceProject |
exportedAt | string | Yes | exportedAt |
packageChecksum | string | Yes | packageChecksum |
taskCount | number | Yes | taskCount |
ImportConflictType
Import conflict types.ImportConflictResolution
Import conflict resolution strategies.ImportOptions
Import options for logging context.| Property | Type | Required | Description |
|---|---|---|---|
parent | string | undefined | No | parent |
phase | string | undefined | No | phase |
resetStatus | boolean | undefined | No | resetStatus |
SortableTask
Minimal task shape needed for topological sorting.| Property | Type | Required | Description |
|---|---|---|---|
id | string | Yes | id |
parentId | string | null | undefined | No | parentId |
depends | string[] | undefined | No | depends |
PipelineStageTaskRow
Row shape for pipeline + stage + task JOIN.| Property | Type | Required | Description |
|---|---|---|---|
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; } | Yes | pipeline |
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; } | Yes | stage |
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; } | Yes | task |
PipelineStageRow
Row shape for pipeline + stage JOIN.| Property | Type | Required | Description |
|---|---|---|---|
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; } | Yes | pipeline |
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; } | Yes | stageRecord |
InsertProjectRegistry
SelectProjectRegistry
InsertNexusAuditLog
SelectNexusAuditLog
InsertNexusSchemaMeta
SelectNexusSchemaMeta
AtomicityResult
| Property | Type | Required | Description |
|---|---|---|---|
score | number | Yes | score |
passed | boolean | Yes | passed |
violations | string[] | Yes | violations |
AtomicityCriterion
RelatesType
Valid relationship types for relates entries.RelatesEntry
A single relates entry.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
type | RelatesType | Yes | type |
reason | string | undefined | No | reason |
Severity
Impact severity levels.DeleteWarning
An impact warning.| Property | Type | Required | Description |
|---|---|---|---|
severity | Severity | Yes | severity |
code | string | Yes | code |
message | string | Yes | message |
AffectedTasks
Affected tasks info.| Property | Type | Required | Description |
|---|---|---|---|
primary | Pick<Task, "id" | "status" | "title" | "type" | "parentId" | "labels"> | null | Yes | primary |
children | Pick<Task, "id" | "status" | "title" | "type" | "parentId" | "labels">[] | Yes | children |
totalCount | number | Yes | totalCount |
error | string | undefined | No | error |
DeleteImpact
Impact analysis.| Property | Type | Required | Description |
|---|---|---|---|
pendingLost | number | Yes | pendingLost |
activeLost | number | Yes | activeLost |
blockedLost | number | Yes | blockedLost |
doneLost | number | Yes | doneLost |
dependentsAffected | string[] | Yes | dependentsAffected |
DeletePreview
Full preview result.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
dryRun | true | Yes | dryRun |
wouldDelete | AffectedTasks | undefined | No | wouldDelete |
impact | DeleteImpact | undefined | No | impact |
warnings | DeleteWarning[] | undefined | No | warnings |
warningCount | number | undefined | No | warningCount |
strategy | string | undefined | No | strategy |
reason | string | null | undefined | No | reason |
timestamp | string | undefined | No | timestamp |
error | { code: string; message: string; suggestion?: string; childCount?: number; } | undefined | No | error |
ChildStrategy
Valid child handling strategies.StrategyResult
Result from a strategy handler.| Property | Type | Required | Description |
|---|---|---|---|
success | boolean | Yes | success |
strategy | ChildStrategy | Yes | strategy |
taskId | string | Yes | taskId |
affectedTasks | string[] | Yes | affectedTasks |
affectedCount | number | undefined | No | affectedCount |
message | string | Yes | message |
error | { code: string; message: string; childCount?: number; childIds?: string[]; suggestion?: string; } | undefined | No | error |
DiscoveryMethod
Discovery method.DiscoveryMatch
A single discovery match.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
type | RelatesType | Yes | type |
reason | string | Yes | reason |
score | number | Yes | score |
_hierarchyBoost | number | undefined | No | _hierarchyBoost |
_relationship | string | undefined | No | _relationship |
PhaseProgress
Phase progress information.| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | name |
status | PhaseStatus | Yes | status |
total | number | Yes | total |
done | number | Yes | done |
active | number | Yes | active |
pending | number | Yes | pending |
blocked | number | Yes | blocked |
percentComplete | number | Yes | percentComplete |
PhaseTransitionValidation
Validate a phase transition.| Property | Type | Required | Description |
|---|---|---|---|
valid | boolean | Yes | valid |
error | string | undefined | No | error |
StalenessThresholds
Staleness thresholds in days.| Property | Type | Required | Description |
|---|---|---|---|
stale | number | Yes | Days before a task is considered stale. |
critical | number | Yes | Days before a task is critically stale. |
abandoned | number | Yes | Days before a task is considered abandoned. |
StalenessLevel
Staleness classification.StalenessInfo
Staleness assessment for a single task.| Property | Type | Required | Description |
|---|---|---|---|
taskId | string | Yes | taskId |
level | StalenessLevel | Yes | level |
daysSinceUpdate | number | Yes | daysSinceUpdate |
lastActivity | string | Yes | lastActivity |
StalenessSummary
Get staleness summary statistics.| Property | Type | Required | Description |
|---|---|---|---|
total | number | Yes | total |
fresh | number | Yes | fresh |
stale | number | Yes | stale |
critical | number | Yes | critical |
abandoned | number | Yes | abandoned |