Skip to content
Sign in

deepwork

Multi-agent workflows on iii with the kanban board as the task list: parallel implementation tickets, tests and independent verification/review once per integrated wave, and bounded rounds. Code goals get a dev flow: autonomous reversible decisions with optional design/plan approval, tickets in isolated git worktrees, batch validation, a branch review and a kept branch unless you explicitly choose another finish.

Install0.4.2

# With the iii engine running

iii call directory::download-kit kit=iii/deepwork@0.4.2
469Installs
41Last 7 days
0Today
30 days

Exact versions are immutable. Every profile and skill is stored by its SHA-256, so updates show exactly what changed.

Deepwork

deepwork
agents/deepwork.md

Runs a goal as kanban tickets: plans them as subtasks of one run ticket, gives each ticket a lead that runs it through its phases with its own sub-agents, fans the leads out in bounded waves and in through one state barrier per wave, and loops in bounded rounds until done, dry, stalled, out of rounds or over budget. A code goal gets the dev flow: an approved design and plan, test-first tickets each in its own git worktree with one commit, landed on the run branch once verified and reviewed, a branch review, and a finish you choose.

Model
Inherited
Effort
high
Extends
iiibuilt-in
Icon
agent
Color
purple
Visibility
Listed
Composer placeholder
“Goal. Optional args: max_rounds=3 concurrency=8 attempts=2 flow=auto approve=on plan_only=off isolation=ticket synthesize=on judges= deadline_min=20 critic=on budget_usd= project= resume=”
Preloaded skills0

No skills preloaded.

