R RomantiCode
For vibe-coded & AI-generated projects

AI Code Audit Report for vibe-coded apps.

Your AI-generated app works — but is it ready to clean up, review, refactor, or ship? LegacyDoc AI turns your local codebase into an audit-ready context pack you can act on or share with any AI tool.

audit-report.md · taskflow-mvp · sample Example only

Project overview

taskflow-mvp · Next.js 15 (App Router) · Supabase · Tailwind · 12k LOC · built with Cursor + Claude Code over 3 weekends. Working MVP, no tests, no docs.

Architecture map

app/
├── (auth)/        # sign in / sign up / forgot password
├── dashboard/
│   ├── tasks/     # CRUD + filters  ← largest surface
│   ├── projects/  # grouping
│   └── settings/  # preferences
├── api/
│   ├── tasks/route.ts
│   └── webhooks/
└── lib/
    ├── supabase.ts  # mixed server/client usage
    ├── auth.ts
    └── ai.ts        # behind feature flag

Areas to inspect

  • app/api/tasks/route.ts — input parsing
  • lib/supabase.ts — server/client boundary
  • TaskList.tsx — 380 lines, split candidate
  • lib/ai.ts — feature flag + timeout
  • next.config.mjs — env loading & image domains

Cleanup priorities

  1. Split TaskList into TaskList + TaskRow + TaskFilters
  2. Move DB-only code to server modules
  3. Unified API input parsing helper
  4. Add JSDoc to public exports in lib/*
  5. Document required env vars in README

AI review notes

Use this context pack with Claude Code / Cursor / Codex.
Suggested prompt:
  "Use the architecture map and module summaries below
   as project context. Help me split TaskList.tsx into
   smaller components without changing behavior."

Sample format only — not a real customer report and not a security audit.

The problem with vibe-coded apps

Six recurring patterns that make AI-generated codebases hard to clean up safely.

Hidden architecture debt

No one documented how modules connect or why decisions were made.

Duplicated logic

AI tools often generate similar code in multiple places without noticing.

Missing docs

Functions, APIs, and configs have no explanation for the next person.

Unclear module ownership

Hard to tell what each folder does or which parts are safe to change.

Risky dependencies

Outdated packages, insecure configs, or unused code hiding in plain sight.

No cleanup plan

You know it needs work, but don't know where to start or what's safe.

Why vibe code cleanup starts with an audit

Before you clean up, refactor, hand off to a freelancer, or let another AI agent touch the code — you need context. Without it, cleanup is guesswork: you might break working logic, miss the riskiest areas, or spend hours on the wrong files.

An audit-ready context pack gives you (and any AI tool or developer you work with) a shared understanding of the architecture, risk areas, missing documentation, and cleanup priorities — before a single line changes.

What the audit-ready context pack includes

Project overview — purpose, stack, entry points
Architecture map / Mermaid diagram
Module and folder summaries
Risky or complex areas flagged for review
Missing documentation identified
Cleanup priority list
Refactor prep notes
AI-ready review notes for Claude Code, Cursor, or Copilot

How to use it

  1. 01

    Open your project locally in VS Code.

  2. 02

    Run LegacyDoc AI from the sidebar.

  3. 03

    Review the generated context pack and report.

  4. 04

    Share selected context with Claude Code, Cursor, Codex, or a cleanup specialist.

  5. 05

    Plan small, reviewable cleanup and refactor steps.

When to use this report

Before hiring a vibe code cleanup specialist

Hand them a context pack so they can start immediately instead of spending hours onboarding.

Before asking Claude Code, Cursor, or Codex to refactor

Give the AI tool architecture context so suggestions don't break unrelated parts of the app.

Before shipping an AI-generated MVP

Identify documentation gaps, oversized files, and areas to inspect before launch.

Before handing off to a developer

Reduce onboarding time with a clear architecture map, module summaries, and cleanup priorities.

AI code audit vs security audit vs code review

An AI code audit report is the foundation — not a replacement — for the other two.

Type What it produces Who does it
AI code audit report Context pack, architecture map, module summaries, cleanup priorities LegacyDoc AI generates locally; you (or an AI tool) review
Security audit Vulnerability findings, penetration test results, formal security report Professional security firm or security engineer
Code review Line-level feedback, refactor suggestions, approval/changes Developer or team peer review

What to do after the report

  1. 01

    Fix documentation gaps — add missing JSDoc, README, and inline comments.

  2. 02

    Split oversized files into smaller, single-responsibility modules.

  3. 03

    Review environment variable and configuration usage for clarity.

  4. 04

    Create small, reviewable refactor tasks instead of one big rewrite.

  5. 05

    Share the context pack with Claude Code, Cursor, or Codex to guide cleanup.

What it is

A locally-generated context pack with architecture map, module summaries, areas to inspect, and cleanup priorities — designed to be shared with AI tools or human reviewers.

What it's not

  • — It does not replace a professional security audit.
  • — It does not automatically fix every issue in your codebase.
  • — It does not guarantee production readiness.

FAQ

What is an AI code audit?

An AI code audit is a structured review of AI-generated or vibe-coded projects to identify architecture issues, missing documentation, areas to inspect, and cleanup priorities — before you start making changes. It is a form of AI codebase audit focused on understanding and preparing the code.

Is this the same as a security audit?

No. LegacyDoc AI generates a context pack and cleanup checklist. It does not perform penetration testing, vulnerability scanning, or formal security certification.

Can this clean up my vibe-coded app automatically?

No. It generates an audit-ready report so you (or an AI tool) can make informed cleanup decisions. It does not rewrite or modify your code.

How is this different from hiring a vibe code cleanup specialist?

A specialist does the cleanup work. LegacyDoc AI prepares the context pack that makes that work faster and more focused — whether you do it yourself or hire someone. If you are looking for a vibe code cleanup specialist, generating a context pack first lets the handoff go much faster.

Can I use the report with Claude Code, Cursor, Codex, or Copilot?

Yes. The generated context files are designed to be shared with AI coding tools so they can understand your project without you having to explain everything from scratch.

How does this relate to AI-generated code review?

The context pack is the foundation for AI-generated code review. With architecture maps, module summaries, and an AI code verification checklist, you (or an AI tool) can review code with full project context instead of guessing.

Does LegacyDoc AI upload my code?

No. LegacyDoc AI runs inside VS Code. Your code is sent directly to the AI provider you configure, not to RomantiCode servers. You bring your own API key (BYOK).

What kinds of projects work best?

Any local codebase in VS Code — especially AI-generated apps, vibe-coded prototypes, inherited projects, or legacy codebases that lack documentation.

Related resources

Audit your vibe-coded app

Runs inside VS Code. BYOK. No code storage or proxying by RomantiCode.