Expand description
Standing rules shared by every seat of this user, and by every machine that shares the tracker repository.
ljos prefer --user and ljos rule --user write them. The copy the
hooks read is the user config, not the pack, so the review clock never
sees them. The tracker carries one file per machine, and a sync merges
those files by id.
A row written before basis was kept has neither basis nor from.
It stays in the preface, marked not confirmed, until the person runs
ljos prefer --user --review --keep. The cutoff is a local receipt
written once by the first person-side command. A row written after
that receipt with no basis stays out. A hook does not write the
receipt: it runs under the runner.
Structs§
- People
- Handles and names a guard matches. The prose of the rule is not read.
- User
Rule - One standing rule.
due_atis never written. A sweep drops a row only when that field is present and already past, which a row this module writes is not.
Constants§
- PREFACE_
BUDGET - How much of the preface a brief or a hook will carry.
- RULES_
FILE_ CAP - The most a user-rules file may hold. A larger file is not read.
Functions§
- ack
- The rule as one line a person reads after writing it.
- forget
- Tombstone
id. The author and the reason stay, so a later sync can say who removed it and why the rule stood. The lesson, if this row was promoted, is not touched. - format_
list - Text lines for
ljos rules, empty when there are none. A row held from before a basis was kept is listed apart from a promoted rule the pack does not confirm, which is unverified, with why. - guard_
line - The user-rule verdict for a shell line, if one fires.
- guard_
payload - The user-rule verdict for a hook payload that names a tool, if the tool is a GitHub comment, review, issue or pull-request write.
- held_
count - How many user rules [
is_held] counts. Session start and the doctor report this. Neither path is required to have written the cutoff. - is_due
- Whether a row would be due at
now. A row with nodue_atis never due. - keep_
held - Keep one held user rule as the person’s.
- lesson_
hash - Sha256 of what makes lesson record
atomthe lesson it is: its kind, its text, itstsandvalid_from, and the origin it was stored under as [super::stored_by] reads it. packsetd keeps the firsttswhen a tombstoned id is posted again and stamps a newvalid_from, so a repost is another lesson even in the same words, as are an edit of the text and an origin changed in place. Links, grades and the update stamp move on writes that leave the lesson as it was, and are not read. - load
- The rows on disk that are still in force. An absent file is an empty list. Tombstones are left out.
- mcp_
event_ denies - Whether
ruleis an outbound-post denial, the only verdictbeforeMCPExecutionenforces. - merge_
rows - Merge rows by id. The newer
updated_atwins, and that row’s author and reason come with it. A tombstone beats an older edit of the same id, and it also beats a live row that carries the same stamp. - note_
cutoff - Record the cutoff for user-rule basis, once, from a person-side command.
- preface
- The preface injected ahead of seat memory. Empty when there are no rules the preface may show. A held row is shown in its own section, not as a rule the person confirmed.
- prepend
body, with the user-rule preface in front. An empty preface leavesbodyas it is.- promote_
atom - Copy one lesson atom into a user rule. The atom is not modified.
- promote_
lesson - Read lesson
idfrom this seat’s pack and copy it into a user rule. The lesson stays in the pack. Under a runner, or withperson_words(the MCP path), the lesson’s text must be in the person’s latest prompt, aswrite_preferenceasks of the words. - review_
due - How many rows would be due at
now. Ordinary rows contribute nothing. - review_
list - List the user rules the upgrade held back.
- review_
sentence - The sentence the doctor and
ljos prefer --user --reviewshare. - rules_
path $XDG_CONFIG_HOME/ljos/user-rules.json, else~/.config/ljos/user-rules.json.- sweep
- Drop rows whose
due_atis already pastnow, and leave every other row where it is. Returns how many were dropped. - sync_
for_ hook - Pull and push before a hook builds its line. A tracker that does not answer is ignored, and the local file is what the hook shows.
- sync_
now - One pull and push, as
ljos prefer --user --syncruns it. - to_
value - The rule as the object an MCP tool returns.
- without_
preface textwith one leading preface removed, so a session line and a prompt note that both carry it are not pasted twice.- write_
argv - Write one argv law into the user file, under the same checks as a seat
rule, with
basisas the caller decided it, as a seat rule takes it. - write_
preference - Write one prose rule. It is not also posted to the seat pack.