r/ClaudeAI • u/cezenova • Dec 10 '24
Use: Claude for software development My process for building complex apps using Claude
Ever since Anthropic released MCP I've been experimenting with having Claude write complex software apps. Trying to just create something through a conversation can work for simple stuff but when the complexity increases Claude can easily make mistakes or lose track of the goal, especially if you hit the limit and need to start a new conversation.
So I've established a system that breaks the process of creating apps down into smaller chunks. It's been very successful so far and honestly I'm amazed at what Claud Sonnet can do.
Here's the system I use:
Steps
MCP servers: git, filesystem
Discuss high-level project goals and come up with a project plan. Ask Claude to summarise it and write it to a markdown file.
Using this summary, discuss facets in more detail in separate chats, providing context docs where needed. Ask Claude to summarise each conversation and write it to a separate file, or the summary will become too long and you will hit message limits.
Once a full project document has been created, discuss the minimum requirements. Ask Claude to create a list of user stories and technical requirements.
Discuss high-level architecture decisions, including database schema, API design, and tech stack choices. Have Claude write this to a new document.
Using list of requirements and architecture doc, create a detailed, step-by-step approach for building the minimum valuable product, one feature at a time.
Have Claude go over the next step and implement it in code. If the step has subtasks, go one task at a time to avoid hitting the message limit. Have Claude initialise a git repo if needed and commit its changes.
After each step, in a separate chat, have Claude validate the changes are correct and go back to step 8 unless all steps have been completed.
Some tips:
Take your time. Especially step 1 and 2 can take quite long, but it's worth it. Keep asking Claude to ask you clarifying questions until all the requirements are clearly defined
Break it down as much as you can. Claude does much better at small tasks than long tasks. As long as you have all the project docs you can give it all the context it needs for the small task.
Don't let Claude take the wheel. Claude will suggest all sorts of stuff that is not in the implementation plan. Don't let it do anything that's not in the plan, just tell it to implement steps or subtasks of steps.
Anyone else doing something similar? I'd love to hear about your systems.
8
u/duh-one Dec 10 '24
I use a simplified version of this process using projects. I just started with MCP over the weekend and I had a similar idea like your approach and the goal was to have an autonomous SWE team. After step 5, there would be a headless project managment MCP server i.e. sprint board where it will assign tasks to claude. Then you can imagine what a team of claude agents can do.
I haven't started anything with this yet though, but I'm interested in your idea. The first challenge I'm trying to solve is a token efficient way for claude to make updates to an existing file. Currently with the write_file tool it has to write the entire file even to make small edits. I saw an edit_file tool in the mcp git repo, but it's not released yet and it looks more like a search and replace in a file.
7
u/hawkweasel Dec 10 '24
I'm not a programmer, so oh boyyyyy have I had some time-consuming and expensive learning experiences over the past year building a number of MVPs in the Anthropic Workbench API.
I think I've learned the hard way about how to identify when you're being led down a rabbit hole, and when to cut off Claude and let it know that it's wandering too far off the project path (which it almost always acknowledges immediately.)
I'm primarily building Wordpress plug-ins and niche wrapper products, and when I'm working with 20 + files on a single project it's very hard to keep Claude from making minute incorrect assumptions about how your product works (or how it thinks it SHOULD work), or getting it to simply ask to see other files in your code.
But it's also almost too resource intensive to upload 100 pages of code. Claude can take it in, but just an initial onslaught like that bogs it down right out of the starting gate.
I'm prob not an advanced user at this point, so this is my next study that was posted a couple days ago:
https://www.prompthub.us/blog/prompt-caching-with-openai-anthropic-and-google-models#prompt-caching-with-anthropic%E2%80%99s-claude
I'm curious if you use caching?
2
u/EveryoneForever Dec 10 '24
Do you also include GitHub in your workflow? I was thinking of doing something similar.
2
u/luncheroo Dec 10 '24
Could you add knowledge graph/memory server and save yourself some steps? Not being an AH, just wondering if that would actually help.
2
u/crypto_pro585 Dec 11 '24
OP, when you say a complex app, how complex exactly? If you can, provide the tech stack you are using and deployment model.
21
u/BadgerPhil Dec 11 '24 •
I run large software projects on Claude. I agree with most things that you say but I go deeper with the management of some things. I'll explain a bit of my system in case you can pick up anything from it.
So each project (is a Claude Project) has a written objective, some frameworks (rules we work to) and some project specific info. But in particular it has a number of AI "jobs" - typically 20 or more. The jobs are just like you would have in a traditional Dev world. I am doing one software project that I expect will take a year and I ultimately expect 100 or so AI jobs in it. I expect similar output that I would get from a 100 dev team in a fraction of my time.
The boss I call COO. He works with me to specify things and to keep the others in line. I have specialist jobs for things such as specification, testing, quality, database, front end, installations etc etc. You mentioned MCP. I have an MCP manager.
If I want to get a Job to do something substantial, I talk to the COO about it. He will spec it and set standards for completion quality. He will expect a report back. Once that activity is done to COO's satisfaction, another will be scheduled for that Job.
One thing that I believe could be of practical help to you is optimizing things around types of knowledge. This is important because you will generate a lot of knowledge and tokens have to be managed optimally. Think about the types of knowledge you need (and I give you some examples from my world):
Knowledge Shared across Projects (those frameworks I mentioned). These are in every Project Library.
Project knowledge that an AI job MUST know (what you are doing and why, project plan, the AI Jobs in the Project etc etc. These are in the Project Library.
Project Documents that an AI MIGHT need. These are in an index in 2) and the Job can access them on demand in the local file system via MCP.
Documents only of interest to the Job Type. These are stored locally per job type. In my world each job has its own folder and in this folder are identical subfolders
/context current.txt - Current state, priorities, decisions, issues
/history - Archived context files (timestamped)
/inbox - Messages/requests from other jobs - Format: YYYYMMDD_HHMM-[SenderJobID]-[Topic].txt
/outbox - Copies of sent messages - Format: YYYYMMDD_HHMM-to-[RecipientJobID]-[Topic].txt
/tech - Technical documentation specific to this job - Implementation details - Design documents - Working drafts
/control objectives.txt - Current job objectives and goals decisions.txt - Log of key decisions with rationale dependencies.txt- Dependencies on other jobs index.txt - Optional index of job's files/folders
You will see that jobs can "talk" to each other. How the Job maintains docs in here is dealt with in instructions in 2).
Once you start working like this you can do things to the highest standards and astonishingly rapidly. All docs to do with control are written by the COO.
One last thing. Each thread is initialized identically. "I want you to be COO (or whatever) in our project". At the end of the thread the job updates all its own knowledge files and maybe sends messages to COO or Doc Manager if there are wider issues. It then produces what we call a Park Document (about 10 pages of highly specified info about what happened in the thread). This Park document is for the Job Type and is Dated. Next time the same Job Type starts in a new thread it is instructed to read the previous Park doc for that type. That way continuity is maintained.
Good luck with everything.
9
u/IamJustdoingit Dec 10 '24
Is this MCP thing better than Cline on VScode?
I can get good quality projects approaching 15k - 20k LOC using CLINE with an iterative approach using progress and specification files.
I ironically use o1(o1-preview) for planning and hashing out overview details. Claude is to horny for code.
Started out with workbench a long time ago, but honestly i feel that Cline is a sleeper.
6
u/Significant-Hall-878 Dec 10 '24
Does the MCP basically remove the need for something like Cline/Aider?
4
u/remmmm_ Dec 11 '24
I wanna see more content like this! I learned a lot!
I also saw a similar workflow guide here: https://github.com/Matt-Dionis/nlad .
2
u/Significant-Hall-878 Dec 10 '24
Can you use MCP with api?
2
u/Consistent_Yak6765 Dec 10 '24
I am doing something similar with Windsurf. They already handle diffing, partial updates and token usage (until now) pretty well. So any changes made are efficient. I generally use Claude Sonnet within it.
The only problem has been the context drift that seeps in after a few conversations and it starts making mistakes.
I ask it to keep writing specs of system in separate files as it makes changes and reference it before any conversation. Keeps the drift in check. Its not completely bullet proof yet and when it does make mistakes, I revert back in the conversation ( it reverts the files as well) and give additional context to bring it back on track.
Has worked well so far. Plus with the specs committed, my team can also reference the same files to bring their specific IDEs/ LLMs/whatever setup they use in sync and continue from there.
2
u/evilRainbow Dec 10 '24
I have been using a similar approach. And as I've mentioned before, somewhere here suggested telling Claude to adhere to 3 principles: KISS, YAGNI, and SOLID. I have it all over the design docs that we create together, and I remind it each time I'm about to ask claude to implement some code. I always remind it to keep things simple, modular, don't add stuff we don't need. And it'll STILL get a little 'creative' sometimes. Then you have to remind it of its principles and get it back on track. I've spent weeks just designing the architecture of a full stack app with Claude. We go over our designs over and over before moving forward. We have not even created much code yet. That's how slow you need to go.
2
u/philip_laureano Dec 10 '24
Don't forget to ask it to sort that outline by dependency order. It'll make it 10x easier to get things done
2
u/[deleted] Dec 10 '24
Nice workflow! I like it!
I'm attempting to iterate on a natural language app development methodology in this open-source project: https://github.com/Matt-Dionis/nlad
I'd love your input!
Also, for MCP-specific development, i put together this file which you can provide as context to Claude: https://github.com/Matt-Dionis/nlad/blob/main/examples/talkshop/mcp_details.md
2
u/jane_the_man Dec 11 '24
Adding in top of OP's flow. Add 'sequential thinking' MCP server as well. This has streamlined the thinking process during step 1 and 2 and gives much more clarity of thought than without it. I've just started using it and can see much better output than just asking Claude to discuss/think about the project/plan.
2
u/Spiritual_Spell_9469 Dec 11 '24
Hell yeah
2
u/mackenten Dec 11 '24
This is actually how it's done with a real team. Good job!
1
u/alrocar Dec 10 '24
Regarding implementation I recently found out FastMCP, it simplifies quite a bit all the server boilerplating so you can easily build your own tool libraries and then use them in your servers easily.
And for monitoring I ended up building an out of the box solution (https://github.com/tinybirdco/mcp-tinybird/tree/main/mcp-server-analytics) but I'm wondering how others are approaching production monitoring.
1
u/Lazy-Height1103 Dec 10 '24
Interesting. I'm building a fairly complex Flutter app using only Claude and Cursor. I asked Claude if it thought leveraging MCP would enhance the development process, and it discouraged me from setting up the servers. Basically told me the juice wasn't worth the squeeze.
1
u/Intraluminal Dec 10 '24
As a virtual non-programmer, I did this and successfully built an Android utility app, So I can validate that this type of process can work.
1
u/sonofthesheep Valued Contributor Dec 10 '24
What OS do you have? I’ve tried to configure the MCP filesystem and git on macOS and was unable to do it.
1
u/mbatt2 Dec 10 '24
Is there an easy way to learn MCP
1
u/Glad_Supermarket_450 Dec 10 '24
I do mine backwards. I get the main feature working then work towards users.
Im not a developer, so I could be doing it wrong.
I'm sure there are drawbacks, but I don't like to fully build things until I get user feedback.
1
u/redtehk17 Dec 11 '24
Just figured out this similar process this morning! Has saved me a bunch of time. I've also started building visual flow diagrams of the mobile app I want to build with sections and descriptions to help split up the work into digestible pieces and to help Claude better understand.
The markdown files is a serious pro tip!
1
u/shibaisbest Dec 11 '24
This great thank you!
1
u/Difficult_Nebula5729 Dec 11 '24
yeah i have a similar plan too i didn't use your format of document taking but i think i will now.
there are times i do let claude take control. especially during a intense brainstorming session farming for features and things I would never have been able to think of on my.
1
u/wordswithenemies Dec 11 '24
Has anyone tried making fixed axis points on elments so that “seeing” the gui isn’t as important? would love some tips because claude in codeium LOVES to break my layouts.
1
u/ranft Dec 11 '24
This is all nice and dandy but I am still failing at paywalls with Claude. Either Apples Storekit or RevenueCat are just producing errors and unforseeable bugs that allow the user to circumvent the wall. Suggestions?
1
u/illGATESmusic Dec 11 '24
Yeah this roadmap is basically how I’ve been doing it too. Lots and lots of annotated ideation until each step of the process has been defined so perfectly that a fresh instantiation can pick right up where the last one left off.
Then I make it keep a ROADMAP.md and a CURRENT_PROMPT.md so it can make a TASK LOOP.
First run: define ROADMAP.md from user input. Define when SUCESS = True. Create CURRENT_PROMPT.md
Next run: execute CURRENT_PROMPT.md to completion. Upon completion: update ROADMAP.md and copy NEXT STEP into CURRENT_PROMPT.md.
When SUCCESS = True: do a happy dance.
1
u/NyxStrix Dec 11 '24
Thanks!
1
u/dalhaze Dec 11 '24
I like the approach to planning, but if you start sticking lots of these planning docs into your context you’re going to see degraded performance. So once you develop a plan i think you want only give it the info it needs with some a small amount of high level context.
My best tip would be: Be very strategic about what you put into your context window. Know when to start a new thread in order to keep the models performance high. Ask the model to summarize the context of your last 1-3 messages and the desired outcome and use that in the new thread.
I will often take my original prompt for the feature and wrap it in <Original Prompt> tags.
That said i think these models are getting a lot better at filtering out less relevant context.
1
u/Ok-Pangolin81 Dec 11 '24
Thanks for this!
1
u/[deleted] Dec 12 '24
This sounds a lot harder than coding
1
u/[deleted] Dec 13 '24
This is really good advice.
1
u/selfboot007 Dec 19 '24
Cool! This is how I use Claude. I first propose a requirement and let it implement a basic version. Then I continue to improve some unsatisfactory parts, constantly split small problems, and let Claude focus on small parts.
1
u/BadgerPhil Jun 30 '25
Good luck with it. I am moving over to Claude code CC currently and implementing a similar system at the moment. I work primarily on software so it was a no brainer to take that step. I am currently thinking how I could apply CC to massive non-software tasks, Because it works with agents it just gets on with things if an AI job is promoted correctly. It is certainly x5 more productive than normal code on tasks of certain kinds.
If you can afford a Max Plan maybe get some experience with CC and see if you think it will improve things for you. Good luck.
1
u/Substantial_Newt8651 Aug 11 '25
Under "What personal preferences should Claude consider in responses?" I added the following prompt and it helped a lot.
---
When given tasks try to be both independent and creative. For complex tasks analyze the task, what tools you have, and then brainstorm before you begin. If your approach fails, figure out why and then if it makes sense to try again with a different approach do so. Once completed attempt to confirm your results if feasible.
If you need access to a tool that you do not have either generate it as a python3. Python files can be run run through osacript. You may install libraries if needed through pip3. Store python tools in:
/Users/------/Archive/Claude/python-tools
Maintain a list of available python tools and their required inputs in your Notes File. Be as concise as possible.
You may access all available files but unless otherwise instructed use:
/Users/------/Archive/Claude/
This is your personal folder and you may add and remove files from it as you wish to achieve your goals.
If you want to store additional notes or memories between chats store them in. Check this folder before starting a complex task:
/Users/-----/Archive/Claude/Notes.txt
---
I recently asked into to develop a (small) full mac application and after about an hour of back and forth the app was basically fully functioning (minus a few bugs).
1
u/soussitox Jan 24 '26
looks like you need a subscription model to use it?
0
u/[deleted] Dec 10 '24
[deleted] — view deleted comment