diff --git a/.agents/skills/slack-development/references/assistant-thread-apis.md b/.agents/skills/slack-development/references/assistant-thread-apis.md index 82dcceb22a..c7bf93e90d 100644 --- a/.agents/skills/slack-development/references/assistant-thread-apis.md +++ b/.agents/skills/slack-development/references/assistant-thread-apis.md @@ -110,10 +110,6 @@ This file intentionally separates: - `packages/junior/src/chat/slack/assistant-thread/title.ts` -5. Current delivery contract: - -- `packages/junior/src/chat/slack/AGENTS.md` - ## Audit Checklist When changing code or guidance in this area, verify all of the following: diff --git a/.agents/skills/vercel-sandbox/SKILL.md b/.agents/skills/vercel-sandbox/SKILL.md index be1f93d2cf..ef85a267ac 100644 --- a/.agents/skills/vercel-sandbox/SKILL.md +++ b/.agents/skills/vercel-sandbox/SKILL.md @@ -71,7 +71,7 @@ For repo-local debugging in Junior, inspect: - `packages/junior/src/chat/sandbox/session.ts` (reports each new ref through `onSandboxRefChanged`) - `packages/junior/src/chat/providers/slack/turn.ts` and `packages/junior/src/chat/task-execution/conversation-turn.ts` (save it to thread state) 5. whether consumer-specific snapshots are being confused with Vercel product persistence: - - `packages/junior/src/chat/sandbox/AGENTS.md` + - `packages/junior/src/chat/sandbox/snapshot/` ## Step 6: Recommend the smallest correct fix diff --git a/.agents/skills/vercel-sandbox/SOURCES.md b/.agents/skills/vercel-sandbox/SOURCES.md index f1812bc58b..e55aae5adb 100644 --- a/.agents/skills/vercel-sandbox/SOURCES.md +++ b/.agents/skills/vercel-sandbox/SOURCES.md @@ -35,7 +35,6 @@ Selected profile: `references/examples/documentation-skill.md` | `packages/junior/src/chat/agent/index.ts` | canonical | high | Turn timeout detection and abort behavior | Repo implementation | | `packages/junior/src/chat/agent/resume.ts` | canonical | high | Timeout continuation persistence | Repo implementation | | `packages/junior/src/chat/sandbox/session.ts` | canonical | high | Sandbox create/get/reuse logic, keepalive, and dependency-profile mismatch invalidation | Repo implementation | -| `packages/junior/src/chat/sandbox/AGENTS.md` | canonical | high | Runtime dependency snapshots vs sandbox workspace lifecycle | Sandbox ownership documentation | | `https://github.com/getsentry/junior/issues/184` | secondary | medium | Concrete motivating failure report for workspace loss between turns | Problem report, not source of truth | ## Decisions diff --git a/.agents/skills/vercel-sandbox/references/api-surface.md b/.agents/skills/vercel-sandbox/references/api-surface.md index 0c21ec688e..ee6ffad7bd 100644 --- a/.agents/skills/vercel-sandbox/references/api-surface.md +++ b/.agents/skills/vercel-sandbox/references/api-surface.md @@ -56,17 +56,16 @@ Do not recommend this path unless the repo has upgraded to the beta SDK and loca This section is secondary. Use it only when the task is about Junior's Vercel Sandbox integration rather than Vercel Sandbox itself. -| File | Why it matters | -| ------------------------------------------------------ | ----------------------------------------------------------------------------------- | -| `packages/junior/package.json` | Declares the `@vercel/sandbox` dependency used by the repo | -| `packages/junior/src/chat/sandbox/session.ts` | Main sandbox create/get/reuse/keepalive logic | -| `packages/junior/src/chat/runtime/thread-state.ts` | Persists `app_sandbox_id` and dependency profile hash into thread state | -| `packages/junior/src/chat/runtime/turn-preparation.ts` | Restores persisted sandbox metadata at the start of a turn | -| `packages/junior/src/chat/providers/slack/turn.ts` | Saves each new sandbox ref to thread state through `onSandboxRefChanged` | -| `packages/junior/src/chat/agent/index.ts` | Owns turn timeout detection and abort | -| `packages/junior/src/chat/agent/resume.ts` | Persists timeout continuation state | -| `packages/junior/src/chat/app/production.ts` | Wires production timeout and continuation behavior | -| `packages/junior/src/chat/sandbox/AGENTS.md` | Explains that snapshots are used for runtime dependency warmup, not task workspaces | +| File | Why it matters | +| ------------------------------------------------------ | ------------------------------------------------------------------------ | +| `packages/junior/package.json` | Declares the `@vercel/sandbox` dependency used by the repo | +| `packages/junior/src/chat/sandbox/session.ts` | Main sandbox create/get/reuse/keepalive logic | +| `packages/junior/src/chat/runtime/thread-state.ts` | Persists `app_sandbox_id` and dependency profile hash into thread state | +| `packages/junior/src/chat/runtime/turn-preparation.ts` | Restores persisted sandbox metadata at the start of a turn | +| `packages/junior/src/chat/providers/slack/turn.ts` | Saves each new sandbox ref to thread state through `onSandboxRefChanged` | +| `packages/junior/src/chat/agent/index.ts` | Owns turn timeout detection and abort | +| `packages/junior/src/chat/agent/resume.ts` | Persists timeout continuation state | +| `packages/junior/src/chat/app/production.ts` | Wires production timeout and continuation behavior | ## Local implementation facts worth checking in any consumer diff --git a/.agents/skills/vercel-sandbox/references/troubleshooting-workarounds.md b/.agents/skills/vercel-sandbox/references/troubleshooting-workarounds.md index a3e69c9f7d..23633389ab 100644 --- a/.agents/skills/vercel-sandbox/references/troubleshooting-workarounds.md +++ b/.agents/skills/vercel-sandbox/references/troubleshooting-workarounds.md @@ -12,7 +12,7 @@ Use this reference when the user reports broken behavior or conflicting document | Need workspaces to survive stop/timeout boundaries | Stable Vercel Sandbox does not provide that durability model | Concepts docs, stable SDK docs, persistent-beta changelog | Externalize outputs, checkpoint work elsewhere, or migrate intentionally to persistent beta | | App request timed out, but the sandbox may still be running | The embedding system's timeout is shorter than the sandbox timeout | Consumer timeout config, sandbox timeout config, stable docs | Persist sandbox identity separately so the app can reconnect to the active sandbox later | | Turn fails even though the sandbox timeout is longer | Function or Junior turn timeout fired first | `packages/junior/src/chat/config.ts`, `packages/junior/src/chat/app/production.ts`, `packages/junior/src/chat/agent/index.ts` | Align function timeout, turn timeout, and sandbox timeout; persist sandbox identity before the app can be killed | -| Snapshot warmup exists, but repo edits still vanish between turns | Junior snapshots runtime dependencies, not task state | `packages/junior/src/chat/sandbox/AGENTS.md`, `packages/junior/src/chat/sandbox/snapshot/` | Keep using snapshots for dependency warmup; preserve task state elsewhere | +| Snapshot warmup exists, but repo edits still vanish between turns | Junior snapshots runtime dependencies, not task state | `packages/junior/src/chat/sandbox/snapshot/` | Keep using snapshots for dependency warmup; preserve task state elsewhere | | Persistent beta docs seem to conflict with stable lifecycle docs | They describe different models and package generations | Installed types, stable docs, beta changelog | State explicitly which model the current environment uses before giving advice | | Need more than the stable plan runtime ceiling | Plan limit reached even with a longer timeout configured | Pricing/limits docs | Reduce session duration, checkpoint externally, or change plan if appropriate | | Next turn starts from a clean repo after a timeout in Junior | The consumer app died before `app_sandbox_id` was persisted, even though the sandbox may still have been alive | `packages/junior/src/chat/sandbox/session.ts`, `packages/junior/src/chat/runtime/thread-state.ts`, `packages/junior/src/chat/runtime/turn-preparation.ts` | Check that `onSandboxRefChanged` saves the new ref to thread state right away | diff --git a/.claude/commands/opsx/apply.md b/.claude/commands/opsx/apply.md index cc5e0e5a64..48d82baf4c 100644 --- a/.claude/commands/opsx/apply.md +++ b/.claude/commands/opsx/apply.md @@ -116,8 +116,8 @@ Working on task 4/7: - [x] Task 2 ... -All tasks complete! Move any durable explanation into code, tests, policies, or -the owning AGENTS.md, then delete the completed change directory. +All tasks complete! Move any durable explanation into code, code comments, +tests, or policies, then delete the completed change directory. ``` **Output On Pause (Issue Encountered)** diff --git a/.cursor/commands/opsx-apply.md b/.cursor/commands/opsx-apply.md index 23e8dd74bd..a5646212bf 100644 --- a/.cursor/commands/opsx-apply.md +++ b/.cursor/commands/opsx-apply.md @@ -116,8 +116,8 @@ Working on task 4/7: - [x] Task 2 ... -All tasks complete! Move any durable explanation into code, tests, policies, or -the owning AGENTS.md, then delete the completed change directory. +All tasks complete! Move any durable explanation into code, code comments, +tests, or policies, then delete the completed change directory. ``` **Output On Pause (Issue Encountered)** diff --git a/.gitattributes b/.gitattributes index 7d9603701b..f7d0fc89b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,3 @@ # CI records these eval fixtures. Collapse them in pull request diffs and -# keep them out of AI review. See "Recordings" in packages/junior-evals/AGENTS.md. +# keep them out of AI review. packages/junior-evals/recordings/** linguist-generated=true diff --git a/AGENTS.md b/AGENTS.md index c51f88ad6d..179fa7a31f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,8 +1,6 @@ # Agent Instructions -Before you change code in a directory, read each `AGENTS.md` on the path from -the repo root. Read the reference files at the end when your work touches -their area. +Read the reference files at the end when your work touches their area. ## Rules @@ -23,7 +21,9 @@ their area. - Group files by feature. No feature-directory barrels. - Exported functions get a brief JSDoc that states intent. - Docs use ASD-STE100 English: common words, active voice, short sentences. -- Change an `AGENTS.md` or `README.md` only when intent, an invariant, or a +- This is the only `AGENTS.md`. Do not add one in a directory. Put intent in + a code comment next to the code that it governs. +- Change this file or a `README.md` only when intent, an invariant, or a boundary changes. Delete completed plans. Plans in `openspec/changes/` cannot override policy. @@ -82,9 +82,3 @@ Split long files at a feature boundary. Do not compress formatting to pass. - `policies/frontend-components.md`: dashboard UI ownership and styling. - `policies/code-comments.md`: when and how to comment. - `policies/documentation.md`: internal docs. -- `packages/junior/src/chat/AGENTS.md`: chat runtime. -- `packages/junior/tests/AGENTS.md`: test layout and fixtures. -- `packages/junior/migrations/AGENTS.md`: database migrations. -- `packages/junior-evals/AGENTS.md`: evals and recordings. -- `packages/junior-dashboard/AGENTS.md`: dashboard. -- `packages/junior-plugin-api/AGENTS.md`: plugin contracts. diff --git a/ast-grep/rules/no-eval-slack-actions-imports.yml b/ast-grep/rules/no-eval-slack-actions-imports.yml index 87ab7c348d..e3ebd49586 100644 --- a/ast-grep/rules/no-eval-slack-actions-imports.yml +++ b/ast-grep/rules/no-eval-slack-actions-imports.yml @@ -1,7 +1,7 @@ id: no-eval-slack-actions-imports language: TypeScript severity: error -message: Evals must not import Slack action internals. Send input through @junior-evals/fixture/inputs and assert the replies, tool calls, reactions, or turn states of the returned Conversation. See "Agent Test Fixture" in packages/junior-evals/AGENTS.md. +message: Evals must not import Slack action internals. Send input through @junior-evals/fixture/inputs and assert the replies, tool calls, reactions, or turn states of the returned Conversation. files: - packages/junior-evals/evals/**/*.ts - packages/junior-evals/evals/**/*.tsx diff --git a/ast-grep/rules/no-eval-slack-msw-helpers.yml b/ast-grep/rules/no-eval-slack-msw-helpers.yml index 16ff944d9f..fb0dbf7421 100644 --- a/ast-grep/rules/no-eval-slack-msw-helpers.yml +++ b/ast-grep/rules/no-eval-slack-msw-helpers.yml @@ -1,7 +1,7 @@ id: no-eval-slack-msw-helpers language: TypeScript severity: error -message: Evals must not queue or read Slack API calls through the junior test MSW helpers. Assert the replies, tool calls, reactions, or turn states of the returned Conversation. See "Agent Test Fixture" in packages/junior-evals/AGENTS.md. +message: Evals must not queue or read Slack API calls through the junior test MSW helpers. Assert the replies, tool calls, reactions, or turn states of the returned Conversation. files: - packages/junior-evals/evals/**/*.ts - packages/junior-evals/evals/**/*.tsx diff --git a/ast-grep/rules/no-queue-provider-module-imports.yml b/ast-grep/rules/no-queue-provider-module-imports.yml index 6ee87ef1a3..03fbd020f4 100644 --- a/ast-grep/rules/no-queue-provider-module-imports.yml +++ b/ast-grep/rules/no-queue-provider-module-imports.yml @@ -1,7 +1,7 @@ id: no-queue-provider-module-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/queue/provider.ts may import a queue provider module such as chat/queue/vercel.ts or chat/queue/bullmq.ts. Other code calls getQueueProvider(). See packages/junior/src/chat/queue/AGENTS.md. +message: Only packages/junior/src/chat/queue/provider.ts may import a queue provider module such as chat/queue/vercel.ts or chat/queue/bullmq.ts. Other code calls getQueueProvider(). files: - packages/junior/src/**/*.ts - packages/junior/src/**/*.tsx diff --git a/ast-grep/rules/no-sandbox-provider-module-imports.yml b/ast-grep/rules/no-sandbox-provider-module-imports.yml index 51ddc29d45..42dd7a3420 100644 --- a/ast-grep/rules/no-sandbox-provider-module-imports.yml +++ b/ast-grep/rules/no-sandbox-provider-module-imports.yml @@ -1,7 +1,7 @@ id: no-sandbox-provider-module-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). files: - packages/junior/src/**/*.ts - packages/junior/src/**/*.tsx @@ -19,7 +19,7 @@ rule: id: no-sandbox-provider-module-sibling-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). files: - packages/junior/src/chat/sandbox/*.ts ignores: @@ -37,7 +37,7 @@ rule: id: no-sandbox-provider-module-parent-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/vercel/. Other code calls getSandboxProvider(). files: - packages/junior/src/chat/sandbox/*/**/*.ts ignores: @@ -54,7 +54,7 @@ rule: id: no-docker-sandbox-provider-module-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). files: - packages/junior/src/**/*.ts - packages/junior/src/**/*.tsx @@ -72,7 +72,7 @@ rule: id: no-docker-sandbox-provider-module-sibling-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). files: - packages/junior/src/chat/sandbox/*.ts ignores: @@ -90,7 +90,7 @@ rule: id: no-docker-sandbox-provider-module-parent-imports language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/provider.ts may import a sandbox provider module such as chat/sandbox/docker/. Other code calls getSandboxProvider(). files: - packages/junior/src/chat/sandbox/*/**/*.ts ignores: diff --git a/ast-grep/rules/no-vercel-queue-sdk-outside-vercel-module.yml b/ast-grep/rules/no-vercel-queue-sdk-outside-vercel-module.yml index 52e57a7009..66de24a362 100644 --- a/ast-grep/rules/no-vercel-queue-sdk-outside-vercel-module.yml +++ b/ast-grep/rules/no-vercel-queue-sdk-outside-vercel-module.yml @@ -1,7 +1,7 @@ id: no-vercel-queue-sdk-outside-vercel-module language: TypeScript severity: error -message: Only packages/junior/src/chat/queue/vercel.ts may import @vercel/queue. Other code uses the provider-neutral queue functions and types. See packages/junior/src/chat/queue/AGENTS.md. +message: Only packages/junior/src/chat/queue/vercel.ts may import @vercel/queue. Other code uses the provider-neutral queue functions and types. files: - packages/junior/src/**/*.ts - packages/junior/src/**/*.tsx diff --git a/ast-grep/rules/no-vercel-sandbox-sdk-outside-vercel-module.yml b/ast-grep/rules/no-vercel-sandbox-sdk-outside-vercel-module.yml index 1f395b6d0f..75e7b82aad 100644 --- a/ast-grep/rules/no-vercel-sandbox-sdk-outside-vercel-module.yml +++ b/ast-grep/rules/no-vercel-sandbox-sdk-outside-vercel-module.yml @@ -1,7 +1,7 @@ id: no-vercel-sandbox-sdk-outside-vercel-module language: TypeScript severity: error -message: Only packages/junior/src/chat/sandbox/vercel/ may import @vercel/sandbox. Other code uses the provider-neutral sandbox functions and types. See packages/junior/src/chat/sandbox/AGENTS.md. +message: Only packages/junior/src/chat/sandbox/vercel/ may import @vercel/sandbox. Other code uses the provider-neutral sandbox functions and types. files: - packages/junior/src/**/*.ts - packages/junior/src/**/*.tsx diff --git a/openspec/README.md b/openspec/README.md index 3d5886780d..ba23fdf2f5 100644 --- a/openspec/README.md +++ b/openspec/README.md @@ -5,5 +5,5 @@ current behavior and cannot override `../policies/`. - Write a plan only when a change crosses many boundaries or needs a rollout order. -- When the work is done, move lasting rules into code, types, tests, or the - owning `AGENTS.md`. Then delete the plan. Git history is the archive. +- When the work is done, move lasting rules into code, types, tests, code + comments, or policies. Then delete the plan. Git history is the archive. diff --git a/openspec/config.yaml b/openspec/config.yaml index 6275e167a3..3972a45430 100644 --- a/openspec/config.yaml +++ b/openspec/config.yaml @@ -1,7 +1,7 @@ schema: spec-driven # OpenSpec artifacts are temporary implementation plans. Current behavior is -# documented by code, policies, tests, and owning module/package AGENTS.md files. +# documented by code, code comments, policies, and tests. # Project context (optional) # This is shown to AI when creating artifacts. diff --git a/packages/docs/src/content/docs/contribute/development.md b/packages/docs/src/content/docs/contribute/development.md index 0f36065a67..2fd3e150c2 100644 --- a/packages/docs/src/content/docs/contribute/development.md +++ b/packages/docs/src/content/docs/contribute/development.md @@ -88,7 +88,7 @@ docker network prune -f --filter label=dev.junior.sandbox docker image prune -a -f --filter label=dev.junior.sandbox=snapshot ``` -The limits of this provider are in `packages/junior/src/chat/sandbox/AGENTS.md`. +This provider is for local development and QA only. Do not run untrusted workloads with it. ## Work in isolated branches diff --git a/packages/docs/src/content/docs/contribute/local-agent-validation.md b/packages/docs/src/content/docs/contribute/local-agent-validation.md index 9b85296dd4..ba6a79d656 100644 --- a/packages/docs/src/content/docs/contribute/local-agent-validation.md +++ b/packages/docs/src/content/docs/contribute/local-agent-validation.md @@ -115,14 +115,14 @@ browser to the CLI's loopback listener. If local validation fails, use the first matching symptom: -| Symptom | First check | -| ------------------------------- | ----------------------------------------------------------------------------------------------- | -| Missing model credentials | Refresh env with `pnpm dev:env`, then rerun the same prompt. | -| Missing provider credentials | Configure the plugin/provider env required by the changed path. | -| OAuth callback cannot connect | Keep `pnpm dev` and its configured tunnel running while the CLI waits. | -| Context resets between commands | Expected; use one interactive `junior chat` process for context. | -| File-send UX needs validation | Local validation cannot verify it; the local adapter has no file-send tool. | -| Slack-specific behavior changed | Use `packages/junior/src/chat/slack/AGENTS.md`, the Slack skill, and integration tests instead. | +| Symptom | First check | +| ------------------------------- | --------------------------------------------------------------------------- | +| Missing model credentials | Refresh env with `pnpm dev:env`, then rerun the same prompt. | +| Missing provider credentials | Configure the plugin/provider env required by the changed path. | +| OAuth callback cannot connect | Keep `pnpm dev` and its configured tunnel running while the CLI waits. | +| Context resets between commands | Expected; use one interactive `junior chat` process for context. | +| File-send UX needs validation | Local validation cannot verify it; the local adapter has no file-send tool. | +| Slack-specific behavior changed | Use the Slack skill and integration tests instead. | ## Next Step diff --git a/packages/junior-amplitude/skills/amplitude/SOURCES.md b/packages/junior-amplitude/skills/amplitude/SOURCES.md index 65cec336e6..942a5d3562 100644 --- a/packages/junior-amplitude/skills/amplitude/SOURCES.md +++ b/packages/junior-amplitude/skills/amplitude/SOURCES.md @@ -9,7 +9,6 @@ Last updated: 2026-07-10 | `https://amplitude.com/docs/amplitude-ai/amplitude-mcp` | canonical | high | Hosted MCP endpoints, OAuth behavior, supported analytics surfaces, regional setup, and Amplitude access controls. | Treat live MCP schemas as authoritative for tool names and arguments. | | `https://github.com/amplitude/mcp-marketplace` | canonical | high | Amplitude-authored agent workflow examples and coverage across charts, dashboards, experiments, funnels, retention, cohorts, taxonomy, and users. | Adapt workflow intent; do not copy provider-specific prompt structure wholesale. | | `https://github.com/getsentry/junior/issues/810` | local product context | high | Required Junior use cases: active users, event segmentation, funnels, retention, saved charts, real-time activity, and user search. | The issue's REST/CLI options predate the hosted MCP recommendation. | -| `packages/junior-plugin-api/AGENTS.md` | local canonical | high | Manifest-owned provider integration and host-managed extension model. | Junior plugin contract. | | `packages/junior/src/chat/tools/skill/search-mcp-tools.ts` | local canonical | high | Junior-native progressive provider and tool discovery. | Use instead of Amplitude's progressive-discovery URL. | ## Adaptation decisions diff --git a/packages/junior-dashboard/AGENTS.md b/packages/junior-dashboard/AGENTS.md deleted file mode 100644 index 800c3226f5..0000000000 --- a/packages/junior-dashboard/AGENTS.md +++ /dev/null @@ -1,31 +0,0 @@ -# Dashboard - -- The dashboard changes no conversation state. Signed-in users can change - only their own profile fields. -- Store no state except auth sessions and profile settings. -- Check access to private conversations on the server. Hidden client routes - are not authorization. Check access before a detail `304`. -- The server turns runtime events into privacy-safe reporting events before - they reach the client. -- Routes fail closed when identity or required configuration is missing. -- Mock reporting data is for local UI work only, never a production fallback. -- No service worker or offline cache. -- Read the mailbox before history and publish both in one render. Workers - commit input before they acknowledge it, so input never disappears. -- A local send stays visible until a server snapshot has its Message id. The - browser and web ingress share one Message id function. -- Only Turn lifecycle events turn on the thinking indicator. Queued work is - not thinking. -- Paginated event reads never write into the cache of another resource. -- Display text keeps Markdown and Slack tokens. Do not resolve names in the - dashboard (the API returns `mentions`) or rewrite tokens on the server. -- `oxlint/display-text.ts` matches on field names. Do not name a field `text`, - `body`, or `summary` when it is not display text. -- Import Shiki grammars on demand through `client/code-languages.ts`, never - the full bundle. -- Do not call cache input shares a cache hit or failure rate. -- Each user-facing page has one `e2e/` spec. Specs import `test` from - `./test` and call `screenshot(page, name)` after load. -- Mocks and browser tests use one fixed time, `NOW`. - -UI rules: `src/client/components/AGENTS.md`. diff --git a/packages/junior-dashboard/src/client/components/AGENTS.md b/packages/junior-dashboard/src/client/components/AGENTS.md deleted file mode 100644 index a6bc688b7f..0000000000 --- a/packages/junior-dashboard/src/client/components/AGENTS.md +++ /dev/null @@ -1,36 +0,0 @@ -# Dashboard UI rules - -These apply to all dashboard UI. `pnpm dashboard-style:check` enforces the -token rules. - -- Add shadcn components with - `pnpm --filter @sentry/junior-dashboard exec shadcn add `. -- Change a `ui/` file only when every caller needs the same style. Do not - wrap a `ui/` component just to rename it or its props. -- Do not apply the shadcn CLI's global border or body resets. Keep the - Tailwind radius scale. -- Confirmations use `ui/alert-dialog`, not `window.confirm`. -- Short task forms use `ui/dialog`, never a `Drawer` or `DetailsPanel`. Mount - each dialog through `useSheet`, only while open. -- Put only inline elements in a `ui/trace` row button. -- Label icon-only controls with `TooltipContent size="compact"`, not the - native `title` attribute. -- Set `focusableWhenDisabled` on a tooltip trigger `ui/button` that can be - disabled. -- Field ids are `-error` and `-help`. -- Put a checkbox or radio inside its `