Skip to content

Instantly share code, notes, and snippets.

@cedrickchee
Last active February 14, 2025 20:13
Show Gist options
  • Save cedrickchee/0dec529f0a1d929c5e4fcb409092be44 to your computer and use it in GitHub Desktop.
Save cedrickchee/0dec529f0a1d929c5e4fcb409092be44 to your computer and use it in GitHub Desktop.
o1 Pro Workflow Guide for Building Apps from a Template

o1 Pro Workflow Guide for Building Apps from a Template

takeoff-course-o1-pro-template-sys

AI + coding in 2025 is very real. I will be learning the ultimate OpenAI o1 Pro or o3-mini coding workflow in McKay Wrigley's workshop which is part of his Takeoff course.

  • Overview - An intro and high-level overview of the workflow.
  • The Tools - template system, repo prompt, Cursor, o1 Pro / o3 mini
  • The 6 Prompts - The prompts we'll be using. (below)
  • Project Setup - Everything (including tech stack, starter code) you need to setup your app.
  • Building the App - Using the workflow to build ReceiptAI. 12 steps.
  • Next Steps - What should you do next?

The result: you'll learn pair programming with o1 Pro or o3-mini and build an app and profit. It's based on a real-world example building an invoice app and growing business at ~$3k MRR.

Suitable for beginners and experienced developers.

The 6 prompts we'll be using to maximize your ability to build with AI:

  1. Request prompt
  2. Spec prompt
  3. Planner prompt
  4. Codegen prompt
  5. Codegen prompt (XML)
  6. Review prompt

1. Request Prompt

I have a web app idea I'd like to develop. Here's my initial concept:

{{IDEA}}

I'm looking to collaborate with you to turn this into a detailed project request. ...

PRD:

# Project Name
## Project Description
 [Description]

## Target Audience
 [Target users]

...

Please:

  1. Ask me questions about any areas that need more detail.
  2. Suggest feature or considerations I might have ...

...

2. Spec Prompt

You are an expert software architect tasked with creating detailed technical specifications for software development projects.

Your specifications will be used as direct input for planning & code generation AI system, so they must be precise, structured, and comprehensive.

First, carefully review the project request:

<project_request> {{insert_request_here}} </project_request>

Next, carefully review the starter template:

<starter_template> {{insert_template_here}} </starter_template>

...

3. Planner Prompt

You are an AI task planner responsible for breaking down a complex web application development project into manageable steps.

Your goal is to create a detailed, step-by-step plan that will guide the code generation process for building a fully functional web application based on a provided technical specification.

First, carefully review the following inputs:

<project_request> {{insert_request_here}} </project_request>

<starter_template> {{insert_template_here}} </starter_template>

<project_rules> {{PROJECT_RULES}} </starter_template>

<technical_specification> {{TECHNICAL_SPECIFICATION}} </technical_specification>

After reviewing these inputs, your task is to create a comprehensive, detailed plan for implementing the web application.

Before creating the final plan, analyze the inputs and plan your approach. Wrap your thought process in ...

4. Codegen Prompt

You are an AI code generator responsible for implementing a web application based on a provided technical specification and implementation plan.

Your task is to systematically implement each step of the plan, one at a time.

First, carefully review the following inputs:

<project_request> {{PROJECT_REQUEST}} </project_request>

<project_rules> {{PROJECT_RULES}} </project_rules>

<technical_specification> {{TECHNICAL_SPECIFICATION}} </technical_specification>

<implementation_plan> {{IMPLEMENTATION_PLAN}} </implementation_plan>

<existing_code> {{YOUR_CODE}} </existing_code>

Your task is to:

  1. Identify the next incomplete step from the implementation plan (marked with - [ ])
  2. Generate the necessary code for all files specified in that step
  3. Return the generated code

The implementation plan is just a suggestion meant to provide a high-level overview of the objective. Use it to guide you, but you do not have to adhere to it strictly. Make sure to follow the given rules as you work along the lines of the plan.

For EVERY file you modify or create, you MUST provide the COMPLETE file contents in the format above.

Guidelines for code changes:

  • Do not get lazy. Always output the full code in the XML section.
  • Enclose the entire code changes section in a markdown code block
  • Include all of the added/changed files
  • Specify each file operation with CREATE, UPDATE, or DELETE
  • For CREATE or UPDATE operations, include the full file code
  • Include the full file path (relative to the project directory, good: app/page.tsx, bad: /Users/username/Desktop/projects/new-chat-template/app/page.tsx)
  • Enclose the code with ![CDATA[CODE HERE]]
  • Use the following XML structure:
<code_changes>
  <changed_files>
    <file>
      <file_operation>__FILE OPERATION HERE__</file_operation>
      <file_path>__FILE PATH HERE__</file_path>
      <file_code><![CDATA[
/**
 * @file
 Example component for demonstrating component structure
 * @description
 
 * This component handles [specific functionality].
 * It is responsible for [specific responsibilities].
 * 
 * Key features:
 * - Feature 1: Description
 * - Feature 2: Description
 * 
 * @dependencies

 * - DependencyA: Used for X
 * - DependencyB: Used for Y
 * 
 * @notes

 * - Important implementation detail 1
 * - Important implementation detail 2
 */

BEGIN WRITING FULL FILE CODE
// Complete implementation with extensive inline comments & documentation...
]]></file_code>
    </file>
    **REMAINING FILES HERE**
  </changed_files>
</code_changes>

Documentation requirements:

  • File-level documentation explaining the purpose and scope
  • Component/function-level documentation detailing inputs, outputs, and behavior
  • Inline comments explaining complex logic or business rules
  • Type documentation for all interfaces and types
  • Notes about edge cases and error handling
  • Any assumptions or limitations

Guidelines:

  • Implement exactly one step at a time
  • Ensure all code follows the project rules and technical specification
  • Include ALL necessary imports and dependencies
  • Write clean, well-documented code with appropriate error handling
  • Always provide COMPLETE file contents - never use ellipsis (...) or placeholder comments
  • Never skip any sections of any file - provide the entire file every time
  • Handle edge cases and add input validation where appropriate
  • Follow TypeScript best practices and ensure type safety
  • Include necessary tests as specified in the testing strategy

Begin by identifying the next incomplete step from the plan, then generate the required code (with complete file contents and documentation) and return the full XML code block.

Above each file, include a "Here's what I did and why" explanation of what you did for that file.

Then end with "STEP X COMPLETE. Here's what I did and why:" followed by an explanation of what you did and then a "USER INSTRUCTIONS: Please do the following:"

5. Codegen Prompt (XML)

Same as 4.

They write boomer prompts. We write prompts like this.


References

Course update: https://www.youtube.com/watch?v=BCG9GJewDQI

Tweets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment