For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Automatically generate or refresh a weekly Sunday roundup post and companion snippet from that weekโs existing ๐ posts, then open a PR instead of writing directly to main.
Architecture: Add one narrow Python generator that owns week selection, source extraction, markdown rendering, and snippet rendering for the Sunday roundup. Keep validation and deploy behavior mostly unchanged, add focused unit tests first, and add one GitHub Actions workflow that runs the generator, commits changes on a branch, and opens or updates a PR for the generated artifacts.
Tech Stack: Python 3, unittest, GitHub Actions, Jekyll post conventions, existing repo hooks and validators
Files:
tests/test_generate_my_web_this_week.pyCreate: scripts/generate_my_web_this_week.py
Write a test that asserts a helper can resolve the target Sunday and the preceding Monday through Saturday window from an explicit Sunday date.
Use a case like:
target_sunday = date(2026, 3, 29)
window = build_roundup_window(target_sunday)
assert window.start == date(2026, 3, 23)
assert window.end == date(2026, 3, 28)
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k target_sunday
Expected: FAIL because the generator module or helper does not exist yet
Write tests that assert:
_posts/2026-03-29-my-web-this-week.mdmy-web-this-week๐ My web this week - W13scheduled front matter date becomes 2026-03-29 12:00:00 +0000
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k metadata
Expected: FAIL because the metadata helpers are not implemented yet
Files:
scripts/generate_my_web_this_week.pyTest: tests/test_generate_my_web_this_week.py
Implement focused data models for:
roundup artifact metadata
Add helpers that:
compute the Monday-through-Saturday source window
Add helpers that return:
gurupanguji.com roundup URLscheduled 12:00:00 +0000 timestamp
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k "target_sunday or metadata"
Expected: PASS
Files:
tests/test_generate_my_web_this_week.pyModify: scripts/generate_my_web_this_week.py
Write a test that creates temporary _posts/ fixtures and asserts the selector includes only files that:
have a title that starts with ๐
Write a test that creates multiple qualifying posts and asserts the selected sources are sorted by post date ascending.
Write a test that includes a normal post title without the ๐ prefix and asserts it is skipped.
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k selection
Expected: FAIL because the selection behavior is not implemented yet
Files:
scripts/generate_my_web_this_week.pyTest: tests/test_generate_my_web_this_week.py
Add narrow helpers that load a post from _posts/, parse front matter, and extract:
body
Select only posts that:
have titles beginning with ๐
Sort sources by date ascending, then by path name to avoid unstable ordering on ties.
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k selection
Expected: PASS
Files:
tests/test_generate_my_web_this_week.pyModify: scripts/generate_my_web_this_week.py
Write a test for a modern link post body like:
> A strong quote.
>
> [Source](https://example.com/story)
Reaction paragraph.
Assert the generator captures the leading blockquote and classifies the source item as quote-backed.
Write a test for a leading embed block and assert the generator extracts the visible source URL and classifies the source item as embed-led.
wp:quote skip testWrite a test for a post that begins with legacy wp:quote HTML and assert the generator skips it with a logged reason.
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k extraction
Expected: FAIL because extraction logic is not implemented yet
Files:
scripts/generate_my_web_this_week.pyTest: tests/test_generate_my_web_this_week.py
Parse only the leading markdown blockquote cluster at the top of the post body. Stop once non-blockquote content starts.
Handle a leading embed wrapper that contains a visible source URL and capture that URL for roundup rendering.
wp:quoteIf the source shape requires legacy wp:quote extraction, skip that post and record the reason in a structured warning list.
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k extraction
Expected: PASS
Files:
tests/test_generate_my_web_this_week.pyModify: scripts/generate_my_web_this_week.py
Write a test that asserts the generated markdown post contains:
layout, title, and scheduled Sunday timestampLinked artifact: linelink back to the original gurupanguji.com daily post
Write a test that asserts the snippet file contains:
source_postplatform sections in the existing snippet format
Write a test that pre-creates the Sunday post and snippet, reruns rendering, and asserts content is refreshed in place instead of failing.
Write a test that passes zero qualifying sources and asserts the generator exits non-zero or raises a dedicated error.
Run: python3 -m unittest tests/test_generate_my_web_this_week.py -k "render or update or empty"
Expected: FAIL because rendering and update behavior are not implemented yet
Files:
scripts/generate_my_web_this_week.pyTest: tests/test_generate_my_web_this_week.py
Generate content with:
Linked artifact: line for embed-led postsOriginal post: link back to the daily gurupanguji.com URL
Follow the existing _snippets/ front matter conventions and generate platform sections that point to the weekly roundup canonical URL.
Write or refresh:
_posts/YYYY-MM-DD-my-web-this-week.md_snippets/YYYY-MM-DD-my-web-this-week.mdDo not fail when they already exist for the same Sunday.
Support commands like:
python3 scripts/generate_my_web_this_week.py --date 2026-03-29 --write
Run: python3 -m unittest tests/test_generate_my_web_this_week.py
Expected: PASS
Files:
.github/workflows/generate_my_web_this_week.ymldocs/superpowers/specs/2026-03-26-my-web-this-week-design.mdModify: docs/superpowers/plans/2026-03-26-my-web-this-week-implementation-plan.md
Create a workflow that:
05:00 PT publish windowpython3 scripts/generate_my_web_this_week.py --writeopens or updates a PR instead of pushing to main
Grant only the permissions needed for:
optional auto-merge enablement if repository policy allows it
Add a workflow step that checks for required permissions or emits a direct error pointing to the repository setting that allows Actions to create pull requests.
Run:
python3 scripts/generate_my_web_this_week.py --date 2026-03-29 --write
Expected: weekly post and snippet are created or refreshed locally without syntax or import errors
Files:
scripts/validate_posts.py if neededhooks/pre-commit only if the weekly generator path exposes a gapTest: tests/test_validate_posts.py
Run:
python3 scripts/validate_posts.py --today 2026-03-26
Expected: the generated weekly post shape passes existing filename-date, scheduled timestamp, and snippet checks without special-casing
If needed, add or update tests in tests/test_validate_posts.py for the generated weekly post and snippet shape.
Run:
python3 -m unittest tests/test_generate_my_web_this_week.py tests/test_validate_posts.py
Expected: PASS
Run:
TZ=America/Los_Angeles python3 scripts/validate_posts.py --staged --today "$(date +%F)"
Expected: no validator regressions for staged weekly artifacts
Files:
docs/superpowers/specs/2026-03-26-my-web-this-week-design.mddocs/superpowers/plans/2026-03-26-my-web-this-week-implementation-plan.mdscripts/generate_my_web_this_week.pytests/test_generate_my_web_this_week.py.github/workflows/generate_my_web_this_week.ymlscripts/validate_posts.py if requiredModify: tests/test_validate_posts.py if required
Run:
python3 -m unittest tests/test_generate_my_web_this_week.py tests/test_validate_posts.py tests/test_publish_social.py
python3 scripts/generate_my_web_this_week.py --date 2026-03-29 --write
python3 scripts/validate_posts.py --today 2026-03-26
git diff --stat
Expected:
diff contains only the intended workflow, generator, tests, generated weekly artifacts, and docs
git add docs/superpowers/specs/2026-03-26-my-web-this-week-design.md docs/superpowers/plans/2026-03-26-my-web-this-week-implementation-plan.md scripts/generate_my_web_this_week.py tests/test_generate_my_web_this_week.py .github/workflows/generate_my_web_this_week.yml scripts/validate_posts.py tests/test_validate_posts.py _posts/2026-03-29-my-web-this-week.md _snippets/2026-03-29-my-web-this-week.md
git commit -m "feat: add weekly my web this week generator"