Context Engineering is the New Vibe Coding (Learn this Now)

Context Engineering is the New Vibe Coding (Learn this Now)

The Shift from Vibe Coding to Context Engineering

Introduction to the New Paradigm

  • The honeymoon phase of vibe coding is over; context engineering is emerging as a crucial paradigm for AI coding.
  • Vibe coding, coined by Andre Karpathy, involves relying heavily on AI assistants with minimal input and validation, leading to issues when scaling applications.

Issues with Vibe Coding

  • A survey highlighted that 76.4% of developers lack confidence in shipping AI-generated code without human review due to frequent hallucinations.
  • The core problem lies not in AI coding itself but in the absence of human oversight during vibe coding, which often leads to unreliable results.

Importance of Context Engineering

  • Context engineering addresses the shortcomings of vibe coding by emphasizing the need for structured context in AI tasks.
  • Unlike tools like Gemini CLI, context engineering focuses on capabilities that enhance how we interact with AI systems.

Defining Context Engineering

  • Andre Karpathy defines context engineering as providing comprehensive context necessary for tasks to be solvable by large language models (LLMs).
  • This approach treats instructions and documentation as engineered resources requiring careful architecture, contrasting with basic prompt engineering.

Components of Context Engineering

  • Context engineering encompasses more than just prompt tweaking; it includes supplying relevant facts and documents for a holistic understanding.
  • Prompting is only one aspect; effective context requires an ecosystem that supports LLM functionality beyond simple queries.

Visual Representation and Practical Application

  • A diagram from GitHub illustrates various components involved in context engineering, including structured output and memory history.
  • Effective implementation demands significant upfront investment in creating contextual information compared to immediate dive into coding typical of vibe coding.

Conclusion: Investing Time for Better Results

  • Quoting Abraham Lincoln, investing time upfront in sharpening your "axe" leads to better outcomes when working with AI assistants.

Context Engineering: The Future of AI Coding Assistance

Introduction to Context Engineering

  • The speaker emphasizes a deep dive into context engineering, highlighting its significance in the evolution of LLM applications from simple prompts to complex dynamic systems.
  • A bold claim is made that context engineering is becoming the most crucial skill for AI engineers, indicating a shift in focus within the field.

Implementing Context Engineering with Cloud Code

  • The speaker introduces a GitHub repository template for implementing context engineering, aiming to create a comprehensive project plan using AI coding assistance.
  • Focus on cloud code as an agentic and powerful tool for planning, task creation, coding, testing, and iterating projects efficiently through minimal prompts.

Inspiration and Community Engagement

  • Acknowledgment of Raasmus from the Dynamis community for inspiring ideas related to agentic coding processes and context engineering during a recent workshop.
  • Mention of open-sourced resources shared by Raasmus that can aid in building AI agents using coding assistance.

Security Risks in AI Coding Assistance

  • The speaker warns about significant security risks associated with using AI coding tools like prompt injection and model poisoning that are no longer theoretical threats.
  • Announcement of a free live webinar hosted by Sneak on July 15th covering critical vulnerabilities in LLMs and best practices for securing AI-generated code.

Project Planning with Cloud Code

  • Introduction to creating a detailed project plan using cloud code; emphasis on various markdown files needed for effective context management.

AI Coding Assistant and Context Engineering

Overview of AI Coding Assistant Implementation

  • The AI coding assistant can utilize past project implementations, code examples, or snippets found online to enhance its functionality. Users are encouraged to store these in an "examples" folder for easy reference.
  • Documentation is crucial for context engineering; it includes listing any online resources or servers (like MCP servers) that the AI coding assistant should reference during operation.
  • It's important to document common pitfalls ("gotchas") encountered with AI coding assistants, providing guidance on how to avoid these issues in future projects.

Building an AI Agent

  • The speaker plans to delete the initial markdown file and rename an example file as part of building an AI agent using Pantic AI. This involves referencing documentation and keeping the process straightforward.
  • Emphasis is placed on ensuring proper project structure and environment variables within the README file, which serves as a foundational guide for the project.

Generating a Comprehensive Plan

  • The discussion transitions into generating a full implementation plan using Cloud Code commands and Product Requirements Prompts (PRPs), which are tailored specifically for instructing an AI coding assistant.
  • Unlike traditional architecture documents, PRPs serve as prompts that guide the implementation process from start to finish, leveraging cloud code capabilities for efficiency.

Utilizing Commands in Cloud Code

  • Markdown files within a designated "commands" folder can be executed as custom commands in Cloud Code, streamlining project initiation by reducing repetitive prompting tasks.
  • The first command discussed is "generate PRP," which creates a detailed plan based on feature requirements provided through initial markdown files. This multi-step process enhances context engineering efforts significantly.

Research and Planning Automation

  • The automation involved in generating PRPs allows for comprehensive research on APIs and existing codebases, ensuring that all necessary details are included to prevent errors during implementation.

Implementation of PRP in Research Email Agent

Overview of PRP Implementation

  • The PRP (Project Reference Plan) has been successfully implemented and is located in the research emailagent.mmd file within the PRPS folder. It includes a summary of research, analysis, and environmental setup for project implementation.
  • The document outlines core principles, primary goals, and success criteria for the project. It is based on a template from Raasmus, emphasizing the importance of detailed planning.

Documentation and Context Engineering

  • The PRP references various documentation sources including websites and examples that enhance context during coding. This approach aims to significantly reduce hallucinations in AI outputs.
  • A clear description of both the current code base and desired outcomes is provided. This pre-planning allows flexibility in structure adjustments during implementation while maintaining architectural integrity.

Execution Process

  • The final step involves executing the PRP with minimal input required in cloud code due to extensive prior planning documented in markdown files.
  • The command for execution (slashexecute PRP) is straightforward; it references specific files within the codebase to generate a comprehensive task list.

Results and Iteration

  • After execution, a detailed task list is generated showcasing the capabilities of AI coding assistance when given proper context.
  • Following over 30 minutes of processing time, Claude code completed testing an end-to-end agent successfully, demonstrating effective use without additional API costs.

Validation and Testing

  • Minor iterations were necessary due to initial setup issues with dependencies; however, overall functionality was confirmed as working well.
  • Tests created by the system passed successfully with only minor warnings noted. Environment variables were set up according to instructions provided by the README file.

Final Demonstration

  • The agent operates using gbt4.1 mini model but can be configured for other models like Gemini or OpenAI as needed.
  • Initial tests show successful web searches utilizing Brave API alongside OpenAI API integration, confirming operational effectiveness.

Power of Context Engineering

Introduction to Context Engineering

  • The speaker emphasizes the importance of context engineering, suggesting it as a foundational skill for working with AI coding assistants like Cloud Code.
  • Encouragement is given to utilize provided templates for creating comprehensive plans, indicating that this is just the beginning of exploring context engineering.

Deepening Understanding

  • The speaker notes that there is much more to explore within context engineering, including concepts like memory and state management.
  • A call to action is made for viewers to dive deeper into the subject, highlighting its current relevance in AI development.
Video description

The honeymoon phase for vibe coding is over and context engineering is the new paradigm for AI coding. Earlier this year we all fell for the vibe coding but it completely falls apart when you try to build anything real or scale it up. The biggest problem? AI coding assistants miss context or lack it entirely, and intuition doesn't scale - structure does. Context engineering treats your instructions, rules, and documentation as an engineered resource requiring careful architecture, just like everything else in real software. It's not just prompt engineering - it's supplying all the relevant facts, knowledge, rules, plans, and tools so an LLM can actually accomplish the task at hand. In this video, I dive deep into what context engineering actually looks like and then we jump into the lab with Claude Code to show you how it works with a real practical example. Like Abraham Lincoln said - if you have six hours to chop a tree, spend four sharpening your axe. That's exactly what we're doing here, and the results are infinitely better than diving straight into implementation. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Key resources: - Register for the free OWASP Top 10 for LLMs webinar hosted by Snyk to learn about how to create secure code with AI coding assistants: https://go.snyk.io/owasp-top-10-llm-isc2.html - GitHub repository for my Context Engineering template: https://github.com/coleam00/context-engineering-intro - Rasmus' GitHub repo (source of inspiration for this): https://github.com/Wirasm/PRPs-agentic-eng ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sources from this video: - Andrej Karpathy - +1 for Context Engineering: https://x.com/karpathy/status/1937902205765607626 - Tobi Lutke (CEO of Shopify) - Context Engineering over Prompt Engineering: https://x.com/tobi/status/1935533422589399127 - Qodo state of AI code quality: https://www.qodo.ai/reports/state-of-ai-code-quality/ - Context Engineering diagram: https://github.com/humanlayer/12-factor-agents/blob/main/content/factor-03-own-your-context-window.md - Langchain - the rise of “context engineering”: https://blog.langchain.com/the-rise-of-context-engineering/ - Article on context engineering that mentions structure over intuition: https://analyticsindiamag.com/ai-features/context-engineering-is-the-new-vibe-coding/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 00:00 - Introducing Context Engineering (RIP Vibe Coding) 03:53 - Context Engineering Explained Visually 06:25 - My Template for Context Engineering (Free Resource) 08:21 - Snyk OWASP Top 10 for LLMs 09:42 - A Practical Example of Context Engineering 10:02 - Global Rules 10:33 - Initial Feature Prompt 12:48 - Creating the Ultimate Project Plan (PRP) 16:37 - Reviewing Our PRP 18:10 - Executing Our PRP (The Real Magic) 19:37 - The Results (Spoiler - it's Freaking Fantastic) 22:09 - Final Thoughts ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Join me as I push the limits of what is possible with AI. I'll be uploading videos every week - Wednesdays at 7:00 PM CDT!