@orderful/droid 0.28.0 → 0.29.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 +2 -2
- package/.github/workflows/claude-code-review.yml +23 -22
- package/CHANGELOG.md +24 -0
- package/dist/bin/droid.js +62 -12
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/lib/migrations.d.ts.map +1 -1
- package/dist/lib/skills.d.ts.map +1 -1
- package/dist/tools/droid/.claude-plugin/plugin.json +2 -2
- package/dist/tools/droid/TOOL.yaml +4 -2
- package/dist/tools/droid/skills/droid/SKILL.md +213 -2
- package/dist/tools/droid/skills/droid-bootstrap/SKILL.md +44 -0
- package/package.json +1 -1
- package/src/commands/update.ts +24 -7
- package/src/lib/migrations.ts +4 -7
- package/src/lib/skills.test.ts +65 -0
- package/src/lib/skills.ts +21 -1
- package/src/tools/droid/.claude-plugin/plugin.json +2 -2
- package/src/tools/droid/TOOL.yaml +4 -2
- package/src/tools/droid/skills/droid/SKILL.md +213 -2
- package/src/tools/droid/skills/droid-bootstrap/SKILL.md +44 -0
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"plugins": [
|
|
9
9
|
{
|
|
10
10
|
"name": "droid",
|
|
11
|
-
"description": "Core droid meta-skill for update awareness and
|
|
12
|
-
"version": "0.
|
|
11
|
+
"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.",
|
|
12
|
+
"version": "0.5.0",
|
|
13
13
|
"source": {
|
|
14
14
|
"source": "github",
|
|
15
15
|
"repo": "orderful/droid",
|
|
@@ -1,23 +1,17 @@
|
|
|
1
1
|
name: Claude Code Review
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
types: [opened, ready_for_review]
|
|
7
|
-
# Optional: Only run on specific file changes
|
|
8
|
-
# paths:
|
|
9
|
-
# - "src/**/*.ts"
|
|
10
|
-
# - "src/**/*.tsx"
|
|
11
|
-
# - "src/**/*.js"
|
|
12
|
-
# - "src/**/*.jsx"
|
|
4
|
+
issue_comment:
|
|
5
|
+
types: [created]
|
|
13
6
|
|
|
14
7
|
jobs:
|
|
15
8
|
claude-review:
|
|
16
|
-
#
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
# Only run on PR comments that mention claude and review, but not from bots
|
|
10
|
+
if: |
|
|
11
|
+
github.event.issue.pull_request &&
|
|
12
|
+
github.event.comment.user.type != 'Bot' &&
|
|
13
|
+
contains(github.event.comment.body, 'claude') &&
|
|
14
|
+
contains(github.event.comment.body, 'review')
|
|
21
15
|
|
|
22
16
|
runs-on: ubuntu-latest
|
|
23
17
|
permissions:
|
|
@@ -39,16 +33,23 @@ jobs:
|
|
|
39
33
|
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
40
34
|
prompt: |
|
|
41
35
|
REPO: ${{ github.repository }}
|
|
42
|
-
PR NUMBER: ${{ github.event.
|
|
36
|
+
PR NUMBER: ${{ github.event.issue.number }}
|
|
43
37
|
|
|
44
|
-
Please review this pull request and
|
|
45
|
-
- Code quality and best practices
|
|
46
|
-
- Potential bugs or issues
|
|
47
|
-
- Performance considerations
|
|
48
|
-
- Security concerns
|
|
49
|
-
- Test coverage
|
|
38
|
+
Please review this pull request and identify **HIGH SEVERITY ISSUES ONLY**.
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
Focus on:
|
|
41
|
+
- Critical bugs that could cause crashes, data loss, or incorrect behaviour
|
|
42
|
+
- Security vulnerabilities (injection attacks, authentication/authorisation flaws, secrets exposure)
|
|
43
|
+
- Performance issues that could significantly impact production (N+1 queries, memory leaks, infinite loops)
|
|
44
|
+
- Breaking changes or backwards compatibility issues
|
|
45
|
+
|
|
46
|
+
**Do not report:**
|
|
47
|
+
- Style/formatting issues
|
|
48
|
+
- Minor refactoring opportunities
|
|
49
|
+
- Low-impact suggestions
|
|
50
|
+
- Trivial improvements
|
|
51
|
+
|
|
52
|
+
Use the repository's CLAUDE.md for guidance on conventions. Be direct and focus only on the most critical issues.
|
|
52
53
|
|
|
53
54
|
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
|
|
54
55
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @orderful/droid
|
|
2
2
|
|
|
3
|
+
## 0.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#170](https://github.com/Orderful/droid/pull/170) [`8e2b62f`](https://github.com/Orderful/droid/commit/8e2b62f773aeca43dc1dac511dfff1587b2b29c8) Thanks [@frytyler](https://github.com/frytyler)! - Add usage guides and automatic update notifications to droid
|
|
8
|
+
|
|
9
|
+
**Usage guides:** The droid skill now answers common workflow questions like:
|
|
10
|
+
- "How do I add context to my thread?"
|
|
11
|
+
- "Remind me the tools you have"
|
|
12
|
+
- "How do I find something in the codex?"
|
|
13
|
+
- "What's the best way to start a session?"
|
|
14
|
+
|
|
15
|
+
Includes guides for: starting sessions right, loading project context, searching codex, planning before implementing, using comments for async work, coach mode, and code review.
|
|
16
|
+
|
|
17
|
+
**Update notifications:** New `droid-bootstrap` skill with `alwaysApply: true` checks for droid updates once per session and shows a notification if a newer version is available. Lightweight (~20 lines) to minimize context overhead.
|
|
18
|
+
|
|
19
|
+
## 0.28.1
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [#163](https://github.com/Orderful/droid/pull/163) [`8bc0e51`](https://github.com/Orderful/droid/commit/8bc0e5104c735a970d6f64e09a58c467ba41e569) Thanks [@frytyler](https://github.com/frytyler)! - Fix agent cleanup during tool uninstall and retry command cleanup migration.
|
|
24
|
+
- **Agent cleanup**: Previously, agents were only removed if tracked in config's bundled_agents field. Now uninstall also checks the tool's bundled agents directory directly, ensuring cleanup even if config tracking failed or is missing.
|
|
25
|
+
- **Command cleanup**: Retry migration to remove non-alias commands from ~/.claude/commands/ (original 0.28.0 migration did not execute properly for some users)
|
|
26
|
+
|
|
3
27
|
## 0.28.0
|
|
4
28
|
|
|
5
29
|
### Minor Changes
|
package/dist/bin/droid.js
CHANGED
|
@@ -698,10 +698,6 @@ function createClaudeCodeCommandCleanupMigration(version2) {
|
|
|
698
698
|
version: version2,
|
|
699
699
|
description: "Remove non-alias commands from Claude Code",
|
|
700
700
|
up: () => {
|
|
701
|
-
const config = loadConfig();
|
|
702
|
-
if (config.platform !== "claude-code" /* ClaudeCode */) {
|
|
703
|
-
return;
|
|
704
|
-
}
|
|
705
701
|
const commandsPath = getCommandsPath("claude-code" /* ClaudeCode */);
|
|
706
702
|
if (!existsSync4(commandsPath)) {
|
|
707
703
|
return;
|
|
@@ -736,7 +732,9 @@ var PACKAGE_MIGRATIONS = [
|
|
|
736
732
|
createPlatformSyncMigration("0.25.0"),
|
|
737
733
|
createConfigSkillNameMigration("0.27.2"),
|
|
738
734
|
createOpenCodeSkillsPathMigration("0.28.0"),
|
|
739
|
-
createClaudeCodeCommandCleanupMigration("0.28.0")
|
|
735
|
+
createClaudeCodeCommandCleanupMigration("0.28.0"),
|
|
736
|
+
// Retry: 0.28.0 migration had platform check that prevented running after platform switch
|
|
737
|
+
createClaudeCodeCommandCleanupMigration("0.28.1")
|
|
740
738
|
];
|
|
741
739
|
var TOOL_MIGRATIONS = {
|
|
742
740
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
@@ -1026,6 +1024,36 @@ function updateSkill(skillName) {
|
|
|
1026
1024
|
}
|
|
1027
1025
|
return result;
|
|
1028
1026
|
}
|
|
1027
|
+
function updateAllSkills() {
|
|
1028
|
+
const config = loadConfig();
|
|
1029
|
+
const tools = getPlatformTools(config);
|
|
1030
|
+
const result = {
|
|
1031
|
+
updated: [],
|
|
1032
|
+
failed: [],
|
|
1033
|
+
upToDate: 0
|
|
1034
|
+
};
|
|
1035
|
+
for (const skillName of Object.keys(tools)) {
|
|
1036
|
+
const status = getSkillUpdateStatus(skillName);
|
|
1037
|
+
if (!status.hasUpdate) {
|
|
1038
|
+
result.upToDate++;
|
|
1039
|
+
continue;
|
|
1040
|
+
}
|
|
1041
|
+
const updateResult = updateSkill(skillName);
|
|
1042
|
+
if (updateResult.success) {
|
|
1043
|
+
result.updated.push({
|
|
1044
|
+
name: skillName,
|
|
1045
|
+
from: status.installedVersion,
|
|
1046
|
+
to: status.bundledVersion
|
|
1047
|
+
});
|
|
1048
|
+
} else {
|
|
1049
|
+
result.failed.push({
|
|
1050
|
+
name: skillName,
|
|
1051
|
+
error: updateResult.message
|
|
1052
|
+
});
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
return result;
|
|
1056
|
+
}
|
|
1029
1057
|
function installSkill(skillName) {
|
|
1030
1058
|
const config = loadConfig();
|
|
1031
1059
|
const skillPath = findSkillPath(skillName);
|
|
@@ -1251,11 +1279,22 @@ function uninstallSkill(skillName) {
|
|
|
1251
1279
|
}
|
|
1252
1280
|
}
|
|
1253
1281
|
const installedSkillInfo = tools[skillName];
|
|
1282
|
+
const agentsToRemove = /* @__PURE__ */ new Set();
|
|
1254
1283
|
if (installedSkillInfo?.bundled_agents) {
|
|
1255
1284
|
for (const agentName of installedSkillInfo.bundled_agents) {
|
|
1256
|
-
|
|
1285
|
+
agentsToRemove.add(agentName);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
const agentsSource = skillPath ? join7(skillPath.toolDir, "agents") : null;
|
|
1289
|
+
if (agentsSource && existsSync5(agentsSource)) {
|
|
1290
|
+
const agentFiles = readdirSync4(agentsSource, { withFileTypes: true }).filter((dirent) => dirent.isFile() && dirent.name.endsWith(".md")).map((dirent) => dirent.name.replace(".md", ""));
|
|
1291
|
+
for (const agentName of agentFiles) {
|
|
1292
|
+
agentsToRemove.add(agentName);
|
|
1257
1293
|
}
|
|
1258
1294
|
}
|
|
1295
|
+
for (const agentName of agentsToRemove) {
|
|
1296
|
+
uninstallAgent(agentName);
|
|
1297
|
+
}
|
|
1259
1298
|
const { [skillName]: removed, ...remainingTools } = tools;
|
|
1260
1299
|
setPlatformTools(config, remainingTools);
|
|
1261
1300
|
saveConfig(config);
|
|
@@ -1824,12 +1863,23 @@ async function updateCommand(tool, options) {
|
|
|
1824
1863
|
return;
|
|
1825
1864
|
}
|
|
1826
1865
|
if (options?.tools) {
|
|
1827
|
-
console.log(chalk8.
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
)
|
|
1832
|
-
|
|
1866
|
+
console.log(chalk8.bold("\n\u{1F916} Syncing tools...\n"));
|
|
1867
|
+
const result = updateAllSkills();
|
|
1868
|
+
if (result.updated.length > 0) {
|
|
1869
|
+
console.log(chalk8.green("\u2713 Updated:"));
|
|
1870
|
+
for (const skill of result.updated) {
|
|
1871
|
+
console.log(chalk8.gray(` ${skill.name}: ${skill.from} \u2192 ${skill.to}`));
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
if (result.failed.length > 0) {
|
|
1875
|
+
console.log(chalk8.red("\n\u2717 Failed:"));
|
|
1876
|
+
for (const skill of result.failed) {
|
|
1877
|
+
console.log(chalk8.gray(` ${skill.name}: ${skill.error}`));
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
if (result.updated.length === 0 && result.failed.length === 0) {
|
|
1881
|
+
console.log(chalk8.green("\u2713 All tools up to date"));
|
|
1882
|
+
}
|
|
1833
1883
|
return;
|
|
1834
1884
|
}
|
|
1835
1885
|
console.log(chalk8.bold("\n\u{1F916} Updating Droid...\n"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAKA,UAAU,aAAa;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,wBAAsB,aAAa,CACjC,IAAI,CAAC,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Ef"}
|
package/dist/index.js
CHANGED
|
@@ -671,10 +671,6 @@ function createClaudeCodeCommandCleanupMigration(version) {
|
|
|
671
671
|
version,
|
|
672
672
|
description: "Remove non-alias commands from Claude Code",
|
|
673
673
|
up: () => {
|
|
674
|
-
const config = loadConfig();
|
|
675
|
-
if (config.platform !== "claude-code" /* ClaudeCode */) {
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
674
|
const commandsPath = getCommandsPath("claude-code" /* ClaudeCode */);
|
|
679
675
|
if (!existsSync4(commandsPath)) {
|
|
680
676
|
return;
|
|
@@ -709,7 +705,9 @@ var PACKAGE_MIGRATIONS = [
|
|
|
709
705
|
createPlatformSyncMigration("0.25.0"),
|
|
710
706
|
createConfigSkillNameMigration("0.27.2"),
|
|
711
707
|
createOpenCodeSkillsPathMigration("0.28.0"),
|
|
712
|
-
createClaudeCodeCommandCleanupMigration("0.28.0")
|
|
708
|
+
createClaudeCodeCommandCleanupMigration("0.28.0"),
|
|
709
|
+
// Retry: 0.28.0 migration had platform check that prevented running after platform switch
|
|
710
|
+
createClaudeCodeCommandCleanupMigration("0.28.1")
|
|
713
711
|
];
|
|
714
712
|
var TOOL_MIGRATIONS = {
|
|
715
713
|
brain: [createConfigDirMigration("droid-brain", "0.2.3")],
|
|
@@ -1229,11 +1227,22 @@ function uninstallSkill(skillName) {
|
|
|
1229
1227
|
}
|
|
1230
1228
|
}
|
|
1231
1229
|
const installedSkillInfo = tools[skillName];
|
|
1230
|
+
const agentsToRemove = /* @__PURE__ */ new Set();
|
|
1232
1231
|
if (installedSkillInfo?.bundled_agents) {
|
|
1233
1232
|
for (const agentName of installedSkillInfo.bundled_agents) {
|
|
1234
|
-
|
|
1233
|
+
agentsToRemove.add(agentName);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
const agentsSource = skillPath ? join7(skillPath.toolDir, "agents") : null;
|
|
1237
|
+
if (agentsSource && existsSync5(agentsSource)) {
|
|
1238
|
+
const agentFiles = readdirSync4(agentsSource, { withFileTypes: true }).filter((dirent) => dirent.isFile() && dirent.name.endsWith(".md")).map((dirent) => dirent.name.replace(".md", ""));
|
|
1239
|
+
for (const agentName of agentFiles) {
|
|
1240
|
+
agentsToRemove.add(agentName);
|
|
1235
1241
|
}
|
|
1236
1242
|
}
|
|
1243
|
+
for (const agentName of agentsToRemove) {
|
|
1244
|
+
uninstallAgent(agentName);
|
|
1245
|
+
}
|
|
1237
1246
|
const { [skillName]: removed, ...remainingTools } = tools;
|
|
1238
1247
|
setPlatformTools(config, remainingTools);
|
|
1239
1248
|
saveConfig(config);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/lib/migrations.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,SAAS,EAIf,MAAM,SAAS,CAAC;AA4WjB;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,CAE/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAc/D;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,GACd,IAAI,CAmBN;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC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B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAqDvC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAwCvC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Core droid meta-skill for update awareness and
|
|
3
|
+
"version": "0.5.0",
|
|
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",
|
|
7
7
|
"url": "https://github.com/orderful"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: droid
|
|
2
|
-
description: "Core droid meta-skill for update awareness and
|
|
3
|
-
version: 0.
|
|
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.5.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
# System tool - always stays current regardless of auto-update settings
|
|
@@ -10,6 +10,8 @@ includes:
|
|
|
10
10
|
skills:
|
|
11
11
|
- name: droid
|
|
12
12
|
required: true
|
|
13
|
+
- name: droid-bootstrap
|
|
14
|
+
required: true
|
|
13
15
|
commands: []
|
|
14
16
|
agents: []
|
|
15
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: droid
|
|
3
|
-
description: "Core droid meta-skill for updates and
|
|
3
|
+
description: "Core droid meta-skill for updates, tool discovery, and usage help. Use when checking for droid updates, discovering available tools, or answering 'how do I...' questions about droid workflows. User prompts like 'any droid updates?', 'what tools do I have?', 'how do I add context?', 'remind me how to use codex', 'what's the best way to start a session?'."
|
|
4
4
|
globs:
|
|
5
5
|
- "**/*"
|
|
6
6
|
alwaysApply: false
|
|
@@ -9,7 +9,7 @@ allowed-tools: [Bash]
|
|
|
9
9
|
|
|
10
10
|
# Droid
|
|
11
11
|
|
|
12
|
-
Core meta-skill for droid update awareness and
|
|
12
|
+
Core meta-skill for droid update awareness, tool discovery, and usage guidance.
|
|
13
13
|
|
|
14
14
|
## Purpose
|
|
15
15
|
|
|
@@ -240,3 +240,214 @@ Run `droid install <tool>` or just `droid` to browse and install.
|
|
|
240
240
|
|
|
241
241
|
They work well together: research in brain docs, capture decisions in project files.
|
|
242
242
|
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Usage Guides
|
|
247
|
+
|
|
248
|
+
When users ask "how do I..." questions about droid workflows, use these guides.
|
|
249
|
+
|
|
250
|
+
### Starting a Session Right
|
|
251
|
+
|
|
252
|
+
**User asks:** "How do I add context?", "How do I start a session?", "Remind me how to set up context"
|
|
253
|
+
|
|
254
|
+
**Answer:**
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
[● ●] Great question! Starting with context makes everything better.
|
|
258
|
+
|
|
259
|
+
**Option 1: Load project context**
|
|
260
|
+
`/project {name}` - Loads your project file with goals, decisions, and current work.
|
|
261
|
+
|
|
262
|
+
**Option 2: Load shared knowledge**
|
|
263
|
+
`/codex search {topic}` - Find relevant PRDs, tech designs, or patterns from the codex.
|
|
264
|
+
|
|
265
|
+
**Option 3: Both**
|
|
266
|
+
Start with `/project` for your working context, then `/codex search` if you need org knowledge.
|
|
267
|
+
|
|
268
|
+
**Pro tip:** Context at the start of a thread beats adding it mid-conversation.
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Finding Things in the Codex
|
|
272
|
+
|
|
273
|
+
**User asks:** "How do I find something in the codex?", "How do I search codex?"
|
|
274
|
+
|
|
275
|
+
**Answer:**
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
[● ●] Use `/codex search {keywords}` to find content across the codex.
|
|
279
|
+
|
|
280
|
+
Examples:
|
|
281
|
+
- `/codex search webhooks` - Find docs mentioning webhooks
|
|
282
|
+
- `/codex search partnership automation` - Find the partnership automation PRD
|
|
283
|
+
- `/codex search error handling patterns` - Find relevant patterns
|
|
284
|
+
|
|
285
|
+
The search looks across PRDs, tech designs, patterns, and explored topics.
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Loading Project Context
|
|
289
|
+
|
|
290
|
+
**User asks:** "How do I load my project?", "How does project work?"
|
|
291
|
+
|
|
292
|
+
**Answer:**
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
[● ●] Use `/project {name}` to load a project file.
|
|
296
|
+
|
|
297
|
+
Examples:
|
|
298
|
+
- `/project transaction-templates` - Load the transaction templates project
|
|
299
|
+
- `/project droid` - Load the droid project context
|
|
300
|
+
|
|
301
|
+
**What it gives me:**
|
|
302
|
+
- Project goals and background
|
|
303
|
+
- Key technical decisions and rationale
|
|
304
|
+
- Current work in progress
|
|
305
|
+
- Relevant code locations
|
|
306
|
+
|
|
307
|
+
**Pro tip:** Load your project at the start of each session. I'll have full context immediately.
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Planning Before Implementing
|
|
311
|
+
|
|
312
|
+
**User asks:** "How do I plan something?", "Should I plan first?"
|
|
313
|
+
|
|
314
|
+
**Answer:**
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
[● ●] Yes! Planning before implementing helps me help you better.
|
|
318
|
+
|
|
319
|
+
**Option 1: Brain doc (async, iterative)**
|
|
320
|
+
`/brain plan {topic}` - Creates a planning doc you can iterate on with @mentions.
|
|
321
|
+
|
|
322
|
+
**Option 2: Tech design (larger features)**
|
|
323
|
+
`/tech-design {feature}` - For features that need research, alternatives, and rollout plans.
|
|
324
|
+
|
|
325
|
+
**Why plan?**
|
|
326
|
+
- I understand the full scope before writing code
|
|
327
|
+
- We catch issues early, not mid-implementation
|
|
328
|
+
- The plan becomes documentation
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Using Comments for Async Work
|
|
332
|
+
|
|
333
|
+
**User asks:** "How do comments work?", "How do I leave notes for the AI?"
|
|
334
|
+
|
|
335
|
+
**Answer:**
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
[● ●] Use @mentions to have async conversations in any file.
|
|
339
|
+
|
|
340
|
+
**Leave a question:**
|
|
341
|
+
Add `> @droid why is this pattern used here?` in a comment
|
|
342
|
+
|
|
343
|
+
**Check for questions:**
|
|
344
|
+
`/comments check` - I'll find and respond to all @droid mentions
|
|
345
|
+
|
|
346
|
+
**Clean up:**
|
|
347
|
+
`/comments cleanup` - Remove resolved comment threads
|
|
348
|
+
|
|
349
|
+
Works great for code review notes and async collaboration.
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Learning vs Velocity Mode
|
|
353
|
+
|
|
354
|
+
**User asks:** "What's coach mode?", "How do I learn instead of just getting answers?"
|
|
355
|
+
|
|
356
|
+
**Answer:**
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
[● ●] Use `/coach` when you want to learn, not just ship.
|
|
360
|
+
|
|
361
|
+
**Normal mode:** I implement for you (fast, but you don't learn)
|
|
362
|
+
**Coach mode:** I guide you to implement yourself (slower, but you grow)
|
|
363
|
+
|
|
364
|
+
Examples:
|
|
365
|
+
- `/coach plan auth-refactor` - I'll ask questions to help YOU design it
|
|
366
|
+
- `/coach review my-code.ts` - I'll ask Socratic questions, not give answers
|
|
367
|
+
|
|
368
|
+
Good for: learning new codebases, building skills, understanding deeply.
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Code Review
|
|
372
|
+
|
|
373
|
+
**User asks:** "How do I get a code review?", "Can you review my changes?"
|
|
374
|
+
|
|
375
|
+
**Answer:**
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
[● ●] Use `/code-review` to review code with specialized agents.
|
|
379
|
+
|
|
380
|
+
Examples:
|
|
381
|
+
- `/code-review` - Review staged changes
|
|
382
|
+
- `/code-review --pr 123` - Review a specific PR
|
|
383
|
+
- `/code-review src/auth/` - Review specific files
|
|
384
|
+
|
|
385
|
+
**What I check:**
|
|
386
|
+
- Error handling and edge cases
|
|
387
|
+
- Test coverage gaps
|
|
388
|
+
- Type safety issues
|
|
389
|
+
- EDI/partnership patterns (if applicable)
|
|
390
|
+
|
|
391
|
+
Each finding has a confidence score so you can prioritize.
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Quick Reference
|
|
395
|
+
|
|
396
|
+
| Question | Answer |
|
|
397
|
+
|----------|--------|
|
|
398
|
+
| "Add context to my thread" | `/project {name}` or `/codex search {topic}` |
|
|
399
|
+
| "Find something in the codex" | `/codex search {keywords}` |
|
|
400
|
+
| "Start planning" | `/brain plan {topic}` or `/tech-design {feature}` |
|
|
401
|
+
| "Leave a note for AI" | Add `> @droid {question}` then `/comments check` |
|
|
402
|
+
| "Learn instead of copy-paste" | `/coach {command}` |
|
|
403
|
+
| "Review my code" | `/code-review` |
|
|
404
|
+
| "Capture a decision" | `/codex decision {summary}` |
|
|
405
|
+
| "Update project context" | `/project update` |
|
|
406
|
+
|
|
407
|
+
### Example Dialogue
|
|
408
|
+
|
|
409
|
+
**User:** "Hey droid, remind me the tools you have"
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
[● ●] Here's what you have installed:
|
|
413
|
+
|
|
414
|
+
**Context loading:**
|
|
415
|
+
- `/project {name}` - Load your project's working context
|
|
416
|
+
- `/codex search {topic}` - Find shared knowledge (PRDs, tech designs, patterns)
|
|
417
|
+
|
|
418
|
+
**Planning & thinking:**
|
|
419
|
+
- `/brain plan {topic}` - Create a planning scratchpad
|
|
420
|
+
- `/tech-design {feature}` - Design larger features
|
|
421
|
+
|
|
422
|
+
**Collaboration:**
|
|
423
|
+
- `/comments check` - Respond to @droid mentions
|
|
424
|
+
- `/code-review` - Get AI code review with specialized agents
|
|
425
|
+
|
|
426
|
+
**Learning:**
|
|
427
|
+
- `/coach` - AI as guide, not implementer
|
|
428
|
+
|
|
429
|
+
**Pro tip:** Start threads with `/project` or `/codex search` for best results.
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
**User:** "How should I approach this new feature?"
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
[● ●] Here's my suggested workflow:
|
|
436
|
+
|
|
437
|
+
1. **Load context first**
|
|
438
|
+
`/project {your-project}` - So I know the codebase
|
|
439
|
+
`/codex search {related-topic}` - For any relevant patterns
|
|
440
|
+
|
|
441
|
+
2. **Plan before coding**
|
|
442
|
+
`/brain plan {feature}` - Sketch out the approach
|
|
443
|
+
Iterate with @droid/@{you} comments until it feels right
|
|
444
|
+
|
|
445
|
+
3. **Implement with context**
|
|
446
|
+
Now I have full context - ask me to implement
|
|
447
|
+
|
|
448
|
+
4. **Review before shipping**
|
|
449
|
+
`/code-review` - Catch issues before PR
|
|
450
|
+
|
|
451
|
+
5. **Capture learnings**
|
|
452
|
+
`/project update` - Save decisions for next session
|
|
453
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: droid-bootstrap
|
|
3
|
+
description: "Lightweight droid bootstrap for update awareness. Checks for droid updates once per session."
|
|
4
|
+
globs: []
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
allowed-tools: [Bash]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Droid Bootstrap
|
|
10
|
+
|
|
11
|
+
**Once per session**, check if a droid update is available.
|
|
12
|
+
|
|
13
|
+
## Update Check
|
|
14
|
+
|
|
15
|
+
Get latest version from npm (timeout 3s, fail silently):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
timeout 3 npm view @orderful/droid version 2>/dev/null
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Get installed version:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
droid --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If a newer version exists, ask the user:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
[● ●] Droid v{latest} is available (you have v{current}).
|
|
31
|
+
Would you like me to update now?
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If user says yes, run these commands:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
droid update && droid update --tools
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The first command updates the npm package, the second syncs skill files to the install location. After updating, tell the user to restart their AI tool (Claude Code/OpenCode) to load the new skills.
|
|
41
|
+
|
|
42
|
+
If user declines, continue with their request. Don't ask again this session.
|
|
43
|
+
|
|
44
|
+
If the check fails (network issues, timeout), skip silently.
|
package/package.json
CHANGED
package/src/commands/update.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
2
|
import { execSync } from 'child_process';
|
|
3
3
|
import { getVersion } from '../lib/version';
|
|
4
|
+
import { updateAllSkills } from '../lib/skills';
|
|
4
5
|
|
|
5
6
|
interface UpdateOptions {
|
|
6
7
|
tools?: boolean;
|
|
@@ -22,14 +23,30 @@ export async function updateCommand(
|
|
|
22
23
|
return;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
// If --tools flag,
|
|
26
|
+
// If --tools flag, sync skills from bundled package to install location
|
|
26
27
|
if (options?.tools) {
|
|
27
|
-
console.log(chalk.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
console.log(chalk.bold('\n🤖 Syncing tools...\n'));
|
|
29
|
+
|
|
30
|
+
const result = updateAllSkills();
|
|
31
|
+
|
|
32
|
+
if (result.updated.length > 0) {
|
|
33
|
+
console.log(chalk.green('✓ Updated:'));
|
|
34
|
+
for (const skill of result.updated) {
|
|
35
|
+
console.log(chalk.gray(` ${skill.name}: ${skill.from} → ${skill.to}`));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (result.failed.length > 0) {
|
|
40
|
+
console.log(chalk.red('\n✗ Failed:'));
|
|
41
|
+
for (const skill of result.failed) {
|
|
42
|
+
console.log(chalk.gray(` ${skill.name}: ${skill.error}`));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (result.updated.length === 0 && result.failed.length === 0) {
|
|
47
|
+
console.log(chalk.green('✓ All tools up to date'));
|
|
48
|
+
}
|
|
49
|
+
|
|
33
50
|
return;
|
|
34
51
|
}
|
|
35
52
|
|
package/src/lib/migrations.ts
CHANGED
|
@@ -299,13 +299,8 @@ function createClaudeCodeCommandCleanupMigration(version: string): Migration {
|
|
|
299
299
|
version,
|
|
300
300
|
description: 'Remove non-alias commands from Claude Code',
|
|
301
301
|
up: () => {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
// Only run for Claude Code platform
|
|
305
|
-
if (config.platform !== Platform.ClaudeCode) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
|
|
302
|
+
// Clean up Claude Code commands directory regardless of current platform
|
|
303
|
+
// Users may have switched platforms, leaving orphaned commands
|
|
309
304
|
const commandsPath = getCommandsPath(Platform.ClaudeCode);
|
|
310
305
|
if (!existsSync(commandsPath)) {
|
|
311
306
|
return;
|
|
@@ -360,6 +355,8 @@ const PACKAGE_MIGRATIONS: Migration[] = [
|
|
|
360
355
|
createConfigSkillNameMigration('0.27.2'),
|
|
361
356
|
createOpenCodeSkillsPathMigration('0.28.0'),
|
|
362
357
|
createClaudeCodeCommandCleanupMigration('0.28.0'),
|
|
358
|
+
// Retry: 0.28.0 migration had platform check that prevented running after platform switch
|
|
359
|
+
createClaudeCodeCommandCleanupMigration('0.28.1'),
|
|
363
360
|
];
|
|
364
361
|
|
|
365
362
|
/**
|
package/src/lib/skills.test.ts
CHANGED
|
@@ -355,3 +355,68 @@ describe('platform-specific command installation', () => {
|
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
357
|
});
|
|
358
|
+
|
|
359
|
+
describe('uninstallSkill agent cleanup', () => {
|
|
360
|
+
let testToolsDir: string;
|
|
361
|
+
let testAgentsDir: string;
|
|
362
|
+
let testSkillsDir: string;
|
|
363
|
+
let originalConfig: any;
|
|
364
|
+
|
|
365
|
+
beforeEach(() => {
|
|
366
|
+
originalConfig = loadConfig();
|
|
367
|
+
|
|
368
|
+
testToolsDir = join(tmpdir(), `droid-test-tools-${Date.now()}`);
|
|
369
|
+
testAgentsDir = join(tmpdir(), `droid-test-agents-${Date.now()}`);
|
|
370
|
+
testSkillsDir = join(tmpdir(), `droid-test-skills-${Date.now()}`);
|
|
371
|
+
|
|
372
|
+
mkdirSync(testToolsDir, { recursive: true });
|
|
373
|
+
mkdirSync(testAgentsDir, { recursive: true });
|
|
374
|
+
mkdirSync(testSkillsDir, { recursive: true });
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
afterEach(() => {
|
|
378
|
+
saveConfig(originalConfig);
|
|
379
|
+
|
|
380
|
+
if (existsSync(testToolsDir)) {
|
|
381
|
+
rmSync(testToolsDir, { recursive: true });
|
|
382
|
+
}
|
|
383
|
+
if (existsSync(testAgentsDir)) {
|
|
384
|
+
rmSync(testAgentsDir, { recursive: true });
|
|
385
|
+
}
|
|
386
|
+
if (existsSync(testSkillsDir)) {
|
|
387
|
+
rmSync(testSkillsDir, { recursive: true });
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
|
|
391
|
+
it('should check both config and tool manifest for agents to remove', () => {
|
|
392
|
+
// Create a mock tool structure with agents
|
|
393
|
+
const toolDir = join(testToolsDir, 'test-tool');
|
|
394
|
+
const agentsDir = join(toolDir, 'agents');
|
|
395
|
+
mkdirSync(agentsDir, { recursive: true });
|
|
396
|
+
|
|
397
|
+
// Create agent files
|
|
398
|
+
writeFileSync(join(agentsDir, 'agent-in-manifest.md'), '---\nname: agent-in-manifest\n---\nAgent content');
|
|
399
|
+
writeFileSync(join(agentsDir, 'agent-in-both.md'), '---\nname: agent-in-both\n---\nAgent content');
|
|
400
|
+
|
|
401
|
+
// This test verifies the logic exists to check both sources
|
|
402
|
+
// The actual uninstallSkill would need more mocking to test fully
|
|
403
|
+
expect(existsSync(join(agentsDir, 'agent-in-manifest.md'))).toBe(true);
|
|
404
|
+
expect(existsSync(join(agentsDir, 'agent-in-both.md'))).toBe(true);
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
it('should use Set to deduplicate agents from both sources', () => {
|
|
408
|
+
// Verify Set behavior for deduplication
|
|
409
|
+
const agents = new Set<string>();
|
|
410
|
+
|
|
411
|
+
// Simulate adding from config
|
|
412
|
+
agents.add('agent1');
|
|
413
|
+
agents.add('agent2');
|
|
414
|
+
|
|
415
|
+
// Simulate adding from manifest (agent2 is duplicate)
|
|
416
|
+
agents.add('agent2');
|
|
417
|
+
agents.add('agent3');
|
|
418
|
+
|
|
419
|
+
expect(agents.size).toBe(3);
|
|
420
|
+
expect(Array.from(agents)).toEqual(['agent1', 'agent2', 'agent3']);
|
|
421
|
+
});
|
|
422
|
+
});
|
package/src/lib/skills.ts
CHANGED
|
@@ -697,13 +697,33 @@ export function uninstallSkill(skillName: string): {
|
|
|
697
697
|
}
|
|
698
698
|
|
|
699
699
|
// Remove bundled agents if they were installed with this skill
|
|
700
|
+
// Check both config tracking AND tool manifest to ensure cleanup
|
|
700
701
|
const installedSkillInfo = tools[skillName];
|
|
702
|
+
const agentsToRemove = new Set<string>();
|
|
703
|
+
|
|
704
|
+
// Add agents from config tracking (if available)
|
|
701
705
|
if (installedSkillInfo?.bundled_agents) {
|
|
702
706
|
for (const agentName of installedSkillInfo.bundled_agents) {
|
|
703
|
-
|
|
707
|
+
agentsToRemove.add(agentName);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
// Also check tool manifest for bundled agents (ensures cleanup even if tracking failed)
|
|
712
|
+
const agentsSource = skillPath ? join(skillPath.toolDir, 'agents') : null;
|
|
713
|
+
if (agentsSource && existsSync(agentsSource)) {
|
|
714
|
+
const agentFiles = readdirSync(agentsSource, { withFileTypes: true })
|
|
715
|
+
.filter((dirent) => dirent.isFile() && dirent.name.endsWith('.md'))
|
|
716
|
+
.map((dirent) => dirent.name.replace('.md', ''));
|
|
717
|
+
for (const agentName of agentFiles) {
|
|
718
|
+
agentsToRemove.add(agentName);
|
|
704
719
|
}
|
|
705
720
|
}
|
|
706
721
|
|
|
722
|
+
// Remove all agents
|
|
723
|
+
for (const agentName of agentsToRemove) {
|
|
724
|
+
uninstallAgent(agentName);
|
|
725
|
+
}
|
|
726
|
+
|
|
707
727
|
// Remove from config (destructure to omit the skill being removed)
|
|
708
728
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
709
729
|
const { [skillName]: removed, ...remainingTools } = tools;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Core droid meta-skill for update awareness and
|
|
3
|
+
"version": "0.5.0",
|
|
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",
|
|
7
7
|
"url": "https://github.com/orderful"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: droid
|
|
2
|
-
description: "Core droid meta-skill for update awareness and
|
|
3
|
-
version: 0.
|
|
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.5.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
# System tool - always stays current regardless of auto-update settings
|
|
@@ -10,6 +10,8 @@ includes:
|
|
|
10
10
|
skills:
|
|
11
11
|
- name: droid
|
|
12
12
|
required: true
|
|
13
|
+
- name: droid-bootstrap
|
|
14
|
+
required: true
|
|
13
15
|
commands: []
|
|
14
16
|
agents: []
|
|
15
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: droid
|
|
3
|
-
description: "Core droid meta-skill for updates and
|
|
3
|
+
description: "Core droid meta-skill for updates, tool discovery, and usage help. Use when checking for droid updates, discovering available tools, or answering 'how do I...' questions about droid workflows. User prompts like 'any droid updates?', 'what tools do I have?', 'how do I add context?', 'remind me how to use codex', 'what's the best way to start a session?'."
|
|
4
4
|
globs:
|
|
5
5
|
- "**/*"
|
|
6
6
|
alwaysApply: false
|
|
@@ -9,7 +9,7 @@ allowed-tools: [Bash]
|
|
|
9
9
|
|
|
10
10
|
# Droid
|
|
11
11
|
|
|
12
|
-
Core meta-skill for droid update awareness and
|
|
12
|
+
Core meta-skill for droid update awareness, tool discovery, and usage guidance.
|
|
13
13
|
|
|
14
14
|
## Purpose
|
|
15
15
|
|
|
@@ -240,3 +240,214 @@ Run `droid install <tool>` or just `droid` to browse and install.
|
|
|
240
240
|
|
|
241
241
|
They work well together: research in brain docs, capture decisions in project files.
|
|
242
242
|
```
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
## Usage Guides
|
|
247
|
+
|
|
248
|
+
When users ask "how do I..." questions about droid workflows, use these guides.
|
|
249
|
+
|
|
250
|
+
### Starting a Session Right
|
|
251
|
+
|
|
252
|
+
**User asks:** "How do I add context?", "How do I start a session?", "Remind me how to set up context"
|
|
253
|
+
|
|
254
|
+
**Answer:**
|
|
255
|
+
|
|
256
|
+
```
|
|
257
|
+
[● ●] Great question! Starting with context makes everything better.
|
|
258
|
+
|
|
259
|
+
**Option 1: Load project context**
|
|
260
|
+
`/project {name}` - Loads your project file with goals, decisions, and current work.
|
|
261
|
+
|
|
262
|
+
**Option 2: Load shared knowledge**
|
|
263
|
+
`/codex search {topic}` - Find relevant PRDs, tech designs, or patterns from the codex.
|
|
264
|
+
|
|
265
|
+
**Option 3: Both**
|
|
266
|
+
Start with `/project` for your working context, then `/codex search` if you need org knowledge.
|
|
267
|
+
|
|
268
|
+
**Pro tip:** Context at the start of a thread beats adding it mid-conversation.
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Finding Things in the Codex
|
|
272
|
+
|
|
273
|
+
**User asks:** "How do I find something in the codex?", "How do I search codex?"
|
|
274
|
+
|
|
275
|
+
**Answer:**
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
[● ●] Use `/codex search {keywords}` to find content across the codex.
|
|
279
|
+
|
|
280
|
+
Examples:
|
|
281
|
+
- `/codex search webhooks` - Find docs mentioning webhooks
|
|
282
|
+
- `/codex search partnership automation` - Find the partnership automation PRD
|
|
283
|
+
- `/codex search error handling patterns` - Find relevant patterns
|
|
284
|
+
|
|
285
|
+
The search looks across PRDs, tech designs, patterns, and explored topics.
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Loading Project Context
|
|
289
|
+
|
|
290
|
+
**User asks:** "How do I load my project?", "How does project work?"
|
|
291
|
+
|
|
292
|
+
**Answer:**
|
|
293
|
+
|
|
294
|
+
```
|
|
295
|
+
[● ●] Use `/project {name}` to load a project file.
|
|
296
|
+
|
|
297
|
+
Examples:
|
|
298
|
+
- `/project transaction-templates` - Load the transaction templates project
|
|
299
|
+
- `/project droid` - Load the droid project context
|
|
300
|
+
|
|
301
|
+
**What it gives me:**
|
|
302
|
+
- Project goals and background
|
|
303
|
+
- Key technical decisions and rationale
|
|
304
|
+
- Current work in progress
|
|
305
|
+
- Relevant code locations
|
|
306
|
+
|
|
307
|
+
**Pro tip:** Load your project at the start of each session. I'll have full context immediately.
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Planning Before Implementing
|
|
311
|
+
|
|
312
|
+
**User asks:** "How do I plan something?", "Should I plan first?"
|
|
313
|
+
|
|
314
|
+
**Answer:**
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
[● ●] Yes! Planning before implementing helps me help you better.
|
|
318
|
+
|
|
319
|
+
**Option 1: Brain doc (async, iterative)**
|
|
320
|
+
`/brain plan {topic}` - Creates a planning doc you can iterate on with @mentions.
|
|
321
|
+
|
|
322
|
+
**Option 2: Tech design (larger features)**
|
|
323
|
+
`/tech-design {feature}` - For features that need research, alternatives, and rollout plans.
|
|
324
|
+
|
|
325
|
+
**Why plan?**
|
|
326
|
+
- I understand the full scope before writing code
|
|
327
|
+
- We catch issues early, not mid-implementation
|
|
328
|
+
- The plan becomes documentation
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Using Comments for Async Work
|
|
332
|
+
|
|
333
|
+
**User asks:** "How do comments work?", "How do I leave notes for the AI?"
|
|
334
|
+
|
|
335
|
+
**Answer:**
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
[● ●] Use @mentions to have async conversations in any file.
|
|
339
|
+
|
|
340
|
+
**Leave a question:**
|
|
341
|
+
Add `> @droid why is this pattern used here?` in a comment
|
|
342
|
+
|
|
343
|
+
**Check for questions:**
|
|
344
|
+
`/comments check` - I'll find and respond to all @droid mentions
|
|
345
|
+
|
|
346
|
+
**Clean up:**
|
|
347
|
+
`/comments cleanup` - Remove resolved comment threads
|
|
348
|
+
|
|
349
|
+
Works great for code review notes and async collaboration.
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Learning vs Velocity Mode
|
|
353
|
+
|
|
354
|
+
**User asks:** "What's coach mode?", "How do I learn instead of just getting answers?"
|
|
355
|
+
|
|
356
|
+
**Answer:**
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
[● ●] Use `/coach` when you want to learn, not just ship.
|
|
360
|
+
|
|
361
|
+
**Normal mode:** I implement for you (fast, but you don't learn)
|
|
362
|
+
**Coach mode:** I guide you to implement yourself (slower, but you grow)
|
|
363
|
+
|
|
364
|
+
Examples:
|
|
365
|
+
- `/coach plan auth-refactor` - I'll ask questions to help YOU design it
|
|
366
|
+
- `/coach review my-code.ts` - I'll ask Socratic questions, not give answers
|
|
367
|
+
|
|
368
|
+
Good for: learning new codebases, building skills, understanding deeply.
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
### Code Review
|
|
372
|
+
|
|
373
|
+
**User asks:** "How do I get a code review?", "Can you review my changes?"
|
|
374
|
+
|
|
375
|
+
**Answer:**
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
[● ●] Use `/code-review` to review code with specialized agents.
|
|
379
|
+
|
|
380
|
+
Examples:
|
|
381
|
+
- `/code-review` - Review staged changes
|
|
382
|
+
- `/code-review --pr 123` - Review a specific PR
|
|
383
|
+
- `/code-review src/auth/` - Review specific files
|
|
384
|
+
|
|
385
|
+
**What I check:**
|
|
386
|
+
- Error handling and edge cases
|
|
387
|
+
- Test coverage gaps
|
|
388
|
+
- Type safety issues
|
|
389
|
+
- EDI/partnership patterns (if applicable)
|
|
390
|
+
|
|
391
|
+
Each finding has a confidence score so you can prioritize.
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
### Quick Reference
|
|
395
|
+
|
|
396
|
+
| Question | Answer |
|
|
397
|
+
|----------|--------|
|
|
398
|
+
| "Add context to my thread" | `/project {name}` or `/codex search {topic}` |
|
|
399
|
+
| "Find something in the codex" | `/codex search {keywords}` |
|
|
400
|
+
| "Start planning" | `/brain plan {topic}` or `/tech-design {feature}` |
|
|
401
|
+
| "Leave a note for AI" | Add `> @droid {question}` then `/comments check` |
|
|
402
|
+
| "Learn instead of copy-paste" | `/coach {command}` |
|
|
403
|
+
| "Review my code" | `/code-review` |
|
|
404
|
+
| "Capture a decision" | `/codex decision {summary}` |
|
|
405
|
+
| "Update project context" | `/project update` |
|
|
406
|
+
|
|
407
|
+
### Example Dialogue
|
|
408
|
+
|
|
409
|
+
**User:** "Hey droid, remind me the tools you have"
|
|
410
|
+
|
|
411
|
+
```
|
|
412
|
+
[● ●] Here's what you have installed:
|
|
413
|
+
|
|
414
|
+
**Context loading:**
|
|
415
|
+
- `/project {name}` - Load your project's working context
|
|
416
|
+
- `/codex search {topic}` - Find shared knowledge (PRDs, tech designs, patterns)
|
|
417
|
+
|
|
418
|
+
**Planning & thinking:**
|
|
419
|
+
- `/brain plan {topic}` - Create a planning scratchpad
|
|
420
|
+
- `/tech-design {feature}` - Design larger features
|
|
421
|
+
|
|
422
|
+
**Collaboration:**
|
|
423
|
+
- `/comments check` - Respond to @droid mentions
|
|
424
|
+
- `/code-review` - Get AI code review with specialized agents
|
|
425
|
+
|
|
426
|
+
**Learning:**
|
|
427
|
+
- `/coach` - AI as guide, not implementer
|
|
428
|
+
|
|
429
|
+
**Pro tip:** Start threads with `/project` or `/codex search` for best results.
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
**User:** "How should I approach this new feature?"
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
[● ●] Here's my suggested workflow:
|
|
436
|
+
|
|
437
|
+
1. **Load context first**
|
|
438
|
+
`/project {your-project}` - So I know the codebase
|
|
439
|
+
`/codex search {related-topic}` - For any relevant patterns
|
|
440
|
+
|
|
441
|
+
2. **Plan before coding**
|
|
442
|
+
`/brain plan {feature}` - Sketch out the approach
|
|
443
|
+
Iterate with @droid/@{you} comments until it feels right
|
|
444
|
+
|
|
445
|
+
3. **Implement with context**
|
|
446
|
+
Now I have full context - ask me to implement
|
|
447
|
+
|
|
448
|
+
4. **Review before shipping**
|
|
449
|
+
`/code-review` - Catch issues before PR
|
|
450
|
+
|
|
451
|
+
5. **Capture learnings**
|
|
452
|
+
`/project update` - Save decisions for next session
|
|
453
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: droid-bootstrap
|
|
3
|
+
description: "Lightweight droid bootstrap for update awareness. Checks for droid updates once per session."
|
|
4
|
+
globs: []
|
|
5
|
+
alwaysApply: true
|
|
6
|
+
allowed-tools: [Bash]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Droid Bootstrap
|
|
10
|
+
|
|
11
|
+
**Once per session**, check if a droid update is available.
|
|
12
|
+
|
|
13
|
+
## Update Check
|
|
14
|
+
|
|
15
|
+
Get latest version from npm (timeout 3s, fail silently):
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
timeout 3 npm view @orderful/droid version 2>/dev/null
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Get installed version:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
droid --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If a newer version exists, ask the user:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
[● ●] Droid v{latest} is available (you have v{current}).
|
|
31
|
+
Would you like me to update now?
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If user says yes, run these commands:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
droid update && droid update --tools
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The first command updates the npm package, the second syncs skill files to the install location. After updating, tell the user to restart their AI tool (Claude Code/OpenCode) to load the new skills.
|
|
41
|
+
|
|
42
|
+
If user declines, continue with their request. Don't ask again this session.
|
|
43
|
+
|
|
44
|
+
If the check fails (network issues, timeout), skip silently.
|