Skip to content

chore: add .github/copilot-instructions.md for Copilot cloud agent onboarding#8543

Open
Copilot wants to merge 1 commit intomainfrom
copilot/add-copilot-instructions
Open

chore: add .github/copilot-instructions.md for Copilot cloud agent onboarding#8543
Copilot wants to merge 1 commit intomainfrom
copilot/add-copilot-instructions

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 9, 2026

Adds .github/copilot-instructions.md to give Copilot cloud agents the context needed to work efficiently in this monorepo from the first session.

Contents

  • Repo overview — resumability model, QRLs, $-suffix transform, signals, Rust optimizer
  • Monorepo layout — all packages mapped to paths and descriptions
  • Setup & commands — Node/pnpm version requirements, full command reference with pnpm build flag breakdown
  • Architecture — container/serialization, QRL lazy-loading, signal reactivity, Qwik City routing
  • Code style & naming — Prettier config, use*/*$/create* conventions, test file patterns
  • Testing — Vitest (unit), Playwright (E2E), Rust snapshots; how to run single files
  • Git/PR workflow — commit convention, changeset requirements, pre-push checklist
  • Anti-patterns — critical things to avoid (running full test suite, skipping api.update, editing generated files, console.log, etc.)
  • Known issues & workaroundsapi.update diffs after build.local, CI's auto-merge-with-main behavior, pnpm enforcement, Node version pinning

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

⚠️ No Changeset found

Latest commit: f456621

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wmertens wmertens marked this pull request as ready for review April 9, 2026 11:12
@wmertens wmertens requested a review from a team as a code owner April 9, 2026 11:12
Copilot AI review requested due to automatic review settings April 9, 2026 11:12
@wmertens
Copy link
Copy Markdown
Member

wmertens commented Apr 9, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new .github/copilot-instructions.md document to onboard Copilot cloud agents with Qwik monorepo context, setup commands, architecture basics, and contribution workflow so agents can operate effectively in first session.

Changes:

  • Introduces a Copilot cloud agent instructions file covering repo concepts (resumability/QRLs/signals/optimizer) and monorepo layout.
  • Documents common dev commands (build/test/lint/api update/changesets) and key workflow/anti-pattern guidance.
  • Captures known issues/workarounds to reduce iteration friction (API diffs, CI merge behavior, tooling enforcement).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +18 to +22
| Package | Path | Description |
| --------------------------- | ------------------------------- | ---------------------------------------- |
| `@builder.io/qwik` | `packages/qwik` | Core framework (runtime + optimizer) |
| `@builder.io/qwik-city` | `packages/qwik-city` | Meta-framework (routing, loaders, adapters) |
| `@builder.io/qwik-react` | `packages/qwik-react` | React integration layer |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown tables are written with a double leading pipe (|| ...), which renders as an extra empty first column in most renderers. Use a single leading | for the header/separator/rows (and apply consistently to the rest of the table) so the package table renders correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +61
| Task | Command | Notes |
|------|---------|-------|
| Install deps | `pnpm install` | |
| Build (no Rust) | `pnpm build.local` | Full build for a fresh start |
| Build (with Rust) | `pnpm build.full` | Only needed after Rust changes |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commands table also uses a double leading pipe (|| ...), which creates an unintended empty first column when rendered. Switch to a single leading | for the header/separator/rows to ensure the table displays correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +141 to +146
| Rule | Setting |
|------|---------|
| Semicolons | `true` |
| Quotes | Single |
| Print width | 100 |
| Indentation | 2 spaces |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code style table is using || at the start of each row, which will render an empty first column. Use a single leading | so the table formatting is correct.

Copilot uses AI. Check for mistakes.
Comment on lines +153 to +158
| Pattern | Usage | Example |
|---------|-------|---------|
| `use*` | Hooks (called in component or task scope) | `useSignal`, `useStore`, `useTask$` |
| `*$` | QRL boundary — optimizer extracts the closure | `component$`, `routeLoader$` |
| `create*` | Factory functions | `createDOM`, `createContextId` |
| `*.unit.ts(x)` | Unit test files | `qrl.unit.ts` |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming conventions table also starts rows with ||, which renders an extra blank column. Update it to standard markdown table syntax (single leading |) so it displays as intended.

Copilot uses AI. Check for mistakes.
| Install deps | `pnpm install` | |
| Build (no Rust) | `pnpm build.local` | Full build for a fresh start |
| Build (with Rust) | `pnpm build.full` | Only needed after Rust changes |
| Build core only | `pnpm build.core` | Fast — Qwik + Qwik City + types |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Build core only” description doesn’t match what pnpm build.core actually runs. In package.json, build.core includes --api and --platform-binding in addition to --tsc --build --qwikcity, so it’s not just “Qwik + Qwik City + types” and may not be the fastest option. Please update the description (or adjust the recommended command) to match the script behavior.

Suggested change
| Build core only | `pnpm build.core` | Fast — Qwik + Qwik City + types |
| Build core packages | `pnpm build.core` | Builds Qwik + Qwik City + types, API docs, and platform bindings |

Copilot uses AI. Check for mistakes.
| Build (no Rust) | `pnpm build.local` | Full build for a fresh start |
| Build (with Rust) | `pnpm build.full` | Only needed after Rust changes |
| Build core only | `pnpm build.core` | Fast — Qwik + Qwik City + types |
| Build specific packages | `pnpm build --qwik --qwikcity --dev` | Skips type-check & generating |
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table recommends pnpm build --qwik --qwikcity --dev, but the flags reference below describes the core build flag as --build (which is the user-facing alias for the internal --qwik flag). For consistency and clarity, prefer documenting --build here as well, so readers don’t have to learn both names for the same flag.

Suggested change
| Build specific packages | `pnpm build --qwik --qwikcity --dev` | Skips type-check & generating |
| Build specific packages | `pnpm build --build --qwikcity --dev` | Skips type-check & generating |

Copilot uses AI. Check for mistakes.
## Prerequisites and Setup

**Required versions:** Node ≥ 22.18.0, pnpm ≥ 10.14.0

Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prerequisites say “Required versions: Node ≥ 22.18.0”, but later the doc states .node-version pins Node 24 and suggests matching the exact version. Consider clarifying in this section that Node 24 (per .node-version/.nvmrc) is the recommended/CI version, while >=22.18.0 is the minimum supported by package.json engines.

Suggested change
`Node >= 22.18.0` is the minimum supported version from `package.json` engines. For local development and CI parity, prefer the Node 24 version pinned in `.node-version` / `.nvmrc`.

Copilot uses AI. Check for mistakes.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@builder.io/qwik@8543
npm i https://pkg.pr.new/@builder.io/qwik-city@8543
npm i https://pkg.pr.new/eslint-plugin-qwik@8543
npm i https://pkg.pr.new/create-qwik@8543

commit: f456621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants