• AI Fire
  • Posts
  • 🏗️ Stop "Prompting" AI Coding Assistants! Do THIS Instead

🏗️ Stop "Prompting" AI Coding Assistants! Do THIS Instead

The secret isn't prompt engineering, it's "Context Engineering." Here's how the PRP framework gets FLAWLESS results

👨‍💻 The AI Revolution: What Is a Developer's Real Job Now?

As AI writes more of the code, the role of the human developer is changing. What do you believe is our most valuable skill in this new era?

Login or Subscribe to participate in polls.

Table of Contents

Context Engineering: The Secret That Turns AI Coding from "Meh" to "Did AI Just Build That?!"

Let’s talk about that feeling. The one where you ask your AI coding assistant to code something simple and what you get back looks like it was written by a confused intern on their first day. Six months ago, this was the standard experience. We were all treating ChatGPT like a magic 8-ball - shaking it with a vague prompt, hoping for a miracle and getting… well, mostly gibberish. It was like asking a Star Trek replicator for "Tea, Earl Grey, hot", and getting back a lukewarm cup of dishwater.

magic-8-ball

Then a new discipline emerged from the shadows: a secret weapon that separates AI whisperers from AI yellers: Context Engineering.

Specifically, a framework known as PRP (Product Requirements Prompt) is fundamentally changing the game. This isn't just about getting better code. This is about the quantum leap from "Hey AI, can you build me a website?" to watching an AI construct a complex, production-ready application that works flawlessly on the first try. It’s the difference between asking for a miracle and engineering one.

context-engineering-1

Today, you're getting the full blueprint. We're going to walk through this game-changing approach step-by-step, using a real-world example to show you why just "prompting" your AI coding assistants is now officially a thing of the past.

The Philosophical Shift: From Code Monkey to Code Architect

For decades, a developer's value was often measured by the lines of code they wrote. The "10x engineer" was seen as a mythical figure who could type faster, solve problems quicker and churn out features at a superhuman pace. The job was, in many ways, about being a highly skilled, creative typist - a "code monkey" of the highest order.

That era is officially over.

10x-engineer

The rise of AI coding assistants that can write flawless code in seconds has created a fundamental identity crisis for developers. If the AI can do the typing, what is the human's job? The answer is simple but profound: the developer's job is no longer to write the code; it's to provide the thinking behind the code.

This is the shift from being a Code Monkey to a Code Architect.

Think of it like this: AI is the ultimate construction crew. It can lay bricks, run plumbing and wire electrical systems at a speed no human ever could. But it cannot dream up the blueprint for the skyscraper. It doesn't know if it should be a hospital, an office building or a luxury apartment complex. It has no vision.

code-architect

The Code Architect's job is to be the visionary. Their value is no longer in their typing speed but in their ability to:

  • Define the Vision: Clearly articulate what needs to be built, for whom and why. This is the heart of the initial.md file.

  • Design the System: Make high-level decisions about the structure, technology and constraints of the project. This is what forms a great PRP.

  • Provide Flawless Context: Curate the perfect set of instructions, examples and rules so the AI construction crew can execute the vision without error.

  • Act as Quality Control: Review the AI's work, validate the results and act as the final human checkpoint before shipping.

code-architects-job

This is a massive change and frankly, a much more interesting job. It’s less about the tedious grunt work of syntax and semicolons and more about high-level problem-solving and creative design. It's the difference between being a camera operator and being the movie director. The director doesn't need to know how to physically operate the camera but they must have an unshakable vision for the final shot.

Context Engineering is the discipline of becoming a great Code Architect. It's the skill that will separate the next generation of elite developers from those who are still trying to prove they can type faster than their AI coding assistants.

*Here is my previous post on Context Engineering. I recommend checking it out before diving deeper.

Learn How to Make AI Work For You!

Transform your AI skills with the AI Fire Academy Premium Plan - FREE for 14 days! Gain instant access to 500+ AI workflows, advanced tutorials, exclusive case studies and unbeatable discounts. No risks, cancel anytime.

