Skip to content

Commit ae7db87

Browse files
committed
Merge origin/main into resolve-path-race
Resolve import path conflict: BaseApp moved from core/app/index.js to core/app/entrypoints/index.js on main.
2 parents 4092385 + 00e95c4 commit ae7db87

File tree

447 files changed

+6740
-4647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+6740
-4647
lines changed

.agents/skills/triage/SKILL.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
name: triage
3-
description: Triage a bug report. Reproduces the bug, diagnoses the root cause, and attempts a fix. Use when asked to "triage issue #1234", "triage this bug", or similar.
3+
description: Triage a bug report. Reproduces the bug, diagnoses the root cause, verifies whether the behavior is intentional, and attempts a fix. Use when asked to "triage issue #1234", "triage this bug", or similar.
44
---
55

66
# Triage
77

8-
Triage a bug report end-to-end: reproduce the bug, diagnose the root cause, and attempt a fix.
8+
Triage a bug report end-to-end: reproduce the bug, diagnose the root cause, verify whether the behavior is intentional, and attempt a fix.
99

1010
## Input
1111

@@ -35,7 +35,16 @@ After completing diagnosis, check your confidence:
3535
- If confidence is **low** — skip to Output.
3636
- If confidence is **medium** or **high** — continue to Step 3.
3737

38-
## Step 3: Fix
38+
## Step 3: Verify
39+
40+
Read and follow [verify.md](verify.md). Use a subagent for this step to isolate context.
41+
42+
After completing verification, check the verdict:
43+
44+
- If the verdict is **intended-behavior** — skip to Output. The issue is not a bug; do not attempt a fix.
45+
- If the verdict is **bug** or **unclear** — continue to Step 4.
46+
47+
## Step 4: Fix
3948

4049
Read and follow [fix.md](fix.md). Use a subagent for this step to isolate context.
4150

.agents/skills/triage/comment.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22

33
Generate a GitHub issue comment from triage findings.
44

5-
**CRITICAL: You MUST always produce a GitHub comment as your final output, regardless of what input files are available. Even if `report.md` is missing or empty, you must still produce a comment. In that case, produce a minimal comment stating that automated triage could not be completed.**
5+
**CRITICAL: You MUST always read `report.md` and produce a GitHub comment as your final output, regardless of what input files are available. Even if `report.md` is missing or empty, you must still produce a comment. In that case, produce a minimal comment stating that automated triage could not be completed.**
66

77
## Prerequisites
88

99
These variables are referenced throughout this skill. They may be passed as args by an orchestrator, or inferred from the conversation when run standalone.
1010

1111
- **`triageDir`** — Directory containing the reproduction project (e.g. `triage/issue-123`). If not passed as an arg, infer from previous conversation.
12-
- **`report.md`** — File in `triageDir` that MAY exist. Contains the full context from all previous skills (reproduction, diagnosis, fix).
12+
- **`issueDetails`** - The GitHub API issue details payload. This must be provided explicitly by the user or available from prior conversation context / tool calls. If this data isn't available, you may run `gh issue view ${issue_number}` to load the missing issue details directly from GitHub.
13+
- **`report.md`** — File in `triageDir` that MAY exist. Contains the full context from all previous skills (reproduction, diagnosis, fix). Contains everything that you need to know to generate your comment successfully.
1314
- **`branchName`** — The branch name where a fix was pushed. If not passed as an arg, infer from previous conversation.
15+
- **`priorityLabels`** — An array of `{ name, description }` objects representing the available priority labels for the repository. Used to select a priority in the comment.
1416

1517
## Overview
1618

