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.
In this repository14 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- roadkeepSkill
- shio-agent-surfaceSkill
- shio-build-testSkill
- shio-console-reviewSkill
- shio-console-uiSkill
- shio-content-apiSkill
- shio-content-filesSkill
- shio-databaseSkill
- shio-docs-syncSkill
- shio-docs-writeSkill
- shio-replication-testSkill
- shio-roadmap-docsSkill
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
- Very specific: line 41
sh-region,sh-field,sh-postsurvive the render: Do not "tidy up" by stripping them — the rendered DOM is the only place the Visual …
≈ “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.
Files
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/Themeas system post-types created on demand,POST /api/v2/render/post-typesand itsreconcileverb) - 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) vstemplate-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
| Guard | Fails the build when |
ShRenderNoScriptEngineTest | the no-script-engine, MapValueResolver-only or refusing-TemplateLoader rules break — and asserts the premises, not only the guards |
ShTemplateGrammarCoverageTest | you touch the SH251 scanner and do not add its row (thirty rows, REPORTED/SKIPPED/UNREACHABLE) |
ShHandlebarsAstPremiseTest | a Handlebars.java bump adds scope information and reopens the AST question |
ShRenderedDomContractTest | code emits a data-shio-* attribute with no row in the SH185 spec appendix, or a row names one nothing writes |
ShRenderModelSourceTest | the three render post-types drift from import/post-types.json, or a declared difference no longer exists |
ShHelperSignatureLintTest | a 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) |
ShRenderSweepBenchmarkTest | the per-page query count regresses (6/page in a sweep, 19 standalone) |
The two rules most often broken here
sh-region,sh-field,sh-postsurvive 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.- 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.
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
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.

