project-brain 0.24.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +6 -6
- package/templates/project.claude.md +1 -1
- package/templates/skills/brain-audit/SKILL.md +17 -7
- package/templates/skills/brain-audit/references/abuse.md +36 -11
- package/templates/skills/brain-audit/references/accessibility.md +50 -22
- package/templates/skills/brain-audit/references/ai.md +39 -15
- package/templates/skills/brain-audit/references/analytics.md +34 -11
- package/templates/skills/brain-audit/references/api.md +38 -13
- package/templates/skills/brain-audit/references/backend.md +41 -9
- package/templates/skills/brain-audit/references/browser.md +146 -0
- package/templates/skills/brain-audit/references/complexity.md +22 -12
- package/templates/skills/brain-audit/references/concurrency.md +36 -18
- package/templates/skills/brain-audit/references/consistency.md +32 -9
- package/templates/skills/brain-audit/references/contract-drift.md +34 -16
- package/templates/skills/brain-audit/references/cost.md +45 -23
- package/templates/skills/brain-audit/references/cross-surface-parity.md +38 -11
- package/templates/skills/brain-audit/references/database.md +43 -17
- package/templates/skills/brain-audit/references/dependencies-licensing.md +27 -12
- package/templates/skills/brain-audit/references/design-system.md +40 -17
- package/templates/skills/brain-audit/references/devops.md +32 -17
- package/templates/skills/brain-audit/references/documentation.md +38 -16
- package/templates/skills/brain-audit/references/failure.md +40 -18
- package/templates/skills/brain-audit/references/feature-flags.md +31 -15
- package/templates/skills/brain-audit/references/flow-integrity.md +42 -10
- package/templates/skills/brain-audit/references/frontend.md +40 -12
- package/templates/skills/brain-audit/references/functional.md +31 -11
- package/templates/skills/brain-audit/references/future.md +28 -7
- package/templates/skills/brain-audit/references/goal.md +15 -6
- package/templates/skills/brain-audit/references/i18n.md +30 -8
- package/templates/skills/brain-audit/references/idempotency.md +46 -24
- package/templates/skills/brain-audit/references/infrastructure.md +43 -13
- package/templates/skills/brain-audit/references/mobile.md +37 -15
- package/templates/skills/brain-audit/references/multi-tenancy.md +41 -12
- package/templates/skills/brain-audit/references/numeric.md +33 -16
- package/templates/skills/brain-audit/references/observability.md +43 -19
- package/templates/skills/brain-audit/references/packaging.md +39 -13
- package/templates/skills/brain-audit/references/performance.md +43 -13
- package/templates/skills/brain-audit/references/privacy.md +38 -15
- package/templates/skills/brain-audit/references/product.md +29 -10
- package/templates/skills/brain-audit/references/prompt-spec-gap.md +34 -10
- package/templates/skills/brain-audit/references/reachability.md +38 -18
- package/templates/skills/brain-audit/references/repo-history.md +23 -16
- package/templates/skills/brain-audit/references/runtime.md +48 -10
- package/templates/skills/brain-audit/references/scalability.md +37 -10
- package/templates/skills/brain-audit/references/security.md +46 -22
- package/templates/skills/brain-audit/references/state-model.md +44 -15
- package/templates/skills/brain-audit/references/supply-chain.md +42 -13
- package/templates/skills/brain-audit/references/temporal.md +37 -14
- package/templates/skills/brain-audit/references/testing.md +38 -14
- package/templates/skills/brain-audit/references/tooling-baseline.md +34 -18
- package/templates/skills/brain-audit/references/type-safety.md +38 -19
- package/templates/skills/brain-audit/references/usability.md +78 -0
- package/templates/skills/brain-audit/references/versioning-compatibility.md +34 -12
- package/templates/skills/brain-audit/references/visual-design.md +38 -12
- package/templates/skills/brain-audit/references/web-metadata.md +47 -19
- package/templates/skills/brain-record/SKILL.md +297 -0
- package/templates/skills/brain-record/assets/build-video.sh +142 -0
- package/templates/skills/brain-record/assets/record.mjs +283 -0
- package/templates/skills/brain-record/references/pitfalls.md +233 -0
- package/templates/skills/brain-worktree/SKILL.md +103 -0
|
@@ -8,11 +8,11 @@ Flags are meant to be temporary — a way to ship dark, roll out gradually, or k
|
|
|
8
8
|
|
|
9
9
|
- [ ] `search_code` the flag SDK's accessor call (`isEnabled(`, `useFlag(`, `flags.get(`, or the project's own wrapper) and the flag registry/config file if one exists. Enumerate every flag key referenced anywhere in the codebase — this list is the yardstick for every check below.
|
|
10
10
|
- [ ] For each flag key, `find_callers` on the accessor call site (or `search_code` the literal key string) to get every read location.
|
|
11
|
-
- [ ] Record, per flag: where it's read, what environments set it, and — if the registry stores it — its declared owner and any recorded creation/expiry date.
|
|
11
|
+
- [ ] Record, per flag: where it's read (`find_callers` on the accessor call site), what environments set it (`search_code` each environment config), and — if the registry stores it — its declared owner and any recorded creation/expiry date. This is exactly the content LaunchDarkly recommends recording in a flag's own description — purpose, review date, owner (LaunchDarkly, official product documentation, "Technical debt," current, https://launchdarkly.com/docs/guides/flags/technical-debt).
|
|
12
12
|
|
|
13
13
|
## Classify by type
|
|
14
14
|
|
|
15
|
-
- [ ] Classify each flag into Pete Hodgson's four categories — Release, Experiment, Ops, Permissioning; the canonical taxonomy (martinfowler.com/articles/feature-toggles.html) —
|
|
15
|
+
- [ ] Classify each flag into Pete Hodgson's four categories — Release, Experiment, Ops, Permissioning; the canonical taxonomy (martinfowler.com/articles/feature-toggles.html) — `Read` its name, any comment at the declaration, and where it's read: a flag gating a UI variant or an unfinished code path reads as **Release**; a flag driving cohort or variant routing reads as **Experiment**; a flag read in an error-handling, degraded-mode, or resource-limiting path reads as **Ops**; a flag read alongside a subscription, role, or entitlement check reads as **Permissioning**. This classification is the yardstick for every check below: the four categories differ deliberately in expected lifespan — Release days to weeks ("generally not stick around much longer than a week or two"), Experiment until statistical significance, Ops sometimes permanent by design (a kill switch), Permissioning legitimately years, "at the scale of multiple years" (Martin Fowler / Pete Hodgson, martinfowler.com, current, https://martinfowler.com/articles/feature-toggles.html) — so "this flag is old" is only a finding for the categories where old is not the design.
|
|
16
16
|
|
|
17
17
|
## Flags with no reader
|
|
18
18
|
|
|
@@ -20,19 +20,24 @@ Flags are meant to be temporary — a way to ship dark, roll out gradually, or k
|
|
|
20
20
|
|
|
21
21
|
## Reads with no declaration — the most damaging defect here
|
|
22
22
|
|
|
23
|
-
- [ ] The inverse gap, and the one most worth finding: a flag key read in code (`isEnabled('checkout-v2')`) that appears in no registry, no environment file, no provider config anywhere in the repo. Most flag SDKs return a hardcoded default when a key is unrecognized rather than erroring — which means a **typo'd key silently and permanently returns the default forever**, and nothing in the type system or the test suite catches it, because the call succeeds. `search_code` every literal string argument to the flag accessor and cross-check each one against the registry list built above; any string with no exact match is a candidate, but first rule out: the key is computed at runtime (`` `flag-${variant}` ``) rather than a literal, in which case check the possible expansions instead of dismissing it.
|
|
24
|
-
- [ ] The same conceptual flag under two different keys on two surfaces — a client key and a server key that were meant to name the same rollout but were typed independently at each call site. `search_code` both and compare intent, not just spelling;
|
|
25
|
-
- [ ] A key present in the registry that once had readers and no longer does
|
|
23
|
+
- [ ] The inverse gap, and the one most worth finding: a flag key read in code (`isEnabled('checkout-v2')`) that appears in no registry, no environment file, no provider config anywhere in the repo. Most flag SDKs return a hardcoded default when a key is unrecognized rather than erroring — which means a **typo'd key silently and permanently returns the default forever**, and nothing in the type system or the test suite catches it, because the call succeeds. "If a client-side or mobile SDK tries to evaluate a feature flag that is not available to it," the SDK "serves the fallback value" rather than erroring (LaunchDarkly, official product documentation, "Getting started," current, https://launchdarkly.com/docs/home/getting-started/feature-flags). `search_code` every literal string argument to the flag accessor and cross-check each one against the registry list built above; any string with no exact match is a candidate, but first rule out: the key is computed at runtime (`` `flag-${variant}` ``) rather than a literal, in which case check the possible expansions instead of dismissing it. This is `High` at `read`; where the mis-keyed call site gates an authorisation, paywall, rate-limit, or billing decision, `find_callers`/`trace_path` from the call site to that decision promotes it to `traced`, and `Critical`.
|
|
24
|
+
- [ ] The same conceptual flag under two different keys on two surfaces — a client key and a server key that were meant to name the same rollout but were typed independently at each call site. `search_code` both and compare intent, not just spelling; anchor the judgment on a concrete signal — the same commit or PR introducing both keys (cross-reference `repo-history.md` if run), matching comment text at both declarations, or both keys set together in the same environment-file block — since these don't diff cleanly the way a typo does.
|
|
25
|
+
- [ ] A key present in the registry that once had readers and no longer does — `find_callers` on the accessor confirms zero current readers; cross-reference `repo-history.md`'s history on the call site if run, to distinguish this from "never had a reader" above. Otherwise report both under the same no-reader finding.
|
|
26
26
|
|
|
27
27
|
## Permanently on or off in every environment
|
|
28
28
|
|
|
29
|
-
- [ ] For each flag,
|
|
30
|
-
- [ ] Distinguish "permanently on, old branch still present" (report the dead old-branch code) from "permanently off, new branch never shipped" (report the flag as the thing blocking a feature that otherwise looks complete) — the recommendation differs even though the static signature looks similar.
|
|
29
|
+
- [ ] For each flag, `Read` its value across every environment config file found (`.env.*`, environment-specific YAML/JSON, a provider's exported config). A flag set to the same value in every environment is no longer a decision point — the branch it doesn't select is dead code that nobody will ever exercise again. **Cross-reference `reachability.md`** for the mechanics of confirming the other branch is truly unreachable; report the flag-specific instance here since the flag is the artefact worth naming.
|
|
30
|
+
- [ ] Distinguish "permanently on, old branch still present" (report the dead old-branch code, `find_callers` on the unreachable branch's functions) from "permanently off, new branch never shipped" (report the flag as the thing blocking a feature that otherwise looks complete) — the recommendation differs even though the static signature from the check above looks similar.
|
|
31
|
+
- [ ] Where `repo-history.md` ran and shows a flag's environment value was changed to permanently-on/permanently-off, `search_code` the losing branch's code to confirm whether the same commit or a follow-up within a small window also removed it — cross-reference `repo-history.md`'s findings; if not run, note this as a coverage gap rather than a finding. A flag flipped to its final value with no accompanying or scheduled code removal is the leading edge of the dead-code-still-present class this module and `reachability.md` already flag once the branch is confirmed unreachable. Refuted if the flag's final value was reached very recently, within the category's expected lifespan classified above, so no removal delay has actually occurred yet. LaunchDarkly's own guidance gives a concrete window to judge "delay" against — a 90-120 day target for flag removal after full deployment (LaunchDarkly, official product documentation, "Technical debt," current, https://launchdarkly.com/docs/guides/flags/technical-debt) — and Fowler/Hodgson recommend adding a toggle-removal task to the backlog at the moment the toggle is introduced, not after (Martin Fowler / Pete Hodgson, martinfowler.com, current, https://martinfowler.com/articles/feature-toggles.html).
|
|
32
|
+
|
|
33
|
+
## Repurposed flags and orphaned old paths
|
|
34
|
+
|
|
35
|
+
- [ ] Where a flag key's read location gates a code path that a nearby comment, commit message, or the code's own dead-code smell (no other caller, per `find_callers`) suggests is a *replacement* for an older path, `search_code` the same file/module for the old path's entry point. If the old path is still present and its own gating condition is not the literal inverse of the new flag's condition (e.g. an `else` branch, a second flag never checked), the old path is reachable independent of the new flag's state — report as `traced` if `find_callers`/`trace_path` shows a caller that isn't fully guarded by the new flag, `read` otherwise. Refuted if the old path's only caller is itself gated by the same flag (or its exact negation), so it is provably unreachable whenever the new path is active — quote the guarding condition. This is a distinct defect shape from "old branch still present because flag never flips": here the flag flips exactly as intended, and the danger is a *repurposed* flag whose old meaning's code never got removed and stays reachable through a path the flag no longer controls.
|
|
31
36
|
|
|
32
37
|
## No recorded owner or removal date
|
|
33
38
|
|
|
34
|
-
- [ ] Flags with no owner, ticket reference, or expiry recorded anywhere — not in the registry, not in a comment at the call site, not in the PR that introduced it (out of static reach to check history depth beyond what `repo-history.md` already covers). A flag with no removal criterion is a flag that will never be removed — flag removal belongs in the definition of done, the same way the feature it gates does. Report the count, not each one individually, unless a specific flag is unusually old or risky per the checks below.
|
|
35
|
-
- [ ] Weigh the missing owner/expiry by the type classified above: on a **Release** or **Experiment** toggle, no expiry after weeks of history
|
|
39
|
+
- [ ] Flags with no owner, ticket reference, or expiry recorded anywhere — `search_code` the registry, and the call site's surrounding comments, for an owner/ticket/expiry marker; not in the registry, not in a comment at the call site, not in the PR that introduced it (out of static reach to check history depth beyond what `repo-history.md` already covers). A flag with no removal criterion is a flag that will never be removed — flag removal belongs in the definition of done, the same way the feature it gates does. Report the count, not each one individually, unless a specific flag is unusually old or risky per the checks below. Toggles are "inventory which comes with a carrying cost" (Martin Fowler / Pete Hodgson, martinfowler.com, current, https://martinfowler.com/articles/feature-toggles.html); a flag exceeding its type's expected lifetime can be mechanically auto-flagged "potentially stale" rather than relying on someone remembering (Unleash (Bricks Software AS), official reference documentation, current, https://docs.getunleash.io/reference/feature-toggles).
|
|
40
|
+
- [ ] Weigh the missing owner/expiry by the type classified above: on a **Release** or **Experiment** toggle, no expiry after weeks of history — cross-reference `repo-history.md`'s age-of-flag reading if that module ran, otherwise `search_code` for a dated comment or ticket reference at the call site — is the real finding; those categories are supposed to be short-lived by design. On an **Ops** kill switch or a **Permissioning** toggle, a long lifespan with no expiry is expected, not a defect on its own; missing an *owner* is still worth flagging there, missing an *expiry* usually isn't. Per-category expected lifespan is not just Fowler/Hodgson's qualitative taxonomy — Unleash assigns numeric default lifetimes per type (Release 40 days, Experiment 40 days, Operational 7 days, Kill switch permanent, Permission permanent, Sunset 90 days) and auto-flags a flag exceeding its own type's expectation (Unleash (Bricks Software AS), official reference documentation, current, https://docs.getunleash.io/reference/feature-toggles).
|
|
36
41
|
|
|
37
42
|
## Untested or impossible combinations
|
|
38
43
|
|
|
@@ -41,25 +46,30 @@ Flags are meant to be temporary — a way to ship dark, roll out gradually, or k
|
|
|
41
46
|
|
|
42
47
|
## Partially-shipped features
|
|
43
48
|
|
|
44
|
-
- [ ] A flag gating only one half of a feature — e.g. the new UI is behind the flag but the backend change it depends on shipped unconditionally (or vice versa).
|
|
49
|
+
- [ ] A flag gating only one half of a feature — e.g. the new UI is behind the flag but the backend change it depends on shipped unconditionally (or vice versa). `find_callers` on the flag accessor and `trace_path` from the UI half to the backend half it depends on — if the flag is ever flipped off after being on, the half that shipped unconditionally is now orphaned with no way back. Cross-reference `flow-integrity.md`'s half-wired-feature table — the pairing check there is the same shape, this module just adds "…and is one of the halves actually reachable only via a flag."
|
|
45
50
|
|
|
46
51
|
## Evaluated at load time instead of call time
|
|
47
52
|
|
|
48
53
|
- [ ] `search_code` the accessor call site's context: if it's assigned to a module-level constant or read once during initialization/startup rather than inside the function that uses it, the value is frozen for the process lifetime. This defeats runtime flag flips (kill switches, gradual rollouts) — the deployment has to restart before the new value takes effect, and nobody watching the dashboard toggle would know that.
|
|
49
|
-
- [ ] Where the SDK call itself takes an inline default (`isEnabled('x', { default: true })`),
|
|
50
|
-
- [ ] Percentage-rollout or user-targeting logic computed by hand in application code (a modulo on a user ID, a locally seeded random) instead of deferred to the flag provider.
|
|
54
|
+
- [ ] Where the SDK call itself takes an inline default (`isEnabled('x', { default: true })`), `search_code` each accessor call site for its inline default and diff it against the value declared in the registry's own default. Two different fallback values mean the flag has two different "off" states depending on whether the call reaches the provider or falls back locally — and the local one only fires exactly when the provider is unreachable, the least-tested path. This is by design, not an SDK quirk: on abnormal execution the provider "MUST indicate an error," and the SDK then falls back to the caller's own supplied default — two independently-set defaults are always in play (OpenFeature (CNCF project), official specification, current, https://openfeature.dev/specification/sections/providers).
|
|
55
|
+
- [ ] Percentage-rollout or user-targeting logic computed by hand in application code (a modulo on a user ID, a locally seeded random) instead of deferred to the flag provider. `search_code` for a hand-rolled bucketing function and `Read` it for whether its input is stable — hand-rolled bucketing commonly re-randomizes on each evaluation rather than being stable per user, producing a flag that flips on and off for the same person across page loads.
|
|
51
56
|
|
|
52
57
|
## Kill switches that don't actually kill anything
|
|
53
58
|
|
|
54
59
|
- [ ] For any flag named or documented as a kill switch / circuit breaker, `trace_path` from the flag read to the work it's meant to stop. A kill switch that only suppresses a UI element while the backend job it was meant to halt keeps running (or vice versa) fails exactly when someone needs it most — during an incident, under pressure, trusting that flipping it worked.
|
|
60
|
+
- [ ] Where a flag is documented as a kill switch, `find_callers` on its accessor across the whole codebase, not just the primary service — a kill switch checked in one service/worker/deployment target but not in a second one that runs the same logic (a queue consumer duplicating an API handler's code path, a scheduled job re-implementing what a request handler does) means flipping the switch stops one and not the other. `trace_path` from each caller found to the effect it's meant to suppress. Refuted if the second execution path is proven unreachable in production by other means (e.g. the worker is not deployed, confirmed via `search_code` for its deployment manifest), or it doesn't perform the effect the kill switch suppresses.
|
|
55
61
|
|
|
56
62
|
## Vendor lock-in via a split evaluation surface
|
|
57
63
|
|
|
58
|
-
- [ ] If an OpenFeature SDK is present — `search_code` for `@openfeature/`, `openfeature-sdk`, or a `getProvider`/`OpenFeatureClient` call (the spec is at v0.9.0, CNCF Incubating, with provider support from LaunchDarkly, Flagsmith, Unleash, Split, and others) — confirm application code evaluates flags through it consistently, rather than mixing it with direct calls to the underlying vendor SDK. `search_code` for a vendor-specific import (a LaunchDarkly or Unleash client package, say) used for flag reads alongside `@openfeature/*` in the same codebase. A split surface means half the flags can't move to another provider without an application-code rewrite, which defeats the reason to adopt the standard. Absence of OpenFeature entirely is not itself a finding — the spec is still pre-1.0 and plenty of mature flag setups predate or bypass it.
|
|
64
|
+
- [ ] If an OpenFeature SDK is present — `search_code` for `@openfeature/`, `openfeature-sdk`, or a `getProvider`/`OpenFeatureClient` call (the spec is at v0.9.0, CNCF Incubating, with provider support from LaunchDarkly, Flagsmith, Unleash, Split, and others) — confirm application code evaluates flags through it consistently, rather than mixing it with direct calls to the underlying vendor SDK. `search_code` for a vendor-specific import (a LaunchDarkly or Unleash client package, say) used for flag reads alongside `@openfeature/*` in the same codebase. A split surface means half the flags can't move to another provider without an application-code rewrite, which defeats the reason to adopt the standard. Absence of OpenFeature entirely is not itself a finding — the spec is still pre-1.0 and plenty of mature flag setups predate or bypass it. OpenFeature reached CNCF Incubating maturity on 21 November 2023 as "a vendor-neutral approach to feature-flag management" (Cloud Native Computing Foundation, official project page, current, https://www.cncf.io/projects/openfeature/); v0.9.0 (29 July 2024) is the latest tagged spec release (open-feature/spec, official release history, current, https://github.com/open-feature/spec/releases), and every provider MUST implement the same typed resolution surface (boolean/numeric/string/structure) behind a `name`-bearing `metadata` accessor (OpenFeature (CNCF project), official specification, current, https://openfeature.dev/specification/sections/providers) — that shared surface is exactly what a direct vendor-SDK call bypasses.
|
|
59
65
|
|
|
60
66
|
## Security- and billing-relevant flags — stricter bar
|
|
61
67
|
|
|
62
|
-
- [ ] Any flag gating an authorisation decision, a paywall, a rate limit, or a pricing/billing calculation gets every check above applied without the usual benefit of the doubt: no owner/expiry is a **High** here, not the usual Low-severity noise finding, because a forgotten flag on this class of code is either a security hole (auth bypass left on) or a revenue leak (paywall left off) rather than a housekeeping annoyance.
|
|
68
|
+
- [ ] Any flag gating an authorisation decision, a paywall, a rate limit, or a pricing/billing calculation — identified by `search_code` for the accessor call site adjacent to an auth/entitlement/billing check — gets every check above applied without the usual benefit of the doubt: no owner/expiry is a **High** here, not the usual Low-severity noise finding, because a forgotten flag on this class of code is either a security hole (auth bypass left on) or a revenue leak (paywall left off) rather than a housekeeping annoyance.
|
|
69
|
+
|
|
70
|
+
## What browser observation closes
|
|
71
|
+
|
|
72
|
+
Applies only when `browser.md` ran; findings here are `observed` and cite the bundle path with a line or step number. This module gains nothing from the browser bundle. Every check here resolves against source code, config files, and the flag registry/provider export — none of `steps.md`, `console.jsonl`, `network.jsonl`, `screenshots/`, `trace.json`, `insights.md`, `vitals.md`, `a11y-snapshot.md`, `final-state.md`, or `read_page` output can show which key a flag accessor call reads by, what a registry declares, or whether a call site's default has drifted from the provider's — that information lives in code and config the static probes already reach at `read` or `traced`, tiers the browser bundle cannot improve on for this module's subject matter. The one theoretical overlap — observing which *variant* actually rendered for a given flag state — belongs to a hypothetical A/B-testing or UI-consistency module reading `final-state.md`/`screenshots/`, not to this module's inventory-and-hygiene checks, which are about the flag surface itself rather than the rendered outcome of any one evaluation.
|
|
63
73
|
|
|
64
74
|
## Out of static reach
|
|
65
75
|
|
|
@@ -68,19 +78,25 @@ Flags are meant to be temporary — a way to ship dark, roll out gradually, or k
|
|
|
68
78
|
- Whether a flag's owner, if recorded, is still at the organisation or the ticket still open.
|
|
69
79
|
- Runtime evaluation order when multiple flag providers or a fallback chain is involved.
|
|
70
80
|
- Whether an OpenFeature provider abstraction is actually load-bearing — this module can confirm the call sites are consistent, not that a provider swap has ever been exercised.
|
|
81
|
+
- Whether a configured stale-flag notification or auto-PR integration is actually active and firing — this module can find the config that declares it, not prove it runs.
|
|
71
82
|
|
|
72
83
|
## Severity guidance
|
|
73
84
|
|
|
74
85
|
| Situation | Severity |
|
|
75
86
|
|---|---|
|
|
76
|
-
| Flag read with no matching declaration (typo'd key, silent default) | High
|
|
87
|
+
| Flag read with no matching declaration (typo'd key, silent default) | High |
|
|
88
|
+
| Same, `find_callers`/`trace_path`-traced to an authorisation, paywall, rate-limit, or billing decision (traced) | Critical |
|
|
77
89
|
| Kill switch that doesn't stop the work it claims to | Critical |
|
|
90
|
+
| Kill switch verified in only one of several deployment targets running the same logic, traced (`find_callers`/`trace_path`) | Critical |
|
|
91
|
+
| Repurposed flag's old code path left reachable independent of the flag, traced (`find_callers`/`trace_path`) | Critical |
|
|
92
|
+
| Repurposed flag's old code path left reachable independent of the flag, reachability unconfirmed | High |
|
|
78
93
|
| Client-only or server-only half of a security/billing flag | High |
|
|
79
94
|
| Flag evaluated at load time, defeating a runtime kill switch | High |
|
|
80
95
|
| No owner/expiry on a security- or billing-relevant flag | High |
|
|
81
96
|
| No expiry on a Release or Experiment toggle past its expected short lifespan | Medium |
|
|
82
97
|
| Permanently off flag blocking an otherwise-complete feature | Medium |
|
|
83
98
|
| Permanently on flag with the old branch still present (dead code) | Medium |
|
|
99
|
+
| Flag flipped to its final value with no accompanying or scheduled code removal | Medium |
|
|
84
100
|
| Untested flag combination, structurally reachable | Medium |
|
|
85
101
|
| No owner/expiry on an Ops or Permissioning flag (owner still expected, expiry may not be) | Low |
|
|
86
102
|
| Flag evaluation split between OpenFeature and a direct vendor SDK call | Low |
|
|
@@ -4,6 +4,10 @@ Does each user-visible flow actually complete? Reachability asks whether code ru
|
|
|
4
4
|
|
|
5
5
|
Trace each flow end to end with `trace_path` from the entry point (button, command, route, event) to its terminal effect (write, response, navigation, render). A flow with no proven terminal effect is the finding.
|
|
6
6
|
|
|
7
|
+
## Flow selection
|
|
8
|
+
|
|
9
|
+
- [ ] Before walking every discovered flow, `Read` product.md/discovery notes (or `get_architecture`/`repo_map` for entry points where no product doc exists) to identify the flows with the highest business impact — signup, auth, checkout/payment, and the product's core write action. `trace_path` those first and fully; flows outside that set are recorded as sampled, not silently omitted, if time-boxing forces a cut — practitioner heuristic, no source found for a documented business-impact prioritisation rule.
|
|
10
|
+
|
|
7
11
|
## Orphan UI
|
|
8
12
|
|
|
9
13
|
- [ ] Handlers wired to nothing — `search_code` for the literal patterns `onClick={() => {}}`, `onSubmit={() => {}}`, `href="#"`, and `TODO`/`FIXME` co-located with a handler name. Read the surrounding component before reporting, to rule out a deliberately no-op control (a disabled preview, a placeholder in an unreleased section).
|
|
@@ -16,23 +20,24 @@ Trace each flow end to end with `trace_path` from the entry point (button, comma
|
|
|
16
20
|
|
|
17
21
|
For every flow the user can start, confirm it can end:
|
|
18
22
|
|
|
19
|
-
- [ ] **Submit into the void** — `trace_path` from the request-firing call to any consumer of its response or promise. No path found is the finding.
|
|
20
|
-
- [ ] **Success with no feedback** — `find_callees` on the success branch (`.then`, `onSuccess`); no call to a toast, notification, or state-update function after the write means success is silent. The user retries; now you have a duplicate-write bug.
|
|
21
|
-
- [ ]
|
|
22
|
-
- [ ] **
|
|
23
|
+
- [ ] **Submit into the void** — `trace_path` from the request-firing call to any consumer of its response or promise. No path found is the finding. Rule out a request whose own documentation or naming marks it as intentionally fire-and-forget (an analytics beacon, a best-effort "mark as read" ping) before flagging.
|
|
24
|
+
- [ ] **Success with no feedback** — `find_callees` on the success branch (`.then`, `onSuccess`); no call to a toast, notification, or state-update function after the write means success is silent. The user retries; now you have a duplicate-write bug — idempotency keys are the documented fix Stripe ships for exactly this risk, letting a client "safely repeat the request without risk of creating a second object or performing the update twice" (Stripe, official API reference documentation, current, https://docs.stripe.com/api/idempotent_requests).
|
|
25
|
+
- [ ] `search_code` the request call behind a create-style mutation (a "Submit"/"Pay"/"Create" action, not a `PUT`/`DELETE`) for an idempotency-key or client-generated request-id parameter attached to the call. Where none exists, `find_callers` on the submit handler to confirm no disable-on-submit or debounce guard exists either — a network retry or a fast double-click then creates two records with no server-side mechanism to collapse them (Stripe, official API reference documentation, current, https://docs.stripe.com/api/idempotent_requests). Refuted if a server-side unique constraint on a natural key (an email, an order reference, a slug) collapses the duplicate write into one row regardless of the missing idempotency key — `find_symbol` the target table/model's constraints before flagging.
|
|
26
|
+
- [ ] **Unhandled error path** — `search_code` for `catch {}`, `.catch(() => {})`, and a `catch` block that only logs — an error state the UI cannot render. This is CWE-1069 Empty Exception Block: "an invokable code block contains an exception handling block that does not contain any code," which "can prevent the product from running reliably" (MITRE, CWE, current, https://cwe.mitre.org/data/definitions/1069.html).
|
|
27
|
+
- [ ] **No cancel / no back** — `Read` the multi-step flow's component tree for a cancel or back handler; its absence alongside a wizard/stepper component is the finding.
|
|
23
28
|
- [ ] **No timeout** — `search_code` the request call (`fetch(`, the HTTP client instance) and confirm a timeout or abort-controller is attached. None found means the UI can hang in loading indefinitely.
|
|
24
29
|
- [ ] **Missing confirmation on destructive actions** — `search_code` the delete/reset/overwrite handler, then `find_callees` to confirm a confirmation-dialog component is invoked *before* the mutating call, not merely rendered somewhere else in the tree.
|
|
25
30
|
|
|
26
31
|
## Half-wired features
|
|
27
32
|
|
|
28
|
-
Each of these is a pair where only one half exists. Prove the counterpart with the paired calls below, not by eyeballing directory names.
|
|
33
|
+
Each of these is a pair where only one half exists. Prove the counterpart with the paired calls below, not by eyeballing directory names. A feature-flag key read in code with no live declaration is `feature-flags.md`'s own headline check ("Reads with no declaration — the most damaging defect here") — cross-reference it there instead of re-reporting it here; it scores `High` at `read`, escalating to `Critical` when `find_callers`/`trace_path` traces the mis-keyed call site to an auth/paywall/billing decision.
|
|
29
34
|
|
|
30
35
|
| One half exists | Missing counterpart | Probe | Typical severity |
|
|
31
36
|
|---|---|---|---|
|
|
32
37
|
| Backend endpoint | No UI or client calls it | `search_code` the route path in client code; `find_callers` on the handler | Medium |
|
|
33
38
|
| UI component | No backend to serve it | `find_callees` on the component's submit/fetch call; `search_code` the target path server-side | High |
|
|
34
39
|
| Migration creates a column | No code ever reads or writes it | `search_code` the column name across query and model code | Low → Medium |
|
|
35
|
-
| Code reads a column | No migration creates it | `search_code` the column name across every migration file | Critical |
|
|
40
|
+
| Code reads a column | No migration creates it | `search_code` the column name across every migration file; `find_callers` on the reading code to confirm it sits on a live, reachable path | High → Critical (traced) |
|
|
36
41
|
| Event emitted | No listener subscribed | `find_callers` on the emit call; `search_code` the event name in subscription code | Medium |
|
|
37
42
|
| Listener subscribed | No emitter | `search_code` the event name for any `.emit(`/`dispatch(` call site | Low |
|
|
38
43
|
| Job enqueued | No worker consumes that queue | `search_code` the queue name in worker registration | High |
|
|
@@ -47,14 +52,17 @@ Every view that fetches data needs three states beyond the happy path. Missing a
|
|
|
47
52
|
- [ ] **Loading** — `search_code` the fetch/query hook usage (`useQuery`, `isLoading`) in the view and read the render for a loading branch; its absence means the screen sits blank while the request is in flight.
|
|
48
53
|
- [ ] **Empty** — `search_code` the render of the list/collection and confirm a zero-length branch exists before the item map; a bare `.map()` with no guard renders a broken-looking blank list or crashes on `data[0]`.
|
|
49
54
|
- [ ] **Error** — `search_code` the same hook's error state (`isError`, `error`) and confirm it renders an actionable message with a retry where retrying is meaningful, not just a console log.
|
|
50
|
-
- [ ] The three states are mutually exclusive and reachable —
|
|
55
|
+
- [ ] The three states are mutually exclusive and reachable — `Read` the conditional rendering order; overlapping conditions (an `isLoading` check that doesn't exclude `isEmpty`) let two states render at once.
|
|
51
56
|
|
|
52
57
|
## Cross-cutting
|
|
53
58
|
|
|
54
|
-
- [ ] Optimistic updates have a rollback path when the request fails — `find_callees` on the optimistic-update function; the error branch needs a rollback/revert call, not just a log.
|
|
59
|
+
- [ ] Optimistic updates have a rollback path when the request fails — `find_callees` on the optimistic-update function; the error branch needs a rollback/revert call, not just a log. The supported pattern is `onMutate` snapshotting the previous cache value and returning it as context, with `onError` using that snapshot to restore state; a plain refetch is a distinct strategy from rollback, not a substitute for one (TanStack core team, official framework documentation, current, https://tanstack.com/query/latest/docs/framework/react/guides/optimistic-updates).
|
|
60
|
+
- [ ] `find_callees` on the webhook receiver's handler function, before its response is sent. If the callee chain runs a database write, an external API call, or other non-trivial work synchronously with no queue/job dispatch (`enqueue`, `.delay(`, a job-queue `.add(`) in between, the handler risks missing the provider's response-time window; the provider marks the delivery failed and either drops it or retries into a system that already partially processed it — GitHub requires a response "within 10 seconds" and records a 4xx/5xx as a failure (GitHub, official product documentation, current, https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks), and Stripe's own best practice is to "handle events asynchronously" since synchronous processing "might encounter scalability issues" (Stripe, official vendor documentation, current, https://docs.stripe.com/webhooks). Refuted if the callee chain is trivially fast (a single indexed upsert, no outbound call), or the platform queues every request transparently at the infrastructure layer (a serverless function fronted by a managed queue).
|
|
61
|
+
- [ ] Webhook receiver route is explicitly exempted from CSRF/session-auth middleware, not merely reachable despite it — `search_code` the CSRF/session-auth middleware registration (`protect_from_forgery`, `csrf`, a global `app.use` auth guard) and `Read` the route mount order to confirm the webhook path sits outside it or carries an explicit exemption; Stripe warns CSRF protection "might also prevent your site from processing legitimate events" (Stripe, official vendor documentation, current, https://docs.stripe.com/webhooks). Provider behaviour on a rejected delivery differs and is checked before assuming either: Stripe retries a failed delivery for up to three days (Stripe, official vendor documentation, current, https://docs.stripe.com/webhooks), while GitHub records a 4xx as a failed delivery within a 10-second response window and does not auto-redeliver it (GitHub, official product documentation, current, https://docs.github.com/en/webhooks/testing-and-troubleshooting-webhooks/troubleshooting-webhooks; GitHub, official product documentation, current, https://docs.github.com/en/webhooks/using-webhooks/handling-failed-webhook-deliveries). Refuted if the route is mounted on a router instantiated before the CSRF/session-auth middleware is applied — confirm with `Read` before flagging.
|
|
55
62
|
- [ ] Multi-step flows survive a page reload, or explicitly warn before losing progress — `search_code` for persisted step state (`sessionStorage`, `localStorage`, a URL param) or a `beforeunload` handler. Absence of both is the finding.
|
|
56
63
|
- [ ] Every flow that writes has a corresponding way to read the result back — `search_code` a GET/query counterpart to each mutating endpoint or dispatch.
|
|
57
64
|
- [ ] Authenticated flows handle session expiry mid-flow rather than failing at the final step — `search_code` for a 401/expired-session interceptor and confirm it is wired into the same client used by long-running flows, not only the initial page load.
|
|
65
|
+
- [ ] `Read` a webhook handler that advances a stored state machine (e.g. subscription onboarding, order fulfillment) per event type. If the transition logic trusts the incoming event's type alone to decide the next state, with no `find_callees`-provable reconciliation call back to the source of truth (a GET/query re-fetch of current state before applying the transition), an out-of-order delivery can move the state machine backwards or skip a step — Stripe states plainly it "doesn't guarantee the delivery of events in the order that they're generated" (Stripe, official vendor documentation, current, https://docs.stripe.com/webhooks). Refuted if the handler already re-fetches current state from the source of truth before applying each event — check `find_callees` for that reconciliation call before flagging.
|
|
58
66
|
|
|
59
67
|
## Out of static reach
|
|
60
68
|
|
|
@@ -63,6 +71,24 @@ Every view that fetches data needs three states beyond the happy path. Missing a
|
|
|
63
71
|
- Whether a confirmation dialog is easy to dismiss accidentally, or whether users read it before clicking through.
|
|
64
72
|
- Session-expiry handling that depends on server-side token lifetimes not visible from source.
|
|
65
73
|
- Whether an event with no in-repo listener is consumed by a downstream service, browser extension, or webhook subscriber outside this repo.
|
|
74
|
+
- Whether this webhook is registered with the provider — this module can prove the receiver code exists, not that the provider is configured to call it.
|
|
75
|
+
- Whether events for this flow are ever delivered out of order in production — this module reads the handler's ordering assumption, not a live race.
|
|
76
|
+
- Whether a missing idempotency guard produces a real duplicate write in production — this module proves the guard is absent, not that duplication occurred.
|
|
77
|
+
- Whether an orphaned-looking flag is safe to archive — this module sees the code side, not the flag provider's full consumer list.
|
|
78
|
+
|
|
79
|
+
## What browser observation closes
|
|
80
|
+
|
|
81
|
+
Applies only when `browser.md` ran; findings here are `observed` and cite the bundle path with a line or step number.
|
|
82
|
+
|
|
83
|
+
| Artefact | Gap it closes | Observed instance earns |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `steps.md` | Whether the loading/error UI actually renders correctly at runtime, versus merely proving the branch exists in source | High |
|
|
86
|
+
| `network.jsonl` | Timing-dependent race between an optimistic update and the server's real response — bounded to the single observed timing, not eliminated as a possibility | Medium |
|
|
87
|
+
| `steps.md` | Orphan control confirmed: a control clicked during a walked flow produced no request and no DOM/state change | High |
|
|
88
|
+
| `routes.md`, `steps.md` | Orphan navigation target confirmed at runtime — a control's click target never appears among `routes.md`'s routes discovered, and the click itself produces no URL change / a 404 render. Refuted if the target is an intentionally excluded dev-only or feature-flagged route, named as such | High |
|
|
89
|
+
| `network.jsonl`, `steps.md`/`final-state.md` | Submit-into-the-void confirmed at runtime — the write request fires with no subsequent read-back request in the same flow, and no state change after. Refuted if the request is named/documented as fire-and-forget (analytics beacon, best-effort ping) | High |
|
|
90
|
+
| `steps.md`, `screenshots/`, `network.jsonl` | Missing confirmation on a destructive action, observed — a delete/reset/overwrite control's click is immediately followed by the mutating call, with no confirmation-dialog step or screenshot recorded in between. Refuted if a confirmation step exists elsewhere in the flow and this walk simply skipped it — re-walk before flagging | High |
|
|
91
|
+
| `network.jsonl`, `steps.md`/`screenshots/` | Hang with no timeout confirmed — a request pending past a generous threshold with a stuck loading indicator and no timeout/abort UI. Refuted if the operation is legitimately long-running and the UI's own copy says so (a report export, a batch job) — bounded to this one observed timing | Medium |
|
|
66
92
|
|
|
67
93
|
## Reporting
|
|
68
94
|
|
|
@@ -72,9 +98,11 @@ Report each broken flow as a path, not a symptom: `entry point (file:line) →
|
|
|
72
98
|
|
|
73
99
|
| Situation | Severity |
|
|
74
100
|
|---|---|
|
|
75
|
-
| Client calls an endpoint that does not exist,
|
|
101
|
+
| Client calls an endpoint that does not exist, established by `search_code` for the route path server-side | High |
|
|
102
|
+
| Code reads a column no migration creates, `find_callers`-traced to a live, reachable call site | Critical |
|
|
103
|
+
| Code reads a column no migration creates, established only by the migration-file `search_code` | High |
|
|
76
104
|
| UI component with no backend to serve it | High |
|
|
77
|
-
| Webhook receiver
|
|
105
|
+
| Webhook receiver route not backed by any registration declared in-repo (deploy config, IaC, admin notes) — coverage gap, confirm against the provider dashboard directly | High |
|
|
78
106
|
| Job enqueued with no worker consuming the queue | High |
|
|
79
107
|
| Unhandled error path swallowed silently | High |
|
|
80
108
|
| Success with no feedback, risking a duplicate-write retry | Medium |
|
|
@@ -82,5 +110,9 @@ Report each broken flow as a path, not a symptom: `entry point (file:line) →
|
|
|
82
110
|
| Handler wired to nothing (orphan UI) | Medium |
|
|
83
111
|
| Backend endpoint with no caller | Medium |
|
|
84
112
|
| Optimistic update with no rollback path | Medium |
|
|
113
|
+
| Webhook receiver route not exempted from CSRF/session-auth middleware | High |
|
|
114
|
+
| Webhook handler runs heavy processing synchronously with no async dispatch before the response | High |
|
|
115
|
+
| Non-idempotent create action with no idempotency key or disable-on-submit guard | Medium |
|
|
116
|
+
| Webhook-driven state machine trusts event order with no reconciliation call to the source of truth | Medium |
|
|
85
117
|
| Config option accepted but nothing branches on it | Low |
|
|
86
118
|
| Listener subscribed with no emitter | Low |
|
|
@@ -17,7 +17,8 @@ Duplicated component *structure* is a finding here. The *values that have diverg
|
|
|
17
17
|
## Component structure
|
|
18
18
|
|
|
19
19
|
- [ ] Components separate what they show from where the data comes from. Read the component: does it call `fetch`/a query hook, transform the result, *and* render markup, all in one file? That is three reasons to change. Rule out: a container component whose only job is composing children is not a violation — the smell is business logic mixed with render, not composition itself.
|
|
20
|
-
- [ ] No component is large enough that its responsibilities cannot be named in one sentence. `repo_map` ranks files by centrality; open the top-ranked component files and check their size and hook count —
|
|
20
|
+
- [ ] No component is large enough that its responsibilities cannot be named in one sentence. `repo_map` ranks files by centrality; open the top-ranked component files and check their size and hook count — a component past roughly 200 lines or 5+ `use*` hooks — a local heuristic to trigger inspection, not a standard limit — is the trigger to inspect; `Read` the file to confirm the smell before reporting, since size alone is a signal, not proof (Hwang, Kweon, Rhee, Lee, Park, Jung, Jeon & Seo, arXiv preprint, 2026, https://arxiv.org/abs/2602.17891 — hook-dependency anti-patterns are specifically the class both unaided developers and an LLM coding assistant under-detect from source alone). A component where one custom hook's return value feeds directly into another hook's input — a chain of two or more `use*` calls threaded together, not independent sibling hooks — is read in full before judging it clean, even under this size/hook-count trigger; `Read` the chain end to end and confirm each link's dependency array matches what that link actually consumes. Rule out a standard composition (a `useQuery` result passed to a formatting hook with no internal state) with no reactive dependency mismatch.
|
|
21
|
+
- [ ] In a framework with Server Components, the client/server boundary is drawn at leaf interactivity, not at the top of a route. `search_code` for `"use client"` — a directive placed on a component that itself does no `useState`/`useEffect`/event handling but is an ancestor of components that do is dragging server-only work (and its dependencies) into the client bundle; `find_callees` on the flagged component shows what it pulls in. Rule out a directive placed there deliberately because the framework requires the boundary at a specific file (e.g. a layout that must export metadata) — confirm with `Read` before flagging (React core team, react.dev, "Server Components", current, https://react.dev/reference/rsc/server-components — the docs' own worked example quantifies an extra 75K gzipped of libraries shipped to the client from exactly this misplacement).
|
|
21
22
|
- [ ] Shared UI is shared, not copy-pasted. `search_code` a distinctive class string or markup shape from a button, card, or modal — duplicate hits are the finding. Rule out a repeated utility-class combination that Tailwind encourages; the finding is duplicated *structure*, not a repeated class string alone.
|
|
22
23
|
- [ ] Props are typed, and optional props default in one place. `find_symbol` the component to read its prop type, then `search_code` the prop name at its call sites — a default repeated at each call site instead of declared once in the component means every call site can drift from the others.
|
|
23
24
|
|
|
@@ -30,31 +31,53 @@ Duplicated component *structure* is a finding here. The *values that have diverg
|
|
|
30
31
|
|
|
31
32
|
## Data fetching
|
|
32
33
|
|
|
33
|
-
- [ ] Requests are cancelled or ignored on unmount. `search_code` for the fetching effect and check for an `AbortController`/cleanup return, or confirm the query library (React Query, SWR) handles this by default — a raw `fetch` inside `useEffect` with neither is a late response writing to a dead component.
|
|
34
|
+
- [ ] Requests are cancelled or ignored on unmount. `search_code` for the fetching effect and check for an `AbortController`/cleanup return, or confirm the query library (React Query, SWR) handles this by default — a raw `fetch` inside `useEffect` with neither is a late response writing to a dead component (React core team, react.dev, "Synchronizing with Effects", current, https://react.dev/learn/synchronizing-with-effects — the cleanup function should either abort the fetch or ignore its result).
|
|
35
|
+
- [ ] Every subscription an Effect creates (`addEventListener`, `IntersectionObserver`/`ResizeObserver`/`MutationObserver`, a WebSocket, a third-party SDK's `.on(...)`) is torn down in that Effect's cleanup, not only fetch calls. `search_code` for the subscribing call inside a `useEffect` and check the returned function actually unsubscribes the same instance — a cleanup that unsubscribes a newly created instance instead of the one just created is not a fix. Rule out a subscription that is intentionally process-lifetime (a module-level singleton set up once outside any component's Effect) — not a per-mount subscription this check targets (React core team, react.dev, "Synchronizing with Effects", current, https://react.dev/learn/synchronizing-with-effects — the same effect-cleanup rule the fetch-cancellation check above narrows to fetches only; this restores the subscription half the source documents).
|
|
34
36
|
- [ ] Nothing fetches in a render path. `search_code` for the HTTP client call (`fetch(`, `axios.`) and read the call site — one sitting directly in a component body, outside any effect, handler, or loader, re-fires on every render.
|
|
35
|
-
- [ ] Refetch and invalidation rules are explicit. `search_code` the mutation hooks and check each one either calls the cache's invalidate/refetch or documents why it does not — a mutation with neither leaves stale data on screen until the next full reload.
|
|
36
|
-
- [ ] Waterfall requests — a fetch whose input comes from a previous fetch's output — are intentional, not accidental. `search_code` for nested `await` calls inside one async function or effect; two independent fetches sequenced only by code order, with no real data dependency between them, is wasted latency.
|
|
37
|
+
- [ ] Refetch and invalidation rules are explicit. `search_code` the mutation hooks and check each one either calls the cache's invalidate/refetch or documents why it does not — a mutation with neither leaves stale data on screen until the next full reload (TanStack maintainers, tanstack.com, current, https://tanstack.com/query/latest/docs/framework/react/guides/query-invalidation — invalidating a query marks it stale and triggers an immediate background refetch when it is mounted; Vercel/SWR maintainers, swr.vercel.app, current, https://swr.vercel.app/docs/mutation — calling the global mutator with a key nobody is subscribed to is a silent no-op, not an invalidation).
|
|
38
|
+
- [ ] Waterfall requests — a fetch whose input comes from a previous fetch's output — are intentional, not accidental, in a component Effect and in server-executed data loading alike. `search_code` for nested `await` calls inside one async function or effect, and for consecutive `await` statements inside a Server Component (no `"use client"` directive) or loader-equivalent function; two independent fetches sequenced only by code order, with no real data dependency between them, is wasted latency (React core team, react.dev, "Server Components", current, https://react.dev/reference/rsc/server-components — without Server Components, nested client-side fetching creates "an expensive client-server waterfall"). Rule out a second call whose arguments genuinely reference the first call's result — a real dependency, not an accidental one.
|
|
37
39
|
|
|
38
40
|
## Rendering correctness
|
|
39
41
|
|
|
40
|
-
- [ ] List keys are stable identities, not array indices. `search_code` for `key={index}` or `.map((item, index)` feeding `index` into `key` — stable only if the list is never reordered, filtered, or spliced; confirm that before excusing it.
|
|
41
|
-
- [ ] Effects declare every dependency they read, and none they do not. `search_code` for `eslint-disable-next-line react-hooks/exhaustive-deps` — each suppression is a self-admitted gap;
|
|
42
|
-
- [ ]
|
|
42
|
+
- [ ] List keys are stable identities, not array indices. `search_code` for `key={index}` or `.map((item, index)` feeding `index` into `key` — stable only if the list is never reordered, filtered, or spliced; confirm that before excusing it (React core team, react.dev, "Rendering Lists", current, https://react.dev/learn/rendering-lists — index-as-key "often leads to subtle and confusing bugs" because render order can change; a stable key must be a stable ID based on the data).
|
|
43
|
+
- [ ] Effects declare every dependency they read, and none they do not. `search_code` for `eslint-disable-next-line react-hooks/exhaustive-deps` — each suppression is a self-admitted gap; `Read` what the effect references against its dependency array. Rule out an effect with an empty dependency array whose comment or shape shows deliberate run-once-on-mount intent (a value read once at initialization, not meant to re-trigger the effect) (React core team, react.dev, "Removing Effect Dependencies", current, https://react.dev/learn/removing-effect-dependencies — suppressing the linter "lies" to React about what the Effect depends on; the official recommendation is to treat the dependency lint error as a compilation error).
|
|
44
|
+
- [ ] Interaction handlers (`onClick`, `onChange`, `onSubmit`) do not run unbounded synchronous work on the full dataset. `search_code` the handler body for a `.sort(`/`.filter(`/`.map(`/`JSON.parse(` over a list or payload with no visible size bound, called directly in the handler rather than memoized, debounced, or deferred (`useTransition`, `requestIdleCallback`). Rule out a handler that operates on an already-small, page-scoped list — the risk is proportional to the data size, not the presence of the pattern (web.dev/Google, current, https://web.dev/articles/inp — INP's poor threshold, >500ms, is explicitly attributed to long JavaScript tasks triggered by user interaction; this check targets the source-level shape of that defect class before any browser run exists to measure it directly).
|
|
45
|
+
- [ ] No layout shift from content that arrives late. Read the component's loading branch against its loaded branch — a loading branch that does not reserve the same space (a skeleton, a fixed `min-height`/`aspect-ratio`) as the loaded content is a confirmed CLS defect, not a guess (the width/height case of this is grounded by HTTP Archive, Web Almanac 2024, Media chapter, 2024, https://almanac.httparchive.org/en/2024/media — only 32% of `<img>` elements on mobile set both width and height, which the chapter states helps prevent CLS by reserving space before images load; the general skeleton/min-height case beyond images remains a practitioner heuristic, no source found).
|
|
43
46
|
- [ ] Forms are controlled consistently. `search_code` the form component for a mix of `value={}`/`onChange` on some fields and `defaultValue`/an uncontrolled ref on others in the same form — the mix is the defect, not either style alone.
|
|
44
47
|
|
|
45
48
|
## Assets and bundle
|
|
46
49
|
|
|
47
|
-
- [ ] Images declare dimensions and use a modern format. `search_code` for `<img`/`<Image` tags with neither `width`/`height` attributes nor a CSS aspect-ratio, and check the served file extensions against `.webp`/`.avif` availability.
|
|
48
|
-
- [ ] Large dependencies are justified. Read the manifest from `get_architecture`, then `search_code` each heavy package's import sites — a dependency pulled in for one helper in one file is a candidate for inlining; cross-reference `Dependencies & Licensing` for the licensing angle.
|
|
49
|
-
- [ ] Code splitting exists at route boundaries if the app has routes. `search_code` for `lazy(`, `dynamic(`, or the framework's route-level split convention — a route table importing every page eagerly ships the whole app on first load.
|
|
50
|
-
- [ ] Unused assets are reported under `Reachability
|
|
50
|
+
- [ ] Images declare dimensions and use a modern format. `search_code` for `<img`/`<Image` tags with neither `width`/`height` attributes nor a CSS aspect-ratio, and check the served file extensions against `.webp`/`.avif` availability (HTTP Archive, Web Almanac 2024, Media chapter, 2024, https://almanac.httparchive.org/en/2024/media — only 32% of `<img>` elements on mobile set both width and height; format mix on mobile still skews toward JPEG/PNG/GIF over AVIF/WebP, and 9.5% of LCP-responsible images are incorrectly marked lazy).
|
|
51
|
+
- [ ] Large dependencies are justified. Read the manifest from `get_architecture`, then `search_code` each heavy package's import sites — a dependency pulled in for one helper in one file is a candidate for inlining; cross-reference `Dependencies & Licensing` for the licensing angle (HTTP Archive, Web Almanac 2024, JavaScript chapter, 2024, https://almanac.httparchive.org/en/2024/javascript — median JS payload is 613 KB desktop / 558 KB mobile, with a median 206 KB (44%) of mobile bytes delivered but unused).
|
|
52
|
+
- [ ] Code splitting exists at route boundaries if the app has routes. `search_code` for `lazy(`, `dynamic(`, or the framework's route-level split convention — a route table importing every page eagerly ships the whole app on first load (HTTP Archive, Web Almanac 2024, JavaScript chapter, 2024, https://almanac.httparchive.org/en/2024/javascript — dynamic `import()` adoption on mobile rose from 0.34% in 2022 to 3.70% in 2024, still a small minority of pages code-split).
|
|
53
|
+
- [ ] Unused assets are reported under `Reachability` (`find_callers` on each asset import), not here.
|
|
51
54
|
|
|
52
55
|
## Out of static reach
|
|
53
56
|
|
|
54
57
|
- Actual re-render counts and effect firing order at runtime — a dependency array can look correct in source and still over-fire in practice.
|
|
55
|
-
- Real bundle size and per-chunk output — the manifest and import graph show what is *possible* to split, not what a bundler analysis would measure.
|
|
58
|
+
- Real bundle size and per-chunk output — the manifest and import graph show what is *possible* to split, not what a bundler analysis would measure — closed by `runtime.md`'s declared `build` step when execution is enabled and the build tool reports chunk sizes, or by `browser.md`'s `resource-perf.md` when browser observation is enabled instead.
|
|
56
59
|
- Whether an unmounted-component write actually happens — the race depends on response timing, not just the presence or absence of cleanup.
|
|
57
60
|
- Actual network waterfall duration and perceived loading performance.
|
|
61
|
+
- Whether hydration delay is acceptable on the real device/network mix production traffic uses — a lab run is one preset, not the population.
|
|
62
|
+
- Whether a cleanup call actually removes the listener it was written to remove — this requires runtime argument identity, not text matching.
|
|
63
|
+
- The full reactive data-flow graph between a component's hooks — the structural call graph this audit reads is a different graph than the one that would need building.
|
|
64
|
+
|
|
65
|
+
## What browser observation closes
|
|
66
|
+
|
|
67
|
+
Applies only when `browser.md` ran; findings here are `observed` and cite the bundle path with a line or step number.
|
|
68
|
+
|
|
69
|
+
| Artefact | Gap it closes | Observed instance earns |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `trace.json`/`insights.md` | Visible re-render storm: long tasks and render-blocking work during a walked flow that a correct-looking dependency array still produces in practice | Medium |
|
|
72
|
+
| `console.jsonl` | An unmounted-component write actually firing — React's own "Can't perform a React state update on an unmounted component" warning, tagged to the step that caused it | High |
|
|
73
|
+
| `network.jsonl` | Actual network waterfall duration and perceived loading performance on a walked flow | Low |
|
|
74
|
+
| `vitals.md`, corroborated by `screenshots/` before/after the loading→loaded transition | Real layout shift (CLS) against Google's threshold, on a walked flow — lab data, one machine; never a claim about real-user p75. Refuted when the CLS score is driven by an element unrelated to the loading branch under review (a late-loading ad slot elsewhere on the page) — attribute the shift to a specific element via `trace.json`/`insights.md` before tying it to this component | Medium |
|
|
75
|
+
| `network.jsonl` | Duplicated requests — the same call fired more than once for one user action, visible as repeated entries during a single step | Medium |
|
|
76
|
+
| `network.jsonl`, cross-referenced with `routes.md` | Code splitting at route boundaries actually effective at runtime — a route with `lazy(`/`dynamic(` in source but no new JS chunk request in `network.jsonl` at that navigation step means the split is not effective, whatever the source shape suggests. Refuted when the chunk was already loaded by an earlier prefetch (a router prefetch-on-hover visible earlier in `network.jsonl`) rather than bundled eagerly | Medium |
|
|
77
|
+
| `resource-perf.md` | Large dependencies' real cost on a walked page — the page's total JS weight against the HTTP Archive 2024 desktop median of 613 KB per page. Refuted when the heavy resource is confirmed non-render-blocking in `insights.md`/`trace.json` — a large but lazy, off-critical-path chunk is not the same defect as a large blocking one | Low |
|
|
78
|
+
| `resource-perf.md` and `network.jsonl` response headers/content-type | Images actually served on a walked page, against source `<img>`/`<Image>` markup found via `search_code`. Refuted when a legacy-format image is served only as a `<picture>` fallback whose modern-format `<source>` was the one actually requested — check which `Content-Type` the browser actually fetched | Low |
|
|
79
|
+
| `trace.json`/`insights.md` long-task entries and `vitals.md`'s INP figure | An interaction handler's expensive synchronous work confirmed or refuted at runtime, against Google's 200ms/500ms INP thresholds — lab data, one run, never a claim about real-user p75 INP. Refuted when the flagged handler's step shows no long task and INP stays under 200ms on this run — note it as unconfirmed-at-this-data-size, not false, since lab data is one dataset size | High |
|
|
80
|
+
| `console.jsonl`, `vitals.md`, `steps.md` timestamps | Hydration-related unresponsiveness on a walked flow — a React hydration-mismatch warning, elevated TBT/INP, and the gap between navigation and first successful interaction. Refuted when the delay is attributable to network/API latency visible in `network.jsonl` rather than client-side hydration cost | Medium |
|
|
58
81
|
|
|
59
82
|
## Severity guidance
|
|
60
83
|
|
|
@@ -66,3 +89,8 @@ Duplicated component *structure* is a finding here. The *values that have diverg
|
|
|
66
89
|
| Fetch inside a render path | High |
|
|
67
90
|
| Effect with a missing dependency it reads | Medium |
|
|
68
91
|
| Copy-pasted shared UI | Low |
|
|
92
|
+
| Client Component boundary drawn above leaf interactivity | Medium |
|
|
93
|
+
| Unbounded synchronous work in an interaction handler | Medium |
|
|
94
|
+
| Subscription not torn down in Effect cleanup | Medium |
|
|
95
|
+
| Hook-chain reactive mismatch missed by size heuristic alone | Medium |
|
|
96
|
+
| Waterfall requests in server-executed data loading | Medium |
|
|
@@ -4,33 +4,36 @@ Does the software actually do what it claims to do? This module audits behaviour
|
|
|
4
4
|
|
|
5
5
|
## Claimed vs. real behaviour
|
|
6
6
|
|
|
7
|
-
- [ ] Every capability the README/docs advertise exists in code. `search_code` the feature's name or the exact phrase used in the doc, then `find_symbol` on what it points at. A documented feature with no implementation is `High`.
|
|
7
|
+
- [ ] Every capability the README/docs advertise exists in code. `search_code` the feature's name or the exact phrase used in the doc, then `find_symbol` on what it points at. A documented feature with no implementation is `High`. (Cucumber (SmartBear), "BDD," official documentation — https://cucumber.io/docs/bdd/)
|
|
8
8
|
- [ ] Every CLI command, flag, subcommand, or public entry point listed in docs is reachable from the real dispatcher. Confirm with `trace_path` from the entry point to the handler.
|
|
9
9
|
- [ ] The inverse: capabilities that exist in code but appear in no doc. `search_code` the exported symbol or command string across the docs directory — zero hits confirms it. Rule out: deliberately unlisted internal/admin command, or a feature shipped behind a flag pending announcement. Undocumented and unruled-out ⇒ candidate for the `Reachability` module.
|
|
10
10
|
- [ ] Names do not lie. `find_symbol` the function, then read its body against its name: a `validateUser` that only checks non-null, a `cache` that never evicts, a `retry` with one attempt. Naming drift is `Medium` — it misleads every future reader.
|
|
11
|
+
- [ ] Where feature files exist (`search_code` for `.feature` files or step-definition directories), `find_callers`/`trace_path` from each step definition to the production entry point it claims to exercise. A step definition that stubs, mocks past, or never calls the real entry point makes its scenario a decorative spec — the same defect class as "documented capability with no implementation," one layer deeper because it looks executed. Rule out a scenario tagged pending/skipped (`@wip`, `@skip`) whose test-runner report marks it not-run — that is an honest gap, not a false claim. (Cucumber (SmartBear), "BDD," official documentation — https://cucumber.io/docs/bdd/; Fowler, "SpecificationByExample," martinfowler.com bliki — https://martinfowler.com/bliki/SpecificationByExample.html)
|
|
12
|
+
- [ ] For a capability confirmed present by the README/docs-to-code check above, `find_callers` the entry point to locate its test(s) and read whether the test invokes the entry point with its real collaborators or replaces every collaborator with a mock/stub such that the assertion cannot fail even if the documented behaviour regresses. Rule out a mocked collaborator that is a genuinely external, non-deterministic system (third-party API, payment gateway) — a fake over the real dependency there is not a defect. (Winters, Manshreck & Wright, eds., *Software Engineering at Google*, ch. 11 — https://abseil.io/resources/swe-book/html/ch11.html)
|
|
11
13
|
|
|
12
14
|
## Input handling
|
|
13
15
|
|
|
14
|
-
- [ ] Each public entry point states what it accepts and rejects the rest. `find_symbol` the entry point and read its parameter validation. Missing validation at a trust boundary escalates to the `Security` module.
|
|
15
|
-
- [ ] Boundary values are handled: empty string, empty collection, zero, negative, max int, unicode, very long input. Read the validation function's guard clauses — an entry point with none of these is the finding, not each missing case individually.
|
|
16
|
+
- [ ] Each public entry point states what it accepts and rejects the rest. `find_symbol` the entry point and read its parameter validation. Missing validation at a trust boundary escalates to the `Security` module. (OWASP, "Input Validation Cheat Sheet" — https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html)
|
|
17
|
+
- [ ] Boundary values are handled: empty string, empty collection, zero, negative, max int, unicode, very long input. Read the validation function's guard clauses — an entry point with none of these is the finding, not each missing case individually. (OWASP, "Input Validation Cheat Sheet" — https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html)
|
|
16
18
|
- [ ] Optional parameters have a defined default, and the default is the safe one. `find_symbol` the signature; a parameter typed optional with no explicit default is the finding.
|
|
17
|
-
- [ ] Malformed input produces an actionable error, not a stack trace and not silence. `search_code` the entry point's error path (try/catch, `Result`, error return). Rule out a global error-handler/middleware that catches upstream of this function before reporting silence — check its behaviour too, not just the local absence. Whether the resulting message reads as actionable to a real user is out of static reach.
|
|
19
|
+
- [ ] Malformed input produces an actionable error, not a stack trace and not silence. `search_code` the entry point's error path (try/catch, `Result`, error return). Rule out a global error-handler/middleware that catches upstream of this function before reporting silence — check its behaviour too, not just the local absence. Whether the resulting message reads as actionable to a real user is out of static reach. (OWASP, "Error Handling Cheat Sheet" — https://cheatsheetseries.owasp.org/cheatsheets/Error_Handling_Cheat_Sheet.html)
|
|
20
|
+
- [ ] Where an entry point's validation is confirmed present (the check above), `Read` the validation logic's shape: a denylist/blocklist (reject specific bad characters or values) rather than an allowlist (accept only known-good shapes) is a weaker-than-best-practice pattern, distinct from and additional to validation being absent entirely. Rule out a denylist targeting a closed, fully-enumerable set (e.g., a fixed internal enum) where allowlist and denylist are mathematically equivalent. (OWASP, "Input Validation Cheat Sheet" — https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html)
|
|
18
21
|
|
|
19
22
|
## Output correctness
|
|
20
23
|
|
|
21
24
|
- [ ] Return shapes are consistent across the success paths of the same function. `find_symbol` the function and read every `return`. A function returning `T | null | undefined | []` for "nothing" has three ways to be wrong at every call site.
|
|
22
25
|
- [ ] Errors are distinguishable from valid empty results. `find_callers` the function, then read one call site: can it tell "empty" from "failed" without inspecting an exception?
|
|
23
|
-
- [ ] Side effects match the name: `find_symbol` a function named as a query (`get`, `list`, `find`, `is`) and read its body for writes. Rule out an internal memoisation/cache write that has no externally observable effect — that is not the side effect this check targets. A query that mutates externally visible state is `Medium`.
|
|
26
|
+
- [ ] Side effects match the name: `find_symbol` a function named as a query (`get`, `list`, `find`, `is`) and read its body for writes. Rule out an internal memoisation/cache write that has no externally observable effect — that is not the side effect this check targets. A query that mutates externally visible state is `Medium`. For each HTTP entry point registered under GET, HEAD, or OPTIONS (`search_code` the router registration), `find_symbol` the handler and read its body for a write to a datastore, a queued side-effecting job, or an externally observable mutation — a safe-method handler with such a write violates the method's own semantics, independent of whether it is also named like a query. Rule out request logging or an internal counter with no externally observable effect on resource state — RFC 7231's Safe Methods section carves this out: a method whose defined semantics are essentially read-only "is considered safe," and per-request logging is not the kind of state change that carve-out is about. (Fowler, "CommandQuerySeparation," martinfowler.com bliki — https://martinfowler.com/bliki/CommandQuerySeparation.html; IETF, RFC 7231 §4.2.1 — https://www.rfc-editor.org/rfc/rfc7231#section-4.2.1)
|
|
24
27
|
|
|
25
28
|
## State and idempotency
|
|
26
29
|
|
|
27
|
-
- [ ] Operations advertised as idempotent have a static marker that would make them so: an upsert instead of an insert, a check-before-write, an idempotency key threaded through the call. `find_symbol` the operation and read for one of these. Rule out dedup enforced by a caller outside this function (a queue consumer, an API gateway) before reporting its absence as a gap. Its absence with no such caller-side guarantee, on an operation the docs call idempotent, is the finding — whether it actually converges under a real re-run is execution, and belongs to `Out of static reach`.
|
|
30
|
+
- [ ] Operations advertised as idempotent have a static marker that would make them so: an upsert instead of an insert, a check-before-write, an idempotency key threaded through the call. `find_symbol` the operation and read for one of these. Rule out dedup enforced by a caller outside this function (a queue consumer, an API gateway) before reporting its absence as a gap. Its absence with no such caller-side guarantee, on an operation the docs call idempotent, is the finding — whether it actually converges under a real re-run is execution, and belongs to `Out of static reach`. For each entry point that performs a create/charge/send/provision operation reachable over a network boundary (external API call, payment, email, queue publish), `search_code`/`find_symbol` for a client-supplied idempotency-key or dedup-token parameter threaded from the request through to the write — its absence on an operation whose caller could plausibly retry after a timeout is the finding, narrower and more concrete than the general static-marker case above. Rule out retry-dedup handled entirely by a caller-side gateway/queue consumer outside this function, or a write that is a pure overwrite naturally idempotent without needing a key. (Stripe, "Idempotent requests," official API documentation — https://docs.stripe.com/api/idempotent_requests; IETF, RFC 7231 §4.2.2 — https://www.rfc-editor.org/rfc/rfc7231#section-4.2.2)
|
|
28
31
|
- [ ] Re-entrant / re-run paths (setup, init, sync, migrate) preserve existing user data rather than clobbering it, unless overwrite is the documented contract. `find_symbol` the entry point and read for an existence check before the write.
|
|
29
|
-
- [ ] Partial failure leaves recoverable state — no half-written config, no orphaned rows
|
|
32
|
+
- [ ] Partial failure leaves recoverable state — no half-written config, no orphaned rows left behind by an operation that failed midway. The general lock/resource-release probe (`search_code` a lock/file acquire and confirm every return path releases it, ruling out a release in a `finally`/`defer` before reporting a leak) is `concurrency.md`'s check; this module's angle is narrower — read the error path and confirm the partial state itself is resumable or cleanly discardable, not that the lock was released.
|
|
30
33
|
|
|
31
34
|
## Behavioural gaps
|
|
32
35
|
|
|
33
|
-
- [ ] For each core feature,
|
|
36
|
+
- [ ] For each core feature's non-CRUD lifecycle verbs specifically, `search_code` for one with a natural inverse that has no entry point — a `start` with no `stop`, a long-running action with no `cancel`, a destructive action with no `undo`, a creating action with no `dry-run`/preview mode. Anchor each to the entry-point file that would need to grow it; cross-reference `product.md`'s onboarding path. Plain create/read/delete coverage is the next check's territory, not this one's.
|
|
34
37
|
- [ ] Every "create" has a matching way to see and remove what was created, or the omission is documented as deliberate. `search_code` the resource name alongside `create`/`delete`/`list` verbs — a verb with no counterpart is the finding.
|
|
35
38
|
- [ ] Configuration that can be set can also be read back and reset. `find_callers` the config setter and confirm a getter and a reset/clear path exist in the same module.
|
|
36
39
|
|
|
@@ -40,10 +43,22 @@ Follow the Evidence Contract in `SKILL.md` — every finding here declares its t
|
|
|
40
43
|
|
|
41
44
|
## Out of static reach
|
|
42
45
|
|
|
43
|
-
- Whether an idempotent-looking operation actually converges when re-run concurrently, or only when re-run serially.
|
|
46
|
+
- Whether an idempotent-looking operation actually converges when re-run concurrently, or only when re-run serially — this needs a concurrency/load harness exercising the race window between the check and the write under real simultaneous requests, not a single flow or a source read.
|
|
44
47
|
- Whether an "actionable" error message reads as actionable to an actual user, versus merely present in the return type.
|
|
45
|
-
- Runtime boundary-value behaviour — does the empty-string path really take the branch the code implies.
|
|
48
|
+
- Runtime boundary-value behaviour — does the empty-string path really take the branch the code implies — closed by `runtime.md` when execution is enabled: cross-reference its coverage run against the guard clause's line to see whether the branch was exercised.
|
|
46
49
|
- Partial-failure recovery under a real crash mid-write, as opposed to the presence of a release path in source.
|
|
50
|
+
- Whether an inconsistent return shape is actually mishandled by a specific caller at runtime — this module proves the shape is inconsistent, not that any caller currently gets it wrong.
|
|
51
|
+
|
|
52
|
+
## What browser observation closes
|
|
53
|
+
|
|
54
|
+
Applies only when `browser.md` ran; findings here are `observed` and cite the bundle path with a line or step number.
|
|
55
|
+
|
|
56
|
+
| Artefact | Gap it closes | Observed instance earns |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `steps.md` | Whether an "actionable" error message actually reads as actionable to a user during a confirmed flow, after a deliberately invalid, non-side-effecting submission — refuted if the text, though generic, is the same wording the product intentionally standardizes on for all validation failures | Medium |
|
|
59
|
+
| `network.jsonl` cross-referenced with `steps.md`'s step label/intent | A UI action labelled as a view/list ("query") triggers a mutating HTTP request — refuted if the mutating call is a non-essential side channel (analytics/telemetry beacon) unrelated to the labelled action's own resource | High |
|
|
60
|
+
| `steps.md` + `network.jsonl` + before/after `screenshots/` diff | A documented capability's UI entry point exists but produces no observable effect (no network call, no DOM change, no console activity) when exercised — refuted if the capability is client-only with no network dependency and its effect is visible in the DOM/screenshot even with an empty `network.jsonl` | High |
|
|
61
|
+
| `steps.md` (two identical actions) + `network.jsonl` (request bodies/headers, including any idempotency-key header) + `final-state.md` | Performing the same explicitly-named side-effecting action twice within one flow produces a second resource — only producible when the user has named this a side-effecting flow per the module's consent rule; refuted if the UI itself blocks the second submission (double-submit guard) before any request is sent, since that guard is the marker, not its absence | High |
|
|
47
62
|
|
|
48
63
|
## Severity guidance
|
|
49
64
|
|
|
@@ -51,10 +66,15 @@ Follow the Evidence Contract in `SKILL.md` — every finding here declares its t
|
|
|
51
66
|
|---|---|
|
|
52
67
|
| Documented capability with no implementation | High |
|
|
53
68
|
| Entry point in docs unreachable from the real dispatcher | High |
|
|
54
|
-
| Missing validation at a trust boundary
|
|
69
|
+
| Missing validation at a trust boundary (escalate to `Security`) | High |
|
|
55
70
|
| Naming drift — behaviour contradicts the name | Medium |
|
|
56
71
|
| Query function with externally visible side effects | Medium |
|
|
57
72
|
| No idempotency marker on an operation documented as idempotent, and no caller-side dedup | Medium |
|
|
58
73
|
| Lock/resource with an unreleased path on some return | Medium |
|
|
74
|
+
| Trust-boundary validation is denylist-only rather than allowlist, exclusions ruled out | Medium |
|
|
75
|
+
| Capability's only test mocks every real collaborator, assertion cannot fail on regression | Medium |
|
|
76
|
+
| BDD/Gherkin step definition stubs, mocks past, or never reaches the production entry point it claims to exercise | High |
|
|
77
|
+
| Safe-method (GET/HEAD/OPTIONS) handler with an externally observable state mutation | High |
|
|
78
|
+
| Idempotency-key missing on a retryable network-boundary mutation that is irreversible or externally billed (payment, provisioning, send-once) | High |
|
|
59
79
|
| Undocumented capability, exclusions ruled out | Low |
|
|
60
80
|
| Missing read/remove counterpart to a create | Low |
|
|
@@ -16,15 +16,22 @@ What will hurt six months from now? This module is forward-looking, which makes
|
|
|
16
16
|
|
|
17
17
|
## Lock-in
|
|
18
18
|
|
|
19
|
-
- [ ] Dependencies on a specific vendor, model, API version, or file format, with no adapter layer. `search_code` the vendor SDK import, then `find_callers` it to check whether call sites route through one seam or are scattered directly through the codebase. Note the switching cost either way.
|
|
20
|
-
- [ ] Data formats written to disk with no version field. `find_symbol` the
|
|
19
|
+
- [ ] Dependencies on a specific vendor, model, API version, or file format, with no adapter layer. `search_code` the vendor SDK import, then `find_callers` it to check whether call sites route through one seam or are scattered directly through the codebase. Note the switching cost either way. When this finding names a vendor/SDK import with no adapter seam, check whether `supply-chain.md` or `dependencies-licensing.md` (if either ran this session) also flagged that same import as carrying a known CVE or as materially outdated — when both are true, name both angles in the one finding ("switching cost, and it is currently unpatched") instead of reporting them as two separate findings; this module's own severity ceiling is unchanged, the CVE angle is `supply-chain.md`'s/`dependencies-licensing.md`'s to score. Not applicable when neither ran this session — the finding then stands alone with only the switching-cost framing. (OWASP, "A06:2021 – Vulnerable and Outdated Components," OWASP Top 10:2021 — https://owasp.org/Top10/2021/A06_2021-Vulnerable_and_Outdated_Components/index.html)
|
|
20
|
+
- [ ] Data formats written to disk with no version field — owned by `versioning-compatibility.md` (`search_code`/`find_symbol` the schema or serialisation definition for a `version`/`schemaVersion`/`_v` field); reuse its finding, do not re-report. This module's own angle is the migration-cost consequence, covered by the next check.
|
|
21
21
|
- [ ] Persisted state whose schema has no migration path. `search_code` a migrations directory or schema-versioning table; its absence next to a persisted, evolving shape is the finding.
|
|
22
22
|
|
|
23
23
|
## Deprecation debt
|
|
24
24
|
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
- [ ]
|
|
25
|
+
Ownership split with `versioning-compatibility.md`: this module asks whether the architecture is ready to grow (a duplicated "old way"/"new way" code path, an API kept around with no removal date, as a design-health question); `versioning-compatibility.md` asks the same kind of fact framed as a compatibility promise to a consumer — is a deprecated symbol still exercised, does a stated timeline have a removal version. The two checks can point at the same code from different angles; do not double-count.
|
|
26
|
+
|
|
27
|
+
- [ ] APIs, flags, or config keys kept for backwards compatibility with no removal date and no deprecation warning. `search_code` for `deprecated` in comments/docstrings and check each for a stated removal version or date. Absence means it will be kept forever by default. (Winters, Manshreck & Wright, eds., *Software Engineering at Google*, ch. 15 — https://abseil.io/resources/swe-book/html/ch15.html)
|
|
28
|
+
- [ ] Duplicated code paths where one is "the old way" — `find_callers` the old path. If it still has callers, the migration is unfinished; if not, it is dead and belongs to `Reachability`, not here. When `find_callers` returns live callers, name the count and whether they cluster (one remaining caller reads as a near-complete migration; many scattered callers reads as a stalled one). A stalled migration with no tracking issue referenced nearby (`search_code` for a ticket-ID pattern near the old path) is deprecation debt in its own right, not merely "unfinished" — a small, non-growing set of remaining callers with an open, actively referenced tracking issue nearby is a healthy in-progress migration, not a finding, once that reference is confirmed. (Fowler, "StranglerFigApplication," martinfowler.com bliki — https://martinfowler.com/bliki/StranglerFigApplication.html)
|
|
29
|
+
- [ ] Pinned dependency versions with a comment explaining a workaround. `search_code` the pin in the manifest and read the adjacent comment. Verify, where a linked issue exists, whether it is still open before assuming the workaround is stale. (OWASP, "A06:2021 – Vulnerable and Outdated Components," OWASP Top 10:2021 — https://owasp.org/Top10/2021/A06_2021-Vulnerable_and_Outdated_Components/index.html)
|
|
30
|
+
- [ ] `search_code` + `Read` the declared runtime/language version pin (`package.json` "engines", `.nvmrc`, `Dockerfile` `FROM node:<major>`, `go.mod` `go <version>`, `pyproject.toml` `python_requires`) at file:line and name the exact pinned major version in the finding. State only what was read — do not assert a specific external EOL date from memory; that comparison is outside this module's probe catalogue and belongs in Coverage Gaps. The pin may be a floor (`>=`) rather than a ceiling, so a newer runtime is already used in CI/deploy — check CI workflow files via `search_code` for the actual runtime matrix before treating a floor pin as stale.
|
|
31
|
+
|
|
32
|
+
## Self-admitted debt signals
|
|
33
|
+
|
|
34
|
+
- [ ] `search_code` for `TODO|FIXME|HACK|XXX` comment markers; for each hit that lands inside a construct already flagged by this module's other checks (the loop/collection from Scaling assumptions, the vendor import from Lock-in, the switch/registry from Extension points), `Read` the marker and its surrounding code and cite it as corroborating evidence inside that finding — a bare marker with no other structural signal nearby is not, on its own, a finding here. Confirm on the read that the condition the comment describes is still literally present in the code being cited, not merely nearby — that rules out a marker whose surrounding construct was rewritten since the comment was written. This raises confidence on the check it corroborates rather than opening a new severity row of its own. (Sridharan, Robredo, Rantala, Esposito, Lenarduzzi & Mäntylä, "Hidden in Plain Sight: Where Developers Confess Self-Admitted Technical Debt," arXiv, 2025 — https://arxiv.org/abs/2511.01529)
|
|
28
35
|
|
|
29
36
|
## What NOT to report here
|
|
30
37
|
|
|
@@ -36,6 +43,19 @@ Speculative refactors, "this could be more generic", and architecture preference
|
|
|
36
43
|
- Whether a switching cost for a locked-in vendor is tolerable to the team — that is a business judgement, not a structural one.
|
|
37
44
|
- The actual size N a scaling assumption breaks at under production traffic, as opposed to the shape of the code.
|
|
38
45
|
- Whether a pinned dependency's linked workaround issue has since been fixed upstream, when the repo carries no link to check.
|
|
46
|
+
- Whether the pinned runtime version is past its EOL today — this module can read and name the pin, not consult the vendor's live calendar; state the version and let the user check it against endoflife.date.
|
|
47
|
+
- Whether the architecture has drifted from its original design over time — this module reads one snapshot; drift needs `repo-history.md`'s git history, not a single audit pass.
|
|
48
|
+
- Whether a TODO/FIXME still tracks a real, open concern — this module can cite the comment, not confirm the ticket behind it (if any) is still open.
|
|
49
|
+
- Whether a forward-looking cost was a deliberate, accepted tradeoff or an accident — this module reads the shape of the risk, not the reasoning (if any) behind accepting it.
|
|
50
|
+
|
|
51
|
+
## What browser observation closes
|
|
52
|
+
|
|
53
|
+
Applies only when `browser.md` ran; findings here are `observed` and cite the bundle path with a line or step number.
|
|
54
|
+
|
|
55
|
+
| Artefact | Gap it closes | Observed instance earns |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `console.jsonl` | A framework or browser deprecation warning fires during a walked flow (e.g. a React/Vue/Angular console notice that an API "is deprecated and will be removed", a browser `Deprecation` console category entry) — refuted if the stack trace/source points at a third-party script the project does not control | Low |
|
|
58
|
+
| `console.jsonl` / `steps.md` | A statically-flagged "deprecated, no removal date" API or flag (from this module's own Deprecation debt check) is confirmed still exercised, by observing it fire during a walked flow — refuted if the warning is a dev-mode-only artifact (e.g. React StrictMode's double-invoke warnings) that would not fire in a production build; raises the existing static finding's tier from `read` toward `observed` rather than opening a separate one | Low |
|
|
39
59
|
|
|
40
60
|
## Severity guidance
|
|
41
61
|
|
|
@@ -44,8 +64,9 @@ Speculative refactors, "this could be more generic", and architecture preference
|
|
|
44
64
|
| Extension requires a shotgun edit across many files with no registry | Medium |
|
|
45
65
|
| Unbounded loop or full-memory load with no stated bound | Medium |
|
|
46
66
|
| Vendor/format lock-in with no adapter seam | Medium |
|
|
47
|
-
| Persisted
|
|
67
|
+
| Persisted state with no migration path | Medium |
|
|
68
|
+
| Duplicated "old way" path with live callers, scattered, no tracking issue referenced (stalled migration) | Medium |
|
|
48
69
|
| Deprecated API/flag with no removal date | Low |
|
|
49
|
-
| Duplicated "old way" path confirmed dead
|
|
70
|
+
| Duplicated "old way" path confirmed dead (report under `Reachability`) | Low |
|
|
50
71
|
| Hardcoded list with no parity guard | Low |
|
|
51
72
|
| Pinned dependency workaround unverified as still needed | Low |
|