agentleFS
BabylonSocialBabylonSocial/babylon/.agents/skills/bug-review/SKILL.md

bug-review

Skill120 starsChanged 6 days agoMITView on GitHub

Run a high-signal parallel bug review before finishing an app, feature, or PR: rely on automated checks first, then fan out vertical module and horizontal cross-cutting reviewers to eliminate bugs, leaks, state/rendering issues, inefficiencies, and code smells.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. 0 are common, 6 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run this review before declaring an application, feature, or non-trivial change done.

    line 8
  2. Distinctive:

    Read AGENTS.md in full first, once per session.

    line 9
  3. Distinctive:

    Never spend reviewer effort on anything tooling already catches.

    line 15
  4. Distinctive:

    Run the project's automated suite first:

    line 17
  5. Very specific:

    If pnpm check shows a ✗, follow the sync skill first.

    line 19
  6. Very specific:

    no blank cold-route frames or broken hit-testing (elementsFromPoint) under overlays,

    line 56
  7. Distinctive:

    Do not commit screenshot-comparison tests (AGENTS.md, "Tests").

    line 60
  8. Distinctive:

    Keep shard notes in conversation or temporary scratch output.

    line 80
  9. Very specific:

    When the same defect repeats across modules, encode the guard structurally in spec/, types, or lint config …

    line 89
  10. Very specific:

    Re-run automated gates: Run pnpm check (following the sync skill if any spec changed), pnpm lint, and pnpm analyze (when defined).

    line 90
  11. Very specific:

    Incremental re-review: Run a diff-scoped review over only the files modified since the Phase 0 baseline plus any contracts they touch.

    line 91
  12. Very specific:

    Stop condition: Stop when automated gates are green and zero unresolved P0 or P1 findings (and zero regressions) remain.

    line 92

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Parallel bug review

Run this review before declaring an application, feature, or non-trivial change done. Read AGENTS.md in full first, once per session.

Formal proofs and static checks catch model, type, token, barrel, dead-code, cycle, and duplication failures. This workflow catches what sits past them: where the verified core meets React, DOM layering, VibeLang/Effect concurrency, storage, external boundaries, and runtime performance.

Phase 0: Pre-flight automated gate

Never spend reviewer effort on anything tooling already catches.

  1. Run the project's automated suite first:
    • pnpm verify when defined, otherwise pnpm check, pnpm lint, and pnpm analyze (when present).
    • If pnpm check shows a ✗, follow the sync skill first.
  2. Fix every automated failure before launching reviewers.
  3. Record the baseline commit (git rev-parse HEAD) so follow-up verification rounds only re-audit changed files and touched seams.

Phase 1: Choose scope and shard in parallel

Skip generated and build directories (gen/, generated/, dist/, .vibe/, .cache/, .spec-cache/, node_modules/).

  • Full review (finishing an app, major milestone, or first audit): cover every active non-generated source, spec, test, and config file in the repository.
  • Incremental review (default for PRs and post-fix verification rounds): collect changed files (git diff --name-only <base>...HEAD plus untracked files) together with their owning spec/ modules, direct callers, and any shared runtime or UI contracts they touch.

When your harness supports parallel subagents or swarm workers, launch both axes in parallel in one turn; otherwise run the same passes in sequence without skipping either axis. Restate the user's goal in every reviewer brief, and cap each shard to ~10–40 files or ~2–5k LOC (principle-guard-the-context-window).

Axis A: Vertical module shards (disjoint partitions)

Partition active files by domain, app, or package so every file in scope is read line-by-line by exactly one vertical reviewer. Each reviewer audits these six defect classes:

  1. Spec ↔ shell fidelity. Unit or scale mismatches (int seconds vs. milliseconds, debounce durations), unwired specs or events, no-op emitted effects (Effect.succeed(undefined)), swallowed Rejected errors, missing hydration from restored/synced snapshots, missing session/account reset cleanup, controls calling send() without gating on can(), and optimistic side-store writes that run before Machine.send accepts.
  2. VibeLang / Effect concurrency and leaks. Stream.callback or FiberMap jobs missing addFinalizer / acquireRelease (leaking listeners, watchers, or mutating state after superseding), Semaphore deadlocks on failure or interruption, empty streams completing cleanly without notifying an InFlight machine, missing timeouts or AbortSignal propagation on network/bridge calls, module-level mutable Map/Set/let side-stores leaking across runtimes/tests/sessions, and TOCTOU races (issued + 1, mutable remote-sync flags).
  3. React state, rendering, and UX. Render-time runtime.runSync(...) or side effects, unstable key props unmounting inputs mid-edit, async controlled inputs causing caret jumps or dropped keystrokes, components subscribing to many whole machines without selectors or sending at 60Hz, <Suspense fallback={null}> blank routes, unrecoverable error boundaries stuck at null, stripped or clipped :focus-visible rings, missing prefers-reduced-motion, borderless dark-mode floating surfaces, and interactive touch targets under 44px.
  4. Boundaries, security, and persistence resilience. External data (HTTP, IPC, URLs, JSON, storage, env, CLI args) trusted without schema/decodeEvent/decodeState validation, localStorage quota or corrupt-JSON errors crashing via orDie or silently resetting user data to empty, cross-origin postMessage or path-prefix (startsWith without separator + symlink) or plain-object prototype (obj[key]) bypasses, producer↔consumer encoding/schema mismatches (base64url vs. base64 vs. hex), and sensitive data leaking on hidden/locked views.
  5. Runtime inefficiencies. Unconditional syncs or fetches on unrelated events, repeated structuredClone/serialization/parser/formatter (Intl.*, RegExp) allocations in hot paths, unbounded caches or unrevoked blob: URLs, and eager imports defeating route code-splitting.
  6. Verification honesty. Tests mocking internal application services instead of network/platform boundaries, fakes leaking real network traffic, vacuous or false-negative Bombadil properties, orphan modules tested instead of production code, or missing drivers/journeys for stateful shells.

