diff --git a/.agent/skills/aim-common-rules/SKILL.md b/.agent/skills/aim-common-rules/SKILL.md new file mode 100644 index 0000000..a6910f3 --- /dev/null +++ b/.agent/skills/aim-common-rules/SKILL.md @@ -0,0 +1,98 @@ +--- +name: aim-common-rules +description: UNNC AIM team's repository and code standards. Covers repository naming (competition / aim- academic-year / reusable), branch and Conventional Commits rules, and Python (autopep8 / PEP 8) and C++ (clang-format / clang-tidy) formatting, with ready-to-copy canonical rule files. Use when creating or naming a repository, validating a ROS2 package.xml name, creating a branch, writing a git commit message, composing a competition workspace (git submodules under src/), or setting up Python or C++ formatting (.clang-format / setup.cfg / .clang-tidy). +--- + +# UNNC AIM Team — Repository & Code Standards + +This skill is the **single entry point** for the team's standards. It consolidates and operationalizes the written rules under `.github/profile/`: + +- Repository naming / branch / commit rules ← `.github/profile/README.md` +- C++ standard ← `.github/profile/standard.cpp.md` +- Python standard ← `.github/profile/standard.py.md` + +The written docs remain the source of truth; this skill turns them into actionable checklists plus ready-to-copy rule files (`assets/`). + +> **Language rule for generated artifacts:** documentation prose is language-agnostic, but **all code, code comments, and commit messages must be in American English** (e.g. `color`, `behavior`, `optimize` — not *colour*, *behaviour*, *optimise*). + +## Where to look + +| Task | Read | Copy this file | +|---|---|---| +| Create / name a repo, validate a ROS2 package name | [references/repo-naming.md](references/repo-naming.md) | — | +| Clone & organize a competition **workspace** (git submodules) | [references/workspace-organization.md](references/workspace-organization.md) | — | +| Create a branch, write a commit message | [references/git-workflow.md](references/git-workflow.md) | — | +| Format / configure **Python** | [references/python-formatting.md](references/python-formatting.md) | [assets/setup.cfg](assets/setup.cfg) | +| Format / configure **C++** | [references/cpp-formatting.md](references/cpp-formatting.md) | [assets/.clang-format](assets/.clang-format) + [assets/.clang-tidy](assets/.clang-tidy) | +| Set up **VS Code** (extensions, Pylance, format-on-save, spelling) | [references/python-formatting.md](references/python-formatting.md) §3, §5, §6 + `profile/README.md` §1.6 | [assets/.vscode/extensions.json](assets/.vscode/extensions.json) + [assets/.vscode/settings.json](assets/.vscode/settings.json) | + +## Naming quick reference (most-used — read this first) + +| Repo type | Pattern | Separator | Example | +|---|---|---|---| +| **Competition** (one year / one match / one robot) | `[2-digit year][match abbr]_[robot (optional)]_[package]` | underscore `_` | `26RC_R2_controller`, `26RC_interfaces` | +| **Internal / academic-year** (non-competition) | `aim-[4-digit year]-[package]` (long-term libs may drop the year) | hyphen `-` | `aim-2526-py-coursework`, `aim-rookie-courses` | +| **External / reusable / lib** | `BrandingRepo` or `package_name` | free | `RoboMark`, `ros2_hik_camera` | + +- Year/match tokens: `26RC` = 2026 Robocon; `25RM` = 2025 RoboMaster; `2526` = academic year 2025-2026 (only in `aim-*`). +- **ROS2 package-name consistency:** if the repo is a single ROS package, the `` in `package.xml` must match the repo's "package" segment; prefixes like `ros2_` are usually **dropped** in `` (e.g. `ros2_hik_camera` → `hik_camera`). +- Default branch is always `main` (**never** `master`); competition / stable repos must not push directly to `main` — use a Pull Request. + +> Full rules, decision tree, and known inconsistencies: [references/repo-naming.md](references/repo-naming.md). + +## Commit message quick reference (Conventional Commits) + +``` +(): + + # optional, wrap at <=72 chars + +