opencode-ralph-loop-cli 0.1.0

Scaffolder CLI for OpenCode Ralph Loop plugin — one command setup
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
# opencode-ralph-loop-cli — Full Documentation Context

> This file aggregates documentation for LLM context windows.
> Generated from: README.md, docs/HOW_TO_USE.md, docs/COOKBOOK.md, INTEGRATIONS.md (AI Agent section)

---

# === SECTION: README.md ===

# opencode-ralph-loop-cli

> "One command scaffolds the complete OpenCode Ralph Loop plugin setup."

## What is it?
- Generates the complete `.opencode/` structure in a single deterministic command
- Embeds six canonical template files as static bytes — zero network calls at runtime
- Verifies idempotency via SHA-256: unchanged files are never overwritten
- Supports JSON and NDJSON output for agent-driven pipelines
- Tracks installed files via `.manifest.json` for clean removal via `uninstall`
- Diagnoses environment dependencies via the `doctor` subcommand

## Why?
- Go from zero to a working Ralph Loop in under 10 seconds on any platform
- Deterministic output guarantees identical bytes on every run and every machine
- Machine-readable JSON contract parses cleanly with `jq` without extra configuration
- Conflict detection prevents accidental data loss before `--force` is required

## Superpowers for AI Agents

| Agent | Integration Type | Min Version |
|-------|-----------------|-------------|
| Claude Code | Native CLI subprocess | latest |
| Codex (OpenAI) | Shell tool call | latest |
| Gemini CLI | Shell tool call | latest |
| Opencode | Native plugin host | latest |
| Cursor | Terminal tool | latest |
| Windsurf | Terminal tool | latest |
| VS Code Copilot | Task runner | latest |
| GitHub Copilot | Shell tool call | latest |
| Google Antigravity | Shell tool call | latest |
| Zed AI | Terminal tool | latest |
| Aider | Shell command | latest |
| Jules | Shell tool call | latest |
| Kilo Code | Shell tool call | latest |
| Roo Code | Shell tool call | latest |
| Cline | Shell tool call | latest |
| Continue | Shell tool call | latest |
| Factory AI | Shell tool call | latest |
| Augment Code | Shell tool call | latest |
| Minimax AI | Shell tool call | latest |
| Z.ai | Shell tool call | latest |
| JetBrains AI Assistant | Terminal tool | latest |

- Deterministic stdout enables agents to parse output reliably without heuristics
- Typed exit codes allow agents to branch on conflict, drift, or I/O errors precisely
- JSON contract (`--output json`) provides a stable schema consumable by any agent
- Zero runtime dependencies eliminate environment setup friction for agent workflows
- Idempotency guarantees safe re-execution inside loops and retry pipelines
- Single cross-platform binary removes interpreter or runtime requirements

## Quick Start

```bash
cargo install opencode-ralph-loop-cli
opencode-ralph-loop-cli init
cd .opencode && bun install
```

## Commands

### init
- `--path <DIR>` target directory, default is current working directory
- `--force` overwrite files that differ from the embedded templates
- `--dry-run` simulate without writing anything to disk
- `--plugin-version <VER>` override the embedded `@opencode-ai/plugin` version
- `--no-package-json` skip `package.json` generation
- `--no-gitignore` skip `.gitignore` generation
- `--no-manifest` skip `.manifest.json` generation
- `--output <FORMAT>` output format: `text`, `json`, `ndjson`, `quiet`

### check
- `--path <DIR>` directory to audit against embedded templates
- `--strict` fail at the first drift detected (exit code 5)
- `--exit-zero` force exit code 0 regardless of drift found
- `--output <FORMAT>` output format: `text`, `json`, `ndjson`, `quiet`

### uninstall
- `--path <DIR>` target directory to remove scaffold from
- `--dry-run` simulate removal without deleting any files
- `--force` proceed even if `.manifest.json` is missing
- `--keep-state` preserve `ralph-loop.local.md` during removal

### list
- Lists all six embedded templates with SHA-256 hash and byte count

### doctor
- Checks `bun`, `node`, and `opencode` presence in PATH
- Reports manifest validity and per-file integrity against embedded hashes

### completions
- `completions <shell>` generates completion script for bash, zsh, fish, powershell, or elvish

## Environment Variables

| Variable | Description | Default |
|---|---|---|
| `OPENCODE_RALPH_LOOP_CLI_OUTPUT` | Default output format | `text` |
| `OPENCODE_RALPH_LOOP_CLI_FORCE` | Enable force mode | unset |
| `OPENCODE_RALPH_LOOP_CLI_PLUGIN_VERSION` | Override plugin version | `1.4.7` |
| `OPENCODE_RALPH_LOOP_CLI_CONFIG` | Path to alternative config file | XDG default |
| `NO_COLOR` | Disable ANSI colors (community standard) | unset |
| `RUST_LOG` | Tracing log filter for verbose diagnostics | unset |

## Exit Codes

| Code | Meaning |
|---|---|
| `0` | Success |
| `1` | Generic runtime error |
| `2` | Invalid CLI argument or usage |
| `3` | File conflict without `--force` |
| `4` | I/O error or permission denied |
| `5` | Drift detected in `--strict` mode |
| `6` | Manifest missing or corrupted |
| `7` | Config file parse error |
| `130` | Interrupted by SIGINT |

## Integration Patterns
- Inspect only drifted files: `opencode-ralph-loop-cli check --output json | jq '.files[] | select(.action != "skipped")'`
- Fail CI on any drift: `opencode-ralph-loop-cli check --strict --output quiet`
- Automate in GitHub Actions: add `opencode-ralph-loop-cli check --strict` as a workflow step after checkout
- Use in Makefile: `init: opencode-ralph-loop-cli init --dry-run && opencode-ralph-loop-cli init`
- Force reinit in reset scripts: `opencode-ralph-loop-cli uninstall --force && opencode-ralph-loop-cli init --force`
- Stream NDJSON events to a log aggregator: `opencode-ralph-loop-cli init --output ndjson | tee init.log`

## Troubleshooting

### Conflict without --force (exit 3)
- A file in `.opencode/` was modified since the last `init`
- Run `opencode-ralph-loop-cli check` to inspect which files differ
- Use `--force` to overwrite with the canonical template content

### Manifest missing or corrupted (exit 6)
- `.opencode/.manifest.json` is absent or contains invalid JSON
- Run `opencode-ralph-loop-cli init` to regenerate the manifest
- Use `opencode-ralph-loop-cli uninstall --force` to skip the manifest check

### I/O error or permission denied (exit 4)
- The target directory does not exist or lacks write permission
- Create the directory first, then retry
- Verify with `opencode-ralph-loop-cli init --path <DIR> --dry-run`

### doctor reports bun not found
- Install Bun from `bun.sh` and confirm it is in your PATH
- Alternatively use `node` and `npm install` inside `.opencode/`

### JSON output contains unexpected text
- Use `--output json` explicitly and validate with `jq '.'`
- Confirm `--verbose` is NOT set — verbose output goes to stderr only

---

# === SECTION: docs/HOW_TO_USE.md ===

# How to Use opencode-ralph-loop-cli

> Follow this guide to have a working OpenCode Ralph Loop setup in under 60 seconds.

## Prerequisites
### Requirements — What You Need Before Starting
- Rust 1.85 or later installed via rustup
- `bun` or `node` available in your PATH for the plugin runtime
- `opencode` binary available (optional for scaffolding, required for running)

## Core Commands
### init — Generate .opencode/ Structure
- Generates six canonical templates in `.opencode/` in one command
- Use `--dry-run` to preview all actions before writing any files
- Use `--force` to overwrite files that differ from the embedded templates
- Use `--output json` to get structured output for automated pipelines
- Use `--plugin-version <VER>` to pin a specific `@opencode-ai/plugin` version

```bash
opencode-ralph-loop-cli init --path /my/project
opencode-ralph-loop-cli init --dry-run
opencode-ralph-loop-cli init --force --output json
```

### check — Detect Configuration Drift
- Compares installed files against embedded templates using SHA-256
- Exit code 0 means all files match the canonical templates
- Exit code 5 means drift detected when using `--strict` mode
- Use `--output json` to get per-file drift details for pipeline automation

```bash
opencode-ralph-loop-cli check
opencode-ralph-loop-cli check --strict
opencode-ralph-loop-cli check --output json --exit-zero | jq '.files[] | select(.action == "modified")'
```

### list — Show Embedded Templates
- Lists all six embedded templates with their SHA-256 hashes and byte sizes
- Useful to verify which version of each template is bundled in the installed binary

```bash
opencode-ralph-loop-cli list
```

### doctor — Diagnose Environment
- Checks `bun`, `node`, and `opencode` presence in PATH
- Reports manifest validity and per-file integrity
- Use `--output json` for structured output in CI health checks

```bash
opencode-ralph-loop-cli doctor
opencode-ralph-loop-cli doctor --output json
```

### uninstall — Remove Scaffold Cleanly
- Removes only manifest-tracked files, preserving untracked files
- Use `--dry-run` to preview which files would be removed
- Use `--keep-state` to preserve `ralph-loop.local.md` during removal

```bash
opencode-ralph-loop-cli uninstall --dry-run
opencode-ralph-loop-cli uninstall --keep-state
```

### completions — Shell Autocompletion
- Generates completion scripts for bash, zsh, fish, powershell, elvish
- Source the script in your shell profile for permanent autocompletion

```bash
opencode-ralph-loop-cli completions bash >> ~/.bashrc
opencode-ralph-loop-cli completions zsh >> ~/.zshrc
```

## Advanced Patterns
### Pattern 1 — Safe Init Workflow with Dry Run
```bash
opencode-ralph-loop-cli init --dry-run
opencode-ralph-loop-cli init
```

### Pattern 2 — Continuous Integration Drift Detection with JSON
```bash
opencode-ralph-loop-cli check --output json --exit-zero \
  | jq '.files[] | select(.action != "skipped")'
```

### Pattern 3 — Force Overwrite of Modified Templates
```bash
opencode-ralph-loop-cli init --force --output json | jq '.summary'
```

### Pattern 4 — Strict Mode for CI Fail-Fast
```bash
opencode-ralph-loop-cli check --strict || echo "Drift detected, aborting CI"
```

### Pattern 5 — NDJSON Streaming for Log Ingestion
```bash
opencode-ralph-loop-cli check --output ndjson | tee drift-report.ndjson
```

## Integration with AI Agents
### Agents — Claude Code and Codex Examples
- Claude Code can invoke the CLI via Bash tool subprocess
- Codex and other agents invoke via shell commands in their execution environment
- Use `--output json` for structured output that agents can parse reliably

```bash
# Claude Code example (Bash tool)
opencode-ralph-loop-cli check --output json --exit-zero
# Parse with: | jq '.files[] | select(.action == "modified") | .path'

# CI environment (GitHub Actions)
opencode-ralph-loop-cli check --strict
```

## Common Errors
### Error — Exit Code 3 (Conflict without --force)
- Cause: a file in `.opencode/` was modified since last `init`
- Solution: run `opencode-ralph-loop-cli check` to see which files differ, then use `--force`

### Error — Exit Code 4 (I/O error)
- Cause: target directory does not exist or has no write permission
- Solution: create the target directory first, verify permissions

### Error — Exit Code 5 (Drift in strict mode)
- Cause: `--strict` flag exits at first drifted file
- Solution: run without `--strict` for full report, then decide whether to force

### Error — Exit Code 6 (Manifest missing)
- Cause: `.opencode/.manifest.json` is absent or corrupted
- Solution: run `opencode-ralph-loop-cli init` to regenerate the manifest

---

# === SECTION: docs/COOKBOOK.md ===

# Cookbook — opencode-ralph-loop-cli

> "Practical recipes for every workflow, from CI pipelines to AI agent orchestration."

## Recipe Index
- Recipe 1 — How to scaffold .opencode/ in a new project
- Recipe 2 — How to detect configuration drift in CI
- Recipe 3 — How to force-overwrite modified templates
- Recipe 4 — How to simulate init without writing files
- Recipe 5 — How to use JSON output in shell scripts
- Recipe 6 — How to pipe check output to jq for automation
- Recipe 7 — How to uninstall cleanly while preserving local state
- Recipe 8 — How to run doctor to verify environment readiness
- Recipe 9 — How to generate shell completions for zsh
- Recipe 10 — How to override the plugin version on init
- Recipe 11 — How to use init in Docker without bun
- Recipe 12 — How to check files with strict mode for CI fail-fast
- Recipe 13 — How to list all embedded templates and their hashes
- Recipe 14 — How to use NDJSON output for streaming log ingestion
- Recipe 15 — How to integrate with a Makefile for project automation

### Recipe 1 — How to scaffold .opencode/ in a new project
#### Problem
- Starting a new project requires consistent AI agent configuration
- Manually copying templates leads to drift and inconsistency
#### Solution
```bash
opencode-ralph-loop-cli init
```
#### Explanation
- Detects the current directory as the project root automatically
- Creates `.opencode/` with `plugins/` and `commands/` subdirectories
- Embeds `ralph.ts`, `ralph-loop.md`, `cancel-ralph.md`, and `ralph-help.md`
- Exits with code 0 on success, 4 on I/O failure, 6 on manifest error
#### Variants
- `opencode-ralph-loop-cli init --output json` — emit structured JSON result
- `opencode-ralph-loop-cli init --dry-run` — preview actions without writing files

### Recipe 2 — How to detect configuration drift in CI
#### Problem
- Templates evolve and local copies fall out of sync with upstream
- Silent drift breaks AI agent behavior without obvious error messages
#### Solution
```bash
opencode-ralph-loop-cli check
```
#### Explanation
- Compares each local template against the embedded canonical version
- Reports files that differ, are missing, or have unexpected content
- Exits with code 0 when all files match, non-zero when drift is detected
- Works without network access — all comparisons are against embedded bytes
#### Variants
- `opencode-ralph-loop-cli check --output json` — machine-readable drift report
- `opencode-ralph-loop-cli check --strict` — exit 5 on any drift, ideal for fail-fast

### Recipe 3 — How to force-overwrite modified templates
#### Solution
```bash
opencode-ralph-loop-cli init --force
```
#### Explanation
- Overwrites all existing template files with embedded canonical versions
- Does not delete files that are not managed by the tool
- Use `--dry-run` first to preview what will be overwritten

### Recipe 4 — How to simulate init without writing files
#### Solution
```bash
opencode-ralph-loop-cli init --dry-run
```
#### Explanation
- Performs all validation and planning steps without touching the filesystem
- Exits with the same codes that a real run would produce
- Combine with `--output json` for structured preview output

### Recipe 5 — How to use JSON output in shell scripts
#### Solution
```bash
result=$(opencode-ralph-loop-cli check --output json)
status=$(echo "$result" | jaq -r '.status')
if [ "$status" = "ok" ]; then
  echo "Templates are in sync"
else
  echo "Drift detected"
fi
```
#### Explanation
- Pass `--output json` to any command to receive machine-readable output
- The top-level `.status` field is always `"ok"` or `"error"` for easy branching
- All commands support `--output json` consistently across subcommands

### Recipe 6 — How to pipe check output to jq for automation
#### Solution
```bash
opencode-ralph-loop-cli check --output json \
  | jaq '.files[] | select(.status != "ok") | .path'
```
#### Explanation
- The `.files` array contains one entry per managed template file
- Each entry has `.path`, `.status`, and `.hash` fields
- Filter with `jaq` to select only drifted or missing files

### Recipe 7 — How to uninstall cleanly while preserving local state
#### Solution
```bash
opencode-ralph-loop-cli uninstall
```
#### Explanation
- Removes only the files and directories that were created by `init`
- Preserves any files added manually after the initial scaffold
- Exits with code 0 on success, 4 on I/O failure

### Recipe 8 — How to run doctor to verify environment readiness
#### Solution
```bash
opencode-ralph-loop-cli doctor
```
#### Explanation
- Checks that all required runtime tools are installed and on `PATH`
- Verifies `bun` version meets the minimum required for plugin installation
- Exits with code 0 when all checks pass, 1 when any check fails

### Recipe 9 — How to generate shell completions for zsh
#### Solution
```bash
opencode-ralph-loop-cli completions zsh > ~/.zsh/completions/_opencode-ralph-loop-cli
source ~/.zshrc
```
#### Explanation
- Emits a zsh completion script to stdout for redirection
- Regenerate the file after upgrading to pick up new flags
- Completions cover all subcommands, flags, and output format values

### Recipe 10 — How to override the plugin version on init
#### Solution
```bash
opencode-ralph-loop-cli init --plugin-version 0.1.0
```
#### Explanation
- Replaces the default embedded version string in `package.json`
- Use exact version strings following semantic versioning format
- Exits with code 6 when the version string is malformed

### Recipe 11 — How to use init in Docker without bun
#### Solution
```dockerfile
FROM rust:1.85-alpine AS builder
RUN cargo install opencode-ralph-loop-cli
RUN opencode-ralph-loop-cli init --skip-install
```
#### Explanation
- Pass `--skip-install` to scaffold templates without running `bun install`
- Run `bun install` in a separate stage or at container startup time

### Recipe 12 — How to check files with strict mode for CI fail-fast
#### Solution
```bash
opencode-ralph-loop-cli check --strict
```
#### Explanation
- Exits with code 5 on the first drift detected instead of continuing
- Add to pre-commit hooks or CI gate steps for immediate feedback
- Faster than full check when the goal is simply pass or fail

### Recipe 13 — How to list all embedded templates and their hashes
#### Solution
```bash
opencode-ralph-loop-cli list
```
#### Explanation
- Prints each managed template path with its embedded SHA-256 hash
- No filesystem access required — hashes are computed at compile time

### Recipe 14 — How to use NDJSON output for streaming log ingestion
#### Solution
```bash
opencode-ralph-loop-cli check --output ndjson | vector --config vector.toml
```
#### Explanation
- Each event is emitted as a single JSON object on its own line
- Compatible with Loki, Fluentd, Vector, and any NDJSON-compatible tool
- No buffering occurs — each file result is emitted as it is processed

### Recipe 15 — How to integrate with a Makefile for project automation
#### Solution
```makefile
.PHONY: setup check-drift reset-templates clean-ai

setup:
	opencode-ralph-loop-cli init

check-drift:
	opencode-ralph-loop-cli check --strict

reset-templates:
	opencode-ralph-loop-cli init --force

clean-ai:
	opencode-ralph-loop-cli uninstall
```
#### Explanation
- Define `setup` to scaffold `.opencode/` on first clone
- Define `check-drift` to enforce template integrity in CI pipelines
- Add `check-drift` as a dependency of your `test` or `ci` target

---

# === SECTION: INTEGRATIONS.md ===

# Integrations — opencode-ralph-loop-cli (AI Agent Integrations)

> "From shell scripts to Kubernetes CronJobs — integrations for every workflow."

## AI Agent Integrations

