惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
量子位
aimingoo的专栏
aimingoo的专栏
V
Visual Studio Blog
Y
Y Combinator Blog
Vercel News
Vercel News
云风的 BLOG
云风的 BLOG
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Stack Overflow Blog
Stack Overflow Blog
大猫的无限游戏
大猫的无限游戏
Microsoft Security Blog
Microsoft Security Blog
B
Blog
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
博客园 - 聂微东
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Opus to Plan. Sonnet to Build. Slash Command to Scale.
Daniel Stolf · 2026-06-01 · via DEV Community

The first version of my Kubernetes Operator worked.

It was built for one database platform, for one customer problem, and it did exactly what it needed to do. But it was concrete all the way down: tightly coupled, not extensible, and impossible to test without live infrastructure.

If I wanted to support other database platforms, I'd have to refactor the entire core. Replace concretes with interfaces. Restructure the codebase so logic could be reused across implementations.

This is the part of AI-assisted development that nobody talks about. Not the greenfield build, but what happens next. Taking production code and making it better without breaking it.

Here's the workflow I used.


Phase 1 - Specification with Opus

Before touching a single line of code, I asked Claude Opus to generate a detailed refactoring plan as a Markdown document.

Not a vague outline. A precise spec: which files would be created, which code segments would move where, what the new interfaces would look like, how the abstractions would enable reuse across future database implementations.

I used Opus specifically for this phase: the more capable model, slower and more expensive, but worth it for the reasoning depth required to plan a structural refactor without introducing regressions. The goal was to get the plan right before any implementation began.

I reviewed it, pushed back on specific decisions, asked for alternatives in places where the approach felt wrong. The MD file went through several iterations before I was satisfied.

That document became the single source of truth for everything that followed.


Phase 2 - Implementation with Sonnet in Plan Mode

Once the spec was locked, I switched to Claude Sonnet and engaged Plan Mode, Claude Code's built-in capability to propose a complete implementation plan before executing any changes.

This is a critical step that most people skip.

Plan Mode reads the specification, maps it against the existing codebase, and produces a detailed proposal of exactly what it intends to do (file by file, change by change) before writing a single line. You review it. You approve it. Then it executes.

The spec I'd built with Opus was the input. Plan Mode's proposal was the verification that the model understood the spec correctly. Implementation only started when both aligned.

The refactor ran in one shot. Clean interfaces. Reusable core. Testable without live infrastructure.


Phase 3 - The slash command

Once the architecture was right, I built a custom Claude Code slash command to scaffold new database integrations.

Now, when I need to add support for a new platform, I run the command. It generates the API layer, the controller structure, the interface implementations: all consistent with the refactored architecture, all following the same patterns.

What used to require understanding the entire codebase and carefully threading new logic through it now takes minutes.


The full workflow, in plain terms:

Opus → think deeply, plan precisely, produce a spec

Sonnet + Plan Mode → verify understanding, execute against the spec

Custom slash command → compound the investment, make the pattern reusable forever

Each phase uses the right tool for the right job. Opus for reasoning. Sonnet for execution. The slash command for scale.


This is what AI-native development looks like when it matures past the prototype stage.

The 2-week MVP was speed. This is something different: it's using AI to improve the architecture of something already in production, responsibly, with a verification step between planning and execution.

The spec isn't just a prompt. It's a contract between you and the model. Plan Mode is how you confirm the model understood the contract before it acts on it.

That discipline (spec first, verify before executing, build reusable patterns from every solved problem) is what separates teams that ship consistently with AI from teams that generate impressive demos and then spend weeks cleaning up.


What's your workflow for using AI on existing production code, not just greenfield builds?