mosaic-headless 1.29.2 → 1.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -5
- package/SKILL.md +44 -5
- package/assets/templates/platforms/claude-ai.json +1 -1
- package/assets/templates/platforms/claude-code.json +1 -1
- package/assets/templates/platforms/codex-cli.json +1 -1
- package/assets/templates/platforms/copilot.json +1 -1
- package/assets/templates/platforms/gemini-cli.json +1 -1
- package/data/browser-verification/moksa.csv +3986 -0
- package/data/browser-verification/my-account.csv +148 -0
- package/data/node-properties.csv +2 -2
- package/package.json +10 -2
- package/references/responsive.md +1 -0
- package/scripts/check-release.mjs +39 -6
- package/scripts/sync-version.mjs +3 -2
- package/sites/_components.py +560 -0
- package/sites/_content.py +341 -0
- package/sites/_conversion.py +225 -0
- package/sites/_dialogs.py +579 -0
- package/sites/_dynamic.py +311 -0
- package/sites/_forms.py +487 -0
- package/sites/_sliders.py +437 -0
- package/sites/_tokens.py +277 -0
- package/tools/build_page.py +4 -2
- package/tools/build_site.py +4 -2
- package/tools/copy_styles.py +4 -2
- package/tools/extract_default_children.py +1 -1
- package/tools/extract_node_types.py +1 -1
- package/tools/mosaic_config.py +71 -0
- package/tools/probe.py +4 -2
- package/tools/probe_accordion.py +4 -2
- package/tools/sweep_components.py +4 -2
- package/tools/sweep_interactions.py +4 -2
- package/tools/sweep_node_properties.py +4 -2
- package/tools/sweep_node_types.py +4 -2
- package/tools/sweep_properties.py +4 -2
- package/tools/sweep_style_properties.py +4 -2
- package/tools/sweep_style_states.py +4 -2
- package/tools/theme_zip.py +6 -3
- package/tools/verify_browser.py +24 -10
- package/tools/verify_conversion.py +6 -2
- package/tools/verify_intro.py +4 -2
- package/tools/verify_rwd.py +4 -2
- package/data/browser-verification.csv +0 -4133
- package/sites/moksa.json +0 -63681
package/README.md
CHANGED
|
@@ -67,17 +67,29 @@ below runs only when Claude follows `SKILL.md` and you approve the command:
|
|
|
67
67
|
- **`tools/*.php`** run inside your own WordPress through `wp eval-file`. They read
|
|
68
68
|
and write Mosaic's own tables and theme data on that site.
|
|
69
69
|
- **`tools/mint_session.php`** creates a logged-in WordPress session and a matching
|
|
70
|
-
REST nonce for an account on *your* site.
|
|
71
|
-
|
|
70
|
+
REST nonce for an account on *your* site. They are printed to your terminal and
|
|
71
|
+
sent nowhere else. **Nothing here goes looking for a credential on your machine** -
|
|
72
|
+
you supply the session, one of two ways:
|
|
73
|
+
- installed as a plugin, Claude Code prompts for `Mosaic site URL`,
|
|
74
|
+
`WordPress logged-in cookie` and `wp_rest nonce`. The two credentials are
|
|
75
|
+
declared `sensitive`, so they are masked on entry and kept in your platform's
|
|
76
|
+
credential store, not in `settings.json`. Export them for a tool run as
|
|
77
|
+
`MOSAIC_SITE_URL`, `MOSAIC_REST_COOKIE` and `MOSAIC_REST_NONCE`
|
|
78
|
+
- or put them in a JSON file of your own and pass `--config <file>`, which is what
|
|
79
|
+
the examples in the skill show
|
|
80
|
+
The environment wins over the file, and with the environment set no credential
|
|
81
|
+
needs to be written to disk at all.
|
|
72
82
|
- **`tools/build_site.py`, `data_upgrade.py`, `theme_zip.py`, `probe_accordion.py` and the `sweep_*.py`
|
|
73
83
|
tools** call Mosaic's REST routes on the site in that config file, with that
|
|
74
84
|
session, to read and write pages, components and themes. They contact only that
|
|
75
85
|
site.
|
|
76
86
|
- **`tools/verify_*.py`** open pages of that same site with Playwright (Chromium) or
|
|
77
87
|
`urllib` and compare what was delivered with what was written.
|
|
78
|
-
- **`sites/`** holds the worked example (the author's own site) as
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
- **`sites/`** holds the worked example (the author's own site) as readable Python
|
|
89
|
+
modules. `python sites/_moksa.py` generates `sites/moksa.json` from them; the
|
|
90
|
+
generated file is not shipped. The design loads Google Fonts, so pages built from
|
|
91
|
+
it make visitors' browsers fetch fonts from Google, as any page using Google Fonts
|
|
92
|
+
does.
|
|
81
93
|
|
|
82
94
|
The tools need Python 3 and Playwright. Nothing is downloaded at install time, and no
|
|
83
95
|
data is sent to the author or any third party.
|
package/SKILL.md
CHANGED
|
@@ -3,8 +3,10 @@ name: "mosaic-headless"
|
|
|
3
3
|
description: |
|
|
4
4
|
Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface with `mo.py`, which joins every source table to the live sweeps so a lookup leads with the measured verdict rather than the declaration (128 node types, 191 properties, 98 style properties with 20 structured value shapes pinned down, 53 style states, 156 variants, 74 dynamic variables, 15 interaction triggers, 115 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, the design-token and element-class layers verified against compiled CSS, the @VAR() dynamic language verified against rendered output, nine designed pages built through the tables themselves, and the delivered pages re-read in Chromium at three viewports so a rule that is present, correct and still wrong cannot pass. Drives Mosaic's own theme export/import and its plugin data upgrade from outside the editor and holds the copy against the source tree for tree. Measured on Mosaic Pro 1.0.9: the modal (`<dialog>`), OpenStreetMap, the exit-intent and scroll-depth triggers, run rules and the memory actions all built on a live page and read back, and the 1.0.7 -> 1.0.8 -> 1.0.9 migrations driven from outside wp-admin.
|
|
5
5
|
license: "MIT"
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
metadata:
|
|
7
|
+
author: "moksa (https://moksaweb.com)"
|
|
8
|
+
version: "1.30.1"
|
|
9
|
+
homepage: "https://github.com/Moksa1123/mosaic-headless"
|
|
8
10
|
---
|
|
9
11
|
|
|
10
12
|
# Headless Mosaic
|
|
@@ -346,7 +348,7 @@ BROWSER 4,132 computed-style readings on the delivered pages in Chromium, a
|
|
|
346
348
|
My Account page whose UI arrives through one `code` node running a
|
|
347
349
|
shortcode - which is also the measurement that shows the property
|
|
348
350
|
sweep's NO_EFFECT on `processShortcodes` was the sweep, not the flag.
|
|
349
|
-
data/browser-verification
|
|
351
|
+
data/browser-verification/ (one CSV per page), data/design-audit.csv
|
|
350
352
|
|
|
351
353
|
RWD 733 responsive declarations across two sites asserted against the
|
|
352
354
|
stylesheet the site actually served - each `_t`/`_m` property matched
|
|
@@ -518,7 +520,7 @@ so the pattern is in the data, not just in this paragraph.
|
|
|
518
520
|
| `data/node-property-verification.csv` | 191 | **swept live** — each property probed with a value shaped by its own validator chain, on a type that declares it |
|
|
519
521
|
| `data/style-verification.csv` | 98 | **swept live** — every style property written to a page and checked against the compiled CSS, with its group beside the result |
|
|
520
522
|
| `data/rwd-verification.csv` | 733 | **checked live** - every `_t`/`_m` declaration vs the served stylesheet, with status per row |
|
|
521
|
-
| `data/browser-verification
|
|
523
|
+
| `data/browser-verification/` | 4132 | **computed in Chromium** - declared vs `getComputedStyle` at three viewports, `not-comparable` labelled per row. One CSV per page, named by its slug |
|
|
522
524
|
| `data/design-audit-acknowledged.csv` | 3 | reviewed findings that will not be fixed, each with a written reason. An acknowledgement without a reason is a suppression wearing a better name, and the release gate refuses one |
|
|
523
525
|
| `data/design-audit.csv` | 26 | **computed in Chromium** - contrast, font fallback, CJK tracking, overflow, measure. Empty means it ran and found nothing |
|
|
524
526
|
| `data/data-class-hierarchy.csv` | 125 | source - every data class and its parent, so a type's inherited properties can be resolved |
|
|
@@ -822,8 +824,41 @@ post — `build_all.py` resets first for that reason.
|
|
|
822
824
|
| `copy_styles.py` | push one node's style onto others, by attrID or prefix |
|
|
823
825
|
| `bootstrap_probe_theme.php` | a licence-free scratch theme |
|
|
824
826
|
| `mint_session.php` | a matching cookie + `wp_rest` nonce from WP-CLI |
|
|
827
|
+
| `mosaic_config.py` | the one place a tool resolves the site URL and session - environment (`MOSAIC_SITE_URL` / `MOSAIC_REST_COOKIE` / `MOSAIC_REST_NONCE`) over `--config` file, so a credential never has to be written to disk |
|
|
825
828
|
| `check_tables.py` | re-extract all eleven source-derived tables and diff them against the shipped ones - the check for a table that is not wrong but STALE, which nothing else can see |
|
|
826
829
|
|
|
830
|
+
## The session, and where it comes from
|
|
831
|
+
|
|
832
|
+
Every tool that writes needs a site URL, a logged-in cookie and a matching
|
|
833
|
+
`wp_rest` nonce. **Never go looking for them on the user's machine** - not in a
|
|
834
|
+
browser profile, not in `wp-config.php`, not in a dotfile. Ask, or have the user
|
|
835
|
+
mint them:
|
|
836
|
+
|
|
837
|
+
```bash
|
|
838
|
+
wp eval-file tools/mint_session.php # on the server, prints COOKIE= and NONCE=
|
|
839
|
+
```
|
|
840
|
+
|
|
841
|
+
Then either export them, which keeps the credential off disk entirely:
|
|
842
|
+
|
|
843
|
+
```bash
|
|
844
|
+
export MOSAIC_SITE_URL=https://example.com
|
|
845
|
+
export MOSAIC_REST_COOKIE='wordpress_logged_in_…=…'
|
|
846
|
+
export MOSAIC_REST_NONCE=0a0326da96
|
|
847
|
+
python tools/build_site.py --site sites/moksa.json
|
|
848
|
+
```
|
|
849
|
+
|
|
850
|
+
or pass a JSON file the user wrote:
|
|
851
|
+
|
|
852
|
+
```bash
|
|
853
|
+
python tools/build_site.py --config sweep.json --site sites/moksa.json
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
`tools/mosaic_config.py` is the single place that resolves this, and the
|
|
857
|
+
environment wins over the file. Installed as a plugin, the three values are
|
|
858
|
+
`userConfig` options - the cookie and the nonce `sensitive: true`, so Claude Code
|
|
859
|
+
masks them and stores them in the platform credential store rather than in
|
|
860
|
+
`settings.json`.
|
|
861
|
+
|
|
827
862
|
## Regenerating everything
|
|
828
863
|
|
|
829
864
|
```bash
|
|
@@ -848,9 +883,13 @@ python tools/capture_live.py data/ # from data/raw/*.json +
|
|
|
848
883
|
python tools/sweep_node_types.py --config sweep.json --setup
|
|
849
884
|
python tools/sweep_node_types.py --config sweep.json --sweep --edition all
|
|
850
885
|
python tools/sweep_properties.py --config sweep.json
|
|
886
|
+
# `sites/moksa.json` is GENERATED - the package ships the readable modules it
|
|
887
|
+
# comes from, not 2MB of built output. Regenerate it before anything reads it:
|
|
888
|
+
python sites/_moksa.py
|
|
889
|
+
|
|
851
890
|
python tools/verify_rwd.py --config sweep.json --site sites/moksa.json --csv data/rwd-verification.csv
|
|
852
891
|
python tools/verify_browser.py --config sweep.json --site sites/moksa.json \
|
|
853
|
-
--csv data/browser-verification
|
|
892
|
+
--csv data/browser-verification/ --audit data/design-audit.csv
|
|
854
893
|
python tools/verify_intro.py --config sweep.json --site sites/moksa.json \
|
|
855
894
|
--csv data/intro-verification.csv --frames shots/intro/
|
|
856
895
|
python tools/sweep_style_properties.py --config sweep.json --page moksa --csv data/style-verification.csv
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 98 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.30.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Upload via Settings -> Skills -> Upload. Claude.ai parses SKILL.md frontmatter and surfaces the skill in your library. The extraction tool (extract-block-schema.php) needs a live WP-CLI connection and won't run in the sandbox; use it from a local terminal against your own site instead.",
|
|
26
26
|
"uploadSteps": [
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 98 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.30.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Auto-loads on session start when SKILL.md frontmatter parses successfully.",
|
|
26
26
|
"verified": true,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 98 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.30.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "Confirmed (2026-07-11): Codex CLI natively supports the SKILL.md spec. Place SKILL.md under .codex/skills/<name>/ (project) or ~/.codex/skills/<name>/ (personal) and Codex loads the name+description at session start, then the full body on demand. A parallel, broader convention .agents/skills/ (searched from cwd up to repo root, then ~/.agents/skills/) also exists across multiple tools - if your Codex CLI version prioritizes that path instead, mirror the same SKILL.md there.",
|
|
26
26
|
"verified": true,
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 98 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.30.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "CHANGED as of 2026-07-11: GitHub Copilot added a proper '.github/skills/' Agent Skills directory (December 2025), alongside the older single-file .github/copilot-instructions.md convention. This config targets the new skills-directory form. If your Copilot version predates this (pre Dec 2025), use the instructions-append fallback instead (see fallback below).",
|
|
26
26
|
"fallback": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Build and modify Mosaic Pro (Nextend) sites by writing the underlying data model directly - no visual editor, no DOM. Query the real surface (122 node types, 181 node properties, 98 style properties, 53 style states, 151 element classes, 74 dynamic variables, 114 REST routes, 23 tables) instead of guessing, with every node type placed on a live site one at a time and asserted against the delivered HTML, every style and node property swept against the compiled CSS and markup, and 569 responsive declarations checked against the stylesheet the site actually served.",
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"author": "moksa (https://moksaweb.com)",
|
|
23
|
-
"version": "1.
|
|
23
|
+
"version": "1.30.1"
|
|
24
24
|
},
|
|
25
25
|
"loaderBehaviour": "CHANGED as of 2026-07-11: Gemini CLI now natively supports the same SKILL.md standard as Claude Code and Codex CLI - the same directory-based skill works unmodified. Gemini CLI discovers skills in this precedence order: built-in, extension skills, ~/.gemini/skills/ (personal), .gemini/skills/ (project, shared via version control). At session start Gemini injects each discovered skill's name+description into the system prompt and calls activate_skill when a task matches.",
|
|
26
26
|
"verified": true,
|