Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .agents/skills/triage/reproduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Skip if a repository maintainer has commented that this issue should not be repr

Every bug report should include some sort of reproduction. The reproduction project goes in the `triageDir` directory (e.g. `triage/gh-123`). If no `triageDir` is provided, default to `triage/gh-<issue_number>`.

Set up the reproduction project based on what the issue provides you. Once the reproduction project directory has been completed, run `pnpm install` in the workspace to connect it to the rest of the monorepo.
Set up the reproduction project based on what the issue provides you. Once the reproduction project directory has been completed, run `pnpm install` in the workspace top-level root to connect it to the rest of the monorepo.

### StackBlitz Project URL (`https://stackblitz.com/edit/...`)

Expand Down Expand Up @@ -110,22 +110,29 @@ You may still need to set up a project from scratch (see fallback below) and app

### Manual Steps Reproduction

If no reproduction URL is provided, you will need to follow the manual steps that the user provided instead.

Scaffold a fresh Astro project into the triage directory using `create-astro`. Use `--no-install` to skip dependency installation (we will run `pnpm install` later) and `--no-git` to avoid creating a nested git repo. Use `--template` to pick a starting template — if the user didn't mention a specific one, use `minimal` as the default.
If no reproduction URL is provided, you will need to follow the manual steps that the user provided instead. If the user didn't mention a specific template, use `minimal` as the default.

```bash
npx create-astro@latest <triageDir> --template minimal --no-install --no-git -y
# 1. List available example templates
ls examples/
# 2. Remove the selected template's node_modules directory to avoid problems with `cp -r`
rm -rf examples/<template>/node_modules
# 3. Copy over the selected template into the triage directory
cp -r examples/<template> <triageDir>
# 4. Re-run install (at the workspace root) to add back missing node_modules dependencies
pnpm install
```

Then, modify the triage project as needed:
Verify that the project was created in the correct place (`cat <triageDir>/package.json`).

Then, modify the triage project as needed to attempt your reproduction:

1. Update `astro.config.mjs` with required configuration
2. Add any required dependencies or Astro integrations (`@astrojs/react`, etc.)
3. Create pages, components, or middleware that trigger the bug
1. Update `astro.config.mjs` with required configuration changes
2. Add/modify any dependencies or Astro integrations (`@astrojs/react`, etc.)
3. Add/modify any pages, components, middleware, etc. that trigger the bug
4. Add/modify any additional files mentioned in the issue

Keep the reproduction as minimal as possible — only add what's needed to trigger the bug.
Keep the reproduction as minimal as possible — only add what the issue reporter has documented as needed to trigger the bug.

## Step 4: Attempt Reproduction in the Triage Project

Expand Down
20 changes: 13 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@ Note: Edits to source files take effect after rebuilding the package via `pnpm b

# Running Tests

- Run `pnpm test` in the workspace root to run the full suite (slow).
- Run `pnpm -C <package-directory> test` to run a package’s tests (example: `pnpm -C packages/astro test`, `pnpm -C packages/integrations/react test`).
- Run an individual test file with `node path/to/test.js` (non-E2E).
- For focused Astro package runs: `pnpm -C packages/astro test:unit`, `pnpm -C packages/astro test:integration`, `pnpm -C packages/astro test:cli`, `pnpm -C packages/astro test:types`.
- For matching a subset by test name in Astro: `pnpm -C packages/astro test:match -- "<pattern>"`.
- For E2E: `pnpm test:e2e` or `pnpm test:e2e:match -- "<pattern>"`.
- Run `pnpm test` in workspace root or package directory to run full test suite (can be slow!)
- Integration tests live in special `packages/integrations` folders.
- Example: `pnpm -C <package-directory> exec astro-scripts test` - Run a single package test suite
- Example: `pnpm -C <package-directory> exec astro-scripts test "test/actions.test.js"` - Run a single test file
- Example: `pnpm -C <package-directory> exec astro-scripts test "test/**/*.test.js" --match "CSS"` - Run specific tests matching a string or regex patterns
- Example: `pnpm -C <package-directory> exec astro-scripts test "test/{actions,css,middleware}.test.js"` - Run multiple test files
- Key flags:
- `--match` / `-m`: Filter tests by name pattern (regex)
- `--only` / `-o`: Run only tests marked with `.only`
- `--parallel` / `-p`: Run tests in parallel (default is sequential)
- `--timeout` / `-t`: Set timeout in milliseconds
- `--watch` / `-w`: Watch mode

# Astro Quick Reference

Expand All @@ -43,7 +49,7 @@ Note: Edits to source files take effect after rebuilding the package via `pnpm b

- Use `astro dev` and `astro preview` in the background to prevent hanging your entire session, and use `&` to run them in the background. Use `--port RANDOM_NUMBER --strictPort` to avoid port conflicts. Cleanup old servers when you're done.
- Use `astro dev` and `astro preview` as web servers for Astro project. They are reliable. Don't use other web servers for testing.
- Use `pnpm -C <dir> <command>` for project-local commands when working in packages/examples/triage directories. Only omit `-C` flag when intentionally working in the monorepo root. (Example: `pnpm -C packages/astro build`, `pnpm -C examples/blog dev`)
- Use `pnpm -C <dir> <command>` for project-local script commands when working in packages/examples/triage directories. Only omit `-C` flag when intentionally working in the monorepo root. (Example: `pnpm -C packages/astro build`, `pnpm -C examples/blog dev`)
- Use `agent-browser` for web automation or when UI interaction, long-running browsers, or HMR testing is required. Use `agent-browser --help` for all commands. Use this core workflow:
- Example: `agent-browser open <url>` - Navigate to page
- Example: `agent-browser snapshot -i` - Get interactive elements with refs (@e1, @e2)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@biomejs/biome": "2.3.6",
"@changesets/changelog-github": "^0.5.2",
"@changesets/cli": "^2.29.8",
"@flue/cli": "^0.0.30",
"@flue/cli": "^0.0.31",
"@flue/client": "^0.0.17",
"@types/node": "^18.19.115",
"esbuild": "0.25.5",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading