juno-code 1.0.35 → 1.0.36

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 CHANGED
@@ -1,108 +1,408 @@
1
1
  # juno-code
2
2
 
3
- TypeScript CLI tool for AI subagent orchestration with code automation.
3
+ <p align="center">
4
+ <img src="./Juno-code-icon.png" alt="juno-code logo" width="200" />
5
+ </p>
4
6
 
5
- ## Overview
7
+ <p align="center">
8
+ <strong>AI-powered code automation with structured task management</strong>
9
+ </p>
6
10
 
7
- juno-code is an AI-powered development CLI that orchestrates subagents (Claude, Cursor, Codex, Gemini) through MCP (Model Context Protocol) servers. It provides a modern TypeScript implementation with React INK TUI, comprehensive testing infrastructure, and automated feedback collection.
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
- This package is available on NPM under multiple names for flexibility:
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
+ ![Ralph Wiggum - The Simpsons](https://ghuntley.com/content/images/size/w1200/2025/06/3ea367ed-cae3-454a-840f-134531dea1fd.jpg)
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 |
12
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:
61
+
62
+ ### Iteration Control: No More Overcooking
13
63
  ```bash
14
- # Primary package (recommended)
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
16
136
  ```
17
137
 
18
- ## Getting Started
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.
19
139
 
20
- ### Prerequisites
140
+ ## CLI Reference
21
141
 
22
- - Node.js (v18 or higher)
23
- - Python 3.8+ (for dependency scripts)
24
- - Git for version control
25
- - NPM or UV package manager
142
+ ### Core Commands
26
143
 
27
- ### Quick Start
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
28
176
 
29
177
  ```bash
30
- # Initialize a new project
31
- juno-code init --task "Your task" --subagent claude --git-url "https://github.com/user/repo"
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
+ ```
32
183
 
33
- # Start task execution
34
- juno-code start
184
+ ### Feedback System
35
185
 
36
- # Or use the juno-code command for all operations
37
- juno-code --help
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
38
190
 
39
- # Collect feedback during execution
40
- juno-collect-feedback
191
+ # Or enable inline feedback
192
+ juno-code start -b shell -s claude --enable-feedback -i 10
41
193
  ```
42
194
 
43
- ### Available Commands
195
+ ## Kanban Commands
44
196
 
45
- The package installs these binary commands:
197
+ The kanban.sh script wraps juno-kanban. Here are the actual commands:
198
+
199
+ ```bash
200
+ # List tasks
201
+ ./.juno_task/scripts/kanban.sh list --limit 5
202
+ ./.juno_task/scripts/kanban.sh list --status backlog todo in_progress
46
203
 
47
- - `juno-code` - Main command (recommended)
48
- - `juno-collect-feedback` - Feedback collection utility
204
+ # Get task details
205
+ ./.juno_task/scripts/kanban.sh get TASK_ID
206
+
207
+ # Mark task status (backlog, todo, in_progress, done)
208
+ ./.juno_task/scripts/kanban.sh mark in_progress --ID TASK_ID
209
+ ./.juno_task/scripts/kanban.sh mark done --ID TASK_ID --response "Fixed auth, added tests"
210
+
211
+ # Update task with git commit reference
212
+ ./.juno_task/scripts/kanban.sh update TASK_ID --commit abc123
213
+ ```
214
+
215
+ ## Backends & Services
216
+
217
+ ### Available Backends
218
+
219
+ - **shell** - Direct execution via service scripts (recommended for headless)
220
+ - **mcp** - Model Context Protocol servers (full tool integration)
221
+
222
+ ### Supported Services
223
+
224
+ | Service | Default Model | Shorthands |
225
+ |---------|---------------|------------|
226
+ | claude | `claude-sonnet-4-5-20250929` | `:haiku`, `:sonnet`, `:opus` |
227
+ | codex | `codex-5.2-max` | `:codex`, `:gpt-5`, `:mini` |
228
+ | gemini | `gemini-2.5-pro` | `:pro`, `:flash`, `:pro-3`, `:flash-3` |
229
+
230
+ ### Custom Backends
231
+
232
+ Service scripts live in `~/.juno_code/services/`. Each is a Python script:
233
+
234
+ ```bash
235
+ # View installed services
236
+ juno-code services list
237
+
238
+ # Force reinstall (get latest)
239
+ juno-code services install --force
240
+ ```
241
+
242
+ To add a custom backend:
243
+ 1. Create a Python script in `~/.juno_code/services/`
244
+ 2. Accept standard args: `-p/--prompt`, `-m/--model`, `-v/--verbose`
245
+ 3. Output JSON events to stdout for structured parsing
49
246
 
50
247
  ## Project Structure
51
248
 
249
+ After `juno-code init`:
250
+
52
251
  ```
53
- .
252
+ your-project/
54
253
  ├── .juno_task/
55
- │ ├── prompt.md # Production-ready AI instructions
56
- │ ├── init.md # Task breakdown and constraints
57
- │ ├── plan.md # Dynamic planning and tracking
58
- │ ├── USER_FEEDBACK.md # User feedback and issue tracking
59
- └── specs/ # Comprehensive specifications
60
- ├── README.md # Specs overview and guide
61
- ├── requirements.md # Detailed functional requirements
62
- └── architecture.md # System architecture and design
63
- ├── CLAUDE.md # Session documentation and learnings
64
- ├── AGENTS.md # AI agent selection and performance tracking
65
- └── README.md # This file
254
+ │ ├── init.md # Task breakdown (your input)
255
+ │ ├── prompt.md # AI instructions (Ralph-style prompt)
256
+ │ ├── plan.md # Progress tracking
257
+ │ ├── USER_FEEDBACK.md # Issue tracking
258
+ ├── config.json # Configuration
259
+ ├── scripts/ # Auto-installed utilities
260
+ ├── run_until_completion.sh
261
+ │ ├── kanban.sh
262
+ │ │ └── install_requirements.sh
263
+ │ └── tasks/ # Kanban tasks (ndjson)
264
+ ├── CLAUDE.md # Session learnings
265
+ └── AGENTS.md # Agent performance
266
+ ```
267
+
268
+ ## Environment Variables
269
+
270
+ ```bash
271
+ # Primary
272
+ export JUNO_CODE_BACKEND=shell
273
+ export JUNO_CODE_SUBAGENT=claude
274
+ export JUNO_CODE_MODEL=:sonnet
275
+ export JUNO_CODE_MAX_ITERATIONS=10
276
+
277
+ # Service-specific
278
+ export CODEX_HIDE_STREAM_TYPES="turn_diff,token_count"
279
+ export GEMINI_API_KEY=your-key
280
+ export CLAUDE_USER_MESSAGE_PRETTY_TRUNCATE=4
281
+ ```
282
+
283
+ ## Examples
284
+
285
+ ### The Ralph Workflow (Modernized)
286
+
287
+ ```bash
288
+ # Initialize
289
+ juno-code init --task "Migrate JavaScript to TypeScript"
290
+
291
+ # Run until done (not forever)
292
+ ./.juno_task/scripts/run_until_completion.sh -s claude -i 20 -v
293
+
294
+ # Check progress anytime
295
+ ./.juno_task/scripts/kanban.sh list --status in_progress done
296
+ ```
297
+
298
+ ### Bug Investigation
299
+
300
+ ```bash
301
+ # Try with Claude opus
302
+ juno-code -b shell -s claude -m :opus -p "Investigate CI failures" -i 3
303
+
304
+ # Stuck? Try Codex perspective
305
+ juno-code -b shell -s codex -p "Same investigation" -i 3
66
306
  ```
67
307
 
68
- ## AI-Powered Development
308
+ ### Iterative Feature Development
69
309
 
70
- This project implements a sophisticated AI development workflow:
310
+ ```bash
311
+ # Tasks are tracked via kanban
312
+ # (Tasks created by agent or imported)
313
+
314
+ # Run until all tasks complete
315
+ ./.juno_task/scripts/run_until_completion.sh -s claude -i 10 -v
316
+
317
+ # Each completed task has a git commit for traceability
318
+ git log --oneline
319
+ ```
71
320
 
72
- 1. **Task Analysis**: AI studies existing codebase and requirements
73
- 2. **Specification Creation**: Detailed specs with parallel subagents
74
- 3. **Implementation**: AI-assisted development (up to 500 parallel agents)
75
- 4. **Testing**: Automated testing with dedicated subagents
76
- 5. **Documentation**: Continuous documentation updates
77
- 6. **Version Control**: Automated Git workflow with smart commits
321
+ ## Comparison: Ralph vs juno-code
78
322
 
79
- ## Key Features
323
+ | Feature | Ralph | juno-code |
324
+ |---------|-------|-----------|
325
+ | **Design Focus** | One-time tasks (migrations, rewrites) | Iterative development (scales to 1000s of tasks) |
326
+ | **Core Loop** | `while :; do claude; done` | Controlled iterations |
327
+ | **Stopping** | Ctrl+C (guesswork) | `-i N` or "until tasks done" |
328
+ | **Source of Truth** | Markdown files (TASKS.md, PLANNING.md) | Structured kanban over bash |
329
+ | **Format Integrity** | Relies on LLM instruction-following | Strict format, always parseable |
330
+ | **Multiple AIs** | Claude only | Claude, Codex, Gemini, Cursor |
331
+ | **Traceability** | None | Every task → git commit |
332
+ | **Hooks** | Claude-specific | Works with any backend |
333
+ | **Verbose** | Raw JSON | Human-readable + jq-friendly |
334
+ | **Feedback** | None | Real-time during execution |
80
335
 
81
- - **Production-Ready Templates**: Comprehensive templates for AI guidance
82
- - **Parallel Processing**: Up to 500 parallel subagents for analysis
83
- - **Automated Workflows**: Git integration, tagging, and documentation
84
- - **Quality Enforcement**: Strict requirements against placeholder implementations
85
- - **User Feedback Integration**: Continuous feedback loop via USER_FEEDBACK.md
86
- - **Session Management**: Detailed tracking of development sessions
336
+ ### Why Structured Kanban Over Markdown?
87
337
 
88
- ## Configuration
338
+ 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."
89
339
 
90
- The project uses `claude` as the primary AI subagent with these settings:
91
- - **Parallel Agents**: Up to 500 for analysis, 1 for build/test
92
- - **Quality Standards**: Full implementations required
93
- - **Documentation**: Comprehensive and up-to-date
94
- - **Version Control**: Automated Git workflow
340
+ But for **iterative development**, markdown files break down:
95
341
 
342
+ - **No strict format**: LLMs can corrupt the structure, add extra formatting, forget sections
343
+ - **Context bloat**: Long plan.md files confuse agents and waste tokens
344
+ - **No query capability**: Can't ask "what's in progress?" without parsing prose
345
+ - **No task isolation**: Changes to one task can accidentally affect others
96
346
 
347
+ juno-code uses **structured kanban over bash**:
97
348
 
98
- ## Development Workflow
349
+ ```bash
350
+ # Always parseable - the format can never break
351
+ ./.juno_task/scripts/kanban.sh list --status in_progress
352
+
353
+ # Query specific tasks
354
+ ./.juno_task/scripts/kanban.sh get TASK_ID
355
+
356
+ # Tasks stored as NDJSON - one line per task
357
+ # Each task is self-contained and isolated
358
+ ```
99
359
 
100
- 1. **Review Task**: Check `.juno_task/init.md` for main task
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`
360
+ 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.
361
+
362
+ ## Troubleshooting
363
+
364
+ ### Service scripts not updating
365
+ ```bash
366
+ juno-code services install --force
367
+ ```
368
+
369
+ ### Model passthrough issues
370
+ ```bash
371
+ # Verify with verbose
372
+ juno-code -v -b shell -s codex -m :codex -p "test"
373
+ # Check stderr for: "Executing: python3 ~/.juno_code/services/codex.py ... -m codex-5.2-codex-max"
374
+ ```
375
+
376
+ ### Kanban not finding tasks
377
+ ```bash
378
+ ./.juno_task/scripts/kanban.sh list --status backlog todo in_progress
379
+ ```
380
+
381
+ ## Credits
382
+
383
+ 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
384
 
105
385
  ---
106
386
 
107
- Created with juno-code on 2025-10-08
108
- using claude as primary AI subagent
387
+ ## Get Started Now
388
+
389
+ ```bash
390
+ # Install globally
391
+ npm install -g juno-code
392
+
393
+ # Initialize in your project
394
+ cd your-project
395
+ juno-code init --task "Your task description" --subagent claude
396
+
397
+ # Start coding with AI
398
+ juno-code start -b shell -s claude -i 5 -v
399
+ ```
400
+
401
+ **Links:**
402
+ - [npm package](https://www.npmjs.com/package/juno-code)
403
+ - [GitHub repository](https://github.com/askbudi/juno-code)
404
+ - [Report issues](https://github.com/askbudi/juno-code/issues)
405
+
406
+ ## License
407
+
408
+ MIT