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