@orderful/droid 0.44.0 → 0.45.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 (100) hide show
  1. package/.github/workflows/claude-issue-agent.yml +238 -0
  2. package/CHANGELOG.md +28 -0
  3. package/dist/bin/droid.js +53 -23
  4. package/dist/commands/tui.d.ts.map +1 -1
  5. package/dist/integrations/granola/index.d.ts +6 -0
  6. package/dist/integrations/granola/index.d.ts.map +1 -0
  7. package/dist/integrations/granola/index.ts +28 -0
  8. package/dist/tools/brain/.claude-plugin/plugin.json +1 -1
  9. package/dist/tools/brain/TOOL.yaml +1 -1
  10. package/dist/tools/brain/skills/brain/SKILL.md +6 -0
  11. package/dist/tools/coach/.claude-plugin/plugin.json +1 -1
  12. package/dist/tools/coach/TOOL.yaml +5 -1
  13. package/dist/tools/coach/skills/coach/SKILL.md +31 -5
  14. package/dist/tools/code-review/.claude-plugin/plugin.json +1 -1
  15. package/dist/tools/code-review/TOOL.yaml +1 -1
  16. package/dist/tools/code-review/skills/code-review/SKILL.md +6 -0
  17. package/dist/tools/codex/.claude-plugin/plugin.json +1 -1
  18. package/dist/tools/codex/TOOL.yaml +1 -1
  19. package/dist/tools/codex/skills/codex/SKILL.md +6 -0
  20. package/dist/tools/comments/.claude-plugin/plugin.json +1 -1
  21. package/dist/tools/comments/TOOL.yaml +1 -1
  22. package/dist/tools/comments/skills/comments/SKILL.md +6 -0
  23. package/dist/tools/meeting/.claude-plugin/plugin.json +1 -1
  24. package/dist/tools/meeting/TOOL.yaml +1 -1
  25. package/dist/tools/meeting/skills/meeting/SKILL.md +6 -0
  26. package/dist/tools/plan/.claude-plugin/plugin.json +1 -1
  27. package/dist/tools/plan/TOOL.yaml +1 -1
  28. package/dist/tools/plan/skills/plan/SKILL.md +6 -0
  29. package/dist/tools/project/.claude-plugin/plugin.json +1 -1
  30. package/dist/tools/project/TOOL.yaml +1 -1
  31. package/dist/tools/project/skills/project/SKILL.md +6 -0
  32. package/dist/tools/project/skills/project/references/loading.md +1 -0
  33. package/dist/tools/release/.claude-plugin/plugin.json +1 -1
  34. package/dist/tools/release/TOOL.yaml +2 -2
  35. package/dist/tools/release/commands/release.md +16 -8
  36. package/dist/tools/release/skills/release/SKILL.md +22 -9
  37. package/dist/tools/release/skills/release/references/templates.md +69 -4
  38. package/dist/tools/release/skills/release/references/workflows.md +149 -13
  39. package/dist/tools/share/.claude-plugin/plugin.json +1 -1
  40. package/dist/tools/share/TOOL.yaml +1 -1
  41. package/dist/tools/share/skills/share/SKILL.md +6 -0
  42. package/dist/tools/status-update/.claude-plugin/plugin.json +1 -1
  43. package/dist/tools/status-update/TOOL.yaml +1 -1
  44. package/dist/tools/status-update/skills/status-update/SKILL.md +6 -0
  45. package/dist/tools/tech-design/.claude-plugin/plugin.json +1 -1
  46. package/dist/tools/tech-design/TOOL.yaml +1 -1
  47. package/dist/tools/tech-design/skills/tech-design/SKILL.md +6 -0
  48. package/dist/tools/wrapup/.claude-plugin/plugin.json +1 -1
  49. package/dist/tools/wrapup/TOOL.yaml +6 -2
  50. package/dist/tools/wrapup/skills/wrapup/SKILL.md +25 -2
  51. package/dist/tools/wrapup/skills/wrapup/references/output-schema.md +5 -3
  52. package/dist/tools/wrapup/skills/wrapup/references/subagent-prompts.md +54 -13
  53. package/package.json +1 -1
  54. package/src/commands/tui.tsx +11 -0
  55. package/src/integrations/granola/index.ts +28 -0
  56. package/src/tools/brain/.claude-plugin/plugin.json +1 -1
  57. package/src/tools/brain/TOOL.yaml +1 -1
  58. package/src/tools/brain/skills/brain/SKILL.md +6 -0
  59. package/src/tools/coach/.claude-plugin/plugin.json +1 -1
  60. package/src/tools/coach/TOOL.yaml +5 -1
  61. package/src/tools/coach/skills/coach/SKILL.md +31 -5
  62. package/src/tools/code-review/.claude-plugin/plugin.json +1 -1
  63. package/src/tools/code-review/TOOL.yaml +1 -1
  64. package/src/tools/code-review/skills/code-review/SKILL.md +6 -0
  65. package/src/tools/codex/.claude-plugin/plugin.json +1 -1
  66. package/src/tools/codex/TOOL.yaml +1 -1
  67. package/src/tools/codex/skills/codex/SKILL.md +6 -0
  68. package/src/tools/comments/.claude-plugin/plugin.json +1 -1
  69. package/src/tools/comments/TOOL.yaml +1 -1
  70. package/src/tools/comments/skills/comments/SKILL.md +6 -0
  71. package/src/tools/meeting/.claude-plugin/plugin.json +1 -1
  72. package/src/tools/meeting/TOOL.yaml +1 -1
  73. package/src/tools/meeting/skills/meeting/SKILL.md +6 -0
  74. package/src/tools/plan/.claude-plugin/plugin.json +1 -1
  75. package/src/tools/plan/TOOL.yaml +1 -1
  76. package/src/tools/plan/skills/plan/SKILL.md +6 -0
  77. package/src/tools/project/.claude-plugin/plugin.json +1 -1
  78. package/src/tools/project/TOOL.yaml +1 -1
  79. package/src/tools/project/skills/project/SKILL.md +6 -0
  80. package/src/tools/project/skills/project/references/loading.md +1 -0
  81. package/src/tools/release/.claude-plugin/plugin.json +1 -1
  82. package/src/tools/release/TOOL.yaml +2 -2
  83. package/src/tools/release/commands/release.md +16 -8
  84. package/src/tools/release/skills/release/SKILL.md +22 -9
  85. package/src/tools/release/skills/release/references/templates.md +69 -4
  86. package/src/tools/release/skills/release/references/workflows.md +149 -13
  87. package/src/tools/share/.claude-plugin/plugin.json +1 -1
  88. package/src/tools/share/TOOL.yaml +1 -1
  89. package/src/tools/share/skills/share/SKILL.md +6 -0
  90. package/src/tools/status-update/.claude-plugin/plugin.json +1 -1
  91. package/src/tools/status-update/TOOL.yaml +1 -1
  92. package/src/tools/status-update/skills/status-update/SKILL.md +6 -0
  93. package/src/tools/tech-design/.claude-plugin/plugin.json +1 -1
  94. package/src/tools/tech-design/TOOL.yaml +1 -1
  95. package/src/tools/tech-design/skills/tech-design/SKILL.md +6 -0
  96. package/src/tools/wrapup/.claude-plugin/plugin.json +1 -1
  97. package/src/tools/wrapup/TOOL.yaml +6 -2
  98. package/src/tools/wrapup/skills/wrapup/SKILL.md +25 -2
  99. package/src/tools/wrapup/skills/wrapup/references/output-schema.md +5 -3
  100. package/src/tools/wrapup/skills/wrapup/references/subagent-prompts.md +54 -13
