Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
docs(graph): conservative cue rules in the temporal edges guide
garrytanfeb077ef9c21
diff --git a/dbg-tmp.ts b/dbg-tmp.tsnew file mode 100644index 0000000000..ab836bffc7--- /dev/null+++ b/dbg-tmp.ts@@ -0,0 +1,18 @@+import { PGLiteEngine } from './src/core/pglite-engine.ts';+import { operations } from './src/core/operations.ts';+import { generateTemporalEdgesWorld, currentEmployers } from '/home/user/.capy/work/src/gbrain-evals-p0/eval/generators/temporal-edges-gen.ts';+const engine = new PGLiteEngine(); await engine.connect({}); await engine.initSchema();+const ctx: any = { engine, config: { engine: 'pglite' }, logger: { info() {}, warn() {}, error() {} }, dryRun: false, remote: false, sourceId: 'default' };+const op = (n: string) => operations.find(o => o.name === n)!;+const w = generateTemporalEdgesWorld({ seed: 3, phrasing: process.argv[2] });+for (const p of w.pages) { const s = await engine.readPageSnapshot(p.slug, { sourceId: 'default' }); await op('put_page').handler(ctx, { slug: p.slug, content: p.content, ...(s ? { expected_revision: s.revision } : {}) }); }+let shown = 0; const styles: Record<string, number> = {};+for (const p of w.people) {+ const cur = currentEmployers(p);+ const live = (await op('get_links').handler(ctx, { slug: p.slug, link_type: 'works_at' }) as any[]).map(r => r.to_slug);+ const wrong = live.filter(s => !cur.includes(s)); if (!wrong.length) continue;+ styles[p.style] = (styles[p.style] ?? 0) + 1;+ if (shown++ < 2) { console.log('WRONG', p.style, wrong, JSON.stringify(p.stints.map(s => [s.company.slice(10), s.from, s.until]))); console.log(w.pages.find(x => x.slug === p.slug)!.content);+ for (const r of await op('get_links').handler(ctx, { slug: p.slug, status: 'all', link_type: 'works_at' }) as any[]) console.log(' ', r.to_slug, r.status, JSON.stringify(r.stints)); }+}+console.log(styles);diff --git a/docs/guides/temporal-edges.md b/docs/guides/temporal-edges.mdindex 497d61de7f..3434468834 100644--- a/docs/guides/temporal-edges.md+++ b/docs/guides/temporal-edges.md@@ -53,7 +53,14 @@ the page states:- **Timeline lines with a cue.** `- **2025-03-01** | linkedin — Left [Acme](../companies/acme-example) to join [Widget](../companies/widget-co)`ends `works_at acme-example` and starts `works_at widget-co` on that date. Cues arerelation-specific: leaving a job does not end an advisory role. A cue only dates a- relationship the page already states; it never creates one.+ relationship the page already states; it never creates one. "Moved from [A] to [B]"+ and "Left [A] for [B]" also start B.+ A cue moves a relationship only when it is about the relationship itself, so these+ lines change nothing: lines about investing, meetings or events ("Joined [Acme]'s+ Series B", "Back at [Acme] for an alumni dinner"), and references qualified by what+ follows ("[Acme]'s London office", "[Acme] alumni"). "[Acme]'s advisory board" is the+ one qualified form that dates `advises`. Write the explicit grammar below when such a+ line really is a job change.- **The explicit line grammar**, inside a dated timeline entry. It names the relationand the target, so it works on its own, even after the old sentence is deleted:```@@ -62,11 +69,13 @@ the page states:```- **Frontmatter `since` / `until`** on relationship objects:`company: [{ name: Acme, since: 2021-04, until: 2024-02-15 }]` (partial dates- normalize to the first day of the month or year).+ normalize to the first day of the month or year). List the company twice for a+ rejoin.- **Past-tense prose.** "previously at", "former CTO of", "used to work at" mark the- page's assertion as past. With no dated end, the relationship reads as ended at an- unknown date. On one page, a present-tense mention wins ("previously at Acme, now- runs Acme's EU team" stays live).+ page's assertion as past ("has worked at" and "was promoted to CTO at" stay present).+ A relationship with no dated evidence at all then reads as ended at an unknown date;+ a dated start stays open until a dated end, whatever the prose says. On one page, a+ present-tense mention wins ("previously at Acme, now runs Acme's EU team" stays live).- **Manual edges:** `add_link` accepts `valid_from` and `valid_until` (YYYY-MM-DD).Re-run `add_link` with `valid_until` to record that a relationship ended.