cc-sidebar 0.1.4 → 0.1.5
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 +17 -5
- package/package.json +1 -1
- package/skills/brain-dump/SKILL.md +275 -0
- package/skills/prioritize/SKILL.md +132 -0
- package/src/cli.ts +1 -1
package/README.md
CHANGED
|
@@ -122,17 +122,29 @@ Keep it simple - if no clear match, don't move anything. User can manually mark
|
|
|
122
122
|
```
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
-
### 2.
|
|
125
|
+
### 2. Install Skills (Recommended)
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
cc-sidebar includes skills that integrate with Claude Code:
|
|
128
|
+
|
|
129
|
+
| Skill | Trigger | What it does |
|
|
130
|
+
|-------|---------|--------------|
|
|
131
|
+
| `/brain-dump` | `/brain-dump` | Interview to extract tasks from messy thoughts, creates plan + todos |
|
|
132
|
+
| `/prioritize` | `/prioritize` | Re-prioritize all sidebar tasks as a staff engineer |
|
|
133
|
+
| `sidebar-awareness` | (always on) | Gives Claude context about sidebar data files |
|
|
134
|
+
|
|
135
|
+
Install all skills:
|
|
128
136
|
|
|
129
137
|
```bash
|
|
130
|
-
# Copy the skill to your Claude skills directory
|
|
131
138
|
mkdir -p ~/.claude/skills
|
|
132
|
-
cp -r ~/.bun/install/global/node_modules/cc-sidebar/skills
|
|
139
|
+
cp -r ~/.bun/install/global/node_modules/cc-sidebar/skills/* ~/.claude/skills/
|
|
133
140
|
```
|
|
134
141
|
|
|
135
|
-
|
|
142
|
+
Or install individually:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
cp -r ~/.bun/install/global/node_modules/cc-sidebar/skills/brain-dump ~/.claude/skills/
|
|
146
|
+
cp -r ~/.bun/install/global/node_modules/cc-sidebar/skills/prioritize ~/.claude/skills/
|
|
147
|
+
```
|
|
136
148
|
|
|
137
149
|
## Commands
|
|
138
150
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brain-dump
|
|
3
|
+
description: |
|
|
4
|
+
Transform thoughts into structured todos and a plan - works for one task or many.
|
|
5
|
+
|
|
6
|
+
Use when: (1) You have a mess of ideas and need to organize them into actionable tasks,
|
|
7
|
+
(2) You want to clarify a single task through conversation before adding it,
|
|
8
|
+
(3) You need both a plan document and sidebar todos from any input.
|
|
9
|
+
|
|
10
|
+
Triggers: "/brain-dump", "brain dump", "organize my thoughts", "extract todos from this".
|
|
11
|
+
|
|
12
|
+
Requires: Claude Code sidebar for todo integration, Atomic Plans for plan output.
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Brain-Dump Skill
|
|
16
|
+
|
|
17
|
+
Transform thoughts into structured, actionable todos with an accompanying plan. Works for one task or many - the process is the same.
|
|
18
|
+
|
|
19
|
+
## Invocation
|
|
20
|
+
|
|
21
|
+
- `/brain-dump` - Start interviewing immediately
|
|
22
|
+
- `/brain-dump [text]` - Process provided text (single task or many), then ask clarifying questions
|
|
23
|
+
|
|
24
|
+
## Process
|
|
25
|
+
|
|
26
|
+
Follow these steps in order:
|
|
27
|
+
|
|
28
|
+
### 1. Locate Configuration
|
|
29
|
+
|
|
30
|
+
Check the project's CLAUDE.md for the Atomic Plans folder path. Look for a section like:
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
## Brain-Dump Configuration
|
|
34
|
+
Plan folder: /path/to/plans
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or check if Atomic Plans is already configured:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## Project Planning
|
|
41
|
+
/atomic-plans /path/to/folder
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**If no path is found:**
|
|
45
|
+
1. Ask the user: "Where should I save plans for this project?"
|
|
46
|
+
2. After they provide a path, ask: "Would you like me to add this to CLAUDE.md so I remember next time?"
|
|
47
|
+
3. If yes, append the configuration to CLAUDE.md
|
|
48
|
+
|
|
49
|
+
### 2. Interview Phase
|
|
50
|
+
|
|
51
|
+
The goal is to extract actionable, project-relevant tasks through conversation.
|
|
52
|
+
|
|
53
|
+
**IMPORTANT: Never short-circuit the process.** Whether the user provides one clear task or a chaotic mess of ideas, always interview to clarify. A "single clear task" still benefits from clarification - edge cases, implementation approach, constraints, etc. Don't ask "is this just one task?" - just proceed with clarification.
|
|
54
|
+
|
|
55
|
+
**If the user provided text with the command** (`/brain-dump [text]`):
|
|
56
|
+
- Skip the opening question - they already told you what's on their mind
|
|
57
|
+
- Go straight to AskUserQuestion to clarify specifics:
|
|
58
|
+
- Ambiguous parts that need clarification
|
|
59
|
+
- Implementation approach (if relevant)
|
|
60
|
+
- Edge cases or constraints
|
|
61
|
+
- Missing context: priorities, dependencies
|
|
62
|
+
- Anything else you need to fully understand the task(s)
|
|
63
|
+
|
|
64
|
+
**If no text was provided** (`/brain-dump` alone):
|
|
65
|
+
- Start with a plain text invitation (NOT AskUserQuestion):
|
|
66
|
+
|
|
67
|
+
"What's on your mind? Tell me everything - tasks, concerns, ideas,
|
|
68
|
+
whatever's floating around. I'll help organize it."
|
|
69
|
+
|
|
70
|
+
- Let the user ramble freely in their response
|
|
71
|
+
- THEN use AskUserQuestion to clarify specifics about what they said
|
|
72
|
+
|
|
73
|
+
**Key questions to consider** (use AskUserQuestion for these):
|
|
74
|
+
- What's the most important thing here?
|
|
75
|
+
- Are there dependencies between these tasks?
|
|
76
|
+
- What constraints should I know about?
|
|
77
|
+
- Is there anything blocking progress on any of these?
|
|
78
|
+
- Anything else I should know?
|
|
79
|
+
|
|
80
|
+
**Scope filtering:**
|
|
81
|
+
If the user mentions things unrelated to the current project (personal tasks, other projects), ask:
|
|
82
|
+
"Some of this seems unrelated to [current project]. Should I include those tasks anyway, or focus only on [project]-related work?"
|
|
83
|
+
|
|
84
|
+
### 3. Extract and Prioritize Todos
|
|
85
|
+
|
|
86
|
+
From the interview, identify discrete, actionable tasks. Each todo should be:
|
|
87
|
+
- **Specific**: Clear what needs to be done
|
|
88
|
+
- **Actionable**: Can be worked on independently
|
|
89
|
+
- **Scoped**: Relevant to the current project (unless user said otherwise)
|
|
90
|
+
|
|
91
|
+
**Act as a staff engineer to prioritize:**
|
|
92
|
+
Assign each task a numeric priority (1 = most important). Consider:
|
|
93
|
+
- **Dependencies**: Blockers come first
|
|
94
|
+
- **Urgency**: Bugs, deadlines, user-facing issues
|
|
95
|
+
- **Impact**: High-value features over nice-to-haves
|
|
96
|
+
- **Effort**: Quick wins can be prioritized to build momentum
|
|
97
|
+
|
|
98
|
+
Mark the top 3 most important tasks as "recommended" (shown with ★ in sidebar).
|
|
99
|
+
|
|
100
|
+
### 4. Write Todos to Sidebar
|
|
101
|
+
|
|
102
|
+
Write the extracted todos to the **project-specific** tasks file.
|
|
103
|
+
|
|
104
|
+
**IMPORTANT:** Tasks are stored per-project using a hash of the working directory:
|
|
105
|
+
```
|
|
106
|
+
~/.claude-sidebar/projects/<hash>/tasks.json
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**IMPORTANT: Read first, then append.** Do not clobber existing todos.
|
|
110
|
+
|
|
111
|
+
Use this exact script to write todos (it handles the project hash automatically):
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
node << 'SCRIPT'
|
|
115
|
+
const fs = require('fs');
|
|
116
|
+
const crypto = require('crypto');
|
|
117
|
+
const path = require('path');
|
|
118
|
+
|
|
119
|
+
const sidebarDir = path.join(require('os').homedir(), '.claude-sidebar');
|
|
120
|
+
const hash = crypto.createHash('sha256').update(process.cwd()).digest('hex').slice(0, 12);
|
|
121
|
+
const projectDir = path.join(sidebarDir, 'projects', hash);
|
|
122
|
+
const tasksPath = path.join(projectDir, 'tasks.json');
|
|
123
|
+
|
|
124
|
+
// Ensure directory exists
|
|
125
|
+
fs.mkdirSync(projectDir, { recursive: true });
|
|
126
|
+
|
|
127
|
+
// Read existing todos
|
|
128
|
+
let existing = [];
|
|
129
|
+
try { existing = JSON.parse(fs.readFileSync(tasksPath, 'utf-8')); } catch {}
|
|
130
|
+
|
|
131
|
+
// Plan filename (just the filename, not full path)
|
|
132
|
+
const planPath = "NNN-brain-dump-topic.md"; // REPLACE with actual plan filename
|
|
133
|
+
|
|
134
|
+
// New todos - REPLACE THIS ARRAY with extracted tasks
|
|
135
|
+
// Each task needs: content, priority (1=highest), recommended (true for top 3)
|
|
136
|
+
const newTodos = [
|
|
137
|
+
{ content: "Task 1 here", priority: 1, recommended: true },
|
|
138
|
+
{ content: "Task 2 here", priority: 2, recommended: true },
|
|
139
|
+
{ content: "Task 3 here", priority: 3, recommended: true },
|
|
140
|
+
{ content: "Task 4 here", priority: 4, recommended: false }
|
|
141
|
+
].map(task => ({
|
|
142
|
+
id: crypto.randomUUID(),
|
|
143
|
+
content: task.content,
|
|
144
|
+
createdAt: new Date().toISOString(),
|
|
145
|
+
clarified: true, // Brain-dump IS the clarification process
|
|
146
|
+
priority: task.priority, // Numeric priority (1 = most important)
|
|
147
|
+
recommended: task.recommended, // Top 3 get star indicator
|
|
148
|
+
planPath: planPath // Links task to the plan file
|
|
149
|
+
}));
|
|
150
|
+
|
|
151
|
+
// Append and write
|
|
152
|
+
const combined = [...existing, ...newTodos];
|
|
153
|
+
fs.writeFileSync(tasksPath, JSON.stringify(combined, null, 2));
|
|
154
|
+
console.log('Added ' + newTodos.length + ' todos to sidebar');
|
|
155
|
+
SCRIPT
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### 5. Create Plan
|
|
159
|
+
|
|
160
|
+
Create a new plan in the Atomic Plans folder with:
|
|
161
|
+
|
|
162
|
+
**Filename:** `NNN-brain-dump-[topic].md` where NNN is the next number in sequence.
|
|
163
|
+
|
|
164
|
+
**Content:**
|
|
165
|
+
```markdown
|
|
166
|
+
---
|
|
167
|
+
plan: NNN
|
|
168
|
+
title: Brain Dump - [Topic]
|
|
169
|
+
state: active
|
|
170
|
+
created: YYYY-MM-DD
|
|
171
|
+
updated: YYYY-MM-DD
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
# Brain Dump - [Topic]
|
|
175
|
+
|
|
176
|
+
## Intent
|
|
177
|
+
[Summary of what the user wants to accomplish]
|
|
178
|
+
|
|
179
|
+
## Extracted Todos
|
|
180
|
+
[List the todos that were created]
|
|
181
|
+
|
|
182
|
+
## Context from Interview
|
|
183
|
+
[Key decisions, constraints, and context gathered during interview]
|
|
184
|
+
|
|
185
|
+
## Next
|
|
186
|
+
- [ ] Work through todos in sidebar
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 6. Present and Wait
|
|
190
|
+
|
|
191
|
+
After creating todos and plan:
|
|
192
|
+
|
|
193
|
+
1. Show a summary of what was created:
|
|
194
|
+
- Number of todos added to sidebar
|
|
195
|
+
- Link to the plan file
|
|
196
|
+
|
|
197
|
+
2. **Do not auto-execute.** Let the user decide what to do next:
|
|
198
|
+
- Work through todos one by one (select in sidebar, press Enter)
|
|
199
|
+
- Use clarify mode (`c` key) to add specs to unclarified todos
|
|
200
|
+
- Use `/ralph-loop` to batch process all todos
|
|
201
|
+
|
|
202
|
+
Example closing message:
|
|
203
|
+
```
|
|
204
|
+
Created 5 todos in your sidebar and plan 007-brain-dump-auth-refactor.md
|
|
205
|
+
|
|
206
|
+
Your todos:
|
|
207
|
+
1. Extract auth logic into separate module
|
|
208
|
+
2. Add unit tests for token validation
|
|
209
|
+
3. Update API endpoints to use new auth module
|
|
210
|
+
4. Document the new auth flow
|
|
211
|
+
5. Remove deprecated auth code
|
|
212
|
+
|
|
213
|
+
What would you like to do next?
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Relationship to Other Features
|
|
217
|
+
|
|
218
|
+
| Feature | Purpose | When to Use |
|
|
219
|
+
|---------|---------|-------------|
|
|
220
|
+
| Brain-dump | Clarify + add todos from chat | When you want to describe tasks conversationally (one or many) |
|
|
221
|
+
| Clarify mode (`c` key) | Clarify existing sidebar todo | When task is already in sidebar and needs specs before executing |
|
|
222
|
+
| `/prioritize` | Re-evaluate and reorder all tasks | When context changes or you want fresh prioritization |
|
|
223
|
+
| Ralph-loop | Batch process todos autonomously | After brain-dump, to work through all todos |
|
|
224
|
+
|
|
225
|
+
## Example Sessions
|
|
226
|
+
|
|
227
|
+
### Single Task Example
|
|
228
|
+
```
|
|
229
|
+
User: /brain-dump I need to add shift+enter support for multiline input in the sidebar
|
|
230
|
+
|
|
231
|
+
Claude: [Uses AskUserQuestion to clarify]
|
|
232
|
+
- Which input modes need this? (adding new todos, editing existing, both?)
|
|
233
|
+
- Should Enter still submit, with Shift+Enter for newlines?
|
|
234
|
+
- Any other keyboard shortcuts you want to add while we're in there?
|
|
235
|
+
|
|
236
|
+
User: [Answers questions]
|
|
237
|
+
|
|
238
|
+
Claude: [Creates todo, writes to sidebar, creates plan]
|
|
239
|
+
|
|
240
|
+
Created 1 todo in your sidebar and plan 009-multiline-input.md
|
|
241
|
+
|
|
242
|
+
Your todos:
|
|
243
|
+
1. Add shift+enter for multiline input in add/edit modes
|
|
244
|
+
|
|
245
|
+
Work on this now, or save for later?
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Multiple Tasks Example
|
|
249
|
+
```
|
|
250
|
+
User: /brain-dump
|
|
251
|
+
|
|
252
|
+
Claude: What's on your mind? Tell me everything - tasks, concerns, ideas.
|
|
253
|
+
|
|
254
|
+
User: ugh so much. the auth is a mess, we're using like 3 different
|
|
255
|
+
patterns. also need to update the docs. oh and there's that bug with
|
|
256
|
+
the session timeout.
|
|
257
|
+
|
|
258
|
+
Claude: [Uses AskUserQuestion]
|
|
259
|
+
- Which auth pattern should we standardize on?
|
|
260
|
+
- Is the session timeout bug blocking anything?
|
|
261
|
+
|
|
262
|
+
User: [Answers questions]
|
|
263
|
+
|
|
264
|
+
Claude: [Creates todos, writes to sidebar, creates plan]
|
|
265
|
+
|
|
266
|
+
Created 4 todos in your sidebar and plan 010-auth-cleanup.md
|
|
267
|
+
|
|
268
|
+
Your todos:
|
|
269
|
+
1. Standardize auth on JWT pattern
|
|
270
|
+
2. Fix session timeout bug in middleware
|
|
271
|
+
3. Update auth documentation
|
|
272
|
+
4. Remove deprecated OAuth1 code
|
|
273
|
+
|
|
274
|
+
What would you like to do next?
|
|
275
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: prioritize
|
|
3
|
+
description: |
|
|
4
|
+
Re-prioritize all tasks in the sidebar as a staff engineer.
|
|
5
|
+
|
|
6
|
+
Use when: (1) You want Claude to review and reorder your task list,
|
|
7
|
+
(2) After adding new tasks that might change priorities,
|
|
8
|
+
(3) When context has changed and you need fresh prioritization.
|
|
9
|
+
|
|
10
|
+
Triggers: "/prioritize", "prioritize my tasks", "reorder tasks"
|
|
11
|
+
|
|
12
|
+
Requires: Claude Code sidebar for task management.
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Prioritize Skill
|
|
16
|
+
|
|
17
|
+
Act as a staff engineer to review and prioritize all tasks in the sidebar.
|
|
18
|
+
|
|
19
|
+
## Invocation
|
|
20
|
+
|
|
21
|
+
- `/prioritize` - Review all tasks and assign priorities
|
|
22
|
+
- `/prioritize [context]` - Prioritize with specific context in mind
|
|
23
|
+
|
|
24
|
+
## Process
|
|
25
|
+
|
|
26
|
+
### 1. Read Current Tasks
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
node << 'SCRIPT'
|
|
30
|
+
const fs = require('fs');
|
|
31
|
+
const crypto = require('crypto');
|
|
32
|
+
const path = require('path');
|
|
33
|
+
const sidebarDir = path.join(require('os').homedir(), '.claude-sidebar');
|
|
34
|
+
const hash = crypto.createHash('sha256').update(process.cwd()).digest('hex').slice(0, 12);
|
|
35
|
+
const tasksPath = path.join(sidebarDir, 'projects', hash, 'tasks.json');
|
|
36
|
+
try {
|
|
37
|
+
const tasks = JSON.parse(fs.readFileSync(tasksPath, 'utf-8'));
|
|
38
|
+
console.log(JSON.stringify(tasks, null, 2));
|
|
39
|
+
} catch (e) {
|
|
40
|
+
console.log('No tasks found');
|
|
41
|
+
}
|
|
42
|
+
SCRIPT
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Evaluate and Prioritize
|
|
46
|
+
|
|
47
|
+
As a staff engineer, evaluate each task considering:
|
|
48
|
+
|
|
49
|
+
- **Dependencies**: What blocks other work? Blockers come first.
|
|
50
|
+
- **Urgency**: Bugs, deadlines, user-facing issues take priority.
|
|
51
|
+
- **Impact**: High-value features over nice-to-haves.
|
|
52
|
+
- **Effort**: Quick wins can build momentum; large tasks may need breakdown.
|
|
53
|
+
- **Context**: If user provided context, weight it heavily.
|
|
54
|
+
|
|
55
|
+
Assign each task:
|
|
56
|
+
- `priority`: Numeric (1 = most important, higher = less important)
|
|
57
|
+
- `recommended`: `true` for the top 3 most important tasks (shown with star)
|
|
58
|
+
|
|
59
|
+
### 3. Write Updated Tasks
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node << 'SCRIPT'
|
|
63
|
+
const fs = require('fs');
|
|
64
|
+
const crypto = require('crypto');
|
|
65
|
+
const path = require('path');
|
|
66
|
+
const sidebarDir = path.join(require('os').homedir(), '.claude-sidebar');
|
|
67
|
+
const hash = crypto.createHash('sha256').update(process.cwd()).digest('hex').slice(0, 12);
|
|
68
|
+
const tasksPath = path.join(sidebarDir, 'projects', hash, 'tasks.json');
|
|
69
|
+
|
|
70
|
+
// REPLACE this array with the re-prioritized tasks
|
|
71
|
+
// Keep all original fields, just update priority and recommended
|
|
72
|
+
const tasks = [
|
|
73
|
+
// Example - replace with actual tasks:
|
|
74
|
+
// { ...originalTask, priority: 1, recommended: true },
|
|
75
|
+
// { ...originalTask, priority: 2, recommended: true },
|
|
76
|
+
// { ...originalTask, priority: 3, recommended: true },
|
|
77
|
+
// { ...originalTask, priority: 4, recommended: false },
|
|
78
|
+
];
|
|
79
|
+
|
|
80
|
+
fs.writeFileSync(tasksPath, JSON.stringify(tasks, null, 2));
|
|
81
|
+
console.log('Tasks re-prioritized');
|
|
82
|
+
SCRIPT
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 4. Present Results
|
|
86
|
+
|
|
87
|
+
Show the user the new priority order:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
Re-prioritized your tasks:
|
|
91
|
+
|
|
92
|
+
Recommended (do first):
|
|
93
|
+
1. [task content]
|
|
94
|
+
2. [task content]
|
|
95
|
+
3. [task content]
|
|
96
|
+
|
|
97
|
+
Other tasks:
|
|
98
|
+
4. [task content]
|
|
99
|
+
5. [task content]
|
|
100
|
+
...
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Example Session
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
User: /prioritize
|
|
107
|
+
|
|
108
|
+
Claude: [Reads current tasks]
|
|
109
|
+
|
|
110
|
+
I see 6 tasks. Let me evaluate them as a staff engineer...
|
|
111
|
+
|
|
112
|
+
Based on dependencies and impact:
|
|
113
|
+
|
|
114
|
+
Recommended (do first):
|
|
115
|
+
1. Fix authentication bug (blocking users)
|
|
116
|
+
2. Add input validation (security concern)
|
|
117
|
+
3. Update API documentation (unblocks other team)
|
|
118
|
+
|
|
119
|
+
Other tasks:
|
|
120
|
+
4. Refactor CSS (nice-to-have)
|
|
121
|
+
5. Add dark mode (feature request)
|
|
122
|
+
6. Update dependencies (maintenance)
|
|
123
|
+
|
|
124
|
+
Tasks have been re-prioritized in your sidebar.
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Notes
|
|
128
|
+
|
|
129
|
+
- This skill reads and modifies the sidebar's tasks.json directly
|
|
130
|
+
- It preserves all existing task fields (id, content, clarified, planPath, etc.)
|
|
131
|
+
- Only updates `priority` and `recommended` fields
|
|
132
|
+
- Can be run anytime - safe to run multiple times
|
package/src/cli.ts
CHANGED