Killer Code

The Master Engineering Workflow That Delivers 5x Productivity

Discover the systematic prompt engineering workflow used by top engineers to achieve 5x higher throughput. Learn how to plan engineering projects from scratch with structured exploration, clarifying questions, file tree diagrams, and detailed change plans.

The Master Engineering Workflow That Delivers 5x Productivity

One of our engineers is 5x higher throughput than anyone I've worked with in past companies. Part of his magic is how dialed in his AI workflows are. This is the master prompt he uses to plan engineering projects from scratch:

The Original Prompt

## 1. Explore the Codebase

* List relevant directories to show project structure.
* Review http://AGENTS[.]md, http://CLAUDE[.]md, and files under `docs/` for context and conventions.
* Check existing code for examples of similar implementations.

## 2. Ask Clarifying Questions

If anything is ambiguous, ask questions before finalizing the plan.
Examples:

* "Which module should the new helper live in?"
* "Should this endpoint return JSON or HTML?"

## 3. File Tree of Changes

At the top of the plan, show a tree diagram of affected files.
Use markers for status:

* UPDATE = update
* NEW = new file
* DELETE = deletion

Example:
/src
 ├── services
 │    ├── UPDATE user.service.ts
 │    └── NEW payment.service.ts
 ├── utils
 │    └── DELETE legacy-helpers.ts
 └── UPDATE index.ts

## 4. File-by-File Change Plan

For each file:

* Show full path + action (update, new, delete).
* Explain the exact changes in plain language.
* Include a short code snippet for the main update.

Example:

* File: `src/services/user.service.ts` (UPDATE)

  * Add a method `getUserByEmail(email: string)` that looks up a user from an in-memory list.
  * Refactor `getUserById` to reuse shared lookup logic.

  const users = [
    { id: 1, email: "alice@example[.]com", name: "Alice" },
    { id: 2, email: "bob@example[.]com", name: "Bob" },
  ];

  export function getUserByEmail(email: string) {
    return users.find(u => u.email === email) || null;
  }

  export function getUserById(id: number) {
    return users.find(u => u.id === id) || null;
  }

## 5. Explanations & Context

At the end of the plan, include:

* Rationale for each change (why it's needed).
* Dependencies or side effects to watch for.
* Testing suggestions to validate correctness.

Why This Workflow Works

This systematic approach delivers 5x productivity because it:

  1. Prevents Rework: By exploring the codebase and asking clarifying questions upfront, you avoid costly misinterpretations.
  2. Improves Communication: The structured plan serves as a communication tool for both AI and human collaborators.
  3. Enables Review: The file tree diagram and detailed change plans make it easy for team members to understand the scope and implementation.
  4. Reduces Cognitive Load: Breaking down changes file-by-file reduces mental overhead and makes complex tasks manageable.
  5. Ensures Quality: Including rationale and testing suggestions helps maintain high standards and catch potential issues.

Adapting This Workflow for Your Projects

To implement this workflow in your own projects:

  1. Start with Exploration: Always begin by understanding the existing codebase structure and conventions.
  2. Ask Questions Early: Don't assume you understand requirements fully - clarify ambiguities before diving into implementation.
  3. Visualize Changes: Create a clear file tree diagram to communicate the scope of your changes.
  4. Plan in Detail: For each file, explain exactly what will change and why.
  5. Document Context: Include rationale and testing strategies to ensure maintainability.

This workflow represents a shift from ad-hoc coding to systematic engineering. By treating AI as a collaborative partner in this structured process, top engineers achieve remarkable productivity gains while maintaining high quality and clear communication.

Whether you're working solo or with a team, adopting this master engineering workflow can transform how you approach software development projects.