← AiAkiv MemoryCONTENT HISTORY

Update to AiAkiv Memory

Snapshot Oct 26, 2026 · 18:05 UTC · version 2.2.0

Collection source: downloaded plugin package. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED

Payment or plan references changed

Full description — Now says: with the request phrase "ak graph" / "ak 그래프", or otherwise explicitly asks for a graph query over how memories are connected — shared entities, bridges,...

Observed in published text. Live prices and checkout terms have not been verified by this change.

Save AiAkiv Memory and check future changes in Following.

Up to 3 plugins free · no card required.

All fields and original values.

Full description

Before

Sep 30, 2026 · 23:09 UTC

HOW memories are connected — shared entities, bridges, threads, timelines, multi-hop paths, "similar but structurally related", entity co-occurrence — or when a search hint block contains a `graph_query` example. Not for

After

Oct 26, 2026 · 18:05 UTC

with the request phrase "ak graph" / "ak 그래프", or otherwise explicitly asks for a graph query over how memories are connected — shared entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a search hint block carryi...

Skill instructions

Before

Sep 30, 2026 · 23:09 UTC

--- name: aiakiv-graph-query description: >- Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks HOW memories are conne...

After

Oct 26, 2026 · 18:05 UTC

--- name: aiakiv-graph-query description: >- Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks with the request phrase "ak...

Compare saved observations

Download comparison JSON

SKILL.md text changes

− removed · + added

