workflowy-triage 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.
- package/README.md +91 -0
- package/bin/install.mjs +46 -0
- package/package.json +26 -0
- package/skills/workflowy-triage/SKILL.md +217 -0
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# workflowy-triage
|
|
2
|
+
|
|
3
|
+
A skill that helps you triage Workflowy nodes by proposing locations based on
|
|
4
|
+
rules you define. Your agent analyzes each item, suggests where it should go,
|
|
5
|
+
and learns from your decisions. Perfect for getting a handle on an overflowing
|
|
6
|
+
Inbox.
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
This skill requires the **Workflowy MCP server** to be configured in Claude
|
|
11
|
+
Code. Install it first:
|
|
12
|
+
|
|
13
|
+
- [mholzen/workflowy](https://github.com/mholzen/workflowy) — follow the
|
|
14
|
+
installation and MCP configuration instructions in that repo.
|
|
15
|
+
|
|
16
|
+
## Install for Claude Code
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx workflowy-triage
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
This copies the skill files into `~/.claude/skills/workflowy-triage/`.
|
|
23
|
+
|
|
24
|
+
You can copy `~/.claude/skills/workflowy-triage/SKILL.md` to the skills folder
|
|
25
|
+
for other agents.
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
Inside a Claude Code session:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
/workflowy-triage <node-id> [rules-node-id]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `<node-id>`: Required. The Workflowy node containing items to triage.
|
|
36
|
+
- `[rules-node-id]`: Optional. If not provided, searches for a node named "rules for triage".
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
### Phase 1: Propose Locations
|
|
41
|
+
|
|
42
|
+
For each child node, Claude:
|
|
43
|
+
1. Analyzes the node content (name, note, children)
|
|
44
|
+
2. Matches against your triage rules
|
|
45
|
+
3. Creates a proposal structure under the source node
|
|
46
|
+
|
|
47
|
+
Each proposal looks like:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
[source node]
|
|
51
|
+
├── [node name](id) -> [target name]
|
|
52
|
+
│ ├── [original node] ← moved here
|
|
53
|
+
│ ├── target: [link to proposed location]
|
|
54
|
+
│ ├── reason: [why this location fits]
|
|
55
|
+
│ └── alternative targets: [other options]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Phase 2: User Review
|
|
59
|
+
|
|
60
|
+
You review each proposal:
|
|
61
|
+
1. Click the target link to see the destination
|
|
62
|
+
2. Move the node to your chosen location (primary or alternative)
|
|
63
|
+
3. Clean up the proposal scaffolding
|
|
64
|
+
|
|
65
|
+
### Phase 3: Learn from Choices
|
|
66
|
+
|
|
67
|
+
Run `/workflowy-triage <node-id> --review` to:
|
|
68
|
+
1. Analyze which suggestions you accepted vs. rejected
|
|
69
|
+
2. Identify patterns in your preferences
|
|
70
|
+
3. Propose updates to your triage rules
|
|
71
|
+
|
|
72
|
+
## Triage Rules
|
|
73
|
+
|
|
74
|
+
Create a node called "rules for triage" in your Workflowy with patterns like:
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
rules for triage
|
|
78
|
+
├── AI/LLM insights → use agents
|
|
79
|
+
├── actionable tasks → plan > in the next 7 days
|
|
80
|
+
├── meeting notes → grow > grow understanding
|
|
81
|
+
├── business opportunities → create a business
|
|
82
|
+
└── philosophical insights → remember, ponder, reflect
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Claude will match items against these patterns and propose appropriate locations.
|
|
86
|
+
|
|
87
|
+
## Uninstall
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx workflowy-triage uninstall
|
|
91
|
+
```
|
package/bin/install.mjs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync, mkdirSync, copyFileSync, readdirSync, rmSync } from "fs";
|
|
4
|
+
import { join, dirname } from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
6
|
+
import { homedir } from "os";
|
|
7
|
+
|
|
8
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const packageRoot = join(__dirname, "..");
|
|
10
|
+
const srcSkillDir = join(packageRoot, "skills", "workflowy-triage");
|
|
11
|
+
const destSkillDir = join(homedir(), ".claude", "skills", "workflowy-triage");
|
|
12
|
+
|
|
13
|
+
const action = process.argv[2] || "install";
|
|
14
|
+
|
|
15
|
+
if (action === "uninstall") {
|
|
16
|
+
if (existsSync(destSkillDir)) {
|
|
17
|
+
rmSync(destSkillDir, { recursive: true });
|
|
18
|
+
console.log(`Removed ${destSkillDir}`);
|
|
19
|
+
} else {
|
|
20
|
+
console.log("Nothing to uninstall.");
|
|
21
|
+
}
|
|
22
|
+
} else {
|
|
23
|
+
console.log("Installing workflowy-triage skill...\n");
|
|
24
|
+
|
|
25
|
+
copyDir(srcSkillDir, destSkillDir);
|
|
26
|
+
|
|
27
|
+
console.log(`\nInstalled to ${destSkillDir}\n`);
|
|
28
|
+
console.log("Usage:");
|
|
29
|
+
console.log(" /workflowy-triage <node-id>\n");
|
|
30
|
+
console.log("Where <node-id> contains items to triage.");
|
|
31
|
+
console.log("Claude will propose locations for each item based on your triage rules.");
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function copyDir(src, dest) {
|
|
35
|
+
mkdirSync(dest, { recursive: true });
|
|
36
|
+
for (const entry of readdirSync(src, { withFileTypes: true })) {
|
|
37
|
+
const s = join(src, entry.name);
|
|
38
|
+
const d = join(dest, entry.name);
|
|
39
|
+
if (entry.isDirectory()) {
|
|
40
|
+
copyDir(s, d);
|
|
41
|
+
} else {
|
|
42
|
+
copyFileSync(s, d);
|
|
43
|
+
console.log(` ${d}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "workflowy-triage",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "Claude Code skill that triages Workflowy nodes by proposing locations based on rules",
|
|
6
|
+
"bin": {
|
|
7
|
+
"workflowy-triage": "bin/install.mjs"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [
|
|
10
|
+
"claude-code",
|
|
11
|
+
"skill",
|
|
12
|
+
"workflowy",
|
|
13
|
+
"triage",
|
|
14
|
+
"organization",
|
|
15
|
+
"agent-skill"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/mholzen/workflowy-triage"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin/",
|
|
24
|
+
"skills/"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
# Workflowy Triage Skill
|
|
2
|
+
|
|
3
|
+
Triage Workflowy nodes by proposing locations based on triage rules.
|
|
4
|
+
|
|
5
|
+
## Invocation
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/workflowy-triage <source-node-id> [rules-node-id]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
- `<source-node-id>`: Required. The node ID containing child nodes to triage.
|
|
12
|
+
- `[rules-node-id]`: Optional. The node ID containing triage rules. If not provided, search for a node named "rules for triage" in the workspace.
|
|
13
|
+
|
|
14
|
+
## Workflow
|
|
15
|
+
|
|
16
|
+
### Phase 1: Propose Locations
|
|
17
|
+
|
|
18
|
+
For each child node under the source node (called "node to triage"):
|
|
19
|
+
|
|
20
|
+
1. **Read the triage rules** from the rules node
|
|
21
|
+
2. **Analyze the node to triage** - examine its name, note, and children
|
|
22
|
+
3. **Determine the best location** based on the rules
|
|
23
|
+
4. **Create a proposal structure**:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
[source node]
|
|
27
|
+
├── [node name truncated to 40 chars](id) -> [target name]
|
|
28
|
+
│ ├── [node to triage] ← MOVED here
|
|
29
|
+
│ ├── target: [link to target location]
|
|
30
|
+
│ ├── reason: [explanation for this choice]
|
|
31
|
+
│ └── alternative targets: [link1], [link2]
|
|
32
|
+
├── [next node truncated](id) -> [target name]
|
|
33
|
+
│ ├── [next node to triage]
|
|
34
|
+
│ ├── target: [link]
|
|
35
|
+
│ ├── reason: [explanation]
|
|
36
|
+
│ └── alternative targets: [...]
|
|
37
|
+
...
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The proposal node name format:
|
|
41
|
+
```
|
|
42
|
+
<a href="https://workflowy.com/#/[node-id]">[node name, max 40 chars]</a>([short-id]) -> <a href="https://workflowy.com/#/[target-id]">[target name]</a>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Child nodes:
|
|
46
|
+
- First child: the node to triage (moved here)
|
|
47
|
+
- `target:` link to the proposed target location
|
|
48
|
+
- `reason:` explanation of why this location fits
|
|
49
|
+
- `alternative targets:` comma-separated links to other valid locations
|
|
50
|
+
|
|
51
|
+
### Phase 2: User Review
|
|
52
|
+
|
|
53
|
+
The user will:
|
|
54
|
+
1. Review each proposal by clicking the target link to see the destination
|
|
55
|
+
2. Either accept the primary target or choose from alternative targets
|
|
56
|
+
3. Move the "node to triage" to their chosen location
|
|
57
|
+
4. Replace the node to triage with a link to where it was placed (for tracking)
|
|
58
|
+
5. Optionally delete the target/reason/alternative children or keep for reference
|
|
59
|
+
6. Signal completion by invoking the skill again with `--review`
|
|
60
|
+
|
|
61
|
+
### Phase 3: Review and Update Rules
|
|
62
|
+
|
|
63
|
+
When invoked with `--review`:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
/workflowy-triage <source-node-id> --review
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
1. **Examine the user's choices** - which locations did they accept vs. reject?
|
|
70
|
+
2. **Identify patterns** - did the user consistently prefer certain locations over suggestions?
|
|
71
|
+
3. **Propose rule updates** - suggest additions or modifications to the triage rules
|
|
72
|
+
4. **Apply updates** - after user approval, update the rules node
|
|
73
|
+
|
|
74
|
+
## Implementation Steps
|
|
75
|
+
|
|
76
|
+
### Step 1: Get the Rules
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
1. If rules-node-id provided, use workflowy_get to fetch it
|
|
80
|
+
2. Otherwise, use workflowy_search to find "rules for triage"
|
|
81
|
+
3. Parse the rules into a structured format
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 2: Get Nodes to Triage
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
1. Use workflowy_get on source-node-id with depth 2
|
|
88
|
+
2. Extract the immediate children as "nodes to triage"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 3: For Each Node to Triage
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
1. Analyze the node content (name, note, children names)
|
|
95
|
+
2. Match against rules to find candidate locations
|
|
96
|
+
3. Rank candidates by relevance
|
|
97
|
+
4. Select primary location and up to 2 alternatives
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Step 4: Create Proposal Structure
|
|
101
|
+
|
|
102
|
+
For each node to triage:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
1. workflowy_create: Create proposal node under source with:
|
|
106
|
+
- name: "[node name truncated to 40 chars](short-id) -> [target name]"
|
|
107
|
+
- both node name and target name are links
|
|
108
|
+
- position: at the current position of the node to triage
|
|
109
|
+
|
|
110
|
+
2. workflowy_move: Move the node to triage as first child of proposal node
|
|
111
|
+
|
|
112
|
+
3. workflowy_create: Create "target:" child with link to target location
|
|
113
|
+
|
|
114
|
+
4. workflowy_create: Create "reason:" child with explanation
|
|
115
|
+
|
|
116
|
+
5. If alternatives exist:
|
|
117
|
+
workflowy_create: Create "alternative targets:" child with comma-separated links
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Step 5: Review Phase (when --review flag)
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
1. workflowy_get on source-node-id with depth 3
|
|
124
|
+
2. For each proposal node:
|
|
125
|
+
- Check if node to triage was moved elsewhere or left in place
|
|
126
|
+
- Record the user's choice
|
|
127
|
+
3. Analyze patterns in user choices vs. original suggestions
|
|
128
|
+
4. If patterns detected:
|
|
129
|
+
- Propose new rules or rule modifications
|
|
130
|
+
- After user approval, workflowy_update the rules node
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Example
|
|
134
|
+
|
|
135
|
+
### Input Structure
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
[inbox] ← source-node-id
|
|
139
|
+
├── science of achievement vs art of fulfillment
|
|
140
|
+
├── try get shit done plugin
|
|
141
|
+
└── Ian (meeting notes about Maven Machines)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### After Phase 1
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
[inbox]
|
|
148
|
+
├── [science of achievement vs art of...](e87e) -> [remember, ponder, reflect]
|
|
149
|
+
│ ├── science of achievement vs art of fulfillment
|
|
150
|
+
│ ├── target: [remember, ponder, reflect](link)
|
|
151
|
+
│ ├── reason: philosophical reflection on life priorities
|
|
152
|
+
│ └── alternative targets: [fulfilled](link), [express goals](link)
|
|
153
|
+
├── [try get shit done plugin](8cce) -> [in the next 7 days]
|
|
154
|
+
│ ├── try get shit done plugin
|
|
155
|
+
│ ├── target: [in the next 7 days](link)
|
|
156
|
+
│ ├── reason: actionable task to try a productivity tool
|
|
157
|
+
│ └── alternative targets: [use skills](link)
|
|
158
|
+
└── [Ian](c19f) -> [care for, mate, partner, invest]
|
|
159
|
+
├── Ian (meeting notes about Maven Machines)
|
|
160
|
+
├── target: [care for, mate, partner, invest](link)
|
|
161
|
+
├── reason: developing a business relationship
|
|
162
|
+
└── alternative targets: [grow understanding](link), [partner](link)
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### After User Review
|
|
166
|
+
|
|
167
|
+
User moved "Ian" under the alternative suggestion, deleted the primary. User accepted other suggestions.
|
|
168
|
+
|
|
169
|
+
### Phase 3 Output
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
Observed patterns:
|
|
173
|
+
- You moved "Ian" to "grow > grow understanding" instead of "reproduce > care for..."
|
|
174
|
+
- This suggests meeting notes should prioritize learning over relationship-building
|
|
175
|
+
|
|
176
|
+
Proposed rule update:
|
|
177
|
+
- Add: "Meeting notes about external companies → grow > grow understanding, experience"
|
|
178
|
+
|
|
179
|
+
Would you like me to add this rule?
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## Rules Node Format
|
|
183
|
+
|
|
184
|
+
The rules node should contain children structured as:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
[rules for triage]
|
|
188
|
+
├── links and references → metabolize > store > resources
|
|
189
|
+
├── philosophical insights → respond > remember, ponder, reflect
|
|
190
|
+
├── actionable tasks → plan > in the next 7 days
|
|
191
|
+
├── meeting notes → grow > grow understanding, experience
|
|
192
|
+
├── business relationships → reproduce > care for, mate, partner, invest
|
|
193
|
+
├── technical research → create > research scientifically
|
|
194
|
+
├── creative production → create > create
|
|
195
|
+
├── attention/focus principles → structure > attend to, focus
|
|
196
|
+
├── tool configurations → structure > know structure > things, objects
|
|
197
|
+
└── customer interactions → reproduce > add to, foster, promote, empower
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Each rule is a simple pattern → location mapping. Rules can include:
|
|
201
|
+
- Keywords to match
|
|
202
|
+
- Node structure patterns (e.g., "has children", "contains link")
|
|
203
|
+
- Context hints
|
|
204
|
+
|
|
205
|
+
## Error Handling
|
|
206
|
+
|
|
207
|
+
- If source node not found: Report error with the ID attempted
|
|
208
|
+
- If rules node not found: Offer to create a default rules node
|
|
209
|
+
- If target location not found: Skip that suggestion, log warning
|
|
210
|
+
- If move fails: Report which node failed and why
|
|
211
|
+
|
|
212
|
+
## Notes
|
|
213
|
+
|
|
214
|
+
- Always preserve the original node content when moving
|
|
215
|
+
- Never delete nodes without explicit user instruction
|
|
216
|
+
- The proposal nodes are temporary scaffolding - user should clean them up after triage
|
|
217
|
+
- Consider using workflowy mirrors if the user wants to keep nodes in multiple locations
|