Let's not gatekeep around here. Share with me your most useful π¦ prompts. I'll go first. Merlin is my π¦'s name.
This full nightly QA job is for creative testing my website each night:
---
**Schedule:** Every night at 11:00 PM EST | **Model:** Claude Opus | **Timeout:** 1 hour
### Tooling Rules
- `write`/`edit` tools sandboxed to workspace β must use `exec` (shell commands) for all monorepo file operations
- Playwright headless Firefox available for UI testing when the plan calls for it
- Uses Merlin's real nostr identity for browser testing β no fake profiles unless multi-user testing requires it
### Delivery
Sends summary directly via `message` tool to Josh's pubkey on NIP-17
### Phase 1: Gather Context
1. Pull latest code
2. Read last 24 hours of commits + diffs
3. Check `memory/nightly-testing-log.md` for what's already been covered
4. Run existing test suite, fix any failures first
### Phase 2: Develop Tonight's Testing Plan
Stop and think before writing code. Consider:
- What changed today (targeted regression tests)
- What hasn't been tested recently (existing code needs exercise too)
- The full application surface area:
- **Public pages:** homepage, parks, discovery, booking flow, signup, cancellation
- **Operator management:** dashboard, setup wizard, site classes, pricing, layout, reservations, payments, email, policy, ops, reports, settings
- **Account:** profile, nostr identity, wallet, membership
- **APIs:** booking/*, webhooks/*, signup/*, email/*, admit/*, membership/*, lnurlp/*, username/*, sign-payload/*
- **Services:** reservation, park, cancellation, booking (pricing/bookability/equipment/vehicles/badges), emailer, invoice, paymentIntegration, parkLayout, availabilitySnapshot, legalDoc, quote, and more
- **Libraries:** nip98Auth, bookingMiddleware, bookingLock, sharedKeyStore, rateLimit, validators
- **Shared packages:** shared-types, shared-utils
- **Infrastructure:** NIP-144, NIP-52, NIP-44, nostr event signing
Pick 2-3 focus areas mixing today's changes, existing untested code, and optionally something creative. Write out the plan before coding.
**Testing approaches:** Unit tests, API endpoint tests, integration flows, security/adversarial, browser/UI (Playwright), code audits, regression tests
### Phase 3: Execute
- Write 15-30 quality tests per night
- Run full suite after changes
- **Bug handling:**
- Straightforward bugs (typo, wrong regex, missing null check, obvious off-by-one) β fix it, write a regression test, commit
- Complex bugs (tricky logic, architectural decisions, unclear intended behavior) β DO NOT fix. Document clearly: what's broken, where, impact, and ask Josh how to proceed
- Commit in logical chunks, push when done
### Phase 4: Log & Report
Update `memory/nightly-testing-log.md` with date, commits reviewed, testing plan rationale, tests added, bugs found/reported, coverage gaps, suggestions. Send summary via DM.
### Key Principles
- **Plan before you code** β a thoughtful plan beats random test generation
- **Rotate coverage** β the WHOLE app needs coverage over time, not just recent changes
- **Existing code matters** β most bugs live in code that's been there for weeks
- **Think like a user** β what would a park operator actually do? What would a guest mess up?
- **Think like an attacker** β what would someone trying to get a free booking do?
- **Fix simple bugs, report complex ones** β straightforward fixes are fine, anything involving complex logic or unclear intent needs human judgment
- **Keep the log updated** β future you needs to know what you already covered