AI-Assisted Software Development: A Comprehensive Guide with Practical Prompts (Part 1/3)

Aalap Davjekar
10 min readAug 25, 2024

--

A cute robot methodically plans his next big software project. Image created by Midjourney.
A cute robot methodically plans his next big software project. Image by Midjourney.

This is the first post in a series of three, each of which goes into great detail about how to properly integrate AI into your workflow when dealing with specific processes inherent to software development.

Here is an overview of this series:

Part 1: Laying the Foundations — Project Planning, Design, and Architecture (An Introduction)

Remember the days when we’d spend hours scratching our heads over a particularly tricky bit of code, or when we’d dream of building that perfect app but felt limited by our skills? Well, let me tell you, those days are quickly becoming a thing of the past. This guide will show you why.

Like many of you, I started as a solo developer with a lot of enthusiasm and dreams. I’d always been fascinated by the potential of technology, but I often found myself hitting walls — whether it was struggling with complex algorithms, getting lost in the maze of system architecture, or simply not having enough hours in the day to bring all my ideas to life.

My introduction to ChatGPT (and later, Claude) changed all of that. In this guide, I’m going to take you through everything I’ve learned about mastering AI-assisted software development. We’ll cover it all — from setting up your AI-enhanced workspace to leveraging AI for complex tasks like system design, coding, testing, and even documentation.

I’ve put these techniques into practice and seen amazing results. In fact, I recently wrote about it in this tutorial on building a web-scraping app without any coding whatsoever. This guide builds on those insights, providing you with a comprehensive roadmap to transform your development process.

We’ll assume a basic understanding of coding and AI, but don’t worry if you’re new to AI-assisted development — we’ll take it step by step.

Setting the Stage

Trust me, a little preparation goes a long way. First things first, pick your AI sidekick. For the purposes of this guide we’ll be using Claude, which is slightly better at coding than ChatGPT, in my humble opinion, and has the right features (such as a project knowledge database) we need to properly set up project goals. The information here is almost similar if you were to use ChatGPT.

Setting Up Your Development Environment

Here’s a quick checklist to get you started:

  1. Choose your preferred IDE or text editor: Whether you like VS Code, Sublime Text, or vim, stick with what you’re comfortable with. The goal is to enhance your coding, not complicate it.
  2. Create a dedicated space for AI interactions: I like to keep a separate window or tab open for my AI assistant. This helps me context-switch between coding and brainstorming with AI.
  3. Organize your prompts: Trust me on this one — you’ll be crafting a lot of prompts. Create a document or use a note-taking app to save your most effective prompts. It’s a game-changer for productivity.
  4. Version control: If you’re not already using Git, now’s the time to start. AI can sometimes generate a lot of code quickly, and sometimes it breaks. You’ll want to be able to track changes and revert if needed.

The Mindset Shift: AI as a Collaborator, Not a Replacement

Now, let’s talk about something that took me a while to fully grasp — the right mindset for AI-assisted development. Here’s the thing: AI isn’t here to replace your skills or take over your job. Think of it more like having a super-smart intern who’s always ready to help but needs your guidance and expertise.

When I first started, I made the mistake of treating AI like a magic code generator. I’d throw vague prompts at it and expect perfect, production-ready code. Spoiler alert: that didn’t work out so well. The key is to approach AI as a collaborator in your development process.

Here are some mindset shifts that really helped me:

  1. AI is a tool — you’re the craftsperson: Just like any other tool in your dev toolkit, AI is there to augment your skills, not replace them. You’re still the one calling the shots.
  2. Embrace the iterative process: Don’t expect perfection on the first try. Use AI to generate initial ideas or code structures, then iterate and refine.
  3. Verify and understand: Always review and understand the code AI generates. It’s an opportunity to learn and ensure the code aligns with your project’s needs.
  4. Be specific in your requests: The more precise your prompts, the better the output. Treat it like explaining a task to a human colleague.
  5. Learn from AI suggestions: When AI provides alternatives or improvements, take the time to understand the reasoning. It’s a great way to expand your coding knowledge.

