Skip to content

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

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

docs: add AGENTS.md and model-selection guidance#41
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).

Author an AGENTS.md at the repository root that documents the build,test, lint, doc, fuzz, deny, and MSRV commands actually used by.github/workflows/check.yml, the three independent cargo workspaces(libs, examples/rt685s, bootloader-tool), the bootloader memorylayout and prelude conventions for IMXRT6xx, code-style rules,git/commit policy (per-commit author identity, Assisted-by trailer,LF line endings), and a workflow checklist for AI agents.Fold in the existing .github/copilot-instructions.md content as asuperset and prepend a pointer note to that file so tools that lookfor it by name are redirected to the new authoritative location.

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:04
Copilot AI review requested due to automatic review settings May 26, 2026 20:04
@felipebalbi felipebalbi requested a review from a team as a code owner May 26, 2026 20:04
Copy link
Copy Markdown

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

Adds repository-specific operating guidance for AI coding agents by introducing a comprehensive AGENTS.md (as the single “superset” guide) and updating Copilot instructions to point to it, aiming to reduce repeated re-discovery of CI commands, workspace layout, and contribution conventions.

Changes:

  • Add AGENTS.md documenting repo structure, workspaces, CI-equivalent commands, and contribution/commit rules.
  • Add model-selection / cost-discipline guidance to AGENTS.md.
  • Update .github/copilot-instructions.md to defer to AGENTS.md as the authoritative reference.

Reviewed changes

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

File Description
AGENTS.md New agent-oriented repo guide (layout, CI commands, conventions, model-selection guidance).
.github/copilot-instructions.md Adds a pointer noting AGENTS.md is now authoritative.

Comment thread AGENTS.md
# AGENTS.md

Operational guide for AI coding agents (GitHub Copilot, Claude, etc.) working in
the `openDevicePartnership/ec-slimloader` repository. This file is the
Comment thread AGENTS.md
Comment on lines +143 to +146
# libs and examples use the same flag set:
# -F clippy::suspicious -D clippy::correctness -F clippy::perf -F clippy::style
# bootloader-tool uses -D for clippy::suspicious instead of -F.

Comment thread AGENTS.md
Comment on lines +155 to +157
# from bootloader-tool/ (host target)
cargo clippy -- \
-D clippy::suspicious -D clippy::correctness -F clippy::perf -F clippy::style
Comment thread AGENTS.md
Comment on lines +199 to +200
`examples/rt685s/ci.sh` builds the workspace once with no extra features and
then once per feature from `(defmt, non-secure)`.
@felipebalbi felipebalbi enabled auto-merge (squash) May 26, 2026 20:11
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