emptyState
emptyState(
projectName?):object
Defined in: types/src/state.ts:107
Parameters
Section titled “Parameters”projectName?
Section titled “projectName?”string = 'unnamed'
Returns
Section titled “Returns”activeDraft
Section titled “activeDraft”activeDraft:
string|null
activePhase
Section titled “activePhase”activePhase:
string|null
activeSpec
Section titled “activeSpec”activeSpec:
string|null
Active <id>-SPEC.md while loopPosition==='SPEC'; null otherwise.
activeTask
Section titled “activeTask”activeTask: {
id:string;status:"PENDING"|"IN_PROGRESS"|"DONE"|"DONE_WITH_CONCERNS"|"NEEDS_CONTEXT"|"BLOCKED";touchedFiles:string[]; } |null
decisions
Section titled “decisions”decisions:
object[]
deferred
Section titled “deferred”deferred:
object[]
draftReadAt
Section titled “draftReadAt”draftReadAt:
string|null
ISO8601 timestamp of the most recent successful cadence draft approve.
The DRAFT-read mtime gate (Phase 23.1) refuses settle when the DRAFT.md
file’s mtime is newer than this — the human edited the draft after
approving. null means no approve has happened yet (gate silently passes).
loopPosition
Section titled “loopPosition”loopPosition:
"SPEC"|"DRAFT"|"BUILD"|"SETTLE"|"IDLE"=LoopPositionZ
openDrafts
Section titled “openDrafts”openDrafts:
object[]
project
Section titled “project”project:
object
project.createdAt
Section titled “project.createdAt”createdAt:
string
project.name
Section titled “project.name”name:
string
revision
Section titled “revision”revision:
number
Optimistic-concurrency counter (Phase 173). Bumped by exactly 1 on every
successful SimpleStateBackend.commit(). A caller’s in-memory state
carries the revision it was read at; commit() refuses when the
on-disk revision has since moved, rather than silently overwriting a
concurrent writer’s change. .default(0) keeps pre-Phase-173
state.json files parsing unchanged.
schemaVersion
Section titled “schemaVersion”schemaVersion:
1
session
Section titled “session”session:
object
session.lastHandoff
Section titled “session.lastHandoff”lastHandoff:
string|null
session.subagentBaselines
Section titled “session.subagentBaselines”subagentBaselines:
Record<string, {startedAt:string;taskStatuses:Record<string,string>;touchedFiles:string[]; }>
Per-subagent baseline snapshot (subagent task-redundancy monitoring).
Keyed by the Claude Code agentId from the SubagentStart hook.
taskStatuses is a snapshot of every DRAFT task’s status at the
moment this subagent began (baseline-at-start, not current-at-stop —
fairer to the subagent; see the design doc’s “SubagentStop: safety
net” section). touchedFiles accumulates via PostToolUse for the
duration of this subagent’s run. Entries are ephemeral — created at
SubagentStart, deleted at the matching SubagentStop; an orphaned entry
from a crash/interrupt is harmless (never compared against again).
session.subagentSpawns
Section titled “session.subagentSpawns”subagentSpawns:
number
session.tokenUtilization
Section titled “session.tokenUtilization”tokenUtilization:
number
skillAudit
Section titled “skillAudit”skillAudit:
object
skillAudit.invoked
Section titled “skillAudit.invoked”invoked:
string[]
skillAudit.required
Section titled “skillAudit.required”required:
string[]
tier:
"standard"|"complex"|"quick-fix"|null