# Specify a WorkStream Before Drafting Its Steps

> Starts the design interview for a workstream from the description input and returns its spec: each decision with its question, the builder's proposal…

POST /api/v1/skills/workstream.design/invoke

Starts the design interview for a workstream from the `description` input and returns its spec: each decision with its question, the builder's proposal, its reason, its citation and its status, plus the `spec_hash` and the next question to answer. The spec is stored so workstream.spec can read it back and workstream.spec.answer can settle open decisions. It creates no steps and no workstream.

Body parameters

description string Required

Natural-language description of the workstream to specify.

Example Monthly close for SaaS clients with deferred revenue tracking.

topic_id string

Topic to anchor the design interview to — permakey (preferred) or UUID.

prior_draft_id string · uuid

Optional prior draft to iterate on instead of starting a new interview.

name string

Optional working name; context for the authoring agent, not a constraint.

file_ids array of strings

Source documents the questions come from. With none, the tool says it has nothing to read rather than asking generic shape questions.

thread array of objects

Prior authoring frames/messages for one-question-at-a-time refinement.

draft_key string

Stable caller identity for this conversational interview.

target_execution_mode enum · default inline

Canonical authoring creates inline WorkStreams. The legacy containerized authoring destination is refused; bounded agentic work uses agent_run steps.

inline containerized

idempotency_key string

Caller-supplied stable token. Replaying within 24h resumes the same interview rather than starting a duplicate.

Returns

Skill executed successfully

skill string Required

Example workstream_design

output object Required

The interview's spec: decisions with question/proposal/reason/citation/status.

Design stops BEFORE the proposal: no step list, no draft id. The decisions persist to the spec store so `workstream_spec` can read them back and `workstream_spec_answer` can answer one open decision.

output.stub_fields array of strings

output.warnings array of strings

output.decisions array of objects

The spec's decisions — each with its question, the builder's proposal, its reason, its citation, and its status (open/answered).

output.spec_hash string

Content address of the persisted spec; changes when an answer changes.

output.question string

One material clarification to answer on the next turn.

output.frames array of objects

Visible research, tool, and question transcript for this turn.

output.authoring_provenance object

Logical role, exact provider/model and content-addressed contract version.

output.error string Deprecated

output.error_envelope

Canonical structured error. Populated on interview failure.

correlation_id string Required

Errors

Status Type When

401 AUTH.TOKEN_INVALID Authentication required

403 PERMISSION.CAPABILITY_DENIED Insufficient permissions

404 SKILL.NOT_FOUND Skill not found

422 VALIDATION.INVALID_FORMAT Validation error

429 RATE_LIMIT.USER Rate limit exceeded

5XX INTERNAL.UNKNOWN Internal server error

[Previous ← Promote a Workstream Draft](https://heyarchie.com/en-gb/developers/api-reference/authoring/promote-a-workstream-draft/)[Next Draft a New Workstream Conversationally →](https://heyarchie.com/en-gb/developers/api-reference/authoring/draft-a-new-workstream-conversationally-post/)

```
curl https://uk.heyarchie.com/api/v1/skills/workstream.design/invoke \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{
       "description": "Monthly close for SaaS clients with deferred revenue tracking.",
       "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
     }'
```

```
from heyarchie import Archie
archie = Archie(api_key="sk_...")
result = archie.skills.invoke(
    "workstream.design",
    description="Monthly close for SaaS clients with deferred revenue tracking.",
    topic_id=None,
    prior_draft_id=None,
    name=None,
    file_ids=["00000000-0000-0000-0000-000000000000"],
    thread=[{}],
    draft_key=None,
    target_execution_mode="inline",
    idempotency_key=None,
)
print(result)
```

```
import { Archie } from "heyarchie";

const archie = new Archie({ apiKey: "sk_..." });
const result = await archie.skills.invoke("workstream.design", {
  "description": "Monthly close for SaaS clients with deferred revenue tracking.",
  "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
});
console.log(result);
```

Response

```
{
  "skill": "workstream_design",
  "output": {
    "decisions": [
      {
        "document_id": "3e8a1d65-92b7-4c0f-a4d9-6b1f0c7e2a83",
        "id": "close-deadline",
        "options": [
          {
            "id": "o1",
            "label": "Working day 5",
            "value": "wd5"
          },
          {
            "id": "o2",
            "label": "Working day 8",
            "value": "wd8"
          }
        ],
        "page": 2,
        "proposal": "wd5",
        "question": "By which working day must the close be finished?",
        "reason": "The close checklist sets the client pack deadline at working day 5.",
        "status": "open"
      }
    ],
    "question": "By which working day must the close be finished?",
    "spec_hash": "9b1e4c7a02d35f68"
  },
  "correlation_id": "<string>"
}
```

```
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "retry_after_seconds": "<integer>"
  }
}
```

Every response also carries X-Request-ID. Quote it if you write to us about a call.
