ACT 01
Ground it — from messy idea to project truth
$ phewsh
scanning your machine for AI tools…
✓ Claude Code ✓ Codex ✓ Gemini — supported adapters available
● 2 projects have shared truth (.intent/) · 3 likely candidates (git, no .intent yet)
$ cd ~/projects/auth-service && phewsh clarify
1/5 Purpose — the core reason this exists
> secure login for the mobile app, without the session mess we have now
…four more questions, a sentence each. Blank skips.
✓ .intent/vision.md — the north star (yours to edit; never overwritten)
✓ .intent/plan.md — the strategy
✓ .intent/next.md — what to do right now
Intent written. Project truth stays in these files.
ACT 02
Connect supported tools — same project files, separate adapters
$ phewsh claude
● .intent/ loaded — Claude Code opens with a verified project brief
# Project brief (from .intent/ — PHEWSH continuity layer)
Project: auth-service · Vision, Next, constraints, recent decisions…
$ phewsh ambient on
✓ removable native adapters installed for supported tools
$ codex
AGENTS.md reads the same .intent/ truth · the prior Claude transcript stays put
ACT 03
The handoff — switch agents mid-task
$ phewsh claude
working… refresh-token rotation, halfway through
⚠ Claude usage limit reached
/exit
● receipt written before any destination-tool output
$ phewsh codex
↻ pickup verified: .intent/ + Git state + saved brief unchanged
✓ not carried: chat · hidden reasoning · unrecorded decisions
Codex may begin from the verified brief; no Claude output was copied
ACT 04
The Ion room — many projects, one worker, manual claim
# Sam's machine — register each repo once, run one worker for all of them
$ cd ~/projects/auth-service && phewsh project add
$ phewsh serve
● worker online — 2 projects (auth-service, mobile-app) · this machine only
# web — phewsh.com/ion, the shared room
Neal requested "fix onboarding copy" → assigns Sam, suggests Claude Code
# Sam claims it — a human decision, never automatic
$ phewsh ion claim 9b3f --via claude-code
✓ claimed → isolated branch phewsh/9b3f-fix-onboarding-copy
…work happens in Claude Code, on the branch, with Sam's own logins…
✓ pull request opened — evidence attached
Ion: Approved by Neal → merged
● Record updated — supported adapters can read the accepted outcome from .intent/
ACT 05
Decision constraints — enforce only where Phewsh owns the call
Decision Gate — project: auth-service
Budget
$5.00
Time
10 hrs/wk
Skill level
Expert
Autonomy
Delegated
Provider budget checks apply to phewsh ai calls. Time, skill, and autonomy remain recorded constraints in supported tool briefs and policies.
ACT 06
Run model calls — pooled-provider spend increments
$ phewsh ai run -p phewsh "draft JWT auth middleware"
[phewsh gateway] project: p_a1b2c3 budget: $5.00
…reading .intent/vision.md + .intent/plan.md…
…streaming response…
✓ response complete
spend: $0.18 / $5.00 ░░░░░░░░░░░░░░░░░░░░ 3.6%
$ phewsh ai run -p phewsh "draft refresh token rotation"
[phewsh gateway] project: p_a1b2c3 budget: $5.00
…reading .intent/vision.md + .intent/plan.md…
…streaming response…
✓ response complete
spend: $3.94 / $5.00 ███████████████░░░░░ 78.8%
$ phewsh ai run -p phewsh "draft rate limiting for auth endpoints"
[phewsh gateway] project: p_a1b2c3 budget: $5.00
…reading .intent/vision.md + .intent/plan.md…
…streaming response…
ACT 07
Hard stop + continuity
✗ 402 budget_exhausted
$5.00 of $5.00 spent. Raise the Decision Gate budget at phewsh.com/intent.
# Switch to a local model — reload recorded project truth, not the prior response
$ phewsh ai run -p ollama "read .intent/ and suggest the next step"
[ollama — no gateway spend]
Context: .intent/vision.md + .intent/plan.md loaded
…streaming response…
✓ Next recorded task: finish refresh-token rotation.
The prior provider response was not included.
What just happened
Intent defined once
→
Supported adapters read the same project-owned record
Agent hit a wall mid-task
→
Receipt written first — Codex pickup re-checked the checkout
Work requested in the Ion room
→
Claimed by a human, shipped as a PR, recorded as truth
Budget declared
→
Pooled-provider calls checked the budget before inference
Hard-stop hit
→
Request stopped; project files remained available
Switched providers
→
The same .intent/ record loaded; prior provider output did not transfer
Now do it for real
Intent app
Set your intent now →
Define vision, plan, and constraints. Free to start.
Ion — for teams
Open the Ion room →
Request work in plain language — a teammate claims it (on their machine, with their logins), a PR comes back, the record updates.
CLI
Run it from your terminal →
Supports Claude Code, Codex, Cursor, Gemini, and more through explicit adapters. curl -fsSL phewsh.com/install.sh | sh