Coding-Agent Harness Research V: Retiring an Agent Rule
What does it take to retire an instruction in a coding-agent harness? Kit had already moved its Work Ledger section out of the universal agent contract and into a contextual rule [1]. A generated checkout could still carry the old section, and the newer contract still routed agents to ledger instructions. A configuration cleanup by itself could not remove either source of guidance.
The change removes the trigger, the delivery and cleanup directions, and the code that wrote ledger notes into agent entry files [2]. Existing settings still parse. On reconcile, Kit removes a previously generated note where it originally wrote it, immediately after the managed contract. It leaves a project’s own Markdown alone. Previously shipped copies of the delivery and cleanup rules have exact fingerprints so Kit can refresh them when the registry is missing, while a project’s edited copy still requires review.
Consider a repository with an older agent file and a separate set of project rules. The new reconcile replaces the managed contract and removes its old ledger note. A second run has no reason to change the result. The project still owns its issue tracker and its own guidance. Kit identifies its retired note by its markers, placement, and generated format. Project guidance elsewhere stays under the project’s control.
Tests cover configured repositories, preserved project text, and incomplete markers. A downstream reconcile also verified that the three agent entry files and the refreshed rules matched the Kit source and that a second preview planned zero writes. Agent behavior in already-open sessions that loaded the old instructions remains untested.
[1] Kit #318, moving the Work Ledger section into a contextual trigger
[2] Kit #320, retiring the generated Work Ledger guidance