@orderful/droid 0.35.4 → 0.37.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 (60) hide show
  1. package/.claude-plugin/marketplace.json +6 -6
  2. package/CHANGELOG.md +36 -0
  3. package/README.md +34 -19
  4. package/dist/tools/brain/.claude-plugin/plugin.json +1 -1
  5. package/dist/tools/brain/TOOL.yaml +1 -1
  6. package/dist/tools/brain/commands/brain.md +3 -2
  7. package/dist/tools/brain/skills/brain/SKILL.md +35 -7
  8. package/dist/tools/brain/skills/brain/references/templates.md +61 -0
  9. package/dist/tools/brain/skills/brain/references/workflows.md +69 -4
  10. package/dist/tools/codex/.claude-plugin/plugin.json +2 -2
  11. package/dist/tools/codex/TOOL.yaml +2 -2
  12. package/dist/tools/codex/commands/codex.md +1 -1
  13. package/dist/tools/codex/skills/codex/SKILL.md +120 -329
  14. package/dist/tools/codex/skills/codex/references/reading-workflows.md +56 -0
  15. package/dist/tools/codex/skills/codex/references/review/prd.md +49 -0
  16. package/dist/tools/codex/skills/codex/references/review/workflow.md +40 -230
  17. package/dist/tools/comments/.claude-plugin/plugin.json +1 -1
  18. package/dist/tools/comments/TOOL.yaml +1 -1
  19. package/dist/tools/comments/skills/comments/SKILL.md +6 -4
  20. package/dist/tools/plan/.claude-plugin/plugin.json +1 -1
  21. package/dist/tools/plan/TOOL.yaml +1 -1
  22. package/dist/tools/plan/commands/plan.md +3 -1
  23. package/dist/tools/plan/skills/plan/SKILL.md +21 -9
  24. package/dist/tools/plan/skills/plan/references/workflows.md +57 -20
  25. package/dist/tools/tech-design/.claude-plugin/plugin.json +1 -1
  26. package/dist/tools/tech-design/TOOL.yaml +1 -1
  27. package/dist/tools/tech-design/skills/tech-design/SKILL.md +6 -4
  28. package/package.json +1 -1
  29. package/src/tools/brain/.claude-plugin/plugin.json +1 -1
  30. package/src/tools/brain/TOOL.yaml +1 -1
  31. package/src/tools/brain/commands/brain.md +3 -2
  32. package/src/tools/brain/skills/brain/SKILL.md +35 -7
  33. package/src/tools/brain/skills/brain/references/templates.md +61 -0
  34. package/src/tools/brain/skills/brain/references/workflows.md +69 -4
  35. package/src/tools/codex/.claude-plugin/plugin.json +2 -2
  36. package/src/tools/codex/TOOL.yaml +2 -2
  37. package/src/tools/codex/commands/codex.md +1 -1
  38. package/src/tools/codex/skills/codex/SKILL.md +120 -329
  39. package/src/tools/codex/skills/codex/references/reading-workflows.md +56 -0
  40. package/src/tools/codex/skills/codex/references/review/prd.md +49 -0
  41. package/src/tools/codex/skills/codex/references/review/workflow.md +40 -230
  42. package/src/tools/comments/.claude-plugin/plugin.json +1 -1
  43. package/src/tools/comments/TOOL.yaml +1 -1
  44. package/src/tools/comments/skills/comments/SKILL.md +6 -4
  45. package/src/tools/plan/.claude-plugin/plugin.json +1 -1
  46. package/src/tools/plan/TOOL.yaml +1 -1
  47. package/src/tools/plan/commands/plan.md +3 -1
  48. package/src/tools/plan/skills/plan/SKILL.md +21 -9
  49. package/src/tools/plan/skills/plan/references/workflows.md +57 -20
  50. package/src/tools/tech-design/.claude-plugin/plugin.json +1 -1
  51. package/src/tools/tech-design/TOOL.yaml +1 -1
  52. package/src/tools/tech-design/skills/tech-design/SKILL.md +6 -4
  53. package/dist/tools/codex/skills/codex/references/creating.md +0 -112
  54. package/dist/tools/codex/skills/codex/references/decisions.md +0 -124
  55. package/dist/tools/codex/skills/codex/references/loading.md +0 -292
  56. package/dist/tools/codex/skills/codex/references/topics.md +0 -215
  57. package/src/tools/codex/skills/codex/references/creating.md +0 -112
  58. package/src/tools/codex/skills/codex/references/decisions.md +0 -124
  59. package/src/tools/codex/skills/codex/references/loading.md +0 -292
  60. package/src/tools/codex/skills/codex/references/topics.md +0 -215
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: brain
3
3
  description: "Collaborative scratchpad for planning and research. Use when planning a feature, exploring a problem, or capturing thinking that should persist across sessions. User prompts like 'let's think through', 'open a scratchpad', 'plan this out', 'use our brain'."
4
- argument-hint: "[search {topic} | {category} {topic} | add {text} | check | done]"
4
+ argument-hint: "[search {topic} | {category} {topic} | add {text} | check | cleanup | done]"
5
5
  allowed-tools: [Read, Write, Glob, Grep, Bash]
