AGENT SKILL

slipway-doctor

Check a static site with slipway doctor after you edit it, read the findings, and fix them until the site reaches its conformance level. Use for any Slipway site or any site that follows the agent-editable site spec.

License 许可
MIT
所属仓库
arminazimi/slipway
最近更新
2026-11-11
Stars
★ 2
Forks
2

01 前言 Front Matter

name
slipway-doctor
metadata
{ "version": "0.3.0" }
description
Check a static site with slipway doctor after you edit it, read the findings, and fix them until the site reaches its conformance level. Use for any Slipway site or any site that follows the agent-editable site spec.

03 SKILL.md 正文

Check a site with slipway doctor

slipway doctor checks a site's source folder and, when given, its built output against the agent-editable site spec. It reports the conformance level the site reaches, L0 to L3, and every finding with its file and line. It works for any generator and never changes a file.

Run it after every edit, before you say the edit is done.

1. Run it

Use the doctor tool when the Slipway MCP server is registered for the site (the Slipway repository's packages/mcp/README.md says how). It takes two optional inputs:

Input Meaning
build The built output folder, relative to the site, such as dist. Without it, the tests on the output fail.
level The level the site must reach, L0 to L3. Without it, ok is true when every MUST test passes.

Otherwise run the command line from a clone of this repository, after npm ci:

node packages/doctor/bin/slipway.ts doctor <site> --build <site>/dist --format json

Add --level L2 (or the level the site's AGENTS.md names) to fail below that level. In CI, --format sarif writes the findings for GitHub code scanning. Exit code 0 means the target is reached, 1 means findings, and 2 a usage error or a missing folder.

Build the site first with the engine (slipway build <site> --out <site>/dist) when you pass build, so the doctor checks the output of your edit and not an old one. The deploy Action runs this check on its build when its doctor input is true. Leave --network off unless the owner asks: it fetches remote schemas, and no other test needs it.

2. Read the report

The tool returns the JSON report; the command prints it with --format json. Read these fields:

  • ok: the tool's answer to "is the site done?". The command's exit code says the same.
  • level: the highest level reached, or null when an L0 MUST test fails.
  • findings: what to fix. Each has the test id, severity, message, and when known in (source or output), file (relative to that folder), line, column, key, allowed, and fix. A finding on a built page already names its source file and line when the site has a source map; output.file keeps the built file.
  • notRun: tests the doctor did not run. Two are decided by a person; tell the owner, do not mark them as passed.

An error is a failed MUST: it keeps the site below the level. A warning is a failed SHOULD or a generator advisory: fix it when the fix is clear, but it never lowers the level.

3. Fix and run it again

  1. Fix findings in the source. A finding with in: output points at a built file the source map does not cover; change the source that produces it, never the built file.
  2. Use fix and allowed when a finding has them: they name the value the site needs.
  3. Fix errors first, lowest level first: an L0 error hides what L1 and above would report.
  4. Run the doctor again, with the same inputs. Stop when ok is true and no new finding appeared.

If a finding stays after two attempts, stop and report it to the owner with its id, file, line, and message.

Never

  • Never lower level, drop build, or remove a file the doctor reads to get ok. That hides findings instead of fixing them.
  • Never edit spec/agent-editable/tests.json, the schemas, or the doctor itself to make a site pass.
  • Never fix a finding by deleting the content it is about, unless the owner asked for that.

04 同仓库更多 Skills