Start Your Free Trial Today >>

The "Garbage In, Garbage Out" Reality Check

Here’s the hard truth about using AI coding assistants: most people are still just vibing. They toss a quick, one-line prompt at Claude or ChatGPT, cross their fingers and then spend the next three hours debugging the spaghetti code it produces. They call this "prompt engineering".

But that’s like trying to build the Death Star by shouting "Make it big and round with a laser!" at a pile of metal.

ai-coding-assistants-1

The pros have moved on. They operate under the Prime Directive of all computing, the oldest rule in the book: Garbage In, Garbage Out. They understand that Context Engineering is the superset of prompt engineering. It’s not about finding a few magic words; it's a systematic process of giving the AI coding assistants a comprehensive mission briefing - complete with requirements, code examples, technical constraints and best practices - before it writes a single line of code.

garbage-in-garbage-out

Think about it: you’d never hire a human developer and just say, "Build me something". You’d give them documentation, access to your existing code and a detailed list of what you need. So why do we treat our billion-dollar AI assistants like they can read our minds? If you give an AI garbage context, it will give you garbage code. It’s that simple.

Meet Your New Best Friend: The PRP Framework

PRP stands for Product Requirements Prompt. It’s a brilliant framework developed by Rasmus, a product manager who, like many of us, got tired of watching AI coding assistants build random, useless things instead of what was actually needed. He decided to treat the AI like a new junior developer on the team and give it a proper briefing.

prp-framework

The formula he developed is pure genius:

PRP = PRD + Curated Codebase Intelligence + Agent Runbook

Let’s translate that from nerd-speak into plain English. You're giving the AI:

  1. 📋 A Product Requirements Document (PRD): A clear explanation of what you're building and why it needs to exist.

  2. 🧠 Curated Codebase Intelligence: Examples of good code, existing patterns from your project and other relevant technical documentation.

  3. 🛠️ An Agent Runbook: A precise, step-by-step instruction manual for how to execute the build process, including testing and validation steps.

The result? You give the AI everything it needs to ship production-ready code on the first pass. No more endless back-and-forth. No more "Well, that's close but..." It's the difference between hoping for a good result and engineering one.

Today's Mission: Building an MCP Server from Scratch

To show you just how powerful this is, we’re going to build a real-world application: an MCP (Model Context Protocol) server.

Think of an MCP server as a way to give your AI assistant new superpowers. It allows you to extend the AI's base capabilities with your own custom functions and tools. For our project, we'll build a specific kind of MCP server called the PRP Taskmaster - an AI tool that can read one of our PRPs and automatically break it down into a list of actionable development tasks.

mcp-server

It's meta, I know. We're using AI to build a tool that makes it easier to build things with AI.

This example is perfect because:

  • It has non-trivial complexity - this is no "Hello World" app. Our final product will involve 18 different tools and functions.

  • It demands production-ready code, including proper security and error-handling best practices.

  • It’s genuinely useful. This is a tool that real developers can use to streamline their workflow.

demo-result

The PRP Process: Your Step-by-Step Blueprint

Enough theory. Let's get to the action. Here’s the exact, five-step process for implementing context engineering on your next project with AI coding assistants.

Step 1: Setting Up Your Foundation

Before starting, a developer would need a few things: a clear idea of what to build, an AI coding assistant like Claude Code and a good Context Engineering Template.

step-1

The beauty of using a template - like those created by industry experts - is that it does the heavy lifting upfront. Instead of starting from a blank page, you get:

  • ✅ Pre-built slash commands and prompts specific to this type of development.

  • ✅ Curated examples of best practices and proven code.

  • ✅ A reference architecture from production-level applications.

  • ✅ Security patterns and error handling are already baked into the framework.

ai-coding-assistants-2

It’s like starting a video game with cheat codes already enabled.

Step 2: The Initial Planning Document (initial.md)

