Know Before You Rewrite: Using AI Agents to Map Technical Debt Before You Fund It
Technical debt slows growth when nobody can explain what the system does. See how AI agents produce an application dossier before you fund modernization.

The archaeology tax
Your VP Engineering has a modernization request on the table. The number is large, the timeline is optimistic, and the question that decides everything has no answer yet: what does the system actually do?
Before anyone can choose between a rewrite, a wrapper or a retirement, someone has to reconstruct the architecture, the dependencies and the business rules. Sparq calls that cost the archaeology tax. Senior engineers pay it in weeks of reading code, tracing integrations and interviewing the few people who remember why a module behaves the way it does.
Those people are scarce, and they carry delivery commitments. Every week they spend on excavation is a week the roadmap loses. The tax lands on growth: features slow down, risk reviews stall, and the budget conversation starts from guesses.
Too many modernization budgets are approved at exactly this point, before anyone can explain the system. Technical debt becomes a growth constraint because nobody can price it with evidence.
You can't prioritize what you can't see, and you can't price what you can't explain.
What an application dossier contains
An application dossier is the written explanation of one repository, produced before a funding decision. Each dossier includes:
- Technology inventory: languages, frameworks, libraries, data stores and build tooling, with versions
- Architecture diagrams: components, dependencies and where the application connects to the rest of the estate
- Business context: the user roles, workflows and business entities the code actually implements
- Code health: deprecated and end-of-life frameworks, complexity, test-coverage gaps, and a health score
- Security and dependency findings: known vulnerabilities (CVEs) across direct and inherited dependencies, committed secrets, insecure code patterns
- A phased modernization roadmap: a dependency-ordered, effort-sized sequence of work
You get one dossier per repository. Then comes the view that matters most to a budget owner. Sparq consolidates the dossiers into one cross-repository picture of shared dependencies, integration points and the workflows each system carries, and reconciles it against the technical-debt backlog your team already keeps. The result is a single, evidence-based view of the estate.
How Blueprint.IQ produces one
Blueprint.IQ, built on Claude by Anthropic and stress-tested in The Shop, Sparq's proving ground for operational AI. It works in two stages. Established open-source scanners run first and produce the security and dependency findings. A swarm of AI agents then reads that structured output, along with the relevant code and configuration, and writes the architecture, business context and roadmap. The analysis runs in hours per repository. A first engagement, covering a handful of priority repositories through to a validated, consolidated roadmap, typically takes about five weeks.
Buyers ask about trust first, so here is the trust model:
- Read-only, no production access. Blueprint.IQ reads source code at rest. It cannot modify code, and it has no write path into your source control, pipelines or runtime environments.
- Your environment, your choice of model. By default it runs inside your own Claude Code or GitHub Copilot tenancy, under your existing enterprise terms, and sends nothing to Sparq. Where you prefer, Sparq can run it in a dedicated, isolated non-production environment, with no code retained after the analysis and nothing used for model training.
- Human review and traceability. Sparq engineers validate the analysis before it reaches you. Every security finding traces to the scanner that produced it, and every report is stamped with the exact commit it assessed. Every finding is a recommendation; nothing changes automatically.
Each of those choices answers a question an enterprise architect or InfoSec lead will raise in the first meeting. The agents produce the first draft of understanding. Senior engineers decide what stays in it.

What the dossier cannot tell you
A dossier sees what lives in the repositories. That boundary shapes how to read it.
The dossier flags end-of-life frameworks and libraries inside the code. Operating systems and infrastructure sit outside it. A plant floor still running Windows XP will not appear in a repository scan, so it needs a separate check.
Absence also carries information. Picture a new factory machine with no code connecting it to the ERP. The dossier will show no integration path, and that gap is a finding in its own right: someone is moving data by hand or by spreadsheet.
Two more boundaries matter. The assessment reads code at rest, so it does not test the running application or replace penetration testing. And it is analysis that informs decisions; it is not a compliance attestation. Where a scanner or vulnerability source is unavailable, the report says so by name and never reports a clean result it cannot substantiate.
Every dossier states its coverage and its limits openly. A report that says what it cannot see gives you a firmer basis for a budget than one that implies full visibility.
Two estates, one problem: debt nobody could see
Two recent Sparq engagements show the archaeology tax from different sides. In one, a portfolio built over two decades had outgrown anyone's ability to explain it, and the carrying cost kept rising. In the other, a company built through acquisitions could not see across the systems it had inherited. Both started from the same question: what is actually running, and what will it take to change it?
- A freight and logistics company: debt as a carrying cost. More than 200 applications, two decades old, with no documentation and no clear owners. Maintenance and security costs kept rising with no way to prioritize the work. Sparq ran Blueprint.IQ against two production codebases in an isolated environment, with no code retained. Within hours, the team had a full architecture and security dossier and a phased roadmap.
- A global manufacturer built by acquisition: debt as a visibility gap. Thirty ERP instances across sixteen domains, separate plant systems with no shared view, end-of-life software on factory floors, and auditors asking for evidence the estate couldn't produce. Sparq scoped an assessment that pairs Blueprint.IQ on priority repositories with a landscape review, which covers what a code scan can't see, and reconciles both against the company's existing technical-debt backlog to produce one phased roadmap.
How to read the roadmap and choose a path
Blueprint.IQ sequences the work by dependency and effort. People make the capability decisions, using the dossier as evidence.
Treat the roadmap as a set of decisions per business capability. Each capability lands in one of six paths:
- Keep. It works and rarely changes.
- Wrap. The logic is sound and other systems need access to it through a governed interface.
- Extract. The capability needs its own release cycle.
- Rebuild. The design no longer supports the business need.
- Replace. A commercial product now does the job well.
- Retire. Nothing depends on it, or another system already does the same job.
Before you choose Rebuild, pull the business rules out of the code first. Translating code line by line carries forward every rule nobody documented, including the ones nobody knows are there.
Score each capability against five criteria:
- Business value
- How often it changes
- Regulatory risk
- How well its rules are documented
- Effort required
A high-value capability with poorly documented rules and heavy regulatory exposure needs a different plan than a low-change reporting module. For more on grouping code by capability, see our business capabilities and mainframe decoupling article.
What to ask before approving a modernization budget
Bring these six questions to the review:
- Do we know where our business rules live?
- Which dependencies cross team or vendor boundaries?
- What is undocumented, and who is the only person who knows it?
- Which findings has a senior engineer validated, and can each security finding be traced to the tool that produced it?
- What does the assessment not cover?
- Has the evidence been reconciled against the technical-debt backlog we already keep?
If the team can answer all six with evidence, the budget conversation moves from estimating a rewrite to choosing a path.
Start with the dossier, not the rewrite
Before you fund a modernization, find out what your systems actually do. Sparq's Blueprint.IQ assessment runs AI agents against your repositories in read-only mode, and a senior developer reviews every finding. You get an application dossier for each repository: architecture diagrams, business context, a code-health score, security findings and a phased roadmap. It also includes a cross-repository view of shared dependencies and where your business rules live. The assessment itself typically takes around five days.
FAQ
Frequent Asked Questions
Keep learning.

Katsiaryna Subach is an AI Architect and Senior Principal Solutions Consultant at Sparq, with over a decade of technology leadership. Guides C-suite leaders from first AI adoption to production systems. Architects agentic and multi-agent solutions, secure AI landing zones and enterprise AI governance frameworks for financial, legal and other regulated organizations.
Related