Add Copilot PR review instructions for FRC robot code - #56
Merged
Conversation
…ecific *.instructions.md)
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
Updated naming convention for logged subsystem references.
There was a problem hiding this comment.
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.mdcovering 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:RobotStateenum, gerund state names (INTAKINGnotINTAKE),setRobotState()must be first ininitialize()FreeSpin.java= velocity-controlled,Positional.java= position-controlled; no cross-contaminationconstants/orDeviceIDs.javais a violation...FollowerAlignedRequest/...FollowerOpposedRequest, no compass directions in request object namesAngularVelocity,Angle,Distance); never rawdoublefor physical quantities@Loggedrequired on every subsystem; wildcard imports preferred.github/instructions/*.instructions.md— Path-scoped instructions activated viaapplyTofront-matter:constants.instructions.mdconstants/**TalonFXneeds a_CONFIGURATIONconstant; all setup instatic {}blockstates.instructions.mdcommands/states/**setRobotState()first rule;BasePrepscommand/inputvariable prefix patternsubsystems.instructions.mdsubsystems/**periodic()must be lightweightcommands.instructions.mdcommands/**ChoreoTrajconstants not raw strings;end()cleanupdeviceids.instructions.mdDeviceIDs.java0–9,10–29,30–49); one constant per motor; no subsystem name repetitionrobotcontainer.instructions.mdRobotContainer.javapublic static final *Instance+private final logged*Instancepair;TRY_prefix for state commands; bindings in separateconfig*Bindings()methods