--- before
+++ after
@@ -1,142 +1,275 @@
----
-name: aiakiv-graph-query
-description: >-
-  Write graph queries (Cypher subset) against AiAkiv/MWeft memory with
-  query_memory_graph (and query_partner_memory_graph across a link). Use when the
-  user asks HOW memories are connected — shared entities, bridges, threads,
-  timelines, multi-hop paths, "similar but structurally related", entity
-  co-occurrence — or when a search hint block contains a `graph_query`
-  example. Not for plain recall (use search_memory).
----
-
-# AiAkiv graph query
-
-`query_memory_graph` runs a **read-only Cypher subset** over the user's memory
-graph. It answers *structure* questions that flat search cannot: which events
-share entities, what bridges two topics, what happened next in a thread, what
-is semantically far but structurally connected.
-
-**When to reach for it** — the question is about connections, paths, shared
-participants, sequences, or "one step beyond these search results". A search
-response may hand you a ready-made query in `hint.graph_query.example` with
-`params` — run it as-is, then adapt.
-
-**When NOT to** — plain recall ("what did we decide about X") is
-`search_memory`. If `query_memory_graph` is not in the tool list, the server has
-it disabled; say so instead of inventing it.
-
-## Grammar in one screen
-
-```
-START a = events(text: $q, k: 5)        ← anchor set is ALWAYS events
-START a = events(entity: "name or id")
-START a = events(ids: [$id1, $id2])
-MATCH (a)-[s:SHARES {min: 2}]-(b)       ← one or more MATCH clauses
-WHERE b.id <> a.id                       ← optional
-RETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20
-```
-
-- No `WITH`, no `CREATE`/`SET` (read-only). Conditions that would need `WITH`
-  go into relation params like `{min: 3}`.
-- `$name` params are passed via the `params` argument — always parameterize
-  user text; never inline it.
-- Aggregates (`count(DISTINCT …)`) live in `RETURN`. `cos(a, b)` gives vector
-  cosine between two event variables.
-- Variable-length: `-[n:NEXT*1..3]->` (hop count comes back as `n.hops`).
-
-## Relations (the whole vocabulary)
-
-| Relation | Between | Meaning / params |
-|---|---|---|
-| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |
-| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |
-| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for "connected but semantically far" |
-| `NEXT` | event→event | conversation/thread order (directional, supports `*1..n`) |
-| `PARTICIPATED_IN` | event–entity | membership; walk event→entity→event for co-participation |
-| `MEMBER_OF` | event–tag | category/tag membership |
-| `CONNECTED` | entity–entity | stored entity co-occurrence edge |
-| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match) |
-
-## Recipes
-
-- **Structurally close but semantically far** (the highest-value walk from
-  search results — surfaces non-obvious connections):
-  `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`
-- **What bridges these results** — same query; read `s.via` (shared entities),
-  then `find_memories_by_entity` the interesting ones.
-- **Thread / what happened next**:
-  `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`
-- **Entity co-participation ranking**:
-  `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`
-
-Rows are projected small (Event → `{id, summary, timestamp, order_index}`);
-open full content with `get_memory_content`.
-
-## Reading the response, handling refusals
-
-- `partial` / `truncated` report budget caps — **never silent**. If truncated,
-  narrow instead of retrying the same query: fewer anchors (`k`), tighter
-  `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.
-- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,
-  allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;
-  do not loop blind retries.
-- Budget errors ("statement timeout") mean the walk was too wide, not that
-  the tool is broken.
-
-## Across a link (partner org)
-
-`query_partner_memory_graph(link_id, query, params)` — same language over your org
-plus a linked partner org. `link_id` comes from `list_partner_links`. `START`
-resolves in YOUR org only; the walk crosses sides through entities the link
-has **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),
-and `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay
-within a side. Returned events carry `side` (`remote` = partner); open remote
-content with `get_partner_memory_content`. Remote budgets are tighter —
-prefer small `k` and `LIMIT` first. Not every server exposes this tool; if
-absent, only home queries are available.
-
-## Probe: relation modes and expansion rounds
-
-`find_memory_connections` walks the same entity-event graph without a query language. It
-takes a `relation` instead of a `MATCH` clause, and its candidates are
-unverified pointers — the same standing as anything the recipes above return.
-
-Entry is not one thing. A sentence-only call rides the vector ranking, so it
-recovers when you have no ids yet; an `anchor_entity_id` call walks from the
-entity directly and does not depend on the ranking at all. A useful loop is to
-read a bridge entity out of one response and re-call with it as the anchor.
-That chaining is yours to steer — it is not something the API does for you.
-
-The relations:
-
-- `similar` (default) — time-stratified neighbours of what the sentence found.
-- `before` / `after` — one side of a point in time. Exactly one of
-  `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no
-  implicit "now".
-- `evolution` — stratifies the candidate pool's own timeline into first
-  sighting, transition points (the largest content shift between adjacent
-  sightings), and latest sighting. It answers "how did this develop". It works
-  on the pool your sentence built and returns a handful of stratified picks,
-  whereas `list_memory_timeline` returns one entity's full chronology.
-- `contrast` — narrows by cosine and hands back candidates. The engine does
-  not judge opposition: semantic tension lives as small displacements inside
-  high cosine, not as opposite vectors, so geometry cannot see it. Read the
-  candidates and judge contradiction yourself;
-  `grounding_basis.contrast_protocol` restates this per call.
-- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids
-  `sentence`. There is no cosine axis: candidates are ordered by bridge lift
-  (specificity) and recency, with the earliest sighting stratified in, and
-  `grounding` comes back as `"exploration"` because the existence gate does
-  not apply.
-
-`expansion_rounds=2` re-expands from the round-1 picks through bridges that
-round 1 did not use, reaching things two structural steps away. `top_n` caps
-candidates *per round*, so a 2-round call can return up to twice `top_n` in
-total, and each candidate carries its `round` so you can tell how far out it
-sits. Round 2 costs a second walk — reach for it on relational and
-`evolution`-shaped questions rather than on direct lookups.
-
-Across a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry
-happens in your org only; the partner side is reached through bridges alone,
-which is why it never reports `absent` — check
-`grounding_basis.remote_entry_not_searched` instead.
+---
+name: aiakiv-graph-query
+description: >-
+  Write graph queries (Cypher subset) against AiAkiv/MWeft memory with
+  query_memory_graph (and query_partner_memory_graph across a link). Use when the
+  user asks with the request phrase "ak graph" / "ak 그래프", or otherwise
+  explicitly asks for a graph query over how memories are connected — shared
+  entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a
+  search hint block carrying a `graph_query` example. A question without the
+  phrase is plain recall (use search_memory).
+---
+
+# AiAkiv graph query
+
+`query_memory_graph` runs a **read-only Cypher subset** over the user's memory
+graph. It answers *structure* questions that flat search cannot: which events
+share entities, what bridges two topics, what happened next in a thread, what
+is semantically far but structurally connected.
+
+**When to reach for it** — first, the request phrase `ak graph` (`ak 그래프`),
+usually followed by a question in the user's own words: the user chose the graph
+query, and the work is translating it faithfully (next section). Also an
+explicit request in other words for a structural walk. Lower priority:
+`hint.graph_query.example` in a search response can be run as-is, then adapted.
+
+**When not to** — a question without the phrase, even about connections, starts
+with `search_memory`; the graph query is not picked on its own initiative. If
+the tool is not in the list, the server has it disabled; say so.
+
+## When the user asks with `ak graph`
+
+1. **Translate.** "Among memories about <name>, the ones about <topic>" is
+   `events(entity: $name, text: $q, k: 20)`; "in the <tag> tag, …" uses `tag:`;
+   "A or B", "A and B both appear" and "names containing …" are recipes below.
+   Names match exactly (`find_memories_by_entity` shows the stored spelling).
+   A request for "all", "every" or "the full list" is not a closeness ranking:
+   it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an
+   explicit `LIMIT`, and a `CONTAINS` or name filter when the request names
+   one. If `start.hub` is still `true`, the answer says there are more than 200
+   and not all of them were seen.
+2. **Run it**, then **show the query that ran and what it means in one line**,
+   next to the answer, in the user's language (for the first example below:
+   the query, then "the 20 BP-7 memories closest in meaning to q").
+3. **Put the completeness markers into the user's words** ("Reading the
+   response"): "could not confirm" and "none" are different answers, and
+   "the closest 20 of 224" is not "all 224".
+4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On
+   "scoped match is off", fall back to `text:` or `entity:` alone (for "both",
+   the older `MATCH` recipe below, with its limit said) and tell the user the
+   new syntax is off on this server.
+5. **The phrase alone** gets three example requests back, like these, adapted to
+   names from the user's memory and written in the user's language:
+
+```
+ak graph among the memories linked to BP-7, the discussion that set plan pricing
+  START a = events(entity: "BP-7", text: $q, k: 20) RETURN a, a.score
+  params {"q": "the discussion that set plan pricing"}
+
+ak graph inside the ops tag, the records of a backup restore drill
+  START a = events(tag: "ops", text: $q, k: 20) RETURN a, a.score
+  params {"q": "the records of a backup restore drill"}
+
+ak graph every entity that shares a memory with Redis and has cache in its name
+  START a = events(entity: "Redis", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)
+  WHERE n.name CONTAINS "cache" RETURN DISTINCT n.name LIMIT 200
+```
+
+The third uses `k: 200` because the default `k` 5 walks only the five newest
+Redis memories; `start.hub: true` there means Redis has more than 200.
+
+## Grammar in one screen
+
+```
+START a = events(text: $q, k: 5)                  ← always events
+START a = events(entity: $name)                   newest of the entity's events
+START a = events(ids: [$id1, $id2])
+START a = events(tag: $t, k: 20)                  newest in the tag
+START a = events(entity: $name, text: $q, k: 20)  entity's events closest to $q
+START a = events(tag: $t, text: $q, k: 20)        tag's events closest to $q
+START a = events(entity: ["A", "B"], k: 200)      events with A or B (tag: [...] too)
+START a = events(entity_all: ["A", "B"], k: 200)  events with A and B (tag_all: too)
+START a = events(entity: $n, tag: $t, text: $q)   in both scopes, closest to $q
+MATCH (a)-[s:SHARES {min: 2}]-(b)                 ← zero or more
+WHERE b.id <> a.id                                ← optional
+RETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20
+```
+
+- **Three row caps that are not budget cuts** — none of them sets `partial`
+  or `truncated`:
+  - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200
+    for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped
+    with a note. The 20 and 200 are defaults; a server can set other caps, and
+    `budget.caps` in the response shows the ones in force (Reading the
+    response). The scoped starts other than `entity:` alone set
+    `start.has_more: true` when the scope holds more
+    candidates than came back, with a `notes` line "start: top-k of N
+    candidates; … more exist in scope (not a budget cut)". A `+` after a
+    number means it is a lower bound. When the scope was not fully covered
+    (`filled: false`, a names cap, or the start cut by a statement timeout or
+    the deadline) the "could not confirm" line replaces this one; `has_more`
+    itself is still set.
+  - `start.hub: true` — a scope without `text:` found more events than the
+    `k` newest it returned. For `entity:` alone this is the only signal.
+  - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch
+    on, `notes` says "rows cut to the default LIMIT 20; add LIMIT to return
+    more"; with it off, the cut is silent.
+- A name resolves to at most 20 entities or tags;
+  `start.entities_truncated` / `tags_truncated` says more matched.
+- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list
+  is one part (any name); `entity_all:` / `tag_all:` make each name its own part
+  and take a list only; `entity:` with `tag:` needs both. That is the only
+  shape: no brackets, no negation, and no "entity or tag" choice. A list can
+  come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is
+  rejected, not cut; an empty list, a repeated name, a non-string, or mixing
+  with `ids:` is rejected too.
+- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,
+  `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with
+  "… (scoped match is off)" and a hint.
+- **No `MATCH`** when the start is the answer:
+  `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.
+- **`a.score`** — the start event's cosine to the start text, not clipped; null
+  without start text and on hop-reached events, nulls last. `RETURN a` omits it.
+- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring
+  case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul
+  or Han character is enough. It filters rows the walk already returned.
+- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one
+  is filled in (with a `notes` line) only when the end labels allow one way, as
+  `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`
+  still need it. A wrong arrow is rejected, not flipped.
+- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params
+  like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.
+- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.
+  Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`
+  (`n.hops`).
+
+## Relations (the whole vocabulary)
+
+| Relation | Between | Meaning / params |
+|---|---|---|
+| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |
+| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |
+| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for "connected but semantically far" |
+| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |
+| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |
+| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |
+| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |
+| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |
+| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |
+
+## Recipes
+
+- **Structurally close but semantically far** (the highest-value walk from
+  search results — surfaces non-obvious connections):
+  `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`
+- **What bridges these results** — same query; read `s.via` (shared entities),
+  then `find_memories_by_entity` the interesting ones.
+- **Thread / what happened next**:
+  `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`
+- **Entity co-participation ranking**:
+  `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`
+- **A and B both appear**: filters before `k` is taken, so a large A does not
+  hide the overlap:
+  `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`
+  Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`
+  (then `k` up to 20) to rank the overlap by meaning.
+- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`
+- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap
+  further back is missed; say so when `start.hub` is `true`:
+  `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`
+
+Rows are projected small (Event → `{id, summary, timestamp, order_index}`);
+open full content with `get_memory_content`.
+
+## Reading the response, handling refusals
+
+- `start.scoped_mode`: `exact` means every candidate was measured and only the
+  top `k` returned; `filtered_ann` means a large scope was searched through the
+  vector index. `start.candidates`: `{count, exact}` (with `exact: false` the
+  count is a lower bound); `start.filled: false`: fewer than `k` found within
+  budget, not "the scope ran out". `filled: false`, a names cap, or a start
+  cut by a statement timeout or the deadline (`{stage: "deadline", at:
+  "start"}`) adds a start entry to `truncated` and sets `partial`.
+- **0 rows plus any of those means "could not confirm"; 0 rows with nothing cut
+  means "none".** `notes` says so too, along with clamps and inferred arrows.
+- **Names not found.** `start.unresolved` lists the scope names that matched
+  nothing as `{kind, name}`, e.g. `[{"kind": "tag", "name": "X"}]`. Entity 'X'
+  and tag 'X' are different names: if the entity is found and the tag is not,
+  only the tag is listed. Say "no tag is stored under that spelling", not "X
+  does not exist"; it may exist as the other kind. In an any-of part where
+  another name was found, the miss shows only in `unresolved`, with no note.
+  If a whole part found none of its names, the result is 0 rows with a note
+  naming only the names of the part(s) that found nothing, e.g. "scope: no
+  match for entity 'B', tag 'x' - a part of the scope found none of its names,
+  so the scope has no rows": say the name is not stored under that spelling
+  for that kind, and check it with `find_memories_by_entity` before calling it
+  none.
+- **Caps in force.** With the new syntax on, `budget.caps` carries
+  `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps
+  this server applies (`k` for `text:` and the number of `ids:`, `k` for a
+  scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are
+  defaults; when telling the user a limit ("only the newest 200"), use the
+  number from `caps`. `LIMIT` stays at most 200.
+- **More candidates than rows.** `start.has_more: true` — or, where the server
+  does not send it, `candidates.count` above the rows the start returned —
+  means the scope holds more than came back. `exact` with count 224 and `k` 20
+  is the closest 20 of 224; saying "compared all 224, nothing missing" is
+  wrong. `partial: false` means no budget cut, not "everything was seen".
+- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and
+  the default `LIMIT` are separate signals (Grammar above). If truncated,
+  narrow instead of retrying the same query: fewer anchors (`k`), tighter
+  `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.
+- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,
+  allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;
+  do not loop blind retries.
+- Budget errors ("statement timeout") mean the walk was too wide, not that
+  the tool is broken.
+
+## Across a link (partner org)
+
+`query_partner_memory_graph(link_id, query, params)` — same language over your org
+plus a linked partner org. `link_id` comes from `list_partner_links`. `START`
+resolves in YOUR org only; the walk crosses sides through entities the link
+has **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),
+and `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay
+within a side. Returned events carry `side` (`remote` = partner); open remote
+content with `get_partner_memory_content`. Remote budgets are tighter —
+prefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`
+sees the home spelling of aliased names. Not every server exposes this tool; if
+absent, only home queries are available.
+
+## Probe: relation modes and expansion rounds
+
+`find_memory_connections` walks the same entity-event graph without a query language. It
+takes a `relation` instead of a `MATCH` clause, and its candidates are
+unverified pointers — the same standing as anything the recipes above return.
+
+Entry is not one thing. A sentence-only call rides the vector ranking, so it
+recovers when you have no ids yet; an `anchor_entity_id` call walks from the
+entity directly and does not depend on the ranking at all. A useful loop is to
+read a bridge entity out of one response and re-call with it as the anchor.
+That chaining is yours to steer — it is not something the API does for you.
+
+The relations:
+
+- `similar` (default) — time-stratified neighbours of what the sentence found.
+- `before` / `after` — one side of a point in time. Exactly one of
+  `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no
+  implicit "now".
+- `evolution` — stratifies the candidate pool's own timeline into first
+  sighting, transition points (the largest content shift between adjacent
+  sightings), and latest sighting. It answers "how did this develop". It works
+  on the pool your sentence built and returns a handful of stratified picks,
+  whereas `list_memory_timeline` returns one entity's full chronology.
+- `contrast` — narrows by cosine and hands back candidates. The engine does
+  not judge opposition: semantic tension lives as small displacements inside
+  high cosine, not as opposite vectors, so geometry cannot see it. Read the
+  candidates and judge contradiction yourself;
+  `grounding_basis.contrast_protocol` restates this per call.
+- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids
+  `sentence`. There is no cosine axis: candidates are ordered by bridge lift
+  (specificity) and recency, with the earliest sighting stratified in, and
+  `grounding` comes back as `"exploration"` because the existence gate does
+  not apply.
+
+`expansion_rounds=2` re-expands from the round-1 picks through bridges that
+round 1 did not use, reaching things two structural steps away. `top_n` caps
+candidates *per round*, so a 2-round call can return up to twice `top_n` in
+total, and each candidate carries its `round` so you can tell how far out it
+sits. Round 2 costs a second walk — reach for it on relational and
+`evolution`-shaped questions rather than on direct lookups.
+
+Across a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry
+happens in your org only; the partner side is reached through bridges alone,
+which is why it never reports `absent` — check
+`grounding_basis.remote_entry_not_searched` instead.
Full technical diff · 2 changed fields

changed /description

BEFORE
"Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks HOW memories are connected — shared entities, bridges, threads, timelines, multi-hop paths, \"similar but structurally related\", entity co-occurrence — or when a search hint block contains a `graph_query` example. Not for plain recall (use search_memory)."
AFTER
"Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks with the request phrase \"ak graph\" / \"ak 그래프\", or otherwise explicitly asks for a graph query over how memories are connected — shared entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a search hint block carrying a `graph_query` example. A question without the phrase is plain recall (use search_memory)."

changed /skill_md_contents

BEFORE
"---\r\nname: aiakiv-graph-query\r\ndescription: >-\r\n  Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\r\n  query_memory_graph (and query_partner_memory_graph across a link). Use when the\r\n  user asks HOW memories are connected — shared entities, bridges, threads,\r\n  timelines, multi-hop paths, \"similar but structurally related\", entity\r\n  co-occurrence — or when a search hint block contains a `graph_query`\r\n  example. Not for plain recall (use search_memory).\r\n---\r\n\r\n# AiAkiv graph query\r\n\r\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\r\ngraph. It answers *structure* questions that flat search cannot: which events\r\nshare entities, what bridges two topics, what happened next in a thread, what\r\nis semantically far but structurally connected.\r\n\r\n**When to reach for it** — the question is about connections, paths, shared\r\nparticipants, sequences, or \"one step beyond these search results\". A search\r\nresponse may hand you a ready-made query in `hint.graph_query.example` with\r\n`params` — run it as-is, then adapt.\r\n\r\n**When NOT to** — plain recall (\"what did we decide about X\") is\r\n`search_memory`. If `query_memory_graph` is not in the tool list, the server has\r\nit disabled; say so instead of inventing it.\r\n\r\n## Grammar in one screen\r\n\r\n```\r\nSTART a = events(text: $q, k: 5)        ← anchor set is ALWAYS events\r\nSTART a = events(entity: \"name or id\")\r\nSTART a = events(ids: [$id1, $id2])\r\nMATCH (a)-[s:SHARES {min: 2}]-(b)       ← one or more MATCH clauses\r\nWHERE b.id <> a.id                       ← optional\r\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\r\n```\r\n\r\n- No `WITH`, no `CREATE`/`SET` (read-only). Conditions that would need `WITH`\r\n  go into relation params like `{min: 3}`.\r\n- `$name` params are passed via the `params` argument — always parameterize\r\n  user text; never inline it.\r\n- Aggregates (`count(DISTINCT …)`) live in `RETURN`. `cos(a, b)` gives vector\r\n  cosine between two event variables.\r\n- Variable-length: `-[n:NEXT*1..3]->` (hop count comes back as `n.hops`).\r\n\r\n## Relations (the whole vocabulary)\r\n\r\n| Relation | Between | Meaning / params |\r\n|---|---|---|\r\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\r\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\r\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\r\n| `NEXT` | event→event | conversation/thread order (directional, supports `*1..n`) |\r\n| `PARTICIPATED_IN` | event–entity | membership; walk event→entity→event for co-participation |\r\n| `MEMBER_OF` | event–tag | category/tag membership |\r\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge |\r\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match) |\r\n\r\n## Recipes\r\n\r\n- **Structurally close but semantically far** (the highest-value walk from\r\n  search results — surfaces non-obvious connections):\r\n  `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\r\n- **What bridges these results** — same query; read `s.via` (shared entities),\r\n  then `find_memories_by_entity` the interesting ones.\r\n- **Thread / what happened next**:\r\n  `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\r\n- **Entity co-participation ranking**:\r\n  `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\r\n\r\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\r\nopen full content with `get_memory_content`.\r\n\r\n## Reading the response, handling refusals\r\n\r\n- `partial` / `truncated` report budget caps — **never silent**. If truncated,\r\n  narrow instead of retrying the same query: fewer anchors (`k`), tighter\r\n  `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\r\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\r\n  allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\r\n  do not loop blind retries.\r\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\r\n  the tool is broken.\r\n\r\n## Across a link (partner org)\r\n\r\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\r\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\r\nresolves in YOUR org only; the walk crosses sides through entities the link\r\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\r\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\r\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\r\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\r\nprefer small `k` and `LIMIT` first. Not every server exposes this tool; if\r\nabsent, only home queries are available.\r\n\r\n## Probe: relation modes and expansion rounds\r\n\r\n`find_memory_connections` walks the same entity-event graph without a query language. It\r\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\r\nunverified pointers — the same standing as anything the recipes above return.\r\n\r\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\r\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\r\nentity directly and does not depend on the ranking at all. A useful loop is to\r\nread a bridge entity out of one response and re-call with it as the anchor.\r\nThat chaining is yours to steer — it is not something the API does for you.\r\n\r\nThe relations:\r\n\r\n- `similar` (default) — time-stratified neighbours of what the sentence found.\r\n- `before` / `after` — one side of a point in time. Exactly one of\r\n  `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\r\n  implicit \"now\".\r\n- `evolution` — stratifies the candidate pool's own timeline into first\r\n  sighting, transition points (the largest content shift between adjacent\r\n  sightings), and latest sighting. It answers \"how did this develop\". It works\r\n  on the pool your sentence built and returns a handful of stratified picks,\r\n  whereas `list_memory_timeline` returns one entity's full chronology.\r\n- `contrast` — narrows by cosine and hands back candidates. The engine does\r\n  not judge opposition: semantic tension lives as small displacements inside\r\n  high cosine, not as opposite vectors, so geometry cannot see it. Read the\r\n  candidates and judge contradiction yourself;\r\n  `grounding_basis.contrast_protocol` restates this per call.\r\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\r\n  `sentence`. There is no cosine axis: candidates are ordered by bridge lift\r\n  (specificity) and recency, with the earliest sighting stratified in, and\r\n  `grounding` comes back as `\"exploration\"` because the existence gate does\r\n  not apply.\r\n\r\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\r\nround 1 did not use, reaching things two structural steps away. `top_n` caps\r\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\r\ntotal, and each candidate carries its `round` so you can tell how far out it\r\nsits. Round 2 costs a second walk — reach for it on relational and\r\n`evolution`-shaped questions rather than on direct lookups.\r\n\r\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\r\nhappens in your org only; the partner side is reached through bridges alone,\r\nwhich is why it never reports `absent` — check\r\n`grounding_basis.remote_entry_not_searched` instead.\r\n"
AFTER
"---\nname: aiakiv-graph-query\ndescription: >-\n  Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\n  query_memory_graph (and query_partner_memory_graph across a link). Use when the\n  user asks with the request phrase \"ak graph\" / \"ak 그래프\", or otherwise\n  explicitly asks for a graph query over how memories are connected — shared\n  entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a\n  search hint block carrying a `graph_query` example. A question without the\n  phrase is plain recall (use search_memory).\n---\n\n# AiAkiv graph query\n\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\ngraph. It answers *structure* questions that flat search cannot: which events\nshare entities, what bridges two topics, what happened next in a thread, what\nis semantically far but structurally connected.\n\n**When to reach for it** — first, the request phrase `ak graph` (`ak 그래프`),\nusually followed by a question in the user's own words: the user chose the graph\nquery, and the work is translating it faithfully (next section). Also an\nexplicit request in other words for a structural walk. Lower priority:\n`hint.graph_query.example` in a search response can be run as-is, then adapted.\n\n**When not to** — a question without the phrase, even about connections, starts\nwith `search_memory`; the graph query is not picked on its own initiative. If\nthe tool is not in the list, the server has it disabled; say so.\n\n## When the user asks with `ak graph`\n\n1. **Translate.** \"Among memories about <name>, the ones about <topic>\" is\n   `events(entity: $name, text: $q, k: 20)`; \"in the <tag> tag, …\" uses `tag:`;\n   \"A or B\", \"A and B both appear\" and \"names containing …\" are recipes below.\n   Names match exactly (`find_memories_by_entity` shows the stored spelling).\n   A request for \"all\", \"every\" or \"the full list\" is not a closeness ranking:\n   it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an\n   explicit `LIMIT`, and a `CONTAINS` or name filter when the request names\n   one. If `start.hub` is still `true`, the answer says there are more than 200\n   and not all of them were seen.\n2. **Run it**, then **show the query that ran and what it means in one line**,\n   next to the answer, in the user's language (for the first example below:\n   the query, then \"the 20 BP-7 memories closest in meaning to q\").\n3. **Put the completeness markers into the user's words** (\"Reading the\n   response\"): \"could not confirm\" and \"none\" are different answers, and\n   \"the closest 20 of 224\" is not \"all 224\".\n4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On\n   \"scoped match is off\", fall back to `text:` or `entity:` alone (for \"both\",\n   the older `MATCH` recipe below, with its limit said) and tell the user the\n   new syntax is off on this server.\n5. **The phrase alone** gets three example requests back, like these, adapted to\n   names from the user's memory and written in the user's language:\n\n```\nak graph among the memories linked to BP-7, the discussion that set plan pricing\n  START a = events(entity: \"BP-7\", text: $q, k: 20) RETURN a, a.score\n  params {\"q\": \"the discussion that set plan pricing\"}\n\nak graph inside the ops tag, the records of a backup restore drill\n  START a = events(tag: \"ops\", text: $q, k: 20) RETURN a, a.score\n  params {\"q\": \"the records of a backup restore drill\"}\n\nak graph every entity that shares a memory with Redis and has cache in its name\n  START a = events(entity: \"Redis\", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)\n  WHERE n.name CONTAINS \"cache\" RETURN DISTINCT n.name LIMIT 200\n```\n\nThe third uses `k: 200` because the default `k` 5 walks only the five newest\nRedis memories; `start.hub: true` there means Redis has more than 200.\n\n## Grammar in one screen\n\n```\nSTART a = events(text: $q, k: 5)                  ← always events\nSTART a = events(entity: $name)                   newest of the entity's events\nSTART a = events(ids: [$id1, $id2])\nSTART a = events(tag: $t, k: 20)                  newest in the tag\nSTART a = events(entity: $name, text: $q, k: 20)  entity's events closest to $q\nSTART a = events(tag: $t, text: $q, k: 20)        tag's events closest to $q\nSTART a = events(entity: [\"A\", \"B\"], k: 200)      events with A or B (tag: [...] too)\nSTART a = events(entity_all: [\"A\", \"B\"], k: 200)  events with A and B (tag_all: too)\nSTART a = events(entity: $n, tag: $t, text: $q)   in both scopes, closest to $q\nMATCH (a)-[s:SHARES {min: 2}]-(b)                 ← zero or more\nWHERE b.id <> a.id                                ← optional\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\n```\n\n- **Three row caps that are not budget cuts** — none of them sets `partial`\n  or `truncated`:\n  - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200\n    for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped\n    with a note. The 20 and 200 are defaults; a server can set other caps, and\n    `budget.caps` in the response shows the ones in force (Reading the\n    response). The scoped starts other than `entity:` alone set\n    `start.has_more: true` when the scope holds more\n    candidates than came back, with a `notes` line \"start: top-k of N\n    candidates; … more exist in scope (not a budget cut)\". A `+` after a\n    number means it is a lower bound. When the scope was not fully covered\n    (`filled: false`, a names cap, or the start cut by a statement timeout or\n    the deadline) the \"could not confirm\" line replaces this one; `has_more`\n    itself is still set.\n  - `start.hub: true` — a scope without `text:` found more events than the\n    `k` newest it returned. For `entity:` alone this is the only signal.\n  - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch\n    on, `notes` says \"rows cut to the default LIMIT 20; add LIMIT to return\n    more\"; with it off, the cut is silent.\n- A name resolves to at most 20 entities or tags;\n  `start.entities_truncated` / `tags_truncated` says more matched.\n- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list\n  is one part (any name); `entity_all:` / `tag_all:` make each name its own part\n  and take a list only; `entity:` with `tag:` needs both. That is the only\n  shape: no brackets, no negation, and no \"entity or tag\" choice. A list can\n  come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is\n  rejected, not cut; an empty list, a repeated name, a non-string, or mixing\n  with `ids:` is rejected too.\n- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,\n  `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with\n  \"… (scoped match is off)\" and a hint.\n- **No `MATCH`** when the start is the answer:\n  `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.\n- **`a.score`** — the start event's cosine to the start text, not clipped; null\n  without start text and on hop-reached events, nulls last. `RETURN a` omits it.\n- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring\n  case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul\n  or Han character is enough. It filters rows the walk already returned.\n- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one\n  is filled in (with a `notes` line) only when the end labels allow one way, as\n  `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`\n  still need it. A wrong arrow is rejected, not flipped.\n- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params\n  like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.\n- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.\n  Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`\n  (`n.hops`).\n\n## Relations (the whole vocabulary)\n\n| Relation | Between | Meaning / params |\n|---|---|---|\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\n| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |\n| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |\n| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |\n| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |\n\n## Recipes\n\n- **Structurally close but semantically far** (the highest-value walk from\n  search results — surfaces non-obvious connections):\n  `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\n- **What bridges these results** — same query; read `s.via` (shared entities),\n  then `find_memories_by_entity` the interesting ones.\n- **Thread / what happened next**:\n  `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\n- **Entity co-participation ranking**:\n  `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\n- **A and B both appear**: filters before `k` is taken, so a large A does not\n  hide the overlap:\n  `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`\n  Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`\n  (then `k` up to 20) to rank the overlap by meaning.\n- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`\n- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap\n  further back is missed; say so when `start.hub` is `true`:\n  `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`\n\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\nopen full content with `get_memory_content`.\n\n## Reading the response, handling refusals\n\n- `start.scoped_mode`: `exact` means every candidate was measured and only the\n  top `k` returned; `filtered_ann` means a large scope was searched through the\n  vector index. `start.candidates`: `{count, exact}` (with `exact: false` the\n  count is a lower bound); `start.filled: false`: fewer than `k` found within\n  budget, not \"the scope ran out\". `filled: false`, a names cap, or a start\n  cut by a statement timeout or the deadline (`{stage: \"deadline\", at:\n  \"start\"}`) adds a start entry to `truncated` and sets `partial`.\n- **0 rows plus any of those means \"could not confirm\"; 0 rows with nothing cut\n  means \"none\".** `notes` says so too, along with clamps and inferred arrows.\n- **Names not found.** `start.unresolved` lists the scope names that matched\n  nothing as `{kind, name}`, e.g. `[{\"kind\": \"tag\", \"name\": \"X\"}]`. Entity 'X'\n  and tag 'X' are different names: if the entity is found and the tag is not,\n  only the tag is listed. Say \"no tag is stored under that spelling\", not \"X\n  does not exist\"; it may exist as the other kind. In an any-of part where\n  another name was found, the miss shows only in `unresolved`, with no note.\n  If a whole part found none of its names, the result is 0 rows with a note\n  naming only the names of the part(s) that found nothing, e.g. \"scope: no\n  match for entity 'B', tag 'x' - a part of the scope found none of its names,\n  so the scope has no rows\": say the name is not stored under that spelling\n  for that kind, and check it with `find_memories_by_entity` before calling it\n  none.\n- **Caps in force.** With the new syntax on, `budget.caps` carries\n  `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps\n  this server applies (`k` for `text:` and the number of `ids:`, `k` for a\n  scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are\n  defaults; when telling the user a limit (\"only the newest 200\"), use the\n  number from `caps`. `LIMIT` stays at most 200.\n- **More candidates than rows.** `start.has_more: true` — or, where the server\n  does not send it, `candidates.count` above the rows the start returned —\n  means the scope holds more than came back. `exact` with count 224 and `k` 20\n  is the closest 20 of 224; saying \"compared all 224, nothing missing\" is\n  wrong. `partial: false` means no budget cut, not \"everything was seen\".\n- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and\n  the default `LIMIT` are separate signals (Grammar above). If truncated,\n  narrow instead of retrying the same query: fewer anchors (`k`), tighter\n  `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\n  allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\n  do not loop blind retries.\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\n  the tool is broken.\n\n## Across a link (partner org)\n\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\nresolves in YOUR org only; the walk crosses sides through entities the link\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\nprefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`\nsees the home spelling of aliased names. Not every server exposes this tool; if\nabsent, only home queries are available.\n\n## Probe: relation modes and expansion rounds\n\n`find_memory_connections` walks the same entity-event graph without a query language. It\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\nunverified pointers — the same standing as anything the recipes above return.\n\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\nentity directly and does not depend on the ranking at all. A useful loop is to\nread a bridge entity out of one response and re-call with it as the anchor.\nThat chaining is yours to steer — it is not something the API does for you.\n\nThe relations:\n\n- `similar` (default) — time-stratified neighbours of what the sentence found.\n- `before` / `after` — one side of a point in time. Exactly one of\n  `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\n  implicit \"now\".\n- `evolution` — stratifies the candidate pool's own timeline into first\n  sighting, transition points (the largest content shift between adjacent\n  sightings), and latest sighting. It answers \"how did this develop\". It works\n  on the pool your sentence built and returns a handful of stratified picks,\n  whereas `list_memory_timeline` returns one entity's full chronology.\n- `contrast` — narrows by cosine and hands back candidates. The engine does\n  not judge opposition: semantic tension lives as small displacements inside\n  high cosine, not as opposite vectors, so geometry cannot see it. Read the\n  candidates and judge contradiction yourself;\n  `grounding_basis.contrast_protocol` restates this per call.\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\n  `sentence`. There is no cosine axis: candidates are ordered by bridge lift\n  (specificity) and recency, with the earliest sighting stratified in, and\n  `grounding` comes back as `\"exploration\"` because the existence gate does\n  not apply.\n\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\nround 1 did not use, reaching things two structural steps away. `top_n` caps\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\ntotal, and each candidate carries its `round` so you can tell how far out it\nsits. Round 2 costs a second walk — reach for it on relational and\n`evolution`-shaped questions rather than on direct lookups.\n\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\nhappens in your org only; the partner side is reached through bridges alone,\nwhich is why it never reports `absent` — check\n`grounding_basis.remote_entry_not_searched` instead.\n"
Full snapshot data
{
  "description": "Write graph queries (Cypher subset) against AiAkiv/MWeft memory with query_memory_graph (and query_partner_memory_graph across a link). Use when the user asks with the request phrase \"ak graph\" / \"ak 그래프\", or otherwise explicitly asks for a graph query over how memories are connected — shared entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a search hint block carrying a `graph_query` example. A question without the phrase is plain recall (use search_memory).",
  "included_files": [],
  "name": "aiakiv-graph-query",
  "skill_md_contents": "---\nname: aiakiv-graph-query\ndescription: >-\n  Write graph queries (Cypher subset) against AiAkiv/MWeft memory with\n  query_memory_graph (and query_partner_memory_graph across a link). Use when the\n  user asks with the request phrase \"ak graph\" / \"ak 그래프\", or otherwise\n  explicitly asks for a graph query over how memories are connected — shared\n  entities, bridges, threads, multi-hop paths, co-occurrence. Lower priority: a\n  search hint block carrying a `graph_query` example. A question without the\n  phrase is plain recall (use search_memory).\n---\n\n# AiAkiv graph query\n\n`query_memory_graph` runs a **read-only Cypher subset** over the user's memory\ngraph. It answers *structure* questions that flat search cannot: which events\nshare entities, what bridges two topics, what happened next in a thread, what\nis semantically far but structurally connected.\n\n**When to reach for it** — first, the request phrase `ak graph` (`ak 그래프`),\nusually followed by a question in the user's own words: the user chose the graph\nquery, and the work is translating it faithfully (next section). Also an\nexplicit request in other words for a structural walk. Lower priority:\n`hint.graph_query.example` in a search response can be run as-is, then adapted.\n\n**When not to** — a question without the phrase, even about connections, starts\nwith `search_memory`; the graph query is not picked on its own initiative. If\nthe tool is not in the list, the server has it disabled; say so.\n\n## When the user asks with `ak graph`\n\n1. **Translate.** \"Among memories about <name>, the ones about <topic>\" is\n   `events(entity: $name, text: $q, k: 20)`; \"in the <tag> tag, …\" uses `tag:`;\n   \"A or B\", \"A and B both appear\" and \"names containing …\" are recipes below.\n   Names match exactly (`find_memories_by_entity` shows the stored spelling).\n   A request for \"all\", \"every\" or \"the full list\" is not a closeness ranking:\n   it takes the listing path — `tag:` or `entity:` alone with `k: 200`, an\n   explicit `LIMIT`, and a `CONTAINS` or name filter when the request names\n   one. If `start.hub` is still `true`, the answer says there are more than 200\n   and not all of them were seen.\n2. **Run it**, then **show the query that ran and what it means in one line**,\n   next to the answer, in the user's language (for the first example below:\n   the query, then \"the 20 BP-7 memories closest in meaning to q\").\n3. **Put the completeness markers into the user's words** (\"Reading the\n   response\"): \"could not confirm\" and \"none\" are different answers, and\n   \"the closest 20 of 224\" is not \"all 224\".\n4. **On a rejection**, read `hint` and `allowed_*` and fix the query once. On\n   \"scoped match is off\", fall back to `text:` or `entity:` alone (for \"both\",\n   the older `MATCH` recipe below, with its limit said) and tell the user the\n   new syntax is off on this server.\n5. **The phrase alone** gets three example requests back, like these, adapted to\n   names from the user's memory and written in the user's language:\n\n```\nak graph among the memories linked to BP-7, the discussion that set plan pricing\n  START a = events(entity: \"BP-7\", text: $q, k: 20) RETURN a, a.score\n  params {\"q\": \"the discussion that set plan pricing\"}\n\nak graph inside the ops tag, the records of a backup restore drill\n  START a = events(tag: \"ops\", text: $q, k: 20) RETURN a, a.score\n  params {\"q\": \"the records of a backup restore drill\"}\n\nak graph every entity that shares a memory with Redis and has cache in its name\n  START a = events(entity: \"Redis\", k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n)\n  WHERE n.name CONTAINS \"cache\" RETURN DISTINCT n.name LIMIT 200\n```\n\nThe third uses `k: 200` because the default `k` 5 walks only the five newest\nRedis memories; `start.hub: true` there means Redis has more than 200.\n\n## Grammar in one screen\n\n```\nSTART a = events(text: $q, k: 5)                  ← always events\nSTART a = events(entity: $name)                   newest of the entity's events\nSTART a = events(ids: [$id1, $id2])\nSTART a = events(tag: $t, k: 20)                  newest in the tag\nSTART a = events(entity: $name, text: $q, k: 20)  entity's events closest to $q\nSTART a = events(tag: $t, text: $q, k: 20)        tag's events closest to $q\nSTART a = events(entity: [\"A\", \"B\"], k: 200)      events with A or B (tag: [...] too)\nSTART a = events(entity_all: [\"A\", \"B\"], k: 200)  events with A and B (tag_all: too)\nSTART a = events(entity: $n, tag: $t, text: $q)   in both scopes, closest to $q\nMATCH (a)-[s:SHARES {min: 2}]-(b)                 ← zero or more\nWHERE b.id <> a.id                                ← optional\nRETURN b, s.count, s.via ORDER BY s.weight DESC LIMIT 20\n```\n\n- **Three row caps that are not budget cuts** — none of them sets `partial`\n  or `truncated`:\n  - `k` defaults to 5, up to 20 for `text:` and any scope with `text:`, and 200\n    for a scope without it (`entity:` / `tag:` alone, lists, `_all`), clamped\n    with a note. The 20 and 200 are defaults; a server can set other caps, and\n    `budget.caps` in the response shows the ones in force (Reading the\n    response). The scoped starts other than `entity:` alone set\n    `start.has_more: true` when the scope holds more\n    candidates than came back, with a `notes` line \"start: top-k of N\n    candidates; … more exist in scope (not a budget cut)\". A `+` after a\n    number means it is a lower bound. When the scope was not fully covered\n    (`filled: false`, a names cap, or the start cut by a statement timeout or\n    the deadline) the \"could not confirm\" line replaces this one; `has_more`\n    itself is still set.\n  - `start.hub: true` — a scope without `text:` found more events than the\n    `k` newest it returned. For `entity:` alone this is the only signal.\n  - Without `LIMIT`, rows stop at 20 (`LIMIT` goes up to 200). With the switch\n    on, `notes` says \"rows cut to the default LIMIT 20; add LIMIT to return\n    more\"; with it off, the cut is silent.\n- A name resolves to at most 20 entities or tags;\n  `start.entities_truncated` / `tags_truncated` says more matched.\n- **Name scopes**: a scope is an AND of parts, a part is an OR of names. A list\n  is one part (any name); `entity_all:` / `tag_all:` make each name its own part\n  and take a list only; `entity:` with `tag:` needs both. That is the only\n  shape: no brackets, no negation, and no \"entity or tag\" choice. A list can\n  come from `params` (`entity_all: $names`). Up to 10 names per `START`, more is\n  rejected, not cut; an empty list, a repeated name, a non-string, or mixing\n  with `ids:` is rejected too.\n- Behind a server switch: `tag:`, the combined starts, name lists and `_all`,\n  `a.score`, `CONTAINS`, no `MATCH`, arrow filling. Off, they are rejected with\n  \"… (scoped match is off)\" and a hint.\n- **No `MATCH`** when the start is the answer:\n  `START a = events(entity: $name, text: $q, k: 20) RETURN a, a.score ORDER BY a.score DESC, a.id`.\n- **`a.score`** — the start event's cosine to the start text, not clipped; null\n  without start text and on hop-reached events, nulls last. `RETURN a` omits it.\n- **`WHERE n.name CONTAINS $part`** — `Entity.name` / `Tag.name` only, ignoring\n  case and full-width forms; an all-ASCII piece needs 2 characters, one Hangul\n  or Han character is enough. It filters rows the walk already returned.\n- **Directed** `NEXT`, `MEMBER_OF`, `RESOLVED_BY` take an arrow. A missing one\n  is filled in (with a `notes` line) only when the end labels allow one way, as\n  `(a)-[:MEMBER_OF]-(t)` from an event; event-to-event `NEXT` and `RESOLVED_BY`\n  still need it. A wrong arrow is rejected, not flipped.\n- No `WITH`, no `CREATE`/`SET` (read-only); conditions go in relation params\n  like `{min: 3}`. The user's sentence goes through `params` (`$q`), not inline.\n- Aggregates live in `RETURN`; `cos(a, b)` is the cosine of two event variables.\n  Variable length on `NEXT` and `SHARES` only, 1..3: `-[n:NEXT*1..3]->`\n  (`n.hops`).\n\n## Relations (the whole vocabulary)\n\n| Relation | Between | Meaning / params |\n|---|---|---|\n| `SHARES {min, min_w}` | event–event | share ≥min entities; carries `s.count`, `s.weight` (rarity-weighted), `s.via` (the shared entities = bridges) |\n| `SIMILAR {k, min}` | event–event | vector nearest neighbours; `f.cos` |\n| `FAR {max}` | event–event | vector distance filter (cos < max) — pair with SHARES for \"connected but semantically far\" |\n| `NEXT {source}` | event→event | conversation/thread order (directional, supports `*1..3`); `n.source` |\n| `RESOLVED_BY {relation}` | event→event | plan or expectation → the event that realized it (directional); `relation`: `realization`; `r.asserted_at`; revoked links excluded |\n| `PARTICIPATED_IN` | entity–event | membership; walk event→entity→event for co-participation |\n| `MEMBER_OF {kind}` | event→tag | tag membership (directional); `kind` is `contains` or `refers` |\n| `CONNECTED` | entity–entity | stored entity co-occurrence edge; `c.event_count` |\n| `SAME_AS` | entity–entity | stored alias edge (exact identity, not fuzzy match); `x.confidence` |\n\n## Recipes\n\n- **Structurally close but semantically far** (the highest-value walk from\n  search results — surfaces non-obvious connections):\n  `START a = events(ids: $ids) MATCH (a)-[s:SHARES {min: 2}]-(b)-[f:FAR {max: 0.5}]-(a) RETURN b, s.count, s.via, f.cos ORDER BY s.weight DESC LIMIT 10`\n- **What bridges these results** — same query; read `s.via` (shared entities),\n  then `find_memories_by_entity` the interesting ones.\n- **Thread / what happened next**:\n  `START a = events(ids: $ids) MATCH (a)-[n:NEXT*1..3]->(b) RETURN b.id, b.summary, n.hops ORDER BY n.hops LIMIT 30`\n- **Entity co-participation ranking**:\n  `START a = events(text: $q, k: 5) MATCH (a)-[:PARTICIPATED_IN]-(e)-[:PARTICIPATED_IN]-(b) WHERE b.id <> a.id RETURN e.name, count(DISTINCT b) AS n ORDER BY n DESC LIMIT 15`\n- **A and B both appear**: filters before `k` is taken, so a large A does not\n  hide the overlap:\n  `START a = events(entity_all: [$a, $b], k: 200) RETURN a LIMIT 200`\n  Name and tag together: `events(entity: $a, tag: $t, k: 200)`. Add `text: $q`\n  (then `k` up to 20) to rank the overlap by meaning.\n- **A or B**: `START a = events(entity: [$a, $b], k: 200) RETURN a LIMIT 200`\n- **Both, switch off** (older way): it keeps only A's newest 200, so an overlap\n  further back is missed; say so when `start.hub` is `true`:\n  `START a = events(entity: $a, k: 200) MATCH (a)-[:PARTICIPATED_IN]-(n {name: $b}) RETURN DISTINCT a LIMIT 200`\n\nRows are projected small (Event → `{id, summary, timestamp, order_index}`);\nopen full content with `get_memory_content`.\n\n## Reading the response, handling refusals\n\n- `start.scoped_mode`: `exact` means every candidate was measured and only the\n  top `k` returned; `filtered_ann` means a large scope was searched through the\n  vector index. `start.candidates`: `{count, exact}` (with `exact: false` the\n  count is a lower bound); `start.filled: false`: fewer than `k` found within\n  budget, not \"the scope ran out\". `filled: false`, a names cap, or a start\n  cut by a statement timeout or the deadline (`{stage: \"deadline\", at:\n  \"start\"}`) adds a start entry to `truncated` and sets `partial`.\n- **0 rows plus any of those means \"could not confirm\"; 0 rows with nothing cut\n  means \"none\".** `notes` says so too, along with clamps and inferred arrows.\n- **Names not found.** `start.unresolved` lists the scope names that matched\n  nothing as `{kind, name}`, e.g. `[{\"kind\": \"tag\", \"name\": \"X\"}]`. Entity 'X'\n  and tag 'X' are different names: if the entity is found and the tag is not,\n  only the tag is listed. Say \"no tag is stored under that spelling\", not \"X\n  does not exist\"; it may exist as the other kind. In an any-of part where\n  another name was found, the miss shows only in `unresolved`, with no note.\n  If a whole part found none of its names, the result is 0 rows with a note\n  naming only the names of the part(s) that found nothing, e.g. \"scope: no\n  match for entity 'B', tag 'x' - a part of the scope found none of its names,\n  so the scope has no rows\": say the name is not stored under that spelling\n  for that kind, and check it with `find_memories_by_entity` before calling it\n  none.\n- **Caps in force.** With the new syntax on, `budget.caps` carries\n  `{start_k_max, start_entity_max, start_scoped_k_max, limit_max}`, the caps\n  this server applies (`k` for `text:` and the number of `ids:`, `k` for a\n  scope without text, `k` for a scope with text, `LIMIT`). The 20 and 200 above are\n  defaults; when telling the user a limit (\"only the newest 200\"), use the\n  number from `caps`. `LIMIT` stays at most 200.\n- **More candidates than rows.** `start.has_more: true` — or, where the server\n  does not send it, `candidates.count` above the rows the start returned —\n  means the scope holds more than came back. `exact` with count 224 and `k` 20\n  is the closest 20 of 224; saying \"compared all 224, nothing missing\" is\n  wrong. `partial: false` means no budget cut, not \"everything was seen\".\n- Budget caps (`partial` / `truncated`) are **never silent**; `k`, `hub` and\n  the default `LIMIT` are separate signals (Grammar above). If truncated,\n  narrow instead of retrying the same query: fewer anchors (`k`), tighter\n  `SHARES {min}` / `FAR {max}`, smaller `LIMIT`.\n- A rejection returns `{error, blocked_by: syntax|grammar|params, hint?,\n  allowed_*}` — read `hint` and the `allowed_*` lists, fix the query once;\n  do not loop blind retries.\n- Budget errors (\"statement timeout\") mean the walk was too wide, not that\n  the tool is broken.\n\n## Across a link (partner org)\n\n`query_partner_memory_graph(link_id, query, params)` — same language over your org\nplus a linked partner org. `link_id` comes from `list_partner_links`. `START`\nresolves in YOUR org only; the walk crosses sides through entities the link\nhas **aliased** (they count as one entity for `PARTICIPATED_IN`/`SHARES`),\nand `SIMILAR`/`FAR` cross by vector. `NEXT`/`MEMBER_OF`/`CONNECTED` stay\nwithin a side. Returned events carry `side` (`remote` = partner); open remote\ncontent with `get_partner_memory_content`. Remote budgets are tighter —\nprefer small `k` and `LIMIT` first. The new syntax works here too; `CONTAINS`\nsees the home spelling of aliased names. Not every server exposes this tool; if\nabsent, only home queries are available.\n\n## Probe: relation modes and expansion rounds\n\n`find_memory_connections` walks the same entity-event graph without a query language. It\ntakes a `relation` instead of a `MATCH` clause, and its candidates are\nunverified pointers — the same standing as anything the recipes above return.\n\nEntry is not one thing. A sentence-only call rides the vector ranking, so it\nrecovers when you have no ids yet; an `anchor_entity_id` call walks from the\nentity directly and does not depend on the ranking at all. A useful loop is to\nread a bridge entity out of one response and re-call with it as the anchor.\nThat chaining is yours to steer — it is not something the API does for you.\n\nThe relations:\n\n- `similar` (default) — time-stratified neighbours of what the sentence found.\n- `before` / `after` — one side of a point in time. Exactly one of\n  `reference_time` (ISO-8601) or `anchor_event_id` is required; there is no\n  implicit \"now\".\n- `evolution` — stratifies the candidate pool's own timeline into first\n  sighting, transition points (the largest content shift between adjacent\n  sightings), and latest sighting. It answers \"how did this develop\". It works\n  on the pool your sentence built and returns a handful of stratified picks,\n  whereas `list_memory_timeline` returns one entity's full chronology.\n- `contrast` — narrows by cosine and hands back candidates. The engine does\n  not judge opposition: semantic tension lives as small displacements inside\n  high cosine, not as opposite vectors, so geometry cannot see it. Read the\n  candidates and judge contradiction yourself;\n  `grounding_basis.contrast_protocol` restates this per call.\n- `explore` — question-free wandering. Requires `anchor_entity_id`, forbids\n  `sentence`. There is no cosine axis: candidates are ordered by bridge lift\n  (specificity) and recency, with the earliest sighting stratified in, and\n  `grounding` comes back as `\"exploration\"` because the existence gate does\n  not apply.\n\n`expansion_rounds=2` re-expands from the round-1 picks through bridges that\nround 1 did not use, reaching things two structural steps away. `top_n` caps\ncandidates *per round*, so a 2-round call can return up to twice `top_n` in\ntotal, and each candidate carries its `round` so you can tell how far out it\nsits. Round 2 costs a second walk — reach for it on relational and\n`evolution`-shaped questions rather than on direct lookups.\n\nAcross a link, `find_partner_memory_connections` takes the same inputs plus `link_id`. Entry\nhappens in your org only; the partner side is reached through bridges alone,\nwhich is why it never reports `absent` — check\n`grounding_basis.remote_entry_not_searched` instead.\n"
}

SHA-256 of public snapshot: 2854682435710ce07de738ee849cdb1c9392b335ac4a4b70fce9ec5b31692145