Builder Prompt
# Builder Prompt
Implement and maintain `oauth-router` as a Pi extension, not a separate service.
## Stack-specific instructions
- Extension entrypoint must remain `~/.pi/agent/extensions/oauth-router/index.ts`
- Register the provider with `pi.registerProvider(...)`
- Keep provider auth management extension-owned; do not depend on Pi’s single-provider OAuth slot for multi-account state
- Reuse Pi OAuth adapters from `@earendil-works/pi-ai/oauth` where possible
- Prefer Node built-ins over extra dependencies
- Keep secret storage and health state in separate files under `~/.pi/agent/oauth-router/`
## MUS priority order
1. Provider registration and auto-load
2. Multi-account credential store and commands
3. Routing policy with health awareness
4. Safe failover before meaningful output
5. Observability and docs
## Special considerations
- Never log access or refresh tokens
- Do not attempt unsafe mid-stream account switching
- Treat `openai-codex` OAuth reuse as an adapter, not proof that generic OpenAI-compatible OAuth is solved
- Update `docs/issues/FR-XXX.md` when scope or behavior changes materiallywhen to use it
Community prompt sourced from the open-source GitHub repo J-StaR-Films-Studios/VibeCode-Protocol-Suite (no explicit license). A "Builder Prompt" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
J-StaR-Films-Studios/VibeCode-Protocol-Suite · no explicit license
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar