From 9ce44cdef710c0f8403519abfb70a109fff8c883 Mon Sep 17 00:00:00 2001 From: sasa Date: Thu, 10 Sep 2026 23:25:08 +0300 Subject: [PATCH] feat(art): add living hedge SVG review library --- PLANS.md | 21 ++++++++++++++- docs/HEDGE_ART_MANIFEST.md | 38 +++++++++++++++++++++++++++ docs/UI_STYLE.md | 24 ++++++++++++++++++ docs/hedge-sample-library.svg | 48 +++++++++++++++++++++++++++++++++++ test/web/test_hedge_svg.js | 27 ++++++++++++++++++++ 5 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 docs/HEDGE_ART_MANIFEST.md create mode 100644 docs/hedge-sample-library.svg create mode 100644 test/web/test_hedge_svg.js diff --git a/PLANS.md b/PLANS.md index 707ecbc..b7f9732 100644 --- a/PLANS.md +++ b/PLANS.md @@ -2433,7 +2433,7 @@ The following planning-time decisions define this milestone: ## Milestone 023 — Top-down living hedge SVG sample library -**Status:** `NOT_STARTED` +**Status:** `COMPLETE` ### Objective @@ -2572,3 +2572,22 @@ The following planning-time request defines this milestone: - Artwork creation, review previews, validation, owner approval, and any later runtime integration are deferred. Milestone 022 remains the sole active milestone at planning time. +- 2026-09-10 implementation evidence: `docs/hedge-sample-library.svg` provides + six intact hedge families, joins, four impact stages, a breakthrough frame, + three permanent breaches, and 34/40/46 CSS-pixel dark-cell previews. The + sheet is 6,495 raw bytes and 1,884 gzip-9 bytes; it is review-only and is not + included in runtime assets. +- 2026-09-10 verification: `bash scripts/run_host_tests.sh` passed. `node + --test test/web/test_player_app.js test/web/test_hedge_svg.js` passed all 24 + tests, including the local-only SVG validation of stable identifiers, + reusable components, and forbidden dependencies. +- Project-owner visual selection remains outstanding. Until the owner selects + or rejects the intact family, impact progression, breach variants, density, + and palette, this milestone remains `IN_PROGRESS`; no runtime integration is + authorized. +- 2026-09-10 project-owner selection: the submitted review library is approved + without revision. The approved set includes all six intact hedge variants, + the shown four-stage impact progression and breakthrough frame, all three + breach variants, and the density and palette defined in `docs/UI_STYLE.md`. + This satisfies the required owner review. Runtime integration remains a + separately planned milestone. diff --git a/docs/HEDGE_ART_MANIFEST.md b/docs/HEDGE_ART_MANIFEST.md new file mode 100644 index 0000000..5d13812 --- /dev/null +++ b/docs/HEDGE_ART_MANIFEST.md @@ -0,0 +1,38 @@ +# Hedge sample library manifest + +`hedge-sample-library.svg` is a review-only, hand-editable SVG source. It is +not a web, firmware, or generated LittleFS asset. + +## Symbols + +- Intact straight variants: `hedge-intact-1` through `hedge-intact-6`. +- Topology examples: `hedge-base`, `hedge-corner`, `hedge-crossing`, and + `hedge-end`. +- Perseverance frames: `hedge-impact-1` through `hedge-impact-4` and + `hedge-breakthrough`. +- Permanent openings: `hedge-breach-1` through `hedge-breach-3`. +- Reusable primitives: `leaf-cluster-a`, `leaf-cluster-b`, and `twig-fork`. + +All edge art is authored left-to-right. Later integration may rotate it by 90, +180, or 270 degrees and mirror it only when the shared-edge centre remains +aligned. Highlights are distributed rather than directional, so rotation does +not create a lighting contradiction. + +## Accessibility and review + +The dark outline, branch forks, irregular leaf silhouette, and clear central +gap distinguish the symbols without relying only on hue. The comparison sheet +contains neutral and dark-cell previews at 34, 40, and 46 CSS-pixel targets. +Impact frames are static review frames; no animation, particle system, or +runtime event is implied. + +## Size and dependency record + +| Source | Raw bytes | gzip -9 bytes | Dependencies | +| --- | ---: | ---: | --- | +| `hedge-sample-library.svg` | 6,495 | 1,884 | None; inline SVG only | + +The validator rejects scripts, raster payloads, external URLs, editor metadata, +and missing stable identifiers. Reused `` primitives avoid duplicating +leaf and twig paths. The current sheet is deliberately outside the 1.5 MiB +runtime budget until a future approved integration milestone selects a family. diff --git a/docs/UI_STYLE.md b/docs/UI_STYLE.md index 671312f..5957578 100644 --- a/docs/UI_STYLE.md +++ b/docs/UI_STYLE.md @@ -134,6 +134,30 @@ are not MVP requirements. `rate_limited` still darkens and blurs only the maze for at most 520 ms. - Reduced-motion mode uses static deformation and the same trampled-gap state. +### Hedge art review contract + +- Hedge samples are direct top-down vectors for review only; they are not + runtime assets in this milestone. A segment occupies one cell edge and uses + a centered, 10 CSS-pixel-wide foliage band at 40 CSS pixels per cell, scaling + proportionally at 34 and 46 pixels. +- The family uses deep shadow `#173d2a`, branch `#765033`, foliage dark + `#296443`, foliage mid `#4f9b55`, foliage light `#8cc968`, and pale leaf + highlight `#c7e68a`. A dark outline and branch fork preserve silhouette in + grayscale; color is supplementary depth, not the only boundary cue. +- Each intact symbol combines three or more named leaf clusters with visible + twig forks, a restrained shadow, and an irregular outer silhouette. Straight + symbols tile end-to-end without double borders; corner, crossing, and end + symbols share their edge centre and may rotate or mirror without directional + lighting. +- Impact stages one through four retain the same wall centre while increasingly + compressing foliage, bending twigs, and shedding a fixed small number of + leaves. The breakthrough and trampled symbols leave a clear centred passage + at least 16 CSS pixels wide at 40-pixel scale, with flattened vegetation on + both sides. They never imply movement beyond that one authoritative edge. +- Review sheets show the source symbols on neutral and dark-cell backgrounds + at 34, 40, and 46 CSS pixels. They contain no coordinates, objects, + ownership, hidden topology, animation, or runtime dependencies. + ## 8. Responsive behavior - The minimum supported player viewport is `412 x 916` CSS pixels. diff --git a/docs/hedge-sample-library.svg b/docs/hedge-sample-library.svg new file mode 100644 index 0000000..ace3025 --- /dev/null +++ b/docs/hedge-sample-library.svg @@ -0,0 +1,48 @@ + + Top-down living hedge sample library + Review-only editable vector symbols for intact hedges, joins, impact stages, and breached passages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INTACT STRAIGHT HEDGE FAMILIESJOINS AND BOUNDARIESPERSEVERANCE PROGRESSIONPERMANENT BREACHESDARK CELL SCALE PREVIEWS: 34 / 40 / 46 CSS px + + + + + + diff --git a/test/web/test_hedge_svg.js b/test/web/test_hedge_svg.js new file mode 100644 index 0000000..196f67c --- /dev/null +++ b/test/web/test_hedge_svg.js @@ -0,0 +1,27 @@ +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const path = require("node:path"); +const test = require("node:test"); +const zlib = require("node:zlib"); + +const samplePath = path.join(__dirname, "..", "..", "docs", "hedge-sample-library.svg"); +const sample = fs.readFileSync(samplePath, "utf8"); + +test("hedge review sheet is local editable SVG with complete stable symbols", () => { + assert.match(sample, /^= 20); + assert.ok(zlib.gzipSync(sample, {level: 9}).length < sample.length); +});