Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions plugins/stardust/evals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:

Expand Down
15 changes: 15 additions & 0 deletions plugins/stardust/evals/css-four-scope-block/criteria.json
Original file line number Diff line number Diff line change
@@ -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: <name> === */." },
{ "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/<name>/<name>.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." }
]
}
38 changes: 38 additions & 0 deletions plugins/stardust/evals/css-four-scope-block/task.md
Original file line number Diff line number Diff line change
@@ -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 `<style>` block:

1. Carries a `/* === BLOCK: hotline-211 === */` marker before any
`[data-module="hotline-211"] { ... }` rule, with the marker's
name matching the DOM's `data-module` value.
2. Carries a separate `/* === BLOCK: donate-band === */` group with
its own selectors.
3. Carries a `/* === BLOCK: article === */` group for the
`data-template="article"` rules (page-template scope folds into
BLOCK per Discipline 11 — no separate TEMPLATE scope).
4. Block-internal default-content selectors (e.g.,
`[data-module="hotline-211"] h2`) classify as BLOCK, not
default-content (the direct-child combinator does not protect
them — by design, blocks own their internals).
5. Refuses to write when a BLOCK marker's name has no matching
`data-module` or `data-template` value in the DOM (dead-block /
typo detection); the refusal names the unmatched block, the
nearest match by Levenshtein, and points to Discipline 11.
6. No `data-module` or `data-template` selectors leak into SECTION
or GLOBAL groups.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "css-four-scope-default-content",
"total": 100,
"criteria": [
{ "id": "activated", "weight": 5, "description": "The stardust:prototype skill was invoked and Discipline 11 was applied at craft time." },
{ "id": "direct_child_combinator","weight": 15, "description": "All rules under /* === GLOBAL: default-content === */ use the direct-child combinator (section > <el>). The combinator is load-bearing per Discipline 11." },
{ "id": "canonical_element_set", "weight": 10, "description": "Default-content selectors target only the canonical element set: h1-h6, p, ul, ol, li, img, picture, figure, figcaption, a, blockquote, hr. Other elements (div, span, custom tags) refuse." },
{ "id": "section_override_grouping","weight":15, "description": "Per-section default-content overrides (section[data-section=\"X\"] > <el>) live inside the matching SECTION group, NOT under GLOBAL: default-content." },
{ "id": "isolation_verified", "weight": 15, "description": "Block internals (e.g., [data-module=\"team-roster\"] h2) are NOT styled by section > h2 — the direct-child combinator stops at the section's direct children. Verified by render or computed-style inspection." },
{ "id": "refuses_descendant_combinator","weight":20, "description": "Given an element selector under GLOBAL: default-content that uses the descendant combinator instead of direct-child (e.g., section p { ... }), the validator refuses with a message naming the selector, suggesting section > p, and cross-linking Discipline 11." },
{ "id": "cascade_token_pickup", "weight": 10, "description": "When a section redefines a token (e.g., --heading-xxl), the section's default-content elements pick up the redefined value via cascade — verified by render or computed style." },
{ "id": "no_block_leak_to_default","weight": 5, "description": "No selector starting with [data-module] or [data-template] appears under GLOBAL: default-content." },
{ "id": "no_eds_references", "weight": 5, "description": "No mention of EDS, AEM, localhost:3000, dev servers, or framework targets in outputs or narration." }
]
}
45 changes: 45 additions & 0 deletions plugins/stardust/evals/css-four-scope-default-content/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Eval: four-scope CSS — default-content classification

## Setup

Stardust v0.10.0+ with Discipline 11 in `prototype/SKILL.md`.
A captured site with at least one section that mixes default prose
(direct-child `h2` + `p`) and a `[data-module]` whose internals
include an `h2` (so we can verify the direct-child combinator
isolates default-content rules from block internals).

## User prompt

"Render a prototype where the about section has a default heading
and paragraph, and a 'team-roster' module with a heading inside."

## Expected behavior

The `stardust:prototype` skill is invoked. Phase 2 craft produces a
proposed file whose first `<style>` block:

