
There's a question every founder or CTO working with an agency should ask early and often: could we take this codebase in-house tomorrow?
Not because you're planning to. But because a codebase that can't survive without its original authors is a codebase that holds you hostage.
We've seen this play out too many times. A startup works with an agency for a year. The product is live, users are growing, and then the relationship ends -- amicably or otherwise. The new team clones the repo, opens the code, and realizes they're staring at months of archaeology before they can ship a single feature.
That's not a handoff. That's a trap.
Here's a practical checklist for evaluating whether the code your agency is writing is genuinely handoff-ready -- written from the buyer's perspective, not the agency's.
Why Handoff-Readiness Matters (Even If You're Not Planning to Leave)
Let's be clear: this isn't about trust. You might have a great relationship with your agency. You might plan to work together for years.
Handoff-readiness still matters for three reasons:
1. It's a proxy for code quality. Code that's easy to hand off is code that's well-structured, documented, and tested. These aren't separate concerns. A team that builds handoff-ready code is building better software, period.
2. It protects your options. Companies change. Agencies change. Funding situations change. If your code can only be maintained by the people who wrote it, you don't own a product -- you own a dependency.
3. It makes onboarding faster. Even if you never leave your agency, you'll need to onboard new engineers at some point. Handoff-ready code means new team members become productive in days, not weeks.
The test is simple: could a competent developer who has never seen your codebase clone the repo and be productive within a week? If the answer is no, you have a problem -- whether or not you're planning to switch teams.
The Handoff-Ready Code Checklist
Print this. Use it during your next sprint review. Ask your agency how they score on each item.
1. Can You Clone and Run It?
This sounds basic. It's not. You'd be surprised how many codebases fail this test.
What to look for:
- A README with clear, step-by-step setup instructions -- not "install dependencies and run" but actual commands a new developer can follow
- All environment variables documented with explanations of what each one does
- A containerized development environment (Docker or equivalent) so setup doesn't depend on someone's specific laptop configuration
- A seed script or sample data so the app has something to display when you first run it
The benchmark: A new developer should be able to clone your repo and have the application running locally in under 30 minutes. If it takes longer, the setup is either undocumented or fragile.
How to test this yourself: If you're technical, try it. Clone the repo on a fresh machine and follow the README. If you're not technical, ask a developer friend to try. Their experience will tell you everything.
2. Is the Code Documented Where It Matters?
Good documentation doesn't mean comments on every line. It means the right information is captured in the right place.
What to look for:
- Architecture overview: A document (or even a diagram) that explains how the system fits together. What are the main services? How do they communicate? What does the data flow look like?
- API documentation: If the product has an API, endpoints should be documented with authentication requirements, request/response formats, and error codes. Auto-generated docs (Swagger/OpenAPI) are a strong signal.
- Database schema: Not just the schema itself, but explanations of key relationships and design decisions. Why is this table structured this way? What does this status field mean?
- Deployment documentation: How does code go from a developer's machine to production? What are the steps? What could go wrong?
What bad documentation looks like: A README that says "See Confluence" -- and the Confluence page was last updated eight months ago. Or inline comments that say // TODO: fix this later from a year ago.
What good documentation looks like: An architecture document that a new developer reads on their first day and says "Oh, now I understand how this works." It doesn't need to be long. It needs to be accurate.
3. Are There Automated Tests?
"We have tests" and "our tests catch real bugs" are two very different statements.
What to look for:
- Test coverage that matches your product's maturity. An MVP should have tests covering core business logic and critical user flows. A mature product should have broader coverage. There's no magic number, but below 40% for a production application is a red flag worth investigating.
- Tests that test behavior, not implementation. Good tests verify that user-facing functionality works correctly. Bad tests verify that a specific function was called with specific arguments -- they break every time the code is refactored and catch nothing when real bugs appear.
- A CI/CD pipeline that runs tests on every commit. Tests that exist but aren't run automatically are decorative. Every code change should trigger the test suite.
- Tests that actually pass. This sounds obvious, but check. A test suite with 30 failing tests that everyone ignores is worse than no tests at all -- it teaches the team to ignore test failures.
The benchmark question: When was the last time a test caught a real bug before it reached production? If your agency can't answer that, the tests might be there for show.
4. Is the Code Clean and Maintainable?
You don't need to read every line of code to evaluate maintainability. Look for structural signals.
What to look for:
- Consistent coding style. A linter and formatter should be configured and enforced. Mixed indentation, inconsistent naming conventions, and style disagreements in the code tell you there's no shared standard.
- Reasonable file sizes. Files with 1,000+ lines of code are a sign of accumulated complexity that will slow down every future change. Well-structured code is organized into focused, manageable modules.
- Low code duplication. Code duplication under 5% is healthy. Higher than that, and you're paying for the same bug to be fixed in multiple places. Tools like SonarQube can measure this.
- Logical folder structure. A new developer should be able to look at the project's folder structure and understand where things live. If finding the right file requires tribal knowledge, the structure needs work.
- No hardcoded secrets. API keys, database passwords, and credentials should live in environment variables or a secrets manager -- never in the source code. This is a security issue and a handoff issue.
5. Do You Own Everything?
This is the one that catches most founders off guard.
What to look for:
- Full source code access. You should have access to the complete source code repository at all times -- not just compiled builds or deployed applications. If your agency hosts the repo in their GitHub organization, make sure you have admin access or, better yet, move it to yours.
- Third-party accounts in your name. Cloud hosting (AWS, Azure, GCP), monitoring tools, email services, payment processors, analytics -- all accounts should be registered under your company's email and billing. If your agency set these up under their accounts, you're one contract dispute away from losing access to your own infrastructure.
- Domain, SSL, and DNS under your control. Your domain registrar account, SSL certificates, and DNS records should be in your name and accessible to you.
- No proprietary dependencies. If your agency used their own internal framework, libraries, or tools in your codebase, find out what happens when you leave. Can you still build and deploy without access to their systems?
- IP assignment in the contract. Check your agreement. Code written for you should be owned by you. This should be explicit, not assumed.
6. Is There a Knowledge Transfer Plan?
Code is only part of the handoff. Knowledge is the other part -- and it's harder to transfer.
What to look for:
- Documented known issues and technical debt. Every codebase has tech debt. The question is whether it's documented and prioritized, or hidden and growing.
- Architecture decision records. Why was this database chosen? Why does authentication work this way? Why didn't the team use the more obvious approach? These "why" decisions are the hardest to reverse-engineer from code alone.
- Runbooks for common operations. How do you deploy? How do you roll back a bad deploy? How do you debug common issues? These should be written documents, not tribal knowledge.
- Transition period with overlapping access. A clean handoff includes a period where the outgoing team is available to the incoming team for questions. This is standard practice, not a special request.
Red Flags That Your Code Is NOT Handoff-Ready
These should set off alarm bells during your next sprint review or technical check-in.
"We'll document everything at the end." Documentation written retroactively is always incomplete. If they're not documenting as they build, they won't remember what they've forgotten by the time they finish.
You've never seen the source code. If you don't have access to the repository, ask for it today. If the answer is anything other than "here's the link," you have a problem.
Deployment requires a specific person. If only one person on the team knows how to deploy, your product is one vacation day away from a production incident with no fix.
No staging environment. If code goes directly from a developer's machine to production, there's no way to test changes safely. This is a quality issue and a risk issue.
Messy or nonexistent version control. If the team isn't using Git (or equivalent) with meaningful commit messages and a clear branching strategy, reconstructing the history of changes will be impossible.
Agency-owned infrastructure. If your cloud hosting, domain, or critical services are under the agency's accounts, you're dependent on them for access to your own product.
"You don't need to worry about that." Any time a technical question is deflected rather than answered, take note. You're the owner of this product. Every technical decision is your business.
How We Build for the Handoff from Day One
We're an agency writing about handoff-readiness, so let us be transparent about our own practices.
Our philosophy is simple: your code, your product, your freedom. We mean that literally.
From sprint one, every project we build includes:
- Client-owned Git repository with full access from day one
- CI/CD pipeline configured and documented before the first feature ships
- Architecture documentation maintained as a living document, not an afterthought
- All third-party accounts registered under the client's company
- Clean deployment process documented in runbooks
- Code quality standards enforced through automated linting and review
We build this way because we've been on the other side. When we built Formester, our own SaaS product, we experienced firsthand what it means to live with a codebase for years. Every shortcut you take during development becomes a tax you pay during maintenance. We don't take those shortcuts on our products, and we don't take them on yours.
The goal isn't to keep clients dependent on us. It's the opposite. We want you to stay because the partnership works -- not because you can't leave. Our 80%+ client retention rate tells us that building for your independence actually makes for stronger, longer relationships.
Questions to Ask Your Agency Today
If you're working with an agency right now, here are questions you can ask in your next meeting.
1. "Can I have repo access? I'd like a developer to do a quick code review." The right answer is immediate access, no hesitation. Any resistance is a red flag.
2. "Walk me through what happens if we need to bring this in-house." Listen for specifics. A team that builds for handoff has thought about this. A team that hasn't will fumble the answer.
3. "Who owns the cloud infrastructure accounts?" If the accounts are under their company, ask for a migration plan. This should happen now, not at the end of the engagement.
4. "How would a new developer get this running locally?" If the answer involves "they'd probably need to talk to specific person," the setup isn't documented well enough.
5. "What's your documentation practice -- do you write docs as you go or at the end?" "As we go" is the only good answer. "At the end" means "probably never in full."
6. "What known technical debt exists, and where is it documented?" Every codebase has tech debt. A team that can't articulate theirs either doesn't track it or doesn't want to tell you about it.
Protecting Your Investment
The code your agency writes is one of your most valuable assets. It represents months of decisions, iterations, and investment. Whether you plan to work with your current agency for another five years or transition to an in-house team next quarter, the code should be ready.
Handoff-readiness isn't about planning to leave. It's about owning what you've paid for. A product built to hand over is a product built to last.
If you're not sure where your codebase stands, we do honest code audits. We'll tell you what's working, what needs attention, and whether your code is ready for a handoff -- no matter who built it.
Get practical engineering insights
Real lessons from building products - ours and our clients'. No spam. Monthly.

