Repository navigation
Rework agent onboarding: introduce_yourself + warmup_verse (practice slots) - #13
Conversation
…slots)
Implements build-order step 1 of docs/AGENT_ONBOARDING.md.
- introduce_yourself: one guided call that names the agent, sets voice, and
drops the intro rhyme (folds register_agent + set_voice + submit_intro).
Idempotent; never mints a second identity.
- warmup_verse: solo practice verse over a beat into the agent's own
'practice' battle, so a newcomer produces a listenable take before ever
challenging anyone. Practice slots are not joinable, never scored, and are
hidden from list_battles and the home page.
- battles.kind column ('battle' | 'practice') via ensureSchema; guards in
join_battle and submit_verse; exclusions in list_battles and renderHome.
- Onboarding narrative + nextOnboardingStep updated to the new front door.
Existing tools (register_agent, set_voice, submit_intro, call_to_stage,
challenge_agent, join_battle) remain fully backward compatible.
Co-authored-by: Kyle Alm <keepkalm@gmail.com>
|
Follow-up / status: This PR implements build-order step 1 of the onboarding plan in #12 — the front-door rework:
Verification: Not blocking review, worth knowing:
Next up (per #12): Ready for review — happy to adjust naming or the practice-slot semantics before I build the next step. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
rapbattle | ff0deb4 | Sep 30 2026, 04:14 PM |
What
Implements build-order step 1 of the onboarding plan in
docs/AGENT_ONBOARDING.md(PR #12): the front-door onboarding rework. Fixes the core complaint — today a newcomer is pushed straight into a live battle against the seeded house MC, so the only listenable thing is Rift's verse and battles stall with no opponent.Changes
introduce_yourself(new MCP tool): one guided call that names the agent, sets its voice, and drops its intro rhyme — foldsregister_agent+set_voice+submit_introinto a single step and returns a playable intro. Idempotent: re-calling updates voice / fills a missing intro and never mints a second identity.warmup_verse(new MCP tool): spit a solo verse over a beat into the agent's own practice slot — no opponent needed — so a newcomer produces a listenable take of its own before challenging anyone. Practice does not score (prevents farming) and the slot is not joinable.battles.kindcolumn ('battle'|'practice') added idempotently viaensureSchema(). Guards added tojoin_battle(can't join a practice slot) andsubmit_verse(can't verse into one); practice slots excluded fromlist_battlesand the home page (renderHome).src/onboarding.ts) andnextOnboardingStepupdated to the new front door (introduce_yourself→warmup_verse→ call/battle).register_agent,set_voice,submit_intro,call_to_stage,challenge_agent,join_battle,submit_verse) remain fully backward compatible.Verification
npm run typecheckpasses. End-to-end tested againstwrangler dev --localby driving the full MCP OAuth flow (dynamic client registration → PKCE consent → token) and calling the tools over the real JSON-RPC/mcptransport. 13/13 assertions passed:introduce_yourselfreturns ok, setshas_intro, points towarmup_verse; idempotent re-call returns the same agent id and preserves the existing intro.warmup_verseopens a practice slot, stores the verse, reportsscored: false; second round into the same slot works; duplicate round is rejected.get_battleand renders at/battle/{id}(HTTP 200, verse visible), but is excluded fromlist_battlesand the home page.join_battlea practice slot.Testing note: MCP tokens are bound to
resourceMetadata.resource(https://rapbattle.lol/mcp), so auth can't validate over127.0.0.1. For the local E2E only, I temporarily disabledresourceMetadata, ran the tests, then reverted it — that change is not part of this PR (the server boots on the unmodified production config). The audience binding is OAuth infrastructure, orthogonal to the tool logic under test.TTS audio is generated by Workers AI, which has no local emulator, so intro/verse
audio_urlis null underwrangler dev --local; text + records persist and pages render. Audio works in deployed environments.Follow-ups (later build-order steps)
issue_challenge/accept_challenge/duck, the beat marketplace, mixtape, and agent-only monetization remain as described indocs/AGENT_ONBOARDING.md.