Skip to content

About

# BLUEPRINT FOR AN AI-FIRST COMPANY **Frameworks, code, and the complete AI writing system behind the book** [![Read Online](https://img.shields.io/badge/Read_Online-Live_Site-38bdf8?style=for-the-badge)](https://aiblueprint.saurav.ai/)    [![GitHub stars](https://img.shields.io/github/stars/saurav-yirifi/blueprint-ai-first-company?style=social)](https://github.com/saurav-yirifi/blueprint-ai-first-company/stargazers) [![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-455a64?style=flat-square)](LICENSE)    ![81K Words](https://img.shields.io/badge/Words-81%2C000+-2e7d32?style=flat-square)    ![775 Citations](https://img.shields.io/badge/Citations-775-1565c0?style=flat-square)    ![12 Chapters](https://img.shields.io/badge/Chapters-12-e65100?style=flat-square) [Frameworks](#frameworks) • [Code Examples](#code-examples) • [Checklists & Guides](#checklists-guides--workflows) • [AI Writing System](#the-ai-writing-system) • [Book Chapters](#about-the-book)

By Saurav Bhatia -- Founder & CEO of Yirifi.ai, a 20-person AI regulatory intelligence startup where just 2 people built 15 backoffice microsites in three months. Former founding executive of two digital banks: Interim CEO of TRUST Bank Singapore (1M+ clients, ~20% market share) and founding CFO of Mox Bank Hong Kong (750K clients, 12% market share). 20+ years building products, teams, and companies across Standard Chartered, Citibank, Singapore, and Hong Kong. MBA from NUS. Oxford Blockchain Strategy Programme.

LinkedIn   X   Blog

Full bioShort biosResumeProfile & contactAI transparency statement

Every framework in this repo comes from that experience. The book was written using the same AI-first methods it teaches, and the entire production system is documented here.

What's in This Repository

### Build    **[20 Frameworks](frameworks/)** -- Decision models for strategy, architecture, hiring, data, governance    **[14 Code Examples](examples/)** -- Agent patterns, infrastructure, prompts, CI/CD in Python    **[6 Guides](guides/)** -- Step-by-step implementation walkthroughs ### Operate    **[7 Checklists](checklists/)** -- Readiness assessments and audit tools    **[4 Workflows](workflows/)** -- Repeatable operational processes    **[6 Resource Collections](resources/)** -- Tools, papers, case studies, courses, communities
### Learn    **[57 AI Writing Process Files](ai-writing-process/)** -- The complete system behind writing the book with AI    **[12 Book Chapters](book/)** -- Chapter-by-chapter companion content

The AI Writing System

81,000 words. 775 citations. 14 AI agents. The entire system is documented.

This book was produced using a multi-agent AI writing system built on Claude Code, Perplexity, and Obsidian. The full system -- every prompt, script, skill, and architectural decision -- is open for you to study, adapt, or use.

81,000+
Words across 12 chapters
775
Inline citations with URLs
14
Claude Code agent skills
180+
Perplexity research prompts
17
Python scripts
17
Adaptable templates

What's documented: author voice encoding (6 files that teach an LLM to write like a specific human), 27 modular prompts across 5 categories, multi-agent orchestration, a research pipeline that generates citation-ready content, Obsidian vault architecture, a Flask + PostgreSQL analysis app with 70+ modules, and a 4-phase editorial review process.

Explore the AI Writing System →

About the Book

Blueprint for an AI-First Company is a practical guide to building companies where AI is the foundation, not an afterthought. 12 chapters, 4 parts, 81,000+ words, 775 inline citations with source URLs.

Start where you need to:

