@orderful/droid 0.26.0 → 0.27.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.
Files changed (146) hide show
  1. package/.claude-plugin/marketplace.json +7 -7
  2. package/AGENTS.md +36 -32
  3. package/CHANGELOG.md +29 -0
  4. package/dist/bin/droid.js +102 -24
  5. package/dist/index.js +59 -25
  6. package/dist/lib/migrations.d.ts +8 -0
  7. package/dist/lib/migrations.d.ts.map +1 -1
  8. package/dist/lib/skills.d.ts.map +1 -1
  9. package/dist/lib/tools.d.ts.map +1 -1
  10. package/dist/lib/types.d.ts +10 -2
  11. package/dist/lib/types.d.ts.map +1 -1
  12. package/dist/tools/brain/.claude-plugin/plugin.json +1 -1
  13. package/dist/tools/brain/TOOL.yaml +7 -5
  14. package/dist/tools/brain/commands/brain.md +17 -49
  15. package/dist/tools/brain/commands/scratchpad.md +13 -50
  16. package/{src/tools/brain/skills/droid-brain → dist/tools/brain/skills/brain}/SKILL.md +5 -5
  17. package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/SKILL.md +8 -8
  18. package/dist/tools/coach/.claude-plugin/plugin.json +1 -1
  19. package/dist/tools/coach/TOOL.yaml +4 -3
  20. package/dist/tools/coach/commands/coach.md +14 -54
  21. package/{src/tools/coach/skills/droid-coach → dist/tools/coach/skills/coach}/SKILL.md +4 -3
  22. package/dist/tools/code-review/.claude-plugin/plugin.json +1 -1
  23. package/dist/tools/code-review/TOOL.yaml +4 -3
  24. package/dist/tools/code-review/commands/code-review.md +18 -102
  25. package/dist/tools/code-review/skills/code-review/SKILL.md +154 -0
  26. package/dist/tools/codex/.claude-plugin/plugin.json +1 -1
  27. package/dist/tools/codex/TOOL.yaml +4 -3
  28. package/dist/tools/codex/commands/codex.md +18 -65
  29. package/dist/tools/codex/skills/{droid-codex → codex}/SKILL.md +64 -45
  30. package/{src/tools/codex/skills/droid-codex → dist/tools/codex/skills/codex}/references/loading.md +94 -55
  31. package/dist/tools/codex/skills/codex/scripts/git-finish-write.d.ts.map +1 -0
  32. package/dist/tools/codex/skills/codex/scripts/git-preamble.d.ts.map +1 -0
  33. package/dist/tools/codex/skills/codex/scripts/git-start-write.d.ts.map +1 -0
  34. package/dist/tools/comments/.claude-plugin/plugin.json +1 -1
  35. package/dist/tools/comments/TOOL.yaml +4 -3
  36. package/dist/tools/comments/commands/comments.md +12 -14
  37. package/{src/tools/comments/skills/droid-comments → dist/tools/comments/skills/comments}/SKILL.md +3 -1
  38. package/dist/tools/project/.claude-plugin/plugin.json +1 -1
  39. package/dist/tools/project/TOOL.yaml +4 -3
  40. package/dist/tools/project/commands/project.md +12 -27
  41. package/dist/tools/project/skills/{droid-project → project}/SKILL.md +12 -11
  42. package/dist/tools/tech-design/.claude-plugin/plugin.json +1 -1
  43. package/dist/tools/tech-design/TOOL.yaml +4 -3
  44. package/dist/tools/tech-design/commands/tech-design.md +18 -80
  45. package/{src/tools/tech-design/skills/droid-tech-design → dist/tools/tech-design/skills/tech-design}/SKILL.md +1 -1
  46. package/package.json +1 -1
  47. package/src/commands/tui/components/Badge.test.tsx +10 -4
  48. package/src/commands/tui.tsx +4 -4
  49. package/src/lib/migrations.ts +95 -4
  50. package/src/lib/skills.test.ts +199 -74
  51. package/src/lib/skills.ts +55 -54
  52. package/src/lib/tools.ts +19 -12
  53. package/src/lib/types.ts +20 -5
  54. package/src/tools/brain/.claude-plugin/plugin.json +1 -1
  55. package/src/tools/brain/TOOL.yaml +7 -5
  56. package/src/tools/brain/commands/brain.md +17 -49
  57. package/src/tools/brain/commands/scratchpad.md +13 -50
  58. package/{dist/tools/brain/skills/droid-brain → src/tools/brain/skills/brain}/SKILL.md +5 -5
  59. package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/SKILL.md +8 -8
  60. package/src/tools/coach/.claude-plugin/plugin.json +1 -1
  61. package/src/tools/coach/TOOL.yaml +4 -3
  62. package/src/tools/coach/commands/coach.md +14 -54
  63. package/{dist/tools/coach/skills/droid-coach → src/tools/coach/skills/coach}/SKILL.md +4 -3
  64. package/src/tools/code-review/.claude-plugin/plugin.json +1 -1
  65. package/src/tools/code-review/TOOL.yaml +4 -3
  66. package/src/tools/code-review/commands/code-review.md +18 -102
  67. package/src/tools/code-review/skills/code-review/SKILL.md +154 -0
  68. package/src/tools/codex/.claude-plugin/plugin.json +1 -1
  69. package/src/tools/codex/TOOL.yaml +4 -3
  70. package/src/tools/codex/commands/codex.md +18 -65
  71. package/src/tools/codex/skills/{droid-codex → codex}/SKILL.md +64 -45
  72. package/{dist/tools/codex/skills/droid-codex → src/tools/codex/skills/codex}/references/loading.md +94 -55
  73. package/src/tools/comments/.claude-plugin/plugin.json +1 -1
  74. package/src/tools/comments/TOOL.yaml +4 -3
  75. package/src/tools/comments/commands/comments.md +12 -14
  76. package/{dist/tools/comments/skills/droid-comments → src/tools/comments/skills/comments}/SKILL.md +3 -1
  77. package/src/tools/project/.claude-plugin/plugin.json +1 -1
  78. package/src/tools/project/TOOL.yaml +4 -3
  79. package/src/tools/project/commands/project.md +12 -27
  80. package/src/tools/project/skills/{droid-project → project}/SKILL.md +12 -11
  81. package/src/tools/tech-design/.claude-plugin/plugin.json +1 -1
  82. package/src/tools/tech-design/TOOL.yaml +4 -3
  83. package/src/tools/tech-design/commands/tech-design.md +18 -80
  84. package/{dist/tools/tech-design/skills/droid-tech-design → src/tools/tech-design/skills/tech-design}/SKILL.md +1 -1
  85. package/dist/tools/code-review/skills/droid-code-review/SKILL.md +0 -55
  86. package/dist/tools/codex/skills/droid-codex/scripts/git-finish-write.d.ts.map +0 -1
  87. package/dist/tools/codex/skills/droid-codex/scripts/git-preamble.d.ts.map +0 -1
  88. package/dist/tools/codex/skills/droid-codex/scripts/git-start-write.d.ts.map +0 -1
  89. package/src/tools/code-review/skills/droid-code-review/SKILL.md +0 -55
  90. /package/dist/tools/brain/skills/{droid-brain → brain}/references/metadata.md +0 -0
  91. /package/dist/tools/brain/skills/{droid-brain → brain}/references/naming.md +0 -0
  92. /package/dist/tools/brain/skills/{droid-brain → brain}/references/templates.md +0 -0
  93. /package/dist/tools/brain/skills/{droid-brain → brain}/references/workflows.md +0 -0
  94. /package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/templates.md +0 -0
  95. /package/dist/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/workflows.md +0 -0
  96. /package/dist/tools/codex/skills/{droid-codex → codex}/references/creating.md +0 -0
  97. /package/dist/tools/codex/skills/{droid-codex → codex}/references/decisions.md +0 -0
  98. /package/dist/tools/codex/skills/{droid-codex → codex}/references/topics.md +0 -0
  99. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.d.ts +0 -0
  100. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.ts +0 -0
  101. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.d.ts +0 -0
  102. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.ts +0 -0
  103. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-scripts.test.ts +0 -0
  104. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.d.ts +0 -0
  105. /package/dist/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.ts +0 -0
  106. /package/dist/tools/project/skills/{droid-project → project}/references/changelog.md +0 -0
  107. /package/dist/tools/project/skills/{droid-project → project}/references/creating.md +0 -0
  108. /package/dist/tools/project/skills/{droid-project → project}/references/loading.md +0 -0
  109. /package/dist/tools/project/skills/{droid-project → project}/references/templates.md +0 -0
  110. /package/dist/tools/project/skills/{droid-project → project}/references/updating.md +0 -0
  111. /package/dist/tools/project/skills/{droid-project → project}/references/versioning.md +0 -0
  112. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/draft.md +0 -0
  113. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/gaps.md +0 -0
  114. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/publish.md +0 -0
  115. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/research-doc-template.md +0 -0
  116. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/rollup-template.md +0 -0
  117. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/start.md +0 -0
  118. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/think.md +0 -0
  119. /package/dist/tools/tech-design/skills/{droid-tech-design → tech-design}/references/thought-doc-template.md +0 -0
  120. /package/src/tools/brain/skills/{droid-brain → brain}/references/metadata.md +0 -0
  121. /package/src/tools/brain/skills/{droid-brain → brain}/references/naming.md +0 -0
  122. /package/src/tools/brain/skills/{droid-brain → brain}/references/templates.md +0 -0
  123. /package/src/tools/brain/skills/{droid-brain → brain}/references/workflows.md +0 -0
  124. /package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/templates.md +0 -0
  125. /package/src/tools/brain/skills/{droid-brain-obsidian → brain-obsidian}/references/workflows.md +0 -0
  126. /package/src/tools/codex/skills/{droid-codex → codex}/references/creating.md +0 -0
  127. /package/src/tools/codex/skills/{droid-codex → codex}/references/decisions.md +0 -0
  128. /package/src/tools/codex/skills/{droid-codex → codex}/references/topics.md +0 -0
  129. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-finish-write.ts +0 -0
  130. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-preamble.ts +0 -0
  131. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-scripts.test.ts +0 -0
  132. /package/src/tools/codex/skills/{droid-codex → codex}/scripts/git-start-write.ts +0 -0
  133. /package/src/tools/project/skills/{droid-project → project}/references/changelog.md +0 -0
  134. /package/src/tools/project/skills/{droid-project → project}/references/creating.md +0 -0
  135. /package/src/tools/project/skills/{droid-project → project}/references/loading.md +0 -0
  136. /package/src/tools/project/skills/{droid-project → project}/references/templates.md +0 -0
  137. /package/src/tools/project/skills/{droid-project → project}/references/updating.md +0 -0
  138. /package/src/tools/project/skills/{droid-project → project}/references/versioning.md +0 -0
  139. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/draft.md +0 -0
  140. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/gaps.md +0 -0
  141. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/publish.md +0 -0
  142. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/research-doc-template.md +0 -0
  143. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/rollup-template.md +0 -0
  144. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/start.md +0 -0
  145. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/think.md +0 -0
  146. /package/src/tools/tech-design/skills/{droid-tech-design → tech-design}/references/thought-doc-template.md +0 -0
