@orderful/droid 0.6.0 → 0.8.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/CHANGELOG.md +45 -0
- package/README.md +80 -89
- package/assets/droid+claude.png +0 -0
- package/bun.lock +1 -1
- package/dist/commands/setup.d.ts +1 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +77 -9
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/tui.d.ts.map +1 -1
- package/dist/commands/tui.js +111 -70
- package/dist/commands/tui.js.map +1 -1
- package/dist/lib/agents.d.ts +19 -4
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/agents.js +121 -42
- package/dist/lib/agents.js.map +1 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/skills.js +55 -0
- package/dist/lib/skills.js.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/skills/brain/SKILL.md +146 -0
- package/dist/skills/brain/SKILL.yaml +31 -0
- package/dist/skills/brain/commands/README.md +7 -0
- package/dist/skills/brain/commands/brain.md +50 -0
- package/dist/skills/brain/references/metadata.md +59 -0
- package/dist/skills/brain/references/naming.md +48 -0
- package/dist/skills/brain/references/templates.md +102 -0
- package/dist/skills/brain/references/workflows.md +198 -0
- package/dist/skills/brain-obsidian/SKILL.md +108 -0
- package/dist/skills/brain-obsidian/SKILL.yaml +45 -0
- package/dist/skills/brain-obsidian/references/templates.md +144 -0
- package/dist/skills/brain-obsidian/references/workflows.md +192 -0
- package/dist/skills/code-review/SKILL.md +57 -0
- package/dist/skills/code-review/SKILL.yaml +22 -0
- package/dist/skills/code-review/agents/edi-standards-reviewer/AGENT.md +39 -0
- package/dist/skills/code-review/agents/edi-standards-reviewer/AGENT.yaml +14 -0
- package/dist/skills/code-review/agents/error-handling-reviewer/AGENT.md +51 -0
- package/dist/skills/code-review/agents/error-handling-reviewer/AGENT.yaml +14 -0
- package/dist/skills/code-review/agents/test-coverage-analyzer/AGENT.md +53 -0
- package/dist/skills/code-review/agents/test-coverage-analyzer/AGENT.yaml +14 -0
- package/dist/skills/code-review/agents/type-reviewer/AGENT.md +50 -0
- package/dist/skills/code-review/agents/type-reviewer/AGENT.yaml +13 -0
- package/dist/skills/code-review/commands/code-review.md +91 -0
- package/dist/skills/comments/SKILL.md +20 -5
- package/dist/skills/comments/SKILL.yaml +1 -1
- package/dist/skills/comments/commands/comments.md +1 -1
- package/dist/skills/project/SKILL.md +9 -7
- package/dist/skills/project/SKILL.yaml +1 -1
- package/dist/skills/project/commands/project.md +9 -4
- package/dist/skills/project/references/creating.md +9 -4
- package/dist/skills/project/references/loading.md +11 -5
- package/package.json +1 -1
- package/src/commands/setup.test.ts +276 -0
- package/src/commands/setup.ts +80 -10
- package/src/commands/tui.tsx +149 -82
- package/src/lib/agents.ts +134 -44
- package/src/lib/skills.ts +60 -0
- package/src/lib/types.ts +1 -0
- package/src/skills/brain/SKILL.md +146 -0
- package/src/skills/brain/SKILL.yaml +31 -0
- package/src/skills/brain/commands/README.md +7 -0
- package/src/skills/brain/commands/brain.md +50 -0
- package/src/skills/brain/references/metadata.md +59 -0
- package/src/skills/brain/references/naming.md +48 -0
- package/src/skills/brain/references/templates.md +102 -0
- package/src/skills/brain/references/workflows.md +198 -0
- package/src/skills/brain-obsidian/SKILL.md +108 -0
- package/src/skills/brain-obsidian/SKILL.yaml +45 -0
- package/src/skills/brain-obsidian/references/templates.md +144 -0
- package/src/skills/brain-obsidian/references/workflows.md +192 -0
- package/src/skills/code-review/SKILL.md +57 -0
- package/src/skills/code-review/SKILL.yaml +22 -0
- package/src/skills/code-review/agents/edi-standards-reviewer/AGENT.md +39 -0
- package/src/skills/code-review/agents/edi-standards-reviewer/AGENT.yaml +14 -0
- package/src/skills/code-review/agents/error-handling-reviewer/AGENT.md +51 -0
- package/src/skills/code-review/agents/error-handling-reviewer/AGENT.yaml +14 -0
- package/src/skills/code-review/agents/test-coverage-analyzer/AGENT.md +53 -0
- package/src/skills/code-review/agents/test-coverage-analyzer/AGENT.yaml +14 -0
- package/src/skills/code-review/agents/type-reviewer/AGENT.md +50 -0
- package/src/skills/code-review/agents/type-reviewer/AGENT.yaml +13 -0
- package/src/skills/code-review/commands/code-review.md +91 -0
- package/src/skills/comments/SKILL.md +20 -5
- package/src/skills/comments/SKILL.yaml +1 -1
- package/src/skills/comments/commands/comments.md +1 -1
- package/src/skills/project/SKILL.md +9 -7
- package/src/skills/project/SKILL.yaml +1 -1
- package/src/skills/project/commands/project.md +9 -4
- package/src/skills/project/references/creating.md +9 -4
- package/src/skills/project/references/loading.md +11 -5
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brain
|
|
3
|
+
description: >-
|
|
4
|
+
Collaborative scratch pad for planning and research. Triggers on phrases like
|
|
5
|
+
"let's use our brain", "let's think through this", or "plan this out" to capture
|
|
6
|
+
AI output into a persistent doc. Create docs with /brain plan, /brain research,
|
|
7
|
+
or /brain review. Use @mentions for async discussion. Docs persist across sessions.
|
|
8
|
+
globs:
|
|
9
|
+
- "**/brain/**/*.md"
|
|
10
|
+
alwaysApply: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Brain Skill
|
|
14
|
+
|
|
15
|
+
Scratch pad for planning, research, and design docs that persist across sessions.
|
|
16
|
+
|
|
17
|
+
## Why Brain Docs?
|
|
18
|
+
|
|
19
|
+
Ideas develop through iteration, not single prompts.
|
|
20
|
+
|
|
21
|
+
- **Thinking space** - Work through problems before committing to code
|
|
22
|
+
- **Async collaboration** - Leave `@mentions` for discussion across sessions (see comments skill for full support)
|
|
23
|
+
- **Persistent context** - Docs survive after chat history disappears
|
|
24
|
+
|
|
25
|
+
## When to Use
|
|
26
|
+
|
|
27
|
+
- Planning implementation for a feature
|
|
28
|
+
- Researching a problem or technology
|
|
29
|
+
- Design work that benefits from written iteration
|
|
30
|
+
- User says "brain", "let's think through", "plan this out"
|
|
31
|
+
- Optionally, to capture output from plan mode sessions
|
|
32
|
+
|
|
33
|
+
## When NOT to Use
|
|
34
|
+
|
|
35
|
+
- Quick questions that don't need persistence
|
|
36
|
+
- Tasks with clear implementation path
|
|
37
|
+
- One-off lookups or simple fixes
|
|
38
|
+
|
|
39
|
+
## Configuration
|
|
40
|
+
|
|
41
|
+
**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.
|
|
42
|
+
|
|
43
|
+
| Setting | Default | Description |
|
|
44
|
+
|---------|---------|-------------|
|
|
45
|
+
| `brain_dir` | (see below) | Where docs are stored |
|
|
46
|
+
| `inbox_folder` | (empty) | Optional subfolder for new docs (omit for flat structure) |
|
|
47
|
+
|
|
48
|
+
Default `brain_dir` by AI tool (only if not configured):
|
|
49
|
+
- **claude-code**: `~/.claude/brain`
|
|
50
|
+
- **opencode**: `~/.config/opencode/brain`
|
|
51
|
+
|
|
52
|
+
## Core Concepts
|
|
53
|
+
|
|
54
|
+
**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.
|
|
55
|
+
|
|
56
|
+
**Doc types:**
|
|
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
|
+
- `note` - Quick capture (fire-and-forget, doesn't become active)
|
|
61
|
+
|
|
62
|
+
**Comment conventions:** Use `@droid` / `@{user}` markers for async back-and-forth. If droid's `comments` skill is installed, use `/comments check` for full support.
|
|
63
|
+
|
|
64
|
+
**Status lifecycle:** `exploring` → `drafting` → `decided` → `done`
|
|
65
|
+
|
|
66
|
+
## Commands
|
|
67
|
+
|
|
68
|
+
| Command | Action |
|
|
69
|
+
|---------|--------|
|
|
70
|
+
| `/brain` | List recent docs or create new |
|
|
71
|
+
| `/brain {topic}` | **Search** for existing doc (fuzzy match) → becomes active |
|
|
72
|
+
| `/brain plan {topic}` | Create planning doc (requires `plan` keyword) |
|
|
73
|
+
| `/brain research {topic}` | Create research doc (requires `research` keyword) |
|
|
74
|
+
| `/brain review {topic}` | Create review doc (requires `review` keyword) |
|
|
75
|
+
| `/brain note {text}` | Quick capture (standalone, doesn't become active) |
|
|
76
|
+
| `/brain add {text}` | Append to active doc |
|
|
77
|
+
| `/brain check` | Address @droid comments in active doc |
|
|
78
|
+
| `/brain done` | Finalize active doc, update status |
|
|
79
|
+
|
|
80
|
+
**IMPORTANT:** The default action for `/brain {topic}` is to **SEARCH** for existing docs, NOT create. Only use `/brain plan {topic}` or `/brain research {topic}` when the user explicitly wants to create a new doc.
|
|
81
|
+
|
|
82
|
+
## Opening a Doc
|
|
83
|
+
|
|
84
|
+
**Trigger:** `/brain {topic}` or user asks to open a brain doc
|
|
85
|
+
|
|
86
|
+
**TLDR:** Search for and open an existing doc. Fuzzy-match topic against existing docs, read content, set as active.
|
|
87
|
+
|
|
88
|
+
Full procedure: `references/workflows.md` § Opening
|
|
89
|
+
|
|
90
|
+
## Creating a Doc
|
|
91
|
+
|
|
92
|
+
**Trigger:** `/brain plan {topic}` or `/brain research {topic}`
|
|
93
|
+
|
|
94
|
+
**TLDR:** Create doc from template, set as active, gather initial context.
|
|
95
|
+
|
|
96
|
+
Full procedure: `references/workflows.md` § Creating
|
|
97
|
+
Templates: `references/templates.md`
|
|
98
|
+
Naming: `references/naming.md`
|
|
99
|
+
|
|
100
|
+
## Quick Notes
|
|
101
|
+
|
|
102
|
+
**Trigger:** `/brain note {text}`
|
|
103
|
+
|
|
104
|
+
**TLDR:** Fire-and-forget capture to inbox. Does not become active doc.
|
|
105
|
+
|
|
106
|
+
Full procedure: `references/workflows.md` § Notes
|
|
107
|
+
|
|
108
|
+
## Adding Content
|
|
109
|
+
|
|
110
|
+
**Trigger:** `/brain add {text}`
|
|
111
|
+
|
|
112
|
+
**TLDR:** Append text to active doc with timestamp.
|
|
113
|
+
|
|
114
|
+
Full procedure: `references/workflows.md` § Adding
|
|
115
|
+
|
|
116
|
+
## Checking Comments
|
|
117
|
+
|
|
118
|
+
**Trigger:** `/brain check`
|
|
119
|
+
|
|
120
|
+
**TLDR:** Find `> @droid` comments in active doc, address each one.
|
|
121
|
+
|
|
122
|
+
Full procedure: `references/workflows.md` § Checking
|
|
123
|
+
|
|
124
|
+
## Finalizing
|
|
125
|
+
|
|
126
|
+
**Trigger:** `/brain done`
|
|
127
|
+
|
|
128
|
+
**TLDR:** Review doc, update status to `done`, suggest next steps.
|
|
129
|
+
|
|
130
|
+
Full procedure: `references/workflows.md` § Finalizing
|
|
131
|
+
|
|
132
|
+
## Extensions
|
|
133
|
+
|
|
134
|
+
Before creating or modifying brain docs, check if any `brain-*` extension skills are installed:
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
~/.claude/skills/brain-*/SKILL.md
|
|
138
|
+
~/.droid/skills/brain-*/SKILL.md
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
If found (e.g., `brain-obsidian`), **ALWAYS** use the extension's templates, workflows, and configuration instead of this skill's defaults. Extensions may provide:
|
|
142
|
+
- Alternative template formats (YAML frontmatter, wikilinks)
|
|
143
|
+
- Folder organization (PARA structure)
|
|
144
|
+
- Additional commands or integrations
|
|
145
|
+
|
|
146
|
+
The base brain skill provides simple markdown. Extensions layer on advanced features.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: brain
|
|
2
|
+
description: >-
|
|
3
|
+
Collaborative scratch pad for planning and research. Triggers on phrases like
|
|
4
|
+
"let's use our brain", "let's think through this", or "plan this out" to capture
|
|
5
|
+
AI output into a persistent doc. Create docs with /brain plan, /brain research,
|
|
6
|
+
or /brain review. Use @mentions for async discussion. Docs persist across sessions.
|
|
7
|
+
version: 0.1.1
|
|
8
|
+
status: beta
|
|
9
|
+
dependencies: []
|
|
10
|
+
provides_output: false
|
|
11
|
+
config_schema:
|
|
12
|
+
brain_dir:
|
|
13
|
+
type: string
|
|
14
|
+
description: Directory for brain docs (default varies by AI tool)
|
|
15
|
+
inbox_folder:
|
|
16
|
+
type: string
|
|
17
|
+
description: Subfolder for new docs (empty = flat structure)
|
|
18
|
+
default: ""
|
|
19
|
+
examples:
|
|
20
|
+
- title: "Start a planning doc"
|
|
21
|
+
code: |
|
|
22
|
+
/brain plan auth refactor
|
|
23
|
+
# Creates planning doc, becomes active for session
|
|
24
|
+
- title: "Quick note capture"
|
|
25
|
+
code: |
|
|
26
|
+
/brain note Remember to check rate limits on the API
|
|
27
|
+
# Fire-and-forget to inbox
|
|
28
|
+
- title: "Check for comments"
|
|
29
|
+
code: |
|
|
30
|
+
/brain check
|
|
31
|
+
# Find and address @mentions in active doc
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Collaborative scratch pad for planning and research
|
|
3
|
+
argument-hint: "[{topic} | plan|research|review {topic} | note|add {text} | check|done]"
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Grep, Bash(mkdir:*), Bash(ls:*)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /brain
|
|
8
|
+
|
|
9
|
+
Entry point for brain doc management. See the **brain skill** for full behavior.
|
|
10
|
+
|
|
11
|
+
## Arguments
|
|
12
|
+
|
|
13
|
+
$ARGUMENTS
|
|
14
|
+
|
|
15
|
+
## Default Behavior
|
|
16
|
+
|
|
17
|
+
**IMPORTANT:** When given just a topic (e.g., `/brain auth-refactor`), the default action is to **SEARCH** for existing docs, NOT create. Only create docs with explicit `/brain plan {topic}` or `/brain research {topic}`.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/brain # List recent docs or create new
|
|
23
|
+
/brain {topic} # SEARCH: Open existing doc (fuzzy match) → active
|
|
24
|
+
/brain plan {topic} # CREATE: New planning doc → active
|
|
25
|
+
/brain research {topic} # Create research doc → active
|
|
26
|
+
/brain review {topic} # Create review doc → active
|
|
27
|
+
/brain note {text} # Quick capture (fire-and-forget)
|
|
28
|
+
/brain add {text} # Append to active doc
|
|
29
|
+
/brain check # Address @droid comments in active doc
|
|
30
|
+
/brain done # Finalize active doc
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Configuration
|
|
34
|
+
|
|
35
|
+
**ALWAYS read `~/.droid/skills/brain/overrides.yaml` first.** Use configured values if present, only fall back to defaults if missing.
|
|
36
|
+
|
|
37
|
+
- `brain_dir` - Where docs live (default varies by AI tool)
|
|
38
|
+
- `inbox_folder` - Subfolder for new docs (empty = flat)
|
|
39
|
+
|
|
40
|
+
## Behavior
|
|
41
|
+
|
|
42
|
+
Refer to the brain skill for:
|
|
43
|
+
- **Opening**: How to fuzzy-match, handle multiple matches, set active
|
|
44
|
+
- **Creating**: Template structure by preset, naming conventions
|
|
45
|
+
- **Notes**: Quick capture workflow
|
|
46
|
+
- **Adding**: Append to active doc with timestamp
|
|
47
|
+
- **Checking**: Find and address @droid comments
|
|
48
|
+
- **Finalizing**: Update status, suggest next steps
|
|
49
|
+
|
|
50
|
+
The skill's `references/` folder contains detailed specs for workflows, templates, naming, and metadata.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Brain Doc Metadata
|
|
2
|
+
|
|
3
|
+
Inline metadata and status lifecycle for brain docs.
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
|
|
7
|
+
Status and type tracked inline at top of doc:
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# {Topic}
|
|
11
|
+
|
|
12
|
+
**Type:** plan
|
|
13
|
+
**Status:** exploring
|
|
14
|
+
**Created:** 2025-01-15
|
|
15
|
+
|
|
16
|
+
...
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Simple and portable. Works anywhere markdown is supported.
|
|
20
|
+
|
|
21
|
+
## Fields
|
|
22
|
+
|
|
23
|
+
| Field | Required | Description |
|
|
24
|
+
|-------|----------|-------------|
|
|
25
|
+
| `Type` | Yes | Doc type: `plan`, `research`, `review`, or `note` |
|
|
26
|
+
| `Status` | Yes (except notes) | Current lifecycle stage |
|
|
27
|
+
| `Created` | Yes | Creation date |
|
|
28
|
+
| `Updated` | No | Last modification date (add when doc changes) |
|
|
29
|
+
|
|
30
|
+
## Status Lifecycle
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
exploring → drafting → decided → done
|
|
34
|
+
↓ ↓ ↓
|
|
35
|
+
stale stale stale
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Status Definitions
|
|
39
|
+
|
|
40
|
+
| Status | Meaning | Typical Actions |
|
|
41
|
+
|--------|---------|-----------------|
|
|
42
|
+
| `exploring` | Initial discovery, gathering information | Research, ask questions, explore options |
|
|
43
|
+
| `drafting` | Forming opinions, narrowing options | Document trade-offs, propose approaches |
|
|
44
|
+
| `decided` | Decision made, ready to act | Document decision rationale, plan implementation |
|
|
45
|
+
| `done` | Work complete, doc is reference material | Archive or link from project |
|
|
46
|
+
| `stale` | Abandoned or outdated | Review for archival or deletion |
|
|
47
|
+
|
|
48
|
+
### Transitions
|
|
49
|
+
|
|
50
|
+
- **exploring → drafting**: When you have enough info to start forming opinions
|
|
51
|
+
- **drafting → decided**: When a clear decision/direction emerges
|
|
52
|
+
- **decided → done**: When the work is complete
|
|
53
|
+
- **any → stale**: When doc hasn't been touched in 30+ days without resolution
|
|
54
|
+
|
|
55
|
+
## Updating Metadata
|
|
56
|
+
|
|
57
|
+
When modifying a doc:
|
|
58
|
+
1. Add or update the `Updated` field to current date
|
|
59
|
+
2. Update `Status` if the work has progressed
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Brain Doc Naming
|
|
2
|
+
|
|
3
|
+
Conventions for naming brain docs.
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
{type}-{topic-slug}.md
|
|
9
|
+
```
|
|
10
|
+
|
|
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
|
+
## Slug Rules
|
|
19
|
+
|
|
20
|
+
1. **Lowercase** all words
|
|
21
|
+
2. **Replace spaces** with hyphens
|
|
22
|
+
3. **Remove special characters** (keep alphanumeric and hyphens only)
|
|
23
|
+
4. **Limit length** to ~50 characters (truncate at word boundary)
|
|
24
|
+
5. **No trailing hyphens**
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
| Input | Filename |
|
|
29
|
+
|-------|----------|
|
|
30
|
+
| `/brain plan Auth Refactor` | `plan-auth-refactor.md` |
|
|
31
|
+
| `/brain research Caching Strategies` | `research-caching-strategies.md` |
|
|
32
|
+
| `/brain plan Transaction Template Rendering` | `plan-transaction-template-rendering.md` |
|
|
33
|
+
| `/brain note Remember to check rate limits` | `note-20250115-remember-to-check-rate.md` |
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
For notes, include the date in the filename:
|
|
38
|
+
```
|
|
39
|
+
note-{YYYYMMDD}-{slug}.md
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This prevents collisions and allows chronological sorting.
|
|
43
|
+
|
|
44
|
+
## Uniqueness
|
|
45
|
+
|
|
46
|
+
If a file with the generated name already exists:
|
|
47
|
+
1. Check if user wants to open existing doc
|
|
48
|
+
2. Or append a numeric suffix: `plan-auth-refactor-2.md`
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Brain Doc Templates
|
|
2
|
+
|
|
3
|
+
Templates for each doc type. All templates use simple markdown.
|
|
4
|
+
|
|
5
|
+
## Plan Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# {Topic}
|
|
9
|
+
|
|
10
|
+
**Type:** plan
|
|
11
|
+
**Status:** exploring
|
|
12
|
+
**Created:** {date}
|
|
13
|
+
|
|
14
|
+
Planning {brief description}.
|
|
15
|
+
|
|
16
|
+
## Context
|
|
17
|
+
|
|
18
|
+
What we're solving and why.
|
|
19
|
+
|
|
20
|
+
## Exploration
|
|
21
|
+
|
|
22
|
+
Options and approaches considered.
|
|
23
|
+
|
|
24
|
+
## Decision
|
|
25
|
+
|
|
26
|
+
What we chose and why.
|
|
27
|
+
|
|
28
|
+
## Next Steps
|
|
29
|
+
|
|
30
|
+
- [ ] Action items
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Research Template
|
|
34
|
+
|
|
35
|
+
```markdown
|
|
36
|
+
# {Topic}
|
|
37
|
+
|
|
38
|
+
**Type:** research
|
|
39
|
+
**Status:** exploring
|
|
40
|
+
**Created:** {date}
|
|
41
|
+
|
|
42
|
+
Researching {brief description}.
|
|
43
|
+
|
|
44
|
+
## Questions
|
|
45
|
+
|
|
46
|
+
What we're trying to understand.
|
|
47
|
+
|
|
48
|
+
## Findings
|
|
49
|
+
|
|
50
|
+
What we've learned.
|
|
51
|
+
|
|
52
|
+
## Summary
|
|
53
|
+
|
|
54
|
+
Key takeaways.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Review Template
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
# {Topic}
|
|
61
|
+
|
|
62
|
+
**Type:** review
|
|
63
|
+
**Status:** exploring
|
|
64
|
+
**Created:** {date}
|
|
65
|
+
|
|
66
|
+
Reviewing {brief description}.
|
|
67
|
+
|
|
68
|
+
## Overview
|
|
69
|
+
|
|
70
|
+
What's being reviewed and scope.
|
|
71
|
+
|
|
72
|
+
## Observations
|
|
73
|
+
|
|
74
|
+
Key findings and notes.
|
|
75
|
+
|
|
76
|
+
## Recommendations
|
|
77
|
+
|
|
78
|
+
Suggested changes or actions.
|
|
79
|
+
|
|
80
|
+
## Verdict
|
|
81
|
+
|
|
82
|
+
Overall assessment.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Note Template
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
# Note: {Brief Title}
|
|
89
|
+
|
|
90
|
+
**Created:** {date}
|
|
91
|
+
|
|
92
|
+
{content}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Template Variables
|
|
96
|
+
|
|
97
|
+
| Variable | Description | Example |
|
|
98
|
+
|----------|-------------|---------|
|
|
99
|
+
| `{Topic}` | Doc title from user input | "Auth Refactor" |
|
|
100
|
+
| `{date}` | Current date (YYYY-MM-DD) | "2025-01-15" |
|
|
101
|
+
| `{brief description}` | Context from conversation | "refactoring the authentication system" |
|
|
102
|
+
| `{content}` | User-provided text | (for notes) |
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# Brain Workflows
|
|
2
|
+
|
|
3
|
+
Detailed procedures for each brain operation.
|
|
4
|
+
|
|
5
|
+
## Opening
|
|
6
|
+
|
|
7
|
+
**Trigger:** `/brain {topic}` or user asks to open a brain doc
|
|
8
|
+
|
|
9
|
+
**Steps:**
|
|
10
|
+
|
|
11
|
+
1. **Read config first**
|
|
12
|
+
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
13
|
+
- Use `brain_dir` if configured, otherwise use default for current AI tool
|
|
14
|
+
|
|
15
|
+
2. **Search for matches**
|
|
16
|
+
```
|
|
17
|
+
Glob: {brain_dir}/**/*{topic}*.md
|
|
18
|
+
```
|
|
19
|
+
Fuzzy match the topic against doc filenames
|
|
20
|
+
|
|
21
|
+
3. **Handle results:**
|
|
22
|
+
- **No matches**: Offer to create a new doc with that topic
|
|
23
|
+
- **One match**: Open it
|
|
24
|
+
- **Multiple matches**: Present list, let user choose
|
|
25
|
+
|
|
26
|
+
4. **Read the doc** and summarize key points:
|
|
27
|
+
- Current status
|
|
28
|
+
- Main topic/context
|
|
29
|
+
- Any open `@droid` comments
|
|
30
|
+
- Recent updates
|
|
31
|
+
|
|
32
|
+
5. **Set as active doc** - Remember path for subsequent `/brain add` and `/brain check` commands
|
|
33
|
+
|
|
34
|
+
## Creating
|
|
35
|
+
|
|
36
|
+
**Trigger:** `/brain plan {topic}` or `/brain research {topic}`
|
|
37
|
+
|
|
38
|
+
**Steps:**
|
|
39
|
+
|
|
40
|
+
1. **Read config first**
|
|
41
|
+
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
42
|
+
- Use `brain_dir` if configured, otherwise use default for current AI tool
|
|
43
|
+
- Use `inbox_folder` if configured
|
|
44
|
+
|
|
45
|
+
2. **Generate filename** using naming conventions (see `naming.md`):
|
|
46
|
+
- Format: `{type}-{topic-slug}.md`
|
|
47
|
+
- Example: `plan-auth-refactor.md` or `research-caching-strategies.md`
|
|
48
|
+
|
|
49
|
+
3. **Determine target path:**
|
|
50
|
+
- If `inbox_folder` is set: `{brain_dir}/{inbox_folder}/{filename}`
|
|
51
|
+
- Otherwise: `{brain_dir}/{filename}`
|
|
52
|
+
|
|
53
|
+
4. **Create directory** if needed
|
|
54
|
+
|
|
55
|
+
5. **Apply template** based on preset and type (see `templates.md`)
|
|
56
|
+
|
|
57
|
+
6. **Gather initial context** from conversation:
|
|
58
|
+
- What problem are we solving?
|
|
59
|
+
- Any constraints or requirements mentioned?
|
|
60
|
+
- Related work or prior decisions?
|
|
61
|
+
|
|
62
|
+
7. **Write the doc** with template structure and initial context
|
|
63
|
+
|
|
64
|
+
8. **Set as active doc**
|
|
65
|
+
|
|
66
|
+
9. **Confirm creation** and summarize what was captured
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
**Trigger:** `/brain note {text}`
|
|
71
|
+
|
|
72
|
+
**Steps:**
|
|
73
|
+
|
|
74
|
+
1. **Read config first**
|
|
75
|
+
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
76
|
+
- Use `brain_dir` if configured, otherwise use default for current AI tool
|
|
77
|
+
- Use `inbox_folder` if configured
|
|
78
|
+
|
|
79
|
+
2. **Generate filename:**
|
|
80
|
+
- Format: `note-{date}-{slug}.md` where date is `YYYYMMDD`
|
|
81
|
+
- Slug from first few words of text
|
|
82
|
+
- Example: `note-20250115-remember-rate-limits.md`
|
|
83
|
+
|
|
84
|
+
3. **Determine target path:**
|
|
85
|
+
- If `inbox_folder` is set: `{brain_dir}/{inbox_folder}/{filename}`
|
|
86
|
+
- Otherwise: `{brain_dir}/{filename}`
|
|
87
|
+
|
|
88
|
+
4. **Create simple note:**
|
|
89
|
+
- Markdown preset: Just the text
|
|
90
|
+
- Obsidian preset: Add frontmatter with `type: note`, `created: {date}`
|
|
91
|
+
|
|
92
|
+
5. **Write the file** - Do NOT set as active (fire-and-forget)
|
|
93
|
+
|
|
94
|
+
6. **Confirm** briefly: "Captured note to {filename}"
|
|
95
|
+
|
|
96
|
+
## Adding
|
|
97
|
+
|
|
98
|
+
**Trigger:** `/brain add {text}`
|
|
99
|
+
|
|
100
|
+
**Steps:**
|
|
101
|
+
|
|
102
|
+
1. **Check for active doc**
|
|
103
|
+
- If no active doc: Ask user which doc to add to, or offer to create new
|
|
104
|
+
|
|
105
|
+
2. **Read current content** of active doc
|
|
106
|
+
|
|
107
|
+
3. **Append new section:**
|
|
108
|
+
```markdown
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Update ({date})
|
|
113
|
+
|
|
114
|
+
{text}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
4. **Update the `updated` date** in frontmatter (if using obsidian preset)
|
|
118
|
+
|
|
119
|
+
5. **Write changes**
|
|
120
|
+
|
|
121
|
+
6. **Confirm** what was added
|
|
122
|
+
|
|
123
|
+
## Checking
|
|
124
|
+
|
|
125
|
+
**Trigger:** `/brain check`
|
|
126
|
+
|
|
127
|
+
**Prefer `comments` skill:** If the `comments` skill is installed, use `/comments check` instead - it provides better comment detection, cleanup workflows, and supports the full `@droid`/`@user` convention. The workflow below is a fallback for basic comment handling.
|
|
128
|
+
|
|
129
|
+
**Steps:**
|
|
130
|
+
|
|
131
|
+
1. **Check for active doc**
|
|
132
|
+
- If no active doc: Ask user which doc to check, or list docs with comments
|
|
133
|
+
|
|
134
|
+
2. **Read active doc**
|
|
135
|
+
|
|
136
|
+
3. **Find all `> @droid` comments**
|
|
137
|
+
- Pattern: Lines starting with `> @droid` (blockquote with mention)
|
|
138
|
+
|
|
139
|
+
4. **For each comment:**
|
|
140
|
+
- Show the comment and surrounding context
|
|
141
|
+
- Address the question/request
|
|
142
|
+
- Add response as `> @{user_mention}` reply
|
|
143
|
+
- Or resolve inline if it was a simple note
|
|
144
|
+
|
|
145
|
+
5. **Update the doc** with responses
|
|
146
|
+
|
|
147
|
+
6. **Summarize** what was addressed
|
|
148
|
+
|
|
149
|
+
## Finalizing
|
|
150
|
+
|
|
151
|
+
**Trigger:** `/brain done`
|
|
152
|
+
|
|
153
|
+
**Steps:**
|
|
154
|
+
|
|
155
|
+
1. **Check for active doc**
|
|
156
|
+
- If no active doc: Ask which doc to finalize
|
|
157
|
+
|
|
158
|
+
2. **Read active doc**
|
|
159
|
+
|
|
160
|
+
3. **Review content:**
|
|
161
|
+
- Are there unresolved `@droid` comments?
|
|
162
|
+
- Is there a clear decision/outcome?
|
|
163
|
+
- Any loose ends?
|
|
164
|
+
|
|
165
|
+
4. **Update status** to `done` in frontmatter (obsidian preset) or add "Status: Done" (markdown preset)
|
|
166
|
+
|
|
167
|
+
5. **Suggest next steps:**
|
|
168
|
+
- Promote to project? (if substantial work)
|
|
169
|
+
- Archive? (if complete)
|
|
170
|
+
- Create follow-up tasks?
|
|
171
|
+
|
|
172
|
+
6. **Clear active doc** from session
|
|
173
|
+
|
|
174
|
+
## Listing
|
|
175
|
+
|
|
176
|
+
**Trigger:** `/brain` (no arguments)
|
|
177
|
+
|
|
178
|
+
**Steps:**
|
|
179
|
+
|
|
180
|
+
1. **Read config first**
|
|
181
|
+
- Read `~/.droid/skills/brain/overrides.yaml`
|
|
182
|
+
- Use `brain_dir` if configured, otherwise use default for current AI tool
|
|
183
|
+
|
|
184
|
+
2. **Find recent docs:**
|
|
185
|
+
```
|
|
186
|
+
Glob: {brain_dir}/**/*.md
|
|
187
|
+
```
|
|
188
|
+
Sort by modification time, limit to 10-15
|
|
189
|
+
|
|
190
|
+
3. **Present list** with:
|
|
191
|
+
- Filename
|
|
192
|
+
- Type (plan/research/note)
|
|
193
|
+
- Status (if available)
|
|
194
|
+
- Last modified
|
|
195
|
+
|
|
196
|
+
4. **Offer options:**
|
|
197
|
+
- Select a doc to open
|
|
198
|
+
- Create new plan/research doc
|