If you're... Start here
Evaluating AI strategy Part I -- Foundations
Ready to build Part II -- Building
Scaling your AI team Part III -- Operating
Thinking long-term Part IV -- Sustaining
Full Table of Contents (12 chapters)
**Part I: Foundations** | # | Chapter | Description | |:--|:--------|:------------| | 1 | [The AI-First Imperative](book/part-1-foundations/01-the-ai-first-imperative/) | Why being AI-first matters now and the competitive advantages it creates | | 2 | [The AI-First Mindset](book/part-1-foundations/02-the-ai-first-mindset/) | How AI-first founders think differently about opportunities and building | | 3 | [The AI Landscape](book/part-1-foundations/03-the-ai-landscape/) | Navigating foundation models, providers, and making strategic choices | **Part II: Building** | # | Chapter | Description | |:--|:--------|:------------| | 4 | [Infrastructure for AI-First Operations](book/part-2-building/04-infrastructure-for-ai-first-operations/) | The infrastructure stack -- databases, gateways, and auth | | 5 | [Building with AI](book/part-2-building/05-building-with-ai/) | How to build software with AI as a collaborator | | 6 | [Agent Architecture](book/part-2-building/06-agent-architecture/) | Two types of agents, when to use each, and the Agent Hub pattern | | 7 | [The Microsite Pattern](book/part-2-building/07-the-microsite-pattern/) | Domain microsites with shared infrastructure and AI agent access | **Part III: Operating** | # | Chapter | Description | |:--|:--------|:------------| | 8 | [Teams for AI-First Companies](book/part-3-operating/08-teams-for-ai-first-companies/) | Structuring teams and building culture for AI-first success | | 9 | [Data Strategy](book/part-3-operating/09-data-strategy/) | Building data advantages that compound | | 10 | [AI-Augmented Operations and GTM](book/part-3-operating/10-ai-augmented-operations-and-gtm/) | Using AI to scale operations and customer-facing growth | **Part IV: Sustaining** | # | Chapter | Description | |:--|:--------|:------------| | 11 | [Ethics, Governance, and Risk](book/part-4-sustaining/11-ethics-governance-and-risk/) | Responsible AI with proper governance and risk management | | 12 | [Staying Ahead](book/part-4-sustaining/12-staying-ahead/) | Building architecture that absorbs change rather than resisting it |

Frameworks

20 decision frameworks extracted from the book, each with context on when and how to use it.

Highlights:

Framework Chapter Use When
AI-First vs AI-Enabled Ch 1 Assessing where your company falls on the spectrum
7 Failure Modes of Agents Ch 6 Diagnosing why an agent is failing
8 Patterns for AI Coding Ch 5 Structuring AI-assisted development workflows
90-Day AI Fluency Program Ch 8 Upskilling your team on AI tools and thinking
All 20 frameworks
| Framework | Chapter | Use When | |:----------|:--------|:---------| | [AI-First vs AI-Enabled](frameworks/01-ai-first-vs-ai-enabled.md) | Ch 1 | Assessing where your company falls on the spectrum | | [7 Mental Models of AI-First](frameworks/02-seven-mental-models-of-ai-first.md) | Ch 2 | Shifting how your team thinks about AI | | [Probabilistic AI](frameworks/03-probabilistic-ai.md) | Ch 2 | Designing for non-deterministic outputs | | [Build vs Buy Calculus](frameworks/04-build-vs-buy-calculus.md) | Ch 2 | Deciding whether to build or buy AI capabilities | | [Human-AI Collaboration](frameworks/05-human-ai-collaboration.md) | Ch 2 | Defining roles between humans and AI systems | | [Foundation Models](frameworks/06-foundation-models.md) | Ch 3 | Understanding major model families and trade-offs | | [6 Questions Before Choosing a Model](frameworks/07-six-questions-before-choosing-a-model.md) | Ch 3 | Evaluating which model fits your use case | | [5 Infrastructure Mistakes](frameworks/08-five-infrastructure-mistakes.md) | Ch 4 | Auditing your AI infrastructure decisions | | [8 Patterns for AI Coding](frameworks/09-eight-patterns-for-ai-coding.md) | Ch 5 | Structuring AI-assisted development workflows | | [7 Failure Modes of Agents](frameworks/10-seven-failure-modes-of-agents.md) | Ch 6 | Diagnosing why an agent is failing | | [90-Day AI Fluency Program](frameworks/11-ninety-day-ai-fluency-program.md) | Ch 8 | Upskilling your team on AI tools and thinking | | [Data Flywheel](frameworks/12-data-flywheel.md) | Ch 9 | Building compounding data advantages | | [Data Moats](frameworks/13-data-moats.md) | Ch 9 | Identifying defensible data assets | | [6 Data Strategy Mistakes](frameworks/14-six-data-strategy-mistakes.md) | Ch 9 | Avoiding common data strategy pitfalls | | [Automation vs Augmentation](frameworks/15-automation-vs-augmentation.md) | Ch 10 | Choosing where AI replaces vs enhances humans | | [8 GTM Mistakes with AI](frameworks/16-eight-gtm-mistakes-with-ai.md) | Ch 10 | Reviewing your AI go-to-market approach | | [Permission Model Framework](frameworks/17-permission-model-framework.md) | Ch 11 | Designing AI permission and access controls | | [AI Governance Framework](frameworks/18-ai-governance-framework.md) | Ch 11 | Setting up organizational AI governance | | [7 AI Risks and Mitigations](frameworks/19-seven-ai-risks-and-mitigations.md) | Ch 11 | Identifying and addressing AI-related risks | | [10 Principles of AI-First](frameworks/20-ten-principles-of-ai-first.md) | Ch 12 | Grounding long-term AI-first strategy |

