@orderful/droid 0.37.0 → 0.39.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/.claude-plugin/marketplace.json +1 -118
- package/.claude-plugin/plugin.json +51 -0
- package/AGENTS.md +4 -0
- package/CHANGELOG.md +53 -0
- package/README.md +70 -39
- package/dist/bin/droid.js +658 -212
- package/dist/commands/auth.d.ts +3 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/tui/components/PlatformBadges.d.ts.map +1 -1
- package/dist/commands/tui/components/SettingsDetails.d.ts.map +1 -1
- package/dist/commands/tui/hooks/useAppUpdate.d.ts.map +1 -1
- package/dist/commands/tui/views/SetupScreen.d.ts.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/index.js +345 -186
- package/dist/lib/agents.d.ts +4 -2
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/migrations.d.ts.map +1 -1
- package/dist/lib/platform.codex.d.ts +36 -0
- package/dist/lib/platform.codex.d.ts.map +1 -0
- package/dist/lib/platforms.d.ts +30 -24
- package/dist/lib/platforms.d.ts.map +1 -1
- package/dist/lib/secrets.d.ts +7 -0
- package/dist/lib/secrets.d.ts.map +1 -0
- package/dist/lib/skills.d.ts +4 -2
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/lib/types.d.ts +2 -1
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/tools/brain/.claude-plugin/plugin.json +8 -1
- package/dist/tools/brain/TOOL.yaml +1 -1
- package/dist/tools/brain/skills/brain/SKILL.md +6 -3
- package/dist/tools/brain/skills/brain/references/workflows.md +9 -5
- package/dist/tools/brain/skills/brain-obsidian/SKILL.md +2 -0
- package/dist/tools/coach/.claude-plugin/plugin.json +6 -0
- package/dist/tools/coach/skills/coach/SKILL.md +3 -0
- package/dist/tools/code-review/.claude-plugin/plugin.json +12 -0
- package/dist/tools/code-review/skills/code-review/SKILL.md +2 -0
- package/dist/tools/codex/.claude-plugin/plugin.json +9 -0
- package/dist/tools/codex/skills/codex/SKILL.md +3 -0
- package/dist/tools/comments/.claude-plugin/plugin.json +6 -0
- package/dist/tools/comments/skills/comments/SKILL.md +5 -0
- package/dist/tools/droid/.claude-plugin/plugin.json +8 -1
- package/dist/tools/droid/TOOL.yaml +4 -2
- package/dist/tools/droid/commands/setup.md +125 -0
- package/dist/tools/droid/skills/droid/SKILL.md +117 -2
- package/dist/tools/plan/.claude-plugin/plugin.json +6 -0
- package/dist/tools/plan/skills/plan/SKILL.md +2 -0
- package/dist/tools/project/.claude-plugin/plugin.json +6 -0
- package/dist/tools/project/skills/project/SKILL.md +3 -0
- package/dist/tools/status-update/.claude-plugin/plugin.json +22 -0
- package/dist/tools/status-update/TOOL.yaml +21 -0
- package/dist/tools/status-update/commands/status-update.md +27 -0
- package/dist/tools/status-update/skills/status-update/SKILL.md +253 -0
- package/dist/tools/status-update/skills/status-update/references/formatting.md +203 -0
- package/dist/tools/tech-design/.claude-plugin/plugin.json +7 -1
- package/dist/tools/tech-design/TOOL.yaml +1 -1
- package/dist/tools/tech-design/commands/tech-design.md +2 -0
- package/dist/tools/tech-design/skills/tech-design/SKILL.md +39 -9
- package/dist/tools/tech-design/skills/tech-design/references/publish.md +272 -216
- package/dist/tools/tech-design/skills/tech-design/references/start.md +50 -20
- package/dist/tools/wrapup/.claude-plugin/plugin.json +6 -0
- package/dist/tools/wrapup/skills/wrapup/SKILL.md +2 -0
- package/package.json +1 -1
- package/scripts/build-plugins.ts +154 -6
- package/src/bin/droid.ts +35 -0
- package/src/commands/auth.ts +150 -0
- package/src/commands/setup.ts +107 -2
- package/src/commands/tui/components/PlatformBadges.tsx +1 -0
- package/src/commands/tui/components/SettingsDetails.tsx +1 -0
- package/src/commands/tui/hooks/useAppUpdate.ts +21 -1
- package/src/commands/tui/views/SetupScreen.tsx +10 -1
- package/src/commands/update.ts +21 -1
- package/src/lib/agents.ts +13 -2
- package/src/lib/migrations.ts +81 -9
- package/src/lib/platform.codex.ts +131 -0
- package/src/lib/platforms.ts +127 -6
- package/src/lib/secrets.ts +12 -0
- package/src/lib/skills.ts +53 -6
- package/src/lib/types.ts +1 -0
- package/src/tools/brain/.claude-plugin/plugin.json +8 -1
- package/src/tools/brain/TOOL.yaml +1 -1
- package/src/tools/brain/skills/brain/SKILL.md +6 -3
- package/src/tools/brain/skills/brain/references/workflows.md +9 -5
- package/src/tools/brain/skills/brain-obsidian/SKILL.md +2 -0
- package/src/tools/coach/.claude-plugin/plugin.json +6 -0
- package/src/tools/coach/skills/coach/SKILL.md +3 -0
- package/src/tools/code-review/.claude-plugin/plugin.json +12 -0
- package/src/tools/code-review/skills/code-review/SKILL.md +2 -0
- package/src/tools/codex/.claude-plugin/plugin.json +9 -0
- package/src/tools/codex/skills/codex/SKILL.md +3 -0
- package/src/tools/comments/.claude-plugin/plugin.json +6 -0
- package/src/tools/comments/skills/comments/SKILL.md +5 -0
- package/src/tools/droid/.claude-plugin/plugin.json +8 -1
- package/src/tools/droid/TOOL.yaml +4 -2
- package/src/tools/droid/commands/setup.md +125 -0
- package/src/tools/droid/skills/droid/SKILL.md +117 -2
- package/src/tools/plan/.claude-plugin/plugin.json +6 -0
- package/src/tools/plan/skills/plan/SKILL.md +2 -0
- package/src/tools/project/.claude-plugin/plugin.json +6 -0
- package/src/tools/project/skills/project/SKILL.md +3 -0
- package/src/tools/status-update/.claude-plugin/plugin.json +22 -0
- package/src/tools/status-update/TOOL.yaml +21 -0
- package/src/tools/status-update/commands/status-update.md +27 -0
- package/src/tools/status-update/skills/status-update/SKILL.md +253 -0
- package/src/tools/status-update/skills/status-update/references/formatting.md +203 -0
- package/src/tools/tech-design/.claude-plugin/plugin.json +7 -1
- package/src/tools/tech-design/TOOL.yaml +1 -1
- package/src/tools/tech-design/commands/tech-design.md +2 -0
- package/src/tools/tech-design/skills/tech-design/SKILL.md +39 -9
- package/src/tools/tech-design/skills/tech-design/references/publish.md +272 -216
- package/src/tools/tech-design/skills/tech-design/references/start.md +50 -20
- package/src/tools/wrapup/.claude-plugin/plugin.json +6 -0
- package/src/tools/wrapup/skills/wrapup/SKILL.md +2 -0
package/src/lib/platforms.ts
CHANGED
|
@@ -4,9 +4,20 @@ import { execSync } from 'child_process';
|
|
|
4
4
|
import { existsSync } from 'fs';
|
|
5
5
|
import { Platform, type DroidConfig } from './types';
|
|
6
6
|
|
|
7
|
+
// Re-export Codex-specific functions from platform.codex.ts
|
|
8
|
+
export {
|
|
9
|
+
CODEX_SKILLS_PATH,
|
|
10
|
+
createCodexSymlink,
|
|
11
|
+
removeCodexSymlink,
|
|
12
|
+
removeAllCodexSymlinks,
|
|
13
|
+
} from './platform.codex';
|
|
14
|
+
|
|
15
|
+
import { createCodexSymlink } from './platform.codex';
|
|
16
|
+
|
|
7
17
|
/**
|
|
8
18
|
* Unified skills path - all platforms read from ~/.claude/skills/
|
|
9
19
|
* This is the Agent Skills standard location supported by Claude Code, OpenCode, and Cursor.
|
|
20
|
+
* OpenAI Codex reads from ~/.codex/skills/, so we create symlinks there (see platform.codex.ts).
|
|
10
21
|
*/
|
|
11
22
|
const UNIFIED_SKILLS_PATH = join(homedir(), '.claude', 'skills');
|
|
12
23
|
|
|
@@ -16,8 +27,17 @@ const UNIFIED_SKILLS_PATH = join(homedir(), '.claude', 'skills');
|
|
|
16
27
|
*
|
|
17
28
|
* Note: Skills are unified to ~/.claude/skills/ (all platforms read this location).
|
|
18
29
|
* Commands and agents remain platform-specific as there's no cross-platform compatibility.
|
|
30
|
+
* OpenAI Codex only supports skills (via symlinks) - no commands, agents, or config integration.
|
|
19
31
|
*/
|
|
20
|
-
export const PLATFORM_PATHS
|
|
32
|
+
export const PLATFORM_PATHS: Record<
|
|
33
|
+
Platform,
|
|
34
|
+
{
|
|
35
|
+
skills: string;
|
|
36
|
+
commands: string | null;
|
|
37
|
+
agents: string | null;
|
|
38
|
+
config: string | null;
|
|
39
|
+
}
|
|
40
|
+
> = {
|
|
21
41
|
[Platform.ClaudeCode]: {
|
|
22
42
|
skills: UNIFIED_SKILLS_PATH,
|
|
23
43
|
commands: join(homedir(), '.claude', 'commands'),
|
|
@@ -38,9 +58,16 @@ export const PLATFORM_PATHS = {
|
|
|
38
58
|
agents: join(homedir(), '.cursor', 'agents'),
|
|
39
59
|
config: join(homedir(), '.cursor', 'rules'),
|
|
40
60
|
},
|
|
41
|
-
|
|
61
|
+
[Platform.OpenAICodex]: {
|
|
62
|
+
// Codex reads from ~/.codex/skills/ but we install to unified path and symlink
|
|
63
|
+
skills: UNIFIED_SKILLS_PATH,
|
|
64
|
+
commands: null, // Not supported - Codex has built-in commands only
|
|
65
|
+
agents: null, // Not supported - Codex is single-agent
|
|
66
|
+
config: null, // No config file integration
|
|
67
|
+
},
|
|
68
|
+
};
|
|
42
69
|
|
|
43
|
-
export type PlatformPaths = typeof PLATFORM_PATHS[Platform];
|
|
70
|
+
export type PlatformPaths = (typeof PLATFORM_PATHS)[Platform];
|
|
44
71
|
|
|
45
72
|
/**
|
|
46
73
|
* Get all paths for a platform
|
|
@@ -58,25 +85,42 @@ export function getSkillsPath(platform: Platform): string {
|
|
|
58
85
|
|
|
59
86
|
/**
|
|
60
87
|
* Get commands install path for a platform
|
|
88
|
+
* Returns null for platforms that don't support custom commands (e.g., OpenAI Codex)
|
|
61
89
|
*/
|
|
62
|
-
export function getCommandsPath(platform: Platform): string {
|
|
90
|
+
export function getCommandsPath(platform: Platform): string | null {
|
|
63
91
|
return PLATFORM_PATHS[platform].commands;
|
|
64
92
|
}
|
|
65
93
|
|
|
66
94
|
/**
|
|
67
95
|
* Get agents install path for a platform
|
|
96
|
+
* Returns null for platforms that don't support custom agents (e.g., OpenAI Codex)
|
|
68
97
|
*/
|
|
69
|
-
export function getAgentsPath(platform: Platform): string {
|
|
98
|
+
export function getAgentsPath(platform: Platform): string | null {
|
|
70
99
|
return PLATFORM_PATHS[platform].agents;
|
|
71
100
|
}
|
|
72
101
|
|
|
73
102
|
/**
|
|
74
103
|
* Get platform config file path (CLAUDE.md or AGENTS.md)
|
|
104
|
+
* Returns null for platforms without config file integration (e.g., OpenAI Codex)
|
|
75
105
|
*/
|
|
76
|
-
export function getConfigPath(platform: Platform): string {
|
|
106
|
+
export function getConfigPath(platform: Platform): string | null {
|
|
77
107
|
return PLATFORM_PATHS[platform].config;
|
|
78
108
|
}
|
|
79
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Check if a platform supports custom commands
|
|
112
|
+
*/
|
|
113
|
+
export function platformSupportsCommands(platform: Platform): boolean {
|
|
114
|
+
return PLATFORM_PATHS[platform].commands !== null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Check if a platform supports custom agents
|
|
119
|
+
*/
|
|
120
|
+
export function platformSupportsAgents(platform: Platform): boolean {
|
|
121
|
+
return PLATFORM_PATHS[platform].agents !== null;
|
|
122
|
+
}
|
|
123
|
+
|
|
80
124
|
/**
|
|
81
125
|
* Detect ALL installed platforms
|
|
82
126
|
* Returns array of all platforms that are installed on the system
|
|
@@ -106,6 +150,12 @@ export function detectAllPlatforms(): Platform[] {
|
|
|
106
150
|
// OpenCode not found
|
|
107
151
|
}
|
|
108
152
|
|
|
153
|
+
// OpenAI Codex: check if .codex directory exists
|
|
154
|
+
const codexDir = join(homedir(), '.codex');
|
|
155
|
+
if (existsSync(codexDir)) {
|
|
156
|
+
detected.push(Platform.OpenAICodex);
|
|
157
|
+
}
|
|
158
|
+
|
|
109
159
|
return detected;
|
|
110
160
|
}
|
|
111
161
|
|
|
@@ -117,3 +167,74 @@ export function getActivePlatforms(config: DroidConfig): Platform[] {
|
|
|
117
167
|
const ignored = config.ignored_platforms ?? [];
|
|
118
168
|
return detected.filter(p => !ignored.includes(p));
|
|
119
169
|
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Sync installed tools to newly detected platforms.
|
|
173
|
+
* Called early in common commands to handle platforms added after initial setup.
|
|
174
|
+
*
|
|
175
|
+
* Returns array of newly synced platforms (empty if none).
|
|
176
|
+
*/
|
|
177
|
+
export function syncNewPlatforms(config: DroidConfig): Platform[] {
|
|
178
|
+
const detected = detectAllPlatforms();
|
|
179
|
+
const ignored = config.ignored_platforms ?? [];
|
|
180
|
+
const active = detected.filter(p => !ignored.includes(p));
|
|
181
|
+
|
|
182
|
+
// Platforms already in config (have been initialized)
|
|
183
|
+
const initializedPlatforms = Object.keys(config.platforms ?? {}) as Platform[];
|
|
184
|
+
|
|
185
|
+
// Find newly detected platforms that aren't in config yet
|
|
186
|
+
const newPlatforms = active.filter(p => !initializedPlatforms.includes(p));
|
|
187
|
+
|
|
188
|
+
if (newPlatforms.length === 0) {
|
|
189
|
+
return [];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Get installed skills from primary platform (claude-code)
|
|
193
|
+
const primaryTools = config.platforms?.['claude-code']?.tools ?? {};
|
|
194
|
+
|
|
195
|
+
// Initialize each new platform
|
|
196
|
+
for (const platform of newPlatforms) {
|
|
197
|
+
initializePlatformTools(platform, primaryTools, config);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return newPlatforms;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Initialize a newly detected platform with installed tools.
|
|
205
|
+
*
|
|
206
|
+
* For Codex: creates symlinks for tracked skills only (commands/agents not supported)
|
|
207
|
+
* For other platforms: would install commands/agents (not yet implemented)
|
|
208
|
+
*/
|
|
209
|
+
function initializePlatformTools(
|
|
210
|
+
platform: Platform,
|
|
211
|
+
primaryTools: Record<string, { version: string; installed_at: string; bundled_agents?: string[] }>,
|
|
212
|
+
config: DroidConfig,
|
|
213
|
+
): void {
|
|
214
|
+
if (platform === Platform.OpenAICodex) {
|
|
215
|
+
// Codex: create symlinks only for skills tracked in config (not all skills in directory)
|
|
216
|
+
// This avoids syncing personal skills that weren't installed via droid
|
|
217
|
+
for (const skillName of Object.keys(primaryTools)) {
|
|
218
|
+
createCodexSymlink(skillName);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Initialize platform section in config (mirrors primary platform's tools)
|
|
222
|
+
if (!config.platforms) {
|
|
223
|
+
config.platforms = {};
|
|
224
|
+
}
|
|
225
|
+
config.platforms[platform] = {
|
|
226
|
+
tools: { ...primaryTools },
|
|
227
|
+
};
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// For other platforms (Cursor, OpenCode): would need to install commands/agents
|
|
232
|
+
// This is a future enhancement - for now, just mark as initialized
|
|
233
|
+
if (!config.platforms) {
|
|
234
|
+
config.platforms = {};
|
|
235
|
+
}
|
|
236
|
+
config.platforms[platform] = {
|
|
237
|
+
tools: { ...primaryTools },
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Secret/token helpers - reads from environment variables only
|
|
3
|
+
* Users manage their own tokens in shell config (e.g., ~/.zshrc)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export function getSlackToken(): string | undefined {
|
|
7
|
+
return process.env.SLACK_USER_TOKEN;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function hasSlackToken(): boolean {
|
|
11
|
+
return !!process.env.SLACK_USER_TOKEN;
|
|
12
|
+
}
|
package/src/lib/skills.ts
CHANGED
|
@@ -29,6 +29,8 @@ import {
|
|
|
29
29
|
getCommandsPath,
|
|
30
30
|
getConfigPath,
|
|
31
31
|
getActivePlatforms,
|
|
32
|
+
createCodexSymlink,
|
|
33
|
+
removeCodexSymlink,
|
|
32
34
|
} from './platforms';
|
|
33
35
|
import { loadToolManifest, isToolInstalled } from './tools';
|
|
34
36
|
import { runToolMigrations } from './migrations';
|
|
@@ -56,15 +58,17 @@ export function getSkillsInstallPath(platform: Platform): string {
|
|
|
56
58
|
|
|
57
59
|
/**
|
|
58
60
|
* Get the commands installation path based on platform
|
|
61
|
+
* Returns null for platforms that don't support commands (e.g., OpenAI Codex)
|
|
59
62
|
*/
|
|
60
|
-
export function getCommandsInstallPath(platform: Platform): string {
|
|
63
|
+
export function getCommandsInstallPath(platform: Platform): string | null {
|
|
61
64
|
return getCommandsPath(platform);
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
68
|
* Get the path to the platform's main config markdown file
|
|
69
|
+
* Returns null for platforms without config file integration (e.g., OpenAI Codex)
|
|
66
70
|
*/
|
|
67
|
-
export function getPlatformConfigPath(platform: Platform): string {
|
|
71
|
+
export function getPlatformConfigPath(platform: Platform): string | null {
|
|
68
72
|
return getConfigPath(platform);
|
|
69
73
|
}
|
|
70
74
|
|
|
@@ -77,6 +81,11 @@ export function updatePlatformConfigSkills(
|
|
|
77
81
|
): void {
|
|
78
82
|
const configPath = getPlatformConfigPath(platform);
|
|
79
83
|
|
|
84
|
+
// Skip platforms without config file integration (e.g., OpenAI Codex)
|
|
85
|
+
if (!configPath) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
80
89
|
let content = '';
|
|
81
90
|
if (existsSync(configPath)) {
|
|
82
91
|
content = readFileSync(configPath, 'utf-8');
|
|
@@ -472,7 +481,7 @@ export function installSkill(skillName: string): {
|
|
|
472
481
|
|
|
473
482
|
const skillsPath = getSkillsInstallPath(config.platform);
|
|
474
483
|
const targetSkillDir = join(skillsPath, skillName);
|
|
475
|
-
const commandsPath = getCommandsInstallPath(config.platform);
|
|
484
|
+
const commandsPath = getCommandsInstallPath(config.platform); // null for platforms without commands
|
|
476
485
|
const tools = getPlatformTools(config);
|
|
477
486
|
|
|
478
487
|
// Clean up old droid- prefixed directories from v0.18.x (Claude Code bug workaround)
|
|
@@ -527,7 +536,8 @@ export function installSkill(skillName: string): {
|
|
|
527
536
|
const toolName = basename(toolDir);
|
|
528
537
|
|
|
529
538
|
// Check command file collisions (these could conflict with other skills)
|
|
530
|
-
|
|
539
|
+
// Skip for platforms that don't support commands (e.g., OpenAI Codex)
|
|
540
|
+
if (commandsPath && existsSync(commandsSource)) {
|
|
531
541
|
const commandFiles = readdirSync(commandsSource).filter(
|
|
532
542
|
(f) => f.endsWith('.md') && f.toLowerCase() !== 'readme.md',
|
|
533
543
|
);
|
|
@@ -608,8 +618,14 @@ export function installSkill(skillName: string): {
|
|
|
608
618
|
? activePlatforms
|
|
609
619
|
: [config.platform]; // Fallback to primary platform
|
|
610
620
|
|
|
621
|
+
// Create Codex symlink if Codex is an active platform
|
|
622
|
+
// Codex reads from ~/.codex/skills/ but skills are installed to ~/.claude/skills/
|
|
623
|
+
if (targetPlatforms.includes(Platform.OpenAICodex)) {
|
|
624
|
+
createCodexSymlink(skillName);
|
|
625
|
+
}
|
|
626
|
+
|
|
611
627
|
// Copy commands if present (from tool level)
|
|
612
|
-
// Install to EACH active platform
|
|
628
|
+
// Install to EACH active platform that supports commands
|
|
613
629
|
if (existsSync(commandsSource)) {
|
|
614
630
|
const commandFiles = readdirSync(commandsSource).filter(
|
|
615
631
|
(f) => f.endsWith('.md') && f.toLowerCase() !== 'readme.md',
|
|
@@ -617,6 +633,10 @@ export function installSkill(skillName: string): {
|
|
|
617
633
|
|
|
618
634
|
for (const platform of targetPlatforms) {
|
|
619
635
|
const platformCommandsPath = getCommandsInstallPath(platform);
|
|
636
|
+
// Skip platforms that don't support commands (e.g., OpenAI Codex)
|
|
637
|
+
if (!platformCommandsPath) {
|
|
638
|
+
continue;
|
|
639
|
+
}
|
|
620
640
|
if (!existsSync(platformCommandsPath)) {
|
|
621
641
|
mkdirSync(platformCommandsPath, { recursive: true });
|
|
622
642
|
}
|
|
@@ -725,6 +745,9 @@ export function uninstallSkill(skillName: string): {
|
|
|
725
745
|
? activePlatforms
|
|
726
746
|
: [config.platform]; // Fallback to primary platform
|
|
727
747
|
|
|
748
|
+
// Remove Codex symlink if it exists (before removing the actual skill)
|
|
749
|
+
removeCodexSymlink(skillName);
|
|
750
|
+
|
|
728
751
|
// Remove skill files from unified location
|
|
729
752
|
const skillsPath = getSkillsInstallPath(config.platform);
|
|
730
753
|
const skillDir = join(skillsPath, skillName);
|
|
@@ -732,7 +755,7 @@ export function uninstallSkill(skillName: string): {
|
|
|
732
755
|
rmSync(skillDir, { recursive: true });
|
|
733
756
|
}
|
|
734
757
|
|
|
735
|
-
// Remove command files from EACH active platform
|
|
758
|
+
// Remove command files from EACH active platform that supports commands
|
|
736
759
|
const skillPath = findSkillPath(skillName);
|
|
737
760
|
const commandsSource = skillPath ? join(skillPath.toolDir, 'commands') : null;
|
|
738
761
|
if (commandsSource && existsSync(commandsSource)) {
|
|
@@ -742,6 +765,10 @@ export function uninstallSkill(skillName: string): {
|
|
|
742
765
|
|
|
743
766
|
for (const platform of targetPlatforms) {
|
|
744
767
|
const platformCommandsPath = getCommandsInstallPath(platform);
|
|
768
|
+
// Skip platforms that don't support commands (e.g., OpenAI Codex)
|
|
769
|
+
if (!platformCommandsPath) {
|
|
770
|
+
continue;
|
|
771
|
+
}
|
|
745
772
|
for (const file of commandFiles) {
|
|
746
773
|
const commandPath = join(platformCommandsPath, file);
|
|
747
774
|
if (existsSync(commandPath)) {
|
|
@@ -829,6 +856,11 @@ export function isCommandInstalled(
|
|
|
829
856
|
const config = loadConfig();
|
|
830
857
|
const commandsPath = getCommandsInstallPath(config.platform);
|
|
831
858
|
|
|
859
|
+
// Platform doesn't support commands (e.g., OpenAI Codex)
|
|
860
|
+
if (!commandsPath) {
|
|
861
|
+
return false;
|
|
862
|
+
}
|
|
863
|
+
|
|
832
864
|
// Command filename is derived from the command name after the skill prefix
|
|
833
865
|
// e.g., "comments check" from skill "comments" → "check.md"
|
|
834
866
|
const cmdPart = commandName.startsWith(skillName + ' ')
|
|
@@ -884,6 +916,13 @@ export function installCommand(
|
|
|
884
916
|
|
|
885
917
|
// Ensure commands directory exists
|
|
886
918
|
const commandsPath = getCommandsInstallPath(config.platform);
|
|
919
|
+
// Platform doesn't support commands (e.g., OpenAI Codex)
|
|
920
|
+
if (!commandsPath) {
|
|
921
|
+
return {
|
|
922
|
+
success: false,
|
|
923
|
+
message: `Platform ${config.platform} does not support custom commands`,
|
|
924
|
+
};
|
|
925
|
+
}
|
|
887
926
|
if (!existsSync(commandsPath)) {
|
|
888
927
|
mkdirSync(commandsPath, { recursive: true });
|
|
889
928
|
}
|
|
@@ -919,6 +958,14 @@ export function uninstallCommand(
|
|
|
919
958
|
|
|
920
959
|
const commandsPath = getCommandsInstallPath(config.platform);
|
|
921
960
|
|
|
961
|
+
// Platform doesn't support commands (e.g., OpenAI Codex)
|
|
962
|
+
if (!commandsPath) {
|
|
963
|
+
return {
|
|
964
|
+
success: false,
|
|
965
|
+
message: `Platform ${config.platform} does not support custom commands`,
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
|
|
922
969
|
// Find the installed command file
|
|
923
970
|
const cmdPart = commandName.startsWith(skillName + ' ')
|
|
924
971
|
? commandName.slice(skillName.length + 1)
|
package/src/lib/types.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-brain",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Your scratchpad (or brain) - a collaborative space for planning and research. Create docs with /brain plan, /brain research, or /brain review. Use @mentions for async discussion. Docs persist across sessions.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -12,5 +12,12 @@
|
|
|
12
12
|
"droid",
|
|
13
13
|
"ai",
|
|
14
14
|
"brain"
|
|
15
|
+
],
|
|
16
|
+
"skills": [
|
|
17
|
+
"./skills/brain/SKILL.md",
|
|
18
|
+
"./skills/brain-obsidian/SKILL.md"
|
|
19
|
+
],
|
|
20
|
+
"commands": [
|
|
21
|
+
"./commands/brain.md"
|
|
15
22
|
]
|
|
16
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: brain
|
|
2
2
|
description: "Your scratchpad (or brain) - a collaborative space for planning and research. Create docs with /brain plan, /brain research, or /brain review. Use @mentions for async discussion. Docs persist across sessions."
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.4.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -32,6 +32,7 @@ Your **scratchpad** (or **brain**) - a collaborative space for planning, researc
|
|
|
32
32
|
| -------------- | ------- | ------------------------------------------ |
|
|
33
33
|
| `brain_dir` | (none) | Where docs are stored - **must be configured** |
|
|
34
34
|
| `inbox_folder` | (empty) | Root folder for new docs (e.g., `0-Inbox`) |
|
|
35
|
+
| `override` | (none) | User-defined behaviour overrides |
|
|
35
36
|
|
|
36
37
|
**If not configured:** Ask the user:
|
|
37
38
|
> "Where would you like to store brain docs? Common choices:
|
|
@@ -39,11 +40,13 @@ Your **scratchpad** (or **brain**) - a collaborative space for planning, researc
|
|
|
39
40
|
> - `~/src/github.com/brain` - With your other repos
|
|
40
41
|
> - An existing Obsidian vault path"
|
|
41
42
|
|
|
42
|
-
Then
|
|
43
|
-
```
|
|
44
|
-
brain_dir
|
|
43
|
+
Then set their choice:
|
|
44
|
+
```bash
|
|
45
|
+
droid config --set tools.brain.brain_dir="{user's choice}"
|
|
45
46
|
```
|
|
46
47
|
|
|
48
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides for how to create, register, and use overrides.
|
|
49
|
+
|
|
47
50
|
## Commands
|
|
48
51
|
|
|
49
52
|
**Reserved keywords:** `search`, `add`, `check`, `cleanup`, `done`
|
|
@@ -14,7 +14,11 @@ Detailed procedures for each brain operation.
|
|
|
14
14
|
- If `brain_dir` is not configured, **ask the user** where they want brain docs stored
|
|
15
15
|
- **Do NOT skip this step or assume defaults**
|
|
16
16
|
|
|
17
|
-
2. **
|
|
17
|
+
2. **Check for override** (see `/droid` skill § Override Lookup)
|
|
18
|
+
- If override applies for `search` command, follow override instructions instead of step 3
|
|
19
|
+
- Fall back to step 3 if override fails
|
|
20
|
+
|
|
21
|
+
3. **Search for matches** (default behaviour)
|
|
18
22
|
|
|
19
23
|
```
|
|
20
24
|
Glob: {brain_dir}/**/*{topic}*.md
|
|
@@ -22,20 +26,20 @@ Detailed procedures for each brain operation.
|
|
|
22
26
|
|
|
23
27
|
Fuzzy match the topic against doc filenames
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
4. **Handle results:**
|
|
26
30
|
- **No matches**: Offer to create a new doc with that topic
|
|
27
31
|
- **One match**: Open it
|
|
28
32
|
- **Multiple matches**: Present list, let user choose
|
|
29
33
|
|
|
30
|
-
|
|
34
|
+
5. **Read the doc** and summarize key points:
|
|
31
35
|
- Current status
|
|
32
36
|
- Main topic/context
|
|
33
37
|
- Any open `@droid` comments
|
|
34
38
|
- Recent updates
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
6. **Set as active doc** - Remember path for subsequent `/brain add` and `/brain check` commands
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
7. **If `-- {instruction}` provided:** Execute the follow-up instruction against the loaded doc
|
|
39
43
|
|
|
40
44
|
## Creating
|
|
41
45
|
|
|
@@ -33,6 +33,8 @@ droid config --set tools.brain.brain_dir=~/path/to/your/vault
|
|
|
33
33
|
| `areas_folder` | `1-Areas` | Area docs (PARA only) |
|
|
34
34
|
| `resources_folder` | `3-Resources` | Reference material (PARA only) |
|
|
35
35
|
|
|
36
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
37
|
+
|
|
36
38
|
## What This Adds
|
|
37
39
|
|
|
38
40
|
| Feature | Description |
|
|
@@ -52,6 +52,9 @@ plan → AI scaffolds → human implements → AI coaches → iterate → ship
|
|
|
52
52
|
| Setting | Default | Description |
|
|
53
53
|
| -------------------- | -------- | ------------------------------------------------------- |
|
|
54
54
|
| `scaffold_verbosity` | `medium` | How detailed hints are: `minimal`, `medium`, `detailed` |
|
|
55
|
+
| `override` | (none) | User-defined behaviour overrides |
|
|
56
|
+
|
|
57
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
55
58
|
|
|
56
59
|
<!-- Note: @mention is the target, not author. @{user} = AI talking TO user, @droid = user talking TO AI -->
|
|
57
60
|
> @{user} Not yet - droid currently shows config as free text input. But we could add an `enum` type to the config schema that presents as a select dropdown in the TUI. Good feature request - want me to create an issue for it?
|
|
@@ -12,5 +12,17 @@
|
|
|
12
12
|
"droid",
|
|
13
13
|
"ai",
|
|
14
14
|
"code-review"
|
|
15
|
+
],
|
|
16
|
+
"skills": [
|
|
17
|
+
"./skills/code-review/SKILL.md"
|
|
18
|
+
],
|
|
19
|
+
"commands": [
|
|
20
|
+
"./commands/code-review.md"
|
|
21
|
+
],
|
|
22
|
+
"agents": [
|
|
23
|
+
"./agents/edi-standards-reviewer.md",
|
|
24
|
+
"./agents/error-handling-reviewer.md",
|
|
25
|
+
"./agents/test-coverage-analyzer.md",
|
|
26
|
+
"./agents/type-reviewer.md"
|
|
15
27
|
]
|
|
16
28
|
}
|
|
@@ -16,6 +16,8 @@ Code-review has no configuration of its own. Optional integration with other too
|
|
|
16
16
|
- **Brain skill** (optional): If installed, offers to save review results to a `/brain review` doc
|
|
17
17
|
- Check with: `droid config --get tools.brain` to see if `brain_dir` is configured
|
|
18
18
|
|
|
19
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
20
|
+
|
|
19
21
|
## How It Works
|
|
20
22
|
|
|
21
23
|
The `/code-review` command orchestrates multiple specialized agents in parallel:
|
|
@@ -82,6 +82,9 @@ If prerequisites fail, guide user to fix:
|
|
|
82
82
|
|---------|---------|-------------|
|
|
83
83
|
| codex_repo | ~/src/github.com/orderful-codex | Path to local codex repo |
|
|
84
84
|
| freshness_days | 30 | Days before staleness warning |
|
|
85
|
+
| override | (none) | User-defined behaviour overrides |
|
|
86
|
+
|
|
87
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
85
88
|
|
|
86
89
|
## Commands
|
|
87
90
|
|
|
@@ -122,8 +122,13 @@ ai_mentions: "@claude"
|
|
|
122
122
|
|
|
123
123
|
# Keep comments after addressing them (default: true)
|
|
124
124
|
preserve_comments: true
|
|
125
|
+
|
|
126
|
+
# User-defined behaviour overrides (see /droid skill)
|
|
127
|
+
override: ...
|
|
125
128
|
```
|
|
126
129
|
|
|
130
|
+
**Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
|
|
131
|
+
|
|
127
132
|
## File Type Support
|
|
128
133
|
|
|
129
134
|
Works in any text file. Respects `.gitignore` and skips common build directories (node_modules, dist, .git, etc.).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
@@ -11,5 +11,12 @@
|
|
|
11
11
|
"keywords": [
|
|
12
12
|
"droid",
|
|
13
13
|
"ai"
|
|
14
|
+
],
|
|
15
|
+
"skills": [
|
|
16
|
+
"./skills/droid/SKILL.md",
|
|
17
|
+
"./skills/droid-bootstrap/SKILL.md"
|
|
18
|
+
],
|
|
19
|
+
"commands": [
|
|
20
|
+
"./commands/setup.md"
|
|
14
21
|
]
|
|
15
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: droid
|
|
2
2
|
description: "Core droid meta-skill for update awareness, tool discovery, and usage help. Checks for updates, helps users find tools, and answers 'how do I...' questions about droid workflows."
|
|
3
|
-
version: 0.
|
|
3
|
+
version: 0.7.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
# System tool - always stays current regardless of auto-update settings
|
|
@@ -12,7 +12,9 @@ includes:
|
|
|
12
12
|
required: true
|
|
13
13
|
- name: droid-bootstrap
|
|
14
14
|
required: true
|
|
15
|
-
commands:
|
|
15
|
+
commands:
|
|
16
|
+
- name: setup
|
|
17
|
+
is_alias: false
|
|
16
18
|
agents: []
|
|
17
19
|
|
|
18
20
|
dependencies: []
|