juno-code 1.0.35 → 1.0.37
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.
- package/README.md +534 -64
- package/dist/bin/cli.js +583 -181
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +582 -180
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -3
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/clean_logs_folder.sh +0 -0
- package/dist/templates/scripts/install_requirements.sh +3 -0
- package/dist/templates/scripts/run_until_completion.sh +418 -0
- package/dist/templates/scripts/slack_fetch.py +717 -0
- package/dist/templates/scripts/slack_fetch.sh +269 -0
- package/dist/templates/scripts/slack_respond.py +691 -0
- package/dist/templates/scripts/slack_respond.sh +263 -0
- package/dist/templates/scripts/slack_state.py +383 -0
- package/dist/templates/services/README.md +43 -0
- package/dist/templates/services/claude.py +1 -1
- package/dist/templates/services/codex.py +4 -4
- package/dist/templates/services/gemini.py +473 -0
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -1,108 +1,578 @@
|
|
|
1
1
|
# juno-code
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="./Juno-code-icon.png" alt="juno-code logo" width="200" />
|
|
5
|
+
</p>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>AI-powered code automation with structured task management</strong>
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/juno-code"><img src="https://img.shields.io/npm/v/juno-code.svg" alt="npm version" /></a>
|
|
13
|
+
<a href="https://github.com/askbudi/juno-code"><img src="https://img.shields.io/github/stars/askbudi/juno-code?style=social" alt="GitHub stars" /></a>
|
|
14
|
+
</p>
|
|
8
15
|
|
|
9
16
|
## Installation
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g juno-code
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
After installation, initialize your project:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
juno-code init --task "Your task description" --subagent claude
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## The Ralph Method: Where It All Started
|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
> *"I'm in danger!"* - Ralph Wiggum, every time you Ctrl+C a working AI loop too early
|
|
35
|
+
|
|
36
|
+
[Geoffrey Huntley's Ralph Method](https://ghuntley.com/ralph/) demonstrated something remarkable: AI can deliver production-quality software through iterative refinement. One engineer reportedly delivered a $50,000 project for $297 using this technique.
|
|
37
|
+
|
|
38
|
+
The core insight is simple:
|
|
39
|
+
```bash
|
|
40
|
+
while :; do
|
|
41
|
+
claude
|
|
42
|
+
done
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Run the AI in a loop. Let it iterate. Watch it solve problems, fix bugs, and add features until you hit Ctrl+C.
|
|
46
|
+
|
|
47
|
+
**But Ralph has problems:**
|
|
48
|
+
|
|
49
|
+
| Problem | What Happens | Why It Matters |
|
|
50
|
+
|---------|--------------|----------------|
|
|
51
|
+
| **One-time only** | Ralph shines for single big tasks | Doesn't scale to iterative development with many tasks |
|
|
52
|
+
| **Overcooking** | Loop runs too long, AI adds features nobody asked for | You get bloated code and wasted tokens |
|
|
53
|
+
| **Undercooking** | You Ctrl+C too early, work is incomplete | Features half-done, bugs half-fixed |
|
|
54
|
+
| **Fragile state** | Markdown files (TASKS.md, PLANNING.md) as source of truth | LLMs can corrupt format; no strict schema |
|
|
55
|
+
| **Vendor lock-in** | Ralph was built for Claude Code | Can't easily switch to Codex, Gemini, or others |
|
|
56
|
+
| **No traceability** | Changes blend together | Hard to debug, impossible to time-travel |
|
|
57
|
+
|
|
58
|
+
## juno-code: Ralph, But Better
|
|
59
|
+
|
|
60
|
+
juno-code takes the Ralph insight—*AI works better in loops*—and adds the structure needed for real work:
|
|
12
61
|
|
|
62
|
+
### Iteration Control: No More Overcooking
|
|
13
63
|
```bash
|
|
14
|
-
#
|
|
64
|
+
# Exactly 5 iterations - cooked perfectly
|
|
65
|
+
juno-code -b shell -s claude -m :opus -i 5 -v
|
|
66
|
+
|
|
67
|
+
# Until kanban tasks complete - cooked exactly right
|
|
68
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 1 -v
|
|
69
|
+
|
|
70
|
+
# Unlimited (like Ralph) - when you really want that
|
|
71
|
+
juno-code -b shell -s claude
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Task Tracking: Structured, Not Prose
|
|
75
|
+
Built-in kanban via [juno-kanban](https://pypi.org/project/juno-kanban/). Unlike Ralph's markdown files, kanban uses **NDJSON** - a strict format that can't be corrupted by LLM formatting errors:
|
|
76
|
+
```bash
|
|
77
|
+
# Query tasks programmatically - always parseable
|
|
78
|
+
./.juno_task/scripts/kanban.sh list --status backlog todo in_progress
|
|
79
|
+
|
|
80
|
+
# Each task is isolated and linked to a git commit
|
|
81
|
+
./.juno_task/scripts/kanban.sh get TASK_ID
|
|
82
|
+
|
|
83
|
+
# Scale to thousands of tasks without context bloat
|
|
84
|
+
./.juno_task/scripts/kanban.sh list --limit 5 # Shows only what matters
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Backend Choice: Use Any AI
|
|
88
|
+
Switch between Claude, Codex, Gemini, or Cursor with one flag:
|
|
89
|
+
```bash
|
|
90
|
+
# Stuck on a bug? Try different models
|
|
91
|
+
juno-code -b shell -s claude -m :opus-i 1 -v
|
|
92
|
+
juno-code -b shell -s codex -m :codex -i 1 -v
|
|
93
|
+
juno-code -b shell -s gemini -m :flash -i 1 -v
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Full Traceability: Every Change Tracked
|
|
97
|
+
- Every task links to a git commit
|
|
98
|
+
- Jump to any point in development history
|
|
99
|
+
- High token efficiency—AI can search git history instead of re-reading everything
|
|
100
|
+
|
|
101
|
+
### Hooks Without Lock-in
|
|
102
|
+
Run scripts at any lifecycle point. Works with ANY backend, not just Claude:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"hooks": {
|
|
106
|
+
"START_ITERATION": { "commands": ["./scripts/lint.sh"] },
|
|
107
|
+
"END_ITERATION": { "commands": ["npm test"] }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Human-Readable Logs
|
|
113
|
+
`-v` gives you structured output instead of raw JSON dumps:
|
|
114
|
+
```bash
|
|
115
|
+
juno-code -b shell -s claude -i 5 -v
|
|
116
|
+
# Clean, readable progress instead of wall of JSON
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Quick Start
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Install
|
|
15
123
|
npm install -g juno-code
|
|
124
|
+
|
|
125
|
+
# Initialize project
|
|
126
|
+
juno-code init --task "Add user authentication..." --subagent claude
|
|
127
|
+
|
|
128
|
+
# Start execution - uses .juno_task/int.md (optimized Ralph prompt)
|
|
129
|
+
juno-code start -b shell -s claude -i 1 -v
|
|
130
|
+
|
|
131
|
+
# Or with a custom prompt
|
|
132
|
+
juno-code -b shell -s claude -i 5 -p "Fix the login bug"
|
|
133
|
+
|
|
134
|
+
# Default Ralph based on kanban , without -p , juno-code uses .juno_task/prompt.md as prompt
|
|
135
|
+
juno-code -b shell -s claude -i 5 -v
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Key insight**: Running `juno-code start` without `-p` uses `.juno_task/prompt.md`—a production-ready prompt template that implements the Ralph method with guard rails.
|
|
139
|
+
|
|
140
|
+
## CLI Reference
|
|
141
|
+
|
|
142
|
+
### Core Commands
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Initialize - sets up .juno_task/ directory structure
|
|
146
|
+
juno-code init --task "description" --subagent claude
|
|
147
|
+
juno-code init --interactive # wizard mode
|
|
148
|
+
|
|
149
|
+
# Start execution (uses .juno_task/prompt.md by default)
|
|
150
|
+
juno-code start -b shell -s claude -i 5 -v
|
|
151
|
+
juno-code start -b shell -s codex -m :codex -i 10
|
|
152
|
+
|
|
153
|
+
# Direct prompt execution
|
|
154
|
+
juno-code -b shell -s claude -i 3 -p "your prompt"
|
|
155
|
+
|
|
156
|
+
# Quick subagent shortcuts
|
|
157
|
+
juno-code claude "your task"
|
|
158
|
+
juno-code codex "your task"
|
|
159
|
+
juno-code gemini "your task"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Global Options
|
|
163
|
+
|
|
164
|
+
| Flag | Description |
|
|
165
|
+
|------|-------------|
|
|
166
|
+
| `-b, --backend <type>` | Backend: `mcp`, `shell` |
|
|
167
|
+
| `-s, --subagent <name>` | Service: `claude`, `codex`, `gemini`, `cursor` |
|
|
168
|
+
| `-m, --model <name>` | Model (supports shorthands like `:opus`, `:haiku`) |
|
|
169
|
+
| `-i, --max-iterations <n>` | Iteration limit (-1 for unlimited) |
|
|
170
|
+
| `-p, --prompt <text>` | Prompt text (if omitted with `start`, uses prompt.md) |
|
|
171
|
+
| `-v, --verbose` | Human-readable verbose output |
|
|
172
|
+
| `-r, --resume <id>` | Resume specific session |
|
|
173
|
+
| `--continue` | Continue most recent session |
|
|
174
|
+
|
|
175
|
+
### Session Management
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
juno-code session list # View all sessions
|
|
179
|
+
juno-code session info abc123 # Session details
|
|
180
|
+
juno-code --resume abc123 -p "continue" # Resume session
|
|
181
|
+
juno-code --continue -p "keep going" # Continue most recent
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Feedback System
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# While juno-code is running, provide feedback
|
|
188
|
+
juno-code feedback "found a bug in the auth flow"
|
|
189
|
+
juno-code feedback --interactive
|
|
190
|
+
|
|
191
|
+
# Or enable inline feedback
|
|
192
|
+
juno-code start -b shell -s claude --enable-feedback -i 10
|
|
16
193
|
```
|
|
17
194
|
|
|
18
|
-
##
|
|
195
|
+
## Slack Integration
|
|
196
|
+
|
|
197
|
+
juno-code includes built-in Slack integration for team collaboration. The system monitors Slack channels and creates kanban tasks from messages, then posts agent responses as threaded replies.
|
|
198
|
+
|
|
199
|
+
### How It Works
|
|
200
|
+
|
|
201
|
+
1. **Fetch**: `slack_fetch.sh` monitors a Slack channel and creates kanban tasks from new messages
|
|
202
|
+
2. **Process**: The AI agent processes tasks and records responses in the kanban
|
|
203
|
+
3. **Respond**: `slack_respond.sh` sends agent responses back to Slack as threaded replies
|
|
204
|
+
|
|
205
|
+
This enables a workflow where team members can submit tasks via Slack and receive AI-generated responses without leaving their chat interface.
|
|
206
|
+
|
|
207
|
+
### Setup
|
|
208
|
+
|
|
209
|
+
1. **Create a Slack App**:
|
|
210
|
+
- Go to https://api.slack.com/apps and create a new app
|
|
211
|
+
- Under "OAuth & Permissions", add these scopes:
|
|
212
|
+
- `channels:history`, `channels:read` (public channels)
|
|
213
|
+
- `groups:history`, `groups:read` (private channels)
|
|
214
|
+
- `users:read` (user info)
|
|
215
|
+
- `chat:write` (send messages)
|
|
216
|
+
- Install the app to your workspace
|
|
217
|
+
- Copy the "Bot User OAuth Token" (starts with `xoxb-`)
|
|
218
|
+
|
|
219
|
+
2. **Configure Environment**:
|
|
220
|
+
```bash
|
|
221
|
+
# In project root .env file
|
|
222
|
+
SLACK_BOT_TOKEN=xoxb-your-token-here
|
|
223
|
+
SLACK_CHANNEL=bug-reports
|
|
224
|
+
```
|
|
19
225
|
|
|
20
|
-
|
|
226
|
+
3. **Usage**:
|
|
227
|
+
```bash
|
|
228
|
+
# Fetch messages from Slack and create tasks
|
|
229
|
+
./.juno_task/scripts/slack_fetch.sh --channel bug-reports
|
|
21
230
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
- Git for version control
|
|
25
|
-
- NPM or UV package manager
|
|
231
|
+
# Continuous monitoring mode
|
|
232
|
+
./.juno_task/scripts/slack_fetch.sh --channel feature-requests --continuous
|
|
26
233
|
|
|
27
|
-
|
|
234
|
+
# Send completed task responses back to Slack
|
|
235
|
+
./.juno_task/scripts/slack_respond.sh --tag slack-input
|
|
236
|
+
|
|
237
|
+
# Dry run to preview what would be sent
|
|
238
|
+
./.juno_task/scripts/slack_respond.sh --dry-run --verbose
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Automated Slack Workflow with Hooks
|
|
242
|
+
|
|
243
|
+
Use the `--pre-run` flag to sync with Slack before each juno-code run:
|
|
28
244
|
|
|
29
245
|
```bash
|
|
30
|
-
#
|
|
31
|
-
|
|
246
|
+
# Fetch Slack messages before starting work
|
|
247
|
+
./.juno_task/scripts/run_until_completion.sh \
|
|
248
|
+
--pre-run "./.juno_task/scripts/slack_fetch.sh --channel bug-reports" \
|
|
249
|
+
-s claude -i 5 -v
|
|
250
|
+
```
|
|
32
251
|
|
|
33
|
-
|
|
34
|
-
|
|
252
|
+
Or configure hooks in `.juno_task/config.json`:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"hooks": {
|
|
257
|
+
"SLACK_SYNC": {
|
|
258
|
+
"commands": [
|
|
259
|
+
"./.juno_task/scripts/slack_fetch.sh --channel bug-reports",
|
|
260
|
+
"./.juno_task/scripts/slack_respond.sh --tag slack-input"
|
|
261
|
+
]
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
35
266
|
|
|
36
|
-
|
|
37
|
-
juno-code --help
|
|
267
|
+
Then run with the hook:
|
|
38
268
|
|
|
39
|
-
|
|
40
|
-
|
|
269
|
+
```bash
|
|
270
|
+
./.juno_task/scripts/run_until_completion.sh --pre-run-hook SLACK_SYNC -s claude -i 5 -v
|
|
41
271
|
```
|
|
42
272
|
|
|
43
|
-
|
|
273
|
+
## run_until_completion.sh
|
|
274
|
+
|
|
275
|
+
The `run_until_completion.sh` script continuously runs juno-code until all kanban tasks are completed. It uses a do-while loop pattern: juno-code runs at least once, then continues while tasks remain in backlog, todo, or in_progress status.
|
|
44
276
|
|
|
45
|
-
|
|
277
|
+
### Basic Usage
|
|
46
278
|
|
|
47
|
-
|
|
48
|
-
|
|
279
|
+
```bash
|
|
280
|
+
# Run until all tasks complete
|
|
281
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 5 -v
|
|
282
|
+
|
|
283
|
+
# With custom backend and model
|
|
284
|
+
./.juno_task/scripts/run_until_completion.sh -b shell -s codex -m :codex -i 10
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
### Pre-run Commands (--pre-run)
|
|
288
|
+
|
|
289
|
+
Execute commands before the main loop starts. Useful for syncing with external services, running linters, or preparing the environment.
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Single pre-run command
|
|
293
|
+
./.juno_task/scripts/run_until_completion.sh --pre-run "./scripts/lint.sh" -s claude -i 5
|
|
294
|
+
|
|
295
|
+
# Multiple pre-run commands (executed in order)
|
|
296
|
+
./.juno_task/scripts/run_until_completion.sh \
|
|
297
|
+
--pre-run "./scripts/sync.sh" \
|
|
298
|
+
--pre-run "npm run build" \
|
|
299
|
+
-s claude -i 5 -v
|
|
300
|
+
|
|
301
|
+
# Alternative: use environment variable
|
|
302
|
+
JUNO_PRE_RUN="./scripts/prepare.sh" \
|
|
303
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 5
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Pre-run Hooks (--pre-run-hook)
|
|
307
|
+
|
|
308
|
+
Execute named hooks defined in `.juno_task/config.json`. Hooks group multiple commands that run together.
|
|
309
|
+
|
|
310
|
+
**Define hooks in config.json:**
|
|
311
|
+
```json
|
|
312
|
+
{
|
|
313
|
+
"hooks": {
|
|
314
|
+
"START_ITERATION": {
|
|
315
|
+
"commands": [
|
|
316
|
+
"./scripts/lint.sh",
|
|
317
|
+
"npm run typecheck"
|
|
318
|
+
]
|
|
319
|
+
},
|
|
320
|
+
"SLACK_SYNC": {
|
|
321
|
+
"commands": [
|
|
322
|
+
"./.juno_task/scripts/slack_fetch.sh --channel bugs",
|
|
323
|
+
"./.juno_task/scripts/slack_respond.sh"
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Use hooks:**
|
|
331
|
+
```bash
|
|
332
|
+
# Single hook
|
|
333
|
+
./.juno_task/scripts/run_until_completion.sh --pre-run-hook START_ITERATION -s claude -i 5
|
|
334
|
+
|
|
335
|
+
# Multiple hooks (executed in order)
|
|
336
|
+
./.juno_task/scripts/run_until_completion.sh \
|
|
337
|
+
--pre-run-hook SLACK_SYNC \
|
|
338
|
+
--pre-run-hook START_ITERATION \
|
|
339
|
+
-s claude -i 5
|
|
340
|
+
|
|
341
|
+
# Alternative: use environment variable
|
|
342
|
+
JUNO_PRE_RUN_HOOK="START_ITERATION" \
|
|
343
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 5
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Execution Order
|
|
347
|
+
|
|
348
|
+
When both hooks and pre-run commands are specified, the execution order is:
|
|
349
|
+
1. Hooks from `JUNO_PRE_RUN_HOOK` env var
|
|
350
|
+
2. Hooks from `--pre-run-hook` flags (in order)
|
|
351
|
+
3. Commands from `JUNO_PRE_RUN` env var
|
|
352
|
+
4. Commands from `--pre-run` flags (in order)
|
|
353
|
+
5. Main juno-code loop begins
|
|
354
|
+
|
|
355
|
+
### Environment Variables
|
|
356
|
+
|
|
357
|
+
| Variable | Description |
|
|
358
|
+
|----------|-------------|
|
|
359
|
+
| `JUNO_DEBUG=true` | Show debug diagnostic messages |
|
|
360
|
+
| `JUNO_VERBOSE=true` | Show informational status messages |
|
|
361
|
+
| `JUNO_PRE_RUN` | Pre-run command (runs before --pre-run flags) |
|
|
362
|
+
| `JUNO_PRE_RUN_HOOK` | Pre-run hook name (runs before --pre-run-hook flags) |
|
|
363
|
+
| `JUNO_RUN_UNTIL_MAX_ITERATIONS` | Maximum iterations (0 = unlimited) |
|
|
364
|
+
|
|
365
|
+
## Kanban Commands
|
|
366
|
+
|
|
367
|
+
The kanban.sh script wraps juno-kanban. Here are the actual commands:
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
# List tasks
|
|
371
|
+
./.juno_task/scripts/kanban.sh list --limit 5
|
|
372
|
+
./.juno_task/scripts/kanban.sh list --status backlog todo in_progress
|
|
373
|
+
|
|
374
|
+
# Get task details
|
|
375
|
+
./.juno_task/scripts/kanban.sh get TASK_ID
|
|
376
|
+
|
|
377
|
+
# Mark task status (backlog, todo, in_progress, done)
|
|
378
|
+
./.juno_task/scripts/kanban.sh mark in_progress --ID TASK_ID
|
|
379
|
+
./.juno_task/scripts/kanban.sh mark done --ID TASK_ID --response "Fixed auth, added tests"
|
|
380
|
+
|
|
381
|
+
# Update task with git commit reference
|
|
382
|
+
./.juno_task/scripts/kanban.sh update TASK_ID --commit abc123
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
## Backends & Services
|
|
386
|
+
|
|
387
|
+
### Available Backends
|
|
388
|
+
|
|
389
|
+
- **shell** - Direct execution via service scripts (recommended for headless)
|
|
390
|
+
- **mcp** - Model Context Protocol servers (full tool integration)
|
|
391
|
+
|
|
392
|
+
### Supported Services
|
|
393
|
+
|
|
394
|
+
| Service | Default Model | Shorthands |
|
|
395
|
+
|---------|---------------|------------|
|
|
396
|
+
| claude | `claude-sonnet-4-5-20250929` | `:haiku`, `:sonnet`, `:opus` |
|
|
397
|
+
| codex | `codex-5.2-max` | `:codex`, `:gpt-5`, `:mini` |
|
|
398
|
+
| gemini | `gemini-2.5-pro` | `:pro`, `:flash`, `:pro-3`, `:flash-3` |
|
|
399
|
+
|
|
400
|
+
### Custom Backends
|
|
401
|
+
|
|
402
|
+
Service scripts live in `~/.juno_code/services/`. Each is a Python script:
|
|
403
|
+
|
|
404
|
+
```bash
|
|
405
|
+
# View installed services
|
|
406
|
+
juno-code services list
|
|
407
|
+
|
|
408
|
+
# Force reinstall (get latest)
|
|
409
|
+
juno-code services install --force
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
To add a custom backend:
|
|
413
|
+
1. Create a Python script in `~/.juno_code/services/`
|
|
414
|
+
2. Accept standard args: `-p/--prompt`, `-m/--model`, `-v/--verbose`
|
|
415
|
+
3. Output JSON events to stdout for structured parsing
|
|
49
416
|
|
|
50
417
|
## Project Structure
|
|
51
418
|
|
|
419
|
+
After `juno-code init`:
|
|
420
|
+
|
|
52
421
|
```
|
|
53
|
-
|
|
422
|
+
your-project/
|
|
54
423
|
├── .juno_task/
|
|
55
|
-
│ ├──
|
|
56
|
-
│ ├──
|
|
57
|
-
│ ├── plan.md
|
|
58
|
-
│ ├── USER_FEEDBACK.md
|
|
59
|
-
│
|
|
60
|
-
│
|
|
61
|
-
│
|
|
62
|
-
│
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
424
|
+
│ ├── init.md # Task breakdown (your input)
|
|
425
|
+
│ ├── prompt.md # AI instructions (Ralph-style prompt)
|
|
426
|
+
│ ├── plan.md # Progress tracking
|
|
427
|
+
│ ├── USER_FEEDBACK.md # Issue tracking
|
|
428
|
+
│ ├── config.json # Configuration
|
|
429
|
+
│ ├── scripts/ # Auto-installed utilities
|
|
430
|
+
│ │ ├── run_until_completion.sh
|
|
431
|
+
│ │ ├── kanban.sh
|
|
432
|
+
│ │ └── install_requirements.sh
|
|
433
|
+
│ └── tasks/ # Kanban tasks (ndjson)
|
|
434
|
+
├── CLAUDE.md # Session learnings
|
|
435
|
+
└── AGENTS.md # Agent performance
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
## Environment Variables
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
# Primary
|
|
442
|
+
export JUNO_CODE_BACKEND=shell
|
|
443
|
+
export JUNO_CODE_SUBAGENT=claude
|
|
444
|
+
export JUNO_CODE_MODEL=:sonnet
|
|
445
|
+
export JUNO_CODE_MAX_ITERATIONS=10
|
|
446
|
+
|
|
447
|
+
# Service-specific
|
|
448
|
+
export CODEX_HIDE_STREAM_TYPES="turn_diff,token_count"
|
|
449
|
+
export GEMINI_API_KEY=your-key
|
|
450
|
+
export CLAUDE_USER_MESSAGE_PRETTY_TRUNCATE=4
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
## Examples
|
|
454
|
+
|
|
455
|
+
### The Ralph Workflow (Modernized)
|
|
456
|
+
|
|
457
|
+
```bash
|
|
458
|
+
# Initialize
|
|
459
|
+
juno-code init --task "Migrate JavaScript to TypeScript"
|
|
460
|
+
|
|
461
|
+
# Run until done (not forever)
|
|
462
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 20 -v
|
|
463
|
+
|
|
464
|
+
# Check progress anytime
|
|
465
|
+
./.juno_task/scripts/kanban.sh list --status in_progress done
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
### Bug Investigation
|
|
469
|
+
|
|
470
|
+
```bash
|
|
471
|
+
# Try with Claude opus
|
|
472
|
+
juno-code -b shell -s claude -m :opus -p "Investigate CI failures" -i 3
|
|
473
|
+
|
|
474
|
+
# Stuck? Try Codex perspective
|
|
475
|
+
juno-code -b shell -s codex -p "Same investigation" -i 3
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Iterative Feature Development
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
# Tasks are tracked via kanban
|
|
482
|
+
# (Tasks created by agent or imported)
|
|
483
|
+
|
|
484
|
+
# Run until all tasks complete
|
|
485
|
+
./.juno_task/scripts/run_until_completion.sh -s claude -i 10 -v
|
|
486
|
+
|
|
487
|
+
# Each completed task has a git commit for traceability
|
|
488
|
+
git log --oneline
|
|
66
489
|
```
|
|
67
490
|
|
|
68
|
-
##
|
|
491
|
+
## Comparison: Ralph vs juno-code
|
|
492
|
+
|
|
493
|
+
| Feature | Ralph | juno-code |
|
|
494
|
+
|---------|-------|-----------|
|
|
495
|
+
| **Design Focus** | One-time tasks (migrations, rewrites) | Iterative development (scales to 1000s of tasks) |
|
|
496
|
+
| **Core Loop** | `while :; do claude; done` | Controlled iterations |
|
|
497
|
+
| **Stopping** | Ctrl+C (guesswork) | `-i N` or "until tasks done" |
|
|
498
|
+
| **Source of Truth** | Markdown files (TASKS.md, PLANNING.md) | Structured kanban over bash |
|
|
499
|
+
| **Format Integrity** | Relies on LLM instruction-following | Strict format, always parseable |
|
|
500
|
+
| **Multiple AIs** | Claude only | Claude, Codex, Gemini, Cursor |
|
|
501
|
+
| **Traceability** | None | Every task → git commit |
|
|
502
|
+
| **Hooks** | Claude-specific | Works with any backend |
|
|
503
|
+
| **Verbose** | Raw JSON | Human-readable + jq-friendly |
|
|
504
|
+
| **Feedback** | None | Real-time during execution |
|
|
505
|
+
|
|
506
|
+
### Why Structured Kanban Over Markdown?
|
|
507
|
+
|
|
508
|
+
Ralph uses markdown files (TASKS.md, PLANNING.md) as its source of truth. This works for **one-time tasks** like "migrate the whole repo from TypeScript to Rust."
|
|
69
509
|
|
|
70
|
-
|
|
510
|
+
But for **iterative development**, markdown files break down:
|
|
71
511
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
5. **Documentation**: Continuous documentation updates
|
|
77
|
-
6. **Version Control**: Automated Git workflow with smart commits
|
|
512
|
+
- **No strict format**: LLMs can corrupt the structure, add extra formatting, forget sections
|
|
513
|
+
- **Context bloat**: Long plan.md files confuse agents and waste tokens
|
|
514
|
+
- **No query capability**: Can't ask "what's in progress?" without parsing prose
|
|
515
|
+
- **No task isolation**: Changes to one task can accidentally affect others
|
|
78
516
|
|
|
79
|
-
|
|
517
|
+
juno-code uses **structured kanban over bash**:
|
|
80
518
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
519
|
+
```bash
|
|
520
|
+
# Always parseable - the format can never break
|
|
521
|
+
./.juno_task/scripts/kanban.sh list --status in_progress
|
|
522
|
+
|
|
523
|
+
# Query specific tasks
|
|
524
|
+
./.juno_task/scripts/kanban.sh get TASK_ID
|
|
525
|
+
|
|
526
|
+
# Tasks stored as NDJSON - one line per task
|
|
527
|
+
# Each task is self-contained and isolated
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
This lets juno-code scale Ralph's insight (AI works better in loops) to **thousands of tasks** without the agent losing track or corrupting state.
|
|
87
531
|
|
|
88
|
-
##
|
|
532
|
+
## Troubleshooting
|
|
89
533
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
- **Version Control**: Automated Git workflow
|
|
534
|
+
### Service scripts not updating
|
|
535
|
+
```bash
|
|
536
|
+
juno-code services install --force
|
|
537
|
+
```
|
|
95
538
|
|
|
539
|
+
### Model passthrough issues
|
|
540
|
+
```bash
|
|
541
|
+
# Verify with verbose
|
|
542
|
+
juno-code -v -b shell -s codex -m :codex -p "test"
|
|
543
|
+
# Check stderr for: "Executing: python3 ~/.juno_code/services/codex.py ... -m codex-5.2-codex-max"
|
|
544
|
+
```
|
|
96
545
|
|
|
546
|
+
### Kanban not finding tasks
|
|
547
|
+
```bash
|
|
548
|
+
./.juno_task/scripts/kanban.sh list --status backlog todo in_progress
|
|
549
|
+
```
|
|
97
550
|
|
|
98
|
-
##
|
|
551
|
+
## Credits
|
|
99
552
|
|
|
100
|
-
|
|
101
|
-
2. **Check Plan**: Review `.juno_task/plan.md` for current priorities
|
|
102
|
-
3. **Provide Feedback**: Use `juno-code feedback` for issues or suggestions
|
|
103
|
-
4. **Track Progress**: Monitor AI development through `.juno_task/prompt.md`
|
|
553
|
+
juno-code is inspired by [Geoffrey Huntley's Ralph Method](https://ghuntley.com/ralph/)—the insight that AI delivers production software through iterative refinement. juno-code adds the structure that makes Ralph sustainable for real development work.
|
|
104
554
|
|
|
105
555
|
---
|
|
106
556
|
|
|
107
|
-
|
|
108
|
-
|
|
557
|
+
## Get Started Now
|
|
558
|
+
|
|
559
|
+
```bash
|
|
560
|
+
# Install globally
|
|
561
|
+
npm install -g juno-code
|
|
562
|
+
|
|
563
|
+
# Initialize in your project
|
|
564
|
+
cd your-project
|
|
565
|
+
juno-code init --task "Your task description" --subagent claude
|
|
566
|
+
|
|
567
|
+
# Start coding with AI
|
|
568
|
+
juno-code start -b shell -s claude -i 5 -v
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
**Links:**
|
|
572
|
+
- [npm package](https://www.npmjs.com/package/juno-code)
|
|
573
|
+
- [GitHub repository](https://github.com/askbudi/juno-code)
|
|
574
|
+
- [Report issues](https://github.com/askbudi/juno-code/issues)
|
|
575
|
+
|
|
576
|
+
## License
|
|
577
|
+
|
|
578
|
+
MIT
|