rralph 0.1.0 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 879adb96bb31b3269ef4f60a200a8689cf4283f694f2aca5e0f9a95c24bef7ff
4
- data.tar.gz: 909224ae6b25857bff64c7c789d66a16025c74601ef397d9f40c8d066707ba94
3
+ metadata.gz: ebba7ca8a7b704f97c3dbc0df60c6df68d29542641fb91c9251574af1d79ecc5
4
+ data.tar.gz: 1846e26ecb26b0eab7f0df14330d2f1e8b279da785101e2b885e02d9b99d27e4
5
5
  SHA512:
6
- metadata.gz: 6411d979dddce3cd5de21d510d5af092c4aa65f0d6af5371c96628320b3658d1b2f5a70495e861c15f77044fc1486fe1de29eb9fb0383a6a6637fe61c4cb11e8
7
- data.tar.gz: '07018c95c8ec9029893b4548ede3e5ef1a1e601bc1243c665ba053c882fdca83ac7523c71df6005c179a85af3f775ef42f9d6a4b997ea6490dc4753918f0748b'
6
+ metadata.gz: 7e586e53ebba5ab3886388929d731eecfff9cdf74d8684a20ec7949fa249192cae9634d93e68b25cf96dedb2830b0471517e043cca0b28579b3a4794d8ebd756
7
+ data.tar.gz: f3ea37403f48d24dd1b506079450f7ed05e33c5462f6319d3735a7e4688223078020d624bc5f05c8fa8fb51389de646647a058996f460e7c52f470da18237d68
data/README.md CHANGED
@@ -48,6 +48,25 @@ Requirements:
48
48
  Test: 0→EVEN, 7→ODD, -4→EVEN, abc→error, no arg→error
49
49
  ```
50
50
 
51
+ After running `rralph start` you will get a `todo.md` generated for you like:
52
+
53
+ ```
54
+ # Todo List
55
+
56
+ - [ ] Create `odd_even.sh` file with bash shebang
57
+ - [ ] Add input validation to check if argument is provided
58
+ - [ ] Add regex validation for integer input (`^-?[0-9]+$`)
59
+ - [ ] Implement even/odd check using `(( ))` arithmetic and `%` operator
60
+ - [ ] Print "IS EVEN" or "IS ODD" based on result
61
+ - [ ] Add error handling with exit code 1 for invalid inputs
62
+ - [ ] Make script executable with `chmod +x`
63
+ - [ ] Test with input `0` (expect "IS EVEN")
64
+ - [ ] Test with input `7` (expect "IS ODD")
65
+ - [ ] Test with input `-4` (expect "IS EVEN")
66
+ - [ ] Test with input `abc` (expect error, exit 1)
67
+ - [ ] Test with no argument (expect error, exit 1)
68
+ ```
69
+
51
70
  ### Basic Usage
52
71
 
53
72
  Run `rralph` with default settings:
@@ -65,16 +84,33 @@ rralph --max-failures 2 --watch
65
84
  ### Command-Line Options
66
85
 
67
86
  ```
68
- rralph run [OPTIONS]
87
+ rralph help
88
+ Commands:
89
+ rralph help [COMMAND] # Describe available commands or one specific command
90
+ rralph start # Run the rralph orchestrator
91
+ rralph stats # Show progress statistics
92
+ rralph tree # Print a tree of all available commands
93
+ rralph version # Show rralph version
94
+
95
+ ➜ rralph help start
96
+ Usage:
97
+ rralph start
69
98
 
70
99
  Options:
71
- -m, --max-failures N Maximum allowed failures before stopping (default: 3)
72
- -a, --ai-command "CMD" AI command to invoke (default: "qwen-code -y -s")
73
- -w, --watch Run in continuous loop until completion or max failures
74
- -p, --plan-path PATH Path to plan.md file (default: "plan.md")
75
- -l, --learnings-path PATH Path to learnings.md file (default: "learnings.md")
76
- -t, --todo-path PATH Path to todo.md file (default: "todo.md")
77
- -h, --help Show help message
100
+ -m, [--max-failures=N] # Maximum allowed failures before stopping
101
+ # Default: 3
102
+ -a, [--ai-command=AI_COMMAND] # AI command to invoke
103
+ # Default: qwen-code -y -s
104
+ -w, [--watch], [--no-watch], [--skip-watch] # Run in continuous loop until completion or max failures
105
+ # Default: false
106
+ -p, [--plan-path=PLAN_PATH] # Path to plan.md file
107
+ # Default: plan.md
108
+ -l, [--learnings-path=LEARNINGS_PATH] # Path to learnings.md file
109
+ # Default: learnings.md
110
+ -t, [--todo-path=TODO_PATH] # Path to todo.md file
111
+ # Default: todo.md
112
+ -s, [--skip-commit], [--no-skip-commit] # Skip git commits between tasks
113
+ # Default: false
78
114
  ```
79
115
 
80
116
  ### Examples
@@ -88,13 +124,19 @@ rralph
88
124
  Run continuously until all tasks are done or max failures reached:
89
125
 
90
126
  ```bash
