AI-Assisted Development Playbook
How We Ship Faster Without Breaking Things
Purpose
This document defines how we use AI as a force multiplier in this codebase.
This is not about autocomplete.
This is about architecture, cross-stack changes, and correctness.
When used correctly, this workflow allows a single developer to safely ship work that would normally require multiple engineers and weeks of coordination.
Core Principle
AI is a senior engineer you pair with — not a code generator.
We use AI to:
- reason about architecture
- explain trade-offs
- implement changes across layers
- review diffs for regressions
We do not:
- blindly paste large rewrites
- accept code we don’t understand
- skip validation
The Two-AI Model (Standard)
For non-trivial work, we use two independent AIs.
Primary AI — Builder
- Holds large context
- Designs architecture
- Writes production code
- Implements changes across files and languages
Secondary AI — Validator
- Reviews diffs
- Finds regressions
- Catches missing arguments and edge cases
- Challenges assumptions
This dual loop catches issues that single-AI or IDE-only workflows miss.
Tooling Setup (5 Minutes)
Required:
- Claude Pro (primary builder)
- ChatGPT Plus (secondary reviewer)
- Any editor (VSCode is fine)
No IDE plugins are required.
Suggested layout:
┌──────────────────────┬──────────────┐
│ Claude (Browser) │ Editor │
│ │ │
└──────────────────────┴──────────────┘
The 5 Core Moves
1. Load Context First (Mandatory)
AI output quality is directly proportional to context quality.
Bad
Add signing support
Good
Here is our current signing flow:
[paste QSignManager.m]
[paste QBridgePlugin+Security.swift]
I want to add multi-key support.
Explain the approach before writing code.
Guidelines
- Small change: 1–2 files
- Medium change: 3–4 files
- Cross-stack change: paste the full module
If unsure, paste more, not less.
2. Ask for Explanation Before Code
Never jump straight to implementation.
Always ask:
- What are the options?
- What breaks?
- What assumptions exist?
- What is backward-compatible?
If you can’t explain the change, don’t ship it.
3. Surgical Edits Only
We prefer minimal, targeted changes.
Bad
Refactor this file
Good
Show me exactly what lines to add or change.
Do not rewrite the file.
Acceptable AI output:
// Add this method declaration to QSignManager.h
+ (void)getPublicKey:(NSString *)tag
withCallback:(void (^)(NSDictionary *result, NSString *error))callback;
Avoid:
- whole-file rewrites
- formatting-only diffs
- speculative cleanup
4. Mandatory Diff Review (Non-Negotiable)
After AI writes code:
- Copy the entire diff
- Paste it into the secondary AI
- Ask explicitly:
Review this diff for:
- regressions
- behavior changes
- backward compatibility issues
- missing arguments
- security issues
If issues are found:
- send feedback to the primary AI
- re-review the fix
Nothing ships without a diff review.
5. Red-Team the Result
Before committing, ask AI to attack the change:
Assume a hostile user or bad input.
What breaks?
What edge cases exist?
What assumptions are unsafe?
This step catches:
- race conditions
- stale state
- permission bypasses
- incorrect defaults
Typical Workflows
Cross-Stack Feature (Swift → Obj-C → JS)
- Paste all affected files
- Ask for architecture & flow
- Decide on approach
- Let AI implement across layers
- Review diff in second AI
- Fix issues
- Ship
Bug Fix or Refactor
- Paste failing code and error output
- Ask AI why it fails
- Request minimal fix
- Review diff
- Ship
Quality Checklist (Before Commit)
- [ ] I understand the change
- [ ] The diff is minimal
- [ ] No existing APIs were broken
- [ ] Defaults preserve old behavior
- [ ] Errors fail safely
- [ ] Diff reviewed by second AI
- [ ] I can explain this to another developer
If any box is unchecked: do not commit yet.
Anti-Patterns (Do Not Do These)
-
Accept large rewrites -
Paste code you don’t understand -
Skip diff review -
Use a single AI for critical changes -
Trust autocomplete for architecture
Why This Works
- Full-context reasoning beats autocomplete
- Architecture decisions are explicit
- Independent validation catches subtle bugs
- Changes remain surgical and reviewable
- Velocity increases without sacrificing correctness
When You’re Stuck
- Switch AIs (builder ↔ validator)
- Add more context
- Ask for explanation, not code
- Break the task into smaller steps
- Ask another developer for a short sanity check
Final Note
This workflow is how we scale ourselves, not how we cut corners.
Speed is a side effect of:
- clarity
- discipline
- review
- understanding
Follow the process.
Velocity will come naturally.
Questions or improvements:
Add them to this wiki or raise them in the dev channel.