{"owner":"mapbox","repo":"mapbox-gl-js","hasSkills":true,"hasMcp":false,"mcpConfig":null,"found":["AGENTS.md","CLAUDE.md","GEMINI.md"],"skills":{"AGENTS.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","CLAUDE.md":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest` hook rebuilds `dist/mapbox-gl-dev.js` and pmtiles\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `test/ignores/<platform>.js` (prefer `todo` over `skip`, link the issue)\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must include a `_comment` field explaining what it checks; drop unused intermediate `wait` steps\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n","GEMINI.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n"},"files":{"AGENTS.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","CLAUDE.md":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest` hook rebuilds `dist/mapbox-gl-dev.js` and pmtiles\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `test/ignores/<platform>.js` (prefer `todo` over `skip`, link the issue)\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must include a `_comment` field explaining what it checks; drop unused intermediate `wait` steps\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n","GEMINI.md":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n"},"items":[{"name":"AGENTS.md","path":"AGENTS.md","title":"AGENTS.md","content":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","category":"root","tokens":21},{"name":"CLAUDE.md","path":"CLAUDE.md","title":"CLAUDE.md","content":"# CLAUDE.md\n\n## Project Overview\n\nMapbox GL JS is a JavaScript library for interactive, customizable vector maps on the web. It uses WebGL to render vector tiles that conform to the Mapbox Vector Tile Specification.\n\n## Workflow\n- Keep changes minimal and fully justified\n- Always inspect a referenced file before explaining or fixing it\n- Understand WHY code exists before changing it — GL JS has many browser quirks, performance hacks, and WebGL subtleties; check git blame when in doubt\n- No abstractions or helpers until you see repetition, and only if cleaner than the duplication\n- Always run `npm run tsc` and `npm run lint` when you're done making a series of code changes\n- Run `npm run codegen` if you modify style properties or the style specification\n- Run `npm run test-typings` after modifying public API types or the style specification\n- Prefer running single tests, and avoid running the whole test suite, for performance\n- Never add any dependencies unless explicitly requested\n\n## Essential Commands\n\n### Development\n\n```bash\nnpm start\nnpm run build-esm-dev\nnpm run build-esm-prod\nnpm run build-prod # UMD build\nnpm run build-css\nnpm run codegen\n```\n\n### Testing\n\n```bash\nnpm run test-unit\nnpm run test-unit -- test/unit/style-spec/spec.test.ts -t 'Style#addImage'\n\nnpm run test-render -- -t \"background-color\"\n# Regenerate expected.png baselines (inspect diffs before committing!)\nUPDATE=true npm run test-render -- -t \"<pattern>\"\n\nnpm run test-typings\n```\n\nRender tests:\n- Test name = folder path under `test/integration/render-tests/` (e.g. `circle-radius/literal`). `-t` matches substrings — use a trailing slash to narrow: `-t \"circle-radius/\"` not `-t \"circle\"` (also hits `circle-color`, `circle-blur`, etc.)\n- Always use `npm run test-render`, not `npx vitest` — the `pretest` hook rebuilds `dist/mapbox-gl-dev.js` and pmtiles\n- Inspect diffs: `open test/integration/render-tests/render-tests.html`\n- Platform-specific failures → `test/ignores/<platform>.js` (prefer `todo` over `skip`, link the issue)\n\n### Code Quality\n\n```bash\nnpm run tsc\nnpm run lint\nnpm run lint-css\n```\n\n## Architecture Overview\n\nTile parsing and layout run in Web Workers; rendering runs on the main thread. `Map` is the top-level handle, `Style` owns layers and configuration, `SourceCache` manages tile loading/caching per source, `Transform` owns camera state and projection math, and `Painter` orchestrates WebGL rendering.\n\n1. **Tile Parsing & Layout** (Worker)\n   - `WorkerTile#parse()` decodes features and creates `Bucket` instances per style layer family\n   - Each `Bucket` holds vertex/element arrays ready for WebGL upload\n   - `ProgramConfiguration` maps style properties to shader attributes/uniforms\n   - Feature geometries are indexed in `FeatureIndex` for `queryRenderedFeatures` / `querySourceFeatures`\n\n2. **Transfer** — parsed bucket data is serialized and sent to the main thread via `src/util/web_worker_transfer.ts`\n\n3. **Symbol Placement** (Main Thread) — symbols run cross-tile collision detection after worker parsing\n\n4. **WebGL Rendering** (Main Thread)\n   - `Painter#render()` iterates layers by render pass (`Painter.renderPass`: offscreen → opaque → translucent)\n   - Layer-specific `draw*()` functions in `src/render/draw_*.ts`\n\n## Project Structure\n\n```\n3d-style/ # (mirrors src)\n\nsrc/\n├── data/\n├── geo/\n├── gl/\n├── render/\n├── shaders/\n├── source/\n├── style/\n├── style-spec/ (separate workspace)\n├── symbol/\n├── terrain/\n├── ui/\n└── util/\n\ntest/\n├── unit/\n├── integration/\n└── build/\n\ndebug/ # served by `npm start`\n```\n\n## Code Style\n\n- Prefer named exports over default exports\n- Modules export classes or functions (no namespace objects)\n- Use `assert` for invariants\n- Use `import type` for type-only imports\n- No TODO/FIXME comments in committed code\n\n## TypeScript\n\n- Configured with `strict: false`, but write code as if strict — no `any`, handle all `null`/`undefined`, use proper type annotations\n- Prefer explicit return types over `// @ts-expect-error` suppressions for functions that may not return a value\n- Prefer literal unions over boolean flags; allows future extension without breaking changes\n\n## Testing Guidelines\n\n### Integration Tests\n\n- Any PR that changes rendering behavior (shader changes, draw function logic, bucket data changes) must include a render test in `test/integration/render-tests/`\n- For query behavior changes, add corresponding query tests covering all affected layer types\n- Render tests for bug fixes must fail without the fix; a tolerance loose enough to pass either way is useless\n- Every render test `style.json` must include a `_comment` field explaining what it checks; drop unused intermediate `wait` steps\n- Don't inflate render test tolerance to make a failing test pass — investigate the root cause\n- Size render test expected images to the minimum needed (e.g., 32×64, not 128×128)\n\n### Unit Tests\n\n- No shared variables between test cases\n- Don't mock internal domain objects (Style, Map, Transform, Dispatcher)\n- One return value or side effect per test - pull shared logic into functions\n- Only test return values and global side effects - not internal behavior or method calls\n- No network requests - use `mockFetch` from `test/util/network.ts` if needed\n\n## Documentation Conventions\n\n- All public API must have JSDoc comments; private items tagged with `@private`\n- Style-spec `doc` fields in `v8.json` are public — use unambiguous language, avoid internal terms, and don't reference implementation details\n- When adding a new property to `v8.json`, populate the `sdk-support` table and set `experimental: true` until release version is confirmed\n\n## WebGL and Shaders\n\n- Custom `#pragma mapbox` directives in shaders expand to uniforms or attributes based on style properties\n- Use named `#define` constants for integer mode values in shaders — never bare magic numbers like `if (u_blend_mode == 1)`\n- Use `#if defined(A) && defined(B)` for compound shader conditionals (not `#ifdef`); required for the Metal preprocessing pipeline\n- See [src/shaders/README.md](src/shaders/README.md) for shader documentation\n\n## Performance\n\n- Allocate GPU objects (buffers, textures, bind groups, UBOs) at bucket creation or style load time; invalidate only when underlying data changes. **Never allocate GPU objects inside draw functions that run every frame.**\n- In hot paths, prefer flat typed arrays (`Float32Array`, `Uint16Array`) over arrays of objects or nested arrays\n","category":"root","tokens":1615},{"name":"GEMINI.md","path":"GEMINI.md","title":"GEMINI.md","content":"# This is the Mapbox GL JS repository\n\nInclude all info from the @CLAUDE.md file.\n","category":"root","tokens":21}]}