chore(agents): replace Cursor rule with tool-agnostic skill
- Preserve shipped-data tracking and validation guidance - Move repository instructions into the shared agent skill format
This commit is contained in:
parent
e504c5aae3
commit
3b13575a74
2 changed files with 29 additions and 27 deletions
29
.agents/skills/shipped-data-assets/SKILL.md
Normal file
29
.agents/skills/shipped-data-assets/SKILL.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
name: shipped-data-assets
|
||||||
|
description: Keep shipped data assets present in git branch archives and tool updates. Use when adding or changing defaults under data/, editing their .gitignore rules, changing the update installer, or updating bundled-data coverage in tests/test_bundled_updates.py.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Shipped Data Assets
|
||||||
|
|
||||||
|
Tool auto-update downloads a git branch archive. Files matched by `.gitignore` are omitted from that archive and never reach users.
|
||||||
|
|
||||||
|
## Maintain shipped defaults
|
||||||
|
|
||||||
|
- Add a `.gitignore` negation for every shipped path under `data/`, following existing patterns such as:
|
||||||
|
- `!data/skills/**`
|
||||||
|
- `!data/help/**`
|
||||||
|
- `!data/vocab_base.txt`
|
||||||
|
- `!data/translation_contexts.json`
|
||||||
|
- Do not rely on `UpdateThread.should_install` alone; ignored files never appear in the downloaded archive.
|
||||||
|
- Extend `_SHIPPED_DATA_FILES` or `ShippedDataTrackingTests` in `tests/test_bundled_updates.py` when adding a shipped path.
|
||||||
|
- Keep user-local files ignored and protected, including `data/vocab.txt`, `data/last_update_sha.txt`, `data/wolf_*.json`, and `data/api_keys.json`.
|
||||||
|
|
||||||
|
## Verify tracking
|
||||||
|
|
||||||
|
Run `git check-ignore -- <shipped-path>` for each affected file. A shipped path must exit with status 1, indicating that it is not ignored.
|
||||||
|
|
||||||
|
Run the bundled-update tests after changing shipped paths, ignore rules, or installer behavior:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python -m unittest tests.test_bundled_updates.ShippedDataTrackingTests
|
||||||
|
```
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
description: Shipped data/ assets must be git-trackable so tool updates include them
|
|
||||||
globs: "{.gitignore,data/**,gui/guide_tab.py,gui/main.py,tests/test_bundled_updates.py}"
|
|
||||||
alwaysApply: false
|
|
||||||
---
|
|
||||||
|
|
||||||
# Shipped data/ and tool updates
|
|
||||||
|
|
||||||
Tool auto-update downloads a **git branch archive**.
|
|
||||||
Anything matched by `.gitignore` is omitted from that archive and never reaches users.
|
|
||||||
|
|
||||||
## When adding or changing shipped defaults under `data/`
|
|
||||||
|
|
||||||
- Add a negation under `.gitignore` (same pattern as skills/help):
|
|
||||||
- `!data/skills/**`
|
|
||||||
- `!data/help/**`
|
|
||||||
- `!data/vocab_base.txt`
|
|
||||||
- `!data/translation_contexts.json`
|
|
||||||
- Do **not** rely on `UpdateThread.should_install` alone - ignored files never appear in the zip.
|
|
||||||
- Extend `_SHIPPED_DATA_FILES` / `ShippedDataTrackingTests` in `tests/test_bundled_updates.py` when adding a new shipped path.
|
|
||||||
- User-local files stay ignored/protected: `data/vocab.txt`, `data/last_update_sha.txt`, `data/wolf_*.json`, `data/api_keys.json`.
|
|
||||||
|
|
||||||
## Quick check
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git check-ignore -- data/help/index.json # must exit 1 (not ignored)
|
|
||||||
```
|
|
||||||
Loading…
Reference in a new issue