Skip to content

feat: stagecraft skills package and pw-cli --replay with template variables#842

Merged
stevez merged 1 commit into
mainfrom
feat/stagecraft-skills-replay
Apr 26, 2026
Merged

feat: stagecraft skills package and pw-cli --replay with template variables#842
stevez merged 1 commit into
mainfrom
feat/stagecraft-skills-replay

Conversation

@stevez

@stevez stevez commented Apr 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • New packages/stagecraft package — skill library for agent-driven browser automation
  • Skills are .pw files with {{variable}} placeholders, substituted at replay time
  • pw-cli --replay <file> --variable key=value sends commands via HTTP to running server
  • REPL .replay also supports --variable key=value args
  • First skill: Rogers bill download (skills/rogers/download-bill.pw)

Example

pw-cli --replay skills/rogers/download-bill.pw --variable billing_period="February 24, 2026"

✓ goto https://www.rogers.com/consumer/self-serve/overview
✓ click "View your bill" --exact
✓ click "Save PDF"
✓ check "February 24, 2026"
✓ click "Download bills"

Test plan

  • SessionPlayer.load() substitutes {{variables}} correctly
  • Missing variables throw clear error
  • pw-cli --replay sends commands via HTTP and prints ✓/✗ status
  • End-to-end test: Rogers bill download with --variable billing_period="February 24, 2026"

🤖 Generated with Claude Code

…iables

Adds the stagecraft package as the skill library for agent-driven browser
automation. Skills are .pw files with {{variable}} placeholders, substituted
at replay time via --variable key=value.

Changes:
- packages/stagecraft: new package with skills directory structure
- packages/stagecraft/skills/rogers/: Rogers bill download skill (.pw + .js + SKILL.md)
- SessionPlayer.load(): supports {{key}} template variable substitution
- pw-cli --replay: sends .pw file commands via HTTP to running server
- REPL .replay: supports --variable key=value args
- Unresolved {{variables}} throw clear error with usage hint

Usage:
  pw-cli --replay skills/rogers/download-bill.pw --variable billing_period="February 24, 2026"

Closes #829

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@stevez
stevez merged commit a5ef3a1 into main Apr 26, 2026
8 checks passed
@stevez
stevez deleted the feat/stagecraft-skills-replay branch April 26, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant