Skip to content

Commit 5372aac

Browse files
committed
ctx update
1 parent 368a650 commit 5372aac

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

CLAUDE.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Guidance for Claude Code when working with this repository.
1212

1313
```bash
1414
cargo build # Build debug binary
15-
cargo test # Run all tests (106 tests)
15+
cargo test # Run all tests (127 tests)
1616
cargo clippy # Lint (must pass with no warnings)
1717
cargo fmt # Format code
1818
cargo run -- <command> # Run with args
@@ -28,6 +28,7 @@ cargo run -- <command> # Run with args
2828
| `status` | Show progress bar from IMPLEMENTATION_PLAN.md ||
2929
| `archive` | Save spec/plan to `.ralphctl/archive/<timestamp>/`, reset to blank | `--force` |
3030
| `clean` | Remove ralph loop files | `--force` |
31+
| `update` | Install latest version from GitHub ||
3132

3233
## Dependencies
3334

@@ -39,6 +40,9 @@ cargo run -- <command> # Run with args
3940
| `reqwest` | HTTP client for GitHub template fetching |
4041
| `regex` | Checkbox pattern matching |
4142
| `dirs` | XDG-compliant cache directory resolution |
43+
| `chrono` | Timestamp generation for archives |
44+
| `ctrlc` | Graceful Ctrl+C handling |
45+
| `nix` | Unix signal handling |
4246

4347
## Architecture
4448

@@ -62,9 +66,12 @@ cargo run -- <command> # Run with args
6266

6367
**Template caching** (`templates.rs`): Network-first strategy—fetch from GitHub, cache locally, fall back to cache on failure. Cache: `~/.cache/ralphctl/templates/` (Linux) or `~/Library/Caches/ralphctl/templates/` (macOS).
6468

65-
**Magic strings** (`run.rs`): Loop termination signals in Claude output:
66-
- `[[RALPH:DONE]]` — All tasks complete
67-
- `[[RALPH:BLOCKED:<reason>]]` — Cannot proceed, requires human intervention
69+
**Magic strings** (`run.rs`): Loop control signals in Claude output:
70+
- `[[RALPH:CONTINUE]]` — Task completed, more tasks remain; loop continues automatically
71+
- `[[RALPH:DONE]]` — All tasks complete; exit successfully
72+
- `[[RALPH:BLOCKED:<reason>]]` — Cannot proceed; exit with code 3 for human intervention
73+
74+
Detection order: BLOCKED checked first, then CONTINUE/DONE (first match wins).
6875

6976
### Exit Codes
7077

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@ A CLI tool for managing Ralph Loop workflows—autonomous development sessions d
44

55
## Installation
66

7-
### Cargo Install (compile from source)
7+
Install as a binary compiled from source:
88

99
```bash
1010
cargo install --git https://github.com/wcygan/ralphctl
1111
```
1212

1313
### Prerequisites
1414

15-
Requires the `claude` CLI to be installed and available in PATH.
15+
Requires the `claude` CLI to be installed and available in PATH. You must be authenticated with Claude.
16+
17+
## Quickstart
18+
19+
These 3 self-contained commands get you started:
20+
21+
```bash
22+
ralphctl init
23+
ralphctl interview
24+
ralphctl run
25+
```
26+
27+
They will setup the necessary structure, create context in the correct format, and [run the loop](https://github.com/wcygan/ralphctl/blob/368a650db9ab6c9385cec19ac94074744f0669ec/src/main.rs#L372).
1628

1729
## Workflow
1830

@@ -144,6 +156,16 @@ ralphctl clean [--force]
144156

145157
Removes SPEC.md, IMPLEMENTATION_PLAN.md, PROMPT.md, and ralph.log.
146158

159+
### `ralphctl update`
160+
161+
Install the latest version of ralphctl from GitHub.
162+
163+
```bash
164+
ralphctl update
165+
```
166+
167+
Runs `cargo install --git https://github.com/wcygan/ralphctl` to fetch and compile the latest release.
168+
147169
## How It Works
148170

149171
The Ralph Loop is an autonomous development workflow:
@@ -163,6 +185,7 @@ Each iteration starts with clean context. This eliminates "context rot"—the de
163185

164186
The loop detects these signals in Claude's output:
165187

188+
- `[[RALPH:CONTINUE]]` — Task completed, more tasks remain; loop continues automatically
166189
- `[[RALPH:DONE]]` — All tasks complete, exit successfully
167190
- `[[RALPH:BLOCKED:<reason>]]` — Cannot proceed, requires human intervention
168191

0 commit comments

Comments
 (0)