AGENTS.md
special-pages/AGENTS.mdAGENTS.md
Quality
100/100
Scores the file, not the repository.Length
355 words
5 headings · 2 code blocksRepository
70
— · pushed 0 days agoLast changed
3 days ago
First indexed 3 days ago.1# Special Pages23Preact-based HTML/CSS/JS applications embedded in DuckDuckGo browsers. Each page is an isolated app with privileged native API access.45## Structure67```8pages/<name>/9├── app/ # Preact components (App.jsx, *.module.css)10├── src/index.js # Page class with messaging methods11├── messages/ # JSON schemas → auto-generates types/12├── types/<name>.ts # Generated types (DO NOT EDIT)13├── public/ # Static assets, index.html, locales/14└── integration-tests/15shared/ # Reusable components (Button, Card, Switch, Text) and functions16```1718## Code Style1920Pages communicate with native via `@duckduckgo/messaging`. Define schemas in `messages/`:21- `*.request.json` + `*.response.json` → async request/response22- `*.notify.json` → fire-and-forget notification23- `*.subscribe.json` → push-based subscription2425Types in `types/` are auto-generated from `messages/` schemas - never edit these manually.2627Use JSDoc types in JavaScript files. Import types via a `@typedef` after imports:2829```javascript30/** @typedef {import('./types.js').MyType} MyType */31```3233Use the Page Object pattern (see `integration-tests/<name>.js` for helpers) when writing integration tests.3435Localized strings are compiled from multiple `strings.json` files into a single `public/locales/en/<page>.json` file. This is manually uploaded to Smartling to generate each `public/locales/<locale>/<page>.json` file.3637## Testing3839Run from `special-pages/` directory:4041| Command | Purpose |42|---------|---------|43| `npm run test-unit` | Unit tests |44| `npm run test-int -- --reporter list` | Integration tests (all platforms) |45| `npm run test-int -- --project ios --repoter list` | Single platform |46| `npm run test-int -- --grep "test name" --reporter list` | Run integration tests matching a pattern |47| `npm run test-int -- pages/new-tab/integration-tests/new-tab.spec.js --reporter list` | Run single integration test suite |48| `npm run test-int-x -- --reporter list` | Exclude screenshot tests |49| `npm run test.screenshots -- --reporter list` | Screenshot tests only |5051Top-level commands (`npm run build`, `npm run lint`) also work from this directory.5253## Notes5455- Use `.github/pull_request_template.md` when creating a pull request.56- Use the `Build Branch` PR comment links (docs/static pages/integration pages) in testing steps for pull requests.57- Playwright MCP server (if available) or `npx playwright` can be used to validate UI changes if desired. Use `npm run watch -- --page <name>` if user hasn't already done so and then navigate to `http://localhost:8000`.58
Also in duckduckgo/content-scope-scripts
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| duckduckgo/content-scope-scriptstypes-generator/AGENTS.md · 70 | AGENTS.md | testarchtypesdo-not | 73/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-actions.mdc · 70 | Cursor rules | buildteststyletypes+4 | 93/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-broker-protection-rest.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-click-to-load.mdc · 70 | Cursor rules | teststyletypesgit+2 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-detectors.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer-native.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-duckplayer.mdc · 70 | Cursor rules | setupteststyletypes+4 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-fingerprinting.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-message-bridge.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-a.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-b.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-standalone-features-c.mdc · 70 | Cursor rules | teststyletypesgit+4 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-web-compat-and-telemetry.mdc · 70 | Cursor rules | teststyletypesgit+3 | 89/100 | 3 days ago | |
| duckduckgo/content-scope-scripts.cursor/rules/strict-zero-errors-batch.mdc · 70 | Cursor rules | testtypesgitdo-not+1 | 81/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsAGENTS.md · 70 | AGENTS.md | buildtestlint-formatstyle+5 | 83/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsinjected/AGENTS.md · 70 | AGENTS.md | buildteststylearch+2 | 92/100 | 3 days ago | |
| duckduckgo/content-scope-scriptsmessaging/AGENTS.md · 70 | AGENTS.md | testarchtesting-strategyapi | 66/100 | 3 days ago |
Diff against types-generator/AGENTS.md Diff against .cursor/rules/strict-broker-protection-actions.mdc Diff against .cursor/rules/strict-broker-protection-rest.mdc Diff against .cursor/rules/strict-click-to-load.mdc Diff against .cursor/rules/strict-detectors.mdc Diff against .cursor/rules/strict-duckplayer-native.mdc Diff against .cursor/rules/strict-duckplayer.mdc Diff against .cursor/rules/strict-fingerprinting.mdc Diff against .cursor/rules/strict-message-bridge.mdc Diff against .cursor/rules/strict-standalone-features-a.mdc Diff against .cursor/rules/strict-standalone-features-b.mdc Diff against .cursor/rules/strict-standalone-features-c.mdc Diff against .cursor/rules/strict-web-compat-and-telemetry.mdc Diff against .cursor/rules/strict-zero-errors-batch.mdc Diff against AGENTS.md Diff against injected/AGENTS.md Diff against messaging/AGENTS.md
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TryGhost/Ghoste2e/AGENTS.md · 55k | AGENTS.md | setupteststylearch+2 | 100/100 | 3 days ago | |
| wpscanteam/wpscanAGENTS.md · 9.7k | AGENTS.md | setupbuildteststyle+6 | 100/100 | 2 days ago | |
| code-yeongyu/oh-my-openagentpackages/web/AGENTS.md · 67k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 2 days ago | |
| mui/material-uiAGENTS.md · 99k | AGENTS.md | setupbuildtestlint-format+9 | 100/100 | 3 days ago | |
| aaif-goose/gooseAGENTS.md · 52k | AGENTS.md | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| n8n-io/n8npackages/@n8n/agents/AGENTS.md · 199k | AGENTS.md | buildteststylearch+3 | 100/100 | 3 days ago | |
| SkeneTechnologies/skene-cookbookAGENTS.md · 51 | AGENTS.md | setupbuildtestlint-format+7 | 100/100 | 2 days ago | |
| elastic/elasticsearchx-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/AGENTS.md · 78k | AGENTS.md | buildtestlint-formatstyle+2 | 100/100 | 3 days ago |
