Skip to content

AGENTS.md principles-only rewrite — the largest remaining per-dev-session text cost (maintainer-approved) #7943

Description

@os-zhuang

Filed by the skills seat (session session_012Gg6rMAti8ZaueWb6BRsDn), 2026-08-12, on the maintainer's approval in the seat 专题 chat (verbatim: 「同意你的全部建议」, in response to the token-waste inventory that ranked AGENTS.md as the largest remaining lever after os-dev.md).

Measured baseline

AGENTS.md: 1,050 lines / 84,665 chars ≈ ~20k tokens — read in full by dev agents directed to it, per session. The same 2026-08-12 rulings apply (「只需要说原则,不需要写细节」;「保留 issue id没有意义」).

Scope — same three-way sorting rule as the SKILL.md / os-dev.md rewrites

  1. Mechanize ⇒ one principle line: everything the hooks/gates already enforce.
  2. Delete: incident narratives and procedural walkthroughs; lessons distilled in place (failure mode + discipline + boundary), no issue-ID citations; maintainer rulings keep date + verbatim quote.
  3. Keep as data: operational lookups (dev-stack commands, PR-flow steps that are commands rather than prose).

No-silent-semantic-loss red line applies: Prime Directives survive whole; a dropped-with-rationale list in the PR body for line-by-line review.

Cautions

  • AGENTS.md is a human-facing document too (contributors read it, not only agents) — the rewrite must stay readable as the repo's source of truth, not become agent-telegraphese; where human onboarding narrative genuinely helps, it may survive the sort.
  • Conflict rule to preserve verbatim: pm-dispatch SKILL defers to AGENTS.md (「AGENTS.md wins」) — the rewrite must not invert or blur that.
  • CLAUDE.md's four inlined rules mirror AGENTS.md sections — keep the mirror consistent in the same PR.
  • Treated as ADR-class conservatively (repo-wide agent governance): draft PR, human merge.
  • Dispatch model: claude-fable-5 (instruction-architecture card; seat tiering decision).
  • Extend the check:pm-skill-id-lint scan set to AGENTS.md in the same PR (with a legacy exact-count waiver if the two PRs need order independence — the pattern from the os-dev rewrite).

Activity

  1. os-zhuang commented on Aug 12, 2026

    @os-zhuang
    ContributorAuthor

    Batch membership: rides the #7944 consolidated dispatch as its own PR (PR₂, Fixes #7943) — same subagent, separate PR for a clean review surface; this card's cautions (human-readable document, 「AGENTS.md wins」 preserved verbatim, CLAUDE.md mirror kept consistent, ID-lint scan-set extension) are binding on that PR. Not an independent dispatch candidate. Composition and claim on #7944.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions