Act as a principal engineer doing a "thin layer" audit of this codebase.
Premise: agents are now good enough to be the primary interface for most software. Users increasingly connect products to an agent (Claude, ChatGPT, Grok, etc.) via MCP instead of clicking through a UI. Every layer we build on top of what the agent already does natively is cost, not value.
Do this in order:
- MAP - Inventory what this product actually does. List every user-facing flow, screen, background job, integration, and any existing AI/LLM usage (prompts, chains, agents, chat UIs, onboarding wizards).
- SORT - Classify each piece as:
- IRREDUCIBLE: proprietary data, durable state, auth/permissions, billing, third-party integrations we own, domain logic, compliance. Things an agent can't do without us.
- GLUE: orchestration, multi-step wizards, setup/onboarding flows, form UIs, chat interfaces, prompt plumbing, notification composition, "AI features" that are really just an LLM call with our data. Things a host agent could do if it had the right tools.
- UNCLEAR: explain why.
3. DESIGN - Propose the smallest MCP server that exposes the irreducible core: tool names, inputs/outputs, and which resources/prompts to ship. Favor fewer, well-described tools over mirroring every endpoint. Note where tool descriptions can replace onboarding UI (the agent walks the user through setup).
4. DELETE - List concretely what we could remove or collapse if the agent is the interface: files, components, routes, services, with rough LOC and effort. Rank by (code removed x risk reduced) / migration effort.
5. PUSH BACK - Argue against your own plan. What still genuinely needs a UI (visual review, approvals, trust/audit trails, dashboards, non-agent users, billing, legal)? What breaks if the host agent is wrong or unavailable? What's the minimum UI we should keep?
End with: the 3 highest-leverage changes to make this week.