juno-code 1.0.45 → 1.0.46
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 +1 -1
- package/dist/bin/cli.js +641 -43
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/cli.mjs +641 -43
- package/dist/bin/cli.mjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/templates/scripts/log_scanner.sh +790 -0
- package/dist/templates/services/claude.py +2 -1
- package/dist/templates/services/codex.py +5 -4
- package/dist/templates/skills/claude/.gitkeep +0 -0
- package/dist/templates/skills/claude/plan-kanban-tasks/SKILL.md +25 -0
- package/dist/templates/skills/claude/ralph-loop/SKILL.md +43 -0
- package/dist/templates/skills/claude/ralph-loop/references/first_check.md +20 -0
- package/dist/templates/skills/claude/ralph-loop/references/implement.md +99 -0
- package/dist/templates/skills/claude/ralph-loop/scripts/kanban.sh +293 -0
- package/dist/templates/skills/claude/understand-project/SKILL.md +39 -0
- package/dist/templates/skills/codex/.gitkeep +0 -0
- package/dist/templates/skills/codex/ralph-loop/SKILL.md +43 -0
- package/dist/templates/skills/codex/ralph-loop/references/first_check.md +20 -0
- package/dist/templates/skills/codex/ralph-loop/references/implement.md +99 -0
- package/dist/templates/skills/codex/ralph-loop/scripts/kanban.sh +293 -0
- package/package.json +3 -2
|
@@ -27,10 +27,11 @@ class ClaudeService:
|
|
|
27
27
|
":claude-haiku-4-5": "claude-haiku-4-5-20251001",
|
|
28
28
|
":claude-sonnet-4-5": "claude-sonnet-4-5-20250929",
|
|
29
29
|
":claude-opus-4-5": "claude-opus-4-5-20251101",
|
|
30
|
+
":claude-opus-4-6": "claude-opus-4-6",
|
|
30
31
|
":claude-opus-4": "claude-opus-4-20250514",
|
|
31
32
|
":haiku": "claude-haiku-4-5-20251001",
|
|
32
33
|
":sonnet": "claude-sonnet-4-5-20250929",
|
|
33
|
-
":opus": "claude-opus-4-
|
|
34
|
+
":opus": "claude-opus-4-6",
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
# Default allowed tools (used with --append-allowed-tools)
|
|
@@ -17,12 +17,13 @@ class CodexService:
|
|
|
17
17
|
"""Service wrapper for OpenAI Codex CLI"""
|
|
18
18
|
|
|
19
19
|
# Default configuration
|
|
20
|
-
DEFAULT_MODEL = "
|
|
20
|
+
DEFAULT_MODEL = "gpt-5.3-codex"
|
|
21
21
|
DEFAULT_AUTO_INSTRUCTION = """You are an AI coding assistant. Follow the instructions provided and generate high-quality code."""
|
|
22
22
|
|
|
23
23
|
# Model shorthand mappings (colon-prefixed names expand to full model IDs)
|
|
24
24
|
MODEL_SHORTHANDS = {
|
|
25
|
-
":codex": "
|
|
25
|
+
":codex": "gpt-5.3-codex",
|
|
26
|
+
":codex-mini": "gpt-5.1-codex-mini",
|
|
26
27
|
":gpt-5": "gpt-5",
|
|
27
28
|
":mini": "gpt-5-codex-mini",
|
|
28
29
|
}
|
|
@@ -70,10 +71,10 @@ Examples:
|
|
|
70
71
|
%(prog)s -p "Write a hello world function"
|
|
71
72
|
%(prog)s -pp prompt.txt --cd /path/to/project
|
|
72
73
|
%(prog)s -p "Add tests" -m gpt-4 -c custom_arg=value
|
|
73
|
-
%(prog)s -p "Optimize code" -m :codex # uses
|
|
74
|
+
%(prog)s -p "Optimize code" -m :codex # uses gpt-5.3-codex
|
|
74
75
|
|
|
75
76
|
Environment Variables:
|
|
76
|
-
CODEX_MODEL Model name (supports shorthand, default:
|
|
77
|
+
CODEX_MODEL Model name (supports shorthand, default: gpt-5.3-codex)
|
|
77
78
|
CODEX_HIDE_STREAM_TYPES Comma-separated list of streaming msg types to hide
|
|
78
79
|
Default: turn_diff,token_count,exec_command_output_delta
|
|
79
80
|
JUNO_CODE_HIDE_STREAM_TYPES Same as CODEX_HIDE_STREAM_TYPES (alias)
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-kanban-tasks
|
|
3
|
+
description: Generate Product Development Requirments(PDR) and create task on kanban. Use when user explictly ask for, or ask for creating a task, planing a feature, register a task on kaban.
|
|
4
|
+
argument-hint: [Required Features] [Constraints] [Specification] [Test Criteria]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
First task is to study @.juno_task/plan.md (it may be incorrect)
|
|
8
|
+
and study what is needed to achieve the main task.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Second Task is to understand the task, create a spec for process to follow, plan to execute, scripts to create, virtual enviroment that we need, things that we need to be aware of, how to test the scripts and follow progress.
|
|
12
|
+
Think hard and plan/create spec for every step of this task
|
|
13
|
+
and for each part create a seperate .md file under @.juno_task/specs/*
|
|
14
|
+
|
|
15
|
+
## Task 2
|
|
16
|
+
Update @.juno_task/plan.md with the new specs and Requirments.
|
|
17
|
+
|
|
18
|
+
## Part 3
|
|
19
|
+
|
|
20
|
+
Create PDR on kanban, kanban is available in @.juno_task/scripts/kanban.sh
|
|
21
|
+
In the task body, include requirments, success criteria, test scenarios and jobs to be done.
|
|
22
|
+
For each chunk of the required feature create a seperate task, we want tasks, small enough to be done in one iteration, without compacting context window.
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralph-loop
|
|
3
|
+
description: should only get executed with explicit user request.
|
|
4
|
+
---
|
|
5
|
+
0a. study [references/implement.md](references/implement.md).
|
|
6
|
+
|
|
7
|
+
0b. When you discover a syntax, logic, UI, User Flow Error or bug. Immediately update tasks.md with your findings using a subagent. When the issue is resolved, update tasks.md and remove the item using a subagent.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
999. Important: When authoring documentation capture the why tests and the backing implementation is important.
|
|
11
|
+
|
|
12
|
+
9999. Important: We want single sources of truth, no migrations/adapters. If tests unrelated to your work fail then it's your job to resolve these tests as part of the increment of change.
|
|
13
|
+
|
|
14
|
+
999999. As soon as there are no build or test errors create a git tag. If there are no git tags start at 0.0.0 and increment patch by 1 for example 0.0.1 if 0.0.0 does not exist.
|
|
15
|
+
|
|
16
|
+
999999999. You may add extra logging if required to be able to debug the issues.
|
|
17
|
+
|
|
18
|
+
9999999999. ALWAYS KEEP Tasks up to date with your learnings using a subagent. Especially after wrapping up/finishing your turn.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
99999999999. When you learn something new about how to run the app or examples make sure you update @Claude.md using a subagent but keep it brief. For example if you run commands multiple times before learning the correct command then that file should be updated.
|
|
23
|
+
|
|
24
|
+
999999999999. IMPORTANT when you discover a bug resolve it using subagents even if it is unrelated to the current piece of work after documenting it in Tasks
|
|
25
|
+
|
|
26
|
+
9999999999999999999. Keep @Claude.md up to date with information on how to build the app and your learnings to optimize the build/test loop using a subagent.
|
|
27
|
+
|
|
28
|
+
999999999999999999999. For any bugs you notice, it's important to resolve them or document them in Tasks to be resolved using a subagent.
|
|
29
|
+
|
|
30
|
+
99999999999999999999999. When authoring the missing features you may author multiple standard libraries at once using up to 1000 parallel subagents
|
|
31
|
+
|
|
32
|
+
99999999999999999999999999. When Tasks, Claude.md becomes large periodically clean out the items that are completed from the file using a subagent.
|
|
33
|
+
Large Claude.md reduce the performance.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
9999999999999999999999999999. DO NOT IMPLEMENT PLACEHOLDER OR SIMPLE IMPLEMENTATIONS. WE WANT FULL IMPLEMENTATIONS. DO IT OR I WILL YELL AT YOU
|
|
38
|
+
|
|
39
|
+
9999999999999999999999999999999. SUPER IMPORTANT DO NOT IGNORE. DO NOT PLACE STATUS REPORT UPDATES INTO @Claude.md
|
|
40
|
+
|
|
41
|
+
99999999999999999999999999999999. After reveiwing Feedback, if you find an open issue, you need to update previously handled issues status as well. If user reporting a bug, that earlier on reported on the Tasks or @Claude.md as resolved. You should update it to reflect that the issue is not resolved.
|
|
42
|
+
it would be ok to include past reasoning and root causing to the open issue, You should mention. <PREVIOUS_AGENT_ATTEMP> Tag and describe the approach already taken, so the agent knows 1.the issue is still open,2. past approaches to resolve it, what it was, and know that it has failed.
|
|
43
|
+
Tasks , USER_FEEDBACK and @Claude.md should repesent truth. User Open Issue is a high level of truth. so you need to reflect it on the files.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
### Check once
|
|
2
|
+
|
|
3
|
+
Perform these check once, to make sure about the git logic. There is no need to keep running this on every execution.
|
|
4
|
+
|
|
5
|
+
**Detection & Creation Logic**:
|
|
6
|
+
- Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
git rev-parse --git-dir 2>/dev/null
|
|
10
|
+
```
|
|
11
|
+
- Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
|
|
12
|
+
- Check if .eslintrc* or eslint.config.* exists → create/verify .eslintignore
|
|
13
|
+
- Check if .prettierrc* exists → create/verify .prettierignore
|
|
14
|
+
- Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
|
|
15
|
+
- Check if terraform files (*.tf) exist → create/verify .terraformignore
|
|
16
|
+
- Check if .helmignore needed (helm charts present) → create/verify .helmignore
|
|
17
|
+
|
|
18
|
+
**If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
|
|
19
|
+
**If ignore file missing**: Create with full pattern set for detected technology
|
|
20
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Study kanban.sh and Execute the implementation plan by processing and executing all tasks defined in ./juno_task/tasks.md, update ./juno_task/tasks.md with the tasks on kanban
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## User Input
|
|
6
|
+
```text
|
|
7
|
+
A.
|
|
8
|
+
**ALWAYS check remaing tasks and user feedbacks. Integrate it into the plan,
|
|
9
|
+
this is the primary mechanism for user input and for you to track your progress.
|
|
10
|
+
`./juno_task/scripts/kanban.sh list --limit 5`
|
|
11
|
+
return the most recent 5 Tasks and their status and potential agent response to them.
|
|
12
|
+
|
|
13
|
+
**Important** ./juno_task/scripts/kanban.sh has already installed in your enviroment and you can execute it in your bash.
|
|
14
|
+
|
|
15
|
+
A-1.
|
|
16
|
+
read @.juno_task/USER_FEEDBACK.md user feedback on your current execution will be writeen here. And will guide you. If user wants to talk to you while you are working , he will write into this file. first think you do is to read it file.
|
|
17
|
+
|
|
18
|
+
B.
|
|
19
|
+
Based on Items in **./juno_task/scripts/kanban.sh** reflect on @.juno_task/plan.md and keep it up-to-date.
|
|
20
|
+
0g. Entities and their status in **./juno_task/scripts/kanban.sh** has higher priority and level of truth than other parts of the app.
|
|
21
|
+
If you see user report a bug that you earlier marked as resolved, you need to investigate the issue again.
|
|
22
|
+
./juno_task/scripts/kanban.sh items has the higher level of truth. Always
|
|
23
|
+
|
|
24
|
+
0e. Status in ./juno_task/scripts/kanban.sh could be backlog, todo, in_progress, done.
|
|
25
|
+
in_progress, todo, backlog. That is the priority of tasks in general sense, unless you find something with 10X magnitute of importance, or if you do it first it make other tasks easier or unnecessary.
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
0f. After reviwing Feedback, if you find an open issue, you need to update previously handled issues status as well. If user reporting a bug, that earlier on reported on the feedback/plan or Claude.md as resolved. You should update it to reflect that the issue is not resolved.
|
|
29
|
+
`./juno_task/scripts/kanban.sh mark todo --ID {Task_ID}`
|
|
30
|
+
|
|
31
|
+
it would be ok to include past reasoning and root causing to the open issue, You should mention. <PREVIOUS_AGENT_ATTEMP> Tag and describe the approach already taken, so the agent knows
|
|
32
|
+
1.the issue is still open,
|
|
33
|
+
2. past approaches to resolve it, what it was, and know that it has failed.
|
|
34
|
+
`./juno_task/scripts/kanban.sh mark todo --ID {Task_ID} --response "<PREVIOUS_AGENT_ATTEMP>{what happend before ...}<PREVIOUS_AGENT_ATTEMP>" `
|
|
35
|
+
|
|
36
|
+
**Note** updating response will REPLACE response. So you need to include everything important from the past as well you can check the content of a task with
|
|
37
|
+
`./juno_task/scripts/kanban.sh get {TASK_ID}`
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
C. Using parallel subagents. You may use up to 500 parallel subagents for all operations but only 1 subagent for build/tests.
|
|
42
|
+
|
|
43
|
+
D. Choose the most important 1 things, ( Based on Open Issue and Also Tasks ), Think hard about what is the most important Task.
|
|
44
|
+
|
|
45
|
+
E. update status of most important task on ./juno_task/scripts/kanban.sh.
|
|
46
|
+
(if the task is not on ./juno_task/scripts/kanban.sh, create it ! Kanban is our source of truth)
|
|
47
|
+
`./juno_task/scripts/kanban.sh mark in_progress --ID {Task_ID}`
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
F. Implement the most important 1 thing following the outline.
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You **MUST** consider the user input before proceeding (if not empty).
|
|
55
|
+
|
|
56
|
+
## Outline
|
|
57
|
+
|
|
58
|
+
. Execute implementation following the task plan:
|
|
59
|
+
- **Phase-by-phase execution**: Complete each phase before moving to the next
|
|
60
|
+
- **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
|
|
61
|
+
- **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
|
|
62
|
+
- **File-based coordination**: Tasks affecting the same files must run sequentially
|
|
63
|
+
- **Validation checkpoints**: Verify each phase completion before proceeding
|
|
64
|
+
|
|
65
|
+
7. Implementation execution rules:
|
|
66
|
+
- **Setup first**: Initialize project structure, dependencies, configuration
|
|
67
|
+
- **Tests before code**: If you need to write tests for contracts, entities, and integration scenarios
|
|
68
|
+
- **Core development**: Implement models, services, CLI commands, endpoints
|
|
69
|
+
- **Integration work**: Database connections, middleware, logging, external services
|
|
70
|
+
- **Polish and validation**: Unit tests, performance optimization, documentation
|
|
71
|
+
|
|
72
|
+
8. Progress tracking and error handling:
|
|
73
|
+
- Report progress after each completed task
|
|
74
|
+
- Halt execution if any non-parallel task fails
|
|
75
|
+
- For parallel tasks [P], continue with successful tasks, report failed ones
|
|
76
|
+
- Provide clear error messages with context for debugging
|
|
77
|
+
- Suggest next steps if implementation cannot proceed
|
|
78
|
+
- **IMPORTANT** For completed tasks, make sure to mark the task off as [X] in the tasks file.
|
|
79
|
+
- **IMPORTANT** Keep ./juno_task/scripts/kanban.sh up-to-date
|
|
80
|
+
When the issue is resolved always update ./juno_task/scripts/kanban.sh
|
|
81
|
+
`./juno_task/scripts/kanban.sh --status {status} --ID {task_id} --response "{key actions you take, and how you did test it}"`
|
|
82
|
+
|
|
83
|
+
9. Completion validation:
|
|
84
|
+
- Verify all required tasks are completed
|
|
85
|
+
- Check that implemented features match the original specification
|
|
86
|
+
- Validate that tests pass and coverage meets requirements
|
|
87
|
+
- Confirm the implementation follows the technical plan
|
|
88
|
+
- Report final status with summary of completed work
|
|
89
|
+
- When the issue is resolved always update ./juno_task/scripts/kanban.sh
|
|
90
|
+
`./juno_task/scripts/kanban.sh --mark done --ID {task_id} --response "{key actions you take, and how you did test it}"`
|
|
91
|
+
|
|
92
|
+
10. Git
|
|
93
|
+
|
|
94
|
+
When the tests pass update ./juno_task/scripts/kanban.sh, then add changed code with "git add -A" via bash then do a "git commit" with a message that describes the changes you made to the code. After the commit do a "git push" to push the changes to the remote repository.
|
|
95
|
+
Use commit message as a backlog of what has achieved. So later on we would know exactly what we achieved in each commit.
|
|
96
|
+
Update the task in ./juno_task/scripts/kanban.sh with the commit hash so later on we could map each task to a specific git commit
|
|
97
|
+
`./juno_task/scripts/kanban.sh update {task_id} --commit {commit_hash}`
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# kanban.sh
|
|
4
|
+
#
|
|
5
|
+
# Purpose: Kanban wrapper with Python environment setup
|
|
6
|
+
#
|
|
7
|
+
# This script ensures juno-kanban always executes from the project root directory
|
|
8
|
+
# with the proper Python virtual environment activated.
|
|
9
|
+
#
|
|
10
|
+
# Usage: ./.juno_task/scripts/kanban.sh [juno-kanban arguments]
|
|
11
|
+
# Example: ./.juno_task/scripts/kanban.sh list --limit 5
|
|
12
|
+
# Example: ./.juno_task/scripts/kanban.sh list -f json --raw # (flag order normalized)
|
|
13
|
+
# Example: ./.juno_task/scripts/kanban.sh -f json --raw list # (also works)
|
|
14
|
+
#
|
|
15
|
+
# Note: Global flags (-f/--format, -p/--pretty, --raw, -v/--verbose, -c/--config)
|
|
16
|
+
# can be placed anywhere in the command line. This wrapper normalizes them
|
|
17
|
+
# to appear before the command for juno-kanban compatibility.
|
|
18
|
+
#
|
|
19
|
+
# Environment Variables:
|
|
20
|
+
# JUNO_DEBUG=true - Show [DEBUG] diagnostic messages
|
|
21
|
+
# JUNO_VERBOSE=true - Show [KANBAN] informational messages
|
|
22
|
+
# (Both default to false for silent operation)
|
|
23
|
+
#
|
|
24
|
+
# Created by: juno-code init command
|
|
25
|
+
# Date: Auto-generated during project initialization
|
|
26
|
+
|
|
27
|
+
set -euo pipefail # Exit on error, undefined variable, or pipe failure
|
|
28
|
+
|
|
29
|
+
# DEBUG OUTPUT: Show that kanban.sh is being executed (only if JUNO_DEBUG=true)
|
|
30
|
+
# Note: JUNO_DEBUG is separate from JUNO_VERBOSE for fine-grained control
|
|
31
|
+
if [ "${JUNO_DEBUG:-false}" = "true" ]; then
|
|
32
|
+
echo "[DEBUG] kanban.sh is being executed from: $(pwd)" >&2
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Color output for better readability
|
|
36
|
+
RED='\033[0;31m'
|
|
37
|
+
GREEN='\033[0;32m'
|
|
38
|
+
YELLOW='\033[1;33m'
|
|
39
|
+
BLUE='\033[0;34m'
|
|
40
|
+
NC='\033[0m' # No Color
|
|
41
|
+
|
|
42
|
+
# Configuration
|
|
43
|
+
VENV_DIR=".venv_juno"
|
|
44
|
+
SCRIPTS_DIR=".juno_task/scripts"
|
|
45
|
+
INSTALL_SCRIPT="${SCRIPTS_DIR}/install_requirements.sh"
|
|
46
|
+
|
|
47
|
+
# Logging functions
|
|
48
|
+
log_info() {
|
|
49
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
50
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
51
|
+
echo -e "${BLUE}[KANBAN]${NC} $1"
|
|
52
|
+
fi
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
log_success() {
|
|
56
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
57
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
58
|
+
echo -e "${GREEN}[KANBAN]${NC} $1"
|
|
59
|
+
fi
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
log_warning() {
|
|
63
|
+
# Only print if JUNO_VERBOSE is set to true
|
|
64
|
+
if [ "${JUNO_VERBOSE:-false}" = "true" ]; then
|
|
65
|
+
echo -e "${YELLOW}[KANBAN]${NC} $1"
|
|
66
|
+
fi
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
log_error() {
|
|
70
|
+
# Always print errors regardless of JUNO_VERBOSE
|
|
71
|
+
echo -e "${RED}[KANBAN]${NC} $1"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Function to check if we're inside .venv_juno specifically
|
|
75
|
+
# CRITICAL: Don't just check for ANY venv - check if we're in .venv_juno
|
|
76
|
+
is_in_venv_juno() {
|
|
77
|
+
# Check if VIRTUAL_ENV is set and points to .venv_juno
|
|
78
|
+
if [ -n "${VIRTUAL_ENV:-}" ]; then
|
|
79
|
+
# Check if VIRTUAL_ENV path contains .venv_juno
|
|
80
|
+
if [[ "${VIRTUAL_ENV:-}" == *"/.venv_juno" ]] || [[ "${VIRTUAL_ENV:-}" == *".venv_juno"* ]]; then
|
|
81
|
+
return 0 # Inside .venv_juno
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
# Check if the basename is .venv_juno
|
|
85
|
+
if [ "$(basename "${VIRTUAL_ENV:-}")" = ".venv_juno" ]; then
|
|
86
|
+
return 0 # Inside .venv_juno
|
|
87
|
+
fi
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
return 1 # Not inside .venv_juno (or not in any venv)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# Function to activate virtual environment
|
|
94
|
+
activate_venv() {
|
|
95
|
+
local venv_path="$1"
|
|
96
|
+
|
|
97
|
+
if [ ! -d "$venv_path" ]; then
|
|
98
|
+
log_error "Virtual environment not found: $venv_path"
|
|
99
|
+
return 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Activate the venv
|
|
103
|
+
# shellcheck disable=SC1091
|
|
104
|
+
if [ -f "$venv_path/bin/activate" ]; then
|
|
105
|
+
source "$venv_path/bin/activate"
|
|
106
|
+
log_success "Activated virtual environment: $venv_path"
|
|
107
|
+
return 0
|
|
108
|
+
else
|
|
109
|
+
log_error "Activation script not found: $venv_path/bin/activate"
|
|
110
|
+
return 1
|
|
111
|
+
fi
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
# Function to ensure Python environment is ready
|
|
115
|
+
ensure_python_environment() {
|
|
116
|
+
log_info "Checking Python environment..."
|
|
117
|
+
|
|
118
|
+
# Step 1: Check if we're already in .venv_juno specifically
|
|
119
|
+
if is_in_venv_juno; then
|
|
120
|
+
log_success "Already inside .venv_juno virtual environment"
|
|
121
|
+
return 0
|
|
122
|
+
fi
|
|
123
|
+
|
|
124
|
+
# Step 2: Not in .venv_juno - check if .venv_juno exists in project root
|
|
125
|
+
if [ -d "$VENV_DIR" ]; then
|
|
126
|
+
log_info "Found existing virtual environment: $VENV_DIR"
|
|
127
|
+
|
|
128
|
+
# Activate the venv
|
|
129
|
+
if activate_venv "$VENV_DIR"; then
|
|
130
|
+
return 0
|
|
131
|
+
else
|
|
132
|
+
log_error "Failed to activate virtual environment"
|
|
133
|
+
return 1
|
|
134
|
+
fi
|
|
135
|
+
fi
|
|
136
|
+
|
|
137
|
+
# Step 3: .venv_juno doesn't exist - need to create it
|
|
138
|
+
log_warning "Virtual environment not found: $VENV_DIR"
|
|
139
|
+
log_info "Running install_requirements.sh to create virtual environment..."
|
|
140
|
+
|
|
141
|
+
# Check if install_requirements.sh exists
|
|
142
|
+
if [ ! -f "$INSTALL_SCRIPT" ]; then
|
|
143
|
+
log_error "Install script not found: $INSTALL_SCRIPT"
|
|
144
|
+
log_error "Please run 'juno-code init' to initialize the project"
|
|
145
|
+
return 1
|
|
146
|
+
fi
|
|
147
|
+
|
|
148
|
+
# Make sure the script is executable
|
|
149
|
+
chmod +x "$INSTALL_SCRIPT"
|
|
150
|
+
|
|
151
|
+
# Run the install script
|
|
152
|
+
if bash "$INSTALL_SCRIPT"; then
|
|
153
|
+
log_success "Python environment setup completed successfully"
|
|
154
|
+
|
|
155
|
+
# After install, activate the venv if it was created
|
|
156
|
+
if [ -d "$VENV_DIR" ]; then
|
|
157
|
+
if activate_venv "$VENV_DIR"; then
|
|
158
|
+
return 0
|
|
159
|
+
fi
|
|
160
|
+
fi
|
|
161
|
+
|
|
162
|
+
return 0
|
|
163
|
+
else
|
|
164
|
+
log_error "Failed to run install_requirements.sh"
|
|
165
|
+
log_error "Please check the error messages above"
|
|
166
|
+
return 1
|
|
167
|
+
fi
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
# Get the directory where this script is located
|
|
171
|
+
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
172
|
+
|
|
173
|
+
# Navigate to project root (parent of scripts directory)
|
|
174
|
+
PROJECT_ROOT="$( cd "$SCRIPT_DIR/../../../.." && pwd )"
|
|
175
|
+
|
|
176
|
+
# Change to project root
|
|
177
|
+
cd "$PROJECT_ROOT"
|
|
178
|
+
|
|
179
|
+
# Arrays to store normalized arguments (declared at script level for proper handling)
|
|
180
|
+
declare -a NORMALIZED_GLOBAL_FLAGS=()
|
|
181
|
+
declare -a NORMALIZED_COMMAND_ARGS=()
|
|
182
|
+
|
|
183
|
+
# Normalize argument order for juno-kanban
|
|
184
|
+
# juno-kanban requires global flags BEFORE the command, but users often
|
|
185
|
+
# write them after (e.g., "list -f json --raw" instead of "-f json --raw list")
|
|
186
|
+
# This function reorders arguments so global flags come first.
|
|
187
|
+
# Results are stored in NORMALIZED_GLOBAL_FLAGS and NORMALIZED_COMMAND_ARGS arrays.
|
|
188
|
+
normalize_arguments() {
|
|
189
|
+
# Reset arrays
|
|
190
|
+
NORMALIZED_GLOBAL_FLAGS=()
|
|
191
|
+
NORMALIZED_COMMAND_ARGS=()
|
|
192
|
+
local found_command=false
|
|
193
|
+
|
|
194
|
+
# Known subcommands
|
|
195
|
+
local commands="create search get show update archive mark list merge"
|
|
196
|
+
|
|
197
|
+
while [[ $# -gt 0 ]]; do
|
|
198
|
+
case $1 in
|
|
199
|
+
# Global flags that take a value
|
|
200
|
+
-f|--format|-c|--config)
|
|
201
|
+
if [[ -n "${2:-}" ]]; then
|
|
202
|
+
NORMALIZED_GLOBAL_FLAGS+=("$1" "$2")
|
|
203
|
+
shift 2
|
|
204
|
+
else
|
|
205
|
+
NORMALIZED_GLOBAL_FLAGS+=("$1")
|
|
206
|
+
shift
|
|
207
|
+
fi
|
|
208
|
+
;;
|
|
209
|
+
# Global flags that don't take a value
|
|
210
|
+
-p|--pretty|--raw|-v|--verbose|-h|--help|--version)
|
|
211
|
+
NORMALIZED_GLOBAL_FLAGS+=("$1")
|
|
212
|
+
shift
|
|
213
|
+
;;
|
|
214
|
+
# Check if this is a known command
|
|
215
|
+
*)
|
|
216
|
+
# Check if this argument is a known command
|
|
217
|
+
local is_command=false
|
|
218
|
+
for cmd in $commands; do
|
|
219
|
+
if [[ "$1" == "$cmd" ]]; then
|
|
220
|
+
is_command=true
|
|
221
|
+
found_command=true
|
|
222
|
+
break
|
|
223
|
+
fi
|
|
224
|
+
done
|
|
225
|
+
|
|
226
|
+
# If we found a command, everything from here goes to command_args
|
|
227
|
+
if $is_command || $found_command; then
|
|
228
|
+
NORMALIZED_COMMAND_ARGS+=("$1")
|
|
229
|
+
found_command=true
|
|
230
|
+
else
|
|
231
|
+
# Before finding a command, treat as command arg
|
|
232
|
+
NORMALIZED_COMMAND_ARGS+=("$1")
|
|
233
|
+
fi
|
|
234
|
+
shift
|
|
235
|
+
;;
|
|
236
|
+
esac
|
|
237
|
+
done
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
# Main kanban logic
|
|
241
|
+
main() {
|
|
242
|
+
log_info "=== juno-kanban Wrapper ==="
|
|
243
|
+
|
|
244
|
+
# Ensure Python environment is ready
|
|
245
|
+
if ! ensure_python_environment; then
|
|
246
|
+
log_error "Failed to setup Python environment"
|
|
247
|
+
exit 1
|
|
248
|
+
fi
|
|
249
|
+
|
|
250
|
+
log_success "Python environment ready!"
|
|
251
|
+
|
|
252
|
+
# Normalize argument order (global flags before command)
|
|
253
|
+
# This allows users to write "list -f json --raw" which gets reordered to "-f json --raw list"
|
|
254
|
+
normalize_arguments "$@"
|
|
255
|
+
|
|
256
|
+
if [ "${JUNO_DEBUG:-false}" = "true" ]; then
|
|
257
|
+
echo "[DEBUG] Original args: $*" >&2
|
|
258
|
+
echo "[DEBUG] Normalized global flags: ${NORMALIZED_GLOBAL_FLAGS[*]:-<none>}" >&2
|
|
259
|
+
echo "[DEBUG] Normalized command args: ${NORMALIZED_COMMAND_ARGS[*]:-<none>}" >&2
|
|
260
|
+
fi
|
|
261
|
+
|
|
262
|
+
# Execute juno-kanban with normalized arguments from project root
|
|
263
|
+
# Build the command properly preserving argument quoting
|
|
264
|
+
log_info "Executing juno-kanban with normalized arguments"
|
|
265
|
+
|
|
266
|
+
# Execute with proper array expansion to preserve quoting
|
|
267
|
+
# Use ${arr[@]+"${arr[@]}"} pattern to handle empty arrays with set -u
|
|
268
|
+
#
|
|
269
|
+
# Stdin handling:
|
|
270
|
+
# Detect the type of stdin to determine whether to pass it through or redirect from /dev/null:
|
|
271
|
+
# - 'p' (pipe): Pass through - user is piping data (e.g., echo "..." | kanban.sh create)
|
|
272
|
+
# - '-' (regular file): Pass through - user is using heredoc (kanban.sh create << 'EOF')
|
|
273
|
+
# - 'c' (character device) or other: Redirect from /dev/null to prevent hanging
|
|
274
|
+
# when called from tools that don't provide stdin (Issue #42, #60)
|
|
275
|
+
#
|
|
276
|
+
# The first character of `ls -la /dev/fd/0` indicates the file type:
|
|
277
|
+
# p = pipe, - = regular file, c = character device, l = symlink, etc.
|
|
278
|
+
local stdin_type
|
|
279
|
+
stdin_type=$(ls -la /dev/fd/0 2>/dev/null | cut -c1)
|
|
280
|
+
|
|
281
|
+
if [[ "$stdin_type" == "p" || "$stdin_type" == "-" ]]; then
|
|
282
|
+
# stdin is a pipe or regular file (heredoc) - pass it through
|
|
283
|
+
juno-kanban ${NORMALIZED_GLOBAL_FLAGS[@]+"${NORMALIZED_GLOBAL_FLAGS[@]}"} \
|
|
284
|
+
${NORMALIZED_COMMAND_ARGS[@]+"${NORMALIZED_COMMAND_ARGS[@]}"}
|
|
285
|
+
else
|
|
286
|
+
# stdin is a character device or unknown - redirect from /dev/null to prevent hanging
|
|
287
|
+
juno-kanban ${NORMALIZED_GLOBAL_FLAGS[@]+"${NORMALIZED_GLOBAL_FLAGS[@]}"} \
|
|
288
|
+
${NORMALIZED_COMMAND_ARGS[@]+"${NORMALIZED_COMMAND_ARGS[@]}"} < /dev/null
|
|
289
|
+
fi
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
# Run main function with all arguments
|
|
293
|
+
main "$@"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: understand-project
|
|
3
|
+
description: Understand current project and create/update specs under @.juno_task/specs/* , it allows you understand dependencies. and prepare for implementation. Use when user explicitly ask you, or when asking for understand the project, first see how it works and then do [main task] with respect to [constraints]
|
|
4
|
+
argument-hint: [Main Task] [Constraints] [Ultimate Goal]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Main Task
|
|
10
|
+
$0
|
|
11
|
+
|
|
12
|
+
### Task 1
|
|
13
|
+
First task is to study @.juno_task/plan.md (it may be incorrect) and is to use up to 500 subagents to study existing project
|
|
14
|
+
and study what is needed to achieve the main task.
|
|
15
|
+
From that create/update a @.juno_task/plan.md which is a bullet point list sorted in priority of the items which have yet to be implemeneted. Think extra hard.
|
|
16
|
+
Study @.juno_task/plan.md to determine starting point for research and keep it up to date with items considered complete/incomplete using subagents.
|
|
17
|
+
|
|
18
|
+
### Task 2
|
|
19
|
+
Second Task is to understand the task, create a spec for process to follow, plan to execute, scripts to create, virtual enviroment that we need, things that we need to be aware of, how to test the scripts and follow progress.
|
|
20
|
+
Think hard and plan/create spec for every step of this task
|
|
21
|
+
and for each part create a seperate .md file under @.juno_task/specs/*
|
|
22
|
+
|
|
23
|
+
## ULTIMATE Goal
|
|
24
|
+
We want to achieve the main Task with respect to the Constraints section
|
|
25
|
+
Consider missing steps and plan. If the step is missing then author the specification at @.juno_task/specs/FILENAME.md (do NOT assume that it does not exist, search before creating). The naming of the module should be GenZ named and not conflict with another module name. If you create a new step then document the plan to implement in @.juno_task/plan.md
|
|
26
|
+
|
|
27
|
+
### @.juno_task/specs/ file format.
|
|
28
|
+
- github flavored markdown
|
|
29
|
+
- GenZ module names and without conflict to another module name.
|
|
30
|
+
- Start with Priority in Codebase, Example: P0-core-module.md
|
|
31
|
+
- the goal is when we run `ls` command in the specs folder we could understand what are the cornerstone of the project with one glance.
|
|
32
|
+
|
|
33
|
+
### Constraints
|
|
34
|
+
|
|
35
|
+
$1
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
$ARGUMENTS
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ralph-loop
|
|
3
|
+
description: should only get executed with explicit user request.
|
|
4
|
+
---
|
|
5
|
+
0a. study [references/implement.md](references/implement.md).
|
|
6
|
+
|
|
7
|
+
0b. When you discover a syntax, logic, UI, User Flow Error or bug. Immediately update tasks.md with your findings using a subagent. When the issue is resolved, update tasks.md and remove the item using a subagent.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
999. Important: When authoring documentation capture the why tests and the backing implementation is important.
|
|
11
|
+
|
|
12
|
+
9999. Important: We want single sources of truth, no migrations/adapters. If tests unrelated to your work fail then it's your job to resolve these tests as part of the increment of change.
|
|
13
|
+
|
|
14
|
+
999999. As soon as there are no build or test errors create a git tag. If there are no git tags start at 0.0.0 and increment patch by 1 for example 0.0.1 if 0.0.0 does not exist.
|
|
15
|
+
|
|
16
|
+
999999999. You may add extra logging if required to be able to debug the issues.
|
|
17
|
+
|
|
18
|
+
9999999999. ALWAYS KEEP Tasks up to date with your learnings using a subagent. Especially after wrapping up/finishing your turn.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
99999999999. When you learn something new about how to run the app or examples make sure you update @AGENTS.md using a subagent but keep it brief. For example if you run commands multiple times before learning the correct command then that file should be updated.
|
|
23
|
+
|
|
24
|
+
999999999999. IMPORTANT when you discover a bug resolve it using subagents even if it is unrelated to the current piece of work after documenting it in Tasks
|
|
25
|
+
|
|
26
|
+
9999999999999999999. Keep @AGENTS.md up to date with information on how to build the app and your learnings to optimize the build/test loop using a subagent.
|
|
27
|
+
|
|
28
|
+
999999999999999999999. For any bugs you notice, it's important to resolve them or document them in Tasks to be resolved using a subagent.
|
|
29
|
+
|
|
30
|
+
99999999999999999999999. When authoring the missing features you may author multiple standard libraries at once using up to 1000 parallel subagents
|
|
31
|
+
|
|
32
|
+
99999999999999999999999999. When Tasks, AGENTS.md becomes large periodically clean out the items that are completed from the file using a subagent.
|
|
33
|
+
Large AGENTS.md reduce the performance.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
9999999999999999999999999999. DO NOT IMPLEMENT PLACEHOLDER OR SIMPLE IMPLEMENTATIONS. WE WANT FULL IMPLEMENTATIONS. DO IT OR I WILL YELL AT YOU
|
|
38
|
+
|
|
39
|
+
9999999999999999999999999999999. SUPER IMPORTANT DO NOT IGNORE. DO NOT PLACE STATUS REPORT UPDATES INTO @AGENTS.md
|
|
40
|
+
|
|
41
|
+
99999999999999999999999999999999. After reveiwing Feedback, if you find an open issue, you need to update previously handled issues status as well. If user reporting a bug, that earlier on reported on the Tasks or @AGENTS.md as resolved. You should update it to reflect that the issue is not resolved.
|
|
42
|
+
it would be ok to include past reasoning and root causing to the open issue, You should mention. <PREVIOUS_AGENT_ATTEMP> Tag and describe the approach already taken, so the agent knows 1.the issue is still open,2. past approaches to resolve it, what it was, and know that it has failed.
|
|
43
|
+
Tasks , USER_FEEDBACK and @AGENTS.md should repesent truth. User Open Issue is a high level of truth. so you need to reflect it on the files.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
### Check once
|
|
2
|
+
|
|
3
|
+
Perform these check once, to make sure about the git logic. There is no need to keep running this on every execution.
|
|
4
|
+
|
|
5
|
+
**Detection & Creation Logic**:
|
|
6
|
+
- Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
git rev-parse --git-dir 2>/dev/null
|
|
10
|
+
```
|
|
11
|
+
- Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
|
|
12
|
+
- Check if .eslintrc* or eslint.config.* exists → create/verify .eslintignore
|
|
13
|
+
- Check if .prettierrc* exists → create/verify .prettierignore
|
|
14
|
+
- Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
|
|
15
|
+
- Check if terraform files (*.tf) exist → create/verify .terraformignore
|
|
16
|
+
- Check if .helmignore needed (helm charts present) → create/verify .helmignore
|
|
17
|
+
|
|
18
|
+
**If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
|
|
19
|
+
**If ignore file missing**: Create with full pattern set for detected technology
|
|
20
|
+
|