1. Carries an `/* === GLOBAL: default-content === */` marker before
the site-wide default-content rules.
2. Default-content rules use the direct-child combinator (`>`):
`section > h1`, `section > p`, `section > ul`, etc. Element
selectors WITHOUT the combinator (e.g., `section h1`, plain `h1`)
either refuse the write or are explicitly allowed only under
GLOBAL: resets.
3. Per-section default-content overrides
(`section[data-section="about"] > h2 { ... }`) live inside the
matching SECTION group, not under GLOBAL: default-content.
4. Rendering verifies isolation: the team-roster module's `h2`
inside `[data-module="team-roster"]` is NOT styled by
`section > h2` (the direct-child combinator stops at the
section's direct children). Block authors style the team-roster
`h2` under their own BLOCK: team-roster group.
5. Refuses to write when an element selector under
GLOBAL: default-content lacks the direct-child combinator (e.g.,
`section p { ... }` with descendant combinator instead of
`section > p`), naming the offending selector and the
remediation.
6. Default-content selectors are restricted to the canonical
element set: h1–h6, p, ul, ol, li, img, picture, figure,
figcaption, a, blockquote, hr. Other elements (div, span, custom
tags) refuse under GLOBAL: default-content (they belong in BLOCK
or as a section-internal rule).
15 changes: 15 additions & 0 deletions plugins/stardust/evals/css-four-scope-global/criteria.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "css-four-scope-global",
"total": 100,
"criteria": [
{ "id": "activated", "weight": 5, "description": "The stardust:prototype skill was invoked and Discipline 11 was applied at craft time." },
{ "id": "marker_tokens", "weight": 15, "description": "The proposed file's <style> block opens with /* === GLOBAL: tokens === */ immediately preceding the :root declaration." },
{ "id": "marker_resets", "weight": 10, "description": "An /* === GLOBAL: resets === */ marker precedes the html/body/main element selectors." },
{ "id": "marker_default_content", "weight": 15, "description": "An /* === GLOBAL: default-content === */ marker precedes the section > <el> default-content rules; all default-content rules use the direct-child combinator." },
{ "id": "marker_compound_utility","weight": 10, "description": "When canon.css applies, an /* === GLOBAL: compound utility === */ marker precedes canon.css classes (.btn-primary, .card, .link, form inputs)." },
{ "id": "marker_motion", "weight": 10, "description": "When cinematic motion applies, an /* === GLOBAL: motion === */ marker precedes @keyframes definitions; motion tokens land under GLOBAL: tokens (no fifth scope introduced)." },
{ "id": "refuses_unscoped_class", "weight": 20, "description": "Given a page-specific class selector with no scoping prefix (e.g., .headline { ... } not under GLOBAL: compound utility), the validator refuses the write with a structured message naming the selector, line number, and cross-link to Discipline 11." },
{ "id": "refusal_message_shape", "weight": 10, "description": "The refusal message offers the four remediation options (compound utility / section-scoped / block-scoped / default-content) verbatim per the Discipline 11 spec." },
{ "id": "no_eds_references", "weight": 5, "description": "No mention of EDS, AEM, localhost:3000, dev servers, or framework targets in outputs or narration." }
]
}
40 changes: 40 additions & 0 deletions plugins/stardust/evals/css-four-scope-global/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Eval: four-scope CSS — GLOBAL classification

## Setup

Stardust v0.10.0+ with Discipline 11 in `prototype/SKILL.md`.
A captured site with a single page, ready for `$stardust prototype`.
DESIGN.md tokens cover the standard set (color, type, spacing).

## User prompt

"Render a prototype for the home page."

## Expected behavior

The `stardust:prototype` skill is invoked. Phase 2 craft produces a
proposed file whose first `<style>` block:

