Skip to content

Commit c72e723

Browse files
iOSDevSKclaude
andcommitted
1.0.0-gamma.4: Flash shares a group's recording, the chrome driven once; Woo levers at 5.6; Astro parity (from 2b1741e)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xf7wTz9XZFZ1GCWzDzHaWW
1 parent 5af5767 commit c72e723

18 files changed

Lines changed: 1441 additions & 125 deletions

‎skills/html2wp/SKILL.md‎

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -448,18 +448,21 @@ a stuck fix gives up; the attempts are in the report.
448448
static (stage 1); `preview-down` → `test-env.sh up <slug>` again (3, 5);
449449
`article-part-foreign` → the article layout from the site's own article,
450450
then from another article or a named region (3.5); `form-field-unnamed` →
451-
name the fields (2.65); `menu-unwired` → wire the menu (5); `cart-count-missing` →
452-
the cart count in every header; `cart-count-stale` → the count follows the
453-
block cart; `cart-options-merged` → a chosen option is its own cart line
454-
(5.6); `prereq-missing` → the prerequisites again (-3).
451+
name the fields (2.65); `menu-unwired` → wire the menu (5);
452+
`cart-count-missing` / `cart-count-stale` → the cart count in every header,
453+
in step with the cart; `cart-options-merged` → a chosen option is its own
454+
cart line (5.6 — `woo-repair.py` spends these for you, scripted patches
455+
only); `prereq-missing` → the prerequisites again (-3).
455456

456457
Everything else is decided by the table below: **record** means
457458
`progress.sh warn <stage> "<why>"` and go on; **stop** means the stop path,
458459
after the stage's levers.
459460

460461
### The run
461462

