Agent
SFCC code reviewer
The diff is split by domain and each domain goes to its own reviewer, with its own context and its own written rules. Only the domains that actually changed are ever started.
Eleven domains exist. Five have changed files, so five run.
- Client JavaScript Event binding, DOM assumptions, what breaks on a cached page.
- ISML templates Escaping, remote includes, template scope, what leaks into the markup.
- SCSS Selector scope, overrides that reach further than intended, dead rules.
- Server JavaScript Controllers, models, helpers and hooks, and the limits of the Rhino runtime.
- Forms and constraints A field constrained in one layer and left open in the four others.
- Resources and translations Labels, properties files, and the key that ships missing in one locale.
- Jobs Steps, chunking, transactions and the quotas that fail at volume, not in test.
- Metadata and data Definitions, site preferences, and data the code expects but nobody delivers.
- Scope and reuse Work landing in core that belongs to one brand, and the helper that already existed.
- Tracking Data layer pushes, event names, and the analytics that quietly stops reporting.
- Security and cache Caching, personalisation, and personal data reaching a page that gets cached.
How it runs, step by step
-
Collect the scope
- Diff the branch against its target, then sort every changed file into a domain.
collect-scope.sh feature/CART-2184 develop git diff --stat develop...feature/CART-2184
cartridges/app_brand/cartridge/controllers/Cart.js | 34 ++++--
cartridges/app_brand/cartridge/models/cart.js | 12 ++-
cartridges/app_brand/cartridge/templates/.../cart.isml | 21 +++-
cartridges/app_brand/cartridge/forms/default/cart.xml | 8 +-
metadata/site-preferences/preferences.xml | 6 ++-
5 files changed, 63 insertions(+), 18 deletions(-)
DOMAIN_SERVER_JS 2 files
DOMAIN_ISML 1 file
DOMAIN_FORMS 1 file
DOMAIN_METADATA 1 file
DOMAIN_CLIENT_JS empty, skipped
DOMAIN_SCSS empty, skipped
DOMAIN_PROPERTIES empty, skipped
DOMAIN_JOBS empty, skipped
-
Run the mechanical checks
- Their results are handed to the reviewers as facts, never as findings.
data-coverage.py · schema validation python3 scripts/data-coverage.py . develop feature/CART-2184
preferences.xml valid against preferences.xsd
cartCouponLimit referenced in Cart.js, absent from staging export
forms/cart.xml valid against form.xsd
3 facts collected, 0 findings. Facts go to the reviewers.
-
Fan out, in parallel
- One reviewer per domain that has files, all started in a single pass.
5 agents started agentscopestate
server-js2 filesrunning
isml1 filerunning
forms1 filerunning
metadata1 filerunning
security-cache3 filesrunning
six other domains not started, and not billed
-
Collect the findings
- Every finding comes back in the same shape, whichever agent wrote it.
isml · finding 1 of 2 SEVERITY BLOCKER
FILE templates/default/cart/cart.isml:48
RULE Escape every value rendered into markup
WHAT The coupon code is interpolated raw.
IMPACT Stored cross site scripting: a coupon code is customer supplied.
<span class="coupon">${pdict.couponCode}</span>
<span class="coupon">${pdict.couponCode.toString().encodeHtml()}</span>
-
Verify before reporting
- A finding that cannot be reproduced in the file is dropped, not reported.
verification pass BLOCKER cart.isml:48 reopened, confirmed, caused by this diff
MAJOR Cart.js:112 reopened, confirmed, caused by this diff
MAJOR cart.js:37 already on develop, not this diff, DROPPED
3 claims checked, 1 dropped
-
Hand it to the human
- One consolidated report. Then I read the diff myself, and that is never delegated.
report · feature/CART-2184 severityfilerule
BLOCKERcart.isml:48escape rendered values
MAJORCart.js:112no query inside a loop
MINORcart.xml:14constrain the field in all layers
cartCouponLimit is read by the code and missing from the metadata export
Ready for human review. 1 blocker to clear before merge.