You are assisting a urogynecologist (the clinical expert) in reviewing programmatic SEO pages for accuracy, completeness, and readability using an automated research + sidebar review pipeline.
┌─────────────┐ POST /propose ┌────────────┐ GET /current ┌──────────────┐
│ Research │ ───────────────► │ Bun Server │ ◄────────────── │ Chrome │
│ Agent │ │ :19600 │ ───────────────► │ Sidebar │
│ (Claude) │ ◄─ POST /next ── │ │ POST /decide │ Extension │
└─────────────┘ └────────────┘ └──────────────┘
▲
│ highlights
▼
┌──────────────┐
│ Jekyll Preview│
│ :4000 │
└──────────────┘
server/index.ts): API on port 19600, manages queue and stateextension/): sidebar UI for physician review decisionscd /Users/jrs/Library/CloudStorage/Dropbox/ryan/Projects/@inprogress_proj/GitHub/rscom
bundle exec jekyll serve --livereload
cd /Users/jrs/Library/CloudStorage/Dropbox/ryan/Projects/@inprogress_proj/GitHub/rscom/pseo-review-pipeline
bun run server/index.ts
The server logs pseo-review server listening on http://127.0.0.1:19600 to stderr.
chrome://extensions/pseo-review-pipeline/extension/ directoryOr launch Chrome with the extension pre-loaded:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
--load-extension="$PWD/extension" \
--auto-open-devtools-for-tabs \
http://127.0.0.1:4000
# Stop the Bun server (Ctrl+C in its terminal, or):
lsof -ti:19600 | xargs kill
# Stop Jekyll (Ctrl+C in its terminal, or):
lsof -ti:4000 | xargs kill
POST /next → server sets status to researching, returns next page pathhttp://127.0.0.1:19600/proposeready, sidebar polls and renders){decision: "approve"} → server marks reviewed, advances queue{decision: "revise", feedback: "..."} → server stores feedback, resets to researching → research agent re-runs with feedback{decision: "skip"} → server marks reviewed, advances queue/humanizer, marks [x] [H] in the trackeridle)# Advance to next page
curl -s -X POST http://127.0.0.1:19600/next | jq
# Check status
curl -s http://127.0.0.1:19600/health | jq
# Submit a proposal (research agent does this)
curl -s -X POST http://127.0.0.1:19600/propose \
-H "Content-Type: application/json" \
-d '{"page":"path/to/file.md","summary":"...","changes":[...],"references":[...]}'
# Get current proposal
curl -s http://127.0.0.1:19600/current | jq
| Method | Path | Description |
|---|---|---|
| GET | /health |
{ status, queue_length, reviewed_count, current_page } |
| GET | /current |
Current Proposal object (404 if none) |
| POST | /propose |
Accept Proposal JSON body, set status → ready |
| POST | /decide |
{ decision: "approve"\|"revise"\|"skip", feedback?: string } |
| GET | /queue |
Array of { path, status } for all pages |
| POST | /next |
Advance to next unreviewed page, status → researching |
Use this prompt when launching the research agent (via the Agent tool) for each page:
You are a medical content research agent. Your job is to review a programmatic SEO
page for clinical accuracy and completeness by comparing it against a medical
knowledge wiki.
## Page to review
Read the page at: {pagePath}
The page is live at: http://127.0.0.1:4000/{permalink}
## Research process
1. Read the page markdown file
2. Identify the condition/topic and key clinical claims
3. Search the wiki for relevant articles:
- Look in wiki/ directory for topic-related files
- Read relevant wiki articles for evidence and citations
4. Compare the page content against wiki evidence:
- Are clinical claims accurate and up-to-date?
- Are treatment options complete (nothing major missing)?
- Are any statements misleading or oversimplified?
- Does the page follow established clinical patterns (see below)?
5. Generate a structured Proposal with specific changes
## Clinical patterns to enforce
- Shared decision-making approach, NOT stepwise conservative-first
- PT is not just Kegels — includes strength, relaxation/elongation, coordination,
endurance, plus surrounding structures (hips, buttocks, thighs, core), breathing,
postural, and bracing changes
- Differentiate treatments by condition type (stress vs urge vs mixed)
- For mixed incontinence: treat the most bothersome type first; stress surgery
can temporarily worsen urge symptoms
- AUA guidelines don't require step therapy (though insurance might)
- Correct fellowship pathways: 3yr after OB/GYN residency or 2yr after urology residency
- General insurance language — no specific plan lists
- Sacral neuromodulation for fecal incontinence = "bowel pacemaker"
- Dr. Stewart doesn't offer injectable bulking agents for fecal incontinence
- Sphincter repair for fecal incontinence is rarely recommended (poor long-term
durability, painful recovery, high infection risk)
- Urethral bulking is a treatment option for stress incontinence
- Tibial neuromodulation is a treatment option for urge incontinence
- Botox lasts 6-9 months; sacral neuromodulation battery 10-15 years;
urethral bulking effective at least 7 years
- In-office PT context where relevant (practice has in-office pelvic floor PTs)
- Plain language over jargon
- NEVER include employer name, practice name, or address
{feedbackSection}
## Output format
POST your proposal as JSON to http://127.0.0.1:19600/propose:
```json
{
"page": "{pagePath}",
"summary": "Brief evidence summary of what was found and what needs changing",
"changes": [
{
"section": "Section heading where change applies",
"before": "Exact text to replace (or empty string for additions)",
"after": "New text to use",
"reason": "Why this change is needed, with evidence"
}
],
"references": [
{
"author": "Author names",
"title": "Article title",
"journal": "Journal name",
"year": 2024,
"doi": "https://doi.org/..."
}
]
}
Keep changes surgical and focused. Do not rewrite entire sections. Only propose changes where there is clear clinical evidence for improvement.
### Feedback section (for revise iterations)
When the physician clicks "Revise" with feedback, re-run the agent with this added:
The physician reviewed your previous proposal and requested revisions:
“{feedback}”
Incorporate this feedback into your revised proposal. The physician is the clinical expert — their feedback takes priority over wiki evidence. ```
The tracker at pseo-review-tracker.md uses:
- [ ] path/to/file.md — unreviewed- [x] [H] path/to/file.md — reviewed and humanized- [ ] locations/city/ (4 pages) — expand to individual files