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

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
C
Check Point Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
Blog — PlanetScale
Blog — PlanetScale
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
月光博客
月光博客
I
InfoQ
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
A
About on SuperTechFans
L
LangChain Blog
腾讯CDC
Y
Y Combinator Blog
MongoDB | Blog
MongoDB | Blog
Vercel News
Vercel News
MyScale Blog
MyScale Blog
博客园 - Franky
IT之家
IT之家
博客园_首页

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
Terraform for AI generated code
Daniel Stolf · 2026-06-15 · via DEV Community

Over the past few weeks I've written about the workflows I developed building production systems with AI: spec-driven development, manual RAG, grounding models against hallucinations, the Terraform discipline of plan-before-apply, and what happens when you skip all of that and vibe-code your way into a mess you can't undo.

Every post in this series was pointing at the same thing.

Today I'm sharing it.


Introducing speccraft: a Claude Code plugin for spec-first, test-driven AI development.

The one-line description from the README says it better than I can:

Terraform for AI-generated code. Versioned intent. Auto-injected memory. Cross-model review. Hook-enforced TDD.


Here's what it actually does, in plain terms.

Every change starts with a spec. /spec:new interviews you Socratically (why, what, acceptance criteria_ and writes a versioned spec file directly into your repository. Not a chat artifact. Not a prompt you'll lose at the end of the session. A durable, committed, reviewable document that defines exactly what is about to change before implementation begins.

The spec is the contract. Committing it to the repo makes that contract real.

The spec gets reviewed before code is written. /spec:review routes the spec to auxiliary agents (Codex, Gemini, OpenCode, or a Claude subagent running a critic persona) in parallel, and synthesizes the verdicts. Ambiguity, missing edge cases, untestable criteria: these surface at the spec stage, not after the implementation is already tangled across six files.

Implementation is test-first. Not by convention. By enforcement.

A hook intercepts every edit to a production file. If no sibling test file was edited more recently in the same session, the edit is blocked.

Not warned. Blocked.

Now, I know what you're thinking. We've all tried the "make no mistakes" prompt. We've all been let down.

Turns out it does work, you just have to enforce it with a hook, not a prompt.

Speccraft is how "write tests first" stops being advice and starts being a hard constraint. The model cannot skip the RED step and go straight to GREEN. You can override it (one-time, with a reason that gets logged) but you can't ignore it. The discipline is architectural, not aspirational.

The repo carries its own memory. A small .speccraft/index.md (guardrails, architecture decisions, conventions) is auto-injected at every session start. The model always knows the rules of this codebase. Not because you remembered to paste them in. Because the plugin handles it.

Heavy work is delegated to auxiliary agents. /spec:delegate codex "Generate table-driven tests for internal/health/handler.go": Codex or other agent runs the task, speccraft synthesizes the result. The right model for the right job, orchestrated from a single workflow.


Everything in this series (the Kubernetes Operator built in two weeks, the manual RAG sessions, the hallucination loops, the race condition the model confidently couldn't fix, the Terraform analogy, the vibe-coding mess I couldn't undo), all of it was pointing at the same underlying problem.

AI-assisted development is genuinely powerful. But left undisciplined, it amplifies ambition faster than it delivers correctness. Specs drift from implementations. Memory resets between sessions. Reviews are single-model and single-perspective. Tests get written after the fact, if at all.

Speccraft is the workflow I needed to build the things I was building and couldn't find anywhere else.

So I built it.


It's open source. MIT licensed. Currently Go-first, with Python support already in and more languages on the roadmap.

If you've been building with Claude Code and hitting the same walls, link in the comments.

👉 github.com/DCSTOLF/speccraft


What would you add to a workflow like this? What's the discipline you keep having to re-enforce manually?