This is where you, the human, describe what you want to build. This file is the mission briefing for your AI coding assistants. The more detail, the better.

Here is the actual initial.md file used for the PRP Taskmaster project:

## FEATURE:

We want to create a MCP server using this repo's template.

The goal of the MCP server is to create a simple version of taskmaster mcp that instead of parsing PRDs we parse PRPs.

Additional features:

- LLM powered PRP information extraction using Anthropic
- CRUD operations on tasks, documentation, tags, etc to and from the DB
- Ctrl+I for Command, Ctrl+L for Cascade

We need tools for parsing PRPs. This tool should take a filled PRP and use Anthropic to extract the tasks into tasks and save them to the db, including surrounding documentation from the PRP like the goals, what, whys, target users, etc.

We need:

- To be able to perform CRUD operations on tasks, documentation, tags, etc
- A task fetch tool to get the tasks from the
- To be able to list all tasks
- To be able to add information to a task
- To be able to fetch the additional documentation from the database
- To be able to modify the additional documentation
- DB tables need to be updated to match our new data models

## EXAMPLES & DOCUMENTATION:
💡
All examples are already referenced in prp_mcp_base.md - do any additional research as needed.

Claude Task Master GitHub: https://github.com/eyaltoledano/claude-task-master

## OTHER CONSIDERATIONS:
- Do not use complex regex or complex parsing patterns, we use an LLM to parse PRPs.
- Model and API key for Anthropic both need to be environment variables - these are set up in .dev.vars.example
- It's very important that we create one task per file to keep concerns separate
step-2

Pro Tips for a Killer initial.md:

  • Be Specific: Don't just say "user management". Describe what users can actually do.

  • Include References: Point the AI to similar projects or documentation. Give it a North Star to follow.

  • Call Out Gotchas: Explicitly mention things AI assistants commonly mess up, like handling environment variables.

  • Think in User Stories: Frame features as "As a developer, I want to..." to provide clear intent.

Step 3: Generating Your PRP (The 15-Minute Research Marathon)

Now, you hand your blueprint over to the AI. In a tool like Claude Code, this is done with a simple slash command but the principle applies to any advanced AI assistant.

Imagine you have a custom command set up in your development environment called /prp-mcp-create. You would run:

/prp-mcp-create ./prps/initial.md
prp-mcp-create

/prp-mcp-create

open-claude-terminal

Open Claude Terminal

generating-prp

Generating PRP

This command kicks off a powerful automated process:

  1. It analyzes your high-level requirements from the initial.md file.

  2. It gathers context by pulling in relevant code examples, official documentation (like for the MCP protocol) and established best practices.

  3. It creates a detailed implementation plan, breaking down exactly how the application should be architected, from the database schema to the API endpoints.

  4. It sets up validation gates, defining the tests and quality checks that must be passed for the project to be considered complete.

This process isn't instant. It might take 10-15 minutes. But while you’re grabbing a coffee, the AI is doing the work of a senior software architect. It's thinking, planning and designing a robust solution.

