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

推荐订阅源

T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
L
LINUX DO - 热门话题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
V
V2EX
GbyAI
GbyAI
量子位
Microsoft Azure Blog
Microsoft Azure Blog
有赞技术团队
有赞技术团队
G
Google Developers Blog
云风的 BLOG
云风的 BLOG
B
Blog
Microsoft Security Blog
Microsoft Security Blog
S
SegmentFault 最新的问题
O
OpenAI News
N
News and Events Feed by Topic
博客园 - Franky
爱范儿
爱范儿
Forbes - Security
Forbes - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V2EX - 技术
V2EX - 技术
Application and Cybersecurity Blog
Application and Cybersecurity Blog
N
News and Events Feed by Topic
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recent Commits to openclaw:main
Recent Commits to openclaw:main
人人都是产品经理
人人都是产品经理
P
Privacy International News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
D
DataBreaches.Net
Last Week in AI
Last Week in AI
罗磊的独立博客
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
The Cloudflare Blog
Google DeepMind News
Google DeepMind News
AWS News Blog
AWS News Blog
The Register - Security
The Register - Security
Y
Y Combinator Blog
J
Java Code Geeks
I
Intezer

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 Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
From Vibe Coding to Production: How to Build a Traceable PRD-to-Prompt Workflow for Shipping Maintainable AI Code
Christopher Hoeben · 2026-06-14 · via DEV Community

From Vibe Coding to Production: How to Build a Traceable PRD-to-Prompt Workflow for Shipping Maintainable AI Code

A concrete, repeatable workflow that closes the gap between AI-generated prototypes and production deployment by linking Product Requirement Documents directly to agent prompts and enforcing quality gates.

Start with a Plan: Generate the PRD Before the First Prompt

Vibe coding with tools like Claude Code and Cursor has moved from novelty to legitimate development approach since 2024, yet most workflows stop at the prototype stage because they lack a plan. Rule #5 for shipping maintainable AI code is to start with a plan. That plan must be a Product Requirement Document generated before you write a single line of code.

In comparative testing across ChatGPT, Gemini, Grok, and ChatPRD, Claude produced the strongest baseline for product work. Use it to draft the PRD by first defining the what and the how—scope, user stories, acceptance criteria, and technical constraints—before any code generation begins. A common approach is to prime the model with a system prompt that constrains output to a standard template:

Context
User Stories
Acceptance Criteria
Technical Constraints

Once you have a draft, prompt the LLM to review it for breadth and clarity so the document can serve as context for the AI-assisted coding workflow. A review prompt might look like this:

Review this PRD for breadth and clarity. Identify gaps in user flows, edge cases, or missing technical constraints. Suggest concrete improvements.

This review step prevents the shallow, unfocused output that often derails vibe-coded projects. With a validated PRD in place, every subsequent prompt has a single source of truth. The generated code becomes traceable back to a specific requirement rather than an improvised guess, which is essential when you need to refactor or debug agent-written logic.

Structure the PRD as Machine-Readable Context

Once stakeholders approve the PRD, freeze the scope into a top-level context document that the agent references across sessions. A common approach is to store it as CONTEXT.md in the repository root, separating immutable requirements from implementation notes so the agent does not drift when refactoring prototypes into production code. Treat the document as context for AI-assisted coding workflows rather than a static export.

Keep the file scannable: open with a constraints block that lists non-negotiables such as the TypeScript strict-mode check, followed by acceptance criteria written as checkable statements. The production workflow requires passing the type checker before deployment:

npx tsc --noEmit

Follow this with runtime requirements and acceptance criteria in a single file:

<!-- CONTEXT.md -->
**Constraints**
- Strict TypeScript: npx tsc --noEmit must pass
- Runtime: Node.js

**Acceptance Criteria**
- [ ] OAuth login returns valid JWT
- [ ] API rate limiting enforced per user

When starting a new agent session, point the tool to this file first. A common workflow is to include the context path in the initial prompt so the model grounds every subsequent edit in the original plan. If the requirements change, update CONTEXT.md and version it with the code; never maintain two sources of truth. This living reference keeps the original requirements active as the codebase evolves beyond the prototype stage, ensuring that every generated patch remains aligned with the agreed scope rather than silently introducing assumptions about behavior or architecture.

Decompose PRD Sections with the 1-3-1 Technique

