@salesforce/sfnext-audit
v0.1.2
Published
Deterministic pre-launch (go-live) readiness auditor for storefront-next customer projects, shipped as a TanStack Intent agent skill. Captures Lighthouse against the deployed site, runs a zero-dependency static engine, and produces a self-contained HTML d
Readme
@salesforce/sfnext-audit
Deterministic pre-launch (go-live) readiness auditor for storefront-next customer projects, shipped as a TanStack Intent agent skill.
It captures Lighthouse against the deployed site, runs a zero-dependency static engine over the project, and produces a self-contained HTML dashboard + markdown report graded against the Salesforce standard launch bar — a GO / GO-WITH-FIXES / NO-GO verdict across performance, best practices, accessibility, SEO, security, and customization drift.
What you get
Every run writes, under .site-audit/:
index.html— a self-contained dashboard (embeds the data, opens offline viafile://). One card per captured page (home / PLP / PDP), a per-category breakdown, and the SSR render timeline. This is "what we saw" — share it directly.SITE-AUDIT-REPORT.md— the markdown report.audit.json— the deterministic single source of truth (seeskills/site-audit/schema/).
Consumer quick start
You use this through a coding agent (Claude Code, Cursor, Copilot, Codex, …) that speaks TanStack Intent. See the Intent consumer guide.
Install into the storefront-next project you want to audit:
pnpm add -D @salesforce/sfnext-audit # or: npm install -D @salesforce/sfnext-auditConfirm it's discovered:
npx @tanstack/intent@latest list # → @salesforce/sfnext-audit local … site-audit [lifecycle](Optional) wire skill-loading guidance into your agent config (AGENTS.md / CLAUDE.md / …):
npx @tanstack/intent@latest installAsk your agent for a pre-launch readiness audit of the project (give it the deployed/staging URL). The agent loads the skill —
npx @tanstack/intent@latest load @salesforce/sfnext-audit#site-audit— then follows it: discovers the site's home / PLP / PDP pages, runs the engine, interprets the results per category, and reaches a verdict. The engine itself is available as a CLI:
npx sfnext-audit --project <path> \ --url home=<root> --url plp=<listing-url> --url pdp=<product-url> \ --out <path>/.site-auditOpen
.site-audit/index.htmlto see the dashboard.
A deployed-URL capture adds ~3–5 min per URL; a home+PLP+PDP run is ~9–15 min. Run npx sfnext-audit
--help for all options (--lighthouse run|reuse|skip, --only <dims>, …).
Requirements
- Node.js ≥ 24
- A deployed/staging URL for the site (Lighthouse capture). Without one,
performancedegrades to static-only and the gap is reported. - The engine analyzes the codebase statically — the project does not need to be runnable and you do not need its secrets.
Maintaining this package
The skill lives entirely under skills/site-audit/ (SKILL.md + the frozen bin/audit.mjs engine +
lib/ + references/ + schema/ + audit.config.mjs). files: ["skills", "!skills/_artifacts"] in package.json is
what gets published; the engine's imports resolve relative to their own location, so the whole tree
ships together and runs from any consumer's node_modules.
npm install # dev deps (@tanstack/intent)
npx @tanstack/intent@latest validate # validate SKILL.md frontmatter + limits
npm pack --dry-run # preview the published tarballDiscovery relies on the intent field + the skills/ directory in package.json. Skill addressing
is @salesforce/sfnext-audit#site-audit.
License
Apache-2.0.
