Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ Usage notes:
- ALWAYS run `npm run lint` before committing - CI will fail otherwise
- ALWAYS run `npm run pretty` to format code consistently
- ESLint configuration in `.eslintrc.json` enforces React/JSX standards
- Prettier configuration in `.prettierrc` handles formatting
- Prettier configuration in `.prettierrc` handles formatting (100 char width, no semicolons, single quotes, trailing commas)

✅ Good: `import Browser from 'webextension-polyfill'` (single quotes, no semicolon)
❌ Bad: `import Browser from "webextension-polyfill";` (double quotes, semicolon)

- Naming conventions: component directories use PascalCase; feature folders use kebab-case; entry files are typically `index.jsx` or `index.mjs`
- Avoid heavy dependencies; if necessary, justify and keep bundle size under control
Expand All @@ -166,6 +169,7 @@ Usage notes:
- Commit subject: imperative, capitalize first word; separate subject/body with a blank line; wrap at ~72 characters; explain what and why.
- PRs: link related issues, summarize scope/behavior changes; include screenshots for UI changes.
- Note i18n updates in PR description when `src/_locales/` changes.
- If any validation step is skipped, include `Validation skipped: <reason>; <runtime impact or "no runtime files touched">` in the PR description.
Copy link

Copilot AI Feb 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an inconsistency in how the validation skip format is presented. Line 172 uses angle brackets as placeholders (<reason>, <runtime impact or "no runtime files touched">), while line 263 provides a concrete example without angle brackets (docs-only change; no runtime files touched.). While angle brackets typically indicate placeholders in documentation, it would be clearer to explicitly state this or use a consistent format. Consider adding text like "(replace with actual values)" after the template on line 172, or reformatting the template to match the concrete example style more clearly.

Suggested change
- If any validation step is skipped, include `Validation skipped: <reason>; <runtime impact or "no runtime files touched">` in the PR description.
- If any validation step is skipped, include `Validation skipped: <reason>; <runtime impact or "no runtime files touched">` in the PR description (replace the `<...>` placeholders with actual values).

Copilot uses AI. Check for mistakes.

### Directory Structure

Expand Down Expand Up @@ -204,7 +208,7 @@ src/

## Localization

- Source of truth: `src/_locales/en/main.json`; do not change keys
- Source of truth: `src/_locales/en/main.json`; do not change existing keys (only add new ones)
- Add new strings to `en/main.json` first, then propagate to other locales
- Register new locales in `src/_locales/resources.mjs`
- Preserve placeholders and product names; keep punctuation/quotes intact
Expand Down Expand Up @@ -240,6 +244,8 @@ The extension supports multiple AI providers:
- Updating API integration: Modify files in `src/services/apis/`
- Adding new UI component: Create in `src/components/`

**Note:** Ask before deleting/renaming files, modifying build config/manifests, or making changes that affect multiple site adapters. If the user explicitly requests one of these changes, proceed and document scope and risk in the PR summary.

## Time Expectations

- Do not interrupt builds or long-running commands unless they appear hung or unresponsive.
Expand All @@ -252,12 +258,10 @@ The extension supports multiple AI providers:

## Critical Validation Steps

1. ALWAYS run `npm run build` after any code changes
2. ALWAYS manually load and test the built extension in a browser (no automated testing available)
3. ALWAYS verify the build creates expected file structure (non-empty bundles, no missing files)
4. ALWAYS test core extension functionality (popup, content script injection, keyboard shortcuts)

Always build and manually test the extension in a browser before considering any change complete. Simply running the build is NOT sufficient - you must load the extension and test actual functionality.
1. Runtime-impacting changes (`src/**`, `src/manifest*.json`, `build.mjs`, `package*.json`, `safari/**`): run `npm run build`, verify expected build artifacts, and run manual browser smoke tests.
2. Behavior-adjacent localization changes (`src/_locales/**` only): run `npm run build` and manual browser smoke tests.
3. Docs-only changes (`*.md`, `screenshots/**`): build/manual browser tests may be skipped, but the PR description must include `Validation skipped: docs-only change; no runtime files touched`.
4. When in doubt, treat the change as runtime-impacting and execute the full validation flow.
Comment on lines +261 to +264
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions restructuring validation into three categories, but this section is formatted as four numbered items and item 4 is guidance rather than a validation step. Consider either updating the PR description to match, or reformatting item 4 as an unnumbered note so the numbered list reflects only the actual validation categories/steps.

Copilot uses AI. Check for mistakes.

---

Expand Down