Love Me, Love My Docs
Manuals rot for one reason: screenshots are pasted, not generated. The day
the UI changes, every image lies. This skill makes screenshots a build
artifact — a committed capture script walks the real app and shoots every
step — so regenerating the whole manual is one command, forever.
The Prime Directive (family rule)
Every screenshot is reproducible and every documented step was
actually performed. Images come from the capture script (committed to
the repo), never from hand-cropped one-offs. Steps come from flows the
script successfully walked — a step the harness couldn't execute is a
finding about the app, not a thing to paper over with prose.
Progress checklist
Copy this into your response and check items off:
Docs Progress:
- [ ] Step 1: Frame — audience, language(s), platform, output format
- [ ] Step 2: Flow census — user journeys mined from routes/screens; Chapter Plan Gate passed
- [ ] Step 3: Demo data — target passed the production gate; safe seeded account; zero real user data
- [ ] Step 4: Smoke capture — ONE screenshot end-to-end (boot → auth → seed visible → shot → rendered page)
- [ ] Step 5: Capture harness — Playwright (web) / Maestro (mobile) script per flow, stable selectors only
- [ ] Step 6: Capture run — screenshots generated, consistent and complete
- [ ] Step 7: Manual written — chapter per flow, step per screenshot, rendered beautifully
- [ ] Step 8: Verify + report — no broken images, rot pre-mortem passed, regeneration command documented
Step 1 — Frame
- Audience: end users / admins / both — separate manuals if both
(mixed audiences make unusable docs).
- Language(s): write in the product's language first; if multiple,
captures may need per-locale runs (the harness parameterizes locale).
- Platform: web is the primary focus → Playwright. Mobile is an
optional path (Maestro — see
references/capture-mobile.md) — take it
only when the user explicitly asks for a mobile manual.
- Output: MkDocs Material site (recommended — beautiful by default,
searchable), plain Markdown in
docs/manual/, or PDF. One choice.
Step 2 — Flow census
Mine the user journeys from evidence, not memory: routes, navigation
menus, screen registries (file:line each). Classify:
- Core flows — what 80% of users do (login, create X, publish, search)
→ each becomes a chapter.
- Secondary flows — settings, profile, exports → grouped chapters.
- Admin flows — separate manual or section, per Step 1.
- Skip — internal/debug routes, with a note.
Chapter Plan Gate — before writing a single capture script, present a
compact brief in chat: one numbered line per chapter (flow, route/nav
evidence file:line, screens touched, screenshot count estimate) plus the
skip list. 10–20 lines total; ask for confirmation once. Changing the
chapter list here costs one message; changing it after the harness exists
costs a rewrite. No harness code may exist before this gate passes. If the
user cannot respond (headless/CI run), proceed and mark the chapter plan
UNCONFIRMED in the final report.
Step 3 — Demo data hygiene
Screenshots outlive databases. Before any capture:
- A dedicated demo account (name like "Somchai Demo", not a real person)
and seeded content that looks real but is fictional.
- Zero real user data, emails, tokens, or keys in any frame — treat
every screenshot as public forever.
- Consistent state: the same seed produces the same screens, so re-runs
diff cleanly. Seed script lives next to the capture script.
- Production gate (mechanical): seeding writes rows and the harness
clicks real buttons ("Publish", "Delete") — pointed at production, it
mutates production. That is a ONE-WAY action. Before seeding one row or
scripting one click, check the target base URL host:
localhost,
127.0.0.1, or a .local/.test domain passes automatically; any
other host requires the user to confirm it by name, once. No
confirmation available (headless run) = do not seed, do not capture —
fall back to the degraded mode in Step 5.
Step 4 — Smoke capture (one screenshot end-to-end)
Before writing per-flow scripts, prove the thinnest slice works. This is
where every operational unknown lives — dev-server boot, auth, base URL,
seed visibility — and finding them on flow 1 of 1 is cheap; finding them
on flow 12 of 12 is a rewrite:
- Boot the app (document the exact command) and verify the base URL
responds.
- Log the demo account in once; save the storage state to
docs/capture/auth.json.
- Verify one seeded entity is visible on a real page.
- Capture ONE screenshot through the harness skeleton and render ONE
chapter page that references it, in the chosen output format.
Exit criterion (mechanical): one image file exists on disk and one
rendered chapter page displays it. Until then, no second capture script
may be written. Any numbered item that fails is a named finding (app
won't boot, auth broken, seed invisible) — report it; do not script
around it.
Step 5 — Build the capture harness
- Web: Playwright for Python — patterns in
references/capture-web.md: stored auth
state, fixed viewport/theme, wait-for-stable strategies, element
highlighting before the shot, per-locale parameterization. Selector
policy: committed scripts use
get_by_test_id / get_by_role —
every bare text or CSS selector that survives is counted and listed in
the final report as an app finding (missing data-testids). No running
app, or Playwright not installable = degraded mode (mirror of the
mobile one): still commit the harness and seed scripts (they encode the
steps), emit a manual capture checklist with the exact filenames to
shoot, mark every unfilled image slot with a visible TODO placeholder,
and say so honestly in the report.
- Mobile (optional): Maestro YAML flows with
takeScreenshot —
patterns, alternatives (Fastlane snapshot/screengrab, raw simctl/adb),
and the install-security rule (auditable channels only — never
curl | bash) in
references/capture-mobile.md. No
simulator/emulator available = degraded mode: generate the flow files +
a manual capture checklist, and say so honestly.
- One script/flow per chapter; screenshots named
<chapter>/<step-number>-<slug>.png — the filename IS the step order.
- Commit the harness to
docs/capture/. It is product code now.
Step 6 — Capture run
Run the harness. Every failure is triaged, not skipped: a step that can't
be automated is either a missing test-id/accessibility-label in the app (a
finding — report it) or a flow that changed since the census (update the
census). Re-run until the set is complete and consistent (same viewport,
same theme, same locale per set).
Step 7 — Write the manual
Structure and style per
references/manual-structure.md: chapter
per flow — goal, prerequisites, numbered steps (one screenshot each, with
a caption saying what to notice), expected result, troubleshooting.
Written in user language ("click Publish"), never developer language
("trigger the POST endpoint"). Render the chosen format; MkDocs Material
config included when that's the choice.
Step 8 — Verify and report
- Every image referenced exists; every capture script runs green
end-to-end; the regeneration command is documented in the manual's own
README (
python docs/capture/run_all.py or maestro test flows/).
- Rot pre-mortem — assume the manual rotted three months from now;
the known causes are checked mechanically, not pondered:
- Selectors: grep committed scripts for bare text selectors
(
:has-text, text=) and CSS selectors (#, ., [); count must
be zero or each one listed as an app finding with file:line.
- Auth: the
auth.json re-mint procedure is documented in the
manual's README (stored auth state expires).
- Seed drift: the seed script is committed next to the harness and
run_all invokes it (or its README documents the seed command as
step one).
- Environment: base URL, viewport, theme, and locale are pinned
constants in one place — never repeated per script.
- Report: chapters written, screenshots generated, flows that failed
automation (app findings), and the one-command regeneration story.
- Offer the standing suggestion: wire the capture run into CI so UI
changes that break the manual fail loudly instead of rotting silently.
When things go wrong
| Situation |
Response |
| App won't boot or base URL unreachable |
Named finding in Step 4 — report it; do not script around it. Fall back to degraded mode: commit harness skeleton + manual capture checklist with exact filenames, mark image slots with TODO placeholders. |
| Playwright not installable or no running app available |
Degraded mode (Step 5): commit harness + seed scripts (they encode steps), emit manual capture checklist, mark unfilled image slots with visible TODO, report honestly. |
| Capture script fails on a specific flow mid-run |
Triage (Step 6): missing test-id/accessibility-label in app (finding — report it) or flow changed since census (update census). Never skip; re-run until complete. |
Stored auth state (auth.json) expires during regeneration |
Re-mint procedure documented in manual's README (Step 8 rot pre-mortem). Log demo account in manually once, save storage state, document the exact command. |
| Screenshots inconsistent (different viewport/theme/locale) |
Environment constants not pinned (Step 8 rot pre-mortem). Pin BASE, VIEWPORT, locale, color_scheme in one place; never repeat per script. |
| Manual regeneration command undocumented or fails |
Step 8 exit criterion failed. Document full chain in manual's README: boot app, seed, re-mint auth if expired, run capture. Test end-to-end before reporting complete. |
1---2name: love-me-love-my-docs3description: Auto-generates a beautiful user manual with REAL screenshots captured by executable scripts: censuses the app's user flows from routes and navigation, builds a Playwright (Python) capture harness for web (the primary focus; mobile via Maestro is an optional path), seeds safe demo data so no real user data appears in images, writes the manual chapter-per-flow with a numbered step per screenshot, and renders it beautifully (MkDocs Material site, Markdown, or PDF). The capture scripts are committed, so the manual regenerates when the UI changes instead of rotting. Use when the user asks to generate a user manual, user guide, documentation with screenshots, onboarding docs, or mentions love-me-love-my-docs or /love-me-love-my-docs.4license: MIT5---67# Love Me, Love My Docs89Manuals rot for one reason: screenshots are pasted, not generated. The day10the UI changes, every image lies. This skill makes screenshots a build11artifact — a committed capture script walks the real app and shoots every12step — so regenerating the whole manual is one command, forever.1314## The Prime Directive (family rule)1516> **Every screenshot is reproducible and every documented step was17> actually performed.** Images come from the capture script (committed to18> the repo), never from hand-cropped one-offs. Steps come from flows the19> script successfully walked — a step the harness couldn't execute is a20> finding about the app, not a thing to paper over with prose.2122## Progress checklist2324Copy this into your response and check items off:2526```27Docs Progress:28- [ ] Step 1: Frame — audience, language(s), platform, output format29- [ ] Step 2: Flow census — user journeys mined from routes/screens; Chapter Plan Gate passed30- [ ] Step 3: Demo data — target passed the production gate; safe seeded account; zero real user data31- [ ] Step 4: Smoke capture — ONE screenshot end-to-end (boot → auth → seed visible → shot → rendered page)32- [ ] Step 5: Capture harness — Playwright (web) / Maestro (mobile) script per flow, stable selectors only33- [ ] Step 6: Capture run — screenshots generated, consistent and complete34- [ ] Step 7: Manual written — chapter per flow, step per screenshot, rendered beautifully35- [ ] Step 8: Verify + report — no broken images, rot pre-mortem passed, regeneration command documented36```3738## Step 1 — Frame3940- **Audience:** end users / admins / both — separate manuals if both41 (mixed audiences make unusable docs).42- **Language(s):** write in the product's language first; if multiple,43 captures may need per-locale runs (the harness parameterizes locale).44- **Platform:** **web is the primary focus** → Playwright. Mobile is an45 optional path (Maestro — see46 [references/capture-mobile.md](references/capture-mobile.md)) — take it47 only when the user explicitly asks for a mobile manual.48- **Output:** MkDocs Material site (recommended — beautiful by default,49 searchable), plain Markdown in `docs/manual/`, or PDF. One choice.5051## Step 2 — Flow census5253Mine the user journeys from evidence, not memory: routes, navigation54menus, screen registries (`file:line` each). Classify:5556- **Core flows** — what 80% of users do (login, create X, publish, search)57 → each becomes a chapter.58- **Secondary flows** — settings, profile, exports → grouped chapters.59- **Admin flows** — separate manual or section, per Step 1.60- **Skip** — internal/debug routes, with a note.6162**Chapter Plan Gate** — before writing a single capture script, present a63compact brief in chat: one numbered line per chapter (flow, route/nav64evidence `file:line`, screens touched, screenshot count estimate) plus the65skip list. 10–20 lines total; ask for confirmation **once**. Changing the66chapter list here costs one message; changing it after the harness exists67costs a rewrite. No harness code may exist before this gate passes. If the68user cannot respond (headless/CI run), proceed and mark the chapter plan69`UNCONFIRMED` in the final report.7071## Step 3 — Demo data hygiene7273Screenshots outlive databases. Before any capture:7475- A dedicated demo account (name like "Somchai Demo", not a real person)76 and seeded content that looks real but is fictional.77- **Zero real user data, emails, tokens, or keys in any frame** — treat78 every screenshot as public forever.79- Consistent state: the same seed produces the same screens, so re-runs80 diff cleanly. Seed script lives next to the capture script.81- **Production gate (mechanical):** seeding writes rows and the harness82 clicks real buttons ("Publish", "Delete") — pointed at production, it83 mutates production. That is a ONE-WAY action. Before seeding one row or84 scripting one click, check the target base URL host: `localhost`,85 `127.0.0.1`, or a `.local`/`.test` domain passes automatically; **any86 other host requires the user to confirm it by name, once**. No87 confirmation available (headless run) = do not seed, do not capture —88 fall back to the degraded mode in Step 5.8990## Step 4 — Smoke capture (one screenshot end-to-end)9192Before writing per-flow scripts, prove the thinnest slice works. This is93where every operational unknown lives — dev-server boot, auth, base URL,94seed visibility — and finding them on flow 1 of 1 is cheap; finding them95on flow 12 of 12 is a rewrite:96971. Boot the app (document the exact command) and verify the base URL98 responds.992. Log the demo account in once; save the storage state to100 `docs/capture/auth.json`.1013. Verify one seeded entity is visible on a real page.1024. Capture ONE screenshot through the harness skeleton and render ONE103 chapter page that references it, in the chosen output format.104105**Exit criterion (mechanical):** one image file exists on disk and one106rendered chapter page displays it. Until then, no second capture script107may be written. Any numbered item that fails is a named finding (app108won't boot, auth broken, seed invisible) — report it; do not script109around it.110111## Step 5 — Build the capture harness112113- **Web:** Playwright for Python — patterns in114 [references/capture-web.md](references/capture-web.md): stored auth115 state, fixed viewport/theme, wait-for-stable strategies, element116 highlighting before the shot, per-locale parameterization. **Selector117 policy:** committed scripts use `get_by_test_id` / `get_by_role` —118 every bare text or CSS selector that survives is counted and listed in119 the final report as an app finding (missing `data-testid`s). No running120 app, or Playwright not installable = degraded mode (mirror of the121 mobile one): still commit the harness and seed scripts (they encode the122 steps), emit a manual capture checklist with the exact filenames to123 shoot, mark every unfilled image slot with a visible TODO placeholder,124 and say so honestly in the report.125- **Mobile (optional):** Maestro YAML flows with `takeScreenshot` —126 patterns, alternatives (Fastlane snapshot/screengrab, raw simctl/adb),127 and the install-security rule (auditable channels only — **never128 `curl | bash`**) in129 [references/capture-mobile.md](references/capture-mobile.md). No130 simulator/emulator available = degraded mode: generate the flow files +131 a manual capture checklist, and say so honestly.132- One script/flow per chapter; screenshots named133 `<chapter>/<step-number>-<slug>.png` — the filename IS the step order.134- Commit the harness to `docs/capture/`. It is product code now.135136## Step 6 — Capture run137138Run the harness. Every failure is triaged, not skipped: a step that can't139be automated is either a missing test-id/accessibility-label in the app (a140finding — report it) or a flow that changed since the census (update the141census). Re-run until the set is complete and consistent (same viewport,142same theme, same locale per set).143144## Step 7 — Write the manual145146Structure and style per147[references/manual-structure.md](references/manual-structure.md): chapter148per flow — goal, prerequisites, numbered steps (one screenshot each, with149a caption saying what to notice), expected result, troubleshooting.150Written in user language ("click **Publish**"), never developer language151("trigger the POST endpoint"). Render the chosen format; MkDocs Material152config included when that's the choice.153154## Step 8 — Verify and report155156- Every image referenced exists; every capture script runs green157 end-to-end; the regeneration command is documented in the manual's own158 README (`python docs/capture/run_all.py` or `maestro test flows/`).159- **Rot pre-mortem** — assume the manual rotted three months from now;160 the known causes are checked mechanically, not pondered:161 - **Selectors:** grep committed scripts for bare text selectors162 (`:has-text`, `text=`) and CSS selectors (`#`, `.`, `[`); count must163 be zero or each one listed as an app finding with `file:line`.164 - **Auth:** the `auth.json` re-mint procedure is documented in the165 manual's README (stored auth state expires).166 - **Seed drift:** the seed script is committed next to the harness and167 `run_all` invokes it (or its README documents the seed command as168 step one).169 - **Environment:** base URL, viewport, theme, and locale are pinned170 constants in one place — never repeated per script.171- Report: chapters written, screenshots generated, flows that failed172 automation (app findings), and the one-command regeneration story.173- Offer the standing suggestion: wire the capture run into CI so UI174 changes that break the manual fail loudly instead of rotting silently.175176## When things go wrong177178| Situation | Response |179|-----------|----------|180| App won't boot or base URL unreachable | Named finding in Step 4 — report it; do not script around it. Fall back to degraded mode: commit harness skeleton + manual capture checklist with exact filenames, mark image slots with TODO placeholders. |181| Playwright not installable or no running app available | Degraded mode (Step 5): commit harness + seed scripts (they encode steps), emit manual capture checklist, mark unfilled image slots with visible TODO, report honestly. |182| Capture script fails on a specific flow mid-run | Triage (Step 6): missing test-id/accessibility-label in app (finding — report it) or flow changed since census (update census). Never skip; re-run until complete. |183| Stored auth state (`auth.json`) expires during regeneration | Re-mint procedure documented in manual's README (Step 8 rot pre-mortem). Log demo account in manually once, save storage state, document the exact command. |184| Screenshots inconsistent (different viewport/theme/locale) | Environment constants not pinned (Step 8 rot pre-mortem). Pin BASE, VIEWPORT, locale, color_scheme in one place; never repeat per script. |185| Manual regeneration command undocumented or fails | Step 8 exit criterion failed. Document full chain in manual's README: boot app, seed, re-mint auth if expired, run capture. Test end-to-end before reporting complete. |