Agent Playbook
Use these as the universal setup prompt set for coding agents and human developers. The primary path is agent-first.
Primary setup command
--top-up value is a USD wallet recharge amount. The agent should show the approval URL to the human, wait for wallet recharge approval, then wire the returned DOCEX_API_KEY and DOCEX_BASE_URL into the server runtime.
Per-agent prompts
Codex
Claude Code
OpenCode / Cursor
Human quickstart
- Ask your coding agent to run
docex setup - Approve GitHub auth and a prepaid wallet recharge in the browser
- Let the agent add
DOCEX_API_KEYandDOCEX_BASE_URL - Call
run()with a file and prompt
Expected agent behavior
- Detect the package manager from lockfiles or project conventions
- Detect the app shape (Next.js App Router, Express, or unsupported)
- Install
docexdevwith the user’s package manager - Run
docex setup --use-case "<workflow>" --framework <auto|next|node> --top-up 5 --json - Show the browser approval URL to the human if setup is still pending
- Add
DOCEX_API_KEYandDOCEX_BASE_URLto server-side environment wiring - Create or update a thin shared Docex client wrapper
- Scaffold one server-side analysis entrypoint that accepts a file and prompt
- Tailor the prompt and output handling for the user’s vision use case
- Run a smoke analysis or explain the exact command to run once a fixture is provided
- Explain the exact files changed and how to test the integration
Constraints
- Prefer prompt-guided analysis by default
- Keep output normalized JSON unless the user explicitly asks for plain text
- Use server-side Docex calls only — do not expose
DOCEX_API_KEYto browsers - Treat the dashboard as approval, billing, usage, and debugging support, not the primary setup path
- Preserve existing project conventions where possible
- If the stack is unsupported, do not fake a full scaffold. Add the package, env guidance, and the smallest working integration point