@orderful/droid 0.35.4 → 0.36.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/CHANGELOG.md +20 -0
- package/README.md +34 -19
- package/dist/tools/codex/.claude-plugin/plugin.json +2 -2
- package/dist/tools/codex/TOOL.yaml +2 -2
- package/dist/tools/codex/commands/codex.md +1 -1
- package/dist/tools/codex/skills/codex/SKILL.md +120 -329
- package/dist/tools/codex/skills/codex/references/reading-workflows.md +56 -0
- package/dist/tools/codex/skills/codex/references/review/prd.md +49 -0
- package/dist/tools/codex/skills/codex/references/review/workflow.md +40 -230
- package/package.json +1 -1
- package/src/tools/codex/.claude-plugin/plugin.json +2 -2
- package/src/tools/codex/TOOL.yaml +2 -2
- package/src/tools/codex/commands/codex.md +1 -1
- package/src/tools/codex/skills/codex/SKILL.md +120 -329
- package/src/tools/codex/skills/codex/references/reading-workflows.md +56 -0
- package/src/tools/codex/skills/codex/references/review/prd.md +49 -0
- package/src/tools/codex/skills/codex/references/review/workflow.md +40 -230
- package/dist/tools/codex/skills/codex/references/creating.md +0 -112
- package/dist/tools/codex/skills/codex/references/decisions.md +0 -124
- package/dist/tools/codex/skills/codex/references/loading.md +0 -292
- package/dist/tools/codex/skills/codex/references/topics.md +0 -215
- package/src/tools/codex/skills/codex/references/creating.md +0 -112
- package/src/tools/codex/skills/codex/references/decisions.md +0 -124
- package/src/tools/codex/skills/codex/references/loading.md +0 -292
- package/src/tools/codex/skills/codex/references/topics.md +0 -215
|
@@ -1,250 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Review Workflow
|
|
2
2
|
|
|
3
|
-
The `/codex review` command provides
|
|
3
|
+
The `/codex review` command provides conversational PR review for codex documents.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Architecture
|
|
6
6
|
|
|
7
|
-
**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
7
|
+
**Generic flow:** Defined in `{codex_repo}/.codex/workflows/reviewing.md`
|
|
8
|
+
- Loading PR branch
|
|
9
|
+
- Identifying documents
|
|
10
|
+
- Progressive disclosure
|
|
11
|
+
- Conversational navigation
|
|
12
|
+
- Providing feedback
|
|
14
13
|
|
|
15
|
-
**
|
|
16
|
-
|
|
14
|
+
**Review type specifics:** Defined in `references/review/{type}.md` (this folder)
|
|
15
|
+
- File patterns for each document type
|
|
16
|
+
- Section parsing rules
|
|
17
|
+
- Type-specific facilitation guidance
|
|
18
|
+
- Consistency checks
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
# Get codex repo path from config
|
|
20
|
-
codex_repo=$(droid config --get tools.codex.codex_dir)
|
|
20
|
+
## Using the Workflow
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
gh pr view {number} --json files,title,url,headRefName --repo "$codex_repo"
|
|
24
|
-
```
|
|
22
|
+
**Trigger:** `/codex review {type} --pr {number}`
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**Step 3: Checkout PR Branch**
|
|
29
|
-
Check out the PR to read files easily.
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
cd "$codex_repo"
|
|
33
|
-
gh pr checkout {number}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
This creates/switches to the PR branch locally.
|
|
37
|
-
|
|
38
|
-
**Step 4: Identify Files**
|
|
39
|
-
Match the file list against patterns in `references/review/{type}.md`.
|
|
40
|
-
|
|
41
|
-
For tech-design:
|
|
42
|
-
- **Primary:** `**/TECH-DESIGN.md`
|
|
43
|
-
- **Context:** `**/thought-doc.md` (optional)
|
|
44
|
-
|
|
45
|
-
Find files using:
|
|
46
|
-
```bash
|
|
47
|
-
find . -name "TECH-DESIGN.md" -type f
|
|
48
|
-
find . -name "thought-doc.md" -type f
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Step 5: Read Content**
|
|
52
|
-
Read identified files using the Read tool. Count lines for display.
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
wc -l {path_to_primary} # Get line count
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
**Error Handling:**
|
|
59
|
-
|
|
60
|
-
**PR not found:**
|
|
61
|
-
```bash
|
|
62
|
-
gh pr view {number} --repo "$codex_repo"
|
|
63
|
-
# Check exit code
|
|
64
|
-
if [ $? -ne 0 ]; then
|
|
65
|
-
echo "❌ PR #{number} not found in codex repo"
|
|
66
|
-
exit 1
|
|
67
|
-
fi
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**TECH-DESIGN.md not found:**
|
|
71
|
-
If `find . -name "TECH-DESIGN.md"` returns nothing:
|
|
72
|
-
```
|
|
73
|
-
❌ No TECH-DESIGN.md found in PR #{number}
|
|
74
|
-
|
|
75
|
-
This PR doesn't appear to contain a tech design document.
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**thought-doc.md missing (optional):**
|
|
79
|
-
If not found, continue without it:
|
|
80
|
-
```
|
|
81
|
-
⚠️ No thought-doc.md found - context search will be limited
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**gh CLI fails:**
|
|
85
|
-
```
|
|
86
|
-
❌ Failed to fetch PR details. Is gh CLI authenticated?
|
|
87
|
-
|
|
88
|
-
Try: gh auth status
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
## 2. Parsing Structure
|
|
92
|
-
|
|
93
|
-
**Step 1: Parse Sections**
|
|
94
|
-
Read the **Primary** document and extract H2 headers (lines starting with `## `).
|
|
95
|
-
|
|
96
|
-
Extract using pattern: `^##\s+(.+)$`
|
|
97
|
-
- Match lines starting with `##` followed by whitespace
|
|
98
|
-
- Capture everything after as the section name
|
|
99
|
-
- Strip leading/trailing whitespace
|
|
100
|
-
- Ignore H3 headers (`###`) for MVP - treat as content within sections
|
|
101
|
-
|
|
102
|
-
Example parsing:
|
|
103
|
-
```
|
|
104
|
-
## TL;DR → Section: "TL;DR"
|
|
105
|
-
## Problem → Section: "Problem"
|
|
106
|
-
### Sub-problem → (ignored, part of Problem section)
|
|
107
|
-
## Solution → Section: "Solution"
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Step 2: Display Overview**
|
|
111
|
-
Output a dynamic summary based on the actual PR content:
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
📋 Review: {PR Title} (PR #{number})
|
|
115
|
-
|
|
116
|
-
Documents loaded:
|
|
117
|
-
✓ {path_to_primary} ({line_count} lines)
|
|
118
|
-
✓ {path_to_context} ({line_count} lines) [if found]
|
|
119
|
-
|
|
120
|
-
Structure ({count} sections):
|
|
121
|
-
1. {First section name}
|
|
122
|
-
2. {Second section name}
|
|
123
|
-
...
|
|
124
|
-
{N}. {Last section name}
|
|
125
|
-
|
|
126
|
-
What would you like to do?
|
|
127
|
-
- Show me a specific section (e.g., "show me the {example section}")
|
|
128
|
-
- Ask questions about decisions (e.g., "why was X rejected?")
|
|
129
|
-
- Walk through section by section
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
**Note:** All values are dynamic:
|
|
133
|
-
- PR title comes from `gh pr view`
|
|
134
|
-
- File paths come from what's actually in the PR
|
|
135
|
-
- Section count and names come from parsing the TECH-DESIGN.md H2 headers
|
|
136
|
-
- If thought-doc.md not found, only show the primary document
|
|
137
|
-
|
|
138
|
-
**Example output:**
|
|
139
|
-
```
|
|
140
|
-
📋 Review: Transaction Templates Tech Design (PR #128)
|
|
141
|
-
|
|
142
|
-
Documents loaded:
|
|
143
|
-
✓ projects/transaction-templates/TECH-DESIGN.md (250 lines)
|
|
144
|
-
✓ projects/transaction-templates/artifacts/thought-doc.md (380 lines)
|
|
145
|
-
|
|
146
|
-
Structure (8 sections):
|
|
147
|
-
1. TL;DR
|
|
148
|
-
2. Problem
|
|
149
|
-
3. Scope
|
|
150
|
-
4. Solution
|
|
151
|
-
5. Key Decisions
|
|
152
|
-
6. Risks
|
|
153
|
-
7. Rollout
|
|
154
|
-
8. Implementation Phases
|
|
155
|
-
|
|
156
|
-
What would you like to do?
|
|
157
|
-
- Show me a specific section (e.g., "show me the rollout")
|
|
158
|
-
- Ask questions about decisions (e.g., "why was X rejected?")
|
|
159
|
-
- Walk through section by section
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Step 3: Wait for User Request**
|
|
163
|
-
User can now navigate conversationally.
|
|
164
|
-
|
|
165
|
-
## 3. Conversational Navigation
|
|
166
|
-
|
|
167
|
-
Map user requests to actions:
|
|
168
|
-
|
|
169
|
-
**"Show me {section}"**
|
|
170
|
-
1. Match the section name (see Section Matching below)
|
|
171
|
-
2. Read the Primary file
|
|
172
|
-
3. Extract content between `## {Match}` and the next `## ` header
|
|
173
|
-
4. Display the section content
|
|
174
|
-
|
|
175
|
-
**Section Matching Algorithm:**
|
|
176
|
-
|
|
177
|
-
Use case-insensitive substring matching:
|
|
178
|
-
|
|
179
|
-
1. Normalize user input and section names to lowercase
|
|
180
|
-
2. Check if user input is substring of any section name
|
|
181
|
-
3. If single match: use it
|
|
182
|
-
4. If multiple matches: pick the first one (or ask user to clarify)
|
|
183
|
-
5. If no matches: list available sections
|
|
184
|
-
|
|
185
|
-
**Examples:**
|
|
186
|
-
- User: "show rollout" → matches "Rollout"
|
|
187
|
-
- User: "security" → matches "Security Considerations"
|
|
188
|
-
- User: "risks" → matches "Risks"
|
|
189
|
-
- User: "key decisions" → matches "Key Decisions"
|
|
190
|
-
|
|
191
|
-
**"Walk me through it"**
|
|
192
|
-
1. Start with the first section
|
|
193
|
-
2. Display content
|
|
194
|
-
3. Ask "Continue to {Next Section}?"
|
|
195
|
-
4. Repeat until user stops or end of document
|
|
196
|
-
|
|
197
|
-
**"Jump to {section}"**
|
|
198
|
-
Same as "Show me {section}".
|
|
199
|
-
|
|
200
|
-
## 4. Contextual Search (Thought Docs)
|
|
201
|
-
|
|
202
|
-
**Trigger Detection:**
|
|
203
|
-
|
|
204
|
-
If user query contains any of: "why", "rejected", "alternative", "decision", "reason", "chose", "didn't"
|
|
205
|
-
→ Enter context search mode
|
|
206
|
-
|
|
207
|
-
**Term Extraction:**
|
|
24
|
+
**Procedure:**
|
|
208
25
|
|
|
209
|
-
|
|
210
|
-
- Strip question words: "why was", "why did we", "what about"
|
|
211
|
-
- Extract 2-4 word phrases: "event-based approach", "webhook pattern", "async processing"
|
|
212
|
-
- If user mentions specific terms in quotes, use those exactly
|
|
213
|
-
|
|
214
|
-
**Examples:**
|
|
215
|
-
- "Why was event-based rejected?" → search for "event-based"
|
|
216
|
-
- "Why did we choose sync over async?" → search for "sync" and "async"
|
|
217
|
-
- "What about the webhook approach?" → search for "webhook"
|
|
218
|
-
|
|
219
|
-
**Search Process:**
|
|
220
|
-
|
|
221
|
-
1. Search the **Context** document (e.g., `thought-doc.md`) first:
|
|
26
|
+
1. **Read generic workflow:**
|
|
222
27
|
```bash
|
|
223
|
-
|
|
28
|
+
cat {codex_repo}/.codex/workflows/reviewing.md
|
|
224
29
|
```
|
|
225
30
|
|
|
226
|
-
2.
|
|
31
|
+
2. **Read type-specific guidance:**
|
|
227
32
|
|
|
228
|
-
|
|
33
|
+
cat references/review/{type}.md
|
|
229
34
|
|
|
230
|
-
|
|
35
|
+
For example:
|
|
36
|
+
- `/codex review tech-design --pr 123` → Read `references/review/tech-design.md`
|
|
37
|
+
- `/codex review prd --pr 456` → Read `references/review/prd.md`
|
|
231
38
|
|
|
232
|
-
|
|
39
|
+
3. **Follow both:**
|
|
40
|
+
- Generic workflow for overall flow (from codex repo)
|
|
41
|
+
- Type-specific guidance for facilitation details (from this folder)
|
|
233
42
|
|
|
234
|
-
|
|
43
|
+
## Available Review Types
|
|
235
44
|
|
|
236
|
-
|
|
237
|
-
|
|
45
|
+
| Type | File | Purpose |
|
|
46
|
+
|------|------|---------|
|
|
47
|
+
| tech-design | tech-design.md | Technical design document review with section navigation |
|
|
48
|
+
| prd | prd.md | Product requirements document review with section navigation |
|
|
238
49
|
|
|
239
|
-
|
|
50
|
+
## Facilitation Guidance
|
|
240
51
|
|
|
241
|
-
|
|
242
|
-
> order and handling failures. The synchronous API approach is
|
|
243
|
-
> simpler and sufficient for the MVP requirements. We considered
|
|
244
|
-
> event streaming but decided it was premature optimization.
|
|
52
|
+
Review types provide specialized AI instructions for:
|
|
245
53
|
|
|
246
|
-
|
|
247
|
-
|
|
54
|
+
- **Progressive disclosure:** How to reveal sections
|
|
55
|
+
- **Contextual search:** Where to find "why" context (thought docs, research)
|
|
56
|
+
- **Navigation patterns:** Natural language commands ("show alternatives", "next")
|
|
57
|
+
- **Consistency checks:** Type-specific validation rules
|
|
58
|
+
- **Feedback format:** How to structure review comments
|
|
248
59
|
|
|
249
|
-
|
|
250
|
-
*For MVP, we just display content. Users can use `gh pr comment` manually if they want, but the tool focuses on reading.*
|
|
60
|
+
This ensures the AI facilitates an effective review rather than just reading the document.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droid-codex",
|
|
3
|
-
"version": "0.
|
|
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.",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Self-describing: structure and workflows defined in codex repo. Use when loading project context, searching codex, capturing decisions, or creating new entries.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Orderful",
|
|
7
7
|
"url": "https://github.com/orderful"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: codex
|
|
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.
|
|
2
|
+
description: "Shared organizational knowledge - PRDs, tech designs, domains, proposals, patterns, and explored topics. Self-describing: structure and workflows defined in codex repo. Use when loading project context, searching codex, capturing decisions, or creating new entries."
|
|
3
|
+
version: 0.3.0
|
|
4
4
|
status: beta
|
|
5
5
|
|
|
6
6
|
includes:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: codex
|
|
3
|
-
description: "Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics"
|
|
3
|
+
description: "Shared organizational knowledge - PRDs, tech designs, patterns, domains, proposals, and explored topics. Self-describing: structure and workflows defined in codex repo."
|
|
4
4
|
argument-hint: "[projects | search {query} | {category} search {query} | new {category} {name} | decision {text}]"
|
|
5
5
|
---
|
|
6
6
|
|