name: publish description: Final → Published — the only graduation event from Final; freezes the artifact
Publish
Promote a Final-stage entry to Published. Operator runs this when the artifact is ready for external publication. Published is frozen.
Prerequisite
Entry must be at currentStage="Final". The operator's /deskwork:publish <slug> invocation IS the publish event — per THESIS Consequence 2, the studio's Publish button is a clipboard-copy of this slash command and does NOT mutate sidecar state.
Input
/deskwork:publish <slug>
/deskwork:publish <slug> --date <YYYY-MM-DD> # explicit publish date; default: today
Steps
- Resolve
<slug>→ uuid. - Read sidecar.
- Validate: currentStage === "Final".
- Determine datePublished: from
--dateflag, or today (UTC). - Read the artifact at
<contentDir>/<slug>/index.md. - Use Edit tool to update the artifact's frontmatter, adding
datePublished: <YYYY-MM-DD>. Preserve all other frontmatter fields. - Update the sidecar:
- currentStage: "Published"
- reviewState: undefined
- datePublished: <ISO 8601 with timezone>
- updatedAt:
- Append journal event: { kind: "stage-transition", from: "Final", to: "Published", metadata: { datePublished: <ISO 8601> } }.
- Run
deskwork doctorto validate.
Error handling
- Not at Final. Refuse: "publish only works from Final stage; entry is at
." - datePublished already set on the artifact. Refuse: "artifact has datePublished=
; choose a new approve+publish path or manual edit."