aiakiv 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,176 @@
1
+ ---
2
+ name: aiakiv-onboarding
3
+ description: >-
4
+ First-run helper for the AiAkiv (MemoryWeft / MWeft) memory server. Use when the
5
+ user first connects AiAkiv, asks how to use AiAkiv, how to save or recall memory
6
+ in AiAkiv, which AiAkiv project their memory is going to, or how to point a folder
7
+ at a specific AiAkiv project. Explains connect → authenticate → pick project → save/recall.
8
+ ---
9
+
10
+ # AiAkiv onboarding
11
+
12
+ AiAkiv is a long-term memory server (MemoryWeft / MWeft): it stores important
13
+ conversation content as a **knowledge graph** and retrieves it later. This skill
14
+ gets a new user connected and productive.
15
+
16
+ ## 1. Connect & authenticate
17
+
18
+ The plugin registers one remote MCP server, `AiAkiv`. On first use Claude Code
19
+ opens an **OAuth** login in the browser: sign in or sign up, approve, and the
20
+ AiAkiv memory tools become available.
21
+
22
+ The service address is `https://mcp.aiakiv.com/mcp`, and its path must end with
23
+ `/mcp`. To add AiAkiv by hand in a client that takes an address and a sign-in (a
24
+ custom connector in Claude on the web, desktop or mobile, Grok and the like), the
25
+ address is the same `https://mcp.aiakiv.com/mcp`, with nothing after `/mcp`. Such a
26
+ connection has the memory tools and card creation but not app features (§7). If a
27
+ connection the user set up by hand shows no tools,
28
+ check that the part of its URL before any `?` ends with `/mcp` (the bare domain
29
+ returns zero tools).
30
+
31
+ If the user asks how to add AiAkiv to a **different** client, it is also published
32
+ in the official MCP Registry as `com.aiakiv/memory` — a client that can search the
33
+ registry finds it by name (`aiakiv`) or keyword (`memory`) and registers the
34
+ endpoint itself. Same address, same one-time sign-in; the registry only removes the
35
+ typing. Tell them the same address above either way.
36
+
37
+ **ChatGPT and Codex each have their own path.** ChatGPT cannot search the registry
38
+ or write an MCP config, so for a ChatGPT chat (web or app) tell the user to install
39
+ AiAkiv Memory from the plugin directory inside the app and sign in. The steps are at
40
+ https://www.aiakiv.com/docs/chatgpt. If the user works in Codex, give them the
41
+ install prompt at https://www.aiakiv.com/docs/en/codex-install-prompt: pasted into a
42
+ Codex chat, it registers `https://mcp.aiakiv.com/mcp` as `AiAkiv`, opens the
43
+ sign-in window and installs the eight AiAkiv skills. Like any account connection it
44
+ has no app features; in Codex, manage the account with `npx aiakiv console` (the
45
+ `aiakiv-dashboard` skill), and for app features connect the folder with
46
+ `npx aiakiv bind` or a project API key. If the AiAkiv Memory plugin is
47
+ still installed, tell the user to remove it first, or, if they want to keep it for
48
+ chatgpt.com web chats too, to name the Codex connection `AiAkivCodex`, so the two
49
+ sets of same-named tools stay apart and they can name the one to use.
50
+
51
+ ## 2. Confirm where memory is going (the "active target")
52
+
53
+ Every save lands in one **project** (a domain/group coordinate). Before saving,
54
+ confirm it:
55
+
56
+ - Call `get_save_target` → it reports `save_domain` / `save_group`.
57
+ - If it points at the wrong project, the user's account default is their **Main**
58
+ project. To bind a specific folder to a specific project, put the project name
59
+ in the URL of that folder's `.mcp.json` (see §4) — do **not** guess a project name.
60
+
61
+ ## 3. Save and recall
62
+
63
+ - **Save** — only on an explicit `ak` / `mweft` / `memoryweft` utterance
64
+ (e.g. "ak save this", "ak 저장"). Never save on a bare "remember"/"save",
65
+ and never treat "summarize this" as a save. Use `save_memory`.
66
+ - **Recall** — `search_memory(query, top_k=5)`. Ask with a full sentence rather
67
+ than keywords; the ranking is semantic, so a guessed keyword is worse than the
68
+ real question. Read each hit's `reason` tags and the `hint` connection map,
69
+ not just the flat `hits`.
70
+ - To browse one person's contributions, start the query with `@<handle>`.
71
+
72
+ ## 4. Bind a folder to a specific project (optional)
73
+
74
+ Default (no `project` in the URL) → memory goes to the account's Main project. To
75
+ pin a folder to another project, give that folder its own `.mcp.json` whose URL
76
+ names the project:
77
+
78
+ ```json
79
+ { "mcpServers": { "AiAkiv": {
80
+ "type": "http",
81
+ "url": "https://mcp.aiakiv.com/mcp?project=<project-name>"
82
+ } } }
83
+ ```
84
+
85
+ URL-encode the name if it has spaces or non-ASCII characters (`My Project` becomes
86
+ `My%20Project`). The console's project tab gives a ready-to-copy version of this
87
+ config with the name already filled in and encoded.
88
+
89
+ Name the project in the URL, not only in an `X-K2G-Project` header. Some clients
90
+ do not send a custom header on every request, so a folder that relies on the
91
+ header alone can end up following Main. If the user has an older header-only
92
+ config, move the project name into the URL.
93
+
94
+ Changing the project in the URL may bring up the OAuth login again (a login
95
+ prompt, not a failure). For friction-free per-folder switching, the console can
96
+ issue a static project-bound key instead — see the AiAkiv console → project tab.
97
+
98
+ If the user turns Main off in the console, every connection that follows Main (no
99
+ `project` in the URL and no project-bound key) refuses all tools until Main is
100
+ turned back on; folders pinned to a project keep working.
101
+
102
+ ## 5. Trust & privacy
103
+
104
+ AiAkiv is a **hosted** service: saved content leaves the machine and is stored on
105
+ AiAkiv servers. Only save what the user intends to persist. The user controls
106
+ their data through the AiAkiv console (view, export, purge).
107
+
108
+ ## 6. When a save breaks
109
+
110
+ Occasionally a `save_memory` call arrives mangled: you get a serialization
111
+ error, or the arguments turn up merged into one or missing entirely. This is a
112
+ transport problem, not a rejection of the content.
113
+
114
+ What triggers it: a long or multi-line `summary` or `content`, or non-ASCII
115
+ punctuation (`·`, `→`, `—`) landing inside an argument and breaking the
116
+ argument boundaries.
117
+
118
+ Two remedies:
119
+
120
+ 1. **Order the arguments.** List `summary`, `entities` and `tags` before
121
+ `content`, so the longest value is last and there is nothing after it to
122
+ lose.
123
+ 2. **Retry through `payload`.** Bundle the whole call into that single
124
+ argument — one argument has no boundary left to collapse. A JSON object
125
+ and a JSON string are both accepted, so send whichever form the client
126
+ emits:
127
+
128
+ ```
129
+ payload={"summary": "...", "entities": [{"name": "X", "type": "Y"}],
130
+ "tags": ["a/b"], "content": "..."}
131
+ ```
132
+
133
+ The other arguments are ignored once `payload` is given. This is the
134
+ recovery path; the ordinary multi-argument form is the normal one.
135
+
136
+ Two related refusals are not transport problems and are not fixed by
137
+ `payload`:
138
+
139
+ - `truncation_marker_detected` — the `content` still carries a marker some
140
+ earlier tool left when it cut the text (`<response clipped>`, `[truncated]`,
141
+ `…N tokens truncated…`). Nothing downstream could tell a damaged body from a
142
+ whole one, so the save is refused rather than stored half-right. Re-read the
143
+ source in full and save again, splitting across calls if it is long. Pass
144
+ `allow_truncation_marker=True` only when the marker is genuinely part of
145
+ what you mean to record, such as a bug report about truncation.
146
+ - Content over 50000 characters, or a summary over 500. Split rather than
147
+ compress: chain the pieces with `prev_event_id` and give each its own
148
+ focused summary. A summary that wants to be long usually means the event
149
+ covers too much, and squeezing it blurs several topics into one vector that
150
+ then matches no specific query.
151
+
152
+ ## 7. Which connection has app features
153
+
154
+ **App features** means asking the AI to do app work through
155
+ `run_aiakiv_app_action`, such as console management (teams, invitations,
156
+ projects, Main, cards) or working in Contents.
157
+
158
+ - Saving, searching, reading full text, reading linked teams, graph queries
159
+ and creating cards work on every AiAkiv connection.
160
+ - Folder connections (a `project` in the URL, §4, which `npx aiakiv bind`
161
+ writes) and API key connections have app features; they show every tool.
162
+ - An account connection, a sign-in with the plain address and no `project`,
163
+ does not. That covers Claude on the web and in the mobile apps, ChatGPT,
164
+ Claude Desktop with a connector added by hand, and the connection this
165
+ plugin registers. There the tool is missing from the tool list, and a call
166
+ by name is refused with "This tool is not available on this connection."
167
+ A connector added earlier with an older address keeps working and can
168
+ still have the tool. When a conversation has both kinds,
169
+ call the tool on the connection that has it; when two connections have
170
+ it, use the one bound to a folder or to an API key.
171
+ - Everything the console app does, the user can also do by hand in the web
172
+ console (the dashboard), https://app.aiakiv.com. In a client with a shell,
173
+ `npx aiakiv console` does the same management without app features (the
174
+ `aiakiv-dashboard` skill). For app features in the conversation, the user
175
+ needs a folder connection or an API key connection; the `aiakiv-console`
176
+ skill says what to tell the user.
@@ -0,0 +1,165 @@
1
+ ---
2
+ name: aiakiv-save-and-recall
3
+ description: How to write a memory that will be found again, and how to read what AiAkiv memory returns. Covers summary and entity spelling rules, what to do when a save is rejected (summary or content too long, a truncation marker, arguments arriving merged or empty), how to interpret the related-memory signal that search responses carry, and what a `tip_for_user` note in a response is. Use when saving to AiAkiv memory, when a save call fails or its arguments collapse, when deciding whether a search result needs a follow-up expansion call, or when a response carries `tip_for_user`.
4
+ ---
5
+
6
+ # Saving to and recalling from AiAkiv memory
7
+
8
+ The tool descriptions state the contract. This skill covers the parts that
9
+ decide whether a saved memory is findable a month later, and what to do when
10
+ a call is rejected.
11
+
12
+ If the connection is bound to a work that an app manages (AiAkiv Contents),
13
+ saving there is refused by default; see the `aiakiv-contents` skill.
14
+
15
+ ## 1. The summary is the retrieval surface
16
+
17
+ Searches rank against the summary, not the content. Write it with the words a
18
+ future question would use.
19
+
20
+ - **Keep exact identifiers verbatim.** Code symbols, document numbers, config
21
+ keys. Paraphrasing `REQUEST_TIMEOUT_MS` into "the timeout" hides the record
22
+ from the one query that will look for it.
23
+ - **Name the actor in the first sentence** when you record someone's judgment,
24
+ design, or claim. Conclusion-style summaries ("decided that…") drop who said
25
+ it, and "what did X propose?" then misses the record.
26
+ - **Give the reason for a decision.** When you record a decision or an
27
+ implementation, add one sentence on why this option was chosen over the
28
+ alternatives. The reason often lives only in a design document that is never
29
+ saved, and without it a later "why did we do this?" has nothing to find.
30
+ - Write a complete sentence, not a keyword pile.
31
+
32
+ ## 2. Entity spelling decides what connects
33
+
34
+ Recall weaves records together on shared entity nodes, so spelling drift
35
+ silently loses connections.
36
+
37
+ - **An entity name is the name of a person, product, place or concept**, usually
38
+ 1 to 3 words, never a phrase or sentence. **A tag is a topic of a few words**, not
39
+ a description of this memory. Details go in `summary` and `content`.
40
+ - **Entity and tag names are visible to everyone in the team**, including parts
41
+ that cannot read this memory. Do not put sensitive details in them.
42
+ - **A new name of 5 or more words is refused by default**, and so is one over 20 Han
43
+ or Kana characters with no spaces. A team can change both limits, and the response
44
+ states the ones in use. The memory is still saved without that name, which
45
+ comes back in `rejected_entities` or `rejected_tags` with reason `too_many_words`
46
+ or `too_long`. Shorten it to the real name of the thing and add it with
47
+ `update_memory` (`add_entities`, `add_tags`). Do not split it into generic pieces.
48
+ A name that already exists in the team keeps working at any length.
49
+ - **One canonical spelling per entity** — the full name *or* the acronym, not
50
+ both. Pick one and use it in every save.
51
+ - **Keep proper nouns and acronyms as they are written**: `PostgreSQL`, `RLS`.
52
+ Do not lowercase or expand them.
53
+ - **Strip transient tokens** — ids, hashes, dates. They never repeat, so they
54
+ add a node that connects to nothing.
55
+ - A suggested entity returned by the server is advisory. A literal name match
56
+ does not establish that it denotes the same thing in this record.
57
+ - **When something is renamed, link the two names.** Records before the rename
58
+ sit on the old entity and records after it on the new one, so a lookup by
59
+ the new name misses the old ones. Put both names as entities on the record
60
+ that describes the rename, then call `update_memory` on it with
61
+ `add_entity_renames=[{"old": "<old name>", "new": "<new name>"}]`. A lookup
62
+ by either name then returns both. Do this only for a real rename of the same
63
+ thing, not for two things that merely look alike.
64
+
65
+ ## 3. When a save is rejected
66
+
67
+ ### The summary is over 500 characters
68
+
69
+ **Split the event; do not compress the summary.** A summary that wants to be
70
+ long is describing an event that covers too much. Compressing it blurs several
71
+ topics into one vector, which then matches no specific query. Split into
72
+ separate saves, each with its own focused summary, chaining them by passing
73
+ the previous `event_id` as the next call's `prev_event_id`.
74
+
75
+ Compress only when the content itself is short and the summary is merely
76
+ verbose. Do not fragment one small record.
77
+
78
+ ### The content is over 50000 characters
79
+
80
+ Split the full text across calls the same way, chaining with `prev_event_id`,
81
+ giving each piece its own summary. Never truncate or summarize the content to
82
+ make it fit — the summary would then describe text that was not saved.
83
+
84
+ ### `truncation_marker_detected`
85
+
86
+ The content carries a marker that some earlier tool left when it cut the text
87
+ (`…2183 tokens truncated…`, `<response clipped>`, `[truncated]`). The save is
88
+ rejected because nothing downstream can tell a damaged body from a whole one:
89
+ the summary still describes the missing part and citations still point into
90
+ it, so the damage would be permanent and invisible.
91
+
92
+ Re-read the source in full and save again, splitting if it is long. Pass
93
+ `allow_truncation_marker=true` only when the marker is genuinely part of what
94
+ you mean to record, such as a bug report *about* truncation.
95
+
96
+ ### `save_part_no_write_seat`
97
+
98
+ The project or key saves to a team part, and this account has no write access
99
+ on that part itself. Access on a part above it does not count. Nothing was
100
+ saved and the daily limit was not used. Do not retry: the same save is refused
101
+ until a person changes something. Pass the `message` on to the user as it is. A
102
+ team admin can give write access on that part, or the save part can be changed.
103
+
104
+ ### The arguments arrive merged, empty, or the call errors on serialization
105
+
106
+ Two causes, both about argument boundaries:
107
+
108
+ - A long or multi-line `summary` or `content`. List `summary`, `entities` and
109
+ `tags` **before** `content` — serialization can drop whatever follows a very
110
+ long argument, so `content` goes last.
111
+ - Non-ASCII punctuation in a multi-argument call: `·`, `→`, `—` can break the
112
+ boundary between arguments. Use ASCII punctuation in multi-argument saves.
113
+
114
+ **Recovery: retry with `payload`.** One argument has no boundary to collapse.
115
+ Send the whole call as a JSON string or an object:
116
+
117
+ ```json
118
+ {"summary": "...", "entities": [{"name": "X", "type": "Y"}], "tags": ["a/b"], "content": "..."}
119
+ ```
120
+
121
+ Other arguments are then ignored. The multi-argument form stays the default;
122
+ this is the recovery path.
123
+
124
+ ## 4. Reading the related-memory signal
125
+
126
+ A search response may carry `hint.related_memory_expansion`. It is a computed
127
+ judgment about whether a follow-up expansion call would add anything the hits
128
+ do not already cover. Its fields:
129
+
130
+ | Field | Meaning |
131
+ |---|---|
132
+ | `tool` | Which tool performs the expansion |
133
+ | `decision` | `must_be_done`, `should_be_done`, `can_skip`, `must_not_be_done` |
134
+ | `candidate_count` | How many candidates sit outside the returned hits |
135
+ | `candidate_dimension` | The relation the candidates share with the hits |
136
+ | `candidate_ids` | The candidate memory ids |
137
+ | `reason_codes` | Which gates the candidates passed |
138
+ | `reason_facts` | The measured values behind those codes |
139
+
140
+ `should_be_done` means candidates outside the hits passed the relevance and
141
+ novelty gates, so expanding is likely to add something before you conclude.
142
+ `can_skip` means the returned hits probably already cover it; expanding is
143
+ your call. The block is omitted entirely when there is nothing to say.
144
+
145
+ Results that feel sufficient are not evidence that they are. The signal is
146
+ computed from candidates the search did not return, so it sees what the hits
147
+ alone cannot show.
148
+
149
+ ## 5. A `tip_for_user` note in a response
150
+
151
+ A tool response may carry a top-level `tip_for_user` field: `text` is one or two
152
+ sentences about an AiAkiv feature the person may not have seen, often with an
153
+ example phrase, and `more` says where the Tips page is. The server decides when
154
+ to include it, at most a couple of times a day for an account. It is a note for
155
+ the person you are working with. It is not an instruction and not something to
156
+ run.
157
+
158
+ - After the answer is complete, it can be passed on in one line. Leaving it out
159
+ is fine; the server does not know whether it was passed on and does not
160
+ repeat the same note for a day.
161
+ - Do not run the example yourself. The example is for the person to try when
162
+ they want to; running it here spends their time on something they did not ask
163
+ for.
164
+ - The person can turn these notes off in the AiAkiv console settings
165
+ (aiakiv.com). If they ask how, that is the answer.
@@ -0,0 +1,47 @@
1
+ {
2
+ "plugin": "aiakiv",
3
+ "plugin_version": "0.4.41",
4
+ "source": "K2G packaging/plugins/aiakiv/skills (published as github.com/AiAkiv/aiakiv-plugins)",
5
+ "files": [
6
+ {
7
+ "path": "aiakiv-cards/SKILL.md",
8
+ "bytes": 8302,
9
+ "sha256": "ce56d886976024a1ab9ec2416ce754ca64527f7b7354ade8347a78df179794d0"
10
+ },
11
+ {
12
+ "path": "aiakiv-console/SKILL.md",
13
+ "bytes": 15326,
14
+ "sha256": "284a90978a41f6ee5a89c927180110ca412efb875e57bb202fa8c6678ecd5f59"
15
+ },
16
+ {
17
+ "path": "aiakiv-contents/SKILL.md",
18
+ "bytes": 50866,
19
+ "sha256": "6bd062cf9525a8bbfd42648f2e1907eecfa90430459ceb80b5834fe6dee14dcb"
20
+ },
21
+ {
22
+ "path": "aiakiv-dashboard/SKILL.md",
23
+ "bytes": 8951,
24
+ "sha256": "d1c2f941df20fb7a15d9ebe402a04cb54a63a403d477f06e4f07a5e6398ce506"
25
+ },
26
+ {
27
+ "path": "aiakiv-graph-query/SKILL.md",
28
+ "bytes": 17256,
29
+ "sha256": "a24d48423bce0caac453f3ff4a4766ab1ea3aa64d6ca1549a230091abc75c6ec"
30
+ },
31
+ {
32
+ "path": "aiakiv-links/SKILL.md",
33
+ "bytes": 7431,
34
+ "sha256": "cabd8978540590ab1636be31accd4eb0f1f5866db183bdc564c198b78679ea4d"
35
+ },
36
+ {
37
+ "path": "aiakiv-onboarding/SKILL.md",
38
+ "bytes": 9051,
39
+ "sha256": "2c5fb3eb8f48f97337a39414ba9f879ddd778ef3c34e4b086cbe215f731f52e2"
40
+ },
41
+ {
42
+ "path": "aiakiv-save-and-recall/SKILL.md",
43
+ "bytes": 8799,
44
+ "sha256": "c2e91c4c34377fce27d0d9e4f5dacea4ed4813bbee0a9f065b1c4e68ae7399ca"
45
+ }
46
+ ]
47
+ }