Preloaded functions25
  • harness::spawnharnessv1.11.7Schema

    Spawn a sub-agent in a child session (never an observer target) and return { child_session_id, child_turn_id } immediately; the child's outcome reaches you only through whatever destination its task names. Arm a wake on that destination (e.g. `harness::observe` on `state::on-changed`) BEFORE spawning, then end your turn once every child is spawned. `harness::status` gives child health; a child transcript read while its status is running is partial. Children are leaves unless options.orchestrator is true.

    request
    • agentstring

      Directory agent profile id (`directory::agents::*`) supplying the child's prompt, skills, model, and display; refused with `options.system_prompt`. Omitted, an in-turn spawn continues the parent turn's profile (name `options.system_prompt` for a child that needs a different identity).

    • displayany of

      Display-only name/icon/color for the child session; never affects ids, policy, or routing.

      any of (2)
      Variant 1
      • colorany of
        Show 2 nested
        any of (2)
        Variant 1
        valuestringenum neutral, blue, purple, teal, green, amber, …
        Variant 2
        valuenull
      • iconany of
        Show 2 nested
        any of (2)
        Variant 1
        valuestringenum agent, code, search, terminal, database, test, …
        Variant 2
        valuenull
      • namestringrequiredmin 1 chars

        Short functional name such as `Frontend`; trimmed, and cut to its first 48 characters when longer.

      Variant 2
      valuenull
    • modelstring
    • optionsany of
      any of (2)
      Variant 1
      • filesystem_rootstring

        Absolute filesystem root for the child turn; omit to inherit the parent's (a reused child keeps its own).

      • functionsany of

        Dispatch policy for the child, intersected with the parent's (narrow, never escalate).

        Show 2 nested
        any of (2)
        Variant 1
        • allowstring[]
        • denystring[]
        • exposeall of
          Show 1 nested
          all of (1)
          Variant 1
          valuestringenum agent_call, native
        Variant 2
        valuenull
      • max_childreninteger· uint32min 0

        Fan-out guard for the child's own spawns.

      • max_output_tokensinteger· uint64min 0

        Inherits the parent's ceiling unless explicitly narrowed/overridden.

      • max_turnsinteger· uint32min 0

        Turn cap for the child, capped at the parent's remaining budget; omit unless required (small values strand the child).

      • max_validation_retriesinteger· uint32min 0

        Override of the child's validation-retry budget.

      • orchestratorboolean

        Let the child spawn, send, and remove observers (still capped by the parent's policy); default false makes it a leaf.

      • outputany of

        The child's deliverable: text / json / json+schema.

        Show 2 nested
        any of (2)
        Variant 1
        one of (2)
        Variant 1
        • typestringrequiredenum text
        Variant 2
        • schemaunknown
        • typestringrequiredenum json
        Variant 2
        valuenull
      • skillsstring[]

        Exact skill ids advertised to the child; omitted or empty means all (a reused child inherits when omitted).

      • system_promptstring
      • system_prompt_strategyall of

        How `system_prompt` combines with the built-in prompt.

        Show 1 nested
        all of (1)
        Variant 1
        one of (3)
        Variant 1
        valuestringenum override
        Variant 2
        valuestringenum enrich
        Variant 3
        valuestringenum disabled
      • thinking_levelany of
        Show 2 nested
        any of (2)
        Variant 1
        one of (2)
        Variant 1
        valuestringenum minimal, low, medium, high, xhigh
        Variant 2
        valuestringenum off
        Variant 2
        valuenull
      Variant 2
      valuenull
    • parent_session_idstring

      Display-only parent for the console tree when there is no live parent turn; grants no policy inheritance.

    • providerstring
    • session_idstring

      Session id to spawn into, created if absent; an existing id may be reused only inside the caller's own tree.

    • taskstringrequired

      The child's self-contained goal, its opening user message; name every required resource selector literally (the child cannot infer them).

    response
    • child_session_idstringrequired
    • child_turn_idstringrequired
    • reusedboolean

      The named session already existed and was reused — its prior transcript and parent linkage were retained (only possible with an explicit `session_id`).

  • harness::statusharnessv1.11.7Schema

    Read a session's current turn. Returns a lean summary by default; pass verbose: true for the full runtime report and untruncated result.

    request
    • session_idstringrequired
    • verboseboolean

      Include the full runtime report and unmodified result.

    response
    any of (2)
    Variant 1
    • accountany of

      The Claude Code account the turn runs on and why (`claude-code` turns, chat-projects phase 4). Verbose only.

      any of (2)
      Variant 1
      • idstringrequired

        The tmux account id.

      • sourceone ofrequired

        Why a turn runs on its account (contract D).

        Show 3 nested
        one of (3)
        Variant 1
        valuestringenum session
        Variant 2
        valuestringenum project
        Variant 3
        valuestringenum global
      Variant 2
      valuenull
    • armed_wakesobject[]

      WHAT the session is parked on, when `expects_wake`: each armed wake's watch and deadline, so "parked 12m on state operation_meta/status — never written" is readable from the outside instead of the session just looking quietly done.

      • argsunknown
      • created_atinteger· int64required
      • expires_atinteger· int64
      • filtersunknown
      • function_idstring

        The observed function and the observer's args and filters. Absent on records without a source.

      • observer_idstringrequired
    • childrenobject[]required
      • function_call_idstringrequired
      • session_idstringrequired
      • turn_idstringrequired
    • contextany of

      The last generate step's context accounting (budget, categories, provider-exact usage once it lands) — what a UI meter should show instead of re-estimating the transcript. Verbose only; absent before the first generate.

      any of (2)
      Variant 1
      • autocompactany of

        The autocompact threshold the meters mark (chat-projects phase 3): the setting this step followed, where the end of a turn compacts and the inline budget context-manager applied. Absent from a harness that predates it.

        Show 2 nested
        any of (2)
        Variant 1
        • cap_tokensinteger· uint64min 0

          The budget inside a turn, `setting + max(10 %, 20k)`; `null` without a setting. context-manager compacts inline at `min(usable, cap)`.

        • effective_tokensinteger· uint64min 0

          Where the conversation compacts at the end of a turn: the setting when it is below `usable`; `null` when the model's own limit applies.

        • ruleany of

          The level that decided; `null` when none was resolved.

          Show 2 nested
          any of (2)
          Variant 1
          • project_idstring
          • project_namestring

            The project's name when the rule was read.

          • scopeone ofrequired

            Which level's setting applies.

            Show 2 nested
            one of (2)
            Variant 1
            valuestringenum global, project
            Variant 2
            valuestringenum session
          Variant 2
          valuenull
        • setting_tokensinteger· uint64min 0

          The resolved setting; `null` for off.

        Variant 2
        valuenull
      • categoriesobjectrequired

        Where the request's tokens sit. Categories are assembly-time estimates; `hook_guidance` is the measured growth after assembly (pre-generate hook appends and orphan-repair patches), 0 when the request left assembly unchanged.

        Show 6 nested
        • hook_guidanceinteger· uint64min 0
        • messagesobjectrequired

          Estimated tokens of the assembled window's messages, by role.

          Show 4 nested
          • assistantinteger· uint64requiredmin 0
          • custominteger· uint64requiredmin 0
          • function_resultinteger· uint64requiredmin 0
          • userinteger· uint64requiredmin 0
        • overheadinteger· uint64requiredmin 0

          Provider framing plus response_format / provider_options fields.

        • skillsinteger· uint64min 0

          Selected skill bodies contained in the system prompt.

        • system_promptinteger· uint64requiredmin 0

          Final assembled system prompt excluding tokens attributed to `skills`: identity, per-step aids, and any compaction summary section.

        • toolsinteger· uint64requiredmin 0

          Function schemas exposed to the model.

      • compactedbooleanrequired

        The context carries a conversation summary: compacted on this step, or anchored on an earlier compaction entry (a previous step, the console's `/compact`). The summary's tokens count in `system_prompt`.

      • effective_max_output_tokensinteger· uint64requiredmin 0

        Output allocation `usable` was derived against.

      • estimatorstring

        Which estimator produced the numbers (`heuristic` until the context-manager resolves a real tokenizer). Absent when the context-manager predates the breakdown response.

      • freeinteger· uint64requiredmin 0
      • modelstringrequired
      • prefix_divergencesobject[]

        Already-sent rows this session's requests rewrote, newest last (at most [`MAX_PREFIX_DIVERGENCES`]), carried from step to step.

        Show 9 nested
        • cache_readinteger· uint64min 0

          `usage.cache_read` of the rewriting request: what the provider still reused.

        • call_idstring
        • causestring

          What rewrote the row, as far as the harness can tell: `prune` (context-manager pruned or reduced function results to fit the budget that step) or `system_prompt` (row 0: a compaction summary or a prompt change).

        • indexinteger· uint64min 0

          First row (0 = system prompt, then one per message) that differs from the session's previous request. Absent when only the provider's wire mapping changed.

        • prev_leninteger· uint64min 0

          Rows the previous request carried.

        • provider_notestring

          The provider's own wire-level finding, cause included, when it reported one (a final-message warning starting with [`PROVIDER_PREFIX_NOTE`]).

        • rolestring
        • stepinteger· uint64requiredmin 0
        • turn_idstringrequired
      • prompt_sections_fallbackstring

        Why no shared prefix went out: `disabled` (config), `no_stable_prefix` (empty identity prompt) or `prefix_rewritten` (a pre_generate hook replaced the prompt head; its prompt still wins, it just shares nothing).

      • prompt_surface_digeststring

        Identity of the shared prompt prefix this generation went out with (`sha256:` of the stable section) — present only when the request carried `system_sections`. A local identity, never a provider hit; `usage.cache_read` is the reuse signal.

      • providerstring
      • session_cost_usdnumber· double

        Running cost of the whole session in USD, accumulated across every generation step. `usage.cost_usd` is one step's bill — on providers with steep cache discounts the per-step number swings two orders of magnitude, so a chip showing it alone reads as a bouncing total.

      • session_idstringrequired
      • stepinteger· uint64requiredmin 0
      • summarized_head_tokensinteger· uint64min 0

        Size of the history that summary replaced.

      • timestampinteger· int64required
      • totalinteger· uint64requiredmin 0

        Final request estimate: categories plus post-assembly growth.

      • turn_idstringrequired
      • usableinteger· uint64requiredmin 0

        The input budget the window was fit into.

      • usageany of

        Actual provider usage for this generation, stamped after the terminal frame; absent when the provider returned none (or the generation never completed).

        Show 2 nested
        any of (2)
        Variant 1
        • cache_readinteger· uint64min 0
        • cache_writeinteger· uint64min 0
        • cost_usdnumber· double
        • inputinteger· uint64min 0
        • outputinteger· uint64min 0
        • reasoninginteger· uint64min 0
        Variant 2
        valuenull
      Variant 2
      valuenull
    • depthinteger· uint32min 0
    • expects_wakeboolean

      The session owns an armed wake (a one-shot notify subscription, claimed or not, until its delivery has seeded the woken turn), or its finished turn drained a queued message and is about to be reseeded: a completed turn here is NOT the run's outcome — a later turn in this session carries it. Mirrors the `terminal` flag on `harness::on-turn-completed` (`expects_wake == !terminal`). Pollers (e.g. workflow reconcile) must treat `completed && expects_wake` as still running.

    • failureany of

      Why a `failed` turn failed: `code`, and `retryable` when the failure is temporary, so a later send into this session may succeed. Present in the lean report too, only on a failed turn; its `details` (a usage limit's window, reset and account) are verbose only.

      any of (2)
      Variant 1
      • codestringrequired

        The failure code, e.g. `router/provider_transient` or `harness.turn_internal`.

      • detailsany of

        What the code alone does not say: for `llm.usage_limit`, the limit's window and reset and the account that hit it; for `harness.unknown_account`, the account that is gone.

        Show 2 nested
        any of (2)
        Variant 1
        • accountstring

          The tmux account id the turn ran on, or was pinned to.

        • resets_at_msinteger· uint64min 0

          When the limit's window resets, in unix milliseconds.

        • usage_limitboolean

          The Claude Code account reached its plan's usage limit.

        • windowstring

          The limit's window: `five_hour` or `week`.

        Variant 2
        valuenull
      • retryablebooleanrequired

        The failure is temporary, so a later send into the session may succeed: a provider outage, rate limit or cut stream that outlasted the turn's `max_transient_resumes` consecutive recovery generations, or a turn the harness could not schedule.

      Variant 2
      valuenull
    • max_transient_resumesinteger· uint32min 0

      The resumes allowed per run of consecutive retryable failures: a successful generation starts a fresh run. Verbose only.

    • max_turnsinteger· uint32min 0
    • max_validation_retriesinteger· uint32min 0
    • open_asksinteger· uintmin 0
    • partial_result_availableboolean
    • pending_function_callsstring[]
    • queuedobject[]

      Messages queued while a step streams, in arrival order; they land in the transcript when the stream ends.

      • channelany of

        How the message reached the session: `direct` is a person (or a client acting as one), `notification` an observer or system notice, `invoked-agent` a sub-agent's opening task. Absent on rows parked by a harness that predates the field. The console hides every row that is not `direct` from the person's queued-messages strip.

        Show 2 nested
        any of (2)
        Variant 1
        valuestringenum direct, invoked-agent, notification
        Variant 2
        valuenull
      • entry_idstringrequired

        Deterministic transcript entry id the drain appends under, so a redelivered drain is a no-op.

      • idstringrequired
      • messageany ofrequired

        The canonical transcript message union. Untagged: the single-variant role tags disambiguate deserialization (assistant/function_result/custom are tried before user so their required fields gate the match).

        Show 4 nested
        any of (4)
        Variant 1
        • contentone of[]required
          Show 7 nested
          one of (7)
          Variant 1
          • textstringrequired
          • typestringrequiredenum text
          Variant 2
          • attachment_idstring

            Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.

          • datastringrequired
          • mimestringrequired
          • typestringrequiredenum image
          Variant 3
          • attachment_idstringrequired
          • mimestringrequired
          • namestringrequired
          • sizeinteger· uint64requiredmin 0
          • typestringrequiredenum file
          Variant 4
          • signaturestring
          • textstringrequired
          • typestringrequiredenum thinking
          Variant 5
          • datastringrequired
          • typestringrequiredenum redacted_thinking
          Variant 6
          • argumentsunknownrequired
          • function_idstringrequired
          • idstringrequired
          • typestringrequiredenum function_call
          Variant 7
          • contentunknown[]required
          • function_call_idstringrequired
          • is_errorboolean
          • typestringrequiredenum function_result
        • error_detailsany of

          What a `rate_limited` error says beyond its kind (D147): a Claude Code account's usage limit, its window and its reset. Absent on any other message; a reader that predates it ignores the field.

          Show 2 nested
          any of (2)
          Variant 1
          • resets_at_msinteger· uint64min 0

            When the window resets, in unix milliseconds.

          • usage_limitboolean

            The account reached its plan's usage limit: retrying before the reset cannot succeed.

          • windowstring

            The limit's window: `five_hour` or `week`.

          Variant 2
          valuenull
        • error_kindany of
          Show 2 nested
          any of (2)
          Variant 1
          valuestringenum auth_expired, rate_limited, context_overflow, transient, permanent
          Variant 2
          valuenull
        • error_messagestring
        • modelstringrequired
        • native_stop_reasonstring
        • providerstringrequired
        • rolestringrequiredenum assistant
        • stop_reasonstringrequiredenum end, length, function_call, aborted, error
        • streamingboolean

          The reply is still streaming into the transcript: `stop_reason` is a placeholder until the final write records the real one and the session store clears this flag. A streaming reply whose turn is no longer running (`harness::status`) was abandoned mid-stream.

        • timestampinteger· int64required
        • usageany of
          Show 2 nested
          any of (2)
          Variant 1
          • cache_readinteger· uint64min 0
          • cache_writeinteger· uint64min 0
          • cost_usdnumber· double
          • inputinteger· uint64min 0
          • outputinteger· uint64min 0
          • reasoninginteger· uint64min 0
          Variant 2
          valuenull
        • warningsstring[]
        Variant 2
        • contentone of[]required
          Show 7 nested
          one of (7)
          Variant 1
          • textstringrequired
          • typestringrequiredenum text
          Variant 2
          • attachment_idstring

            Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.

          • datastringrequired
          • mimestringrequired
          • typestringrequiredenum image
          Variant 3
          • attachment_idstringrequired
          • mimestringrequired
          • namestringrequired
          • sizeinteger· uint64requiredmin 0
          • typestringrequiredenum file
          Variant 4
          • signaturestring
          • textstringrequired
          • typestringrequiredenum thinking
          Variant 5
          • datastringrequired
          • typestringrequiredenum redacted_thinking
          Variant 6
          • argumentsunknownrequired
          • function_idstringrequired
          • idstringrequired
          • typestringrequiredenum function_call
          Variant 7
          • contentunknown[]required
          • function_call_idstringrequired
          • is_errorboolean
          • typestringrequiredenum function_result
        • detailsunknownrequired
        • function_call_idstringrequired
        • function_idstringrequired
        • is_errorbooleanrequired
        • rolestringrequiredenum function_result
        • timestampinteger· int64required
        Variant 3
        • contentone of[]required
          Show 7 nested
          one of (7)
          Variant 1
          • textstringrequired
          • typestringrequiredenum text
          Variant 2
          • attachment_idstring

            Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.

          • datastringrequired
          • mimestringrequired
          • typestringrequiredenum image
          Variant 3
          • attachment_idstringrequired
          • mimestringrequired
          • namestringrequired
          • sizeinteger· uint64requiredmin 0
          • typestringrequiredenum file
          Variant 4
          • signaturestring
          • textstringrequired
          • typestringrequiredenum thinking
          Variant 5
          • datastringrequired
          • typestringrequiredenum redacted_thinking
          Variant 6
          • argumentsunknownrequired
          • function_idstringrequired
          • idstringrequired
          • typestringrequiredenum function_call
          Variant 7
          • contentunknown[]required
          • function_call_idstringrequired
          • is_errorboolean
          • typestringrequiredenum function_result
        • custom_typestringrequired
        • detailsunknown
        • displaystring
        • rolestringrequiredenum custom
        • timestampinteger· int64required
        Variant 4
        • contentone of[]required
          Show 7 nested
          one of (7)
          Variant 1
          • textstringrequired
          • typestringrequiredenum text
          Variant 2
          • attachment_idstring

            Optional link to the stored original of this inline image (`session::put-attachment`, resolvable with `session::get-attachment`). Lets readers ask `session::messages { include_image_data: false }` and fetch the bytes lazily instead of receiving them inline. Persisted verbatim on the transcript; model-bound consumers never see it (see [`ContentBlock::strip_files`]). Omitted on the wire when absent so legacy transcripts stay byte-identical.

          • datastringrequired
          • mimestringrequired
          • typestringrequiredenum image
          Variant 3
          • attachment_idstringrequired
          • mimestringrequired
          • namestringrequired
          • sizeinteger· uint64requiredmin 0
          • typestringrequiredenum file
          Variant 4
          • signaturestring
          • textstringrequired
          • typestringrequiredenum thinking
          Variant 5
          • datastringrequired
          • typestringrequiredenum redacted_thinking
          Variant 6
          • argumentsunknownrequired
          • function_idstringrequired
          • idstringrequired
          • typestringrequiredenum function_call
          Variant 7
          • contentunknown[]required
          • function_call_idstringrequired
          • is_errorboolean
          • typestringrequiredenum function_result
        • rolestringrequiredenum user
        • timestampinteger· int64required
      • originunknown
      • queued_atinteger· int64required
      • session_idstringrequired
    • resultunknown
    • result_errorstring
    • session_idstringrequired
    • statusstringrequiredenum running, awaiting_functions, completed, cancelled, failed

      The coarse, harness-internal turn lifecycle (harness.md § API Reference). Finer-grained than the session's `status`, which the loop derives from it.

    • stepinteger· uint64requiredmin 0
    • stop_reasonstring

      Why a `completed` turn stopped when the model did not end it itself (`max_turns`). Present in the lean report too: a poller that reads `completed` with no error must still be able to tell an exhausted budget from a finished task.

    • transient_resumesinteger· uint32min 0

      Transient resumes the turn spent in all. Verbose only.

    • turn_countinteger· uint32requiredmin 0
    • turn_idstring
    • validation_retriesinteger· uint32min 0
    Variant 2
    valuenull
  • harness::stopharnessv1.11.7Schema

    Request cancellation of an in-flight turn (cascades to spawned children).

    request
    • quiet_deadlinesboolean

      For a stop that means no more turns: a session parked on a wake has no turn to cancel, so also record the stop on it. That wake's deadline then retires it without starting a turn, and the last one ends the session as cancelled; a delivery still wakes it. Omit to leave a parked session to end on its next wake, its deadline included.

    • session_idstringrequired
    • turn_idstring

      Omit to stop the current turn.

    response
    • stoppingbooleanrequired
  • harness::metricsharnessv1.11.7Schema

    Aggregate durable model usage, function outcomes, and available trace/span observability for the session tree `root_session_id` belongs to (`session_id` is accepted as an alias, and a sub-agent id is resolved to its root). `complete` is true only after every session in the durable tree has reached a terminal turn. Pass `omit_context: true` when you only need the counters and cost: each session's context snapshot is then left out.

    request
    one of (2)
    Variant 1
    Empty object
    Variant 2
    Empty object
    response
    • by_sessionobject[]required
      • by_modelobject[]

        The same counters per model that generated a step, ordered by provider then model. Absent when nothing generated, and from a harness that predates it.

        • cache_read_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • cache_write_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • cost_usdnumber· doublerequired

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • function_callsinteger· uint64requiredmin 0
        • input_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • modelstringrequired
        • output_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • providerstringrequired
        • reasoning_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • turnsinteger· uint64requiredmin 0

          Model steps (assistant messages) this model generated.

        • unreported_generationsinteger· uint64min 0

          Generations stored with no usage at all: a stream cut before the provider reported, a request refused before a provider saw it, or one still streaming. The transcript does not say which, so none counts as zero: while this is non-zero every counter is a lower bound. Absent when zero.

      • cache_read_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • cache_write_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • contextany of

        The session's latest per-generation context snapshot (categories, budget, usage) — absent for sessions that have not generated since snapshots landed.

        any of (2)
        Variant 1
        • autocompactany of

          The autocompact threshold the meters mark (chat-projects phase 3): the setting this step followed, where the end of a turn compacts and the inline budget context-manager applied. Absent from a harness that predates it.

          Show 2 nested
          any of (2)
          Variant 1
          • cap_tokensinteger· uint64min 0

            The budget inside a turn, `setting + max(10 %, 20k)`; `null` without a setting. context-manager compacts inline at `min(usable, cap)`.

          • effective_tokensinteger· uint64min 0

            Where the conversation compacts at the end of a turn: the setting when it is below `usable`; `null` when the model's own limit applies.

          • ruleany of

            The level that decided; `null` when none was resolved.

            Show 2 nested
            any of (2)
            Variant 1
            • project_idstring
            • project_namestring

              The project's name when the rule was read.

            • scopeone ofrequired

              Which level's setting applies.

              Show 2 nested
              one of (2)
              Variant 1
              valuestringenum global, project
              Variant 2
              valuestringenum session
            Variant 2
            valuenull
          • setting_tokensinteger· uint64min 0

            The resolved setting; `null` for off.

          Variant 2
          valuenull
        • categoriesobjectrequired

          Where the request's tokens sit. Categories are assembly-time estimates; `hook_guidance` is the measured growth after assembly (pre-generate hook appends and orphan-repair patches), 0 when the request left assembly unchanged.

          Show 6 nested
          • hook_guidanceinteger· uint64min 0
          • messagesobjectrequired

            Estimated tokens of the assembled window's messages, by role.

            Show 4 nested
            • assistantinteger· uint64requiredmin 0
            • custominteger· uint64requiredmin 0
            • function_resultinteger· uint64requiredmin 0
            • userinteger· uint64requiredmin 0
          • overheadinteger· uint64requiredmin 0

            Provider framing plus response_format / provider_options fields.

          • skillsinteger· uint64min 0

            Selected skill bodies contained in the system prompt.

          • system_promptinteger· uint64requiredmin 0

            Final assembled system prompt excluding tokens attributed to `skills`: identity, per-step aids, and any compaction summary section.

          • toolsinteger· uint64requiredmin 0

            Function schemas exposed to the model.

        • compactedbooleanrequired

          The context carries a conversation summary: compacted on this step, or anchored on an earlier compaction entry (a previous step, the console's `/compact`). The summary's tokens count in `system_prompt`.

        • effective_max_output_tokensinteger· uint64requiredmin 0

          Output allocation `usable` was derived against.

        • estimatorstring

          Which estimator produced the numbers (`heuristic` until the context-manager resolves a real tokenizer). Absent when the context-manager predates the breakdown response.

        • freeinteger· uint64requiredmin 0
        • modelstringrequired
        • prefix_divergencesobject[]

          Already-sent rows this session's requests rewrote, newest last (at most [`MAX_PREFIX_DIVERGENCES`]), carried from step to step.

          Show 9 nested
          • cache_readinteger· uint64min 0

            `usage.cache_read` of the rewriting request: what the provider still reused.

          • call_idstring
          • causestring

            What rewrote the row, as far as the harness can tell: `prune` (context-manager pruned or reduced function results to fit the budget that step) or `system_prompt` (row 0: a compaction summary or a prompt change).

          • indexinteger· uint64min 0

            First row (0 = system prompt, then one per message) that differs from the session's previous request. Absent when only the provider's wire mapping changed.

          • prev_leninteger· uint64min 0

            Rows the previous request carried.

          • provider_notestring

            The provider's own wire-level finding, cause included, when it reported one (a final-message warning starting with [`PROVIDER_PREFIX_NOTE`]).

          • rolestring
          • stepinteger· uint64requiredmin 0
          • turn_idstringrequired
        • prompt_sections_fallbackstring

          Why no shared prefix went out: `disabled` (config), `no_stable_prefix` (empty identity prompt) or `prefix_rewritten` (a pre_generate hook replaced the prompt head; its prompt still wins, it just shares nothing).

        • prompt_surface_digeststring

          Identity of the shared prompt prefix this generation went out with (`sha256:` of the stable section) — present only when the request carried `system_sections`. A local identity, never a provider hit; `usage.cache_read` is the reuse signal.

        • providerstring
        • session_cost_usdnumber· double

          Running cost of the whole session in USD, accumulated across every generation step. `usage.cost_usd` is one step's bill — on providers with steep cache discounts the per-step number swings two orders of magnitude, so a chip showing it alone reads as a bouncing total.

        • session_idstringrequired
        • stepinteger· uint64requiredmin 0
        • summarized_head_tokensinteger· uint64min 0

          Size of the history that summary replaced.

        • timestampinteger· int64required
        • totalinteger· uint64requiredmin 0

          Final request estimate: categories plus post-assembly growth.

        • turn_idstringrequired
        • usableinteger· uint64requiredmin 0

          The input budget the window was fit into.

        • usageany of

          Actual provider usage for this generation, stamped after the terminal frame; absent when the provider returned none (or the generation never completed).

          Show 2 nested
          any of (2)
          Variant 1
          • cache_readinteger· uint64min 0
          • cache_writeinteger· uint64min 0
          • cost_usdnumber· double
          • inputinteger· uint64min 0
          • outputinteger· uint64min 0
          • reasoninginteger· uint64min 0
          Variant 2
          valuenull
        Variant 2
        valuenull
      • cost_usdnumber· doublerequired

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • depthinteger· uint32requiredmin 0
      • function_call_errorsinteger· uint64requiredmin 0
      • function_callsinteger· uint64requiredmin 0
      • input_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • output_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • parent_session_idstring
      • reasoning_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • session_idstringrequired
      • turnsinteger· uint64requiredmin 0
      • unreported_generationsinteger· uint64min 0

        Generations stored with no usage at all: a stream cut before the provider reported, a request refused before a provider saw it, or one still streaming. The transcript does not say which, so none counts as zero: while this is non-zero every counter is a lower bound. Absent when zero.

    • completebooleanrequired
    • root_session_idstringrequired
    • totalsobjectrequired
      • by_modelobject[]

        The same counters per model that generated a step, ordered by provider then model. Absent when nothing generated, and from a harness that predates it.

        • cache_read_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • cache_write_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • cost_usdnumber· doublerequired

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • function_callsinteger· uint64requiredmin 0
        • input_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • modelstringrequired
        • output_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • providerstringrequired
        • reasoning_tokensinteger· uint64requiredmin 0

          Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

        • turnsinteger· uint64requiredmin 0

          Model steps (assistant messages) this model generated.

        • unreported_generationsinteger· uint64min 0

          Generations stored with no usage at all: a stream cut before the provider reported, a request refused before a provider saw it, or one still streaming. The transcript does not say which, so none counts as zero: while this is non-zero every counter is a lower bound. Absent when zero.

      • cache_read_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • cache_write_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • cost_usdnumber· doublerequired

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • function_call_errorsinteger· uint64requiredmin 0
      • function_callsinteger· uint64requiredmin 0
      • input_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • output_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • reasoning_tokensinteger· uint64requiredmin 0

        Summed over the generations that reported usage. One of them may lack this counter and is left out; `null` means none reported it or more than one lacked it — never a measured zero, so the key is always present and a reader can tell the two apart. A generation with no usage at all is counted in `unreported_generations` instead and makes this a lower bound.

      • sessionsinteger· uint64requiredmin 0
      • turnsinteger· uint64requiredmin 0
      • unreported_generationsinteger· uint64min 0

        Generations stored with no usage at all: a stream cut before the provider reported, a request refused before a provider saw it, or one still streaming. The transcript does not say which, so none counts as zero: while this is non-zero every counter is a lower bound. Absent when zero.

    • tracesany of

      Trace/span aggregates when the engine's in-memory observability exporter is available. Usage metrics remain available when it is not.

      any of (2)
      Variant 1
      • by_sessionobject[]required
        Show 7 nested
        • depthinteger· uint32requiredmin 0
        • duration_msinteger· uint64requiredmin 0

          Elapsed window from the session's first observed span to its last.

        • error_span_countinteger· uint64requiredmin 0
        • parent_session_idstring
        • session_idstringrequired
        • span_countinteger· uint64requiredmin 0
        • trace_countinteger· uint64requiredmin 0
      • duration_msinteger· uint64requiredmin 0

        Elapsed window from the first observed span to the last observed span.

      • error_span_countinteger· uint64requiredmin 0
      • span_countinteger· uint64requiredmin 0
      • trace_countinteger· uint64requiredmin 0

        Distinct traces across the root session and all descendants.

      Variant 2
      valuenull
  • harness::askharnessv1.11.7Schema

    Ask the user for a decision between discrete options: 1-4 questions, 2-4 options each; the UI adds a free-text "Other" choice, so do not include one. The questions are shown as a clickable card in the chat and stay open while you do other work. The answer arrives as a user message (one `Header: answer` line per question; a skipped question reads `(skipped)`, and a dismissed card sends a notice instead of answers), so do not repeat the questions in text. Set `about.class` to `security` for credentials or permissions, `publish` for a release or deployment, `external_cost` for paid spend, or `data` for data access, migration, or deletion. It defaults to `scope` for other questions. Not available to sub-agents or structured-output turns.

    request
    • aboutall of

      What this decision concerns and what it blocks.

      all of (1)
      Variant 1
      • blocksstring[]

        Cards whose work waits on this answer.

      • classall of

        Classify the decision as `security` for credentials or permissions, `publish` for a release or deployment, `external_cost` for paid spend, or `data` for data access, migration, or deletion. Defaults to `scope` for other questions.

        Show 1 nested
        all of (1)
        Variant 1
        valuestringenum security, publish, external_cost, data, scope, run_health, …
      • ticketstring

        The card this question concerns.

      • whystring

        One paragraph explaining why the answer is needed.

    • expires_in_mininteger· uint64min 0

      Minutes until the expiry action runs. Omitted asks wait forever.

    • on_expiryall of

      What to do at expiry. Defaults to leaving the question open and telling the agent that it must not decide for the user.

      all of (1)
      Variant 1
      any of (2)
      Variant 1
      • answerstringrequired
      Variant 2
      valuestringenum block
    • questionsobject[]required1…4 items

      1-4 questions shown together on one card; the answer arrives as the user's next message, one line per question.

      • headerstringrequiredmin 1 chars

        Short label such as `Approach`, shown above the question; prefixes the answer line (`Approach: <label>`). No length limit: the card shows a long one with an ellipsis and the whole text on hover.

      • multi_selectboolean

        Let the user pick several options (checkboxes) instead of one.

      • optionsobject[]required2…4 items

        2-4 discrete choices; do not add an "Other" option, the UI adds a free-text one.

        • descriptionstring

          Optional one-line explanation shown under the label.

        • labelstringrequired1…80 chars

          The choice as the user sees and sends it, 1-80 characters, unique within its question.

        • recommendedboolean

          Marks the agent's preferred choice. At most one option per question.

      • questionstringrequiredmin 1 chars

        The question, shown as a heading above the options. Lead with the question itself in one short sentence; any context after it is shown smaller and folds when long.

    response
    • aboutobject
      • blocksstring[]

        Cards whose work waits on this answer.

      • classall of

        Classify the decision as `security` for credentials or permissions, `publish` for a release or deployment, `external_cost` for paid spend, or `data` for data access, migration, or deletion. Defaults to `scope` for other questions.

        all of (1)
        Variant 1
        valuestringenum security, publish, external_cost, data, scope, run_health, …
      • ticketstring

        The card this question concerns.

      • whystring

        One paragraph explaining why the answer is needed.

    • expires_in_mininteger· uint64min 0
    • on_expiryany of
      any of (2)
      Variant 1
      • answerstringrequired
      Variant 2
      valuestringenum block
    • question_idstringrequired

      The function-call id of this ask.

    • questionsobject[]required

      The questions as shown, in request order.

      • headerstringrequiredmin 1 chars

        Short label such as `Approach`, shown above the question; prefixes the answer line (`Approach: <label>`). No length limit: the card shows a long one with an ellipsis and the whole text on hover.

      • multi_selectboolean

        Let the user pick several options (checkboxes) instead of one.

      • optionsobject[]required2…4 items

        2-4 discrete choices; do not add an "Other" option, the UI adds a free-text one.

        • descriptionstring

          Optional one-line explanation shown under the label.

        • labelstringrequired1…80 chars

          The choice as the user sees and sends it, 1-80 characters, unique within its question.

        • recommendedboolean

          Marks the agent's preferred choice. At most one option per question.

      • questionstringrequiredmin 1 chars

        The question, shown as a heading above the options. Lead with the question itself in one short sentence; any context after it is shown smaller and folds when long.

    • session_idstringrequired
    • statusone ofrequired
      one of (1)
      Variant 1
      valuestringenum awaiting_answer
    • turn_idstringrequired

      The turn that asked; the question remains open if the session moves on.

  • engine::register_triggerUnknown
  • state::compare-and-setstatev0.23.5Schema

    Atomically set a value only if it currently equals `expected` (omit `expected` to mean 'only if absent'). Returns { swapped, current }; on a miss `current` is the stored value, so the caller can recompute and retry.

    request
    • expectedunknown

      The value the caller believes is there. Omit to mean "expect absent" — the set-if-absent form.

    • keystringrequired
    • scopestringrequired
    • valueunknownrequired
    response
    • currentunknown

      What is actually stored, when the swap did not happen.

    • swappedbooleanrequired
  • state::getstatev0.23.5Schema

    Read the value stored at a key in a state scope

    request
    • keystringrequired

      Identifier for the value within the scope.

    • scopestringrequired

      Namespace that groups related keys.

    response
    valuestring
  • state::liststatev0.23.5Schema

    List every value stored in a state scope

    request
    • scopestringrequired

      Namespace whose keys should be listed as a group.

    response
    valuestring
  • kanban::config::infokanbanv0.1.34Schema

    Resolved kanban settings: the folder the board file lives in, the columns, and the numbering prefix.

    request
    Empty object
    response
    • agents_pathstringrequired
    • agents_path_resolvedstringrequired
    • board_filestringrequired

      Absolute path of board.json.

    • canceled_statusstring

      The column that counts as canceled (out of progress and release totals); null when the board has none.

    • columnsobject[]required

      Board columns left to right.

      • idstringrequired

        Stable column id stored on tickets.

      • labelstringrequired

        Name shown on the board.

    • configuration_idstringrequired
    • data_pathstringrequired

      Configured path, as written.

    • data_path_resolvedstringrequired

      Absolute folder the board file is read from.

    • default_statusstringrequired
    • done_statusstringrequired

      The column that counts as done for progress, releases and subtasks.

    • id_prefixstringrequired
    • prioritiesstring[]required
    • project_rootstringrequired
    • subscribersobjectrequired
      • changeinteger· uintrequiredmin 0
      • commentinteger· uintrequiredmin 0
    • workerstringrequired

      The worker name, `kanban`: every function id, trigger type and page id starts with it.

  • kanban::project::createkanbanv0.1.34Schema

    Create a project: a named group of tickets with an optional lead and color. Names are unique (ASCII case ignored).

    request
    • colorstring

      blue | purple | teal | green | amber | rose.

    • descriptionstring
    • leadstring

      Agent profile id, or `user`.

    • namestringrequired

      Required; unique among projects (ASCII case ignored).

    response
    • archived_atstring

      Set when archived; an archived project refuses new tickets.

    • colorstring

      blue | purple | teal | green | amber | rose.

    • countsobjectrequired
    • created_atstringrequired
    • descriptionstring
    • doneinteger· uint64requiredmin 0

      Of those, the ones in the done column.

    • idstringrequired
    • leadstring

      Agent profile id, or `user`.

    • namestringrequired

      Unique among projects (trimmed, ASCII case ignored).

    • source_labelstring

      The label this project was converted from, if any.

    • statusstringrequiredenum active, archived
    • totalinteger· uint64requiredmin 0

      Live tickets in the project.

    • updated_atstringrequired
  • kanban::ticket::createkanbanv0.1.34Schema

    Create a ticket on the board and return it; pass compact to get back only its compact row (id, key, title, status, priority, assignee, comment_count). Optionally make it a subtask (parent), or file it under a project or release (id or name).

    request
    • actorstring

      Who is making the change. Defaults to `user`.

    • assigneestring

      Agent profile id.

    • compactboolean

      Return the compact row (id, key, title, status, priority, assignee, comment_count) instead of the full ticket.

    • descriptionstring
    • labelsstring[]
    • parentstring

      Make the new ticket a subtask of this ticket (uuid or key). The parent must be live and not a subtask itself.

    • pillsobject[]

      Badges to show on the card: `[{ "icon": "calendar", "text": "Fri 17:00" }]`; `icon` is a lucide icon name.

      • iconstringrequired
      • textstringrequired
    • prioritystring
    • projectstring

      Project id or name. An archived project refuses new tickets.

    • releasestring

      Release id or name.

    • statusstring

      Column id; defaults to the configured default_status.

    • titlestringrequired

      Required.

    response
    any of (2)
    Variant 1
    • activityobject[]
      • actorstringrequired
      • atstringrequired
      • changesobject[]
        Show 3 nested
        • fieldstringrequired
        • fromunknownrequired
        • tounknownrequired
      • comment_idstring
      • idstringrequired
      • seqinteger· uint64requiredmin 0
      • ticket_idstringrequired
      • typestringrequired

        ticket.created | ticket.updated | ticket.moved | ticket.deleted | ticket.restored | comment.created

    • assigneestring

      Agent profile id.

    • childrenobject[]required

      Live subtasks by ticket number.

      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
    • commentsobject[]
      • authorstringrequired

        Agent profile id, or `user`.

      • bodystringrequired
      • created_atstringrequired
      • idstringrequired
      • parent_idstring

        Set for a reply; replies stay one level deep.

      • ticket_idstringrequired
    • created_atstringrequired
    • created_bystring
    • deleted_atstring

      Set when soft-deleted; the row stays on disk.

    • descriptionstring
    • idstringrequired

      Internal uuid.

    • keystringrequired

      Human-readable id, e.g. KAN-1.

    • labelsstring[]
    • orderinteger· uint64min 0

      Position inside its column.

    • parentany of

      The parent, deleted or not; `null` for a ticket that is not a subtask.

      any of (2)
      Variant 1
      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
      Variant 2
      valuenull
    • parent_idstring

      Uuid of the parent ticket. One level deep: a parent has no parent.

    • pillsobject[]

      Small icon-and-text badges another worker pins on the ticket (a due date, a priority, an alarm). Shown on the card and the ticket page.

      • iconstringrequired
      • textstringrequired
    • prioritystringrequired
    • progressobjectrequired

      Live children in the done column over live children that are not canceled.

      • doneinteger· uint64requiredmin 0
      • totalinteger· uint64requiredmin 0
    • project_idstring

      Uuid of the project (several tickets, independent of the release).

    • release_idstring

      Uuid of the release.

    • statusstringrequired

      Column id.

    • titlestringrequired
    • updated_atstringrequired
    Variant 2
    • assigneestring
    • comment_countinteger· uint64requiredmin 0
    • idstringrequired
    • keystringrequired
    • prioritystringrequired
    • statusstringrequired
    • titlestringrequired
  • kanban::ticket::getkanbanv0.1.34Schema

    Read one ticket with its comments and activity, its parent, its live subtasks and their progress. The activity is bounded to keep the result small: every comment.created entry plus the newest 50 other entries (activity_total says how many exist), and a changed text longer than 200 chars (a description edit) is cut to a prefix ending in [truncated, N chars; ...]. kanban::activity::list returns the full history and the full text. The id accepts the internal uuid or the human-readable key.

    request
    • idstringrequired

      Ticket uuid or human-readable key (KAN-1, case-insensitive).

    response
    • activityobject[]
      • actorstringrequired
      • atstringrequired
      • changesobject[]
        • fieldstringrequired
        • fromunknownrequired
        • tounknownrequired
      • comment_idstring
      • idstringrequired
      • seqinteger· uint64requiredmin 0
      • ticket_idstringrequired
      • typestringrequired

        ticket.created | ticket.updated | ticket.moved | ticket.deleted | ticket.restored | comment.created

    • activity_totalinteger· uint64requiredmin 0

      Activity entries the ticket has in total; `activity` holds fewer when older non-comment entries were left out (`kanban::activity::list` pages them all).

    • assigneestring

      Agent profile id.

    • childrenobject[]required

      Live subtasks by ticket number.

      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
    • commentsobject[]
      • authorstringrequired

        Agent profile id, or `user`.

      • bodystringrequired
      • created_atstringrequired
      • idstringrequired
      • parent_idstring

        Set for a reply; replies stay one level deep.

      • ticket_idstringrequired
    • created_atstringrequired
    • created_bystring
    • deleted_atstring

      Set when soft-deleted; the row stays on disk.

    • descriptionstring
    • idstringrequired

      Internal uuid.

    • keystringrequired

      Human-readable id, e.g. KAN-1.

    • labelsstring[]
    • orderinteger· uint64min 0

      Position inside its column.

    • parentany of

      The parent, deleted or not; `null` for a ticket that is not a subtask.

      any of (2)
      Variant 1
      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
      Variant 2
      valuenull
    • parent_idstring

      Uuid of the parent ticket. One level deep: a parent has no parent.

    • pillsobject[]

      Small icon-and-text badges another worker pins on the ticket (a due date, a priority, an alarm). Shown on the card and the ticket page.

      • iconstringrequired
      • textstringrequired
    • prioritystringrequired
    • progressobjectrequired

      Live children in the done column over live children that are not canceled.

      • doneinteger· uint64requiredmin 0
      • totalinteger· uint64requiredmin 0
    • project_idstring

      Uuid of the project (several tickets, independent of the release).

    • release_idstring

      Uuid of the release.

    • statusstringrequired

      Column id.

    • titlestringrequired
    • updated_atstringrequired
  • kanban::ticket::listkanbanv0.1.34Schema

    List tickets in board order, optionally narrowed to a column, an assignee, an updated_since timestamp, a parent (its subtasks), a project or a release (empty string = none); offset and limit page the result and total counts every match; compact rows carry only id, key, title, status, priority, assignee and comment_count.

    request
    • assigneestring

      Agent profile id; empty string matches unassigned.

    • compactboolean

      Return the compact row (id, key, title, status, priority, assignee, comment_count) instead of the full summary.

    • include_deletedboolean
    • limitinteger· uint64min 0

      At most this many tickets (after `offset`), in board order.

    • offsetinteger· uint64min 0

      Skip this many tickets before `limit`: the next page starts at the rows you have. `total` says how many there are.

    • parent_idstring

      Only the subtasks of this ticket (uuid or key); empty string = tickets that are not subtasks.

    • project_idstring

      Only tickets in this project (id or name); empty string = tickets in no project.

    • release_idstring

      Only tickets in this release (id or name); empty string = tickets in no release.

    • statusstring

      Column id.

    • updated_sincestring

      Only tickets updated after this ISO timestamp.

    response
    • countinteger· uint64requiredmin 0

      Rows returned.

    • ticketsany of[]required
      any of (2)
      Variant 1
      • assigneestring
      • comment_countinteger· uint64requiredmin 0
      • created_atstringrequired
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • labelsstring[]required
      • orderinteger· uint64requiredmin 0
      • parent_idstring
      • pillsobject[]required
        Show 2 nested
        • iconstringrequired
        • textstringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
      • updated_atstringrequired
      Variant 2
      • assigneestring
      • comment_countinteger· uint64requiredmin 0
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • statusstringrequired
      • titlestringrequired
    • totalinteger· uint64requiredmin 0

      Tickets that pass the filters, before `offset` and `limit`.

  • kanban::ticket::movekanbanv0.1.34Schema

    Move a ticket to a column (and position inside it); used by the board drag and drop. Moving a ticket to where it already is changes nothing; a deleted ticket cannot be moved. Returns the ticket, or only its compact row with compact.

    request
    • actorstring
    • compactboolean

      Return the compact row (id, key, title, status, priority, assignee, comment_count) instead of the full ticket.

    • idstringrequired

      Ticket uuid or human-readable key (KAN-1, case-insensitive).

    • indexinteger· uint64min 0

      Zero-based position in the target column.

    • statusstringrequired

      Target column id.

    response
    any of (2)
    Variant 1
    • activityobject[]
      • actorstringrequired
      • atstringrequired
      • changesobject[]
        Show 3 nested
        • fieldstringrequired
        • fromunknownrequired
        • tounknownrequired
      • comment_idstring
      • idstringrequired
      • seqinteger· uint64requiredmin 0
      • ticket_idstringrequired
      • typestringrequired

        ticket.created | ticket.updated | ticket.moved | ticket.deleted | ticket.restored | comment.created

    • assigneestring

      Agent profile id.

    • childrenobject[]required

      Live subtasks by ticket number.

      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
    • commentsobject[]
      • authorstringrequired

        Agent profile id, or `user`.

      • bodystringrequired
      • created_atstringrequired
      • idstringrequired
      • parent_idstring

        Set for a reply; replies stay one level deep.

      • ticket_idstringrequired
    • created_atstringrequired
    • created_bystring
    • deleted_atstring

      Set when soft-deleted; the row stays on disk.

    • descriptionstring
    • idstringrequired

      Internal uuid.

    • keystringrequired

      Human-readable id, e.g. KAN-1.

    • labelsstring[]
    • orderinteger· uint64min 0

      Position inside its column.

    • parentany of

      The parent, deleted or not; `null` for a ticket that is not a subtask.

      any of (2)
      Variant 1
      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
      Variant 2
      valuenull
    • parent_idstring

      Uuid of the parent ticket. One level deep: a parent has no parent.

    • pillsobject[]

      Small icon-and-text badges another worker pins on the ticket (a due date, a priority, an alarm). Shown on the card and the ticket page.

      • iconstringrequired
      • textstringrequired
    • prioritystringrequired
    • progressobjectrequired

      Live children in the done column over live children that are not canceled.

      • doneinteger· uint64requiredmin 0
      • totalinteger· uint64requiredmin 0
    • project_idstring

      Uuid of the project (several tickets, independent of the release).

    • release_idstring

      Uuid of the release.

    • statusstringrequired

      Column id.

    • titlestringrequired
    • updated_atstringrequired
    Variant 2
    • assigneestring
    • comment_countinteger· uint64requiredmin 0
    • idstringrequired
    • keystringrequired
    • prioritystringrequired
    • statusstringrequired
    • titlestringrequired
  • kanban::ticket::updatekanbanv0.1.34Schema

    Update a ticket field (title, description, status, priority, assignee, labels, parent, project, release) and return the ticket (compact returns only its compact row). To change labels pass add_labels / remove_labels (they edit the current labels, so concurrent edits do not overwrite each other); labels replaces the whole set. parent makes the ticket a subtask (one level: the parent must be live and not a subtask, a ticket with subtasks cannot become one) and null detaches it; the activity is recorded on both tickets. project and release take an id or a name; null clears. A patch that changes nothing records and fires nothing.

    request
    • actorstring
    • add_labelsstring[]

      Labels to add to the current ones; one already present (ASCII case ignored) is skipped. Applied after `labels` and `remove_labels`.

    • assigneestring

      Agent profile id, or null to unassign.

    • compactboolean

      Return the compact row (id, key, title, status, priority, assignee, comment_count) instead of the full ticket.

    • descriptionstring
    • idstringrequired

      Ticket uuid or human-readable key (KAN-1, case-insensitive).

    • labelsstring[]

      Replaces the whole label set. Prefer add_labels / remove_labels: they edit the labels the ticket has when the write runs, so concurrent label edits do not overwrite each other.

    • parentstring

      Ticket uuid or key to make this ticket a subtask of, or null to detach it. One level only: the parent must be live and not a subtask, and a ticket with subtasks cannot become one.

    • pillsobject[]

      Replaces every badge on the card: `[{ "icon": "alarm-clock", "text": "09:00" }]`; `icon` is a lucide icon name. `[]` clears them.

      • iconstringrequired
      • textstringrequired
    • prioritystring
    • projectstring

      Project id or name, or null to clear. An archived project refuses new tickets.

    • releasestring

      Release id or name, or null to clear.

    • remove_labelsstring[]

      Labels to drop from the current ones (ASCII case ignored). Applied after `labels`, before `add_labels`.

    • statusstring
    • titlestring
    response
    any of (2)
    Variant 1
    • activityobject[]
      • actorstringrequired
      • atstringrequired
      • changesobject[]
        Show 3 nested
        • fieldstringrequired
        • fromunknownrequired
        • tounknownrequired
      • comment_idstring
      • idstringrequired
      • seqinteger· uint64requiredmin 0
      • ticket_idstringrequired
      • typestringrequired

        ticket.created | ticket.updated | ticket.moved | ticket.deleted | ticket.restored | comment.created

    • assigneestring

      Agent profile id.

    • childrenobject[]required

      Live subtasks by ticket number.

      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
    • commentsobject[]
      • authorstringrequired

        Agent profile id, or `user`.

      • bodystringrequired
      • created_atstringrequired
      • idstringrequired
      • parent_idstring

        Set for a reply; replies stay one level deep.

      • ticket_idstringrequired
    • created_atstringrequired
    • created_bystring
    • deleted_atstring

      Set when soft-deleted; the row stays on disk.

    • descriptionstring
    • idstringrequired

      Internal uuid.

    • keystringrequired

      Human-readable id, e.g. KAN-1.

    • labelsstring[]
    • orderinteger· uint64min 0

      Position inside its column.

    • parentany of

      The parent, deleted or not; `null` for a ticket that is not a subtask.

      any of (2)
      Variant 1
      • assigneestring
      • deleted_atstring
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • project_idstring
      • release_idstring
      • statusstringrequired
      • titlestringrequired
      Variant 2
      valuenull
    • parent_idstring

      Uuid of the parent ticket. One level deep: a parent has no parent.

    • pillsobject[]

      Small icon-and-text badges another worker pins on the ticket (a due date, a priority, an alarm). Shown on the card and the ticket page.

      • iconstringrequired
      • textstringrequired
    • prioritystringrequired
    • progressobjectrequired

      Live children in the done column over live children that are not canceled.

      • doneinteger· uint64requiredmin 0
      • totalinteger· uint64requiredmin 0
    • project_idstring

      Uuid of the project (several tickets, independent of the release).

    • release_idstring

      Uuid of the release.

    • statusstringrequired

      Column id.

    • titlestringrequired
    • updated_atstringrequired
    Variant 2
    • assigneestring
    • comment_countinteger· uint64requiredmin 0
    • idstringrequired
    • keystringrequired
    • prioritystringrequired
    • statusstringrequired
    • titlestringrequired
  • kanban::comment::createkanbanv0.1.34Schema

    Comment on a ticket, or reply to a comment by passing parent_id. Returns the new comment and the ticket (only its compact row with compact).

    request
    • authorstring

      Agent profile id, or `user`. Defaults to `user`.

    • bodystringrequired

      Comment body. Markdown is rendered in the console.

    • compactboolean

      Return the ticket as its compact row (id, key, title, status, priority, assignee, comment_count) instead of the full ticket.

    • parent_idstring

      Comment id to reply to; replies stay one level deep.

    • ticket_idstringrequired

      Ticket uuid or human-readable key (KAN-1, case-insensitive).

    response
    • commentobjectrequired
      • authorstringrequired

        Agent profile id, or `user`.

      • bodystringrequired
      • created_atstringrequired
      • idstringrequired
      • parent_idstring

        Set for a reply; replies stay one level deep.

      • ticket_idstringrequired
    • ticketany ofrequired

      What a ticket write returns: the full ticket, or its compact row when the request asked for `compact`.

      any of (2)
      Variant 1
      • activityobject[]
        Show 8 nested
        • actorstringrequired
        • atstringrequired
        • changesobject[]
          Show 3 nested
          • fieldstringrequired
          • fromunknownrequired
          • tounknownrequired
        • comment_idstring
        • idstringrequired
        • seqinteger· uint64requiredmin 0
        • ticket_idstringrequired
        • typestringrequired

          ticket.created | ticket.updated | ticket.moved | ticket.deleted | ticket.restored | comment.created

      • assigneestring

        Agent profile id.

      • childrenobject[]required

        Live subtasks by ticket number.

        Show 9 nested
        • assigneestring
        • deleted_atstring
        • idstringrequired
        • keystringrequired
        • prioritystringrequired
        • project_idstring
        • release_idstring
        • statusstringrequired
        • titlestringrequired
      • commentsobject[]
        Show 6 nested
        • authorstringrequired

          Agent profile id, or `user`.

        • bodystringrequired
        • created_atstringrequired
        • idstringrequired
        • parent_idstring

          Set for a reply; replies stay one level deep.

        • ticket_idstringrequired
      • created_atstringrequired
      • created_bystring
      • deleted_atstring

        Set when soft-deleted; the row stays on disk.

      • descriptionstring
      • idstringrequired

        Internal uuid.

      • keystringrequired

        Human-readable id, e.g. KAN-1.

      • labelsstring[]
      • orderinteger· uint64min 0

        Position inside its column.

      • parentany of

        The parent, deleted or not; `null` for a ticket that is not a subtask.

        Show 2 nested
        any of (2)
        Variant 1
        • assigneestring
        • deleted_atstring
        • idstringrequired
        • keystringrequired
        • prioritystringrequired
        • project_idstring
        • release_idstring
        • statusstringrequired
        • titlestringrequired
        Variant 2
        valuenull
      • parent_idstring

        Uuid of the parent ticket. One level deep: a parent has no parent.

      • pillsobject[]

        Small icon-and-text badges another worker pins on the ticket (a due date, a priority, an alarm). Shown on the card and the ticket page.

        Show 2 nested
        • iconstringrequired
        • textstringrequired
      • prioritystringrequired
      • progressobjectrequired

        Live children in the done column over live children that are not canceled.

        Show 2 nested
        • doneinteger· uint64requiredmin 0
        • totalinteger· uint64requiredmin 0
      • project_idstring

        Uuid of the project (several tickets, independent of the release).

      • release_idstring

        Uuid of the release.

      • statusstringrequired

        Column id.

      • titlestringrequired
      • updated_atstringrequired
      Variant 2
      • assigneestring
      • comment_countinteger· uint64requiredmin 0
      • idstringrequired
      • keystringrequired
      • prioritystringrequired
      • statusstringrequired
      • titlestringrequired
  • shell::execidev0.13.14Schema

    Run a command in the foreground and return its full output. Put the program in `command` (string) and arguments in `args` (string[]), never argv in `command`. Host-only cwd/env/stdin reject S210 on a sandbox target. Errors return { code, message }; common: S216 host exec error, S300 VM boot failed, S200 in-VM failure.

    request
    • argsstring[]

      Arguments, in order (all strings). Omit/null to tokenize `command` shell-words style; pass an array (even empty) to use it verbatim.

    • commandstringrequired

      Program name (PATH-resolved) or path to an executable, as a string; put arguments in `args`.

    • cwdstring

      Working directory (host only, S210 on sandbox); jail-confined like shell::fs::* paths (S215 on escape), must be an existing directory.

    • envobject

      Per-call env values (host only, S210 on sandbox); exec-hijacking keys (PATH, IFS, HOME, LD_*/DYLD_*, …) reject the whole call S210.

    • follow_worktreeboolean

      Whether the session moves into a git worktree this call adds (default true). Pass `false` to keep the session in its folder.

    • stdinstring

      Bytes written to the program's stdin, then EOF (host only, S210 on sandbox); omit to leave stdin at /dev/null.

    • targetall of

      Where to run the command. Defaults to the host worker; pass `{ kind: "sandbox", sandbox_id }` to forward the call to a microVM.

      all of (1)
      Variant 1
      one of (2)
      Variant 1
      • kindstringrequiredenum host
      Variant 2
      • kindstringrequiredenum sandbox
      • sandbox_idstring· uuidrequired
    • timeout_msinteger· uint64min 0

      Per-call timeout in milliseconds, capped at the configured max; negative or fractional values fall back to the default.

    response
    • duration_msinteger· uint64requiredmin 0
    • exit_codeinteger· int32
    • stderrstringrequired
    • stderr_truncatedbooleanrequired
    • stdoutstringrequired
    • stdout_truncatedbooleanrequired
    • timed_outbooleanrequired
  • shell::exec_bgidev0.13.14Schema

    Spawn a background job; returns { job_id, argv } immediately. Accepts the shell::exec payload plus optional job_id. Observe shell::on-job-finished with args { job_id } naming a fresh job_id before calling exec_bg with that same ID, or omit job_id to generate one. Duplicate retained IDs reject before execution. Host jobs ignore timeout_ms and use the configured background hard cap; read output with shell::status, list jobs with shell::list. Jobs have no terminal: a command that needs one fails, and a job that stays stopped is killed. Spawn-time failures are plain-string messages; later failures call shell::on-job-finished and appear in shell::status.

    request
    • argsstring[]

      Arguments, in order (all strings). Omit/null to tokenize `command` shell-words style; pass an array (even empty) to use it verbatim.

    • commandstringrequired

      Program name (PATH-resolved) or path to an executable, as a string; put arguments in `args`.

    • cwdstring

      Working directory (host only, S210 on sandbox); jail-confined like shell::fs::* paths (S215 on escape), must be an existing directory.

    • envobject

      Per-call env values (host only, S210 on sandbox); exec-hijacking keys (PATH, IFS, HOME, LD_*/DYLD_*, …) reject the whole call S210.

    • job_idstringmin 1 chars

      Optional non-blank ID for observing shell::on-job-finished before execution. Must be unique among retained jobs in this worker. Omit or pass null to generate a job-UUID automatically.

    • stdinstring

      Bytes written to the program's stdin, then EOF (host only, S210 on sandbox); omit to leave stdin at /dev/null.

    • targetall of

      Where to run: the host (default) or { kind: "sandbox", sandbox_id }.

      all of (1)
      Variant 1
      one of (2)
      Variant 1
      • kindstringrequiredenum host
      Variant 2
      • kindstringrequiredenum sandbox
      • sandbox_idstring· uuidrequired
    • timeout_msinteger· uint64min 0

      Per-call timeout in milliseconds; ignored by host background jobs, forwarded to sandbox targets.

    response
    • argvstring[]required
    • job_idstringrequired
  • shell::statusidev0.13.14Schema

    Fetch the full record (status, exit_code, timing, output) of a background job by job_id. A running host job shows the last 8 KiB of each stream, flagged truncated when there is more. Errors return { code, message }; common: S211 no such job.

    request
    • job_idstringrequired
    response
    • jobobjectrequired
      • argvstring[]required
      • exit_codeinteger· int32
      • finished_at_msinteger· uint64min 0
      • idstringrequired
      • started_at_msinteger· uint64requiredmin 0
      • statusstringrequiredenum running, finished, killed, failed
      • stderrstringrequired
      • stderr_truncatedbooleanrequired
      • stdoutstringrequired
      • stdout_truncatedbooleanrequired
  • shell::killidev0.13.14Schema

    Terminate a running background job by job_id (returned by shell::exec_bg). Errors return { code, message }; common: S211 no such job, S216 kill/signal delivery failure.

    request
    • job_idstringrequired
    response
    • job_idstringrequired
    • killedbooleanrequired
    • reasonstring
    • statusstringrequiredenum running, finished, killed, failed
  • coder::treeidev0.13.14Schema

    Show a directory tree, bounded by max_depth, per_folder_limit and a node budget. Nodes carry only name (child path = parent path + '/' + name); over-limit folders are truncated stubs to paginate with coder::list-folder. Paths: relative to the primary root or absolute inside an allowed root (see coder::info).

    request
    • include_hiddenboolean

      List dot-prefixed entries; false omits them at every level (they then don't count toward per_folder_limit). The requested root is exempt.

    • max_depthinteger· uint32min 0

      Maximum depth to descend; the root node is depth 0.

    • pathstring

      Base folder for the snapshot (default `.`).

    • per_folder_limitinteger· uint32min 0

      Maximum children listed per folder. When more exist, the folder is flagged `truncated` and callers should switch to `coder::list-folder`.

    • use_default_excludesboolean

      Prune directories matching default_exclude_globs (see coder::info) into childless `truncated` stubs; false lists everything.

    response
    • pathstringrequired

      Canonical absolute path of the requested folder (resolved through the jail). Nodes carry only `name`, and the root node's path IS this `path` — do not join the root's `name` onto it; derive children by joining from here: child path = parent path + "/" + name. Operations on derived paths re-validate through the jail.

    • rootall ofrequired

      Root node of the snapshot; its `name` is the folder's basename.

      all of (1)
      Variant 1
      • childrenunknown[]
      • kindstringrequiredenum file, dir, symlink, other
      • mtimeinteger· int64required
      • namestringrequired

        Entry basename. The ROOT node's path is the response's top-level `path` itself; every other node's path derives by joining from there: child path = parent path + "/" + name.

      • non_accessiblebooleanrequired
      • sizeinteger· uint64requiredmin 0
      • truncatedany of

        Set on directories whose `children` was capped at `per_folder_limit`, whose subtree was cut off by `max_depth`, which matched `default_exclude_globs` or omitted matching non-directory children (reason "default_exclude"), or where the snapshot's node budget ran out (reason "max_nodes").

        Show 2 nested
        any of (2)
        Variant 1
        • hintstringrequired
        • reasonstringrequired

          Reason this folder was truncated: hit `per_folder_limit`, cut off by `max_depth`, matched `default_exclude_globs` (`default_exclude`), omitted matching non-directory children, or the snapshot's total node budget ran out (`max_nodes`).

        • showninteger· uint32requiredmin 0

          Number of children actually returned.

        • totalinteger· uint32min 0

          Total number of children eligible for listing in the folder, counted after hidden and default-exclude filtering (only populated when `reason == "per_folder_limit"`; for depth truncation we don't peek into the folder).

        Variant 2
        valuenull
  • directory::agents::getiii-directoryv1.3.17Schema

    Fetch one agent profile by id: the system prompt resolved through its `extends` chain, display fields, preloaded `skills` (skill ids whose bodies the harness pre-loads into the session prompt) plus `unknown_skills`, preloaded `functions` (engine function ids the harness pre-loads into the session prompt) plus `unknown_functions`, `functions_policy` (the enforced allow/deny ceiling the harness narrows sessions to), model, reasoning_effort, `skills_index` (false = sessions start without the skills index), the profile's own `options` (composer run settings: key, label, choices; never inherited, omitted when none), and `inheritance_error` when the chain does not resolve. Pass raw: true for the exact on-disk file to edit with directory::agents::update.

    request
    • idstringrequired
    • rawboolean

      When true, also return the exact on-disk file (frontmatter included) as `raw`, ready for directory::agents::update.

    response
    • builtinbooleanrequired

      Bundled with the worker, no file behind it (see `list`).

    • colorstring

      Harness subagent color token (closed set, validated at write time); `null` = neutral.

    • composer_placeholderstring

      Example request for the chat's empty composer (see `list`): this profile's own value, never inherited; omitted when absent or blank.

    • descriptionstringrequired
    • extendsstring

      Parent profile id (`extends:`), as declared; `null` = none.

    • functionsstring[]required

      Preloaded functions, resolved through `extends` (the nearest profile with a non-empty list): engine function ids whose contracts the harness pre-loads into the system prompt of every session running as this profile, so the model calls them without discovery or a contract lookup. Empty = none.

    • functions_policyany of

      ENFORCED function policy (`functions_policy:`), resolved through `extends` per field (`allow` nearest-wins, `deny` the chain's union): the harness narrows every session running as this profile to it — allow intersected with the send's, deny added (deny wins). A missing `allow` keeps the send's allow-list. Omitted when no profile in the chain sets it.

      any of (2)
      Variant 1
      • allowstring[]
      • denystring[]
      Variant 2
      valuenull
    • hiddenbooleanrequired

      Hidden from the chat's new-session gallery (still selectable by id).

    • iconstring

      Harness subagent icon token (closed set, validated at write time); `null` = caller picks.

    • idstringrequired
    • inheritance_errorstring

      Set when the `extends` chain does not resolve (unknown parent, loop, deeper than 8): `system_prompt` and the inherited fields then come from this file alone, `raw` still round-trips so the chain can be fixed, and the harness refuses to run the profile meanwhile.

    • logostring
    • modelstring

      Model id for sessions using this profile, resolved through `extends`; `null` = the send decides. Served verbatim — resolution against the live model catalog happens where it is used.

    • modified_atstringrequired

      File mtime as RFC 3339; empty for a bundled profile.

    • namestringrequired
    • optionsobject[]required

      The profile's own composer run settings (`options:`), never inherited through `extends`; omitted when none.

      • choicesobject[]required
        • helpstring
        • labelstringrequired
        • valuestring

          `""` is a real value (`budget_tokens=` = no limit). YAML `value:`, `~`, `null` and an omitted key read as `""`.

      • default_helpstring

        What the agent does when the person leaves this option at Default; shown on the Default row.

      • keystringrequired
      • labelstringrequired
    • rawstring

      FULL on-disk file content (this profile's own file, ancestors excluded). Present only when the request set `raw: true`.

    • reasoning_effortstring

      Provider-native reasoning effort paired with `model`, resolved through `extends`; `null` = the model/provider default. Served verbatim and validated at use time.

    • skillsstring[]required

      Preloaded skills, resolved through `extends` (the union of the chain's lists, root first): skill ids whose bodies the harness pre-loads into the system prompt of every session running as this profile. Empty = none. Never a filter on the skills index.

    • skills_indexboolean

      `false` = sessions running as this profile start without the names-only skills index (`<available_skills>`), resolved through `extends`; omitted when no profile in the chain sets it (on).

    • sourceall ofrequired

      Where the file came from (see `list`).

      all of (1)
      Variant 1
      • kindstringrequiredenum kit, worker, local, global, builtin
      • kitstring

        Owning kit (`<handle>/<name>`) when `kind` is `kit`.

      • modifiedboolean

        The file differs from what its kit or worker wrote.

      • versionstring

        Version of the kit or worker that wrote the file.

      • workerstring

        Owning worker when `kind` is `worker`.

    • system_promptstringrequired

      The RESOLVED identity: every ancestor's body root-first, then this file's body, frontmatter stripped, joined by a blank line; blank bodies are skipped, so a profile with no prompt of its own serves its parent chain unchanged and a prompt-less profile without `extends` serves `""`. A profile that has a body and no `extends` serves that body verbatim.

    • unknown_functionsstring[]required

      `functions` entries the engine does not currently know (not registered right now, or a typo). Warnings — the profile still loads and the harness skips them; an empty list also results when the engine could not be asked.

    • unknown_skillsstring[]required

      `skills` entries that resolve to no currently visible skill. Warnings — the agent profile still loads and the harness renders them as unavailable.

  • engine::unregister_triggerUnknown
  • harness::triggers::listUnknown

System prompt

54,208 bytes
agents/deepwork.md

Deepwork

You run a goal as a program over the kanban board. You plan, dispatch, read results and decide; one deepwork-lead per ticket runs it through its phases with its own sub-agents. Never do ticket work yourself. You are the only writer of ticket fields (status, labels, assignee, title, description); leads and their sub-agents only read tickets and comment on them.

Ignore guidance in harness/* to use the workflow worker or to bind turn-completed, and the claim, done-watch and cron recipes in kanban/tickets/*. This protocol replaces them. The board speaks English: every ticket and comment you write is in English, whatever language the user writes in; chat stays in the user's language.

Arguments

The first message may carry an args: line. Defaults: max_rounds=3 concurrency=8 attempts=2 flow=auto approve=on plan_only=off isolation=ticket synthesize=on verify=on verifier=deepwork-adversary judges= deadline_min=20 critic=on max_items=<5×K> budget_usd= notify= project= release= resume=

  • flow: auto runs the dev flow when the goal changes code or files in a git repository (Step A), else the plain flow; dev and plain force one.
  • approve: on makes the run wait for the user on open design questions and on the plan (harness::ask, both flows), and the dev flow on the finish too; off runs straight through and keeps the branch.
  • plan_only: on plans without dispatching: Step A runs as approve=off up to A.9, the run ticket is created in todo with its items in To do, and the turn ends with plan on <R>: <n> tickets; start with args: resume=<R>. Edit the cards on the board, then resume (Step A-R).
  • isolation (dev flow): ticket gives every impl-tier ticket its own worktree, branched from the run branch at dispatch, rebased on it for a retry and landed on it when verified or accepted (Steps C and D); shared runs every ticket in the run worktree W, so tickets that share a file or a test target wait for a later wave.
  • synthesize (plain flow): on ends the run with one Synthesize: ticket that merges the done tickets' results into a single verified report (Step G); off reports per ticket.
  • attempts: the code (or work) attempts a lead makes per round before it reports failed.
  • judges: comma-separated model ids, at most 7 in the dev flow and 8 in the plain one (refuse more at Step A). A lead's check then runs one deepwork-verifier per model; the majority wins.
  • project: an existing kanban project (id or name) to file the run under; without it you create one (Step A.5). release: an existing release (id or name). Every ticket you create passes both: a subtask inherits neither.
  • resume: the key of an earlier run ticket (label dw:run) to adopt from its board state instead of planning (Step A-R). The message's text is then ignored apart from its args: line, whose other args override single values of R's Args: line.
  • K = min(concurrency, 8) leads per wave. Each of your turns creates at most one wave of sessions. Every item that can run now runs in parallel: a wave takes every ready ticket, up to K.
  • If the goal needs discovery, round 1 is a single Discover: ticket; add 1 to max_rounds.

Names and rules

  • R = the run ticket key (e.g. KAN-7). Run items are R's subtasks: every item is created with "parent":"<R>", and humans add work the same way. A live ticket named by the goal, R's description or R's comments is adopted, never re-created: kanban::ticket::update {"id":"<KEY>","parent":"<R>","status":"todo","assignee":"<tier>","description":"<its description>\n\n---\n## Deepwork card\n<card>","actor":"deepwork","compact":true}. A card that would open with Fixes <KEY> or Part of <KEY> for a live ticket is that ticket's card. To split one, the original keeps part 1 and part 2 is a new item titled … (<KEY> part 2). When the goal is itself a ticket key, that ticket is R: add dw:run and append the run block to its description instead of Step A.5's create.
  • <run> = dw-<R lowercased>-<last 6 chars of your session id>.
  • Wave b of round N: scope = barrier id = <run>-r<N>-w<b>, label dw R rN wb. Critic: <run>-critic, label dw R critic. Ids and labels are never reused.
  • State keys: a ticket's key (KAN-12); the critic critic. In every state document, item equals the key it is written to, or that key without a .dup suffix.
  • Sessions: lead <own>-<key lowercased> (the same one every round), critic <own>-critic.
  • Lanes: todo = the queue in board order; in_progress = its lead is running (the phases show under it in the session tree); done = verified or accepted; backlog = blocked, failed, unverified, unfinished, stuck, or a pending card nobody queued (the Follow-ups ticket, a dev card you could not fill); the canceled lane = kanban::config::info's canceled_status when it is set (kanban's native canceled column: its tickets leave progress totals); else the id of the first column whose id or label is canceled or cancelled (case ignored) and that is not done_status; else backlog: it holds items dropped from the plan, with outcome canceled. Cancel an item with kanban::ticket::update {"id":"<KEY>","status":"<canceled lane>","remove_labels":O,"add_labels":["canceled"],"actor":"deepwork","compact":true}.
  • Outcome labels O = verified, accepted, blocked, failed, unverified, unfinished, stuck, canceled. Every terminal update passes "remove_labels": O, "add_labels": ["<outcome>"]. Never pass labels on an update: humans edit labels too.
  • Every kanban::comment::create you make passes "author":"deepwork"; every ticket write passes "actor":"deepwork". Every kanban write (ticket::create / update / move, comment::create) also passes "compact": true: you only read key back.
  • Cost C = totals.cost_usd from the last harness::metrics; write ≥ $C, and add incomplete (<provider/model> unpriced) from the by_model rows with cost_complete:false. When totals.cost_usd is null, write cost unknown; the budget gate then does not trip.
  • Read harness::metrics {"root_session_id":"<own>","omit_context":true} only in a reply that uses C: the budget gate (only when budget_usd is set), a Step F round comment, the Step G report. Never on a plain wake.
  • harness::stop {"session_id":"<s>"} ends s's running turn and every running child. It does not touch a parked s (completed with expects_wake:true) itself: only its running children stop, and s ends on its next wake (an orchestrator by the adoption check in Step D, a lead by the cancelled-phase rule of its Null step). You can neither list nor remove another session's wakes.
  • Budget gate: before dispatching a wave, if budget_usd is set and C ≥ budget_usd, don't dispatch; go to Step F.
  • Phase budget P = 3 × attempts for phases tests, code, check, 2 × attempts for tests, code or work, check, attempts for work. Lead time T (minutes) = P × (deadline_min + 2). A wave's deadline is the largest T among its leads, plus one minute.

Leads

  • When you create an item, set its assignee: deepwork-impl for work that changes code or files, deepwork-worker for reading, research and analysis.
  • Work agent = the ticket's assignee if it starts with deepwork-worker or deepwork-impl. Otherwise pick the tier by the creation rule above and comment once: assignee <x> is not a work tier; ran <agent>. Don't rewrite the assignee.
  • Verify agent = the verifier arg if it starts with deepwork-adversary or deepwork-verifier, else deepwork-adversary.
  • Phases: for a dev-flow ticket whose work agent is a deepwork-impl* tier, tests, code, check (verify=off: tests, code); otherwise work, check, or work for a Discover ticket or with verify=off.
  • Every lead is "agent":"deepwork-lead" with "display":{"name":"<KEY> · <title>","icon":"agent","color":"purple"} and "options":{"orchestrator":true,"functions":{"deny":DL}}. Never pass max_turns, system_prompt or allow: [].
  • display is an object, never a JSON string, and its whole name is at most 48 characters, the key and · included: cut the title to 45 minus the key's length (KAN-12 leaves 39 characters). A longer name refuses the spawn.

Lead deny list DL; the critic gets D = DL plus harness::stop:

["kanban::ticket::create","kanban::ticket::update","kanban::ticket::move","kanban::ticket::delete","kanban::ticket::restore","state::set","state::update","state::delete","harness::ask","directory::skills::get","kanban::project::*","kanban::release::*","kanban::label::convert","code-runner::*","sandbox-code-runner::*","workflow::*"]

Step A: start (first turn)

  1. kanban::config::info {}. columns[].id must include backlog, todo, in_progress and done; otherwise stop and name the missing one. Stop as well if concurrency, max_rounds, attempts, deadline_min or a given max_items is not a positive integer, if isolation is neither ticket nor shared, or if judges lists more than 8 models. If judges is set, call directory::agents::get {"id":"deepwork-verifier"}: a non-null model (its own or inherited, e.g. from a local agents/default.md) would override every judge's model, so stop and say to remove it.
  2. Pick the flow, in one reply: shell::exec {"command":"git","args":["status","--porcelain=v1","-b"]}, shell::exec {"command":"git","args":["rev-parse","--show-toplevel","--show-prefix"]} and coder::tree {"path":".","max_depth":2} (a goal that is a ticket key: also kanban::ticket::get it). The dev flow runs when flow=dev, or flow=auto and the goal changes code or files and git status succeeded. In the dev flow, stop and say why on a detached HEAD, with more than 7 judges, when --show-prefix is not empty (run deepwork from the repository's top folder), or when the files the goal or its ticket names (or the repository it names) are not under root: say which folder to start the run from, and never search the disk for the repository. flow=dev outside a git repository stops too. In the dev flow: base = the branch git status names; root = the --show-toplevel path; slug = 2–5 words of the goal in kebab-case plus -<last 6 chars of your session id>; branch = deepwork/<slug>; W = <root>/.worktrees/<slug>; with isolation=ticket, ticket KEY's worktree W_K = <root>/.worktrees/<slug>-<key lowercased> on branch deepwork/<slug>-<key lowercased> (never deepwork/<slug>/<key>: git refuses a branch under a name that is itself a branch). If git status lists changes, W starts from base's last commit without them: say so on the Plan card (approve=off: on R).
  3. Resolve the functions the items need. Plain flow: one directory::search_functions naming every capability, then one engine::functions::info {"function_ids":[…]} for the ids you pick. Dev flow: the project's test, build and lint commands, read from the tree, run with shell::exec {command, args[], cwd: W}, and Setup = the install command a fresh copy of the repository needs before those commands run (a Node project: its package manager's offline install), or none (a Cargo project, which builds in its own worktree). Setup runs in every fresh copy: W at Step A.9 and, with isolation=ticket, each ticket worktree. Never point two worktrees at one build directory such as CARGO_TARGET_DIR: Cargo keys artifacts by the path inside the repository, so siblings would run each other's binaries. Every lead task names the commands (Functions:) and ends that text with this recipe, verbatim, for a long run (every phase agent and the critic follow it):
    Long run (anything over ~90 s: the first build or test run in a fresh worktree, the full suite, a command that hit the 120 s cap), one reply, calls in order:
    1. shell::exec_bg {"command":"<cmd>","args":["<arg>",…],"cwd":"<Worktree>"} → {job_id}
    2. engine::register_trigger {"trigger_type":"shell::job-finished","config":{"job_id":"<job_id>"},"label":"job <job_id>","once":true,"lifecycle":{"expires_in_ms":900000}}
    3. End the turn with one line: `waiting on <job_id>`. Never poll shell::status or sleep.
    On `[notification] job <job_id>: {…"status":…,"exit_code":N}`: shell::status {"job_id":"<job_id>"}; the evidence is exit_code and the summary line at the tail of stdout.
    On `wake expired unfired`: shell::kill {"job_id":"<job_id>"}; the command did not finish (a check: unsure; tests, code or work: failed).
    Before your final write, shell::kill any job of yours still running.
    The plain flow has no cwd. The order matters: shell::exec_bg first, because a binding registered after the job ended is replayed, and a leaf cannot unregister one, so a refused shell::exec_bg must not leave a binding behind. shell::exec stays for commands under ~90 s (it is capped at 120 s). Dev flow, when the goal needs a browser (design audit, screenshots, Playwright against a running app) and engine::functions::info {"function_ids":["browser::doctor"]} finds browser::doctor: call browser::doctor {} once; it launches nothing. On ok:false, put preflight: browser: <issues[].what> (<enable_how>) on the Plan card (approve=off: in R's description); the run goes on. If the call is refused, skip it.
  4. Design (approve=on, plan_only=off). What the goal, and in the dev flow the code, leave open goes to the user, one harness::ask per turn, at most three turns: one question with "header":"Design" and 2–3 approaches, the recommended one first with (Recommended) in its label, each with its trade-off as the description. The turn ends on the card; the answer arrives as the next user message. Skip this when nothing is open. Which tickets become subtasks is not a Design question: adopt by default; ask only when the user's text and the board disagree, and then before any create. If harness::ask is refused, continue as approve=off and say so on R.
  5. Unless project is set, create the run's project, so the board filters to this run: kanban::project::create {"name":"deepwork: <goal, ≤48 chars> · <last 6 chars of your session id>","description":"Deepwork run. Goal: <goal, ≤200 chars>. Orchestrator session: <own>.","lead":"deepwork","color":"purple"}; the run's project = its id. If the error says the name exists, retry once with · 2 appended. If it is refused otherwise, go on without one: add Project: not created: <error> to R's description (plus ; allow kanban::project::create or pass project= when it is a permission denial), say so in this turn's status line and in the report. Then create the run ticket, passing "project" when the run has one; R = the key in the response:
    kanban::ticket::create {"title":"deepwork: <goal, ≤70 chars>","description":"Goal: <verbatim>\nArgs: <resolved args>\nFlow: <dev or plain>\nOrchestrator session: <own>\n<dev flow: Base: <base>\nBranch: <branch>\nWorktree: <W>\nDesign: <approach, components, data changes, error handling, test strategy>\n>Add work: a subtask of this ticket in To do runs next round. Drag To do cards to reorder, comment on a ticket to steer its retry, drag Backlog → To do to re-queue (a stuck card runs again only after its lead has stopped), set the assignee to a deepwork-worker* or deepwork-impl* tier to route it. Don't touch In progress cards, and move cards to Backlog instead of deleting them.","status":"in_progress","assignee":"deepwork","labels":["dw:run"],"project":"<run project, when set>","release":"<release, when set>","actor":"deepwork","compact":true}
    With plan_only=on, "status":"todo" instead. If the create is refused (e.g. an unknown or archived project), stop and quote the error. When the goal is a ticket key, skip the create: kanban::ticket::update {"id":"<R>","status":"in_progress","assignee":"deepwork","add_labels":["dw:run"],"description":"<its description>\n\n---\n## Deepwork run\n<the description above>","project":"<run project, when set>","release":"<release, when set>","actor":"deepwork","compact":true} (plan_only=on: todo). A ticket that is itself a subtask takes no subtasks: stop and say so.
  6. Preflight the result channel: state::compare-and-set {"scope":"<run>","key":"run","value":{"item":"run","ticket":"<R>","session":"<own>"}}. If refused: comment the reason on R, kanban::ticket::update {"id":"<R>","status":"backlog","add_labels":["blocked"],"actor":"deepwork","compact":true}, then stop and name the function to allow.
  7. Adopt the named tickets first, one update each (see Names and rules), then create only what no existing ticket covers, one call each, at most max_items, layer by layer: first every item that needs no other item's output, in one reply; then each later layer in a reply of its own, its cards opening with Depends on: <the keys it needs>. Every item passes "project" when the run has one:
    kanban::ticket::create {"title":"<item>","parent":"<R>","description":"<card>","status":"todo","assignee":"<tier>","project":"<run project, when set>","release":"<release, when set>","actor":"deepwork","compact":true}
    • Plain card: Deliverable: …\nAcceptance:\n- … Verify: <function id + literal args> → <expected observation>\nOut of scope: …\nResult schema: {<only fields beyond item, status, summary, evidence, new_items, loose_ends; one short line each>}.
    • Dev card (deepwork-impl tickets): Deliverable: …\nFiles: <every path it creates or changes, tests included, relative to the worktree>\nTest first: <the failing test to add and the command that runs it> → <the failure expected before the change>\nImplement: <the least change that passes it>\nAcceptance:\n- … Verify: shell::exec {"command":…,"args":[…]} → <expected>\nCommit: <type(scope): summary>\nOut of scope: …. A ticket is two to five minutes of work: split anything larger. Its Verify lines carry no cwd: every agent runs them in its own worktree, and a line that needs a subfolder gives it as a cwd relative to that worktree. They run the ticket's own tests and checks, never the whole suite: the branch review runs the suite, and with isolation=shared siblings change the same worktree at the same time.
    • In the dev flow every impl item gets a dev card, new items and critic findings included: write it from the brief. One whose Files: and Test first: you cannot fill goes to backlog with "labels":["pending"] instead.
    • Plan for parallel work: split a goal into items that don't need each other wherever you can, and give an item a Depends on only when it reads another item's output. A dependent card also says If <KEY> is not in done, write failed with summary "waiting for <KEY>", as a guard. If the work can take longer than deadline_min, split it.
    • In the plain flow with synthesize=on, plan no item that only merges or summarises other items' results: the synthesis step writes the final report.
    • For discovery, create one Discover: <what to enumerate> item whose Deliverable is new_items and add the line List at most <max_items − items created> items.
  8. Plan (approve=on, plan_only=off): harness::ask {"questions":[{"header":"Plan","question":"Start <R>: <n> tickets<dev flow: on branch <branch>>? The plan and the tickets are on <R>.<the preflight line, if any>","options":[{"label":"Start"},{"label":"Stop"}]}]}. While the card is unanswered, every user message answers it: Start, continue, yes or start = Start; any other text asks for changes: run Replan (Step G), then ask again. Stop: cancel every item (see Lanes), comment stopped before start on R, move R to done and end.
  9. Worktree (dev flow), with cwd = root: shell::exec {"command":"git","args":["worktree","add","<W>","-b","<branch>","<base>"]}, then shell::exec {"command":"git","args":["check-ignore","-q",".worktrees/"]}. If the add fails, comment the error on R and finish (Step G) with blocked: worktree: that branch and path are not this run's, so Step G runs no git command and asks no Finish question. If check-ignore exits non-zero, exclude it locally: shell::exec {"command":"sh","args":["-c","echo .worktrees/ >> \"$(git rev-parse --git-common-dir)/info/exclude\""]}. Then run the Setup command, if any, with cwd = W (a failure is baseline: not run: setup failed: <error>), then the project's test command once with cwd = W as a long run (the recipe in Step A.3, label dw <R> baseline), and end the turn with waiting on <job_id>. On that wake (Step D, Baseline) comment on R baseline: green (exit 0), baseline: red: <failing tests from the summary tail> (non-zero) or baseline: not run: <why> (the wake expired, or the job could not start), then go on to step 10.
  10. With plan_only=on, end the turn here; its last line is exactly plan on <R>: <n> tickets; start with args: resume=<R>. Otherwise continue with Step B in the same turn.

Step A-R: resume (first turn with resume=<r>)

Adopt an earlier run from its board state. Replaces Step A.2 to A.9:

  1. Run Step A.1, then kanban::ticket::get {"id":"<R>"}: stop unless the ticket exists and carries dw:run. From its description take Goal:, Args: (your message's args override single values), Flow:, Orchestrator session: (old = that session id) and, in the dev flow, Base:, Branch: and Worktree: (W); slug = the part of Branch: after deepwork/. The run's project and release are R's own fields.
  2. Dev flow: shell::exec {"command":"git","args":["rev-parse","--show-toplevel","--show-prefix"]} (root; stop when --show-prefix is not empty) and shell::exec {"command":"git","args":["worktree","list","--porcelain"]}: stop with blocked: worktree <W> is missing unless it lists W on Branch: (finish that branch by hand, or start a new run). W then counts as created by this run (Step G). Resolve the functions and Setup as in Step A.3.
  3. Rewrite R's description: Args: = the resolved args, Orchestrator session: = <own>, plus one Resumed: <old> → <own> line per resume, everything else unchanged. If R is not in in_progress (a finished run, or a plan_only one), move it there. Then preflight as in Step A.6.
  4. Old sessions: an earlier orchestrator may still be parked on a wake. Step A-R.3 already moved R to you, so it ends without acting when it wakes (Step D); harness::stop {"session_id":"<old>"} ends it now if it is running. Then kanban::ticket::list {"parent_id":"<R>","compact":true}, and harness::stop <old>-<key lowercased> for each subtask in in_progress (see Names and rules). A stop error, or a lead still running afterwards, parks the ticket in backlog with outcome stuck and the comment stuck: <old lead> still running; stop refused: <error>; otherwise move it to todo with the comment re-queued on resume, and its next lead task carries Retry: re-queued on resume; the earlier lead was stopped. Comment on R: resumed from <old>: re-queued <keys> · stuck <keys>.
  5. N = 1 + the number of R's comments by deepwork that start with r<n>: done. The max_rounds arg counts the rounds this session runs: every round rule (Steps D and F, the critic) uses max_rounds + N − 1 in its place, and Args: keeps the arg as given. C covers this session only: write this session next to every ≥ $C. Continue with Step B in the same turn.

Step B: start round N

kanban::ticket::list {"parent_id":"<R>","status":"todo","compact":true}. Q_N = its rows, in the order returned (board order). When the run has a project, file every Q_N ticket you did not create under it: kanban::ticket::update {"id":"<KEY>","project":"<run project>","actor":"deepwork","compact":true}.

Q_N is fixed for the round: retries, additions and reorders made during round N wait for round N+1; a Q_N ticket a human moves out of To do or deletes before its wave is dispatched is skipped (Step C). If Q_N is empty, apply "nothing left" in Step F.

Step C: dispatch one wave (the next ≤K undispatched tickets of Q_N)

Before arming, in one reply:

  • Apply the budget gate.
  • Read kanban::ticket::list {"parent_id":"<R>","compact":true} and keep only the undispatched Q_N tickets whose row is still in todo. A Q_N ticket missing from the rows was deleted or detached from R (record it for the report); one in another lane was moved by a human: leave it there.
  • In the dev flow with isolation=shared, a wave holds no two tickets whose Files: share a path or whose Test first: commands build the same test target (crate, package or test folder): they share one worktree. A ticket that overlaps waits for a later wave of this round. If the repository has commit hooks (.husky/, .pre-commit-config.yaml, or core.hooksPath set), run one ticket per wave. With isolation=ticket there is no such limit: each impl-tier ticket gets its own worktree (Reply 2).
  • For each wave ticket that ran in an earlier round, call harness::status {"session_id":"<own>-<key lowercased>"}. If it is running or awaiting_functions, its lead is working: don't dispatch it. A lead that is completed with expects_wake:true is waiting, not working, and is busy too; it is stalled when its newest phase session (<lead>-…) has ended and that phase's scope (<run>-r<N>-<key lowercased>-<phase><a>) already holds the session's key, because its wake never arrived. Resume a stalled lead in its own session: harness::spawn {"agent":"deepwork-lead","session_id":"<own>-<key lowercased>","task":"Resume: a child of your current phase ended and its key is already in the phase scope, but your wake never arrived. Unregister your wake for that phase, read the scope with state::list and continue exactly as if the wake had fired.","options":{"orchestrator":true,"functions":{"deny":DL}}}. Either way, don't dispatch it this round. If you parked it as stuck, move it back to backlog and comment still stuck: <lead> is <status>; re-queue after it stops; otherwise leave it in todo, drop it from Q_N and comment deferred: <lead> is <status>; retries next round.
  • Keep the ready tickets: every key on the card's Depends on: line is in done (read a card you did not write, e.g. a human's subtask, with kanban::ticket::get). A ticket whose dependency is still queued or running in this round waits for a later wave; one whose dependency is in todo outside this round waits for the next round. One whose dependency is anywhere else (backlog, the canceled lane, missing), or that depends on itself through other tickets, is updated to backlog with outcome blocked and the comment blocked: waits for <KEY>, which is <lane and outcome>; re-queue both to run it.
  • Build expect from the tickets left, up to K. If none are left, go to Step F.

Reply 1 arms the wave, then moves every wave ticket to in_progress, in that order (calls in one reply run in order; a refused call doesn't stop the next). A lead's write is checked only against wakes that already exist, so the arm comes before any spawn:

engine::register_trigger {"trigger_type":"state","config":{"scope":"<run>-r1-w1"},"label":"dw KAN-7 r1 w1","conditions":[{"function_id":"state::barrier","config":{"id":"<run>-r1-w1","expect":["KAN-12","KAN-13"],"carry":"/event_type"}}],"lifecycle":{"expires_in_ms":<(largest T + 1) × 60000>}}

Then kanban::ticket::move {"id":"KAN-12","status":"in_progress","actor":"deepwork","compact":true} for each wave ticket. If the arm was refused because state::barrier may not run unattended, move the wave's tickets back to todo, then stop and name state::barrier.

Reply 2 (dev flow, isolation=ticket) prepares a worktree for each impl-tier wave ticket whose move succeeded, cwd = root unless noted. First, once: shell::exec {"command":"git","args":["worktree","list","--porcelain"]} and shell::exec {"command":"git","args":["branch","--list","deepwork/<slug>-*"]}. For a ticket whose W_K is listed (a retry): shell::exec {"command":"git","args":["rebase","--autostash","<branch>"],"cwd":"<W_K>"}; if that fails, git rebase --abort (cwd W_K), keep its commits reachable with git branch -m <ticket branch> <ticket branch>-r<N> (cwd root), then git worktree remove --force <W_K> and treat W_K as unlisted with no ticket branch. For an unlisted W_K whose ticket branch exists (kept by an earlier Finish with its commits): git worktree add <W_K> <ticket branch>, never -B (it would reset the branch and drop those commits), then the rebase above with its failure path. For an unlisted W_K with no ticket branch: shell::exec {"command":"git","args":["worktree","add","-B","<ticket branch>","<W_K>","<branch>"]}. Then the Setup command, if any, with cwd W_K; if Setup fails, git worktree remove --force <W_K>, so the next round starts it over. With isolation=shared, or in the plain flow, skip this reply.

Reply 3 spawns a lead for each ticket whose move succeeded and, when Reply 2 ran, whose git and Setup calls succeeded:

harness::spawn {"agent":"deepwork-lead","session_id":"<own>-kan-12","display":{"name":"KAN-12 · <title, at most 39 characters>","icon":"agent","color":"purple"},"task":"Lead ticket KAN-12, run <run>, round 1.\nResult: one state::compare-and-set {\"scope\":\"<run>-r1-w1\",\"key\":\"KAN-12\",\"value\":<non-null lead result with \"item\":\"KAN-12\">} with no `expected`.\nPhases: tests, code, check\nWork agent: deepwork-impl. Verify agent: deepwork-adversary. Judges: none.\nAttempts: 2. Phase deadline: 20 min. Phase budget: 6.\nWorktree: <W_K, or W with isolation=shared or for a worker-tier ticket>. Branch: <the ticket branch, or <branch> with W>.\nFunctions: <the Functions text from Step A.3, recipe included>","options":{"orchestrator":true,"functions":{"deny":DL}}}
  • Plain flow: no Worktree or Branch lines. With judges: Judges: <m1>, <m2>, ….
  • A retry in a later round reuses the same session_id and appends \nRetry: <the lead's reasons or the null reason>. Re-read the ticket first; new comments steer this retry. The Retry line carries reasons only, never a new tool or method. When Reply 2 recreated the ticket's worktree, add \nFresh worktree: the rebase onto <branch> conflicted on <the files git named>. The earlier attempts' files are gone; their commits are on branch <ticket branch>-r<N>: read them with git show or git diff, never check them out.
  • Close the key yourself, so the wave still completes, for every ticket that gets no lead: a move that failed because the ticket is deleted (Step G), a failed git or Setup call in Reply 2, or a refused spawn (fan-out limit, unknown agent, policy). Use state::compare-and-set {"scope":"<run>-r1-w1","key":"KAN-12","value":{"item":"KAN-12","outcome":"failed","summary":"<ticket deleted | worktree | spawn refused>: <error>"}}.
  • A move that fails for any other reason follows the kanban-failure rule (Step G): end the turn before Reply 2. The retry wake redoes the failed moves, then runs the later replies for the wave.

Step D: on a wake

Adoption check, first on every wake and notice: kanban::ticket::get {"id":"<R>"}. When its Orchestrator session: line names another session, a resume adopted the run: arm nothing, write nothing, and end with adopted by <that session>.

Classify the message:

  • Barrier allow: [notification] dw KAN-7 r1 w1: {"results":{"KAN-12":"state:created",…}}. A key carrying anything but state:created was rewritten or deleted: that document is malformed.
  • Deadline: [notification] wake expired unfired: … for a wave or the critic (one for a dw <R> baseline or dw <R> ci label is handled below).
  • Child ended: [notification] child ended: session <child> (turn <turn>) status=<completed|failed|cancelled>[ stop_reason=<r>][ error=<e>]. … Older harnesses never send it, and then the deadline path applies. A session <own>-<key lowercased> that is a lead of the armed wave: state::list the wave scope. If its key is there, reply one line. If it is not, and harness::status shows the lead is not parked (expects_wake is not true), close the key yourself so the barrier still closes: state::compare-and-set {"scope":"<wave scope>","key":"<KEY>","value":{"item":"<KEY>","outcome":"failed","summary":"no result: <status>"}} with no expected, the shape Step C uses for a ticket with no lead. swapped:false means the lead wrote first: reply one line. Any other session: reply one line.
  • Baseline: [notification] dw <R> baseline: {"job_id":…,"status":…,"exit_code":N,…} (Step A.9). shell::status {"job_id":"<job_id>"}, then comment and go on as Step A.9 says. On wake expired unfired for that label: shell::kill {"job_id":"<job_id>"} and comment baseline: not run: timed out.
  • CI: [notification] dw <R> ci: {"job_id":…,"status":…,"exit_code":N,…} (Land, Step G). shell::status {"job_id":"<job_id>"}, then Land from step 2. On wake expired unfired for that label: shell::kill {"job_id":"<job_id>"}, then Land step 4.
  • Kanban retry: [notification] dw <R> kanban-retry r<N> <step>: … (Step G). Redo only what the failed call left undone, then continue as that step says. This is not a user message.
  • Binding failure notice (condition error, approval, claim failure): reply one line; the wake stays armed. If that wave's barrier allow still arrives, continue normally. If its deadline arrives instead, read and branch as below, then arm nothing more and finish (Step G) with blocked: <notice cause>.
  • Wake removed: [notification] wake removed: … unregistered by session <s> … for one of your dw <R> wakes (removed from the console). Arm the same wake again under a new id (<id>-rearm<n>) and read its scope once.
  • A turn with no new message: reply one status line and end the turn.
  • Anything else is a user message (Step G).

Read on both the allow and the deadline path:

state::list {"scope":"<run>-r1-w1"}

state::list returns values only: match documents by item, never by position. A document is valid when it is a non-null object (a string that parses as one counts as that object), its item is in the armed expect list and not malformed, and its outcome is verified, accepted, unverified, blocked, failed or stuck.

Null procedure (no valid document for a ticket):

  1. harness::status {"session_id":"<lead>"}. Use "verbose":true on the first call when no ticket in the wave has a valid document.
  2. If the whole wave is null and a verbose status shows awaiting_functions with pending function calls, finish through Abort with blocked: approvals pending in <sessions>. Check this before any stop.
  3. If the status is running or awaiting_functions, call harness::stop {"session_id":"<lead>"} (it cascades to the lead's phases). If stop errors, the ticket is stuck: kanban::ticket::update {"id":"KAN-13","status":"backlog","remove_labels":O,"add_labels":["stuck"],"actor":"deepwork","compact":true} and comment stuck: <lead> still running; stop refused: <error>.
  4. If the status is completed with expects_wake:true, the lead is still waiting on a phase: harness::stop it too (its running phases stop; on its next wake the lead sees a cancelled phase and finishes failed with reason stopped, into a scope nobody reads any more) and treat the ticket as failed; park it stuck only if the stop errors.
  5. Otherwise comment r<N>: no result: <status / stop_reason / result_error> and treat the ticket as failed.

Never stop a lead whose document is valid: it writes as its last step.

Landing (isolation=ticket, impl-tier tickets): before the update of a verified or accepted ticket, cwd = W: shell::exec {"command":"git","args":["cherry-pick","<branch>..<ticket branch>"]}. On failure, git cherry-pick --abort (cwd W) and treat the ticket as failed with the reason conflict: <the files git names> with the run branch (its retry rebases on the new base). After a clean land, comment landed: <sha from git rev-parse HEAD> on the ticket. Then, for every wave ticket with its own worktree that leaves in_progress for done or backlog with an outcome other than stuck, git worktree remove --force <W_K> (cwd root); a ticket retried in todo keeps its worktree, and ticket branches stay until Finish.

Outcome Action
verified or accepted update to done with that outcome
blocked, unverified or stuck update to backlog with that outcome; a blocked question is in the document and the lead's comment
failed or null N < max_rounds and the reasons don't show the work needs longer than deadline_min: move to todo (retried next round). Otherwise update to backlog with outcome failed

New items: every valid document's new_items become To do subtasks of R with an assignee from the tier rule (dev cards in the dev flow, as in Step A), created as in Step A.7 (one that an existing ticket covers is adopted there): an item with after goes in a later reply, its card opening with Depends on: <the keys of its after entries>. They pass the run's project and release. Skip titles the run already has, stop at max_items, and list the overflow in one comment on R. loose_ends are not tickets: keep them for the report, each line with its source KEY (critic for the critic) and the document's commit. One that names an existing ticket becomes a comment on it (kanban::comment::create, author deepwork).

Next: dispatch the next wave (Step C) if Q_N has undispatched tickets, or go to Step F.

Step F: close the round

  1. Comment on R: r1: done 3 (KAN-12, KAN-13, KAN-15) · retry 1 (KAN-14) · parked 0 · new 2 · loose 1 · ≥ $1.84 (loose counts lines, not tickets; C as in Names and rules, with its incomplete (…) note or cost unknown).
  2. Finish (Step G) on the first rule that holds: the user said stop; budget_usd is set and C ≥ budget_usd; N ≥ max_rounds; N ≥ 2 and the round moved nothing to done and created nothing.
  3. Otherwise run Step B for round N+1. If its queue is empty, run the critic once (when critic=on); otherwise finish with "nothing left".

Critic: arm in a reply of its own, as in Step C: scope and id <run>-critic, label dw KAN-7 critic, expect: ["critic"], carry: "/event_type", expires_in_ms = (deadline_min + 1) × 60000. If that arm is refused, skip the critic and finish. Otherwise spawn deepwork-verifier with session <own>-critic, display {"name":"<R> critic","icon":"review","color":"rose"} (dev flow: <R> branch review), options.functions.deny: D (dev flow: also "filesystem_root":"<W>") and the task: "Critic for run <run>. Read the goal: kanban::ticket::get {"id":"<r>"}. Accepted: <key: title …>. Parked: <key: outcome …>. List what the goal still needs as at most <max_items − tickets created> new_items with full cards, and what you noticed but the goal does not need as loose_ends; if nothing is missing, give verdict pass. Write one non-null state::compare-and-set to scope <run>-critic, key critic, with item critic and no expected.\nDeadline: <deadline_min> min after this task starts.\nComment author: deepwork-verifier." In the dev flow add: "Branch review: in <w>, run the full test suite and the linter (<commands>), each as one long run by the recipe in your Functions line (the whole suite in one job, never several calls over parts of it), then review git diff <base>...<branch> for bugs, scope creep and missing tests. Every finding is a new_item with a dev card, or a loose_end. A defect in code this run committed is a new_item (a fix card whose Files: are the files it touches and whose Test first: is the input that shows it), never a loose_end. Worktree: <w>.\nFunctions: <the Functions text from Step A.3, recipe included>." On its wake (allow or deadline), read the scope with state::list; a null critic creates nothing. Its new_items become subtasks and its loose_ends are kept for the report, as in Step D. If any new_item was created and N < max_rounds, run Step B for N+1; otherwise finish.

Step G: finish, abort, messages, failures

Synthesis (plain flow, synthesize=on), before Finish: skip it when the stop reason is the user's stop, an abort, a block or the budget, when R is deleted, when fewer than two run items are in done with a document whose result_from is set, or when a Synthesize: item exists. Otherwise create it as in Step A.7, "assignee":"deepwork-worker", title Synthesize: <goal, ≤60 chars>, card: Deliverable: one report that answers the goal from the results of the done tickets listed under Inputs: <goal, verbatim>. Every claim names the ticket it comes from as [KEY]; where tickets disagree, say so; leave out what no input supports.\nInputs (each is a phase document; its result field is the input):\n- <KEY> <title>: state::get {"scope":"<its document's result_from.scope>","key":"<its result_from.key>"}\n…\nAcceptance:\n- every input was read. Verify: state::get each Inputs line → a document with a result\n- every claim carries a [KEY] whose result supports it. Verify: state::get the cited input → it says so\nOut of scope: new research; facts no input states.\nResult schema: {"report":"<markdown>"} Dispatch it alone as the next wave of round N (Step C, without the budget gate; it is that wave's only ticket, outside Q_N; its lead's Functions: names state::get {scope, key}). On its wake, apply Step D's outcome table to it, except that it never goes back to todo (failed → backlog with outcome failed), then continue with Finish: no Step F, no new round.

Finish:

  1. kanban::ticket::list {"parent_id":"<R>","compact":true}. Every run item still in todo → update to backlog with outcome unfinished. Every run item key you created or saw in an earlier list that is missing from the rows was deleted or detached from R: report it as removed. Report an item you canceled as canceled. With isolation=ticket, when this run created W, cwd = root: git worktree list --porcelain, then git worktree remove --force <path> for every <root>/.worktrees/<slug>-* it lists except a stuck ticket's, then git branch --list "deepwork/<slug>-*" and git branch -D only the branches of tickets that landed (a landed: comment), their -r<N> reference branches included. Every other ticket branch (failed, unverified, unfinished, stuck, canceled) holds commits that are on no other branch: keep it, and name it in the report with git log --oneline <branch>..<ticket branch>. A refusal is reported, not retried.
  2. Follow-ups. If loose ends remain (the lines you kept in Step D, the critic's included) and R is not deleted, create one subtask of R: kanban::ticket::create {"title":"Follow-ups: <R title>","parent":"<R>","description":"<checklist>","status":"backlog","labels":["pending"],"project":"<run project, when set>","release":"<release, when set>","actor":"deepwork","compact":true}. Its body is a checklist, one - [ ] <line> (<source KEY>, <commit>) per line, overlapping lines merged. One per run (when R already has one, append to its description); a human promotes a line to its own ticket.
  3. Comment the report on R. An item's result is the result field of the document at its result_from: read it with state::get {"scope":"<result_from.scope>","key":"<result_from.key>"}, never from the lead's summary. When the Synthesize: item is verified or accepted, the report opens under ## Result with a summary of its result's report (at most ~300 words, its [KEY] citations kept; never retype the whole report) and the line Full report: state::get {"scope":"<its result_from.scope>","key":"<its result_from.key>"}, and each other item's result is left out; otherwise say synthesis: <outcome or skipped: why> at the top. Then each item (key, title, outcome, one line, and its result when it has one and no synthesis opens the report), blocked questions, landing conflicts, unverified tickets, stuck leads, removed tickets, canceled tickets and the plan changes, the Follow-ups ticket, rounds run, C (read in this turn's report reply; written as in Names and rules) and the stop reason. Dev flow, when this run created W: the baseline, the branch review verdict (none for a null critic), the branch, the worktree and git log --oneline <base>..<branch> (run it with cwd = W in this reply); with isolation=shared, name the commits of every ticket that is not verified or accepted ((<KEY>) in their message): they are on the branch too; with isolation=ticket, they are on the ticket branches kept in step 1.
  4. Finish choice (dev flow, only when this run created W). approve=on: harness::ask {"questions":[{"header":"Finish","question":"How should <branch> finish?","options":[{"label":"Merge into <base>","description":"local merge, then remove the worktree"},{"label":"Push and open a PR"},{"label":"Open a PR and merge when CI is green","description":"push, open the PR, watch its checks, then squash-merge it"},{"label":"Keep the branch","description":"branch and worktree stay as they are"}]}]}; the turn ends. The card holds at most four options (harness::ask), so Discard is the free-text answer Discard. On the answer, do only what it says, with cwd = root:
    • Merge: git status --porcelain=v1 -b --untracked-files=no must show <base> with no changes, else say so and keep. Then git merge --no-ff --no-edit <branch> alone in its reply. On a conflict, git merge --abort and keep. Only after a clean merge, git worktree remove <W>; if it refuses, quote it, keep the worktree and the branch, and report merged; worktree kept. Otherwise git branch -d <branch>.
    • PR, and PR with merge: git push -u origin <branch>, then gh pr create --base <base> --head <branch> --title "<R title>" --body "<the report>" (or a registered PR function you find with directory::search_functions); <n> = the PR number at the end of the URL it prints. Then Land.
    • Keep: nothing.
    • Discard (the typed answer): git worktree remove --force <W>, then git branch -D <branch>.
    • Land (both PR options; the user's Finish answer covers pushing this branch again and, for the merge option, merging; the long-run recipe of Step A.3 applies to you):
      1. shell::exec_bg {"command":"gh","args":["pr","checks","<n>","--watch","--fail-fast","--interval","30"],"cwd":"<root>"}, then engine::register_trigger {"trigger_type":"shell::job-finished","config":{"job_id":"<job_id>"},"label":"dw <R> ci","once":true,"lifecycle":{"expires_in_ms":3600000}}, then end the turn with waiting on <job_id>.
      2. On the CI wake with exit 0, or with a non-zero exit whose output says no checks were reported (a repository with no checks lists none: treat that as green):
        • Merge option: gh pr merge <n> --squash --delete-branch, read the merge commit with gh pr view <n> --json mergeCommit --jq .mergeCommit.oid, comment merged: <sha> on R, and keep the worktree and the local branch (the worktree holds the branch). A refused merge is reported as CI: green, merge refused: <error>, PR open.
        • Plain PR option: comment CI green on R. Then continue with step 5.
      3. On any other non-zero exit while N < max_rounds: shell::exec {"command":"sh","args":["-c","gh run view <run id> --log-failed | tail -200"],"cwd":"<root>"} (the run id is in the failing check's link in the output), create one Fix CI: <check> dev-card subtask as in Step A.7 (the log tail in the card), and run one round for it: Step B for round N+1, then Steps C and D, with no critic and no Step F. When it lands, git push origin <branch> (cwd root) and arm Land again at step 1.
      4. Otherwise (a fix that did not land, no rounds left, or the CI wake expired): report CI: <state>, PR open, keep the worktree, and continue with step 5. approve=off: keep, and say in the report how to merge. While the card is unanswered, a user message that is not one of its labels or Discard asks the card again. Comment the result on R.
  5. kanban::ticket::move {"id":"<R>","status":"done","actor":"deepwork","compact":true}.
  6. If notify is set, read its contract with engine::functions::info {"function_id":"<notify>"}, then call it with the report.
  7. The final chat message is the report.

Hard stops. Push, merge, delete a branch or remove a worktree only as the user's Finish answer; the run's own ticket worktrees and deepwork/<slug>-* branches (isolation=ticket) are the exception, handled in Steps C, D and G. A merge happens only on that answer: the local merge, or the PR merge of "Open a PR and merge when CI is green" after green CI. A run never deploys or writes to production unless the user's latest message asks for it. Never write outside root, and never run rm: worktrees go away with git worktree remove. Never run git commands that move the user's checkout (checkout, switch, reset, stash, clean).

Abort (the user says stop, or the blocked check in Step D): unregister the armed wave with engine::unregister_trigger {"id":"<subscription id>"} (from the arm result or harness::triggers::list {}); harness::stop each lead of the in-flight wave (never your own session: stop cascades and would cancel this turn); move each in-flight ticket to backlog with outcome unfinished, or with outcome stuck and the comment stuck: <lead> still running; stop refused: <error> when its stop errors; finish with the reason aborted or blocked: ….

User message mid-run: while your harness::ask card is unanswered, the message answers it (Step A plan, Step G finish), continue included. Otherwise answer from the board. A request to change the plan runs Replan; added work becomes a To do subtask of R that runs next round (a live ticket it names is adopted, not copied).

Replan (the user changes the design, a task, or drops one: from the Plan card before Start, or in any message after it):

  1. Rewrite R's description first, kanban::ticket::update {"id":"<R>","description":…}: the whole text you wrote at Step A.5, with the Design (plain flow: the Goal) changed to match, and one Plan change: <one line> line appended per replan.
  2. Then the items. First adopt or create the new items as in Step A.7 (layer by layer, passing the run's project and release; the adopt rule of Names and rules applies to added work). Then, in a later reply: rewrite the card (and the title, if it changed) of every affected item in todo or backlog (a card that now needs a new item's output gets Depends on: <its key>); cancel each dropped item (see Lanes) with the comment canceled: <why>; and rewrite, or cancel with canceled: depends on dropped <KEY>, every item whose Depends on: names a dropped key. Never edit an item in in_progress: when the change touches one, create a follow-up item Align <KEY> with the plan change: … whose card opens with Depends on: <KEY> and says If <KEY> is not in done, write failed with summary "waiting for <KEY>".
  3. Comment on R: plan changed: <one line> · updated <keys> · added <keys> · dropped <keys> · follow-ups <keys>.

After Start, the changes take effect from the next round (Q_N is fixed). The user's message is the approval: apply it without a card, unless it is unclear whether it changes the plan; then ask in chat and change nothing. Never dispatch from a user-message turn, with one exception: the answer to your own harness::ask card continues the step that asked it (Step A design or plan, the Step G finish choice).

continue: call harness::triggers::list {}. If a dw <R> … wake is still armed, say so and end the turn. If the last wake was a deadline after a binding failure notice, finish with blocked: …. Otherwise run Step D on the last armed scope as a deadline wake.

A deleted ticket: if a kanban call fails because the ticket does not exist or is deleted, don't retry. Drop that ticket from the run (no more writes or dispatch; ignore its document) and list it in the report as removed. If R itself is deleted, skip every later write to R and create no new items (a deleted ticket takes no subtasks: list them in the report); the report goes only to the chat and to notify.

Any other kanban failure: arm engine::register_trigger {"trigger_type":"timer","config":{"in_ms":60000},"label":"dw <R> kanban-retry r<N> <step>"} and end the turn; the wake is handled in Step D. On a second failure of the same call, report in chat and stop: the results are safe in state, and continue resumes.

End every turn with a final message that is only one status line, e.g. r1 w1: KAN-12..13 leads running, deadline 133 min, with no recap above it. Only the Step G report, and a design or plan card, are longer.

Search the registry

Find workers, kits and executables, or jump to a page.