@@ -1,71 +1,31 @@
1
1
  ---
2
+ name: coach
2
3
  description: "Learning-mode AI assistance - scaffolds don't implement, questions don't fix"
3
4
  argument-hint: "[plan {task} | scaffold [{path}] | review [{path}] | check | challenge [{path}]]"
4
- allowed-tools: [Read, Write, Edit, Glob, Grep, Bash(ls:*)]
5
5
  ---
6
6
 
7
7
  # /coach
8
8
 
9
- Entry point for learning-mode AI assistance. See the **coach skill** for full behaviour.
9
+ **User invoked:** `/coach $ARGUMENTS`
10
10
 
11
- ## Arguments
11
+ **Your task:** Invoke the **coach skill** with these arguments.
12
12
 
13
- $ARGUMENTS
13
+ **Philosophy:** "AI as coach, not crutch" - preserves learning-through-doing while leveraging AI for guardrails and feedback.
14
14
 
15
- ## Philosophy
15
+ ## Examples
16
16
 
17
- **"AI as coach, not crutch"** - preserves learning-through-doing while leveraging AI for guardrails and feedback.
17
+ - `/coach plan refactor auth` Co-authored planning with Socratic questions
18
+ - `/coach scaffold src/lib/auth.ts` → Generate types/signatures for that file
19
+ - `/coach review` → Review recent changes with inline questions
20
+ - `/coach challenge --staged` → Challenge on staged changes
18
21
 
