There have been numerous requests to incorporate more assistance for AI flows into Patina. We believe more can be done in the project while still respecting the AI Policy.
This issue tracks adding core code review skills for the Patina project. The idea being to increase the amount of feedback that can be addressed prior to human review.
In particular, Patina has domain-specific conventions that general-purpose AI reviewers have been found to not fully understand such as:
- The Patina Component model
- Dependency injection,
IntoComponent derivations, Config/ConfigMut/Service/Hob parameter semantics, and component lifecycle (initialization vs. execution phases)
- Stored dependency management
- Storing and managing dependency references in components
- Mocking and testing
- Patina On-System test infrastructure,
mockall, and so on
- Safety conventions
- Preference for
zerocopy over raw slice manipulation, minimizing unsafe, safe abstraction conventions, fallible constructors returning Result
- Module organization
- Breaking out implementation in logical files with a clean namespace, avoiding usage of mod.rs, selecting which crate content goes into (e.g. core vs SDK)
- Build & testing through
cargo make
- All commands going through cargo make (cargo make check, cargo make fmt, cargo make test)
- Code documentation guidelines
- What's expected in safety and doc comments
- Etc.
The solution will likely consist of a top-level file(s) such as .github/copilot-instructions.md that covers topics like:
- Items in the prior list
- Patina architectural elements/activities (core, SDK, components, platform integration)
- Coding conventions specific to Patina
- Common anti-patterns to flag
- UEFI-specific semantics and guidelines
- Security review considerations for UEFI firmware
- Testing expectations (unit tests required for new logic, mock patterns via
automock + extension traits)
There have been numerous requests to incorporate more assistance for AI flows into Patina. We believe more can be done in the project while still respecting the AI Policy.
This issue tracks adding core code review skills for the Patina project. The idea being to increase the amount of feedback that can be addressed prior to human review.
In particular, Patina has domain-specific conventions that general-purpose AI reviewers have been found to not fully understand such as:
IntoComponentderivations,Config/ConfigMut/Service/Hobparameter semantics, and component lifecycle (initialization vs. execution phases)mockall, and so onzerocopyover raw slice manipulation, minimizing unsafe, safe abstraction conventions, fallible constructors returningResultcargo makeThe solution will likely consist of a top-level file(s) such as
.github/copilot-instructions.mdthat covers topics like:automock+ extension traits)