@cluesmith/codev 1.3.0 → 1.4.1

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 (63) hide show
  1. package/bin/af.js +0 -0
  2. package/bin/codev.js +0 -0
  3. package/bin/consult.js +0 -0
  4. package/bin/generate-image.js +0 -0
  5. package/dist/agent-farm/cli.d.ts.map +1 -1
  6. package/dist/agent-farm/cli.js +2 -1
  7. package/dist/agent-farm/cli.js.map +1 -1
  8. package/dist/agent-farm/commands/cleanup.js +12 -51
  9. package/dist/agent-farm/commands/cleanup.js.map +1 -1
  10. package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
  11. package/dist/agent-farm/commands/spawn.js +13 -1
  12. package/dist/agent-farm/commands/spawn.js.map +1 -1
  13. package/dist/agent-farm/servers/dashboard-server.js +107 -5
  14. package/dist/agent-farm/servers/dashboard-server.js.map +1 -1
  15. package/dist/agent-farm/types.d.ts +1 -0
  16. package/dist/agent-farm/types.d.ts.map +1 -1
  17. package/dist/cli.d.ts.map +1 -1
  18. package/dist/cli.js +2 -17
  19. package/dist/cli.js.map +1 -1
  20. package/dist/commands/adopt.d.ts.map +1 -1
  21. package/dist/commands/adopt.js +27 -2
  22. package/dist/commands/adopt.js.map +1 -1
  23. package/dist/commands/consult/index.d.ts.map +1 -1
  24. package/dist/commands/consult/index.js +23 -7
  25. package/dist/commands/consult/index.js.map +1 -1
  26. package/dist/commands/doctor.d.ts.map +1 -1
  27. package/dist/commands/doctor.js +51 -0
  28. package/dist/commands/doctor.js.map +1 -1
  29. package/dist/commands/init.d.ts.map +1 -1
  30. package/dist/commands/init.js +23 -2
  31. package/dist/commands/init.js.map +1 -1
  32. package/dist/version.d.ts +3 -0
  33. package/dist/version.d.ts.map +1 -0
  34. package/dist/version.js +23 -0
  35. package/dist/version.js.map +1 -0
  36. package/package.json +1 -1
  37. package/skeleton/DEPENDENCIES.md +3 -3
  38. package/skeleton/protocols/maintain/protocol.md +2 -2
  39. package/skeleton/{docs → resources}/commands/codev.md +0 -39
  40. package/skeleton/{docs → resources}/commands/consult.md +12 -2
  41. package/skeleton/{docs → resources}/commands/overview.md +0 -1
  42. package/skeleton/roles/architect.md +22 -0
  43. package/skeleton/roles/builder.md +22 -0
  44. package/skeleton/templates/arch.md +56 -0
  45. package/skeleton/templates/pr-overview.md +73 -0
  46. package/templates/dashboard-split.html +526 -164
  47. package/templates/open.html +285 -2
  48. package/templates/tower.html +71 -12
  49. package/dist/agent-farm/index.d.ts +0 -7
  50. package/dist/agent-farm/index.d.ts.map +0 -1
  51. package/dist/agent-farm/index.js +0 -373
  52. package/dist/agent-farm/index.js.map +0 -1
  53. package/skeleton/bin/agent-farm +0 -7
  54. package/skeleton/bin/codev-doctor +0 -335
  55. package/skeleton/resources/lessons-learned.md +0 -30
  56. /package/skeleton/{roles/review-types → consult-types}/impl-review.md +0 -0
  57. /package/skeleton/{roles/review-types → consult-types}/integration-review.md +0 -0
  58. /package/skeleton/{roles/review-types → consult-types}/plan-review.md +0 -0
  59. /package/skeleton/{roles/review-types → consult-types}/pr-ready.md +0 -0
  60. /package/skeleton/{roles/review-types → consult-types}/spec-review.md +0 -0
  61. /package/skeleton/{docs → resources}/commands/agent-farm.md +0 -0
  62. /package/skeleton/{AGENTS.md.template → templates/AGENTS.md} +0 -0
  63. /package/skeleton/{CLAUDE.md.template → templates/CLAUDE.md} +0 -0
