Skip to content

docs: refresh demo GIF with a real cognit-generated quiz (high-res) - #21

Merged
jonasbrami merged 1 commit into
mainfrom
docs/refresh-demo-gif
May 24, 2026
Merged

docs: refresh demo GIF with a real cognit-generated quiz (high-res)#21
jonasbrami merged 1 commit into
mainfrom
docs/refresh-demo-gif

Conversation

@jonasbrami

Copy link
Copy Markdown
Owner

What

Replaces the README demo GIF. The old one played a hand-authored stand-in quiz; this one plays a quiz cognit actually generated — captured by running the live engine against a real PR (#20, the retry-with-backoff change). So the GIF now shows genuine, model-authored questions, including a real before/after mermaid flow comparison of the retry exception path (pick the flowchart that matches _draft_with_retry; the distractors vary the branch condition and the notify/sleep order).

The content is real; playback stays offline and deterministic.

How

  • scripts/capture_demo_quiz.py (new) — runs the real generation engine (ClaudeAgentLLM → the claude binary) against a PR and records the generated quiz + activity feed into scripts/demo_data/.
  • scripts/record_demo.py — replays the captured quiz/feed. The Playwright driver is now data-driven: it computes and clicks the correct answer for each question from the quiz itself, so it adapts to whatever question mix/order the model produced (no hard-coded option indices).
  • Higher resolution — Playwright records at the CSS-viewport resolution (device_scale_factor and an oversized record size don't add pixels — they pad). So the viewport is bumped to 1440×900 and the GIF is emitted 1:1 at 1440px / 16fps, no downscale softening (was a 1000px downscale).
  • scripts/demo_data/{quiz.json,feed.json} (new) — the captured artifacts, committed so re-recording after a UI change needs no Claude call.
  • README alt-text updated to match (five questions: three MCQ, a mermaid-pick flow diagram, true/false).

Note

Depends on nothing in #20 at runtime — the captured quiz is static JSON — but the questions are about #20's diff, so the two read best together.

🤖 Generated with Claude Code

The old demo used a hand-authored stand-in quiz. This replaces it with a quiz
cognit actually generated — captured by running the live engine against a real
PR (#20, the retry-with-backoff change) — so the GIF shows genuine,
model-authored questions, including a true before/after mermaid flow comparison
of the retry exception path.

- `scripts/capture_demo_quiz.py`: runs the real generation engine against a PR
  and records the generated quiz + activity feed into `scripts/demo_data/`.
- `scripts/record_demo.py`: replays the captured quiz and feed. The Playwright
  driver is now data-driven — it computes and clicks the correct answer for each
  question from the quiz itself, so it adapts to whatever mix/order the model
  produced (no hard-coded option indices). Recording is higher resolution:
  Playwright records at the CSS-viewport resolution (device_scale_factor and an
  oversized record size don't add pixels), so the viewport is bumped to 1440x900
  and the GIF is emitted 1:1 at 1440px, 16fps — no downscale softening.
- `scripts/demo_data/{quiz.json,feed.json}`: the captured artifacts, so the demo
  stays offline and deterministic on re-record while the content is genuine.
- README alt-text updated to match (five questions: three MCQ, a mermaid-pick
  flow diagram, true/false).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jonasbrami
jonasbrami merged commit 9490bf5 into main May 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant