Skip to content

feat: add the Vibe Coding Mad Libs challenge - #11

Merged
theycallmeswift merged 7 commits into
mainfrom
claude/issue-6-vibe-coding-mad-libs
Oct 16, 2026
Merged

theycallmeswift merged 7 commits into
mainfrom
claude/issue-6-vibe-coding-mad-libs

Conversation

@theycallmeswift

@theycallmeswift theycallmeswift commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds vibe-coding-mad-libs/, a 10-minute terminal challenge. The participant fills four Mad Libs blanks in a Pi extension form. Pi builds a self-contained index.html served on http://127.0.0.1:4321/, offers it through show_preview, then makes one change the participant asks for.

Closes #6

  • The form: mad-libs.mjs is declared in plugin.json under pi_extensions.
    • It opens after Pi's welcome, and /mad-libs reopens it.
    • Typing the sentence by hand still works. The extension steps in only when a typed sentence still holds a bracketed blank.
  • Pinned Pi packages: install runs npm ci into the package. The lock pins @earendil-works/pi-coding-agent and its @earendil-works/* siblings at 1.0.4 through overrides. Without that, ^1.0.4 resolves the siblings to 1.3.0, and pi-coding-agent 1.0.4's index fails to load.
  • The preview server: preview.mjs runs the server in setup's process group and reports readiness over IPC.
    • setup exits once the server answers, and fails when the port is busy.
    • cleanup stops the server with a token kept in the workspace, so it never stops a listener it didn't start.
    • The page is served under a CSP that blocks network requests and external assets, and it live-reloads.
    • The server refuses a symlinked or hard-linked index.html.

Decide

  • Lint fix shared with Ship the hello-world challenge #5 and Ship the BirdsBirdBirds challenge #7. .markdownlint-cli2.jsonc ignores */intro.md, because the challenge spec bars a title there and MD041 requires one. All three PRs carry the same hunk, so they merge cleanly. Recommend: keep it.

  • The install test uses the network. It is the only test that does, and only to reach the npm registry, as the issue allows. Three places still contradict it:

    • AGENTS.md: "Tests run offline, with no model calls and no credentials".
    • docs/style/testing.md: its offline rule.
    • docs/style/testing.md: "A test that needs a package's dependencies uses a fixture that has none".

    All three are outside this PR's Owns. Recommend: the orchestrator's follow-up root PR adds the exception to AGENTS.md and testing.md, alongside the README challenge index.

  • The npm run verify line. It prints ok <absolute path>/vibe-coding-mad-libs; that format comes from tools/verify.mjs. Recommend: accept it as is.

Ready gate

Step Evidence
Tests and lint npm run verify: ok …/vibe-coding-mad-libs. npm test: 81 pass, 0 fail, 0 skipped. npm run lint: 0 issues. No preview.mjs serve process is left after the run. CI is green on 880a27f: run 38817446862. ✅
Red run Before the fix, isFinishedPrompt rejected the no-period and "!" sentences; the new cases cover them. The vowel-article test fails against the original prompt.mjs. The busy-port and crash-cleanup tests check that the other listener still answers. ✅
Sibling sweep n/a: a new package. The only shared code it touches is the lint ignore. ✅
Docs and specs Added vibe-coding-mad-libs/README.md with the standalone run. The root README index, AGENTS.md, and testing.md are left to the orchestrator (see Decide). ✅
Standalone run Pi 1.0.4 on google/gemini-3.8-flash with the real GEMINI_API_KEY, running setup and cleanup by hand. Details below. ✅
Editorial pass Reread against docs/style/. Cut the form's key list from the skill, since the form shows its keys, and dropped the token status handshake. ✅
Skipped tests None. ✅
Secrets, permissions No secrets. The preview token is random for each run and stored in the workspace with mode 600. ✅

Standalone run:

  • After the welcome, the form opened. Build was refused while Style was blank.
  • The filled sentence was "Build a game about Space & Astronomy for Lighthouse keepers in Retro 80s Synthwave style."
  • Pi built a working beacon game labeled "SIMULATION: SAMPLE DATA". It rendered in Chromium with no script errors and no external requests.
  • Pi gave the URL, since show_preview is missing outside boothstrap.
  • Pi acknowledged build-app only after confirmation.
  • The revision added an "ALL CLEAR" banner and changed index.html; Pi acknowledged improve-app after confirmation.
  • cleanup stopped the server.
  • The playthrough ran before this round's review fixes.

🤖 Generated with Claude Code

https://claude.ai/code/session_018Q8wNEF5bh6UMEZ94TdGLD

@theycallmeswift theycallmeswift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Independent review of ebea405 against issue #6, the challenge spec, boothstrap's base skill and authoring guide, and docs/style/, with a live smoke test of the preview server.

Verdict: changes needed. One blocking item (the typed-sentence fallback rejects a sentence without a trailing period) and five nits. The owner wants nits addressed too, so please take all six.

Checked: npm run verify ok, npm test 68/68, npm run lint 0 issues, no conflict with main, CI run 38815924636 green on this head. Smoke test: a busy port fails setup with a clear message and leaves the other listener alone; on a free port setup exits while the server keeps running in its own process group, bound only to 127.0.0.1; path traversal, encoded variants, the state file, and dice-sheet.md all 404 with no directory listing; a foreign Host gets 403; /__stop without the token gets 403; the state file is mode 600; cleanup twice exits 0 and leaves nothing listening. The lockfile resolves every entry to registry.npmjs.org with integrity hashes and pins all eight @earendil-works/* packages at 1.0.4; the overrides claim holds, since without them the siblings land on 1.3.0 and Pi 1.0.4's index fails to import. The extension API use matches the 1.0.4 typings.

Decide items: 1 (shared intro ignore) and 3 (verify prints the path) are sound. 2 (network install test) is sound but incomplete; see the inline comment on the test.


Generated by Claude Code

Comment thread vibe-coding-mad-libs/mad-libs.mjs Resolved
Comment thread vibe-coding-mad-libs/preview.mjs Resolved
Comment thread vibe-coding-mad-libs/preview.mjs Resolved
Comment thread vibe-coding-mad-libs/preview.mjs Resolved
Comment thread vibe-coding-mad-libs/intro.md Resolved
Comment thread test/vibe-coding-mad-libs.test.mjs Resolved
@theycallmeswift
theycallmeswift marked this pull request as ready for review October 15, 2026 22:30
@theycallmeswift theycallmeswift self-assigned this Oct 15, 2026
@theycallmeswift
theycallmeswift merged commit a967a8d into main Oct 16, 2026
1 check 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.

Ship the Vibe Coding Mad Libs challenge

2 participants