@@ -7,8 +7,8 @@ Detailed step-by-step procedures for each `/release` subcommand. All commands us
7
7
  ```bash
8
8
  # 1. Read config
9
9
  SLACK_CHANNEL=$(droid config --get tools.release.slack_channel)
10
- # Default to #release-management if not set
11
- SLACK_CHANNEL="${SLACK_CHANNEL:-#release-management}"
10
+ # Default to #release_management if not set
11
+ SLACK_CHANNEL="${SLACK_CHANNEL:-#release_management}"
12
12
 
13
13
  # 2. Get repos and filter for release repos (those with release_branch set)
14
14
  droid config --get repos
@@ -25,9 +25,11 @@ git -C {repo_path} remote get-url origin
25
25
 
26
26
  ---
27
27
 
28
- ## `/release start [repo]`
28
+ ## `/release start [repo] [--no-lock]`
29
29
 
30
- Create a release PR and notify Slack.
30
+ Create a release PR, auto-lock the release branch, and notify Slack.
31
+
32
+ **Auto-lock is on by default.** The branch is locked immediately after the PR is created to prevent blind merges during CI. Pass `--no-lock` (or natural language like "start without locking") to skip.
31
33
 
32
34
  ### Steps
33
35
 
@@ -44,10 +46,21 @@ Create a release PR and notify Slack.
44
46
  # Get commits in release_branch that aren't in production_branch
45
47
  gh api repos/{owner}/{repo}/compare/{production_branch}...{release_branch} --jq '.commits[].commit.message'
46
48
  ```