Code Examples

14 working examples in Python covering agent patterns, infrastructure components, prompt templates, and CI/CD configuration.

Highlights:

Example Description
Chat Agent Conversational AI agent pattern
Agent Hub Multi-agent orchestration
AI Gateway Unified API gateway for AI providers
All 14 code examples
| Example | Description | Language | |:--------|:------------|:---------| | [Chat Agent](examples/agent-patterns/chat-agent/) | Conversational AI agent pattern | Python | | [Background Agent](examples/agent-patterns/background-agent/) | Async task processing agent | Python | | [Agent Hub](examples/agent-patterns/agent-hub/) | Multi-agent orchestration | Python | | [AI Gateway](examples/infrastructure/ai-gateway/) | Unified API gateway for AI providers | Python | | [Unified Auth](examples/infrastructure/unified-auth/) | Human and agent authentication | Python | | [Observability](examples/infrastructure/observability/) | AI-specific monitoring and tracing | Python | | [Coding Prompts](examples/prompts/coding-prompts/) | AI coding prompt templates | Markdown | | [Agent System Prompts](examples/prompts/agent-system-prompts/) | Agent system prompt templates | Markdown | | [Evaluation Prompts](examples/prompts/evaluation-prompts/) | Model evaluation prompt templates | Markdown | | [Claude Code Setup](examples/configs/claude-code-setup/) | Claude Code configuration files | Config | | [CI AI Review](examples/configs/ci-ai-review/) | CI/CD pipeline with AI code review | Config |

Checklists, Guides & Workflows

### Checklists - [AI Readiness Assessment](checklists/ai-readiness-assessment.md) - [Model Selection](checklists/model-selection-checklist.md) - [Agent Design](checklists/agent-design-checklist.md) - [Infrastructure Audit](checklists/infrastructure-audit.md) - [Data Strategy](checklists/data-strategy-checklist.md) - [Governance](checklists/governance-checklist.md) - [GTM AI Readiness](checklists/gtm-ai-readiness.md) ### Guides - [Building Your First Agent](guides/building-your-first-agent.md) - [AI Tool Gateway Setup](guides/setting-up-ai-tool-gateway.md) - [Data Flywheels](guides/implementing-data-flywheels.md) - [Polyglot Persistence](guides/polyglot-persistence-setup.md) - [AI Coding Workflow](guides/ai-coding-workflow.md) - [Team AI Fluency Rollout](guides/team-ai-fluency-rollout.md) ### Workflows - [AI Coding Session](workflows/ai-coding-session-workflow.md) - [Agent Failure Recovery](workflows/agent-failure-recovery.md) - [Model Evaluation](workflows/model-evaluation-workflow.md) - [90-Day Fluency Plan](workflows/90-day-fluency-implementation.md)

Resources

Tools AI tools and platforms referenced in the book
Research Papers Key papers behind the concepts
Case Studies Real-world AI-first company examples
Courses and Learning Recommended courses and learning paths
Communities Communities for AI-first builders
Open Source Projects Relevant open source projects

Get the Book

Blueprint for an AI-First Company is available at the book's website. The frameworks and code here are extracted from the book. The book provides the full narrative, case studies, and strategic context that these companion materials are built around.


Contributing

Contributions are welcome. Whether you have a resource suggestion, a code example, or a correction, please see CONTRIBUTING.md for guidelines.

Star History

Star History Chart


Licensed under CC BY-NC-SA 4.0 • Copyright 2026 Saurav Bhatia

Discussion