19
- ## Usage
22
+ ## Quick Reference
20
23
 
21
24
  ```
22
25
  /coach plan {task} # Co-authored planning with Socratic questions
23
- /coach scaffold # Generate types/signatures for current context
24
- /coach scaffold {path} # Generate scaffold for specific file/feature
25
- /coach review # Review recent changes with inline questions
26
- /coach review {path} # Review specific file with inline questions
27
- /coach check # Process comment responses (defers to /comments check)
28
- /coach challenge # Productive struggle on current file
29
- /coach challenge {path} # Challenge on specific file
30
- /coach challenge --staged # Challenge on staged changes
26
+ /coach scaffold [{path}] # Generate types/signatures
27
+ /coach review [{path}] # Review with inline questions
28
+ /coach challenge [{path}] # Productive struggle mode
31
29
  ```
32
30
 
33
- ## Mode Behaviour
34
-
35
- ### plan
36
-
37
- - Co-author, don't dictate
38
- - ~30% proposing, ~70% questioning
39
- - Offer to create brain doc for persistence
40
-
41
- ### scaffold
42
-
43
- - Types, signatures, stubs with hint comments
44
- - Points at what to think about, not the answer
45
- - Human fills in the actual logic
46
-
47
- ### review
48
-
49
- - Uses comments skill for inline `// @{user}` questions
50
- - Socratic - probe reasoning, don't fix code
51
- - Vary questions based on context
52
-
53
- ### check
54
-
55
- - Defers to `/comments check`
56
-
57
- ### challenge
58
-
59
- - Productive struggle - find what you missed
60
- - Guide discovery, don't give answers
61
- - Opt-in for those seeking growth
62
-
63
- ## Configuration
64
-
65
- Read `~/.droid/skills/coach/overrides.yaml` for:
66
-
67
- - `scaffold_verbosity` - `minimal` | `medium` | `detailed`
68
-
69
- ## The Golden Rule
70
-
71
- **Never write code unless explicitly asked.** Only ask questions, explain tradeoffs, provide hints, or generate structure.
31
+ See the **coach skill** for complete documentation and procedures.
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: droid-coach
2
+ name: coach
3
3
  description: "Learning-mode AI assistance - scaffolds don't implement, questions don't fix. Use when learning a new codebase, wanting to understand deeply, or building skills to retain. User prompts like 'coach me on', 'help me think through', 'I want to learn how to', 'don't just give me the answer'."
4
4
  alwaysApply: false
5
5
  allowed-tools: [Read, Grep, Glob]
@@ -40,7 +40,7 @@ plan → AI scaffolds → human implements → AI coaches → iterate → ship
40
40
  ## Commands
41
41
 
42
42
  | Command | Purpose |
43
- |--------------------|---------------------------------------------------------|
43
+ | ------------------ | ------------------------------------------------------- |
44
44
  | `/coach plan` | Co-authored planning with Socratic questions |
45
45
  | `/coach scaffold` | Generate types/signatures/stubs with hints |
46
46
  | `/coach review` | Inline questions via comments skill |
@@ -50,7 +50,7 @@ plan → AI scaffolds → human implements → AI coaches → iterate → ship
50
50
  ## Configuration
51
51
 
52
52
  | Setting | Default | Description |
53
- |----------------------|----------|---------------------------------------------------------|
53
+ | -------------------- | -------- | ------------------------------------------------------- |
54
54
  | `scaffold_verbosity` | `medium` | How detailed hints are: `minimal`, `medium`, `detailed` |
55
55
 
56
56
  > @fry 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?
@@ -139,6 +139,7 @@ Read from `~/.droid/skills/coach/overrides.yaml` if present.
139
139
  // @fry What happens if this promise rejects?
140
140
  // @fry I notice you're mutating state directly - was that intentional?
