Skip to content

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

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

docs: add AGENTS.md and model-selection guidance#67
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 an AGENTS.md at the repository root that documents the crate's shape (no_std, MSRV 1.85, strict clippy lints, defmt gating), the exact CI commands (cargo +nightly fmt, cargo hack feature-powerset clippy/check/test, no-std target check, doc build), coding conventions, and PR workflow expectations.

Update .github/copilot-instructions.md to point to AGENTS.md for general guidance while keeping its PR-review-specific notes.

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:02
@felipebalbi felipebalbi requested a review from a team as a code owner May 26, 2026 20:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 documentation intended to help AI coding agents (and humans) contribute effectively, and aligns Copilot’s repo instructions to point at that shared guidance.

Changes:

  • Introduces AGENTS.md with repo overview, CI-equivalent local command checklist, coding/testing conventions, and contribution workflow notes.
  • Updates .github/copilot-instructions.md to defer general guidance to AGENTS.md while keeping review-specific notes in place.
  • Adds a “Model selection & cost discipline” section to AGENTS.md.

Reviewed changes

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

File Description
AGENTS.md New repo-wide agent guidance (setup, CI commands, conventions, workflow, and model-selection section).
.github/copilot-instructions.md Adds a pointer to AGENTS.md as the authoritative general contribution guide.

Comment thread AGENTS.md

Required toolchains:

- **stable** Rust (currently builds on 1.95+, MSRV is 1.85.0).
Comment thread AGENTS.md
this order and fix anything that fails before opening a PR.

```bash
# 1. Formatting — NIGHTLY ONLY. Will warn-and-skip on stable.
Comment thread AGENTS.md
Comment on lines +298 to +318
### `/fleet` (parallel sub-agents) rules

- Fleet mode multiplies cost by the fleet width. Apply the rules
above *per worker*, not in aggregate.
- Split a fleet job along complexity lines: route the cheap,
parallelisable workers (file edits, test runs, doc updates) to a
cheap model; reserve premium models for the small number of
workers that need real reasoning.
- If every worker in a fleet would need a premium model, the work is
probably not a good fit for fleet mode — reconsider the
decomposition before paying N× premium.

### Session hygiene

- Keep sessions short and focused. Long premium sessions are the
single largest source of waste because every turn re-processes the
full history.
- Use `/compact` when the conversation grows long, and `/new` for
unrelated work.
- Prefer `/ask` for one-off side questions so they don't extend the
main session.
@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