Existing Web Audit
Purpose
Inventory an existing web application before any change: what framework and patterns it actually uses, where the risks are, and what constrains upcoming work. The web-specific arm of ../../existing-project-audit. The audit reports; it does not fix.
When to Use
- Before planning changes to an existing web app (feature, refactor, migration, dashboard addition).
- When taking over an unfamiliar web codebase.
- Not for greenfield apps (go to
web-stack-selection).
Inputs
- Repository access and the app's location within it.
- The upcoming request (so findings can be weighted by relevance).
- Core repo findings from
../../existing-project-audit if already run.
Discovery Questions
- Which framework and major version — Next.js (Pages or App Router?) or Vite/CRA/other — and how far from current?
- What is actually server-rendered vs client-rendered vs static?
- Where do auth, API calls, and state live today?
- What tests, CI, and deployment paths exist — and do they pass?
Responsibilities
- Identify framework + version, router model, and rendering strategy per major route.
- Map routing structure, state patterns (client/server/URL), and styling/design-system approach.
- Locate auth (session/token, storage, enforcement points) and the API layer (transport, error handling, env config).
- Inventory forms/validation, error handling, and accessibility/SEO/performance baselines (measure, don't guess — Lighthouse or equivalent where runnable).
- Inventory tests (unit/component/E2E) and build/deploy paths, including env/secret handling.
- Report findings by severity/relevance; distinguish verified (ran/read it) from assumed.
Required Workflow
- Read structure, manifests, and configs (framework, router, build, env).
- Trace one representative flow end-to-end (route → data → render → error path).
- Inventory the areas above, weighting depth by the upcoming request.
- Run what's cheap to run (build, tests, lint, Lighthouse) — mark anything unrun "unverified until run."
- Record findings + constraints that feed planning (
../../task-planning, web-stack-selection if migration).
Rules
- Read-only: no fixes, upgrades, or refactors during the audit.
- Evidence-based: cite files/paths for claims; never report a check that didn't run.
- Never print discovered secrets; report their handling as a finding (
../../environment-audit).
- Depth proportional to the request — a small feature doesn't need a full-repo deep-dive.
Anti-Patterns
- "Auditing" by assumption from the framework name instead of reading the code.
- Fixing issues mid-audit, contaminating the baseline.
- Loading the entire source tree when the request touches one area.
- Reporting stale/aspirational docs as current state without verifying.
Validation Checklist
Definition of Done
A written, evidence-backed inventory of the web app's framework, patterns, quality baselines, and constraints — ranked by relevance to the upcoming work, with verified and assumed clearly separated — ready to feed planning.
Related Skills
../../existing-project-audit, web-stack-selection, ../../dependency-audit, ../../environment-audit, web-performance, web-accessibility, web-seo, ../../migration-planning.
Related Knowledge
../../../knowledge/ (known constraints, prior decisions about this app).
Related References
../../../references/web/ topic folders (when populated).
Context Loading Guidance
- Requires: repo access, the upcoming request, app location.
- Does not require: every source file, the full web skill set.
- May load:
../../dependency-audit / ../../environment-audit for depth in those areas.
- Stop when: findings and constraints are recorded for planning.
Token Efficiency Guidance
Sample representative routes/flows instead of reading everything. Summarize patterns with file-path citations; keep raw file contents out of the report.
1---2name: existing-web-audit3description: Use to audit an existing web application before changing it — framework/version, rendering model, routing, state, styling, auth, API layer, tests, build/deploy, and performance/SEO/accessibility baselines. Read-only inventory that feeds planning; fixes nothing during the audit.4---56# Existing Web Audit78## Purpose910Inventory an existing web application before any change: what framework and patterns it actually uses, where the risks are, and what constrains upcoming work. The web-specific arm of `../../existing-project-audit`. The audit reports; it does not fix.1112## When to Use1314- Before planning changes to an existing web app (feature, refactor, migration, dashboard addition).15- When taking over an unfamiliar web codebase.16- **Not** for greenfield apps (go to `web-stack-selection`).1718## Inputs1920- Repository access and the app's location within it.21- The upcoming request (so findings can be weighted by relevance).22- Core repo findings from `../../existing-project-audit` if already run.2324## Discovery Questions2526- Which framework and major version — Next.js (Pages or App Router?) or Vite/CRA/other — and how far from current?27- What is actually server-rendered vs client-rendered vs static?28- Where do auth, API calls, and state live today?29- What tests, CI, and deployment paths exist — and do they pass?3031## Responsibilities3233- Identify **framework + version**, router model, and rendering strategy per major route.34- Map **routing** structure, **state** patterns (client/server/URL), and **styling/design-system** approach.35- Locate **auth** (session/token, storage, enforcement points) and the **API layer** (transport, error handling, env config).36- Inventory **forms/validation**, **error handling**, and **accessibility/SEO/performance** baselines (measure, don't guess — Lighthouse or equivalent where runnable).37- Inventory **tests** (unit/component/E2E) and **build/deploy** paths, including env/secret handling.38- Report findings by severity/relevance; distinguish **verified** (ran/read it) from **assumed**.3940## Required Workflow41421. Read structure, manifests, and configs (framework, router, build, env).432. Trace one representative flow end-to-end (route → data → render → error path).443. Inventory the areas above, weighting depth by the upcoming request.454. Run what's cheap to run (build, tests, lint, Lighthouse) — mark anything unrun "unverified until run."465. Record findings + constraints that feed planning (`../../task-planning`, `web-stack-selection` if migration).4748## Rules4950- Read-only: no fixes, upgrades, or refactors during the audit.51- Evidence-based: cite files/paths for claims; never report a check that didn't run.52- Never print discovered secrets; report their handling as a finding (`../../environment-audit`).53- Depth proportional to the request — a small feature doesn't need a full-repo deep-dive.5455## Anti-Patterns5657- "Auditing" by assumption from the framework name instead of reading the code.58- Fixing issues mid-audit, contaminating the baseline.59- Loading the entire source tree when the request touches one area.60- Reporting stale/aspirational docs as current state without verifying.6162## Validation Checklist6364- [ ] Framework, version, router, and rendering model identified with evidence.65- [ ] Routing/state/styling/auth/API patterns mapped.66- [ ] Tests, build, and deploy paths inventoried; runnable checks run or flagged unrun.67- [ ] Accessibility/SEO/performance baselines noted where relevant.68- [ ] Findings ranked by severity/relevance to the upcoming request.69- [ ] No changes made to the codebase.7071## Definition of Done7273A written, evidence-backed inventory of the web app's framework, patterns, quality baselines, and constraints — ranked by relevance to the upcoming work, with verified and assumed clearly separated — ready to feed planning.7475## Related Skills7677`../../existing-project-audit`, `web-stack-selection`, `../../dependency-audit`, `../../environment-audit`, `web-performance`, `web-accessibility`, `web-seo`, `../../migration-planning`.7879## Related Knowledge8081`../../../knowledge/` (known constraints, prior decisions about this app).8283## Related References8485`../../../references/web/` topic folders (when populated).8687## Context Loading Guidance8889- **Requires:** repo access, the upcoming request, app location.90- **Does not require:** every source file, the full web skill set.91- **May load:** `../../dependency-audit` / `../../environment-audit` for depth in those areas.92- **Stop when:** findings and constraints are recorded for planning.9394## Token Efficiency Guidance9596Sample representative routes/flows instead of reading everything. Summarize patterns with file-path citations; keep raw file contents out of the report.