Repository navigation
Replies: 1 comment
|
The append-only constraint would help a failure mode beyond an omitted Timeline section, which GBrain already guards against. The current replace-page contract permits intentional history changes; this would be an optional preservation policy for a team workflow. A page edit can preserve readable dated wording yet change the native history it produces: moving an inline dated citation into a Markdown Timeline bullet can change its source/detail, and appending a new answer to the original cited paragraph can change its extracted summary. Matching source/date or an unchanged total row count therefore does not prove that the original evidence survived. For an opt-in history-preservation rule, could the pre-commit check compare the multiset of original In a tested external acceptance guard, we retain the first before-image across pending writes/retries, verify actual committed rows, and check them again before accepting the correction. That detects loss after commit; a native preparation-time constraint would prevent that first destructive save and avoid another team maintaining its own parser prediction. |
Uh oh!
There was an error while loading. Please reload this page.
Moved from #7828, opened by @rrmlima on 2026-10-28. Feature requests now live in Discussions > Ideas.
What problem does this solve?
put_pageaccepts almost any content. That is the right default for a general library, but a brain used as durable memory has a different failure mode than a bad query: a wrong page is retrievable forever. Two things go wrong repeatedly in practice:type, or a frontmatter field is missing, or a timeline section gets rewritten in place instead of appended. Nothing refuses it, soschema_statsreports degraded coverage only after the fact, anddoctorhas to repair what could have been rejected.An external guard is currently the only way to get this, which means every team that wants validated writes re-implements the same checks against their own pack — and that guard is necessarily coupled to the pack it validates, because the rules only exist in the pack.
What does the solution look like?
An opt-in write gate driven by the active pack's own manifest, so a pack author who declares types, prefixes and link verbs also gets enforcement of them for free. Roughly:
write.gate: off | warn | enforce(defaultoff, so existing brains see zero change — the same back-compat posture asextends: gbrain-base).put_page/append_page/syncvalidate the final page before commit:type↔path_prefixesconsistency from the active pack (the rule already exists asinferType; the gate reuses it rather than inventing a second mapping).required_fields:list onPageTypeSchema).append_only_sections:— e.g. a timeline heading that may only gain lines at the end).write_gate_type_prefix,write_gate_missing_field,write_gate_append_only) with the page slug and the exact rule that failed, so an agent can correct the content instead of guessing.warnmode records the violation and lets the write through, so a team can measure their violation rate before enforcing.doctorgains a check that reports how many existing pages would fail the gate, so enabling it is a decision made with data.The important design point: the rules stay in the pack, not in the gate. A pack without the new optional fields behaves exactly as today, and
gbrain-baseneeds no change.Alternatives considered
gbrain put,sync).note-style capture is legitimate, andnoteis a declared type in most packs.required_fields. Opt-in with awarntier is what makes it adoptable.sync. Leavesput_page— the path MCP clients actually use — unguarded, which is the path where an agent's summarisation error arrives.Notes
I have this running as an external guard over a 17-type pack (type↔prefix, required fields, append-only timeline, secret scan, CAS on update), and the failure mode above is real rather than theoretical: a triage agent recorded "config adopted and verified" for a setting that was only ever suggested in the conversation, and it survived into the brain because nothing refused it. The guard caught it on review, not the write path. That is the case a pack-driven gate would close at commit time.
Happy to prototype the manifest additions (
required_fields,append_only_sections) and the validation call sites against a pack I maintain, if the direction is acceptable.All reactions