Skip to content

Commit 5593457

Browse files
feat: add adaptive visual governor (#99)
1 parent 69beb8d commit 5593457

6 files changed

Lines changed: 481 additions & 41 deletions

File tree

β€ŽAGENTS.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ CDN import map (Three.js r0.160 via jsDelivr) plus local data, scripts, and modu
4949
| **`scripts/build_repos.py`** | Rebuilds `repos.json` and `data/city-state.json` from `data/logs/*` traffic + `gh api`. | Refreshing the city data locally. |
5050
| **`scripts/resident_profiles.py` + `data/residents/`** | Generates sanitized public resident profiles, the boot manifest, and the Worker authority registry. Profile JSON is generated β€” do not hand-edit. | Changing repository-bound resident identity or Shared/Bound inputs. |
5151
| **`scripts/smoke.mjs`** | Hermetic static and behavioral regression guards for the city runtime. | Any client feature, navigation, or generated-module integration change. |
52+
| **`scripts/test-visual-governor.mjs`** | Extracts and deterministically replays the inline adaptive visual-governor core. | Changing warm-up, thresholds, hysteresis, dwell, LOW_END/reduced-motion bounds, or recovery. |
5253
| **`scripts/test-portable-town.mjs`** | Deterministic fixtures for canonical, foreign, empty/archive-only, partial, missing-date, leakage, resident-cap, and zero-request portable towns. | Changing public-town projection or local resident derivation. |
5354
| **`.github/workflows/refresh.yml`** | "Refresh Repolis data" β€” daily Action that regenerates `repos.json` and pushes `chore: refresh`. | CI / data-refresh changes. |
5455
| **`scripts/build-contribution-library.mjs` + `assets/contribution-library.json`** | Generates the in-app **Contribution Library** JSON from the sibling `Hyeonsang-AI-Contributions` README (KO/EN); `index.html` fetches it at runtime. JSON is **generated β€” do not hand-edit.** Daily via `.github/workflows/update-contribution-library.yml`. | Changing the library landmark's data/source. |
@@ -127,6 +128,7 @@ zero LLM, zero cost β€” so run them freely:
127128
node council/test.mjs # deterministic Council crosscheck
128129
node council/test-live.mjs # live guards + state machine
129130
node scripts/smoke.mjs # city/runtime static + behavioral regression guards
131+
node scripts/test-visual-governor.mjs
130132
node scripts/test-portable-town.mjs
131133
python3 scripts/test_city_state.py
132134
python3 scripts/validate_city_state.py
@@ -181,6 +183,7 @@ Tested on Node v24. There is no linter or formatter configured β€” match the sur
181183
| Change Creator Hall profile facts, caching, or upstream Star handoff | `assets/town-creator.js` + the Creator Hall landmark/panel blocks in `index.html` + `scripts/smoke.mjs`; keep profile loading explicit-read and allowlisted. |
182184
| Change Town Growth Replay years, camera, reveal, share links, or era postcards | `assets/town-growth.js` + `/*TOWN_GROWTH_REPLAY*/` in `index.html` + the Growth Replay group in `scripts/smoke.mjs`; creation dates are historical, building metrics are current, and replay must restore camera/fog/sky/LOD exactly. |
183185
| Change Repository Atelier room, avatar, data walls, or action terminals | `/*REPOSITORY_ATELIER*/` in `index.html` + the Atelier group in `scripts/smoke.mjs`; preserve one lazy reusable room, three bounded canvas atlases, exact exterior restore, zero exterior renders inside, in-room Ask/Why ownership, and explicit-only exit/GitHub navigation. |
186+
| Change adaptive frame thresholds or visual tiers | `/*VISUAL_GOVERNOR_CORE*/` + `/*VISUAL_GOVERNOR_RUNTIME*/` in `index.html`, `scripts/test-visual-governor.mjs`, and the matching smoke group; preserve 6 s eligible warm-up, separated hysteresis/dwell, balanced-before-lean ambient ordering, LOW_END/reduced-motion authority, state continuity, and zero storage/network/telemetry. |
184187
| Change Twin Towns matching or two-person share links | `assets/twin-towns.js` + the Twin Towns block in `index.html` + `scripts/smoke.mjs`. |
185188
| Change Town Gazette / return-visit freshness | `/*FRESHNESS*/` + Passport render/start flow in `index.html`; keep snapshots local, bounded, per-town, and explicit-read only. |
186189
| Change resident homes, styles, gardens, routines, moods, friendships, haunts, or Shared Joy | The resident social layer + Starlight Row blocks in `index.html`; preserve the resident style map, 3 roof batches, 10/6 desktop/LOW_END detail-batch cap, 42-unit reserve, entrance gap, quarter colliders, home/work truth, owned porch seats, and social ownership guards. |

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ The format loosely follows [Keep a Changelog](https://keepachangelog.com/); date
66
This file keeps the current product era (`1.50.0` onward) easy to scan. Earlier releases are preserved in
77
[`docs/changelog-archive.md`](docs/changelog-archive.md).
88

9+
## [1.93.0] β€” 2026-08-26
10+
11+
### πŸŽ›οΈ Adaptive Visual Governor β€” preserve detail within the frame budget
12+
13+
- A three-tier `full` / `balanced` / `lean` governor now observes eligible active render intervals only after
14+
6,000 ms of warm-up. Full steps down after a 22.5 ms EMA holds for 3,000 ms; balanced steps down after
15+
28.5 ms holds for 5,000 ms. Recovery uses separate 18.5/17.5 ms thresholds, 18,000/14,000 ms evidence,
16+
and 14,000/10,000 ms tier dwell so quality returns one step at a time without flicker.
17+
- Balanced cuts distant building-shadow proxies, particle draw ranges, decorative update cadence, and World Tree
18+
bloom cadence first. Lean tightens those bounds and only then biases existing far-building LOD. Repository
19+
signs, silhouettes, colliders, functional roots, nearby full detail, and camera/control ownership remain intact.
20+
- Hidden, idle-capped, intro, modal, Atelier, and Growth Replay frames do not enter evidence. Existing LOW_END
21+
clamps the quality ceiling to balanced, and reduced motion keeps decorative cadence at zero through debug force
22+
and recovery. Residents, social routines, tours, taxi rides, Atelier, Growth Replay, and Chronicle state are
23+
observed but never reset.
24+
- `?dbg` exposes `window.__visualGovernor()` with force/auto, deterministic low/recover/hidden/transient fixtures,
25+
replay, work counts, and continuity state. The helper is in-memory only: no telemetry, persistence, request,
26+
backend, model call, dependency, build step, or asset was added.
27+
- Controlled owner-night diagnostics measured full/balanced/lean shadow proxies at 69/46/23, particles at
28+
3,473/2,363/1,459, bloom ceilings at 30/20/12 Hz, and draw calls at 2,481.67/2,465.83/2,417.33. Cold-load requests
29+
remain owner 31β†’31 and foreign 27β†’27 (the existing foreign GitHub read stays one); decoded same-origin bytes
30+
rise by 13,825 (owner 1,726,282β†’1,740,107; foreign 1,629,433β†’1,643,258).
31+
932
## [1.92.0] β€” 2026-08-26
1033

1134
### 🌳 Portable Living Towns β€” public records grow their own local life

β€Ždocs/known-limitations.mdβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ change around a constraint that can't move. Pair this with [`AGENTS.md`](../AGEN
101101
- **No full browser automation suite.** `scripts/smoke.mjs` guards many static and extracted behavioral
102102
contracts, but visual and interaction changes still require serving locally and driving the page in
103103
Chrome DevTools with 0 console errors on mobile + desktop.
104+
- **Adaptive quality is an in-memory safety rail, not a benchmark or device profile.** The governor observes
105+
visible, active exterior render intervals only after 6 seconds of eligible warm-up, uses three coarse reversible
106+
tiers, and forgets everything on reload. Hidden tabs, the intentional idle cap, intro/modals, Atelier, and Growth
107+
Replay do not influence it. LOW_END remains the maximum quality bound and reduced motion keeps decorative
108+
updates stopped; there is no user dashboard, telemetry, persistence, fingerprint, backend report, or attempt to
109+
predict hardware. `?dbg` fixtures are local deterministic replays rather than real-device speed claims.
104110
- **Owner-town size is a snapshot, not a contract.** Its repository count changes whenever the daily
105111
public data refresh adds, removes, or filters a repository.
106112
- **Town Gazette is browser-local.** It compares public repo fields against the last snapshot marked read

0 commit comments

Comments
Β (0)