Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

docs: document _global and cross-project wikilink syntax

Vinícius Andradeaa8027830df9
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 28fd5c4b..d5d5d65c 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -410,6 +410,11 @@ so that dependencies between projects become explicit edges in the graph:
* `[[project:path.md]]` — a sibling project in the same workspace.
* `[[workspace/project:path.md]]` — a project in another workspace.
+* `[[_global:path.md]]` — the reserved `_global` preferences project in
+ the default workspace, even when the source page lives elsewhere.
+ Bare `[[name]]` stays project-local; this is the form that names the
+ shared scope. An explicit `[[workspace/_global:path.md]]` keeps the
+ named workspace.
The parser (`ai-memory-wiki::extract_links`) yields a `LinkTarget
{ workspace, project, path }`; the store resolves it against the named
diff --git a/docs/cookbook.md b/docs/cookbook.md
index 69e3b7cc..054df022 100644
--- a/docs/cookbook.md
+++ b/docs/cookbook.md
@@ -42,7 +42,11 @@ Your agent calls `memory_write_page` and it lands as a durable wiki page (routed
under `_rules/` when it's a rule). Next session, `memory_query` surfaces it, and
if the project's `.ai-memory.toml` opts into the on-start brief, rules are
prepended to the agent's context automatically. To make it apply to **all** your
-projects, ask for it as a global rule (`scope: "global"`).
+projects, ask for it as a global rule (`scope: "global"`). From another
+project's page, link to that standing page with `[[_global:path]]` — it always
+names the reserved `_global` project in the default workspace. Sibling projects
+use `[[project:path]]`; another workspace uses `[[workspace/project:path]]`.
+Bare `[[name]]` stays inside the current project.
## Recipe: have a project read a specific document before implementing
diff --git a/docs/typed-edges.md b/docs/typed-edges.md
index 87e684d1..ebf9981f 100644
--- a/docs/typed-edges.md
+++ b/docs/typed-edges.md
@@ -44,8 +44,9 @@ The set is deliberately closed: a free-text relation column turns into
an unqueryable folksonomy. Keys outside the vocabulary are skipped at
the write boundary (with a warning) — a typo cannot mint a new edge
kind. Targets use the same grammar as wikilinks: `path`,
-`project:path`, or `workspace/project:path`; extension-less targets
-gain `.md`.
+`project:path`, `workspace/project:path`, or `_global:path` (the
+reserved preferences project in the default workspace); extension-less
+targets gain `.md`.
## What typed edges do
diff --git a/docs/usage.md b/docs/usage.md
index 48e5c2c6..bc517da7 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -411,9 +411,11 @@ command: ["serve", "--transport", "http", "--bind", "0.0.0.0:49374", "--enable-w
The web UI is read-only: project list, per-project page tree,
breadcrumbs, rendered markdown, metadata, and FTS5 search. In rendered
pages, `[[wiki links]]` become clickable links to the target page —
-`[[path]]`, `[[path|label]]`, `[[project:path]]`, and
-`[[workspace/project:path]]` are all supported (resolved against the
-current page's project unless the target carries its own scope).
+`[[path]]`, `[[path|label]]`, `[[project:path]]`,
+`[[workspace/project:path]]`, and `[[_global:path]]` are all supported
+(resolved against the current page's project unless the target carries
+its own scope; `[[_global:path]]` always names the reserved `_global`
+project in the default workspace).
`[[…]]` stays literal inside fenced code (` ``` ` and `~~~` close
only by their own glyph), inline `` `…` `` code, and 4-space-indented
code; external schemes inside the brackets (`http://`, `https://`,