mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
### What? Migrates the `.claude/commands/pr-status.md` slash command into the `.agents/skills/pr-status-triage/` skill, restructuring the files so that `SKILL.md` has a single unified workflow and supporting details live in the appropriate reference files. Deletes the original command file. ### Why? The pr-status automated workflow existed in two places: a basic 6-step outline in `SKILL.md` and a detailed 10-step procedure in `.claude/commands/pr-status.md`. This duplication meant the skill was incomplete without the command file, and the command file couldn't benefit from the skill's supporting reference files (`workflow.md`, `local-repro.md`). ### How? **`SKILL.md`** — Replaced the old 6-step overview with a unified 7-step workflow covering: background `--wait` script launch, failure/review analysis, blocker-first prioritization, flaky test checking, local reproduction, resolving review threads, and retriggering CI when only flaky tests remain. Step 7 now includes a retry loop: after retriggering, wait 5 minutes and re-triage from step 1, up to 5 times. **`workflow.md`** — Extended with content from the command file: subagent prompt templates (CI failures + review comments), summary table format examples, failure category taxonomy (8 categories), and review comment category taxonomy (7 types). Existing sections (prioritization order, failure handling rules, common patterns, resolving review threads) preserved. **`local-repro.md`** — Expanded the "Match CI Environment Variables" section with feature flag details (`__NEXT_USE_NODE_STREAMS`, `__NEXT_CACHE_COMPONENTS`), the `NEXT_SKIP_ISOLATE` warning for module resolution fixes, and a concrete example command. **`AGENTS.md`** — Updated the stale `/pr-status` command reference to point to the `$pr-status-triage` skill. **`.claude/commands/pr-status.md`** — Deleted (all content migrated). ### Files changed | File | Action | |------|--------| | `.agents/skills/pr-status-triage/SKILL.md` | Rewritten with unified workflow (includes retry loop for flaky CI) | | `.agents/skills/pr-status-triage/workflow.md` | Extended with templates, tables, categories | | `.agents/skills/pr-status-triage/local-repro.md` | Expanded env var section | | `AGENTS.md` | Updated skill reference (1 line) | | `.claude/commands/pr-status.md` | Deleted | --------- Co-authored-by: Tobias Koppers <[email protected]> Co-authored-by: Claude <[email protected]>
1.2 KiB
1.2 KiB
Local Reproduction Guide
Match CI Job Mode
- Dev-mode failures: use
pnpm test-dev-turboorpnpm test-dev-webpackbased on job mode. - Start-mode failures: use
pnpm test-start-turboorpnpm test-start-webpack.
Match CI Environment Variables
Read the "Job Environment Variables" section in index.md and mirror them locally. Key variables:
IS_WEBPACK_TEST=1— forces webpack mode (turbopack is default locally).NEXT_SKIP_ISOLATE=1— skips package isolation; never use when verifying module resolution or build-time compilation fixes.- Feature flags like
__NEXT_USE_NODE_STREAMS=true,__NEXT_CACHE_COMPONENTS=truechange DefinePlugin replacements.
Example: a failure in "test node streams prod" needs:
IS_WEBPACK_TEST=1 __NEXT_USE_NODE_STREAMS=true __NEXT_CACHE_COMPONENTS=true NEXT_TEST_MODE=start
Isolation Rule
When validating module-resolution, entrypoint-export, or internal require-path fixes, rerun without NEXT_SKIP_ISOLATE=1.
One-Run Log Analysis
Capture once, analyze multiple times:
HEADLESS=true pnpm test-dev-turbo test/path/to/test.ts > /tmp/test-output.log 2>&1
grep "●" /tmp/test-output.log
grep -A5 "Error:" /tmp/test-output.log
tail -5 /tmp/test-output.log