siteready

Scan a site for agent readiness, auto-fix what's fixable, prove the fix worked.

View on GitHub

← Back to index

Architecture

siteready/
├── src/
│   ├── cli.js              # entry point: scan / enhance / rescan / diff-report / scan-local / rescan-local / loop
│   ├── scan.js              # runs configured scanner adapters -> normalized report (shared by scan & rescan)
│   ├── report.js            # normalized report -> report.md / report.json
│   ├── diff-report.js       # baseline vs re-scan -> diff-report.md / diff-report.json
│   ├── detect-stack.js      # framework/host fingerprinting from the LOCAL repo (package.json, config files)
│   ├── enhance.js           # detects stack, applies the matching fixer + platform module
│   ├── pr.js                # opt-in enhance --pr flow (branch, commit, push, gh pr create)
│   ├── loop.js               # local scan orchestration (scan-local / rescan-local / loop)
│   ├── skill-install.js      # install-skill orchestration: resolves package root, dispatches to installers/
│   ├── scanners/            # pluggable scanner adapters — export run*Scan(url, options) -> { normalized, raw }
│   ├── fixers/               # pluggable, framework-scoped remediation
│   ├── platforms/            # deployment-target adapters (negotiation/headers)
│   ├── installers/           # pluggable per-agent SKILL.md installers (claude, agents-skill for codex/opencode)
│   └── lib/
│       ├── npx-runner.js     # cross-platform npx invocation (see Cross-platform notes below)
│       └── local-server.js   # build + serve a repo locally for `scan-local`/`rescan-local` (no live deployment)
└── fixtures/
    ├── astro-starlight-cf-pages/   # reference fixture the Astro+Starlight fixer is verified against
    ├── astro-cf-pages/             # reference fixture the plain-Astro fixer is verified against
    └── nextjs-vercel/              # reference fixture the Next.js+Vercel fixer is verified against

Every scanner adapter and every fixer is independently pluggable — a scanner going offline or a framework having no fixer yet degrades to “unsupported,” never breaks the pipeline.

Design notes

Cross-platform notes

Runs on Windows, macOS, and Linux — this is CLI-driven (npx-based scanners, file-editing fixers), so “does it run on the user’s machine” is a real correctness bar, not a nice-to-have. Two platform-layout bugs already caught building this, both fixed in shared helpers so no individual scanner/fixer needs its own OS branching:

Node version note: siteready itself only needs Node ≥18, but fixtures/astro-starlight-cf-pages pins a floating Astro range that currently requires Node ≥22.12 to build, and next@16 (used by fixtures/nextjs-vercel) requires Node ≥20.9 — CI runs on Node 22 to satisfy both. If scan-local/verify-loop.js fails with “Node.js vX is not supported by Astro” (or an equivalent Next.js engine error), that’s a fixture’s own dependency, not siteready — upgrade Node, don’t downgrade the fixture’s declared range.