Skip to content

Commit e3d845b

Browse files
authored
docs: add agent guidance for major subtrees (#332)
1 parent b35e5e2 commit e3d845b

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Repository-wide instructions for agents
2+
3+
This file applies to the entire `deck.gl-community` repository. Directories may add more specific guidance in their own `AGENTS.md` files.
4+
5+
## Tooling
6+
- Use the Yarn 4 workspace that ships with the repo. Install dependencies with `yarn` and run scripts via `yarn <script>` from the repo root. See `package.json` for the canonical script list.
7+
- Prefer TypeScript and ES module syntax when authoring source files. Most packages ship dual ESM/CJS bundles via build tooling defined per workspace package.
8+
- if any dependencies are changed, the yarn.lock file must be rebuilt by running `yarn` in the root before committing.
9+
10+
## Quality gates
11+
- Run `yarn lint` or `yarn lint-fix` before committing JavaScript/TypeScript changes.
12+
- Run the relevant Vitest project: `yarn test` (Node), `yarn test-browser`, or `yarn test-headless` as appropriate for your change.
13+
14+
## Documentation and release process
15+
- Follow the contribution flow in `docs/CONTRIBUTING.md` before landing breaking changes.
16+
- When adding or removing packages or examples, update any related documentation, sidebars, or release notes under `docs/`.

docs/AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Documentation subtree instructions
2+
3+
See `/AGENTS.md` for shared repo policies. This file covers Markdown under `docs/` that feeds the Docusaurus site in `website/`.
4+
5+
## Authoring conventions
6+
- Prefer Markdown (`.md`/`.mdx`) with Docusaurus front matter when adding new pages. Reuse existing heading structures where possible for consistent slug generation.
7+
- Update the relevant `sidebar.json` file alongside new pages so navigation stays in sync with content.
8+
9+
## Local preview
10+
- Run `yarn --cwd website start` to preview documentation changes with live reload.
11+
- Use `yarn --cwd website build` to catch broken links, missing front matter, or sidebar issues before publishing.
12+
13+
## Pitfalls and references
14+
- Doc IDs become route segments—renaming files requires matching updates in `website/src/docs-sidebar.js`. Missing updates will break the docs navigation during deploy.
15+
- Follow the contribution expectations in `docs/CONTRIBUTING.md` when introducing new guides or major content revisions.

examples/AGENTS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Examples subtree instructions
2+
3+
This file supplements `/AGENTS.md` for everything under `examples/`.
4+
5+
## Running examples
6+
- Each subfolder is a Yarn workspace (see the root `package.json`). Start an example with `yarn workspace <example-name> start`.
7+
- Use the optional `start-local` script (when defined) to alias workspace modules through `examples/vite.config.local.mjs` for rapid iteration against local package changes.
8+
9+
## Authoring conventions
10+
- Keep example entry points in `src/example.tsx` (or `index.tsx` for legacy folders) and export an `App` component so the website embedding utilities can import it.
11+
- Mirror new examples in `website/src/examples-sidebar.js` to make them visible on the docs site.
12+
13+
## Pitfalls and references
14+
- The local Vite config warns that `editable-layers/editor` cannot be run with `start-local` because it loads two React copies. See the note in `examples/vite.config.local.mjs` and fall back to the regular `start` script for that case.
15+
- Publishing guides for editable-layer scenarios live in `docs/modules/editable-layers/developer-guide/get-started.md`; follow them to keep example props consistent with the documented API.

website/AGENTS.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Website subtree instructions
2+
3+
This file layers on top of `/AGENTS.md` for the Docusaurus app under `website/`.
4+
5+
## Commands
6+
- Start the dev server with `yarn --cwd website start`.
7+
- Build static assets via `yarn --cwd website build`; CI uses `scripts/build.sh` to include gallery assets and worker transpilation.
8+
- Run `yarn --cwd website write-heading-ids` after adding new Markdown headings so generated anchors stay stable.
9+
10+
## Authoring notes
11+
- Docs and example sidebars are defined in `src/docs-sidebar.js` and `src/examples-sidebar.js`. Keep entries sorted and ensure new routes map to actual Markdown or example exports.
12+
- Embed interactive examples by importing from `examples/*`—ensure those examples expose an `App` export per the guidance in `examples/AGENTS.md`.
13+
14+
## Pitfalls and references
15+
- The staging/prod build script (`scripts/build.sh`) validates tokens and rebuilds gallery bundles; keep it in sync if you change build steps so deploys do not miss assets.
16+
- Navigation relies on IDs emitted from `docs/sidebar.json` files in the `docs/` tree. When you rename or move docs, update the mappings here and in the docs sidebars to avoid broken links during deployment.

0 commit comments

Comments
 (0)