Repository navigation
docs: trim AGENTS.md to rules no tool enforces and drop vendor names - #624
Merged
Merged
Conversation
AGENTS.md loads into every agent session. Keep only rules that change behavior and that no lint, test or CI job already enforces; point to the docs that hold procedures. Describe the independent high-risk auditor without naming a vendor, in AGENTS.md, CONTRIBUTING.md and doc/testing_matrix.md, and say which audit_kind each auditor records.
leehack
marked this pull request as ready for review
September 23, 2026 20:36
Contributor
|
Chat app preview removed 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.
Summary
AGENTS.md loads into every agent session. This trims it from 406 lines (~5.0k tokens) to 159 (~2.3k) and removes vendor names.
prepare_workspace.dartpackage checks, the coverage gate, broken docs links), generic design advice, the literal Flutter version and incident history.doc/testing_matrix.md,doc/high_risk_pre_merge_readiness.md,native-and-web-sync.md,release-workflow.md,doc/webgpu_bridge.md). Every moved rule was already in its destination doc.check_platform_boundaries.dartin the gate block (a CI gate the old list left out),litert-lm-nativein the owner list, and a note that the tooling tests pin phrases in this file.verify_release_docs_versions.dartrun before install-snippet changes, validation before the final commit of a cross-repo change, the owner-repo commit-and-push step, the source-wide TODO/FIXME rule, the obvious-type condition on local inference, and explicit parameter, return and field types on all public API (not only new API).doc/testing_matrix.mdnow describe the high-risk auditor as "an operator or a fresh agent session that took no part in the implementation, never the PR author".doc/high_risk_pre_merge_readiness.mdsays which existingaudit_kindeach records. The schema and evaluator are unchanged.Production-readiness scope
Completeness checklist
PR type guidance
Test Plan
dart run tool/prepare_workspace.dartdart format --output=none --set-exit-if-changed .dart analyzedart run tool/testing/check_platform_boundaries.dartdart test -p vm -j 1 --exclude-tags local-only: N/A for docs; the suites that read these files ran (below).dart test -p chrome --exclude-tags local-only: N/A, no Dart change.0252bf820:dart test -p vm test/unit/tooling/ test/unit/test_structure/ test/unit/hook/native_release_tag_test.dart: 568 passed, 4 skipped.verify_release_docs_versions.dartandcheck_webgpu_bridge_tag.dart: pass.verify_release_docs_versions.dart --release-prep: fails on the pendingllamadart_llama_cpp_flutterbump from #630;mainatae7b74528fails with the same output, so it is not caused by this PR.0252bf820: 15 of 20 fail their test (high_risk_review_policy_test,safe_pr_head_update_test,verify_release_docs_companion_pins_test): pinned phrases in all four files, and deleting the whole AGENTS.md Pull requests section. The native-tag ones also failverify_release_docs_versions.dart. The 5 survivors pass the three suites above,verify_release_docs_versions.dartandcheck_webgpu_bridge_tag.dart: theaudit_kindsentence in the runbook and the four AGENTS.md sentences fixed after audit (TODO/FIXME scope, owner-repo push step, local inference, explicit types on all public API). No test or tool reads them, so the audits checked them.Matrix Evidence
0252bf820--release-prep)--release-prepfails the same way onmain(pending companion bump from #630); not PR-causedReview Notes
0252bf820fdf539c397cc1062738f4f0ba7b2e59: 8 checks pass, 14 skipped (docs-only selection; see #623).The maintainer confirmed
audit_kind: operator-ownedfor a fresh non-Codex agent session.High-risk regression review
classify_high_risk_changes.dart:regressionPolicy)a214f62baeach mapped every old rule; later rounds are blocking-only. Throughb7519af2c: Codex (gpt-6-astra, reasoning effort xhigh, per their launch headers). Froma214f62ba: fresh Claude workflow subagents (claude-opus-5-5), recorded asoperator-owned.cdd9b150d: ACCEPT, 0 P1/P2, five P3s; four fixed in1251a2f96, the fifth in8e903d5cd.1251a2f96: ACCEPT, one P2 (weaker two-mode release-docs check) and one P3 (validation timing); both fixed in8e903d5cd.8e903d5cd: ACCEPT, 0 P1/P2. One P3 kept: the naming line partly repeats lints, which don't fail CI outsidelib/.454f99d8b(merge of #606): ACCEPT, 0 P1. P2: this body named the old pair (fixed here). P3: owner-repo commit/push step no longer explicit.4f07e3334(merge of #616): ACCEPT, 0 P1. P2: the stale body pair again (fixed here). P3s: that push step and the narrowed TODO/FIXME scope; both fixed inb7519af2c.b7519af2c: ACCEPT, 0 P1/P2. P3: local inference lost "when the type is obvious"; fixed ina214f62ba.a214f62ba(Claude): ACCEPT, 0 P1/P2, 130 rules mapped; merge ancestry, four-file diff and the #606/#616 content checked. P3-1 (explicit types only on new public API) fixed in331217e15; P3-2 (classifier-only high-risk trigger) kept.331217e15(Claude, blocking-only): ACCEPT, 0 P1/P2. P3-2 again, and a P3: the release-prep publish boundary and the advisory-check rule now live only in linked docs. Voided whenmainmoved (#630).0252bf820(merge of #630; Claude,audit:624i, blocking-only): ACCEPT, 0 P1, one P2, five P3s. It checked the four-file diff, the head/base refs at start and end, and AGENTS.md againstmain's v0.4.1-1 native and bridge tag rules. Findings below.0252bf820fdf539c397cc1062738f4f0ba7b2e59/mainatae7b745280321a41d78c9d5bd2600d7e08f79570(merge base)high_risk_readiness.darton the exact pair, bindings read live from GitHub: exit 2,unverifiedPrerequisites(the local ceiling). The evidence cites the three tests above with their exact-head mutants and the0252bf820audit asoperator-owned.a214f62ba) in331217e15: AGENTS.md again asks for explicit parameter, return and field types on all public API.0252bf820verdict is ACCEPT):standardforlib/src/core/decision/decision_engine.dart(capability probe, backend gating). The list by meaning stays in CONTRIBUTING.md and the PR template, which AGENTS.md requires filling. The auditor suggests one AGENTS.md line or a wider classifier.release-workflow.md.qaidentity; the evaluator rejects it (retiredQaProfileProhibited), and CONTRIBUTING.md and the docs still prohibit it.doc/testing_matrix.md.check_webgpu_bridge_tag.dartnow; CI still runs it, including on docs-only PRs, and it passes on head andmain.audit_kindsentence matches the schema and evaluator, which check only the enum, so the mapping is procedure, not code.verify_release_docs_versions.dart --release-prepfails on the pendingllamadart_llama_cpp_flutterbump from #630, with the same output and exit 1 onmainatae7b74528.