Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Several instructions conflict, omit supported file types, or inaccurately describe validation behavior.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Introduces modular, path-scoped Copilot guidance and a dedicated C++ validation agent.
Changes:
- Adds repository and C++/Bazel guidance.
- Extracts build and review instructions.
- Adds automated build/test delegation.
File summaries
| File | Description |
|---|---|
AGENTS.md |
Adds repository-wide guidance index. |
.github/copilot-instructions.md |
Redirects Copilot to scoped guidance. |
.github/instructions/ovms-auto-validate.instructions.md |
Requires delegated validation. |
.github/instructions/cpp-sources.instructions.md |
Adds C++ source rules. |
.github/instructions/cpp-headers.instructions.md |
Adds C++ header rules. |
.github/instructions/code-review.instructions.md |
Defines C++ review standards. |
.github/instructions/build-workflow.instructions.md |
Documents build and test workflows. |
.github/instructions/bazel-build.instructions.md |
Defines Bazel conventions. |
.github/agents/build-validate.agent.md |
Adds the validation subagent. |
Review details
Suppressed comments (1)
.github/agents/build-validate.agent.md:62
- This instruction conflicts with line 21, which requires restarting a stopped matching container. Clarify that validation stops only when the container cannot be found or restarted, otherwise agents may abort despite having a reusable container.
- If the build container is not running, report that and stop
- Files reviewed: 9/9 changed files
- Comments generated: 8
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+14
to
+18
| 1. Find the build container that mounts the current workspace, deterministically, in **one** command. | ||
| It lists all containers (running + stopped) whose mounts include this workspace, puts running | ||
| ones first, and prints a single name: | ||
| ```bash | ||
| for id in $(docker ps -aq); do docker inspect "$id" --format '{{if .State.Running}}0{{else}}1{{end}} {{.Name}} {{range .Mounts}}{{.Source}};{{end}}'; done | grep -F "$(pwd)" | sort | sed -E 's#^[01] /([^ ]+).*#\1#' | head -1 |
| ## Output Format | ||
| Return a compact structured report: | ||
| - **Build**: PASS/FAIL (if FAIL: last 20 lines of error output, lines truncated at 200 chars) | ||
| - **Tests**: PASS/FAIL (if FAIL: list of failing test names + assertion message only, one line each) |
| @@ -0,0 +1,32 @@ | |||
| --- | |||
| applyTo: "**/BUILD" | |||
| @@ -0,0 +1,27 @@ | |||
| --- | |||
| applyTo: "**/*.cpp" | |||
| description: "Use when: editing, implementing, fixing, or refactoring C++ source files in the OVMS repository" | ||
| applyTo: "src/**/*.{cc,cpp,h,hpp}" | ||
| --- | ||
| After completing code changes to OVMS C++ files, you MUST run the **build-validate** subagent to verify the build, run relevant tests, and check lint. |
| | `make targz_package` | Extract `.tar.gz` release package | | ||
| | `make ovms_release_images` | Build CPU and GPU release Docker images | | ||
| | `make run_unit_tests` | Run C++ unit tests in the `-build` container | | ||
| | `make test_functional` | Run Python functional te| `make style` | All code style checks: spell, clang-format, cpplint, cppclean (see Style Checking section) | |
Comment on lines
+22
to
+25
| - **No dangling references / temporaries bound to `const T&`**: | ||
| - Never give a `const T&` parameter a default that constructs a temporary (e.g. `const std::string& p = ""`). Use an overload or pass by value. | ||
| - When a `const T&` is stored, verify the referenced object outlives its use. | ||
| - Prefer overloads over default arguments for non-trivial types passed by reference. |
| | When you are… | Read | | ||
| |---|---| | ||
| | Editing a C++ **header** (`*.hpp`) | [.github/instructions/cpp-headers.instructions.md](.github/instructions/cpp-headers.instructions.md) | | ||
| | Editing a C++ **source** (`*.cpp`) | [.github/instructions/cpp-sources.instructions.md](.github/instructions/cpp-sources.instructions.md) | |
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.
🛠 Summary
JIRA/Issue if applicable.
Describe the changes.
🧪 Checklist
``