@monoes/monomindcli 1.10.46 → 1.10.54

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 (144) hide show
  1. package/.claude/commands/monomind/do.md +52 -0
  2. package/.claude/commands/monomind/improve.md +2 -0
  3. package/.claude/helpers/handlers/route-handler.cjs +61 -11
  4. package/.claude/helpers/skill-registry.json +99 -51
  5. package/.claude/skills/agent-browser-testing/SKILL.md +522 -152
  6. package/.claude/skills/github-issue-triage/SKILL.md +354 -0
  7. package/.claude/skills/github-repo-recap/SKILL.md +207 -0
  8. package/.claude/skills/mastermind/_delegation.md +83 -0
  9. package/.claude/skills/mastermind/_protocol.md +14 -0
  10. package/dist/src/init/executor.d.ts.map +1 -1
  11. package/dist/src/init/executor.js +18 -19
  12. package/dist/src/init/executor.js.map +1 -1
  13. package/dist/src/init/helpers-generator.js +3 -3
  14. package/dist/src/init/helpers-generator.js.map +1 -1
  15. package/dist/src/ui/dashboard-v2.html +782 -42
  16. package/dist/src/ui/dashboard.html +1 -0
  17. package/dist/src/ui/data/agent-avatars.html +763 -0
  18. package/dist/src/ui/data/agent-avatars.json +966 -0
  19. package/dist/src/ui/data/avatars/account-strategist.svg +58 -0
  20. package/dist/src/ui/data/avatars/accounts-payable.svg +54 -0
  21. package/dist/src/ui/data/avatars/adaptive-coordinator.svg +55 -0
  22. package/dist/src/ui/data/avatars/adaptive-coordinator2.svg +54 -0
  23. package/dist/src/ui/data/avatars/ai-citation.svg +57 -0
  24. package/dist/src/ui/data/avatars/ai-engineer.svg +61 -0
  25. package/dist/src/ui/data/avatars/analytics-reporter.svg +53 -0
  26. package/dist/src/ui/data/avatars/api-tester.svg +53 -0
  27. package/dist/src/ui/data/avatars/architecture.svg +54 -0
  28. package/dist/src/ui/data/avatars/automation-governance.svg +55 -0
  29. package/dist/src/ui/data/avatars/backend-dev.svg +53 -0
  30. package/dist/src/ui/data/avatars/benchmarker.svg +54 -0
  31. package/dist/src/ui/data/avatars/blockchain-auditor.svg +53 -0
  32. package/dist/src/ui/data/avatars/byzantine-coord.svg +57 -0
  33. package/dist/src/ui/data/avatars/case-analyst.svg +57 -0
  34. package/dist/src/ui/data/avatars/cicd-engineer.svg +55 -0
  35. package/dist/src/ui/data/avatars/cloud-architect.svg +54 -0
  36. package/dist/src/ui/data/avatars/code-review-swarm.svg +57 -0
  37. package/dist/src/ui/data/avatars/coder-v119.svg +57 -0
  38. package/dist/src/ui/data/avatars/coder.svg +58 -0
  39. package/dist/src/ui/data/avatars/collective-coord.svg +54 -0
  40. package/dist/src/ui/data/avatars/compliance-auditor.svg +58 -0
  41. package/dist/src/ui/data/avatars/consensus-coordinator.svg +54 -0
  42. package/dist/src/ui/data/avatars/content-creator.svg +54 -0
  43. package/dist/src/ui/data/avatars/crdt-synchronizer.svg +53 -0
  44. package/dist/src/ui/data/avatars/cro-specialist.svg +58 -0
  45. package/dist/src/ui/data/avatars/data-consolidator.svg +54 -0
  46. package/dist/src/ui/data/avatars/data-engineer.svg +53 -0
  47. package/dist/src/ui/data/avatars/database-optimizer.svg +61 -0
  48. package/dist/src/ui/data/avatars/deal-strategist.svg +54 -0
  49. package/dist/src/ui/data/avatars/defender.svg +53 -0
  50. package/dist/src/ui/data/avatars/devops-automator.svg +56 -0
  51. package/dist/src/ui/data/avatars/discovery-coach.svg +54 -0
  52. package/dist/src/ui/data/avatars/email-marketing.svg +57 -0
  53. package/dist/src/ui/data/avatars/embedded-firmware.svg +61 -0
  54. package/dist/src/ui/data/avatars/evidence-collector.svg +57 -0
  55. package/dist/src/ui/data/avatars/experiment-tracker.svg +53 -0
  56. package/dist/src/ui/data/avatars/feedback-synthesizer.svg +54 -0
  57. package/dist/src/ui/data/avatars/finance-tracker.svg +54 -0
  58. package/dist/src/ui/data/avatars/frontend-developer.svg +54 -0
  59. package/dist/src/ui/data/avatars/game-audio-engineer.svg +59 -0
  60. package/dist/src/ui/data/avatars/game-designer.svg +54 -0
  61. package/dist/src/ui/data/avatars/gossip-coordinator.svg +54 -0
  62. package/dist/src/ui/data/avatars/hierarchical-coord.svg +54 -0
  63. package/dist/src/ui/data/avatars/incident-commander.svg +57 -0
  64. package/dist/src/ui/data/avatars/infrastructure.svg +54 -0
  65. package/dist/src/ui/data/avatars/input-validator.svg +53 -0
  66. package/dist/src/ui/data/avatars/ios-developer.svg +54 -0
  67. package/dist/src/ui/data/avatars/issue-tracker.svg +53 -0
  68. package/dist/src/ui/data/avatars/judge.svg +55 -0
  69. package/dist/src/ui/data/avatars/launch-strategist.svg +54 -0
  70. package/dist/src/ui/data/avatars/legal-compliance.svg +53 -0
  71. package/dist/src/ui/data/avatars/level-designer.svg +53 -0
  72. package/dist/src/ui/data/avatars/load-balancer.svg +57 -0
  73. package/dist/src/ui/data/avatars/mcp-builder.svg +53 -0
  74. package/dist/src/ui/data/avatars/memory-coordinator.svg +55 -0
  75. package/dist/src/ui/data/avatars/mesh-coordinator.svg +55 -0
  76. package/dist/src/ui/data/avatars/ml-developer.svg +58 -0
  77. package/dist/src/ui/data/avatars/mobile-app-builder.svg +53 -0
  78. package/dist/src/ui/data/avatars/mobile-dev.svg +54 -0
  79. package/dist/src/ui/data/avatars/model-qa.svg +58 -0
  80. package/dist/src/ui/data/avatars/narrative-designer.svg +58 -0
  81. package/dist/src/ui/data/avatars/outbound-strategist.svg +55 -0
  82. package/dist/src/ui/data/avatars/path-validator.svg +54 -0
  83. package/dist/src/ui/data/avatars/payment-agent.svg +53 -0
  84. package/dist/src/ui/data/avatars/perf-analyzer.svg +58 -0
  85. package/dist/src/ui/data/avatars/pipeline-analyst.svg +54 -0
  86. package/dist/src/ui/data/avatars/planner.svg +55 -0
  87. package/dist/src/ui/data/avatars/pr-manager.svg +54 -0
  88. package/dist/src/ui/data/avatars/pricing-strategist.svg +54 -0
  89. package/dist/src/ui/data/avatars/product-manager.svg +54 -0
  90. package/dist/src/ui/data/avatars/production-validator.svg +54 -0
  91. package/dist/src/ui/data/avatars/project-shepherd.svg +54 -0
  92. package/dist/src/ui/data/avatars/proposal-strategist.svg +54 -0
  93. package/dist/src/ui/data/avatars/prosecutor.svg +57 -0
  94. package/dist/src/ui/data/avatars/pseudocode.svg +53 -0
  95. package/dist/src/ui/data/avatars/queen-coordinator.svg +55 -0
  96. package/dist/src/ui/data/avatars/quorum-manager.svg +53 -0
  97. package/dist/src/ui/data/avatars/raft-manager.svg +53 -0
  98. package/dist/src/ui/data/avatars/reality-checker.svg +58 -0
  99. package/dist/src/ui/data/avatars/recruitment.svg +58 -0
  100. package/dist/src/ui/data/avatars/refinement.svg +53 -0
  101. package/dist/src/ui/data/avatars/release-manager.svg +54 -0
  102. package/dist/src/ui/data/avatars/repo-architect.svg +54 -0
  103. package/dist/src/ui/data/avatars/researcher.svg +58 -0
  104. package/dist/src/ui/data/avatars/resource-allocator.svg +53 -0
  105. package/dist/src/ui/data/avatars/reviewer.svg +53 -0
  106. package/dist/src/ui/data/avatars/safe-executor.svg +53 -0
  107. package/dist/src/ui/data/avatars/sales-coach.svg +53 -0
  108. package/dist/src/ui/data/avatars/sales-engineer.svg +58 -0
  109. package/dist/src/ui/data/avatars/scout-explorer.svg +58 -0
  110. package/dist/src/ui/data/avatars/security-architect.svg +54 -0
  111. package/dist/src/ui/data/avatars/security-auditor.svg +55 -0
  112. package/dist/src/ui/data/avatars/senior-developer.svg +58 -0
  113. package/dist/src/ui/data/avatars/senior-pm.svg +58 -0
  114. package/dist/src/ui/data/avatars/seo-specialist.svg +57 -0
  115. package/dist/src/ui/data/avatars/social-media.svg +54 -0
  116. package/dist/src/ui/data/avatars/solidity-engineer.svg +58 -0
  117. package/dist/src/ui/data/avatars/sparc-coder.svg +58 -0
  118. package/dist/src/ui/data/avatars/sparc-coord.svg +56 -0
  119. package/dist/src/ui/data/avatars/specification.svg +57 -0
  120. package/dist/src/ui/data/avatars/sprint-prioritizer.svg +53 -0
  121. package/dist/src/ui/data/avatars/sre.svg +54 -0
  122. package/dist/src/ui/data/avatars/studio-operations.svg +53 -0
  123. package/dist/src/ui/data/avatars/studio-producer.svg +55 -0
  124. package/dist/src/ui/data/avatars/support-responder.svg +56 -0
  125. package/dist/src/ui/data/avatars/system-architect.svg +54 -0
  126. package/dist/src/ui/data/avatars/task-orchestrator.svg +56 -0
  127. package/dist/src/ui/data/avatars/technical-artist.svg +53 -0
  128. package/dist/src/ui/data/avatars/technical-writer.svg +59 -0
  129. package/dist/src/ui/data/avatars/tester.svg +53 -0
  130. package/dist/src/ui/data/avatars/threat-detection.svg +61 -0
  131. package/dist/src/ui/data/avatars/trend-researcher.svg +54 -0
  132. package/dist/src/ui/data/avatars/trial-director.svg +55 -0
  133. package/dist/src/ui/data/avatars/unity-architect.svg +54 -0
  134. package/dist/src/ui/data/avatars/visionos-engineer.svg +57 -0
  135. package/dist/src/ui/data/avatars/worker-specialist.svg +55 -0
  136. package/dist/src/ui/data/avatars/workflow-architect.svg +57 -0
  137. package/dist/src/ui/data/avatars/workflow-automation.svg +54 -0
  138. package/dist/src/ui/data/avatars/zk-steward.svg +54 -0
  139. package/dist/src/ui/data/known-projects.json +1 -1
  140. package/dist/src/ui/data/mastermind-events.jsonl +28 -0
  141. package/dist/src/ui/orgs.html +1171 -0
  142. package/dist/src/ui/server.mjs +25 -8
  143. package/dist/tsconfig.tsbuildinfo +1 -1
  144. package/package.json +1 -1
