RC
0/17
AUDIO READY — click anywhere to start
SECTION_03

Built-in Audit Feature

Trigger audits, read reports, apply fixes, and catch hidden issues — even in builds that look perfect.

[Audits Aren't Optional]

Every build has hidden issues. The audit feature surfaces them before your users do. Even a build that looks great on the surface often has broken mobile layouts, missing error states, or Internet Identity edge cases lurking underneath.

[PLATFORM SAFETY GUARANTEE]

ICP guarantees that a mistake during a software update cannot cause data loss. Your canister state is preserved across upgrades, meaning you can audit, fix, and redeploy with confidence — the platform has built-in protection at the infrastructure level.

> How to Trigger an Audit

Use this prompt after any significant build or change:

Standard audit trigger
Run a full audit of this build. Check for: broken user flows, mobile layout issues, missing error states, Internet Identity edge cases, security gaps, and anything that would frustrate a real user.

For a deeper audit focused on production readiness:

Production readiness audit
Run a production readiness audit. Focus on: canister upgrade safety, stable variable coverage, error handling for all async calls, input validation, and edge cases in the authentication flow.

> How to Read Audit Reports

Audit reports come back with findings grouped by severity. Here's how to interpret them:

🔴 CriticalFix immediately. This will break the app or expose user data.
🟡 WarningFix before shipping. Poor UX or potential data loss in edge cases.
🔵 InfoNice to fix. Improvements to performance, accessibility, or code quality.

> How to Apply Fixes

After receiving an audit report, apply all fixes in a single targeted prompt:

Apply audit fixes
Apply all the fixes from the audit report. Start with the critical issues, then warnings. Confirm each fix with a brief summary of what was changed.

> Real Fix Examples

🔐 Internet Identity Edge Case

Found by audit: The app didn't handle the case where a user cancels the II login popup. The UI got stuck in a loading state with no recovery path.

Fix applied: Added timeout detection, error boundary, and a "Try again" button visible whenever the login flow is interrupted.

📱 Mobile Layout Issue

Found by audit: The data table overflowed horizontally on mobile, making key action buttons inaccessible on small screens.

Fix applied: Converted table to card layout on mobile with responsive breakpoints, all actions accessible at every viewport.

🏷️ Token Metadata

Found by audit: Token decimals were hardcoded to 8, causing display errors for tokens with different decimal precision.

Fix applied: Fetched decimals dynamically from the token canister and used them consistently throughout the UI.

// Audit Best Practices

  • Run an audit after every major feature addition
  • Always audit before sharing a build publicly
  • Fix critical issues before moving to new features
  • Re-audit after applying fixes — fixes can introduce new issues
  • Use targeted audit prompts for specific concerns (mobile, security, etc.)

> Power Prompts — Take Control of Every Build

These 5 prompting patterns give you more control over how Caffeine builds your app. Use them at the start of a session or at any point when you want to slow down, review, or get structured feedback.

Think Before Building

Makes the AI explain its reasoning before writing any code — surfaces assumptions early.

Think Before Building
Think step by step before building. Explain your approach first, then wait for my approval.

Ask First, Build Second

Ensures the AI gathers the right context before starting — prevents costly misunderstandings.

Ask First, Build Second
Before you start building, ask me any clarifying questions you need to build this correctly.

Explain Then Proceed

Builds accountability into your workflow — the AI must justify its approach before touching code.

Explain Then Proceed
Explain why this approach will work, then wait for my approval before proceeding.

Step-by-Step Plan First

Lets you review the full plan before any code is written — ideal for complex features.

Step-by-Step Plan First
Tell me step by step what you're going to do, and wait for my approval before starting.

Structured App Rating

Gets you actionable, structured feedback on your app concept — not vague opinions.

Structured App Rating
Rate my app 1–10 in three areas: idea, features, and user experience. Then suggest 3–5 specific things that would make it a 10/10 app.