# Steven Phan > Practical AI tutorials, original coding examples, videos and experiments by Steven Phan. This is the public personal website at https://stevenphan.ca. Articles include their own sources, tested examples and verification limits. Consult the linked article rather than treating a fictional fixture as a real product result. ## Articles - [Overnight Coding Agent Checklist With a Preflight Script](https://stevenphan.ca/blog/overnight-unattended-coding-agent-checklist.md): A checklist and runnable preflight script for letting a coding agent work unattended: branch, restore point, limits, kill file, secrets, plus a morning review. - [Reviewable AI: Rules Diffs With Scores Beat Opaque Weights](https://stevenphan.ca/blog/reviewable-ai-diffs-with-scores.md): For small decisions, keep the logic in a rules file where every change is a diff with a before and after score. A runnable demo with a review card and a gate. - [When the Judge Can Cheat: Hardening an Eval Grader](https://stevenphan.ca/blog/when-the-judge-can-cheat-eval-gaming.md): A toy grader that scripted cheats beat, then a hardened version with hidden cases, read-only tests and canaries. Real pass rates before and after, and the gaps. - [A Verification Loop for Solo Builders, Borrowed from Claude Code](https://stevenphan.ca/blog/verification-loop-solo-builder-claude-code-team.md): Copy a small version of the Claude Code team's verification loop: cheap checks, a three round cap, a gate your agent can't edit, commit stamps and a demo. - [AI Token Cost per Successful Task, Not Price per Million](https://stevenphan.ca/blog/ai-token-cost-per-successful-task.md): Compare AI models by cost per successful task: total spend including retries and failures divided by passes. Includes a Python calculator and a synthetic log. - [Agent Kill Switch: A Budget and Loop Guard in Python](https://stevenphan.ca/blog/agent-kill-switch-budget-loop-guard.md): Build an agent kill switch in Python: caps on steps, spend and time, repeated call detection and a kill file, with real output from a runaway loop demo. - [Qwen4 Max: No Open Weights, Vendor Benchmarks, Canadian Data](https://stevenphan.ca/blog/qwen4-max-closed-api-benchmarks-canada-data.md): Qwen4 Max has no open weights announced and looks API only. See the vendor benchmark claims, Alibaba's listed prices, and its data retention page. - [Agent Tool Risk Classes: Read, Write and Irreversible](https://stevenphan.ca/blog/agent-tool-risk-classes-read-write-irreversible.md): Sort every agent tool into read, write or irreversible, then enforce a rule per class. A runnable Python demo shows which calls get allowed, blocked or held. - [Run Qwen3.8 27B Locally: Which Unsloth Quant Fits 28 GB VRAM](https://stevenphan.ca/blog/run-qwen3-8-27b-locally-unsloth-quant-guide.md): Which Unsloth GGUF quant of Qwen3.8 27B fits 28 GB of VRAM, what the Nov 11 Dynamic V3.1 update changed, plus a fit script and a blank test table. - [Fable 5.2, Embedded Engineering and Opus 5.5: What's Documented](https://stevenphan.ca/blog/fable-5-2-embedded-engineering-opus-5-5.md): Fable 5.2's headline demo is hardware plus firmware. Here is what Anthropic documents versus Opus 5.5, what it doesn't, and what to test yourself. - [Claude Code Code Mode: What Is Documented and What Isn't](https://stevenphan.ca/blog/claude-code-code-mode-5-hour-limit.md): Claude Code Code Mode arrived in v2.1.323. Here is what Anthropic documents about it, the 5-hour limit, and how to measure any difference yourself. - [Can an Agent Improve a Rules Classifier Using Only Git Commits?](https://stevenphan.ca/blog/agent-improve-rules-classifier-git-commits.md): Run an experiment where a loop improves a Python rules classifier via git commits, with a test set sealed until one final reveal that shows the overfit. - [Tool Calls That Can't Double-Charge: Idempotency for Agents](https://stevenphan.ca/blog/agent-tool-call-idempotency-python.md): Make agent tool calls idempotent in Python: stable keys, stored results and a demo that cuts 1,085 duplicate charges to zero over 2,000 seeded runs. - [AI Tool Pricing in Canadian Dollars, Checked 2026-11-12](https://stevenphan.ca/blog/ai-tools-pricing-cad-dated.md): A dated reference table of AI subscription and API list prices in USD with approximate CAD, plus a simple way to compare monthly cost for light to heavy use. - [Set Architecture Rules Before an AI Agent Writes Your Game](https://stevenphan.ca/blog/architecture-rules-before-agent-writes-game.md): Write architecture rules as executable tests before an AI coding agent builds your browser game: layering, seeded randomness, replay hashes and a runnable demo. - [Build a 30-Case Eval Set in One Evening (And Run It Three Times)](https://stevenphan.ca/blog/build-30-case-eval-set-run-three-times.md): Build a small LLM eval set: collect 30 cases, write exact, regex and rubric checks, run it three times and report a pass rate range with flaky cases. - [Make Your Own AI Benchmark from Your Own Logs](https://stevenphan.ca/blog/build-your-own-benchmark-from-your-logs.md): Build a small AI benchmark from your own request logs: scrub personal data, cluster tasks with TF-IDF and k-means, sample cases, grade and track results. - [GitHub Secret Scanning, Dependabot, TruffleHog and Gitleaks](https://stevenphan.ca/blog/github-secret-scanning-dependabot-trufflehog-gitleaks.md): Protect GitHub repositories from leaked secrets and vulnerable dependencies with secret scanning, push protection, Dependabot, TruffleHog and Gitleaks. - [Prompt Injection You Can Test This Weekend](https://stevenphan.ca/blog/prompt-injection-test-toy-inbox-agent.md): Test your own AI agent for indirect prompt injection with a toy Python inbox agent, 20 harmless payloads and real before and after attack rates. - [Does Your Prompt Change Break Anything? Regression Gates](https://stevenphan.ca/blog/prompt-regression-gates-ci.md): Add a prompt regression gate to CI: run a small eval on every pull request, comment the pass rate versus main, and fail the check when it drops too far. - [API Key Leaked in a GitHub Repo? What to Do, Step by Step](https://stevenphan.ca/blog/what-to-do-if-api-key-leaked-in-github-repo.md): API key leaked in a GitHub repo? Revoke it first, check the logs, move secrets out of code, then decide if rewriting history or contacting Support is worth it. - [Reputation Shielder in the news: Metro, CBC and 770 CHQR](https://stevenphan.ca/blog/reputation-shielder-elevatie-startup-in-the-news.md): Reputation Shielder was the review software I co-founded in Calgary. Here are the Metro clippings, a CBC Radio photo and my 770 CHQR interview audio. - [Build a Business Website With Claude, Hosted Free on Cloudflare](https://stevenphan.ca/blog/build-a-business-website-with-claude-on-cloudflare.md): How I built my wife's business website with Claude Code and host it free on Cloudflare Pages: the setup, the checks, what broke, and how to copy it. - [Buy vs Build Software With AI: A SaaSpocalypse Decision Guide](https://stevenphan.ca/blog/buy-vs-build-software-with-ai-saaspocalypse.md): Should you buy SaaS or build it with AI? What the SaaSpocalypse really was, what surveys show, and a scoring checklist for the buy vs build call. - [Claude Duet: Anthropic's Proactive AI Agent Explained](https://stevenphan.ca/blog/claude-duet-proactive-ai-agent-explained.md): Claude Duet is Anthropic's proactive agent app, on a waitlist for US Pro and Max users. What it does, its approval rules, and what to check first. - [Cloudflare AI Labyrinth: How It Works and Whether to Turn It On](https://stevenphan.ca/blog/cloudflare-ai-labyrinth-explained.md): Cloudflare AI Labyrinth feeds decoy pages to AI crawlers that ignore your rules. Learn how it works, how to switch it on or off, and who should skip it. - [Cloudflare Bot Fight Mode: Does It Hurt SEO and AI Crawlers?](https://stevenphan.ca/blog/cloudflare-bot-fight-mode-seo-ai-crawlers.md): Does Cloudflare Bot Fight Mode hurt SEO? What it challenges, who gets through, how to diagnose a 403 in Security Events, and when to turn it off. - [Microsoft Copilot Home, Code and Autopilot: What's New](https://stevenphan.ca/blog/microsoft-copilot-home-code-autopilot-explained.md): Microsoft Copilot now has Home, Code and Autopilot. Here is what each one does, when it rolls out, and what to check before you turn on an always-on agent. - [Copilot Cowork Browser Use: Let an Agent Build and Test for You](https://stevenphan.ca/blog/copilot-cowork-browser-use-build-and-test.md): Copilot Cowork can use your browser to build and test things for you. Here is what browser use does, where it falls short, and how to keep it safe. - [AI Assistant Booked Appointment: Hark and My Costco Tire Swap](https://stevenphan.ca/blog/hark-ai-assistant-booked-my-costco-tire-swap.md): An AI assistant booked my appointment after a cancellation opened up. See what Hark did, how digital AI assistants compare, and how to use them safely. - [How AI Is Helping People Build Apps, Games and CAD Models](https://stevenphan.ca/blog/how-ai-is-helping-people-build-apps-games-and-cad.md): See how AI is helping people build apps, games and CAD files today, with real tools, a small OpenSCAD example, and honest limits you should check. - [Why People Don't Take Action (and How to Start Anyway)](https://stevenphan.ca/blog/why-people-dont-take-action-and-how-to-start.md): Why people don't take action on their ideas, what research says about the intention-action gap, and practical ways to start: tiny steps and if-then plans. - [AGENTS.md Best Practices: Write Better AI Instructions](https://stevenphan.ca/blog/agents-md-best-practices.md): Learn AGENTS.md best practices with a runnable sample: scope repository instructions, define observable checks and separate automation from factual review. - [ChatGPT CSV Cleanup: Fix Duplicates and Mixed Dates](https://stevenphan.ca/blog/chatgpt-csv-cleanup-duplicates-dates.md): Use ChatGPT CSV cleanup with explicit rules, review files and a tested Python example to catch duplicates, ambiguous dates and incorrect totals. - [How to Choose an AI Model: Build a Simple Task Test](https://stevenphan.ca/blog/choose-ai-model-task-test.md): Learn how to choose an AI model with labelled task cases, a runnable Python grader and clear checks for wrong labels, missing answers and review flags. - [Claude Code Projects Explained in 2 Minutes](https://stevenphan.ca/blog/claude-code-projects-explained.md): Watch Claude Code Projects Explained in 2 Minutes, plus written notes on how Projects work, based on Anthropic's documentation. - [Claude Code Projects: How They Work and When to Use One](https://stevenphan.ca/blog/claude-code-projects-guide.md): Claude Code Projects explained: how the coordinator and threads work, who can use them, how to set one up, and how to keep your usage under control. - [MCP Server Python Tutorial: Build a Read-Only Tool](https://stevenphan.ca/blog/mcp-python-read-only-tool.md): Build an MCP server in Python with a read-only lookup tool. Run a real client, inspect structured results and test malformed inputs step by step. - [RAG Citations in Python: Add Verifiable Source Links](https://stevenphan.ca/blog/rag-citations-python-source-links.md): Build RAG citations in Python with stable source IDs, quote checks and a runnable example that shows why a valid citation can still support a false claim. - [Remotion Explained: Create Videos With GPT and Claude](https://stevenphan.ca/blog/remotion-gpt-claude-video-guide.md): Learn what Remotion is, how React becomes a video, and how GPT, Codex and Claude help create animations, templates and reusable video workflows. - [Three.js Explained: How Gaming Brings 3D to the Web](https://stevenphan.ca/blog/threejs-browser-games-3d-web.md): Explore Three.js, browser games and interactive 3D websites, with real examples, an AI coding brief and practical advice for your first project. - [Run a Local LLM with Ollama: Setup, Models and API](https://stevenphan.ca/blog/run-a-local-llm-with-ollama.md): Run a local LLM with Ollama in about ten minutes. Install it, pull a model, chat in the terminal, then call the local API from Python. - [Build an AI Agent in Python With Tool Calling (No Framework)](https://stevenphan.ca/blog/build-an-ai-agent-in-python.md): Build an AI agent in Python from scratch. A short tool-calling loop on a local model, with working code, guardrails and no framework required. - [Semantic Search in Python With Embeddings (Step by Step)](https://stevenphan.ca/blog/semantic-search-with-embeddings-python.md): Build semantic search in Python with embeddings and cosine similarity. Find notes by meaning, not keywords, using a free local model. - [Chat With Your Own Notes: A Simple RAG App in Python](https://stevenphan.ca/blog/chat-with-your-notes-rag-python.md): Build a simple RAG app in Python that answers questions from your own notes using local embeddings and a local LLM. Code included. - [Get Structured JSON From an LLM With Schemas and Pydantic](https://stevenphan.ca/blog/structured-output-from-llm-json-schema.md): Get reliable structured JSON from an LLM using a JSON schema and Pydantic validation in Python. Turn messy text into data your code can trust. - [Use an LLM to Learn Faster Without Skipping the Thinking](https://stevenphan.ca/blog/use-an-llm-to-learn-study-prompts.md): How to use an LLM as a study partner that quizzes you and checks your reasoning, with copy-paste prompts that make learning a new topic more active. - [How to Ship Small AI Projects: A Practical Playbook](https://stevenphan.ca/blog/shipping-small-ai-projects.md): A practical playbook for shipping small AI projects: pick a narrow job, keep a human in the loop, log failures, and finish something this week. - [Measure Ollama Tokens Per Second With a Short Python Script](https://stevenphan.ca/blog/measure-ollama-tokens-per-second.md): Tinker note: measure Ollama tokens per second on your own hardware with a short Python script, and compare models using real numbers. ## Optional - [Blog](https://stevenphan.ca/blog/): Browse and search the articles. - [About](https://stevenphan.ca/about/): Public background and interests. - [Projects](https://stevenphan.ca/projects/): Projects and experiments. - [Résumé](https://stevenphan.ca/resume/): Public professional background. - [RSS](https://stevenphan.ca/rss.xml): Recent articles and updates.