File tree Expand file tree Collapse file tree 3 files changed +58
-0
lines changed
Expand file tree Collapse file tree 3 files changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ # Polaris Copilot Instructions
2+
3+ Follow the repository's automated style configuration in
4+ ` pyproject.toml ` and ` .pre-commit-config.yaml ` .
5+
6+ - Keep changes consistent with existing Polaris patterns.
7+ - For Python, follow the path-specific instructions in
8+ ` .github/instructions/python.instructions.md ` .
9+ - Prefer changes that pass the configured pre-commit hooks without
10+ adding ignores or suppressions.
Original file line number Diff line number Diff line change 1+ ---
2+ applyTo : " **/*.py"
3+ ---
4+
5+ # Python Instructions
6+
7+ - Keep lines at 79 characters or fewer whenever possible.
8+ - Adhere to ` ruff format ` formatting.
9+ - Keep imports at module scope whenever possible. Avoid local imports
10+ unless they are needed for circular-import avoidance, lazy loading, or
11+ optional dependencies.
12+ - Avoid nested functions whenever possible.
13+ - Prefer public functions before private helper functions whenever
14+ practical.
15+ - Prefer private module-level helper functions over nested helpers.
Original file line number Diff line number Diff line change 1+ # Polaris Agent Instructions
2+
3+ These instructions apply to the whole repository unless a deeper
4+ ` AGENTS.md ` overrides them.
5+
6+ ## Source of truth
7+
8+ - Follow the repo's automated style and lint configuration in
9+ ` pyproject.toml ` and ` .pre-commit-config.yaml ` .
10+ - If an instruction here conflicts with automated tooling, follow the
11+ automated tooling.
12+
13+ ## Python style
14+
15+ - Keep Python lines at 79 characters or fewer whenever possible.
16+ - Use ` ruff format ` style. Do not preserve manual formatting that Ruff
17+ would rewrite.
18+ - Keep imports at module scope whenever possible. Avoid local imports
19+ unless they are needed to prevent circular imports, defer expensive
20+ dependencies, or avoid optional dependency failures.
21+ - Avoid nested functions whenever possible. Prefer private module-level
22+ helpers instead.
23+ - Put public functions before private helper functions whenever
24+ practical.
25+ - Name private helper functions with a leading underscore when that fits
26+ existing repo conventions.
27+
28+
29+ ## Validation
30+
31+ - Run relevant pre-commit hooks on changed files before finishing when
32+ practical.
33+ - Prefer fixing lint and formatting issues rather than suppressing them.
You can’t perform that action at this time.
0 commit comments