462-
Resolve once: `S` = this skill's `assets/scripts/` (absolute), `{workspace}`
463+
Resolve once: `S` = this skill's `assets/scripts/` (absolute — in the app it is
464+
exactly `/opt/html2wp/skills/html2wp/assets/scripts`; copy it, never retype
465+
it), `{workspace}`
463466
(`$H2WP_WORKSPACE` when set, see "The workspace"), `{input}` =
464467
`{workspace}/static-src` — Flash always converts a working copy there, never
465468
the owner's folder — `{slug}`/`{version}` from the manifest once stage 0 wrote
@@ -483,8 +486,8 @@ container has no `apply_patch` command.
483486
|---|---|---|---|
484487
| mode | `progress.sh mode flash` | — | — |
485488
| -4 | `whats-here.sh {workspace}` (a finished or part-finished workspace: follow its route — a Continue resumes, never restarts); `allowance.sh` (print its line verbatim); `detect-project.py <project> --out {workspace}/detect.json` | — | kind `none`; a site over the page allowance (say it, with the service's words) |
486-
| -3 | `$S/check-prereqs.sh` | — | a missing tool (it prints what to install) |
487-
| -1 | by kind — `static-html`: `rsync -a --exclude .git --exclude node_modules --exclude .html2wp <project>/ {input}/`; `web-app`: `prerender-spa.py --project <project> --out {input} --no-verify`; `static-site`: `static-site.py --project <project> --out {input}` (exit 3 → `prerender-spa.py` instead, once); `html2wp-astro`: `detect-project.py <project> --prepare {workspace}` | — | no pages written (exit 2; 1 from static-site.py) |
489+
| -3 | `$S/check-prereqs.sh` — in the app exactly `/opt/html2wp/skills/html2wp/assets/scripts/check-prereqs.sh` | — | a missing tool (it prints what to install) |
490+
| -1 | by kind — `static-html`: `rsync -a --exclude .git --exclude node_modules --exclude .html2wp <project>/ {input}/`; `web-app`: `prerender-spa.py --project <project> --out {input} --no-verify --flash` (a group of pages — a route table's `/product/:id`, or pages sharing a path with one varying last segment like a TanStack `/blog/<slug>` — is recorded once, on its first page, and each other page shares that recording only when its controls are the same; the pages are captured in `--jobs` browsers, entrance motion is waited for at most 6 s; it says "N of M" as it goes); `static-site`: `static-site.py --project <project> --out {input}` (exit 3 → `prerender-spa.py … --no-verify --flash` instead, once); `html2wp-astro`: `detect-project.py <project> --prepare {workspace}` | — | no pages written (exit 2; 1 from static-site.py) |
488491
| 0 | `cp -a {input} {workspace}/input-untouched`; `analyze-input.mjs {input} --out={workspace}/analysis.json`; `flash-manifest.py --analysis {workspace}/analysis.json --input {input} --workspace {workspace}`; decide (below); `check-manifest.py --manifest={workspace}/conversion-manifest.json --flash` | — | analyze exit 2 (refusal, key collision); check-manifest still red after its lever |
489492
| -1b | a shop: `capture-commerce-specimen.py --dist {input} --out {workspace}/style-specimens`; no shop: `skip` (it comes after stage 0 because stage 0 decides the shop) | a nonzero exit | — |
490493
| 0.5 | `optimize-images.py --input {input} --remote --apply --out {workspace}/optimize-images-report.json` (`skip` for `html2wp-astro`) | a nonzero exit | — |
@@ -494,9 +497,9 @@ container has no `apply_patch` command.
494497
| 2.65 | `normalize-form-fields.py --manifest=… --apply`, then `npm run build` (the LAST build) | — | the rebuild fails |
495498
| 2 | `stage2-gates.sh {workspace} --jobs 3` (+ `--original-remote={workspace}/optimize-images-report.json` when 0.5 localized pictures). It also runs 2.5 and 2.7: report them from its step lines right after (`done 2.5`, `done 2.7`; no start of their own). Its coverage probe's list goes into the report — never edit the detection rules | gate A or A2 red | chrome-groups, capture-chrome or detect-collections failed (the upload needs their output) |
496499
| 3 | `$S/stage3-remote.sh {workspace}` (upload, WordPress, the screenshot — never the ZIP) | — | the upload failed (10; 30 when WordPress stays down after its lever), the service refused (its words verbatim), the screenshot failed (40+) |
497-
| 3.5 | `$S/theme-zip.sh {workspace}` — with a blog the article layout first (`article-part.py`: the service's own when its classes are the site's, else derived from the site's article page), with a shop the cart behaviours (`woo-shims.py --all`: the header count, its sync with the block cart, a chosen option as its own cart line), then make-zip into `{workspace}/{slug}-{version}.zip` — packaged now, so stage 5 installs the very file that is delivered | — | make-zip refuses after its levers (a theme that would import broken is never delivered) |
500+
| 3.5 | `$S/theme-zip.sh {workspace}` — with a blog the article layout first (`article-part.py`: the service's own when its classes are the site's, else derived from the site's article page; that is the `article-part-foreign` failure's first lever already spent — a repair starts at the second), then make-zip into `{workspace}/{slug}-{version}.zip` — packaged now, so stage 5 installs the very file that is delivered | — | make-zip refuses after its levers (a theme that would import broken is never delivered) |
498501
| 5 | in this order, each once: `fetch-editor.py {workspace}` (it takes the ZIP a UI staged in `$H2WP_VE_LITE_ZIP` when set, else the latest release); `install-theme.py --env {workspace}/.test-env-{slug}.json --theme {workspace}/{slug}-{version}.zip --manifest={workspace}/conversion-manifest.json --editor {workspace}/visual-edit-lite.zip --out {workspace}/install-theme` (no `--editor` when the fetch failed — say so); `quick-check.py --env {workspace}/.test-env-{slug}.json --manifest=… --out {workspace}/quick-check.json`; `verify-wp.py --dist {workspace}/astro-project/dist --wp <url> --manifest=… --out {workspace}/verify-wp --wp-cli="<wp-cli>" --jobs 3`; LAST, because it writes into the preview (and restores), `smoke-editor.py --wp <url> --manifest=… --wp-cli="<wp-cli>" --admin=admin:admin123 --out {workspace}/smoke-editor --jobs 3` | quick-check, gate B, gate C or the smoke red | install-theme fails |
499-
| 5.6 | a shop: `audit-woo-coverage.py --wp <url> --workspace {workspace} --wp-cli "<wp-cli>"` — it shops, and its cart probe checks what a shopper watches: the header count after an add, the count following the cart's + / − / remove, two options of one product as two lines (a red probe row has levers; the probe alone again is `--probe-cart`); no shop: `skip` | red | — |
502+
| 5.6 | a shop: `audit-woo-coverage.py --wp <url> --workspace {workspace} --wp-cli "<wp-cli>"` — it shops, and its cart probe checks what a shopper watches: the header count after an add, the count following the cart's + / − / remove, two options of one product as two lines (a red probe row has levers; the probe alone again is `--probe-cart`); a red probe row: `$S/woo-repair.py {workspace}` — each red row's one scripted lever through the budget (`woo-shims.py`: the header count and its sync with the cart; a chosen option as its own cart line), into the run's ZIP and the preview, the probe again; no shop: `skip` | red | — |
500503
| 6 | `write-result.py {workspace} --draft` (the rows and the verdict to write from, in `{workspace}/result-draft/` — never the run's result, which stage 7 writes after the verdicts went out); write `{workspace}/CONVERSION-REPORT.md` (below) and `<project>/.html2wp/state.json` (stage 6's pointer — the workspace path in it is its purpose) | — | — |
501504
| 6.5 | `send-verdicts.sh {workspace} --outcome=delivered` | it could not send | — |
502505
| 7 | `write-result.py {workspace}` — result.json, the ZIPs, the report and its PDF into `{output}`. Then ONLY in a CLI run (no `H2WP_OUTPUT_DIR`): `cleanup.sh {workspace}` (keeps the re-run kit), and say how to remove the preview (`test-env.sh down {slug}`) — it stays up. With `H2WP_OUTPUT_DIR` set an app owns the workspace: nothing is cleaned and the preview stays for the owner | — | — |
@@ -645,6 +648,15 @@ delivered project (exit 3) — that refusal is the rule.
645648
a change turn — no release ZIP, no script that makes one — not even when
646649
asked for the ZIP: point the owner to "Make release".
647650

651+
**An Astro run** (`result.json` says `target: "astro"`) has no theme and no
652+
WordPress — the same rules, on its project: edit only
653+
`{workspace}/astro-project/src/` (and `public/` for an image); never its
654+
config, packages or scripts, which `apply-change.py` refuses. The same
655+
`apply-change.py` command then runs ONLY the Astro build (`npm run build`,
656+
into `astro-project/dist` — the built site) and screenshots the touched pages
657+
from it; no prerender, no service, no stage. The ZIP is the owner's, with the
658+
app's "Make release", as for a theme.
659+
648660
**A page the owner edited in the preview** keeps the owner's text — the
649661
importer never overwrites an owner's edit — so a change to that page's source
650662
does not reach it. Say so; the owner makes it in Visual Edit Lite.
@@ -698,7 +710,9 @@ conversion.** Docker gets stopped, a Python upgrade drops Playwright, a
698710
assets/scripts/check-prereqs.sh
699711
```
700712

701-
Exit 0 means start. Exit 1 means it printed two lists, and they are two
713+
(in the app, exactly `/opt/html2wp/skills/html2wp/assets/scripts/check-prereqs.sh`
714+
— the plugin root is `/opt/html2wp`; copy the path, never retype it). Exit 0
715+
means start. Exit 1 means it printed two lists, and they are two
702716
different things:
703717

704718
**The user-local list — offer to run these, one command per message.** No
@@ -3457,6 +3471,9 @@ assets/scripts/theme-zip.sh Flash stage 3.5: the article layout (blog),
34573471
assets/scripts/article-part.py parts/article.html from the site's own
34583472
article with [wp-article] fields, when the
34593473
service shipped the generic layout
3474+
assets/scripts/woo-repair.py Flash stage 5.6: the cart probe's red rows,
3475+
each through its scripted lever and the
3476+
repair budget, the probe again
34603477
assets/scripts/woo-shims.py a shop's header cart count, its sync with
34613478
the block cart, a chosen option as its own
34623479
cart line

‎skills/html2wp/assets/repair-levers.json‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
],
6969
"what": "after add to cart, the header shows no cart count",
7070
"levers": [
71-
"cart-count-token"
71+
"cart-count"
7272
]
7373
},
7474
"cart-count-stale": {
@@ -77,7 +77,7 @@
7777
],
7878
"what": "changing the quantity or removing an item in the cart does not update the header count",
7979
"levers": [
80-
"cart-sync"
80+
"cart-count"
8181
]
8282
},
8383
"cart-options-merged": {
@@ -140,20 +140,17 @@
140140
"remedy": "Replace the static navigation in the header or footer part with the menu token the other menus use (the same [wp-menu …] form, the nav's own markup inside), then apply it into the preview.",
141141
"again": "python3 $S/apply-change.py {workspace} --repair 5 --what \"wire the menu\", then the check that was red"
142142
},
143-
"cart-count-token": {
144-
"label": "the cart count in every header",
145-
"remedy": "Put the count into every cart link of every header part: python3 $S/woo-shims.py {workspace} --cart-count (the design's own badge from the cart specimen, else a neutral one) — or paste the design's badge by hand: [wp-cart-count empty=\"hide\"]<span class=\"…\">{count}</span>[/wp-cart-count] (SKILL.md, \"The shop, after the transform\"). Then apply it into the preview.",
146-
"again": "python3 $S/apply-change.py {workspace} --repair 5.6 --what \"the cart count\", then python3 $S/audit-woo-coverage.py --wp <url> --workspace {workspace} --probe-cart"
147-
},
148-
"cart-sync": {
149-
"label": "the cart count follows the block cart",
150-
"remedy": "Add the cart-sync script to the theme: python3 $S/woo-shims.py {workspace} --cart-sync (it keeps the header count in step with WooCommerce's block cart and its Store API), then apply it into the preview.",
151-
"again": "python3 $S/apply-change.py {workspace} --repair 5.6 --what \"cart count sync\", then python3 $S/audit-woo-coverage.py --wp <url> --workspace {workspace} --probe-cart"
143+
"cart-count": {
144+
"label": "the cart count in every header, in step with the cart",
145+
"remedy": "python3 $S/woo-shims.py {workspace} --cart-count --cart-sync — the count token in every cart link of every header part (the design's own badge from the cart specimen, else a neutral one) and the script that keeps it in step with the block cart and the Store API — then into the preview. Stage 5.6 runs it for you: $S/woo-repair.py {workspace}.",
146+
"again": "python3 $S/apply-change.py {workspace} --repair 5.6 --what \"the cart count\", then python3 $S/audit-woo-coverage.py --wp <url> --workspace {workspace} --probe-cart",
147+
"script": "woo-shims.py --cart-count --cart-sync"
152148
},
153149
"size-as-cart-attribute": {
154150
"label": "the chosen option goes into the cart line",
155-
"remedy": "Carry the product's own option (a size, a colour) into the cart item: python3 $S/woo-shims.py {workspace} --option-cart-data (a chosen option becomes the cart line's own data, so two sizes are two lines), then apply it into the preview.",
156-
"again": "python3 $S/apply-change.py {workspace} --repair 5.6 --what \"options as cart lines\", then python3 $S/audit-woo-coverage.py --wp <url> --workspace {workspace} --probe-cart"
151+
"remedy": "python3 $S/woo-shims.py {workspace} --option-cart-data — a chosen option (a size, a colour) of a product with no variations becomes the cart line's own data, shown in the cart, the checkout and the order, so two sizes are two lines — then into the preview. Stage 5.6 runs it for you: $S/woo-repair.py {workspace}.",
152+
"again": "python3 $S/apply-change.py {workspace} --repair 5.6 --what \"options as cart lines\", then python3 $S/audit-woo-coverage.py --wp <url> --workspace {workspace} --probe-cart",
153+
"script": "woo-shims.py --option-cart-data"
157154
},
158155
"prereqs-again": {
159156
"label": "check the prerequisites again",

0 commit comments

Comments
 (0)