Remember, the goal isn’t to hand over the reins to AI, but to create a synergy between your creativity and problem-solving skills and AI’s vast knowledge and processing power. It’s about augmenting your abilities, not replacing them.

Prompt Ideas to Get You Started

To help you hit the ground running, here are a few prompt ideas you can use right away:

  • For setting up a new project:
I'm starting a new [type of project] using [programming language/framework]. Can you suggest a basic file structure and essential dependencies I should consider?
  • For understanding AI’s capabilities:
What are the key strengths and limitations I should be aware of when using you for software development tasks?
  • For creating a coding plan:
I want to build [brief project description]. Can you help me break this down into manageable tasks and suggest an order of implementation?

I’ll share more specific and advanced prompts as we progress through the guide but these should give you a good starting point.

Project Initialization and Planning

Now that we’ve got our AI assistant at the ready let’s look at one of the most crucial (and often underappreciated) parts of any project: initialization and planning. Trust me, getting this part right can save you hours of headaches down the road.

Creating a Knowledge Base for Your AI Assistant

Remember how I mentioned treating your AI like a super-smart intern? Like any new team member, your AI needs some context about your project. This is where creating a knowledge base comes in handy.

When I first started with AI-assisted development, I’d jump straight into asking for code. Big mistake. I quickly learned that taking a few minutes to “brief” my AI assistant paid dividends throughout the project.

Here’s how I go about it:

  1. Project Overview: Start with a brief description of your project. What are you building? What problem is it solving?
  2. Tech Stack: List out the languages, frameworks, and tools you’re planning to use.
  3. Key Requirements: Outline the main features or functionalities you want to implement.
  4. Constraints: Any limitations or specific requirements? Maybe you need to support older browsers or have strict performance criteria.
  5. Coding Style: If you have specific coding conventions or architectural preferences, mention them.

Here’s a prompt to help you get started:

I'm starting a new project and I'd like to create a knowledge base for you to reference throughout our development process. The project is [brief description]. We'll be using [tech stack]. The key features we need to implement are [list features]. Some important constraints to keep in mind are [list constraints]. In terms of coding style, we prefer [mention preferences]. Can you summarize this information and suggest any additional details we should include in our knowledge base?

Breaking Down Projects into Manageable Components

Once you’ve got your project overview, it’s time to break it down into bite-sized pieces. I used to struggle with this, either making my components too large and unwieldy or getting lost in the minutiae. AI has been a game-changer for finding that sweet spot.

Try this prompt:

Based on the project overview we just created, can you help me break down this project into manageable components or modules? For each component, please suggest:
1. A name for the component
2. Its main functionality
3. Potential challenges in implementing it
4. How it might interact with other components
Please also recommend a logical order for developing these components.

I’ve found that AI often comes up with component breakdowns that I wouldn’t have thought of, sometimes leading to more modular and maintainable code structures.

A view of Claude’s “Create Project” menu where users can set up unique settings for Claude depending on their project’s goals and requirements.
The reason why I prefer using Claude is because it allows users to create “Projects” that let you create specialized use cases for Claude — each with its own code and knowledge base.

Using AI for Project Roadmapping

Once you have your components defined, it’s time to create a roadmap. This is where I really appreciate having an AI assistant. It’s like having a seasoned project manager at your fingertips, helping you foresee potential pitfalls and optimize your development sequence.

Here’s a prompt I often use:

Using the component breakdown we've created, can you help me develop a project roadmap? Please include:
1. A suggested order for developing the components
2. Estimated time frames for each component (assuming I'm working on this part-time)
3. Potential milestones or checkpoints
4. Any dependencies between components that might affect the development order
5. Suggestions for any proof-of-concept or prototype stages that might be beneficial

The roadmap AI generates usually gives me a solid starting point, which I then adjust based on my personal knowledge of my working style and any external deadlines.

Prompt Ideas for Project Planning

To help you make the most of AI in your project planning phase, here are a few more prompt ideas:

  • For risk assessment:
Based on our project plan, can you identify potential risks or challenges we might face during development? For each risk, suggest possible mitigation strategies.
  • For technology selection:
We're considering using [Technology A] or [Technology B] for [specific functionality]. Can you compare these options in the context of our project, considering factors like performance, ease of implementation, and future scalability?
  • For estimating project scope:
Given our project requirements and component breakdown, can you help me estimate the overall scope of this project? Please provide a rough estimate of the total development time and suggest any areas where we might need to adjust our expectations or seek additional resources.

Design and Architecture with AI

One of the most crucial (and often challenging) phases of software development is design and architecture. This is where we lay the foundation for our entire project, and let me tell you, having an AI assistant in your corner during this phase is like having a secret weapon.

The Subtle Power of “Think Step-by-Step” Prompts

Remember how I mentioned the importance of clear, specific prompts? Well, when it comes to design and architecture, I’ve found that “Think step-by-step” prompts are absolute gold. They encourage the AI to break down complex problems and provide detailed, structured responses.

Here’s a prompt template I often use:

Let's think step-by-step about the architecture for [specific component or system]. Please consider:
1. The main functionalities this component needs to support
2. Potential data structures or models
3. Key classes or modules and their responsibilities
4. How this component will interact with other parts of the system
5. Potential design patterns that could be applicable
6. Considerations for scalability and maintainability

For each step, provide a brief explanation of your reasoning.

I’ve found that this approach not only yields more comprehensive and thoughtful responses from the AI but also helps me organize my own thoughts about the design.

Iterating on AI Suggestions

Now, here’s where the real magic happens. Once you get that initial response, don’t just take it and run. This is your chance to engage in a back-and-forth with your AI assistant, refining and improving the design.

I like to use prompts like these to dive deeper:

Thank you for that initial design. I have a few follow-up questions:
1. What are the potential drawbacks or limitations of this approach?
2. Can you suggest an alternative design that prioritizes [specific concern, e.g., performance, flexibility]?
3. How would this design need to change if we needed to [potential future requirement]?

This iterative process often leads to insights and improvements that I might not have considered on my own. It’s like having a brainstorming session with a tireless, knowledgeable colleague.

Documenting Architecture Decisions

One of the best pieces of advice I ever got was to document my architecture decisions. It’s saved me countless hours of head-scratching when revisiting projects months later.

Try this prompt:

Based on our discussion of the [component/system] architecture, can you help me create an Architecture Decision Record (ADR)? Please include:
1. The context and problem we're addressing
2. The options we considered
3. The decision we made
4. The consequences (both positive and negative) of this decision
5. Any related decisions or trade-offs

This not only helps you keep track of your thinking but also creates valuable documentation for your future self or any team members who might join the project later.

Prompt Ideas for Design and Architecture

To help you make the most of AI in your design and architecture phase, here are a few more prompt ideas:

  • For exploring design patterns:
Given our requirement to [specific functionality], which design patterns might be applicable? For each suggested pattern, please explain how it could be implemented in our system and what benefits it would provide.
  • For database schema design:
We need to design a database schema for [specific part of the system]. Based on our requirements, can you suggest an initial schema design? Please include tables, key fields, and relationships. Also, consider potential indexing strategies for performance.
  • For API design:
We're planning to create a RESTful API for [specific functionality]. Can you help design the endpoints we'll need? For each endpoint, suggest the HTTP method, URL structure, request/response formats, and any authentication requirements.
  • For scalability considerations:
As we design our system, we need to ensure it can scale to handle [expected load]. Can you review our current architecture and suggest modifications or additional components we might need to ensure scalability? Please consider both vertical and horizontal scaling strategies.

Remember, you are still the main architect of your project. The AI provides suggestions, insights, and analysis, but the final decisions are yours. Your understanding of the business requirements, your experience with similar systems, and your intuition about what will work best for your specific context are all vital. Use AI to augment and challenge your thinking, not to replace it.

--

--

Aalap Davjekar
Aalap Davjekar

Written by Aalap Davjekar

Technical writer and web developer based in Goa, India. Passionate about working at the intersection of art and technology.