@@ -0,0 +1,354 @@
1
+ ---
2
+ name: github-issue-triage
3
+ description: >
4
+ Three-phase GitHub issue triage: automatic audit with 6-dimension analysis (categorization,
5
+ PR cross-ref, Jaccard duplicate detection, risk classification, staleness, action recommendations),
6
+ opt-in parallel deep analysis via AI agents, and draft-then-validate action execution.
7
+ Args: "all" for deep analysis of all issues, issue numbers to focus (e.g. "42 57"), no arg = audit only.
8
+ allowed-tools:
9
+ - Bash
10
+ - Read
11
+ - Grep
12
+ effort: medium
13
+ tags: [triage, issues, github, categorize, duplicates, risk, cross-ref]
14
+ ---
15
+
16
+ # GitHub Issue Triage
17
+
18
+ // Pattern adapted from RTK (Rust Token Killer) issue-triage skill — rebranded for monomind
19
+
20
+ Three-phase workflow: automatic audit → opt-in deep analysis → draft-then-validate actions.
21
+
22
+ | Skill | Use case | Output |
23
+ |-------|----------|--------|
24
+ | `/github-issue-triage` | Audit issues, categorize, detect duplicates, post comments | Action tables + deep analysis reports + validated comments |
25
+ | `/github-repo-recap` | Full repo snapshot for team sharing | Markdown recap (PRs + issues + releases) |
26
+
27
+ **Triggers:**
28
+ - Manual: `/github-issue-triage`, `/github-issue-triage all`, `/github-issue-triage 42 57`
29
+ - Proactive: when >10 open issues without triage, or a stale issue (>30 days) is detected
30
+
31
+ ## Preconditions
32
+
33
+ ```bash
34
+ git rev-parse --is-inside-work-tree
35
+ gh auth status
36
+ ```
37
+
38
+ If either fails, stop and explain what's missing.
39
+
40
+ ---
41
+
42
+ ## Phase 1 — Audit (always runs)
43
+
44
+ ### Data Gathering (run in parallel)
45
+
46
+ ```bash
47
+ # Repo identity
48
+ gh repo view --json nameWithOwner -q .nameWithOwner
49
+
50
+ # Open issues with full metadata
51
+ gh issue list --state open --limit 100 \
52
+ --json number,title,author,createdAt,updatedAt,labels,assignees,body,comments
53
+
54
+ # Open PRs (for cross-referencing)
55
+ gh pr list --state open --limit 50 --json number,title,body
56
+
57
+ # Recently closed issues (for duplicate detection)
58
+ gh issue list --state closed --limit 20 \
59
+ --json number,title,labels,closedAt
60
+
61
+ # Collaborators (never auto-close their issues)
62
+ gh api "repos/{owner}/{repo}/collaborators" --jq '.[].login'
63
+ ```
64
+
65
+ **Collaborator fallback**: if `gh api .../collaborators` fails (403/404):
66
+ ```bash
67
+ gh pr list --state merged --limit 10 --json author --jq '.[].author.login' | sort -u
68
+ ```
69
+ If still ambiguous, use `AskUserQuestion` to clarify with the user.
70
+
71
+ **Note**: `author` is an object `{login: "..."}` — always extract `.author.login`.
72
+
73
+ ### Analysis — 6 Dimensions
74
+
75
+ **1. Categorization** (existing labels take precedence; infer from title/body if unlabeled):
76
+ - **Bug**: keywords `crash`, `error`, `fail`, `broken`, `regression`, `wrong`, `unexpected`
77
+ - **Feature**: `add`, `implement`, `support`, `new`, `feat:`
78
+ - **Enhancement**: `improve`, `optimize`, `better`, `enhance`, `refactor`
79
+ - **Question/Support**: `how`, `why`, `help`, `unclear`, `docs`, `documentation`
80
+ - **Duplicate Candidate**: see dimension 3 below
81
+
82
+ **2. PR Cross-Reference**:
83
+ - Scan the `body` of every open PR for `fixes #N`, `closes #N`, `resolves #N` (case-insensitive, regex)
84
+ - Build a map: `issue_number → [PR numbers]`
85
+ - If the linked PR is already merged and the issue is still open → recommend closing
86
+
87
+ **3. Duplicate Detection**:
88
+ - Normalize titles: lowercase, strip common prefixes (`bug:`, `feat:`, `[bug]`, `[feature]`, etc.)
89
+ - **Jaccard similarity on title words**: if score > 60% between two issues → duplicate candidate
90
+ - Jaccard = |intersection| / |union| — exclude stop words: a, the, is, in, of, for, to, with, on, at, by
91
+ - **Body keyword overlap** > 50% → reinforces the signal
92
+ - Compare against recently closed issues (last 20) too
93
+ - False positives are confirmed/rejected in Phase 2 — do not act on suspicion alone
94
+
95
+ **4. Risk Classification**:
96
+ - **Red (critical)**: keywords `CVE`, `vulnerability`, `injection`, `auth bypass`, `security`, `exploit`, `unsafe`, `credentials`, `leak`, `RCE`, `XSS`
97
+ - **Yellow (high)**: `breaking change`, `migration`, `deprecation`, `remove API`, `breaking`, `incompatible`
98
+ - **Green**: everything else
99
+
100
+ **5. Staleness**:
101
+ - > 30 days since `updatedAt` → **Stale**
102
+ - > 90 days since `updatedAt` → **Very Stale**
103
+ - Calculate from today's date; `updatedAt` null → fall back to `createdAt`
104
+
105
+ **6. Action Recommendations** (one per issue):
106
+ - `Accept & Prioritize` — issue is clear, reproducible, in scope
107
+ - `Label needed` — issue has no labels
108
+ - `Comment needed` — missing reproduction steps, version, environment, etc.
109
+ - `Linked to PR` — an open PR references this issue
110
+ - `Duplicate candidate` — suspected duplicate of `#N` (specify)
111
+ - `Close candidate` — very stale, no recent activity, or clearly out of scope (never for collaborator issues)
112
+ - `PR merged → close` — linked PR has been merged; issue is still open
113
+
114
+ ### Output — 5 Tables
115
+
116
+ ```
117
+ ## Open Issues ({count})
118
+
119
+ ### Critical (red risk)
120
+ | # | Title | Author | Age | Labels | Action |
121
+ | - | ----- | ------ | --- | ------ | ------ |
122
+
123
+ ### Linked to a PR
124
+ | # | Title | Author | Linked PR(s) | PR Status | Action |
125
+ | - | ----- | ------ | ------------ | --------- | ------ |
126
+
127
+ ### Active
128
+ | # | Title | Author | Category | Age | Labels | Action |
129
+ | - | ----- | ------ | -------- | --- | ------ | ------ |
130
+
131
+ ### Duplicate Candidates
132
+ | # | Title | Duplicate of | Similarity | Action |
133
+ | - | ----- | ------------ | ---------- | ------ |
134
+
135
+ ### Stale
136
+ | # | Title | Author | Last Activity | Action |
137
+ | - | ----- | ------ | ------------- | ------ |
138
+
139
+ ### Summary
140
+ - Total: {N} open issues
141
+ - Critical: {N} (security or breaking-change risk)
142
+ - Linked to PR: {N}
143
+ - Duplicate candidates: {N}
144
+ - Stale (>30d): {N} | Very Stale (>90d): {N}
145
+ - No labels: {N}
146
+ - Quick wins (label or close quickly): {list}
147
+ ```
148
+
149
+ Age = days since `createdAt`, format `{N}d`. Bold if > 30 days.
150
+
151
+ 0 issues → print `No open issues.` and exit.
152
+
153
+ ### Auto-Copy
154
+
155
+ After displaying the triage table, copy it to clipboard:
156
+ ```bash
157
+ clip() {
158
+ if command -v pbcopy &>/dev/null; then pbcopy
159
+ elif command -v xclip &>/dev/null; then xclip -selection clipboard
160
+ elif command -v wl-copy &>/dev/null; then wl-copy
161
+ else cat
162
+ fi
163
+ }
164
+ clip <<'EOF'
165
+ {full triage table}
166
+ EOF
167
+ ```
168
+ Confirm: `Triage table copied to clipboard.`
169
+
170
+ ---
171
+
172
+ ## Phase 2 — Deep Analysis (opt-in)
173
+
174
+ ### Issue Selection
175
+
176
+ **If an argument was passed:**
177
+ - `"all"` → analyze all open issues
178
+ - Numbers (e.g. `"42 57"`) → only those issues
179
+
180
+ **If no argument**, ask via `AskUserQuestion`:
181
+
182
+ ```
183
+ question: "Which issues would you like to analyze in depth?"
184
+ header: "Deep Analysis"
185
+ multiSelect: true
186
+ options:
187
+ - label: "All ({N} issues)"
188
+ description: "Parallel deep analysis of every open issue"
189
+ - label: "Critical only"
190
+ description: "Focus on the {M} red/yellow-risk issues"
191
+ - label: "Duplicate candidates"
192
+ description: "Confirm or reject the {K} suspected duplicates"
193
+ - label: "Stale only"
194
+ description: "Close/keep decision on the {J} stale issues"
195
+ - label: "Skip"
196
+ description: "Finish here — audit only"
197
+ ```
198
+
199
+ "Skip" → end workflow.
200
+
201
+ ### Execution
202
+
203
+ For each selected issue, spawn an agent via **Task tool in parallel**:
204
+
205
+ ```
206
+ subagent_type: general-purpose
207
+ model: sonnet
208
+ prompt: |
209
+ Analyze GitHub issue #{num}: "{title}" by @{author}
210
+
211
+ **Metadata**: Created {createdAt}, last updated {updatedAt}, labels: {labels}
212
+
213
+ **Body**:
214
+ {body}
215
+
216
+ **Existing comments** ({comments_count} total, showing last 5):
217
+ {last_5_comments}
218
+
219
+ **Context**:
220
+ - Linked PRs: {linked_prs or "none"}
221
+ - Duplicate candidate of: {duplicate_of or "none"}
222
+ - Risk classification: {risk_color}
223
+
224
+ Analyze this issue and return a structured report:
225
+
226
+ ### Scope Assessment
227
+ What is this issue actually asking for? Is it clearly defined?
228
+
229
+ ### Missing Information
230
+ What's needed to act on this? (reproduction steps, version, environment, etc.)
231
+
232
+ ### Risk & Impact
233
+ Security risk? Breaking change? Who is affected?
234
+
235
+ ### Effort Estimate
236
+ XS (<1h) / S (1–4h) / M (1–2d) / L (3–5d) / XL (>1 week)
237
+
238
+ ### Priority
239
+ P0 (critical, act now) / P1 (high, this sprint) / P2 (medium, backlog) / P3 (low, someday)
240
+
241
+ ### Recommended Action
242
+ One of: Accept & Prioritize, Request More Info, Mark Duplicate (#N),
243
+ Close (Stale), Close (Out of Scope), Link to Existing PR
244
+
245
+ ### Draft Comment
246
+ Draft a GitHub comment in English. Be specific, helpful, and constructive.
247
+ Include: what was found, what action is being taken, and (if closing) why.
248
+ ```
249
+
250
+ If an issue has > 50 comments, summarize the last 5 only.
251
+
252
+ Aggregate all agent reports. Display a summary after all analyses complete.
253
+
254
+ ---
255
+
256
+ ## Phase 3 — Actions (explicit validation required)
257
+
258
+ ### Available Action Types
259
+
260
+ - **Comment**: `gh issue comment {num} --body-file -`
261
+ - **Label**: `gh issue edit {num} --add-label "{label}"` (skip if label already present)
262
+ - **Close**: `gh issue close {num} --reason "not planned"` (never without explicit user approval)
263
+
264
+ ### Draft Generation
265
+
266
+ For each analyzed issue, generate the complete action set (comment + labels + close if applicable).
267
+
268
+ **Rules:**
269
+ - GitHub comment language: **English** (international audience)
270
+ - Tone: professional, constructive, factual
271
+ - Never re-label an issue that already has the label
272
+ - Never propose `close` for a collaborator's issue
273
+ - Always show the full draft before any `gh issue comment` is executed
274
+
275
+ ### Display and Validation
276
+
277
+ Show **all drafts** in this format:
278
+
279
+ ```
280
+ ---
281
+ ### Draft — Issue #{num}: {title}
282
+
283
+ **Proposed actions**: {Comment | Label: "bug" | Close}
284
+
285
+ **Comment**:
286
+ {full comment text}
287
+
288
+ ---
289
+ ```
290
+
291
+ Then ask for explicit approval via `AskUserQuestion`:
292
+
293
+ ```
294
+ question: "These actions are ready. Which ones would you like to execute?"
295
+ header: "Execute"
296
+ multiSelect: true
297
+ options:
298
+ - label: "All ({N} actions)"
299
+ description: "Comment + label + close per the drafts above"
300
+ - label: "Issue #{x} — {title_truncated}"
301
+ description: "Execute only the actions for this issue"
302
+ - label: "None"
303
+ description: "Cancel — do nothing"
304
+ ```
305
+
306
+ (Generate one option per issue, plus "All" and "None".)
307
+
308
+ ### Execution
309
+
310
+ For each validated action, execute in order: comment → label → close.
311
+
312
+ ```bash
313
+ # Comment
314
+ gh issue comment {num} --body-file - <<'COMMENT_EOF'
315
+ {comment}
316
+ COMMENT_EOF
317
+
318
+ # Label (if applicable)
319
+ gh issue edit {num} --add-label "{label}"
320
+
321
+ # Close (if applicable)
322
+ gh issue close {num} --reason "not planned"
323
+ ```
324
+
325
+ Confirm each action: `Comment posted on issue #{num}: {title}`
326
+
327
+ "None" → `No actions executed. Workflow complete.`
328
+
329
+ ---
330
+
331
+ ## Edge Cases
332
+
333
+ | Situation | Behavior |
334
+ |-----------|----------|
335
+ | 0 open issues | Print `No open issues.` and exit |
336
+ | Issue without body | Categorize by title; recommend `Comment needed` |
337
+ | > 50 comments | Summarize last 5 only |
338
+ | False positive duplicate | Phase 2 confirms/rejects — never act on suspicion alone |
339
+ | Label already present | Skip, note "label already applied" |
340
+ | Collaborator issue | Never `close candidate` automatically |
341
+ | GitHub API rate limit | Reduce `--limit`, notify user |
342
+ | Merged PR linked to open issue | Recommend closing the issue |
343
+ | Issue inactive > 90d | Very Stale — propose close with a considerate message |
344
+ | Duplicate confirmed in Phase 2 | Post comment + close in favor of the original issue |
345
+
346
+ ---
347
+
348
+ ## Notes
349
+
350
+ - Always derive owner/repo via `gh repo view` — never hardcode
351
+ - Use `gh` CLI (not direct `curl` GitHub API calls, except the collaborators endpoint)
352
+ - `updatedAt` may be null on some issues → fall back to `createdAt`
353
+ - Never post or close without explicit user approval in this chat session
354
+ - Drafted comments must be shown in full BEFORE any `gh issue comment` is executed
@@ -0,0 +1,207 @@
1
+ ---
2
+ name: github-repo-recap
3
+ description: Generate a comprehensive repository recap (open PRs by category, issues, recent releases, executive summary) formatted as Markdown ready to share with the team. Detects overlapping PRs, author clusters, and issue-PR cross-references. Copies result to clipboard.
4
+ allowed-tools: Bash Read Grep
5
+ ---
6
+
7
+ # GitHub Repo Recap
8
+
9
+ // Pattern adapted from RTK (Rust Token Killer) repo-recap skill — rebranded for monomind
10
+
11
+ Generate a structured snapshot of the repository state: open PRs (categorized by contributor type and health), open issues, recent releases, and an executive summary. Output is Markdown with clickable GitHub links, ready to paste into Slack or a team meeting.
12
+
13
+ ## Preconditions
14
+
15
+ Before gathering data, verify:
16
+
17
+ ```bash
18
+ # Must be inside a git repo
19
+ git rev-parse --is-inside-work-tree
20
+
21
+ # Must have gh CLI authenticated
22
+ gh auth status
23
+ ```
24
+
25
+ If either check fails, stop and tell the user what's missing before proceeding.
26
+
27
+ ## Steps
28
+
29
+ ### 1. Gather Data (run in parallel)
30
+
31
+ ```bash
32
+ # Repo identity (for constructing links)
33
+ gh repo view --json nameWithOwner -q .nameWithOwner
34
+
35
+ # Open PRs with full metadata
36
+ gh pr list --state open --limit 50 \
37
+ --json number,title,author,createdAt,changedFiles,additions,deletions,reviewDecision,isDraft
38
+
39
+ # Open issues with metadata
40
+ gh issue list --state open --limit 50 \
41
+ --json number,title,author,createdAt,labels,assignees
42
+
43
+ # Recent releases
44
+ gh release list --limit 5
45
+
46
+ # Recently merged PRs (contributor activity signal)
47
+ gh pr list --state merged --limit 10 --json number,title,author,mergedAt
48
+ ```
49
+
50
+ Note: `author` in JSON results is an object `{login: "..."}` — always extract `.author.login` when processing.
51
+
52
+ ### 2. Determine Maintainers
53
+
54
+ To distinguish internal PRs from external contributions:
55
+
56
+ ```bash
57
+ gh api repos/{owner}/{repo}/collaborators --jq '.[].login'
58
+ ```
59
+
60
+ If this fails (403/404 permissions), fall back to: authors who have merged PRs recently are likely maintainers. When genuinely ambiguous, ask the user.
61
+
62
+ ### 3. Analyze and Categorize
63
+
64
+ #### PRs — Three groups:
65
+
66
+ **Our PRs** (author is a repo collaborator):
67
+ - List with PR number (linked), title, size (+additions, file count), review status
68
+
69
+ **External — Reviewable** (manageable size, no major blockers):
70
+ - Additions ≤ 1000 AND files ≤ 10
71
+ - No merge conflicts, CI not failing
72
+ - Include: PR link, author, title, size, review status, recommended action
73
+
74
+ **External — Problematic** (any of: too large, CI failing, overlapping, merge conflict):
75
+ - Additions > 1000 OR files > 10
76
+ - OR `reviewDecision == "CHANGES_REQUESTED"` or checks failing
77
+ - OR touches same files as another open PR
78
+ - Include: PR link, author, title, size, specific problem, required action
79
+
80
+ **Size labels** (use in the "Size" column for fast visual triage):
81
+
82
+ | Label | Additions |
83
+ | ----- | --------- |
84
+ | XS | < 50 |
85
+ | S | 50–200 |
86
+ | M | 200–500 |
87
+ | L | 500–1000 |
88
+ | XL | > 1000 |
89
+
90
+ Format: `+{additions}, {files} files ({label})` — e.g., `+245, 2 files (S)`
91
+
92
+ #### Detect overlaps:
93
+
94
+ Two PRs overlap if they modify the same files. Use `changedFiles` from the JSON. If > 50% file overlap between two PRs, flag both as overlapping and cross-reference them in the table.
95
+
96
+ #### Flag clusters:
97
+
98
+ If one author has 3+ open PRs, note it as a "cluster" with a suggested review order (smallest first, or by dependency chain if apparent).
99
+
100
+ #### Issues — Categories:
101
+
102
+ - **In progress**: has an associated open PR (match by PR body containing `fixes #N`, `closes #N`, or `resolves #N`)
103
+ - **Quick fix**: small scope, actionable (bug reports, small enhancements)
104
+ - **Feature request**: larger scope, needs design discussion
105
+ - **Covered by PR**: an existing PR addresses this issue (link it)
106
+
107
+ ### 4. Derive Recent Releases
108
+
109
+ From `gh release list` output, extract version, date, and name — list the 5 most recent.
110
+
111
+ If no releases found, check merged PRs for release-please pattern (titles matching `chore(*): release *`) as fallback.
112
+
113
+ ### 5. Executive Summary
114
+
115
+ Produce 5–6 bullet points covering:
116
+ - Total open PRs and issues count
117
+ - Active contributors (who has the most open PRs/issues)
118
+ - Main risks (oversized PRs, CI failures, merge conflicts)
119
+ - Quick wins (XS/S PRs ready to merge with no blockers)
120
+ - Bug fixes needed (regressions, critical issues)
121
+ - Status of maintainer-owned PRs
122
+
123
+ ### 6. Format Output
124
+
125
+ Structure the recap as Markdown:
126
+
127
+ ```markdown
128
+ # {Repo Name} — Recap {date}
129
+
130
+ ## Recent Releases
131
+
132
+ | Version | Date | Highlights |
133
+ | ------- | ---- | ---------- |
134
+
135
+ ---
136
+
137
+ ## Open PRs ({count} total)
138
+
139
+ ### Our PRs
140
+
141
+ | PR | Title | Size | Status |
142
+ | -- | ----- | ---- | ------ |
143
+
144
+ ### External — Reviewable
145
+
146
+ | PR | Author | Title | Size | Status | Action |
147
+ | -- | ------ | ----- | ---- | ------ | ------ |
148
+
149
+ ### External — Problematic
150
+
151
+ | PR | Author | Title | Size | Problem | Action |
152
+ | -- | ------ | ----- | ---- | ------- | ------ |
153
+
154
+ ---
155
+
156
+ ## Open Issues ({count} total)
157
+
158
+ | # | Author | Subject | Priority |
159
+ | - | ------ | ------- | -------- |
160
+
161
+ ---
162
+
163
+ ## Executive Summary
164
+
165
+ - **Point 1**: ...
166
+ - **Point 2**: ...
167
+ ```
168
+
169
+ **Rules:**
170
+ - All PR/issue numbers as clickable links: `[#123](https://github.com/{owner}/{repo}/pull/123)` for PRs, `.../issues/123` for issues
171
+ - Tables use Markdown pipe syntax
172
+ - Bold for emphasis on actions and risks
173
+ - Cross-reference related PRs and issues (e.g., "Covered by [#131](link)")
174
+ - Truncate long titles to ~60 chars for table readability
175
+
176
+ **Empty data handling:**
177
+ - 0 open PRs → `No open PRs.`
178
+ - 0 open issues → `No open issues.`
179
+ - 0 releases → `No recent releases.`
180
+
181
+ ### 7. Copy to Clipboard
182
+
183
+ After displaying the recap, copy it automatically:
184
+
185
+ ```bash
186
+ clip() {
187
+ if command -v pbcopy &>/dev/null; then pbcopy
188
+ elif command -v xclip &>/dev/null; then xclip -selection clipboard
189
+ elif command -v wl-copy &>/dev/null; then wl-copy
190
+ else cat
191
+ fi
192
+ }
193
+
194
+ cat << 'EOF' | clip
195
+ {formatted recap content}
196
+ EOF
197
+ ```
198
+
199
+ Confirm: "Copied to clipboard."
200
+
201
+ ## Notes
202
+
203
+ - Always derive owner/repo from `gh repo view` — never hardcode
204
+ - Use `gh` CLI for all data gathering (not direct GitHub API calls, except the collaborators endpoint)
205
+ - `author` in gh JSON is an object — always use `.author.login`
206
+ - Keep tables compact — truncate long titles if needed
207
+ - Cross-reference overlapping PRs and related issues whenever possible
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: mastermind-delegation
3
+ description: Agent Delegation Capability — injected into every spawned agent prompt so subagents can further delegate specialized work. Never invoked directly; referenced by _protocol.md and domain skills.
4
+ type: shared
5
+ ---
6
+
7
+ # Agent Delegation Capability
8
+
9
+ This file defines the **AGENT DELEGATION CAPABILITY** block that MUST be included verbatim in every `Task` / `Agent` spawn within mastermind and monomind commands.
10
+
11
+ Including it in every agent prompt makes delegation **recursive**: an agent can spawn sub-agents, which can spawn their own sub-agents, each with full access to the same capability.
12
+
13
+ ---
14
+
15
+ ## How to use this file
16
+
17
+ When writing a Task/Agent `description` or `prompt`, paste the section below verbatim after `BRAIN CONTEXT:`. Do not paraphrase — paste it as-is so sub-agents receive the full capability statement.
18
+
19
+ ---
20
+
21
+ ## AGENT DELEGATION CAPABILITY [paste this block into every agent prompt]
22
+
23
+ ```
24
+ == AGENT DELEGATION CAPABILITY ==
25
+ You have full access to the Agent tool (Claude Code: Task tool) to spawn
26
+ sub-agents for any specialized subtask. This capability is recursive —
27
+ sub-agents you spawn also receive it.
28
+
29
+ Available agent categories (use the exact slug or name):
30
+
31
+ CORE coder · reviewer · tester · planner · researcher
32
+ BACKEND backend-dev · Backend Architect · DB Optimizer · API Tester
33
+ FRONTEND Frontend Developer · mobile-dev · Mobile App Builder
34
+ ARCH Software Architect · system-architect
35
+ SECURITY Security Engineer · security-architect
36
+ AI/ML AI Engineer · ml-developer · Data Engineer
37
+ DEVOPS DevOps Automator · SRE · cicd-engineer
38
+ DOCS Technical Writer · api-docs
39
+ PRODUCT Product Manager · Launch Strategist · CRO Specialist
40
+ MARKETING Content Creator · SEO Specialist · Growth Hacker · Email Marketing
41
+ SOCIAL TikTok · LinkedIn · Twitter · Instagram Strategist
42
+ SALES Deal Strategist · Sales Coach · Outbound Strategist
43
+ BUSINESS Finance Tracker · Legal Compliance Checker · Analytics Reporter
44
+ DESIGN Monodesign (UI/UX · brand · CSS · animation · design systems)
45
+
46
+ WHEN to delegate:
47
+ - A subtask needs deeper expertise than your primary role
48
+ - Work can be done faster in parallel by concurrent specialists
49
+ - A subtask is outside your domain but blocks your progress
50
+
51
+ HOW to delegate:
52
+ Agent({
53
+ subagent_type: "agent-slug",
54
+ description: "Short task label",
55
+ prompt: `Full self-contained briefing — treat every sub-agent as cold-start.
56
+ Include: context, scope, success criteria, and this AGENT DELEGATION
57
+ CAPABILITY block so they can further delegate if needed.`,
58
+ run_in_background: true // use for parallel work
59
+ })
60
+
61
+ RULES:
62
+ - Always pass enough context for the sub-agent to work independently
63
+ - Collect and synthesize sub-agent results before writing your final output
64
+ - Report what you delegated and what each sub-agent returned
65
+ - If a sub-agent is blocked, handle it rather than silently failing
66
+ =================================
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Placement in agent prompts
72
+
73
+ ```
74
+ BRAIN CONTEXT:
75
+ [...]
76
+ =====================
77
+
78
+ == AGENT DELEGATION CAPABILITY ==
79
+ [full block above]
80
+ =================================
81
+
82
+ YOUR GOAL: [task description]
83
+ ```
@@ -10,6 +10,20 @@ This file is a reference loaded by mastermind domain skills and master. It is NE
10
10
 
11
11
  ---
12
12
 
13
+ ## Agent Delegation Protocol
14
+
15
+ **Every Task/Agent spawn in mastermind and monomind MUST include the AGENT DELEGATION CAPABILITY block from `_delegation.md`.**
16
+
17
+ This makes delegation recursive: every spawned agent can itself spawn sub-agents, which can spawn their own sub-agents. The capability block tells each agent which agent categories exist and how to delegate.
18
+
19
+ **Placement:** In the Task/Agent `description` or `prompt` field, insert the full `== AGENT DELEGATION CAPABILITY == ... =================================` block immediately after `BRAIN CONTEXT:`.
20
+
21
+ **Why this matters:** Agents read their prompts cold. Without the delegation block, a spawned Security Engineer won't know it can delegate codebase exploration to a Code Reviewer, or that it can spawn a backend-dev to fix the issues it finds. With the block, every agent in the chain can self-organize and pull in the right specialist.
22
+
23
+ **Reference:** Full block text is in `_delegation.md`. Copy it verbatim — do not paraphrase.
24
+
25
+ ---
26
+
13
27
  ## Brain Load Procedure
14
28
 
15
29
  Execute at the START of every mastermind run (master or standalone domain command). Load in this order:
@@ -1 +1 @@
1
- {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/init/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAgB,MAAM,YAAY,CAAC;AA4PxE,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA6G3E;AAmID;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,+BAA+B;IAC/B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAoID;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,UAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CA+NvG;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,UAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAsGlH;AAm3CD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAI,GAAG,MAAM,EAAE,CA6C3D;AAED,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../../src/init/executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAgB,MAAM,YAAY,CAAC;AA4PxE,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CA6G3E;AAmID;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,kCAAkC;IAClC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,+BAA+B;IAC/B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAoID;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,UAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAwNvG;AAED;;;;;GAKG;AACH,wBAAsB,yBAAyB,CAAC,SAAS,EAAE,MAAM,EAAE,eAAe,UAAQ,GAAG,OAAO,CAAC,aAAa,CAAC,CAsGlH;AA03CD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,SAAI,GAAG,MAAM,EAAE,CA6C3D;AAED,eAAe,WAAW,CAAC"}