Axis B: Horizontal cross-cutting reviewer

Launch one cross-cutting reviewer (two on very large monorepos) focused strictly on seams no single module shard can see:

  1. State, caching, and lifecycle architecture. How Machine state interacts with side-stores, persistence quotas, eviction bounds, and sign-out/reset/owner-switch isolation across the whole app.
  2. Global UI layering, focus, and navigation. Unified z-* stacking order across overlays, alerts, sheets, dialogs, and docks; portals vs. viewport/keyboard bounds; inert, Escape, and Back-navigation consistency.
  3. Cross-package contracts and build/cache keys. Producer↔consumer schemas, route tables, manifests, shared runtime helpers, and Turbo/CI env or input keys that could poison caches.

Live UI verification (apps serving a web interface)

For any package with an index.html, do not rely on static reading alone (principle-prove-it-works). Confirm pnpm test:browser and pnpm check's explore stage pass, and inspect the running build across mobile/desktop viewports and light/dark themes for:

  • zero uncaught page errors, console errors, or failed requests,
  • no blank cold-route frames or broken hit-testing (elementsFromPoint) under overlays,
  • visible, unclipped :focus-visible rings and legible contrast on floating surfaces,
  • real interactive controls responding and respecting disabled/loading states.

Do not commit screenshot-comparison tests (AGENTS.md, "Tests").

Phase 2: Evidence and severity bar

Report only verified, high-signal defects. Every finding must include:

  • Severity:
    • P0 — crash, data loss/corruption, deadlock, security/privacy bypass, broken core journey, or unusable critical UI.
    • P1 — race condition, resource/memory leak, spec↔shell mismatch, cross-session state leak, render/perf storm, or accessibility/layering break.
    • P2 — edge-case error gap, missing timeout/eviction bound, meaningful inefficiency, or concrete bug-inviting smell (silent error swallowing, duplicated business rules outside spec/).
  • Exact file:line citation verified by reading the code on disk.
  • Concrete failure path: trigger → line executed → observable user/system breakage.
  • Root-cause fix (principle-fix-root-causes), never a symptom guard.

Never report:

  • style preferences, bikeshedding, or requests for code comments (comments are banned by AGENTS.md, "Writing code"),
  • issues already caught by pnpm check, pnpm lint, or pnpm analyze,
  • hypothetical failures already ruled out by proved Quint/Dafny rules or TypeScript types.

Keep shard notes in conversation or temporary scratch output; never commit new Markdown audit documents to the repository (AGENTS.md, "Hard rules").

Phase 3: Deduplicate, fix in waves, and incrementally re-verify

  1. Deduplicate. Collapse overlapping vertical and horizontal findings into one canonical list, keeping the highest severity and all file:line citations.
  2. Fix in non-overlapping waves.
    • Wave 0 (when needed): land shared contracts, design tokens, or runtime primitives first.
    • Wave 1: fix module defects in parallel on strictly disjoint file globs (principle-separate-before-serializing-shared-state).
    • For each real shell bug fixed, extend the existing journey test that cites its story or rule (AGENTS.md, "Tests").
    • When the same defect repeats across modules, encode the guard structurally in spec/, types, or lint config (principle-encode-lessons-in-structure).
  3. Re-run automated gates. Run pnpm check (following the sync skill if any spec changed), pnpm lint, and pnpm analyze (when defined). Turborepo and .spec-cache/ skip untouched packages automatically.
  4. Incremental re-review. Run a diff-scoped review over only the files modified since the Phase 0 baseline plus any contracts they touch. Confirm every fixed P0/P1/P2 is resolved at its root cause and introduced no regression.
  5. Stop condition. Stop when automated gates are green and zero unresolved P0 or P1 findings (and zero regressions) remain. Cap at three fix-and-reverify rounds; if an architectural tradeoff remains unresolved, stop and escalate it clearly to the user.

Report

Summarize concisely when done:

  1. Scope and automated gates: full vs. incremental, commands run and status.
  2. Findings resolved: grouped by P0 / P1 / P2 with file:line and root-cause fix.
  3. Regression coverage: journey tests, spec rules, or structural checks added.
  4. Remaining or escalated items: any deferred P2s or architectural decisions needing user input, or state explicitly that none remain.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.