feat(ci): centralize easter-egg keywords single source of truth (closes #6)#43
Conversation
#6) Makes docs/easter-eggs.md the authoritative keyword list for all runtime and CI consumers. Prevents the silent drift that made this issue P1. ### docs/easter-eggs.md Added a "Canonical Keyword List" section with a fenced ```keywords block containing one keyword per line. Parsers look for this exact block fence. ### scripts/check-easter-eggs.sh (NEW) Fails if any keyword from the canonical block is absent from every v1-modern/src/scripts/*.narrat file. Can be run locally as a pre-commit check or remotely in CI. ### .github/workflows/easter-eggs.yml (NEW) CI workflow that runs the check on PR + main push whenever narrat scripts, easter-eggs.md, the check script, or the workflow itself change. No untrusted input is interpolated into run: commands. ### scripts/handoff/playtest.sh Phase 7 (keyword presence) now reads the keyword list from docs/easter-eggs.md at runtime via the EASTER_EGG_KEYWORDS env var instead of a hard-coded 6-element array. The threshold scales with list size (max(3, floor(N/3))) so the check remains meaningful as new keywords are added. ### HANDOVER.md Replaced the duplicate 15-keyword list with a one-line pointer to docs/easter-eggs.md. Single source of truth contract. ### Verification - scripts/check-easter-eggs.sh → OK, all 15 keywords present - playtest.sh awk extraction returns the full comma-separated list - bash -n scripts/handoff/playtest.sh → syntax OK Closes #6 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
✅ Deploy Preview for p-n-k-forever ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ecfc36bd2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| missing=() | ||
| while IFS= read -r kw; do | ||
| [[ -z "$kw" ]] && continue | ||
| if ! grep -l -- "$kw" "$NARRAT_DIR"/*.narrat >/dev/null 2>&1; then |
There was a problem hiding this comment.
Match canonical keywords literally in CI scan
The new CI check uses grep -l -- "$kw", which treats each keyword as a regex and matches substrings, so the guard can pass even when the canonical token is no longer present verbatim (for example, TEA matching inside another word, or future keywords with regex metacharacters like ./+). That weakens the single-source-of-truth contract because removing a real easter-egg token may not fail this workflow.
Useful? React with 👍 / 👎.
Replays the 2026-04-20 producer sequence cleanly on top of current main, which had absorbed 10+ PRs while #39 was in flight. **Infrastructure (9 files, additive):** - .claude/agents/game-producer.md — coordinator sub-agent - .claude/backlog/BACKLOG.md — single-source-of-truth backlog - .claude/docs/remembered-moments.md — Engineer-the-Moments audit - .claude/reviews/ambient-texture-audit-2026-04-20.md — NITW-lens audit - .claude/reviews/landing-the-ending-2026-04-20.md — landing review - .claude/test-reports/2026-04-20*.md + 2026-04-22-integrated-shipgate.md **Narrative polish (2 files, 6 edits):** - game.narrat:beach_rest_look — "napkin pinned by a seashell" ambient detail - japan.narrat — har gow callback, "I noticed you before you noticed me", Sunday-mornings ritual, expanded necklace gift (4 lines), fly_home bridge, home_scene trimmed so "For Anastasia. Forever." is terminal. **Dropped during integration:** kitchen Hub A/B split (superseded by main's PR #42 top-guard), sunset.narrat keyword registry (superseded by main's PR #43 CI check), README rewrite (stale, filed in backlog). Ship-gate: SHIP verdict on 2026-04-22 against integrated tree — all 10 acceptance criteria PASS, zero self-jumps, sacred line preserved. Replaces #39. Closes the producer-sequence milestone. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Summary
Makes `docs/easter-eggs.md` the single source of truth for all easter-egg keyword consumers (runtime playtest, CI check, HANDOVER reference). Closes the silent-drift risk that made issue #6 P1.
What changed
How the contract works
Acceptance criteria (from issue #6)
Verification
```
$ ./scripts/check-easter-eggs.sh
OK: all 15 easter-egg keywords present in at least one narrat script
$ bash -n scripts/handoff/playtest.sh
(exits 0)
```
Security note
The new workflow does not interpolate any `github.event.*` into `run:` steps — it only invokes a checked-in script with no untrusted input. Per `~/.claude/rules/` guidance on GHA safety.
Plan reference
Phase 3 step B of the open-PR/issue plan. With this merged, zero P0/P1 `release-gap` issues will remain — Phase-3 gate closed, ready for release cut.
Closes #6
🤖 Generated with Claude Code