@cluesmith/codev 1.1.0 → 1.2.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 (146) hide show
  1. package/dist/agent-farm/cli.d.ts.map +1 -1
  2. package/dist/agent-farm/cli.js +19 -0
  3. package/dist/agent-farm/cli.js.map +1 -1
  4. package/dist/agent-farm/commands/cleanup.d.ts.map +1 -1
  5. package/dist/agent-farm/commands/cleanup.js +18 -1
  6. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  7. package/dist/agent-farm/commands/consult.d.ts +16 -0
  8. package/dist/agent-farm/commands/consult.d.ts.map +1 -0
  9. package/dist/agent-farm/commands/consult.js +51 -0
  10. package/dist/agent-farm/commands/consult.js.map +1 -0
  11. package/dist/agent-farm/commands/open.js +6 -6
  12. package/dist/agent-farm/commands/open.js.map +1 -1
  13. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  14. package/dist/agent-farm/commands/spawn.js +51 -42
  15. package/dist/agent-farm/commands/spawn.js.map +1 -1
  16. package/dist/agent-farm/commands/start.d.ts.map +1 -1
  17. package/dist/agent-farm/commands/start.js +9 -14
  18. package/dist/agent-farm/commands/start.js.map +1 -1
  19. package/dist/agent-farm/commands/util.js +2 -2
  20. package/dist/agent-farm/commands/util.js.map +1 -1
  21. package/dist/agent-farm/db/errors.d.ts +4 -0
  22. package/dist/agent-farm/db/errors.d.ts.map +1 -1
  23. package/dist/agent-farm/db/errors.js +8 -0
  24. package/dist/agent-farm/db/errors.js.map +1 -1
  25. package/dist/agent-farm/servers/dashboard-server.js +125 -71
  26. package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
  27. package/dist/agent-farm/servers/open-server.d.ts +9 -0
  28. package/dist/agent-farm/servers/open-server.d.ts.map +1 -0
  29. package/dist/agent-farm/servers/{annotate-server.js → open-server.js} +17 -15
  30. package/dist/agent-farm/servers/open-server.js.map +1 -0
  31. package/dist/agent-farm/servers/tower-server.js +4 -7
  32. package/dist/agent-farm/servers/tower-server.js.map +1 -1
  33. package/dist/agent-farm/state.d.ts +5 -0
  34. package/dist/agent-farm/state.d.ts.map +1 -1
  35. package/dist/agent-farm/state.js +17 -0
  36. package/dist/agent-farm/state.js.map +1 -1
  37. package/dist/agent-farm/types.d.ts +1 -1
  38. package/dist/agent-farm/types.d.ts.map +1 -1
  39. package/dist/agent-farm/utils/config.d.ts.map +1 -1
  40. package/dist/agent-farm/utils/config.js +13 -7
  41. package/dist/agent-farm/utils/config.js.map +1 -1
  42. package/dist/agent-farm/utils/port-registry.d.ts +1 -1
  43. package/dist/agent-farm/utils/port-registry.d.ts.map +1 -1
  44. package/dist/agent-farm/utils/port-registry.js +1 -1
  45. package/dist/agent-farm/utils/port-registry.js.map +1 -1
  46. package/dist/agent-farm/utils/shell.d.ts +19 -0
  47. package/dist/agent-farm/utils/shell.d.ts.map +1 -1
  48. package/dist/agent-farm/utils/shell.js +28 -0
  49. package/dist/agent-farm/utils/shell.js.map +1 -1
  50. package/dist/cli.d.ts.map +1 -1
  51. package/dist/cli.js +33 -0
  52. package/dist/cli.js.map +1 -1
  53. package/dist/commands/adopt.d.ts +3 -0
  54. package/dist/commands/adopt.d.ts.map +1 -1
  55. package/dist/commands/adopt.js +31 -25
  56. package/dist/commands/adopt.js.map +1 -1
  57. package/dist/commands/consult/index.d.ts +3 -2
  58. package/dist/commands/consult/index.d.ts.map +1 -1
  59. package/dist/commands/consult/index.js +128 -54
  60. package/dist/commands/consult/index.js.map +1 -1
  61. package/dist/commands/doctor.d.ts.map +1 -1
  62. package/dist/commands/doctor.js +88 -36
  63. package/dist/commands/doctor.js.map +1 -1
  64. package/dist/commands/eject.d.ts +18 -0
  65. package/dist/commands/eject.d.ts.map +1 -0
  66. package/dist/commands/eject.js +149 -0
  67. package/dist/commands/eject.js.map +1 -0
  68. package/dist/commands/import.d.ts +16 -0
  69. package/dist/commands/import.d.ts.map +1 -0
  70. package/dist/commands/import.js +278 -0
  71. package/dist/commands/import.js.map +1 -0
  72. package/dist/commands/init.d.ts +3 -0
  73. package/dist/commands/init.d.ts.map +1 -1
  74. package/dist/commands/init.js +32 -27
  75. package/dist/commands/init.js.map +1 -1
  76. package/dist/lib/projectlist-parser.d.ts +70 -0
  77. package/dist/lib/projectlist-parser.d.ts.map +1 -0
  78. package/dist/lib/projectlist-parser.js +200 -0
  79. package/dist/lib/projectlist-parser.js.map +1 -0
  80. package/dist/lib/skeleton.d.ts +41 -0
  81. package/dist/lib/skeleton.d.ts.map +1 -0
  82. package/dist/lib/skeleton.js +110 -0
  83. package/dist/lib/skeleton.js.map +1 -0
  84. package/dist/lib/templates.d.ts +2 -1
  85. package/dist/lib/templates.d.ts.map +1 -1
  86. package/dist/lib/templates.js +11 -10
  87. package/dist/lib/templates.js.map +1 -1
  88. package/package.json +5 -4
  89. package/{templates → skeleton}/DEPENDENCIES.md +3 -48
  90. package/skeleton/bin/agent-farm +7 -0
  91. package/skeleton/docs/commands/agent-farm.md +469 -0
  92. package/skeleton/docs/commands/codev.md +253 -0
  93. package/skeleton/docs/commands/consult.md +286 -0
  94. package/skeleton/docs/commands/overview.md +108 -0
  95. package/skeleton/maintain/.gitkeep +2 -0
  96. package/{templates → skeleton}/protocols/experiment/protocol.md +2 -2
  97. package/skeleton/protocols/maintain/protocol.md +502 -0
  98. package/skeleton/protocols/maintain/templates/maintenance-run.md +64 -0
  99. package/{templates → skeleton}/protocols/spider/protocol.md +9 -9
  100. package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/plan.md +22 -1
  101. package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/spec.md +30 -1
  102. package/skeleton/protocols/tick/protocol.md +277 -0
  103. package/skeleton/resources/lessons-learned.md +30 -0
  104. package/skeleton/resources/workflow-reference.md +242 -0
  105. package/skeleton/roles/architect.md +283 -0
  106. package/{templates → skeleton}/roles/builder.md +2 -0
  107. package/skeleton/roles/review-types/impl-review.md +56 -0
  108. package/skeleton/roles/review-types/integration-review.md +68 -0
  109. package/skeleton/roles/review-types/plan-review.md +59 -0
  110. package/skeleton/roles/review-types/pr-ready.md +72 -0
  111. package/skeleton/roles/review-types/spec-review.md +55 -0
  112. package/skeleton/templates/lessons-learned.md +28 -0
  113. package/{templates → skeleton}/templates/projectlist.md +17 -16
  114. package/dist/agent-farm/servers/annotate-server.d.ts +0 -9
  115. package/dist/agent-farm/servers/annotate-server.d.ts.map +0 -1
  116. package/dist/agent-farm/servers/annotate-server.js.map +0 -1
  117. package/templates/agents/architecture-documenter.md +0 -189
  118. package/templates/agents/codev-updater.md +0 -276
  119. package/templates/agents/spider-protocol-updater.md +0 -118
  120. package/templates/annotate.html +0 -903
  121. package/templates/bin/agent-farm +0 -18
  122. package/templates/bin/annotate-server.js +0 -140
  123. package/templates/dashboard-split.html +0 -1679
  124. package/templates/dashboard.html +0 -149
  125. package/templates/protocols/maintain/protocol.md +0 -235
  126. package/templates/protocols/spider/templates/plan.md +0 -169
  127. package/templates/protocols/spider/templates/review.md +0 -207
  128. package/templates/protocols/spider/templates/spec.md +0 -140
  129. package/templates/protocols/spider-solo/protocol.md +0 -619
  130. package/templates/protocols/tick/protocol.md +0 -250
  131. package/templates/roles/architect.md +0 -230
  132. package/templates/tower.html +0 -1032
  133. /package/{templates/AGENTS.md → skeleton/AGENTS.md.template} +0 -0
  134. /package/{templates/CLAUDE.md → skeleton/CLAUDE.md.template} +0 -0
  135. /package/{templates → skeleton}/bin/codev-doctor +0 -0
  136. /package/{templates → skeleton}/builders.md +0 -0
  137. /package/{templates → skeleton}/config.json +0 -0
  138. /package/{templates → skeleton}/plans/.gitkeep +0 -0
  139. /package/{templates → skeleton}/protocols/experiment/templates/notes.md +0 -0
  140. /package/{templates/protocols/spider-solo → skeleton/protocols/spider}/templates/review.md +0 -0
  141. /package/{templates → skeleton}/protocols/tick/templates/plan.md +0 -0
  142. /package/{templates → skeleton}/protocols/tick/templates/review.md +0 -0
  143. /package/{templates → skeleton}/protocols/tick/templates/spec.md +0 -0
  144. /package/{templates → skeleton}/reviews/.gitkeep +0 -0
  145. /package/{templates → skeleton}/roles/consultant.md +0 -0
  146. /package/{templates → skeleton}/specs/.gitkeep +0 -0
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
- # Thin wrapper - forwards all commands to @cluesmith/codev af
3
- # This script allows projects to use ./codev/bin/agent-farm without
4
- # having codev installed globally.
5
-
6
- # First, try the globally installed 'af' command (from @cluesmith/codev)
7
- if command -v af &> /dev/null; then
8
- exec af "$@"
9
- fi
10
-
11
- # Fall back to npx if af is not globally installed
12
- if command -v npx &> /dev/null; then
13
- exec npx @cluesmith/codev af "$@"
14
- fi
15
-
16
- echo "Error: Could not find 'af' command" >&2
17
- echo "Install @cluesmith/codev globally: npm install -g @cluesmith/codev" >&2
18
- exit 1
@@ -1,140 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- /**
4
- * Simple annotation server for the Architect-Builder pattern.
5
- * Serves the annotation viewer and handles file saves.
6
- *
7
- * Usage: node annotate-server.js --builder XXXX --file path/to/file.ts --port 8080
8
- */
9
-
10
- const http = require('http');
11
- const fs = require('fs');
12
- const path = require('path');
13
-
14
- // Parse arguments
15
- const args = process.argv.slice(2);
16
- const getArg = (name) => {
17
- const idx = args.indexOf('--' + name);
18
- return idx !== -1 ? args[idx + 1] : null;
19
- };
20
-
21
- const builderId = getArg('builder');
22
- const filePath = getArg('file');
23
- const port = parseInt(getArg('port') || '8080', 10);
24
-
25
- if (!builderId || !filePath) {
26
- console.error('Usage: annotate-server.js --builder XXXX --file path/to/file.ts [--port 8080]');
27
- process.exit(1);
28
- }
29
-
30
- // Paths
31
- const projectRoot = process.cwd();
32
- const buildersDir = path.join(projectRoot, '.builders');
33
- const builderDir = path.join(buildersDir, builderId);
34
- const fullFilePath = path.join(builderDir, filePath);
35
- const templatePath = path.join(projectRoot, 'codev', 'templates', 'annotate.html');
36
-
37
- // Validate builder exists
38
- if (!fs.existsSync(builderDir)) {
39
- console.error(`Builder directory not found: ${builderDir}`);
40
- process.exit(1);
41
- }
42
-
43
- // Validate file exists
44
- if (!fs.existsSync(fullFilePath)) {
45
- console.error(`File not found: ${fullFilePath}`);
46
- process.exit(1);
47
- }
48
-
49
- // Get language from extension
50
- const ext = path.extname(filePath).slice(1).toLowerCase();
51
- const langMap = {
52
- js: 'javascript', ts: 'typescript', jsx: 'javascript', tsx: 'typescript',
53
- py: 'python', sh: 'bash', bash: 'bash',
54
- md: 'markdown', html: 'markup', css: 'css',
55
- json: 'json', yaml: 'yaml', yml: 'yaml'
56
- };
57
- const lang = langMap[ext] || ext;
58
-
59
- // Create server
60
- const server = http.createServer((req, res) => {
61
- // CORS headers
62
- res.setHeader('Access-Control-Allow-Origin', '*');
63
- res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
64
- res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
65
-
66
- if (req.method === 'OPTIONS') {
67
- res.writeHead(200);
68
- res.end();
69
- return;
70
- }
71
-
72
- // Serve annotation viewer
73
- if (req.method === 'GET' && (req.url === '/' || req.url === '/index.html')) {
74
- try {
75
- let template = fs.readFileSync(templatePath, 'utf-8');
76
- const fileContent = fs.readFileSync(fullFilePath, 'utf-8');
77
-
78
- // Replace placeholders
79
- template = template.replace(/\{\{BUILDER_ID\}\}/g, builderId);
80
- template = template.replace(/\{\{FILE_PATH\}\}/g, filePath);
81
- template = template.replace(/\{\{FILE\}\}/g, path.basename(filePath));
82
- template = template.replace(/\{\{LANG\}\}/g, lang);
83
-
84
- // Inject file content
85
- const escapedContent = JSON.stringify(fileContent);
86
- template = template.replace(
87
- '// FILE_CONTENT will be injected by the server',
88
- `init(${escapedContent});`
89
- );
90
-
91
- res.writeHead(200, { 'Content-Type': 'text/html' });
92
- res.end(template);
93
- } catch (err) {
94
- res.writeHead(500, { 'Content-Type': 'text/plain' });
95
- res.end('Error loading viewer: ' + err.message);
96
- }
97
- return;
98
- }
99
-
100
- // Handle file save
101
- if (req.method === 'POST' && req.url === '/save') {
102
- let body = '';
103
- req.on('data', chunk => body += chunk);
104
- req.on('end', () => {
105
- try {
106
- const { file, content } = JSON.parse(body);
107
-
108
- // Security: only allow saving the opened file
109
- if (file !== filePath) {
110
- res.writeHead(403, { 'Content-Type': 'text/plain' });
111
- res.end('Cannot save to different file');
112
- return;
113
- }
114
-
115
- fs.writeFileSync(fullFilePath, content, 'utf-8');
116
- console.log(`Saved: ${fullFilePath}`);
117
-
118
- res.writeHead(200, { 'Content-Type': 'application/json' });
119
- res.end(JSON.stringify({ success: true }));
120
- } catch (err) {
121
- res.writeHead(500, { 'Content-Type': 'text/plain' });
122
- res.end('Error saving file: ' + err.message);
123
- }
124
- });
125
- return;
126
- }
127
-
128
- // 404 for everything else
129
- res.writeHead(404, { 'Content-Type': 'text/plain' });
130
- res.end('Not found');
131
- });
132
-
133
- server.listen(port, () => {
134
- console.log(`\nAnnotation Viewer`);
135
- console.log(`================`);
136
- console.log(`Builder: ${builderId}`);
137
- console.log(`File: ${filePath}`);
138
- console.log(`\nOpen in browser: http://localhost:${port}`);
139
- console.log(`\nPress Ctrl+C to stop the server`);
140
- });