Scaffold Adapter
Creates a new adapter package for a website.
Steps
- •
Ask for adapter details:
- •Adapter name (kebab-case, e.g., "example-site")
- •Base URL (e.g., "https://example.com")
- •Brief description
- •
Create directory structure:
bashmkdir -p packages/adapters/{NAME}/src - •
Generate package.json (copy from spare-room, update name)
- •
Generate tsconfig.json (copy from spare-room)
- •
Generate src/selectors.ts with TODO comments:
typescriptexport const SELECTORS = { // TODO: Update with actual selectors } as const; - •
Generate src/flows.ts with navigation stubs
- •
Generate src/index.ts implementing SiteAdapter interface
- •
Generate README.md with:
- •Implementation checklist
- •Selector update guide
- •Testing instructions
- •
Run
pnpm installin adapter directory - •
Add adapter to CLI (apps/cli/src/commands/run.ts and send.ts)
- •
Commit with message: "feat(adapters): scaffold {NAME} adapter"