141
141
  ```
142
+
142
143
  > @droid is it worth mentioning using the correct comment syntax for the file language? We typically use TS but could be others
143
144
 
144
145
  **Key principle:** Vary questions based on specific code and context. Avoid formulaic patterns. Questions show the _spirit_, not a script.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-code-review",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Comprehensive code review using specialized agents. Reviews PRs, staged changes, branches, or specific files with confidence scoring.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,14 +1,15 @@
1
1
  name: code-review
2
2
  description: "Comprehensive code review using specialized agents. Reviews PRs, staged changes, branches, or specific files with confidence scoring."
3
- version: 0.1.2
3
+ version: 0.2.0
4
4
  status: alpha
5
5
 
6
6
  includes:
7
7
  skills:
8
- - name: droid-code-review
8
+ - name: code-review
9
9
  required: true
10
10
  commands:
11
- - code-review
11
+ - name: code-review
12
+ is_alias: false
12
13
  agents:
13
14
  - edi-standards-reviewer
14
15
  - error-handling-reviewer
@@ -1,113 +1,29 @@
1
1
  ---
2
- description: Run comprehensive code review using specialized agents. Accepts PR number, 'staged', 'branch', or file path.
2
+ name: code-review
3
+ description: "Run comprehensive code review using specialized agents. Accepts PR number, 'staged', 'branch', or file path."
3
4
  argument-hint: "[#123 | staged | branch | path/to/file.ts]"
4
- allowed-tools: [Task, Bash(git:*), Bash(gh:*), Read, Glob]
5
5
  ---
6
6
 
7
- # /code-review - Run comprehensive code review using specialized agents
7
+ # /code-review
8
8
 
9
- Review target: $ARGUMENTS
9
+ **User invoked:** `/code-review $ARGUMENTS`
10
10
 
11
- ## Usage
11
+ **Your task:** Invoke the **code-review skill** with these arguments.
12
12
 
13
- ```
14
- /code-review #123 # Review PR #123
15
- /code-review staged # Review staged changes
16
- /code-review branch # Review current branch vs main
17
- /code-review path/to/file # Review specific file
18
- ```
19
-
20
- ### Step 0: Check for Brain Integration
21
-
22
- **If the `brain` skill is installed** (check for `~/.claude/skills/brain/SKILL.md` or `~/.config/opencode/skills/brain/SKILL.md`):
23
-
24
- Ask the user: **"Would you like the review results saved to a `/brain review` doc?"**
25
-
26
- - If yes: Create a brain review doc at the start using `/brain review {PR title or branch name}`
27
- - The final report will be written to the brain doc instead of just displayed
28
- - This allows for async discussion via `@droid`/`@{user}` comments
29
-
30
- If brain skill is not installed or user declines, proceed with normal terminal output.
31
-
32
- ### Step 1: Determine Review Scope
33
-
34
- Parse the argument to determine what to review:
35
-
36
- **If argument starts with `#` or is a number (e.g., `#123` or `123`):**
37
-
38
- - This is a PR number
39
- - Fetch PR details: `gh pr view $PR_NUMBER --json title,body,baseRefName,headRefName,files`
40
- - Get the diff: `gh pr diff $PR_NUMBER`
41
- - Note the PR author and description for context
42
-
43
- **If argument is `staged` or empty:**
44
-
45
- - Review staged changes: `git diff --cached`
46
-
47
- **If argument is `branch`:**
48
-
49
- - Review current branch vs main: `git diff origin/main...HEAD`
50
-
51
- **If argument is a file path:**
52
-
53
- - Review specific file: `git diff HEAD -- $FILE_PATH`
54
- - If no changes, review the entire file for issues
55
-
56
- ### Step 2: Gather Context
57
-
58
- For PR reviews, also fetch:
59
-
60
- - PR description (may contain context about the change)
61
- - Linked issues: `gh pr view $PR_NUMBER --json body` and parse for #issue refs
62
- - Changed files list for targeted agent assignment
13
+ ## Examples
63
14
 
64
- ### Step 3: Parallel Agent Reviews
15
+ - `/code-review #123` Review PR #123 using specialized agents
16
+ - `/code-review staged` → Review currently staged changes
17
+ - `/code-review branch` → Review current branch vs main
18
+ - `/code-review src/lib/auth.ts` → Review specific file
65
19
 
66
- Launch these agents in parallel using the Task tool with `run_in_background: true`:
20
+ ## Quick Reference
67
21
 
