let d = import "../defaults.ncl" in d.make_mode String { id = "plan-publication", trigger = "Generate a content publication plan: which content sections need ES completion, what SEO criteria need implementation, and what state transitions must complete before production deployment — ordered by dependency.", preconditions = [ ".ontoref/ontology/purpose.ncl exists and exports cleanly", ".ontoref/ontology/state.ncl exists", "code/site/content/ exists or code/site/i18n/ exists", ], steps = [ { id = "run-validate-purpose-alignment", action = "Execute the validate-purpose-alignment mode as a sub-check. All Hard criterion failures become required blockers in this plan; UNVERIFIED items become required verification tasks.", actor = 'Both, on_error = { strategy = 'Continue }, }, { id = "audit-content-coverage", action = "For each ContentObjective in purpose.ncl (bilingual-content, project-showcase): count EN and ES items in the corresponding content directory. Report sections where ES count < EN count with specific file counts.", cmd = "for lang in en es; do echo \"=== $lang ===\"; find code/site/content/$lang -name '*.md' 2>/dev/null | wc -l; done", actor = 'Both, depends_on = [{ step = "run-validate-purpose-alignment" }], on_error = { strategy = 'Continue }, }, { id = "audit-state-blockers", action = "Read state.ncl content-coverage, rendering-mode, and publication-readiness dimensions. For each dimension not at its desired_state, list all blockers from transitions. These become plan items ordered by dependency: content-coverage must reach full-parity before publication-readiness can advance to production-ready.", cmd = "nickel export .ontoref/ontology/state.ncl", actor = 'Both, depends_on = [{ step = "audit-content-coverage" }], on_error = { strategy = 'Stop }, }, { id = "audit-seo-implementation", action = "Check which SEO infrastructure is implemented in the server/page crates: (1) hreflang generation in the SSR head, (2) JSON-LD Article generation in blog post pages, (3) meta-description generation in page components, (4) sitemap.xml generation. Report each as IMPLEMENTED / MISSING / PARTIAL.", cmd = "rg 'hreflang|application/ld\\+json|meta.*description|sitemap' code/crates/ --type rust -l 2>/dev/null | head -20", actor = 'Both, depends_on = [{ step = "run-validate-purpose-alignment" }], on_error = { strategy = 'Continue }, }, { id = "propose-plan", action = "Generate a concrete publication plan with items ordered by dependency: (1) SEO infrastructure gaps to implement (hreflang, JSON-LD, meta descriptions, sitemap) — technical prerequisites; (2) ES content items to author per section with specific file counts; (3) state transitions to complete in order: content-coverage → rendering-mode → publication-readiness. Each item names the specific Hard criterion it satisfies.", actor = 'Agent, depends_on = [ { step = "audit-state-blockers" }, { step = "audit-seo-implementation" }, ], on_error = { strategy = 'Stop }, }, { id = "review", action = "Human reviews and accepts the publication plan. The accepted plan becomes the authoritative backlog for content and SEO work. Hard blockers are prioritized over Soft items.", actor = 'Human, depends_on = [{ step = "propose-plan" }], on_error = { strategy = 'Stop }, }, ], postconditions = [ "Publication plan enumerates all ES content gaps with specific file counts per section", "Plan lists SEO infrastructure items as IMPLEMENTED / MISSING / PARTIAL", "Plan lists state transitions in dependency order (content-coverage → rendering-mode → publication-readiness)", "Plan distinguishes Hard blockers from Soft items", "Plan accepted by human reviewer", ], }