How AI fits my workflow
Where agents speed me up, and the parts I never hand off. The same eight steps on every project.
- 01
Spec
Spec before prompt
Requirements, constraints and acceptance criteria come first. An agent with a vague brief ships vague code.
Me - 02
Architecture
System design & data model
Boundaries, schemas and trade-offs. AI is a sparring partner here, never the architect.
Me · AI assists - 03
Context
Context engineering
Repo conventions, CLAUDE.md files and MCP servers, so agents know the patterns before they write a line.
Me - 04
Scaffolding
Boilerplate & repetitive code
CRUD, migrations, types, UI variants. The repetitive half of the job, handed off.
AI drafts - 05
Review
Line-by-line review
Every diff is read before it merges. I never commit code I can't explain.
Me - 06
Testing
Tests before trust
I define what correct means; agents help draft the edge cases. Proof over promises.
Me · AI assists - 07
Debugging
Root cause, not patches
AI proposes fixes; I trace the cause. A green test on the wrong fix is still wrong.
Me · AI assists - 08
Shipping
Gated, reversible releases
Types, lint, tests and evals gate every merge. Small PRs, easy rollbacks, nothing shipped on vibes.
Me
What I catch before it ships
AI writes clean-looking code that's wrong in predictable ways. A representative review of an agent's diff, the same pass every change gets.
feat: export invoice as PDF
+17 · agent-authored
import { Router } from 'express';- 2
import { generatePdf } from 'express-pdf-export'; import { db } from '../db';export const invoices = Router();- 1
invoices.get('/invoices/:id/export', async (req, res) => { const invoice = await db.invoice.findUnique({ where: { id: req.params.id } });const items = [];for (const lineId of invoice.lineIds) {- 3
items.push(await db.lineItem.findUnique({ where: { id: lineId } })); }try {const pdf = await generatePdf({ invoice, items });res.type('application/pdf').send(pdf);- 4
} catch {} });
Review · 4 findings
Security · line 7
No auth or ownership check, so any signed-in user can export anyone's invoice.
Fix: Added requireAuth and a 404 unless invoice.userId matches.
Supply chain · line 2
express-pdf-export doesn't exist on npm. It's a hallucinated package waiting to be squatted.
Fix: Switched to our existing PDF service.
Performance · line 11
One query per line item: 200 items, 200 round-trips.
Fix: Replaced with a single findMany({ id: { in: lineIds } }).
Reliability · line 16
Errors are swallowed, so the request hangs with no response.
Fix: Log, return 500, and a test now covers the failure path.
Before approve
- Auth & permissions
- Dependencies exist & pinned
- Queries & performance
- Error paths handled
- Tests cover the edge cases
- Could I explain every line?
4 flagged · 4 fixed before merge
Representative example: the pattern, not client code
I built the guardrails myself
Phurti is my open-source workflow kit for coding agents. Most of the rules on this page aren't promises. They're code that stops the agent when it cuts a corner.
Built by me · MIT
Phurtiफुर्ती · agility
A portable senior-engineer workflow for AI coding agents: one ruleset, installed once, working across Claude Code, Codex, Copilot and Antigravity.
- Skills
- 5
- Review agents
- 6
- Hooks
- 4
- Agents supported
- 4
Install
git clone https://github.com/Tushar-Bhowal/Phurti.git phurti && cd phurti && bash install.sh- # agent tries to turn a red test green
- Edit tests/invoices.test.ts
- - expect(res.status).toBe(404);
- ✗ BLOCKED protect-tests · exit 2
- Assertion removed from a test. Fix the code under test instead.
- → agent adds the missing ownership check
- ✓ tests pass · assertion kept
- # agent tries to sign the commit
- Bash git commit -m "feat: export invoices" -m "Generated with …"
- ✗ BLOCKED block-ai-attribution · exit 2
- AI attribution in the message. Rewrite it like an engineer would.
- ✓ committed feat: export invoices as PDF
- # next morning, fresh session
- SessionStart session-status
- branch main · last commit feat: export invoices as PDF
- ✓ resumed from .claude/handoff.md, no context re-pasted
Illustrative replay of the real hooks
- 01Advisory
Rules
One AGENTS.md, generated into adapters for every agent. Ask instead of guessing, no hardcoded secrets, build only what's needed.
- AGENTS.md
- build-adapters.sh
- 02Workflow
Skills
Senior-engineer workflows on demand: design before code, reproduce before fixing, prove it works before stopping.
- /phurti-architect
- /phurti-feature
- /phurti-fix
- /phurti-audit
- /phurti-memory
- 03Review
Review agents
Six read-only reviewers that inspect a diff but can't edit it, each returning a prioritized list with file:line.
- frontend
- backend
- db
- test
- deploy
- ai
- 04Enforced
Hooks
Deterministic scripts that block the action outright with exit 2. The agent can't talk its way past them.
- protect-tests
- block-ai-attribution
- session-status
- pre-compact
Honest limitsHooks enforce on Claude Code and Codex; on other agents the rules are advisory. The test tripwire is a heuristic and can flag a legitimate refactor, so I tune it as I use it.
Where I draw the line
Agents are fast. Accountability isn't something you can delegate, so these stay mine.
AI does
I do
Writes the boilerplate
Designs the system
Drafts the tests
Defines what correct means
Suggests a fix
Finds the root cause
Explores options fast
Makes the trade-off
Moves at machine speed
Takes responsibility for what ships
Never handed to an agent
- Auth & permissions
- Payments
- Secrets
- Data migrations
- Architecture
The AI stack, and what each is for
Chosen for the job, not the hype. Each one earns its place in the loop, and none of them merges code.
Claude Code
Agentic, multi-file builds
Cursor
In-editor edits & refactors
Codex
Parallel background tasks
MCP
Wires agents to Figma, GitHub, docs
GitHub
PRs, CI gates, review
Figma
UI references and inspiration
