docs: add AGENTS.md and model-selection guidance#59
Open
felipebalbi wants to merge 2 commits into
Open
Conversation
Adds a comprehensive AGENTS.md at the repo root with project conventions, build/test commands, and code-style guidance distilled from CI workflows and existing source. Updates copilot-instructions.md with a leading note directing agents to AGENTS.md as the canonical source, avoiding drift between the two files. Assisted-by: GitHub Copilot:claude-opus-4.7
Adds guidance on choosing between premium and cheap models for code-assistant work, including escalation/de-escalation triggers, sub-agent routing defaults, /fleet rules, and session-hygiene tips. Keeps premium reasoning for genuinely hard problems and routes mechanical work to cheaper models. Assisted-by: GitHub Copilot:claude-opus-4.7
There was a problem hiding this comment.
Pull request overview
Adds repository-specific agent guidance intended to be the canonical reference for AI coding assistants (and humans), plus a minimal Copilot instructions file that points to it.
Changes:
- Introduces
AGENTS.mdwith repo overview, layout, conventions, and CI-derived build/lint/doc commands. - Adds a “Model selection & cost discipline” section to guide cost-effective agent/model usage.
- Adds
.github/copilot-instructions.mdas a minimal pointer toAGENTS.md.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
AGENTS.md |
New canonical agent guidance for repo structure, workflows, conventions, and model-selection guidance. |
.github/copilot-instructions.md |
Minimal Copilot-facing pointer directing agents to AGENTS.md. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # AGENTS.md | ||
|
|
||
| Canonical guidance for AI coding assistants (and humans) working on | ||
| `openDevicePartnership/bq40z50`. Keep this file in sync with reality; if |
Comment on lines
+35
to
+39
| - `#![deny(unsafe_code)]` and `#![deny(missing_docs)]` are enforced at | ||
| the crate level via `[lints.rust]` in `Cargo.toml`. **Do not add | ||
| `unsafe` code.** The only exception is auto-generated code under | ||
| `src/versions/gen_r*.rs`, which is wrapped with `#[allow(unsafe_code)]` | ||
| in `src/versions/mod.rs`. |
|
|
||
| Exactly one of `r1`/`r3`/`r4`/`r5` is expected to be enabled at a time; | ||
| many internal items are `#[cfg(...)]`-gated on combinations of these. | ||
| `build.rs` re-emits `cargo:rebuild-if-changed=device_R<rev>.yaml` for |
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.
This PR adds an
AGENTS.mdfile (see agents.md) tailored to this repository, distilled from the project's CI workflows, configuration, source layout, and conventions. The goal is to give any AI coding agent (Copilot, Claude, Cursor, etc.) enough repo-specific context to be immediately productive without re-deriving conventions from scratch.Commit 1 —
docs: add AGENTS.md ...AGENTS.mdwith project overview, build/test/lint/fmt commands, code layout, contribution patterns, and any quirks observed (e.g.,defmtfeature constraints, nightly-onlyrustfmt.tomloptions, workspace layout)..github/copilot-instructions.mdupdated to point atAGENTS.mdas the authoritative source, so Copilot-specific configuration does not drift out of sync with the broader agent guidance. Where nocopilot-instructions.mdexisted, a minimal pointer file was added.Commit 2 —
docs(AGENTS.md): add model selection & cost discipline section/fleetrules, and session-hygiene tips. The aim is to keep premium reasoning for genuinely hard work and route mechanical edits to cheaper models, reducing wasted spend without sacrificing quality.No source code, dependencies, or CI behavior is changed by this PR — it is documentation only.
Marked as draft for review; happy to iterate on tone, scope, or any repo-specific detail that should be tightened up.
Assisted by GitHub Copilot (Claude Opus 4.7).