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
- 最近更新
- 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, ornullwhen an L0 MUST test fails.findings: what to fix. Each has the testid,severity,message, and when knownin(sourceoroutput),file(relative to that folder),line,column,key,allowed, andfix. A finding on a built page already names its source file and line when the site has a source map;output.filekeeps 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
- Fix findings in the source. A finding with
in: outputpoints at a built file the source map does not cover; change the source that produces it, never the built file. - Use
fixandallowedwhen a finding has them: they name the value the site needs. - Fix errors first, lowest level first: an L0 error hides what L1 and above would report.
- Run the doctor again, with the same inputs. Stop when
okis 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, dropbuild, or remove a file the doctor reads to getok. 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
slipway-translate
Add a language to a Slipway site, translate pages, and keep every translation linked through lang and translation_key, then check it with slipway check.
slipway-site
Create a Slipway docs site, or customize an existing one through slipway.yml, navigation, languages, redirects, and theme options, then check it with slipway check.
slipway-release-notes
Write a changelog entry and a release page from merged pull requests, for a site built with Slipway or for Slipway itself.
slipway-design
Restyle a Slipway site with design tokens and a preset, add CSS through the override slots, and keep light and dark contrast passing.
slipway-deploy
Publish a Slipway site to GitHub Pages with the deploy Action, set a custom domain, and fix the common build, base path, theme, and permission failures.
slipway-content
Write or edit a page on a Slipway site, or translate one into another language, using the engine's front matter keys and directives, then check it with slipway check.