mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-07-06 09:04:38 +00:00
1.2 KiB
1.2 KiB
Agent Rules
This file defines high-priority implementation and documentation rules for coding agents.
Always Apply
- Prefer minimal, reversible changes.
- Preserve behavior unless explicitly requested to change it.
- Do not claim verification succeeded unless commands were run.
- Report exact verification commands and pass/fail outcomes.
Documentation Rules
For changes in src/, apply these rules to exported/public APIs:
- Use TSDoc (
/** ... */) with a short behavior-focused summary. - Add explicit
@paramtags for each parameter. - Add explicit
@returnstags. - Add
@throwsfor intentional thrown errors. - Update docs in the same change as the behavior change.
- Avoid repeating obvious implementation detail.
Testing Rules
- Add or update tests in the same change when behavior changes.
- Run targeted tests first, then broader suites as needed.
- Keep test naming in
<method> <conditions> <expected>format.
Minimum Verification
npm run typecheck
npm exec vitest run test/action.test.ts test/action-runner.test.ts test/manifest.test.ts test/io.test.ts
When changing scripts:
npm exec vitest run test/dev_scripts.test.ts