68
- 1. **edi-standards-reviewer**: EDI patterns, partnership handling, billing concerns
69
- 2. **test-coverage-analyzer**: Test completeness and edge cases
70
- 3. **error-handling-reviewer**: Silent failures, missing error handling
71
- 4. **type-reviewer**: Type design, interface contracts
72
-
73
- Pass each agent:
74
-
75
- 1. The diff content
76
- 2. The full file content for changed files (for context)
77
- 3. PR description if available
78
-
79
- Use TaskOutput to collect results from all agents.
80
-
81
- ### Step 4: Confidence Filtering
82
-
83
- Each agent returns issues with confidence scores (0-100).
84
- Filter out issues with confidence < 80.
85
-
86
- ### Step 5: Synthesize Report
87
-
88
- Compile findings into a prioritized report:
89
-
90
- **PR #123: "Add partnership billing events"** (if reviewing a PR)
91
- _Author: @username_
92
-
93
- **Critical** (security, data loss, billing errors)
94
-
95
- - `file.ts:42` - Issue description
96
-
97
- **Important** (bugs, missing tests, type issues)
98
-
99
- - `file.ts:67` - Issue description
100
-
101
- **Suggestions** (style, readability)
102
-
103
- - `file.ts:89` - Issue description
104
-
105
- **Summary**: X critical, Y important, Z suggestions across N files.
106
-
107
- ### Step 6: Offer Actions (for PRs)
108
-
109
- After presenting the report, offer:
22
+ ```
23
+ /code-review #123 # Review PR
24
+ /code-review staged # Review staged changes
25
+ /code-review branch # Review current branch
26
+ /code-review {path} # Review specific file
27
+ ```
110
28
 
