Team Rules outrank project rules, which outrank user rules, but what happens when a guardrail in the ledger contradicts a rule someone committed, I cannot tell you. Does brief just hand it over, or does it flag the clash and let a human settle it? Whether the ledger is a fourth layer or a second source of truth depends on the answer.
You're right, and it was a gap. brief just hands the guardrail over. RepoMemory doesn't read .cursor/rules, Team Rules or AGENTS.md, so it can't spot a clash. The agent sees both.
On precedence: rules are instructions, while ledger entries come back marked as notes from earlier sessions, with a notice that the user's instructions come first. So it's not meant to be a second source of truth. Rules say what to do; the ledger keeps the why, what was tried, and work in progress.
But my own example rule undercut that. "Never break a guardrail" lifted guardrails up to rule level. Prompted by your comment, I've changed the default rule every agent gets from the MCP server to:
Never break a guardrail. If a guardrail contradicts the repository's rules or what you were asked, don't pick one quietly: say so and ask.
So the agent flags the clash and a person settles it: edit the rule, or record a new guardrail with supersedes, which retires the old one with a pointer to the new one. npx @plexsicity/repomemory init (0.1.1) writes the same rule, and I've added a "When a guardrail and a rule disagree" section to the post above.
So: a fourth layer, below your rules, that tells you when the two disagree rather than settling it on its own. Thanks for pushing on it.
Adam Lewis
Product Engineer/Architect navigating the AI revolution
Team Rules outrank project rules, which outrank user rules, but what happens when a guardrail in the ledger contradicts a rule someone committed, I cannot tell you. Does brief just hand it over, or does it flag the clash and let a human settle it? Whether the ledger is a fourth layer or a second source of truth depends on the answer.