Skip to content

Commit 5e19859

Browse files
committed
Add 'Resume from here' section to the planning doc
Captures the full state of the rewrite for handoff to another machine or another agent: branches, what's done, sandbox PR state, decisions already made, what remains, and a complete script inventory. Anyone picking this up should read that section first.
1 parent 2a8f11f commit 5e19859

1 file changed

Lines changed: 114 additions & 0 deletions

File tree

planning/03-reviewer-workflow-rewrite.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,120 @@
22

33
Expand `docs/dev/documentation-guide/12-reviewer-workflow.mdx` from a reference into a guided, screenshot-driven tutorial aimed at reviewers with **zero prior GitHub experience**, while preserving a concise reference section for repeat users.
44

5+
## 🚦 Resume from here (for a future agent)
6+
7+
This section is the single source of truth for picking up this task on another machine or with another agent. Read it first.
8+
9+
### Branches and where work lives
10+
11+
- `docs/dev/reviewer-workflow-rewrite`**active working branch** for all planning, capture scripts, annotation scripts, and figures. Push exists on `origin`.
12+
- `docs/minor/totalrisk-users-guide-v1.1` — the sandbox PR's branch (PR #121). Don't merge.
13+
14+
To resume on a fresh machine:
15+
16+
```powershell
17+
git clone https://github.com/USACE-RMC/RMC-Software-Documentation.git
18+
cd RMC-Software-Documentation
19+
git checkout docs/dev/reviewer-workflow-rewrite
20+
npm install # for the docs site build
21+
npm install --prefix scripts/capture # for the Playwright capture pipeline
22+
npx --prefix scripts/capture playwright install chromium
23+
```
24+
25+
Then re-authenticate the screenshot account (the saved `.playwright-auth/` does NOT travel between machines — it's gitignored):
26+
27+
```powershell
28+
node scripts/capture/login.mjs
29+
# Sign in as rmc-test-reviewer in the launched Edge/Chrome window
30+
node scripts/capture/verify-auth.mjs
31+
# Should print: Logged in as: rmctestreviewer
32+
```
33+
34+
### What's done (committed to the rewrite branch)
35+
36+
| File | Purpose |
37+
|---|---|
38+
| `planning/03-reviewer-workflow-rewrite.md` | This document — the master plan |
39+
| `planning/section-1-draft.mdx` | Section 1 prose draft with four Mermaid diagrams (repo, branch, commit, PR) + glossary |
40+
| `planning/assets/captures/*.png` + `*.coords.json` | Raw captures with element coordinate sidecars |
41+
| `planning/assets/figure-pptx/*.pptx` | Editable PowerPoint version of every figure for free-form annotation tweaks |
42+
| `scripts/capture/*.mjs` | Playwright capture and probe scripts (Node, scoped Playwright install) |
43+
| `scripts/annotate-screenshots/*.py` | Pillow/python-pptx annotation scripts (Windows Python 3.12 + Pillow 11 + python-pptx 1.0) |
44+
| `static/figures/dev/reviewer-workflow/*.png` and `*.gif` | Final annotated outputs |
45+
46+
### Figure status (Part 1 of the chapter)
47+
48+
| Section | Status | Figure / GIF | Asset |
49+
|---|---|---|---|
50+
| 1. Orientation | ✅ Mermaid draft | (Mermaid, inline in MDX) | `planning/section-1-draft.mdx` |
51+
| 2. Review request email | ⏳ pending | needs real email forward OR mocked storyboard ||
52+
| 3. PR page tour | ✅ done | fig-02 overview, fig-03 commits, fig-04 files changed, fig-05 bot comments | + commit-filter storyboard GIF |
53+
| 4. Preview site | ✅ done | fig-06 preview page ||
54+
| 5. Leaving comments | 🟡 storyboard only | composer-storyboard.gif as template; user re-records in ScreenToGif | real composer captures blocked on GitHub's React hover behavior |
55+
| 6. Submit dialog | ✅ done | fig-08 finish-review ||
56+
| 7. Backcheck | 🟡 storyboard only | changes-since-last-review-storyboard.gif as template ||
57+
| 8. "You're done" | ✅ done | fig-09 review submitted ||
58+
59+
### Sandbox PR #121
60+
61+
- URL: https://github.com/USACE-RMC/RMC-Software-Documentation/pull/121
62+
- Author: `AdamGohs`; Assigned reviewer: `rmctestreviewer` (the dummy account, email alias on Adam's Gmail)
63+
- **Currently has a real submitted review** from `rmctestreviewer`, body clearly marked `[Documentation training sandbox]`. The review is Comment-style — did not advance the stage label. Do NOT delete this review unless you also re-capture fig-09.
64+
- Two-commit structure preserved intentionally: scaffolding (`85e53a4`) + content (`7ae20224`). The chapter teaches reviewers to filter to the content commit.
65+
- Leave the PR open indefinitely. Do not merge.
66+
67+
### Decisions already made (don't re-litigate)
68+
69+
- Annotation style: USACE blue (`#4a7c9b`) highlight boxes + numbered circles half-overlapping the corners; numbered legend lives in the figure caption, not on the image.
70+
- Every figure script emits BOTH a PNG (final output) and a `.pptx` (editable workspace).
71+
- GIFs are hybrid: Pillow-stitched storyboards for stepped sequences, user-recorded ScreenToGif for live action. Storyboards exist as templates the user re-records over.
72+
- The preview deploy does NOT show the DRAFT watermark — this is intentional, not a bug. The watermark is for production-site readers, not reviewers.
73+
- The screenshot account is `rmctestreviewer` (Gmail "+" alias `acgohs+testreviewer@gmail.com`). No dedicated mailbox.
74+
- Login uses Playwright's `connectOverCDP` against a Chrome/Edge subprocess launched without automation flags. The bundled Playwright Chromium gets blocked by GitHub as "this browser or app may not be secure."
75+
76+
### What remains
77+
78+
**Captures and figures:**
79+
- Section 2 email figure — either user forwards a real review-request email to capture, or build a mocked storyboard
80+
- Section 5 real composer GIF — user records with ScreenToGif following [gif-composer-storyboard.gif](../static/figures/dev/reviewer-workflow/gif-composer-storyboard.gif) as a guide
81+
82+
**Prose:**
83+
- Promote `planning/section-1-draft.mdx` into the actual chapter at `docs/dev/documentation-guide/12-reviewer-workflow.mdx`
84+
- Write Sections 2–8 prose against the figures already in `static/figures/dev/reviewer-workflow/`
85+
- Slim the existing chapter content into a Part 2 reference section
86+
- Write the new companion chapter "First-time GitHub setup" (insert before chapter 11; renumber subsequent chapters; update `scripts/generateSidebars.js`)
87+
88+
**Cross-cutting:**
89+
- Cross-link from Author Workflow and Site Admin Workflow chapters
90+
91+
### Open questions waiting on user input
92+
93+
- Section 5 composer GIF: user records in ScreenToGif when ready
94+
- Section 2 email: user forwards a real review-request email OR agent builds a mock storyboard
95+
- User has been iterating on figure `.pptx` files — when they hand back final coords, update the corresponding annotation scripts so future regenerations stay in sync
96+
97+
### Scripts at a glance
98+
99+
**`scripts/capture/`** (Node, requires `npm install --prefix scripts/capture`):
100+
- `login.mjs` — one-time interactive GitHub login; saves `.playwright-auth/github.json`
101+
- `verify-auth.mjs` — sanity check that the saved session is valid
102+
- `capture-pr-pages.mjs` — drives Playwright through PR #121's Conversation, Commits, and Files-changed tabs; writes PNG + coords JSON for each
103+
- `capture-preview-page.mjs` — captures the PR #121 preview site for Section 4
104+
- `capture-review-interactions.mjs` — captures the Submit-review dialog state (Section 6); the composer/suggestion parts are blocked on GitHub's React hover behavior
105+
- `submit-and-capture-review.mjs` — submits a Comment-style sandbox review on PR #121 and captures the post-submit state (Sections 7/8). Auto mode classifier blocks this; the user must approve or run it directly.
106+
- `refine-overview-coords.mjs`, `probe-*.mjs` — one-off probes that merge additional element coords into the captures' sidecar JSON
107+
108+
**`scripts/annotate-screenshots/`** (Python 3.12 + Pillow + python-pptx):
109+
- `annotate_lib.py` — shared `annotate_and_crop()` + `make_pptx_overlay()` helpers
110+
- `fig-pr-overview.py`, `fig-pr-commits.py`, `fig-pr-files-changed.py`, `fig-bot-comments.py`, `fig-preview-page.py`, `fig-finish-review.py`, `fig-review-submitted.py` — per-figure renderers
111+
- `gif-composer-storyboard.py`, `gif-commit-filter-storyboard.py`, `gif-changes-since-last-review-storyboard.py` — storyboard GIF builders
112+
113+
All Python scripts read their source captures from `planning/assets/captures/` and write PNG/PPTX outputs to `static/figures/dev/reviewer-workflow/` and `planning/assets/figure-pptx/` respectively. Re-run any script after editing it; outputs are deterministic given the same source.
114+
115+
---
116+
117+
118+
5119
## Goals
6120

7121
- A first-time reviewer can perform a full review by following the chapter linearly, without external help.

0 commit comments

Comments
 (0)