Fast exact search, cross-project knowledge, delivered rulings, short MCP instructions #236
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "grimoire",
|
||||
"description": "Grimoire for Claude Code: connects the grimoire MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Grimoire skills (using-grimoire, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting, family-canon), and syncs your saved Grimoire Processes as skills (/grimoire:sync).",
|
||||
"version": "2026.11.28.1705",
|
||||
"version": "2026.11.28.2250",
|
||||
"author": {
|
||||
"name": "Bryan Van Deusen"
|
||||
},
|
||||
|
||||
@@ -57,8 +57,10 @@ Two constraints on *how* that's achieved:
|
||||
**Code tells you what a thing does, not what was wanted.** A limit, a
|
||||
default or a fallback found by reading the work is a past session's choice
|
||||
until a record says the operator made it. Before presenting one as a
|
||||
safeguard or a known cost, read the `Rulings` on the System it belongs to;
|
||||
when none speaks to it, call it unconfirmed rather than settled.
|
||||
safeguard or a known cost, or before changing a filter, a gate or a
|
||||
default, read the `Rulings` on the System it belongs to; when none speaks
|
||||
to it, call it unconfirmed rather than settled. A change that would undo
|
||||
what a ruling says the thing is for goes to the operator first.
|
||||
|
||||
2. **Rules are binding, and they reach you by retrieval.** No call loads the
|
||||
operator's rules and no standing set is handed to a session. A rule arrives
|
||||
|
||||
@@ -145,10 +145,29 @@ one line each — the statement, who decided, when, and the record it came from:
|
||||
Rulings
|
||||
- Failed work is retried until it succeeds; no attempt limit. (Operator, 2026-09-19, #1234; restated 2026-10-02, #1290)
|
||||
|
||||
**A ruling about a constraint says what it is for, and what it is not for.** A
|
||||
filter, a gate or a default outlives the reason it was made, and a later session
|
||||
widens or narrows it by reading the code, which shows what it does and never
|
||||
why. "Searches stay in their project" reads as a rule about every record; "a
|
||||
search keeps other projects' open work out — it is not there to keep knowledge
|
||||
in" can be re-judged when the reason changes. Write the *for* and the *not for*:
|
||||
|
||||
- The project filter keeps other projects' open work out of a session — not knowledge, which crosses with a label. (Operator, 2026-11-28, #1300)
|
||||
|
||||
The description arrives with every record filed under that System, so a ruling
|
||||
there reaches each session working in the area without having to win a search.
|
||||
Once the System names its files (`path_patterns`), its rulings also arrive with
|
||||
the first command or edit in a session that touches them.
|
||||
**Name the System's files** (`path_patterns`, globs from the repo root) so its
|
||||
rulings also arrive with the first command or edit in a session that touches
|
||||
them. That is the delivery that reaches someone changing the code; a System with
|
||||
rulings and no files reaches nobody that way, and `enter_project` names it under
|
||||
`rulings_undelivered`.
|
||||
|
||||
**The comment at the constraint names its ruling.** The code is where the next
|
||||
change starts, and a reader there may have no Grimoire at all: give the reason
|
||||
in the comment as a present-tense fact, and name the System and the ruling it
|
||||
comes from, so the reason is one lookup away and the comment is not the only
|
||||
copy.
|
||||
|
||||
A quote inside a work log does not: it surfaces only when a query happens to
|
||||
match it, and the passage that matches is usually the prose around it — often a
|
||||
session's *reading* of the ruling rather than the ruling.
|
||||
|
||||
@@ -1006,12 +1006,11 @@ async def semantic_search_notes(
|
||||
only: a caller that also passes `note_type` still gets exactly the kinds it
|
||||
asked for, so narrowing to snippets does not quietly acquire lessons.
|
||||
|
||||
Off by default, because two callers depend on the project filter holding.
|
||||
The near-duplicate gate compares a record only against its own project on
|
||||
Off by default, because the near-duplicate gate depends on the project
|
||||
filter holding: it compares a record only against its own project on
|
||||
purpose, and a globally-visible kind would let a lesson block an unrelated
|
||||
note's create on a project its author never touched. Ordinary note recall
|
||||
is project-scoped for the same reason — the point of the carve-out is that
|
||||
ONE kind escapes, not that scoping is weaker.
|
||||
note's create on a project its author never touched. The passive arms
|
||||
widen the filter by the user's reach instead (`cross_kinds`).
|
||||
|
||||
`scope` ("own" | "browse" | "read", see access.notes_visibility_clause)
|
||||
decides how far this may see. It exists because this one function serves
|
||||
@@ -1084,6 +1083,10 @@ async def semantic_search_notes(
|
||||
if orphan_only:
|
||||
stmt = stmt.where(Note.project_id.is_(None))
|
||||
elif project_id is not None:
|
||||
# The project filter keeps other projects' open WORK out of a
|
||||
# session; it is not there to keep knowledge in, which crosses
|
||||
# through `cross_kinds` (ruling "Knowledge crosses projects;
|
||||
# work stays in its own" on System "Retrieval & recall").
|
||||
in_project = Note.project_id == project_id
|
||||
if cross_kinds is not None:
|
||||
# Which kinds cross is the caller's (the user's reach);
|
||||
|
||||
Reference in New Issue
Block a user