mosaic-headless 1.37.0 → 1.38.0
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.ja.md +88 -253
- package/README.ko.md +85 -244
- package/README.md +86 -319
- package/README.zh-TW.md +86 -265
- package/SKILL.md +6 -6
- 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/custom-fields-verification.csv +11 -11
- package/data/design-audit.csv +26 -26
- package/data/dynamic-variables.csv +3 -2
- package/data/menu-verification.csv +1 -1
- package/data/pending.csv +4 -2
- package/data/pluggables.csv +20 -0
- package/data/rwd-verification.csv +733 -733
- package/data/terms-zh.csv +62 -60
- package/package.json +1 -1
- package/references/data-files.md +2 -2
- package/references/upgrading.md +45 -0
- package/tools/check_numbers.py +80 -17
- package/tools/extract_node_types.py +3 -1
- package/tools/test_mosaic.py +53 -1
package/README.md
CHANGED
|
@@ -1,356 +1,123 @@
|
|
|
1
1
|
# mosaic-headless
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Build and modify Mosaic Pro (Nextend) WordPress sites by writing the data model directly: no visual editor, no DOM, every lookup answered from measurements on a live install.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Move whole themes between installs. Every claim measured on a live site.
|
|
5
|
+
[](https://www.npmjs.com/package/mosaic-headless)
|
|
6
|
+
[](LICENSE)
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
[正體中文](README.zh-TW.md) · [日本語](README.ja.md) · [한국어](README.ko.md)
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
> This is an unofficial community project. It is not made by, endorsed by, or affiliated with Nextend, the maker of Mosaic Pro. Mosaic Pro is licensed third-party software and is not included here.
|
|
11
|
+
|
|
12
|
+
## What it does
|
|
13
|
+
|
|
14
|
+
Mosaic keeps a page in its own database tables, one row per element, not in `post_content`. This skill is a measured map of that model plus the tools to write through it.
|
|
15
|
+
|
|
16
|
+
- **Look it up instead of guessing**: `tools/mo.py` answers what a node type, property, style key or state is called, what value shape it takes, where it may go, and whether it is safe. The data covers 134 node types, 120 node properties, 101 style properties and 60 style states, extracted from Mosaic Pro 1.0.13 and swept on a live site.
|
|
17
|
+
- **Chinese and colloquial words work**: `mo.py css 內距` finds padding; the terms follow Mosaic's own zh_TW strings.
|
|
18
|
+
- **Build pages and sites**: `build_page.py` and `build_site.py` commit a page spec through Mosaic's REST write path and refuse what is measured to break the page.
|
|
19
|
+
- **Check the delivered page**: verifiers read the public page in Chromium (responsive rules, computed styles, menus, dialogs, sliders, forms) instead of trusting the commit.
|
|
20
|
+
- **Move and convert**: export and import whole themes, drive Mosaic's data upgrades, and convert Elementor pages into Mosaic.
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
Use it when the site runs Mosaic Pro and you want to build or change pages, templates, components, design tokens, popups, menus or interactions without opening the editor, or need to know exactly what a Mosaic setting does.
|
|
25
|
+
|
|
26
|
+
Do not use it for other builders: Elementor pages go to `elementor-headless`, block-editor pages to `gutenberg-headless`, SEO articles to `rankmath-seo-wp`. It does not do WordPress site health checks, plugin updates or security work.
|
|
12
27
|
|
|
13
28
|
## Install
|
|
14
29
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
npx mosaic-headless --list # all eight platforms
|
|
30
|
+
Claude plugin (Claude Code; also from the Claude directory once listed):
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
/plugin install mosaic-headless --marketplace Moksa1123/mosaic-headless
|
|
20
34
|
```
|
|
21
35
|
|
|
22
|
-
|
|
23
|
-
|---|---|---|
|
|
24
|
-
| Claude Code | full skill: SKILL.md + references/ + tools/ + data/ + sites/ | `~/.claude/skills/` or `./.claude/skills/` |
|
|
25
|
-
| Codex CLI | full skill | `~/.codex/` |
|
|
26
|
-
| Gemini CLI | full skill | `~/.gemini/` |
|
|
27
|
-
| GitHub Copilot | full skill, plus a section appended to `copilot-instructions.md` | `./.github/` |
|
|
28
|
-
| Cursor | one `.mdc` rule with the references embedded | `~/.cursor/rules/` |
|
|
29
|
-
| Windsurf | one rule file with the references embedded | `./.devin/` |
|
|
30
|
-
| Continue | one rule file with the references embedded | `~/.continue/` |
|
|
31
|
-
| Claude.ai | a zip to upload as a project skill | wherever you save it |
|
|
32
|
-
|
|
33
|
-
Every platform install is verified by the release gate against its template. The
|
|
34
|
-
tools need Python 3 and Playwright to run; the rule-file platforms get the knowledge
|
|
35
|
-
without the tools.
|
|
36
|
-
|
|
37
|
-
**Updating does not happen on its own.** A new version on npm changes nothing in
|
|
38
|
-
the folder your agent loads; re-run the installer with `--force` (without it, it
|
|
39
|
-
refuses to overwrite a SKILL.md you may have edited):
|
|
36
|
+
npx, for Claude Code and other AI coding tools (Cursor, Codex CLI, Gemini CLI, Copilot, Continue, Windsurf, a Claude.ai upload zip):
|
|
40
37
|
|
|
41
38
|
```bash
|
|
42
39
|
npx mosaic-headless@latest claude-code --global --force
|
|
40
|
+
npx mosaic-headless --list
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
## Install as a Claude plugin
|
|
47
|
-
|
|
48
|
-
The repository is also a Claude plugin: `.claude-plugin/plugin.json` at the root, and
|
|
49
|
-
the root `SKILL.md` loads as its one skill. Once the plugin is listed in the Claude
|
|
50
|
-
directory, install it from there. Until then, Claude Code can load a clone directly:
|
|
43
|
+
Manual copy:
|
|
51
44
|
|
|
52
45
|
```bash
|
|
53
|
-
git clone https://github.com/Moksa1123/mosaic-headless
|
|
54
|
-
|
|
46
|
+
git clone https://github.com/Moksa1123/mosaic-headless.git
|
|
47
|
+
cp -r mosaic-headless ~/.claude/skills/mosaic-headless
|
|
55
48
|
```
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
Nextend, the maker of Mosaic Pro.
|
|
59
|
-
|
|
60
|
-
## What this plugin runs and connects to
|
|
61
|
-
|
|
62
|
-
The plugin has no hooks, no MCP servers and no background processes. Everything
|
|
63
|
-
below runs only when Claude follows `SKILL.md` and you approve the command:
|
|
64
|
-
|
|
65
|
-
- **`tools/mo.py`** reads the CSV tables in `data/` and prints answers. It writes
|
|
66
|
-
nothing and contacts nothing.
|
|
67
|
-
- **`tools/*.php`** run inside your own WordPress through `wp eval-file`. They read
|
|
68
|
-
and write Mosaic's own tables and theme data on that site.
|
|
69
|
-
- **`tools/mint_session.php`** creates a logged-in WordPress session and a matching
|
|
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.
|
|
82
|
-
- **`tools/build_site.py`, `data_upgrade.py`, `theme_zip.py`, `probe_accordion.py` and the `sweep_*.py`
|
|
83
|
-
tools** call Mosaic's REST routes on the site in that config file, with that
|
|
84
|
-
session, to read and write pages, components and themes. They contact only that
|
|
85
|
-
site.
|
|
86
|
-
- **`tools/verify_*.py`** open pages of that same site with Playwright (Chromium) or
|
|
87
|
-
`urllib` and compare what was delivered with what was written.
|
|
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.
|
|
93
|
-
|
|
94
|
-
The tools need Python 3 and Playwright. Nothing is downloaded at install time, and no
|
|
95
|
-
data is sent to the author or any third party.
|
|
96
|
-
|
|
97
|
-
## What this is
|
|
98
|
-
|
|
99
|
-
Mosaic keeps a page in **23 custom database tables**, not in `post_content` and not
|
|
100
|
-
in `postmeta`. One row per element, the tree carried by a `parentID` column, sibling
|
|
101
|
-
order by a fractional-index string. The editor is one client of that model. It is not
|
|
102
|
-
the format, and you do not need it.
|
|
103
|
-
|
|
104
|
-
This skill is the map of that model — measured against a live install rather than
|
|
105
|
-
read off the source — plus the tools to write through it, check what came out, and
|
|
106
|
-
bring pages in from Elementor.
|
|
107
|
-
|
|
108
|
-
## How the pieces fit
|
|
109
|
-
|
|
110
|
-
```mermaid
|
|
111
|
-
flowchart LR
|
|
112
|
-
subgraph measure["measured once, against a live install"]
|
|
113
|
-
SRC[plugin source] -->|extract_*.py| D[(data/*.csv)]
|
|
114
|
-
SW[sweep_*.py / probe_*.py] -->|commit, render, assert| D
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
subgraph write["every page you build"]
|
|
118
|
-
Q[mo.py] -->|one answer, verdict first| SPEC[page spec]
|
|
119
|
-
EL[Elementor _elementor_data] -->|from_elementor.py| SPEC
|
|
120
|
-
SPEC -->|build_page.py refuses what breaks| REST[Mosaic REST: checkout, check, commit]
|
|
121
|
-
REST --> DB[(23 tables)]
|
|
122
|
-
DB --> PAGE[served page]
|
|
123
|
-
end
|
|
124
|
-
|
|
125
|
-
subgraph verify["never trust the commit"]
|
|
126
|
-
PAGE --> V1[verify_rwd.py]
|
|
127
|
-
PAGE --> V2[verify_browser.py + design audit]
|
|
128
|
-
PAGE --> V3[verify_intro.py / verify_loop.py]
|
|
129
|
-
PAGE --> V4[verify_conversion.py]
|
|
130
|
-
V1 & V2 & V3 & V4 --> CSV[(verification CSVs)]
|
|
131
|
-
CSV --> GATE[check-release.mjs]
|
|
132
|
-
end
|
|
133
|
-
|
|
134
|
-
D --> Q
|
|
135
|
-
D --> SPEC
|
|
136
|
-
```
|
|
50
|
+
Requirements: Python 3 (the lookup, build and self-test tools use the standard library only); Playwright for the browser verifiers (`requirements.txt`); WP-CLI on the server for the `.php` tools; Node.js only for the npx installer. Works on Windows, macOS and Linux. A new npm version changes nothing until you re-run the installer with `--force`.
|
|
137
51
|
|
|
138
|
-
|
|
139
|
-
through them and refused when they say no; and nothing is believed until the
|
|
140
|
-
delivered page has been read back and the result recorded in a table that the
|
|
141
|
-
release gate checks.
|
|
52
|
+
## Quick start
|
|
142
53
|
|
|
143
|
-
|
|
54
|
+
Ask the assistant, for example:
|
|
144
55
|
|
|
145
|
-
|
|
146
|
-
|
|
56
|
+
- "Build a landing section on my Mosaic site: an H1, a paragraph and a button to /contact/."
|
|
57
|
+
- "Can I put an accordion-content directly inside a div in Mosaic?"
|
|
58
|
+
- "Add a popover tour with three steps that advances when each step closes."
|
|
147
59
|
|
|
148
|
-
|
|
149
|
-
not answer the question you have. Ask grep about `accordion-content` and it confirms
|
|
150
|
-
the type exists. The sweep says BROKE_PAGE: place one and the whole public page
|
|
151
|
-
becomes a 54-byte error string. Both true, both the wrong answer — the note beside
|
|
152
|
-
the row says that string names a missing parent, and that nested under
|
|
153
|
-
`accordion > accordion-item` the type commits, renders, and hands you a
|
|
154
|
-
keyboard-operable disclosure. `mo.py type` shows all three at once.
|
|
60
|
+
Or query the data yourself:
|
|
155
61
|
|
|
156
62
|
```bash
|
|
157
|
-
python tools/mo.py
|
|
158
|
-
python tools/mo.py check div text button # exits 1 on an unsafe or unknown type
|
|
159
|
-
python tools/mo.py params text # everything settable on one type
|
|
160
|
-
python tools/mo.py style --grouped # the 20 that are inert set on their own
|
|
161
|
-
python tools/mo.py states --verified # the states measured to compile
|
|
162
|
-
python tools/mo.py css grid-column # which Mosaic key drives this CSS
|
|
63
|
+
python tools/mo.py check div text accordion-content
|
|
163
64
|
```
|
|
164
65
|
|
|
165
|
-
Then check the page. Mosaic has **eight** failure modes and only three of them change
|
|
166
|
-
the HTTP status code:
|
|
167
|
-
|
|
168
66
|
```
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
public page becomes a 54-byte error string
|
|
173
|
-
wrong value SHAPE HTTP 200, stored, and the CSS rule is simply absent
|
|
174
|
-
right rule, wrong result HTTP 200, in the stylesheet, correct, and the BROWSER
|
|
175
|
-
computes something else
|
|
176
|
-
no template for the URL HTTP 406 with an EMPTY BODY for anyone not logged in
|
|
177
|
-
render-time fatal from HTTP 500 - the commit went through, the page dies when
|
|
178
|
-
CONTENT Mosaic parses it. A `code` node's content is a template:
|
|
179
|
-
`@media(` as every minifier writes it is read as a
|
|
180
|
-
function call. `@media (` renders. build_page refuses
|
|
181
|
-
the former.
|
|
182
|
-
plugin upgrade renamed HTTP 200, page intact, rows migrated - and CSS you wrote
|
|
183
|
-
what the page emits against an emitted class matches nothing. 1.0.8 turned
|
|
184
|
-
`M_EL4 M_EL_Div` into `m-div _e`, state classes with it,
|
|
185
|
-
`customStyles` into `customDeclarations`. The example's
|
|
186
|
-
tap-to-enlarge stopped opening; verify_loop.py said so.
|
|
67
|
+
type outcome why
|
|
68
|
+
----------------- ---------- -----------------------------------------------
|
|
69
|
+
accordion-content BROKE_PAGE AccordionItemElementMResource instance required
|
|
187
70
|
```
|
|
188
71
|
|
|
189
|
-
|
|
190
|
-
stylesheet. Every tool here fetches the page afterwards — and treats a 5xx as an
|
|
191
|
-
empty page, because WordPress's "critical error" screen is 2,697 bytes and larger
|
|
192
|
-
than any naive healthy-page floor.
|
|
193
|
-
|
|
194
|
-
## What was verified, and how
|
|
195
|
-
|
|
196
|
-
Everything ran against a live install — WordPress 7.1, WooCommerce 11.1, Mosaic Pro
|
|
197
|
-
1.0.11, **unlicensed**: the licence gates the theme library and updates, not the node
|
|
198
|
-
factories, so Pro types register and render regardless.
|
|
199
|
-
|
|
200
|
-
| pass | result |
|
|
201
|
-
|---|---|
|
|
202
|
-
| **node types** | 129 / 129 swept one per document, committed → rendered → asserted → deleted: 77 RENDERED, 25 COMMITTED, 15 COMMIT_5xx, 12 BROKE_PAGE. Re-swept on 1.0.8: five types that used to commit silently now kill the page unparented. The non-rendering rows that are artefacts of committing without the required parent say so beside the row |
|
|
203
|
-
| **style properties** | 101 / 101 written to a live page and checked against the compiled CSS: 61 COMPILED, 18 ABSENT, 21 SKIPPED |
|
|
204
|
-
| **node properties** | 191 / 191 re-probed with a value shaped by each property's own validator chain: 39 APPLIED, 45 NO_EFFECT, 55 NO_HOST, 48 SKIPPED |
|
|
205
|
-
| **responsive** | 733 `_t`/`_m` declarations across two sites asserted against the stylesheet the site actually served — all verified |
|
|
206
|
-
| **browser** | 4,132 computed-style readings on two delivered pages in Chromium at three viewports: 2,929 compared and agreed, 912 not-comparable and labelled, **0 overridden** |
|
|
207
|
-
| **design audit** | contrast, font fallback, CJK tracking, overflow, clipped text, line measure — run in the browser, **26 findings, every one ruled on in writing** — an acknowledgement without a reason is refused by the release gate |
|
|
208
|
-
| **components** | the component system driven end to end, **8 of 8**: created under a category, document healed, tree filled through the writable instance, the read-only one refused the same write as a negative control, two instances on a page rendering one definition twice |
|
|
209
|
-
| **style states** | 52 of the 53 states written to a live page and matched against the selector the table promises: **36 compiled exactly**, 13 NO_HOST, 3 SKIPPED, 0 BROKE_PAGE. Pseudo-classes are emitted UPPERCASE (`.M_EL9:HOVER`) |
|
|
210
|
-
| **interactions** | the JS animation path probed with negative controls and the row read back: `propertyMetas` **is** accepted and stored; the property values still do not bind, and the boundary is now exact |
|
|
211
|
-
| **accordion** | `accordion-item` and `accordion-content` sit in the sweep table as BROKE_PAGE; nested as their factory requires they commit and render, **7 of 7** |
|
|
212
|
-
| **entrance animation** | the page-load sequence sampled at fifteen timestamps on a monotonic clock and asserted on eight counts. Costs one late frame over a page with no animation at all, because it waits for the document's first layout |
|
|
213
|
-
| **perpetual animation** | a corner plate that keeps printing itself and opens to full size when tapped, **28 checks**: periodicity by scrubbing a paused timeline, occlusion of text *and* controls at five widths and twenty-five scroll stops with "never readable" as the failing condition, opened by pointer and by Enter, still under reduced motion |
|
|
214
|
-
| **Elementor conversion** | every Elementor page of a production site — 19 pages, 3,292 elements — converted, built and checked against its source: **19 of 19**, 3,281 elements carried, 11 declared. Then the converted page through rwd, browser and the audit, with every finding classified inherited-or-introduced: **0 introduced** |
|
|
215
|
-
| **theme export/import** | two paths, both round-tripped. `theme_export.php` moves rows as JSON over WP-CLI, ids intact. `theme_zip.py` drives Mosaic's **own** ZIP export/import — import lands in test mode unless told `--activate`, because the default is to switch the live site — and **22 checks** hold the copy against the source tree for tree |
|
|
216
|
-
| **the skill itself** | `claude plugin eval .` — five cases a user would ask, three runs each, with and without the skill loaded, three LLM judges a run. **With: 1.00 on all five. Without: 0.00 on all five.** The baseline's best answer was to refuse |
|
|
217
|
-
| **measured live** | 115 REST routes, 157 variants, 59 condition subjects, 23 tables / 210 columns |
|
|
218
|
-
| **1.0.9 features** | the modal (`<dialog>`), OpenStreetMap, the exit-intent and scroll-depth triggers, run rules, memory actions and the modal shorthand, each built on a live page and exercised in a real browser: 19 of 19. An exit-intent popup that fires once a session is one object, no wiring |
|
|
219
|
-
| **1.0.10 features** | the popover - Mosaic's first non-blocking dialog - built eight ways on a lab page and driven in Chromium: 37 of 37. A page-load notice that leaves the page scrollable and clickable, anchored menus and cards, the nine screen cells, the keepInView flip and its style state, a three-step tour on `afterClose`. Plus the modal's move onto the Popover API: top layer, `requestClose()`, and `display` on its host no longer pinning it open |
|
|
220
|
-
| **slider** | the whole family nested as its factories require and driven in a browser, 19 of 19: advances on its own delay, arrows and bullets and the keyboard move it, holds still under `prefers-reduced-motion`. The bullet turns out to be a template repeated per slide - same id on every copy |
|
|
221
|
-
| **a real site** | the nineteen converted Elementor pages assembled into one site with a real menu and a modal per page: 46 of 46 navigation checks, 19 of 19 modals, six distinct trigger / run-rule / memory / dismissal configurations |
|
|
222
|
-
| **custom fields** | ACF and Meta Box, forty fields on a page, read back through `@VAR` / `@LOOP` off the delivered HTML: 59 of 62 resolve, 3 empties explained; loops over multi-value fields rendered exactly the field's rows. `tools/list_fields.php` prints the names Mosaic actually registers |
|
|
223
|
-
| **upgraded live** | 1.0.7 -> 1.0.8 over the plugin's own milestone route, from outside wp-admin: 6 milestones, four tables renamed, every emitted class name changed, every `customStyles` rewritten - then every sweep above re-run on the result |
|
|
224
|
-
|
|
225
|
-
`SKIPPED`, `NO_HOST` and `INCONCLUSIVE` are never folded into a pass rate. A sweep
|
|
226
|
-
that scores its own blind spots as successes is the thing this skill argues against.
|
|
227
|
-
|
|
228
|
-
## What it costs to consult
|
|
229
|
-
|
|
230
|
-
Three ways an agent can learn what a Mosaic node type or style key actually takes,
|
|
231
|
-
priced on the same six tasks with tiktoken (`tools/benchmark_tokens.py`; run it
|
|
232
|
-
yourself):
|
|
233
|
-
|
|
234
|
-
| task | read the source | load every table | `mo.py` query |
|
|
235
|
-
|---|---:|---:|---:|
|
|
236
|
-
| place a heading, a paragraph and a linked button | 10,005 | 259,539 | **961** |
|
|
237
|
-
| set padding, a border and a radius, responsively | 3,490 | 259,539 | **396** |
|
|
238
|
-
| decide whether the accordion is usable, and how to nest it | 15,615 | 259,539 | **397** |
|
|
239
|
-
| find which hover/focus states actually compile | 3,619 | 259,539 | **1,054** |
|
|
240
|
-
| find which Mosaic key drives one CSS property | 1,862 | 259,539 | **51** |
|
|
241
|
-
| know what is unsafe before committing anything | 63,172 | 259,539 | **288** |
|
|
242
|
-
|
|
243
|
-
**71–99.5% fewer tokens than reading the source, 99.6%+ fewer than loading the
|
|
244
|
-
tables** — and the source could not have answered four of the six at all, because
|
|
245
|
-
"declared" and "compiles" are different questions and only the sweeps asked the
|
|
246
|
-
second one. The tables total 259,539 tokens; never load them. `mo.py` is the query.
|
|
247
|
-
|
|
248
|
-
### Results worth knowing before you write anything
|
|
249
|
-
|
|
250
|
-
**A property that belongs to a `group` is inert when set on its own.** Exact in both
|
|
251
|
-
directions: 78 ungrouped properties gave 58 COMPILED and 0 ABSENT; all 20 grouped
|
|
252
|
-
ones gave 0 COMPILED. So `borderLeftWidth`, `outlineColor` and `gridColumnStart` are
|
|
253
|
-
three instances of one rule, not three oddities. Use the grouped shape — `border`
|
|
254
|
-
takes `{width, style, color}` — or `customDeclarations`.
|
|
255
|
-
|
|
256
|
-
**A breakpoint override can CHANGE a property but never REMOVE one.** Narrow-screen
|
|
257
|
-
`customDeclarations` that merely omits a border leaves the wide-screen border standing.
|
|
258
|
-
Say `border-left:0` out loud.
|
|
259
|
-
|
|
260
|
-
**Only four types take a `url`**: `button`, `menu-link`, `wysiwyg-link`,
|
|
261
|
-
`dropdown-toggle`. On a `text` or an `image` it is accepted, stored, and emits no
|
|
262
|
-
anchor. Wrap the thing in a `menu-link` instead — it takes any children and becomes
|
|
263
|
-
a real `<a href>`.
|
|
264
|
-
|
|
265
|
-
**An image's attachment-protocol path is relative to the uploads directory.**
|
|
266
|
-
`wp-attachment://image/<id>/full/2026/09/pic.png` resolves and carries the
|
|
267
|
-
attachment's width and height. Give it the full `wp-content/uploads/...` path — the
|
|
268
|
-
obvious guess — and Mosaic prefixes the uploads base a second time, silently.
|
|
269
|
-
|
|
270
|
-
## Elementor → Mosaic
|
|
72
|
+
It exits 1: placed bare, that type commits and then turns the whole public page into an error string. `python tools/mo.py type accordion-content` says where it has to go instead.
|
|
271
73
|
|
|
272
|
-
|
|
273
|
-
wp post meta get 2360 _elementor_data > page.json
|
|
274
|
-
python tools/from_elementor.py --data page.json --out spec.json --report conv.csv \
|
|
275
|
-
--uploads-base https://site/wp-content/uploads --slug works --post 208
|
|
276
|
-
python tools/build_site.py --config c.json --site spec.json
|
|
277
|
-
python tools/verify_conversion.py --data page.json --url https://site/works/ --report conv.csv
|
|
278
|
-
```
|
|
74
|
+
## Trigger phrases
|
|
279
75
|
|
|
280
|
-
|
|
281
|
-
container / heading / text-editor / button / html / icon-list / divider / image are
|
|
282
|
-
99.6% of every element present. The long tail — loop grids, forms, countdowns,
|
|
283
|
-
third-party addons — is dynamic and has no node to become; each is reported by
|
|
284
|
-
name and reason, never dropped, and `--strict` refuses to write a lossy spec.
|
|
285
|
-
|
|
286
|
-
Layout, typography, colour, borders, links and images cross over, at all three
|
|
287
|
-
breakpoints (`_tablet`/`_mobile` → `_t`/`_m`). What does not: entrance animations
|
|
288
|
-
(Mosaic's interaction binding is unsolved), shape dividers, gradient overlays. The
|
|
289
|
-
verifier then holds the built page against the source — every string, image, link
|
|
290
|
-
and heading level — and it earned its place at once: it caught the converter losing
|
|
291
|
-
19 of 21 links by writing `url` onto nodes that ignore it.
|
|
292
|
-
|
|
293
|
-
## Tools
|
|
294
|
-
|
|
295
|
-
| tool | does |
|
|
296
|
-
|---|---|
|
|
297
|
-
| `mo.py` | query the measured surface — **the front door** |
|
|
298
|
-
| `build_page.py` / `build_site.py` | commit a spec through the guarded write path; refuses what is measured to break |
|
|
299
|
-
| `from_elementor.py` / `verify_conversion.py` | Elementor → Mosaic, and proof the content arrived |
|
|
300
|
-
| `verify_browser.py` | does the browser compute what the stylesheet promised, and does it pass a design audit |
|
|
301
|
-
| `verify_rwd.py` | does every `_t`/`_m` declaration reach the served stylesheet |
|
|
302
|
-
| `verify_intro.py` / `verify_loop.py` | a page-load sequence that ENDS; a perpetual one that loops, hides nothing, and opens |
|
|
303
|
-
| `theme_export.php` / `theme_import.php` | a whole theme as JSON rows over WP-CLI, ids intact |
|
|
304
|
-
| `prune_unbound.php` | clears the templates and masters that page rebuilds leave bound to nothing, with their nodes; dry run unless `--apply` |
|
|
305
|
-
| `fix_text_runs.py` | makes buttons built before v1.34.1 editable in the Mosaic editor by wrapping their text the way the editor does; dry run unless `--apply` |
|
|
306
|
-
| `scan_inline_tags.py` | read only: finds text that holds HTML tags, which Mosaic 1.0.11+ prints as visible `<p>` / `<br>` on the page, and warns on a document with a duplicate root |
|
|
307
|
-
| `fix_inline_tags.py` | fixes what `scan_inline_tags.py` finds, turning the tags into real inline nodes; dry run unless `--apply` |
|
|
308
|
-
| `theme_zip.py` / `theme_zip_compare.php` / `theme_delete.php` | Mosaic's own ZIP export/import from outside the editor, the copy held against the source, and a clean delete that refuses the live theme |
|
|
309
|
-
| `list_fields.php` | every `@VAR` / `@LOOP` name a post's custom fields register, with values |
|
|
310
|
-
| `verify_dialog.py` | the 1.0.9 modal, triggers, run rules and memory, driven in a browser |
|
|
311
|
-
| `verify_popovers.py` | the 1.0.10 popover: placement, blocking, closedby, flip, chaining, driven in a browser |
|
|
312
|
-
| `verify_slider.py` / `verify_navigation.py` | does the slider actually move; is every menu item a real link and every page reachable |
|
|
313
|
-
| `data_upgrade.py` | after a plugin update, Mosaic's data migration over its own milestone route - the editor API is gone until it runs |
|
|
314
|
-
| `sweep_*.py` / `probe_*.py` | the instruments the tables were made with |
|
|
315
|
-
| `bootstrap_probe_theme.php` / `mint_session.php` | a licence-free scratch theme and a REST session from WP-CLI |
|
|
316
|
-
|
|
317
|
-
## The worked example
|
|
318
|
-
|
|
319
|
-
`sites/_moksa.py` builds a real studio site through the tables alone and ships as
|
|
320
|
-
the reference: a homepage of 1,286 nodes with a scroll-tracking clause index on named
|
|
321
|
-
view timelines, an entrance sequence that prints an ukiyo-e sheet one carved block
|
|
322
|
-
at a time, a corner plate that keeps printing forever and opens when tapped, and a
|
|
323
|
-
WooCommerce My Account page whose UI arrives through one `code` node running a
|
|
324
|
-
shortcode. No JavaScript of its own anywhere. Every verification table in `data/`
|
|
325
|
-
was produced against it.
|
|
326
|
-
|
|
327
|
-
## Where to start
|
|
328
|
-
|
|
329
|
-
1. `references/data-model.md` — where a page actually lives.
|
|
330
|
-
2. `references/write-protocol.md` — checkout / check / commit.
|
|
331
|
-
3. `references/failure-modes.md` — how Mosaic fails, measured. **Read before writing.**
|
|
332
|
-
4. `references/responsive.md` — the state/breakpoint/property axis.
|
|
333
|
-
5. `references/styling.md` — how a style value becomes CSS.
|
|
334
|
-
6. `references/design-system.md` — variants (element classes) and design tokens.
|
|
335
|
-
|
|
336
|
-
## Releasing
|
|
76
|
+
English: Mosaic Pro, Nextend, build a Mosaic page without the editor, Mosaic padding / hover / breakpoint, Mosaic popup, popover, modal, Mosaic interaction, move a Mosaic theme, Mosaic upgrade, Elementor to Mosaic.
|
|
337
77
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
78
|
+
中文:Mosaic、Nextend、不開編輯器做頁面、內距、外距、圓角、懸停、斷點、RWD、彈出視窗、浮動框、摺疊面板、頁籤、輪播、互動、動畫、搬佈景、Mosaic 升級、Elementor 轉 Mosaic。
|
|
79
|
+
|
|
80
|
+
## What it runs and connects to
|
|
81
|
+
|
|
82
|
+
- **Nothing runs on its own.** The plugin has no hooks, no MCP servers and no background processes. Tools run only when Claude follows `SKILL.md` and you approve the command.
|
|
83
|
+
- **Offline, local only**: `tools/mo.py` reads the CSV files in `data/` and prints answers. `tools/test_mosaic.py` and `tools/check_numbers.py` read the repository. They write nothing and contact nothing.
|
|
84
|
+
- **Your WordPress site, over its REST API**: `build_page.py`, `build_site.py`, `data_upgrade.py`, `theme_zip.py`, the `sweep_*.py` and `probe*.py` tools call Mosaic's REST routes on the one site you configure, to read and write pages, components, templates and themes. They contact only that site.
|
|
85
|
+
- **Your WordPress site, through WP-CLI**: the `tools/*.php` scripts run inside your WordPress with `wp eval-file`, on the server (usually over your own SSH). They read and write Mosaic's tables and theme data on that site. `theme_delete.php` and `prune_unbound.php` delete data and run as a dry run unless told `--apply`.
|
|
86
|
+
- **Reading your public pages**: `tools/verify_*.py` and `audit_mobile.py` open pages of that same site with Playwright (Chromium) or `urllib` and compare what was delivered with what was written.
|
|
87
|
+
- **Credentials**: a site URL, a WordPress logged-in cookie and the matching `wp_rest` nonce, for an administrator on your own site. `tools/mint_session.php` prints them on the server. Installed as a plugin, Claude Code asks for them as `userConfig` values; the cookie and nonce are marked sensitive and kept in the platform's credential store. They can also come from environment variables (`MOSAIC_SITE_URL`, `MOSAIC_REST_COOKIE`, `MOSAIC_REST_NONCE`) or a JSON file you pass with `--config`. **No tool looks for credentials on your machine.**
|
|
88
|
+
- **Third parties**: the worked example in `sites/` loads Google Fonts, so pages built from it make visitors' browsers fetch fonts from Google.
|
|
89
|
+
- Nothing is downloaded at install time, and no data is sent to the author or anyone else.
|
|
342
90
|
|
|
343
|
-
|
|
344
|
-
wrong: the version numbers agree, every `files` glob matches, every verification
|
|
345
|
-
CSV still has the row count SKILL.md and the four READMEs quote, no design-audit
|
|
346
|
-
finding is unreviewed, the eval suite is present, and **the tarball itself is
|
|
347
|
-
inspected** — npm's `files` allowlist overrides `.gitignore`, and once put a real
|
|
348
|
-
client's site into a package that was about to publish.
|
|
91
|
+
## How it's verified
|
|
349
92
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
93
|
+
- Node types, node properties, style properties and style states are extracted from the plugin source (`tools/check_tables.py` re-extracts and diffs them), then written one at a time to a live install and asserted on the delivered HTML and compiled CSS.
|
|
94
|
+
- The demo pages are re-read in Chromium: 733 responsive declarations checked against the served stylesheet and 4,132 computed-style readings at three viewports. Details: [verification-record.md](references/verification-record.md).
|
|
95
|
+
- Self-test: `python tools/test_mosaic.py`, 42 offline tests (lookups, Chinese terms, the build output's shape and refusals, the public build interface, this repository's numbers and privacy).
|
|
96
|
+
- Evals: 16 questions about Mosaic 1.0.10 to 1.0.12 behaviour; with the skill 16/16, without it 0/16. Results: [evals/RESULTS.md](evals/RESULTS.md).
|
|
97
|
+
- Every number in `SKILL.md` and these READMEs is checked against the data by `tools/check_numbers.py`.
|
|
98
|
+
|
|
99
|
+
## Limits
|
|
100
|
+
|
|
101
|
+
- Measured against Mosaic Pro up to 1.0.13. Features that live only in the 1.0.13 editor (new style-variable types, List classes, pageLoad delay and others) are not measured yet and are not written by the tools.
|
|
102
|
+
- Grid child placement properties emit nothing when written headlessly; some interaction shapes are still unmeasured.
|
|
103
|
+
- The browser verifiers need Playwright and a site you can write to; they are not part of the offline self-test.
|
|
104
|
+
- Open questions: [data/pending.csv](data/pending.csv). The long guide (failure modes, token costs, the Elementor converter, the worked example): [docs/guide.md](docs/guide.md).
|
|
105
|
+
|
|
106
|
+
## Repo layout
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
SKILL.md what the assistant loads: sources, routing, tasks, verify
|
|
110
|
+
data/ measured tables (CSV), Chinese terms, pending list
|
|
111
|
+
references/ topic guides: data model, styling, dialogs, upgrades ...
|
|
112
|
+
tools/ mo.py, build and verify tools, WP-CLI scripts, self-test
|
|
113
|
+
sites/ the worked example as readable Python modules
|
|
114
|
+
evals/ graded questions and results
|
|
115
|
+
scripts/ installer and release gate
|
|
116
|
+
assets/ per-platform install templates
|
|
117
|
+
docs/ the long guide
|
|
118
|
+
.claude-plugin/ plugin and marketplace manifests
|
|
119
|
+
```
|
|
353
120
|
|
|
354
|
-
##
|
|
121
|
+
## License & author
|
|
355
122
|
|
|
356
|
-
MIT.
|
|
123
|
+
MIT License. Made by Moksa ([moksaweb.com](https://moksaweb.com)). Issues: [GitHub](https://github.com/Moksa1123/mosaic-headless/issues).
|