Operating system set to macOS
Documentation jurisdiction set to United States
Sign inConnect Claude

Invoke Skill Workstream Draft

post/api/v1/skills/workstream.draft/invoke

Draft a new workstream conversationally β€” describe what you want and Archie produces a structured, reviewable workstream definition with typed steps, dependencies, and validation. Produces unified drafts targeting either inline or containerized execution mode. The canonical drafting entry; the legacy `playbook.creator` slug is retained only for API back-compat.

Describe the workstream you want in the `description` input and Archie drafts a structured, reviewable definition with typed steps, dependencies and validation. The reply gives the draft id, name, step count, validation warning count and version, or the one question to answer next. Drafting never activates a workstream; workstream.commit does that.

Request bodyapplication/json

FieldTypeDescription
descriptionrequiredstringNatural-language description of the workstream to draft.
topic_idstring | nullTopic to anchor the draft to β€” permakey (preferred) or UUID.
prior_draft_idstring (uuid) | nullOptional prior draft to iterate on instead of creating a new one.
namestring | nullOptional working name; context for the authoring agent, not a constraint.
file_idsstring (uuid)[]Source documents the authoring agent must read completely before drafting.
threadobject[]Prior authoring frames/messages for one-question-at-a-time refinement.
item shape
Empty object.
draft_keystring | nullStable caller identity for this conversational draft.
target_execution_mode"inline" | "containerized"Canonical authoring creates inline WorkStreams. The legacy containerized authoring destination is refused; bounded agentic work uses agent_run steps.
inlinecontainerized
idempotency_keystring | nullCaller-supplied stable token. Replaying within 24h returns the previously-created draft id rather than generating a duplicate.

Responses

200Skill executed successfully
FieldTypeDescription
skillrequiredstringβ€”
outputrequiredobjectVisible draft identity or the next single material clarification.
show nested
FieldTypeDescription
stub_fieldsstring[]β€”
warningsstring[]β€”
draft_idstring (uuid) | nullNewly-created draft id.
namestringWorking name the LLM gave the draft.
step_countintegerNumber of steps the LLM generated.
target_execution_mode"inline" | "containerized"Execution mode the draft was generated for.
inlinecontainerized
validation_warning_countintegerNumber of validation warnings on the draft. Non-zero is fine for drafts; commit will reject if any blocking warnings remain.
versioninteger | nullPersisted WorkStream version.
statusstring | nullExplicit lifecycle status; authoring never activates the WorkStream.
questionstring | nullOne material clarification to answer on the next turn.
framesobject[]Visible research, tool, question and proposal transcript for this turn.
item shape
Empty object.
authoring_provenanceobjectLogical role, exact provider/model and content-addressed contract version.
show nested
Empty object.
errorstring | nullβ€”
error_envelopeany | nullCanonical structured error. Populated on draft generation failure.
correlation_idrequiredstringβ€”
401Authentication required
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
403Insufficient permissions
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
404Skill not found
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
429Rate limit exceeded
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
5XXInternal server error
FieldTypeDescription
errorrequiredobjectβ€”
show nested
FieldTypeDescription
typerequiredstringβ€”
coderequiredstringβ€”
messagerequiredstringβ€”
paramstringβ€”
retry_after_secondsintegerβ€”
curl https://api.dev.arch.ie/api/v1/skills/workstream.draft/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "description": "string",
       "topic_id": null,
       "prior_draft_id": null,
       "name": null,
       "file_ids": [
         "00000000-0000-0000-0000-000000000000"
       ],
       "thread": [
         {}
       ],
       "draft_key": null,
       "target_execution_mode": "inline",
       "idempotency_key": null
     }'