docs: add agent citation and PR cross-reference rules#110
docs: add agent citation and PR cross-reference rules#110
Conversation
…plate Two new agent behavior rules to make tree value visible to users: - "Cite the tree when it matters" — agents mention tree nodes that influenced decisions - "Link tree PRs and code PRs" — cross-reference between tree and code PRs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bingran-you
left a comment
There was a problem hiding this comment.
GitHuber Update
Verdict: ACTION NEEDED — The new rules will not reach existing tree repos via first-tree upgrade.
The added bullets in assets/framework/templates/agents.md.template:36 and assets/framework/templates/agents.md.template:47 only affect newly created AGENTS.md files. renderTemplates() only creates missing files during init (src/engine/init.ts:140-151), and the tree upgrade path never rewrites the existing framework block in AGENTS.md; it either returns early as already up to date or refreshes version/skill metadata plus the source-repo index only (src/engine/upgrade.ts:530-567). As written, the PR body's rollout/test plan is incorrect: running first-tree upgrade on an existing tree repo will not add these rules.
Please either add a tree-side AGENTS.md framework refresh path (and an upgrade test for it) or narrow the change and test plan to newly initialized trees only.
Agent note: this reply was prepared and posted by githuber running locally for the active account.
|
Thanks for the careful review — you're right that the original PR body's test plan was wrong, and I've updated it. After tracing the code more thoroughly, I'd like to push back gently on the proposed remedy and propose a split: The current "manual refresh" is intentional, not an oversight. Adding a
Proposed split:
This keeps the content change reviewable in isolation and lets the architectural question be discussed on its own merits. Happy to open the follow-up issue right after this lands. If you'd prefer to fold the auto-refresh into this PR instead, I'll do that — just want to flag the design implications first. |
|
The revised PR body still doesn’t match the current upgrade behavior.
So an existing tree that is already on Please either narrow the scope/test plan further to Separately, this PR also edits a shipped runtime template without the required Agent note: this reply was prepared and posted by githuber running locally for the active account. |
|
@Gandy2025 感谢 pushback — 把 upgrade 的行为读得更仔细后,其实结论比我之前说的更简单。总结一下这个 PR 要合并需要改的三件事: 需要修改的内容1. 重新指向新路径(#113 合并后产生的结构性冲突)#113( 2. Bump
|
|
Breeze pickup test (2026-04-20T22:56:53Z): @bingran-you could you review this? |
|
Re-checked this against current There are still no new commits beyond
I'm leaving the existing changes-requested review in place. Once those updates are pushed, I can re-review. This reply was drafted by breeze, an autonomous agent running on behalf of the account owner. |
Summary
Motivation
Tree's value is invisible to users — agents read it and make better decisions, but users don't see the connection. These two rules make tree value passively visible:
Scope of this PR
This PR only updates the bundled template (
assets/framework/templates/agents.md.template). It affects:first-tree initafter this version — the new rules are written into AGENTS.md automaticallyupgrade.ts:282-289), framework block updates are surfaced as a manual task inprogress.mdafter runningfirst-tree upgrade, instructing maintainers to "compare the framework section in AGENTS.md with the bundled template and update the text between the markers."Whether to switch to automatic framework block refresh is a separate design decision (see "Follow-up" below) and intentionally out of scope here.
Test plan
first-tree initin a fresh repo, verify the generated AGENTS.md contains both new rulesfirst-tree upgradein an existing tree repo, verifyprogress.mdincludes the "Compare the framework section..." manual task pointing maintainers to sync the new rulesFollow-up (separate PR/issue)
Discuss whether
first-tree upgradeshould automatically refresh the AGENTS.md framework block (analogous to howSOURCE_INTEGRATIONblock is auto-replaced insource-integration.ts:214-228). Open questions:upgrade.ts:282-289?🤖 Generated with Claude Code