diff --git a/specs/editor_misc.allium b/specs/editor_misc.allium index e4c1cb3..101ab3b 100644 --- a/specs/editor_misc.allium +++ b/specs/editor_misc.allium @@ -10,6 +10,7 @@ use "./tabs.allium" as tabs use "./i18n.allium" as i18n +use "./generation.allium" as generation -- ─── Dashboard (no tab active) ─────────────────────────────── @@ -395,22 +396,26 @@ surface DocumentationSurface { -- ─── Site validation view ─────────────────────────────────── value SiteValidationReport { + project_id: String expected_url_count: Integer existing_html_count: Integer missing_url_paths: List -- in sitemap, no HTML on disk extra_url_paths: List -- HTML on disk, not in sitemap updated_post_url_paths: List -- source .md newer than HTML + affected_sections: Set } surface SiteValidationSurface { context report: SiteValidationReport exposes: + report.project_id report.expected_url_count report.existing_html_count report.missing_url_paths report.extra_url_paths report.updated_post_url_paths + report.affected_sections provides: SiteValidationScanRequested() @@ -447,7 +452,7 @@ rule SiteValidationApply { -- Deletes extra HTML files, removes empty directories -- Regenerates calendar if anything changed -- Rebuilds search index if anything rendered or deleted - ensures: GenerateSiteRequested(sections: report.affected_sections) + ensures: ApplyValidationRequested(report.project_id, report.affected_sections) } -- ─── Translation validation view ─────────────────────────── diff --git a/specs/frontmatter.allium b/specs/frontmatter.allium index bc7544a..7afef5d 100644 --- a/specs/frontmatter.allium +++ b/specs/frontmatter.allium @@ -8,6 +8,15 @@ -- file types. The Rust implementation must read and write these -- formats byte-for-byte compatible with the TypeScript implementation. +surface FrontmatterPersistenceSurface { + facing _: ContentPersistenceRuntime + + provides: + PublishPostRequested(post) + PublishTemplateRequested(template) + PublishScriptRequested(script) +} + -- ============================================================================ -- POST FILE FORMAT -- ============================================================================ diff --git a/specs/generation.allium b/specs/generation.allium index f763af6..0279977 100644 --- a/specs/generation.allium +++ b/specs/generation.allium @@ -10,6 +10,23 @@ use "./metadata.allium" as meta use "./menu.allium" as menu use "./translation.allium" as translation +surface GenerationControlSurface { + facing _: GenerationOperator + + provides: + GenerateSiteRequested(generation) + ValidateSiteRequested(project) + ApplyValidationRequested(project_id, sections) +} + +surface GenerationRuntimeSurface { + facing _: GenerationRuntime + + provides: + PageRenderRequested(template, context) + GenerateSiteCompleted(generation) +} + value GenerationSection { kind: core | single | category | tag | date } @@ -134,10 +151,9 @@ rule ValidateSite { } rule ApplyValidation { - when: ApplyValidationRequested(project, report) + when: ApplyValidationRequested(project_id, sections) -- Targeted re-rendering for affected sections only - for section in report.affected_sections: - ensures: GenerateSiteRequested(project, sections: {section}) + ensures: GenerateSiteRequested(plan_generation(project_id, sections)) } -- Day-block grouping for archives diff --git a/specs/metadata_diff.allium b/specs/metadata_diff.allium index 333065c..0b546fb 100644 --- a/specs/metadata_diff.allium +++ b/specs/metadata_diff.allium @@ -8,6 +8,14 @@ use "./media.allium" as media use "./script.allium" as script use "./template.allium" as template +surface MetadataMaintenanceSurface { + facing _: MaintenanceOperator + + provides: + MetadataDiffRequested(project) + RebuildFromFilesystemRequested(project, entity_type) +} + value DiffField { name: String db_value: String diff --git a/specs/preview.allium b/specs/preview.allium index b3e6072..94209b1 100644 --- a/specs/preview.allium +++ b/specs/preview.allium @@ -17,6 +17,22 @@ config { preview_port: Integer = 4123 } +surface PreviewControlSurface { + facing _: PreviewOperator + + provides: + StartPreviewRequested(project) + StopPreviewRequested(server) +} + +surface PreviewHttpSurface { + facing _: PreviewClient + + provides: + PreviewRequest(path) + PreviewDraftRequest(path, post_id) +} + rule StartPreview { when: StartPreviewRequested(project) ensures: PreviewServer.created( diff --git a/specs/template_context.allium b/specs/template_context.allium index 11fcbb6..c7af5f7 100644 --- a/specs/template_context.allium +++ b/specs/template_context.allium @@ -12,6 +12,15 @@ -- GLOBAL TEMPLATE VARIABLES -- ============================================================================ +surface TemplateRenderingSurface { + facing _: RenderPipeline + + provides: + RenderPostPageRequested(post, language) + RenderListPageRequested(posts, pagination, archive_context) + RenderNotFoundPageRequested() +} + value RenderContext { -- Top-level variables available in all templates language: String -- Current language code