111
- - "Would you like me to post this as a PR comment?"
112
- - "Should I suggest fixes for any of these issues?"
113
- - "Want me to check out this branch and fix the critical issues?"
29
+ See the **code-review skill** for complete documentation and procedures.
@@ -0,0 +1,154 @@
1
+ ---
2
+ name: code-review
3
+ description: "Comprehensive code review using specialized agents. Use when reviewing PRs, checking staged changes, or analysing code quality. User prompts like 'review this PR', 'check my changes', 'review before I commit'."
4
+ globs:
5
+ - "**/*"
6
+ alwaysApply: false
7
+ allowed-tools: [Read, Grep, Glob, Bash, Task]
8
+ ---
9
+
10
+ # Code Review Skill
11
+
12
+ Run comprehensive code reviews using specialized agents, each focused on a specific concern.
13
+
14
+ ## How It Works
15
+
16
+ The `/code-review` command orchestrates multiple specialized agents in parallel:
17
+
18
+ 1. **edi-standards-reviewer** - EDI patterns, partnership handling, billing concerns
19
+ 2. **test-coverage-analyzer** - Test completeness and edge cases
20
+ 3. **error-handling-reviewer** - Silent failures, missing error handling
21
+ 4. **type-reviewer** - TypeScript type design, interface contracts
22
+
23
+ Each agent returns issues with confidence scores (0-100). Issues below 80% confidence are filtered out to reduce noise.
24
+
25
+ ## Usage
26
+
27
+ ```bash
28
+ /code-review #123 # Review PR #123
29
+ /code-review staged # Review staged changes
30
+ /code-review branch # Review current branch vs main
31
+ /code-review path/to/file # Review specific file
32
+ ```
33
+
34
+ ## Output Format
35
+
36
+ Reviews are presented in prioritized categories:
37
+
38
+ 🔴 **Critical** - Security, data loss, billing errors
39
+ 🟠 **Important** - Bugs, missing tests, type issues
40
+ 🟡 **Suggestions** - Style, readability improvements
41
+
42
+ ## Post-Review Actions
43
+
44
+ After presenting findings, you can:
45
+
46
+ - Post the review as a PR comment
47
+ - Get suggested fixes for specific issues
48
+ - Check out the branch and fix critical issues
49
+
50
+ ## Domain-Aware Reviews
51
+
52
+ The EDI Standards Reviewer discovers project conventions by reading:
53
+
54
+ - `.claude/CLAUDE.md` or `CLAUDE.md` for team conventions
55
+ - `AGENTS.md` or `docs/` for architecture guidance
56
+
57
+ This lets it apply your project's specific patterns rather than generic rules.
58
+
59
+ ## Review Procedure
60
+
61
+ ### Step 0: Check for Brain Integration
62
+
63
+ **If the `brain` skill is installed** (check for `~/.claude/skills/brain/SKILL.md` or `~/.config/opencode/skills/brain/SKILL.md`):
64
+
65
+ Ask the user: **"Would you like the review results saved to a `/brain review` doc?"**
66
+
67
+ - If yes: Create a brain review doc at the start using `/brain review {PR title or branch name}`
68
+ - The final report will be written to the brain doc instead of just displayed
69
+ - This allows for async discussion via `@droid`/`@{user}` comments
70
+
71
+ If brain skill is not installed or user declines, proceed with normal terminal output.
72
+
73
+ ### Step 1: Determine Review Scope
74
+
75
+ Parse the argument to determine what to review:
76
+
77
+ **If argument starts with `#` or is a number (e.g., `#123` or `123`):**
78
+
79
+ - This is a PR number
80
+ - Fetch PR details: `gh pr view $PR_NUMBER --json title,body,baseRefName,headRefName,files`
81
+ - Get the diff: `gh pr diff $PR_NUMBER`
82
+ - Note the PR author and description for context
83
+
84
+ **If argument is `staged` or empty:**
85
+
86
+ - Review staged changes: `git diff --cached`
87
+
88
+ **If argument is `branch`:**
89
+
90
+ - Review current branch vs main: `git diff origin/main...HEAD`
91
+
92
+ **If argument is a file path:**
93
+
94
+ - Review specific file: `git diff HEAD -- $FILE_PATH`
95
+ - If no changes, review the entire file for issues
96
+
97
+ ### Step 2: Gather Context
98
+
99
+ For PR reviews, also fetch:
100
+
101
+ - PR description (may contain context about the change)
102
+ - Linked issues: `gh pr view $PR_NUMBER --json body` and parse for #issue refs
103
+ - Changed files list for targeted agent assignment
104
+
105
+ ### Step 3: Parallel Agent Reviews
106
+
107
+ Launch these agents in parallel using the Task tool with `run_in_background: true`:
108
+
109
+ 1. **edi-standards-reviewer**: EDI patterns, partnership handling, billing concerns
110
+ 2. **test-coverage-analyzer**: Test completeness and edge cases
111
+ 3. **error-handling-reviewer**: Silent failures, missing error handling
112
+ 4. **type-reviewer**: Type design, interface contracts
113
+
114
+ Pass each agent:
115
+
116
+ 1. The diff content
117
+ 2. The full file content for changed files (for context)
118
+ 3. PR description if available
119
+
120
+ Use TaskOutput to collect results from all agents.
121
+
122
+ ### Step 4: Confidence Filtering
123
+
124
+ Each agent returns issues with confidence scores (0-100).
125
+ Filter out issues with confidence < 80.
126
+
127
+ ### Step 5: Synthesize Report
128
+
129
+ Compile findings into a prioritized report:
130
+
131
+ **PR #123: "Add partnership billing events"** (if reviewing a PR)
132
+ _Author: @username_
133
+
134
+ **Critical** (security, data loss, billing errors)
135
+
136
+ - `file.ts:42` - Issue description
137
+
138
+ **Important** (bugs, missing tests, type issues)
139
+
140
+ - `file.ts:67` - Issue description
141
+
142
+ **Suggestions** (style, readability)
143
+
144
+ - `file.ts:89` - Issue description
145
+
146
+ **Summary**: X critical, Y important, Z suggestions across N files.
147
+
148
+ ### Step 6: Offer Actions (for PRs)
149
+
150
+ After presenting the report, offer:
151
+
152
+ - "Would you like me to post this as a PR comment?"
153
+ - "Should I suggest fixes for any of these issues?"
154
+ - "Want me to check out this branch and fix the critical issues?"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-codex",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or creating new entries.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,14 +1,15 @@
1
1
  name: codex
2
2
  description: "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Use when loading project context, searching codex, capturing decisions, or creating new entries."
3
- version: 0.1.5
3
+ version: 0.1.6
4
4
  status: beta
5
5
 
6
6
  includes:
7
7
  skills:
8
- - name: droid-codex
8
+ - name: codex
9
9
  required: true
10
10
  commands:
