Harness AI by Looking to the Past

Harness AI by Looking to the Past

Publish Date: Aug 6
0 0

Introduction

Software development is changing rapidly, and with it, what it means to be a developer. With new LLM-powered tools emerging constantly, keeping up can feel overwhelming. Many developers have tried AI once or twice, only to be disappointed when it produced code that needed extensive fixes. Others expect magic: "I told it to build a feature and it went crazy."

Here's the reality: AI tools are like junior developers with no context about your project, codebase, or tech stack. Until you teach them these things, they'll write code like a lost junior with no mentor. The good news? The same development methods that made teams efficient a decade ago can make working with AI more productive today. Those practices that helped teams of junior developers succeed also work with AI, and managing this workflow with a manager's mindset is key.

The Power of Small, Well-Defined Features in Software Development

When considering methods that make teams more effective, two stand out: Feature Driven Development (FDD) and Minimal Marketable Features (MMF). Both emphasize small, well-defined features with focused scope. These approaches improve communication and reduce risk by making it easier to adapt to changes.

Feature Driven Development

FDD breaks large features into smaller, narrowly-scoped pieces. This limits scope creep, increases productivity, and improves team focus1. While it requires more planning time, the trade-off pays off in faster development. I've seen this firsthand when a feature expected to take three sprints was completed in less than one.

FDD offers several benefits:

  • Smaller features are easier to refactor when requirements change
  • Teams get greater visibility into code and issues earlier
  • Communication improves across the team

As Bob Stanke writes:

Feature Driven Development places a strong emphasis on communication and collaboration between team members. This can help to improve the flow of information between team members and ensure that everyone is working towards a common goal

Key ideas from FDD:

  1. Narrowly defined scope that prevents scope creep and increases focus
  2. Small iterative changes that are easier to refactor
  3. Increased importance of preplanning and project management
  4. Increased communication and collaboration working towards a common goal

Minimal Marketable Features

MMF is similar to FDD but emphasizes incremental value delivery by breaking complex features into smaller deliverable pieces2. It focuses on delivering small units that provide value in steps, helping teams prioritize what provides the most impact for customers.

Like FDD, MMF increases adaptability to changes and feedback while enhancing collaboration. It also reduces costs by limiting what's being built at any time, minimizing the risk of scope creep and costly errors.

At its core, MMF is about breaking down complex software requirements into smaller, manageable chunks. Each MMF should be self-contained and independently usable, allowing developers to deliver value incrementally.2

Key takeaways from MMF:

  1. Narrowly defined scope that emphasizes small usable deliverables
  2. Easier to refactor and adapt to changes
  3. Increased planning and collaboration
  4. Reduces scope creep and waste through planning and incremental deliverables

These methodologies share similar principles focused on structured approaches to increase performance. Now consider what developers often say about AI:

  • "It tried to code the whole project at once"
  • "It didn't build what I wanted"
  • "I wasted time fixing bugs and bad code"

Sound familiar?

Prompt-Driven Development: Bringing the Same Principles to AI Collaboration

When developing with AI, three critical truths emerge:

  1. Context is key - the AI only knows what you tell it or what it can find
  2. It's a collaboration, not magic
  3. Communication remains just as important as with human teammates

Looking at common developer complaints about AI, it becomes clear there's a process problem - just like when you ask a junior developer to build a complex feature with no guidance.

Prompt-driven development is about communication and collaboration. It's working with what resembles a junior developer and managing their workflow. Your communication should include essential context like language, framework, and error messages - exactly what a new developer would need.

The Prompt Engineering Playbook for Programmers states this perfectly:

Always assume the AI knows nothing about your project beyond what you provide…Specificity and context make the difference between vague suggestions and precise, actionable solutions.3

This brings us to a fundamental truth: output quality directly correlates with prompt quality. Like the difference between a vague 10-point ticket and a well-defined, narrowly-scoped feature.

The Playbook continues:

Detail and direction are your friends. Provide the scenario, the symptoms, and then ask pointed questions. The difference between a flailing 'it doesn't work, help!' prompt and a surgical debugging prompt is night and day.3

