Feature-scoped performance audit
For the-platform project: a microservices CRM platform — FastAPI + asyncpg +
PostgreSQL + Redis + RabbitMQ backend services, a React/Vite/TS frontend
(the-frontend), Docker/Kubernetes/Helm infrastructure, load testing with k6
in load-testing/.
This is the focused version of the full repository audit (see the
performance-audit-full skill if the task is the whole repository rather
than a single feature). The measurement principles are the same, but the
scope, findings, and report are strictly limited to the code that belongs to
this feature and to what it touches.
INPUT
Feature: $ARGUMENTS
The prompt is universal in input format. Depending on what is passed, first
reconstruct the feature's scope:
A. Directory/branch/diff (e.g.
the-frontend/src/features/leads-import or "diff between dev and the
feature/PROJ-XXXX branch"):
- Determine the affected files via
git diff --stat against the base branch
(main/dev), or read the whole directory contents if it is a self-contained
module.
- Determine which services/packages those files touch (services/,
the-frontend, libs/) — that is the scope of PASS 2 below.
B. Requirements document (path to a .md/.txt/design doc, etc.):
- Read the document in full, write out the described use cases and the
expected endpoints/screens/background processes.
- Find the code implementing those use cases in the repository (grep by the
endpoint/route/component names and the names from the document) — if the
implementation is absent or found only partially, record this explicitly in
the report as a separate item ("not implemented — testing impossible");
don't invent it.
C. YouTrack issue (an ID or a link):
- Fetch the issue text (through the available YouTrack MCP/API, or ask the
user to paste the text if there is no direct access) — description,
acceptance criteria, related commits/PRs.
- If the issue or the related commits specify concrete files/services, that
is the scope; if not, determine the scope from the description as in item B,
and by
git log --grep=<ID> for related commits.
If none of the three sources determines the scope unambiguously (it is
unclear which code belongs to the feature), stop and explicitly list what
needs to be clarified with the task author, rather than blindly testing the
entire service.
KEY PRINCIPLE: MEASURE, DON'T GUESS
The company is extremely sensitive to the consumption of compute resources
(CPU, RAM, network traffic, infrastructure cost) — this is a first-class
priority. For a feature, which has often not yet been under real load, it is
especially important not to confuse "looks fine on dev data" with "will
withstand prod volume". Follow the same rules as in the full audit:
- For each finding where technically possible, confirm the impact by
measurement: EXPLAIN ANALYZE for new/changed SQL queries, profiling
(py-spy/cProfile) for a new CPU hotspot, the real bundle/chunk size for new
frontend code, a k6 scenario (a new one or an extended existing one) for
the load characteristics of the new/changed API. A finding without a number
is a hypothesis; flag it explicitly as "not confirmed by measurement".
- Do not propose optimization where there is no proven problem — three
identical lines are better than premature abstraction; the same principle
applies to caches and memoization in new code.
- Explicitly state at what data volume/load the finding becomes critical,
accounting for realistic growth for this specific feature (e.g. leads
import — test not on 10 records but on a volume comparable to a real
customer export). The source for estimating the volume, by priority: (a)
prod metrics/dashboards, if you have access; (b) the order of magnitude
from existing load-testing/reports for the same domain; (c) a direct
question to the task author/PM about the real customer volume. If none of
the sources is available, record this as a coverage limitation (see
"methodology and coverage limitations" in the report format), rather than
substituting an arbitrary number.
- If the feature replaces/modifies existing functionality, check whether
performance degraded compared to what was before (a "before/after"
comparison is mandatory where there is something to compare against).
Technically obtain the "before" state:
git worktree add (or switch to a
copy of the base branch) at the commit before the feature's first commit —
run the same EXPLAIN ANALYZE/profiling/bundle build on that copy and
compare the numbers directly; for a single query/component without spinning
up an environment, git show <base-ref>:path is enough to read the prior
implementation and compare it algorithmically (query count, complexity) —
flag such a comparison explicitly as "not measured, estimate from code",
not as a measured result.
- State the status explicitly: "confirmed by measurement" / "plausible but
not measured" / "not a problem at the current data volume" / "already
optimized correctly".
METHODOLOGY: THREE INDEPENDENT PASSES (within the feature scope)
PASS 1 — Instrumental analysis and profiling of the new/changed code
- Backend: enable SQL logging on this feature's specific scenarios and
find N+1/queries without LIMIT in the new code; run EXPLAIN ANALYZE on the
new/changed queries; py-spy/cProfile on the new handlers, if a CPU hotspot
is suspected.
- Database: verify that the feature's new columns/filters are covered by
indexes (cross-check with the migration schema that introduces this
feature); if the feature adds a new table, estimate the expected growth and
access patterns.
- Redis/queues: if the feature introduces new Redis keys — is there a TTL;
if it introduces a new queue/consumer — prefetch/QoS, DLQ, behavior when
polling an external API.
- Frontend: if the feature adds a screen/component — build the prod build
and check the bundle/chunk size increase from this feature specifically
(compare before/after size if there is a baseline); check for code-splitting
for the new route; run Lighthouse (or an analogue) on the new screen for
LCP/TBT, if the frontend can be brought up locally.
- Load testing: check whether load-testing/k6 has a scenario covering this
feature's new/changed endpoints. If not — where possible, write a minimal k6
scenario for this feature and run it (if the environment can be brought up);
if a scenario already exists, run it and compare against the baseline in
load-testing/reports.
- Docker/Helm: only if the feature changes the Dockerfile/values/chart (a
new service, a new dependency, a change to resources) — otherwise this item
does not apply; explicitly mark it "not touched by the feature".
PASS 2 — Manual line-by-line review of the code touched by the feature
Review line by line (not diagonally) all the code identified in the "Input"
step as the feature's scope: new/changed files of the backend service(s),
frontend components, changes in shared libraries (libs/shared_auth,
libs/shared_metrics — if the feature touches them, this is code that runs on
every request of every service; treat it with heightened attention),
background handlers, infrastructure configs. Use the detailed checklist below
— pick from it the categories applicable to the feature type (they need not
all match all 12 — e.g. a pure frontend feature will have no RabbitMQ
findings).
PASS 3 — The feature's impact on architecture and neighboring scenarios
Independently of the line-by-line review, assess:
- Does the feature add new synchronous inter-service hops to existing
frequent scenarios (login, deals/leads list, sending a chat message) —
count the call chain before and after the feature appears.
- If the feature reuses/duplicates existing functionality (yet another poll
of the same external API, yet another cache for the same data) — can the
existing mechanism be reused instead of adding a new one?
- Shared resource consumption: does the feature create contention for the same
DB connection/the same Redis instance/the same queue as an existing hot
workload?
- Does the feature conform to the project's general caching/observability
strategy, or does it introduce a pinpoint one-off solution that bypasses it?
DETAILED CATEGORY CHECKLIST (apply the items relevant to the feature)
- Async backend: synchronous HTTP clients/I/O inside
async def,
CPU-heavy operations on the event loop without
ThreadPoolExecutor/ProcessPoolExecutor, sequential awaits where
asyncio.gather is possible.
- Database: N+1 queries, missing indexes on new WHERE/JOIN/ORDER BY
columns (especially user_id/tenant_id/integration_id), SELECT * where 2-3
fields are needed, list endpoints without pagination, connection pool size,
long transactions with external HTTP calls inside, repeated identical
queries within one request-response cycle.
- Caching (Redis): keys without TTL, absence of a cache for expensive
frequently repeated computations, cache stampede, a cache without
invalidation when the source data changes, KEYS/SCAN over the whole
database in the hot path.
- Inter-service communication: absence of timeouts on outbound requests,
absence of retry with backoff (or retry without backoff), duplicate calls
to one service instead of a batched call, full forwarding of heavy payloads
where only part of the data is needed.
- Queues (RabbitMQ) and background handlers: prefetch/QoS, poison message
without DLQ, external-API polling frequency relative to real need, batch
size, rate-limit handling.
- Serialization and payload size: redundant fields in Pydantic model
responses, logging large objects in full in the hot path, absence of
gzip/brotli for large JSON responses.
- Frontend: bundle/chunk size increase, absence of
code-splitting/lazy-loading, excessive re-renders on large lists
(virtualization), waterfall data loading instead of parallel, too-frequent
polling instead of WebSocket/SSE; if the feature adds a new
screen/route — capture Lighthouse (or analogue) LCP/TBT metrics for it, if
the frontend can be brought up locally.
- Docker images (only if the feature changes the Dockerfile): final image
size, absence of multi-stage build, an oversized base image.
- Kubernetes/Helm (only if the feature changes charts/values): resources
requests/limits, liveness/readiness probe intervals, replicaCount/HPA
thresholds.
- Observability: cardinality of new metrics/labels (user_id/request_id
as a label), trace sampling for new endpoints, the volume of DEBUG logging
left in the new code.
- Algorithmic efficiency: quadratic operations over collections that the
feature introduces and that will become a bottleneck at real volumes,
repeated parsing of the same data, unnecessary deep copying, absence of
batching for bulk operations (import/sync) that the feature adds.
- Load testing: does the existing/new k6 scenario cover this feature
specifically, is a performance budget recorded for it (maximum p95 latency,
maximum bundle size increase)?
EDGE CASES CHARACTERISTIC OF FEATURES (rather than the whole repository)
- The feature runs fast on an empty/dev table but was not tested at a volume
comparable to real customer data — always estimate the realistic growth for
this specific feature.
- The feature adds a call to an already-existing "expensive" endpoint/query in
a new place — the finding itself was not in the feature, but in the fact that
the feature multiplies the call frequency of an already-known problem (check
whether it is already in load-testing/reports or in a previous audit).
- Debug flags/verbose logging left in the feature code after development and
not disabled by delivery time.
- The feature's feature flag, because of which the old and new paths run in
parallel ("during the migration") — doubles the load where this is not the
only execution path.
- A feature implemented in a shared library (libs/shared_auth,
libs/shared_metrics) — even a small inefficiency is multiplied across all
services and all replicas where the library is wired in, not just the
service where the feature was originally intended.
- The feature's tests/benchmarks are run only on the happy path with a small
payload, not on the worst realistic case (the maximum file size for upload,
the maximum number of items in a batch operation that the feature formally
allows).
REPORT FORMAT
- Executive summary (no technical jargon): is the feature performance-ready
for production at the expected load, what consumes resources most
noticeably, what can be fixed without risk to functionality.
- Verdict: "ready" / "ready with caveats (list them)" / "not ready — list the
critical findings" — state it explicitly; this is testing the feature
before release, not just a list of observations. Rule for tying it to the
KPI table (item 3 below): at least one severity-critical finding confirmed
by measurement — the verdict cannot be "ready" (at minimum "with caveats",
and where there is a risk of degrading a hot path — "not ready"); critical
findings without measurement confirmation are recorded as a blocker for
re-checking before merge; do not downgrade severity after the fact so the
verdict matches the desired outcome.
- KPI table: number of findings by severity (critical/high/medium/low),
number of findings confirmed by measurement vs "plausible but not
measured".
- If the feature replaces existing functionality — a "before/after"
comparison on the key metrics (latency, number of DB queries,
payload/bundle size).
- Full list of findings tied to file:line, with a quantitative impact
estimate (or a "not measured" mark), severity, the condition under which the
finding becomes critical, and a concrete remediation recommendation (not
"optimize the query", but "add an index on (tenant_id, created_at)").
- A "what was done well" section in this feature — efficient solutions worth
replicating.
- Action plan: quick pinpoint fixes without regression risk — first; changes
requiring testing under load — second; architecture/team-lead-level
questions (e.g. "a separate poll shouldn't have been introduced, there is a
shared mechanism") — as a separate item for discussion, not as a merge
blocker unless explicitly critical.
- A "methodology and coverage limitations" section — which tools/measurements
were used, what could not be tested (no access to prod metrics, no ability
to bring up the environment, no realistic volume of test data) —
explicitly, so the absence of findings does not read as "everything is
optimal".
FINDING FORMATTING RULES
For each finding, the following are mandatory: the file path and line number;
the problem name and category (see the checklist); a quantitative impact
estimate (measured, or explicitly marked as an unmeasured estimate with
justification); the condition under which the problem becomes critical;
severity with justification; a remediation recommendation that preserves the
system's current behavior (if the optimization inevitably changes behavior —
e.g. tightening a pagination limit — note this separately and explicitly).
RUNNING THE TESTING (practical instructions)
Delegate the instrumental review and profiling through the Agent tool to a
separate subagent, rather than running it in the main dialogue thread, if you
have access to the Agent tool:
- First, YOURSELF (in the main thread), do the "Input" section — determine and
record the exact feature scope (the list of files/services/endpoints). Do
not delegate this step: a subagent starts without the conversation context
and does not know what was meant by "the feature". Here too, check
load-testing/reports and load-testing/ANALYSIS_GUIDE.md for already
documented bottlenecks that the feature scope touches (the same
endpoints/tables/services) — this is a cheap check, and without it the
subagent risks not learning about an already-known problem that the feature
merely amplifies by call frequency (see EDGE CASES above) and investigating
it again from scratch.
- Launch the Agent tool (general-purpose, or Explore for a purely
search-oriented sub-step) with a self-contained assignment including: the
scope determined in step 1 (concrete paths, not "feature PROJ-XXXX" without
expansion); the "Key principle", "Methodology", and "Detailed checklist"
sections from this file; a requirement to return findings in the format of
the "Finding formatting rules" section and a final report per the "Report
format" section. Launch in foreground (
run_in_background: false) if the
result is needed for a further decision in this same dialogue (e.g. before
merge) — do not continue silently while the agent works.
- If the feature scope is large (several services + frontend), consider
launching several subagents in parallel on independent zones (PASS 2 on the
backend service(s) separately from PASS 2 on the frontend), and PASS 3 (the
architectural review) as a separate agent or yourself, so as not to let one
agent "cut corners" across the whole scope at once.
- If the Agent tool is unavailable in the current environment — perform the
same steps sequentially in the main thread, explicitly separating PASS
1/2/3 from each other, and do not let the results of one pass substitute for
another's check.
- Consolidate the subagent(s)' results into a single report per the format
above; if several subagents independently found the same finding — do not
duplicate it in the report, but strengthen the confirmation status.
- Before declaring the feature ready, explicitly check the "Edge cases
characteristic of features" section — these are the typical blind spots of a
focused, rather than full, audit.
This is testing, not implementation: the developer makes the changes based on
the report, not you within this skill.
1---2name: en-293description: Focused performance and resource-cost audit of ONE specific feature/change in the-platform (not the whole codebase) — scope taken from a directory/branch/diff, a requirements document, or a YouTrack issue; the same measurement discipline as the full audit (EXPLAIN ANALYZE, py-spy, bundle size, k6), a "before/after" comparison if the feature replaces existing functionality, an explicit production-readiness verdict. Use when asked to check the performance/resource consumption of a specific feature, branch, PR, or YouTrack task before merge/release, to assess whether a new implementation degraded existing functionality in speed/resources, or to give the resource-cost green light for that specific change — even without the word "audit", e.g. "will this feature take down the database", "how much will this eat at real volumes", "is this branch ready performance-wise".4---5# Feature-scoped performance audit67For the-platform project: a microservices CRM platform — FastAPI + asyncpg +8PostgreSQL + Redis + RabbitMQ backend services, a React/Vite/TS frontend9(the-frontend), Docker/Kubernetes/Helm infrastructure, load testing with k610in `load-testing/`.1112This is the focused version of the full repository audit (see the13`performance-audit-full` skill if the task is the whole repository rather14than a single feature). The measurement principles are the same, but the15scope, findings, and report are strictly limited to the code that belongs to16this feature and to what it touches.1718## INPUT1920Feature: `$ARGUMENTS`2122The prompt is universal in input format. Depending on what is passed, first23reconstruct the feature's scope:2425**A. Directory/branch/diff** (e.g.26`the-frontend/src/features/leads-import` or "diff between dev and the27feature/PROJ-XXXX branch"):28- Determine the affected files via `git diff --stat` against the base branch29 (main/dev), or read the whole directory contents if it is a self-contained30 module.31- Determine which services/packages those files touch (services/*,32 the-frontend, libs/*) — that is the scope of PASS 2 below.3334**B. Requirements document** (path to a .md/.txt/design doc, etc.):35- Read the document in full, write out the described use cases and the36 expected endpoints/screens/background processes.37- Find the code implementing those use cases in the repository (grep by the38 endpoint/route/component names and the names from the document) — if the39 implementation is absent or found only partially, record this explicitly in40 the report as a separate item ("not implemented — testing impossible");41 don't invent it.4243**C. YouTrack issue** (an ID or a link):44- Fetch the issue text (through the available YouTrack MCP/API, or ask the45 user to paste the text if there is no direct access) — description,46 acceptance criteria, related commits/PRs.47- If the issue or the related commits specify concrete files/services, that48 is the scope; if not, determine the scope from the description as in item B,49 and by `git log --grep=<ID>` for related commits.5051If none of the three sources determines the scope unambiguously (it is52unclear which code belongs to the feature), stop and explicitly list what53needs to be clarified with the task author, rather than blindly testing the54entire service.5556## KEY PRINCIPLE: MEASURE, DON'T GUESS5758The company is extremely sensitive to the consumption of compute resources59(CPU, RAM, network traffic, infrastructure cost) — this is a first-class60priority. For a feature, which has often not yet been under real load, it is61especially important not to confuse "looks fine on dev data" with "will62withstand prod volume". Follow the same rules as in the full audit:63641. For each finding where technically possible, confirm the impact by65 measurement: EXPLAIN ANALYZE for new/changed SQL queries, profiling66 (py-spy/cProfile) for a new CPU hotspot, the real bundle/chunk size for new67 frontend code, a k6 scenario (a new one or an extended existing one) for68 the load characteristics of the new/changed API. A finding without a number69 is a hypothesis; flag it explicitly as "not confirmed by measurement".702. Do not propose optimization where there is no proven problem — three71 identical lines are better than premature abstraction; the same principle72 applies to caches and memoization in new code.733. Explicitly state at what data volume/load the finding becomes critical,74 accounting for realistic growth for this specific feature (e.g. leads75 import — test not on 10 records but on a volume comparable to a real76 customer export). The source for estimating the volume, by priority: (a)77 prod metrics/dashboards, if you have access; (b) the order of magnitude78 from existing load-testing/reports for the same domain; (c) a direct79 question to the task author/PM about the real customer volume. If none of80 the sources is available, record this as a coverage limitation (see81 "methodology and coverage limitations" in the report format), rather than82 substituting an arbitrary number.834. If the feature replaces/modifies existing functionality, check whether84 performance degraded compared to what was before (a "before/after"85 comparison is mandatory where there is something to compare against).86 Technically obtain the "before" state: `git worktree add` (or switch to a87 copy of the base branch) at the commit before the feature's first commit —88 run the same EXPLAIN ANALYZE/profiling/bundle build on that copy and89 compare the numbers directly; for a single query/component without spinning90 up an environment, `git show <base-ref>:path` is enough to read the prior91 implementation and compare it algorithmically (query count, complexity) —92 flag such a comparison explicitly as "not measured, estimate from code",93 not as a measured result.945. State the status explicitly: "confirmed by measurement" / "plausible but95 not measured" / "not a problem at the current data volume" / "already96 optimized correctly".9798## METHODOLOGY: THREE INDEPENDENT PASSES (within the feature scope)99100### PASS 1 — Instrumental analysis and profiling of the new/changed code101102- **Backend**: enable SQL logging on this feature's specific scenarios and103 find N+1/queries without LIMIT in the new code; run EXPLAIN ANALYZE on the104 new/changed queries; py-spy/cProfile on the new handlers, if a CPU hotspot105 is suspected.106- **Database**: verify that the feature's new columns/filters are covered by107 indexes (cross-check with the migration schema that introduces this108 feature); if the feature adds a new table, estimate the expected growth and109 access patterns.110- **Redis/queues**: if the feature introduces new Redis keys — is there a TTL;111 if it introduces a new queue/consumer — prefetch/QoS, DLQ, behavior when112 polling an external API.113- **Frontend**: if the feature adds a screen/component — build the prod build114 and check the bundle/chunk size increase from this feature specifically115 (compare before/after size if there is a baseline); check for code-splitting116 for the new route; run Lighthouse (or an analogue) on the new screen for117 LCP/TBT, if the frontend can be brought up locally.118- **Load testing**: check whether load-testing/k6 has a scenario covering this119 feature's new/changed endpoints. If not — where possible, write a minimal k6120 scenario for this feature and run it (if the environment can be brought up);121 if a scenario already exists, run it and compare against the baseline in122 load-testing/reports.123- **Docker/Helm**: only if the feature changes the Dockerfile/values/chart (a124 new service, a new dependency, a change to resources) — otherwise this item125 does not apply; explicitly mark it "not touched by the feature".126127### PASS 2 — Manual line-by-line review of the code touched by the feature128129Review line by line (not diagonally) all the code identified in the "Input"130step as the feature's scope: new/changed files of the backend service(s),131frontend components, changes in shared libraries (libs/shared_auth,132libs/shared_metrics — if the feature touches them, this is code that runs on133every request of every service; treat it with heightened attention),134background handlers, infrastructure configs. Use the detailed checklist below135— pick from it the categories applicable to the feature type (they need not136all match all 12 — e.g. a pure frontend feature will have no RabbitMQ137findings).138139### PASS 3 — The feature's impact on architecture and neighboring scenarios140141Independently of the line-by-line review, assess:142143- Does the feature add new synchronous inter-service hops to existing144 frequent scenarios (login, deals/leads list, sending a chat message) —145 count the call chain before and after the feature appears.146- If the feature reuses/duplicates existing functionality (yet another poll147 of the same external API, yet another cache for the same data) — can the148 existing mechanism be reused instead of adding a new one?149- Shared resource consumption: does the feature create contention for the same150 DB connection/the same Redis instance/the same queue as an existing hot151 workload?152- Does the feature conform to the project's general caching/observability153 strategy, or does it introduce a pinpoint one-off solution that bypasses it?154155## DETAILED CATEGORY CHECKLIST (apply the items relevant to the feature)1561571. **Async backend**: synchronous HTTP clients/I/O inside `async def`,158 CPU-heavy operations on the event loop without159 ThreadPoolExecutor/ProcessPoolExecutor, sequential awaits where160 asyncio.gather is possible.1612. **Database**: N+1 queries, missing indexes on new WHERE/JOIN/ORDER BY162 columns (especially user_id/tenant_id/integration_id), SELECT * where 2-3163 fields are needed, list endpoints without pagination, connection pool size,164 long transactions with external HTTP calls inside, repeated identical165 queries within one request-response cycle.1663. **Caching (Redis)**: keys without TTL, absence of a cache for expensive167 frequently repeated computations, cache stampede, a cache without168 invalidation when the source data changes, KEYS/SCAN over the whole169 database in the hot path.1704. **Inter-service communication**: absence of timeouts on outbound requests,171 absence of retry with backoff (or retry without backoff), duplicate calls172 to one service instead of a batched call, full forwarding of heavy payloads173 where only part of the data is needed.1745. **Queues (RabbitMQ) and background handlers**: prefetch/QoS, poison message175 without DLQ, external-API polling frequency relative to real need, batch176 size, rate-limit handling.1776. **Serialization and payload size**: redundant fields in Pydantic model178 responses, logging large objects in full in the hot path, absence of179 gzip/brotli for large JSON responses.1807. **Frontend**: bundle/chunk size increase, absence of181 code-splitting/lazy-loading, excessive re-renders on large lists182 (virtualization), waterfall data loading instead of parallel, too-frequent183 polling instead of WebSocket/SSE; if the feature adds a new184 screen/route — capture Lighthouse (or analogue) LCP/TBT metrics for it, if185 the frontend can be brought up locally.1868. **Docker images** (only if the feature changes the Dockerfile): final image187 size, absence of multi-stage build, an oversized base image.1889. **Kubernetes/Helm** (only if the feature changes charts/values): resources189 requests/limits, liveness/readiness probe intervals, replicaCount/HPA190 thresholds.19110. **Observability**: cardinality of new metrics/labels (user_id/request_id192 as a label), trace sampling for new endpoints, the volume of DEBUG logging193 left in the new code.19411. **Algorithmic efficiency**: quadratic operations over collections that the195 feature introduces and that will become a bottleneck at real volumes,196 repeated parsing of the same data, unnecessary deep copying, absence of197 batching for bulk operations (import/sync) that the feature adds.19812. **Load testing**: does the existing/new k6 scenario cover this feature199 specifically, is a performance budget recorded for it (maximum p95 latency,200 maximum bundle size increase)?201202## EDGE CASES CHARACTERISTIC OF FEATURES (rather than the whole repository)203204- The feature runs fast on an empty/dev table but was not tested at a volume205 comparable to real customer data — always estimate the realistic growth for206 this specific feature.207- The feature adds a call to an already-existing "expensive" endpoint/query in208 a new place — the finding itself was not in the feature, but in the fact that209 the feature multiplies the call frequency of an already-known problem (check210 whether it is already in load-testing/reports or in a previous audit).211- Debug flags/verbose logging left in the feature code after development and212 not disabled by delivery time.213- The feature's feature flag, because of which the old and new paths run in214 parallel ("during the migration") — doubles the load where this is not the215 only execution path.216- A feature implemented in a shared library (libs/shared_auth,217 libs/shared_metrics) — even a small inefficiency is multiplied across all218 services and all replicas where the library is wired in, not just the219 service where the feature was originally intended.220- The feature's tests/benchmarks are run only on the happy path with a small221 payload, not on the worst realistic case (the maximum file size for upload,222 the maximum number of items in a batch operation that the feature formally223 allows).224225## REPORT FORMAT2262271. Executive summary (no technical jargon): is the feature performance-ready228 for production at the expected load, what consumes resources most229 noticeably, what can be fixed without risk to functionality.2302. Verdict: "ready" / "ready with caveats (list them)" / "not ready — list the231 critical findings" — state it explicitly; this is testing the feature232 before release, not just a list of observations. Rule for tying it to the233 KPI table (item 3 below): at least one severity-critical finding confirmed234 by measurement — the verdict cannot be "ready" (at minimum "with caveats",235 and where there is a risk of degrading a hot path — "not ready"); critical236 findings without measurement confirmation are recorded as a blocker for237 re-checking before merge; do not downgrade severity after the fact so the238 verdict matches the desired outcome.2393. KPI table: number of findings by severity (critical/high/medium/low),240 number of findings confirmed by measurement vs "plausible but not241 measured".2424. If the feature replaces existing functionality — a "before/after"243 comparison on the key metrics (latency, number of DB queries,244 payload/bundle size).2455. Full list of findings tied to file:line, with a quantitative impact246 estimate (or a "not measured" mark), severity, the condition under which the247 finding becomes critical, and a concrete remediation recommendation (not248 "optimize the query", but "add an index on (tenant_id, created_at)").2496. A "what was done well" section in this feature — efficient solutions worth250 replicating.2517. Action plan: quick pinpoint fixes without regression risk — first; changes252 requiring testing under load — second; architecture/team-lead-level253 questions (e.g. "a separate poll shouldn't have been introduced, there is a254 shared mechanism") — as a separate item for discussion, not as a merge255 blocker unless explicitly critical.2568. A "methodology and coverage limitations" section — which tools/measurements257 were used, what could not be tested (no access to prod metrics, no ability258 to bring up the environment, no realistic volume of test data) —259 explicitly, so the absence of findings does not read as "everything is260 optimal".261262## FINDING FORMATTING RULES263264For each finding, the following are mandatory: the file path and line number;265the problem name and category (see the checklist); a quantitative impact266estimate (measured, or explicitly marked as an unmeasured estimate with267justification); the condition under which the problem becomes critical;268severity with justification; a remediation recommendation that preserves the269system's current behavior (if the optimization inevitably changes behavior —270e.g. tightening a pagination limit — note this separately and explicitly).271272## RUNNING THE TESTING (practical instructions)273274Delegate the instrumental review and profiling through the Agent tool to a275separate subagent, rather than running it in the main dialogue thread, if you276have access to the Agent tool:2772781. First, YOURSELF (in the main thread), do the "Input" section — determine and279 record the exact feature scope (the list of files/services/endpoints). Do280 not delegate this step: a subagent starts without the conversation context281 and does not know what was meant by "the feature". Here too, check282 load-testing/reports and load-testing/ANALYSIS_GUIDE.md for already283 documented bottlenecks that the feature scope touches (the same284 endpoints/tables/services) — this is a cheap check, and without it the285 subagent risks not learning about an already-known problem that the feature286 merely amplifies by call frequency (see EDGE CASES above) and investigating287 it again from scratch.2882. Launch the Agent tool (general-purpose, or Explore for a purely289 search-oriented sub-step) with a self-contained assignment including: the290 scope determined in step 1 (concrete paths, not "feature PROJ-XXXX" without291 expansion); the "Key principle", "Methodology", and "Detailed checklist"292 sections from this file; a requirement to return findings in the format of293 the "Finding formatting rules" section and a final report per the "Report294 format" section. Launch in foreground (`run_in_background: false`) if the295 result is needed for a further decision in this same dialogue (e.g. before296 merge) — do not continue silently while the agent works.2973. If the feature scope is large (several services + frontend), consider298 launching several subagents in parallel on independent zones (PASS 2 on the299 backend service(s) separately from PASS 2 on the frontend), and PASS 3 (the300 architectural review) as a separate agent or yourself, so as not to let one301 agent "cut corners" across the whole scope at once.3024. If the Agent tool is unavailable in the current environment — perform the303 same steps sequentially in the main thread, explicitly separating PASS304 1/2/3 from each other, and do not let the results of one pass substitute for305 another's check.3065. Consolidate the subagent(s)' results into a single report per the format307 above; if several subagents independently found the same finding — do not308 duplicate it in the report, but strengthen the confirmation status.3096. Before declaring the feature ready, explicitly check the "Edge cases310 characteristic of features" section — these are the typical blind spots of a311 focused, rather than full, audit.312313This is testing, not implementation: the developer makes the changes based on314the report, not you within this skill.