11
- - codex
11
+ - name: codex
12
+ is_alias: false
12
13
  agents:
13
14
  - codex-document-processor
14
15
 
@@ -1,78 +1,31 @@
1
1
  ---
2
- description: Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics
2
+ name: codex
3
+ description: "Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics"
3
4
  argument-hint: "[projects | domains | proposals | patterns | topics | {name} | search {query} | new {type} {name} | decision {text}]"
4
- allowed-tools: [Read, Write, Edit, Glob, Grep, Bash(gh:*), Bash(git:*), Bash(ls:*), Bash(mkdir:*)]
5
5
  ---
6
6
 
7
7
  # /codex
8
8
 
9
- Entry point for shared organizational knowledge. See the **codex skill** for full behaviour.
9
+ **User invoked:** `/codex $ARGUMENTS`
10
10
 
11
- > Context is AI's multiplier. This is Orderful's.
12
-
13
- ## Arguments
14
-
15
- $ARGUMENTS
16
-
17
- ## Prerequisites
18
-
19
- Before first use, verify:
20
-
21
- 1. **Repo cloned** at configured `codex_repo` path
22
- 2. **gh CLI** installed and authenticated
23
-
24
- ## Usage
25
-
26
- ```bash
27
- /codex # Show categories (5 total)
28
- /codex projects # List projects
29
- /codex domains # List domains
30
- /codex proposals # List proposals
31
- /codex patterns # List patterns
32
- /codex topics # List topics
33
- /codex {name} # Load entry (searches all categories)
34
- /codex search {query} # Search across everything
35
- /codex new {name} # Scaffold new project (shorthand)
36
- /codex new project {name} # Scaffold new project from templates
37
- /codex new domain {name} # Scaffold new domain entry
38
- /codex new proposal {name} # Scaffold new proposal entry
39
- /codex new pattern {name} # Scaffold new pattern entry
40
- /codex new topic {name} # Scaffold new topic entry
41
- /codex decision {text} # Append to active project's DECISIONS.md
42
- /codex snapshot {type} {file} {name} # Import PDF/markdown to codex
43
- /codex artifact {file} {project} # Add supporting artifact to project
44
- ```
45
-
46
- ## Configuration
47
-
48
- **ALWAYS read `~/.droid/skills/codex/overrides.yaml` first.**
49
-
50
- - `codex_repo` - Path to local orderful-codex repository (required)
51
- - `freshness_days` - Days before showing staleness warning (default: 30)
52
-
53
- ## Behaviour
54
-
55
- Refer to the codex skill for:
56
- - **Loading**: How to search, handle matches, check freshness, auto-generate CONTEXT.md
57
- - **Decisions**: How to append to active project's DECISIONS.md
58
- - **Creating**: How to scaffold new entries (projects, domains, proposals, patterns, topics)
59
-
60
- The skill's `references/` folder contains detailed procedures for each workflow.
11
+ **Your task:** Invoke the **codex skill** with these arguments.
61
12
 
62
13
  ## Examples
63
14
 
64
- ```bash
65
- # Load project context
66
- /codex transaction-templates
67
-
68
- # Search for webhook-related content
69
- /codex search webhook
15
+ - `/codex projects` → List all projects in the codex
16
+ - `/codex transaction-templates` → Load the transaction-templates entry
17
+ - `/codex search webhook` → Search for "webhook" across all codex content
18
+ - `/codex new project billing-v2` → Create new project scaffolding
19
+ - `/codex decision "Use PostgreSQL for audit log"` → Append decision to active project
70
20
 
71
- # Capture a decision during implementation
72
- /codex decision "Using UUIDv7 for IDs because it's sortable and includes timestamp"
21
+ ## Quick Reference
73
22
 
74
- # Create new entries
75
- /codex new domain partnerships
76
- /codex new proposal caching-layer
77
- /codex new topic organization-hierarchy
78
23
  ```
24
+ /codex # Show categories overview
25
+ /codex {name} # Load entry (searches all categories)
26
+ /codex search {query} # Search across everything
27
+ /codex new project {name} # Scaffold new project
28
+ /codex decision {text} # Append to active project's DECISIONS.md
29
+ ```
30
+
31
+ See the **codex skill** for complete documentation and procedures.