Skip to content

feat(writing-html-artifacts): add the HTML artifacts skill, component kit, diagrams and visual companion - #52

Merged
zpyoung merged 233 commits into
mainfrom
zpyoung/writing-artifacts
Oct 19, 2026
Merged

zpyoung merged 233 commits into
mainfrom
zpyoung/writing-artifacts

Conversation

@zpyoung

@zpyoung zpyoung commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

This adds writing-html-artifacts, a new skill that builds offline single-file HTML pages from templates, checks them, and hands them over with a delivery note. It also replaces Agent Isles as the brainstorming visual companion, so the Agent Isles bridge, pack and examples are removed.

What the skill ships:

  • Builds in two tiers. quirk_html.py builds tier-1 pages from the report and components templates. Tier-2 apps come from the app template via build-app. Both inline vendored, pinned libraries (pins.py), so the output works with no network.
  • Verify. Playwright browser checks plus static checks (kit usage, layout widths, q-* JSX), and a --no-js mode that checks every element's fallback.
  • The component kit. q-* custom elements with a generated components reference (kit_docs.py): eight base elements, then q-grid, q-panel, q-sidenote and q-compare.
  • Page shapes. Seven layouts with a summary slot and a generated nav, available to tier-1 pages, tier-2 apps (--layout, PageLayout) and companion screens.
  • Diagrams. q-flow for flowcharts with decisions, subprocesses, loops and step-through traces. q-schema for ER/data models and class diagrams. q-sequence for sequence diagrams. Each is checked at build time and has a no-JS text list.
  • The visual companion. companion.py is a stdlib-only local server that shows option screens and sends clicks back to the agent. brainstorming and exploring-ideas now point at it.

Where to look

  • skills/writing-html-artifacts/SKILL.md: the entry point and workflow.
  • skills/writing-html-artifacts/scripts/htmlkit/: the core build library.
  • skills/writing-html-artifacts/templates/: the report, components, app and companion templates and their examples.
  • docs/quirk/specs/2026-10-1[3-7]-*: logic and tech specs for each piece (base skill, component kit, layouts, q-flow, its shapes and traces, q-schema, q-sequence).

About 30k of the 80k added lines are vendored libraries, icon builds and test fixtures under vendor/, scripts/vendor-build/ and tests/fixtures/, so you can skim those.

Known issues logged

BUG-12 to BUG-28 in BUGS.md are low-severity edge cases found in review and left open. Three affect normal use: BUG-13 and BUG-28 (kit elements and the diagram list disclosure render unstyled in tier-2 app builds) and BUG-22 (on a phone, the graph toolbar covers the top of a fitted diagram). BUG-12 (pi-watch crashing at import) isn't from this branch, it was found along the way.

Testing

  • python3 -m pytest -q: 3206 passed, 17 skipped (about 13 minutes locally).

Vendors simple.css 2.3.7, Alpine 3.17.4, Chart.js 4.5.1, Mermaid 12.2.0 and a
single-file Web Awesome 3.14.0 bundle with an offline icon set, plus pins.py
to verify checksums offline and check for outdated or advisory-hit pins.
Library and shell blocks are hash-verified only when their opening tag carries
nothing but the data attribute, comments follow HTML rules instead of a regex,
and network-call patterns are matched only in script bodies and on* handlers.
…rk-theme

The theme chrome toggles wa-dark with the effective theme, follows the OS in
auto mode, dispatches a quirk-theme event, and quirkData re-resolves on a new
file pick. Drops the stale .gitignore reminder from the companion guides.
…ents and verify

Unreadable template files become validation errors, license_file stays inside
the version root with escaped comment fields, escaping is ASCII-only in every
copy, pins verify skips inline_sha256 for non-inline files, and run_verify
reports a missing file instead of raising.
…ponents templates

quirk_html.py builds a source file into one offline HTML artifact (templates
list/validate, build, check, verify, note), with built-in report (Simple.css +
Alpine) and components (Web Awesome + Alpine) templates and worked examples.
Malformed data, unwritable outputs and an --out that would overwrite the source
now exit 2 with one JSON object; data paths stay inside the project or source
directory, NaN/Infinity is rejected, sidecars follow the source slug, and note
takes --verify-dir.
…template

companion.py starts a localhost server for brainstorming screens, builds each
screen from screen.json with a per-screen nonce, records clicks and Proceed in
an append-only event log, and serves Mermaid from the vendor store.
…create flow

The app template (React, Vite single-file, Astryx, TanStack) builds with
build-app using a frozen, no-scripts pnpm install; templates new and templates
verify scaffold a custom template and gate it on its example.
…work

Connected pages now load their real data under verify and every request is
recorded; offline mode still aborts and fails on any request.
…e loosely, pad for the tallest phone panel, keep notes inside fragment boxes
…e in the components, app and companion examples
…traight run at each edge end and self-loop leg
Copilot AI balanced review requested due to automatic review settings October 19, 2026 11:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Prevent newer stdlib parsers from bypassing marked-section parsing.
@zpyoung
zpyoung merged commit 8673674 into main Oct 19, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants