{"owner":"sveltejs","repo":"kit","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md"],"skills":{"AGENTS.md":"# SvelteKit Coding Agent Guide\n\nThis guide is for AI coding agents working in the SvelteKit monorepo.\n\n**Important:** Read and follow [`CONTRIBUTING.md`](./CONTRIBUTING.md) as well - it contains essential information about testing, code structure, and contribution guidelines that applies here.\n\n## Quick Reference\n\n### Essential Commands\n\n```bash\n# Initial setup (takes 3-4 minutes, set 10+ min timeout)\npnpm install --frozen-lockfile\n\n# Build all packages (~1-2 seconds)\npnpm build\n\n# Format code (~15 seconds)\npnpm run format\n\n# Lint (takes 2-3 minutes, set 5+ min timeout)\npnpm run lint\n\n# Type checking (takes 3-4 minutes, set 8+ min timeout)\npnpm run check\n```\n\n### Testing Commands\n\n```bash\n# Unit tests only (fastest - ~6 seconds)\npnpm -F @sveltejs/kit test:unit\n\n# Run a single unit test file\npnpm -F @sveltejs/kit test:unit:dev path/to/test.spec.js\n\n# Integration tests (10-30 minutes, set 60+ min timeout)\npnpm test:kit\n\n# A single integration test suite (name of suite found in packages/kit/test/apps/*/package.json)\npnpm -F {name-of-suite} test\n\n# Run single Playwright test (must use workdir - no pnpm -F shorthand)\ncd packages/kit/test/apps/basics && npx playwright test --grep \"test name\"\n\n# Other package tests (5-15 minutes, set 30+ min timeout)\npnpm test:others\n```\n\n### Pre-submission Checklist\n\nBefore opening a PR, **all of these must pass** (see also the [PR template](./.github/PULL_REQUEST_TEMPLATE.md)):\n\n1. `pnpm run format` - Auto-format code\n2. `pnpm run lint` - Check code style (don't cancel early)\n3. `pnpm run check` - Type checking (don't cancel early)\n4. `pnpm -F @sveltejs/kit test:unit` - Run unit tests\n5. For @sveltejs/kit changes: `pnpm -F @sveltejs/kit prepublishOnly` - Generate types\n6. Run `pnpm changeset` to document changes (prefix with `fix`, `feat`, `breaking`, or `chore`)\n\n## Code Style Examples\n\nThe coding style guidelines are in `CONTRIBUTING.md`. Here are additional examples:\n\n### Imports\n\n```javascript\n// JSDoc type imports at the top\n/** @import { Handle, RequestEvent } from '@sveltejs/kit' */\n\n// Named imports (no default exports)\nimport { HttpError, SvelteKitError } from '@sveltejs/kit/internal';\n```\n\n### Functions\n\n```javascript\n// Exported named functions (no default exports)\nexport function coalesce_to_error(err) {\n\t// Implementation\n}\n\n// JSDoc for all parameters and return types\n/**\n * @param {unknown} error\n * @returns {Error}\n */\nexport function coalesce_to_error(error) {\n\t// Implementation\n}\n\n// Use arrow functions for callbacks\nconst handler = (event) => {\n\t/* ... */\n};\n```\n\n### Error Handling\n\n```javascript\n// Type checking with instanceof\nif (error instanceof HttpError || error instanceof SvelteKitError) {\n\t// Handle\n}\n\n// Graceful fallbacks\nconst status = error?.status ?? 500;\n\n// Optional chaining and nullish coalescing\nconst content_type = request.headers.get('content-type')?.split(';', 1)[0];\n```\n\n### TypeScript/JSDoc\n\n- Use JSDoc annotations for all function parameters and return types\n- Complex types: `/** @type {Array<{ type: string, subtype: string }>} */`\n- Type casting when needed: `/** @type {Error} */ (err)`\n- Enable strict mode: `checkJs: true`, `strict: true` in tsconfig.json\n\n### Formatting (via Prettier)\n\n- **Tabs for indentation** (not spaces)\n- **Single quotes** for strings\n- **No trailing commas**\n- **100 character line width**\n- Files are auto-formatted by `pnpm run format`\n\n### Comments\n\n````javascript\n// JSDoc with usage examples for public APIs\n/**\n * Sequence multiple handle functions\n *\n * @example\n * ```js\n * export const handle = sequence(first, second);\n * ```\n *\n * @param {...Handle} handlers\n * @returns {Handle}\n */\n\n// Inline comments for clarifications\n// no match equals invalid header — ignore\n````\n\n## Key Packages\n\n- `@sveltejs/kit` - Main framework (`packages/kit/`)\n- `adapter-*` - Platform adapters (node, cloudflare, netlify, vercel, static, auto)\n- `@sveltejs/package` - Package building utilities\n- `@sveltejs/enhanced-img` - Enhanced image component\n- `@sveltejs/amp` - AMP support\n\n## Troubleshooting\n\n- **Browser tests fail**: `pnpm playwright install chromium`\n- **Build failures**: Ensure `pnpm install --frozen-lockfile` completed\n- **Type errors**: Run `pnpm -F @sveltejs/kit prepublishOnly`\n- **Lint issues**: Run `pnpm run format` first\n"},"files":{"AGENTS.md":"# SvelteKit Coding Agent Guide\n\nThis guide is for AI coding agents working in the SvelteKit monorepo.\n\n**Important:** Read and follow [`CONTRIBUTING.md`](./CONTRIBUTING.md) as well - it contains essential information about testing, code structure, and contribution guidelines that applies here.\n\n## Quick Reference\n\n### Essential Commands\n\n```bash\n# Initial setup (takes 3-4 minutes, set 10+ min timeout)\npnpm install --frozen-lockfile\n\n# Build all packages (~1-2 seconds)\npnpm build\n\n# Format code (~15 seconds)\npnpm run format\n\n# Lint (takes 2-3 minutes, set 5+ min timeout)\npnpm run lint\n\n# Type checking (takes 3-4 minutes, set 8+ min timeout)\npnpm run check\n```\n\n### Testing Commands\n\n```bash\n# Unit tests only (fastest - ~6 seconds)\npnpm -F @sveltejs/kit test:unit\n\n# Run a single unit test file\npnpm -F @sveltejs/kit test:unit:dev path/to/test.spec.js\n\n# Integration tests (10-30 minutes, set 60+ min timeout)\npnpm test:kit\n\n# A single integration test suite (name of suite found in packages/kit/test/apps/*/package.json)\npnpm -F {name-of-suite} test\n\n# Run single Playwright test (must use workdir - no pnpm -F shorthand)\ncd packages/kit/test/apps/basics && npx playwright test --grep \"test name\"\n\n# Other package tests (5-15 minutes, set 30+ min timeout)\npnpm test:others\n```\n\n### Pre-submission Checklist\n\nBefore opening a PR, **all of these must pass** (see also the [PR template](./.github/PULL_REQUEST_TEMPLATE.md)):\n\n1. `pnpm run format` - Auto-format code\n2. `pnpm run lint` - Check code style (don't cancel early)\n3. `pnpm run check` - Type checking (don't cancel early)\n4. `pnpm -F @sveltejs/kit test:unit` - Run unit tests\n5. For @sveltejs/kit changes: `pnpm -F @sveltejs/kit prepublishOnly` - Generate types\n6. Run `pnpm changeset` to document changes (prefix with `fix`, `feat`, `breaking`, or `chore`)\n\n## Code Style Examples\n\nThe coding style guidelines are in `CONTRIBUTING.md`. Here are additional examples:\n\n### Imports\n\n```javascript\n// JSDoc type imports at the top\n/** @import { Handle, RequestEvent } from '@sveltejs/kit' */\n\n// Named imports (no default exports)\nimport { HttpError, SvelteKitError } from '@sveltejs/kit/internal';\n```\n\n### Functions\n\n```javascript\n// Exported named functions (no default exports)\nexport function coalesce_to_error(err) {\n\t// Implementation\n}\n\n// JSDoc for all parameters and return types\n/**\n * @param {unknown} error\n * @returns {Error}\n */\nexport function coalesce_to_error(error) {\n\t// Implementation\n}\n\n// Use arrow functions for callbacks\nconst handler = (event) => {\n\t/* ... */\n};\n```\n\n### Error Handling\n\n```javascript\n// Type checking with instanceof\nif (error instanceof HttpError || error instanceof SvelteKitError) {\n\t// Handle\n}\n\n// Graceful fallbacks\nconst status = error?.status ?? 500;\n\n// Optional chaining and nullish coalescing\nconst content_type = request.headers.get('content-type')?.split(';', 1)[0];\n```\n\n### TypeScript/JSDoc\n\n- Use JSDoc annotations for all function parameters and return types\n- Complex types: `/** @type {Array<{ type: string, subtype: string }>} */`\n- Type casting when needed: `/** @type {Error} */ (err)`\n- Enable strict mode: `checkJs: true`, `strict: true` in tsconfig.json\n\n### Formatting (via Prettier)\n\n- **Tabs for indentation** (not spaces)\n- **Single quotes** for strings\n- **No trailing commas**\n- **100 character line width**\n- Files are auto-formatted by `pnpm run format`\n\n### Comments\n\n````javascript\n// JSDoc with usage examples for public APIs\n/**\n * Sequence multiple handle functions\n *\n * @example\n * ```js\n * export const handle = sequence(first, second);\n * ```\n *\n * @param {...Handle} handlers\n * @returns {Handle}\n */\n\n// Inline comments for clarifications\n// no match equals invalid header — ignore\n````\n\n## Key Packages\n\n- `@sveltejs/kit` - Main framework (`packages/kit/`)\n- `adapter-*` - Platform adapters (node, cloudflare, netlify, vercel, static, auto)\n- `@sveltejs/package` - Package building utilities\n- `@sveltejs/enhanced-img` - Enhanced image component\n- `@sveltejs/amp` - AMP support\n\n## Troubleshooting\n\n- **Browser tests fail**: `pnpm playwright install chromium`\n- **Build failures**: Ensure `pnpm install --frozen-lockfile` completed\n- **Type errors**: Run `pnpm -F @sveltejs/kit prepublishOnly`\n- **Lint issues**: Run `pnpm run format` first\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# SvelteKit Coding Agent Guide\n\nThis guide is for AI coding agents working in the SvelteKit monorepo.\n\n**Important:** Read and follow [`CONTRIBUTING.md`](./CONTRIBUTING.md) as well - it contains essential information about testing, code structure, and contribution guidelines that applies here.\n\n## Quick Reference\n\n### Essential Commands\n\n```bash\n# Initial setup (takes 3-4 minutes, set 10+ min timeout)\npnpm install --frozen-lockfile\n\n# Build all packages (~1-2 seconds)\npnpm build\n\n# Format code (~15 seconds)\npnpm run format\n\n# Lint (takes 2-3 minutes, set 5+ min timeout)\npnpm run lint\n\n# Type checking (takes 3-4 minutes, set 8+ min timeout)\npnpm run check\n```\n\n### Testing Commands\n\n```bash\n# Unit tests only (fastest - ~6 seconds)\npnpm -F @sveltejs/kit test:unit\n\n# Run a single unit test file\npnpm -F @sveltejs/kit test:unit:dev path/to/test.spec.js\n\n# Integration tests (10-30 minutes, set 60+ min timeout)\npnpm test:kit\n\n# A single integration test suite (name of suite found in packages/kit/test/apps/*/package.json)\npnpm -F {name-of-suite} test\n\n# Run single Playwright test (must use workdir - no pnpm -F shorthand)\ncd packages/kit/test/apps/basics && npx playwright test --grep \"test name\"\n\n# Other package tests (5-15 minutes, set 30+ min timeout)\npnpm test:others\n```\n\n### Pre-submission Checklist\n\nBefore opening a PR, **all of these must pass** (see also the [PR template](./.github/PULL_REQUEST_TEMPLATE.md)):\n\n1. `pnpm run format` - Auto-format code\n2. `pnpm run lint` - Check code style (don't cancel early)\n3. `pnpm run check` - Type checking (don't cancel early)\n4. `pnpm -F @sveltejs/kit test:unit` - Run unit tests\n5. For @sveltejs/kit changes: `pnpm -F @sveltejs/kit prepublishOnly` - Generate types\n6. Run `pnpm changeset` to document changes (prefix with `fix`, `feat`, `breaking`, or `chore`)\n\n## Code Style Examples\n\nThe coding style guidelines are in `CONTRIBUTING.md`. Here are additional examples:\n\n### Imports\n\n```javascript\n// JSDoc type imports at the top\n/** @import { Handle, RequestEvent } from '@sveltejs/kit' */\n\n// Named imports (no default exports)\nimport { HttpError, SvelteKitError } from '@sveltejs/kit/internal';\n```\n\n### Functions\n\n```javascript\n// Exported named functions (no default exports)\nexport function coalesce_to_error(err) {\n\t// Implementation\n}\n\n// JSDoc for all parameters and return types\n/**\n * @param {unknown} error\n * @returns {Error}\n */\nexport function coalesce_to_error(error) {\n\t// Implementation\n}\n\n// Use arrow functions for callbacks\nconst handler = (event) => {\n\t/* ... */\n};\n```\n\n### Error Handling\n\n```javascript\n// Type checking with instanceof\nif (error instanceof HttpError || error instanceof SvelteKitError) {\n\t// Handle\n}\n\n// Graceful fallbacks\nconst status = error?.status ?? 500;\n\n// Optional chaining and nullish coalescing\nconst content_type = request.headers.get('content-type')?.split(';', 1)[0];\n```\n\n### TypeScript/JSDoc\n\n- Use JSDoc annotations for all function parameters and return types\n- Complex types: `/** @type {Array<{ type: string, subtype: string }>} */`\n- Type casting when needed: `/** @type {Error} */ (err)`\n- Enable strict mode: `checkJs: true`, `strict: true` in tsconfig.json\n\n### Formatting (via Prettier)\n\n- **Tabs for indentation** (not spaces)\n- **Single quotes** for strings\n- **No trailing commas**\n- **100 character line width**\n- Files are auto-formatted by `pnpm run format`\n\n### Comments\n\n````javascript\n// JSDoc with usage examples for public APIs\n/**\n * Sequence multiple handle functions\n *\n * @example\n * ```js\n * export const handle = sequence(first, second);\n * ```\n *\n * @param {...Handle} handlers\n * @returns {Handle}\n */\n\n// Inline comments for clarifications\n// no match equals invalid header — ignore\n````\n\n## Key Packages\n\n- `@sveltejs/kit` - Main framework (`packages/kit/`)\n- `adapter-*` - Platform adapters (node, cloudflare, netlify, vercel, static, auto)\n- `@sveltejs/package` - Package building utilities\n- `@sveltejs/enhanced-img` - Enhanced image component\n- `@sveltejs/amp` - AMP support\n\n## Troubleshooting\n\n- **Browser tests fail**: `pnpm playwright install chromium`\n- **Build failures**: Ensure `pnpm install --frozen-lockfile` completed\n- **Type errors**: Run `pnpm -F @sveltejs/kit prepublishOnly`\n- **Lint issues**: Run `pnpm run format` first\n","category":"root","tokens":1073}]}