@orderful/droid 0.10.2 → 0.10.4
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/CHANGELOG.md +24 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +3 -5
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/commands/tui.js +10 -33
- package/dist/commands/tui.js.map +1 -1
- package/dist/skills/brain/SKILL.md +36 -19
- package/dist/skills/brain/commands/brain.md +19 -7
- package/dist/skills/brain/commands/scratchpad.md +19 -7
- package/dist/skills/brain/references/naming.md +14 -19
- package/dist/skills/brain/references/templates.md +3 -2
- package/dist/skills/brain/references/workflows.md +52 -36
- package/dist/skills/brain-obsidian/SKILL.md +36 -19
- package/dist/skills/brain-obsidian/references/templates.md +24 -24
- package/dist/skills/brain-obsidian/references/workflows.md +22 -12
- package/dist/skills/comments/SKILL.md +19 -11
- package/package.json +1 -1
- package/src/commands/setup.ts +3 -5
- package/src/commands/tui.tsx +9 -57
- package/src/skills/brain/SKILL.md +36 -19
- package/src/skills/brain/commands/brain.md +19 -7
- package/src/skills/brain/commands/scratchpad.md +19 -7
- package/src/skills/brain/references/naming.md +14 -19
- package/src/skills/brain/references/templates.md +3 -2
- package/src/skills/brain/references/workflows.md +52 -36
- package/src/skills/brain-obsidian/SKILL.md +36 -19
- package/src/skills/brain-obsidian/references/templates.md +24 -24
- package/src/skills/brain-obsidian/references/workflows.md +22 -12
- package/src/skills/comments/SKILL.md +19 -11
|
@@ -31,21 +31,23 @@ The AI will respond with `> @{user_mention}` (configured in droid setup, e.g., `
|
|
|
31
31
|
**CRITICAL: The `@mention` is who you're talking TO, not who is speaking.**
|
|
32
32
|
|
|
33
33
|
Think of it like addressing someone in conversation:
|
|
34
|
+
|
|
34
35
|
- "Hey @droid, what do you think?" → User talking TO the AI
|
|
35
36
|
- "Good point @fry, here's my take..." → AI talking TO the user
|
|
36
37
|
|
|
37
38
|
| When you see... | Who wrote it | Who it's addressed to |
|
|
38
|
-
|
|
39
|
-
| `> @droid ...` | User | AI (droid)
|
|
40
|
-
| `> @fry ...` | AI | User (fry)
|
|
39
|
+
| --------------- | ------------ | --------------------- |
|
|
40
|
+
| `> @droid ...` | User | AI (droid) |
|
|
41
|
+
| `> @fry ...` | AI | User (fry) |
|
|
41
42
|
|
|
42
43
|
**Examples:**
|
|
44
|
+
|
|
43
45
|
```markdown
|
|
44
|
-
> @droid Can you explain this function?
|
|
46
|
+
> @droid Can you explain this function? ← User asking AI
|
|
45
47
|
> @fry This function calculates the hash... ← AI responding to user
|
|
46
48
|
|
|
47
|
-
> @droid Should we refactor this?
|
|
48
|
-
> @fry Yes, I'd suggest extracting...
|
|
49
|
+
> @droid Should we refactor this? ← User asking AI
|
|
50
|
+
> @fry Yes, I'd suggest extracting... ← AI responding to user
|
|
49
51
|
```
|
|
50
52
|
|
|
51
53
|
**Never flip this.** When responding to a `@droid` comment, always use `@{user}` (e.g., `@fry`) because you're addressing the user, not yourself.
|
|
@@ -76,13 +78,19 @@ When you find a `@droid` marker:
|
|
|
76
78
|
## Behavior
|
|
77
79
|
|
|
78
80
|
### On `/comments check`:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
|
|
82
|
+
1. **Read config first:** Check `~/.droid/skills/comments/overrides.yaml` for `preserve_comments` setting (default: `true`)
|
|
83
|
+
2. Search for `> @droid` (and any configured `ai_mentions`) in the specified scope
|
|
84
|
+
3. If there's a `git diff`, check those files first for relevant context
|
|
85
|
+
4. For each comment, determine intent:
|
|
86
|
+
- **Action request** ("do X", "add Y", "fix Z") → Execute the action
|
|
87
|
+
- **Question** ("what do you think", "should we") → Respond with `> @{user_mention}`
|
|
88
|
+
5. **Handle original comment based on `preserve_comments`:**
|
|
89
|
+
- If `preserve_comments: true` → Keep the original `@droid` comment (add response below it)
|
|
90
|
+
- If `preserve_comments: false` → Remove the original comment after addressing
|
|
84
91
|
|
|
85
92
|
### On `/comments cleanup`:
|
|
93
|
+
|
|
86
94
|
1. Find AI tag and `> @{user_mention}` pairs where conversation appears resolved
|
|
87
95
|
2. Remove both markers
|
|
88
96
|
3. Output a summary of what was discussed/decided
|
package/package.json
CHANGED
package/src/commands/setup.ts
CHANGED
|
@@ -240,11 +240,9 @@ export async function setupCommand(): Promise<void> {
|
|
|
240
240
|
name: 'user_mention',
|
|
241
241
|
message: 'What @mention should be used for you?',
|
|
242
242
|
default: '@user',
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
return true;
|
|
243
|
+
filter: (input: string) => {
|
|
244
|
+
// Auto-add @ prefix if missing
|
|
245
|
+
return input.startsWith('@') ? input : `@${input}`;
|
|
248
246
|
},
|
|
249
247
|
},
|
|
250
248
|
{
|
package/src/commands/tui.tsx
CHANGED
|
@@ -23,7 +23,7 @@ import { getRandomQuote } from '../lib/quotes.js';
|
|
|
23
23
|
|
|
24
24
|
type Tab = 'skills' | 'commands' | 'agents' | 'settings';
|
|
25
25
|
type View = 'welcome' | 'setup' | 'menu' | 'detail' | 'configure' | 'readme';
|
|
26
|
-
type SetupStep = 'ai_tool' | 'user_mention' | '
|
|
26
|
+
type SetupStep = 'ai_tool' | 'user_mention' | 'confirm';
|
|
27
27
|
|
|
28
28
|
const colors = {
|
|
29
29
|
primary: '#6366f1',
|
|
@@ -331,9 +331,6 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
331
331
|
initialConfig?.ai_tool || getDefaultAITool()
|
|
332
332
|
);
|
|
333
333
|
const [userMention, setUserMention] = useState(initialConfig?.user_mention || '@user');
|
|
334
|
-
const [outputPreference, setOutputPreference] = useState<OutputPreference>(
|
|
335
|
-
initialConfig?.output_preference || BuiltInOutput.Terminal
|
|
336
|
-
);
|
|
337
334
|
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
338
335
|
const [error, setError] = useState<string | null>(null);
|
|
339
336
|
|
|
@@ -343,20 +340,17 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
343
340
|
{ label: 'Claude Code', value: AITool.ClaudeCode },
|
|
344
341
|
{ label: 'OpenCode', value: AITool.OpenCode },
|
|
345
342
|
], []);
|
|
346
|
-
const outputOptions = useMemo(() => getOutputOptions(), []);
|
|
347
343
|
|
|
348
|
-
const steps: SetupStep[] = ['ai_tool', 'user_mention', '
|
|
344
|
+
const steps: SetupStep[] = ['ai_tool', 'user_mention', 'confirm'];
|
|
349
345
|
const stepIndex = steps.indexOf(step);
|
|
350
346
|
const totalSteps = steps.length - 1; // Don't count confirm as a step
|
|
351
347
|
|
|
352
348
|
const handleUserMentionSubmit = () => {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
349
|
+
// Auto-add @ prefix if missing
|
|
350
|
+
const mention = userMention.startsWith('@') ? userMention : `@${userMention}`;
|
|
351
|
+
setUserMention(mention);
|
|
357
352
|
setError(null);
|
|
358
|
-
setStep('
|
|
359
|
-
setSelectedIndex(0);
|
|
353
|
+
setStep('confirm');
|
|
360
354
|
};
|
|
361
355
|
|
|
362
356
|
// Handle escape during text input (only intercept escape, nothing else)
|
|
@@ -372,11 +366,8 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
372
366
|
if (key.escape) {
|
|
373
367
|
if (step === 'ai_tool') {
|
|
374
368
|
onSkip();
|
|
375
|
-
} else if (step === 'output_preference') {
|
|
376
|
-
setStep('user_mention');
|
|
377
369
|
} else if (step === 'confirm') {
|
|
378
|
-
setStep('
|
|
379
|
-
setSelectedIndex(0);
|
|
370
|
+
setStep('user_mention');
|
|
380
371
|
}
|
|
381
372
|
return;
|
|
382
373
|
}
|
|
@@ -388,20 +379,13 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
388
379
|
setAITool(aiToolOptions[selectedIndex].value);
|
|
389
380
|
setStep('user_mention');
|
|
390
381
|
}
|
|
391
|
-
} else if (step === 'output_preference') {
|
|
392
|
-
if (key.upArrow) setSelectedIndex((prev) => Math.max(0, prev - 1));
|
|
393
|
-
if (key.downArrow) setSelectedIndex((prev) => Math.min(outputOptions.length - 1, prev + 1));
|
|
394
|
-
if (key.return) {
|
|
395
|
-
setOutputPreference(outputOptions[selectedIndex].value);
|
|
396
|
-
setStep('confirm');
|
|
397
|
-
}
|
|
398
382
|
} else if (step === 'confirm') {
|
|
399
383
|
if (key.return) {
|
|
400
384
|
const config: DroidConfig = {
|
|
401
385
|
...loadConfig(),
|
|
402
386
|
ai_tool: aiTool,
|
|
403
387
|
user_mention: userMention,
|
|
404
|
-
output_preference:
|
|
388
|
+
output_preference: BuiltInOutput.Terminal, // Default to terminal
|
|
405
389
|
};
|
|
406
390
|
saveConfig(config);
|
|
407
391
|
configureAIToolPermissions(aiTool);
|
|
@@ -471,26 +455,6 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
471
455
|
);
|
|
472
456
|
}
|
|
473
457
|
|
|
474
|
-
if (step === 'output_preference') {
|
|
475
|
-
return (
|
|
476
|
-
<Box flexDirection="column" padding={1}>
|
|
477
|
-
{renderHeader()}
|
|
478
|
-
<Text color={colors.text}>Default output preference for skill results?</Text>
|
|
479
|
-
<Box flexDirection="column" marginTop={1}>
|
|
480
|
-
{outputOptions.map((option, index) => (
|
|
481
|
-
<Text key={option.value}>
|
|
482
|
-
<Text color={colors.textDim}>{index === selectedIndex ? '>' : ' '} </Text>
|
|
483
|
-
<Text color={index === selectedIndex ? colors.text : colors.textMuted}>{option.label}</Text>
|
|
484
|
-
</Text>
|
|
485
|
-
))}
|
|
486
|
-
</Box>
|
|
487
|
-
<Box marginTop={1}>
|
|
488
|
-
<Text color={colors.textDim}>↑↓ select · enter next · esc back</Text>
|
|
489
|
-
</Box>
|
|
490
|
-
</Box>
|
|
491
|
-
);
|
|
492
|
-
}
|
|
493
|
-
|
|
494
458
|
// Confirm step
|
|
495
459
|
return (
|
|
496
460
|
<Box flexDirection="column" padding={1}>
|
|
@@ -505,10 +469,6 @@ function SetupScreen({ onComplete, onSkip, initialConfig }: SetupScreenProps) {
|
|
|
505
469
|
<Text color={colors.textDim}>Your @mention: </Text>
|
|
506
470
|
<Text color={colors.text}>{userMention}</Text>
|
|
507
471
|
</Text>
|
|
508
|
-
<Text>
|
|
509
|
-
<Text color={colors.textDim}>Output: </Text>
|
|
510
|
-
<Text color={colors.text}>{outputOptions.find((o) => o.value === outputPreference)?.label || outputPreference}</Text>
|
|
511
|
-
</Text>
|
|
512
472
|
</Box>
|
|
513
473
|
<Box marginTop={2}>
|
|
514
474
|
<Text backgroundColor={colors.primary} color="#ffffff" bold>
|
|
@@ -1042,12 +1002,6 @@ function SettingsDetails({
|
|
|
1042
1002
|
<Text color={colors.textDim}>Your @mention: </Text>
|
|
1043
1003
|
<Text color={colors.text}>{config.user_mention}</Text>
|
|
1044
1004
|
</Text>
|
|
1045
|
-
<Text>
|
|
1046
|
-
<Text color={colors.textDim}>Output: </Text>
|
|
1047
|
-
<Text color={colors.text}>
|
|
1048
|
-
{outputOptions.find((o) => o.value === config.output_preference)?.label || config.output_preference}
|
|
1049
|
-
</Text>
|
|
1050
|
-
</Text>
|
|
1051
1005
|
</Box>
|
|
1052
1006
|
|
|
1053
1007
|
<Box marginTop={1}>
|
|
@@ -1399,8 +1353,6 @@ function App() {
|
|
|
1399
1353
|
useInput((input, key) => {
|
|
1400
1354
|
if (message) setMessage(null);
|
|
1401
1355
|
|
|
1402
|
-
if (view === 'welcome') return;
|
|
1403
|
-
|
|
1404
1356
|
if (input === 'q') {
|
|
1405
1357
|
exit();
|
|
1406
1358
|
return;
|
|
@@ -1610,7 +1562,7 @@ function App() {
|
|
|
1610
1562
|
}
|
|
1611
1563
|
}
|
|
1612
1564
|
}
|
|
1613
|
-
});
|
|
1565
|
+
}, { isActive: view !== 'welcome' && view !== 'setup' && view !== 'configure' });
|
|
1614
1566
|
|
|
1615
1567
|
const selectedSkill = activeTab === 'skills' ? skills[selectedIndex] ?? null : null;
|
|
1616
1568
|
const selectedCommand = activeTab === 'commands' ? commands[selectedIndex] ?? null : null;
|
|
@@ -38,31 +38,48 @@ Ideas develop through iteration, not single prompts.
|
|
|
38
38
|
|
|
39
39
|
**IMPORTANT:** Before using any default paths, ALWAYS read `~/.droid/skills/brain/overrides.yaml` first. If `brain_dir` is configured there, use that path. Only fall back to defaults if the file doesn't exist or lacks a `brain_dir` setting.
|
|
40
40
|
|
|
41
|
-
| Setting | Default | Description
|
|
42
|
-
| -------------- | ----------- |
|
|
43
|
-
| `brain_dir` | (see below) | Where docs are stored
|
|
44
|
-
| `inbox_folder` | (empty) |
|
|
41
|
+
| Setting | Default | Description |
|
|
42
|
+
| -------------- | ----------- | --------------------------------------------- |
|
|
43
|
+
| `brain_dir` | (see below) | Where docs are stored |
|
|
44
|
+
| `inbox_folder` | (empty) | Root folder for new docs (e.g., `0-Inbox`) |
|
|
45
45
|
|
|
46
46
|
Default `brain_dir` by AI tool (only if not configured):
|
|
47
47
|
|
|
48
48
|
- **claude-code**: `~/.claude/brain`
|
|
49
49
|
- **opencode**: `~/.config/opencode/brain`
|
|
50
50
|
|
|
51
|
+
## Folder Structure
|
|
52
|
+
|
|
53
|
+
Docs are organized by type into subfolders:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
{brain_dir}/
|
|
57
|
+
└── {inbox_folder}/ # e.g., "0-Inbox" (or root if not set)
|
|
58
|
+
├── plans/ # Structured planning docs
|
|
59
|
+
├── research/ # Open-ended exploration
|
|
60
|
+
├── reviews/ # Code reviews, evaluations
|
|
61
|
+
└── ideas/ # Quick captures
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Folders are created automatically when needed.
|
|
65
|
+
|
|
51
66
|
## Core Concepts
|
|
52
67
|
|
|
53
68
|
**Active doc:** Opening or creating a brain doc makes it "active" for the session. Subsequent `/brain add` commands append to it without specifying a path.
|
|
54
69
|
|
|
55
|
-
**Doc types:**
|
|
70
|
+
**Doc types:** (each stored in its own folder)
|
|
56
71
|
|
|
57
|
-
- `plan` - Structured: Context → Exploration → Decision → Next Steps
|
|
58
|
-
- `research` - Open-ended exploration of a topic
|
|
59
|
-
- `review` - Code review, document review, or any evaluation task
|
|
60
|
-
- `
|
|
72
|
+
- `plan` → `plans/` - Structured: Context → Exploration → Decision → Next Steps
|
|
73
|
+
- `research` → `research/` - Open-ended exploration of a topic
|
|
74
|
+
- `review` → `reviews/` - Code review, document review, or any evaluation task
|
|
75
|
+
- `idea` → `ideas/` - Quick capture (fire-and-forget, doesn't become active)
|
|
61
76
|
|
|
62
77
|
**Comment conventions:** In markdown files, ALWAYS use blockquote `>` prefix for @mention comments:
|
|
63
78
|
|
|
64
|
-
- `> @droid` - User leaves comment for AI to address
|
|
65
|
-
- `> @{user}` - AI leaves comment for user to address
|
|
79
|
+
- `> @droid` - **User** leaves comment for AI to address
|
|
80
|
+
- `> @{user}` - **AI** leaves comment for user to address
|
|
81
|
+
|
|
82
|
+
**CRITICAL:** When YOU (the AI) respond to a comment or create a placeholder, you MUST use `> @{user_mention}` (e.g., `> @fry`). NEVER use `@droid` for your own responses - that tag is for the USER to address YOU.
|
|
66
83
|
|
|
67
84
|
Example conversation:
|
|
68
85
|
|
|
@@ -82,10 +99,10 @@ Read user's configured mention from `~/.droid/config.yaml` → `user_mention` (e
|
|
|
82
99
|
| ------------------------- | ---------------------------------------------------------- |
|
|
83
100
|
| `/brain` | List recent docs or create new |
|
|
84
101
|
| `/brain {topic}` | **Search** for existing doc (fuzzy match) → becomes active |
|
|
85
|
-
| `/brain plan {topic}` | Create planning doc
|
|
86
|
-
| `/brain research {topic}` | Create research doc
|
|
87
|
-
| `/brain review {topic}` | Create review doc
|
|
88
|
-
| `/brain
|
|
102
|
+
| `/brain plan {topic}` | Create planning doc → `plans/{topic}.md` |
|
|
103
|
+
| `/brain research {topic}` | Create research doc → `research/{topic}.md` |
|
|
104
|
+
| `/brain review {topic}` | Create review doc → `reviews/{topic}.md` |
|
|
105
|
+
| `/brain idea {text}` | Quick capture → `ideas/{date}-{slug}.md` (not active) |
|
|
89
106
|
| `/brain add {text}` | Append to active doc |
|
|
90
107
|
| `/brain check` | Address @droid comments in active doc |
|
|
91
108
|
| `/brain done` | Finalize active doc, update status |
|
|
@@ -110,13 +127,13 @@ Full procedure: `references/workflows.md` § Creating
|
|
|
110
127
|
Templates: `references/templates.md`
|
|
111
128
|
Naming: `references/naming.md`
|
|
112
129
|
|
|
113
|
-
## Quick
|
|
130
|
+
## Quick Ideas
|
|
114
131
|
|
|
115
|
-
**Trigger:** `/brain
|
|
132
|
+
**Trigger:** `/brain idea {text}`
|
|
116
133
|
|
|
117
|
-
**TLDR:** Fire-and-forget capture to
|
|
134
|
+
**TLDR:** Fire-and-forget capture to `ideas/` folder. Does not become active doc.
|
|
118
135
|
|
|
119
|
-
Full procedure: `references/workflows.md` §
|
|
136
|
+
Full procedure: `references/workflows.md` § Ideas
|
|
120
137
|
|
|
121
138
|
## Adding Content
|
|
122
139
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Collaborative scratchpad for planning and research
|
|
3
|
-
argument-hint: "[{topic} | plan|research|review {topic} |
|
|
3
|
+
argument-hint: "[{topic} | plan|research|review {topic} | idea|add {text} | check|done]"
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(mkdir:*), Bash(ls:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,10 +23,10 @@ $ARGUMENTS
|
|
|
23
23
|
```
|
|
24
24
|
/brain # List recent docs or create new
|
|
25
25
|
/brain {topic} # SEARCH: Open existing doc (fuzzy match) → active
|
|
26
|
-
/brain plan {topic} # CREATE: New planning doc →
|
|
27
|
-
/brain research {topic} # Create research doc →
|
|
28
|
-
/brain review {topic} # Create review doc →
|
|
29
|
-
/brain
|
|
26
|
+
/brain plan {topic} # CREATE: New planning doc → plans/
|
|
27
|
+
/brain research {topic} # Create research doc → research/
|
|
28
|
+
/brain review {topic} # Create review doc → reviews/
|
|
29
|
+
/brain idea {text} # Quick capture → ideas/ (fire-and-forget)
|
|
30
30
|
/brain add {text} # Append to active doc
|
|
31
31
|
/brain check # Address @droid comments in active doc
|
|
32
32
|
/brain done # Finalize active doc
|
|
@@ -37,7 +37,19 @@ $ARGUMENTS
|
|
|
37
37
|
**ALWAYS read `~/.droid/skills/brain/overrides.yaml` first.** Use configured values if present, only fall back to defaults if missing.
|
|
38
38
|
|
|
39
39
|
- `brain_dir` - Where docs live (default varies by AI tool)
|
|
40
|
-
- `inbox_folder` -
|
|
40
|
+
- `inbox_folder` - Root for type folders (e.g., `0-Inbox`)
|
|
41
|
+
|
|
42
|
+
## Folder Structure
|
|
43
|
+
|
|
44
|
+
Docs are organized by type:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
{brain_dir}/{inbox_folder}/
|
|
48
|
+
├── plans/
|
|
49
|
+
├── research/
|
|
50
|
+
├── reviews/
|
|
51
|
+
└── ideas/
|
|
52
|
+
```
|
|
41
53
|
|
|
42
54
|
## Behavior
|
|
43
55
|
|
|
@@ -45,7 +57,7 @@ Refer to the brain skill for:
|
|
|
45
57
|
|
|
46
58
|
- **Opening**: How to fuzzy-match, handle multiple matches, set active
|
|
47
59
|
- **Creating**: Template structure by preset, naming conventions
|
|
48
|
-
- **
|
|
60
|
+
- **Ideas**: Quick capture workflow
|
|
49
61
|
- **Adding**: Append to active doc with timestamp
|
|
50
62
|
- **Checking**: Find and address @droid comments
|
|
51
63
|
- **Finalizing**: Update status, suggest next steps
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Collaborative scratchpad for planning and research
|
|
3
|
-
argument-hint: "[{topic} | plan|research|review {topic} |
|
|
3
|
+
argument-hint: "[{topic} | plan|research|review {topic} | idea|add {text} | check|done]"
|
|
4
4
|
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(mkdir:*), Bash(ls:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -23,10 +23,10 @@ $ARGUMENTS
|
|
|
23
23
|
```
|
|
24
24
|
/scratchpad # List recent docs or create new
|
|
25
25
|
/scratchpad {topic} # SEARCH: Open existing doc (fuzzy match) → active
|
|
26
|
-
/scratchpad plan {topic} # CREATE: New planning doc →
|
|
27
|
-
/scratchpad research {topic} # Create research doc →
|
|
28
|
-
/scratchpad review {topic} # Create review doc →
|
|
29
|
-
/scratchpad
|
|
26
|
+
/scratchpad plan {topic} # CREATE: New planning doc → plans/
|
|
27
|
+
/scratchpad research {topic} # Create research doc → research/
|
|
28
|
+
/scratchpad review {topic} # Create review doc → reviews/
|
|
29
|
+
/scratchpad idea {text} # Quick capture → ideas/ (fire-and-forget)
|
|
30
30
|
/scratchpad add {text} # Append to active doc
|
|
31
31
|
/scratchpad check # Address @droid comments in active doc
|
|
32
32
|
/scratchpad done # Finalize active doc
|
|
@@ -37,7 +37,19 @@ $ARGUMENTS
|
|
|
37
37
|
**ALWAYS read `~/.droid/skills/brain/overrides.yaml` first.** Use configured values if present, only fall back to defaults if missing.
|
|
38
38
|
|
|
39
39
|
- `brain_dir` - Where docs live (default varies by AI tool)
|
|
40
|
-
- `inbox_folder` -
|
|
40
|
+
- `inbox_folder` - Root for type folders (e.g., `0-Inbox`)
|
|
41
|
+
|
|
42
|
+
## Folder Structure
|
|
43
|
+
|
|
44
|
+
Docs are organized by type:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
{brain_dir}/{inbox_folder}/
|
|
48
|
+
├── plans/
|
|
49
|
+
├── research/
|
|
50
|
+
├── reviews/
|
|
51
|
+
└── ideas/
|
|
52
|
+
```
|
|
41
53
|
|
|
42
54
|
## Behavior
|
|
43
55
|
|
|
@@ -45,7 +57,7 @@ Refer to the brain skill for:
|
|
|
45
57
|
|
|
46
58
|
- **Opening**: How to fuzzy-match, handle multiple matches, set active
|
|
47
59
|
- **Creating**: Template structure by preset, naming conventions
|
|
48
|
-
- **
|
|
60
|
+
- **Ideas**: Quick capture workflow
|
|
49
61
|
- **Adding**: Append to active doc with timestamp
|
|
50
62
|
- **Checking**: Find and address @droid comments
|
|
51
63
|
- **Finalizing**: Update status, suggest next steps
|
|
@@ -4,17 +4,12 @@ Conventions for naming brain docs.
|
|
|
4
4
|
|
|
5
5
|
## Format
|
|
6
6
|
|
|
7
|
+
Since docs are organized into type folders (`plans/`, `research/`, `reviews/`, `ideas/`), filenames no longer need a type prefix:
|
|
8
|
+
|
|
7
9
|
```
|
|
8
|
-
{
|
|
10
|
+
{topic-slug}.md
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
## Components
|
|
12
|
-
|
|
13
|
-
| Component | Description | Examples |
|
|
14
|
-
| -------------- | ------------------------------------ | ------------------------------------- |
|
|
15
|
-
| `{type}` | Doc type: `plan`, `research`, `note` | `plan`, `research`, `note` |
|
|
16
|
-
| `{topic-slug}` | Lowercase, hyphen-separated topic | `auth-refactor`, `caching-strategies` |
|
|
17
|
-
|
|
18
13
|
## Slug Rules
|
|
19
14
|
|
|
20
15
|
1. **Lowercase** all words
|
|
@@ -25,26 +20,26 @@ Conventions for naming brain docs.
|
|
|
25
20
|
|
|
26
21
|
## Examples
|
|
27
22
|
|
|
28
|
-
| Input |
|
|
29
|
-
| -------------------------------------------- |
|
|
30
|
-
| `/brain plan Auth Refactor` | `
|
|
31
|
-
| `/brain research Caching Strategies` | `research
|
|
32
|
-
| `/brain
|
|
33
|
-
| `/brain
|
|
23
|
+
| Input | Path |
|
|
24
|
+
| -------------------------------------------- | ------------------------------------------------ |
|
|
25
|
+
| `/brain plan Auth Refactor` | `plans/auth-refactor.md` |
|
|
26
|
+
| `/brain research Caching Strategies` | `research/caching-strategies.md` |
|
|
27
|
+
| `/brain review PR 4530` | `reviews/pr-4530.md` |
|
|
28
|
+
| `/brain idea Remember to check rate limits` | `ideas/20250115-remember-to-check-rate.md` |
|
|
34
29
|
|
|
35
|
-
##
|
|
30
|
+
## Ideas (Quick Captures)
|
|
36
31
|
|
|
37
|
-
For
|
|
32
|
+
For ideas, include the date in the filename to prevent collisions:
|
|
38
33
|
|
|
39
34
|
```
|
|
40
|
-
|
|
35
|
+
{YYYYMMDD}-{slug}.md
|
|
41
36
|
```
|
|
42
37
|
|
|
43
|
-
This
|
|
38
|
+
This allows chronological sorting within the `ideas/` folder.
|
|
44
39
|
|
|
45
40
|
## Uniqueness
|
|
46
41
|
|
|
47
42
|
If a file with the generated name already exists:
|
|
48
43
|
|
|
49
44
|
1. Check if user wants to open existing doc
|
|
50
|
-
2. Or append a numeric suffix: `
|
|
45
|
+
2. Or append a numeric suffix: `auth-refactor-2.md`
|
|
@@ -8,9 +8,11 @@ Detailed procedures for each brain operation.
|
|
|
8
8
|
|
|
9
9
|
**Steps:**
|
|
10
10
|
|
|
11
|
-
1. **Read config first**
|
|
12
|
-
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
13
|
-
-
|
|
11
|
+
1. **Read config first (MANDATORY)**
|
|
12
|
+
- Use the Read tool on `~/.droid/skills/brain/overrides.yaml`
|
|
13
|
+
- If file exists and contains `brain_dir:`, use that path
|
|
14
|
+
- Only use defaults if the file doesn't exist or `brain_dir` is not set
|
|
15
|
+
- **Do NOT skip this step or assume defaults**
|
|
14
16
|
|
|
15
17
|
2. **Search for matches**
|
|
16
18
|
|
|
@@ -35,24 +37,28 @@ Detailed procedures for each brain operation.
|
|
|
35
37
|
|
|
36
38
|
## Creating
|
|
37
39
|
|
|
38
|
-
**Trigger:** `/brain plan {topic}
|
|
40
|
+
**Trigger:** `/brain plan {topic}`, `/brain research {topic}`, or `/brain review {topic}`
|
|
39
41
|
|
|
40
42
|
**Steps:**
|
|
41
43
|
|
|
42
|
-
1. **Read config first**
|
|
43
|
-
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
44
|
-
-
|
|
45
|
-
-
|
|
44
|
+
1. **Read config first (MANDATORY)**
|
|
45
|
+
- Use the Read tool on `~/.droid/skills/brain/overrides.yaml`
|
|
46
|
+
- If file exists and contains `brain_dir:`, use that path
|
|
47
|
+
- Also check for `inbox_folder` setting (e.g., `0-Inbox`)
|
|
48
|
+
- Only use defaults if the file doesn't exist or `brain_dir` is not set
|
|
49
|
+
- **Do NOT skip this step or assume defaults**
|
|
46
50
|
|
|
47
51
|
2. **Generate filename** using naming conventions (see `naming.md`):
|
|
48
|
-
- Format: `{
|
|
49
|
-
- Example: `
|
|
52
|
+
- Format: `{topic-slug}.md` (no type prefix - folder indicates type)
|
|
53
|
+
- Example: `auth-refactor.md` or `caching-strategies.md`
|
|
50
54
|
|
|
51
|
-
3. **Determine target path:**
|
|
52
|
-
-
|
|
53
|
-
-
|
|
55
|
+
3. **Determine target path based on type:**
|
|
56
|
+
- Base: `{brain_dir}/{inbox_folder}` (or just `{brain_dir}` if no inbox_folder)
|
|
57
|
+
- `plan` → `{base}/plans/{filename}`
|
|
58
|
+
- `research` → `{base}/research/{filename}`
|
|
59
|
+
- `review` → `{base}/reviews/{filename}`
|
|
54
60
|
|
|
55
|
-
4. **Create directory** if needed
|
|
61
|
+
4. **Create directory** if needed (type folder may not exist yet)
|
|
56
62
|
|
|
57
63
|
5. **Apply template** based on preset and type (see `templates.md`)
|
|
58
64
|
|
|
@@ -64,7 +70,7 @@ Detailed procedures for each brain operation.
|
|
|
64
70
|
7. **Add placeholder comments** for sections needing user input:
|
|
65
71
|
- Read user's mention from `~/.droid/config.yaml` → `user_mention`
|
|
66
72
|
- Use `> @{user_mention}` for placeholders (e.g., `> @fry - Please provide requirements`)
|
|
67
|
-
-
|
|
73
|
+
- **CRITICAL:** NEVER use `@droid` - that's for user-to-AI comments, not AI-to-user
|
|
68
74
|
|
|
69
75
|
8. **Write the doc** with template structure and initial context
|
|
70
76
|
|
|
@@ -72,33 +78,35 @@ Detailed procedures for each brain operation.
|
|
|
72
78
|
|
|
73
79
|
10. **Confirm creation** and summarize what was captured
|
|
74
80
|
|
|
75
|
-
##
|
|
81
|
+
## Ideas
|
|
76
82
|
|
|
77
|
-
**Trigger:** `/brain
|
|
83
|
+
**Trigger:** `/brain idea {text}`
|
|
78
84
|
|
|
79
85
|
**Steps:**
|
|
80
86
|
|
|
81
|
-
1. **Read config first**
|
|
82
|
-
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
83
|
-
-
|
|
84
|
-
-
|
|
87
|
+
1. **Read config first (MANDATORY)**
|
|
88
|
+
- Use the Read tool on `~/.droid/skills/brain/overrides.yaml`
|
|
89
|
+
- If file exists and contains `brain_dir:`, use that path
|
|
90
|
+
- Also check for `inbox_folder` setting (e.g., `0-Inbox`)
|
|
91
|
+
- Only use defaults if the file doesn't exist or `brain_dir` is not set
|
|
92
|
+
- **Do NOT skip this step or assume defaults**
|
|
85
93
|
|
|
86
94
|
2. **Generate filename:**
|
|
87
|
-
- Format: `
|
|
95
|
+
- Format: `{date}-{slug}.md` where date is `YYYYMMDD`
|
|
88
96
|
- Slug from first few words of text
|
|
89
|
-
- Example: `
|
|
97
|
+
- Example: `20250115-remember-rate-limits.md`
|
|
90
98
|
|
|
91
99
|
3. **Determine target path:**
|
|
92
|
-
-
|
|
93
|
-
-
|
|
100
|
+
- Base: `{brain_dir}/{inbox_folder}` (or just `{brain_dir}` if no inbox_folder)
|
|
101
|
+
- Path: `{base}/ideas/{filename}`
|
|
94
102
|
|
|
95
|
-
4. **Create simple
|
|
103
|
+
4. **Create simple idea doc:**
|
|
96
104
|
- Markdown preset: Just the text
|
|
97
|
-
- Obsidian preset: Add frontmatter with `type:
|
|
105
|
+
- Obsidian preset: Add frontmatter with `type: idea`, `created: {date}`
|
|
98
106
|
|
|
99
107
|
5. **Write the file** - Do NOT set as active (fire-and-forget)
|
|
100
108
|
|
|
101
|
-
6. **Confirm** briefly: "Captured
|
|
109
|
+
6. **Confirm** briefly: "Captured idea to ideas/{filename}"
|
|
102
110
|
|
|
103
111
|
## Adding
|
|
104
112
|
|
|
@@ -140,19 +148,25 @@ Detailed procedures for each brain operation.
|
|
|
140
148
|
|
|
141
149
|
2. **Read active doc**
|
|
142
150
|
|
|
143
|
-
3. **
|
|
151
|
+
3. **Check preserve_comments setting:**
|
|
152
|
+
- Read `~/.droid/skills/comments/overrides.yaml` if it exists
|
|
153
|
+
- Look for `preserve_comments` (default: `true`)
|
|
154
|
+
|
|
155
|
+
4. **Find all `> @droid` comments**
|
|
144
156
|
- Pattern: Lines starting with `> @droid` (blockquote with mention)
|
|
145
157
|
|
|
146
|
-
|
|
158
|
+
5. **For each comment:**
|
|
147
159
|
- Show the comment and surrounding context
|
|
148
160
|
- Address the question/request
|
|
149
161
|
- Add response as blockquote with user's mention: `> @{user_mention} Your response here`
|
|
150
162
|
- Example: `> @fry Yes, the index covers that query pattern.`
|
|
151
|
-
-
|
|
163
|
+
- **CRITICAL:** NEVER use `@droid` in your responses. Use `@{user_mention}` from config (e.g., `@fry`)
|
|
164
|
+
- **CRITICAL:** Always include the `>` prefix to maintain blockquote formatting
|
|
165
|
+
- **CRITICAL:** If `preserve_comments: true`, keep the original `@droid` comment and add your response below it. Do NOT remove the original comment.
|
|
152
166
|
|
|
153
|
-
|
|
167
|
+
6. **Update the doc** with responses
|
|
154
168
|
|
|
155
|
-
|
|
169
|
+
7. **Summarize** what was addressed
|
|
156
170
|
|
|
157
171
|
## Finalizing
|
|
158
172
|
|
|
@@ -185,9 +199,11 @@ Detailed procedures for each brain operation.
|
|
|
185
199
|
|
|
186
200
|
**Steps:**
|
|
187
201
|
|
|
188
|
-
1. **Read config first**
|
|
189
|
-
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
190
|
-
-
|
|
202
|
+
1. **Read config first (MANDATORY)**
|
|
203
|
+
- Use the Read tool on `~/.droid/skills/brain/overrides.yaml`
|
|
204
|
+
- If file exists and contains `brain_dir:`, use that path
|
|
205
|
+
- Only use defaults if the file doesn't exist or `brain_dir` is not set
|
|
206
|
+
- **Do NOT skip this step or assume defaults**
|
|
191
207
|
|
|
192
208
|
2. **Find recent docs:**
|
|
193
209
|
|