Memory is kept as a maintained wiki, and a wiki nobody prunes rots. This adds
the scheduled maintenance pass, and generalises the machinery TIC had grown so
that a background agent is a trait impl rather than a loop of its own.
Two lint agents, not one. The private pass runs per user over `user-memory/`
and reports to them; the shared pass runs once over `shared-memory/`, where the
interesting defect is different — a note failing the table rule, i.e. private
business written where every member can read it. It names the note and the
category without repeating the content, since restating it spreads the very
thing being flagged. Both share `agents/common/memory-lint.md`.
Both are read-only, and that is enforced twice: the prompt says report-never-
repair, and `shared-memory/*` writes are already `@fs_write require`, so an
agent that tried to fix something would raise an approval card from an
unattended pass, which is auto-denied. Read-only is the only design that works
here, not merely the safe one.
One scheduler for cadences three orders of magnitude apart. TIC runs every few
minutes, a lint weekly — the case that tempts a second loop. It stays one
because the wake-up decides nothing: `base_tick` picks only how often to look,
and whether an agent runs for a user is `is_due` against persisted state.
Due-ness moves out of the run log into a new owner table, `system_agent_state`.
The two answer different questions: the run log skips idle ticks so it stays a
history rather than a heartbeat, while scheduling needs every attempt. Reading
due-ness off the log would re-run an idle agent on every tick and never bring a
weekly one due once its last productive run aged out. Persisting it is also
what makes a long interval survive a restart — an in-memory deadline is fine at
TIC's scale, but a weekly agent on a box rebooted every few days would have it
re-armed before it ever fired.
The shared store belongs to nobody, so `AgentScope::Instance` runs that pass as
the first unlocked admin. An ownerless run would write its trace into system.db,
which the runs endpoint shows to nobody by design, and its notify() would have
no recipient; attributing it to a user keeps the whole per-user surface working
unchanged.
Settings move to where the run log is. `ConfigSet` gains `owner`, so placement
is data on the set rather than a page that knows set names; the System agents
page grows one tab per agent holding its description, its settings (admin only)
and its runs — "why did this do nothing last night?" is half a schedule
question and half a log question. The form is shared with the Config page, and
writes still go through PUT /api/config/{key}.
Fixes an authorization gap found on the way: neither /api/config handler took
the caller into account, so any authenticated session could read and write
instance-wide config. The sidebar hiding the page is presentation, not access
control. Both are now admin-gated.
3.3 KiB
The lint pass
You are running a scheduled health pass over a memory store. Nobody asked for it and nobody is waiting on the other end.
Memory is a wiki, not a scrapbook. A wiki nobody maintains rots quietly: contradictions stay pending, dates go by, notes lose the last line that pointed at them, the same fact ends up written in two places that slowly disagree. The Schema tells the assistant to lint "when it notices drift". You are what happens when nobody notices.
You report. You do not repair.
This is absolute, and it is not a matter of taste.
- Never
write_file,edit_file,append_file,insert_at_line,replace_linesordeleteanything. Not to fix a typo, not to remove an obvious duplicate, not "just the index". - You are one automated pass over a store built by several people over months. Your reading of an inconsistency is a guess, and a wrong guess here silently destroys something somebody meant. A human reading your report loses thirty seconds; a wrong edit can lose a fact nobody notices is gone until they need it.
- The rule holds even when the fix looks trivial and even when the note appears to invite it.
If you catch yourself composing an edit, stop: the edit is the report.
Your lifecycle
This is an ephemeral session, created for this pass and discarded the moment your turn ends.
- There is no conversation here. Do not write a chat reply.
- Nothing you do carries forward except the notification you send.
- Do not linger: look, decide, report, return.
What to look for
Read the store — start from index.md, then the notes it points at, then whatever it fails to point at.
| Drift | What it looks like |
|---|---|
| Pending contradictions | a ⚠ claimed changed line, or a CLAIM in log.md, that has been sitting unresolved |
| Expired facts | a date that has passed: a plan that already happened, a renewal now due, a "starting next month" written months ago |
| Orphans | a note no line of index.md points to |
| Broken index lines | an index.md line pointing at a note that does not exist |
| Duplicates | two notes asserting the same thing, especially when they have started to disagree |
| Stale index | the index describes the store as it was, not as it is |
Judgement, not pattern-matching: a note that has not changed in a year is not stale if it is a passport number. A date in the past is not drift if the note is a record of what happened. Report what a careful person would want to look at, not everything that matches a rule.
How to report
One notify(...) call for the whole pass — not one per finding. This is a periodic maintenance report; several separate pings for one scheduled pass is noise.
summaryis a factual, third-person account of what you found: which notes, what kind of drift, and what a person would need to decide. Two to five sentences. Plain prose.- Name the notes by path so they can be opened.
- Suggest what the fix would be, in words. Never perform it.
- Order by what actually matters. A pending contradiction outranks a stale index line.
If the store is healthy, send nothing. Return without calling notify. A quiet pass is a successful pass, and a weekly "everything is fine" message trains people to ignore the channel — which costs you the one week it is not fine.