47
- Extract PR numbers from commit messages (e.g. `(#1234)`) and format as a bulleted list for the PR body.
49
+ Extract PR numbers from commit messages (e.g. `(#1234)`). For each extracted PR number, fetch metadata including labels:
50
+ ```bash
51
+ gh pr view {pr_number} --json number,title,author,labels --repo {owner}/{repo}
52
+ ```
53
+ Build the PR list for the body from the results. Collect `HIGH_RISK_PRS` — an array of `{number, title, author}` for any PR whose `labels` array includes an entry with `name: "high-risk"`.
48
54
 
49
55
  **Do NOT use** `gh pr list --base {release_branch} --state merged` — that returns ALL historically merged PRs, not just the ones since the last release.
50
56
 
57
+ 3.5. **Warn if high-risk PRs found** — if `HIGH_RISK_PRS` is non-empty, print a terminal warning:
58
+ ```
59
+ ⚠️ {n} high-risk PR(s) detected in this release:
60
+ - #{number} {title} (@{author})
61
+ ...
62
+ ```
63
+
51
64
  4. **Ask risk level** — use AskUserQuestion:
52
65
  - Low Risk (routine release, no breaking changes)
53
66
  - High Risk (breaking changes, data migrations, or high-traffic feature)
@@ -62,9 +75,29 @@ Create a release PR and notify Slack.
62
75
  --body "{release_pr_body}" \
63
76
  --repo {owner}/{repo}
64
77
  ```
78
+ If `HIGH_RISK_PRS` is non-empty, also add `--label "high-risk"` to the command above. If the `high-risk` label does not exist on the repo, `gh pr create` will fail — in that case, retry without `--label "high-risk"` and warn the user:
79
+ ```
80
+ ⚠️ Could not apply 'high-risk' label — label does not exist on {repo_name}. Create it in GitHub Labels settings, then add it manually to PR #{number}.
81
+ ```
82
+
65
83
  See `templates.md` for the PR body template.
66
84
 
67
- 6. **Post to Slack:**
85
+ 6. **Auto-lock branch** (unless `--no-lock`):
86
+ ```bash
87
+ gh workflow run branch-lock.yml \
88
+ -f action=lock \
89
+ -f branch={release_branch} \
90
+ --repo {owner}/{repo}
91
+ ```
92
+ Verify lock applied:
93
+ ```bash
94
+ sleep 5
95
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled'
96
+ ```
97
+ If `branch-lock.yml` is not found in the repo, warn but don't fail:
98
+ "Could not auto-lock — `branch-lock.yml` not found in `{repo_name}`. Use `/release lock` manually after adding the workflow."
99
+
100
+ 7. **Post to Slack:**
68
101
  ```bash
69
102
  node -e 'process.stdout.write(JSON.stringify({
70
103
  channel: "{slack_channel}",
@@ -72,9 +105,9 @@ Create a release PR and notify Slack.
72
105
  unfurl_links: false
73
106
  }))' | droid integrations slack post
74
107
  ```
75
- See `templates.md` for the Slack message template (release started).
108
+ See `templates.md` for the Slack message template (release open for review — includes lock status).
76
109
 
77
- 7. **Confirm to user** — show PR URL and Slack post confirmation.
110
+ 8. **Confirm to user** — show PR URL, lock status, and Slack post confirmation.
78
111
 
79
112
  ---
80
113
 
@@ -88,7 +121,7 @@ Merge the release PR if all checks are green, then notify Slack.
88
121
 
89
122
  2. **Find the open release PR:**
90
123
  ```bash
91
- gh pr list --search "[RELEASE]" --state open --base {production_branch} --head {release_branch} --json number,title,url,statusCheckRollup --repo {owner}/{repo}
124
+ gh pr list --search "[RELEASE]" --state open --base {production_branch} --head {release_branch} --json number,title,url,statusCheckRollup,labels --repo {owner}/{repo}
92
125
  ```
93
126
  If no open release PR found, error: "No open release PR found. Run `/release start` first."
94
127
 
@@ -98,7 +131,10 @@ Merge the release PR if all checks are green, then notify Slack.
98
131
  If any checks are pending: "CI checks are still running on PR #{number}. Wait for them to finish."
99
132
  If any checks are failing: "CI checks are failing on PR #{number}. Fix them before merging." Show the failing checks.
100
133
 
101
- 4. **Confirm with user** — use AskUserQuestion:
134
+ 4. **Confirm with user** — if the release PR's `labels` includes `"high-risk"`, first show an extra AskUserQuestion confirmation:
135
+ "⚠️ This release includes high-risk PRs. Confirm you have coordinated with the contributors and are ready to proceed."
136
+
137
+ Then (regardless of high-risk) show the standard AskUserQuestion:
102
138
  "All checks are green on PR #{number}. Merge `{release_branch}` → `{production_branch}`?"
103
139
 
104
140
  5. **Merge the PR:**
@@ -112,6 +148,81 @@ Merge the release PR if all checks are green, then notify Slack.
112
148
 
113
149
  ---
114
150
 
151
+ ## `/release lock [repo]`
152
+
153
+ Manually lock the release branch. Use when you need to lock outside of `/release start` (which auto-locks).
154
+
155
+ ### Steps
156
+
157
+ 1. **Detect repo** — match cwd or ask user
158
+
159
+ 2. **Check current lock state:**
160
+ ```bash
161
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled // false'
162
+ ```
163
+ If already locked, warn: "Branch `{release_branch}` is already locked. Unlock first?"
164
+
165
+ 3. **Confirm with user** — use AskUserQuestion:
166
+ "Lock `{release_branch}` on `{repo_name}`? No one will be able to merge until unlocked."
167
+
168
+ 4. **Trigger the lock Action:**
169
+ ```bash
170
+ gh workflow run branch-lock.yml \
171
+ -f action=lock \
172
+ -f branch={release_branch} \
173
+ --repo {owner}/{repo}
174
+ ```
175
+
176
+ 5. **Verify lock applied** (wait a few seconds, then check):
177
+ ```bash
178
+ sleep 5
179
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled'
180
+ ```
181
+ If still not locked, check the workflow run status:
182
+ ```bash
183
+ gh run list --workflow=branch-lock.yml --limit 1 --json status,conclusion --repo {owner}/{repo}
184
+ ```
185
+
186
+ 6. **Post to Slack** — lock notification (see `templates.md`).
187
+
188
+ 7. **Confirm to user** — "Locked `{release_branch}` on `{repo_name}`."
189
+
190
+ ---
191
+
192
+ ## `/release unlock [repo]`
193
+
194
+ Unlock the release branch.
195
+
196
+ ### Steps
197
+
198
+ 1. **Detect repo** — match cwd or ask user
199
+
200
+ 2. **Check current lock state:**
201
+ ```bash
202
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled // false'
203
+ ```
204
+ If not locked, inform: "Branch `{release_branch}` is not currently locked."
205
+
206
+ 3. **Trigger the unlock Action:**
207
+ ```bash
208
+ gh workflow run branch-lock.yml \
209
+ -f action=unlock \
210
+ -f branch={release_branch} \
211
+ --repo {owner}/{repo}
212
+ ```
213
+
214
+ 4. **Verify unlock applied:**
215
+ ```bash
216
+ sleep 5
217
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled'
218
+ ```
219
+
220
+ 5. **Post to Slack** — unlock notification (see `templates.md`).
221
+
222
+ 6. **Confirm to user** — "Unlocked `{release_branch}` on `{repo_name}`."
223
+
224
+ ---
225
+
115
226
  ## `/release status`
116
227
 
117
228
  Check release status across all configured release repos.
@@ -124,7 +235,12 @@ Check release status across all configured release repos.
124
235
 
125
236
  **Open release PRs:**
126
237
  ```bash
127
- gh pr list --search "[RELEASE]" --state open --json number,title,url,statusCheckRollup --repo {owner}/{repo}
238
+ gh pr list --search "[RELEASE]" --state open --json number,title,url,statusCheckRollup,labels --repo {owner}/{repo}
239
+ ```
240
+
241
+ **Lock state:**
242
+ ```bash
243
+ gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled // false'
128
244
  ```
129
245
 
130
246
  3. **Format and display** as a summary:
@@ -132,6 +248,12 @@ Check release status across all configured release repos.
132
248
  ```
133
249
  {repo_name}
134
250
  Release PR: #{number} — {CI status} (green/pending/failing)
251
+ Branch lock: {release_branch} — locked/unlocked
252
+ ```
253
+
254
+ If the release PR's `labels` includes `"high-risk"`, append to the repo's status block:
255
+ ```
256
+ ⚠️ High-risk PRs included
135
257
  ```
136
258
 
137
259
  If no open release PR: "No active release"
@@ -141,7 +263,7 @@ Check release status across all configured release repos.
141
263
 
142
264
  ## `/release complete [repo]`
143
265
 
144
- Close out a release — notify Slack.
266
+ Close out a release — notify Slack and auto-unlock.
145
267
 
146
268
  ### Steps
147
269
 
@@ -161,6 +283,20 @@ Close out a release — notify Slack.
161
283
 
162
284
  3. **Post to Slack** — release complete notification (see `templates.md`).
163
285
 
164
- 4. **Confirm to user:**
286
+ 4. **Auto-unlock if locked:**
287
+ ```bash
288
+ LOCKED=$(gh api repos/{owner}/{repo}/branches/{release_branch}/protection --jq '.lock_branch.enabled // false')
289
+ ```
290
+ If locked, trigger unlock:
291
+ ```bash
292
+ gh workflow run branch-lock.yml \
293
+ -f action=unlock \
294
+ -f branch={release_branch} \
295
+ --repo {owner}/{repo}
296
+ ```
297
+ Post unlock notification to Slack as well.
298
+
299
+ 5. **Confirm to user:**
165
300
  - "Release complete for `{repo_name}`"
301
+ - "Auto-unlocked `{release_branch}`" (if was locked)
166
302
  - Show Slack message confirmation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-share",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Share content to external platforms. Publish docs to Confluence or post summaries to Slack.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: share
2
2
  description: "Share content to external platforms. Publish docs to Confluence or post summaries to Slack."
3
- version: 0.1.0
3
+ version: 0.1.1
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -26,6 +26,12 @@ Share content to external platforms. Two modes:
26
26
  | Confluence | Atlassian MCP (`mcp__claude_ai_Atlassian__*`) | Publish document as page |
27
27
  | Slack | `droid integrations slack post` | Process + post message |
28
28
 
29
+ ## Custom Instructions
30
+
31
+ Any command accepts a ` -- {instruction}` suffix. Split on the **first** ` -- ` (space-dash-dash-space): left is the command and its args, right is additional context or instruction to carry through the entire execution. For the Slack flow specifically, the `--` instruction becomes the formatting directive (step S3).
32
+
33
+ Example: `/share slack #eng -- summarise the action items and tag owners`
34
+
29
35
  ## Procedure
30
36
 
31
37
  ### 1. Resolve Platform
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-status-update",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Generate and post project status updates. Aggregates context from codex projects, Jira epics, and manual input. Posts to Slack or prints to terminal.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: status-update
2
2
  description: "Generate and post project status updates. Aggregates context from codex projects, Jira epics, and manual input. Posts to Slack or prints to terminal."
3
- version: 0.2.1
3
+ version: 0.2.2
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -30,6 +30,12 @@ Generate formatted project status updates from multiple sources and post to Slac
30
30
  |-------------|----------------|----------|
31
31
  | **Slack** | If slack.channel configured + SLACK_USER_TOKEN set | Print to terminal |
32
32
 
33
+ ## Custom Instructions
34
+
35
+ Any command accepts a ` -- {instruction}` suffix. Split on the **first** ` -- ` (space-dash-dash-space): left is the command and its args, right is additional context or instruction to carry through the entire execution.
36
+
37
+ Example: `/status-update droid -- emphasise the auth refactor milestone we shipped`
38
+
33
39
  ## Procedure
34
40
 
35
41
  ### 1. Resolve Project Context
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-tech-design",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Technical design authoring tool for engineers. Create structured tech design docs with /tech-design start, iterate in brain, publish to codex. Three-document approach: research doc (codebase discoveries) + thought doc (design workspace) + roll-up (clean summary for review).",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: tech-design
2
2
  description: "Technical design authoring tool for engineers. Create structured tech design docs with /tech-design start, iterate in brain, publish to codex. Three-document approach: research doc (codebase discoveries) + thought doc (design workspace) + roll-up (clean summary for review)."
3
- version: 0.3.0
3
+ version: 0.3.1
4
4
  status: beta
5
5
 
6
6
  includes:
@@ -47,6 +47,12 @@ Tech-design has no configuration of its own. It delegates to:
47
47
 
48
48
  **Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
49
49
 
50
+ ## Custom Instructions
51
+
52
+ Any command accepts a ` -- {instruction}` suffix. Split on the **first** ` -- ` (space-dash-dash-space): left is the command and its args, right is additional context or instruction to carry through the entire execution. Note: flag-style `--from` and similar flags use `--flag` syntax (no surrounding spaces) and are distinct from this separator.
53
+
54
+ Example: `/tech-design draft rollout -- keep it concise, we have limited Ops bandwidth`
55
+
50
56
  ## Four-Document Approach
51
57
 
52
58
  | Document | Created When | Purpose | Location | Audience | Length |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "droid-wrapup",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Session wrap-up that captures decisions, learnings, and open items to persistent docs.",
