Hey! I just shared a write-up on something I learned while rebuilding a product with AI agents:) ...Hey! I just shared a write-up on something I learned while rebuilding a product with AI agents:) ...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Hey! I just shared a write-up on something I learned while rebuilding a product with AI agents:)
The main idea is pretty simple: Don’t put all your product context in one giant agent file.
Keep the main file small, and put the real product knowledge inside structured docs that the AI can navigate when it needs them.
This has helped me a lot when working on a SaaS product with a lot of business logic!
Sharing the full breakdown here:
I'm offering consulting services to set this up! :)
Post image
MD Rafee 's avatar
The giant agent file problem is real, I hit context limits constantly before splitting docs by domain. Curious how you decide what counts as core context versus something the agent should look up on demand.
Sebastian's avatar
I think core context can be a small product overview, summary of technical architecture doc and repository rules/naming conventions.
Then you include a sort of table of contents where you add the different paths to other important docs that describe features !
Adeagbo's avatar
What a nice tip! Are you into product development?
Sebastian's avatar
Yes! I'mcurrently a lead tech at a stratup and im migrating the old app into the new stack :) So I'm doing the job of a product owner and also building the whole app!
Mark's avatar
The table-of-contents-in-the-main-file pattern is the key move here - it keeps the agent's default context small while still giving it a map to go fetch the architecture or naming-convention doc only when the task actually touches that domain.
Sebastian's avatar
Yeah! That's right!
I also really like the feature-spec skill I made for the repo. Having AI ask you further questions to get into the edge cases and fill better the documentation files.
Nazar's avatar
Yasno Design Agency logo
keeping the main file small is underrated tbh
Maty's avatar
This maps to how I think about client documentation too, keep the source of truth thin and let people drill into details only when they need them. Curious if there was any part of the product where the thin main file approach broke down and you had to load more context up front.
Sebastian's avatar
Great to hear @Maty Sandoval ! I'm thinking to do a template repo or a sort of framework so others can use it also!
Hmm I don't think so, as the main file always gets updated if there is a new doc added to the repo. So if I add a new document, the main file will add it too, so the ai knows it...
Tan's avatar
Client documentation is always such a tricky part.. great job!! 🎉
Sebastian's avatar
I think the trick is to see it as the app great build from the documentation, so the docs are the start not something to do after :)
Kabir's avatar
Split Creatives logo
This makes a lot of sense. Keeping the main context small and letting the AI pull in the right docs when needed seems way easier to manage as the product grows.
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started