@tanagram/lore 0.1.57 → 0.1.58

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/lore",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "Lore CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,84 @@
1
+ ---
2
+ name: fork
3
+ description: >-
4
+ Distills a Lore thread into handoff context for continuing work. Use when the
5
+ user asks to "continue work from thread", "fork from thread", "pick up from
6
+ this Lore thread", or invokes /fork with a Lore thread URL/ID and forker
7
+ intent.
8
+ argument-hint: "<lore-thread-url-or-id> <forker-intent>"
9
+ allowed-tools: Bash
10
+ ---
11
+
12
+ # Fork a Lore Thread
13
+
14
+ Fetches an intent-conditioned handoff summary for a Lore thread and returns the
15
+ `source_distilled` payload to the agent so it can continue from that context.
16
+
17
+ ## When to Use
18
+
19
+ Run when the user asks to:
20
+
21
+ - "continue work from thread <thread-url-or-id>"
22
+ - "fork from thread <thread-url-or-id>"
23
+ - "pick up from this Lore thread"
24
+ - "use this thread as context for <intent>"
25
+ - invoke `/fork <thread-url-or-id> <forker-intent>`
26
+
27
+ Do not use this for merely reading or listing Lore threads. Use the `lore-read`
28
+ skill for read-only thread inspection.
29
+
30
+ ## Inputs
31
+
32
+ This skill needs two inputs:
33
+
34
+ 1. A Lore thread URL or ID. Accepted examples include `th_...`,
35
+ `https://lore.tanagram.ai/session/th_...`, and
36
+ `https://lore.tanagram.ai/thread/th_...`.
37
+ 2. Forker intent: what the user wants to do with the source thread.
38
+
39
+ If either input is missing, ask one concise clarification question before
40
+ running the command.
41
+
42
+ ## Command
43
+
44
+ Run `lore threads fork` with the thread reference and intent. The command emits
45
+ JSON; extract and return only `source_distilled`.
46
+
47
+ ```bash
48
+ THREAD_REF='<lore-thread-url-or-id>'
49
+ FORKER_INTENT='<what the user wants to do next>'
50
+
51
+ lore threads fork "$THREAD_REF" --forker-intent "$FORKER_INTENT" \
52
+ | node -e 'let input = "";
53
+ process.stdin.on("data", (chunk) => { input += chunk; });
54
+ process.stdin.on("end", () => {
55
+ const parsed = JSON.parse(input);
56
+ if (typeof parsed.source_distilled !== "string" || parsed.source_distilled.length === 0) {
57
+ console.error("lore threads fork did not return source_distilled");
58
+ process.exit(1);
59
+ }
60
+ process.stdout.write(parsed.source_distilled);
61
+ });'
62
+ ```
63
+
64
+ Use shell-safe quoting for both values. Do not pass the full thread transcript to
65
+ the model yourself; the CLI/API performs the intent-conditioned distillation.
66
+
67
+ ## After Running
68
+
69
+ Treat the printed `source_distilled` text as the source-thread context for the
70
+ current task. Use it to continue the requested work. Do not show raw JSON to the
71
+ user unless they explicitly ask for it.
72
+
73
+ If the user only asked to prepare the fork context, return the distilled text
74
+ verbatim. If they asked to continue the work, briefly acknowledge that the fork
75
+ context was loaded and proceed with the task using that context.
76
+
77
+ ## Failure Modes
78
+
79
+ - **Not logged in**: the command returns a login error. Tell the user to run
80
+ `lore login` and retry.
81
+ - **Thread not found or not visible**: tell the user the thread could not be
82
+ found or they do not have access, and ask for a visible Lore thread URL/ID.
83
+ - **Missing `source_distilled`**: surface the error and do not invent fork
84
+ context.