1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Brain File Verification — Belief Base
#
# The OODA "Orient" stage checks every autonomous brain-file write (self_improve
# apply/update) against these rules before it persists. Required rules MUST be
# present after the edit (stops RSI stripping critical anchors); contradictions
# flag a self-contradictory edit when BOTH patterns land in the same paragraph.
#
# Editable at runtime — no rebuild. Missing/invalid TOML = autonomous writes
# HARD-FAIL (no silent no-op); a gate with no rules looks enforced but checks
# nothing. See issue #881.
#
# Required-rule patterns are matched case-insensitively; `.*` = ordered gap.
# Only anchor on patterns that ship in these templates, so the gate never
# false-rejects a legitimate seed/template write.
# ---------------------------------------------------------------------------
# Required anchors — the H1 title and the **Owns:** ownership header must
# survive any autonomous edit. These are present in every shipped template.
# ---------------------------------------------------------------------------
[[]]
= "SOUL.md"
= "# SOUL.md"
= "H1 title — file must stay identifiable as SOUL.md"
[[]]
= "SOUL.md"
= "Owns:"
= "Ownership header — brain-file ownership map must survive"
[[]]
= "AGENTS.md"
= "# AGENTS.md"
= "H1 title — file must stay identifiable as AGENTS.md"
[[]]
= "AGENTS.md"
= "Owns:"
= "Ownership header — workspace governance declaration must survive"
[[]]
= "TOOLS.md"
= "# TOOLS.md"
= "H1 title"
[[]]
= "TOOLS.md"
= "Owns:"
= "Ownership header"
[[]]
= "CODE.md"
= "# CODE.md"
= "H1 title"
[[]]
= "CODE.md"
= "Owns:"
= "Ownership header"
[[]]
= "SECURITY.md"
= "# SECURITY.md"
= "H1 title"
[[]]
= "SECURITY.md"
= "Owns:"
= "Ownership header"
[[]]
= "MEMORY.md"
= "# OpenCrabs Long-Term Memory"
= "H1 title"
# ---------------------------------------------------------------------------
# Contradiction guards — OPTIONAL, none shipped by default.
#
# The mechanism is supported and unit-tested (see the inline AGENTS_TOML const
# in brain_verify.rs), but no guards ship here. Patterns on common governance
# words ("push", "table") false-positive against real brain files: an unbroken
# bullet list counts as ONE entry (entries split on blank lines), so a section
# that legitimately holds "never push to main" in one bullet and "always push"
# in another trips a guard meant to catch a single self-contradictory sentence.
# Add your own guards ONLY with patterns provably absent from your templates.
# See #881, #855.
# ---------------------------------------------------------------------------