Puck.uno HTML validator and tidying service GitHub issue
vibecode
{"vibecode": { "doc": "html-validator-service", "role": "speculative puck.uno-hosted service offering HTML5 validation and tidying as a network service; positioned as the heavy-weight authority complementing Uma's local schema-driven first pass", "key_concepts": ["html5_validator_service", "html_tidy", "uma_complement", "service_not_embedded", "whatwg_spec_check"], "status": "brainstorm", "related": "markie may absorb this functionality — see [markie.md](../markie/index.md)" }}
Possible consolidation: Markie is a related puck.uno-hosted service idea that could grow to include HTML validation and tidying. Worth deciding whether this remains a separate service or folds into Markie before either is built.
Purpose GitHub issue
A Puck.uno-hosted service that validates and tidies HTML documents. Two related operations:
- Validate — given an HTML document, check it against the WHATWG HTML spec. Report any structural violations (unclosed tags, invalid attribute values, content-model breaches, missing required attributes, etc.).
- Tidy — given a slightly-broken HTML document, return a cleaned-up version that's well-formed and structurally valid. The HTML version of "format my code, please."
Where it fits GitHub issue
- Uma (especially the
puck.uno/uma/html5subclass) is the local first-pass tool — it parses, manipulates, and serializes HTML. Uma's schema-driven approach catches many issues at construction time. - The validator/tidy service is the heavier-weight authority. It runs against a full HTML5 implementation (probably gumbo or an equivalent server-side parser) and produces detailed reports. Useful for one-off checks on large documents, for CI pipelines that gate on validation, and for cleaning up ingested HTML from untrusted sources.
Why a service rather than embedded GitHub issue
- A full HTML5 validator is large (hundreds of K) and changes over time as the spec evolves.
- Most apps don't need it on the hot path.
- A network service is the right shape: validate occasionally, not in every request.
- Centralizes spec-version tracking — clients automatically get the current standard without per-app updates.
Possible API shape (sketch) GitHub issue
$result = %['puck.uno/html5-validator'].validate($html)
$result.valid? # boolean
$result.violations # array of structured violation reports
$result.tidied # cleaned-up version (optional, configurable)
Or as a Sammy-style HTTP endpoint with a JSON request/response.
Open GitHub issue
- Hosting and access model — free tier, paid tier, on-premises?
- Spec version selection (validate against HTML5.x specifically? the living standard?).
- Tidying preferences (preserve comments? normalize whitespace? indent style?).
- Relationship to Bryton — could a
bryton-html-validxeme type wrap this for "did my page validate?" tests.