@@ -1,335 +0,0 @@
1
- #!/usr/bin/env bash
2
- #
3
- # codev-doctor - Verify Codev installation and dependencies
4
- #
5
- # Usage: ./codev/bin/codev-doctor
6
- #
7
- # Checks:
8
- # - Core dependencies: node, tmux, ttyd, git, gh, python
9
- # - AI CLI dependencies: claude, gemini, codex (at least one required)
10
- # - Python packages: typer (for consult tool)
11
- #
12
- # Exit codes:
13
- # 0 - All required dependencies OK
14
- # 1 - Missing required dependencies
15
- #
16
-
17
- set -euo pipefail
18
-
19
- # Colors (disable if not a terminal)
20
- if [[ -t 1 ]]; then
21
- RED='\033[0;31m'
22
- GREEN='\033[0;32m'
23
- YELLOW='\033[0;33m'
24
- BLUE='\033[0;34m'
25
- BOLD='\033[1m'
26
- NC='\033[0m' # No Color
27
- else
28
- RED=''
29
- GREEN=''
30
- YELLOW=''
31
- BLUE=''
32
- BOLD=''
33
- NC=''
34
- fi
35
-
36
- # Counters
37
- ERRORS=0
38
- WARNINGS=0
39
-
40
- # Detect OS for install hints
41
- if [[ "$OSTYPE" == "darwin"* ]]; then
42
- IS_MACOS=true
43
- else
44
- IS_MACOS=false
45
- fi
46
-
47
- # Print header
48
- echo -e "${BOLD}Codev Doctor${NC} - Checking your environment"
49
- echo "============================================"
50
- echo ""
51
-
52
- # Helper function to check if a command exists
53
- command_exists() {
54
- command -v "$1" &> /dev/null
55
- }
56
-
57
- # Helper function to print status
58
- print_status() {
59
- local name="$1"
60
- local status="$2"
61
- local version="${3:-}"
62
- local note="${4:-}"
63
-
64
- case "$status" in
65
- ok)
66
- printf " ${GREEN}%s${NC} %-12s %s" "✓" "$name" "$version"
67
- ;;
68
- warn)
69
- printf " ${YELLOW}%s${NC} %-12s %s" "⚠" "$name" "$version"
70
- ((WARNINGS++))
71
- ;;
72
- fail)
73
- printf " ${RED}%s${NC} %-12s %s" "✗" "$name" "$version"
74
- ((ERRORS++))
75
- ;;
76
- skip)
77
- printf " ${BLUE}%s${NC} %-12s %s" "○" "$name" "$version"
78
- ;;
79
- esac
80
-
81
- if [[ -n "$note" ]]; then
82
- printf " ${BLUE}(%s)${NC}" "$note"
83
- fi
84
- echo ""
85
- }
86
-
87
- # Compare semantic versions: returns 0 if $1 >= $2
88
- version_gte() {
89
- local v1="$1"
90
- local v2="$2"
91
-
92
- # Split versions into arrays
93
- IFS='.' read -ra v1_parts <<< "$v1"
94
- IFS='.' read -ra v2_parts <<< "$v2"
95
-
96
- # Compare each part
97
- for i in 0 1 2; do
98
- local p1="${v1_parts[$i]:-0}"
99
- local p2="${v2_parts[$i]:-0}"
100
- # Remove non-numeric suffixes (e.g., "3a" -> "3")
101
- p1="${p1%%[!0-9]*}"
102
- p2="${p2%%[!0-9]*}"
103
- p1="${p1:-0}"
104
- p2="${p2:-0}"
105
-
106
- if (( p1 > p2 )); then
107
- return 0
108
- elif (( p1 < p2 )); then
109
- return 1
110
- fi
111
- done
112
- return 0
113
- }
114
-
115
- # Extract version from various command outputs
116
- get_node_version() {
117
- node --version 2>/dev/null | sed 's/^v//'
118
- }
119
-
120
- get_tmux_version() {
121
- tmux -V 2>/dev/null | sed 's/tmux //' | sed 's/[a-z]$//'
122
- }
123
-
124
- get_ttyd_version() {
125
- ttyd --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1
126
- }
127
-
128
- get_git_version() {
129
- git --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1
130
- }
131
-
132
- get_python_version() {
133
- python3 --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1
134
- }
135
-
136
- # Check core dependencies
137
- echo -e "${BOLD}Core Dependencies${NC} (required for Agent Farm)"
138
- echo ""
139
-
140
- # Node.js
141
- if command_exists node; then
142
- version=$(get_node_version)
143
- if version_gte "$version" "18.0.0"; then
144
- print_status "Node.js" "ok" "$version"
145
- else
146
- print_status "Node.js" "fail" "$version" "need >= 18.0.0"
147
- fi
148
- else
149
- if $IS_MACOS; then
150
- print_status "Node.js" "fail" "not installed" "brew install node"
151
- else
152
- print_status "Node.js" "fail" "not installed" "apt install nodejs npm"
153
- fi
154
- fi
155
-
156
- # tmux
157
- if command_exists tmux; then
158
- version=$(get_tmux_version)
159
- if version_gte "$version" "3.0"; then
160
- print_status "tmux" "ok" "$version"
161
- else
162
- print_status "tmux" "fail" "$version" "need >= 3.0"
163
- fi
164
- else
165
- if $IS_MACOS; then
166
- print_status "tmux" "fail" "not installed" "brew install tmux"
167
- else
168
- print_status "tmux" "fail" "not installed" "apt install tmux"
169
- fi
170
- fi
171
-
172
- # ttyd
173
- if command_exists ttyd; then
174
- version=$(get_ttyd_version)
175
- if [[ -n "$version" ]] && version_gte "$version" "1.7.0"; then
176
- print_status "ttyd" "ok" "$version"
177
- elif [[ -n "$version" ]]; then
178
- print_status "ttyd" "fail" "$version" "need >= 1.7.0"
179
- else
180
- print_status "ttyd" "warn" "(version unknown)" "may be incompatible"
181
- fi
182
- else
183
- if $IS_MACOS; then
184
- print_status "ttyd" "fail" "not installed" "brew install ttyd"
185
- else
186
- print_status "ttyd" "fail" "not installed" "build from source"
187
- fi
188
- fi
189
-
190
- # git
191
- if command_exists git; then
192
- version=$(get_git_version)
193
- if version_gte "$version" "2.5.0"; then
194
- print_status "git" "ok" "$version"
195
- else
196
- print_status "git" "warn" "$version" "need >= 2.5.0"
197
- fi
198
- else
199
- if $IS_MACOS; then
200
- print_status "git" "fail" "not installed" "xcode-select --install"
201
- else
202
- print_status "git" "fail" "not installed" "apt install git"
203
- fi
204
- fi
205
-
206
- # gh (GitHub CLI)
207
- if command_exists gh; then
208
- # Check if authenticated
209
- if gh auth status &>/dev/null; then
210
- print_status "gh" "ok" "authenticated"
211
- else
212
- print_status "gh" "warn" "not authenticated" "gh auth login"
213
- fi
214
- else
215
- if $IS_MACOS; then
216
- print_status "gh" "fail" "not installed" "brew install gh"
217
- else
218
- print_status "gh" "fail" "not installed" "apt install gh"
219
- fi
220
- fi
221
-
222
- # Python
223
- if command_exists python3; then
224
- version=$(get_python_version)
225
- if version_gte "$version" "3.10.0"; then
226
- print_status "Python" "ok" "$version"
227
- else
228
- print_status "Python" "warn" "$version" "need >= 3.10"
229
- fi
230
- else
231
- if $IS_MACOS; then
232
- print_status "Python" "fail" "not installed" "brew install python"
233
- else
234
- print_status "Python" "fail" "not installed" "apt install python3"
235
- fi
236
- fi
237
-
238
- echo ""
239
-
240
- # Check AI CLI dependencies
241
- echo -e "${BOLD}AI CLI Dependencies${NC} (at least one required)"
242
- echo ""
243
-
244
- AI_CLI_COUNT=0
245
-
246
- # Helper to verify AI CLI actually works (not just installed)
247
- verify_ai_cli() {
248
- local cmd="$1"
249
- local test_args="$2"
250
- # Run the command with test args and capture exit code
251
- # Don't use timeout (not available on macOS)
252
- if "$cmd" $test_args &>/dev/null; then
253
- return 0
254
- else
255
- return 1
256
- fi
257
- }
258
-
259
- # Claude Code
260
- if command_exists claude; then
261
- if verify_ai_cli "claude" "--version"; then
262
- print_status "Claude" "ok" "working"
263
- ((AI_CLI_COUNT++))
264
- else
265
- print_status "Claude" "warn" "installed but not working" "check config"
266
- fi
267
- else
268
- print_status "Claude" "skip" "not installed" "npm i -g @anthropic-ai/claude-code"
269
- fi
270
-
271
- # Gemini CLI
272
- if command_exists gemini; then
273
- if verify_ai_cli "gemini" "--version"; then
274
- print_status "Gemini" "ok" "working"
275
- ((AI_CLI_COUNT++))
276
- else
277
- print_status "Gemini" "warn" "installed but not working" "check GOOGLE_API_KEY"
278
- fi
279
- else
280
- print_status "Gemini" "skip" "not installed" "see github.com/google-gemini/gemini-cli"
281
- fi
282
-
283
- # Codex CLI
284
- if command_exists codex; then
285
- if verify_ai_cli "codex" "--version"; then
286
- print_status "Codex" "ok" "working"
287
- ((AI_CLI_COUNT++))
288
- else
289
- print_status "Codex" "warn" "installed but not working" "check OPENAI_API_KEY"
290
- fi
291
- else
292
- print_status "Codex" "skip" "not installed" "npm i -g @openai/codex"
293
- fi
294
-
295
- if (( AI_CLI_COUNT == 0 )); then
296
- echo ""
297
- echo -e " ${RED}✗${NC} No AI CLI working! Install and configure at least one to use Codev."
298
- ((ERRORS++))
299
- fi
300
-
301
- echo ""
302
-
303
- # Check Python packages (for consult tool)
304
- echo -e "${BOLD}Python Packages${NC} (for consult tool)"
305
- echo ""
306
-
307
- if command_exists python3; then
308
- # Check for typer
309
- if python3 -c "import typer" 2>/dev/null; then
310
- print_status "typer" "ok" "installed"
311
- else
312
- print_status "typer" "warn" "not installed" "pip install typer"
313
- fi
314
- else
315
- print_status "typer" "skip" "Python not available"
316
- fi
317
-
318
- echo ""
319
-
320
- # Summary
321
- echo "============================================"
322
- if (( ERRORS > 0 )); then
323
- echo -e "${RED}${BOLD}FAILED${NC} - $ERRORS required dependency/dependencies missing"
324
- echo ""
325
- echo "Install missing dependencies and run this command again."
326
- exit 1
327
- elif (( WARNINGS > 0 )); then
328
- echo -e "${YELLOW}${BOLD}OK with warnings${NC} - $WARNINGS dependency/dependencies below recommended version"
329
- echo ""
330
- echo "Consider upgrading for best experience."
331
- exit 0
332
- else
333
- echo -e "${GREEN}${BOLD}ALL OK${NC} - Your environment is ready for Codev!"
334
- exit 0
335
- fi
@@ -1,30 +0,0 @@
1
- # Lessons Learned
2
-
3
- Consolidated wisdom extracted from review documents. Updated during MAINTAIN protocol runs.
4
-
5
- ---
6
-
7
- ## Testing
8
-
9
- <!-- Add lessons about testing practices -->
10
-
11
- ## Architecture
12
-
13
- <!-- Add lessons about architectural decisions -->
14
-
15
- ## Process
16
-
17
- <!-- Add lessons about development process -->
18
-
19
- ## Documentation
20
-
21
- <!-- Add lessons about documentation practices -->
22
-
23
- ## Tools
24
-
25
- <!-- Add lessons about tooling -->
26
-
27
- ---
28
-
29
- *Last updated: YYYY-MM-DD*
30
- *Source: codev/reviews/*