Oversized prompts dump hundreds of lines of unmaintainable bulk into a single file. The 1-3-1 Technique forces you to fragment every PRD section into discrete agent prompts: one high-level goal, three implementation steps, and one validation criterion. This constraint prevents context overflow and keeps generated modules small enough to review in a single pull request.

For example, if a PRD section covers user authentication, the chain becomes a sequence of focused prompts. The first prompt establishes the goal:

Goal: Implement JWT-based login for the auth module defined in PRD §3.2.

The next three prompts handle implementation steps:

Step 1: Create the /login POST route that accepts email and password, hashes the password with bcrypt, and returns a signed JWT.

Step 2: Build the middleware that verifies the JWT from the Authorization header and attaches the user object to the request.

Step 3: Write a logout helper that blacklists the token in Redis with a TTL matching the token expiry.

The final prompt defines validation:

Validation: Run the login route tests and confirm that invalid credentials return HTTP 401 and valid credentials return HTTP 200 with a Set-Cookie header.

Teams changing 15,000 lines per week with AI stay production-ready because every agent follows the same fragmentation rules. Map each prompt chain to a specific PRD section—§3.2 in the example above—so every generated file remains traceable to its origin. When a test fails or a requirement changes, you know exactly which prompt produced the code and which PRD paragraph to update. Store the PRD reference in a comment at the top of each generated file to preserve the link:

// Generated from prompt chain PRD-§3.2-auth-login
// Do not edit without updating PRD §3.2

Enforce DRY and TDD as Mandatory Quality Gates

Vibe-coded output frequently passes local compilation only to stall in the repository, untested and unshipped. The distance between works on my machine and runs in production is exactly where these projects collapse. To close that gap, institute two mandatory quality gates before any commit reaches the branch: a DRY review and TDD validation.

Start with a type-check gate. Run the following against the main branch and block the agent if it fails:

npx tsc --noEmit

This prevents TypeScript regressions from entering the prompt chain.

Next, enforce DRY. Instruct the agent to scan existing modules for duplicate logic, utility patterns, or API wrappers. If the newly generated code repeats an established abstraction, reject the output and rewind the prompt chain rather than allowing redundancy to accumulate.

Then require TDD. Every changeset must include tests mapped directly to PRD acceptance criteria. A common approach is to run the test suite and fail the gate if the new feature lacks tests:

npm test

If the code lacks tests tied to the PRD or duplicates existing patterns, do not merge. Rewind the prompt chain and regenerate until both gates pass. Treat these checks as non-negotiable infrastructure, not optional suggestions, so the codebase remains maintainable as AI-generated volume scales.

Close the Loop with Continuous Review

Stop treating generation as a one-shot event. Rule #4 is a continuous learning loop. After deployment, compare the shipped implementation against the originating PRD sections to identify deviations, refactors, or emergent architectural decisions the agent introduced during generation. Update the living context document with these decisions so the next prompt cycle does not repeat stale assumptions. Capture the delta in a running review file that lives next to the PRD so future prompts ingest the corrected state.

A common approach is to require traceability comments in merged branches that link commits back to the originating PRD section and prompt iteration. When reviewing a diff, run a targeted check between the PRD scope and the actual files shipped:

git diff main...feature/auth-refactor --name-only | xargs grep -n "TODO\|HACK\|AI-" >> review_delta.md

This exposes agent-generated shortcuts that diverged from the planned contract. For persistent traceability, append architectural decisions directly to the context document in a structured block:

ADR-007: Agent-Selected Retry Policy
- **PRD Section**: 3.2 Fault Tolerance
- **Commit**: `a1b2c3d`
- **Decision**: Switched from fixed interval to exponential backoff after rate-limit errors during generation.
- **Prompt Iteration**: v4

Before closing the ticket, run the TypeScript compiler without emit to verify the changed surface:

npx tsc --noEmit

This preserves maintainability when the original human context is no longer available. Teams that change 15,000 lines per week with AI stay production-ready because every agent follows the same rules and leaves breadcrumbs between the PRD, the prompt, and the final commit.

References for further reading

Sources consulted while researching this guide, included so you can verify the details and go deeper. Listing them is not a claim that every line was independently fact-checked.


I packaged the setup above into a ready-to-use kit — **Spec-to-Ship: The Vibe Coder's Build Kit (16 Items)* — for anyone who'd rather copy-paste than wire it from scratch: https://unfairhq.gumroad.com/l/euyyyi.*