audit-realworld — Full-Stack Gap Audit vs the RealWorld Reference
Degree of freedom: MIXED — Mode, parity, and routing [HIGH freedom];
Phase 4 contract-suite run [LOW freedom — run exactly] when a server or
suite exists.
Read-only. Findings and a prioritized gap report only — no code changes.
Remediation goes to the skill named per finding.
RealWorld ("Conduit") is an objectively testable full-stack benchmark: formal
API spec, shared E2E suite, shared CSS theme, hosted API at
api.realworld.show.
The RealWorld API spec and its E2E suite are the source of truth — not any
single community implementation. Reference repos vary; the spec and the
passing suite do not.
RealWorld is a demo spec, not a production bar. It omits rate limiting,
observability, caching, CI/CD, secrets, and deployment. Report feature/
pattern parity, then delegate hardening to audit-security,
plan-security-audit, plan-perf-audit, plan-rls-audit, and
full-stack-ship-discipline.
How to reason — Observe → Interpret → Classify → Severity
- Observe — quote the spec contract (or pattern) and the repo's
file:line (or suite result)
- Interpret — does this layer implement the contract, or only the UI/route?
- Classify — Implemented / Partial / Missing / Diverges — or Bow-out if the repo is not a web CRUD+auth app
- Severity — core Conduit / authz / list-contract gaps = High; production-omitted concerns are routed, not scored as RealWorld misses
Worked example
Observe: Conformance mode. GET /api/articles returns { articles }
with no articlesCount and no limit/offset (app/api/articles/route.ts).
Bruno list request fails the count assertion. Auth header is Token <jwt>.
Interpret: the list contract is partial; clients cannot paginate. Auth
scheme matches the spec.
Classify: Partial (pagination / articlesCount); auth Implemented.
Severity: High — feed is a core Conduit surface.
Finding: Article list | no pagination / articlesCount | High | complete-everything
Phase 0 — Detect the stack and gate applicability [HIGH freedom]
Read the dependency manifest and source before comparing anything (reuse the
audit-fe-api detection approach).
0a. Classify the stack
- Frontend: framework (React/Next/Vue/Nuxt/Svelte/Angular/Solid), router,
state/data layer (TanStack Query, SWR, RTK, Pinia), HTTP client.
- Backend: framework (Express/Hono/Fastify/Nitro/NestJS/Django/Rails/Go/
Laravel/Spring), routing style, auth mechanism.
- Data layer: database + ORM/query builder (Prisma/Drizzle/TypeORM/Sequelize/
SQLAlchemy/ActiveRecord/Supabase), migration tool.
- Tests: unit runner, and any API/E2E harness (Bruno, Hurl, Postman/Newman,
Playwright, Cypress).
0b. Applicability gate
Decide the mode — state which one and why, out loud:
| Condition |
Mode |
Repo is a RealWorld/Conduit build (articles, profiles, favorites/follow, tags, JWT Token scheme) |
Conformance |
| Web full-stack CRUD app with auth + owned resources, but a different domain |
Benchmark |
| Not a web app, no HTTP API, no auth/resources (CLI, library, static site, pure ML) |
Bow out |
If you bow out, say so plainly and recommend the fitting skills instead
(audit-security, audit-performance, plan-perf-audit, audit-code-quality,
audit-fe-api). Do not force a RealWorld comparison onto a repo it does not fit.
0c. Record the discovery
STACK: FE=<...> · BE=<...> · DB/ORM=<...> · tests=<...>
MODE: Conformance | Benchmark | Bow-out (reason)
RealWorld reference chosen: <stack impl> (spec-compliant? maintained?)
Phase 1 — Pull the reference (current) [HIGH freedom]
1a. Spec + test suite (source of truth)
- API spec and shared E2E suite live in the
realworld-apps/realworld repo
(specs/, Bruno .bru, Hurl .hurl) with a Postman collection for endpoint
testing. The hosted API at api.realworld.show needs no keys.
- Fetch the current spec and note the exact endpoint/response/error contracts
(summarized in Phase 2). Prefer the live spec over memory in case it has
evolved.
1b. Closest-stack reference implementation
- Find the nearest implementation on
codebase.show/projects/realworld, filter
by the detected FE/BE stack. Prefer spec-compliant, recently maintained
implementations (only a subset are verified spec-compliant at any time).
- Treat the reference as a pattern yardstick (folder structure, auth wiring,
validation, error mapping) — not as gospel. When the reference and the spec
disagree, the spec wins.
1c. Research current best practices
Follow the /research protocol for the detected stack (Context7 for library
docs; Firecrawl for current patterns, dated to now). Anchor recommendations to
the versions actually installed in the repo.
Phase 2 — Parity / pattern matrix [HIGH freedom]
Conformance mode — audit against the RealWorld contract
Enumerate the spec surface and mark each Implemented / Partial / Missing /
Diverges, with file:line evidence:
Auth & users
POST /api/users (register), POST /api/users/login
GET /api/user, PUT /api/user (current user)
- Auth header scheme:
Authorization: Token <jwt> (not Bearer)
Profiles
GET /api/profiles/:username
POST / DELETE /api/profiles/:username/follow
Articles
GET /api/articles (filters: tag, author, favorited, limit, offset)
GET /api/articles/feed (auth, followed authors)
GET / POST / PUT / DELETE /api/articles/:slug
POST / DELETE /api/articles/:slug/favorite
Comments & tags
GET / POST /api/articles/:slug/comments, DELETE .../comments/:id
GET /api/tags
Cross-cutting contracts
- Response envelopes:
{ user }, { profile }, { article },
{ articles, articlesCount }, { comment(s) }, { tags }
- Validation errors:
422 with { "errors": { "body": [ ... ] } }
- Auth failures:
401; missing resources: 404
- Pagination:
limit / offset, with articlesCount for lists
- Slug generation,
favoritesCount, following/favorited booleans reflect
the requesting user
Benchmark mode — map the patterns onto the repo's own domain
The repo isn't Conduit, so audit whether it exhibits the same production-
relevant patterns RealWorld demonstrates, for its own resources:
| Pattern |
What to check in this repo |
| Auth flow |
Register/login/current-user; token issue + attach + refresh; protected routes |
| Owned resources + authz |
CRUD on user-owned entities; ownership enforced server-side, not just UI |
| List semantics |
Pagination, filtering, total counts, empty states |
| Relations |
Follow/favorite-style join semantics done correctly (no N+1, correct counts) |
| Consistent envelopes |
Uniform response + error shape across endpoints |
| Validation |
Server-side validation with structured field errors |
| Contract tests |
An API/E2E suite that proves the contract, not just unit tests |
Phase 3 — Full-stack coverage sweep [HIGH freedom]
Audit all three layers, not just whichever is easiest to read:
- Frontend: routes for each resource; auth flow (login/register/logout,
token persistence, guarded routes); data layer (caching, error/loading/empty
states); forms with validation and server-error surfacing.
- Backend: every spec/pattern endpoint present; auth middleware; input
validation; consistent error mapping; pagination; correct status codes.
- Data layer: schema covers the entities and relations; migrations exist and
are current; indexes on foreign keys and hot query paths; constraints
(unique, not-null, FK) enforce integrity. Verify live via Supabase MCP when
applicable.
- Tests: unit coverage on core logic, plus the RealWorld contract suite (or
the repo's equivalent E2E harness).
- Build/config: app builds; env contract documented (names only).
Phase 4 — Live conformance test (optional but decisive) [LOW freedom — run exactly]
If a server is running or the E2E suite is present, run the objective proof:
- Run the RealWorld Bruno collection (
bru run), the Hurl files
(hurl --test), or the Postman collection (newman run) against the local
API base URL. Report pass/fail per endpoint.
- If no server is available, state exactly how to run it (base URL, seed/demo
credentials) rather than guessing conformance from code alone.
A passing contract suite is stronger evidence than any static reading. Save any
run artifacts under .playwright-mcp/ if using playwright-cli.
Phase 5 — Production layering (the honest part) [HIGH freedom]
RealWorld parity is necessary breadth, not sufficient depth. Enumerate what
RealWorld does not cover and route each to the right skill — do not imply
parity means production-ready:
| Concern RealWorld omits |
Route to |
| AuthN/AuthZ hardening, secrets, injection, OWASP |
audit-security, plan-security-audit |
| Row-level security / access control (Supabase) |
plan-rls-audit |
| Performance, Core Web Vitals, query cost |
plan-perf-audit, audit-performance, backend-db-performance |
| FE↔BE contract drift and runtime errors |
audit-fe-api, debug-fe-be-integration |
| Rate limiting, observability, error handling |
backend-observability, backend-error-handling |
| Deploy + migration/edge-function verification |
full-stack-ship-discipline, deploy-verify |
Phase 6 — Report (read-only) [HIGH freedom]
## RealWorld Full-Stack Audit — [repo] — [date]
**Mode:** Conformance | Benchmark
**Stack:** FE [..] · BE [..] · DB/ORM [..] · tests [..]
**Reference:** [closest-stack impl] (spec-compliant: yes/no)
**Live contract suite:** ran (N/M passed) | not run — [how to run]
### Implemented correctly
- [feature/pattern] — [file:line]
### Partial (works but incomplete or diverges)
| Feature/Pattern | Gap | file:line | Severity | Fix via |
|---|---|---|---|---|
| Article feed | No pagination / articlesCount | ... | High | complete-everything |
### Missing
| Feature/Pattern | file:line (where it should live) | Severity | Fix via |
|---|---|---|---|
| DELETE comment authz | ... | High | workflow-fix-and-ship |
### Diverges from spec (Conformance mode)
| Endpoint | Spec says | Repo does | file:line |
|---|---|---|---|
| Auth header | `Token <jwt>` | `Bearer <jwt>` | ... |
### Production gaps (NOT covered by RealWorld — separate hardening)
- Security → `audit-security` · Perf → `plan-perf-audit` · RLS → `plan-rls-audit` · ...
### Recommended order
1. [Critical conformance/parity gaps] → complete-everything / workflow-fix-and-ship
2. [Production hardening] → audit-security → plan-perf-audit → ...
Forbidden: claiming production-readiness from RealWorld parity alone;
inventing conformance without running or precisely describing the contract test;
silently skipping a layer (FE, BE, or DB).
Self-critique before reporting [LOW freedom — do not skip]
- Evidenced —
file:line or suite pass/fail, not "looks like Conduit"
- Mode honest — Bow-out if no HTTP API + auth + owned resources; do not force a comparison
- Suite honesty — ran N/M or stated exactly how to run; never invent conformance
- All three layers — FE, BE, and data; skipping one is a failed audit
- Not production-ready — RealWorld parity is never a security / perf / RLS pass
- Nothing changed until approved
Related
audit-fe-api — FE↔BE contract detail once endpoints are inventoried
debug-fe-be-integration — reactive debugging of contract mismatches
audit-security / plan-security-audit — the security depth RealWorld omits
plan-rls-audit — Supabase access control
plan-perf-audit / audit-performance — the performance depth RealWorld omits
test-unit / test-playwright — write the coverage this audit finds missing
complete-everything — close the parity + hardening gaps to done
workflow-fix-and-ship — fix a single missing endpoint/feature and ship it
full-stack-ship-discipline (rule) — migrations/functions must actually deploy
1---2name: audit-realworld-23description: Read-only full-stack conformance audit against RealWorld ("Conduit"): formal API spec, shared E2E suite, and closest-stack reference. Use when "audit against RealWorld", "Conduit conformance", or "is my full-stack app complete?". General user journeys → audit-ux-journeys.4license: MIT5---67# audit-realworld — Full-Stack Gap Audit vs the RealWorld Reference89**Degree of freedom: MIXED** — Mode, parity, and routing `[HIGH freedom]`;10Phase 4 contract-suite run `[LOW freedom — run exactly]` when a server or11suite exists.1213Read-only. Findings and a prioritized gap report only — no code changes.14Remediation goes to the skill named per finding.1516RealWorld ("Conduit") is an objectively testable full-stack benchmark: formal17API spec, shared E2E suite, shared CSS theme, hosted API at18`api.realworld.show`.1920> **The RealWorld API spec and its E2E suite are the source of truth — not any21> single community implementation.** Reference repos vary; the spec and the22> passing suite do not.2324> **RealWorld is a demo spec, not a production bar.** It omits rate limiting,25> observability, caching, CI/CD, secrets, and deployment. Report *feature/26> pattern parity*, then delegate hardening to `audit-security`,27> `plan-security-audit`, `plan-perf-audit`, `plan-rls-audit`, and28> `full-stack-ship-discipline`.2930## How to reason — Observe → Interpret → Classify → Severity31321. **Observe** — quote the spec contract (or pattern) and the repo's `file:line` (or suite result)332. **Interpret** — does this layer implement the contract, or only the UI/route?343. **Classify** — Implemented / Partial / Missing / Diverges — or Bow-out if the repo is not a web CRUD+auth app354. **Severity** — core Conduit / authz / list-contract gaps = High; production-omitted concerns are routed, not scored as RealWorld misses3637## Worked example3839> **Observe:** Conformance mode. `GET /api/articles` returns `{ articles }`40> with no `articlesCount` and no `limit`/`offset` (`app/api/articles/route.ts`).41> Bruno list request fails the count assertion. Auth header is `Token <jwt>`.42> **Interpret:** the list contract is partial; clients cannot paginate. Auth43> scheme matches the spec.44> **Classify:** Partial (pagination / `articlesCount`); auth Implemented.45> **Severity:** High — feed is a core Conduit surface.46> **Finding:** Article list | no pagination / articlesCount | High | complete-everything4748---4950## Phase 0 — Detect the stack and gate applicability [HIGH freedom]5152Read the dependency manifest and source before comparing anything (reuse the53`audit-fe-api` detection approach).5455### 0a. Classify the stack5657- **Frontend:** framework (React/Next/Vue/Nuxt/Svelte/Angular/Solid), router,58 state/data layer (TanStack Query, SWR, RTK, Pinia), HTTP client.59- **Backend:** framework (Express/Hono/Fastify/Nitro/NestJS/Django/Rails/Go/60 Laravel/Spring), routing style, auth mechanism.61- **Data layer:** database + ORM/query builder (Prisma/Drizzle/TypeORM/Sequelize/62 SQLAlchemy/ActiveRecord/Supabase), migration tool.63- **Tests:** unit runner, and any API/E2E harness (Bruno, Hurl, Postman/Newman,64 Playwright, Cypress).6566### 0b. Applicability gate6768Decide the mode — state which one and why, out loud:6970| Condition | Mode |71|---|---|72| Repo is a RealWorld/Conduit build (articles, profiles, favorites/follow, tags, JWT `Token` scheme) | **Conformance** |73| Web full-stack CRUD app with auth + owned resources, but a different domain | **Benchmark** |74| Not a web app, no HTTP API, no auth/resources (CLI, library, static site, pure ML) | **Bow out** |7576**If you bow out, say so plainly** and recommend the fitting skills instead77(`audit-security`, `audit-performance`, `plan-perf-audit`, `audit-code-quality`,78`audit-fe-api`). Do not force a RealWorld comparison onto a repo it does not fit.7980### 0c. Record the discovery8182```83STACK: FE=<...> · BE=<...> · DB/ORM=<...> · tests=<...>84MODE: Conformance | Benchmark | Bow-out (reason)85RealWorld reference chosen: <stack impl> (spec-compliant? maintained?)86```8788---8990## Phase 1 — Pull the reference (current) [HIGH freedom]9192### 1a. Spec + test suite (source of truth)9394- API spec and shared E2E suite live in the `realworld-apps/realworld` repo95 (`specs/`, Bruno `.bru`, Hurl `.hurl`) with a Postman collection for endpoint96 testing. The hosted API at `api.realworld.show` needs no keys.97- Fetch the current spec and note the exact endpoint/response/error contracts98 (summarized in Phase 2). Prefer the live spec over memory in case it has99 evolved.100101### 1b. Closest-stack reference implementation102103- Find the nearest implementation on `codebase.show/projects/realworld`, filter104 by the detected FE/BE stack. **Prefer spec-compliant, recently maintained105 implementations** (only a subset are verified spec-compliant at any time).106- Treat the reference as a *pattern* yardstick (folder structure, auth wiring,107 validation, error mapping) — not as gospel. When the reference and the spec108 disagree, the spec wins.109110### 1c. Research current best practices111112Follow the `/research` protocol for the detected stack (Context7 for library113docs; Firecrawl for current patterns, dated to now). Anchor recommendations to114the versions actually installed in the repo.115116---117118## Phase 2 — Parity / pattern matrix [HIGH freedom]119120### Conformance mode — audit against the RealWorld contract121122Enumerate the spec surface and mark each **Implemented / Partial / Missing /123Diverges**, with `file:line` evidence:124125**Auth & users**126- `POST /api/users` (register), `POST /api/users/login`127- `GET /api/user`, `PUT /api/user` (current user)128- Auth header scheme: `Authorization: Token <jwt>` (not `Bearer`)129130**Profiles**131- `GET /api/profiles/:username`132- `POST` / `DELETE /api/profiles/:username/follow`133134**Articles**135- `GET /api/articles` (filters: `tag`, `author`, `favorited`, `limit`, `offset`)136- `GET /api/articles/feed` (auth, followed authors)137- `GET` / `POST` / `PUT` / `DELETE /api/articles/:slug`138- `POST` / `DELETE /api/articles/:slug/favorite`139140**Comments & tags**141- `GET` / `POST /api/articles/:slug/comments`, `DELETE .../comments/:id`142- `GET /api/tags`143144**Cross-cutting contracts**145- Response envelopes: `{ user }`, `{ profile }`, `{ article }`,146 `{ articles, articlesCount }`, `{ comment(s) }`, `{ tags }`147- Validation errors: `422` with `{ "errors": { "body": [ ... ] } }`148- Auth failures: `401`; missing resources: `404`149- Pagination: `limit` / `offset`, with `articlesCount` for lists150- Slug generation, `favoritesCount`, `following`/`favorited` booleans reflect151 the requesting user152153### Benchmark mode — map the patterns onto the repo's own domain154155The repo isn't Conduit, so audit whether it exhibits the same *production-156relevant patterns* RealWorld demonstrates, for its own resources:157158| Pattern | What to check in this repo |159|---|---|160| Auth flow | Register/login/current-user; token issue + attach + refresh; protected routes |161| Owned resources + authz | CRUD on user-owned entities; ownership enforced server-side, not just UI |162| List semantics | Pagination, filtering, total counts, empty states |163| Relations | Follow/favorite-style join semantics done correctly (no N+1, correct counts) |164| Consistent envelopes | Uniform response + error shape across endpoints |165| Validation | Server-side validation with structured field errors |166| Contract tests | An API/E2E suite that proves the contract, not just unit tests |167168---169170## Phase 3 — Full-stack coverage sweep [HIGH freedom]171172Audit all three layers, not just whichever is easiest to read:173174- **Frontend:** routes for each resource; auth flow (login/register/logout,175 token persistence, guarded routes); data layer (caching, error/loading/empty176 states); forms with validation and server-error surfacing.177- **Backend:** every spec/pattern endpoint present; auth middleware; input178 validation; consistent error mapping; pagination; correct status codes.179- **Data layer:** schema covers the entities and relations; migrations exist and180 are current; indexes on foreign keys and hot query paths; constraints181 (unique, not-null, FK) enforce integrity. Verify live via Supabase MCP when182 applicable.183- **Tests:** unit coverage on core logic, plus the RealWorld contract suite (or184 the repo's equivalent E2E harness).185- **Build/config:** app builds; env contract documented (names only).186187---188189## Phase 4 — Live conformance test (optional but decisive) [LOW freedom — run exactly]190191If a server is running or the E2E suite is present, run the objective proof:192193- Run the RealWorld Bruno collection (`bru run`), the Hurl files194 (`hurl --test`), or the Postman collection (`newman run`) against the local195 API base URL. Report pass/fail per endpoint.196- If no server is available, state exactly how to run it (base URL, seed/demo197 credentials) rather than guessing conformance from code alone.198199A passing contract suite is stronger evidence than any static reading. Save any200run artifacts under `.playwright-mcp/` if using playwright-cli.201202---203204## Phase 5 — Production layering (the honest part) [HIGH freedom]205206RealWorld parity is necessary breadth, not sufficient depth. Enumerate what207RealWorld does **not** cover and route each to the right skill — do not imply208parity means production-ready:209210| Concern RealWorld omits | Route to |211|---|---|212| AuthN/AuthZ hardening, secrets, injection, OWASP | `audit-security`, `plan-security-audit` |213| Row-level security / access control (Supabase) | `plan-rls-audit` |214| Performance, Core Web Vitals, query cost | `plan-perf-audit`, `audit-performance`, `backend-db-performance` |215| FE↔BE contract drift and runtime errors | `audit-fe-api`, `debug-fe-be-integration` |216| Rate limiting, observability, error handling | `backend-observability`, `backend-error-handling` |217| Deploy + migration/edge-function verification | `full-stack-ship-discipline`, `deploy-verify` |218219---220221## Phase 6 — Report (read-only) [HIGH freedom]222223```markdown224## RealWorld Full-Stack Audit — [repo] — [date]225226**Mode:** Conformance | Benchmark227**Stack:** FE [..] · BE [..] · DB/ORM [..] · tests [..]228**Reference:** [closest-stack impl] (spec-compliant: yes/no)229**Live contract suite:** ran (N/M passed) | not run — [how to run]230231### Implemented correctly232- [feature/pattern] — [file:line]233234### Partial (works but incomplete or diverges)235| Feature/Pattern | Gap | file:line | Severity | Fix via |236|---|---|---|---|---|237| Article feed | No pagination / articlesCount | ... | High | complete-everything |238239### Missing240| Feature/Pattern | file:line (where it should live) | Severity | Fix via |241|---|---|---|---|242| DELETE comment authz | ... | High | workflow-fix-and-ship |243244### Diverges from spec (Conformance mode)245| Endpoint | Spec says | Repo does | file:line |246|---|---|---|---|247| Auth header | `Token <jwt>` | `Bearer <jwt>` | ... |248249### Production gaps (NOT covered by RealWorld — separate hardening)250- Security → `audit-security` · Perf → `plan-perf-audit` · RLS → `plan-rls-audit` · ...251252### Recommended order2531. [Critical conformance/parity gaps] → complete-everything / workflow-fix-and-ship2542. [Production hardening] → audit-security → plan-perf-audit → ...255```256257**Forbidden:** claiming production-readiness from RealWorld parity alone;258inventing conformance without running or precisely describing the contract test;259silently skipping a layer (FE, BE, or DB).260261---262263## Self-critique before reporting [LOW freedom — do not skip]2642651. **Evidenced** — `file:line` or suite pass/fail, not "looks like Conduit"2662. **Mode honest** — Bow-out if no HTTP API + auth + owned resources; do not force a comparison2673. **Suite honesty** — ran N/M or stated exactly how to run; never invent conformance2684. **All three layers** — FE, BE, and data; skipping one is a failed audit2695. **Not production-ready** — RealWorld parity is never a security / perf / RLS pass2706. **Nothing changed** until approved271272## Related273274- `audit-fe-api` — FE↔BE contract detail once endpoints are inventoried275- `debug-fe-be-integration` — reactive debugging of contract mismatches276- `audit-security` / `plan-security-audit` — the security depth RealWorld omits277- `plan-rls-audit` — Supabase access control278- `plan-perf-audit` / `audit-performance` — the performance depth RealWorld omits279- `test-unit` / `test-playwright` — write the coverage this audit finds missing280- `complete-everything` — close the parity + hardening gaps to done281- `workflow-fix-and-ship` — fix a single missing endpoint/feature and ship it282- `full-stack-ship-discipline` (rule) — migrations/functions must actually deploy