Skip to content

docs: add AGENTS.md and model-selection guidance#29

Open
felipebalbi wants to merge 2 commits into
OpenDevicePartnership:mainfrom
felipebalbi:improve-agentic-workflow
Open

docs: add AGENTS.md and model-selection guidance#29
felipebalbi wants to merge 2 commits into
OpenDevicePartnership:mainfrom
felipebalbi:improve-agentic-workflow

Conversation

@felipebalbi
Copy link
Copy Markdown
Contributor

This PR adds an AGENTS.md file (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 ...

  • New AGENTS.md with project overview, build/test/lint/fmt commands, code layout, contribution patterns, and any quirks observed (e.g., defmt feature constraints, nightly-only rustfmt.toml options, workspace layout).
  • .github/copilot-instructions.md updated to point at AGENTS.md as the authoritative source, so Copilot-specific configuration does not drift out of sync with the broader agent guidance. Where no copilot-instructions.md existed, a minimal pointer file was added.

Commit 2 — docs(AGENTS.md): add model selection & cost discipline section

  • Adds a "Model selection & cost discipline" section covering when to use premium vs. cheap models, escalation/de-escalation triggers, sub-agent routing defaults, /fleet rules, 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).

Introduce a comprehensive AGENTS.md at the repository root that

captures the workspace layout, the no_std / no-panic / MSRV / additive-

features invariants, the workspace clippy contract, the local mirror of

the CI gates (fmt, clippy, test, doc, msrv, deny, vet, machete, nostd),

the commit and AI-attribution rules from CONTRIBUTING.md and

copilot-instructions.md, dependency policy, per-pilot notes for the

common assistants, a pitfalls table, and a quick-reference cheat sheet.

Prepend a short pointer to .github/copilot-instructions.md so Copilot

discovers AGENTS.md while keeping copilot-instructions.md authoritative

for commit-message formatting and AI attribution.

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
@felipebalbi felipebalbi marked this pull request as ready for review May 26, 2026 20:03
@felipebalbi felipebalbi requested a review from a team as a code owner May 26, 2026 20:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds repository-specific guidance for AI coding agents and points Copilot’s repo instructions to that broader guide.

Changes:

  • Adds AGENTS.md with workspace layout, invariants, commands, conventions, contribution guidance, and model/cost guidance.
  • Updates .github/copilot-instructions.md to reference AGENTS.md while preserving Copilot-specific commit and attribution rules.

Reviewed changes

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

File Description
AGENTS.md Adds comprehensive AI-agent contributor guidance for the Rust workspace.
.github/copilot-instructions.md Adds a pointer to AGENTS.md as the broader repository guide.

Comment thread AGENTS.md
| `cargo deny check` fails on license | Pulled in a GPL/AGPL crate | Replace with a permissively-licensed alternative or stop using it. |
| `cargo vet` fails | New transitive dep without audit | Add an audit (`cargo vet certify ...`) or pick a different crate. |
| `cargo fmt --check` fails | Forgot to format | Run `cargo fmt`. |
| `nostd` workflow passes locally, fails in CI | Default features differ | Run `cargo check --target thumbv8m.main-none-eabihf --no-default-features --locked` to match. |
Comment thread AGENTS.md
Comment on lines +100 to +103
APIs newer than 1.90 in `embedded-mcu-hal`, or newer than 1.85 in
`storage_bus`, without bumping the corresponding `rust-version`
*and* documenting why in `embedded-mcu-hal/src/lib.rs` (which today
calls out `u16::is_multiple_of` as the reason for 1.90).
Comment thread AGENTS.md
Comment on lines +106 to +107
and `cargo vet`. The only allowed git source organization is
`embassy-rs` (see `deny.toml` → `[sources.allow-org]`).
@felipebalbi felipebalbi enabled auto-merge (squash) May 26, 2026 20:10
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.

2 participants