跳转到内容
EN

Read the computed todo list of a draft

Code Mode: praxis.studio.works.drafts.status.list

HTTP: GET /studio/v1/works/{work}/drafts/{draft}/status

Read what is outstanding in one draft, computed from the data rather than from a plan: a unit without an intent, a body behind its intent, an unclaimed brief point, a failed check, a stale rendition. Each item names the layer it belongs to and suggests the call that resolves it. Follow the list instead of inventing an order, and re-read it after a batch of writes.

签名

praxis.studio.works.drafts.status.list(args:{path:{/** e.g. "wu-gang" */ work:string;/** e.g. "novel" */ draft:string}}):Promise<{/** Draft the todo list was computed for. e.g. "drf_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ draft:string;/** Content revision of the draft when the list was computed; a later write makes the list worth recomputing. e.g. 96 */ revision:number;/** Outstanding items in layer order, each naming the call that would resolve it. */ todos:Array<{/** What is outstanding, chosen from a closed set so a caller can branch on it instead of reading the text. */ kind:"goal_incomplete"|"brief_points_unplaced"|"no_structure"|"intent_missing"|"intent_ahead_of_body"|"body_missing"|"draft_stale"|"work_adaptation_stale"|"prop_missing"|"check_failed"|"review_unresolved"|"rendition_stale"|"rendition_missing"|"publish_blocked";/** Which of the seven layers this item belongs to, used to order the list; the layers are always in the same order. */ layer:"goal"|"frame"|"task"|"reference"|"body"|"coherence"|"rendition";/** Unit this item is about, present when the item points at one unit rather than the whole draft. e.g. "unt_01JQ8Z3M9K4V7B2N6C5X0YTRHW" */ unit?:string;/** In-work number of that unit, which is what the unit path segment of a call takes. e.g. 12 */ number?:number;/** The item in words, written to be shown to a person as is. e.g. "第 12 节还没有正文" */ text:string;/** For a check_failed item, the key of the failing check, so a program can act on it without parsing the text; a unit that already has an item for it gets no separ e.g. "body_total_chars" */ check?:string;/** Suggested next call for this item, offered as guidance rather than a fixed script. e.g. "praxis.studio.works.units.retrieveContext" */ call?:string}>;/** The same items rendered as a Markdown checklist, ready to hand to a writer or to paste into a plan. e.g. "- [ ] 第 12 节还没有正文" */ markdown:string}>;

参数

名称位置类型必填说明
workpathstring是The work being addressed, either its organization-unique slug or its wk_ identifier; a slug case is what a person would say, and a renamed slug still resolves through its old value.
draftpathstring是Draft being addressed, either its in-work key such as novel or its drf_ identifier; a key renamed earlier still resolves through its previous value.

响应

状态码内容类型说明
200application/jsonThe draft todo list in layer order, with a Markdown rendering of the same items.
400application/jsonINVALID_PARAMS means a field is missing, malformed or not allowed for this resource; correct the named field and repeat the call.
401application/jsonThe API key is missing, invalid or carries no organization; send a valid organization key in the Authorization header.
404application/jsonWORK_NOT_FOUND or DRAFT_NOT_FOUND means the work or the draft inside it is not reachable; use the slug and the draft key from the lists, or resolve a loose name first. A draft renamed earlier still answers under its previous key.
500application/jsonINTERNAL means the request could not complete; re-read the resource before retrying a write, because the write may already have landed.