6
6
  ---
7
7
 
@@ -46,7 +46,7 @@ brain_dir: "{user's choice}"
46
46
 
47
47
  ## Commands
48
48
 
49
- **Reserved keywords:** `search`, `add`, `check`, `done`
49
+ **Reserved keywords:** `search`, `add`, `check`, `cleanup`, `done`
50
50
 
51
51
  | Command | Action |
52
52
  | -------------------------------------------- | ------------------------------------------------------ |
@@ -56,6 +56,7 @@ brain_dir: "{user's choice}"
56
56
  | `/brain {category} {topic}` | Create doc → `{category}s/{topic}.md` |
57
57
  | `/brain add {text}` | Append to active doc |
58
58
  | `/brain check` | Address @droid comments in active doc |
59
+ | `/brain cleanup` | Resolve threads, apply changes, log decisions |
59
60
  | `/brain done` | Finalize active doc, update status |
60
61
 
61
62
  **Category is any non-reserved word.** Common categories:
@@ -117,6 +118,21 @@ Find `> @droid` comments in active doc and address each. Preserve original comme
117
118
 
118
119
  Full procedure: `references/workflows.md` § Checking
119
120
 
121
+ ## Cleaning Up Resolved Threads
122
+
123
+ **Trigger:** `/brain cleanup` or user says "let's clean up", "resolve these threads", "lock in decisions"
124
+
125
+ Find resolved discussion threads (where a decision was reached or question answered), apply any agreed changes, and log to the bottom of the file.
126
+
127
+ 1. Scan for `@droid` / `@{user_mention}` comment threads
128
+ 2. Identify threads where a decision was made, idea was locked in, or question was resolved
129
+ 3. Apply any agreed changes to the doc if not already done
130
+ 4. Move resolved threads to logs at the bottom:
131
+ - **Decision Log** — What was decided (one-liner per decision)
132
+ - **Discussion Log** — Full thread history for reference
133
+
134
+ Full procedure: `references/workflows.md` § Cleanup
135
+
120
136
  ## Finalizing
121
137
 
122
138
  **Trigger:** `/brain done`
@@ -129,12 +145,24 @@ Full procedure: `references/workflows.md` § Finalizing
129
145
 
130
146
  In markdown files, use blockquote `>` prefix for @mention comments. The @mention is the **target**, not the author:
131
147
 
132
- | Comment | Author | Target | Meaning |
133
- | -------------- | ------ | ------ | -------------------------- |
134
- | `> @droid ...` | User | AI | User asking/telling the AI |
135
- | `> @user ...` | AI | User | AI asking/telling the user |
148
+ | Comment | Author | Target | Meaning |
149
+ | ------------------------ | ------ | ------ | -------------------------- |
150
+ | `> @droid ...` | User | AI | User asking/telling the AI |
151
+ | `> @{user_mention} ...` | AI | User | AI asking/telling the user |
152
+
153
+ Get `user_mention` from `droid config --get user_mention`.
154
+
155
+ **CRITICAL:** When the AI writes comments to address the user, ALWAYS use `@{user_mention}`. NEVER use `@droid` — that's reserved for user-to-AI comments only.
156
+
157
+ If droid's `comments` skill is installed, use `/comments check` for full support.
158
+
159
+ ## Natural Language Triggers
136
160
 
137
- Get `user_mention` from `droid config --get user_mention`. If droid's `comments` skill is installed, use `/comments check` for full support.
161
+ Recognise cleanup intent and offer `/brain cleanup`:
162
+ - "Let's clean up these threads"
163
+ - "Can we resolve these discussions?"
164
+ - "Lock in these decisions"
165
+ - "Archive the resolved stuff"
138
166
 
139
167
  ## Extensions
140
168
 
@@ -133,3 +133,64 @@ Overall assessment.
133
133
  | `{date}` | Current date (YYYY-MM-DD) | "2025-01-15" |
134
134
  | `{brief description}` | Context from conversation | "refactoring the authentication system" |
135
135
  | `{content}` | User-provided text | (for notes) |
