Skip to content

Add Copilot PR review instructions for FRC robot code - #56

Merged
TaylerUva merged 7 commits into
mainfrom
copilot/create-co-pilot-pr-review-instructions
Aug 2, 2026
Merged

Add Copilot PR review instructions for FRC robot code#56
TaylerUva merged 7 commits into
mainfrom
copilot/create-co-pilot-pr-review-instructions

Conversation

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

All PRs lacked FRC-aware review context, leaving Copilot unable to enforce team standards like the state machine architecture, FreeSpin/Positional motor subsystem split, constants discipline, and naming conventions from the team wiki.

Changes

  • .github/copilot-instructions.md — Global baseline applied to every PR:

    • State machine rules: one RobotState enum, gerund state names (INTAKING not INTAKE), setRobotState() must be first in initialize()
    • Motor architecture: FreeSpin.java = velocity-controlled, Positional.java = position-controlled; no cross-contamination
    • Hardcoded number flagging: any numeric literal outside constants/ or DeviceIDs.java is a violation
    • Follower motor naming: ...FollowerAlignedRequest/...FollowerOpposedRequest, no compass directions in request object names
    • WPILib typed units everywhere (AngularVelocity, Angle, Distance); never raw double for physical quantities
    • @Logged required on every subsystem; wildcard imports preferred
  • .github/instructions/*.instructions.md — Path-scoped instructions activated via applyTo front-matter:

File Scope Key additions
constants.instructions.md constants/** Every TalonFX needs a _CONFIGURATION constant; all setup in static {} block
states.instructions.md commands/states/** setRobotState() first rule; BasePreps command/input variable prefix pattern
subsystems.instructions.md subsystems/** FreeSpin/Positional split enforcement; follower request naming; periodic() must be lightweight
commands.instructions.md commands/** No hardware instantiation in commands; ChoreoTraj constants not raw strings; end() cleanup
deviceids.instructions.md DeviceIDs.java CAN ID range comments (0–9, 10–29, 30–49); one constant per motor; no subsystem name repetition
robotcontainer.instructions.md RobotContainer.java public static final *Instance + private final logged*Instance pair; TRY_ prefix for state commands; bindings in separate config*Bindings() methods

Copilot AI linked an issue Aug 1, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Create co-pilot PR review instructions for FRC robot code Add Copilot PR review instructions for FRC robot code Aug 1, 2026
Copilot AI requested a review from TaylerUva August 1, 2026 18:46
Updated naming convention for logged subsystem references.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds GitHub Copilot review/coding instruction documents tailored to this FRC WPILib command-based robot codebase, so automated PR feedback can consistently enforce the team’s state machine architecture, subsystem split, constants discipline, and naming conventions.

Changes:

  • Introduces a repository-wide baseline in .github/copilot-instructions.md covering architecture, naming, constants/units, and logging conventions.
  • Adds path-scoped instruction files under .github/instructions/ to enforce tighter rules in key areas (subsystems, state commands, constants, DeviceIDs, RobotContainer, and commands).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
.github/instructions/subsystems.instructions.md Adds subsystem-specific architecture and logging rules (FreeSpin/Positional split, follower request naming, constructor/config rules).
.github/instructions/states.instructions.md Adds strict state-command structure rules (1 command/state, setRobotState() first in initialize(), no numeric literals).
.github/instructions/robotcontainer.instructions.md Defines RobotContainer composition/binding conventions and state transition command patterns.
.github/instructions/deviceids.instructions.md Defines DeviceIDs structure, naming, and CAN ID range documentation requirements.
.github/instructions/constants.instructions.md Defines constants-file structure, typed-units expectations, and TalonFX configuration requirements.
.github/instructions/commands.instructions.md Adds general command rules around requirements, inputs, constants discipline, and safe cleanup in end().
.github/copilot-instructions.md Adds the global baseline conventions and review expectations for the whole repo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/instructions/constants.instructions.md
Comment thread .github/copilot-instructions.md
Comment thread .github/instructions/robotcontainer.instructions.md Outdated
@TaylerUva
TaylerUva marked this pull request as ready for review August 2, 2026 00:00
@TaylerUva
TaylerUva requested a review from a team as a code owner August 2, 2026 00:00
@TaylerUva
TaylerUva merged commit ba5df90 into main Aug 2, 2026
1 check passed
@TaylerUva
TaylerUva deleted the copilot/create-co-pilot-pr-review-instructions branch August 2, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create co-pilot PR review instructions

3 participants