From 871ed3192e6714a60d0e824645dcd625ae0f7f4d Mon Sep 17 00:00:00 2001 From: Chili Palmer Date: Thu, 23 Apr 2026 11:04:21 +0200 Subject: [PATCH] chore: cleanup of allium specs --- specs/mcp.allium | 9 ++++++++- specs/post.allium | 8 +++++++- specs/publishing.allium | 9 ++++++++- specs/schema.allium | 29 +++++++++++++++++++++++++---- specs/script.allium | 7 ++++++- specs/template.allium | 7 ++++++- specs/translation.allium | 7 ++++++- 7 files changed, 66 insertions(+), 10 deletions(-) diff --git a/specs/mcp.allium b/specs/mcp.allium index 2a91932..b5ab05f 100644 --- a/specs/mcp.allium +++ b/specs/mcp.allium @@ -8,6 +8,13 @@ use "./media.allium" as media use "./script.allium" as script use "./template.allium" as template +enum ProposalStatus { + pending + accepted + discarded + expired +} + entity McpServer { transport: http | stdio host: String -- 127.0.0.1 for HTTP @@ -27,7 +34,7 @@ surface McpServerSurface { entity Proposal { kind: draft_post | propose_script | propose_template | propose_media_metadata | propose_post_metadata - status: pending | accepted | discarded | expired + status: ProposalStatus entity_id: String data: String created_at: Timestamp diff --git a/specs/post.allium b/specs/post.allium index 6782be9..cc9e5e3 100644 --- a/specs/post.allium +++ b/specs/post.allium @@ -5,6 +5,12 @@ use "./project.allium" as project +enum PostStatus { + draft + published + archived +} + value Slug { value: String @@ -81,7 +87,7 @@ entity Post { slug: Slug excerpt: String? content: String? - status: draft | published | archived + status: PostStatus author: String? language: String? do_not_translate: Boolean diff --git a/specs/publishing.allium b/specs/publishing.allium index 6bc2ae2..a618b06 100644 --- a/specs/publishing.allium +++ b/specs/publishing.allium @@ -5,12 +5,19 @@ use "./metadata.allium" as meta +enum PublishJobStatus { + pending + running + completed + failed +} + entity PublishJob { ssh_host: String ssh_user: String ssh_remote_path: String ssh_mode: scp | rsync - status: pending | running | completed | failed + status: PublishJobStatus transitions status { pending -> running diff --git a/specs/schema.allium b/specs/schema.allium index d6b428f..7c22b00 100644 --- a/specs/schema.allium +++ b/specs/schema.allium @@ -6,6 +6,27 @@ -- This document specifies the persisted data model the rewrite must be able -- to read and write. It is the ground truth for storage compatibility. +enum PostStatus { + draft + published + archived +} + +enum PostTranslationStatus { + draft + published +} + +enum TemplateStatus { + draft + published +} + +enum ScriptStatus { + draft + published +} + -- ============================================================================ -- CORE ENTITIES -- ============================================================================ @@ -28,7 +49,7 @@ entity Post { slug: String -- URL-friendly identifier excerpt: String? -- Optional summary content: String? -- Draft body (null when published) - status: draft | published | archived + status: PostStatus author: String? -- Author name created_at: Timestamp updated_at: Timestamp @@ -57,7 +78,7 @@ entity PostTranslation { title: String excerpt: String? content: String? -- Draft body (null when published) - status: draft | published + status: PostTranslationStatus created_at: Timestamp updated_at: Timestamp published_at: Timestamp? @@ -118,7 +139,7 @@ entity Template { enabled: Boolean version: Integer -- Incremented on each update file_path: String -- templates/{slug}.liquid - status: draft | published + status: TemplateStatus content: String? -- Draft body (null when published) created_at: Timestamp updated_at: Timestamp @@ -134,7 +155,7 @@ entity Script { enabled: Boolean version: Integer -- Incremented on each update file_path: String -- scripts/{slug}.{extension} - status: draft | published + status: ScriptStatus content: String? -- Draft body (null when published) created_at: Timestamp updated_at: Timestamp diff --git a/specs/script.allium b/specs/script.allium index 795a229..ef1f485 100644 --- a/specs/script.allium +++ b/specs/script.allium @@ -9,13 +9,18 @@ config { script_extension: String = "script" } +enum ScriptStatus { + draft + published +} + entity Script { slug: String title: String kind: macro | utility | transform entrypoint: String -- default: "render" for macros enabled: Boolean - status: draft | published + status: ScriptStatus content: String? version: Integer file_path: String diff --git a/specs/template.allium b/specs/template.allium index 7b1bc38..c014bd1 100644 --- a/specs/template.allium +++ b/specs/template.allium @@ -4,12 +4,17 @@ -- Distilled from: src/main/engine/TemplateEngine.ts, PageRenderer.ts, schema.ts, -- bundled starter templates in src/main/engine/templates/ +enum TemplateStatus { + draft + published +} + entity Template { slug: String title: String kind: post | list | not_found | partial enabled: Boolean - status: draft | published + status: TemplateStatus content: String? version: Integer file_path: String diff --git a/specs/translation.allium b/specs/translation.allium index 9feb04e..b9e16ff 100644 --- a/specs/translation.allium +++ b/specs/translation.allium @@ -7,6 +7,11 @@ use "./post.allium" as post use "./media.allium" as media +enum PostTranslationStatus { + draft + published +} + surface TranslationControlSurface { facing _: TranslationOperator @@ -43,7 +48,7 @@ entity PostTranslation { title: String excerpt: String? content: String? - status: draft | published + status: PostTranslationStatus file_path: String checksum: String? created_at: Timestamp