You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Riding #1589 (comment) — context rot means rules stated once (AGENTS.md, a ticket's plan) stop steering an agent mid-task. #1589 was the live case: compat machinery grew despite the zero-users rule, because the rule wasn't in the working context at decision time.
Two layers, cheapest first:
Get the rules into context at all — CLAUDE.md imports AGENTS.md so Claude Code sessions load the rules #1590 does this for Claude Code sessions (CLAUDE.md → @AGENTS.md). The TF-driven half: the System prompt #326 system prompt doesn't carry AGENTS.md either; injecting the repo's AGENTS.md into every run prompt is a small framework change (prompt territory — your call on wording/placement).
Enforce at the gate, not just at the start — a check that runs when a session declares ready-for-merge: re-read AGENTS.md + the ticket's acceptance criteria, diff them against the actual change, and flag violations before anything lands. The hook point already exists: on-before-mergeable (opt-in today, cli.ts) fires exactly there and can carry a prompt. Start = one stock prompt ("list every AGENTS.md rule this diff violates; empty list required to proceed"); later = per-ticket ACs from the plan file, checked the same way. This is enforcement at the point of no return, immune to context rot because it re-reads the rules fresh.
Related: the SPEC.md human-review rule proposed in the same thread — a gate check can also require that *.SPEC.md diffs were explicitly acknowledged by a human.
Riding #1589 (comment) — context rot means rules stated once (AGENTS.md, a ticket's plan) stop steering an agent mid-task. #1589 was the live case: compat machinery grew despite the zero-users rule, because the rule wasn't in the working context at decision time.
Two layers, cheapest first:
Get the rules into context at all — CLAUDE.md imports AGENTS.md so Claude Code sessions load the rules #1590 does this for Claude Code sessions (
CLAUDE.md→@AGENTS.md). The TF-driven half: the System prompt #326 system prompt doesn't carry AGENTS.md either; injecting the repo's AGENTS.md into every run prompt is a small framework change (prompt territory — your call on wording/placement).Enforce at the gate, not just at the start — a check that runs when a session declares ready-for-merge: re-read AGENTS.md + the ticket's acceptance criteria, diff them against the actual change, and flag violations before anything lands. The hook point already exists:
on-before-mergeable(opt-in today,cli.ts) fires exactly there and can carry a prompt. Start = one stock prompt ("list every AGENTS.md rule this diff violates; empty list required to proceed"); later = per-ticket ACs from the plan file, checked the same way. This is enforcement at the point of no return, immune to context rot because it re-reads the rules fresh.Related: the SPEC.md human-review rule proposed in the same thread — a gate check can also require that
*.SPEC.mddiffs were explicitly acknowledged by a human.