Skip to content

feat(ci): centralize easter-egg keywords single source of truth (closes #6)#43

Merged
wildcard merged 1 commit into
mainfrom
claude/phase-3b-centralize-easter-eggs
Apr 21, 2026
Merged

feat(ci): centralize easter-egg keywords single source of truth (closes #6)#43
wildcard merged 1 commit into
mainfrom
claude/phase-3b-centralize-easter-eggs

Conversation

@wildcard

Copy link
Copy Markdown
Owner

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

File Change
`docs/easter-eggs.md` Added Canonical Keyword List section with fenced ```keywords block (15 keywords, one per line)
`scripts/check-easter-eggs.sh` (NEW) Parses the block, fails if any keyword is absent from every `v1-modern/src/scripts/*.narrat`
`.github/workflows/easter-eggs.yml` (NEW) Runs the check on PR + main push when narrat scripts or the keyword list change
`scripts/handoff/playtest.sh` Phase 7 now reads keywords from `docs/easter-eggs.md` at runtime via `EASTER_EGG_KEYWORDS` env var; threshold scales with list size
`HANDOVER.md` Replaced the duplicated 15-keyword list with a one-line pointer to `docs/easter-eggs.md`

How the contract works

  1. Authors edit the canonical list in `docs/easter-eggs.md` (inside the ```keywords fence).
  2. `scripts/check-easter-eggs.sh` parses the fence via `awk` on the ```keywords markers.
  3. CI runs that script on every relevant PR — fails if a listed keyword isn't found in any narrat script.
  4. `scripts/handoff/playtest.sh` reads the same fence at runtime to populate Phase 7's presence check.
  5. `HANDOVER.md` just points to the list; nowhere in the tree re-lists it.

Acceptance criteria (from issue #6)

  • Authoritative list in `docs/easter-eggs.md` (new Canonical Keyword List section)
  • `scripts/handoff/playtest.sh` reads it at runtime (no hard-coded array)
  • `HANDOVER.md` references but doesn't re-list
  • CI check fails if any listed keyword is absent from all narrat scripts

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

#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>
@netlify

netlify Bot commented Apr 21, 2026

Copy link
Copy Markdown

Deploy Preview for p-n-k-forever ready!

Name Link
🔨 Latest commit 2ecfc36
🔍 Latest deploy log https://app.netlify.com/projects/p-n-k-forever/deploys/69e7caee44af61000892831e
😎 Deploy Preview https://deploy-preview-43--p-n-k-forever.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel

vercel Bot commented Apr 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pnk-forever Ready Ready Preview, Comment Apr 21, 2026 7:07pm

Request Review

@wildcard
wildcard merged commit 915c1bb into main Apr 21, 2026
8 checks passed
@wildcard
wildcard deleted the claude/phase-3b-centralize-easter-eggs branch April 21, 2026 19:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

wildcard added a commit that referenced this pull request Apr 23, 2026
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>
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.

Centralize easter-egg keywords into single source of truth

1 participant