@gurupanguji

Scheduled Post Deploy And Social Gating Implementation Plan

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: Ensure scheduled posts are rebuilt after their publish timestamp, and block social posting until the canonical post URL is confirmed live.

Architecture: Add a dedicated rebuild workflow for scheduled posts, add live-URL verification and retries to the social publisher, and enforce a single scheduled publish timestamp in repository validation. Normalize future post dates to match that policy.

Tech Stack: GitHub Actions, Jekyll, Python 3, Requests, repo-managed markdown content


Task 1: Add The Scheduled Rebuild Workflow

Files:

Add a daily schedule trigger at 10 12 * * * plus workflow_dispatch.

Set up Ruby, cache Bundler if useful, install gems, and run bundle exec jekyll build.

Update a small rebuild marker file only inside the workflow, commit it only when changed, and push to main.

Run: sed -n '1,240p' .github/workflows/rebuild_scheduled_posts.yml Expected: schedule, build, and guarded commit steps are present

Task 2: Gate Social Publishing On Live URLs

Files:

Add retry configuration flags and a default-on live URL verification path.

Use requests to fetch the URL, require 200, and verify title or og:title.

Retry verification on a bounded interval before any publishing function runs.

Pass retry defaults from publish_social.yml and keep the script in a safe mode that never publishes when verification fails.

Run: python3 scripts/publish_social.py --date 2026-03-22 --dry-run Expected: snippet loads and preflight path is visible in output

Task 3: Enforce Scheduled Publish Timing

Files:

Encode 2026-03-23 as the enforcement start date and 12:00:00 +0000 as the required timestamp.

Fail when a post on or after the enforcement date has a different raw front matter timestamp.

Preserve filename-date matching and future snippet checks.

Run: python3 scripts/validate_posts.py --today 2026-03-22 Expected: validation succeeds after timestamp normalization

Task 4: Normalize Future Scheduled Posts

Files:

Set front matter date to YYYY-MM-DD 12:00:00 +0000.

Run: rg -n '^date:' _posts/2026-03-2*.md _posts/2026-03-3*.md Expected: all future posts from March 23 onward use 12:00:00 +0000

Task 5: Verify End To End

Files:

Run: python3 scripts/validate_posts.py --today 2026-03-22 Expected: Validated ... post(s) successfully.

Run: python3 scripts/publish_social.py --date 2026-03-22 --dry-run Expected: no external post is made; the command exits only after the live URL preflight path succeeds or reports the exact failure

Run: git diff --stat Expected: workflow, script, docs, and scheduled post timestamps only

git add .github/workflows/rebuild_scheduled_posts.yml .github/workflows/publish_social.yml scripts/publish_social.py scripts/validate_posts.py docs/superpowers/specs/2026-03-22-scheduled-post-deploy-and-social-gating-design.md docs/superpowers/plans/2026-03-22-scheduled-post-deploy-and-social-gating-implementation-plan.md _posts/2026-03-2*.md _posts/2026-03-3*.md
git commit -m "feat: coordinate scheduled post deploy and social gating"