labali-spotify-publish-episode
This skill follows a three-layer architecture (Policy / Strategy / Execution).
See references/architecture.md for layer boundaries and development constraints.
MANDATORY: Before executing any UI interaction or workflow stage, load references/plan.md completely.
Required Constraints
- Browser automation only; no Spotify APIs
- Prefer semantic interactions (role + accessible name > visible text > label/placeholder)
- Manual login; session reuse supported
- Validate success by business state, not action success
- Before advancing any wizard step, ask: what observable state proves this stage completed — not what action should have caused it
- For future
publish_at: verify in Scheduled list; otherwise Published list
- Never publish while media processing (wait for readiness indicator)
- For scheduled: ensure target date/time fully configured before confirming
- Before initiating publish: verify all required fields are filled and no validation errors are visible
NEVER
- Never confirm a scheduled publish without verifying the target date and time are fully configured — Spotify's scheduling UI allows clicking Schedule with a malformed or default date, silently publishing at the wrong time.
- Never report success until the episode appears in the Published or Scheduled list — Spotify renders a success confirmation before list state actually updates; click success is not list presence, and presence in Draft means the publish failed.
- Never return success before business-state verification passes — the publish action completing and the episode being live are two separate events.
- Never use static coordinates, positional indexes, or DOM structure assumptions for interaction — Spotify's UI layout shifts between sessions, viewports, and A/B variants.
- Never report a stage as complete based on click success alone — always validate by observable state change — buttons return success even when the underlying action is queued or rate-limited.
Success Criteria
A run succeeds only when all conditions hold:
- Episode appears in appropriate list:
- Scheduled: when
publish_at is future
- Published: when immediate
- Same episode does not appear in Draft
Runtime Inputs
See skill.yaml for complete schema.
Required: audio_file, title, description, and one of (show_id | show_home_url | show_name)
Optional: season_number, episode_number, cover_image, publish_at, confirm_publish, disable_deterministic_cache, profile_dir, cdp_port, proxy_mode, proxy_server, headed
Operational Mode
| Mode |
Behavior |
| Default (unified) |
Deterministic cache → policy executor fallback |
| Policy-only |
Set disable_deterministic_cache=true |
Startup check (MANDATORY before every run):
If .cache/spotify-publish/pending-regen.json exists:
- Read it (contains
trajectory_path and deterministic_path)
- Read
trajectory_path (the successful policy trajectory)
- Rewrite
deterministic_path using the trajectory patterns — role+name only, no hardcoded ref keys
- Delete
pending-regen.json
- Proceed with the normal publish workflow (deterministic will now work)
Failure Handling:
- Deterministic failure → continue with policy, write pending-regen.json marker
- Policy failure → re-snapshot page state → re-detect current stage → retry from last known good stage; max 3 attempts before reporting failure with: current stage name, last observable state, and the action that failed
If policy executor stage decisions are unclear, load references/architecture.md before proceeding.
Resources
Reference Loading
| Scenario |
Must load |
Do NOT load |
| Policy executor stage unclear |
references/architecture.md |
references/plan.md |
| UI interaction / workflow steps |
references/plan.md |
references/architecture.md |
| UI change or selector update |
references/plan.md |
— |
| Script development / layer boundaries |
references/architecture.md |
references/plan.md |
Scripts
| File |
Purpose |
scripts/auto-executor.ts |
Unified entry point |
For the full script inventory, see references/architecture.md → Script Roles.
1---2name: labali-spotify-publish-episode3description: Publish podcast episodes on Spotify for Creators using browser-only semantic automation with manual-login session reuse. Use when asked to publish, upload, release, or schedule a podcast episode on Spotify for Creators (creators.spotify.com). Trigger phrases: "publish episode", "upload podcast", "release episode", "schedule podcast", "spotify creator".4license: MIT5---67# labali-spotify-publish-episode89This skill follows a three-layer architecture (Policy / Strategy / Execution).10See `references/architecture.md` for layer boundaries and development constraints.1112> **MANDATORY:** Before executing any UI interaction or workflow stage, load `references/plan.md` completely.1314---1516## Required Constraints1718- Browser automation only; no Spotify APIs19- Prefer semantic interactions (role + accessible name > visible text > label/placeholder)20- Manual login; session reuse supported21- Validate success by business state, not action success22- Before advancing any wizard step, ask: what observable state proves this stage completed — not what action should have caused it23- For future `publish_at`: verify in Scheduled list; otherwise Published list24- Never publish while media processing (wait for readiness indicator)25- For scheduled: ensure target date/time fully configured before confirming26- Before initiating publish: verify all required fields are filled and no validation errors are visible2728---2930## NEVER3132- Never confirm a scheduled publish without verifying the target date and time are fully configured — Spotify's scheduling UI allows clicking Schedule with a malformed or default date, silently publishing at the wrong time.33- Never report success until the episode appears in the Published or Scheduled list — Spotify renders a success confirmation before list state actually updates; click success is not list presence, and presence in Draft means the publish failed.34- Never return success before business-state verification passes — the publish action completing and the episode being live are two separate events.35- Never use static coordinates, positional indexes, or DOM structure assumptions for interaction — Spotify's UI layout shifts between sessions, viewports, and A/B variants.36- Never report a stage as complete based on click success alone — always validate by observable state change — buttons return success even when the underlying action is queued or rate-limited.3738---3940## Success Criteria4142A run succeeds **only** when all conditions hold:43441. Episode appears in appropriate list:45 - **Scheduled**: when `publish_at` is future46 - **Published**: when immediate472. Same episode does **not** appear in **Draft**4849---5051## Runtime Inputs5253See `skill.yaml` for complete schema.5455**Required:** `audio_file`, `title`, `description`, and one of (`show_id` | `show_home_url` | `show_name`)5657**Optional:** `season_number`, `episode_number`, `cover_image`, `publish_at`, `confirm_publish`, `disable_deterministic_cache`, `profile_dir`, `cdp_port`, `proxy_mode`, `proxy_server`, `headed`5859---6061## Operational Mode6263| Mode | Behavior |64|------|----------|65| **Default (unified)** | Deterministic cache → policy executor fallback |66| **Policy-only** | Set `disable_deterministic_cache=true` |6768**Startup check (MANDATORY before every run):**69If `.cache/spotify-publish/pending-regen.json` exists:701. Read it (contains `trajectory_path` and `deterministic_path`)712. Read `trajectory_path` (the successful policy trajectory)723. Rewrite `deterministic_path` using the trajectory patterns — role+name only, no hardcoded ref keys734. Delete `pending-regen.json`745. Proceed with the normal publish workflow (deterministic will now work)7576**Failure Handling:**77- Deterministic failure → continue with policy, write pending-regen.json marker78- Policy failure → re-snapshot page state → re-detect current stage → retry from last known good stage; max 3 attempts before reporting failure with: current stage name, last observable state, and the action that failed7980> If policy executor stage decisions are unclear, load `references/architecture.md` before proceeding.8182---8384## Resources8586### Reference Loading8788| Scenario | Must load | Do NOT load |89|----------|-----------|-------------|90| Policy executor stage unclear | `references/architecture.md` | `references/plan.md` |91| UI interaction / workflow steps | `references/plan.md` | `references/architecture.md` |92| UI change or selector update | `references/plan.md` | — |93| Script development / layer boundaries | `references/architecture.md` | `references/plan.md` |9495### Scripts9697| File | Purpose |98|------|---------|99| `scripts/auto-executor.ts` | Unified entry point |100101For the full script inventory, see `references/architecture.md` → Script Roles.