5
5
  "author": {
6
6
  "name": "Orderful",
@@ -1,6 +1,6 @@
1
1
  name: wrapup
2
2
  description: "Session wrap-up that captures decisions, learnings, and open items to persistent docs."
3
- version: 0.1.3
3
+ version: 0.1.5
4
4
  status: alpha
5
5
 
6
6
  includes:
@@ -13,4 +13,8 @@ includes:
13
13
 
14
14
  dependencies: []
15
15
 
16
- config_schema: {}
16
+ config_schema:
17
+ persist_recaps:
18
+ type: string
19
+ default: 'false'
20
+ description: 'Persist session recap files to brain vault wrapups folder'
@@ -10,16 +10,25 @@ Session wrap-up that captures decisions, learnings, and open items before closin
10
10
 
11
11
  ## Configuration
12
12
 
13
- Wrapup has no configuration of its own. It reads config from other installed tools:
13
+ Wrapup reads config from other installed tools, plus its own settings:
14
14
 
15
15
  - **Project skill** (optional): `droid config --get tools.project` → `projects_dir` to update project files
16
- - **Brain skill** (optional): `droid config --get tools.brain` → `brain_dir` to update brain docs
16
+ - **Brain skill** (optional): `droid config --get tools.brain` → `brain_dir` and `inbox_folder` to update brain docs
17
17
  - **Codex skill** (optional): `droid config --get tools.codex` → `codex_repo` to suggest codex entries
18
+ - **Wrapup own config** (optional): `droid config --get tools.wrapup` → `persist_recaps` (`'true'` / `'false'`, default `'false'`)
18
19
 
19
20
  If these tools aren't configured, wrapup skips those artifacts and focuses on git state and conversation summary.
20
21
 
22
+ When `persist_recaps` is `'true'` and brain is configured, session briefs are saved to the brain vault in Phase 4 (see below).
23
+
21
24
  **Overrides:** This skill supports user-defined overrides. See `/droid` skill § Skill Overrides.
22
25
 
26
+ ## Custom Instructions
27
+
28
+ Any command accepts a ` -- {instruction}` suffix. Split on the **first** ` -- ` (space-dash-dash-space): left is the command and its args, right is additional context or instruction to carry through the entire execution.
29
+
30
+ Example: `/wrapup -- also capture the tech debt items we discussed`
31
+
23
32
  ## Context Lifeboat Pattern
24
33
 
25
34
  This skill runs at the END of sessions when context pressure is highest.
@@ -98,3 +107,17 @@ Present options using AskUserQuestion:
98
107
  - **"Skip"** → Close without updating
99
108
 
100
109
  On approval, write updates using appropriate format for each destination.
110
+
111
+ **Session recap persistence (if `persist_recaps` is `'true'`):**
112
+
113
+ After writing all other updates, check whether session briefs should be persisted:
114
+
115
+ 1. Run `droid config --get tools.wrapup` and check if `persist_recaps` equals `'true'`. If not, skip.
116
+ 2. Run `droid config --get tools.brain` and parse `brain_dir` and `inbox_folder`.
117
+ - If `brain_dir` is not set, skip.
118
+ 3. Construct the destination path:
119
+ - If `inbox_folder` is non-empty: `{brain_dir}/{inbox_folder}/wrapups/{session-id}.md`
120
+ - If `inbox_folder` is empty or absent: `{brain_dir}/wrapups/{session-id}.md`
121
+ - Avoid double slashes — do not append `inbox_folder` when it is an empty string.
122
+ 4. Create the `wrapups/` directory if it does not exist, then copy the Phase 1 brief from `/tmp/wrapup-{session-id}.md` to the constructed path.
123
+ 5. Inform the user the recap was saved and where.
@@ -28,7 +28,7 @@ Structured format for subagent findings. Main agent uses this to synthesise the
28
28
  ],
29
29
  "suggested_actions": [
30
30
  {
31
- "type": "commit | codex_topic | file_bug | update_docs",
31
+ "type": "commit | codex_topic | codex_update | file_bug | update_docs",
32
32
  "content": "description of suggested action",
33
33
  "priority": "high | medium | low"
34
34
  }
@@ -63,7 +63,8 @@ Item categories:
63
63
 
64
64
  Actions that need user judgment:
65
65
  - `commit`: Git changes ready to commit
66
- - `codex_topic`: Knowledge worth codifying
66
+ - `codex_topic`: Net-new knowledge worth codifying as a new codex entry
67
+ - `codex_update`: Update to an existing codex entry (distinct from `codex_topic` which suggests net-new content)
67
68
  - `file_bug`: Bug discovered but not filed
68
69
  - `update_docs`: Documentation that needs updating
69
70
 
@@ -87,7 +88,8 @@ Actions that need user judgment:
87
88
  ],
