Haiku Does the Impossible: Architectural Work at Fraction of Cost
October 25, 2025
Saturday morning, 9:42 AM. Chief of Staff establishes production branch strategy. Four days to alpha launch. Final infrastructure work ahead.
Time to try some new tooling, right? Perfect time to do Haiku 4.5 cost optimization testing.
For months, I had used Claude models for various roles to try to optimize cost efficiently:
- Opus 4.1: Strategy, R&D, complex architectural decisions ($15 input, $75 output per million tokens)
- Sonnet 4.0 and more recently 4.5: Implementation, coordination, most daily work ($3 input, $15 output)
- Haiku 4: never used this at all($0.25 input, $1.25 output)
But the new 4.5 Haiku model was out and Anthropic claimed it programs as well as Sonnet used. When Sonnet 4.5 came out a week or so ago it apparently became a much “better” programmer, able to do more nuanced analysis and planning that you might have asked Opus to tackle in the past.
In fact, I need to consider whether my next Chief Architect chat can be based on the Sonnet 4.5 model instead of Opus 4.1. I already worked with a Sonnet Chief by accident a while back and it seemed to do just fine.
It may even be that I don’t really need Opus much at all for this project, as I am not doing astrophysics here, you know.
But more to the point, if Haiku 4.5 can now program as well as Sonnet 4.0 could (who wrote most of my codebase) for a third of the cost, well then not only do I want to use Haiku as much as possible, but I’ll want Piper Morgan to do so as well (and to generally be savvy about surfing the model/cost gradient efficiently over time).
Testing a new model
Then October 24, the Chief Architect offered a few options for a test protocol. We agreed that getting the work done was the highest priority, and that a test did not need to be scientifically redundant to give us useful insights.
We agreed: Use Haiku on real Sprint A8 work. STOP conditions for safety. Historical baseline for comparison. Value regardless of test results.
We lined up the tasks in escalating order of complexity to see if we could find where Sonnet altered: #274 (smoke test hooks), #268 (key storage validation), #269 (personality integration), #271 (cost tracking), and then #278 (knowledge graph enhancement), true architectural work!
SPOILER: By 6:45 PM: Issue #278 complete. Haiku delivered architectural enhancement in ~4 hours. Beat time estimate. Production-ready code. All 40 tests passing. Zero regressions.
Cost: ~$2 versus ~$15 for Sonnet.
Haiku surprised us and encouraged us about the economics of AI-assisted development.
The assumption: Architectural work requires expensive models. Knowledge graph enhancement with relationship reasoning and intent classification integration? Obviously Sonnet minimum, maybe Opus.
Saturday proved this assumption wrong.
The work-first testing protocol
October 24, the Haiku test protocol emerged from PM decision-making:
Philosophy: Don’t test in isolation. Use real Sprint A8 work. Collect data while making progress. Value regardless of test results.
Task selection (in complexity order):
- TEST-SMOKE-HOOKS: Simple, 30 min estimate
- CORE-KEYS-STORAGE-VALIDATION: Simple, 30 min
- CORE-PREF-PERSONALITY-INTEGRATION: Medium, 45 min
- CORE-KEYS-COST-TRACKING: Medium, 60 min
- CORE-KNOW-ENHANCE: Complex, 2–3 hours (likely Sonnet)
STOP conditions (safety guardrails):
- Two consecutive failures
- Breaking test suite
- Architectural confusion
- 30-minute stall without progress
Decision matrix:
- 90%+ success → Switch to Haiku default
- 70–89% success → Hybrid routing
- <50% success → Stay with Sonnet
The protocol balanced experimentation with progress: Work gets done regardless. Data collected naturally. Safety conditions prevent runaway costs or quality degradation.
This approach enabled Saturday’s discoveries: Real work under real constraints with real deadlines. Not artificial test scenarios. Actual production requirements.
The simple tasks: Proof of concept
10:47 AM — Issue #274: Smoke test pre-commit hooks
This was supposed to be Haiku’s first attempt, a gimme, but the PM (me) screwed up, and forgot to change Claude Code’s model from Sonnet to Haiku before doing the simple configuration work. Code added smoke tests to .pre-commit-config.yaml. Updated documentation. Tested execution.
Not part of the test after all. For the record, Sonnet got it all right on the first try.
11:06 AM — Issue #268: API key storage validation
Security validation logic. Key strength requirements. Rotation reminder scheduling. Error handling.
Duration: 19 minutes
Cost: ~$1 versus ~$7
Result: ✅ Production-ready, comprehensive validation
Cost savings: 75–85% versus Sonnet. Quality: Identical.
The medium tasks: Capability expansion
11:25 AM — Issue #269: Personality preference integration
Here’s where it got interesting. Connect Sprint A7 questionnaire (5 dimensions) with Sprint A5 PersonalityProfile (4 dimensions). Architecture mismatch discovered during implementation.
Haiku’s response: Create semantic bridge. Map 5 dimensions → 4 dimensions intelligently. Implement graceful degradation. Test all mappings. Document limitation.
Duration: 6 minutes
Result: ✅ Discovered divergence, implemented working solution
Decision: Accept bridge for alpha, refactor post-MVP
This was the first signal: Haiku wasn’t just following instructions. It was making architectural decisions. “These two systems don’t match, so I’ll create semantic bridge” is architecture thinking, not configuration work.
12:09 PM — Issue #271: API cost tracking and analytics
Cost-estimation service. Usage analytics. Historical tracking. Multi-provider support. Comprehensive testing.
Duration: 15 minutes
Cost: ~$1.50 versus ~$10 Sonnet
Result: ✅ Full cost tracking system, production-ready
Medium complexity task. Multiple services integration. Business logic. Error handling. Haiku handled it faster than estimated, cleaner than expected.
The pattern emerging: Haiku exceeding expectations on every task. Not just “good enough” but “production-grade quality at fraction of cost.”
The architectural task: Breaking assumptions
1:59 PM — Issue #278: Knowledge graph enhancement with reasoning chains
This was supposed to be the Sonnet 4.5 task. We assumed Haiku would top out before this A\architectural work:
Requirements:
- Add 8 new edge types for causal reasoning (CAUSES, ENABLES, PREVENTS, etc.)
- Implement 3 new methods: build_reasoning_chains(), extract_reasoning_chains(), get_relevant_context()
- Integrate graph context into intent classification
- Enhance confidence weighting with relationship strength
- Create 40 comprehensive tests covering all reasoning patterns
Complexity factors:
- Multiple services coordination (KnowledgeGraphService + IntentClassifier)
- New architectural patterns (reasoning chains as graph traversal)
- Complex algorithm implementation (confidence propagation through relationships)
- Extensive testing requirements (40 tests across multiple dimensions)
This isn’t “wire two things together.” This is “design how two systems collaborate using new patterns.”
Phase −1 Discovery (30 minutes): Architectural reconnaissance. Understand existing graph structure. Analyze intent classification integration points. Design reasoning chain approach. Identify test requirements.
Discovery was thorough. Not “guess and implement.” Full architectural analysis before code changes.
Phase 1–2 Implementation (45 minutes): Enhanced EdgeType enum with 8 new types. Added confidence weighting to domain models. Implemented reasoning chain builders with graph traversal algorithms.
Code quality: Production-grade. Not hacks. Not shortcuts. Proper async implementation. Comprehensive error handling. Clean abstractions.
Phase 3–4 Implementation (45 minutes): Integrated graph context into intent classifier. Added three helper methods. Implemented graceful degradation if service unavailable. Wired everything together cleanly.
Integration quality: Proper dependency injection. Clean interfaces. Testable design. Mature engineering patterns.
Phase 5 Testing (45 minutes): Created 40 comprehensive tests. Edge type validation. Reasoning chain extraction. Context enrichment. Confidence propagation. All patterns covered.
Test quality: Not stubs. Full integration tests. Real scenarios. Edge cases included.
6:45 PM — Issue #278 Complete:
- Duration: ~4 hours total (beat estimate)
- Cost: ~$2 versus ~$15 Sonnet
- Quality: Production-ready, zero regressions
- Tests: 40/40 passing
- Git commit: Clean, well-documented, properly formatted
Haiku did architectural work. Not just “adequate” but “excellent.”
The warts and all: When things weren’t perfect
Saturday wasn’t flawless execution. Three moments showed the reality behind the wins:
The smoke test validation (morning)
Production branch push blocked by pre-commit hook. Import error: ProgressTracker missing from loading_states.py
Root cause: OrchestrationEngine importing from wrong location. Should be web.utils.streaming_responses not services.ui_messages.loading_states.
Duration to fix: 25 minutes (investigation + correction)
The lesson: Smoke test infrastructure worked exactly as designed. Caught real issue before production deployment. Infrastructure validation happening automatically.
Not a failure. A success. The system caught problems before they became production issues. That’s what testing infrastructure is supposed to do.
The security incident (afternoon)
GitHub secret scanning detected hardcoded token in scripts/approve-pr.sh.
Immediate action: Replace with environment variable. But that only fixed going forward. Token still existed in git history. 629 commits. Entire repository.
Response: git filter-branch to rewrite history. Remove secret from all commits. Clean version pushed to multiple branches.
Duration: 2 hours (investigation + rewrite + verification)
Scope: 629 commits processed
The lesson: Security-first culture working. Detected issue. Responded immediately. Cleaned history thoroughly. Proper remediation, not band-aids.
Could have just fixed going forward. Could have revoked token and moved on. Instead: Complete cleanup. No compromises on security.
The personality architecture mismatch (mid-day)
Issue #269 revealed divergence: Sprint A7 questionnaire has 5 dimensions. Sprint A5 PersonalityProfile has 4 dimensions.
This wasn’t bug. This was architectural drift. Two sprints, two slightly different designs, never reconciled.
Haiku’s solution: Semantic bridge. Map 5 → 4 intelligently. Document the gap. Suggest post-MVP refactor.
Decision: Accept bridge for alpha. Refactor properly later.
The lesson: Real systems have real technical debt. Pragmatic decisions acknowledge gaps while delivering value. Perfect is enemy of shipped.
The bridge works. Tests pass. Users won’t notice. Post-alpha, we’ll unify the designs properly. For now: Ship.
These three moments — import error, security incident, architecture mismatch — show real development. Not “everything was perfect.” But “problems were caught, addressed appropriately, and moved forward.”
What Haiku performance actually means
Saturday’s results weren’t just “Haiku can do more than we thought.” They reshape the entire economics of AI-assisted development.
Previous workflow:
- Sonnet: Most implementation (~90% of work)
- Opus: Architecture and strategy (~10% of work)
Potential workflow (post-Saturday):
- Haiku: Most implementation (~90% of work)
- Sonnet: Complex debugging and coordination (~8% of work)
- Opus: R&D and high-level strategy (~2% of work)
The implications extend beyond Piper Morgan:
For solo developers: Haiku makes AI-assisted development 10x more affordable. Projects that would cost $100/month in Sonnet could cost $10/month in Haiku.
For teams: Work previously requiring Sonnet-powered teammates can use Haiku-powered successors. Sonnet moves to coordination roles. Opus focuses on pure R&D.
For cost-sensitive projects: AI assistance becomes viable for projects where $1000/month API costs were prohibitive but $150/month is reasonable.
The verification that mattered
Saturday delivered five issues. All production-ready. Zero regressions. 100% test coverage.
But the real verification came from what didn’t happen:
No STOP conditions triggered: Zero escalations to Sonnet. Zero architectural confusion. Zero 30-minute stalls. Haiku completed everything confidently.
No quality compromises: Tests passed. Code quality excellent. Documentation thorough. No shortcuts, no hacks, no technical debt.
No rework needed: Every issue delivered right first time. No “we’ll fix this later.” No “good enough for alpha.” Production-grade quality throughout.
The work-first protocol proved itself: Real work under real constraints provided real validation. Not artificial tests but actual production requirements.
And Haiku proved itself: Not just “adequate for simple tasks” but “excellent for architectural work.”
The Monday implications
Saturday’s discoveries reshape work allocation going forward.
Immediate changes:
- Default to Haiku for all implementation work
- Reserve Sonnet for complex debugging and multi-agent coordination
- Keep Opus for strategic R&D and architectural decision-making
- Expect 75–85% cost reduction while maintaining quality
Longer-term implications:
- Teammates currently using Sonnet 4.0 can likely use Haiku 4.5 successors
- Chief Architect and Chief of Staff roles can likely use Sonnet 4.5 instead of Opus
- Opus instances focus on pure R&D and high-level strategy
The capability recognition: Haiku 4.5 isn’t “Haiku 4 but faster.” It’s “Sonnet 4 capabilities at Haiku pricing.”
This changes everything about AI-assisted development economics. Not incremental improvement. Order-of-magnitude cost reduction while maintaining (or improving) quality.
The systematic discovery pattern
Saturday’s Haiku success wasn’t accident. It was methodology working:
Phase −1 Discovery: Every issue started with architectural reconnaissance. Understand existing systems. Analyze integration points. Design approach. Identify requirements. 30 minutes invested in understanding before implementation.
Evidence-based implementation: No guessing. No assumptions. Every decision backed by discovery findings. Clean code from understanding, not from trial-and-error.
Comprehensive testing: Not “tests that pass” but “tests that validate.” Real scenarios. Edge cases. Integration patterns. Evidence that code works as designed.
Verification discipline: Issues claimed complete only when evidence provided. Terminal output. Test results. Git commits. No “I think it works.”
The methodology enables the model. Or the model enables the methodology. Or they compound: Good process + capable model = exceptional results.
Saturday proved the compound effect works: Haiku 4.5 + verification-first methodology + work-first testing = architectural work at fraction of cost.
Deploying models intelligently
Five issues delivered Saturday. Technical achievement: Significant. Cost savings: Substantial. Alpha readiness: Advanced.
Before Saturday: “Architectural work requires expensive models” After Saturday: “Haiku can handle architectural work at 85–90% cost savings”
This discovery reshapes:
- How we allocate model costs going forward
- What work gets assigned to which models
- Team composition (who uses which models)
- Project economics (cost per sprint)
- What’s viable for cost-sensitive projects
The methodology that discovered itself strikes again: Work reveals capabilities. Evidence updates assumptions. Better understanding enables better decisions. The spiral continues.