Just as well-planned features can be developed almost on autopilot, well-crafted prompts dramatically improve AI code generation. Focusing on narrowly-scoped pieces makes AI-generated code easier to review, refactor, and adjust - just like with human teams. Clear instructions, examples, context, restrictions, and expected results transform the output compared to vague requests like "Make me a contact page."

From "Mastering Amazon Q Developer Part 1":

Your success…depends directly on how well you communicate with it. The difference between a vague request and a well-structured prompt can be the difference between wasted time and a productivity breakthrough.4

And:

The quality of information you receive directly correlates with the quality of the information you provide.4

Good prompting techniques increase productivity, reduce technical debt, and shorten debugging time5. Simply put:

Good prompt engineering is the difference between AI being your 10x productivity multiplier and a technical debt generator5

As Yash Poojary noted in "I Rebuilt Sparkle in 14 Days with AI":

There's a saying that you're the average of the five people you spend the most time with. The same goes for code. Your code is the average of the first five prompts you feed into your editor. If those prompts are scattered or vague, the model will drift. But if you set a strong foundation early—clear structure, naming, logic—the model starts acting like a teammate instead of a guesser.6

Remember the key principles from FDD and MMF? All eight points remain true when coding with AI:

  • Narrow, well-defined scopes produce better outputs
  • Better planning and prompting yield better code
  • Scope creep is controlled through narrowing features

By applying these proven development principles to AI collaboration, your AI-assisted code will continuously improve.

Best Practices for Working with AI in Development

By now, you've likely recognized the parallels between managing AI and managing a team of developers:

  1. Use clear, specific prompts with well-defined outcomes
  2. Include context and examples in your prompts
  3. Narrow the scope - don't ask for a park, ask for a tree
  4. Review, iterate, communicate, and establish rules
  5. Treat AI-generated code like work from a new junior dev - review everything critically
  6. Avoid vagueness - less context means worse output

Beyond these basics, experiment with different AI models to discover their strengths and weaknesses. Using the right model for specific tasks can dramatically improve results.

Two additional strategies have significantly improved my AI collaboration:

First, instruct the AI to aim for 95% confidence in its work, asking clarifying questions when needed. This creates stronger collaboration through back-and-forth communication, dramatically improving output quality.

Second, give the AI permission to acknowledge uncertainty. Models sometimes get so focused on completing tasks that they'll replace problematic code with placeholders or remove it entirely. When you explicitly give them permission to stop and ask questions, they're more likely to seek clarification rather than produce flawed code.

TLDR For Rules

Be Specific : Instead of "write clean code," specify "use meaningful variable names, limit functions to 20 lines, include JSDoc comments for all public methods."

Include Examples : Show the AI exactly what good looks like in your codebase.

Set Boundaries : Clearly state what the AI should and shouldn't do (e.g., "Never modify database schemas without explicit approval").

Update Regularly : Refine rules based on what works and what doesn't in practice.

TLDR For Chat Prompts

Front-load Context : Put the most important information first.

Be Action-Oriented : Use verbs like "implement," "refactor," "optimize," "debug."

Specify Output Format : Tell the AI how you want the response structured.

Include Relevant Code : Paste existing code that the AI needs to understand or work with.

Ask for Explanations : Request reasoning behind implementation choices when learning.

Examples

Instead of "fix this bug," try this approach:

You are a senior developer on a project using [tech stack info].
I am experiencing [specific problem] in [location/context].
Expected behavior: [what should happen]
Current behavior: [what actually happens]
Relevant code: [paste code if applicable]
Please identify the issue and provide a fix.
Enter fullscreen mode Exit fullscreen mode

This gives the AI much more context than "my app is crashing on the product list fix it." For example:

You are a senior React developer.

I'm getting a "Cannot read property 'map' of undefined" error in my React component. 

Current behavior: App crashes when ProductList renders
Expected behavior: Should display empty state when no products

Component code:

const ProductList = () => {
  const [products, setProducts] = useState();

  useEffect(() => {
    fetchProducts().then(setProducts);
  }, []);

  return (
    <div>
      {products.map(product => (
        <ProductCard key={product.id} product={product} />
      ))}
    </div>
  );
};

Please identify the issue and provide a robust solution that handles loading states and potential fetch failures.
Enter fullscreen mode Exit fullscreen mode

