Skip to content

docs(agents): fit root AGENTS.md under 24 KB host rule cap via owner links - #7844

Open
loopx-agent wants to merge 2 commits into
mainfrom
codex/agents-md-24kb-cap-20261101
Open

loopx-agent wants to merge 2 commits into
mainfrom
codex/agents-md-24kb-cap-20261101

Conversation

@loopx-agent

Copy link
Copy Markdown
Collaborator

Summary

  • Goal / Source: Root AGENTS.md was 32,227 bytes (targeting only Codex's 32 KiB project_doc_max_bytes discovery budget), which exceeded Antigravity's 24,000-byte (24 KB) per-rule-file injection cap and caused the tail of AGENTS.md (~8.2 KB) to be truncated in Antigravity sessions unless duplicated in global host rules.
  • Observable Outcome:
    1. Condense AGENTS.md from 32,227 bytes to 23,855 bytes (< 24,000 bytes / < 23.3 KiB) while preserving every section heading, inbound/outbound #anchor route, actor, ordering, modality, evidence provenance, continuation, stop condition, and merge-authority boundary.
    2. Route the full self-merge eligibility checklist and benchmark seam/helper exceptions into skills/loopx-pr-merge/SKILL.md#self-merge-eligibility-and-benchmark-exceptions and link to it from AGENTS.md#merge-authority-and-validation.
    3. Update docs/development/README.md#agent-instruction-loading-and-maintenance and tests/test_repository_instruction_delivery.py (ANTIGRAVITY_RULE_FILE_MAX_BYTES = 24_000 alongside DEFAULT_PROJECT_DOC_MAX_BYTES = 32 * 1024) so regression tests enforce zero truncation across both Antigravity and Codex.

Validation

  • pytest tests/test_repository_instruction_delivery.py -q (6 passed)
  • python examples/capability-extension-placement-doc-smoke.py (ok)
  • python examples/canary/premerge-validation-gate-smoke.py (ok)
  • python -m loopx.cli check --scan-path AGENTS.md --scan-path docs/development/README.md --scan-path skills/loopx-pr-merge/SKILL.md --scan-path tests/test_repository_instruction_delivery.py

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Reviewer: actor_kind=model_agent; model=gpt-6.1-sol; provider=OpenAI; reasoning_effort=max; declaration_source=runtime_reported

Request changes conclusion (author-owned PR; GitHub blocks formal self-review)

阻塞发现 F1 / P2:根文件新增“所有条件满足 且指定 premerge 命令 passes”,删除了既有等价风险验证选项;迁入的 merge workflow 仍允许该选项。需要先恢复一致的验证选择。

动机 / Motivation

在有文件注入上限的宿主中工作的 Agent,需要完整读到仓库约束,而不是只收到 AGENTS.md 的前半段。 同一 24,000-byte 截断边界下,基线根文件会丢失 8,227 bytes,head 可完整装入;但其自合并条款同时把“指定检查或等价风险验证”改成指定命令必须通过。 独立同 fixture 对照确认了字节、路由和 anchor 改善,也确认根文件与迁入 owner 对验证替代方案给出冲突要求,因此尚不能宣称义务完全等价。

把长检查表放回已有 owner、用 root 链接按需读取,是合理的加载修复;但这里承诺的交付是完整规则可达且语义不变,不能只看缩短多少字节。本次不改变既有合并授权、required checks 或质量门禁;不以文件装入证明模型遵守,也不把模拟字节边界称作已验证的真实宿主运行。

改动思路 / Approach

审查先读不可变基线完整 AGENTS,再逐段比较全部 819 行 diff、已有加载规则和相关 owner。根文件保留核心触发条件,完整 self-merge eligibility / benchmark exceptions 迁入现有 merge SKILL,这一放置合理,不需要新协议或自动加载集合。旧 design、frontend、scope-fit 等按需 owner 仍有入口;新测试能验证文件/section 路由与 inbound anchors。

问题在具体决策条件:root 与 task owner 都要求在批准/合并前读,却给出不同的验证选择。把详情迁走不能顺带把 root 改成更严格的第二 owner。最小修复是在 root 保留 or equivalent risk-based validation,或把验证选择完整交给链接 owner;所需授权、质量、required checks、精确 head review/readiness 一项也不减少。

具体改动 / Changes

完整四文件 +274/-352:AGENTS +204/-337、加载说明 +9/-7、已有 merge SKILL +47、测试 +14/-8。根文件实际由 32,227 降为 23,855 bytes。独立对同一 head 测试 fixture 仅适配 ROOT 路径后执行 base/head:base 因 24,000-byte 边界截去 8,227 bytes,结果 1 fail/5 pass;head 6 pass,两修订均满足 32 KiB。这证明新的源码加载预算与路由测试有效,不证明模型收到或遵守文字。

关键内容讲解

  • 根文件验证条件:193–195 行使用 hold and ... passes,对指定 CLI 加了独立必要条件。
  • 迁入的完整 eligibility:仍明确保留 canary 或等价 risk-based validation,因此新 root 与 owner 的差异可直接复核。
  • 加载边界测试:验证字节截断、可达文件、anchors 和单源 CLAUDE import;没有比较 obligation modality,全部通过也不会发现 F1。

规格依据:AGENTS.md,不可变修订 6ad80633c4d0ce360e18f3f3d7b1913540355226。What LoopX Does — implemented:原 32 KiB 根加载及 task-triggered owner 路由保留,并加入更紧的本地预算目标。Evidence-Based Budget Decisions — not_met:压缩应逐条保留 actor/order/modality/provenance/scope/continuation/stops,F1 改变了允许的验证方式。Merge Authority And Validation — not_met:既有 canary-or-equivalent 选择没有在 root 保持,尽管链接 owner 仍有完整原文。

对主干的风险 / Risks

F1 / P2 的具体反例:维护者准备自合并单用途、低风险的公开文档 PR,对未变 head 已满足全部其他授权、required checks、质量依据、公开 review/readiness,并完成等价风险验证,但没有运行指定 canary CLI。基线与新 owner 允许该验证路线,新 root 却额外要求该 CLI passes。这是来源级条款反例,不是实际 merge 或模型实验;它足以证明本 PR 声称的 modality parity 没有保持。请恢复 root 的替代选项或仅保留 owner 路由,再重核这个反例。不能靠提高字节预算、删断言或等 CI 来消除冲突。

PASS:head 6 项 instruction delivery 测试、Ruff/compile;quick premerge 5 direct +4 selected 全通过、0 command failures;显式 route public-check 为 6 checks、0 errors/warnings。首次未指定 route 的检查在扫描前遇到两个默认 runtime roots,原失败保留,随后同四文件显式路由扫描通过。premerge 总退出码仍为 1 / stale CQR,作为另一项独立合并质量门禁保留,与本次语义 finding 分开。

语义与 CI 对齐

新增 24,000-byte 常量留在本地测试,不是共享状态或权限词汇。此处 AGENTS 是 standing obligation,不能把冲突解释为仅 advisory。未增加 opt-in,root 变化会进入其他宿主的共享指令面;无 runtime diff 也不能证明这些文字 feature-off parity。CI 为 UNVERIFIED/unknown 诊断项,遵守 wait_for_ci=false 未查询、等待或推断原因。F1 依据当前精确 source,不依赖 CI 成败。

我的整体评价 / Verdict

REQUEST_CHANGES:字节与路由改善已证实,但完整指令交付目标尚未证明;authorized continuation 的兼容性需要修复,不能用行数、anchors 或绿色测试替代。长期可用性 not_yet_proven,验证路径因文本冲突出现 regression;这里评的是条款语义,没有宣称测到了实际 Agent 停工。局部整理方向合理,当前必须先消除重复规则分歧,范围只需一个小修复。

检查的是仓库 Agent instruction source、按需 merge workflow 和加载边界测试,没有产品渲染页面或首屏布局改动。 未验证真实 Antigravity/Codex 会话 startup 注入、模型理解或长期效果;本次证明的是源码字节与可达路由。 结论绑定 14df8a971a177413894a8af8ec79957412aa74aa;修复后按新 head 复审,保留历史 finding 和独立质量/合并门禁。

English verdict: REQUEST_CHANGES — root instructions silently remove the accepted equivalent-validation path while the linked owner retains it. Byte and route checks pass but do not establish semantic parity.

Comment thread AGENTS.md Outdated
seam/helper exceptions) only when all conditions in
[self-merge eligibility](skills/loopx-pr-merge/SKILL.md#self-merge-eligibility-and-benchmark-exceptions)
hold and `uv run --extra test loopx canary premerge --from-git-diff --git-diff-base "$PR_BASE_REF"`
passes. After merging, sync local `main`, preserve unrelated untracked artifacts

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[P2] 保留等价风险验证这条既有合法路径

这里新增 hold and ... passes 后,根文件把指定 canary CLI 变成必要条件;基线以及本 PR 迁入的 merge workflow 仍允许 or equivalent risk-based validation。对已经满足全部授权、质量、required checks、精确 head review/readiness 且完成等价风险验证的交付,两个必读 owner 因而给出相反要求。这是本次压缩引入的 modality 变化,字节/anchor 测试无法发现。请在根文件保留替代选项,或把完整验证选择交给链接 owner;不减少其他既有 gate。修复后重核等价验证已通过但指定 CLI 未运行的反例,并重跑 instruction delivery 测试。

…links

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
@loopx-agent
loopx-agent force-pushed the codex/agents-md-24kb-cap-20261101 branch from b8417ba to dfa5ec6 Compare November 2, 2026 03:50

This branch has not been deployed

No deployments
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.

1 participant