Schema
ArchieQueryStepDefinition
Archie-query step β runs a natural-language query through the V4 chat orchestrator and threads its answer into the workstream. Stuart 2026-05-19: 48 templates on dev use ``type='archie_query'`` today (most-common step type in the DB) but the write-side schema rejected it as 422. Adding the model unblocks PATCH for every workstream that mixes archie_query with other types β the read shape stored in JSONB is already what the V4 chat-orch executor consumes via ``step.get("instruction") / step.get("expected_outputs")``.
| Field | Type | Description |
|---|---|---|
idrequired | string | β |
namerequired | string | β |
type | string | β |
description | string | null | β |
depends_on | string | object[] | β |
stage | string | null | β |
timeout | string | null | β |
retry_policy | RetryPolicy | null | β |
error_handler | StepErrorHandler | null | β |
emit_artifact | EmitArtifactSpec | null | β |
optional | boolean | β |
continue_on_error | boolean | β |
halt_conditions | HaltCondition[] | βitem shape |
parameters | StepParameter[] | βitem shape |
guards | StepGuard[] | βitem shape |
impact_level | "low" | "medium" | "high" | "critical" | Impact classification for steps.lowmediumhighcritical |
run_mode | "propose" | "auto_run" | Execution mode for steps.proposeauto_run |
requires_approval | boolean | β |
metadata | object | null | β |
examples | StepExample[] | null | Attached example files for this step. Each entry pairs a platform.file_uploads.file_id with a role + tags + notes so the runtime can shape its instruction. Bounded at 20 to keep a reasonable upper limit on the prompt preamble. |
applies_when | string | null | CEL predicate evaluated at MATERIALIZATION (not at step execution): the step is marked skipped when it evaluates False. Stored verbatim β the expression is parsed by celpy at launch, so any coercion here would change its meaning. |
tags | string[] | null | Categorical labels on the step itself (e.g. 'pdf-read', 'coutts', 'fy25'). Free-form; recommended tag set is documented per workstream surface. |
firm_question_codes | string[] | null | Blocker codes this step may raise that are questions the run asks the firm later, not reasons to stop. A code listed here is carried past the blocker barrier (and recorded on the run's carried_blockers) unless the resolution form refuses it. Matched exactly against the blocker codes this step itself raises; a code not listed here still stops the run. |
decides | any | treatment | classification | difference, when the step decides one |
domain_question | any | {domain, issue}: the domain question asked |
no_domain_reason | any | {reason, card_link}: no domain covers it |
instructionrequired | string | Natural-language query the runtime sends to the chat orchestrator. |
inputs | object | null | Optional Jinja2 input bindings ({{ inputs.* }} / {{ outputs.* }}). |
expected_outputs | object[] | null | Output schema hints (name + type per entry). |
skill_slugs | string[] | null | Skills that should be available to the chat orchestrator for this query. |
confidence_threshold | number | null | Minimum confidence the runtime should treat as acceptable before auto-continuing (drives confidence-gated review). |
tool_hints | string[] | null | V4 tool slugs to bias the orchestrator toward (e.g. 'read_pdf_document'). |
model_role | string | null | A LOGICAL ROLE from llm/routing/policy_seed.json β e.g. 'accounting_review' β never a model id. The seed binds the role to a ModelType and ModelType absorbs version churn, so promoting a model is one line in the seed rather than an edit to every workstream. This is the only way an archie_query step can request the accounting fine-tune; naming the step after a model routes nothing. |
deterministic | boolean | null | When true, run this step's specialist call at temperature=0 with extended thinking disabled so the same input is extracted identically every run. For structured-extraction steps only. |