Production Audit
Assess whether an application is safe to ship by inspecting the release surface and naming production risks.
Contract
Inputs:
- Repository, branch, PR, release candidate, or deployed URL
- Optional launch-critical flows, test account, environment notes, or CI run
Outputs:
- Ship/block recommendation with score and evidence
- Blockers, high-value fixes, missing evidence, and next action
- Concrete file, command, CI, or URL references
Creates/Modifies:
- None in audit mode
- Follow-up fixes only when explicitly requested
External Side Effects:
- Read-only local commands and authorized HTTP/browser checks
- No source upload, destructive migration, production write, or scanner run by default
Confirmation Required:
- Before credentialed production actions, remote scanner use, deploys, migrations, data changes, or user-impacting tests
Delegates To:
security-audit for application security findings
deploy or deployment-composer for release mechanics
release-pr-gates for GitHub release promotion
playwright-e2e-init for missing launch-critical browser coverage; test-runner for existing tests
When to Use
- User asks "is this production ready?", "what breaks in prod?", "ready to
ship?", "audit this release", or "what did we miss?"
- A launch, demo, customer rollout, or investor walkthrough is close.
- CI is green but production risk still needs review.
- A risky PR merged or a dependency upgrade landed.
- A deployed staging or preview URL needs a readiness pass.
Not a compliance, legal, financial, medical, or security certification — engineering release triage only.
Evidence Order
Start with cheap local evidence:
git status --short --branch
git log --oneline --decorate -20
git diff --stat origin/main...HEAD
Then inspect the surfaces that actually exist:
- package scripts, build commands, CI workflows, and release scripts
- API routes, auth middleware, webhooks, workers, cron jobs, and queues
- migrations, seeds, backfills, rollback notes, and data access policies
- environment variable documentation and startup validation
- payment, email, storage, AI, and external-provider boundaries
- observability, logging, health checks, dashboards, and alert ownership
- E2E or smoke coverage for launch-critical user paths
- deployed URL checks when a URL is in scope
Do not call a release healthy just because CI is green.
Risk Lenses
Security and Auth
- Are sensitive routes protected server-side?
- Are authorization checks tenant-aware and applied near data access?
- Are secrets absent from client bundles, logs, examples, and committed files?
- Are uploads, CORS, CSRF, rate limits, and input validation appropriate?
- Do agent or AI surfaces isolate untrusted content from privileged tools?
Data Integrity
- Can migrations run forward safely?
- Is there a rollback, recovery, or backup path for high-impact changes?
- Are destructive backfills staged and idempotent?
- Are retries safe for writes, jobs, and webhooks?
- Do sandbox, staging, and production schemas match the code assumptions?
Payments and Webhooks
- Are webhook signatures verified before trusting payload fields?
- Are fulfillment handlers idempotent for duplicate delivery?
- Are out-of-order and replayed events handled?
- Are test and live credentials separated?
- Is customer-visible billing state recoverable after provider failure?
Operations
- Can the app start from a clean checkout with documented commands?
- Are required environment variables named and validated at startup?
- Is there a health check that proves dependencies are reachable?
- Are logs useful without leaking secrets or personal data?
- Is there a clear deploy, rollback, and incident-owner path?
User Experience
- Are launch-critical paths covered on desktop and mobile?
- Are loading, empty, error, and permission-denied states usable?
- Do forms handle invalid input, slow requests, and double submits?
- Is there a recovery or support path when a critical operation fails?
Scoring
Use scores to force prioritization:
| Score |
Verdict |
| 0-49 |
Blocked: do not ship until blockers are fixed |
| 50-69 |
Risky: internal beta or small rollout only |
| 70-84 |
Launchable with caveats: ship if owners accept named risks |
| 85-100 |
Strong: no obvious launch blockers from available evidence |
Cap at 69 if any are true:
- auth or authorization is missing for sensitive data
- payment or fulfillment webhooks are not idempotent
- required migrations cannot run safely
- secrets are exposed in client bundles, logs, or committed files
- no rollback or recovery path exists for a high-impact release
Cap at 84 if CI is not green or the launch-critical path was not tested end
to end.
Output Format
Lead with one sentence:
Production audit: 76/100, launchable with caveats, with webhook idempotency and rollback docs as the two risks to fix before public launch.
Then list:
Blockers: must-fix items before deploy
High-value fixes: next improvements by impact
Evidence checked: files, commands, CI, URLs, or PRs inspected
Evidence missing: what would change confidence
Next action: one concrete fix or verification step
If no blockers are found, still state the evidence boundary.
Anti-Patterns
- Running unpinned remote scanners as the default audit path.
- Uploading private source, secrets, customer data, or topology externally
without explicit approval.
- Giving a score without naming evidence.
- Treating staging smoke tests as proof that data migrations are safe.
- Ending with a generic summary instead of the next concrete release action.
1---2name: production-audit3description: Audit an application for production readiness using local evidence from code, CI, config, migrations, runtime checks, observability, and deployment paths. Use before launch, after risky merges, or when asked whether an app is ready to ship.4---5
6# Production Audit
7
8Assess whether an application is safe to ship by inspecting the release surface and naming production risks.
9
10## Contract
11
12Inputs:
13
14- Repository, branch, PR, release candidate, or deployed URL
15- Optional launch-critical flows, test account, environment notes, or CI run
16
17Outputs:
18
19- Ship/block recommendation with score and evidence
20- Blockers, high-value fixes, missing evidence, and next action
21- Concrete file, command, CI, or URL references
22
23Creates/Modifies:
24
25- None in audit mode
26- Follow-up fixes only when explicitly requested
27
28External Side Effects:
29
30- Read-only local commands and authorized HTTP/browser checks
31- No source upload, destructive migration, production write, or scanner run by default
32
33Confirmation Required:
34
35- Before credentialed production actions, remote scanner use, deploys, migrations, data changes, or user-impacting tests
36
37Delegates To:
38
39- `security-audit` for application security findings
40- `deploy` or `deployment-composer` for release mechanics
41- `release-pr-gates` for GitHub release promotion
42- `playwright-e2e-init` for missing launch-critical browser coverage; `test-runner` for existing tests
43
44## When to Use
45
46- User asks "is this production ready?", "what breaks in prod?", "ready to
47 ship?", "audit this release", or "what did we miss?"
48- A launch, demo, customer rollout, or investor walkthrough is close.
49- CI is green but production risk still needs review.
50- A risky PR merged or a dependency upgrade landed.
51- A deployed staging or preview URL needs a readiness pass.
52
53Not a compliance, legal, financial, medical, or security certification — engineering release triage only.
54
55## Evidence Order
56
57Start with cheap local evidence:
58
59```bash
60git status --short --branch
61git log --oneline --decorate -20
62git diff --stat origin/main...HEAD
63```
64
65Then inspect the surfaces that actually exist:
66
67- package scripts, build commands, CI workflows, and release scripts
68- API routes, auth middleware, webhooks, workers, cron jobs, and queues
69- migrations, seeds, backfills, rollback notes, and data access policies
70- environment variable documentation and startup validation
71- payment, email, storage, AI, and external-provider boundaries
72- observability, logging, health checks, dashboards, and alert ownership
73- E2E or smoke coverage for launch-critical user paths
74- deployed URL checks when a URL is in scope
75
76Do not call a release healthy just because CI is green.
77
78## Risk Lenses
79
80### Security and Auth
81
82- Are sensitive routes protected server-side?
83- Are authorization checks tenant-aware and applied near data access?
84- Are secrets absent from client bundles, logs, examples, and committed files?
85- Are uploads, CORS, CSRF, rate limits, and input validation appropriate?
86- Do agent or AI surfaces isolate untrusted content from privileged tools?
87
88### Data Integrity
89
90- Can migrations run forward safely?
91- Is there a rollback, recovery, or backup path for high-impact changes?
92- Are destructive backfills staged and idempotent?
93- Are retries safe for writes, jobs, and webhooks?
94- Do sandbox, staging, and production schemas match the code assumptions?
95
96### Payments and Webhooks
97
98- Are webhook signatures verified before trusting payload fields?
99- Are fulfillment handlers idempotent for duplicate delivery?
100- Are out-of-order and replayed events handled?
101- Are test and live credentials separated?
102- Is customer-visible billing state recoverable after provider failure?
103
104### Operations
105
106- Can the app start from a clean checkout with documented commands?
107- Are required environment variables named and validated at startup?
108- Is there a health check that proves dependencies are reachable?
109- Are logs useful without leaking secrets or personal data?
110- Is there a clear deploy, rollback, and incident-owner path?
111
112### User Experience
113
114- Are launch-critical paths covered on desktop and mobile?
115- Are loading, empty, error, and permission-denied states usable?
116- Do forms handle invalid input, slow requests, and double submits?
117- Is there a recovery or support path when a critical operation fails?
118
119## Scoring
120
121Use scores to force prioritization:
122
123| Score | Verdict |
124| --- | --- |
125| 0-49 | Blocked: do not ship until blockers are fixed |
126| 50-69 | Risky: internal beta or small rollout only |
127| 70-84 | Launchable with caveats: ship if owners accept named risks |
128| 85-100 | Strong: no obvious launch blockers from available evidence |
129
130Cap at `69` if any are true:
131
132- auth or authorization is missing for sensitive data
133- payment or fulfillment webhooks are not idempotent
134- required migrations cannot run safely
135- secrets are exposed in client bundles, logs, or committed files
136- no rollback or recovery path exists for a high-impact release
137
138Cap at `84` if CI is not green or the launch-critical path was not tested end
139to end.
140
141## Output Format
142
143Lead with one sentence:
144
145```text
146Production audit: 76/100, launchable with caveats, with webhook idempotency and rollback docs as the two risks to fix before public launch.
147```
148
149Then list:
150
151- `Blockers`: must-fix items before deploy
152- `High-value fixes`: next improvements by impact
153- `Evidence checked`: files, commands, CI, URLs, or PRs inspected
154- `Evidence missing`: what would change confidence
155- `Next action`: one concrete fix or verification step
156
157If no blockers are found, still state the evidence boundary.
158
159## Anti-Patterns
160
161- Running unpinned remote scanners as the default audit path.
162- Uploading private source, secrets, customer data, or topology externally
163 without explicit approval.
164- Giving a score without naming evidence.
165- Treating staging smoke tests as proof that data migrations are safe.
166- Ending with a generic summary instead of the next concrete release action.