agentleFS
openvigletopenviglet/shio/.claude/skills/shio-renderer/SKILL.md

shio-renderer

Skill3 starsChanged 8 days agoApache-2.0View on GitHub

Read before touching Shio's preview renderer, page layouts, regions, themes, Handlebars templates, template helpers, or the section vocabulary. Triggers on ShPageRenderService, ShTemplateEngine, ShRenderHelpers, ShTemplateGraph, PageLayout/Region/Theme post-types, sh-region, data-shio-*, /preview/**, /agent/render, the Visual Editor bridge, render digests, unused-region/unused-layout/missing-theme/duplicate-template-title findings, and @viglet/shio-sections.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    sh-region, sh-field, sh-post survive the render: Do not "tidy up" by stripping them — the rendered DOM is the only place the Visual …

    line 41

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Shio renderer

GET /preview/{site}/{url} composes a page out of content the instance already holds. Owner: com.viglet.shio.render. It is preview-grade on purpose — production delivery is Next.js over the CDA (P10).

Read docs/agents/renderer.md before editing anything in this area. It is the authoritative account of:

  • the model as content (PageLayout / Region / Theme as system post-types created on demand, POST /api/v2/render/post-types and its reconcile verb)
  • how a page finds its layout (site.postTypeLayout, by title), and the three edges — layout, region, theme
  • the deliberately uneven refusal rule: a missing layout refuses (409), a missing region or theme is marked
  • ShRenderState — one writer for the DRAFT/PUBLISHED preference, and why the row order must be total
  • the closed helper set and register(name, shape, helper) as its single source
  • ShTemplateValidator (write-time refusal) vs template-unknown-field (a lint)
  • /agent/render's structural + appearance digests, and the marker counts

What is already guarded — you do not need to remember these

GuardFails the build when
ShRenderNoScriptEngineTestthe no-script-engine, MapValueResolver-only or refusing-TemplateLoader rules break — and asserts the premises, not only the guards
ShTemplateGrammarCoverageTestyou touch the SH251 scanner and do not add its row (thirty rows, REPORTED/SKIPPED/UNREACHABLE)
ShHandlebarsAstPremiseTesta Handlebars.java bump adds scope information and reopens the AST question
ShRenderedDomContractTestcode emits a data-shio-* attribute with no row in the SH185 spec appendix, or a row names one nothing writes
ShRenderModelSourceTestthe three render post-types drift from import/post-types.json, or a declared difference no longer exists
ShHelperSignatureLintTesta helper's registered signature omits a hash key its body reads, or declares one nothing reads — plus the two ways the text scan could be fooled (a non-literal key, a key read two calls down)
ShRenderSweepBenchmarkTestthe per-page query count regresses (6/page in a sweep, 19 standalone)

The two rules most often broken here

  1. sh-region, sh-field, sh-post survive the render. Do not "tidy up" by stripping them — the rendered DOM is the only place the Visual Editor can learn which node maps to which post.
  2. Ownership is the template's job and the engine never infers it. A region renders against the page's model; inside a {{#query}} block the row's. The rendered HTML records neither.

The protocol document is docs/specs/SH185-universal-editor-protocol.md (and its appendix is the data-shio-* contract). Sections vs regions: docs/specs/SH249-sections-and-regions.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.