| name | regen-user-manual |
| description | Regenerate user-manual/manual.md from scratch by crawling the running PetClinic UI in a browser and writing each feature section from the bundled template. Explicit invocation only — user must type /regen-user-manual. |
| disable-model-invocation | true |
Regenerate the user manual
You are regenerating the end-user manual for the PetClinic application from scratch. Output: user-manual/manual.md plus screenshots under user-manual/screenshots/.
This is a full rewrite. Do not read the previous manual.md and do not diff against it — the bundled template is the single source of truth for structure, so just produce the new manual. The only thing you reuse from the existing folder is the screenshots/ directory, which you overwrite as you recapture.
Pre-flight (abort if either fails)
Run both checks in parallel:
curl -s -o /dev/null -w "%{http_code}" http://localhost:4200/
curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/actuator/health
If either returns anything other than 200, abort with this message and STOP:
Cannot regenerate the manual: the application stack is not running. Start it with ./start-database.sh, ./start-backend.sh, and ./start-frontend.sh (each in its own terminal) and try again.
Step 1 — Load the template
Read the bundled template .claude/skills/regen-user-manual/manual-template.md. It defines the exact shape of the output: the title block, the intro, the "do not edit by hand" note, the Contents list, and the per-feature section pattern (overview paragraph + ### <action> subsections, each with one screenshot and step-by-step prose). Every section you write must follow that pattern.
Step 2 — Discover the live route inventory
Read these files to enumerate routes:
petclinic-frontend/src/app/app-routing.module.ts
- All
petclinic-frontend/src/app/**/*-routing.module.ts files
Group routes by feature area (the folder name under src/app/, e.g. owners, pets, vets, visits, pettypes, specialties). Skip the parts folder — it holds the welcome page and 404; treat the welcome page as its own top section.
If the discovered route list looks suspiciously short (fewer than 5 features), fall back to crawling the rendered nav/sidebar in the browser at http://localhost:4200/ and use the visible menu links instead.
Step 3 — Capture and document each feature
For each feature area in route order, walk the happy path: list → detail → create → edit. Aim for 3–5 screenshots per feature, ~30–50 total.
Use chrome-devtools-mcp tools:
mcp__plugin_chrome-devtools-mcp_chrome-devtools__new_page to open http://localhost:4200/<route>
mcp__plugin_chrome-devtools-mcp_chrome-devtools__resize_page to set viewport to 1280×800
mcp__plugin_chrome-devtools-mcp_chrome-devtools__navigate_page, mcp__plugin_chrome-devtools-mcp_chrome-devtools__click, mcp__plugin_chrome-devtools-mcp_chrome-devtools__fill, mcp__plugin_chrome-devtools-mcp_chrome-devtools__fill_form to drive the UI
mcp__plugin_chrome-devtools-mcp_chrome-devtools__take_screenshot with fullPage: true and format: "png" to capture
Save each screenshot to user-manual/screenshots/<feature>-<state>.png. Naming: lowercase, hyphenated, descriptive of the state (owners-list.png, owners-create.png, owners-detail.png, pets-add.png, visits-add.png, etc.).
If you create new owners/pets/visits while crawling for screenshots, that test data persists in the running database. That is acceptable — the manual is a screenshot artifact, not a state-restoring test.
Step 4 — Write manual.md
Write user-manual/manual.md from scratch, following the bundled template exactly.
Top of manual.md must contain:
# PetClinic User Manual
- A one-paragraph intro: what the app is for, plus the "do not edit by hand — regenerated by
/regen-user-manual" line.
- A Contents list linking to each
## <Feature name> heading. Section order follows the feature module import order in app.module.ts (Owners, Pets, Visits, PetTypes, Vets, Specialties). Place a "Getting around" section and the Welcome section first.
Then one ## <Feature name> section per feature, each matching the template's pattern.
Tone: instructional second-person ("Click Add Owner to register a new owner..."). Audience: clinic staff, not developers. Do NOT document REST endpoints, validation rules, or developer concerns.
Step 5 — Clean up orphans
Delete any file in user-manual/screenshots/ that is not referenced from the regenerated manual.md. Use:
git status user-manual/screenshots/
to confirm only intended additions/deletions are present.
Step 6 — Report
Print one summary line in this format:
Manual regenerated from scratch: N sections (), P screenshots captured.
Then stop. Do NOT auto-commit — the user will review the diff and commit themselves.