diff --git a/plugins/stardust/evals/README.md b/plugins/stardust/evals/README.md index db3e6f29..cff06ce9 100644 --- a/plugins/stardust/evals/README.md +++ b/plugins/stardust/evals/README.md @@ -36,6 +36,10 @@ v2 evals without modification. | `migrate-multi-template/` | Phase 4 (`migrate`) | Three render branches (Path A / A′ / B) + canon + modules + bespoke-slot promotion + broken-link reporting + color-reservation refusal. | | `migrate-self-contained-bundle/` | Phase 4 (`migrate`) | Self-contained zip-and-deploy bundle — six asset detection shapes, nine edge cases, six acceptance criteria, state.json `migrate` block with `selfContained: true`. | | `intent-reasoning-style/` | Master skill principle | "Open and reasoned" — vague phrases get clarified, never silently mapped to commands. Pending direction persisted. | +| `css-four-scope-global/` | Phase 3 (`prototype`) | Discipline 11 GLOBAL scope — marker comments for tokens / resets / default-content / compound utility / motion; unscoped-class refusal path. | +| `css-four-scope-section/` | Phase 3 (`prototype`) | Discipline 11 SECTION scope — marker names matching data-section, token override + default-content override grouping, cascade, orphan refusal. | +| `css-four-scope-block/` | Phase 3 (`prototype`) | Discipline 11 BLOCK scope — data-module + data-template fold into BLOCK, internals don't bleed to default-content, dead-block refusal. | +| `css-four-scope-default-content/` | Phase 3 (`prototype`)| Discipline 11 default-content scope — direct-child combinator load-bearing, canonical element set, isolation from block internals. | ## Coverage map @@ -45,6 +49,7 @@ v2 evals without modification. | Layer 2 — navigator orchestrator (4 phases) | `extract-multipage`, `direct-from-phrase`, `prototype-before-after`, `migrate-incremental` | | Layer 3 — migration tooling (per-page, incremental, idempotent) | `migrate-incremental`, `migrate-multi-template` | | Layer 3 — migrate output contract (self-contained bundle) | `migrate-self-contained-bundle` | +| Layer 3 — four-scope CSS extraction contract (Discipline 11) | `css-four-scope-global`, `css-four-scope-section`, `css-four-scope-block`, `css-four-scope-default-content` | The cross-cutting properties are pinned across multiple evals: diff --git a/plugins/stardust/evals/css-four-scope-block/criteria.json b/plugins/stardust/evals/css-four-scope-block/criteria.json new file mode 100644 index 00000000..7e20a8ac --- /dev/null +++ b/plugins/stardust/evals/css-four-scope-block/criteria.json @@ -0,0 +1,15 @@ +{ + "name": "css-four-scope-block", + "total": 100, + "criteria": [ + { "id": "activated", "weight": 5, "description": "The stardust:prototype skill was invoked and Discipline 11 was applied at craft time." }, + { "id": "marker_block_named", "weight": 15, "description": "Every BLOCK marker carries a name matching a data-module or data-template attribute value present in the DOM. Format: /* === BLOCK: === */." }, + { "id": "data_module_in_block", "weight": 10, "description": "[data-module=\"X\"] selectors and their descendants live under the matching BLOCK: X marker." }, + { "id": "data_template_in_block", "weight": 15, "description": "[data-template=\"Y\"] selectors and their descendants live under a BLOCK: Y marker (page-template scope folds into BLOCK; no separate TEMPLATE marker introduced)." }, + { "id": "block_internals_classify_as_block","weight":10, "description": "Element selectors deep-descended inside [data-module=\"X\"] (e.g., [data-module=\"X\"] h2, [data-module=\"X\"] [data-slot=\"phone\"]) classify as BLOCK, not default-content. The direct-child combinator does not protect block internals." }, + { "id": "refuses_dead_block", "weight": 20, "description": "Given a BLOCK marker whose name has no matching data-module or data-template in the DOM, the validator refuses the write with a structured message naming the unmatched block, the nearest Levenshtein match, and cross-link to Discipline 11." }, + { "id": "no_block_leak", "weight": 15, "description": "No [data-module] or [data-template] selector appears under a GLOBAL or SECTION marker; conversely, no SECTION or GLOBAL selectors appear under a BLOCK marker." }, + { "id": "extraction_mechanical", "weight": 5, "description": "The rendered file's block-grouped rules are extractable to blocks//.css by marker comment alone, with no LLM judgment per rule — confirmed by running the pseudocode extraction in Discipline 11's downstream section against the rendered file." }, + { "id": "no_eds_references", "weight": 5, "description": "No mention of EDS, AEM, localhost:3000, dev servers, or framework targets in outputs or narration." } + ] +} diff --git a/plugins/stardust/evals/css-four-scope-block/task.md b/plugins/stardust/evals/css-four-scope-block/task.md new file mode 100644 index 00000000..9dafdc1d --- /dev/null +++ b/plugins/stardust/evals/css-four-scope-block/task.md @@ -0,0 +1,38 @@ +# Eval: four-scope CSS — BLOCK classification + +## Setup + +Stardust v0.10.0+ with Discipline 11 in `prototype/SKILL.md`. +A captured site with at least two `data-module` instances in the DOM +(e.g., `hotline-211` and `donate-band`) and one `data-template` +instance at the page root (e.g., `data-template="article"`). + +## User prompt + +"Render a prototype for the home page. Include the 211 hotline +module and the donate-band module; the page uses the article +template." + +## Expected behavior + +The `stardust:prototype` skill is invoked. Phase 2 craft produces a +proposed file whose first ` @@ -111,6 +131,18 @@ The proposed file must satisfy: *demands* but the page *does not provide* (stat rows, addresses, testimonial quotes, etc.). +8. **Four-scope CSS organization.** Every rule in the file's + first `