-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlore.json.example
More file actions
96 lines (96 loc) · 4.06 KB
/
lore.json.example
File metadata and controls
96 lines (96 loc) · 4.06 KB
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
88
89
90
91
92
93
94
95
96
{
"0cfDHqhfgS": {
"fact": "Claude-specific code must live in lore/claude/**/* files. Do not introduce Claude references elsewhere.",
"incl": ["c:(?i)claude", "p:**/*.py"],
"skip": ["p:bin/handle_claude_hook", "p:lore/claude/**/*", "p:tests/claude/**/*"],
"tags": ["action:block", "hook:edit", "hook:write"]
},
"2nJ8qK4rPs": {
"fact": "bin/manage_facts must remain slim - only dispatch to library functions, never implement core logic",
"incl": ["p:bin/manage_facts"],
"tags": ["kind:commitment"]
},
"3Xy2Rce9PU": {
"fact": "When regex patterns in '.lore.json' aren't working, first check JSON validity - a single bad escape breaks all facts in that file.",
"incl": ["p:**/.lore.json"]
},
"4pqgUQ9hVf": {
"fact": "Don't use underscore-prefixed import aliases to avoid name collisions",
"incl": ["c:import \\w+ as _", "p:**/*.py"],
"skip": ["p:tests/**/*.py"]
},
"4vR7sT1wHc": {
"fact": "Edit must preserve fact ID when relocating via delete+create (identity is stable across relocation)",
"incl": ["p:lore/facts/edit_fact.py"],
"tags": ["kind:commitment"]
},
"5dW6hL9vBn": {
"fact": "Empty '.lore.json' files must be deleted automatically when last fact is removed (keep repository clean)",
"incl": ["p:lore/facts/delete_fact.py"],
"tags": ["kind:behavior"]
},
"9bX3cY5zFm": {
"fact": "{{filepath}}: Skip patterns must be validated for scope at creation and edit time (before relativization) to warn of orphaned exclusions",
"incl": ["p:lore/facts/create_fact.py", "p:lore/facts/edit_fact.py", "p:lore/validation/validate_skip_matchers_scope.py"],
"tags": ["kind:design"]
},
"HG3F0cVxEW": {
"fact": "Prefer triple-quoted strings or module-level constants over implicit string concatenation for multiline text",
"incl": ["c:(?m)^\\s+\"[^\"]*\"\\n\\s+\"[^\"]*\"\\n\\s+\"[^\"]*\"\\n", "p:**/*.py"],
"skip": ["p:tests/**/*.py"]
},
"Kb2CxQd0q0": {
"fact": "Add a blank line before the first item of every list",
"incl": ["c:^[^\\d*-].*\\n(\\d+\\. |[-*] )", "p:**/*.md"]
},
"KdqpRCKdpQ": {
"fact": "Prefer one-liner method signatures. Keep `def name(...)...:` on a single line even when long",
"incl": ["c:^\\s*def \\w+\\([^)]*$", "p:**/*.py"],
"tags": ["hook:edit", "hook:read", "hook:write"]
},
"MQhW6NJigm": {
"fact": "from ... import must not use ()-brackets for a single imported item. Long lines are fine",
"incl": ["c:from lore.* import \\(", "p:**/*.py"]
},
"cmPSw1cDRE": {
"fact": "Never import and use Path, prefer 'os' functions instead",
"incl": ["c:import Path", "p:**/*.py"],
"skip": ["p:tests/**/*.py"],
"tags": ["action:block", "kind:commitment"]
},
"e7CcEhT2UW": {
"fact": "We don't allow nested function definitions. Local helper/organizational methods should start with \"_\"",
"incl": ["c:^ +def [_a-z]+", "p:**/*.py", "p:lore/facts/render_fact_text.py"],
"skip": ["p:tests/**/*.py"]
},
"ejn7IjQtBy": {
"fact": "\"_\"-prefixed helpers should be turned to separate functions if they are clearly reusable or deserve a dedicated unit test",
"incl": ["c:def _", "p:**/*.py"],
"tags": ["hook:edit", "hook:write"]
},
"j3HEX0LABD": {
"fact": "{{filepath}} stores per-directory-tree fact definitions with glob-based matchers",
"incl": ["p:**/.lore.json"],
"tags": ["hook:read"]
},
"j9eMq0lynU": {
"fact": "Never edit '.lore.json' files directly - use lore MCP tools or 'lore' command instead.",
"incl": ["p:**/.lore.json"],
"tags": ["action:block", "hook:edit", "hook:write"]
},
"qVgRJ2WPPG": {
"fact": "All MCP-specific code should reside in lore/mcp/**/*",
"incl": ["c:mcp|MCP", "p:**/*.py"],
"skip": ["p:lore/mcp/**/*"]
},
"suifSUyCun": {
"fact": "We prefer \" - \" over \" — \"",
"incl": ["c:—", "p:**/*.md"],
"tags": ["action:block", "hook:edit", "hook:write"]
},
"z03aNxcFBG": {
"fact": "We never import _-helpers from other files. Consider extracting a shared utility function",
"incl": ["c:import _", "p:**/*.py"],
"tags": ["action:block"]
}
}