Step 4: The Crucial Validation Step (Don't Be "That Guy")

This is the step where amateurs get lazy and pros get serious. When your AI coding assistant generates your full PRP, you cannot trust it blindly. You must read through it carefully, acting as the senior developer who is reviewing a junior dev's work plan.

step-4

 

What to look for:

  • ✅ Does the architecture make sense? Does the proposed database schema actually support all the features you asked for?

  • ✅ Is it secure? How are API keys and sensitive data being handled?

  • ✅ Is it powerful? Does the plan include graceful error handling for when things inevitably go wrong?

  • ✅ Is the code structure logical?

Look for red flags:

  • Weird Implementation Details: Does the plan include a strange library or a convoluted approach that doesn't feel right?

  • Security Flaws: Is the AI trying to do something dangerous, like modifying a file where your secret keys are stored?

  • Missing Requirements: Did it forget anything from your original plan?

  • Over-Engineering: Is it proposing a complex, five-step solution for a problem that could be solved in two steps?

red-flags

A Real Example of What to Catch: In the initial PRP for our project, the AI suggested a step that would directly modify the .dev.vars file - a major security no-no, as that's where secret keys are kept. This is the kind of mistake a junior developer might make. The human developer's job is to catch it, delete that section from the PRP and ensure the plan is safe before execution.

real-example

Step 5: Execute the PRP (Watching Code Come to Life)

Once you’ve reviewed, edited and approved your PRP, it's time for the grand finale. You run the execution command:

/prp-mcp-execute PRPs/prp-parser-mcp.md

step-5

What happens next is what separates this method from everything that has come before. The AI doesn't just generate a giant blob of code. It follows the runbook you approved:

  1. It generates a comprehensive to-do list of every task required.

  2. It begins to build the application systematically, one component at a time, often explaining its work as it goes.

  3. It runs tests and validations at each step to ensure everything is working as expected.

  4. If it hits an error, it will often attempt to fix the issue automatically and re-run the test.

  5. It delivers production-ready code, complete with comments, error handling and security best practices.

update-tools
result-1

The numbers from this PRP Taskmaster project are staggering:

  • Total Execution Time: 25 minutes.

  • Tools Built: 18 fully functional, distinct tools within the application.

  • Result: Production-ready on the first shot (with one minor bug fix needed post-build).

  • Estimated Cost: The work produced would easily cost $5,000+ if outsourced to a human development agency.

The best part? You can literally walk your dog while this is happening. You come back to a fully implemented, tested and working application.

result-2

Creating quality AI content takes serious research time ☕️ Your coffee fund helps me read whitepapers, test new tools and interview experts so you get the real story. Skip the fluff - get insights that help you understand what's actually happening in AI. Support quality over quantity here!

Where It All Goes Wrong: The 3 Traps of Lazy Context Engineering

Now that you have the blueprint for success, let's talk about the easy ways to fail. The PRP framework is incredibly powerful but it's not foolproof. Many people, in their rush to get results, try to shortcut the process and fall into one of three common traps. This is how a 25-minute project turns into a week-long nightmare.

Trap #1: The Vague Brain Dump

This is a common mistake. A developer gets excited, opens up an initial.md file and writes something like: "I want to build a cool social media app for pet owners".

Then they hit "generate PRP" and are shocked when the AI produces a generic, useless plan for a basic Instagram clone.

trap-#1

This happens because the developer's initial context was lazy. The AI had no way of knowing they envisioned a niche app specifically for ferret owners who want to share dietary tips and cage-building tutorials. It didn't know the app needed a "FerretFit" activity tracker or a "Business (as in, a group of ferrets) Finder" social feature.

How to avoid it: Your initial.md file is not a wish list; it’s a briefing. Be specific to the point of obsession. Your AI coding assistants are not mind readers; it's a logic engine. Give it detailed, logical instructions and it will return a detailed, logical plan.

be-specific

Trap #2: The "Trust Fall" Execution

This trap snares the impatient. The developer does a great job on their initial plan, gets a beautiful, comprehensive PRP back from the AI and gets so excited that they immediately hit "execute" without reading it.

This is the equivalent of a pilot taking off without doing a pre-flight check.

trap-#2

The AI, while brilliant, is still a tool. It can misinterpret a requirement or, in an attempt to be "helpful", propose a change that could be catastrophic. As in the real example from our project, it might decide to "optimize" your environment variables by writing directly to your secrets file. Hitting "execute" without catching that would be a "This is fine" meme moment, right before your entire security model burns to the ground.

this-is-fine

How to avoid it: Never, ever skip the validation step. Read every line of the AI-generated PRP. You are the senior architect, the final checkpoint. Your job is to catch the one flawed assumption in a hundred perfect lines of logic.

Trap #3: The Context-Free Update

This trap happens after the initial success. The developer has a beautiful, AI-generated application that works perfectly. A week later, they want to add a new feature. So, they open up a prompt window and type: "Hey, add a new ‘Share to Social Media’ button to the user profile page".

trap-#3

The AI, operating with zero context of the existing project's design system, coding style or file structure, dutifully adds a button. But the button is a hideous shade of green, uses the wrong font, is twice the size of all the other buttons and breaks the mobile layout. The developer now has to spend an hour cleaning up the AI's five-second "fix".

How to avoid it: Treat every update like a mini-PRP. Give the AI context every single time. A better prompt would be: "Referring to our project's design-system.md and the existing UserProfile.tsx component, add a new 'Share' button that matches the style of the primary action buttons. Place it to the right of the 'Edit Profile' button".

update

Context isn't a one-time setup. It's an ongoing discipline. That's why it's called Context Engineering, not Context Suggestion.

Inside the PRP: The Anatomy of a Perfect Prompt

So what does one of these master prompts actually look like? It's less of a "prompt" and more of a "specification document".

Here’s the structure that makes it so powerful:

  1. Clear Objective Statement: A simple, top-level goal.

(e.g., "Build a production-ready MCP server for parsing PRPs and managing development tasks").

  1. Detailed Tool Specifications: A breakdown of every single feature.

(e.g., "Tool #1: PRP Parser", "Tool #2: Task Extractor", "Tool #3: Documentation Generator").

  1. Technical Context and Constraints: The specific technologies to be used.

(e.g., "Must be written in TypeScript", "Must use a PostgreSQL database", "Must be deployed on Cloudflare Workers", "Must use OAuth for authentication").

  1. Reference Documentation: Links to official docs, security best practices and database schemas. This tells the AI where to look for answers.

  2. Current vs. Desired Structure: This is the secret weapon. It gives the AI a clear "before and after" picture.

(e.g., "Current structure is a basic, empty MCP skeleton. The desired structure is a full-featured task management system as defined above").

perfect-prompt

This is why the PRP approach dominates traditional prompting. A simple prompt gets you a generic, buggy app. A PRP gets you a production-ready application that works, often on the first try, because you did the thinking and planning upfront.

Global Rules: Your AI's "Operating System"

There's one final piece to this puzzle: global rules.

These are the core principles that apply to every single project you work on. They live in a separate file (e.g., claude.md) and define the principles that apply to all of your projects.

Rasmus Widing, the PRP Framework creator, has a great rule of thumb for this:

"Global rules are for things that will be true forever in your codebase. PRPs are for the specific work you're doing right now".

global-rules
  • Global Rules (The Constants):

    • Your team's coding standards (e.g., "always use camelCase for variables").

    • Security patterns that must always be followed (e.g., "never log user passwords").

    • Naming conventions.

  • PRPs (The Variables):

    • The requirements for a specific feature.

    • Project-specific context and file structures.

    • One-time implementation details.

This section is crucial. It ensures your AI is consistent, efficient and maintainable across all projects, because it always operates from the same set of core principles.

The Final Question: What About My Existing, Messy Codebase?

"This is great for new projects but my current project's code is a tangled mess of spaghetti. Can it work for me?"

The answer is yes. In fact, the PRP framework was designed first and foremost for existing codebases. The process is the same but the "Curated Codebase Intelligence" section of your PRP becomes even more important. You feed the AI coding assistants examples of your existing code, your established patterns and your current file structure.

ai-coding-assistants-3

The AI then learns how you build things and adapts its approach to match your style. It can add a new feature to your messy codebase that looks and feels like it was written by you, because you gave it the context it needed to succeed.

This is the future of software development. It's not about replacing developers; it's about giving them superpowers. It’s about shifting their work from tedious typing to high-level architectural thinking. It's about moving faster, building better and letting the AI handle the grunt work.

Welcome to the era of Context Engineering.

If you are interested in other topics and how AI is transforming different aspects of our lives or even in making money using AI with more detailed, step-by-step guidance, you can find our other articles here:

Overall, how would you rate the AI Workflows Series?

Login or Subscribe to participate in polls.

Reply

or to participate.