Expand description
The optional root-context policy:
no top-level CONTEXT.md enters the index.
What:
The optional mono/forbidden-root-context policy:
a CONTEXT.md file at the
repository’s top level must not enter the index or be checked.
Why:
This repository keeps no context files;
agents read the source on every probe
(doc/agent/domain.md).
The rule and its finding are the installed wrapper’s
(package/git-policy/repository/src/index.ts):
only the top-level pathname
counts,
and removing the file is always allowed.
In TS you’d write (pseudocode):
// if (candidates.some(c => c.path === 'CONTEXT.md' && c.change !== 'deleted')) return [finding];Constants§
- ROOT_
CONTEXT_ CODE - The policy-local code of the finding.
- ROOT_
CONTEXT_ MESSAGE - The message of the finding, as the installed wrapper words it.
- ROOT_
CONTEXT_ PATH - The one pathname the policy forbids, relative to the repository’s top level.
Functions§
- check_
root_ context - What:
Check the lifecycle’s candidates for a top-level
CONTEXT.mdthat is not a deletion.<F: RepositoryFacts>accepts any facts provider. Why: Only pathnames and change kinds are read, never content; at most one finding.