@@ -27,22 +29,28 @@ If `report.md` is missing or empty, generate a minimal comment (see "Fallback" s
2729

2830
Generate and return a GitHub comment following the template below.
2931

30-
### Special Cases
32+
### "Fix" Instructions
3133

32-
- **If the user is on a different major version than the current monorepo, and the issue could not be reproduced in the current monorepo:** In the "Fix" section of your comment, the best guidance you can provide is to suggest that the user upgrade to that newer major version to fix their issue, even if that newer major version is a beta release. Link to the relevant upgrade guide:
33-
- v6: https://v6.docs.astro.build/en/guides/upgrade-to/v6/
34-
- v5: https://docs.astro.build/en/guides/upgrade-to/v5/
34+
The **Fix** line in the template has three possible forms. Choose the one that matches the triage outcome:
35+
36+
1. **You created a fix:** Use `I was able to fix this issue.` and include the suggested fix link.
37+
2. **The issue is already fixed on main** (e.g. the user is on an older major version and the bug doesn't reproduce on current main): Use `This issue has already been fixed.` and tell the user how to get the fix (e.g. upgrade). Link the relevant upgrade guide if applicable: [v6](https://v6.docs.astro.build/en/guides/upgrade-to/v6/), [v5](https://docs.astro.build/en/guides/upgrade-to/v5/).
38+
3. **You could not find or create a fix:** Use `I was unable to find a fix for this issue.` and give guidance or a best guess at where the fix might be.
39+
40+
### "Priority" Instructions
41+
42+
The **Priority** line communicates the severity of this issue to maintainers. Its goal is to answer the question: **"How bad is it?"**
43+
44+
Select exactly ONE priority label from the `priorityLabels` arg. Use the label descriptions to guide your decision, combined with the triage report's root cause and impact analysis. Render the chosen label name in square brackets, in bold, formatted with the `- ` prefix removed (Example: `**[P2: Has Workaround].**). Then, follow it with 1-2 sentences explaining **why** you chose that priority. Answer: "who is likely to be affected and under what conditions?". If you are unsure, use your best judgment based on the label descriptions and the triage findings.
3545

3646
### Template
3747

3848
```markdown
39-
**[I was able to reproduce this issue. / I was unable to reproduce this issue.]** [1-2 sentences describing the result and key observations.]
40-
41-
**Fix:** **[I was able to fix this issue. / I was unable to fix this issue]** [1-2 sentences describing the solution and key observations. Even if no fix was created, you can still use this space to give guidance or "a best guess" at where the fix might be.] [If `branchName` arg is non-null, include this link: [View Fix](https://github.com/withastro/astro/compare/{branchName}?expand=1)]
49+
**[I was able to reproduce this issue. / I was unable to reproduce this issue.]** [2-3 sentences describing the root cause, result, and key observations.]
4250

43-
**Cause:** [Single sentence explaining the root cause - or just the word "Unknown" if not determined.]
51+
**Fix:** **[See "Fix" Instructions above.]** [1-2 sentences describing the solution, where/when it was already fixed, or guidance on where a fix might be.] [If `branchName` is non-null: [View Suggested Fix](https://github.com/withastro/astro/compare/{branchName}?expand=1)]
4452

45-
**Impact:** [Single sentence describing who is affected and how - or just the word "Unknown" if not determined.]
53+
**Priority:** **[See "Priority" Instructions above.]** [1-2 sentences explaining why this priority was chosen, who is likely to be affected, and under what conditions (this section should answer the question: "how bad is it?")]
4654

4755
<details>
4856
<summary><em>Full Triage Report</em></summary>
@@ -54,11 +62,14 @@ Generate and return a GitHub comment following the template below.
5462
_This report was made by an LLM. Mistakes happen, check important info._
5563
```
5664

57-
## Optional Follow-up Task
65+
## Result
66+
67+
You MUST RETURN the generated comment text so that the user can review and post it themselves.
5868

59-
You MAY SUGGEST to the user, as a potential follow-up step, to post the issue to GitHub directly. However you CANNOT DO THIS STEP unless the user explicitly asks.
69+
You MAY SUGGEST to the user that you (or they) could post the comment to the GitHub issue. **Do not post the comment yourself** — this should only be a suggestion. It would be a horrifying abuse of trust to the user if you posted to GitHub on their behalf without their explicit permission.
6070

6171
```bash
72+
# Example Only:
6273
gh issue comment <issue_number> --body <comment>
6374
gh issue comment <issue_number> --body-file <path-to-file>
6475
```

.agents/skills/triage/diagnose.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
Find the root cause of a reproduced bug in the Astro source code.
44

5-
**CRITICAL: You MUST always append to `report.md` before finishing, regardless of outcome. Even if you cannot identify the root cause, hit errors, or the investigation is inconclusive — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**
5+
**CRITICAL: You MUST always read `report.md` and append to `report.md` before finishing, regardless of outcome. Even if you cannot identify the root cause, hit errors, or the investigation is inconclusive — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**
66

77
## Prerequisites
88

99
These variables are referenced throughout this skill. They may be passed as args by an orchestrator, or inferred from the conversation when run standalone.
1010

1111
- **`triageDir`** — Directory containing the reproduction project (e.g. `triage/issue-123`). If not passed as an arg, infer from previous conversation.
12+
- **`issueDetails`** - The GitHub API issue details payload. This must be provided explicitly by the user or available from prior conversation context / tool calls. If this data isn't available, you may run `gh issue view ${issue_number}` to load the missing issue details directly from GitHub.
1213
- **`report.md`** — File in `triageDir` that MAY exist. Contains the full context from all previous skills.
14+
- **Astro Compiler source** — The `withastro/compiler` repo MAY be cloned at `.compiler/` (inside the repo root, gitignored). If it exists, treat it as in-scope for diagnosis. Some bugs originate in the compiler rather than in `packages/` — if stack traces or investigation point to compiler behavior (e.g. HTML parsing, `.astro` file transformation), check `.compiler/` for relevant source code.
1315

1416
## Overview
1517

@@ -21,11 +23,7 @@ These variables are referenced throughout this skill. They may be passed as args
2123

2224
## Step 1: Review the Reproduction
2325

24-
Read `report.md` from the `triageDir` directory to understand:
25-
26-
- The exact error message and stack trace
27-
- Which command triggers the issue (build/dev/preview)
28-
- What user code is involved
26+
Start by reading `report.md` from the `triageDir` directory.
2927

3028
**Skip if not reproduced:** If `report.md` shows the bug was NOT reproduced or was skipped (look for "could not reproduce", "SKIP REASON", "skipped: true"), append "DIAGNOSIS SKIPPED: No reproduction" to `report.md` and return `confidence: null`.
3129

.agents/skills/triage/fix.md

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,28 @@
22

33
Develop and verify a fix for a diagnosed Astro bug.
44

5-
**CRITICAL: You MUST always append to `report.md` before finishing, regardless of outcome. Even if the fix attempt fails, you encounter errors, or you cannot resolve the bug — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**
5+
**CRITICAL: You MUST always read `report.md` and append to `report.md` before finishing, regardless of outcome. Even if the fix attempt fails, you encounter errors, or you cannot resolve the bug — always update `report.md` with your findings. The orchestrator and downstream skills depend on this file to determine what happened.**
66

77
## Prerequisites
88

99
These variables are referenced throughout this skill. They may be passed as args by an orchestrator, or inferred from the conversation when run standalone.
1010

1111
- **`triageDir`** — Directory containing the reproduction project (e.g. `triage/issue-123`). If not passed as an arg, infer from previous conversation.
12+
- **`issueDetails`** - The GitHub API issue details payload. This must be provided explicitly by the user or available from prior conversation context / tool calls. If this data isn't available, you may run `gh issue view ${issue_number}` to load the missing issue details directly from GitHub.
1213
- **`report.md`** — File in `triageDir` that MAY exist. Contains the full context from all previous skills.
14+
- **Astro Compiler source** — The `withastro/compiler` repo MAY be cloned at `.compiler/` (inside the repo root, gitignored). If it exists and the root cause is in the compiler, investigate and propose fixes there. This clone is **reference only** — it is not wired into the monorepo's dependencies, so compiler changes cannot be tested end-to-end here. Document proposed compiler changes and diff in `report.md` instead.
1315

1416
## Overview
1517

1618
1. Review the diagnosis from `report.md`
17-
2. Implement a minimal fix in `packages/`
18-
3. Rebuild the affected package(s)
19-
4. Verify the fix resolves the reproduction
20-
5. Ensure no regressions
21-
6. Generate git diff
22-
7. Append fix details to `report.md`
19+
2. Verify fix feasibility (browser/runtime compatibility)
20+
3. Implement a minimal fix in `packages/`
21+
4. Rebuild the affected package(s)
22+
5. Verify the fix resolves the reproduction
23+
6. Ensure no regressions
24+
7. Generate git diff
25+
8. Append fix details to `report.md`
26+
9. Clean up the working directory
2327

2428
## Step 1: Review the Diagnosis
2529

@@ -33,7 +37,14 @@ Read `report.md` from the `triageDir` directory to understand:
3337

3438
**Note:** The repo may be messy from previous steps. Check `git status` and either work from the current state or `git reset --hard` to start clean.
3539

36-
## Step 2: Implement the Fix
40+
## Step 2: Verify Fix Feasibility
41+
42+
Consider your potential fixes and verify that any modern features you plan to use are supported:
43+
44+
- **Node.js:** When writing code for the runtime (server, build logic, integrations, etc.), target Node.js version `>=22.12.0`.
45+
- **Browsers:** If your fix relies on browser support for any web platform feature, check the browser compatibility table on MDN to confirm it is supported across our browser targets. Do not treat specification compliance as proof of browser support. If the feature lacks sufficient support, choose a different approach.
46+
47+
## Step 3: Implement the Fix
3748

3849
Make changes in `packages/` source files. Follow these principles:
3950

@@ -69,7 +80,7 @@ export function renderComponent(component: AstroComponent, props: Props) {
6980
}
7081
```
7182

72-
## Step 3: Rebuild the Package
83+
## Step 4: Rebuild the Package
7384

7485
After making changes, rebuild the affected package:
7586

@@ -79,15 +90,15 @@ pnpm -C packages/astro build # or packages/integrations/<name>
7990

8091
Watch for build errors — fix any TypeScript issues before proceeding.
8192

82-
## Step 4: Verify the Fix
93+
## Step 5: Verify the Fix
8394

8495
Re-run the reproduction, often using `pnpm run build`/`astro build` or `pnpm run dev`/`astro dev`.
8596

86-
## Step 5: Check for Regressions
97+
## Step 6: Check for Regressions
8798

8899
Test that you didn't break anything new, and that normal cases still work. If you find regressions, refine the fix to handle all cases.
89100

90-
## Step 6: Generate Git Diff
101+
## Step 7: Generate Git Diff
91102

92103
From the repository root, generate the diff:
93104

@@ -97,7 +108,7 @@ git diff packages/
97108

98109
This captures all your changes for the report.
99110

100-
## Step 7: Write Output
111+
## Step 8: Write Output
101112

102113
Append your fix details to the existing `report.md` (written by reproduce and diagnose skills).
103114

@@ -112,7 +123,7 @@ The report must include all information needed for a final GitHub comment to be
112123
- Any alternative approaches considered and their tradeoffs
113124
- If the fix failed: what was tried and why it didn't work
114125

115-
## Step 8: Clean Up the Working Directory
126+
## Step 9: Clean Up the Working Directory
116127

117128
1. Run `git status` and review all changed files
118129
2. Revert any changes that are NOT part of the fix:

0 commit comments

Comments
 (0)