diff --git a/AGENTS.md b/AGENTS.md index ae14c92..35ac656 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,9 +20,10 @@ sursa de adevăr tehnică pentru agenți. python3 -m http.server 8000 # Teste (Playwright; fără package.json commitat — vezi tests/AGENTS.md): -npx playwright test tests/smoke.mjs # suita completă: 35/35 +npx playwright test tests/smoke.mjs # suita completă: 41/41 npx playwright test tests/smoke.mjs --grep @regresie # regresie: 16 npx playwright test tests/smoke.mjs --grep @campanie # campanie E2E: 21 +npx playwright test tests/smoke.mjs --grep @share # Iterația 3: 6 ``` ## Durable Rules (repo-wide) @@ -30,11 +31,12 @@ npx playwright test tests/smoke.mjs --grep @campanie # campanie E2E: 21 - **Zero dependențe.** Produsul (fișierele `*.html`) e vanilla HTML/CSS/JS, merge offline de pe `file://`. `node_modules/`, `package.json`, `playwright.config.mjs`, `scratch/`, `test-results/` sunt **gitignored** — doar dev tooling, nu fac parte din produs. -- **Un singur fișier.** Toată aplicația trăiește în `escape-builder.html` (~1960 linii), pe secțiuni +- **Un singur fișier.** Toată aplicația trăiește în `escape-builder.html` (~3200 linii), pe secțiuni comentate: `stare` · `editor` · `preview` · `template-urile jocului exportat`. - **Dispatch.** `gameHTML(cfg)` rutează pe `cfg.style` către 6 motoare: `gameClassic · gameTerminal · gameArcade · gameChat · gamePoint · gameCampaign`. Fiecare returnează - un string HTML complet, standalone. + un string HTML complet, standalone. `playerHTML()` generează player universal (hash-mode, toate 5 + motoare inline, MASTER din `location.hash` comprimat deflate-raw+base64url). - **Cod partajat = blast radius global.** `libJS(cfg)` (`CFG`, `norm`, `checkAnswer`, `starsFor`, `finalWord`, `beep`, `confetti`) și `SNIP.*` (`baseCss`, modal, ecran final) sunt injectate în TOATE motoarele. O schimbare aici → verifică fiecare stil în preview înainte de commit. diff --git a/TODOS.md b/TODOS.md index 85fb82e..5309110 100644 --- a/TODOS.md +++ b/TODOS.md @@ -243,13 +243,28 @@ choice=1/opțiune); `data-fb`/`data-bkey` handler în input listener; `adventure Verificat: smoke 35/35 (4 teste noi: branch-jump, resume non-contiguu, regression non-adventure, tf branch). -## Iterația 3 — Joc-în-URL + QR -*(depinde de măsurarea dimensiunii JSON comprimate)* +## Iterația 3 — Joc-în-URL + QR ✅ LIVRAT (2026-06-14) -- `gameHTML(cfg)` → URL data: sau LZW/gzip → QR code printabil. -- Open Question 2 din design doc: câte puzzle-uri încap în 2KB (URL QR L)? -- Alternative: GitHub Pages export automat; sau link scurt cu backend minimal. -- Referință: design doc §NOT in scope "Joc-în-URL + QR". +**Scope livrat:** +- [x] **Stage 1 — Compresie URL**: `deflateToBase64url`/`inflateFromBase64url` (CompressionStream native, + offline, `file://`). `CS_OK` guard. `SNIP.compressJs` cu helpers inflate (doubled backslashes). +- [x] **Stage 2 — Refactor `campaignShell`**: parametrizat `bootMode='inline'|'hash'`. Zero schimbare + de comportament pentru inline (35/35 smoke). `chrome-title` + `document.title` setate din MASTER. +- [x] **Stage 3 — `playerHTML()` + boot din hash**: player universal (toate 5 motoare); async IIFE + (corect `(async function(){...})()`) decomprimă hash → setează MASTER → apendează orchestratorul + din `