docs: update claude md (#985)

* docs: update claude md

* fix: comment pr
This commit is contained in:
ananaBMaster 2026-02-20 10:53:03 -08:00 committed by GitHub
commit ee313e923b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 54 deletions

View file

@ -38,7 +38,7 @@ jobs:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: code-review@claude-code-plugins
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} --comment'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
claude_args: |

View file

@ -179,46 +179,6 @@ pnpm lint
pnpm lint:fix
```
## Architecture
### Extension Structure
The extension follows WXT's entrypoints pattern:
- **`src/entrypoints/background/`** - Background service worker
- Handles extension lifecycle, message routing, proxy fetch
- Manages translation queues, database cleanup, config backup
- Coordinates between content scripts and popup
- **`src/entrypoints/*.content/`** - Content scripts injected into web pages
- `host.content` - Main article reading and analysis UI
- `selection.content` - Selection translation popup
- `side.content` - Side panel interface
- `guide.content` - Onboarding guide overlay
- **`src/entrypoints/popup/`** - Extension popup UI
- **`src/entrypoints/options/`** - Settings page (multi-page React app)
### Extension Config Migration
When changing the schema of the config, you need to add a migration script to the `src/utils/config/migration-scripts` directory, update the `CONFIG_SCHEMA_VERSION` constant and write examples for testing migration scripts.
### State Management Architecture
Uses Jotai atoms with a custom storage adapter pattern:
- **Config Atom** ([src/utils/atoms/config.ts](src/utils/atoms/config.ts))
- Single source of truth for extension settings
- Syncs with browser.storage.local via `storageAdapter`
- Uses `deepmerge-ts` with array overwrite strategy for updates
- Watches for changes across extension contexts (popup, content, options)
- Handles visibility changes to prevent stale config in inactive tabs
- **Storage Adapter** ([src/utils/atoms/storage-adapter.ts](src/utils/atoms/storage-adapter.ts))
- Abstraction over browser.storage API
- Provides `get`, `set`, `watch` methods with Zod schema validation
- Enables reactive state sync across extension contexts
## Commit Conventions
Follow [Conventional Commits](https://www.conventionalcommits.org/) with these types:
@ -227,19 +187,6 @@ Standard types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `bui
Custom types: `i18n`, `ai`
Examples:
- `feat: add openrouter provider support`
- `fix: resolve translation state race condition`
- `i18n: update Japanese translations`
- `ai: improve read article prompt for better analysis`
Enforced via commitlint and husky pre-commit hooks.
## Pull Request Process
follow `.claude/commands/create-pr.md`
## Important Notes
As AI, you should be extremely concise. Sacrifice grammar for the sake of concision.