91
- rralph --watch --max-failures 5
127
+ rralph start --watch --max-failures 5
92
128
  ```
93
129
 
94
130
  Use a custom AI command:
95
131
 
96
132
  ```bash
97
- rralph --ai-command "claude --prompt"
133
+ rralph start --ai-command "claude --prompt"
134
+ ```
135
+
136
+ Skip git commits between tasks (files are updated but not committed):
137
+
138
+ ```bash
139
+ rralph start --skip-commit
98
140
  ```
99
141
 
100
142
  View progress statistics:
data/lib/rralph/cli.rb CHANGED
@@ -34,6 +34,11 @@ module Rralph
34
34
  default: "todo.md",
35
35
  aliases: "-t",
36
36
  desc: "Path to todo.md file"
37
+ method_option :skip_commit,
38
+ type: :boolean,
39
+ default: false,
40
+ aliases: "-s",
41
+ desc: "Skip git commits between tasks"
37
42
 
38
43
  def start
39
44
  runner = Runner.new(
@@ -42,7 +47,8 @@ module Rralph
42
47
  watch: options[:watch],
43
48
  plan_path: options[:plan_path],
44
49
  learnings_path: options[:learnings_path],
45
- todo_path: options[:todo_path]
50
+ todo_path: options[:todo_path],
51
+ skip_commit: options[:skip_commit]
46
52
  )
47
53
 
48
54
  runner.run
data/lib/rralph/runner.rb CHANGED
@@ -8,7 +8,8 @@ module Rralph
8
8
  watch: false,
9
9
  plan_path: "plan.md",
10
10
  learnings_path: "learnings.md",
11
- todo_path: "todo.md"
11
+ todo_path: "todo.md",
12
+ skip_commit: false
12
13
  )
13
14
  @max_failures = max_failures
14
15
  @ai_command = ai_command
@@ -16,6 +17,7 @@ module Rralph
16
17
  @plan_path = plan_path
17
18
  @learnings_path = learnings_path
18
19
  @todo_path = todo_path
20
+ @skip_commit = skip_commit
19
21
 
20
22
  @cycle_count = 0
21
23
  @failure_count = 0
@@ -115,11 +117,15 @@ module Rralph
115
117
  new_learnings = @parser.extract_learnings(response)
116
118
  @file_updater.append_learnings(new_learnings) if new_learnings.any?
117
119
 
118
- commit_message = "rralph: completed task and updated artifacts [cycle #{@cycle_count}]"
119
- sha = @git.commit_changes(commit_message)
120
+ if @skip_commit
121
+ log("⏭️ [Cycle #{@cycle_count}] Skipping commit (skip_commit enabled)")
122
+ else
123
+ commit_message = "rralph: completed task and updated artifacts [cycle #{@cycle_count}]"
124
+ sha = @git.commit_changes(commit_message)
120
125
 
121
- if sha
122
- log(" Git commit: #{sha}")
126
+ if sha
127
+ log(" Git commit: #{sha}")
128
+ end
123
129
  end
124
130
 
125
131
  true
@@ -182,9 +188,9 @@ module Rralph
182
188
 
183
189
  timestamp = Time.now.strftime("%Y%m%d_%H%M%S")
184
190
  filename = "#{logs_dir}/cycle_#{@cycle_count}_#{timestamp}.md"
185
-
191
+
186
192
  # Extract just the current task for the header
187
- task_match = prompt.match(/YOUR CURRENT TASK.*?>\s*(.+?)\n/)
193
+ task_match = prompt.match(/YOUR CURRENT TASK.*?\n>\s*(.+?)\n/)
188
194
  task_text = task_match ? task_match[1].strip : "Unknown"
189
195
 
190
196
  content = <<~LOG
@@ -233,11 +239,15 @@ module Rralph
233
239
 
234
240
  File.write(@todo_path, todo_content)
235
241
 
236
- commit_message = "rralph: generated todo from plan.md"
237
- sha = @git.commit_changes(commit_message)
242
+ if @skip_commit
243
+ log("⏭️ Generated #{todo_items.size} tasks (skip_commit enabled, no commit)")
244
+ else
245
+ commit_message = "rralph: generated todo from plan.md"
246
+ sha = @git.commit_changes(commit_message)
238
247
 
239
- if sha
240
- log("✅ Generated #{todo_items.size} tasks. Git commit: #{sha}")
248
+ if sha
249
+ log("✅ Generated #{todo_items.size} tasks. Git commit: #{sha}")
250
+ end
241
251
  end
242
252
  else
243
253
  log("❌ Could not parse tasks from AI response")
data/lib/rralph.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Rralph
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.2"
3
3
 
4
4
  class Error < StandardError; end
5
5
  class FileNotFound < Error; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rralph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - rralph