From 02270a02f73cbf9df5d31a33eaf79c40c4b3c767 Mon Sep 17 00:00:00 2001 From: Abhiram Dhanvi Date: Sun, 29 Nov 2026 23:40:57 +0530 Subject: [PATCH 1/2] docs(agents): make AGENTS.md single source of truth over copilot instructions Signed-off-by: Abhiram Dhanvi --- .github/copilot-instructions.md | 46 +-------------------------------- AGENTS.md | 2 ++ 2 files changed, 3 insertions(+), 45 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 5d47dbbd3..8a7d10807 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,47 +1,3 @@ # Copilot instructions for Sistent -## Build, test, and lint commands - -Use the Make targets when possible; CI runs these same entry points. - -```sh -make setup # npm install -make build # npm run build -make build-watch # npm run build:watch -make format-check # prettier --check "**/*.{ts,tsx,md}" --config ./.prettierrc -make lint # prettier --write "**/*.{ts,tsx,md}" --config ./.prettierrc && eslint . -make tests # jest -``` - -Single-test examples: - -```sh -npm test -- src/__testing__/routing.test.ts --runInBand -npm test -- -t "routing utilities" --runInBand -``` - -CI runs the main checks on the Node versions in the `node-version` matrix of `.github/workflows/node-checks.yml`; read them there rather than from a copy here that can drift. Pull requests also trigger a downstream integration workflow that packs this library and installs it into `meshery/meshery`'s `ui/` app before building and testing there. - -## Known issues - -Local build and test behavior can vary by branch, dependency state, and environment. Verify the current checkout before assuming a failure is expected, and prefer linking tracked issues for any persistent problems rather than documenting transient command failures here. - -## High-level architecture - -- `tsup` builds a single package entrypoint, `src/index.tsx`, into CJS and ESM output in `dist/`. -- The public API is assembled through domain indexes: `actors`, `base`, `colors`, `custom`, `hooks`, `icons`, `redux-persist`, `schemas`, `theme`, and `utils`, then re-exported from `src/index.tsx`. -- `src/base/` is the low-level layer: thin wrappers around MUI primitives that preserve MUI naming and types while giving the package a consistent export surface. -- `src/custom/` is the higher-level component layer: product components such as tables, cards, filters, dialogs, and markdown/rendering helpers composed from `base/`, icons, utilities, and Sistent theme tokens. -- `src/theme/` is the styling backbone: `SistentThemeProvider`, primitive brand palettes, semantic palette mapping, typography, and MUI component override modifiers all live here. -- `src/schemas/` combines local RJSF form schemas (`schema.tsx` + `uiSchema.tsx`) with re-exports from `@meshery/schemas`, including OpenAPI schemas, RTK Query APIs, and shared API utilities. -- `src/actors/` provides XState-based infrastructure for Redux and RTK Query integration, validation flows, worker-backed actors, and event-bus helpers. - -## Key conventions - -- When adding a new public symbol, wire it through the full export chain: the feature-local `index.ts(x)`, the domain `index.ts(x)`, and the root `src/index.tsx`. -- Theme-aware UI should use Sistent exports from `src/theme` / package exports (`SistentThemeProvider`, `styled`, `useTheme`) and consume Sistent semantic palette tokens such as `theme.palette.background.card` and `theme.palette.icon.default` instead of relying on raw MUI defaults. -- Meshery and Layer5 API-facing identifiers must stay camelCase on the wire. Prefer the canonical camelCase schema exports (`EnvironmentDefinitionV1Beta3OpenApiSchema`, `WorkspaceDefinitionV1Beta3OpenApiSchema`, `ModelDefinitionV1Beta2OpenApiSchema`) over the deprecated v1beta1 exports kept for compatibility. -- Tests are centralized under `src/__testing__/` rather than colocated with components. Component tests commonly render through `SistentThemeProvider`, and heavy dependencies are often mocked inline to keep tests focused. -- New RJSF form assets belong in `src/schemas//` with separate `schema.tsx` and `uiSchema.tsx` files, then must be re-exported from `src/schemas/index.tsx`. -- Keep TypeScript explicit. The repo is `strict`, and the few `@typescript-eslint/no-explicit-any` suppressions in actor and schema interop code are exceptions, not the default style. -- If a session prepares commits, follow Conventional Commits and include DCO signoff (`git commit -s`). +[`AGENTS.md`](../AGENTS.md) is the single authoritative agent-instruction file for this repository (`CLAUDE.md` symlinks to it). Follow `AGENTS.md` for build, test, architecture, and contribution guidance instead of duplicating shared rules here. diff --git a/AGENTS.md b/AGENTS.md index d0a43ffd6..d371302fd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -278,3 +278,5 @@ Keep this file for knowledge useful to almost every future agent session in this Do not repeat what the codebase already shows; point to the authoritative file or command instead. Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise. + +`AGENTS.md` is the single authoritative agent-instruction file (`CLAUDE.md` symlinks to it, and [`.github/copilot-instructions.md`](.github/copilot-instructions.md) redirects here). Do not duplicate shared rules there; if Copilot-specific behavior is ever added to `.github/copilot-instructions.md`, keep it non-overlapping and treat `AGENTS.md` as taking precedence on any conflict. From 46a62d9117adf72f6c37cc7dc086ca03dfdd1de1 Mon Sep 17 00:00:00 2001 From: Abhiram Dhanvi Date: Mon, 30 Nov 2026 00:06:23 +0530 Subject: [PATCH 2/2] docs(agents): link DESIGN.md tokens, drop CLAUDE.md note, note JetBrains behavior Signed-off-by: Abhiram Dhanvi --- .github/copilot-instructions.md | 4 +++- AGENTS.md | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 8a7d10807..dd2f2f283 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -1,3 +1,5 @@ # Copilot instructions for Sistent -[`AGENTS.md`](../AGENTS.md) is the single authoritative agent-instruction file for this repository (`CLAUDE.md` symlinks to it). Follow `AGENTS.md` for build, test, architecture, and contribution guidance instead of duplicating shared rules here. +[`AGENTS.md`](../AGENTS.md) is the single authoritative agent-instruction file for this repository. Follow `AGENTS.md` for build, test, architecture, and contribution guidance instead of duplicating shared rules here. + +Clients that only load `.github/copilot-instructions.md` without following Markdown links (such as JetBrains Copilot Chat) will not load the linked instructions automatically; refer to `AGENTS.md` directly when using those clients. diff --git a/AGENTS.md b/AGENTS.md index d371302fd..6d74f9ea8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -272,6 +272,10 @@ for you. counts; one cancelled before it did anything does not. Three runs do not waive the merge gate. - **A pull request that changes any path outside documentation, the website, and CI merges only with a green no-mistakes run on its current head.** Documentation is `docs/**`. The website (`design.layer5.io`) is `site/**` and root `CNAME`. CI is `.github/workflows/**`. The check is `PR must be raised via no-mistakes`: `review`, `test`, and `document` must each be `completed` in a head-bound attestation. +## Theme tokens + +Use Sistent theme exports and semantic palette tokens documented in [`DESIGN.md`](DESIGN.md) instead of raw MUI defaults or hardcoded color literals. + ## Maintaining this file Keep this file for knowledge useful to almost every future agent session in this project. @@ -279,4 +283,4 @@ Do not repeat what the codebase already shows; point to the authoritative file o Prefer rewriting or pruning existing entries over appending new ones. When updating this file, preserve this bar for all agents and keep entries concise. -`AGENTS.md` is the single authoritative agent-instruction file (`CLAUDE.md` symlinks to it, and [`.github/copilot-instructions.md`](.github/copilot-instructions.md) redirects here). Do not duplicate shared rules there; if Copilot-specific behavior is ever added to `.github/copilot-instructions.md`, keep it non-overlapping and treat `AGENTS.md` as taking precedence on any conflict. +`AGENTS.md` is the single authoritative agent-instruction file ([`.github/copilot-instructions.md`](.github/copilot-instructions.md) redirects here). Do not duplicate shared rules there; if Copilot-specific behavior is ever added to `.github/copilot-instructions.md`, keep it non-overlapping and treat `AGENTS.md` as taking precedence on any conflict. Note that clients which only load `.github/copilot-instructions.md` without expanding Markdown links (such as JetBrains Copilot Chat) do not load `AGENTS.md` automatically.