@korrlabs/mnemos-pi 2.15.0

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,53 @@
1
+ ---
2
+ name: mnemos-workflow
3
+ description: Memory workflow lifecycle — track open questions and tasks from open to done without losing them
4
+ ---
5
+
6
+ # Mnemos Workflow
7
+
8
+ Drive the lifecycle of a memory entry: `open → in-progress → blocked →
9
+ resolved → done` (or `withdrawn`). Use it so open questions and tasks
10
+ survive context resets and multiple agents can pick them up.
11
+
12
+ ## WHEN
13
+
14
+ - **An open question needs follow-up** — anyone should be able to see its
15
+ state and who holds it.
16
+ - **Starting work on a tracked item** — move it to `in-progress` first.
17
+ - **Blocked on someone/something** — record WHY in the transition.
18
+ - **Closing work** — `resolved` when answered, `done` when delivered,
19
+ `withdrawn` when abandoned as no longer relevant.
20
+
21
+ ## STEPS
22
+
23
+ 1. **Check current state** (id from a search result or `mnemos:open-question`
24
+ entry):
25
+
26
+ ```text
27
+ mnemos_workflow(action="get", memory_id=<id>)
28
+ ```
29
+
30
+ 2. **Transition with an explicit actor** (your agent slug) and a reason:
31
+
32
+ ```text
33
+ mnemos_workflow(action="set", memory_id=<id>, to="in-progress",
34
+ actor=<your-slug>, reason="investigating repro on #123")
35
+ ```
36
+
37
+ 3. **Review the audit trail** before overriding someone else's state:
38
+
39
+ ```text
40
+ mnemos_workflow(action="history", memory_id=<id>)
41
+ ```
42
+
43
+ ## RULES
44
+
45
+ - `blocked → done` is **forbidden** — resolve a blocker first; the state
46
+ machine enforces this.
47
+ - Stale locks auto-release after 24h; if you force-unlock, give a reason.
48
+ - Same-status transitions are no-ops — don't churn the audit log.
49
+
50
+ ## See also
51
+
52
+ - Skill `mnemos-write` — creating the `mnemos:open-question` entry first
53
+ - Skill `mnemos-agent-recall` — finding who owns an open item
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: mnemos-write
3
+ description: Write a good memory entry — tag contract, content quality, one idea per entry
4
+ ---
5
+
6
+ # Mnemos Write
7
+
8
+ Persist a single non-session entry (bug-pattern, learning, decision, rule,
9
+ open-question). Use when an agent has discovered something worth keeping
10
+ beyond the current session.
11
+
12
+ ## WHEN
13
+
14
+ - **When learning something non-obvious** — a gotcha, a hidden constraint, a
15
+ surprising behaviour that a future agent would benefit from.
16
+ - **When a decision is made** — design, process, or tradeoff chosen, with
17
+ rationale worth preserving.
18
+ - **When a bug-pattern is identified** — a class of bug that future reviews
19
+ should catch.
20
+ - **When a rule is established** — a hard constraint or invariant.
21
+ - **When an open question arises** — something that cannot be resolved now
22
+ but should be revisited.
23
+
24
+ ## STEPS
25
+
26
+ 1. **Choose the tag** (see `mnemos-tag-contract` for the full schema):
27
+
28
+ | Tag | When |
29
+ |-----|------|
30
+ | `mnemos:bug-pattern` | A class of bug; want future reviews to catch it. |
31
+ | `mnemos:learning` | An insight to avoid re-learning. |
32
+ | `mnemos:decision` | A design/process choice + rationale. |
33
+ | `mnemos:rule` | A hard constraint or invariant. |
34
+ | `mnemos:open-question` | An unresolved question to revisit. |
35
+
36
+ 2. **Compose the content** — markdown, one idea per entry:
37
+
38
+ - For `mnemos:bug-pattern`: describe the bug class, how to spot it, and the
39
+ fix pattern.
40
+ - For `mnemos:learning`: state the insight and the context in which it
41
+ applies.
42
+ - For `mnemos:decision`: state the decision, the rationale, and the
43
+ alternatives considered.
44
+ - For `mnemos:rule`: state the rule and the scope (`applyTo:` tag).
45
+ - For `mnemos:open-question`: state the question and what is needed to
46
+ resolve it.
47
+
48
+ 3. **Assemble the tags** (mandatory):
49
+
50
+ ```text
51
+ tags=[
52
+ "project:<slug>",
53
+ "agent:<slug>",
54
+ "mnemos:<subtype>"
55
+ ]
56
+ ```
57
+
58
+ Add optional tags as needed: `severity:`, `stack:`, `source:`,
59
+ `applyTo:`, `milestone:`, `domain:`.
60
+
61
+ 4. **Write the entry**:
62
+
63
+ ```text
64
+ mnemos_add(
65
+ content=<markdown body>,
66
+ tags=[...],
67
+ title=<short title> # optional, auto-generated if omitted
68
+ )
69
+ ```
70
+
71
+ 5. **Confirm with a one-line notice**:
72
+
73
+ ```text
74
+ mnemos: wrote <mnemos:subtype> / <title>
75
+ ```
76
+
77
+ ## DISCIPLINE
78
+
79
+ - **Do not write trivia.** If you would not want to read this back in 30 days,
80
+ do not write it. Memory is not a log of every action.
81
+ - **One idea per entry.** Split complex learnings into multiple entries.
82
+ An entry that covers three topics is unsearchable.
83
+ - **Update by key, don't duplicate.** If re-capturing something, search for it
84
+ first and update rather than appending a duplicate.
85
+ - **Include the why, not just the what.** A decision without rationale is a
86
+ rule without justification — future agents cannot tell if it still applies.
87
+ - **Tag contract is mandatory.** Missing or malformed tags cause the write
88
+ to be rejected in strict mode. See `mnemos-tag-contract`.
89
+
90
+ ## See also
91
+
92
+ - Skill `mnemos-tag-contract` — full tag schema reference
93
+ - Skill `mnemos-recall` — search before writing (avoid duplicates)
94
+ - Instruction `mnemos-memory-ops.instructions.md`
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@korrlabs/mnemos-pi",
3
+ "version": "2.15.0",
4
+ "description": "Mnemos memory & knowledge server — Pi extension. Spawns `mnemos mcp-server` over stdio and exposes every mnemos_* tool as a native Pi tool, plus the mnemos skill pack.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "Korrnals",
8
+ "homepage": "https://github.com/Korrnals/mnemos",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/Korrnals/mnemos.git"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/Korrnals/mnemos/issues"
15
+ },
16
+ "keywords": [
17
+ "pi-package",
18
+ "pi",
19
+ "mcp",
20
+ "model-context-protocol",
21
+ "memory",
22
+ "mnemos",
23
+ "ai",
24
+ "coding-agent",
25
+ "extension"
26
+ ],
27
+ "engines": {
28
+ "node": ">=20"
29
+ },
30
+ "pi": {
31
+ "extensions": [
32
+ "./integrations/extensions/mnemos-mcp.ts"
33
+ ],
34
+ "skills": [
35
+ "./integrations/skills"
36
+ ]
37
+ },
38
+ "peerDependencies": {
39
+ "@earendil-works/pi-coding-agent": "*",
40
+ "typebox": "*"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "@earendil-works/pi-coding-agent": {
44
+ "optional": true
45
+ },
46
+ "typebox": {
47
+ "optional": true
48
+ }
49
+ },
50
+ "files": [
51
+ "integrations/extensions/",
52
+ "integrations/skills/",
53
+ "README.md",
54
+ "LICENSE"
55
+ ],
56
+ "publishConfig": {
57
+ "access": "public"
58
+ }
59
+ }