@automagik/genie 3.260302.1 → 3.260302.2

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 (301) hide show
  1. package/.claude-plugin/marketplace.json +3 -3
  2. package/.coderabbit.yaml +29 -0
  3. package/.genie/wishes/resolve-dev-desync/WISH.md +116 -0
  4. package/.github/assets/genie-header.png +0 -0
  5. package/.github/workflows/ci.yml +69 -0
  6. package/.github/workflows/commitlint.yml +25 -0
  7. package/.github/workflows/release.yml +111 -0
  8. package/.github/workflows/rolling-pr.yml +52 -0
  9. package/.github/workflows/version.yml +83 -0
  10. package/.husky/commit-msg +1 -0
  11. package/.husky/pre-commit +1 -0
  12. package/.husky/pre-push +13 -0
  13. package/LICENSE +21 -0
  14. package/Makefile +24 -0
  15. package/README.md +204 -313
  16. package/TEAM_LEAD_PROMPT.md +69 -0
  17. package/biome.json +142 -0
  18. package/cliff.toml +75 -0
  19. package/commitlint.config.ts +4 -0
  20. package/dist/genie.js +421 -301
  21. package/docs/CO-ORCHESTRATION-GUIDE.md +53 -106
  22. package/docs/{worker-profiles.md → agent-profiles.md} +11 -29
  23. package/git-cliff/CHANGELOG.md +280 -0
  24. package/install.sh +10 -10
  25. package/knip.json +5 -0
  26. package/openclaw.plugin.json +2 -4
  27. package/package.json +18 -11
  28. package/plugins/genie/.claude-plugin/plugin.json +3 -10
  29. package/plugins/genie/agents/council--architect.md +12 -0
  30. package/plugins/genie/agents/council--benchmarker.md +12 -0
  31. package/plugins/genie/agents/council--deployer.md +13 -1
  32. package/plugins/genie/agents/council--ergonomist.md +12 -0
  33. package/plugins/genie/agents/council--measurer.md +12 -0
  34. package/plugins/genie/agents/council--operator.md +12 -0
  35. package/plugins/genie/agents/council--questioner.md +12 -0
  36. package/plugins/genie/agents/council--sentinel.md +13 -1
  37. package/plugins/genie/agents/council--simplifier.md +12 -0
  38. package/plugins/genie/agents/council--tracer.md +12 -0
  39. package/plugins/genie/agents/debug.md +92 -0
  40. package/plugins/genie/agents/docs.md +90 -0
  41. package/plugins/genie/agents/fix.md +48 -48
  42. package/plugins/genie/agents/implementor.md +40 -38
  43. package/plugins/genie/agents/learn.md +108 -0
  44. package/plugins/genie/agents/quality-reviewer.md +35 -60
  45. package/plugins/genie/agents/refactor.md +62 -126
  46. package/plugins/genie/agents/spec-reviewer.md +36 -32
  47. package/plugins/genie/agents/tests.md +55 -161
  48. package/plugins/genie/genie.ts +2 -2
  49. package/plugins/genie/package.json +1 -1
  50. package/plugins/genie/references/dispatch-contract.md +9 -9
  51. package/plugins/genie/scripts/genie.cjs +452 -91
  52. package/plugins/genie/scripts/smart-install.js +20 -18
  53. package/plugins/genie/scripts/worker-service.cjs +3 -3
  54. package/scripts/build.js +11 -12
  55. package/scripts/smart-install.js +20 -18
  56. package/scripts/sync.js +26 -22
  57. package/scripts/uninstall.js +9 -11
  58. package/scripts/version.ts +14 -27
  59. package/skills/debug/SKILL.md +52 -0
  60. package/skills/docs/SKILL.md +38 -0
  61. package/skills/dream/SKILL.md +3 -3
  62. package/skills/fix/SKILL.md +1 -1
  63. package/skills/learn/SKILL.md +52 -0
  64. package/skills/review/SKILL.md +1 -1
  65. package/skills/work/SKILL.md +7 -7
  66. package/src/__tests__/beads-issues-jsonl.test.ts +5 -5
  67. package/src/__tests__/brainstorm-crystallize.test.ts +3 -3
  68. package/src/__tests__/events.test.ts +19 -18
  69. package/src/genie-commands/__tests__/tui.test.ts +109 -0
  70. package/src/genie-commands/brainstorm/crystallize.ts +7 -4
  71. package/src/genie-commands/doctor.ts +26 -155
  72. package/src/genie-commands/install.ts +64 -78
  73. package/src/genie-commands/ledger/validate.ts +1 -1
  74. package/src/genie-commands/profiles.ts +9 -49
  75. package/src/genie-commands/setup.ts +71 -46
  76. package/src/genie-commands/shortcuts.ts +4 -4
  77. package/src/genie-commands/tui.ts +186 -33
  78. package/src/genie-commands/uninstall.ts +50 -63
  79. package/src/genie-commands/update.ts +54 -44
  80. package/src/genie.ts +120 -127
  81. package/src/lib/{worker-registry.test.ts → agent-registry.test.ts} +77 -83
  82. package/src/lib/agent-registry.ts +446 -0
  83. package/src/lib/auto-approve-engine.test.ts +15 -27
  84. package/src/lib/auto-approve-engine.ts +67 -85
  85. package/src/lib/auto-approve.test.ts +12 -19
  86. package/src/lib/auto-approve.ts +72 -119
  87. package/src/lib/batch-manager.test.ts +53 -18
  88. package/src/lib/batch-manager.ts +16 -34
  89. package/src/lib/beads-issues-jsonl.ts +15 -20
  90. package/src/lib/beads-registry.ts +19 -171
  91. package/src/lib/claude-logs.test.ts +9 -11
  92. package/src/lib/claude-logs.ts +67 -153
  93. package/src/lib/claude-native-teams.ts +485 -0
  94. package/src/lib/claude-settings.ts +7 -101
  95. package/src/lib/codex-config.ts +114 -0
  96. package/src/lib/event-aggregator.test.ts +138 -104
  97. package/src/lib/event-aggregator.ts +3 -3
  98. package/src/lib/event-listener.test.ts +6 -7
  99. package/src/lib/event-listener.ts +2 -4
  100. package/src/lib/genie-config.ts +19 -230
  101. package/src/lib/genie-dir.ts +4 -12
  102. package/src/lib/idle-timeout.test.ts +253 -0
  103. package/src/lib/idle-timeout.ts +147 -0
  104. package/src/lib/local-tasks.test.ts +52 -20
  105. package/src/lib/local-tasks.ts +41 -63
  106. package/src/lib/log-reader.ts +87 -123
  107. package/src/lib/mailbox.ts +23 -58
  108. package/src/lib/mosaic-layout.ts +2 -5
  109. package/src/lib/orchestrator/event-monitor.ts +58 -273
  110. package/src/lib/orchestrator/index.ts +0 -1
  111. package/src/lib/orchestrator/patterns.ts +9 -33
  112. package/src/lib/orchestrator/state-detector.ts +73 -114
  113. package/src/lib/protocol-router-spawn.ts +158 -0
  114. package/src/lib/protocol-router.ts +263 -76
  115. package/src/lib/provider-adapters.test.ts +83 -16
  116. package/src/lib/provider-adapters.ts +119 -45
  117. package/src/lib/skill-loader.ts +18 -240
  118. package/src/lib/spawn-command.test.ts +8 -178
  119. package/src/lib/spawn-command.ts +11 -57
  120. package/src/lib/system-detect.ts +20 -15
  121. package/src/lib/target-resolver.test.ts +23 -31
  122. package/src/lib/target-resolver.ts +122 -163
  123. package/src/lib/task-backend.ts +72 -60
  124. package/src/lib/team-auto-spawn.test.ts +109 -0
  125. package/src/lib/team-auto-spawn.ts +120 -0
  126. package/src/lib/team-lead-command.ts +72 -0
  127. package/src/lib/team-manager.ts +32 -12
  128. package/src/lib/tmux-wrapper.ts +6 -6
  129. package/src/lib/tmux.ts +134 -211
  130. package/src/lib/version.ts +1 -11
  131. package/src/lib/wish-editor.test.ts +18 -18
  132. package/src/lib/wish-editor.ts +10 -18
  133. package/src/lib/wish-tasks.ts +8 -83
  134. package/src/lib/worktree-manager.test.ts +14 -13
  135. package/src/lib/worktree-manager.ts +21 -25
  136. package/src/term-commands/agents.ts +1427 -0
  137. package/src/term-commands/approve.test.ts +8 -16
  138. package/src/term-commands/approve.ts +68 -75
  139. package/src/term-commands/beads-validate.ts +49 -32
  140. package/src/term-commands/brainstorm-beads.ts +6 -8
  141. package/src/term-commands/close.ts +160 -161
  142. package/src/term-commands/council.ts +37 -39
  143. package/src/term-commands/create.ts +22 -23
  144. package/src/term-commands/daemon.ts +33 -32
  145. package/src/term-commands/events.test.ts +10 -15
  146. package/src/term-commands/events.ts +165 -226
  147. package/src/term-commands/exec.ts +7 -14
  148. package/src/term-commands/history.test.ts +5 -9
  149. package/src/term-commands/history.ts +256 -282
  150. package/src/term-commands/msg.test.ts +196 -0
  151. package/src/term-commands/msg.ts +117 -50
  152. package/src/term-commands/orchestrate.ts +40 -769
  153. package/src/term-commands/read.ts +26 -15
  154. package/src/term-commands/ship.test.ts +18 -21
  155. package/src/term-commands/ship.ts +96 -105
  156. package/src/term-commands/shortcuts.ts +143 -169
  157. package/src/term-commands/task/commands.ts +150 -127
  158. package/src/term-commands/team.ts +42 -13
  159. package/src/term-commands/update.ts +61 -64
  160. package/src/term-commands/work.test.ts +117 -129
  161. package/src/term-commands/work.ts +573 -533
  162. package/src/types/genie-config.ts +16 -19
  163. package/templates/genie-config.template.json +2 -4
  164. package/.beads/README.md +0 -81
  165. package/.beads/config.yaml +0 -67
  166. package/.beads/interactions.jsonl +0 -0
  167. package/.beads/issues.jsonl +0 -19
  168. package/.beads/metadata.json +0 -4
  169. package/.genie/.gitkeep +0 -4
  170. package/.genie/GENIE-CLI-KNOWLEDGE-BASE.md +0 -242
  171. package/.genie/TASKS.md +0 -64
  172. package/.genie/UNIFICATION-CHECKLIST.md +0 -245
  173. package/.genie/backlog/hooks-v2.md +0 -82
  174. package/.genie/backlog/pane-orchestration-v2.md +0 -38
  175. package/.genie/backlog/upgrade-brainstorm.md +0 -124
  176. package/.genie/backlog/wrs-backlog-reorg-2026-02-19.md +0 -105
  177. package/.genie/brainstorms/forge-resilience/design.md +0 -83
  178. package/.genie/brainstorms/wrs-backlog-reorg/design.md +0 -98
  179. package/.genie/consciousness-extract.md +0 -345
  180. package/.genie/devops-and-templates-extract.md +0 -90
  181. package/.genie/genie-cli-commit-narrative.md +0 -60
  182. package/.genie/issues/issue-001-split-wrong-window.md +0 -41
  183. package/.genie/tasks/agent-delegation-handover.md +0 -85
  184. package/.genie/tasks/fix-global-install.md +0 -63
  185. package/.genie/teams/debug.json +0 -10
  186. package/.genie/teams/dream.json +0 -10
  187. package/.genie/teams/fix.json +0 -10
  188. package/.genie/teams/review.json +0 -10
  189. package/.genie/teams/work.json +0 -11
  190. package/.genie/wishes/active-pane-resolution/wish.md +0 -82
  191. package/.genie/wishes/claudio-profiles/wish.md +0 -80
  192. package/.genie/wishes/cli-reorganization/wish.md +0 -688
  193. package/.genie/wishes/fix-install-sync/wish.md +0 -164
  194. package/.genie/wishes/forge-resilience/wish.md +0 -228
  195. package/.genie/wishes/genie-cli-teams/WISH.md +0 -263
  196. package/.genie/wishes/hooks-v2/wish.md +0 -160
  197. package/.genie/wishes/pane-orchestration-v2/wish.md +0 -168
  198. package/.genie/wishes/skill-docs-update/wish.md +0 -255
  199. package/.genie/wishes/upgrade-brainstorm/wish.md +0 -141
  200. package/.genie/wishes/wish-23-auto-approve/wish.md +0 -146
  201. package/.genie/wishes/wish-24-worker-dashboard/wish.md +0 -111
  202. package/.genie/wishes/wish-25-parallel-spawn/wish.md +0 -144
  203. package/.genie/wishes/wish-26-worker-addressed-commands/wish.md +0 -259
  204. package/.genie/wishes/workflow-rebrand/wish.md +0 -155
  205. package/.genie/wishes/wrs-backlog-reorg/wish.md +0 -269
  206. package/.github/workflows/publish.yml +0 -37
  207. package/AGENTS.md +0 -115
  208. package/BOOTSTRAP.md +0 -156
  209. package/CHANGELOG.md +0 -41
  210. package/HEARTBEAT.md +0 -5
  211. package/IDENTITY.md +0 -13
  212. package/Jenkinsfile.fleet-cli +0 -172
  213. package/SKILL-STYLE.md +0 -76
  214. package/SOUL.md +0 -36
  215. package/TOOLS.md +0 -68
  216. package/USER.md +0 -14
  217. package/bun.lock +0 -164
  218. package/dist/claudio.js +0 -66
  219. package/memory/2026-02-10.md +0 -120
  220. package/memory/2026-02-11.md +0 -103
  221. package/memory/2026-02-12.md +0 -32
  222. package/memory/2026-02-13.md +0 -58
  223. package/packages/genie-pdf/README.md +0 -229
  224. package/packages/genie-pdf/bun.lock +0 -381
  225. package/packages/genie-pdf/package.json +0 -28
  226. package/packages/genie-pdf/src/cli.ts +0 -125
  227. package/packages/genie-pdf/src/components/CodeBlock.tsx +0 -82
  228. package/packages/genie-pdf/src/components/Document.tsx +0 -228
  229. package/packages/genie-pdf/src/components/Flowchart.tsx +0 -378
  230. package/packages/genie-pdf/src/components/Markdown.tsx +0 -341
  231. package/packages/genie-pdf/src/components/TOC.tsx +0 -76
  232. package/packages/genie-pdf/src/components/Table.tsx +0 -158
  233. package/packages/genie-pdf/src/components/index.ts +0 -6
  234. package/packages/genie-pdf/src/index.ts +0 -4
  235. package/packages/genie-pdf/src/markdown.ts +0 -63
  236. package/packages/genie-pdf/src/render.ts +0 -102
  237. package/packages/genie-pdf/src/templates/index.ts +0 -4
  238. package/packages/genie-pdf/src/templates/invoice.tsx +0 -257
  239. package/packages/genie-pdf/src/templates/report.tsx +0 -140
  240. package/packages/genie-pdf/src/templates/research.tsx +0 -203
  241. package/packages/genie-pdf/src/templates/resume.tsx +0 -307
  242. package/packages/genie-pdf/src/themes/corporate.ts +0 -38
  243. package/packages/genie-pdf/src/themes/dark.ts +0 -39
  244. package/packages/genie-pdf/src/themes/default.ts +0 -42
  245. package/packages/genie-pdf/src/themes/executive.ts +0 -30
  246. package/packages/genie-pdf/src/themes/glass.ts +0 -33
  247. package/packages/genie-pdf/src/themes/index.ts +0 -53
  248. package/packages/genie-pdf/src/themes/minimal.ts +0 -38
  249. package/packages/genie-pdf/templates/example-invoice.json +0 -23
  250. package/packages/genie-pdf/templates/example.md +0 -106
  251. package/packages/genie-pdf/tsconfig.json +0 -23
  252. package/plugins/genie/agents/git.md +0 -159
  253. package/src/claudio.ts +0 -139
  254. package/src/commands/launch.ts +0 -86
  255. package/src/commands/models.ts +0 -43
  256. package/src/commands/profiles.ts +0 -95
  257. package/src/commands/setup.ts +0 -5
  258. package/src/genie-commands/pdf.ts +0 -119
  259. package/src/lib/api-client.ts +0 -109
  260. package/src/lib/config.ts +0 -109
  261. package/src/lib/hook-manager.ts +0 -130
  262. package/src/lib/orchestrator/completion.ts +0 -392
  263. package/src/lib/picker.ts +0 -62
  264. package/src/lib/plugin-registry.ts +0 -262
  265. package/src/lib/session-metadata.ts +0 -58
  266. package/src/lib/wizard.ts +0 -104
  267. package/src/lib/worker-registry.ts +0 -360
  268. package/src/lib/worktree.ts +0 -362
  269. package/src/services/worker-service.ts +0 -351
  270. package/src/term-commands/attach.ts +0 -23
  271. package/src/term-commands/batch.test.ts +0 -333
  272. package/src/term-commands/batch.ts +0 -324
  273. package/src/term-commands/command-wiring.test.ts +0 -198
  274. package/src/term-commands/dashboard.test.ts +0 -890
  275. package/src/term-commands/dashboard.ts +0 -619
  276. package/src/term-commands/feed.ts +0 -326
  277. package/src/term-commands/hook.ts +0 -42
  278. package/src/term-commands/kill.ts +0 -200
  279. package/src/term-commands/ls.ts +0 -33
  280. package/src/term-commands/new.ts +0 -73
  281. package/src/term-commands/next.ts +0 -122
  282. package/src/term-commands/pane.ts +0 -81
  283. package/src/term-commands/push.ts +0 -78
  284. package/src/term-commands/resolve.ts +0 -41
  285. package/src/term-commands/rm.ts +0 -47
  286. package/src/term-commands/score.ts +0 -103
  287. package/src/term-commands/send.ts +0 -36
  288. package/src/term-commands/session/commands.ts +0 -191
  289. package/src/term-commands/session/index.ts +0 -48
  290. package/src/term-commands/spawn-parallel.test.ts +0 -629
  291. package/src/term-commands/spawn-parallel.ts +0 -639
  292. package/src/term-commands/spawn.ts +0 -566
  293. package/src/term-commands/split.ts +0 -95
  294. package/src/term-commands/status.ts +0 -116
  295. package/src/term-commands/sync.ts +0 -212
  296. package/src/term-commands/term.ts +0 -629
  297. package/src/term-commands/window.ts +0 -72
  298. package/src/term-commands/wish/commands.ts +0 -338
  299. package/src/term-commands/work-session.test.ts +0 -168
  300. package/src/term-commands/workers.ts +0 -528
  301. package/src/types/config.ts +0 -17
@@ -1,16 +1,16 @@
1
1
  {
2
- "name": "namastexlabs",
2
+ "name": "automagik",
3
3
  "owner": {
4
4
  "name": "Namastex Labs"
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Plugins by Namastex Labs",
8
- "homepage": "https://github.com/namastexlabs/genie-cli"
8
+ "homepage": "https://github.com/automagik-dev/genie"
9
9
  },
10
10
  "plugins": [
11
11
  {
12
12
  "name": "genie",
13
- "version": "3.260302.1",
13
+ "version": "3.260302.2",
14
14
  "source": "./plugins/genie",
15
15
  "description": "Human-AI partnership for Claude Code. Share a terminal, orchestrate workers, evolve together. Brainstorm ideas, wish them into plans, make with parallel agents, ship as one team. A coding genie that grows with your project."
16
16
  }
@@ -0,0 +1,29 @@
1
+ language: en-US
2
+ tone_instructions: "Be direct and concise. Focus on bugs, security, and correctness over style."
3
+
4
+ reviews:
5
+ profile: assertive
6
+ high_level_summary: true
7
+ poem: false
8
+ auto_review:
9
+ enabled: true
10
+ auto_incremental_review: true
11
+ ignore_title_keywords:
12
+ - "WIP"
13
+ - "DO NOT MERGE"
14
+ - "wip"
15
+ path_filters:
16
+ - "!.wishes/**"
17
+ - "!.beads/**"
18
+ - "!memory/**"
19
+ - "!.claude/**"
20
+ - "!*.md"
21
+ - "!dist/**"
22
+ - "!plugins/genie/scripts/**"
23
+ path_instructions:
24
+ - path: "src/**"
25
+ instructions: "Core CLI source. Check for breaking changes to exported types."
26
+ - path: "plugins/**"
27
+ instructions: "Claude Code plugin. Verify plugin manifest updates are consistent."
28
+ - path: ".github/workflows/**"
29
+ instructions: "CI workflows. Check for hardcoded secrets, proper caching keys, and timeout settings."
@@ -0,0 +1,116 @@
1
+ # Wish: Resolve Dev Branch Desync After Worker→Agent Rename
2
+
3
+ | Field | Value |
4
+ |-------|-------|
5
+ | **Status** | SHIPPED |
6
+ | **Slug** | `resolve-dev-desync` |
7
+ | **Date** | 2026-03-06 |
8
+
9
+ ## Summary
10
+
11
+ Local dev branch has 9 uncommitted files from cascading dead-code cleanup (biome warning elimination round 2). Meanwhile, origin/dev advanced 8 commits including a major `Worker→Agent` type rename and `worker-registry.ts→agent-registry.ts` file rename. Need to commit local changes, rebase onto origin/dev, resolve conflicts, re-apply dead-code removals to renamed files, and verify all quality gates pass.
12
+
13
+ ## Scope
14
+
15
+ ### IN
16
+
17
+ - Commit local dead-code cleanup changes on dev branch
18
+ - Rebase onto origin/dev (8 commits behind)
19
+ - Resolve conflict in `src/lib/beads-registry.ts` (local: dead-code removal + private heartbeat; upstream: Worker→Agent type rename)
20
+ - Re-apply `countByTask` export removal to `src/lib/agent-registry.ts` (was `worker-registry.ts`)
21
+ - Verify all cascading dead-code removals still apply after upstream changes
22
+ - Run and pass all quality gates: typecheck, lint (0 warnings), dead-code (knip), tests (489/489)
23
+
24
+ ### OUT
25
+
26
+ - No new feature work — this is purely a merge/sync operation
27
+ - No additional refactoring beyond what's needed for the merge
28
+ - No changes to upstream code that isn't part of conflict resolution
29
+
30
+ ## Decisions
31
+
32
+ | Decision | Rationale |
33
+ |----------|-----------|
34
+ | Commit local changes first, then rebase | Preserves our work as a distinct commit; cleaner than stash-pop |
35
+ | Rebase (not merge) | Keeps linear history on dev branch |
36
+ | Re-apply dead-code removals to renamed files | `worker-registry.ts` → `agent-registry.ts` means our `countByTask` export removal needs to target the new filename |
37
+
38
+ ## Success Criteria
39
+
40
+ - [ ] Local dev branch is up-to-date with origin/dev
41
+ - [ ] All 9 local file changes are preserved (dead-code removals)
42
+ - [ ] `bun run check` exits 0 (typecheck + lint + dead-code + tests)
43
+ - [ ] `bunx biome check . --max-diagnostics=300` shows 0 warnings, 0 errors
44
+ - [ ] `bun test` passes 489/489 (or more, if upstream added tests)
45
+ - [ ] `git status` shows clean working tree
46
+ - [ ] Changes are pushed to origin/dev
47
+
48
+ ## Execution Groups
49
+
50
+ ### Group 1: Commit & Rebase
51
+
52
+ **Goal:** Get local dead-code cleanup committed and rebased onto origin/dev.
53
+
54
+ **Deliverables:**
55
+ 1. Commit all 9 local file changes with descriptive message
56
+ 2. `git pull --rebase origin dev`
57
+ 3. Resolve conflicts:
58
+ - `src/lib/beads-registry.ts`: Accept upstream Worker→Agent renames, keep local dead-code removals (delete `heartbeat` export, `listWorkers` function)
59
+ - `src/lib/worker-registry.ts` → `src/lib/agent-registry.ts`: Apply `countByTask` export→private change to new filename
60
+
61
+ **Acceptance criteria:**
62
+ - Rebase completes without unresolved conflicts
63
+ - `git log --oneline` shows local commit on top of upstream commits
64
+
65
+ **Validation:**
66
+ ```bash
67
+ git status # clean working tree
68
+ git log --oneline -3 # local commit on top
69
+ ```
70
+
71
+ ### Group 2: Verify & Fix Cascading Issues
72
+
73
+ **Goal:** Ensure all quality gates pass after rebase. Upstream changes may have introduced new dead code or broken our previous fixes.
74
+
75
+ **Deliverables:**
76
+ 1. Run `bun run typecheck` — fix any type errors from merge
77
+ 2. Run `bunx biome check .` — fix any new warnings (upstream may have added code with warnings)
78
+ 3. Run `bun run dead-code` — fix any new dead exports
79
+ 4. Run `bun test` — all tests pass
80
+
81
+ **Acceptance criteria:**
82
+ - `bun run check` exits 0
83
+ - 0 biome warnings
84
+ - 0 knip findings
85
+
86
+ **Validation:**
87
+ ```bash
88
+ bun run check # exits 0
89
+ bunx biome check . --max-diagnostics=300 2>&1 | grep -E 'warning|error' || echo "Clean"
90
+ ```
91
+
92
+ ### Group 3: Push
93
+
94
+ **Goal:** Push resolved branch to remote.
95
+
96
+ **Deliverables:**
97
+ 1. `git push origin dev`
98
+ 2. Verify `git status` shows up-to-date with origin
99
+
100
+ **Acceptance criteria:**
101
+ - Push succeeds
102
+ - Branch is up-to-date with origin/dev
103
+
104
+ **Validation:**
105
+ ```bash
106
+ git status # "Your branch is up to date with 'origin/dev'"
107
+ ```
108
+
109
+ ## Assumptions / Risks
110
+
111
+ | Risk | Mitigation |
112
+ |------|------------|
113
+ | Upstream may have re-introduced dead code we already cleaned | Group 2 re-runs knip and fixes new findings |
114
+ | Worker→Agent rename may have broken imports we modified | Typecheck in Group 2 will catch this |
115
+ | Upstream may have added new biome warnings | Group 2 re-runs biome and fixes |
116
+ | Test count may have changed upstream | Accept whatever the new count is, as long as all pass |
Binary file
@@ -0,0 +1,69 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ concurrency:
10
+ group: ci-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ secrets-scan:
15
+ name: Secrets Scan (GitGuardian)
16
+ runs-on: blacksmith-4vcpu-ubuntu-2404
17
+ timeout-minutes: 5
18
+ if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
19
+
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: 0
24
+
25
+ - uses: GitGuardian/ggshield-action@v1
26
+ if: ${{ env.GITGUARDIAN_API_KEY != '' }}
27
+ env:
28
+ GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
29
+ GITHUB_PUSH_BASE_SHA: ${{ github.event.pull_request.base.sha }}
30
+ GITHUB_DEFAULT_BRANCH: main
31
+ GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
32
+
33
+ quality-gate:
34
+ name: Quality Gate (typecheck + lint + test)
35
+ runs-on: blacksmith-4vcpu-ubuntu-2404
36
+ timeout-minutes: 15
37
+
38
+ steps:
39
+ - uses: actions/checkout@v4
40
+
41
+ - uses: oven-sh/setup-bun@v2
42
+ with:
43
+ bun-version: latest
44
+
45
+ - name: Cache bun packages
46
+ uses: actions/cache@v4
47
+ with:
48
+ path: ~/.bun/install/cache
49
+ key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }}
50
+ restore-keys: |
51
+ bun-${{ runner.os }}-
52
+
53
+ - name: Install dependencies
54
+ run: bun install
55
+
56
+ - name: Build
57
+ run: bun run build
58
+
59
+ - name: Typecheck
60
+ run: bun run typecheck
61
+
62
+ - name: Lint
63
+ run: bunx biome check .
64
+
65
+ - name: Dead code check (knip)
66
+ run: bunx knip
67
+
68
+ - name: Test
69
+ run: bun test
@@ -0,0 +1,25 @@
1
+ name: Commitlint
2
+
3
+ on:
4
+ push:
5
+ branches: [main, dev]
6
+ pull_request:
7
+ branches: [main, dev]
8
+
9
+ concurrency:
10
+ group: commitlint-${{ github.ref }}
11
+ cancel-in-progress: true
12
+
13
+ jobs:
14
+ commitlint:
15
+ name: Commit Messages
16
+ runs-on: blacksmith-4vcpu-ubuntu-2404
17
+ timeout-minutes: 5
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+ with:
21
+ fetch-depth: 0
22
+
23
+ - uses: wagoid/commitlint-github-action@v6
24
+ with:
25
+ configFile: commitlint.config.ts
@@ -0,0 +1,111 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ release:
13
+ name: Create Release
14
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
15
+ runs-on: blacksmith-4vcpu-ubuntu-2404
16
+ timeout-minutes: 15
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ with:
20
+ fetch-depth: 0
21
+
22
+ - name: Read version from package.json
23
+ id: pkg
24
+ run: |
25
+ VERSION=$(jq -r '.version' package.json)
26
+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
27
+ echo "Version from package.json: ${VERSION}"
28
+
29
+ - name: Check if release already exists
30
+ id: exists
31
+ env:
32
+ GH_TOKEN: ${{ github.token }}
33
+ run: |
34
+ TAG="v${{ steps.pkg.outputs.version }}"
35
+
36
+ if gh release view "${TAG}" > /dev/null 2>&1; then
37
+ echo "Release ${TAG} already exists — skipping."
38
+ echo "skip=true" >> "$GITHUB_OUTPUT"
39
+ else
40
+ echo "skip=false" >> "$GITHUB_OUTPUT"
41
+ fi
42
+
43
+ - name: Find previous release tag
44
+ id: prev
45
+ if: steps.exists.outputs.skip != 'true'
46
+ env:
47
+ GH_TOKEN: ${{ github.token }}
48
+ run: |
49
+ TAG="v${{ steps.pkg.outputs.version }}"
50
+ PREV=$(gh release list --limit 50 --json tagName -q '.[].tagName' | grep -v "^${TAG}$" | head -1)
51
+ # Verify the tag is reachable from HEAD (same history line)
52
+ if [ -n "$PREV" ] && git merge-base --is-ancestor "$PREV" HEAD 2>/dev/null; then
53
+ echo "tag=${PREV}" >> "$GITHUB_OUTPUT"
54
+ echo "Previous release tag: ${PREV}"
55
+ else
56
+ echo "tag=" >> "$GITHUB_OUTPUT"
57
+ echo "Previous release tag not reachable from HEAD — treating as initial release"
58
+ fi
59
+
60
+ - name: Generate changelog
61
+ uses: orhun/git-cliff-action@v4
62
+ id: cliff
63
+ if: steps.exists.outputs.skip != 'true' && steps.prev.outputs.tag != ''
64
+ with:
65
+ config: cliff.toml
66
+ args: ${{ format('{0}..HEAD', steps.prev.outputs.tag) }}
67
+ env:
68
+ GITHUB_REPO: ${{ github.repository }}
69
+
70
+ - name: Create release
71
+ if: steps.exists.outputs.skip != 'true'
72
+ env:
73
+ GH_TOKEN: ${{ github.token }}
74
+ RELEASE_NOTES: ${{ steps.cliff.outputs.content }}
75
+ run: |
76
+ TAG="v${{ steps.pkg.outputs.version }}"
77
+ if [ -z "$RELEASE_NOTES" ]; then
78
+ RELEASE_NOTES="Initial release of genie v3 CLI."
79
+ fi
80
+ printf '%s' "$RELEASE_NOTES" > /tmp/release-notes.md
81
+ gh release create "${TAG}" \
82
+ --target "${{ github.sha }}" \
83
+ --title "${TAG}" \
84
+ --notes-file /tmp/release-notes.md
85
+
86
+ - name: Setup Bun
87
+ if: steps.exists.outputs.skip != 'true'
88
+ uses: oven-sh/setup-bun@v2
89
+ with:
90
+ bun-version: latest
91
+
92
+ - name: Install dependencies
93
+ if: steps.exists.outputs.skip != 'true'
94
+ run: bun install --frozen-lockfile
95
+
96
+ - name: Build CLI
97
+ if: steps.exists.outputs.skip != 'true'
98
+ run: bun run build
99
+
100
+ - name: Publish to npm
101
+ if: steps.exists.outputs.skip != 'true'
102
+ env:
103
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
104
+ NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
105
+ HUSKY: "0"
106
+ run: |
107
+ if [ -z "$NPM_TOKEN" ]; then
108
+ echo "ERROR: NPM_TOKEN secret is not set. Cannot publish to npm." >&2
109
+ exit 1
110
+ fi
111
+ bun publish --access public
@@ -0,0 +1,52 @@
1
+ name: Rolling PR Maintenance
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 * * * *'
6
+ workflow_dispatch:
7
+
8
+ concurrency:
9
+ group: rolling-pr
10
+ cancel-in-progress: false
11
+
12
+ permissions:
13
+ contents: read
14
+ pull-requests: write
15
+
16
+ jobs:
17
+ maintain:
18
+ runs-on: blacksmith-4vcpu-ubuntu-2404
19
+ timeout-minutes: 5
20
+ steps:
21
+ - name: Check/Create Rolling PR
22
+ env:
23
+ # GITHUB_TOKEN cannot create PRs (org restriction).
24
+ # Use a PAT with contents:read + pull-requests:write scopes.
25
+ GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
26
+ run: |
27
+ # Check if open PR exists (dev -> main)
28
+ PR=$(gh pr list --repo ${{ github.repository }} --base main --head dev --state open --json number --jq '.[0].number')
29
+
30
+ if [ -z "$PR" ]; then
31
+ # Create new rolling PR
32
+ gh pr create --repo ${{ github.repository }} \
33
+ --base main --head dev \
34
+ --title "chore: rolling promotion dev -> main" \
35
+ --body "$(cat <<'BODY'
36
+ ## Rolling Promotion PR
37
+
38
+ Auto-maintained rolling promotion PR from `dev` to `main`.
39
+
40
+ **Process:**
41
+ - This PR is automatically created and kept open
42
+ - Agent monitors CI status and fixes issues
43
+ - Human reviews and merges when ready
44
+ - Label `ready-to-merge` added when all checks pass
45
+
46
+ > Human approval required for merge to production.
47
+ BODY
48
+ )"
49
+ echo "Created new rolling PR"
50
+ else
51
+ echo "Rolling PR #$PR exists and is up to date"
52
+ fi
@@ -0,0 +1,83 @@
1
+ name: Version
2
+
3
+ on:
4
+ workflow_run:
5
+ workflows: ["CI"]
6
+ types: [completed]
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: write
12
+
13
+ concurrency:
14
+ # This workflow always writes to `dev`, regardless of the trigger ref.
15
+ group: version-dev
16
+ cancel-in-progress: false
17
+
18
+ jobs:
19
+ auto-version:
20
+ name: Auto Version
21
+ runs-on: blacksmith-4vcpu-ubuntu-2404
22
+ timeout-minutes: 5
23
+ if: >-
24
+ (github.event_name == 'workflow_dispatch') ||
25
+ (github.event.workflow_run.conclusion == 'success' &&
26
+ github.event.workflow_run.event == 'push' &&
27
+ github.event.workflow_run.head_branch == 'main' &&
28
+ startsWith(github.event.workflow_run.head_commit.message, 'Merge pull request') &&
29
+ contains(github.event.workflow_run.head_commit.message, '/dev') &&
30
+ !contains(github.event.workflow_run.head_commit.message, '[skip ci]'))
31
+
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ with:
35
+ ref: dev
36
+ fetch-depth: 0
37
+ token: ${{ secrets.GITHUB_TOKEN }}
38
+
39
+ - uses: oven-sh/setup-bun@v2
40
+ with:
41
+ bun-version: latest
42
+
43
+ - name: Install dependencies
44
+ run: bun install
45
+
46
+ - name: Configure git
47
+ run: |
48
+ git config user.name "github-actions[bot]"
49
+ git config user.email "github-actions[bot]@users.noreply.github.com"
50
+
51
+ - name: Derive version
52
+ id: version
53
+ run: |
54
+ TODAY=$(date -u +%y%m%d)
55
+ EXISTING=$(git tag --list "v3.${TODAY}.*" | wc -l)
56
+ BUILD_NUMBER=$((EXISTING + 1))
57
+ VERSION="3.${TODAY}.${BUILD_NUMBER}"
58
+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
59
+ echo "build_number=${BUILD_NUMBER}" >> "$GITHUB_OUTPUT"
60
+ echo "Derived version: ${VERSION}"
61
+
62
+ - name: Sync all version files
63
+ run: bun run version
64
+ env:
65
+ GENIE_BUILD_NUMBER: ${{ steps.version.outputs.build_number }}
66
+
67
+ - name: Format versioned JSON (Biome)
68
+ run: |
69
+ bunx biome format --write package.json openclaw.plugin.json plugins/genie/.claude-plugin/plugin.json plugins/genie/package.json .claude-plugin/marketplace.json 2>/dev/null || true
70
+
71
+ - name: Commit and tag
72
+ run: |
73
+ VERSION="${{ steps.version.outputs.version }}"
74
+
75
+ git add -A '*.json' 'src/lib/version.ts'
76
+ if git diff --cached --quiet; then
77
+ echo "No version changes to commit"
78
+ else
79
+ git commit -m "chore(version): bump to ${VERSION} [skip ci]"
80
+ fi
81
+
82
+ git tag "v${VERSION}"
83
+ git push --atomic origin HEAD:refs/heads/dev "refs/tags/v${VERSION}"
@@ -0,0 +1 @@
1
+ bunx commitlint --edit "$1"
@@ -0,0 +1 @@
1
+ bunx biome check --staged --no-errors-on-unmatched
@@ -0,0 +1,13 @@
1
+ set -e
2
+
3
+ remote="$1"
4
+ while read local_ref local_oid remote_ref remote_oid; do
5
+ if echo "$remote_ref" | grep -qE 'refs/heads/(main|master)$'; then
6
+ echo "BLOCKED: push to $remote_ref is forbidden."
7
+ echo "Main is production — human merges the rolling PR."
8
+ exit 1
9
+ fi
10
+ done
11
+
12
+ bun run typecheck
13
+ bun test
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Automagik
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Makefile ADDED
@@ -0,0 +1,24 @@
1
+ .PHONY: build lint lint-fix format typecheck test check clean
2
+
3
+ build:
4
+ bun run build
5
+
6
+ lint:
7
+ bunx biome check .
8
+
9
+ lint-fix:
10
+ bunx biome check --write .
11
+
12
+ format:
13
+ bunx biome format --write .
14
+
15
+ typecheck:
16
+ bun run typecheck
17
+
18
+ test:
19
+ bun test
20
+
21
+ check: lint typecheck test
22
+
23
+ clean:
24
+ rm -rf dist node_modules