136
+
137
+ ---
138
+
139
+ ## Log Templates
140
+
141
+ These logs are appended to the bottom of brain docs by `/brain cleanup`. They preserve the history of how decisions were made without cluttering the main content.
142
+
143
+ ### Decision Log
144
+
145
+ A table of one-liner decisions for quick reference:
146
+
147
+ ```markdown
148
+ ---
149
+
150
+ ## Decision Log
151
+
152
+ | Date | Decision |
153
+ | ---------- | ----------------------------------------------------- |
154
+ | 2026-01-28 | Use Redis for rate limiting (distributed counters) |
155
+ | 2026-01-27 | Prefer composition over inheritance for handlers |
156
+ | 2026-01-25 | Ship MVP without webhooks, add in v2 |
157
+ ```
158
+
159
+ ### Discussion Log
160
+
161
+ Full conversation threads preserved for context. Useful when you need to remember *why* something was decided:
162
+
163
+ ```markdown
164
+ ## Discussion Log
165
+
166
+ ### Storage choice (2026-01-28)
167
+
168
+ > @droid Should we use Redis or Postgres for rate limit state?
169
+
170
+ > @{user_mention} Redis is better here - rate limiting needs fast atomic increments across distributed instances. Postgres would add latency and connection overhead.
171
+
172
+ > @droid Makes sense. What about persistence if Redis restarts?
173
+
174
+ > @{user_mention} We'll use Redis persistence (RDB snapshots) but also design the system to handle cold starts gracefully - worst case, limits reset.
175
+
176
+ **Resolved:** Use Redis with RDB persistence, design for graceful cold starts.
177
+
178
+ ---
179
+
180
+ ### API versioning (2026-01-27)
181
+
182
+ > @droid How should we handle API versioning?
183
+
184
+ > @{user_mention} URL path versioning (`/v1/`, `/v2/`) is clearest for consumers. Header-based is cleaner but causes confusion.
185
+
186
+ **Resolved:** Use URL path versioning.
187
+ ```
188
+
189
+ ### When to Use Each Log
190
+
191
+ | Scenario | Where it goes |
192
+ | -------- | ------------- |
193
+ | Quick decision, obvious rationale | Decision Log only |
194
+ | Decision with nuanced reasoning | Both logs |
195
+ | Long exploration that didn't lead to decision | Discussion Log only (mark as "Explored, no decision") |
196
+ | Thread that's just Q&A, no decision | Discussion Log only (mark as "Answered") |
@@ -152,10 +152,12 @@ Detailed procedures for each brain operation.
152
152
 
153
153
  **Directionality:** The @mention is the **target**, not the author:
154
154
 
155
- | Comment | Author | Target | Meaning |
156
- | -------------- | ------ | ------ | -------------------------- |
157
- | `> @droid ...` | User | AI | User asking/telling the AI |
158
- | `> @user ...` | AI | User | AI asking/telling the user |
155
+ | Comment | Author | Target | Meaning |
156
+ | ------------------------ | ------ | ------ | -------------------------- |
157
+ | `> @droid ...` | User | AI | User asking/telling the AI |
158
+ | `> @{user_mention} ...` | AI | User | AI asking/telling the user |
159
+
160
+ **CRITICAL:** When the AI writes comments to address the user, ALWAYS use `@{user_mention}`. NEVER use `@droid` — that's reserved for user-to-AI comments only.
159
161
 
160
162
  **Steps:**
161
163
 
@@ -197,6 +199,69 @@ Detailed procedures for each brain operation.
197
199
 
198
200
  7. **Summarize** what was addressed
199
201
 
202
+ ## Cleanup
203
+
204
+ **Trigger:** `/brain cleanup` or natural language ("clean up these threads", "lock in decisions")
205
+
206
+ **Purpose:** Graduate resolved discussion threads into permanent logs. Unlike `/brain check` (which addresses open comments), cleanup finds threads where decisions were already made and archives them properly.
207
+
208
+ **Steps:**
209
+
210
+ 1. **Check for active doc**
211
+ - If no active doc: Ask which doc to clean up
212
+
213
+ 2. **Read active doc** and find all comment threads
214
+
215
+ 3. **Identify resolved threads:**
216
+ - Look for `@droid` → `@{user_mention}` exchanges
217
+ - Check for resolution signals:
218
+ - Explicit: "sounds good", "let's do that", "agreed", "locked in", "resolved"
219
+ - Implicit: No follow-up questions, thread went quiet after answer
220
+ - Present uncertain threads to user: "Is this resolved?"
221
+
222
+ 4. **For each resolved thread:**
223
+
224
+ a. **Check if changes were applied:**
225
+ - Did the agreed change get made to the doc?
226
+ - If not, apply it now (with user confirmation)
227
+
228
+ b. **Extract the decision:**
229
+ - One-liner summary of what was decided
230
+ - Example: "Use Redis for rate limiting (better for distributed counters)"
231
+
232
+ c. **Archive the thread:**
233
+ - Remove from current location in doc
234
+ - Add to Discussion Log at bottom (full thread preserved)
235
+ - Add to Decision Log at bottom (one-liner)
236
+
237
+ 5. **Update logs at bottom of doc:**
238
+
239
+ ```markdown
240
+ ---
241
+
242
+ ## Decision Log
243
+
244
+ | Date | Decision |
245
+ | ---- | -------- |
246
+ | {date} | {one-liner decision} |
247
+
248
+ ## Discussion Log
249
+
250
+ ### {topic} ({date})
251
+
252
+ > @droid {original question}
253
+
254
+ > @{user_mention} {response}
255
+
256
+ **Resolved:** {summary}
257
+ ```
258
+
259
+ 6. **Summarize** what was cleaned up:
260
+ - "Cleaned up 3 threads, logged 2 decisions"
261
+ - List the decisions briefly
262
+
263
+ See `references/templates.md` § Log Templates for format details.
264
+
200
265
  ## Finalizing
201
266
 
202
267
  **Trigger:** `/brain done`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "droid-codex",
3
- "version": "0.2.2",
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.2
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