For small features and additions, this format works well:

You are a senior developer on a project using [tech stack info].
I need to [specific feature] for [context]. 
Requirements: [list key requirements]
Constraints: [technical limitations]
Please [specific action] and ensure [quality criteria].
Enter fullscreen mode Exit fullscreen mode

For larger features, include more context in a separate file with numbered tasks. For code reviews and refactoring:

You are a senior developer on a project using [tech stack info].
Please review/refactor this [code type]:
[paste code]
Focus on: [specific aspects like performance, readability, maintainability]
Maintain: [what should stay the same]
Enter fullscreen mode Exit fullscreen mode

For project rules or feature specifications, these templates are effective:

# [Project Name] - [Technology Stack]

## Project Context
[Brief description of what you're building, target users, main objectives]

## Tech Stack
- [Framework/Library]: [Version]
- [Language]: [Version] 
- [Database]: [Version]
- [Other key dependencies]

## Coding Standards
- [Naming conventions]
- [Code formatting preferences]
- [Comment/documentation style]
- [File organization patterns]

## Architecture Patterns
- [Design patterns to use]
- [Folder structure preferences]
- [Component/module organization]

## Quality Requirements
- [Testing expectations]
- [Performance standards]
- [Accessibility requirements]
- [Security considerations]

## Output Preferences
- [How you want code structured]
- [Documentation expectations]
- [Error handling approach]

## Constraints
- [What to avoid]
- [Technical limitations]
- [Business requirements]
Enter fullscreen mode Exit fullscreen mode

For feature specifications:

I need to implement [specific feature] for [project context].

Requirements:
- [Key requirement 1]
- [Key requirement 2]  
- [Key requirement 3]

Technical constraints:
- [Framework/library versions]
- [Performance requirements]
- [Browser/device support]

Please create:
1. [Specific deliverable 1]
2. [Specific deliverable 2]
3. [Specific deliverable 3]

Additional considerations:
- [Error handling needs]
- [Testing requirements]
- [Documentation needs]

Success criteria: [How I'll know it's working correctly]
Enter fullscreen mode Exit fullscreen mode

For complex debugging:

I'm experiencing [specific problem] in [location/component/function].

Expected behavior: [What should happen]
Current behavior: [What actually happens]
Error message (if any): [Exact error text]

Relevant code:
[Paste problematic code here]

Context:
- [When does this occur]
- [Steps to reproduce]
- [Environment details if relevant]

Please identify the root cause and provide a fix that [specific requirements for the solution].
Enter fullscreen mode Exit fullscreen mode

Finally, a versatile template for general AI interactions:

## Role
You are a senior developer working in a [tech stack]

## Tone
This is optional, but useful for content/copy

## Instructions/subtasks
A numbered list of tasks you can refer to and instructions

## Rules
A numbered list of rules that should be followed

## Examples/Context
Output examples, directory structure, relevant files etc.

## Additional context
Any additional needed context

## Halucinations/Off Ramp
Set expectations on certainty and explain that the expected behavior is to stop and ask questions when needed.
Enter fullscreen mode Exit fullscreen mode

Conclusion

By applying time-tested team development patterns to AI collaboration, you can dramatically improve your AI-generated code. Focus on well-defined, narrow scopes. Communicate clearly. Collaborate effectively. Invest time in planning.

Just as with a junior developer, this process takes patience but yields impressive results. The practices that make development teams successful—Feature Driven Development, Minimal Marketable Features, clear communication, and thorough planning—apply perfectly to AI collaboration.

Try these techniques in your next AI coding session. The results may surprise you.


References

  1. Feature-Driven Development: Pros, Cons, and How It Compares to Scrum - Bob Stanke
  2. Understanding Minimum Marketable Features (MMF) in Software Development - TeamHub Blog
  3. The Prompt Engineering Playbook for Programmers - Addyo Substack
  4. Mastering Amazon Q Developer Part 1: Crafting Effective Prompts - AWS Blog
  5. What is Prompt Engineering and Why It Matters for Generative AI - Tech Stack Blog
  6. I Rebuilt Sparkle in 14 Days with AI - Yash Poojary

Comments 0 total

    Add comment