Keeping the Bluesky drafts up to date
This explains how new blog posts and publications get turned into Bluesky post drafts in bluesky-post-drafts.md, and how you find out when there’s something new to draft.
TL;DR
- Drafts live in
dev/bluesky-post-drafts.md(a checklist; tick items off as you post them). - You’ll be notified automatically: when a new publication appears on the homepage feed, a GitHub issue titled “📝 New publications need Bluesky drafts” is opened/updated (label
bluesky-drafts). - To handle it, open a Claude Code web session on this repo and paste the prompt in § Prompt to paste. Claude appends the drafts and updates the ledger; the issue auto-closes on the next run.
How the detection works
The site rebuilds weekly (and on every push to main) via the Update Website workflow, which pulls fresh publications from each team member’s ORCID profile → PubMed and force-pushes the rendered www/ to the live branch.
After that build, the Check Bluesky Drafts workflow (.github/workflows/check-bluesky-drafts.yml) runs:
- It reads the rendered
www/index.htmlfrom thelivebranch and extracts the DOIs in the “Recent publications” feed. - It compares them against
dev/bluesky-pubs-seen.txt— a snapshot of every publication already triaged. - Any DOI not in that ledger is reported as new. If there are new ones, it opens (or updates) the tracking issue. If there are none, it closes the issue.
Note: scheduled /
workflow_runtriggers only fire from workflows on the default branch (main), so this won’t run until merged tomain. You can always run it manually from the Actions tab (“Run workflow”) once it’s onmain.
dev/check_new_publications.py does the parsing/diffing. You can run it locally against a rendered page:
python3 dev/check_new_publications.py www/index.html dev/bluesky-pubs-seen.txtPrompt to paste
When the tracking issue fires (or any time you want a refresh), start a Claude Code session on this repo and paste:
Update the Bluesky drafts. Read
dev/bluesky-post-drafts-INSTRUCTIONS.mdand follow the “Procedure for Claude” section: find publications on the homepage feed that aren’t indev/bluesky-pubs-seen.txt, draft a ≤300-char Bluesky post for each in the same style as the existing entries indev/bluesky-post-drafts.md, add their DOIs to the ledger, then commit and push.
You can also do the same for new blog posts under posts/ — just ask Claude to “also draft posts for any blog posts in posts/ that aren’t already in the drafts file.”
Procedure for Claude
When asked to update the drafts:
- Get the current feed. The live site host is usually blocked in the web sandbox, so don’t rely on fetching
https://wakeforestid.com/. Instead read the rendered homepage from thelivebranch via the GitHub tools, e.g.mcp__github__get_file_contentsforwww/index.htmlatref: refs/heads/live(it’s large — it will be saved to a file you then parse). Each publication is a<div class="publication-card">with apublication-title(h3),publication-authors(p), andpublication-meta(p, contains Journal / Publish Date / DOI / PMID). - Diff against the ledger. Read
dev/bluesky-pubs-seen.txt(bare lowercase DOIs,#comments ignored). Any feed DOI not present is “new.” Runningpython3 dev/check_new_publications.py <saved-index.html> dev/bluesky-pubs-seen.txtdoes this for you and prints the new ones. - Draft a post per new publication, matching the existing style under the
# Recent Publicationssection ofdev/bluesky-post-drafts.md:- Markdown checkbox:
- [ ] **Title** (Journal, Year · LastNames)then a blockquote>line with the post text ending inhttps://doi.org/<doi>. - ≤300 characters for the blockquote text including the DOI link. Verify with a quick script before saving.
- Name section members in the post (faculty as “Dr. Lastname”; Michael DeWitt by name). Section members are the people with ORCID IDs in
people/*.qmd. - For duplicate records of the same work (e.g. a guideline co-published across journals, an executive summary, or a publisher correction), write one consolidated post and still add all of those DOIs to the ledger.
- Markdown checkbox:
- Update the ledger. Append every new DOI you handled (drafted or deliberately skipped) to
dev/bluesky-pubs-seen.txtso it stops being reported. - Commit and push to the working branch. Do not open a PR unless asked.
Files
| File | Purpose |
|---|---|
dev/bluesky-post-drafts.md |
The drafts themselves (checklist). |
dev/bluesky-pubs-seen.txt |
Ledger of triaged publication DOIs. |
dev/check_new_publications.py |
Parses the feed and reports new DOIs. |
.github/workflows/check-bluesky-drafts.yml |
Pings you via an issue when something’s new. |