diff --git a/.changeset/fresh-stones-smile.md b/.changeset/fresh-stones-smile.md new file mode 100644 index 0000000..603ea24 --- /dev/null +++ b/.changeset/fresh-stones-smile.md @@ -0,0 +1,5 @@ +--- +"create-browser-app": patch +--- + +Ship Stagehand agent instructions in generated projects. diff --git a/template/AGENTS.md b/template/AGENTS.md new file mode 100644 index 0000000..11a7be6 --- /dev/null +++ b/template/AGENTS.md @@ -0,0 +1,20 @@ +# Stagehand Project + + + +Before any Stagehand work, find and read the relevant doc in `node_modules/@browserbasehq/stagehand/dist/docs/`. The installed package docs are the source of truth for this project's Stagehand version. + +Useful starting points: + +- `node_modules/@browserbasehq/stagehand/dist/docs/index.md` +- `node_modules/@browserbasehq/stagehand/dist/docs/v3/first-steps/quickstart.md` +- `node_modules/@browserbasehq/stagehand/dist/docs/v3/references/stagehand.md` + +Useful searches: + +```bash +rg "stagehand\\.act|stagehand\\.extract|stagehand\\.observe|stagehand\\.agent" node_modules/@browserbasehq/stagehand/dist/docs +rg "env:|model:|browserbaseSession" node_modules/@browserbasehq/stagehand/dist/docs +``` + + diff --git a/template/claude.md b/template/CLAUDE.md similarity index 99% rename from template/claude.md rename to template/CLAUDE.md index 58431f9..5499f4a 100644 --- a/template/claude.md +++ b/template/CLAUDE.md @@ -1,3 +1,5 @@ +@AGENTS.md + # Stagehand Project This is a project that uses Stagehand V3, a browser automation framework with AI-powered `act`, `extract`, `observe`, and `agent` methods. @@ -260,4 +262,4 @@ await page2.goto("https://example2.com"); // Pass { page } option to target a specific page await stagehand.act("click button", { page: page1 }); await stagehand.extract("get title", { page: page2 }); -``` \ No newline at end of file +```