Uh oh!
There was an error while loading. Please reload this page.
JS Asset Auditor engineering spec - #608
Conversation
Engineering spec for the /audit-js-assets . Covers sweep protocol, Chrome DevTools MCP tooling, heuristic filtering, slug generation, init and diff modes. Closes#606
prk-Jr
left a comment
There was a problem hiding this comment.
Summary
Reviewed the engineering spec and left a few implementation-facing questions inline. The main areas are URL normalization, wildcarding, third-party boundary matching, path derivation, and inject_in_head semantics for dynamic scripts.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
aram356
left a comment
There was a problem hiding this comment.
Summary
Well-structured engineering spec for the JS Asset Auditor. The Auditor/Proxy separation and diff mode design are strong. However, several MCP tool assumptions are incorrect and would cause the skill to fail at implementation time, and the path derivation algorithm contradicts its own examples.
Blocking
🔧 wrench
- MCP tool names are wrong: every
mcp__chrome-devtools__*reference uses an incorrect prefix — actual names aremcp__plugin_chrome-devtools-mcp_chrome-devtools__*(line 36+) wait_formisuse: tool waits for text on page, not a settle window — needevaluate_scriptwithsetTimeoutinstead (line 37)list_network_requestsfiltering: tool supportsresourceTypesfiltering, not URL/Content-Type filtering — post-processing needed (line 39)- Path derivation contradicts examples: algorithm says
/{publisher_prefix}/{asset_stem}.jsbut example shows/sdk/aB3kR7mN.js— these are different structures (line 68 vs 119)
❓ question
- Slug concatenation separator:
sha256(publisher.domain + origin_url)doesn't specify a separator — and base62 encoding isn't standardized (character set ordering). Both must be pinned for Auditor/Proxy consistency (line 88) - Skill location: spec says
.claude/skills/audit-js-assets.mdbut project uses.claude/commands/for all slash commands — reason for new directory? (line 186)
Non-blocking
🤔 thinking
- Wildcard regex too broad:
[A-Za-z0-9]{8,}matches stable path segments likeanalytics,bootstrap(line 100) stale_ttl_secomitted: Proxy spec defines this field but Auditor doesn't mention it in generated entries (line 70)platform.twitter.com: may need updating toplatform.x.compost-rebrand (line 58)- 6s settle window: may miss late-loading ad tech scripts — consider making configurable (line 37)
- MCP permission grants:
close_pageandwait_forare not pre-approved in.claude/settings.json— will trigger permission prompts - No error handling specified: DNS failures, ad blockers, browser crashes during sweep — worth documenting expected behavior
🌱 seedling
docs/superpowers/specs/is new: existing docs usedocs/guide/,docs/internal/,docs/epics/— convention should be documented- Wildcard detection asymmetry: only defined in Auditor spec, not cross-referenced in Proxy spec — future tools won't know the patterns
⛏ nitpick
- Relative link to Proxy spec: dead if this PR merges first (line 6, 207)
👍 praise
- Diff mode design: commented-out TOML + never-auto-remove is excellent
- Auditor/Proxy separation: clean architectural boundary with minimal coupling
- Terminal summary: shows filtered-with-reason, slug mapping, wildcard indicators
inject_in_headDOM detection: sound approach usingdocument.head.querySelectorAll
CI Status
- cargo fmt: PASS
- cargo test: PASS
- vitest: PASS
- format-typescript: PASS
- format-docs: FAIL
- CodeQL: PASS
- integration tests: PASS
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fix incorrect MCP tool name prefix, replace misused wait_for with
evaluate_script setTimeout, correct list_network_requests filtering to
use resourceTypes, resolve path derivation contradiction with consistent
/js-assets/{prefix}/{stem}.js formula, pin slug separator and base62
charset, add URL Processing section with normalization rules and
first-party boundary definition, tighten wildcard regex to require mixed
character classes, and move skill location to .claude/commands/.…-server into js-asset-auditor-spec
aram356
commented
Jul 7, 2026
Closing in place of #800 |
Summary
Engineering spec for the JS Asset Auditor — a Claude Code slash command that sweeps a publisher page via Chrome DevTools MCP, detects third-party JS assets, and generates or diffs
js-assets.toml.Closes#606
Docs added
docs/superpowers/specs/2026-04-01-js-asset-auditor-design.md— engineering spec covering sweep protocol, Chrome DevTools MCP tooling, heuristic filtering, slug generation, init and diff modesTest plan