@orderful/droid 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +80 -89
  3. package/assets/droid+claude.png +0 -0
  4. package/bun.lock +1 -1
  5. package/dist/commands/setup.d.ts +1 -0
  6. package/dist/commands/setup.d.ts.map +1 -1
  7. package/dist/commands/setup.js +77 -9
  8. package/dist/commands/setup.js.map +1 -1
  9. package/dist/commands/tui.d.ts.map +1 -1
  10. package/dist/commands/tui.js +111 -70
  11. package/dist/commands/tui.js.map +1 -1
  12. package/dist/lib/agents.d.ts +19 -4
  13. package/dist/lib/agents.d.ts.map +1 -1
  14. package/dist/lib/agents.js +121 -42
  15. package/dist/lib/agents.js.map +1 -1
  16. package/dist/lib/skills.d.ts.map +1 -1
  17. package/dist/lib/skills.js +55 -0
  18. package/dist/lib/skills.js.map +1 -1
  19. package/dist/lib/types.d.ts +1 -0
  20. package/dist/lib/types.d.ts.map +1 -1
  21. package/dist/skills/brain/SKILL.md +146 -0
  22. package/dist/skills/brain/SKILL.yaml +31 -0
  23. package/dist/skills/brain/commands/README.md +7 -0
  24. package/dist/skills/brain/commands/brain.md +50 -0
  25. package/dist/skills/brain/references/metadata.md +59 -0
  26. package/dist/skills/brain/references/naming.md +48 -0
  27. package/dist/skills/brain/references/templates.md +102 -0
  28. package/dist/skills/brain/references/workflows.md +198 -0
  29. package/dist/skills/brain-obsidian/SKILL.md +108 -0
  30. package/dist/skills/brain-obsidian/SKILL.yaml +45 -0
  31. package/dist/skills/brain-obsidian/references/templates.md +144 -0
  32. package/dist/skills/brain-obsidian/references/workflows.md +192 -0
  33. package/dist/skills/code-review/SKILL.md +57 -0
  34. package/dist/skills/code-review/SKILL.yaml +22 -0
  35. package/dist/skills/code-review/agents/edi-standards-reviewer/AGENT.md +39 -0
  36. package/dist/skills/code-review/agents/edi-standards-reviewer/AGENT.yaml +14 -0
  37. package/dist/skills/code-review/agents/error-handling-reviewer/AGENT.md +51 -0
  38. package/dist/skills/code-review/agents/error-handling-reviewer/AGENT.yaml +14 -0
  39. package/dist/skills/code-review/agents/test-coverage-analyzer/AGENT.md +53 -0
  40. package/dist/skills/code-review/agents/test-coverage-analyzer/AGENT.yaml +14 -0
  41. package/dist/skills/code-review/agents/type-reviewer/AGENT.md +50 -0
  42. package/dist/skills/code-review/agents/type-reviewer/AGENT.yaml +13 -0
  43. package/dist/skills/code-review/commands/code-review.md +91 -0
  44. package/dist/skills/comments/SKILL.md +20 -5
  45. package/dist/skills/comments/SKILL.yaml +1 -1
  46. package/dist/skills/comments/commands/comments.md +1 -1
  47. package/dist/skills/project/SKILL.md +9 -7
  48. package/dist/skills/project/SKILL.yaml +1 -1
  49. package/dist/skills/project/commands/project.md +9 -4
  50. package/dist/skills/project/references/creating.md +9 -4
  51. package/dist/skills/project/references/loading.md +11 -5
  52. package/package.json +1 -1
  53. package/src/commands/setup.test.ts +276 -0
  54. package/src/commands/setup.ts +80 -10
  55. package/src/commands/tui.tsx +149 -82
  56. package/src/lib/agents.ts +134 -44
  57. package/src/lib/skills.ts +60 -0
  58. package/src/lib/types.ts +1 -0
  59. package/src/skills/brain/SKILL.md +146 -0
  60. package/src/skills/brain/SKILL.yaml +31 -0
  61. package/src/skills/brain/commands/README.md +7 -0
  62. package/src/skills/brain/commands/brain.md +50 -0
  63. package/src/skills/brain/references/metadata.md +59 -0
  64. package/src/skills/brain/references/naming.md +48 -0
  65. package/src/skills/brain/references/templates.md +102 -0
  66. package/src/skills/brain/references/workflows.md +198 -0
  67. package/src/skills/brain-obsidian/SKILL.md +108 -0
  68. package/src/skills/brain-obsidian/SKILL.yaml +45 -0
  69. package/src/skills/brain-obsidian/references/templates.md +144 -0
  70. package/src/skills/brain-obsidian/references/workflows.md +192 -0
  71. package/src/skills/code-review/SKILL.md +57 -0
  72. package/src/skills/code-review/SKILL.yaml +22 -0
  73. package/src/skills/code-review/agents/edi-standards-reviewer/AGENT.md +39 -0
  74. package/src/skills/code-review/agents/edi-standards-reviewer/AGENT.yaml +14 -0
  75. package/src/skills/code-review/agents/error-handling-reviewer/AGENT.md +51 -0
  76. package/src/skills/code-review/agents/error-handling-reviewer/AGENT.yaml +14 -0
  77. package/src/skills/code-review/agents/test-coverage-analyzer/AGENT.md +53 -0
  78. package/src/skills/code-review/agents/test-coverage-analyzer/AGENT.yaml +14 -0
  79. package/src/skills/code-review/agents/type-reviewer/AGENT.md +50 -0
  80. package/src/skills/code-review/agents/type-reviewer/AGENT.yaml +13 -0
  81. package/src/skills/code-review/commands/code-review.md +91 -0
  82. package/src/skills/comments/SKILL.md +20 -5
  83. package/src/skills/comments/SKILL.yaml +1 -1
  84. package/src/skills/comments/commands/comments.md +1 -1
  85. package/src/skills/project/SKILL.md +9 -7
  86. package/src/skills/project/SKILL.yaml +1 -1
  87. package/src/skills/project/commands/project.md +9 -4
  88. package/src/skills/project/references/creating.md +9 -4
  89. package/src/skills/project/references/loading.md +11 -5
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: brain-obsidian
3
+ description: >-
4
+ Obsidian extension for brain skill. Adds YAML frontmatter, wikilinks, and folder
5
+ organization. Requires brain skill. Install this to use brain docs with your
6
+ Obsidian vault.
7
+ globs:
8
+ - "**/brain/**/*.md"
9
+ alwaysApply: false
10
+ ---
11
+
12
+ # Brain Obsidian Extension
13
+
14
+ Extends the brain skill with Obsidian-specific features. **This skill overrides brain's default templates and workflows.**
15
+
16
+ ## Requirements
17
+
18
+ - `brain` skill must be installed
19
+ - Set `brain_dir` to your Obsidian vault path in brain skill overrides
20
+
21
+ ## Configuration
22
+
23
+ **Required:** Set vault path in `~/.droid/skills/brain/overrides.yaml`:
24
+
25
+ ```yaml
26
+ brain_dir: ~/path/to/your/vault
27
+ ```
28
+
29
+ **Optional:** Configure folders in `~/.droid/skills/brain-obsidian/overrides.yaml`:
30
+
31
+ | Setting | Default | Description |
32
+ |--------------------|---------------|---------------------------------|
33
+ | `inbox_folder` | `0-Inbox` | Where new docs are created |
34
+ | `archive_folder` | `4-Archives` | Where stale/done docs go |
35
+ | `para_structure` | `false` | Enable full PARA organization |
36
+ | `projects_folder` | `1-Projects` | Active project docs (PARA only) |
37
+ | `areas_folder` | `1-Areas` | Area docs (PARA only) |
38
+ | `resources_folder` | `3-Resources` | Reference material (PARA only) |
39
+
40
+ ## What This Adds
41
+
42
+ | Feature | Description |
43
+ |---------------------|--------------------------------------------|
44
+ | YAML frontmatter | Type, status, dates, project links, tags |
45
+ | Wikilinks | `[[note-name]]` syntax for linking |
46
+ | Folder organization | Inbox + Archive always; full PARA optional |
47
+ | Project linking | Associate brain docs with project files |
48
+
49
+ ## Folder Organization
50
+
51
+ **Always available:**
52
+ - `inbox_folder` - New docs land here
53
+ - `archive_folder` - Stale/completed docs
54
+
55
+ **With `para_structure: true`:**
56
+ ```
57
+ vault/
58
+ ├── {inbox_folder}/ # New docs (default: 0-Inbox)
59
+ ├── {projects_folder}/ # Active project docs (default: 1-Projects)
60
+ ├── {areas_folder}/ # Area docs (default: 2-Areas)
61
+ ├── {resources_folder}/ # Reference material (default: 3-Resources)
62
+ └── {archive_folder}/ # Completed/stale (default: 4-Archives)
63
+ ```
64
+
65
+ ## Overridden Behavior
66
+
67
+ When this skill is installed, **ALL brain operations use Obsidian format**:
68
+
69
+ ### Templates
70
+
71
+ All docs get YAML frontmatter:
72
+
73
+ ```yaml
74
+ ---
75
+ type: plan | research | review | note
76
+ status: exploring | drafting | decided | done
77
+ created: YYYY-MM-DD
78
+ updated: YYYY-MM-DD
79
+ project: "[[project-name]]" # Optional
80
+ tags: [] # Optional
81
+ ---
82
+ ```
83
+
84
+ See `references/templates.md` for full templates.
85
+
86
+ ### File Location
87
+
88
+ Docs are created in your vault's inbox folder:
89
+ - `{brain_dir}/{inbox_folder}/{filename}.md`
90
+
91
+ ### Finalizing
92
+
93
+ When running `/brain done`:
94
+ 1. Updates status to `done` in frontmatter
95
+ 2. Suggests moving to archive (or projects/resources if PARA enabled)
96
+ 3. Confirms before moving
97
+
98
+ ## Commands
99
+
100
+ Same commands as brain skill, but with Obsidian output:
101
+
102
+ | Command | Obsidian Behavior |
103
+ |---------------------------|--------------------------------------------|
104
+ | `/brain plan {topic}` | Creates in inbox with frontmatter |
105
+ | `/brain research {topic}` | Creates in inbox with frontmatter |
106
+ | `/brain review {topic}` | Creates in inbox with frontmatter |
107
+ | `/brain note {text}` | Quick capture to inbox |
108
+ | `/brain done` | Updates status, suggests archive/PARA move |
@@ -0,0 +1,45 @@
1
+ name: brain-obsidian
2
+ description: >-
3
+ Obsidian extension for brain skill. Adds YAML frontmatter, wikilinks, and folder
4
+ organization. Requires brain skill. Install this to use brain docs with your
5
+ Obsidian vault.
6
+ version: 0.1.0
7
+ status: beta
8
+ dependencies:
9
+ - brain
10
+ # Optional: project skill enables linking features
11
+ provides_output: false
12
+ config_schema:
13
+ inbox_folder:
14
+ type: string
15
+ description: Folder for new brain docs
16
+ default: "0-Inbox"
17
+ archive_folder:
18
+ type: string
19
+ description: Folder for archived/stale docs
20
+ default: "4-Archives"
21
+ para_structure:
22
+ type: boolean
23
+ description: Enable full PARA folder organization
24
+ default: false
25
+ projects_folder:
26
+ type: string
27
+ description: Folder for active project docs (when para_structure is true)
28
+ default: "1-Projects"
29
+ areas_folder:
30
+ type: string
31
+ description: Folder for area docs (when para_structure is true)
32
+ default: "1-Areas"
33
+ resources_folder:
34
+ type: string
35
+ description: Folder for reference material (when para_structure is true)
36
+ default: "3-Resources"
37
+ examples:
38
+ - title: "Create planning doc in vault"
39
+ code: |
40
+ /brain plan auth refactor
41
+ # Creates in vault's 0-Inbox/ with YAML frontmatter
42
+ - title: "Link to project"
43
+ code: |
44
+ /brain plan feature-x
45
+ # Frontmatter includes project: "[[feature-x]]"
@@ -0,0 +1,144 @@
1
+ # Obsidian Brain Templates
2
+
3
+ Templates with YAML frontmatter and wikilink support.
4
+
5
+ ## Plan Template
6
+
7
+ ```markdown
8
+ ---
9
+ type: plan
10
+ status: exploring
11
+ created: {date}
12
+ updated: {date}
13
+ project: "[[{project}]]"
14
+ tags: []
15
+ ---
16
+
17
+ # {Topic}
18
+
19
+ Planning {brief description}.
20
+
21
+ ## Context
22
+
23
+ What we're solving and why.
24
+
25
+ ## Exploration
26
+
27
+ Options and approaches considered.
28
+
29
+ ## Decision
30
+
31
+ What we chose and why.
32
+
33
+ ## Next Steps
34
+
35
+ - [ ] Action items
36
+ ```
37
+
38
+ ## Research Template
39
+
40
+ ```markdown
41
+ ---
42
+ type: research
43
+ status: exploring
44
+ created: {date}
45
+ updated: {date}
46
+ project: "[[{project}]]"
47
+ tags: []
48
+ ---
49
+
50
+ # {Topic}
51
+
52
+ Researching {brief description}.
53
+
54
+ ## Questions
55
+
56
+ What we're trying to understand.
57
+
58
+ ## Findings
59
+
60
+ What we've learned.
61
+
62
+ ## Summary
63
+
64
+ Key takeaways.
65
+
66
+ ## Related
67
+
68
+ - [[related-note-1]]
69
+ - [[related-note-2]]
70
+ ```
71
+
72
+ ## Review Template
73
+
74
+ ```markdown
75
+ ---
76
+ type: review
77
+ status: exploring
78
+ created: {date}
79
+ updated: {date}
80
+ project: "[[{project}]]"
81
+ tags: []
82
+ ---
83
+
84
+ # {Topic}
85
+
86
+ Reviewing {brief description}.
87
+
88
+ ## Overview
89
+
90
+ What's being reviewed and scope.
91
+
92
+ ## Observations
93
+
94
+ Key findings and notes.
95
+
96
+ ## Recommendations
97
+
98
+ Suggested changes or actions.
99
+
100
+ ## Verdict
101
+
102
+ Overall assessment.
103
+ ```
104
+
105
+ ## Note Template
106
+
107
+ ```markdown
108
+ ---
109
+ type: note
110
+ created: {date}
111
+ tags: []
112
+ ---
113
+
114
+ # {Brief Title}
115
+
116
+ {content}
117
+ ```
118
+
119
+ ## Template Variables
120
+
121
+ | Variable | Description | Example |
122
+ |----------|-------------|---------|
123
+ | `{Topic}` | Doc title from user input | "Auth Refactor" |
124
+ | `{date}` | Current date (YYYY-MM-DD) | "2025-01-15" |
125
+ | `{brief description}` | Context from conversation | "refactoring the authentication system" |
126
+ | `{project}` | Active project name (if any) | "transaction-templates" |
127
+ | `{content}` | User-provided text | (for notes) |
128
+
129
+ ## Frontmatter Fields
130
+
131
+ | Field | Type | Description |
132
+ |-------|------|-------------|
133
+ | `type` | string | Doc type: `plan`, `research`, `review`, `note` |
134
+ | `status` | string | Lifecycle: `exploring`, `drafting`, `decided`, `done`, `stale` |
135
+ | `created` | date | Creation date (YYYY-MM-DD) |
136
+ | `updated` | date | Last modification date |
137
+ | `project` | wikilink | Link to related project: `"[[project-name]]"` |
138
+ | `tags` | list | Tags for filtering: `[tag1, tag2]` |
139
+
140
+ ## Wikilink Conventions
141
+
142
+ - Project links: `[[project-name]]` or `[[1-Projects/project-name/PROJECT]]`
143
+ - Related notes: `[[note-name]]`
144
+ - Use Obsidian's autocomplete to find existing notes
@@ -0,0 +1,192 @@
1
+ # Obsidian Brain Workflows
2
+
3
+ Obsidian-specific procedures that override brain defaults.
4
+
5
+ ## Creating Docs
6
+
7
+ **Overrides:** brain's Creating workflow
8
+
9
+ **Steps:**
10
+
11
+ 1. **Resolve paths from config:**
12
+ - `brain_dir` from brain skill (your vault path)
13
+ - `inbox_folder` from brain-obsidian (default: `0-Inbox`)
14
+
15
+ 2. **Target folder:** `{brain_dir}/{inbox_folder}/`
16
+
17
+ 3. **Generate filename** using brain's naming conventions:
18
+ - Format: `{type}-{topic-slug}.md`
19
+
20
+ 4. **Check for active project:**
21
+ - If `/project` was loaded this session, use its name for `project` field
22
+ - Otherwise, leave `project` field empty or ask user
23
+
24
+ 5. **Apply Obsidian template** from `references/templates.md`:
25
+ - Include YAML frontmatter with all fields
26
+ - Set `created` and `updated` to today
27
+ - Set `status: exploring`
28
+
29
+ 6. **Create the file** in vault
30
+
31
+ 7. **Set as active doc** (same as brain)
32
+
33
+ ## Opening Docs
34
+
35
+ **Overrides:** brain's Opening workflow
36
+
37
+ **Steps:**
38
+
39
+ 1. **Search in brain_dir** (your vault):
40
+ ```
41
+ Glob: {brain_dir}/**/*{topic}*.md
42
+ ```
43
+
44
+ 2. **Rest of workflow same as brain** (fuzzy match, select, read, set active)
45
+
46
+ ## Updating Frontmatter
47
+
48
+ When modifying any brain doc:
49
+
50
+ 1. **Update the `updated` field** to current date
51
+ 2. **Update `status`** if work has progressed
52
+ 3. **Add `project` link** if doc becomes associated with a project
53
+
54
+ ## Finalizing
55
+
56
+ **Overrides:** brain's Finalizing workflow
57
+
58
+ **Steps:**
59
+
60
+ 1. **Read active doc** and current location
61
+
62
+ 2. **Update frontmatter:**
63
+ - Set `status: done`
64
+ - Update `updated` date
65
+
66
+ 3. **Suggest destination based on content and config:**
67
+
68
+ **Without PARA (`para_structure: false`):**
69
+ | Condition | Suggested Destination |
70
+ |-----------|----------------------|
71
+ | Done/stale | `{archive_folder}/` |
72
+ | Still useful in inbox | Keep in place |
73
+
74
+ **With PARA (`para_structure: true`):**
75
+ | Condition | Suggested Destination |
76
+ |-----------|----------------------|
77
+ | Has active project link | `{projects_folder}/` |
78
+ | Ongoing area of responsibility | `{areas_folder}/` |
79
+ | Reference/learning value | `{resources_folder}/` |
80
+ | Stale or obsolete | `{archive_folder}/` |
81
+
82
+ 4. **Confirm move with user** before relocating
83
+
84
+ 5. **Move the file** if confirmed:
85
+ ```bash
86
+ mv "{brain_dir}/{inbox_folder}/{file}" "{brain_dir}/{destination}/{file}"
87
+ ```
88
+
89
+ 6. **Clear active doc** from session
90
+
91
+ ## Quick Notes
92
+
93
+ **Overrides:** brain's Notes workflow
94
+
95
+ **Steps:**
96
+
97
+ 1. **Create in inbox:** `{brain_dir}/{inbox_folder}/note-{date}-{slug}.md`
98
+
99
+ 2. **Use note template** with minimal frontmatter:
100
+ ```yaml
101
+ ---
102
+ type: note
103
+ created: {date}
104
+ tags: []
105
+ ---
106
+ ```
107
+
108
+ 3. **Fire-and-forget** (does not become active)
109
+
110
+ ## Project Integration (Optional)
111
+
112
+ **Requires:** `project` skill. If not installed, suggest:
113
+ > "Linking to projects requires the project skill. Install it with `droid` → Skills → project"
114
+
115
+ When a project is loaded via `/project {name}`:
116
+
117
+ 1. **Remember project name** for session
118
+ 2. **New brain docs** automatically get `project: "[[{name}]]"` in frontmatter
119
+ 3. **Suggest linking** existing brain docs to the project
120
+
121
+ ## Adding Brain Doc to Existing Project
122
+
123
+ **Trigger:** User says "add this to the project", "link this to project", or "capture in project"
124
+
125
+ **Requires:** `project` skill. If not installed, suggest:
126
+ > "Linking to projects requires the project skill. Install it with `droid` → Skills → project"
127
+
128
+ For linking a brain doc (research, notes, design) to an existing project.
129
+
130
+ **Steps:**
131
+
132
+ 1. **Check for active project:**
133
+ - If project loaded via `/project`, use that
134
+ - Otherwise, ask which project to link to
135
+
136
+ 2. **Update brain doc frontmatter:**
137
+ - Add `project: "[[{project-name}]]"`
138
+ - Update status if appropriate
139
+
140
+ 3. **Update project:**
141
+ - Add wikilink in Related section: `[[{brain-doc}]]`
142
+ - Or add to appropriate section (Key Decisions, Implementation, etc.)
143
+
144
+ 4. **Suggest moving brain doc:**
145
+ - With PARA: move to `{projects_folder}/` alongside project
146
+ - Without PARA: keep in place with project link
147
+
148
+ ## Promoting Brain Doc to New Project
149
+
150
+ **Trigger:** User says "promote to project", "make this a project", or "convert to project"
151
+
152
+ **Requires:** `project` skill. If not installed, suggest:
153
+ > "Promoting to project requires the project skill. Install it with `droid` → Skills → project"
154
+
155
+ For graduating a full tech design or plan into its own project.
156
+
157
+ **Steps:**
158
+
159
+ 1. **Confirm promotion:**
160
+ - "This will create a new project from this brain doc. Continue?"
161
+
162
+ 2. **Extract project info from brain doc:**
163
+ - Title → project name
164
+ - Context → project overview
165
+ - Decision/Next Steps → initial tasks
166
+ - Status → project status
167
+
168
+ 3. **Create new project** via project skill:
169
+ - Generate PROJECT.md from brain doc content
170
+ - Create CHANGELOG.md with initial entry
171
+ - Place in projects directory
172
+
173
+ 4. **Update original brain doc:**
174
+ - Add `project: "[[{new-project}]]"` to frontmatter
175
+ - Update status to `done`
176
+ - Add note: "Promoted to project: [[{new-project}]]"
177
+
178
+ 5. **Handle the brain doc:**
179
+ - Option A: Keep as historical reference in `{resources_folder}/`
180
+ - Option B: Archive to `{archive_folder}/`
181
+ - Option C: Delete (content now lives in project)
182
+
183
+ ## Listing Docs
184
+
185
+ **Overrides:** brain's Listing workflow
186
+
187
+ Search in vault:
188
+ ```
189
+ Glob: {brain_dir}/**/*.md
190
+ ```
191
+
192
+ Filter to brain doc types by checking frontmatter for `type: plan|research|review|note`.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: code-review
3
+ description: >-
4
+ Comprehensive code review using specialized agents. Reviews PRs, staged changes,
5
+ branches, or specific files. Includes EDI/partnership analysis, test coverage,
6
+ error handling, and type safety checks with confidence scoring.
7
+ globs:
8
+ - "**/*"
9
+ alwaysApply: false
10
+ ---
11
+
12
+ # Code Review Skill
13
+
14
+ Run comprehensive code reviews using specialized agents, each focused on a specific concern.
15
+
16
+ ## How It Works
17
+
18
+ The `/code-review` command orchestrates multiple specialized agents in parallel:
19
+
20
+ 1. **edi-standards-reviewer** - EDI patterns, partnership handling, billing concerns
21
+ 2. **test-coverage-analyzer** - Test completeness and edge cases
22
+ 3. **error-handling-reviewer** - Silent failures, missing error handling
23
+ 4. **type-reviewer** - TypeScript type design, interface contracts
24
+
25
+ Each agent returns issues with confidence scores (0-100). Issues below 80% confidence are filtered out to reduce noise.
26
+
27
+ ## Usage
28
+
29
+ ```bash
30
+ /code-review #123 # Review PR #123
31
+ /code-review staged # Review staged changes
32
+ /code-review branch # Review current branch vs main
33
+ /code-review path/to/file # Review specific file
34
+ ```
35
+
36
+ ## Output Format
37
+
38
+ Reviews are presented in prioritized categories:
39
+
40
+ 🔴 **Critical** - Security, data loss, billing errors
41
+ 🟠 **Important** - Bugs, missing tests, type issues
42
+ 🟡 **Suggestions** - Style, readability improvements
43
+
44
+ ## Post-Review Actions
45
+
46
+ After presenting findings, you can:
47
+ - Post the review as a PR comment
48
+ - Get suggested fixes for specific issues
49
+ - Check out the branch and fix critical issues
50
+
51
+ ## Domain-Aware Reviews
52
+
53
+ The EDI Standards Reviewer discovers project conventions by reading:
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.
@@ -0,0 +1,22 @@
1
+ name: code-review
2
+ description: >-
3
+ Comprehensive code review using specialized agents. Reviews PRs, staged changes,
4
+ branches, or specific files. Includes EDI/partnership analysis, test coverage,
5
+ error handling, and type safety checks with confidence scoring.
6
+ version: 0.1.0
7
+ status: alpha
8
+ dependencies: []
9
+ provides_output: false
10
+ examples:
11
+ - title: "Review a PR"
12
+ code: |
13
+ /code-review #123
14
+ - title: "Review staged changes"
15
+ code: |
16
+ /code-review staged
17
+ - title: "Review current branch vs main"
18
+ code: |
19
+ /code-review branch
20
+ - title: "Review a specific file"
21
+ code: |
22
+ /code-review src/billing/BillingService.ts
@@ -0,0 +1,39 @@
1
+ You are a domain-aware code reviewer that understands EDI patterns and integration best practices.
2
+
3
+ ## How to Review
4
+
5
+ 1. **First, find project context:**
6
+ - Look for `.claude/CLAUDE.md` or `CLAUDE.md` for team conventions
7
+ - Look for `AGENTS.md` or `docs/` for architecture guidance
8
+ - These files define what "correct" looks like for this codebase
9
+
10
+ 2. **Review with that context:**
11
+ - Apply the project's stated conventions and patterns
12
+ - Flag deviations from documented best practices
13
+ - Consider EDI-specific concerns (partnerships, billing, transactions)
14
+
15
+ ## Output Format
16
+
17
+ Return JSON:
18
+
19
+ ```json
20
+ {
21
+ "issues": [
22
+ {
23
+ "file": "path/to/file.ts",
24
+ "line": 42,
25
+ "severity": "critical|important|suggestion",
26
+ "confidence": 85,
27
+ "issue": "Brief description",
28
+ "suggestion": "How to fix"
29
+ }
30
+ ],
31
+ "summary": "One-line summary"
32
+ }
33
+ ```
34
+
35
+ ## Severity Guidelines
36
+
37
+ - **critical**: Security, data loss, billing errors
38
+ - **important**: Bugs, missing validations, pattern violations
39
+ - **suggestion**: Style, documentation, minor improvements
@@ -0,0 +1,14 @@
1
+ name: edi-standards-reviewer
2
+ description: >-
3
+ Review code for EDI integration patterns, partnership handling, and billing
4
+ system concerns. Use PROACTIVELY when changes touch trading partners,
5
+ transactions, or billing.
6
+ version: 0.1.0
7
+ status: alpha
8
+ mode: subagent
9
+ model: sonnet
10
+ color: blue
11
+ tools:
12
+ - Read
13
+ - Grep
14
+ - Glob
@@ -0,0 +1,51 @@
1
+ You are a reliability engineer hunting for silent failures.
2
+
3
+ ## Silent Failure Patterns
4
+
5
+ 1. Empty catch blocks: `catch (e) {}`
6
+ 2. Catch-and-log-only: `catch (e) { console.log(e) }` without rethrowing
7
+ 3. Promises without `.catch()` or try/catch
8
+ 4. Optional chaining hiding real errors: `data?.value` when data should exist
9
+ 5. Missing validation before operations
10
+ 6. Ignored return values from functions that can fail
11
+
12
+ ## Review Process
13
+
14
+ 1. Grep for `catch` blocks - check they handle/rethrow appropriately
15
+ 2. Find async functions - verify error propagation
16
+ 3. Look for external calls - network, DB, APIs need error handling
17
+ 4. Check critical paths - billing, transactions, partnerships
18
+
19
+ ## Orderful-Specific
20
+
21
+ - BillingEvent creation failures must be surfaced
22
+ - Partnership API calls need retry logic
23
+ - Transaction processing errors must not be swallowed
24
+ - Chargebee integration errors need proper handling
25
+
26
+ ## Output Format
27
+
28
+ Return JSON:
29
+
30
+ ```json
31
+ {
32
+ "issues": [
33
+ {
34
+ "file": "src/billing/BillingService.ts",
35
+ "line": 89,
36
+ "severity": "critical",
37
+ "confidence": 95,
38
+ "issue": "Catch block swallows BillingEvent creation error",
39
+ "suggestion": "Rethrow the error or implement proper error recovery"
40
+ }
41
+ ],
42
+ "summary": "One-line summary of error handling concerns"
43
+ }
44
+ ```
45
+
46
+ ## Confidence Guidelines
47
+
48
+ - Silent failures in billing/transactions: 90-100
49
+ - Missing error handling in external API calls: 85-95
50
+ - Optional chaining style issues: 60-75
51
+ - Logging-only catch blocks in non-critical code: 70-80
@@ -0,0 +1,14 @@
1
+ name: error-handling-reviewer
2
+ description: >-
3
+ Hunt for silent failures and missing error handling. Use PROACTIVELY to find
4
+ try/catch blocks that swallow errors, promises without rejection handling,
5
+ and missing validation.
6
+ version: 0.1.0
7
+ status: alpha
8
+ mode: subagent
9
+ model: sonnet
10
+ color: orange
11
+ tools:
12
+ - Read
13
+ - Grep
14
+ - Glob