Expand AGENTS.md with current repo and reporting rules

This commit is contained in:
2026-07-09 11:19:10 +03:00
parent 4d859dc0a6
commit db0c1dede9
26 changed files with 1708 additions and 54 deletions

View File

@@ -0,0 +1,30 @@
# Change Safety Checklist
Use this before and after non-trivial changes.
## Scope
- [ ] I identified whether this touches backend, UI, security, Windows service, subscription/routing, testing/release.
- [ ] I read the matching skill file.
- [ ] I avoided unrelated rewrites.
- [ ] I did not introduce a second source of truth.
## Tauri boundary
- [ ] New/changed Rust command has matching TypeScript wrapper.
- [ ] DTOs are synchronized between Rust and TypeScript.
- [ ] Error shape is structured and actionable.
- [ ] Blocking work is not run on async runtime thread.
## UX
- [ ] User-visible actions are explicit.
- [ ] Disabled states have reasons.
- [ ] Pending changes are visible before apply.
- [ ] Secrets are redacted.
## Validation
- [ ] Relevant frontend build/test was run or explicitly not run with reason.
- [ ] Relevant Rust fmt/clippy/test was run or explicitly not run with reason.
- [ ] Windows-specific behavior was not claimed unless tested on Windows.

View File

@@ -0,0 +1,37 @@
# Communication Checklist
Используй перед финальным ответом по любой нетривиальной задаче.
## Структура
- [ ] Ответ начинается с `Коротко` или с такой же короткой сводки на 2-4 пункта.
- [ ] Измененные файлы или зоны проекта перечислены в начале ответа, а не спрятаны в конце.
- [ ] Для каждого важного файла понятно: что изменилось и зачем.
- [ ] Важные изменения поведения, безопасности или состояния отделены от мелких деталей.
- [ ] Проверки разделены на `Проверено` и `Не проверено`.
- [ ] Риски написаны явно.
## Понятность
- [ ] Нет плотных абзацев длиннее 4-5 строк.
- [ ] Нет терминов и аббревиатур без пользы или краткого объяснения.
- [ ] Нет полных логов, если они не нужны для вывода.
- [ ] Нет пересказа каждой строки diff, если пользователь не просил.
- [ ] Нет мутных фраз вроде `улучшена архитектура` без объяснения, что стало проще, безопаснее или понятнее.
## Честность
- [ ] Windows/service/elevation поведение не названо проверенным, если оно не тестировалось на Windows.
- [ ] У пропущенных проверок есть простая причина.
- [ ] Ответ не говорит `готово`, если важные проверки пропущены.
## Быстрая самопроверка
Перед отправкой ответ должен отвечать на вопросы:
1. Что изменилось или найдено?
2. В каких файлах?
3. Зачем это нужно?
4. Что реально проверено?
5. Что не проверено?
6. Где остался риск?

View File

@@ -0,0 +1,41 @@
# Checklist: Explanation Quality
Используй перед финальным ответом или PR summary.
## Обязательное
- [ ] В начале есть короткий итог на 24 пункта.
- [ ] Есть список файлов или таблица `файл / что / зачем`.
- [ ] Термины объяснены простыми словами, если они важны.
- [ ] Нет длинных полотен без заголовков.
- [ ] Нет пересказа каждой строки diff.
- [ ] Указано, что проверено.
- [ ] Указано, что не проверено.
- [ ] Риски написаны прямо, без «должно работать».
## Хороший формат
```md
## Коротко
- ...
## Файлы
| Файл | Что | Зачем |
|---|---|---|
## Проверки
- Выполнено: ...
- Не выполнено: ...
## Риски
- ...
```
## Плохие признаки
- Один огромный абзац.
- Много терминов без пользы.
- «Исправлена логика» без указания файла и эффекта.
- «Проверено» без команды или способа проверки.
- «Не проверял Windows, но всё готово».
- Список из 25 пунктов одинаковой важности.

View File

@@ -0,0 +1,30 @@
# Release Checklist
## Build
- [ ] `npm ci`
- [ ] `npm run build`
- [ ] `cargo fmt --all -- --check`
- [ ] `cargo clippy --all-targets --all-features -- -D warnings`
- [ ] `cargo test --all-targets`
- [ ] `npm run tauri -- build`
## Windows smoke
- [ ] Fresh Windows VM smoke test.
- [ ] ProxiFyre install plan and real install.
- [ ] sing-box install plan and real install.
- [ ] External SOCKS5 route works.
- [ ] Local sing-box subscription route works.
- [ ] Start/stop/restart service controls work.
- [ ] Uninstall does not delete unmanaged paths.
## Security/release hygiene
- [ ] CSP enabled.
- [ ] Capabilities minimal.
- [ ] No raw secrets in repo/logs.
- [ ] Subscription redaction checked.
- [ ] Generated config writes are safe.
- [ ] Artifact version is correct.
- [ ] Large assets reviewed/compressed if practical.

View File

@@ -0,0 +1,36 @@
# Security Checklist
## Secrets
- [ ] Subscription URLs are redacted through parser-based logic.
- [ ] Proxy credentials are not logged.
- [ ] Outbound configs with secrets are not printed in diagnostics.
- [ ] Error messages do not include tokens/passwords/userinfo.
## Tauri/webview
- [ ] CSP is enabled.
- [ ] No broad shell permissions added.
- [ ] No direct command execution from UI input.
- [ ] No `dangerouslySetInnerHTML` or equivalent unsafe HTML rendering without sanitization.
## Network fetch
- [ ] Subscription fetch has timeout.
- [ ] URL scheme is restricted.
- [ ] Local/private/link-local/metadata address behavior is explicit.
- [ ] Redirect behavior does not bypass blocked address checks.
## Filesystem
- [ ] Critical writes are atomic where practical.
- [ ] Corrupt config handling does not silently discard user state.
- [ ] Recursive delete has strict path/marker checks.
- [ ] Temp elevated scripts use unpredictable names and safe directory/ACL when practical.
## Windows services
- [ ] Managed service is verified by name and PathName/metadata.
- [ ] Fuzzy candidates are not automatically controlled.
- [ ] UAC cancellation has clear error.
- [ ] Plan-only remains side-effect-free.

24
.agent/checklists/ui.md Normal file
View File

@@ -0,0 +1,24 @@
# UI Checklist
## Structure
- [ ] No direct `invoke(...)` outside `src/api/tauriCommands.ts`.
- [ ] New reusable UI uses `src/ui/*` components or extends them.
- [ ] New business/display logic is not buried in JSX if it can be tested separately.
- [ ] `App.tsx` was not made worse without justification.
## Accessibility and behavior
- [ ] Buttons have accessible names.
- [ ] Toggle state uses `aria-pressed` or equivalent.
- [ ] Tabs/popovers preserve keyboard and screen-reader behavior.
- [ ] Reduced motion preference is respected where animation is added.
- [ ] Errors are visible and readable.
## ProxyWarden-specific
- [ ] External SOCKS5 route does not require sing-box.
- [ ] Local sing-box route requires selected server and readiness.
- [ ] Route chain matches actual backend state.
- [ ] Apply readiness gives a clear reason.
- [ ] Summary remains read-only.