From 61aa2db16b415ad7d7ed850ecfab7de4c4bfe281 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 23 Sep 2026 20:48:06 +0000 Subject: [PATCH 1/3] fix(sync): own only a marked block in AGENTS.md; init emits only used tools forge init/sync replaced a hand-written AGENTS.md (the original went to AGENTS.md.forge-bak, which no agent reads), and the Stop-hook auto-sync then reverted any human edit to the now fully managed file. Forge now owns only the text between and : - sync appends the block to a hand-written file and afterwards compares and rewrites only the block (agentsMdStatus is the one classifier for sync, auto-sync and doctor; hasManagedBlock replaces isManaged here) - auto-sync refreshes only the block, never adopts a file without one, and no longer runs the full per-tool emit - a legacy fully generated AGENTS.md converts losslessly: the header hash identifies forge's bytes, so text added around them is kept; one edited inside the generated text is converted only by an explicit sync, after a timestamped AGENTS.md.forge-bak-