88
89
  "suggested_actions": [
89
90
  {"type": "commit", "content": "4 files ready: TOOL.yaml, SKILL.md, wrapup.md, changeset", "priority": "high"},
90
- {"type": "codex_topic", "content": "Context lifeboat pattern for end-of-session tooling", "priority": "medium"}
91
+ {"type": "codex_topic", "content": "Context lifeboat pattern for end-of-session tooling", "priority": "medium"},
92
+ {"type": "codex_update", "content": "Update 'droid' codex entry: add context-lifeboat pattern and subagent parallelisation decision from today's session", "priority": "low"}
91
93
  ]
92
94
  }
93
95
  ```
@@ -76,20 +76,61 @@ Output:
76
76
  **Subagent type:** Explore
77
77
 
78
78
  ```
79
- Read {session_brief_path} for session context.
80
-
81
- Run `droid config --get tools.codex` and check if `codex_repo` is set.
82
- If not configured, skip codex analysis.
83
-
84
- If the session involved:
85
- - Deep research on a topic
86
- - Discovering patterns or best practices
87
- - Solving a non-trivial problem with reusable insights
88
-
89
- Then suggest potential codex topics:
90
- - Topic name
79
+ Read {session_brief_path} for session context. Pay particular attention to the
80
+ "Decisions Made" and "Key Learnings" sections — these are the primary signals
81
+ for both new codex topics and updates to existing entries.
82
+
83
+ Run `droid config --get tools.codex` and parse the JSON output for `codex_repo`.
84
+ If `codex_repo` is not set, output "No codex suggestions (codex not configured)" and stop.
85
+
86
+ --- Discover existing codex content ---
87
+
88
+ 1. Attempt to read `{codex_repo}/.codex/manifest.yaml` to get an inventory of
89
+ existing entries and projects.
90
+ - If the manifest does not exist, fall back: list the top-level directories
91
+ inside `{codex_repo}` to infer project names.
92
+ 2. Skim entry names, titles, and tags — you do NOT need to read full entry bodies
93
+ at this stage. Goal is a compact list of what already exists.
94
+
95
+ --- Compare session against existing codex content ---
96
+
97
+ 3. For each decision or learning in the session brief, check whether it relates
98
+ to an existing codex entry or project:
99
+ - A decision "relates to" an entry if the topic, technology, or system name
100
+ overlaps (e.g., a decision about the droid project file format relates to
101
+ a codex entry named "droid" or "tool-configuration").
102
+ - Threshold: if 2 or more session decisions/learnings relate to the same
103
+ existing codex entry, emit a `codex_update` suggestion for that entry.
104
+ - For a single related decision/learning, use your judgment — only suggest
105
+ an update if the insight is clearly additive and not already captured.
106
+
107
+ 4. Read the full content of any existing entries flagged in step 3 to confirm
108
+ the insight is genuinely new (avoid duplicate suggestions).
109
+
110
+ --- Identify net-new codex topics ---
111
+
112
+ 5. For decisions/learnings that do NOT relate to any existing entry, consider
113
+ whether they merit a brand-new codex topic:
114
+ - Deep research findings
115
+ - Discovered patterns or best practices
116
+ - Non-trivial problems solved with reusable insights
117
+
118
+ --- Output ---
119
+
120
+ Produce two buckets:
121
+
122
+ **Suggested updates to existing codex entries (codex_update):**
123
+ For each:
124
+ - Entry name (as it appears in the codex)
125
+ - What to add or amend (specific content, not vague)
126
+ - Which session decisions/learnings drove this suggestion
127
+ - Why the existing entry is incomplete without this update
128
+
129
+ **Suggested new codex topics (codex_topic):**
130
+ For each:
131
+ - Proposed topic name
91
132
  - Brief description of what to capture
92
133
  - Why it's worth codifying (reusable, non-obvious, hard-won knowledge)
93
134
 
94
- Output: List of suggested codex topics, or "No codex suggestions" if session was routine.
135
+ If neither bucket has entries, output "No codex suggestions".
95
136
  ```