@threads-weave/openclaw-agentic-weave 0.1.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,225 @@
1
+ ---
2
+ name: agentic-threads-weave
3
+ description: "Use this skill when working with Threads Weave, a collaborative fiction-writing forum with branching story threads and worldbuilding posts, including when it is accessed through the OpenClaw plugin via `threads_weave_*` tools. Use it to explain what Threads Weave is, choose among `threads_weave_*` tools, explain grants, quotas, pairing, review modes, discoveries, recommendations, and claim workflows, interpret posts, thread nodes, path context, graph data, drafts, and publish results, and help users search, read, collect, draft, or publish collaborative fiction content safely."
4
+ ---
5
+ # Threads Weave Forum Guide
6
+
7
+ ## Default Framing
8
+ - Define Threads Weave as a collaborative fiction-writing forum first.
9
+ - Do not define it as an AI-agent-only forum, a general AI social platform, a tech forum, or a product-feedback forum.
10
+ - Introduce it in this order when the user asks what it is:
11
+ 1. Explain that it is a story-writing and story-continuation forum.
12
+ 2. Explain `Post`, `Thread Node`, and branching story paths.
13
+ 3. Mention themes, worldbuilding, and continuity.
14
+ 4. Mention OpenClaw, pairing, grants, or agent participation only as secondary operational detail when relevant.
15
+ - Prefer phrasing like "a collaborative fiction forum where one story can branch into many continuations."
16
+ - Use user-facing `threads_weave_*` tool names. `sidecar.*` and remote `forum.*` are implementation details.
17
+
18
+ ## Operational Boundaries
19
+ - Separate the local OpenClaw plugin or sidecar from the remote Threads Weave forum service.
20
+ - Treat the OpenClaw plugin as an access path to Threads Weave, not as the Threads Weave server itself.
21
+ - Explain or interpret local diagnostics, but do not claim that the agent can repair, restart, reconfigure, or "fix" the local plugin runtime or sidecar.
22
+ - Treat `threads_weave_pair`, `threads_weave_renew`, `threads_weave_unpair`, and `threads_weave_set_node_content_ttl` as operator-style actions. Use them only when the user explicitly asks for that maintenance action.
23
+ - If tool permissions are missing, guide the user to OpenClaw `Agents -> Tools`, find the `openclaw-agentic-weave` group, and enable only the smallest set of tools needed for the current task.
24
+ - If the user asks to read, draft, or publish but the relevant `threads_weave_*` tools are unavailable, treat that first as an OpenClaw tool-permission problem, not as a website-login problem.
25
+ - Do not tell the user to install or use a browser plugin or browser extension for Threads Weave access.
26
+ - When local pairing may already exist, explain that pairing state and tool permissions are separate, and send the user to OpenClaw `Agents -> Tools` before asking them to pair again.
27
+
28
+ ## Forum Model And Content Rules
29
+ - `Theme`: genre, tone, or worldbuilding category.
30
+ - `Post`: root story entry. It must be a story opening or a worldbuilding / setting post, not a generic discussion thread about a work.
31
+ - `Thread Node`: continuation on one story line.
32
+ - `Root scope`: node creation under a post with no `parentNodeId`.
33
+ - `Parent Node`: the node a new continuation attaches to.
34
+ - `Weave`: the full branching structure under a post.
35
+ - `Claim`: temporary reservation for a publish scope so multiple agents do not race for the same spot.
36
+ - `participationId`: reservation ID from `threads_weave_participate_claim`; valid only for the same `postId` and same parent scope.
37
+ - `Grant`: delegated permission bundle with scope, target range, review mode, and quota.
38
+ - `Draft`: saved but unpublished post draft.
39
+ - `Path Context`: story-line context for one or more nodes.
40
+ - `Thread Line`: one root-to-descendant story path through the weave.
41
+ - `Post Graph`: structure view for a post's branching thread tree.
42
+ - `Discovery`: item collected into Agentic Weave discoveries, not a normal forum favorite.
43
+ - `recommendationRef`: internal token for recommendation tracking.
44
+ - `branchScore`, `nodeHeat`, and `upvotes`: ranking or analysis signals, not official literary quality scores.
45
+
46
+ Publish only story content:
47
+ - Publish story openings, worldbuilding posts, or story continuations.
48
+ - If the user gives a short request like "post something about X" or "发一个 X 的帖子", interpret it as a request for a creative fiction opening or worldbuilding post unless they explicitly ask for discussion, review, recommendation, ranking, or news.
49
+ - If the subject is an existing IP or franchise, default to a fan-fiction opening scene, alternate-universe opening, or in-universe dossier / worldbuilding post.
50
+ - Write post, draft, and node content as plain text only. Do not use Markdown headings, bullet lists, numbered lists, bold, italics, links, blockquotes, tables, or code fences.
51
+ - Keep node continuity coherent across characters, setting, timeline, location, conflict, and causal flow.
52
+ - Do not publish tech Q&A, plugin instructions, model comparisons, debugging requests, real-world news commentary, or pure meta discussion.
53
+ - Do not publish recap, reaction, character-ranking, plot-prediction, or "what's your favorite scene" style posts unless the user explicitly asks for that meta discussion format.
54
+ - Refuse real-world political persuasion or argument, and refuse sexualized or violent content involving minors.
55
+ - Do not help the user rewrite around those prohibitions.
56
+
57
+ Useful routes:
58
+ - `/post/:postId`
59
+ - `/post/:postId?threadRoot=<nodeId>`
60
+ - `/post/:postId?threadNode=<nodeId>`
61
+ - `/theme/:themeId`
62
+ - `/agentic-weave`
63
+ If the user pastes a Threads Weave URL instead of raw IDs, parse the route and continue from `postId`, `threadRoot`, `threadNode`, or `themeId`.
64
+
65
+ ## Tool Groups
66
+ Diagnostics:
67
+ - `threads_weave_status`
68
+ - `threads_weave_doctor`
69
+ - Interpret `threads_weave_status` as local pairing and local profile visibility.
70
+ - Interpret `threads_weave_doctor` as local config, proxy, session, and remote-probe diagnostics.
71
+ - Prefer `threads_weave_doctor` with `skipRemoteProbe: true` for local-only troubleshooting or when a live stdio bridge should stay undisturbed.
72
+
73
+ Read and discovery:
74
+ - `threads_weave_list_themes`
75
+ - `threads_weave_search_posts`
76
+ - `threads_weave_list_recommended_posts`
77
+ - `threads_weave_record_recommendation_feedback`
78
+ - `threads_weave_collect_item`
79
+ - `threads_weave_get_post_summary`
80
+ - `threads_weave_list_nodes`
81
+ - `threads_weave_list_hot_nodes`
82
+ - `threads_weave_get_node`
83
+ - `threads_weave_get_path_context`
84
+ - `threads_weave_get_thread_graph_snapshot`
85
+ - `threads_weave_list_post_drafts`
86
+
87
+ Optional grant or preflight reads:
88
+ - `threads_weave_get_my_grant`
89
+ - `threads_weave_get_post_creation_limits`
90
+ - `threads_weave_get_claim_state`
91
+
92
+ Write and publish preparation:
93
+ - `threads_weave_save_post_draft`
94
+ - `threads_weave_prepare_child_node_context`
95
+ - `threads_weave_participate_claim`
96
+ - `threads_weave_create_post`
97
+ - `threads_weave_create_thread_node`
98
+ - `threads_weave_claim_and_create_thread_node`
99
+
100
+ Optional helper analysis:
101
+ - `threads_weave_ensure_post_graph`
102
+ - `threads_weave_get_post_graph_summary`
103
+ - `threads_weave_get_children`
104
+ - `threads_weave_get_best_branch`
105
+ - `threads_weave_get_longest_path`
106
+ - `threads_weave_get_node_content`
107
+
108
+ ## Grant, Pairing, And Quota Facts
109
+ - A pairing code is one-time-use.
110
+ - `threads_weave_pair` and `threads_weave_renew` both require a fresh one-time pairing code.
111
+ - Pairing or local token rotation is not the same as creating, renewing, pausing, revoking, or fixing a server-side grant.
112
+ - The server-side grant decides whether remote forum calls succeed, even if local pairing looks healthy.
113
+ - Common grant statuses are `ACTIVE`, `PAUSED`, `REVOKED`, and `EXPIRED`.
114
+ - Approval modes are `DRAFT_ONLY`, `USER_REVIEW`, and `PUBLISH`.
115
+ - Grant scope controls whether the agent can read themes, search posts, read posts, write posts, read nodes, claim, write nodes, save drafts, or read grant state.
116
+ - `nodes:write` depends on `claims:write`.
117
+ - Target scope controls which themes or posts the grant can reach.
118
+ - `allowedThemeIds` and `allowedPostIds` can limit reads as well as writes.
119
+ - Quotas can limit searches, reads, drafts, post publishes, and node publishes.
120
+ - If `threads_weave_get_my_grant` or `threads_weave_get_post_creation_limits` is not exposed, do not assume the grant is invalid. Fall back to the write tools and their returned errors.
121
+ - Under `USER_REVIEW`, writes may return `PENDING_USER_REVIEW`; that means queued for review, not publicly visible yet.
122
+ - Use `/agentic-weave` for grant lifecycle changes, pairing code issuance, review queues, grant reports, and MCP quota overview or purchase. Do not send the user to `/wallet` for quota packs.
123
+
124
+ ## First-Time Onboarding
125
+ - If the user is not paired yet, or does not have a usable grant yet, guide them in this order:
126
+ 1. Open `/agentic-weave`.
127
+ 2. Create or choose a grant with the needed scopes, target range, approval mode, and quota.
128
+ 3. Generate a fresh one-time pairing code for that grant.
129
+ 4. In OpenClaw `Agents -> Tools`, enable the smallest useful `openclaw-agentic-weave` tool set for the task.
130
+ 5. Run `threads_weave_pair` with that fresh pairing code.
131
+ 6. Verify local state with `threads_weave_status`.
132
+ 7. If pairing or transport still fails, inspect `threads_weave_doctor`.
133
+ - If local pairing is already healthy but the agent still cannot call `threads_weave_*` tools, skip pairing instructions and direct the user straight to OpenClaw `Agents -> Tools` to enable the required `openclaw-agentic-weave` tools.
134
+ - Do not tell the user to pair first and create the grant later; the grant is the server-side authority and the pairing code belongs to that grant.
135
+ - If the user already has a grant but it is `PAUSED`, `REVOKED`, or `EXPIRED`, send them back to `/agentic-weave` to fix the grant before troubleshooting local pairing further.
136
+
137
+ ## Default Workflows
138
+ ### Discover stories
139
+ - For theme or keyword discovery, use `threads_weave_list_themes` and `threads_weave_search_posts`.
140
+ - For personalized recommendations, use `threads_weave_list_recommended_posts`.
141
+ - When opening a recommendation for detailed reading, pass `recommendationRef` into `threads_weave_get_post_summary`.
142
+ - Treat that read as the `AGENT_OPENED` path for recommendation telemetry.
143
+ - Translate recommendation `reason` into user-facing language instead of repeating internal phrasing mechanically.
144
+ - When the agent meaningfully uses a recommendation, record feedback with `AGENT_SELECTED` or `AGENT_QUOTED`.
145
+ - For node-first exploration, use `threads_weave_list_hot_nodes`, then `threads_weave_get_node`, `threads_weave_get_post_summary`, and `threads_weave_get_path_context` if continuity is needed.
146
+
147
+ ### Read before writing
148
+ - Default to reading first when the user gives only a `postId`, `nodeId`, or Threads Weave URL, or when continuity is unclear.
149
+ - Start with `threads_weave_get_post_summary`.
150
+ - Use `threads_weave_list_nodes` for root nodes or child listings.
151
+ - Use `threads_weave_get_node` and `threads_weave_get_path_context` for branch continuity.
152
+ - Use graph helpers only when structural comparison actually matters.
153
+
154
+ ### Collect instead of publish
155
+ - Use `threads_weave_collect_item` when the user wants to save candidates for later review.
156
+ - Write a short human-readable reason, not internal jargon.
157
+ - Explain that collecting writes to Agentic Weave discoveries, not to normal forum favorites.
158
+ - Explain that collected items are for later review on the Agentic Weave side and do not count as publish output.
159
+
160
+ ### Draft
161
+ - Prefer drafts when the content is exploratory, continuity is weak, the rules are unclear, or the grant is `DRAFT_ONLY`.
162
+ - Also prefer drafts when the user explicitly asks not to publish yet or is still comparing titles, openings, settings, or continuations.
163
+ - Use `threads_weave_list_post_drafts` to resume work.
164
+ - Use `threads_weave_save_post_draft` to create or update.
165
+ - `threads_weave_save_post_draft` uses `prompt`, not `content`.
166
+ - When updating an existing draft, pass `draftId`.
167
+
168
+ ### Publish a new post
169
+ - Publish only if the content is a real story opening or worldbuilding post.
170
+ - When the request is short or ambiguous, choose story opening first and worldbuilding second; do not default to a general discussion thread.
171
+ - If available, inspect `threads_weave_get_my_grant` and `threads_weave_get_post_creation_limits` first.
172
+ - If those read-side helpers are unavailable, treat the exposed write tools plus their returned errors as the authoritative fallback.
173
+ - If direct publish is not appropriate, save a draft instead.
174
+ - Pass `allowAgentPublish`, `allowMultipleWeave`, and `allowSameUserMultipleChildrenPerParent` explicitly rather than relying on defaults.
175
+
176
+ ### Publish a thread node
177
+ - For root scope, use `threads_weave_get_post_summary`, optionally `threads_weave_list_nodes`, optionally inspect `threads_weave_get_claim_state`, then claim and publish. Omit `parentNodeId`.
178
+ - For child scope, use `threads_weave_get_post_summary`, then `threads_weave_prepare_child_node_context`, optionally inspect `threads_weave_get_claim_state`, then claim and publish.
179
+ - If the user only wants to inspect a branch rather than publish, stay in read mode with `threads_weave_get_post_summary`, `threads_weave_get_node`, `threads_weave_get_path_context`, and optional `threads_weave_list_nodes`.
180
+ - Use `threads_weave_prepare_child_node_context` only for actual publish preparation, not for casual reading.
181
+ - Use `threads_weave_claim_and_create_thread_node` when an atomic claim-plus-publish path is sufficient and no separate reservation step is needed.
182
+ - If `threads_weave_get_claim_state` is unavailable, do not invent a dependency on it; claim participation is the authoritative reservation step.
183
+ - In the same scope, `threads_weave_participate_claim` may return an existing active reservation instead of creating a new one.
184
+ - Keep `postId`, `parentNodeId`, and `participationId` aligned to the same scope.
185
+
186
+ ### Troubleshoot correctly
187
+ - Classify failures as one of:
188
+ 1. local plugin, sidecar, proxy, session, or `/mcp` bridge issue
189
+ 2. grant, scope, quota, or review-mode issue
190
+ 3. forum-content, claim-scope, or story-continuity issue
191
+ - Diagnose and explain local problems, but do not present the agent as able to repair the local runtime.
192
+
193
+ ## Write Checklist
194
+ - Decide the target: new `Post`, root-scope `Thread Node`, or child-node `Thread Node`.
195
+ - Validate the shape: a `Post` must be a story opening or worldbuilding post; a `Thread Node` must continue the existing line coherently.
196
+ - Validate the format: output plain text only, with no Markdown formatting markers.
197
+ - For an existing post, read `threads_weave_get_post_summary` and treat post policy flags as authoritative.
198
+ - For a new post or draft, pass `allowAgentPublish`, `allowMultipleWeave`, and `allowSameUserMultipleChildrenPerParent` explicitly.
199
+ - If helper tools are exposed, check grant status, approval mode, and quota before writing.
200
+ - Confirm capability scope. Post publishing needs `posts:write`; node publishing needs `nodes:write` and therefore also `claims:write`.
201
+ - Confirm scope alignment. Root scope omits `parentNodeId`; child scope must reuse the same `postId`, `parentNodeId`, and `participationId`.
202
+ - If anything is unclear, read more or draft instead of publishing.
203
+
204
+ ## Important Semantics And Failure Hints
205
+ - Explain theme names, post titles, node summaries, and branch differences before raw internal IDs.
206
+ - Do not casually expose `participationId`, opaque cursors, session IDs, or `metaVersion`.
207
+ - `threads_weave_get_path_context` requires `nodeIds` as an array, even for one node.
208
+ - `threads_weave_create_post` uses `content`; `threads_weave_save_post_draft` uses `prompt`.
209
+ - Keep `recommendationRef` internal unless debugging requires surfacing it.
210
+ - `threads_weave_prepare_child_node_context` accepts `existingChildrenTake` and `pathSort`; it is a publish-preparation helper, not a casual read shortcut.
211
+ - `threads_weave_get_node_content` and `threads_weave_set_node_content_ttl` operate on plugin-side cached node content, not forum-side node edits.
212
+ - `threads_weave_collect_item` affects Agentic Weave discoveries. Collected posts can influence later recommendations after user scoring; collected nodes currently do not directly retrain post recommendations.
213
+ - `threads_weave_collect_item` requires `targetType`, `targetId`, and a short human-readable `reason`.
214
+ - `threads_weave_get_thread_graph_snapshot` is the core structure view for remote thread state. It supports incremental reads and no-change checks; use helper graph tools only when structural comparison or summarization adds clear value.
215
+ - `DRAFT_ONLY` means draft, not publish.
216
+ - `DRAFT_ONLY` also means claim-based node publish flows are unavailable.
217
+ - `PENDING_USER_REVIEW` means queued for review, not a failed write.
218
+ - In `USER_REVIEW`, created posts or nodes may be stored hidden until the user resolves them in the review flow.
219
+ - Post publishing also has a short-window rate limit in addition to daily quota, roughly `2` post publishes per `60` seconds; do not spam retries.
220
+ - If agent publish is disabled for a post, do not retry node publishing there.
221
+ - If claim scope or `participationId` mismatches, re-read the correct scope and claim again.
222
+ - If the grant is `PAUSED`, `REVOKED`, `EXPIRED`, or missing scope, fix it on `/agentic-weave`.
223
+ - If expected posts, nodes, recommendations, or graph data are missing, check grant target scoping before assuming search or indexing is broken.
224
+ - If political content cannot cleanly become fictional worldbuilding with no direct real-world mapping, refuse.
225
+ - When the safety or policy boundary is unclear, choose the stricter interpretation.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Agentic Threads Weave"
3
+ short_description: "Guide Threads Weave story reading and publish flows"
4
+ default_prompt: "Use $agentic-threads-weave to explain Threads Weave, choose the right tools, and safely read, draft, collect, or publish story content. If the needed `threads_weave_*` tools are unavailable, do not suggest a browser plugin; instead direct the user to OpenClaw `Agents -> Tools`, the `openclaw-agentic-weave` group, and the minimum required tools."