1. Opens with the `/* === GLOBAL: tokens === */` marker preceding
the `:root` block.
2. Carries a `/* === GLOBAL: resets === */` marker preceding any
`html`, `body`, `main` selectors.
3. Carries a `/* === GLOBAL: default-content === */` marker preceding
the section-direct-child selectors (`section > h1`, `section > p`,
etc.).
4. (When canon.css applies) carries a
`/* === GLOBAL: compound utility === */` marker preceding
canon.css classes (`.btn-primary`, `.card`, `.link`).
5. (When cinematic motion applies) carries a
`/* === GLOBAL: motion === */` marker preceding any `@keyframes`
definitions.
6. Refuses to write the file when a class selector (e.g.,
`.headline`) is present without one of:
- placement under a `GLOBAL: compound utility` marker (canon.css
class lifted because used across templates), OR
- section-scoping prefix (`section[data-section="X"] .headline`),
OR
- block-scoping prefix (`[data-module="Y"] .headline`).

The refusal message names the unscoped selector, its line number,
and points to `skills/prototype/SKILL.md § Discipline 11`.
14 changes: 14 additions & 0 deletions plugins/stardust/evals/css-four-scope-section/criteria.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "css-four-scope-section",
"total": 100,
"criteria": [
{ "id": "activated", "weight": 5, "description": "The stardust:prototype skill was invoked and Discipline 11 was applied at craft time." },
{ "id": "marker_section_named", "weight": 15, "description": "Every SECTION marker carries a name matching a data-section attribute value present in the DOM. Format: /* === SECTION: <name> === */." },
{ "id": "section_token_overrides","weight": 15, "description": "Per-section token redefinitions live inside their matching SECTION group, not under GLOBAL: tokens. Each section's tokens are contiguous." },
{ "id": "section_default_override","weight": 15, "description": "Per-section default-content overrides (section[data-section=\"X\"] > <el>) live inside the same SECTION group as the token redefinitions for that section." },
{ "id": "cascade_works", "weight": 15, "description": "The section's default-content elements resolve token values against the section's lifted redefinitions (cascade verified by render — e.g., hero h1 picks up section[data-section=\"hero\"]'s --heading-xxl)." },
{ "id": "refuses_orphan_section", "weight": 20, "description": "Given a SECTION marker whose name does not match any data-section in the DOM, the validator refuses the write with a structured message naming the unmatched section, the nearest Levenshtein match, and cross-link to Discipline 11." },
{ "id": "no_section_leak_to_block","weight":10, "description": "No SECTION-scoped rule selector starts with [data-module] or [data-template] (those classify as BLOCK, not SECTION)." },
{ "id": "no_eds_references", "weight": 5, "description": "No mention of EDS, AEM, localhost:3000, dev servers, or framework targets in outputs or narration." }
]
}
36 changes: 36 additions & 0 deletions plugins/stardust/evals/css-four-scope-section/task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Eval: four-scope CSS — SECTION classification

## Setup

Stardust v0.10.0+ with Discipline 11 in `prototype/SKILL.md`.
A captured site with at least two sections needing token redefinition
— typically a hero with a brand-accent background plus a features
section with a different palette.

## User prompt

"Render a prototype for the home page; hero section uses the accent
palette, features section uses the neutral palette."

## Expected behavior

The `stardust:prototype` skill is invoked. Phase 2 craft produces a
proposed file whose first `<style>` block:

1. Carries a `/* === SECTION: hero === */` marker before any
`section[data-section="hero"] { ... }` rule, with the marker's
name (`hero`) matching the DOM's `data-section` attribute.
2. Places per-section token redefinition (e.g., `--color-bg`,
`--heading-xxl`) inside the SECTION group.
3. Places per-section default-content overrides
(`section[data-section="hero"] > h1 { ... }`) inside the same
SECTION group (still classifies as section scope per Discipline
11; the > selector is allowed at section depth).
4. Carries a separate `/* === SECTION: features === */` group with
the features section's token redefinitions.
5. Cascade works: the hero's `h1` resolves `var(--heading-xxl)`
against the hero section's lifted value, not the global default.
6. Refuses to write when a section-scoped rule's SECTION marker
doesn't match the DOM's `data-section` value (typo / orphaned
section detection); the refusal names the unmatched section name
and the nearest match by Levenshtein distance.
Loading
Loading