### Claude Code
- Add `opencode-ralph-loop-cli init` to the project setup section of `CLAUDE.md`
- Use `check --strict` as a pre-session gate to verify template integrity
- Exit code 0 confirms the environment is ready for AI-assisted development

```bash
# CLAUDE.md setup step
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
```

### Codex (OpenAI)
- Add `init` to the Codex workspace bootstrap script that runs before sessions
- Use `check --output json` to feed drift status into Codex context

```bash
# Codex bootstrap
opencode-ralph-loop-cli init --skip-install
opencode-ralph-loop-cli check --output json
```

### Gemini CLI
- Add `init` to the `.gemini/` project setup hook that runs on workspace open
- The `--output quiet` flag keeps Gemini CLI context clean of tool output

```bash
# Gemini setup hook
opencode-ralph-loop-cli init --skip-install
opencode-ralph-loop-cli check --strict --output quiet
```

### Opencode
- Place `check --strict` in the Opencode pre-session hook configuration
- Opencode reads exit codes natively — use 0 for pass, non-zero for block

```bash
# Opencode pre-session hook
opencode-ralph-loop-cli check --strict
```

### Cursor
- Add `opencode-ralph-loop-cli init` to the setup instructions in `.cursorrules`
- Use `--output json` so Cursor can parse drift status programmatically

```
# .cursorrules setup block
Run: opencode-ralph-loop-cli init
Verify: opencode-ralph-loop-cli check --strict --output quiet
```

### Windsurf
- Add `init` to the Windsurf workspace onboarding rules file
- Windsurf agent reads exit codes — non-zero blocks session continuation

```bash
# Windsurf onboarding
opencode-ralph-loop-cli doctor && opencode-ralph-loop-cli init
```

### VS Code Copilot
- Add `init` to `.vscode/tasks.json` as a `preLaunchTask` for the workspace

```json
{
  "label": "Setup AI Templates",
  "type": "shell",
  "command": "opencode-ralph-loop-cli init",
  "group": "build",
  "presentation": { "reveal": "always" }
}
```

### GitHub Copilot
- Add `check --strict` to the CI workflow before any Copilot-assisted steps

```yaml
- name: Verify AI Templates
  run: opencode-ralph-loop-cli check --strict
```

### GitHub Actions Full Workflow

```yaml
name: Verify AI Templates

on:
  push:
    branches: [main]
  pull_request:

jobs:
  template-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: 1.85

      - name: Install opencode-ralph-loop-cli
        run: cargo install opencode-ralph-loop-cli

      - name: Verify doctor
        run: opencode-ralph-loop-cli doctor

      - name: Check template drift
        run: opencode-ralph-loop-cli check --strict --output json
```

### Aider
- Add `init` call to the `.aider.conf.yml` startup commands section

```yaml
# .aider.conf.yml
auto-commits: false
message: |
  Run: opencode-ralph-loop-cli init --skip-install
```

### Cline
- Add `init` to the `.clinerules` setup block that runs on workspace open
- Cline reads exit codes to determine whether to proceed with AI tasks

```
# .clinerules setup block
Run: opencode-ralph-loop-cli init --skip-install
Gate: opencode-ralph-loop-cli check --strict --output quiet
```

### Continue
- Add `init` to the Continue context provider setup script
- Continue can use JSON output fields to conditionally include context snippets

```bash
# Continue setup
opencode-ralph-loop-cli init
opencode-ralph-loop-cli list --output json
```

### Docker Multi-Stage Build

```dockerfile
FROM rust:1.85-slim AS tool-builder
RUN cargo install opencode-ralph-loop-cli

FROM node:20-slim AS template-setup
COPY --from=tool-builder /usr/local/cargo/bin/opencode-ralph-loop-cli /usr/local/bin/
WORKDIR /app
COPY . .
RUN opencode-ralph-loop-cli init
RUN cd .opencode && npm install

FROM node:20-slim AS final
WORKDIR /app
COPY --from=template-setup /app .
```