@automagik/genie 0.260202.1833 → 0.260203.43

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 (108) hide show
  1. package/.beads/README.md +81 -0
  2. package/.beads/config.yaml +67 -0
  3. package/.beads/interactions.jsonl +0 -0
  4. package/.beads/issues.jsonl +9 -0
  5. package/.beads/metadata.json +4 -0
  6. package/.claude/skills/brainstorm/SKILL.md +53 -0
  7. package/.claude/skills/genie-base/SKILL.md +66 -0
  8. package/.claude/skills/genie-base/assets/workspace/AGENTS.md +191 -0
  9. package/.claude/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
  10. package/.claude/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
  11. package/.claude/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
  12. package/.claude/skills/genie-base/assets/workspace/MEMORY.md +16 -0
  13. package/.claude/skills/genie-base/assets/workspace/ROLE.md +14 -0
  14. package/.claude/skills/genie-base/assets/workspace/SOUL.md +36 -0
  15. package/.claude/skills/genie-base/assets/workspace/TOOLS.md +25 -0
  16. package/.claude/skills/genie-base/assets/workspace/USER.md +13 -0
  17. package/.claude/skills/genie-base/assets/workspace/memory/2026-01-30.md +6 -0
  18. package/.claude/skills/genie-base/assets/workspace/memory/2026-01-31.md +16 -0
  19. package/.claude/skills/genie-base/assets/workspace/memory/882c22be-9710-41c1-91f8-ed82947ef6ce.txt +1 -0
  20. package/.claude/skills/genie-base/scripts/install-workspace.sh +107 -0
  21. package/.claude/skills/genie-base/scripts/sanity-sweep.sh +60 -0
  22. package/.claude/skills/genie-blank-init/SKILL.md +37 -0
  23. package/.claude/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
  24. package/.claude/skills/genie-blank-init/assets/IDENTITY.md +9 -0
  25. package/.claude/skills/genie-blank-init/assets/SOUL.md +10 -0
  26. package/.claude/skills/genie-blank-init/assets/USER.md +9 -0
  27. package/.claude/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
  28. package/.claude/skills/genie-forge/SKILL.md +171 -0
  29. package/.claude/skills/genie-plan-review/CLAUDE.md +11 -0
  30. package/.claude/skills/genie-plan-review/SKILL.md +53 -0
  31. package/.claude/skills/genie-review/SKILL.md +171 -0
  32. package/.claude/skills/genie-wish/SKILL.md +141 -0
  33. package/.claude-plugin/marketplace.json +18 -0
  34. package/.genie/.gitkeep +3 -0
  35. package/.genie/backlog/hooks-v2.md +82 -0
  36. package/.genie/wishes/upgrade-brainstorm-handoff/wish.md +124 -0
  37. package/.gitattributes +3 -0
  38. package/AGENTS.md +75 -0
  39. package/bun.lock +55 -0
  40. package/dist/claudio.js +1 -1
  41. package/dist/genie.js +1 -1
  42. package/dist/term.js +123 -99
  43. package/docs/CO-ORCHESTRATION-GUIDE.md +368 -0
  44. package/package.json +5 -1
  45. package/plugin/.claude-plugin/plugin.json +18 -0
  46. package/plugin/README.md +120 -0
  47. package/plugin/agents/implementor.md +92 -0
  48. package/plugin/agents/quality-reviewer.md +113 -0
  49. package/plugin/agents/spec-reviewer.md +90 -0
  50. package/plugin/hooks/hooks.json +3 -0
  51. package/plugin/references/review-criteria.md +72 -0
  52. package/plugin/references/wish-template.md +92 -0
  53. package/plugin/scripts/genie.cjs +141 -0
  54. package/plugin/scripts/smart-install.js +308 -0
  55. package/plugin/scripts/src/install-genie-cli.sh +120 -0
  56. package/plugin/scripts/src/validate-completion.ts +142 -0
  57. package/plugin/scripts/src/validate-wish.ts +137 -0
  58. package/plugin/scripts/term.cjs +229 -0
  59. package/plugin/scripts/validate-completion.cjs +16 -0
  60. package/plugin/scripts/validate-wish.cjs +17 -0
  61. package/plugin/scripts/worker-service.cjs +28 -0
  62. package/plugin/skills/brainstorm/SKILL.md +106 -0
  63. package/plugin/skills/forge/SKILL.md +171 -0
  64. package/plugin/skills/genie-base/SKILL.md +99 -0
  65. package/plugin/skills/genie-base/assets/workspace/AGENTS.md +191 -0
  66. package/plugin/skills/genie-base/assets/workspace/ENVIRONMENT.md +18 -0
  67. package/plugin/skills/genie-base/assets/workspace/HEARTBEAT.md +4 -0
  68. package/plugin/skills/genie-base/assets/workspace/IDENTITY.md +17 -0
  69. package/plugin/skills/genie-base/assets/workspace/MEMORY.md +16 -0
  70. package/plugin/skills/genie-base/assets/workspace/ROLE.md +14 -0
  71. package/plugin/skills/genie-base/assets/workspace/SOUL.md +36 -0
  72. package/plugin/skills/genie-base/assets/workspace/TOOLS.md +25 -0
  73. package/plugin/skills/genie-base/assets/workspace/USER.md +13 -0
  74. package/plugin/skills/genie-base/scripts/install-workspace.sh +107 -0
  75. package/plugin/skills/genie-base/scripts/sanity-sweep.sh +60 -0
  76. package/plugin/skills/genie-blank-init/SKILL.md +73 -0
  77. package/plugin/skills/genie-blank-init/assets/BOOTSTRAP.md +44 -0
  78. package/plugin/skills/genie-blank-init/assets/IDENTITY.md +9 -0
  79. package/plugin/skills/genie-blank-init/assets/SOUL.md +10 -0
  80. package/plugin/skills/genie-blank-init/assets/USER.md +9 -0
  81. package/plugin/skills/genie-blank-init/scripts/apply-blank-init.sh +117 -0
  82. package/plugin/skills/genie-cli-dev/CLAUDE.md +19 -0
  83. package/plugin/skills/genie-cli-dev/SKILL.md +292 -0
  84. package/plugin/skills/plan-review/SKILL.md +101 -0
  85. package/plugin/skills/review/SKILL.md +221 -0
  86. package/plugin/skills/wish/SKILL.md +110 -0
  87. package/plugin/skills/work-orchestration/SKILL.md +110 -0
  88. package/scripts/build.js +132 -0
  89. package/scripts/smart-install.js +308 -0
  90. package/scripts/sync.js +134 -0
  91. package/src/lib/beads-registry.ts +595 -0
  92. package/src/lib/orchestrator/event-monitor.ts +2 -0
  93. package/src/lib/skill-loader.ts +215 -0
  94. package/src/lib/tmux.ts +30 -11
  95. package/src/lib/version.ts +1 -1
  96. package/src/lib/worker-registry.ts +10 -0
  97. package/src/services/worker-service.ts +351 -0
  98. package/src/term-commands/close.ts +48 -3
  99. package/src/term-commands/create.ts +95 -0
  100. package/src/term-commands/daemon.ts +176 -0
  101. package/src/term-commands/kill.ts +56 -2
  102. package/src/term-commands/orchestrate.ts +3 -2
  103. package/src/term-commands/send.ts +43 -15
  104. package/src/term-commands/spawn.ts +446 -0
  105. package/src/term-commands/split.ts +20 -8
  106. package/src/term-commands/work.ts +279 -37
  107. package/src/term-commands/workers.ts +36 -2
  108. package/src/term.ts +120 -7
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Sync script for automagik-genie
4
+ *
5
+ * Deploys the built plugin to the install target:
6
+ * ~/.claude/plugins/automagik-genie/
7
+ *
8
+ * Uses pure Node.js - no rsync dependency.
9
+ * Also triggers worker restart after sync.
10
+ */
11
+
12
+ import { execSync } from 'child_process';
13
+ import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, copyFileSync, rmSync } from 'fs';
14
+ import path from 'path';
15
+ import os from 'os';
16
+ import http from 'http';
17
+ import { fileURLToPath } from 'url';
18
+
19
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
20
+ const rootDir = path.join(__dirname, '..');
21
+ const pluginDir = path.join(rootDir, 'plugin');
22
+ const INSTALLED_PATH = path.join(os.homedir(), '.claude', 'plugins', 'automagik-genie');
23
+ const WORKER_PORT = 48888;
24
+
25
+ /**
26
+ * Recursively copy directory contents
27
+ */
28
+ function copyDir(src, dest) {
29
+ mkdirSync(dest, { recursive: true });
30
+
31
+ const entries = readdirSync(src, { withFileTypes: true });
32
+
33
+ for (const entry of entries) {
34
+ const srcPath = path.join(src, entry.name);
35
+ const destPath = path.join(dest, entry.name);
36
+
37
+ if (entry.isDirectory()) {
38
+ copyDir(srcPath, destPath);
39
+ } else {
40
+ copyFileSync(srcPath, destPath);
41
+ }
42
+ }
43
+ }
44
+
45
+ /**
46
+ * Clean directory but preserve .git if it exists
47
+ */
48
+ function cleanDir(dir) {
49
+ if (!existsSync(dir)) return;
50
+
51
+ const entries = readdirSync(dir, { withFileTypes: true });
52
+
53
+ for (const entry of entries) {
54
+ // Preserve .git directory for git-based updates
55
+ if (entry.name === '.git') continue;
56
+
57
+ const fullPath = path.join(dir, entry.name);
58
+ rmSync(fullPath, { recursive: true, force: true });
59
+ }
60
+ }
61
+
62
+ function getPluginVersion() {
63
+ try {
64
+ const pluginJsonPath = path.join(pluginDir, '.claude-plugin', 'plugin.json');
65
+ const pluginJson = JSON.parse(readFileSync(pluginJsonPath, 'utf-8'));
66
+ return pluginJson.version;
67
+ } catch (error) {
68
+ console.error('Failed to read plugin version:', error.message);
69
+ return null;
70
+ }
71
+ }
72
+
73
+ function triggerWorkerRestart() {
74
+ return new Promise((resolve) => {
75
+ console.log('\nTriggering worker restart...');
76
+ const req = http.request({
77
+ hostname: '127.0.0.1',
78
+ port: WORKER_PORT,
79
+ path: '/api/admin/restart',
80
+ method: 'POST',
81
+ timeout: 2000
82
+ }, (res) => {
83
+ if (res.statusCode === 200) {
84
+ console.log('Worker restart triggered');
85
+ } else {
86
+ console.log(`Worker restart returned status ${res.statusCode}`);
87
+ }
88
+ resolve();
89
+ });
90
+ req.on('error', () => {
91
+ console.log('Worker not running, will start on next hook');
92
+ resolve();
93
+ });
94
+ req.on('timeout', () => {
95
+ req.destroy();
96
+ console.log('Worker restart timed out');
97
+ resolve();
98
+ });
99
+ req.end();
100
+ });
101
+ }
102
+
103
+ async function main() {
104
+ const version = getPluginVersion();
105
+ console.log(`Syncing automagik-genie ${version || 'unknown'} to ${INSTALLED_PATH}...`);
106
+
107
+ try {
108
+ // Ensure target directory exists
109
+ mkdirSync(INSTALLED_PATH, { recursive: true });
110
+
111
+ // Clean existing files (preserving .git)
112
+ console.log('Cleaning target directory...');
113
+ cleanDir(INSTALLED_PATH);
114
+
115
+ // Copy plugin files
116
+ console.log('Copying plugin files...');
117
+ copyDir(pluginDir, INSTALLED_PATH);
118
+
119
+ // Run bun install in target
120
+ console.log('\nRunning bun install in target...');
121
+ execSync('bun install', { cwd: INSTALLED_PATH, stdio: 'inherit' });
122
+
123
+ console.log('\nSync complete!');
124
+
125
+ // Trigger worker restart
126
+ await triggerWorkerRestart();
127
+
128
+ } catch (error) {
129
+ console.error('Sync failed:', error.message);
130
+ process.exit(1);
131
+ }
132
+ }
133
+
134
+ main();