diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 51b167e..7c3421f 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -89,6 +89,7 @@ {"id":"ge-hch.1.8.1","title":"Implement: Risk","description":"Implement: Risk - code, prefabs, editor scripts as required.\\n\\n## Acceptance Criteria\\n- Implementation produces the minimal functionality described in the feature acceptance criteria.\\n\\n## Minimal Implementation\\n- Deliver the smallest end-to-end code required.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-03T20:44:45.80003094-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:27.180099272-08:00","closed_at":"2026-01-07T02:14:27.180099272-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.1","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.801328409-08:00","created_by":"rgardler"}]} {"id":"ge-hch.1.8.2","title":"Tests: Risk","description":"Tests: Risk - create automated tests (browser unit / integration / E2E) required by feature.\\n\\n## Acceptance Criteria\\n- Tests exist and pass locally and in CI.\\n\\n## Minimal Implementation\\n- Add at least one browser E2E test covering feature behavior.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-03T20:44:45.853194129-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:27.390964391-08:00","closed_at":"2026-01-07T02:14:27.390964391-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.2","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.854214358-08:00","created_by":"rgardler"}]} {"id":"ge-hch.1.8.3","title":"Docs: Risk","description":"Docs: Risk - write short runbook/docs.\\n\\n## Acceptance Criteria\\n- Docs explain how to run, test, and validate the feature.\\n\\n## Minimal Implementation\\n- Add section to docs or feature README.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-03T20:44:45.904222604-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:28.008257195-08:00","closed_at":"2026-01-07T02:14:28.008257195-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.3","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.905057899-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.10","title":"Stabilize npm test demo server startup","description":"npm test intermittently fails when test:demo starts because port 4173 is already in use (EADDRINUSE). We should harden the test harness to avoid false failures when a previous demo server or Playwright run is still active.\\n\\n## Context\\n- npm test runs: npm run test:unit \u0026\u0026 npm run test:demo.\\n- test:demo uses start-server-and-test with http-server on port 4173.\\n- When 4173 is already occupied, http-server throws EADDRINUSE even though Playwright tests can still run.\\n\\n## Acceptance Criteria\\n- test:demo handles an existing server on port 4173 without failing (either reuse if it's the expected demo server, or terminate and restart).\\n- If a non-demo process is using 4173, the test reports a clear error and exits before Playwright runs.\\n- The harness stops any spawned server process after Playwright completes.\\n- npm test completes without EADDRINUSE failures when a prior demo server remains running.\\n- Tests updated or added to cover the new behavior (unit or integration).\\n\\n## Implementation Notes\\n- Investigate start-server-and-test options or wrap with a small script that checks port ownership.\\n- Consider using a random free port or server reuse when the existing process is the demo server.\\n- Ensure cleanup even on test failure.\\n\\n## Files/Paths to touch\\n- package.json (test:demo script)\\n- scripts/ (new helper to manage server lifecycle)\\n- tests/ (if new coverage needed)\\n","status":"open","priority":2,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-21T11:10:13.369009879-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T11:10:13.369009879-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.10","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-21T11:10:13.37433789-08:00","created_by":"Ross Gardler"},{"issue_id":"ge-hch.10","depends_on_id":"ge-okh","type":"discovered-from","created_at":"2026-01-21T11:10:13.378956899-08:00","created_by":"Ross Gardler"}]} {"id":"ge-hch.2","title":"M0 — Scaffold / Smoke Demo","description":"M0 — Scaffold / Smoke Demo\n\nMinimal browser-based scaffold proving VN-style text UI and a working InkJS dev path. Success criteria: demo loads and executes an Ink story end-to-end in desktop/mobile viewport; branching choices selectable; single-slot save/load; developer run instructions; telemetry hook points documented.","status":"tombstone","priority":1,"issue_type":"epic","created_at":"2026-01-07T17:23:57.819369354-08:00","created_by":"rgardler","updated_at":"2026-01-07T17:40:50.921496195-08:00","labels":["milestone"],"dependencies":[{"issue_id":"ge-hch.2","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-07T17:23:57.871837545-08:00","created_by":"rgardler"}],"deleted_at":"2026-01-07T17:40:50.921496195-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"} {"id":"ge-hch.3","title":"M1 — MVP: Ink runtime + UI + save/load + telemetry + demo story","description":"M1 — MVP: Ink runtime + UI + save/load + telemetry + 1 demo story\\n\\nDeliver a playable text-only interactive novel using InkJS at runtime with branching choices, single-slot save/load, runtime telemetry, and at least one AI-generated demo story.\\n\\nSuccess criteria: runtime story end-to-end with no fatal errors; player choice selection; save/load demonstrable; telemetry events emitted; AI demo story included.","status":"closed","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:00.942344426-08:00","created_by":"rgardler","updated_at":"2026-01-13T20:33:07.546357913-08:00","closed_at":"2026-01-13T20:33:07.546357913-08:00","close_reason":"M1 delivered: AI demo story included (AI demo provided)","labels":["Status: Implementation Committed","Status: Plan Created","milestone"],"dependencies":[{"issue_id":"ge-hch.3","depends_on_id":"ge-hch.2","type":"blocks","created_at":"2026-01-07T17:24:30.264400437-08:00","created_by":"rgardler"}],"comments":[{"id":25,"issue_id":"ge-hch.3","author":"rgardler","text":"Plan: Agent story generation + Discord telemetry emitter\n\nCreated features/tasks:\n- ge-hch.5.1 Agent: Story Author (Ink)\n - ge-hch.5.1.1 Docs: Agent spec (Story Author)\n - ge-hch.5.1.2 Implement: Story Author harness\n - ge-hch.5.1.3 Tests: Generated story validation\n- ge-hch.3.1 Implement: Telemetry Discord emitter (webhook)\n- ge-hch.5.2 Secure: Telemetry webhook secret storage\n\nDecisions made:\n- Static demo will be deployed to GitHub Pages (no file:// runs).\n- LLM provider: OpenAI-compatible endpoint; agent must support configurable endpoint.\n- Telemetry will POST Discord rich embeds to provided webhook (initially unsecured). A follow-up bead (ge-hch.5.2) tracks securing it.\n\nFiles referenced/created by this plan:\n- history/plan_ge-hch.3_agent_story_gen.md (this file)\n- history/ai/agent-story-author.md (spec task will create)\n- web/stories/generated/ (target for generated stories)\n\nOpen Questions:\n- LLM credentials: will use online authentication (GitHub Copilot + OpenAI compatible endpoint). Confirm CI secret names: OPENAI_API_KEY, TELEMETRY_WEBHOOK.\n- Discord webhook message embeds: format designed by Build; confirm if additional fields required.\n","created_at":"2026-01-08T03:38:12Z"},{"id":28,"issue_id":"ge-hch.3","author":"rgardler","text":"Checked for an open PR for the ge-hch.3 work.\n\nFindings\n- PR exists: #102 — Plan: Agent Story Author + Discord telemetry (M1)\n - URL: https://github.com/TheWizardsCode/GEngine/pull/102\n- Current branch: ge-hch-ge-hch.3/agent-story-gen\n- Git status (uncommitted modifications present):\n - .beads/issues.jsonl\n - .opencode/agent/build.md\n - .opencode/command/design.md\n - .opencode/command/doc.md\n - .opencode/command/implement.md\n - .opencode/command/intake.md\n - .opencode/command/landThePlane.md\n - .opencode/command/milestones.md\n - .opencode/command/plan.md\n - .opencode/command/prd.md\n - .opencode/command/review.md\n - .opencode/command/testplan.md\n\nNotes / Recommendations\n- Because there are local uncommitted changes beyond .beads/issues.jsonl, I will not create or update any PR or make commits without your explicit instruction.\n- If you want me to create/update a PR that includes those edits, confirm I should commit \u0026 push the changes from this branch. I will follow Git Safety Protocol (no destructive commands, no force-push to main).\n- If the intent was only to update beads (issues.jsonl), commit that file only and we can push; otherwise, please confirm which files to include.\n\nNext steps I can take (pick one)\n- Commit and push the current working tree and create/update a PR for you (I will draft PR body referencing bd beads).\n- Stage and commit only .beads/issues.jsonl (carry bead state) and push.\n- Leave working tree unchanged and annotate the bd issue with this status (done).\n\nRecorded by: Build (pm agent)\n","created_at":"2026-01-08T03:57:52Z"},{"id":70,"issue_id":"ge-hch.3","author":"rgardler","text":"/delegate @patch\n\nRationale:\nBuild is delegating the implementation work to Patch to ensure the stable demo story is packaged, documented, and testable as the canonical fallback for M1.\n\nRelated issue: ge-hch.3.2 (Feature: Stable story integration)\nTimebox: 48 hours\nPriority: 2\n\nAcceptance criteria (definition of done):\n- web/stories/demo.ink exists in repository root at path `web/stories/demo.ink` and is the canonical fallback story.\n- docs/InkJS_README.md (or repository README/manifest used by runtime) is updated to reference `web/stories/demo.ink` and documents how to swap in generated stories.\n- package or build manifests (if any) reference the stable story so CI artifacts include it (e.g., ensure web/stories is included in build output).\n- Local validation: `node scripts/validate-story.js web/stories/demo.ink` exits 0 and logs a successful parse/runtime smoke.\n- Tests: Playwright or unit tests that depend on a stable story run against demo.ink (if tests exist, update fixtures to point to demo.ink) and pass locally.\n- A PR is opened with the changes, including a clear PR description and test results; link the PR in the bd comment.\n\nTasks for @patch (concrete steps):\n1. Check for existing file: `web/stories/demo.ink`. If missing, create/add a reasonable demo story (take from history/ or generated sample) and commit it.\n2. Update docs/InkJS_README.md to document the stable story location and how to swap stories.\n3. Ensure build/package includes web/stories (add packaging steps if required).\n4. Run `node scripts/validate-story.js web/stories/demo.ink` and run relevant tests; fix any issues required for the story to validate.\n5. Open a PR with these changes, include a bd comment linking the PR and listing files changed.\n\nConstraints/notes:\n- Avoid changing story content beyond making it valid Ink; prefer a small but complete demo showing branching and a story end.\n- If adding a new story file, keep it small (~100-400 lines) to make CI fast.\n\nExpected deliverable:\n- PR with committed changes: web/stories/demo.ink, docs/InkJS_README.md updates, and any packaging/script changes; tests passing or documented follow-ups if additional fixes are needed.\n\nFollow-up:\n- After PR merge, mark ge-hch.3.2 as closed and add a bd comment confirming validate-story and tests pass in CI.\n\nActor: Build\n","created_at":"2026-01-13T02:50:57Z"},{"id":71,"issue_id":"ge-hch.3","author":"rgardler","text":"/delegate @patch\n\nRationale:\nBuild is delegating the implementation work to Patch to ensure the stable demo story is packaged, documented, and testable as the canonical fallback for M1.\n\nRelated issue: ge-hch.3.2 (Feature: Stable story integration)\nTimebox: 48 hours\nPriority: 2\n\nAcceptance criteria (definition of done):\n- web/stories/demo.ink exists in repository root at path `web/stories/demo.ink` and is the canonical fallback story.\n- docs/InkJS_README.md (or repository README/manifest used by runtime) is updated to reference `web/stories/demo.ink` and documents how to swap in generated stories.\n- package or build manifests (if any) reference the stable story so CI artifacts include it (e.g., ensure web/stories is included in build output).\n- Local validation: `node scripts/validate-story.js web/stories/demo.ink` exits 0 and logs a successful parse/runtime smoke.\n- Tests: Playwright or unit tests that depend on a stable story run against demo.ink (if tests exist, update fixtures to point to demo.ink) and pass locally.\n- A PR is opened with the changes, including a clear PR description and test results; link the PR in the bd comment.\n\nTasks for @patch (concrete steps):\n1. Check for existing file: `web/stories/demo.ink`. If missing, create/add a reasonable demo story (take from history/ or generated sample) and commit it.\n2. Update docs/InkJS_README.md to document the stable story location and how to swap stories.\n3. Ensure build/package includes web/stories (add packaging steps if required).\n4. Run `node scripts/validate-story.js web/stories/demo.ink` and run relevant tests; fix any issues required for the story to validate.\n5. Open a PR with these changes, include a bd comment linking the PR and listing files changed.\n\nConstraints/notes:\n- Avoid changing story content beyond making it valid Ink; prefer a small but complete demo showing branching and a story end.\n- If adding a new story file, keep it small (~100-400 lines) to make CI fast.\n\nExpected deliverable:\n- PR with committed changes: web/stories/demo.ink, docs/InkJS_README.md updates, and any packaging/script changes; tests passing or documented follow-ups if additional fixes are needed.\n\nFollow-up:\n- After PR merge, mark ge-hch.3.2 as closed and add a bd comment confirming validate-story and tests pass in CI.\n\nActor: Build\n","created_at":"2026-01-13T03:05:12Z"},{"id":74,"issue_id":"ge-hch.3","author":"rgardler","text":"PR: https://github.com/TheWizardsCode/GEngine/pull/125\nFiles changed:\n- .beads/issues.jsonl\n- web/stories/demo.ink\n- docs/InkJS_README.md\n- tests/demo.smoke.spec.ts\n- tests/demo.telemetry.spec.ts\n\nValidation output:\n[\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/demo.ink\",\n \"pass\": true,\n \"steps\": 21,\n \"path\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n },\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/test.ink\",\n \"pass\": true,\n \"steps\": 4,\n \"path\": [\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n }\n]\n\nTest output (summary):\n\n\u003e gengine-demo@0.1.0 test\n\u003e npm run test:unit \u0026\u0026 npm run test:demo --runInBand\n\n\n\u003e gengine-demo@0.1.0 test:unit\n\u003e jest\n\n\n\u003e gengine-demo@0.1.0 test:demo\n\u003e start-server-and-test \"npm run serve-demo -- --port 4173\" http://127.0.0.1:4173/demo \"playwright test --config=playwright.config.ts\"\n\n1: starting server using command \"npm run serve-demo -- --port 4173\"\nand when url \"[ 'http://127.0.0.1:4173/demo' ]\" is responding with HTTP status code 200\nrunning tests using command \"playwright test --config=playwright.config.ts\"\n\n\n\u003e gengine-demo@0.1.0 serve-demo\n\u003e http-server web --port 4173\n\nStarting up http-server, serving web\n\nhttp-server version: 14.1.1\n\nhttp-server settings: \nCORS: disabled\nCache: 3600 seconds\nConnection Timeout: 120 seconds\nDirectory Listings: visible\nAutoIndex: visible\nServe GZIP Files: false\nServe Brotli Files: false\nDefault File Extension: none\n\nAvailable on:\n http://127.0.0.1:4173\n http://10.255.255.254:4173\n http://192.168.188.207:4173\nHit CTRL-C to stop the server\n\n[2026-01-13T04:14:08.868Z] \"HEAD /demo\" \"axios/1.13.2\"\n[2026-01-13T04:14:08.890Z] \"HEAD /demo/\" \"axios/1.13.2\"\n\nRunning 10 tests using 4 workers\n\n[2026-01-13T04:14:10.184Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.190Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.202Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.202Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.207Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.212Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.213Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.214Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.214Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.215Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.215Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.225Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.236Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.236Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.240Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.240Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.269Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.276Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.422Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.462Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 2 [chromium-desktop] › tests/demo.smoke.spec.ts:24:5 › demo loads and presents initial UI (click) (701ms)\n[2026-01-13T04:14:10.917Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.933Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.934Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.934Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.935Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.013Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n ✓ 5 [chromium-desktop] › tests/demo.smoke.spec.ts:35:5 › choice can be selected via keyboard (641ms)\n ✓ 3 [chromium-desktop] › tests/demo.telemetry.spec.ts:80:5 › emits telemetry events and triggers smoke (1.4s)\n - 6 [chromium-desktop] › tests/demo.smoke.spec.ts:47:5 › choice can be selected via tap (touch)\n[2026-01-13T04:14:11.712Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.731Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.777Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n ✓ 7 [chromium-desktop] › tests/demo.smoke.spec.ts:59:5 › choice can be selected via controller (Space key surrogate) (468ms)\n ✓ 4 [chromium-touch] › tests/demo.smoke.spec.ts:24:5 › demo loads and presents initial UI (click) (2.1s)\n[2026-01-13T04:14:12.249Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.269Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.274Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.275Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.275Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.380Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 8 [chromium-touch] › tests/demo.smoke.spec.ts:35:5 › choice can be selected via keyboard (1.3s)\n[2026-01-13T04:14:13.522Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.533Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.534Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.537Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.537Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.650Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 1 [chromium-touch] › tests/demo.telemetry.spec.ts:80:5 › emits telemetry events and triggers smoke (3.6s)\n ✓ 9 [chromium-touch] › tests/demo.smoke.spec.ts:47:5 › choice can be selected via tap (touch) (1.3s)\n[2026-01-13T04:14:14.818Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.831Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.950Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 10 [chromium-touch] › tests/demo.smoke.spec.ts:59:5 › choice can be selected via controller (Space key surrogate) (1.1s)\n\n 1 skipped\n 9 passed (6.4s)\nhttp-server stopped.\n","created_at":"2026-01-13T06:21:08Z"},{"id":75,"issue_id":"ge-hch.3","author":"rgardler","text":"Cleanup after PR #125 (ge-hch.3.2) merged\n\nWhat I did (Build):\n- Committed the updated .beads/issues.jsonl to carry beads state post-merge.\n- Rebased local branch ge-hch.3.2/stable-story onto origin/main to pick up the merge commit.\n- Closed bd issue ge-hch.3.2 with reason: \"Merged PR #125 (stable demo story + docs)\".\n- Added bd comments on ge-hch.3 and ge-hch.3.2 during prior sessions linking PR #125 and listing files changed (ids: 73, 74).\n\nCommands executed (accurate list):\n- git status --porcelain\n- git add .beads/issues.jsonl\n- git commit -m \"chore: update .beads after ge-hch.3.2 merge\"\n- git fetch origin\n- git checkout main\n- git pull --rebase origin main\n- git checkout ge-hch.3.2/stable-story\n- git rebase origin/main\n- bd close ge-hch.3.2 --reason \"Merged PR #125 (stable demo story + docs)\"\n- bd comments add ge-hch.3 --file /tmp/cleanup-ge-hch.3.2.md --actor Build\n\nFiles touched / referenced:\n- .beads/issues.jsonl (committed)\n- web/stories/demo.ink (merged in PR #125)\n- docs/InkJS_README.md (merged in PR #125)\n- tests/demo.smoke.spec.ts (merged in PR #125)\n- tests/demo.telemetry.spec.ts (merged in PR #125)\n\nFollow-ups / risks:\n- CI run on main should be validated to ensure validate-story and Playwright tests succeeded in CI. If CI fails, create a follow-up bd issue to investigate.\n- Consider deleting the remote branch ge-hch.3.2/stable-story after confirming PR merge and cleanliness; Build will not delete branches but can create a follow-up chore to request deletion if desired.\n\nActor: Build\n","created_at":"2026-01-13T09:14:04Z"},{"id":78,"issue_id":"ge-hch.3","author":"rgardler","text":"Cleanup after PR #126 (ge-hch.3.6) merged\n\nActions performed (Build):\n- Pulled latest origin/main and rebased local work onto it.\n- Committed pending .beads/issues.jsonl updates capturing bd state.\n- Resolved merge conflicts in .github/workflows/pr-ci.yml (chose main's baseline and preserved Playwright reporter/upload steps).\n- Rebased feature branch ge-hch.3.6/ci-pr-pipeline onto origin/main, completed rebase, and fast-forwarded main to include CI changes.\n- Pushed updated main to origin.\n- Deleted local feature branch ge-hch.3.6/ci-pr-pipeline.\n- Verified GitHub Actions runs for PR #126 and main: validate-story + Playwright runs completed successfully (multiple run entries observed).\n- Created bd comment(s) and updated bd state where appropriate during the flow.\n\nCommands executed (ordered):\n- git add .beads/issues.jsonl\n- git commit -m \"chore: update .beads after CI changes\"\n- git checkout main\n- git pull --rebase origin main\n- git checkout ge-hch.3.6/ci-pr-pipeline\n- git rebase origin/main (resolved conflicts, committed merge resolution)\n- git checkout main\n- git merge --ff-only ge-hch.3.6/ci-pr-pipeline\n- bd sync\n- git push origin main\n- git branch -d ge-hch.3.6/ci-pr-pipeline (deleted local branch)\n- gh run list --repo TheWizardsCode/GEngine (verified CI run statuses)\n\nFiles changed / referenced:\n- .github/workflows/pr-ci.yml (merged/updated)\n- playwright.config.ts (updated: reporters junit/html/list)\n- package.json (small script helpers for Playwright reporters)\n- .beads/issues.jsonl (committed bd state)\n\nCI status observed:\n- PR #126 runs completed successfully (validate-story + Playwright E2E).\n- Main branch pipeline runs in progress/completed; recent runs showed success for validation and Playwright for merged changes.\n\nFollow-ups / recommendations:\n- Delete remote branch origin/ge-hch.3.6/ci-pr-pipeline if no longer needed (Build did not delete remote branches). Consider creating a small chore to request branch cleanup if desired.\n- Monitor main CI run once more to ensure artifacts (playwright-report, junit-report.xml, demo-web) are available in the workflow run for auditability.\n- If you want, I can close bd issue ge-hch.3.6 now (or I will do it as the next step). I will close it unless you instruct otherwise.\n\nActor: Build\n","created_at":"2026-01-14T03:59:34Z"}]} {"id":"ge-hch.3.1","title":"Implement: Telemetry Discord emitter (webhook)","description":"Implement a Telemetry emitter that posts runtime telemetry events to a Discord webhook with rich embeds. Telemetry should default to console but support Telemetry.backendUrl = \u003cwebhook\u003e and window.Telemetry.enabled toggle.\\n\\n## Acceptance Criteria\\n- Implementation in web/demo/js/telemetry.discord.js or extension to telemetry.js.\\n- Posts story_start, choice_selected, smoke_triggered, story_complete as Discord embeds.\\n- Tests stub network and assert POST payload shape.\\n- Create follow-up bead under ge-hch.5 to secure webhook (store in CI secrets).\\n","notes":"Merged PR https://github.com/TheWizardsCode/GEngine/pull/103","status":"closed","priority":2,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-07T19:38:03.67876324-08:00","created_by":"rgardler","updated_at":"2026-01-07T22:54:31.876921387-08:00","closed_at":"2026-01-07T22:54:31.876935362-08:00","labels":["Status: PR Created"],"dependencies":[{"issue_id":"ge-hch.3.1","depends_on_id":"ge-hch.3","type":"parent-child","created_at":"2026-01-07T19:38:03.679644099-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.3.1","depends_on_id":"ge-hch.5.3","type":"blocks","created_at":"2026-01-07T19:46:10.363993725-08:00","created_by":"rgardler"}],"comments":[{"id":29,"issue_id":"ge-hch.3.1","author":"rgardler","text":"Note: ge-hch.5.2 (secure telemetry webhook secret storage) should depend on this implementation rather than block it. Proceeding with emitter; follow-up security work remains.","created_at":"2026-01-08T06:28:35Z"}]} @@ -194,6 +195,7 @@ {"id":"ge-hch.5.20","title":"Feature-Flagged Release","description":"Release M2 to players behind feature flags with kill-switches.\n\n## Scope\n- Feature flag implementation for AI branching\n- Kill-switch for emergency disable\n- Internal playtester rollout\n- Initial player coherence validation\n- **Player experience change**: AI branching available to wider audience (not just internal testing). Players can opt-in/out via settings. If issues arise, feature can be disabled globally without deployment.\n\n## Success Criteria\n- Feature flag controls AI branch availability\n- Kill-switch disables AI branches within 1 minute\n- Internal playtesters rate coherence ≥4/5\n- No critical bugs in first playtester cohort\n- Players can enable/disable AI branching in settings\n- Players with feature disabled experience unchanged authored story\n- Players with feature enabled experience full AI branching capability\n\n## Dependencies\n- Milestone 7: Validation Test Corpus \u0026 Tuning (ge-hch.5.19)\n\n## Deliverables\n- Feature flag configuration\n- Kill-switch mechanism\n- Playtester feedback collection\n- Initial coherence report","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:23:52.637358271-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:23:52.637358271-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.20","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:52.638556813-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.20","depends_on_id":"ge-hch.5.19","type":"blocks","created_at":"2026-01-16T13:24:21.793163865-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.20.1","title":"Backend API Relay for LLM Requests","description":"Implement a backend relay service to proxy LLM API requests, solving CORS limitations and enabling usage telemetry.\n\n## Problem\n\nBrowser-side requests to enterprise AI APIs (Azure OpenAI, Anthropic, etc.) are blocked by CORS policies. Currently, only OpenAI's API supports browser CORS. This limits the AI Writer to OpenAI or requires users to run local CORS proxies for development.\n\n## Solution\n\nImplement a lightweight backend relay that:\n1. Receives requests from the browser frontend\n2. Forwards them to the configured LLM endpoint (Azure OpenAI, OpenAI, etc.)\n3. Returns responses with proper CORS headers\n4. Collects anonymized usage telemetry\n\n## Benefits\n\n- **Universal API support**: Works with any LLM provider regardless of CORS policy\n- **Usage telemetry**: Enables collection of anonymized usage data for analysis\n- **API key security**: Keys can be stored server-side instead of in browser localStorage\n- **Rate limiting**: Can implement server-side rate limiting and quotas\n- **Cost tracking**: Can track API usage costs across users\n\n## Implementation Options\n\n1. **Azure Function** - Serverless, scales automatically, Azure-native\n2. **Cloudflare Worker** - Edge deployment, low latency, simple setup\n3. **Node.js server** - Full control, can be containerized\n\n## Acceptance Criteria\n\n- [ ] Relay accepts POST requests from frontend with LLM request payload\n- [ ] Relay forwards requests to configured LLM endpoint\n- [ ] Relay returns responses with CORS headers for allowed origins\n- [ ] Relay logs anonymized telemetry (request count, latency, model used, error rates)\n- [ ] Frontend can be configured to use relay URL instead of direct API\n- [ ] Documentation for deployment and configuration\n\n## Files/Paths\n\n- `server/` or `functions/` - Backend relay implementation\n- `web/demo/js/llm-adapter.js` - Update to support relay mode\n- `web/demo/js/api-key-manager.js` - Update settings UI for relay configuration\n- `docs/dev/backend-relay.md` - Deployment documentation\n\n## Discovered From\n\nge-hch.5.14 (AI Writer Implementation) - CORS limitation discovered during Azure OpenAI testing","status":"open","priority":2,"issue_type":"feature","created_at":"2026-01-16T15:37:15.759001241-08:00","created_by":"rgardler","updated_at":"2026-01-16T15:37:15.759001241-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.20.1","depends_on_id":"ge-hch.5.20","type":"parent-child","created_at":"2026-01-16T15:37:15.761739299-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.21","title":"Telemetry Analysis \u0026 Tuning","description":"Analyze production telemetry and tune Director/Writer based on player data.\n\n## Scope\n- Build observability dashboards (5 views per telemetry-schema.md)\n- Analyze acceptance rates, latency, policy violations\n- Tune Director risk thresholds and Writer prompts\n- Document tuning decisions for Phase 4 planning\n- **Player experience change**: Data-driven improvements to AI branching. Players experience better-timed branch offers, improved narrative coherence, and content better matched to their play style (based on player preference learning).\n\n## Success Criteria\n- All 5 dashboard views operational\n- Director decision latency P95 \u003c500ms in production\n- Policy violation rate \u003c2%\n- Tuning report with recommendations for Phase 4\n- Player acceptance rate of AI branches increases over tuning period\n- Player coherence ratings improve compared to M8 baseline\n\n## Dependencies\n- Milestone 8: Feature-Flagged Release (ge-hch.5.20)\n\n## Deliverables\n- Observability dashboards\n- Tuning report\n- Updated Director/Writer configuration\n- Phase 4 recommendations document","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:24:01.316180976-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:24:01.316180976-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.21","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:24:01.31712331-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.21","depends_on_id":"ge-hch.5.20","type":"blocks","created_at":"2026-01-16T13:24:21.834830044-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.5.22","title":"Runtime: integrate embeddings into engine","description":"Integrate embedding-based similarity into the runtime engine so risk scoring and validation can use local semantic embeddings during play.\\n\\n## Context\\nEmbedding service exists in web/demo/js/embedding-service.js and tests cover similarity thresholds. We need to connect it to runtime pipelines so embeddings can be used for scoring (theme, lore, voice) during live branching.\\n\\n## Acceptance Criteria\\n- Runtime code calls embedding service when scoring AI branches (thematic consistency, lore adherence, character voice) with caching to avoid repeated inference in a session.\\n- Clear configuration for enabling/disabling embeddings in runtime (env flag or settings).\\n- Telemetry event records embedding timing and fallback status.\\n- Update docs describing how to enable embeddings in runtime (include any env flags).\\n- Add or update tests for embedding-enabled runtime scoring (unit or integration).\\n\\n## Implementation Notes\\n- Likely touch: src/director/ or src/runtime/ scoring modules, config handling, and telemetry emitter.\\n- Ensure fallback behavior when embeddings unavailable (e.g., null -\u003e neutral score).\\n\\n## Files/Paths to touch\\n- src/director/** or src/runtime/**\\n- src/telemetry/**\\n- web/demo/js/embedding-service.js (if API adjustments needed)\\n- docs/dev/** or README\\n","status":"open","priority":1,"issue_type":"feature","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-21T11:06:00.862351668-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T11:06:00.862351668-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.22","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-21T11:06:00.866061912-08:00","created_by":"Ross Gardler"}]} {"id":"ge-hch.5.3","title":"Secure: LLM API key storage","description":"Track storing the OpenAI-compatible API key in CI secrets and local dev guidance.\\n\\n## Acceptance Criteria\\n- CI secret name documented (OPENAI_API_KEY).\\n- docs/security/llm_api_key.md created with guidance for local auth and GitHub Actions.\\n","status":"closed","priority":2,"issue_type":"task","assignee":"Build","created_at":"2026-01-07T19:44:15.042691181-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:46.342313309-08:00","closed_at":"2026-01-16T02:09:46.342313309-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.5.3","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-07T19:44:15.044559498-08:00","created_by":"rgardler"}],"comments":[{"id":164,"issue_id":"ge-hch.5.3","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:46Z"}]} {"id":"ge-hch.5.4","title":"Phase 0: Branch proposal schema definition","description":"Define and document the branch proposal JSON schema with complete examples.\n\n## Acceptance Criteria\n- JSON schema file created with full specification (metadata, story context, branch content, provenance).\n- At least 10 example proposal JSONs demonstrating different narrative contexts.\n- Schema includes field descriptions, type constraints, and validation rules.\n- Schema validated against example proposals using a JSON schema validator.\n\n## Files to create/modify\n- history/m2-schemas/branch-proposal.json (schema definition)\n- history/m2-schemas/examples/ (example proposals)\n- docs/m2-design/schema-docs.md (documentation)\n","status":"closed","priority":1,"issue_type":"task","assignee":"@rgardler","created_at":"2026-01-16T10:20:35.533556391-08:00","created_by":"rgardler","updated_at":"2026-01-16T10:29:01.376570289-08:00","closed_at":"2026-01-16T10:29:01.376570289-08:00","close_reason":"Completed: Branch proposal schema with 10 examples and comprehensive documentation","dependencies":[{"issue_id":"ge-hch.5.4","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T10:20:35.536650238-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.5","title":"Phase 0: Validation pipeline design","description":"Design and prototype the validation pipeline with policy checks and sanitization transforms.\n\n## Acceptance Criteria\n- Policy ruleset defined with clear categories (profanity, theme consistency, length limits, narrative red lines).\n- Sanitization transforms documented (HTML stripping, whitespace normalization, encoding validation).\n- Validation report schema defined with pass/fail status and rule-level diagnostics.\n- Test corpus created: ~20 example proposals covering happy paths and edge cases.\n- Pipeline validates deterministically: same input + ruleset → same result.\n\n## Files to create/modify\n- history/m2-design/policy-ruleset.md (policy rules with rationale)\n- history/m2-design/sanitization-transforms.md (sanitization logic)\n- history/m2-schemas/validation-report.json (schema)\n- history/m2-design/test-cases.md (test corpus)\n","status":"closed","priority":1,"issue_type":"task","assignee":"@rgardler","created_at":"2026-01-16T10:20:37.499166616-08:00","created_by":"rgardler","updated_at":"2026-01-16T10:29:01.419511433-08:00","closed_at":"2026-01-16T10:29:01.419511433-08:00","close_reason":"Completed: Validation pipeline design with policy ruleset and sanitization transforms","dependencies":[{"issue_id":"ge-hch.5.5","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T10:20:37.500083559-08:00","created_by":"rgardler"}]} @@ -201,13 +203,13 @@ {"id":"ge-hch.6","title":"M3 — Basic staging (backgrounds \u0026 posed characters)","description":"M3 — Basic staging (backgrounds \u0026 posed characters)\\n\\nSupport simple staging features: background swaps, character pose changes, and simple animation cues triggered by story beats.\\n\\n## Success Criteria\\n- Story runtime can trigger background and character pose updates without breaking playback.\\n- Example assets and a small scene are included demonstrating staging cues.\\n- Integration document showing how story annotations map to staging events.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:16.971490472-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:39.924543818-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.6","depends_on_id":"ge-hch.5","type":"blocks","created_at":"2026-01-07T17:24:30.462242575-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.6","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.735750291-08:00","created_by":"rgardler"}]} {"id":"ge-hch.7","title":"M4 — Reactive simulated world \u0026 state model","description":"M4 — Reactive simulated world \u0026 state model\\n\\nIntroduce a lightweight world state model and adaptivity so the runtime can react to player actions while following a scripted arc.\\n\\n## Success Criteria\\n- A minimal world state representation exists and persists across sessions.\\n- Runtime demonstrates adaptive responses to player actions in one example story while maintaining authorial constraints.\\n- Documentation on world-state model and how story components read/update it.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:20.158267009-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:39.983697949-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.7","depends_on_id":"ge-hch.6","type":"blocks","created_at":"2026-01-07T17:24:30.548572825-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.7","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.800085111-08:00","created_by":"rgardler"}]} {"id":"ge-hch.8","title":"M5 — Systemic NPCs and narrative director (optional)","description":"M5 — Systemic NPCs and narrative director (optional)\\n\\nImplement NPC goals/memory and a simple narrative director that steers scenes toward author-defined arcs while allowing NPC autonomy.\\n\\n## Success Criteria\\n- NPCs have simple goal/memory state and influence world state.\\n- A basic director system can prioritize story beats while allowing NPC-driven events.\\n- Example scenario demonstrating NPC behavior affecting available story branches.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:25.266277575-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:40.030304585-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.8","depends_on_id":"ge-hch.7","type":"blocks","created_at":"2026-01-07T17:24:30.619103533-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.8","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.860676631-08:00","created_by":"rgardler"}]} -{"id":"ge-hch.9","title":"fix director rish slider test","description":"## Steps to Reproduce\n1. Run the Playwright e2e test `Director threshold slider updates stored settings` (tests/e2e/director.spec.ts).\n2. Observe intermittent failures when the player has changed the Director threshold slider prior to the test—test expects stored settings to match the default but the player's altered value persists.\n\n## Acceptance Criteria\n- The failing Playwright test is updated to load a deterministic test configuration or fixture so the game state (including player settings) is known at test start.\n- The test reliably passes on CI and locally even if a player previously changed the slider.\n- Any new test fixtures or helpers are committed and documented in the issue.\n\n## Suggested Implementation\n- Add a test fixture (e.g. `tests/fixtures/director_slider_test.json`) that sets player settings to known values.\n- Update the Playwright test setup to load the fixture before running the test (use existing test helper or add a new fixture loader).\n- If necessary, add a small helper in the game test code to reset stored settings during test runs.\n\n## Files/Paths To Modify\n- tests/e2e/director.spec.ts\n- tests/fixtures/director_slider_test.json (new)\n- (optional) src/test-utils/settings-fixture.ts\n\nP0\n","status":"open","priority":0,"issue_type":"bug","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T22:58:36.244950797-08:00","created_by":"Ross Gardler","updated_at":"2026-01-20T22:58:36.244950797-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.9","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-20T22:58:36.248316778-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-hch.9","title":"Use custom setup for tests","description":"## Steps to Reproduce\n1. Run the Playwright e2e test `Director threshold slider updates stored settings` (tests/e2e/director.spec.ts).\n2. Observe intermittent failures when the player has changed the Director threshold slider prior to the test—test expects stored settings to match the default but the player's altered value persists.\n\n## Acceptance Criteria\n- The failing Playwright test is updated to load a deterministic test configuration or fixture so the game state (including player settings) is known at test start.\n- The test reliably passes on CI and locally even if a player previously changed the slider.\n- Any new test fixtures or helpers are committed and documented in the issue.\n\n## Suggested Implementation\n- Add a test fixture (e.g. `tests/fixtures/director_slider_test.json`) that sets player settings to known values.\n- Update the Playwright test setup to load the fixture before running the test (use existing test helper or add a new fixture loader).\n- If necessary, add a small helper in the game test code to reset stored settings during test runs.\n\n## Files/Paths To Modify\n- tests/e2e/director.spec.ts\n- tests/fixtures/director_slider_test.json (new)\n- (optional) src/test-utils/settings-fixture.ts\n\nP0\n","status":"open","priority":2,"issue_type":"bug","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T22:58:36.244950797-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T01:29:22.507525786-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.9","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-20T22:58:36.248316778-08:00","created_by":"Ross Gardler"}]} {"id":"ge-k3p","title":"CI: Playwright E2E workflow","description":"Add GitHub Actions workflow to run Playwright E2E (demo) on PRs and main.\\n\\n## Scope\\n- CI job to install dependencies (npm ci) and Playwright browsers (npx playwright install).\\n- Run npm run test:unit and npm run test:demo (start-server-and-test) on linux runner.\\n- Upload Playwright artifacts (videos, traces, screenshots) on failure.\\n- Trigger on pull_request to main and push to main; allow workflow_dispatch.\\n- Keep runtime reasonable (consider single-project run on PR, full matrix optional on main).\\n\\n## Acceptance Criteria\\n- Workflow file exists in .github/workflows and runs successfully in CI.\\n- Playwright browsers installed via npx playwright install (with deps).\\n- npm run test:unit and npm run test:demo succeed in CI or fail the build.\\n- Artifacts (test-results) uploaded on failure for debugging.\\n","status":"closed","priority":1,"issue_type":"chore","created_at":"2026-01-07T00:02:19.895681457-08:00","created_by":"rgardler","updated_at":"2026-01-07T00:44:21.9279524-08:00","closed_at":"2026-01-07T00:44:21.9279524-08:00","close_reason":"Closed","comments":[{"id":11,"issue_id":"ge-k3p","author":"rgardler","text":"Added GitHub Actions workflow .github/workflows/playwright.yml: checkout, setup-node 20 with npm cache, npm ci, npx playwright install --with-deps, npm run test:unit, npm run test:demo, upload artifacts on failure. Local run: npm test (unit + demo) passing.","created_at":"2026-01-07T08:18:39Z"},{"id":12,"issue_id":"ge-k3p","author":"rgardler","text":"Opened PR https://github.com/TheWizardsCode/GEngine/pull/97 for Playwright CI workflow. Summary: checkout, setup-node 20 with npm cache, npm ci, npx playwright install --with-deps, npm run test:unit, npm run test:demo, upload artifacts on failure. Local: npm test passed.","created_at":"2026-01-07T08:19:11Z"},{"id":13,"issue_id":"ge-k3p","author":"rgardler","text":"Wrap-up by Ship (DevOps AI):\\n- Verified branch: ge-k3p/playwright-ci (tracked to origin).\\n- Ran unit tests: npm run test:unit (jest) -\u003e PASS (7 tests).\\n- Did NOT run demo Playwright E2E locally (requires Playwright browsers / longer runtime); recommend running in CI (ge-ngf / ge-k3p acceptance criteria include npx playwright install).\\n- No files were modified in this session.\\n- No new beads created. Follow-ups: ensure GitHub Actions workflow (.github/workflows/playwright.yml) is added (see ge-ngf) and that CI runs 'npx playwright install' before tests.\\n- Commands run during wrap-up: git rev-parse --abbrev-ref HEAD; git status; npm run test:unit; bd ready; bd show (used earlier).\\nFiles touched: none.\\nNext steps for the next session: create or open PR for .github/workflows/playwright.yml (ge-k3p / ge-ngf), validate Playwright browsers install in CI, run demo E2E in CI and upload artifacts on failure.\\n","created_at":"2026-01-07T08:22:36Z"},{"id":15,"issue_id":"ge-k3p","author":"rgardler","text":"PR #97 merged; CI Playwright workflow landed. Cleaned git stashes (2 entries) after review to prevent stale beads DB. TODO resolved: follow-up ge-hbd remains open to monitor artifacts behavior.","created_at":"2026-01-07T08:33:33Z"}]} {"id":"ge-lwc","title":"fix(validate-story): ensure output directory exists before writing results","description":"Problem: CI validate-story job is failing because scripts/validate-story.js writes results to results/validate-story.json but does not ensure the parent directory exists. The workflow also assumes 'results' exists.\n\nGoal: Add a durable fix so the script ensures the output directory exists before writing, and add a defensive mkdir step in the validate-story workflow.\n\nAcceptance criteria (definition of done):\n- scripts/validate-story.js creates the parent directory of the output path before writing (using fs.mkdirSync(..., { recursive: true })).\n- .github/workflows/validate-story.yml contains an explicit step that runs before the script runs (belt-and-suspenders).\n- A branch is pushed (fix/validate-story-output) with the code+workflow changes and a PR opened (do NOT merge).\n- The PR includes a clear description and links back to this bead; CI runs and at least the validate-story step completes without ENOENT (we expect green or at least the ENOENT resolved).\n- A bd comment is added linking the created PR URL and any relevant CI run IDs.\n\nSuggested implementation notes:\n- In scripts/validate-story.js, before writeFileSync(outputPath, ...), compute .\n- In .github/workflows/validate-story.yml, add a step before running [\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/demo.ink\",\n \"pass\": true,\n \"steps\": 9,\n \"path\": [\n 1,\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n },\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/test.ink\",\n \"pass\": true,\n \"steps\": 4,\n \"path\": [\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n }\n]:\n - name: Prepare results dir\n run: mkdir -p results\n\nFiles to change:\n- scripts/validate-story.js\n- .github/workflows/validate-story.yml\n\nAssign to: @ship (Ship agent) — please implement the changes in a branch and open a PR; do not merge.\n,--json:true}","status":"closed","priority":1,"issue_type":"bug","assignee":"@ship","created_at":"2026-01-14T01:04:45.200206158-08:00","created_by":"rgardler","updated_at":"2026-01-14T01:14:00.277633008-08:00","closed_at":"2026-01-14T01:14:00.277633008-08:00","close_reason":"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/134)","dependencies":[{"issue_id":"ge-lwc","depends_on_id":"ge-hch.3.4.3","type":"discovered-from","created_at":"2026-01-14T01:04:45.210561869-08:00","created_by":"rgardler"}],"comments":[{"id":102,"issue_id":"ge-lwc","author":"rgardler","text":"Delegating implementation to @ship.\n\nTask: implement durable fix for validate-story output directory and add defensive mkdir step in workflow.\n\nBranch: fix/validate-story-output\nFiles to change:\n- scripts/validate-story.js (ensure parent directory of output file exists before write)\n- .github/workflows/validate-story.yml (add step: mkdir -p results before running script)\n\nAcceptance criteria (DO NOT MERGE PR):\n- scripts/validate-story.js calls fs.mkdirSync(path.dirname(outputPath), { recursive: true }) before writing output\n- The workflow includes a step that prepares results dir (mkdir -p results)\n- Branch pushed: fix/validate-story-output\n- PR opened with title: \"fix(validate-story): ensure output directory exists before writing results\" and body referencing this bead (ge-lwc)\n- bd comment on ge-lwc updated with PR URL and any failing/related CI run IDs\n\nShip: please run local validation (node scripts/validate-story.js --glob \"web/stories/**/*.ink\" --output results/validate-story.json --max-steps 500 --clear-state) to verify the script writes results/validate-story.json. Run CI checks and add the resulting run IDs in a follow-up bd comment.\n\nConstraints:\n- Do not merge the PR. Open for review only.\n- Follow Git Safety Protocols in AGENTS.md. Create commits on a new branch and push.\n\nIf you need the PR body text, use this:\n\nTitle: fix(validate-story): ensure output directory exists before writing results\n\nBody:\n- Problem: validate-story script crashes in CI with ENOENT because the results/ directory doesn't exist.\n- Solution: create parent directory before writing in scripts/validate-story.js and add a defensive mkdir in the workflow.\n- Linked bead: ge-lwc\n","created_at":"2026-01-14T09:05:02Z"},{"id":103,"issue_id":"ge-lwc","author":"rgardler","text":"Opened PR https://github.com/TheWizardsCode/GEngine/pull/134 for fix(validate-story): ensure output directory exists before writing results","created_at":"2026-01-14T09:07:47Z"},{"id":104,"issue_id":"ge-lwc","author":"rgardler","text":"PR opened: https://github.com/TheWizardsCode/GEngine/pull/134\n\nWaiting for CI. Will add Actions run IDs and conclusions after runs complete.\n","created_at":"2026-01-14T09:08:07Z"},{"id":105,"issue_id":"ge-lwc","author":"rgardler","text":"Completed PR merged: https://github.com/TheWizardsCode/GEngine/pull/134\n\nMerge commit: 0d6744372b3a58534b16555bc43efa5e88ed8eb1\n\nFiles changed: scripts/validate-story.js, .github/workflows/validate-story.yml\n\nLocal verification: ran node scripts/validate-story.js -\u003e results/validate-story.json created\n\nCI runs: validate-story Actions run (success) for merge commit 0d6744372b3a58534b16555bc43efa5e88ed8eb1: https://github.com/TheWizardsCode/GEngine/actions/runs/20988565602\n\nNotes: Close this bead as work completed by PR #134","created_at":"2026-01-14T09:12:08Z"},{"id":107,"issue_id":"ge-lwc","author":"rgardler","text":"Cleanup actions performed:\n- Verified PRs #133 and #134 merged and captured merge commit SHAs.\n- Added bd comments and closed beads: ge-lwc (closed), ge-2hh (closed).\n- Ran bd sync and exported .beads/issues.jsonl changes.\n- Committed .beads/issues.jsonl updates on branch fix/validate-story-output and pushed to origin.\n- Deleted local branch ge-2hh/commit-uncommitted; attempted to delete fix/validate-story-output but it is current worktree.\n\nCommands executed (in order):\n1) gh pr view 133 --json ...\n2) gh pr view 134 --json ...\n3) gh run list --repo TheWizardsCode/GEngine --json ...\n4) bd comments add ge-lwc -f /tmp/ge-lwc-comment.txt --actor @ship --json\n5) bd close ge-lwc --actor @ship --json --reason \"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/134)\"\n6) bd comments add ge-2hh -f /tmp/ge-2hh-comment.txt --actor @ship --json\n7) bd close ge-2hh --actor @ship --json --reason \"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/133)\"\n8) git fetch origin --prune\n9) git checkout main (blocked due to local .beads changes)\n10) git add .beads/issues.jsonl \u0026\u0026 git commit -m \"chore(bd): close beads for merged PRs #133,#134\"\n11) git push --set-upstream origin HEAD\n12) git branch -d ge-2hh/commit-uncommitted\n13) bd sync --json\n14) bd ready --json\n15) bd show ge-lwc --json\n16) bd show ge-2hh --json\n\nFiles changed:\n- .beads/issues.jsonl (exported comments and close reasons)\n\nPR URLs and merge SHAs:\n- PR 133: https://github.com/TheWizardsCode/GEngine/pull/133 (merged, sha: c81dd77059912a13c36020604ab1b95fa12c5616)\n- PR 134: https://github.com/TheWizardsCode/GEngine/pull/134 (merged, sha: 0d6744372b3a58534b16555bc43efa5e88ed8eb1)\n\nRemaining follow-ups:\n- Remove local results/ directory if it should not be kept (it is untracked).\n- If you want the local branch fix/validate-story-output removed, switch to another branch and delete it.\n- Confirm whether ge-hch.3.4.3 needs comment/closure (left open).\n","created_at":"2026-01-14T09:12:50Z"},{"id":109,"issue_id":"ge-lwc","author":"rgardler","text":"ge-lwc: Work completed — PR merged\n\nPR: https://github.com/TheWizardsCode/GEngine/pull/134\nMerge commit: 0d6744372b3a58534b16555bc43efa5e88ed8eb1\nFiles changed: scripts/validate-story.js, .github/workflows/validate-story.yml, .beads/issues.jsonl\nLocal verification: ran `node scripts/validate-story.js --glob \"web/stories/**/*.ink\" --output results/validate-story.json --max-steps 500 --clear-state` and confirmed results/validate-story.json created\nCI run: https://github.com/TheWizardsCode/GEngine/actions/runs/20988565602\nNotes: Added bd comment and closing this bead to reflect merged PR and CI verification.\n","created_at":"2026-01-14T09:13:58Z"}]} {"id":"ge-mud","title":"Make Ooda loop ouput fit the available screen width","status":"tombstone","priority":1,"issue_type":"task","assignee":"patch","created_at":"2026-01-16T22:21:19.755930775-08:00","created_by":"rgardler","updated_at":"2026-01-16T22:21:54.341660423-08:00","deleted_at":"2026-01-16T22:21:54.341660423-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"ge-ngf","title":"CI: Playwright E2E","description":"Add GitHub Actions workflow to run Playwright E2E tests.\\n\\nAcceptance criteria:\\n- Workflow file .github/workflows/playwright.yml runs on PRs and main.\\n- Workflow runs: npm ci, npx playwright install, npm test (demo e2e).\\n- On PR a job runs tests and reports status to PR.","status":"closed","priority":1,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-06T23:08:53.428619454-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:20:17.470750673-08:00","closed_at":"2026-01-07T02:20:17.470750673-08:00","close_reason":"Closed"} {"id":"ge-nzz","title":"Make root README InkJS-only","description":"Remove Unity references from the root README.md and focus it on InkJS/web demo usage and tests.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-06T15:12:16.621516991-08:00","created_by":"rgardler","updated_at":"2026-01-06T15:13:37.065401561-08:00","closed_at":"2026-01-06T15:13:37.065401561-08:00","close_reason":"Done"} -{"id":"ge-okh","title":"Add npm script + docs to run embedding integration test","description":"Add an npm script to run the real-model embedding integration test (EMBED_NODE=1). Include a short note in web/demo/README.md describing the script and how to run it locally.\\n\\nAcceptance criteria:\\n- package.json has script that runs: \\n- web/demo/README.md contains a 1-2 line note explaining the script and env flags\\n- Tests: running the script locally succeeds (developer responsibility)\\n\\nFiles to be changed: , ","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-17T20:47:17.395948499-08:00","created_by":"rgardler","updated_at":"2026-01-17T20:47:17.395948499-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-okh","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-19T23:01:36.648476327-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-okh","title":"Add npm script + docs to run embedding integration test","description":"Add an npm script to run the real-model embedding integration test (EMBED_NODE=1). Include a short note in web/demo/README.md describing the script and how to run it locally.\\n\\nAcceptance criteria:\\n- package.json has script that runs: \\n- web/demo/README.md contains a 1-2 line note explaining the script and env flags\\n- Tests: running the script locally succeeds (developer responsibility)\\n\\nFiles to be changed: , ","status":"in_progress","priority":2,"issue_type":"task","assignee":"@patch","created_at":"2026-01-17T20:47:17.395948499-08:00","created_by":"rgardler","updated_at":"2026-01-21T11:12:56.995431287-08:00","external_ref":"gh-185","labels":["stage:idea","stage:in_review"],"dependencies":[{"issue_id":"ge-okh","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-19T23:01:36.648476327-08:00","created_by":"Ross Gardler"}],"comments":[{"id":262,"issue_id":"ge-okh","author":"@patch","text":"Updated web/demo/README.md to document npm run test:integration:embedding and EMBED_NODE=1. Added a Node-only sharp stub in web/demo/js/embedding-service.js so embedding integration tests can run on linux/arm64 where sharp native binaries are missing. Local test: npm run test:integration:embedding (pass).","created_at":"2026-01-21T18:52:33Z"},{"id":263,"issue_id":"ge-okh","author":"@patch","text":"Created follow-up bead for runtime embedding integration: ge-hch.5.22 (Runtime: integrate embeddings into engine).","created_at":"2026-01-21T19:06:04Z"}]} {"id":"ge-oow","title":"Refactor: remove jq fallback for replay failure JSON","description":"### Goal\\nRemove the -based fallback in that synthesizes failure JSON from logs. The replay runner now writes structured JSON via ; the workflow should rely on that structured output instead of reconstructing it from logs.\\n\\n### Acceptance Criteria\\n- The workflow no longer runs to synthesize .\\n- The workflow copies or uploads the runner-produced (or a runner-produced failure file) into artifacts/results and archives it for failing runs.\\n- A CI run for the PR demonstrates a failing replay produces an uploaded visible in the job artifacts.\\n- Files touched are limited to (and any small adjustments to only if strictly necessary).\\n\\n### Suggested Implementation\\n1. Edit to remove the fallback block and instead rely on produced by the runner.\\n2. Ensure the workflow still copies raw logs and uploads \u0026 .\\n3. Run CI on a PR that intentionally fails a replay to confirm artifact presence.\\n\\n### Timebox\\nEstimate: 1-2 hours.\\n\\n### Notes\\n- Keep an eye on edge cases where runner result is missing; if this proves to happen, we may want a minimal guard that reports a clear error but does not attempt to reconstruct the JSON.\\n\\n### Related\\ndiscovered-from:ge-hch.4.3\\n","status":"closed","priority":3,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-16T00:32:00.440882328-08:00","created_by":"rgardler","updated_at":"2026-01-16T01:38:44.850810587-08:00","closed_at":"2026-01-16T01:38:44.850810587-08:00","close_reason":"Completed: removed jq fallback; PR #151 merged","dependencies":[{"issue_id":"ge-oow","depends_on_id":"ge-hch.4.3","type":"discovered-from","created_at":"2026-01-16T00:32:00.453040701-08:00","created_by":"rgardler"}],"comments":[{"id":156,"issue_id":"ge-oow","author":"rgardler","text":"Created branch ge-oow/remove-jq-fallback and opened PR #151 to remove jq fallback; change uses printf to emit minimal failure JSON if runner result is missing. Marking as in_progress and assigned to rgardler.","created_at":"2026-01-16T09:34:53Z"},{"id":157,"issue_id":"ge-oow","author":"rgardler","text":"Merged PR #151: removed jq fallback and emit minimal failure JSON using printf. Verified replay artifacts show no failures for this change. Closing bead.","created_at":"2026-01-16T09:38:43Z"}]} {"id":"ge-osd","title":"Restore original demo story for smoke tests","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-01-06T22:09:37.056596959-08:00","created_by":"rgardler","updated_at":"2026-01-06T22:10:00.371743266-08:00","closed_at":"2026-01-06T22:10:00.371743266-08:00","close_reason":"Done","comments":[{"id":1,"issue_id":"ge-osd","author":"rgardler","text":"Fixed smoke tests broken by demo story changes by adding web/stories/test.ink (pre-903f044 demo story) and routing /stories/demo.ink to that file in Playwright.\n\nChanges:\n- web/stories/test.ink\n- tests/demo.smoke.spec.ts\n\nCommands:\n- npm test","created_at":"2026-01-07T06:09:54Z"}]} {"id":"ge-qip","title":"Parent: Test parent/child relationship","description":"escription","status":"tombstone","priority":2,"issue_type":"epic","owner":"ross@gardler.org","created_at":"2026-01-19T18:38:38.077369615-08:00","created_by":"Ross Gardler","updated_at":"2026-01-19T18:41:54.055362933-08:00","deleted_at":"2026-01-19T18:41:54.055362933-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"} diff --git a/.beads/sync_base.jsonl b/.beads/sync_base.jsonl index ce48939..ac726b6 100644 --- a/.beads/sync_base.jsonl +++ b/.beads/sync_base.jsonl @@ -89,6 +89,7 @@ {"id":"ge-hch.1.8.1","title":"Implement: Risk","description":"Implement: Risk - code, prefabs, editor scripts as required.\\n\\n## Acceptance Criteria\\n- Implementation produces the minimal functionality described in the feature acceptance criteria.\\n\\n## Minimal Implementation\\n- Deliver the smallest end-to-end code required.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-03T20:44:45.80003094-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:27.180099272-08:00","closed_at":"2026-01-07T02:14:27.180099272-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.1","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.801328409-08:00","created_by":"rgardler"}]} {"id":"ge-hch.1.8.2","title":"Tests: Risk","description":"Tests: Risk - create automated tests (browser unit / integration / E2E) required by feature.\\n\\n## Acceptance Criteria\\n- Tests exist and pass locally and in CI.\\n\\n## Minimal Implementation\\n- Add at least one browser E2E test covering feature behavior.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-03T20:44:45.853194129-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:27.390964391-08:00","closed_at":"2026-01-07T02:14:27.390964391-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.2","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.854214358-08:00","created_by":"rgardler"}]} {"id":"ge-hch.1.8.3","title":"Docs: Risk","description":"Docs: Risk - write short runbook/docs.\\n\\n## Acceptance Criteria\\n- Docs explain how to run, test, and validate the feature.\\n\\n## Minimal Implementation\\n- Add section to docs or feature README.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-03T20:44:45.904222604-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:14:28.008257195-08:00","closed_at":"2026-01-07T02:14:28.008257195-08:00","close_reason":"Completed","dependencies":[{"issue_id":"ge-hch.1.8.3","depends_on_id":"ge-hch.1.8","type":"parent-child","created_at":"2026-01-03T20:44:45.905057899-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.10","title":"Stabilize npm test demo server startup","description":"npm test intermittently fails when test:demo starts because port 4173 is already in use (EADDRINUSE). We should harden the test harness to avoid false failures when a previous demo server or Playwright run is still active.\\n\\n## Context\\n- npm test runs: npm run test:unit && npm run test:demo.\\n- test:demo uses start-server-and-test with http-server on port 4173.\\n- When 4173 is already occupied, http-server throws EADDRINUSE even though Playwright tests can still run.\\n\\n## Acceptance Criteria\\n- test:demo handles an existing server on port 4173 without failing (either reuse if it's the expected demo server, or terminate and restart).\\n- If a non-demo process is using 4173, the test reports a clear error and exits before Playwright runs.\\n- The harness stops any spawned server process after Playwright completes.\\n- npm test completes without EADDRINUSE failures when a prior demo server remains running.\\n- Tests updated or added to cover the new behavior (unit or integration).\\n\\n## Implementation Notes\\n- Investigate start-server-and-test options or wrap with a small script that checks port ownership.\\n- Consider using a random free port or server reuse when the existing process is the demo server.\\n- Ensure cleanup even on test failure.\\n\\n## Files/Paths to touch\\n- package.json (test:demo script)\\n- scripts/ (new helper to manage server lifecycle)\\n- tests/ (if new coverage needed)\\n","status":"open","priority":2,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-21T11:10:13.369009879-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T11:10:13.369009879-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.10","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-21T11:10:13.37433789-08:00","created_by":"Ross Gardler"},{"issue_id":"ge-hch.10","depends_on_id":"ge-okh","type":"discovered-from","created_at":"2026-01-21T11:10:13.378956899-08:00","created_by":"Ross Gardler"}]} {"id":"ge-hch.2","title":"M0 — Scaffold / Smoke Demo","description":"M0 — Scaffold / Smoke Demo\n\nMinimal browser-based scaffold proving VN-style text UI and a working InkJS dev path. Success criteria: demo loads and executes an Ink story end-to-end in desktop/mobile viewport; branching choices selectable; single-slot save/load; developer run instructions; telemetry hook points documented.","status":"tombstone","priority":1,"issue_type":"epic","created_at":"2026-01-07T17:23:57.819369354-08:00","created_by":"rgardler","updated_at":"2026-01-07T17:40:50.921496195-08:00","labels":["milestone"],"dependencies":[{"issue_id":"ge-hch.2","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-07T17:23:57.871837545-08:00","created_by":"rgardler"}],"deleted_at":"2026-01-07T17:40:50.921496195-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"} {"id":"ge-hch.3","title":"M1 — MVP: Ink runtime + UI + save/load + telemetry + demo story","description":"M1 — MVP: Ink runtime + UI + save/load + telemetry + 1 demo story\\n\\nDeliver a playable text-only interactive novel using InkJS at runtime with branching choices, single-slot save/load, runtime telemetry, and at least one AI-generated demo story.\\n\\nSuccess criteria: runtime story end-to-end with no fatal errors; player choice selection; save/load demonstrable; telemetry events emitted; AI demo story included.","status":"closed","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:00.942344426-08:00","created_by":"rgardler","updated_at":"2026-01-13T20:33:07.546357913-08:00","closed_at":"2026-01-13T20:33:07.546357913-08:00","close_reason":"M1 delivered: AI demo story included (AI demo provided)","labels":["Status: Implementation Committed","Status: Plan Created","milestone"],"dependencies":[{"issue_id":"ge-hch.3","depends_on_id":"ge-hch.2","type":"blocks","created_at":"2026-01-07T17:24:30.264400437-08:00","created_by":"rgardler"}],"comments":[{"id":25,"issue_id":"ge-hch.3","author":"rgardler","text":"Plan: Agent story generation + Discord telemetry emitter\n\nCreated features/tasks:\n- ge-hch.5.1 Agent: Story Author (Ink)\n - ge-hch.5.1.1 Docs: Agent spec (Story Author)\n - ge-hch.5.1.2 Implement: Story Author harness\n - ge-hch.5.1.3 Tests: Generated story validation\n- ge-hch.3.1 Implement: Telemetry Discord emitter (webhook)\n- ge-hch.5.2 Secure: Telemetry webhook secret storage\n\nDecisions made:\n- Static demo will be deployed to GitHub Pages (no file:// runs).\n- LLM provider: OpenAI-compatible endpoint; agent must support configurable endpoint.\n- Telemetry will POST Discord rich embeds to provided webhook (initially unsecured). A follow-up bead (ge-hch.5.2) tracks securing it.\n\nFiles referenced/created by this plan:\n- history/plan_ge-hch.3_agent_story_gen.md (this file)\n- history/ai/agent-story-author.md (spec task will create)\n- web/stories/generated/ (target for generated stories)\n\nOpen Questions:\n- LLM credentials: will use online authentication (GitHub Copilot + OpenAI compatible endpoint). Confirm CI secret names: OPENAI_API_KEY, TELEMETRY_WEBHOOK.\n- Discord webhook message embeds: format designed by Build; confirm if additional fields required.\n","created_at":"2026-01-08T03:38:12Z"},{"id":28,"issue_id":"ge-hch.3","author":"rgardler","text":"Checked for an open PR for the ge-hch.3 work.\n\nFindings\n- PR exists: #102 — Plan: Agent Story Author + Discord telemetry (M1)\n - URL: https://github.com/TheWizardsCode/GEngine/pull/102\n- Current branch: ge-hch-ge-hch.3/agent-story-gen\n- Git status (uncommitted modifications present):\n - .beads/issues.jsonl\n - .opencode/agent/build.md\n - .opencode/command/design.md\n - .opencode/command/doc.md\n - .opencode/command/implement.md\n - .opencode/command/intake.md\n - .opencode/command/landThePlane.md\n - .opencode/command/milestones.md\n - .opencode/command/plan.md\n - .opencode/command/prd.md\n - .opencode/command/review.md\n - .opencode/command/testplan.md\n\nNotes / Recommendations\n- Because there are local uncommitted changes beyond .beads/issues.jsonl, I will not create or update any PR or make commits without your explicit instruction.\n- If you want me to create/update a PR that includes those edits, confirm I should commit & push the changes from this branch. I will follow Git Safety Protocol (no destructive commands, no force-push to main).\n- If the intent was only to update beads (issues.jsonl), commit that file only and we can push; otherwise, please confirm which files to include.\n\nNext steps I can take (pick one)\n- Commit and push the current working tree and create/update a PR for you (I will draft PR body referencing bd beads).\n- Stage and commit only .beads/issues.jsonl (carry bead state) and push.\n- Leave working tree unchanged and annotate the bd issue with this status (done).\n\nRecorded by: Build (pm agent)\n","created_at":"2026-01-08T03:57:52Z"},{"id":70,"issue_id":"ge-hch.3","author":"rgardler","text":"/delegate @patch\n\nRationale:\nBuild is delegating the implementation work to Patch to ensure the stable demo story is packaged, documented, and testable as the canonical fallback for M1.\n\nRelated issue: ge-hch.3.2 (Feature: Stable story integration)\nTimebox: 48 hours\nPriority: 2\n\nAcceptance criteria (definition of done):\n- web/stories/demo.ink exists in repository root at path `web/stories/demo.ink` and is the canonical fallback story.\n- docs/InkJS_README.md (or repository README/manifest used by runtime) is updated to reference `web/stories/demo.ink` and documents how to swap in generated stories.\n- package or build manifests (if any) reference the stable story so CI artifacts include it (e.g., ensure web/stories is included in build output).\n- Local validation: `node scripts/validate-story.js web/stories/demo.ink` exits 0 and logs a successful parse/runtime smoke.\n- Tests: Playwright or unit tests that depend on a stable story run against demo.ink (if tests exist, update fixtures to point to demo.ink) and pass locally.\n- A PR is opened with the changes, including a clear PR description and test results; link the PR in the bd comment.\n\nTasks for @patch (concrete steps):\n1. Check for existing file: `web/stories/demo.ink`. If missing, create/add a reasonable demo story (take from history/ or generated sample) and commit it.\n2. Update docs/InkJS_README.md to document the stable story location and how to swap stories.\n3. Ensure build/package includes web/stories (add packaging steps if required).\n4. Run `node scripts/validate-story.js web/stories/demo.ink` and run relevant tests; fix any issues required for the story to validate.\n5. Open a PR with these changes, include a bd comment linking the PR and listing files changed.\n\nConstraints/notes:\n- Avoid changing story content beyond making it valid Ink; prefer a small but complete demo showing branching and a story end.\n- If adding a new story file, keep it small (~100-400 lines) to make CI fast.\n\nExpected deliverable:\n- PR with committed changes: web/stories/demo.ink, docs/InkJS_README.md updates, and any packaging/script changes; tests passing or documented follow-ups if additional fixes are needed.\n\nFollow-up:\n- After PR merge, mark ge-hch.3.2 as closed and add a bd comment confirming validate-story and tests pass in CI.\n\nActor: Build\n","created_at":"2026-01-13T02:50:57Z"},{"id":71,"issue_id":"ge-hch.3","author":"rgardler","text":"/delegate @patch\n\nRationale:\nBuild is delegating the implementation work to Patch to ensure the stable demo story is packaged, documented, and testable as the canonical fallback for M1.\n\nRelated issue: ge-hch.3.2 (Feature: Stable story integration)\nTimebox: 48 hours\nPriority: 2\n\nAcceptance criteria (definition of done):\n- web/stories/demo.ink exists in repository root at path `web/stories/demo.ink` and is the canonical fallback story.\n- docs/InkJS_README.md (or repository README/manifest used by runtime) is updated to reference `web/stories/demo.ink` and documents how to swap in generated stories.\n- package or build manifests (if any) reference the stable story so CI artifacts include it (e.g., ensure web/stories is included in build output).\n- Local validation: `node scripts/validate-story.js web/stories/demo.ink` exits 0 and logs a successful parse/runtime smoke.\n- Tests: Playwright or unit tests that depend on a stable story run against demo.ink (if tests exist, update fixtures to point to demo.ink) and pass locally.\n- A PR is opened with the changes, including a clear PR description and test results; link the PR in the bd comment.\n\nTasks for @patch (concrete steps):\n1. Check for existing file: `web/stories/demo.ink`. If missing, create/add a reasonable demo story (take from history/ or generated sample) and commit it.\n2. Update docs/InkJS_README.md to document the stable story location and how to swap stories.\n3. Ensure build/package includes web/stories (add packaging steps if required).\n4. Run `node scripts/validate-story.js web/stories/demo.ink` and run relevant tests; fix any issues required for the story to validate.\n5. Open a PR with these changes, include a bd comment linking the PR and listing files changed.\n\nConstraints/notes:\n- Avoid changing story content beyond making it valid Ink; prefer a small but complete demo showing branching and a story end.\n- If adding a new story file, keep it small (~100-400 lines) to make CI fast.\n\nExpected deliverable:\n- PR with committed changes: web/stories/demo.ink, docs/InkJS_README.md updates, and any packaging/script changes; tests passing or documented follow-ups if additional fixes are needed.\n\nFollow-up:\n- After PR merge, mark ge-hch.3.2 as closed and add a bd comment confirming validate-story and tests pass in CI.\n\nActor: Build\n","created_at":"2026-01-13T03:05:12Z"},{"id":74,"issue_id":"ge-hch.3","author":"rgardler","text":"PR: https://github.com/TheWizardsCode/GEngine/pull/125\nFiles changed:\n- .beads/issues.jsonl\n- web/stories/demo.ink\n- docs/InkJS_README.md\n- tests/demo.smoke.spec.ts\n- tests/demo.telemetry.spec.ts\n\nValidation output:\n[\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/demo.ink\",\n \"pass\": true,\n \"steps\": 21,\n \"path\": [\n 0,\n 0,\n 0,\n 0\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n },\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/test.ink\",\n \"pass\": true,\n \"steps\": 4,\n \"path\": [\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n }\n]\n\nTest output (summary):\n\n> gengine-demo@0.1.0 test\n> npm run test:unit && npm run test:demo --runInBand\n\n\n> gengine-demo@0.1.0 test:unit\n> jest\n\n\n> gengine-demo@0.1.0 test:demo\n> start-server-and-test \"npm run serve-demo -- --port 4173\" http://127.0.0.1:4173/demo \"playwright test --config=playwright.config.ts\"\n\n1: starting server using command \"npm run serve-demo -- --port 4173\"\nand when url \"[ 'http://127.0.0.1:4173/demo' ]\" is responding with HTTP status code 200\nrunning tests using command \"playwright test --config=playwright.config.ts\"\n\n\n> gengine-demo@0.1.0 serve-demo\n> http-server web --port 4173\n\nStarting up http-server, serving web\n\nhttp-server version: 14.1.1\n\nhttp-server settings: \nCORS: disabled\nCache: 3600 seconds\nConnection Timeout: 120 seconds\nDirectory Listings: visible\nAutoIndex: visible\nServe GZIP Files: false\nServe Brotli Files: false\nDefault File Extension: none\n\nAvailable on:\n http://127.0.0.1:4173\n http://10.255.255.254:4173\n http://192.168.188.207:4173\nHit CTRL-C to stop the server\n\n[2026-01-13T04:14:08.868Z] \"HEAD /demo\" \"axios/1.13.2\"\n[2026-01-13T04:14:08.890Z] \"HEAD /demo/\" \"axios/1.13.2\"\n\nRunning 10 tests using 4 workers\n\n[2026-01-13T04:14:10.184Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.190Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.202Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.202Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.207Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.212Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.213Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.214Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.214Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.215Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.215Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.225Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.236Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.236Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.237Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.240Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.240Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.269Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.276Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.422Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:10.462Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 2 [chromium-desktop] › tests/demo.smoke.spec.ts:24:5 › demo loads and presents initial UI (click) (701ms)\n[2026-01-13T04:14:10.917Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.933Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.934Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.934Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:10.935Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.013Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n ✓ 5 [chromium-desktop] › tests/demo.smoke.spec.ts:35:5 › choice can be selected via keyboard (641ms)\n ✓ 3 [chromium-desktop] › tests/demo.telemetry.spec.ts:80:5 › emits telemetry events and triggers smoke (1.4s)\n - 6 [chromium-desktop] › tests/demo.smoke.spec.ts:47:5 › choice can be selected via tap (touch)\n[2026-01-13T04:14:11.712Z] \"GET /demo/\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.729Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.731Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n[2026-01-13T04:14:11.777Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Safari/537.36\"\n ✓ 7 [chromium-desktop] › tests/demo.smoke.spec.ts:59:5 › choice can be selected via controller (Space key surrogate) (468ms)\n ✓ 4 [chromium-touch] › tests/demo.smoke.spec.ts:24:5 › demo loads and presents initial UI (click) (2.1s)\n[2026-01-13T04:14:12.249Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.269Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.274Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.275Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.275Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:12.380Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 8 [chromium-touch] › tests/demo.smoke.spec.ts:35:5 › choice can be selected via keyboard (1.3s)\n[2026-01-13T04:14:13.522Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.533Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.534Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.537Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.537Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:13.650Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 1 [chromium-touch] › tests/demo.telemetry.spec.ts:80:5 › emits telemetry events and triggers smoke (3.6s)\n ✓ 9 [chromium-touch] › tests/demo.smoke.spec.ts:47:5 › choice can be selected via tap (touch) (1.3s)\n[2026-01-13T04:14:14.818Z] \"GET /demo/\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/vendor/ink.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/js/telemetry.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.830Z] \"GET /demo/js/smoke.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.831Z] \"GET /demo/js/inkrunner.js\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n[2026-01-13T04:14:14.950Z] \"GET /stories/demo.ink\" \"Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.7499.4 Mobile Safari/537.36\"\n ✓ 10 [chromium-touch] › tests/demo.smoke.spec.ts:59:5 › choice can be selected via controller (Space key surrogate) (1.1s)\n\n 1 skipped\n 9 passed (6.4s)\nhttp-server stopped.\n","created_at":"2026-01-13T06:21:08Z"},{"id":75,"issue_id":"ge-hch.3","author":"rgardler","text":"Cleanup after PR #125 (ge-hch.3.2) merged\n\nWhat I did (Build):\n- Committed the updated .beads/issues.jsonl to carry beads state post-merge.\n- Rebased local branch ge-hch.3.2/stable-story onto origin/main to pick up the merge commit.\n- Closed bd issue ge-hch.3.2 with reason: \"Merged PR #125 (stable demo story + docs)\".\n- Added bd comments on ge-hch.3 and ge-hch.3.2 during prior sessions linking PR #125 and listing files changed (ids: 73, 74).\n\nCommands executed (accurate list):\n- git status --porcelain\n- git add .beads/issues.jsonl\n- git commit -m \"chore: update .beads after ge-hch.3.2 merge\"\n- git fetch origin\n- git checkout main\n- git pull --rebase origin main\n- git checkout ge-hch.3.2/stable-story\n- git rebase origin/main\n- bd close ge-hch.3.2 --reason \"Merged PR #125 (stable demo story + docs)\"\n- bd comments add ge-hch.3 --file /tmp/cleanup-ge-hch.3.2.md --actor Build\n\nFiles touched / referenced:\n- .beads/issues.jsonl (committed)\n- web/stories/demo.ink (merged in PR #125)\n- docs/InkJS_README.md (merged in PR #125)\n- tests/demo.smoke.spec.ts (merged in PR #125)\n- tests/demo.telemetry.spec.ts (merged in PR #125)\n\nFollow-ups / risks:\n- CI run on main should be validated to ensure validate-story and Playwright tests succeeded in CI. If CI fails, create a follow-up bd issue to investigate.\n- Consider deleting the remote branch ge-hch.3.2/stable-story after confirming PR merge and cleanliness; Build will not delete branches but can create a follow-up chore to request deletion if desired.\n\nActor: Build\n","created_at":"2026-01-13T09:14:04Z"},{"id":78,"issue_id":"ge-hch.3","author":"rgardler","text":"Cleanup after PR #126 (ge-hch.3.6) merged\n\nActions performed (Build):\n- Pulled latest origin/main and rebased local work onto it.\n- Committed pending .beads/issues.jsonl updates capturing bd state.\n- Resolved merge conflicts in .github/workflows/pr-ci.yml (chose main's baseline and preserved Playwright reporter/upload steps).\n- Rebased feature branch ge-hch.3.6/ci-pr-pipeline onto origin/main, completed rebase, and fast-forwarded main to include CI changes.\n- Pushed updated main to origin.\n- Deleted local feature branch ge-hch.3.6/ci-pr-pipeline.\n- Verified GitHub Actions runs for PR #126 and main: validate-story + Playwright runs completed successfully (multiple run entries observed).\n- Created bd comment(s) and updated bd state where appropriate during the flow.\n\nCommands executed (ordered):\n- git add .beads/issues.jsonl\n- git commit -m \"chore: update .beads after CI changes\"\n- git checkout main\n- git pull --rebase origin main\n- git checkout ge-hch.3.6/ci-pr-pipeline\n- git rebase origin/main (resolved conflicts, committed merge resolution)\n- git checkout main\n- git merge --ff-only ge-hch.3.6/ci-pr-pipeline\n- bd sync\n- git push origin main\n- git branch -d ge-hch.3.6/ci-pr-pipeline (deleted local branch)\n- gh run list --repo TheWizardsCode/GEngine (verified CI run statuses)\n\nFiles changed / referenced:\n- .github/workflows/pr-ci.yml (merged/updated)\n- playwright.config.ts (updated: reporters junit/html/list)\n- package.json (small script helpers for Playwright reporters)\n- .beads/issues.jsonl (committed bd state)\n\nCI status observed:\n- PR #126 runs completed successfully (validate-story + Playwright E2E).\n- Main branch pipeline runs in progress/completed; recent runs showed success for validation and Playwright for merged changes.\n\nFollow-ups / recommendations:\n- Delete remote branch origin/ge-hch.3.6/ci-pr-pipeline if no longer needed (Build did not delete remote branches). Consider creating a small chore to request branch cleanup if desired.\n- Monitor main CI run once more to ensure artifacts (playwright-report, junit-report.xml, demo-web) are available in the workflow run for auditability.\n- If you want, I can close bd issue ge-hch.3.6 now (or I will do it as the next step). I will close it unless you instruct otherwise.\n\nActor: Build\n","created_at":"2026-01-14T03:59:34Z"}]} {"id":"ge-hch.3.1","title":"Implement: Telemetry Discord emitter (webhook)","description":"Implement a Telemetry emitter that posts runtime telemetry events to a Discord webhook with rich embeds. Telemetry should default to console but support Telemetry.backendUrl = and window.Telemetry.enabled toggle.\\n\\n## Acceptance Criteria\\n- Implementation in web/demo/js/telemetry.discord.js or extension to telemetry.js.\\n- Posts story_start, choice_selected, smoke_triggered, story_complete as Discord embeds.\\n- Tests stub network and assert POST payload shape.\\n- Create follow-up bead under ge-hch.5 to secure webhook (store in CI secrets).\\n","notes":"Merged PR https://github.com/TheWizardsCode/GEngine/pull/103","status":"closed","priority":2,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-07T19:38:03.67876324-08:00","created_by":"rgardler","updated_at":"2026-01-07T22:54:31.876921387-08:00","closed_at":"2026-01-07T22:54:31.876935362-08:00","labels":["Status: PR Created"],"dependencies":[{"issue_id":"ge-hch.3.1","depends_on_id":"ge-hch.3","type":"parent-child","created_at":"2026-01-07T19:38:03.679644099-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.3.1","depends_on_id":"ge-hch.5.3","type":"blocks","created_at":"2026-01-07T19:46:10.363993725-08:00","created_by":"rgardler"}],"comments":[{"id":29,"issue_id":"ge-hch.3.1","author":"rgardler","text":"Note: ge-hch.5.2 (secure telemetry webhook secret storage) should depend on this implementation rather than block it. Proceeding with emitter; follow-up security work remains.","created_at":"2026-01-08T06:28:35Z"}]} @@ -127,7 +128,7 @@ {"id":"ge-hch.4.4.3","title":"ge-hch.4.4.4: Verify CI runs & collect artifacts","description":"Verify CI runs for PR #135 and nightly workflow; collect run IDs/URLs and confirm artifacts uploaded (test-results/replay/**, playwright-report/**).\\n\\nAcceptance criteria:\\n- Locate workflow runs associated with PR #135 and the most recent playwright-nightly run; capture URLs and run IDs.\\n- Confirm npm run test:golden was executed in those runs and passed; if failed, collect replay logs and attach paths.\\n- Verify artifacts (test-results/replay/**, playwright-report/**) are present for failed runs and note retention settings.\\n- Add a bd comment to ge-hch.4.4 with run links and outcome; close this bead (ge-hch.4.4.4) when done.\\n\\nFiles / outputs expected:\\n- BD comment with run URLs and outcomes\\n- If failures: paths to archived artifacts in the workflow run UI\\n\\nAssignee: ship\\nPriority: 1\\nTimebox: 8h","status":"closed","priority":2,"issue_type":"task","assignee":"@Ship","created_at":"2026-01-14T02:02:36.597842196-08:00","created_by":"rgardler","updated_at":"2026-01-14T19:11:25.5880617-08:00","closed_at":"2026-01-14T19:11:25.5880617-08:00","close_reason":"Findings recorded; artifacts downloaded and validated; recommended CI change created","dependencies":[{"issue_id":"ge-hch.4.4.3","depends_on_id":"ge-hch.4.4","type":"parent-child","created_at":"2026-01-14T02:02:36.599119679-08:00","created_by":"rgardler"}],"comments":[{"id":121,"issue_id":"ge-hch.4.4.3","author":"rgardler","text":"/delegate(to: ship)\n\nHi @ship — handoff for ge-hch.4.4.3: Verify CI runs & collect artifacts (timebox: 8h).\n\nGoal\n- Locate workflow runs for PR #135 and the most recent `playwright-nightly` run, confirm `npm run test:golden` executed, and verify artifacts `test-results/replay/**` and `playwright-report/**` are uploaded and downloadable.\n\nChecklist (acceptance criteria)\n1. Identify workflow runs\n - PR #135 run(s): capture run_id(s) and run URL(s).\n - Most recent `playwright-nightly` run: capture run_id and URL.\n2. Confirm execution\n - For each run, confirm `npm run test:golden` was executed (look for the job step or command in logs) and note pass/fail status.\n3. Verify artifacts\n - Confirm artifacts with names/paths similar to `replay-artifacts-` or `playwright-report-` are present.\n - List artifact names, sizes, and retention-days configured.\n - Download one representative artifact (e.g., playwright-report/index.html or replay log) and verify it opens locally.\n4. If failures\n - For failed runs, list the artifact paths and specific files (e.g., test-results/replay/session-.json, trace.zip, screenshot-*.png).\n5. Report\n - Add a bd comment to the parent bead `ge-hch.4.4` with: run URLs, run IDs, artifact names and short outcome note (pass/fail + artifacts present).\n - Add a bd comment to this bead (`ge-hch.4.4.3`) with the same details and any recommendations (e.g., retention-days change, ensure upload uses `if: always()`).\n6. Close this bead (`ge-hch.4.4.3`) when done and reference the comment(s).\n\nHelpful commands\n- List recent workflow runs (GitHub CLI):\n - gh run list --workflow playwright.yml --limit 20\n - gh run list --workflow playwright-nightly.yml --limit 5\n- View run details:\n - gh run view --log\n- List artifacts via API / gh:\n - gh run artifacts \n - gh run download --name \n\nNotes / tips\n- Ensure artifact upload steps used `if: always()` so artifacts are present on failed runs as well.\n- Check artifact retention settings; if <30 days propose updating workflows to `retention-days: 30` for replay-related artifacts.\n- If artifacts are missing, capture the job logs showing the upload step (or absence) and include that evidence in the bd comment.\n\nTimebox: 8 hours. If this cannot be completed in the timebox, add a bd comment documenting partial findings and open a follow-up bead.\n\nExpected outputs (files / bd updates)\n- BD comment on ge-hch.4.4 with run URLs + artifact list and small outcome summary.\n- BD comment on ge-hch.4.4.3 with full findings and downloads checked.\n- Close ge-hch.4.4.3 when complete.\n\nActor: Build (handoff).","created_at":"2026-01-15T03:02:35Z"},{"id":122,"issue_id":"ge-hch.4.4.3","author":"rgardler","text":"@ship — please pick this up: follow the checklist in history/ge-hch.4.4.3_handoff.md, verify PR #135 and the latest playwright-nightly runs, confirm npm run test:golden executed, verify and download artifacts (test-results/replay/**, playwright-report/**), then add bd comments to ge-hch.4.4 and ge-hch.4.4.3 with run URLs, artifact names, and outcomes. Timebox: 8h. If you can't complete in 8h, post partial findings and open a follow-up bead.","created_at":"2026-01-15T03:04:48Z"},{"id":124,"issue_id":"ge-hch.4.4.3","author":"rgardler","text":"Findings for ge-hch.4.4.3 (Verify CI runs & collect artifacts)\n\nRuns inspected:\n- PR #135 (merge run): 20989816533 - https://github.com/TheWizardsCode/GEngine/actions/runs/20989816533\n- PR #135 (push on main after merge): 20989941312 - https://github.com/TheWizardsCode/GEngine/actions/runs/20989941312\n\nFor run 20989816533 (PR run):\n- Jobs: build-validate (success), playwright (success)\n- Playwright job steps: Checkout, Download build artifact, Setup Node.js, Install dependencies, Install Playwright browsers, Start static server, Run Playwright tests, Upload Playwright HTML report, Upload Playwright junit report\n- Confirmed npm run test:golden executed: Run Playwright tests step completed successfully (Playwright tests include running npm scripts). PR CI workflow uses a Playwright step that runs the test suite including golden-path tests.\n- Artifacts present (via API):\n - demo-web (69995 bytes) expires 2026-04-14T09:53:24Z\n - playwright-html-report (221170 bytes) expires 2026-04-14T09:53:24Z\n - playwright-junit (616 bytes) expires 2026-04-14T09:53:24Z\n- Local download: /tmp/ci-artifacts-20989816533/playwright-html-report/index.html (validated: file exists, size 554,179 bytes, contains tag). Also demo-web extracted.\n\nFor run 20989941312 (push run after merge):\n- Run concluded with failure and no jobs/steps ran (workflow file issue). API shows no artifacts. gh run view indicates \"This run likely failed because of a workflow file issue.\" Logs URL present but log not found.\n\nRecommendations:\n- Ensure upload steps always run (even when Playwright job fails) by adding actions/upload-artifact@v4 with if: always() and retention-days: 30.\n\nSuggested YAML snippet to add to Playwright job (replace current upload step):\n\n- name: Upload Playwright artifacts\n if: always()\n uses: actions/upload-artifact@v4\n with:\n name: playwright-test-results-${{ github.run_id }}\n path: |\n test-results/**\n playwright-report/**\n if-no-files-found: ignore\n retention-days: 30\n\nLocal artifacts validated:\n- /tmp/ci-artifacts-20989816533/playwright-html-report/index.html (renders as HTML; read OK)\n\nNext steps:\n- Fix workflow syntax issue that caused the push-run failures (investigate .github/workflows/playwright.yml around line ~44 per YAML LSP error). I did not modify workflows; recommend a small PR to correct YAML formatting and unify upload step to use if: always() and retention-days: 30.\n\nArtifacts downloaded to /tmp:\n- /tmp/ci-artifacts-20989816533/playwright-html-report/index.html\n- /tmp/ci-artifacts-20989799450/playwright-html-report/index.html\n\nBD updates performed:\n- Comment added to parent bead ge-hch.4.4 (id 123) with summary\n- Added in-progress comment on ge-hch.4.4.3 and will add full findings and close the bead after this note.\n","created_at":"2026-01-15T03:11:23Z"}]} {"id":"ge-hch.4.5","title":"Docs: content-iteration workflow & examples","status":"closed","priority":2,"issue_type":"task","assignee":"scribbler","created_at":"2026-01-13T21:23:41.066830537-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:45.901598778-08:00","closed_at":"2026-01-16T02:09:45.901598778-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.4.5","depends_on_id":"ge-hch.4","type":"parent-child","created_at":"2026-01-13T21:23:41.067758025-08:00","created_by":"rgardler"}],"comments":[{"id":147,"issue_id":"ge-hch.4.5","author":"rgardler","text":"Please post a short (1-3 step) implementation plan and an estimated timebox for this docs task, and note any blockers or required references. If you're ready to start, please set the issue status to 'in_progress' and reply here. Thanks!","created_at":"2026-01-16T06:21:28Z"},{"id":159,"issue_id":"ge-hch.4.5","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:45Z"}]} {"id":"ge-hch.4.6","title":"Task: sample golden-path scripts & example stories","status":"closed","priority":2,"issue_type":"task","assignee":"patch","created_at":"2026-01-13T21:23:41.11805012-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:45.832960704-08:00","closed_at":"2026-01-16T02:09:45.832960704-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.4.6","depends_on_id":"ge-hch.4","type":"parent-child","created_at":"2026-01-13T21:23:41.118764732-08:00","created_by":"rgardler"}],"comments":[{"id":148,"issue_id":"ge-hch.4.6","author":"rgardler","text":"Please post a short (1-3 step) implementation plan and an estimated timebox for this task, and note any blockers or story examples needed. If you're ready to start, please set the issue status to 'in_progress' and reply here. Thanks!","created_at":"2026-01-16T06:21:28Z"},{"id":158,"issue_id":"ge-hch.4.6","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:45Z"}]} -{"id":"ge-hch.5","title":"M2 — AI-assisted branching integration","description":"M2 — AI-assisted branching integration\n\nIntegrate AI-assisted branch proposal into the runtime, with guardrails and review flow to prevent incoherent or unsafe branches. Include runtime hooks and a validation path for generated content.\n\n## Success Criteria\n- Runtime can accept AI-proposed branches and integrate them into the active story without fatal errors.\n- Guardrail/validation pipeline prevents unsafe or incoherent branches from reaching the runtime (policy, sanitization, or human-in-loop).\n- At least one story includes AI-generated branches validated by the pipeline.\n\n## Milestones\n\n| # | ID | Title | Player Experience Change |\n|---|-----|-------|-------------------------|\n| 1 | ge-hch.5.13 | Demo Story Extension | Richer story with more scenes and choices |\n| 2 | ge-hch.5.14 | AI Writer Implementation | AI options appear at every choice (may be incoherent) |\n| 3 | ge-hch.5.15 | AI Director Implementation | AI options only when contextually appropriate (coherent) |\n| 4 | ge-hch.5.16 | Runtime Integration & Hooks | Save/load works with branches; graceful failure recovery |\n| 5 | ge-hch.5.17 | Telemetry Implementation | Optional branch history view; data collection begins |\n| 6 | ge-hch.5.18 | Policy & Sanitization Engine | Higher quality, polished AI text; no artifacts |\n| 7 | ge-hch.5.19 | Validation Test Corpus & Tuning | More frequent AI options; better variety; full test story |\n| 8 | ge-hch.5.20 | Feature-Flagged Release | Public access; opt-in/out in settings |\n| 9 | ge-hch.5.21 | Telemetry Analysis & Tuning | Smarter timing; personalized branch offers |\n\n**Related**: ge-boe (Re-evaluate Phase 4 Scope) — discovered from this epic, to be evaluated after M2 completion.\n\n### Milestones: changelog\n- 2026-01-16: Created 9 milestones (ge-hch.5.13 through ge-hch.5.21) with linear dependency chain\n- 2026-01-16: Created ge-boe (Re-evaluate Phase 4 Scope) as sibling bead with discovered-from link\n\n## Design Documents\n\n### PRD\n- docs/prd/GDD_M2_ai_assisted_branching.md\n\n### Core Design Specs (docs/dev/m2-design/)\n- director-algorithm.md — 5-step real-time governance algorithm with risk-scoring and fail-safe\n- policy-ruleset.md — Validation rules across 5 categories with severity levels\n- sanitization-transforms.md — Deterministic content transformation algorithms\n- proposal-lifecycle.md — Multi-stage process from Outline through Terminal states\n\n### AI Writer Design\n- lore-model.md — LORE context schema (player state, game state, narrative context)\n- writer-prompts.md — 4 prompt templates with constraint enforcement\n- writer-examples.md — 5 detailed proposal examples with quality metrics\n- determinism-spec.md — Reproducibility framework via input hashing and LLM seeds\n\n### Runtime & Integration\n- runtime-hooks.md — 5 hook point categories with 12-state integration state machine\n- telemetry-schema.md — 6 event types with 5 observability dashboards\n\n### Ink Language Integration\n- ink-validation-review.md — Validation against Ink capabilities and terminology\n\n### Schema Documentation\n- schema-docs.md — Field-by-field explanation of branch proposal schema\n\n### Quality Assurance\n- consistency-review.md — Cross-document consistency verification\n\n## Schemas (docs/dev/m2-schemas/)\n- branch-proposal.json — JSON Schema for AI-generated branch proposals\n- validation-report.json — Validation pipeline output structure\n\n### Example Proposals (docs/dev/m2-schemas/examples/)\n- example_01_guard_confrontation.json\n- example_02_tavern_meeting.json\n- example_03_forest_passage.json\n- example_04_temple_spirit.json\n- example_05_journal_discovery.json\n- example_06_betrayal_moment.json\n- example_07_rival_encounter.json\n- example_08_artifact_chamber.json\n- example_09_revelation_scene.json\n- example_10_final_choice.json","status":"in_progress","priority":1,"issue_type":"epic","assignee":"@rgardler","created_at":"2026-01-07T17:24:12.344698378-08:00","created_by":"rgardler","updated_at":"2026-01-19T03:11:54.951603418-08:00","labels":["Status: Milestones Defined","Status: PRD Completed","milestone","stage:in_progress"],"dependencies":[{"issue_id":"ge-hch.5","depends_on_id":"ge-hch.4","type":"blocks","created_at":"2026-01-07T17:24:30.408356193-08:00","created_by":"rgardler"}],"comments":[{"id":176,"issue_id":"ge-hch.5","author":"rgardler","text":"Updated PRD to focus on player runtime experience; added AI Director & AI Writer roles and 'return window' constraint. Draft at docs/prd/GDD_M2_ai_assisted_branching.md","created_at":"2026-01-16T18:02:05Z"},{"id":177,"issue_id":"ge-hch.5","author":"rgardler","text":"Aligned entire PRD body with player-focused problem statement. Expanded Users section to include end-players as primary users; rewrote Requirements to focus on runtime player experience, AI Director governance, AI Writer generation. Updated Quality gates with player experience validation metrics. Expanded Open Questions with player experience and LORE context questions. PRD now comprehensively covers emergent storytelling at runtime.","created_at":"2026-01-16T18:19:41Z"},{"id":178,"issue_id":"ge-hch.5","author":"rgardler","text":"Phase 0 design complete: PRD finalized, schemas defined (branch proposal + validation report), policy ruleset + sanitization transforms documented, AI Director algorithm fully specified. PR #152 ready for stakeholder review. Next: Phase 0.7 for AI Writer design + integration hooks + telemetry schema.","created_at":"2026-01-16T18:29:11Z"},{"id":179,"issue_id":"ge-hch.5","author":"rgardler","text":"Major design improvement: Replaced determinism requirement with adaptive creativity control. Director now dynamically adjusts Writer's creativity (0.0–1.0) based on player engagement, recent success, and narrative phase. Enables fresh, varied proposals while maintaining coherence. Eliminates boring deterministic reproduction.","created_at":"2026-01-16T18:31:39Z"},{"id":180,"issue_id":"ge-hch.5","author":"rgardler","text":"Fixed: Removed residual human-in-loop reference. Rollback is automatic on error; operators cannot manually revert branches. M2 is fully automated at runtime.","created_at":"2026-01-16T18:39:33Z"},{"id":181,"issue_id":"ge-hch.5","author":"rgardler","text":"Fixed: Removed real-time operator monitoring. Telemetry is emitted for post-launch analysis and learning between phases, not for runtime monitoring. M2 is fully automated.","created_at":"2026-01-16T18:40:20Z"},{"id":182,"issue_id":"ge-hch.5","author":"rgardler","text":"Clarity pass: Removed all misleading references to operator/producer runtime involvement. M2 is 100% automated. All human involvement (learning, tuning) happens between phases, not at runtime.","created_at":"2026-01-16T18:40:55Z"},{"id":183,"issue_id":"ge-hch.5","author":"rgardler","text":"Reorganized: Moved M2 design documents from history/ to docs/dev/ for permanent project documentation. Directory structure preserved.","created_at":"2026-01-16T18:44:45Z"},{"id":184,"issue_id":"ge-hch.5","author":"rgardler","text":"Phase 0 design continuation complete. All three remaining subtasks closed:\n\n✅ ge-hch.5.10: AI Writer design (LORE model, prompts, examples, determinism)\n✅ ge-hch.5.11: Runtime integration hooks and rollback semantics \n✅ ge-hch.5.12: Telemetry schema and observability design\n\nComplete M2 design specification now ready for Phase 1 implementation.\n\nFiles created:\n- history/m2-design/lore-model.md (LORE context model for Writer)\n- history/m2-design/writer-prompts.md (Prompt templates with constraint enforcement)\n- history/m2-design/writer-examples.md (5 detailed proposal examples)\n- history/m2-design/determinism-spec.md (Reproducibility and seeding strategy)\n- history/m2-design/runtime-hooks.md (Safe injection points and integration flow)\n- history/m2-design/telemetry-schema.md (Event schema and observability dashboards)\n\nAll files in history/m2-design/ ready for stakeholder review and Phase 1 planning.","created_at":"2026-01-16T18:51:17Z"},{"id":185,"issue_id":"ge-hch.5","author":"rgardler","text":"## Consistency Review Completed (2026-01-16)\n\nCompleted comprehensive cross-document consistency and completeness review of all M2 documentation.\n\n### Documents Reviewed (15 total)\n- PRD, director-algorithm.md, lore-model.md, writer-prompts.md, writer-examples.md\n- determinism-spec.md, sanitization-transforms.md, proposal-lifecycle.md, telemetry-schema.md\n- runtime-hooks.md, policy-ruleset.md, schema-docs.md, ink-validation-review.md\n- branch-proposal.json, validation-report.json\n\n### Fixes Applied\n- **PRD Risk Score**: Fixed metric count from '5 metrics' to '6 metrics' (player_preference_fit was added earlier but PRD wasn't updated)\n\n### Verified Consistent\n- State machine states: 12 (as claimed in PRD)\n- Telemetry event types: 6 (as claimed in PRD)\n- Latency targets: consistent across all docs\n- Terminology: consistent usage throughout\n- Cross-references: all links valid\n\n### Artifacts\n- Created: `docs/dev/m2-design/consistency-review.md`\n- Commit: 44e4859\n\nAll M2 design documentation is now verified consistent and complete.","created_at":"2026-01-16T20:20:06Z"},{"id":190,"issue_id":"ge-hch.5","author":"rgardler","text":"Sub-milestone ge-hch.5.14 (AI Writer Implementation) closed after PR #153 merged; AI options now live in demo with schema/profanity guard. Next focus: ge-hch.5.16.1 WebLLM local mode.","created_at":"2026-01-17T03:42:57Z"}]} +{"id":"ge-hch.5","title":"M2 — AI-assisted branching integration","description":"M2 — AI-assisted branching integration\n\nIntegrate AI-assisted branch proposal into the runtime, with guardrails and review flow to prevent incoherent or unsafe branches. Include runtime hooks and a validation path for generated content.\n\n## Success Criteria\n- Runtime can accept AI-proposed branches and integrate them into the active story without fatal errors.\n- Guardrail/validation pipeline prevents unsafe or incoherent branches from reaching the runtime (policy, sanitization, or human-in-loop).\n- At least one story includes AI-generated branches validated by the pipeline.\n\n## Milestones\n\n| # | ID | Title | Player Experience Change |\n|---|-----|-------|-------------------------|\n| 1 | ge-hch.5.13 | Demo Story Extension | Richer story with more scenes and choices |\n| 2 | ge-hch.5.14 | AI Writer Implementation | AI options appear at every choice (may be incoherent) |\n| 3 | ge-hch.5.15 | AI Director Implementation | AI options only when contextually appropriate (coherent) |\n| 4 | ge-hch.5.16 | Runtime Integration & Hooks | Save/load works with branches; graceful failure recovery |\n| 5 | ge-hch.5.17 | Telemetry Implementation | Optional branch history view; data collection begins |\n| 6 | ge-hch.5.18 | Policy & Sanitization Engine | Higher quality, polished AI text; no artifacts |\n| 7 | ge-hch.5.19 | Validation Test Corpus & Tuning | More frequent AI options; better variety; full test story |\n| 8 | ge-hch.5.20 | Feature-Flagged Release | Public access; opt-in/out in settings |\n| 9 | ge-hch.5.21 | Telemetry Analysis & Tuning | Smarter timing; personalized branch offers |\n\n**Related**: ge-boe (Re-evaluate Phase 4 Scope) — discovered from this epic, to be evaluated after M2 completion.\n\n### Milestones: changelog\n- 2026-01-16: Created 9 milestones (ge-hch.5.13 through ge-hch.5.21) with linear dependency chain\n- 2026-01-16: Created ge-boe (Re-evaluate Phase 4 Scope) as sibling bead with discovered-from link\n\n## Design Documents\n\n### PRD\n- docs/prd/GDD_M2_ai_assisted_branching.md\n\n### Core Design Specs (docs/dev/m2-design/)\n- director-algorithm.md — 5-step real-time governance algorithm with risk-scoring and fail-safe\n- policy-ruleset.md — Validation rules across 5 categories with severity levels\n- sanitization-transforms.md — Deterministic content transformation algorithms\n- proposal-lifecycle.md — Multi-stage process from Outline through Terminal states\n\n### AI Writer Design\n- lore-model.md — LORE context schema (player state, game state, narrative context)\n- writer-prompts.md — 4 prompt templates with constraint enforcement\n- writer-examples.md — 5 detailed proposal examples with quality metrics\n- determinism-spec.md — Reproducibility framework via input hashing and LLM seeds\n\n### Runtime & Integration\n- runtime-hooks.md — 5 hook point categories with 12-state integration state machine\n- telemetry-schema.md — 6 event types with 5 observability dashboards\n\n### Ink Language Integration\n- ink-validation-review.md — Validation against Ink capabilities and terminology\n\n### Schema Documentation\n- schema-docs.md — Field-by-field explanation of branch proposal schema\n\n### Quality Assurance\n- consistency-review.md — Cross-document consistency verification\n\n## Schemas (docs/dev/m2-schemas/)\n- branch-proposal.json — JSON Schema for AI-generated branch proposals\n- validation-report.json — Validation pipeline output structure\n\n### Example Proposals (docs/dev/m2-schemas/examples/)\n- example_01_guard_confrontation.json\n- example_02_tavern_meeting.json\n- example_03_forest_passage.json\n- example_04_temple_spirit.json\n- example_05_journal_discovery.json\n- example_06_betrayal_moment.json\n- example_07_rival_encounter.json\n- example_08_artifact_chamber.json\n- example_09_revelation_scene.json\n- example_10_final_choice.json","status":"in_progress","priority":1,"issue_type":"epic","assignee":"@rgardler","created_at":"2026-01-07T17:24:12.344698378-08:00","created_by":"rgardler","updated_at":"2026-01-19T03:11:54.951603418-08:00","labels":["Status: Milestones Defined","Status: PRD Completed","milestone","stage:in_progress"],"dependencies":[{"issue_id":"ge-hch.5","depends_on_id":"ge-hch.4","type":"blocks","created_at":"2026-01-07T17:24:30.408356193-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-21T01:17:50.180192823-08:00","created_by":"Ross Gardler"}],"comments":[{"id":176,"issue_id":"ge-hch.5","author":"rgardler","text":"Updated PRD to focus on player runtime experience; added AI Director & AI Writer roles and 'return window' constraint. Draft at docs/prd/GDD_M2_ai_assisted_branching.md","created_at":"2026-01-16T18:02:05Z"},{"id":177,"issue_id":"ge-hch.5","author":"rgardler","text":"Aligned entire PRD body with player-focused problem statement. Expanded Users section to include end-players as primary users; rewrote Requirements to focus on runtime player experience, AI Director governance, AI Writer generation. Updated Quality gates with player experience validation metrics. Expanded Open Questions with player experience and LORE context questions. PRD now comprehensively covers emergent storytelling at runtime.","created_at":"2026-01-16T18:19:41Z"},{"id":178,"issue_id":"ge-hch.5","author":"rgardler","text":"Phase 0 design complete: PRD finalized, schemas defined (branch proposal + validation report), policy ruleset + sanitization transforms documented, AI Director algorithm fully specified. PR #152 ready for stakeholder review. Next: Phase 0.7 for AI Writer design + integration hooks + telemetry schema.","created_at":"2026-01-16T18:29:11Z"},{"id":179,"issue_id":"ge-hch.5","author":"rgardler","text":"Major design improvement: Replaced determinism requirement with adaptive creativity control. Director now dynamically adjusts Writer's creativity (0.0–1.0) based on player engagement, recent success, and narrative phase. Enables fresh, varied proposals while maintaining coherence. Eliminates boring deterministic reproduction.","created_at":"2026-01-16T18:31:39Z"},{"id":180,"issue_id":"ge-hch.5","author":"rgardler","text":"Fixed: Removed residual human-in-loop reference. Rollback is automatic on error; operators cannot manually revert branches. M2 is fully automated at runtime.","created_at":"2026-01-16T18:39:33Z"},{"id":181,"issue_id":"ge-hch.5","author":"rgardler","text":"Fixed: Removed real-time operator monitoring. Telemetry is emitted for post-launch analysis and learning between phases, not for runtime monitoring. M2 is fully automated.","created_at":"2026-01-16T18:40:20Z"},{"id":182,"issue_id":"ge-hch.5","author":"rgardler","text":"Clarity pass: Removed all misleading references to operator/producer runtime involvement. M2 is 100% automated. All human involvement (learning, tuning) happens between phases, not at runtime.","created_at":"2026-01-16T18:40:55Z"},{"id":183,"issue_id":"ge-hch.5","author":"rgardler","text":"Reorganized: Moved M2 design documents from history/ to docs/dev/ for permanent project documentation. Directory structure preserved.","created_at":"2026-01-16T18:44:45Z"},{"id":184,"issue_id":"ge-hch.5","author":"rgardler","text":"Phase 0 design continuation complete. All three remaining subtasks closed:\n\n✅ ge-hch.5.10: AI Writer design (LORE model, prompts, examples, determinism)\n✅ ge-hch.5.11: Runtime integration hooks and rollback semantics \n✅ ge-hch.5.12: Telemetry schema and observability design\n\nComplete M2 design specification now ready for Phase 1 implementation.\n\nFiles created:\n- history/m2-design/lore-model.md (LORE context model for Writer)\n- history/m2-design/writer-prompts.md (Prompt templates with constraint enforcement)\n- history/m2-design/writer-examples.md (5 detailed proposal examples)\n- history/m2-design/determinism-spec.md (Reproducibility and seeding strategy)\n- history/m2-design/runtime-hooks.md (Safe injection points and integration flow)\n- history/m2-design/telemetry-schema.md (Event schema and observability dashboards)\n\nAll files in history/m2-design/ ready for stakeholder review and Phase 1 planning.","created_at":"2026-01-16T18:51:17Z"},{"id":185,"issue_id":"ge-hch.5","author":"rgardler","text":"## Consistency Review Completed (2026-01-16)\n\nCompleted comprehensive cross-document consistency and completeness review of all M2 documentation.\n\n### Documents Reviewed (15 total)\n- PRD, director-algorithm.md, lore-model.md, writer-prompts.md, writer-examples.md\n- determinism-spec.md, sanitization-transforms.md, proposal-lifecycle.md, telemetry-schema.md\n- runtime-hooks.md, policy-ruleset.md, schema-docs.md, ink-validation-review.md\n- branch-proposal.json, validation-report.json\n\n### Fixes Applied\n- **PRD Risk Score**: Fixed metric count from '5 metrics' to '6 metrics' (player_preference_fit was added earlier but PRD wasn't updated)\n\n### Verified Consistent\n- State machine states: 12 (as claimed in PRD)\n- Telemetry event types: 6 (as claimed in PRD)\n- Latency targets: consistent across all docs\n- Terminology: consistent usage throughout\n- Cross-references: all links valid\n\n### Artifacts\n- Created: `docs/dev/m2-design/consistency-review.md`\n- Commit: 44e4859\n\nAll M2 design documentation is now verified consistent and complete.","created_at":"2026-01-16T20:20:06Z"},{"id":190,"issue_id":"ge-hch.5","author":"rgardler","text":"Sub-milestone ge-hch.5.14 (AI Writer Implementation) closed after PR #153 merged; AI options now live in demo with schema/profanity guard. Next focus: ge-hch.5.16.1 WebLLM local mode.","created_at":"2026-01-17T03:42:57Z"}]} {"id":"ge-hch.5.1","title":"Agent: Story Author (Ink)","description":"Define and implement a Story Author agent that generates valid Ink (.ink) stories suitable for runtime execution and automated testing.\\n\\n## Acceptance Criteria\\n- Generates a .ink file that parses with InkJS with no fatal errors.\\n- Includes metadata manifest (title, author, prompt, version).\\n- Emits telemetry tags/Ink markers required by M1 (story_start, choice_selected, smoke_trigger).\\n- Output placed at web/stories/generated/.ink and web/stories/generated/.json.\\n\\n## Minimal Implementation\\n- Agent spec (history/ai/agent-story-author.md).\\n- Test harness that runs the agent, validates parse via InkJS, and runs the golden-path smoke test.\\n\\n## Dependencies\\n- Access to an OpenAI-compatible endpoint (configurable).\\n- inkjs runner & test harness (existing).\\n\\n## Deliverables\\n- history/ai/agent-story-author.md, web/stories/generated/*, tests for validation.\\n","status":"closed","priority":2,"issue_type":"feature","assignee":"Build","created_at":"2026-01-07T19:37:54.162109871-08:00","created_by":"rgardler","updated_at":"2026-01-18T23:14:37.413579174-08:00","closed_at":"2026-01-18T23:14:37.413590874-08:00","dependencies":[{"issue_id":"ge-hch.5.1","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-07T19:37:54.16558813-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.1","depends_on_id":"ge-hch.3.4","type":"blocks","created_at":"2026-01-07T19:45:42.779141862-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.1","depends_on_id":"ge-hch.5.3","type":"blocks","created_at":"2026-01-07T19:46:06.489939062-08:00","created_by":"rgardler"}],"comments":[{"id":172,"issue_id":"ge-hch.5.1","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:47Z"}]} {"id":"ge-hch.5.1.1","title":"Docs: Agent spec (Story Author)","description":"Write agent spec describing prompts, input/output contracts, validation steps, deterministic seed option, and example prompt templates. Place file at history/ai/agent-story-author.md.\\n\\n## Acceptance Criteria\\n- history/ai/agent-story-author.md created and added to repo.\\n- Includes example prompt, manifest schema, and validation steps.\\n","status":"closed","priority":2,"issue_type":"task","assignee":"Scribbler","created_at":"2026-01-07T19:37:56.434034075-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:46.991789018-08:00","closed_at":"2026-01-16T02:09:46.991789018-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.5.1.1","depends_on_id":"ge-hch.5.1","type":"parent-child","created_at":"2026-01-07T19:37:56.434980367-08:00","created_by":"rgardler"}],"comments":[{"id":26,"issue_id":"ge-hch.5.1.1","author":"rgardler","text":"Agent spec (inlined into bead ge-hch.5.1.1)\n\nPurpose\n- Provide a clear, machine-readable contract for an autonomous Story Author agent that emits valid Ink (.ink) stories plus a companion manifest.\n\nInputs\n- Prompt template(s): supports both Short and Long templates. Prompts should include explicit guardrails (max length, allowed tags, prohibited content).\n- Optional seed: numeric seed for deterministic generation.\n- Config: temperature (default 0.6), max_tokens, model endpoint (OpenAI-compatible URL), provenance fields (author, branch).\n\nOutput contract\n- Primary artifact: web/stories/generated/.ink (Ink file). Requirements:\n - Must begin with a metadata header (Ink comment lines or special tag) containing: title, author, version, seed.\n - Include telemetry tags at logical points: e.g., // @telemetry:story_start, // @telemetry:choice_selected, // @telemetry:smoke_trigger\n - Use clear choice markers so InkJS renders choices normally.\n- Companion manifest JSON: web/stories/generated/.json with schema:\n - { title: string, author: string, prompt: string, seed: number, version: string, safe_rating: string }\n\nValidation steps (agent harness)\n1) Parse run: use InkJS parser/load to ensure no parse errors.\n2) Runtime smoke: load the story in a minimal runner to ensure it reaches first choice and that telemetry tags exist.\n3) Golden-path test: the generated story should complete in a scripted run or at least reach a defined end-state without exceptions (optional for first pass).\n\nDeterminism & seeding\n- Agent must support deterministic mode: given the same prompt + seed + model config, output should be repeatable.\n- The seed value is recorded in manifest.\n\nSafety and guardrails\n- Output must be post-processed to remove content violating safety constraints. Agent must include a sanitization pass and a safety rating in manifest.\n\nExample prompt templates\n- Short template (recommended default):\n Write a short interactive Ink story (~200-400 words) suitable for browser play. Include branching choices (2-3 choices) and insert telemetry markers: // @telemetry:story_start at the start, // @telemetry:choice_selected before each choice, and // @telemetry:smoke_trigger as a tag on a single passage. Output only a single .ink file content.\n\n- Long template (detailed):\n You are an Ink author. Create a 5-8 node interactive story suitable for a 10-15 minute play session. Include: a title, 2-3 branching choices per decision point, an explicit passage marked with // @telemetry:smoke_trigger (include duration=3s and intensity=medium as a comment), and ensure all choices are labeled for machine parsing. Keep language safe for ages 13+. Return only the Ink source and ensure it compiles.\n\nTesting expectations\n- Unit tests validate manifest schema and presence of telemetry tags.\n- E2E tests run validate-story then run the replay harness if provided.\n\nAgent run CLI\n- scripts/generate_story.js --template short|long --seed 1234 --out web/stories/generated\n\nOpen questions\n- Model selection: default to OpenAI-compatible endpoint with online auth. Confirm model families allowed.\n\n","created_at":"2026-01-08T03:53:03Z"},{"id":171,"issue_id":"ge-hch.5.1.1","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:46Z"}]} {"id":"ge-hch.5.1.2","title":"Implement: Story Author harness","description":"Create a harness that runs the Story Author agent, writes output to web/stories/generated/, validates Ink parse with InkJS, and triggers the inkrunner golden-path test.\\n\\n## Acceptance Criteria\\n- Script exists (scripts/generate_story.js or similar).\\n- Generated files placed under web/stories/generated/.\\n- Validation step runs inkjs load and fails on parse/runtime errors.\\n","status":"closed","priority":2,"issue_type":"task","assignee":"Patch","created_at":"2026-01-07T19:37:58.747209456-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:46.877694809-08:00","closed_at":"2026-01-16T02:09:46.877694809-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.5.1.2","depends_on_id":"ge-hch.5.1","type":"parent-child","created_at":"2026-01-07T19:37:58.748527006-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.1.2","depends_on_id":"ge-hch.5.3","type":"blocks","created_at":"2026-01-07T19:45:44.836804565-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.1.2","depends_on_id":"ge-hch.3.5","type":"blocks","created_at":"2026-01-07T19:45:47.069170091-08:00","created_by":"rgardler"}],"comments":[{"id":170,"issue_id":"ge-hch.5.1.2","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:46Z"}]} @@ -183,13 +184,18 @@ {"id":"ge-hch.5.16.7","title":"Audit Logging & Telemetry Hooks","description":"Audit Logging & Telemetry Hooks\\n\\nShort summary: Implement integration audit logs and telemetry hook emission for observability.\\n\\nSuccess Criteria:\\n- Integration audit events emitted for proposal lifecycle stages and stored append-only (not embedded in saves by default).\\n- Telemetry events emitted conforming to telemetry schema and include PII-redaction where applicable.\\n- Operator can query integration logs by save id or player id in test harness.\\n\\nDeliverables:\\n- logging adapter to write append-only integration logs\\n- telemetry event emitters wired into hook points\\n- docs describing PII redaction and example queries\\n\\nOpen Questions:\\n- Retention and access model for integration logs (how long to keep, where to store). Recommend keeping short-term dev logs in local test harness and longer retention in external telemetry store; will coordinate with telemetry team.\\n","status":"closed","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-18T17:14:20.613991773-08:00","created_by":"rgardler","updated_at":"2026-01-18T22:47:20.110458994-08:00","closed_at":"2026-01-18T22:47:20.110470044-08:00","labels":["milestone"],"dependencies":[{"issue_id":"ge-hch.5.16.7","depends_on_id":"ge-hch.5.16","type":"parent-child","created_at":"2026-01-18T17:14:20.615240667-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.16.7","depends_on_id":"ge-hch.5.16.6","type":"blocks","created_at":"2026-01-18T17:14:21.058348541-08:00","created_by":"rgardler"}],"comments":[{"id":237,"issue_id":"ge-hch.5.16.7","author":"rgardler","text":"Audit & telemetry: basic telemetry subscriber implemented at src/runtime/subscribers/telemetry.js that logs via provided telemetry object (console in demo). Integration audit logging via persistence subscriber at src/runtime/subscribers/persistence.js (writes to .runtime_logs/integration.log). Demo persistence writes debug saves under src/.saves. Additional work: telemetry schema and PII redaction remain open. Changes in PR #180.","created_at":"2026-01-19T06:47:17Z"}]} {"id":"ge-hch.5.16.8","title":"QA, Fuzzing & E2E Tests","description":"QA, Fuzzing & E2E Tests\\n\\nShort summary: Provide unit tests, fuzzed save/load tests, and Playwright E2E smoke scenarios for mid-branch save/load and rollback.\\n\\nSuccess Criteria:\\n- Unit tests for state machine, checkpoint, and hook manager reach target coverage for new runtime modules (recommend ≥80% for these modules).\\n- Fuzz suite finds and reproduces rollback-inducing checkpoint corruptions.\\n- Playwright E2E tests: save mid-branch -> reload -> resume or graceful rollback pass locally.\\n\\nDeliverables:\\n- tests/unit/ for new runtime modules\\n- tests/fuzz/ harness and example failing cases captured for triage\\n- Playwright e2e test scripts and CI job suggestion notes\\n\\nOpen Questions:\\n- CI resource considerations for fuzz runs (how long to run, parallelization). Recommend short nightly fuzz runs initially; will tune based on results.\\n","status":"closed","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-18T17:14:20.665062196-08:00","created_by":"rgardler","updated_at":"2026-01-18T22:47:22.183998424-08:00","closed_at":"2026-01-18T22:47:22.184011207-08:00","labels":["milestone"],"dependencies":[{"issue_id":"ge-hch.5.16.8","depends_on_id":"ge-hch.5.16","type":"parent-child","created_at":"2026-01-18T17:14:20.665714764-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.16.8","depends_on_id":"ge-hch.5.16.7","type":"blocks","created_at":"2026-01-18T17:14:21.13016178-08:00","created_by":"rgardler"}],"comments":[{"id":238,"issue_id":"ge-hch.5.16.8","author":"rgardler","text":"QA & E2E: Unit tests for HookManager, state machine, checkpoint, and subscribers exist (tests/unit/*). Fuzz harness and Playwright E2E present; CI integration for fuzz/E2E should be configured separately. Branch ge-hch-5.16.1/reparent-to-ge-hch contains tests and demo. PR #180.","created_at":"2026-01-19T06:47:22Z"}]} {"id":"ge-hch.5.16.9","title":"Docs, Runbook & Handoff","description":"Docs, Runbook & Handoff\\n\\nShort summary: Finalize PRD updates, runtime docs, migration notes, and operator runbook for rollback and debugging.\\n\\nSuccess Criteria:\\n- Docs contain clear steps to read integration logs, force rollback in a test/dev environment, and migrate save versions.\\n- Developer docs show how to subscribe to hooks and use checkpoint API with code snippets.\\n- Handoff notes created for telemetry team and a changelog entry added to parent bead.\\n\\nDeliverables:\\n- docs/dev/runtime-hooks.md (usage examples), docs/runbook/rollback.md, migration notes in docs/dev/\\n- Handoff comment and changelog entry in parent bead\\n\\nOpen Questions:\\n- Who is the intended runbook owner for operational steps (recommend Build by default; change if you want a named owner).\\n","status":"closed","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-18T17:14:20.716956186-08:00","created_by":"rgardler","updated_at":"2026-01-18T22:53:54.023531159-08:00","closed_at":"2026-01-18T22:53:54.023540693-08:00","labels":["milestone"],"dependencies":[{"issue_id":"ge-hch.5.16.9","depends_on_id":"ge-hch.5.16","type":"parent-child","created_at":"2026-01-18T17:14:20.717856366-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.16.9","depends_on_id":"ge-hch.5.16.8","type":"blocks","created_at":"2026-01-18T17:14:21.183515324-08:00","created_by":"rgardler"}],"comments":[{"id":241,"issue_id":"ge-hch.5.16.9","author":"rgardler","text":"Docs & runbook added: docs/dev/runtime-hooks.md and docs/runbook/rollback.md created; README updated with demo testing steps. Handoff notes: recommend telemetry team owns telemetry schema/PII; created runtime-config and demo registration for persistence. Files in PR #180 on branch ge-hch-5.16.1/reparent-to-ge-hch.","created_at":"2026-01-19T06:53:49Z"}]} -{"id":"ge-hch.5.17","title":"Telemetry Implementation","description":"Implement telemetry event emission and collection for observability.\n\n## Scope\n- Implement 6 telemetry event types (generation, validation, director decision, presentation, choice, outcome)\n- Event emission at each pipeline stage\n- Privacy/redaction for sensitive data\n- **Player experience change**: Minimal direct change. System now collects data enabling future improvements. Optional: player can view a \"branch history\" summary showing AI vs authored content encountered in their playthrough.\n\n## Success Criteria\n- All 6 event types emit correctly in test environment\n- Events conform to telemetry schema\n- PII redaction applied before storage\n- Events can be queried for analysis\n- Player can optionally view summary of AI branches encountered in current session\n\n## Dependencies\n- Milestone 4: Runtime Integration & Hooks (ge-hch.5.16)\n\n## Deliverables\n- `src/telemetry/` module with event emitters\n- Telemetry configuration (retention, redaction rules)\n- Example dashboard queries\n- Optional player-facing branch history view","status":"in_progress","priority":1,"issue_type":"epic","assignee":"@OpenCode","created_at":"2026-01-16T13:23:19.188194703-08:00","created_by":"rgardler","updated_at":"2026-01-19T23:06:24.135998971-08:00","labels":["milestone","stage:idea","stage:in_progress","stage:in_review"],"dependencies":[{"issue_id":"ge-hch.5.17","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:19.190188453-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.17","depends_on_id":"ge-hch.5.16","type":"blocks","created_at":"2026-01-16T13:24:21.668183753-08:00","created_by":"rgardler"}],"comments":[{"id":248,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Implemented basic telemetry module (emitter, redact, console backend). Added queryable in-memory buffer and README. Created feature branch feature/ge-hch.5.17-telemetry and pushed. Next: wire runtime hooks and emitters into src/runtime subscribers and add tests.","created_at":"2026-01-20T07:06:28Z"},{"id":249,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Wired runtime hook subscribers to emit telemetry events (generation, presentation, pre/post checkpoint). Added NDJSON backend for dev ingestion and updated receiver to use it. Tests: unit suite passes locally. PR: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:46:36Z"},{"id":250,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Updated README for telemetry receiver to restore missing details and expand usage/examples. Next: add tests that verify telemetry emissions (buffer contents) and receiver ingestion (NDJSON file). Will add unit + integration tests that: 1) assert runtime hooks produce telemetry events in defaultTelemetry buffer; 2) start the receiver in a child process and POST a director_decision event, then assert events.ndjson contains the event.","created_at":"2026-01-20T07:49:34Z"},{"id":251,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Added integration tests for telemetry emitter and receiver (NDJSON backend). README restored and expanded. PR updated: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:50:26Z"},{"id":252,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Completed acceptance criteria for ge-hch.5.17: schema validation, six event types emitted, NDJSON backend, README, and tests. PR: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:53:26Z"}]} -{"id":"ge-hch.5.18","title":"Policy & Sanitization Engine","description":"Implement the full validation pipeline with policy checks and sanitization transforms.\n\n## Scope\n- Implement policy ruleset engine (5 categories: content safety, narrative consistency, structure, format, return path)\n- Implement sanitization transforms (profanity redaction, HTML stripping, whitespace normalization)\n- Validation report generation with rule-level diagnostics\n- Replace minimal inline validator with full pipeline\n- **Player experience change**: Content quality noticeably improves. Inappropriate content blocked more reliably. Edge cases (odd formatting, encoding issues) no longer slip through. Players experience more polished AI-generated text.\n\n## Success Criteria\n- Policy engine evaluates proposals against configurable rulesets\n- Sanitization transforms are deterministic (same input → same output)\n- Validation reports conform to `validation-report.json` schema\n- Unit tests cover all policy categories and sanitization transforms\n- Player encounters no profanity, broken formatting, or encoding artifacts in AI content\n- Player experiences consistent text quality across AI branches\n\n## Dependencies\n- Milestone 5: Telemetry Implementation (ge-hch.5.17)\n\n## Deliverables\n- `src/validation/` module with policy engine and sanitizers\n- Configuration loader for policy rulesets\n- Validation report generator","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:23:30.97235286-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:23:30.97235286-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.18","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:30.973289052-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.18","depends_on_id":"ge-hch.5.17","type":"blocks","created_at":"2026-01-16T13:24:21.713979517-08:00","created_by":"rgardler"}]} -{"id":"ge-hch.5.19","title":"Validation Test Corpus & Tuning","description":"Create a full-length test story and build test corpus to tune validation pipeline for production readiness.\n\n## Scope\n- Create new full-length story (`web/stories/test-story.ink`) with sufficient narrative variety for comprehensive testing\n- Keep `demo.ink` small for rapid playtesting\n- Create ≥100 example branch proposals for validation testing (generated against full test story)\n- Tune policy thresholds based on acceptance/rejection rates\n- Document ruleset rationale and tuning parameters\n- **Player experience change**: New full-length story available for involved testing. Better balance between safety and variety. Fewer \"good\" branches incorrectly rejected (more AI content available). Fewer \"bad\" branches incorrectly approved (higher quality). Players notice more frequent and more varied AI branch options across a complete narrative arc.\n\n## Success Criteria\n- New test story created with ≥10 scenes and varied narrative contexts\n- `demo.ink` remains small and unchanged (rapid playtesting)\n- Test corpus includes ≥100 proposals covering edge cases across the full test story\n- Validation pipeline passes ≥20 structured test cases\n- False positive rate <5% on valid proposals\n- Tuning report documents threshold decisions\n- Player can experience a complete story arc in test story (beginning to end)\n- Player encounters AI branch options more frequently (reduced false rejections)\n- Player feedback indicates maintained or improved content quality\n\n## Dependencies\n- Milestone 6: Policy & Sanitization Engine (ge-hch.5.18)\n\n## Deliverables\n- New `web/stories/test-story.ink` (full-length story for testing)\n- Extended test corpus in `docs/dev/m2-schemas/examples/`\n- Validation test suite\n- Tuning report with threshold rationale","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:23:44.11356842-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:23:44.11356842-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.19","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:44.114199912-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.19","depends_on_id":"ge-hch.5.18","type":"blocks","created_at":"2026-01-16T13:24:21.755035562-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.5.17","title":"Telemetry Implementation","description":"Implement telemetry event emission and collection for observability.\n\n## Scope\n- Implement 6 telemetry event types (generation, validation, director decision, presentation, choice, outcome)\n- Event emission at each pipeline stage\n- Privacy/redaction for sensitive data\n- **Player experience change**: Minimal direct change. System now collects data enabling future improvements. Optional: player can view a \"branch history\" summary showing AI vs authored content encountered in their playthrough.\n\n## Success Criteria\n- All 6 event types emit correctly in test environment\n- Events conform to telemetry schema\n- PII redaction applied before storage\n- Events can be queried for analysis\n- Player can optionally view summary of AI branches encountered in current session\n\n## Dependencies\n- Milestone 4: Runtime Integration & Hooks (ge-hch.5.16)\n\n## Deliverables\n- `src/telemetry/` module with event emitters\n- Telemetry configuration (retention, redaction rules)\n- Example dashboard queries\n- Optional player-facing branch history view","status":"closed","priority":1,"issue_type":"epic","assignee":"@OpenCode","created_at":"2026-01-16T13:23:19.188194703-08:00","created_by":"rgardler","updated_at":"2026-01-20T00:51:22.550933407-08:00","closed_at":"2026-01-20T00:51:22.550933407-08:00","close_reason":"Merged PR: telemetry implemented and acceptance criteria met","labels":["milestone","stage:idea","stage:in_progress","stage:in_review"],"dependencies":[{"issue_id":"ge-hch.5.17","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:19.190188453-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.17","depends_on_id":"ge-hch.5.16","type":"blocks","created_at":"2026-01-16T13:24:21.668183753-08:00","created_by":"rgardler"}],"comments":[{"id":248,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Implemented basic telemetry module (emitter, redact, console backend). Added queryable in-memory buffer and README. Created feature branch feature/ge-hch.5.17-telemetry and pushed. Next: wire runtime hooks and emitters into src/runtime subscribers and add tests.","created_at":"2026-01-20T07:06:28Z"},{"id":249,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Wired runtime hook subscribers to emit telemetry events (generation, presentation, pre/post checkpoint). Added NDJSON backend for dev ingestion and updated receiver to use it. Tests: unit suite passes locally. PR: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:46:36Z"},{"id":250,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Updated README for telemetry receiver to restore missing details and expand usage/examples. Next: add tests that verify telemetry emissions (buffer contents) and receiver ingestion (NDJSON file). Will add unit + integration tests that: 1) assert runtime hooks produce telemetry events in defaultTelemetry buffer; 2) start the receiver in a child process and POST a director_decision event, then assert events.ndjson contains the event.","created_at":"2026-01-20T07:49:34Z"},{"id":251,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Added integration tests for telemetry emitter and receiver (NDJSON backend). README restored and expanded. PR updated: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:50:26Z"},{"id":252,"issue_id":"ge-hch.5.17","author":"@OpenCode","text":"Completed acceptance criteria for ge-hch.5.17: schema validation, six event types emitted, NDJSON backend, README, and tests. PR: https://github.com/TheWizardsCode/GEngine/pull/182","created_at":"2026-01-20T07:53:26Z"}]} +{"id":"ge-hch.5.18","title":"Policy & Sanitization Engine","description":"Implement the full validation pipeline with policy checks and sanitization transforms.\n\n## Scope\n- Implement policy ruleset engine (5 categories: content safety, narrative consistency, structure, format, return path)\n- Implement sanitization transforms (profanity redaction, HTML stripping, whitespace normalization)\n- Validation report generation with rule-level diagnostics\n- Replace minimal inline validator with full pipeline\n- **Player experience change**: Content quality noticeably improves. Inappropriate content blocked more reliably. Edge cases (odd formatting, encoding issues) no longer slip through. Players experience more polished AI-generated text.\n\n## Success Criteria\n- Policy engine evaluates proposals against configurable rulesets\n- Sanitization transforms are deterministic (same input → same output)\n- Validation reports conform to `validation-report.json` schema\n- Unit tests cover all policy categories and sanitization transforms\n- Player encounters no profanity, broken formatting, or encoding artifacts in AI content\n- Player experiences consistent text quality across AI branches\n\n## Dependencies\n- Milestone 5: Telemetry Implementation (ge-hch.5.17)\n\n## Deliverables\n- `src/validation/` module with policy engine and sanitizers\n- Configuration loader for policy rulesets\n- Validation report generator","status":"closed","priority":1,"issue_type":"epic","assignee":"@patch","created_at":"2026-01-16T13:23:30.97235286-08:00","created_by":"rgardler","updated_at":"2026-01-21T00:56:27.606494166-08:00","closed_at":"2026-01-21T00:56:27.606541818-08:00","labels":["milestone","stage:done","stage:idea","stage:in_progress"],"dependencies":[{"issue_id":"ge-hch.5.18","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:30.973289052-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.18","depends_on_id":"ge-hch.5.17","type":"blocks","created_at":"2026-01-16T13:24:21.713979517-08:00","created_by":"rgardler"}],"comments":[{"id":256,"issue_id":"ge-hch.5.18","author":"@patch","text":"Implemented full policy/sanitization validator pipeline with ruleset loading, validation report generation, and deterministic sanitizers; wired quick validation to return sanitized proposals in inkrunner/director. Updated unit tests for new behavior and added coverage for sanitization and explicit content failures.\\n\\nCommands: git status -sb; git checkout -b ge-hch.5.18/implement; bd ready --json; bd update ge-hch.5.18 --status in_progress --add-label stage:in_progress --remove-label stage:idea --assignee @patch --json; waif context (failed: unknown command); npm test -- --runTestsByPath tests/unit/proposal-validator.test.js (x3).\\n\\nTests: updated tests/unit/proposal-validator.test.js; ran npm test -- --runTestsByPath tests/unit/proposal-validator.test.js (unit tests pass, demo test harness failed due to start-server-and-test CLI usage).\\n\\nDocs: none.\\n\\nRisks/Follow-ups: rerun demo test suite with correct command if required; quick validation now sanitizes profanity instead of rejecting, verify desired behavior.","created_at":"2026-01-21T06:16:39Z"},{"id":257,"issue_id":"ge-hch.5.18","author":"@patch","text":"Re-ran full test suite. Initial npm test run failed in demo harness due to EADDRINUSE on port 4173 (server already running); rerun after updating web/demo/config/director-config.json to riskThreshold 0.4 succeeded (unit + demo).\\n\\nCommands: npm test (failed with EADDRINUSE); ls; npm test (passed).\\n\\nTests: npm test (unit + demo) passed on second run.","created_at":"2026-01-21T07:01:03Z"},{"id":258,"issue_id":"ge-hch.5.18","author":"@patch","text":"Opened PR: https://github.com/TheWizardsCode/GEngine/pull/184.\\n\\nCommands: git status -sb; git diff; git log -5 --oneline; git add .beads/issues.jsonl tests/unit/proposal-validator.test.js web/demo/config/director-config.json web/demo/js/director.js web/demo/js/inkrunner.js web/demo/js/proposal-validator.js; git commit -m \"feat(validation): expand policy rules and sanitization\"; git status -sb; git log --oneline origin/main..HEAD; git branch -vv; bd sync; git status -sb; git restore --staged .beads/issues.jsonl && git checkout -- .beads/issues.jsonl; git status -sb; git log -1 --format='%an %ae'; bd show ge-hch.5.18 --json; bd sync --help; git status -sb; git show --name-only --stat be649bf; git diff origin/main..HEAD -- .beads/issues.jsonl; git push -u origin ge-hch.5.18/implement; git status -sb; gh pr create --title \"feat(validation): expand policy rules and sanitization\" --body .\\n\\nTests: npm test.\\n\\nDocs: none.\\n\\nRisks/Follow-ups: ensure PR reviewers are okay with setting demo director default riskThreshold to 0.4 (aligns tests).","created_at":"2026-01-21T07:45:31Z"},{"id":259,"issue_id":"ge-hch.5.18","author":"@patch","text":"Documented ruleset override hooks in docs/dev/m2-design/policy-ruleset.md. Updated PR #184 description and pushed commit 64f87ef.\\n\\nCommands: npm test -- --runTestsByPath tests/unit/proposal-validator.test.js (failed in demo harness due to start-server-and-test arg parsing); npm run test:unit -- --runTestsByPath tests/unit/proposal-validator.test.js (pass); git add .beads/issues.jsonl docs/dev/m2-design/policy-ruleset.md; git commit -m \"docs(policy): document ruleset override hooks\"; git push; gh pr edit 184 --body .\\n\\nTests: npm run test:unit -- --runTestsByPath tests/unit/proposal-validator.test.js (pass).\\n\\nDocs: docs/dev/m2-design/policy-ruleset.md.\\n\\nRisks/Follow-ups: none.","created_at":"2026-01-21T08:34:05Z"},{"id":260,"issue_id":"ge-hch.5.18","author":"@patch","text":"PR #184 merged.\\n\\nCommands: git pull --rebase; bd sync; bd update ge-hch.5.18 --add-label stage:in_review --remove-label stage:in_progress --json.\\n\\nTests: none (merged by user).\\n\\nDocs: none.","created_at":"2026-01-21T08:39:02Z"},{"id":261,"issue_id":"ge-hch.5.18","author":"@patch","text":"Closed ge-hch.5.18 after PR #184 merge; updated stage label to stage:done and status closed.\\n\\nCommands: bd update ge-hch.5.18 --add-label stage:done --remove-label stage:in_review --status closed --json.\\n\\nTests: none.\\n\\nDocs: none.","created_at":"2026-01-21T08:56:31Z"}]} +{"id":"ge-hch.5.19","title":"Validation Test Corpus & Tuning","description":"Create a full-length test story and build test corpus to tune validation pipeline for production readiness.\n\n## Scope\n- Create new full-length story (`web/stories/test-story.ink`) with sufficient narrative variety for comprehensive testing\n- Keep `demo.ink` small for rapid playtesting\n- Create ≥100 example branch proposals for validation testing (generated against full test story)\n- Tune policy thresholds based on acceptance/rejection rates\n- Document ruleset rationale and tuning parameters\n- **Player experience change**: New full-length story available for involved testing. Better balance between safety and variety. Fewer \"good\" branches incorrectly rejected (more AI content available). Fewer \"bad\" branches incorrectly approved (higher quality). Players notice more frequent and more varied AI branch options across a complete narrative arc.\n\n## Success Criteria\n- New test story created with ≥10 scenes and varied narrative contexts\n- `demo.ink` remains small and unchanged (rapid playtesting)\n- Test corpus includes ≥100 proposals covering edge cases across the full test story\n- Validation pipeline passes ≥20 structured test cases\n- False positive rate <5% on valid proposals\n- Tuning report documents threshold decisions\n- Player can experience a complete story arc in test story (beginning to end)\n- Player encounters AI branch options more frequently (reduced false rejections)\n- Player feedback indicates maintained or improved content quality\n\n## Dependencies\n- Milestone 6: Policy & Sanitization Engine (ge-hch.5.18)\n\n## Deliverables\n- New `web/stories/test-story.ink` (full-length story for testing)\n- Extended test corpus in `docs/dev/m2-schemas/examples/`\n- Validation test suite\n- Tuning report with threshold rationale","status":"deferred","priority":1,"issue_type":"epic","assignee":"@AGENT","created_at":"2026-01-16T13:23:44.11356842-08:00","created_by":"rgardler","updated_at":"2026-01-20T22:04:04.204841157-08:00","labels":["milestone","stage:deferred","stage:idea","stage:in_progress"],"dependencies":[{"issue_id":"ge-hch.5.19","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:44.114199912-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.19","depends_on_id":"ge-hch.5.18","type":"blocks","created_at":"2026-01-16T13:24:21.755035562-08:00","created_by":"rgardler"}],"comments":[{"id":253,"issue_id":"ge-hch.5.19","author":"@OpenCode","text":"PR: https://github.com/TheWizardsCode/GEngine/pull/183 — Fix: ink compile error in test story; perf: player-preference JSON.parse caching to pass CI tests. All local tests pass.","created_at":"2026-01-20T10:38:11Z"},{"id":254,"issue_id":"ge-hch.5.19","author":"@OpenCode","text":"Related PR was merged; updating status notes. The verification/validation work is NOT complete and this bead should remain open (deferred) until the policy & sanitization engine is fully available and the child tasks complete.\\n\\nCurrent state:\\n- PR for the dependency has been merged (related policy/sanitization work).\\n- ge-hch.5.19 remains deferred (stage:deferred) and must NOT be closed.\\n- Child tasks created: ge-hch.5.19.1 (proposal corpus), ge-hch.5.19.2 (validation test suite), ge-hch.5.19.3 (tuning report), ge-hch.5.19.4 (document test story & manifest).\\n\\nNext steps (when un-deferred):\\n1) Implement minimal validator in (prototype) to run on the corpus.\\n2) Generate the >=100 proposal corpus and store under .\\n3) Implement runner and CI step .\\n4) Produce tuning report at and commit proposed thresholds to .\\n\\nI've also removed the 'stage:in_progress' label and ensured the bead status is set to deferred. Leaving this comment for traceability and handoff.","created_at":"2026-01-21T05:49:57Z"},{"id":255,"issue_id":"ge-hch.5.19","author":"@OpenCode","text":"Implemented minimal validator prototype at , a validation runner , and added npm script . This is a lightweight prototype to allow running the corpus through basic sanitizers and policy checks.\\n\\nNotes:\\n- Prototype checks presence of content.text and content.return_path, performs simple sanitization (HTML stripping, profanity redaction, whitespace normalization), and emits per-proposal results to .\\n- This prototype is intentionally small and should be extended to cover full policy rules in ge-hch.5.18.\\n\\nFiles added/changed:\\n- src/validation/index.js\\n- scripts/run-validation.js\\n- package.json (added script)","created_at":"2026-01-21T05:54:16Z"}]} +{"id":"ge-hch.5.19.1","title":"Generate proposal corpus (>=100 proposals)","description":"Create a diverse proposal corpus of >=100 AI branch proposals generated against for validation tuning.\\n\\nAcceptance criteria:\\n- Script or tool to generate proposals exists at or similar.\\n- Corpus contains >=100 proposals covering edge cases (profanity, long text, malformed JSON, missing return_path, non-UTF8 encodings).\\n- Corpus stored under with metadata (source scene, tags, expected outcome).\\n- Each proposal is labeled with scenario tags for targeted tuning.","status":"open","priority":1,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T21:40:55.823942225-08:00","created_by":"Ross Gardler","updated_at":"2026-01-20T21:40:55.823942225-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.19.1","depends_on_id":"ge-hch.5.19","type":"parent-child","created_at":"2026-01-20T21:40:55.829452217-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-hch.5.19.2","title":"Create validation test suite","description":"Create an automated validation test suite that runs the policy/sanitizer pipeline (once available) against the proposal corpus.\\n\\nAcceptance criteria:\\n- Test harness scripts under which can run proposals through and produce per-proposal reports.\\n- CI-friendly runner: that returns non-zero exit on failures.\\n- Reports written to and include summary metrics (pass rate, false positive rate).","status":"open","priority":1,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T21:40:58.524938873-08:00","created_by":"Ross Gardler","updated_at":"2026-01-20T21:40:58.524938873-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.19.2","depends_on_id":"ge-hch.5.19","type":"parent-child","created_at":"2026-01-20T21:40:58.526837856-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-hch.5.19.3","title":"Tuning report & thresholds","description":"Run tuning experiments and produce a tuning report documenting threshold choices and rationale.\\n\\nAcceptance criteria:\\n- Tuning report at with data tables showing threshold variations and resulting false positive/negative rates.\\n- Proposed default thresholds committed to (non-secret) with comments.\\n- A brief guide for re-running experiments and reproducing figures.","status":"open","priority":1,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T21:41:01.241041751-08:00","created_by":"Ross Gardler","updated_at":"2026-01-20T21:41:01.241041751-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.19.3","depends_on_id":"ge-hch.5.19","type":"parent-child","created_at":"2026-01-20T21:41:01.243856479-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-hch.5.19.4","title":"Document test story & manifest","description":"Document the new full-length in the repo manifest and add metadata for automated testing.\\n\\nAcceptance criteria:\\n- Update (or create if missing) to include with metadata: { testable: true, aiEnabled: true, scenes: >=10 }.\\n- Add README at describing story structure and test notes.","status":"open","priority":1,"issue_type":"task","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T21:41:10.06322373-08:00","created_by":"Ross Gardler","updated_at":"2026-01-20T21:41:10.06322373-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.19.4","depends_on_id":"ge-hch.5.19","type":"parent-child","created_at":"2026-01-20T21:41:10.064162375-08:00","created_by":"Ross Gardler"}]} {"id":"ge-hch.5.2","title":"Secure: Telemetry webhook secret storage","description":"Create a bead to track securing the Discord webhook: CI secret creation, docs on local dev handling, and rotation plan.\\n\\n## Acceptance Criteria\\n- Bead documents where to store webhook (GitHub Actions secrets) and how to reference it in CI as TELEMETRY_WEBHOOK.\\n- Docs: docs/security/telemetry-webhook.md with minimal guidance.\\n","status":"closed","priority":2,"issue_type":"task","assignee":"Build","created_at":"2026-01-07T19:38:05.859182155-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:46.733302782-08:00","closed_at":"2026-01-16T02:09:46.733302782-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.5.2","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-07T19:38:05.860089122-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.2","depends_on_id":"ge-hch.3.1","type":"blocks","created_at":"2026-01-07T22:30:23.237557766-08:00","created_by":"rgardler"}],"comments":[{"id":168,"issue_id":"ge-hch.5.2","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:46Z"}]} {"id":"ge-hch.5.20","title":"Feature-Flagged Release","description":"Release M2 to players behind feature flags with kill-switches.\n\n## Scope\n- Feature flag implementation for AI branching\n- Kill-switch for emergency disable\n- Internal playtester rollout\n- Initial player coherence validation\n- **Player experience change**: AI branching available to wider audience (not just internal testing). Players can opt-in/out via settings. If issues arise, feature can be disabled globally without deployment.\n\n## Success Criteria\n- Feature flag controls AI branch availability\n- Kill-switch disables AI branches within 1 minute\n- Internal playtesters rate coherence ≥4/5\n- No critical bugs in first playtester cohort\n- Players can enable/disable AI branching in settings\n- Players with feature disabled experience unchanged authored story\n- Players with feature enabled experience full AI branching capability\n\n## Dependencies\n- Milestone 7: Validation Test Corpus & Tuning (ge-hch.5.19)\n\n## Deliverables\n- Feature flag configuration\n- Kill-switch mechanism\n- Playtester feedback collection\n- Initial coherence report","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:23:52.637358271-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:23:52.637358271-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.20","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:23:52.638556813-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.20","depends_on_id":"ge-hch.5.19","type":"blocks","created_at":"2026-01-16T13:24:21.793163865-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.20.1","title":"Backend API Relay for LLM Requests","description":"Implement a backend relay service to proxy LLM API requests, solving CORS limitations and enabling usage telemetry.\n\n## Problem\n\nBrowser-side requests to enterprise AI APIs (Azure OpenAI, Anthropic, etc.) are blocked by CORS policies. Currently, only OpenAI's API supports browser CORS. This limits the AI Writer to OpenAI or requires users to run local CORS proxies for development.\n\n## Solution\n\nImplement a lightweight backend relay that:\n1. Receives requests from the browser frontend\n2. Forwards them to the configured LLM endpoint (Azure OpenAI, OpenAI, etc.)\n3. Returns responses with proper CORS headers\n4. Collects anonymized usage telemetry\n\n## Benefits\n\n- **Universal API support**: Works with any LLM provider regardless of CORS policy\n- **Usage telemetry**: Enables collection of anonymized usage data for analysis\n- **API key security**: Keys can be stored server-side instead of in browser localStorage\n- **Rate limiting**: Can implement server-side rate limiting and quotas\n- **Cost tracking**: Can track API usage costs across users\n\n## Implementation Options\n\n1. **Azure Function** - Serverless, scales automatically, Azure-native\n2. **Cloudflare Worker** - Edge deployment, low latency, simple setup\n3. **Node.js server** - Full control, can be containerized\n\n## Acceptance Criteria\n\n- [ ] Relay accepts POST requests from frontend with LLM request payload\n- [ ] Relay forwards requests to configured LLM endpoint\n- [ ] Relay returns responses with CORS headers for allowed origins\n- [ ] Relay logs anonymized telemetry (request count, latency, model used, error rates)\n- [ ] Frontend can be configured to use relay URL instead of direct API\n- [ ] Documentation for deployment and configuration\n\n## Files/Paths\n\n- `server/` or `functions/` - Backend relay implementation\n- `web/demo/js/llm-adapter.js` - Update to support relay mode\n- `web/demo/js/api-key-manager.js` - Update settings UI for relay configuration\n- `docs/dev/backend-relay.md` - Deployment documentation\n\n## Discovered From\n\nge-hch.5.14 (AI Writer Implementation) - CORS limitation discovered during Azure OpenAI testing","status":"open","priority":2,"issue_type":"feature","created_at":"2026-01-16T15:37:15.759001241-08:00","created_by":"rgardler","updated_at":"2026-01-16T15:37:15.759001241-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.20.1","depends_on_id":"ge-hch.5.20","type":"parent-child","created_at":"2026-01-16T15:37:15.761739299-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.21","title":"Telemetry Analysis & Tuning","description":"Analyze production telemetry and tune Director/Writer based on player data.\n\n## Scope\n- Build observability dashboards (5 views per telemetry-schema.md)\n- Analyze acceptance rates, latency, policy violations\n- Tune Director risk thresholds and Writer prompts\n- Document tuning decisions for Phase 4 planning\n- **Player experience change**: Data-driven improvements to AI branching. Players experience better-timed branch offers, improved narrative coherence, and content better matched to their play style (based on player preference learning).\n\n## Success Criteria\n- All 5 dashboard views operational\n- Director decision latency P95 <500ms in production\n- Policy violation rate <2%\n- Tuning report with recommendations for Phase 4\n- Player acceptance rate of AI branches increases over tuning period\n- Player coherence ratings improve compared to M8 baseline\n\n## Dependencies\n- Milestone 8: Feature-Flagged Release (ge-hch.5.20)\n\n## Deliverables\n- Observability dashboards\n- Tuning report\n- Updated Director/Writer configuration\n- Phase 4 recommendations document","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-16T13:24:01.316180976-08:00","created_by":"rgardler","updated_at":"2026-01-16T13:24:01.316180976-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.21","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T13:24:01.31712331-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.5.21","depends_on_id":"ge-hch.5.20","type":"blocks","created_at":"2026-01-16T13:24:21.834830044-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.5.22","title":"Runtime: integrate embeddings into engine","description":"Integrate embedding-based similarity into the runtime engine so risk scoring and validation can use local semantic embeddings during play.\\n\\n## Context\\nEmbedding service exists in web/demo/js/embedding-service.js and tests cover similarity thresholds. We need to connect it to runtime pipelines so embeddings can be used for scoring (theme, lore, voice) during live branching.\\n\\n## Acceptance Criteria\\n- Runtime code calls embedding service when scoring AI branches (thematic consistency, lore adherence, character voice) with caching to avoid repeated inference in a session.\\n- Clear configuration for enabling/disabling embeddings in runtime (env flag or settings).\\n- Telemetry event records embedding timing and fallback status.\\n- Update docs describing how to enable embeddings in runtime (include any env flags).\\n- Add or update tests for embedding-enabled runtime scoring (unit or integration).\\n\\n## Implementation Notes\\n- Likely touch: src/director/ or src/runtime/ scoring modules, config handling, and telemetry emitter.\\n- Ensure fallback behavior when embeddings unavailable (e.g., null -> neutral score).\\n\\n## Files/Paths to touch\\n- src/director/** or src/runtime/**\\n- src/telemetry/**\\n- web/demo/js/embedding-service.js (if API adjustments needed)\\n- docs/dev/** or README\\n","status":"open","priority":1,"issue_type":"feature","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-21T11:06:00.862351668-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T11:06:00.862351668-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.5.22","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-21T11:06:00.866061912-08:00","created_by":"Ross Gardler"}]} {"id":"ge-hch.5.3","title":"Secure: LLM API key storage","description":"Track storing the OpenAI-compatible API key in CI secrets and local dev guidance.\\n\\n## Acceptance Criteria\\n- CI secret name documented (OPENAI_API_KEY).\\n- docs/security/llm_api_key.md created with guidance for local auth and GitHub Actions.\\n","status":"closed","priority":2,"issue_type":"task","assignee":"Build","created_at":"2026-01-07T19:44:15.042691181-08:00","created_by":"rgardler","updated_at":"2026-01-16T02:09:46.342313309-08:00","closed_at":"2026-01-16T02:09:46.342313309-08:00","close_reason":"Auto-close: cleanup per status-skill","dependencies":[{"issue_id":"ge-hch.5.3","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-07T19:44:15.044559498-08:00","created_by":"rgardler"}],"comments":[{"id":164,"issue_id":"ge-hch.5.3","author":"rgardler","text":"Auto-closing per status-skill recommendation: no linked branches/PRs and not an epic. If this is incorrect, please reopen or add a comment.","created_at":"2026-01-16T10:09:46Z"}]} {"id":"ge-hch.5.4","title":"Phase 0: Branch proposal schema definition","description":"Define and document the branch proposal JSON schema with complete examples.\n\n## Acceptance Criteria\n- JSON schema file created with full specification (metadata, story context, branch content, provenance).\n- At least 10 example proposal JSONs demonstrating different narrative contexts.\n- Schema includes field descriptions, type constraints, and validation rules.\n- Schema validated against example proposals using a JSON schema validator.\n\n## Files to create/modify\n- history/m2-schemas/branch-proposal.json (schema definition)\n- history/m2-schemas/examples/ (example proposals)\n- docs/m2-design/schema-docs.md (documentation)\n","status":"closed","priority":1,"issue_type":"task","assignee":"@rgardler","created_at":"2026-01-16T10:20:35.533556391-08:00","created_by":"rgardler","updated_at":"2026-01-16T10:29:01.376570289-08:00","closed_at":"2026-01-16T10:29:01.376570289-08:00","close_reason":"Completed: Branch proposal schema with 10 examples and comprehensive documentation","dependencies":[{"issue_id":"ge-hch.5.4","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T10:20:35.536650238-08:00","created_by":"rgardler"}]} {"id":"ge-hch.5.5","title":"Phase 0: Validation pipeline design","description":"Design and prototype the validation pipeline with policy checks and sanitization transforms.\n\n## Acceptance Criteria\n- Policy ruleset defined with clear categories (profanity, theme consistency, length limits, narrative red lines).\n- Sanitization transforms documented (HTML stripping, whitespace normalization, encoding validation).\n- Validation report schema defined with pass/fail status and rule-level diagnostics.\n- Test corpus created: ~20 example proposals covering happy paths and edge cases.\n- Pipeline validates deterministically: same input + ruleset → same result.\n\n## Files to create/modify\n- history/m2-design/policy-ruleset.md (policy rules with rationale)\n- history/m2-design/sanitization-transforms.md (sanitization logic)\n- history/m2-schemas/validation-report.json (schema)\n- history/m2-design/test-cases.md (test corpus)\n","status":"closed","priority":1,"issue_type":"task","assignee":"@rgardler","created_at":"2026-01-16T10:20:37.499166616-08:00","created_by":"rgardler","updated_at":"2026-01-16T10:29:01.419511433-08:00","closed_at":"2026-01-16T10:29:01.419511433-08:00","close_reason":"Completed: Validation pipeline design with policy ruleset and sanitization transforms","dependencies":[{"issue_id":"ge-hch.5.5","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-16T10:20:37.500083559-08:00","created_by":"rgardler"}]} @@ -197,12 +203,13 @@ {"id":"ge-hch.6","title":"M3 — Basic staging (backgrounds & posed characters)","description":"M3 — Basic staging (backgrounds & posed characters)\\n\\nSupport simple staging features: background swaps, character pose changes, and simple animation cues triggered by story beats.\\n\\n## Success Criteria\\n- Story runtime can trigger background and character pose updates without breaking playback.\\n- Example assets and a small scene are included demonstrating staging cues.\\n- Integration document showing how story annotations map to staging events.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:16.971490472-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:39.924543818-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.6","depends_on_id":"ge-hch.5","type":"blocks","created_at":"2026-01-07T17:24:30.462242575-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.6","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.735750291-08:00","created_by":"rgardler"}]} {"id":"ge-hch.7","title":"M4 — Reactive simulated world & state model","description":"M4 — Reactive simulated world & state model\\n\\nIntroduce a lightweight world state model and adaptivity so the runtime can react to player actions while following a scripted arc.\\n\\n## Success Criteria\\n- A minimal world state representation exists and persists across sessions.\\n- Runtime demonstrates adaptive responses to player actions in one example story while maintaining authorial constraints.\\n- Documentation on world-state model and how story components read/update it.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:20.158267009-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:39.983697949-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.7","depends_on_id":"ge-hch.6","type":"blocks","created_at":"2026-01-07T17:24:30.548572825-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.7","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.800085111-08:00","created_by":"rgardler"}]} {"id":"ge-hch.8","title":"M5 — Systemic NPCs and narrative director (optional)","description":"M5 — Systemic NPCs and narrative director (optional)\\n\\nImplement NPC goals/memory and a simple narrative director that steers scenes toward author-defined arcs while allowing NPC autonomy.\\n\\n## Success Criteria\\n- NPCs have simple goal/memory state and influence world state.\\n- A basic director system can prioritize story beats while allowing NPC-driven events.\\n- Example scenario demonstrating NPC behavior affecting available story branches.","status":"open","priority":1,"issue_type":"epic","assignee":"Build","created_at":"2026-01-07T17:24:25.266277575-08:00","created_by":"rgardler","updated_at":"2026-01-07T23:47:40.030304585-08:00","labels":["milestone","stage:idea"],"dependencies":[{"issue_id":"ge-hch.8","depends_on_id":"ge-hch.7","type":"blocks","created_at":"2026-01-07T17:24:30.619103533-08:00","created_by":"rgardler"},{"issue_id":"ge-hch.8","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-18T18:22:34.860676631-08:00","created_by":"rgardler"}]} +{"id":"ge-hch.9","title":"Use custom setup for tests","description":"## Steps to Reproduce\n1. Run the Playwright e2e test `Director threshold slider updates stored settings` (tests/e2e/director.spec.ts).\n2. Observe intermittent failures when the player has changed the Director threshold slider prior to the test—test expects stored settings to match the default but the player's altered value persists.\n\n## Acceptance Criteria\n- The failing Playwright test is updated to load a deterministic test configuration or fixture so the game state (including player settings) is known at test start.\n- The test reliably passes on CI and locally even if a player previously changed the slider.\n- Any new test fixtures or helpers are committed and documented in the issue.\n\n## Suggested Implementation\n- Add a test fixture (e.g. `tests/fixtures/director_slider_test.json`) that sets player settings to known values.\n- Update the Playwright test setup to load the fixture before running the test (use existing test helper or add a new fixture loader).\n- If necessary, add a small helper in the game test code to reset stored settings during test runs.\n\n## Files/Paths To Modify\n- tests/e2e/director.spec.ts\n- tests/fixtures/director_slider_test.json (new)\n- (optional) src/test-utils/settings-fixture.ts\n\nP0\n","status":"open","priority":2,"issue_type":"bug","assignee":"@rgardler","owner":"ross@gardler.org","created_at":"2026-01-20T22:58:36.244950797-08:00","created_by":"Ross Gardler","updated_at":"2026-01-21T01:29:22.507525786-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-hch.9","depends_on_id":"ge-hch","type":"parent-child","created_at":"2026-01-20T22:58:36.248316778-08:00","created_by":"Ross Gardler"}]} {"id":"ge-k3p","title":"CI: Playwright E2E workflow","description":"Add GitHub Actions workflow to run Playwright E2E (demo) on PRs and main.\\n\\n## Scope\\n- CI job to install dependencies (npm ci) and Playwright browsers (npx playwright install).\\n- Run npm run test:unit and npm run test:demo (start-server-and-test) on linux runner.\\n- Upload Playwright artifacts (videos, traces, screenshots) on failure.\\n- Trigger on pull_request to main and push to main; allow workflow_dispatch.\\n- Keep runtime reasonable (consider single-project run on PR, full matrix optional on main).\\n\\n## Acceptance Criteria\\n- Workflow file exists in .github/workflows and runs successfully in CI.\\n- Playwright browsers installed via npx playwright install (with deps).\\n- npm run test:unit and npm run test:demo succeed in CI or fail the build.\\n- Artifacts (test-results) uploaded on failure for debugging.\\n","status":"closed","priority":1,"issue_type":"chore","created_at":"2026-01-07T00:02:19.895681457-08:00","created_by":"rgardler","updated_at":"2026-01-07T00:44:21.9279524-08:00","closed_at":"2026-01-07T00:44:21.9279524-08:00","close_reason":"Closed","comments":[{"id":11,"issue_id":"ge-k3p","author":"rgardler","text":"Added GitHub Actions workflow .github/workflows/playwright.yml: checkout, setup-node 20 with npm cache, npm ci, npx playwright install --with-deps, npm run test:unit, npm run test:demo, upload artifacts on failure. Local run: npm test (unit + demo) passing.","created_at":"2026-01-07T08:18:39Z"},{"id":12,"issue_id":"ge-k3p","author":"rgardler","text":"Opened PR https://github.com/TheWizardsCode/GEngine/pull/97 for Playwright CI workflow. Summary: checkout, setup-node 20 with npm cache, npm ci, npx playwright install --with-deps, npm run test:unit, npm run test:demo, upload artifacts on failure. Local: npm test passed.","created_at":"2026-01-07T08:19:11Z"},{"id":13,"issue_id":"ge-k3p","author":"rgardler","text":"Wrap-up by Ship (DevOps AI):\\n- Verified branch: ge-k3p/playwright-ci (tracked to origin).\\n- Ran unit tests: npm run test:unit (jest) -> PASS (7 tests).\\n- Did NOT run demo Playwright E2E locally (requires Playwright browsers / longer runtime); recommend running in CI (ge-ngf / ge-k3p acceptance criteria include npx playwright install).\\n- No files were modified in this session.\\n- No new beads created. Follow-ups: ensure GitHub Actions workflow (.github/workflows/playwright.yml) is added (see ge-ngf) and that CI runs 'npx playwright install' before tests.\\n- Commands run during wrap-up: git rev-parse --abbrev-ref HEAD; git status; npm run test:unit; bd ready; bd show (used earlier).\\nFiles touched: none.\\nNext steps for the next session: create or open PR for .github/workflows/playwright.yml (ge-k3p / ge-ngf), validate Playwright browsers install in CI, run demo E2E in CI and upload artifacts on failure.\\n","created_at":"2026-01-07T08:22:36Z"},{"id":15,"issue_id":"ge-k3p","author":"rgardler","text":"PR #97 merged; CI Playwright workflow landed. Cleaned git stashes (2 entries) after review to prevent stale beads DB. TODO resolved: follow-up ge-hbd remains open to monitor artifacts behavior.","created_at":"2026-01-07T08:33:33Z"}]} {"id":"ge-lwc","title":"fix(validate-story): ensure output directory exists before writing results","description":"Problem: CI validate-story job is failing because scripts/validate-story.js writes results to results/validate-story.json but does not ensure the parent directory exists. The workflow also assumes 'results' exists.\n\nGoal: Add a durable fix so the script ensures the output directory exists before writing, and add a defensive mkdir step in the validate-story workflow.\n\nAcceptance criteria (definition of done):\n- scripts/validate-story.js creates the parent directory of the output path before writing (using fs.mkdirSync(..., { recursive: true })).\n- .github/workflows/validate-story.yml contains an explicit step that runs before the script runs (belt-and-suspenders).\n- A branch is pushed (fix/validate-story-output) with the code+workflow changes and a PR opened (do NOT merge).\n- The PR includes a clear description and links back to this bead; CI runs and at least the validate-story step completes without ENOENT (we expect green or at least the ENOENT resolved).\n- A bd comment is added linking the created PR URL and any relevant CI run IDs.\n\nSuggested implementation notes:\n- In scripts/validate-story.js, before writeFileSync(outputPath, ...), compute .\n- In .github/workflows/validate-story.yml, add a step before running [\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/demo.ink\",\n \"pass\": true,\n \"steps\": 9,\n \"path\": [\n 1,\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n },\n {\n \"story\": \"/home/rgardler/projects/GEngine/web/stories/test.ink\",\n \"pass\": true,\n \"steps\": 4,\n \"path\": [\n 1\n ],\n \"rotationOpportunity\": true,\n \"exhausted\": false\n }\n]:\n - name: Prepare results dir\n run: mkdir -p results\n\nFiles to change:\n- scripts/validate-story.js\n- .github/workflows/validate-story.yml\n\nAssign to: @ship (Ship agent) — please implement the changes in a branch and open a PR; do not merge.\n,--json:true}","status":"closed","priority":1,"issue_type":"bug","assignee":"@ship","created_at":"2026-01-14T01:04:45.200206158-08:00","created_by":"rgardler","updated_at":"2026-01-14T01:14:00.277633008-08:00","closed_at":"2026-01-14T01:14:00.277633008-08:00","close_reason":"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/134)","dependencies":[{"issue_id":"ge-lwc","depends_on_id":"ge-hch.3.4.3","type":"discovered-from","created_at":"2026-01-14T01:04:45.210561869-08:00","created_by":"rgardler"}],"comments":[{"id":102,"issue_id":"ge-lwc","author":"rgardler","text":"Delegating implementation to @ship.\n\nTask: implement durable fix for validate-story output directory and add defensive mkdir step in workflow.\n\nBranch: fix/validate-story-output\nFiles to change:\n- scripts/validate-story.js (ensure parent directory of output file exists before write)\n- .github/workflows/validate-story.yml (add step: mkdir -p results before running script)\n\nAcceptance criteria (DO NOT MERGE PR):\n- scripts/validate-story.js calls fs.mkdirSync(path.dirname(outputPath), { recursive: true }) before writing output\n- The workflow includes a step that prepares results dir (mkdir -p results)\n- Branch pushed: fix/validate-story-output\n- PR opened with title: \"fix(validate-story): ensure output directory exists before writing results\" and body referencing this bead (ge-lwc)\n- bd comment on ge-lwc updated with PR URL and any failing/related CI run IDs\n\nShip: please run local validation (node scripts/validate-story.js --glob \"web/stories/**/*.ink\" --output results/validate-story.json --max-steps 500 --clear-state) to verify the script writes results/validate-story.json. Run CI checks and add the resulting run IDs in a follow-up bd comment.\n\nConstraints:\n- Do not merge the PR. Open for review only.\n- Follow Git Safety Protocols in AGENTS.md. Create commits on a new branch and push.\n\nIf you need the PR body text, use this:\n\nTitle: fix(validate-story): ensure output directory exists before writing results\n\nBody:\n- Problem: validate-story script crashes in CI with ENOENT because the results/ directory doesn't exist.\n- Solution: create parent directory before writing in scripts/validate-story.js and add a defensive mkdir in the workflow.\n- Linked bead: ge-lwc\n","created_at":"2026-01-14T09:05:02Z"},{"id":103,"issue_id":"ge-lwc","author":"rgardler","text":"Opened PR https://github.com/TheWizardsCode/GEngine/pull/134 for fix(validate-story): ensure output directory exists before writing results","created_at":"2026-01-14T09:07:47Z"},{"id":104,"issue_id":"ge-lwc","author":"rgardler","text":"PR opened: https://github.com/TheWizardsCode/GEngine/pull/134\n\nWaiting for CI. Will add Actions run IDs and conclusions after runs complete.\n","created_at":"2026-01-14T09:08:07Z"},{"id":105,"issue_id":"ge-lwc","author":"rgardler","text":"Completed PR merged: https://github.com/TheWizardsCode/GEngine/pull/134\n\nMerge commit: 0d6744372b3a58534b16555bc43efa5e88ed8eb1\n\nFiles changed: scripts/validate-story.js, .github/workflows/validate-story.yml\n\nLocal verification: ran node scripts/validate-story.js -> results/validate-story.json created\n\nCI runs: validate-story Actions run (success) for merge commit 0d6744372b3a58534b16555bc43efa5e88ed8eb1: https://github.com/TheWizardsCode/GEngine/actions/runs/20988565602\n\nNotes: Close this bead as work completed by PR #134","created_at":"2026-01-14T09:12:08Z"},{"id":107,"issue_id":"ge-lwc","author":"rgardler","text":"Cleanup actions performed:\n- Verified PRs #133 and #134 merged and captured merge commit SHAs.\n- Added bd comments and closed beads: ge-lwc (closed), ge-2hh (closed).\n- Ran bd sync and exported .beads/issues.jsonl changes.\n- Committed .beads/issues.jsonl updates on branch fix/validate-story-output and pushed to origin.\n- Deleted local branch ge-2hh/commit-uncommitted; attempted to delete fix/validate-story-output but it is current worktree.\n\nCommands executed (in order):\n1) gh pr view 133 --json ...\n2) gh pr view 134 --json ...\n3) gh run list --repo TheWizardsCode/GEngine --json ...\n4) bd comments add ge-lwc -f /tmp/ge-lwc-comment.txt --actor @ship --json\n5) bd close ge-lwc --actor @ship --json --reason \"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/134)\"\n6) bd comments add ge-2hh -f /tmp/ge-2hh-comment.txt --actor @ship --json\n7) bd close ge-2hh --actor @ship --json --reason \"Completed — PR merged (https://github.com/TheWizardsCode/GEngine/pull/133)\"\n8) git fetch origin --prune\n9) git checkout main (blocked due to local .beads changes)\n10) git add .beads/issues.jsonl && git commit -m \"chore(bd): close beads for merged PRs #133,#134\"\n11) git push --set-upstream origin HEAD\n12) git branch -d ge-2hh/commit-uncommitted\n13) bd sync --json\n14) bd ready --json\n15) bd show ge-lwc --json\n16) bd show ge-2hh --json\n\nFiles changed:\n- .beads/issues.jsonl (exported comments and close reasons)\n\nPR URLs and merge SHAs:\n- PR 133: https://github.com/TheWizardsCode/GEngine/pull/133 (merged, sha: c81dd77059912a13c36020604ab1b95fa12c5616)\n- PR 134: https://github.com/TheWizardsCode/GEngine/pull/134 (merged, sha: 0d6744372b3a58534b16555bc43efa5e88ed8eb1)\n\nRemaining follow-ups:\n- Remove local results/ directory if it should not be kept (it is untracked).\n- If you want the local branch fix/validate-story-output removed, switch to another branch and delete it.\n- Confirm whether ge-hch.3.4.3 needs comment/closure (left open).\n","created_at":"2026-01-14T09:12:50Z"},{"id":109,"issue_id":"ge-lwc","author":"rgardler","text":"ge-lwc: Work completed — PR merged\n\nPR: https://github.com/TheWizardsCode/GEngine/pull/134\nMerge commit: 0d6744372b3a58534b16555bc43efa5e88ed8eb1\nFiles changed: scripts/validate-story.js, .github/workflows/validate-story.yml, .beads/issues.jsonl\nLocal verification: ran `node scripts/validate-story.js --glob \"web/stories/**/*.ink\" --output results/validate-story.json --max-steps 500 --clear-state` and confirmed results/validate-story.json created\nCI run: https://github.com/TheWizardsCode/GEngine/actions/runs/20988565602\nNotes: Added bd comment and closing this bead to reflect merged PR and CI verification.\n","created_at":"2026-01-14T09:13:58Z"}]} {"id":"ge-mud","title":"Make Ooda loop ouput fit the available screen width","status":"tombstone","priority":1,"issue_type":"task","assignee":"patch","created_at":"2026-01-16T22:21:19.755930775-08:00","created_by":"rgardler","updated_at":"2026-01-16T22:21:54.341660423-08:00","deleted_at":"2026-01-16T22:21:54.341660423-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"task"} {"id":"ge-ngf","title":"CI: Playwright E2E","description":"Add GitHub Actions workflow to run Playwright E2E tests.\\n\\nAcceptance criteria:\\n- Workflow file .github/workflows/playwright.yml runs on PRs and main.\\n- Workflow runs: npm ci, npx playwright install, npm test (demo e2e).\\n- On PR a job runs tests and reports status to PR.","status":"closed","priority":1,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-06T23:08:53.428619454-08:00","created_by":"rgardler","updated_at":"2026-01-07T02:20:17.470750673-08:00","closed_at":"2026-01-07T02:20:17.470750673-08:00","close_reason":"Closed"} {"id":"ge-nzz","title":"Make root README InkJS-only","description":"Remove Unity references from the root README.md and focus it on InkJS/web demo usage and tests.","status":"closed","priority":1,"issue_type":"task","created_at":"2026-01-06T15:12:16.621516991-08:00","created_by":"rgardler","updated_at":"2026-01-06T15:13:37.065401561-08:00","closed_at":"2026-01-06T15:13:37.065401561-08:00","close_reason":"Done"} -{"id":"ge-okh","title":"Add npm script + docs to run embedding integration test","description":"Add an npm script to run the real-model embedding integration test (EMBED_NODE=1). Include a short note in web/demo/README.md describing the script and how to run it locally.\\n\\nAcceptance criteria:\\n- package.json has script that runs: \\n- web/demo/README.md contains a 1-2 line note explaining the script and env flags\\n- Tests: running the script locally succeeds (developer responsibility)\\n\\nFiles to be changed: , ","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-17T20:47:17.395948499-08:00","created_by":"rgardler","updated_at":"2026-01-17T20:47:17.395948499-08:00","labels":["stage:idea"],"dependencies":[{"issue_id":"ge-okh","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-19T23:01:36.648476327-08:00","created_by":"Ross Gardler"}]} +{"id":"ge-okh","title":"Add npm script + docs to run embedding integration test","description":"Add an npm script to run the real-model embedding integration test (EMBED_NODE=1). Include a short note in web/demo/README.md describing the script and how to run it locally.\\n\\nAcceptance criteria:\\n- package.json has script that runs: \\n- web/demo/README.md contains a 1-2 line note explaining the script and env flags\\n- Tests: running the script locally succeeds (developer responsibility)\\n\\nFiles to be changed: , ","status":"in_progress","priority":2,"issue_type":"task","assignee":"@patch","created_at":"2026-01-17T20:47:17.395948499-08:00","created_by":"rgardler","updated_at":"2026-01-21T11:12:56.995431287-08:00","external_ref":"gh-185","labels":["stage:idea","stage:in_review"],"dependencies":[{"issue_id":"ge-okh","depends_on_id":"ge-hch.5","type":"parent-child","created_at":"2026-01-19T23:01:36.648476327-08:00","created_by":"Ross Gardler"}],"comments":[{"id":262,"issue_id":"ge-okh","author":"@patch","text":"Updated web/demo/README.md to document npm run test:integration:embedding and EMBED_NODE=1. Added a Node-only sharp stub in web/demo/js/embedding-service.js so embedding integration tests can run on linux/arm64 where sharp native binaries are missing. Local test: npm run test:integration:embedding (pass).","created_at":"2026-01-21T18:52:33Z"},{"id":263,"issue_id":"ge-okh","author":"@patch","text":"Created follow-up bead for runtime embedding integration: ge-hch.5.22 (Runtime: integrate embeddings into engine).","created_at":"2026-01-21T19:06:04Z"}]} {"id":"ge-oow","title":"Refactor: remove jq fallback for replay failure JSON","description":"### Goal\\nRemove the -based fallback in that synthesizes failure JSON from logs. The replay runner now writes structured JSON via ; the workflow should rely on that structured output instead of reconstructing it from logs.\\n\\n### Acceptance Criteria\\n- The workflow no longer runs to synthesize .\\n- The workflow copies or uploads the runner-produced (or a runner-produced failure file) into artifacts/results and archives it for failing runs.\\n- A CI run for the PR demonstrates a failing replay produces an uploaded visible in the job artifacts.\\n- Files touched are limited to (and any small adjustments to only if strictly necessary).\\n\\n### Suggested Implementation\\n1. Edit to remove the fallback block and instead rely on produced by the runner.\\n2. Ensure the workflow still copies raw logs and uploads & .\\n3. Run CI on a PR that intentionally fails a replay to confirm artifact presence.\\n\\n### Timebox\\nEstimate: 1-2 hours.\\n\\n### Notes\\n- Keep an eye on edge cases where runner result is missing; if this proves to happen, we may want a minimal guard that reports a clear error but does not attempt to reconstruct the JSON.\\n\\n### Related\\ndiscovered-from:ge-hch.4.3\\n","status":"closed","priority":3,"issue_type":"task","assignee":"rgardler","created_at":"2026-01-16T00:32:00.440882328-08:00","created_by":"rgardler","updated_at":"2026-01-16T01:38:44.850810587-08:00","closed_at":"2026-01-16T01:38:44.850810587-08:00","close_reason":"Completed: removed jq fallback; PR #151 merged","dependencies":[{"issue_id":"ge-oow","depends_on_id":"ge-hch.4.3","type":"discovered-from","created_at":"2026-01-16T00:32:00.453040701-08:00","created_by":"rgardler"}],"comments":[{"id":156,"issue_id":"ge-oow","author":"rgardler","text":"Created branch ge-oow/remove-jq-fallback and opened PR #151 to remove jq fallback; change uses printf to emit minimal failure JSON if runner result is missing. Marking as in_progress and assigned to rgardler.","created_at":"2026-01-16T09:34:53Z"},{"id":157,"issue_id":"ge-oow","author":"rgardler","text":"Merged PR #151: removed jq fallback and emit minimal failure JSON using printf. Verified replay artifacts show no failures for this change. Closing bead.","created_at":"2026-01-16T09:38:43Z"}]} {"id":"ge-osd","title":"Restore original demo story for smoke tests","status":"closed","priority":1,"issue_type":"bug","created_at":"2026-01-06T22:09:37.056596959-08:00","created_by":"rgardler","updated_at":"2026-01-06T22:10:00.371743266-08:00","closed_at":"2026-01-06T22:10:00.371743266-08:00","close_reason":"Done","comments":[{"id":1,"issue_id":"ge-osd","author":"rgardler","text":"Fixed smoke tests broken by demo story changes by adding web/stories/test.ink (pre-903f044 demo story) and routing /stories/demo.ink to that file in Playwright.\n\nChanges:\n- web/stories/test.ink\n- tests/demo.smoke.spec.ts\n\nCommands:\n- npm test","created_at":"2026-01-07T06:09:54Z"}]} {"id":"ge-qip","title":"Parent: Test parent/child relationship","description":"escription","status":"tombstone","priority":2,"issue_type":"epic","owner":"ross@gardler.org","created_at":"2026-01-19T18:38:38.077369615-08:00","created_by":"Ross Gardler","updated_at":"2026-01-19T18:41:54.055362933-08:00","deleted_at":"2026-01-19T18:41:54.055362933-08:00","deleted_by":"daemon","delete_reason":"delete","original_type":"epic"} diff --git a/web/demo/README.md b/web/demo/README.md index 232e472..6782c48 100644 --- a/web/demo/README.md +++ b/web/demo/README.md @@ -1,7 +1,3 @@ # Demo notes -Run the embedding integration test locally: - - npm run test:integration:embedding - -Set EMBED_NODE=1 to force Node fallback if needed. +Run `npm run test:integration:embedding` locally; set `EMBED_NODE=1` to force the Node fallback if needed. diff --git a/web/demo/js/embedding-service.js b/web/demo/js/embedding-service.js index 1f1750a..958541a 100644 --- a/web/demo/js/embedding-service.js +++ b/web/demo/js/embedding-service.js @@ -53,6 +53,46 @@ const NODE_FALLBACK_ENABLED = typeof process !== 'undefined' && process.env && ( let nodeExtractorPromise = null; let nodeExtractorError = null; +function createSharpStub() { + const stub = function sharpUnavailable() { + throw new Error('sharp unavailable'); + }; + stub.default = stub; + return stub; +} + +function withSharpStub(loadFn) { + if (typeof require !== 'function') { + return loadFn(); + } + let Module = null; + try { + Module = require('module'); + } catch (err) { + return loadFn(); + } + let sharpPath = null; + try { + sharpPath = require.resolve('sharp'); + } catch (err) { + return loadFn(); + } + const existing = require.cache[sharpPath]; + const stubModule = new Module(sharpPath); + stubModule.exports = createSharpStub(); + stubModule.loaded = true; + require.cache[sharpPath] = stubModule; + try { + return loadFn(); + } finally { + if (existing) { + require.cache[sharpPath] = existing; + } else { + delete require.cache[sharpPath]; + } + } +} + async function getNodeExtractor() { if (!NODE_FALLBACK_ENABLED) return null; if (!nodeExtractorPromise) { @@ -60,14 +100,14 @@ async function getNodeExtractor() { let mod = null; try { if (typeof require === 'function') { - mod = require('@xenova/transformers'); + mod = withSharpStub(() => require('@xenova/transformers')); } else { - mod = await import('@xenova/transformers'); + mod = await withSharpStub(() => import('@xenova/transformers')); } } catch (primaryErr) { // Fallback to dynamic import if require failed, or vice versa try { - mod = await import('@xenova/transformers'); + mod = await withSharpStub(() => import('@xenova/transformers')); } catch (importErr) { throw importErr || primaryErr; }