Skip to content

Commit 6dc44b6

Browse files
committed
docs: add --json-stream to commit, finish, and rebase patterns
Update all skill docs to reflect upstream v0.10.0 adding --json-stream support to commit, finish, and rebase commands: - SKILL.md: update finish/commit examples with --json-stream + background, expand safety rule #2 and Important note to cover all extended commands - non-interactive-patterns.md: add 'Background Commands — Extended Operations' section for commit/finish/rebase, move rebase out of 'Foreground Only', add autonomous rebase pattern, update JSON Output table - development-commands.md: add --json-stream flag to commit and rebase tables, update examples to use background mode - core-workflow.md: add --json-stream flag to finish table, update examples Refs #3
1 parent 98d5d69 commit 6dc44b6

4 files changed

Lines changed: 52 additions & 19 deletions

File tree

openclaw-skill/SKILL.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ For anything non-trivial, use the **plan → review → start → spin** workflo
105105

106106
5. **Finish:** Merge and clean up
107107
```bash
108-
bash pty:true command:"il finish --force --cleanup --no-browser --json"
108+
bash pty:true background:true command:"il finish --force --cleanup --no-browser --json --json-stream"
109+
# Monitor: process action:poll sessionId:XXX
109110
```
110111

111112
### Small Changes (single issue, quick fix)
@@ -130,7 +131,8 @@ bash pty:true command:"il list --json"
130131
### Commit with AI-generated message
131132

132133
```bash
133-
bash pty:true command:"il commit --no-review --json"
134+
bash pty:true background:true command:"il commit --no-review --json --json-stream"
135+
# Monitor: process action:poll sessionId:XXX
134136
```
135137

136138
## Ideation and Planning
@@ -145,7 +147,7 @@ bash pty:true background:true command:"il plan --yolo --print --json-stream"
145147

146148
`il plan` launches an autonomous AI planning session that reads the codebase and creates structured issues with dependencies. Always prefer this over manually creating issues.
147149

148-
**Important:** Both `plan` and `spin` should always be run in **background mode** (`background:true`) with `--print --json-stream`. These commands can run for several minutes (especially with Opus) as they analyze the codebase, and foreground timeouts will kill them. The `--json-stream` flag ensures incremental output is visible via `process action:poll`.
150+
**Important:** Commands that can run for extended periods — `plan`, `spin`, `commit`, `finish`, and `rebase`should be run in **background mode** (`background:true`) with `--json-stream` (and `--print` for plan/spin). The `--json-stream` flag streams JSONL incrementally so you can monitor progress via `process action:poll`. Without it, you get zero visibility until the command completes.
149151

150152
## References
151153

@@ -159,7 +161,7 @@ bash pty:true background:true command:"il plan --yolo --print --json-stream"
159161
## Safety Rules
160162

161163
1. **Always use `pty:true`** for every iloom command.
162-
2. **Use `background:true`** for commands that launch Claude: `start`, `spin`, `plan`.
164+
2. **Use `background:true`** for commands that launch Claude or run extended operations: `start`, `spin`, `plan`, `commit`, `finish`, `rebase`.
163165
3. **Never run `il finish` without `--force`** in autonomous mode — it will hang on confirmation prompts.
164166
4. **Always pass explicit flags** to avoid interactive prompts. See `{baseDir}/references/non-interactive-patterns.md` for the complete decision bypass map.
165167
5. **Use `--json`** when you need to parse command output programmatically.

openclaw-skill/references/core-workflow.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,18 +129,19 @@ Validate, commit, merge, and clean up a loom workspace.
129129
| `--no-browser` | boolean | `false` | Skip opening PR in browser |
130130
| `--cleanup` / `--no-cleanup` | boolean || Explicit cleanup decision (skips prompt) |
131131
| `--json` | boolean | `false` | Output result as JSON |
132+
| `--json-stream` | boolean | `false` | Stream JSONL progress output |
132133

133134
### Examples
134135

135136
```bash
136-
# Fully autonomous finish from within a loom directory
137-
bash pty:true command:"il finish --force --cleanup --no-browser --json"
137+
# Fully autonomous finish from within a loom directory (background recommended — can take 1-2+ min)
138+
bash pty:true background:true command:"il finish --force --cleanup --no-browser --json --json-stream"
138139

139140
# Dry run to preview what would happen
140141
bash pty:true command:"il finish --dry-run"
141142

142143
# Finish a specific issue
143-
bash pty:true command:"il finish 42 --force --cleanup --no-browser --json"
144+
bash pty:true background:true command:"il finish 42 --force --cleanup --no-browser --json --json-stream"
144145
```
145146

146147
### Interactive Prompts and Bypasses

openclaw-skill/references/development-commands.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ Commit all uncommitted files with issue reference trailer.
5454
| `--fixes` | boolean | `false` | Use "Fixes #N" trailer instead of "Refs #N" |
5555
| `--no-review` | boolean | `false` | Skip commit message review prompt |
5656
| `--json` | boolean | `false` | Output result as JSON (implies `--no-review`) |
57+
| `--json-stream` | boolean | `false` | Stream JSONL progress output |
5758
| `--wip-commit` | boolean | `false` | Quick WIP commit: skip validations and pre-commit hooks |
5859

5960
### Examples
6061

6162
```bash
62-
# Non-interactive commit with AI-generated message
63-
bash pty:true command:"il commit --no-review --json"
63+
# Non-interactive commit with AI-generated message (background recommended — Claude generates message)
64+
bash pty:true background:true command:"il commit --no-review --json --json-stream"
6465

6566
# Commit with custom message
6667
bash pty:true command:"il commit -m 'fix: resolve auth timeout' --json"
@@ -103,12 +104,13 @@ Rebase current loom branch on main with AI-assisted conflict resolution.
103104
|------|------|---------|-------------|
104105
| `-f, --force` | boolean | `false` | Force rebase even in edge cases |
105106
| `-n, --dry-run` | boolean | `false` | Simulate rebase without changes |
107+
| `--json-stream` | boolean | `false` | Stream JSONL progress output |
106108

107109
### Examples
108110

109111
```bash
110-
# Rebase with force (skip edge case checks)
111-
bash pty:true command:"il rebase --force"
112+
# Rebase with force and progress streaming (background recommended — Claude may resolve conflicts)
113+
bash pty:true background:true command:"il rebase --force --json-stream"
112114

113115
# Dry run
114116
bash pty:true command:"il rebase --dry-run"
@@ -119,7 +121,7 @@ bash pty:true command:"il rebase --dry-run"
119121
- Detects uncommitted changes and throws if found (commit first)
120122
- Claude assists with conflict resolution if conflicts arise
121123
- Post-rebase: installs dependencies and runs build (non-blocking)
122-
- No JSON output mode
124+
- Use `--json-stream` for incremental progress visibility
123125

124126
---
125127

openclaw-skill/references/non-interactive-patterns.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,28 @@ These commands launch Claude Code and run for extended periods. **Always run in
3636
- Without `--json-stream`, `--print` buffers ALL output until completion (no visibility into what Claude is doing)
3737
- These commands can easily run 3-10+ minutes with Opus analyzing a codebase — foreground timeouts will kill them
3838

39+
### Background Commands — Extended Operations
40+
41+
These commands use Claude for message generation, conflict resolution, or merge validation and support `--json-stream` for progress monitoring:
42+
43+
| Command | Recommended Invocation |
44+
|---------|----------------------|
45+
| `il commit` | `bash pty:true background:true command:"il commit --no-review --json --json-stream"` |
46+
| `il finish` | `bash pty:true background:true command:"il finish --force --cleanup --no-browser --json --json-stream"` |
47+
| `il rebase` | `bash pty:true background:true command:"il rebase --force --json-stream"` |
48+
49+
**Why `--json-stream` for these commands?**
50+
- `commit` uses Claude to generate commit messages — can take 10-30s
51+
- `finish` validates, commits, merges, and may trigger builds — can take 1-2+ minutes
52+
- `rebase` may invoke Claude for conflict resolution — duration is unpredictable
53+
3954
### Foreground Commands (no `background:true`)
4055

4156
These commands complete quickly and return structured output:
4257

4358
| Command | Recommended Invocation |
4459
|---------|----------------------|
4560
| `il list` | `bash pty:true command:"il list --json"` |
46-
| `il commit` | `bash pty:true command:"il commit --no-review --json"` |
47-
| `il finish` | `bash pty:true command:"il finish --force --cleanup --no-browser --json"` |
4861
| `il cleanup` | `bash pty:true command:"il cleanup --issue 42 --force --json"` |
4962
| `il build` | `bash pty:true command:"il build"` |
5063
| `il test` | `bash pty:true command:"il test"` |
@@ -61,7 +74,6 @@ These commands complete quickly and return structured output:
6174
| Command | Note |
6275
|---------|------|
6376
| `il init` | Interactive wizard, must run foreground. **Not recommended for AI agents** — use manual setup instead (see `{baseDir}/references/initialization.md`) |
64-
| `il rebase` | May need Claude for conflict resolution |
6577
| `il shell` | Opens interactive subshell |
6678

6779
---
@@ -134,13 +146,16 @@ bash pty:true background:true command:"il start <issue> --yolo --no-code --no-te
134146
### Full Autonomous Finish (merge and cleanup)
135147

136148
```bash
137-
bash pty:true command:"il finish --force --cleanup --no-browser --json"
149+
bash pty:true background:true command:"il finish --force --cleanup --no-browser --json --json-stream"
150+
# Monitor: process action:poll sessionId:XXX
138151
```
139152

140153
- `--force`: skip all confirmations
141154
- `--cleanup`: auto-cleanup worktree
142155
- `--no-browser`: don't open browser
143156
- `--json`: structured output
157+
- `--json-stream`: stream progress incrementally
158+
- `background:true`: finish can take 1-2+ minutes (commit, merge, build verification)
144159

145160
### Headless Planning
146161

@@ -158,11 +173,23 @@ bash pty:true background:true command:"il plan --yolo --print --json-stream"
158173
### Non-Interactive Commit
159174

160175
```bash
161-
bash pty:true command:"il commit --no-review --json"
176+
bash pty:true background:true command:"il commit --no-review --json --json-stream"
177+
# Monitor: process action:poll sessionId:XXX
162178
```
163179

164180
- `--no-review`: skip message review
165181
- `--json`: structured output (also implies `--no-review`)
182+
- `--json-stream`: stream progress (Claude generates commit message)
183+
184+
### Non-Interactive Rebase
185+
186+
```bash
187+
bash pty:true background:true command:"il rebase --force --json-stream"
188+
# Monitor: process action:poll sessionId:XXX
189+
```
190+
191+
- `--force`: force rebase even in edge cases
192+
- `--json-stream`: stream progress (Claude assists with conflict resolution if needed)
166193

167194
### Quick Cleanup
168195

@@ -182,17 +209,18 @@ Commands that support `--json` for machine-parseable output:
182209
| Command | JSON Flag | Notes |
183210
|---------|-----------|-------|
184211
| `il start` | `--json` | Returns workspace metadata |
185-
| `il finish` | `--json` | Returns operation results |
212+
| `il finish` | `--json`, `--json-stream` | Returns operation results. `--json-stream` for progress |
186213
| `il cleanup` | `--json` | Returns cleanup results |
187214
| `il list` | `--json` | Returns array of loom objects |
188-
| `il commit` | `--json` | Returns commit details (implies `--no-review`) |
215+
| `il commit` | `--json`, `--json-stream` | Returns commit details (implies `--no-review`). `--json-stream` for progress |
189216
| `il issues` | `--json` | Returns array of issues/PRs |
190217
| `il add-issue` | `--json` | Returns created issue |
191218
| `il enhance` | `--json` | Returns enhancement result |
192219
| `il summary` | `--json` | Returns summary text and metadata |
193220
| `il recap` | `--json` | Returns recap data |
194221
| `il dev-server` | `--json` | Returns server status |
195222
| `il projects` | `--json` | Returns project list |
223+
| `il rebase` | `--json-stream` | Stream progress during rebase |
196224
| `il plan` | `--json` | Returns planning result (requires `--print`) |
197225
| `il spin` | `--json` | Returns result (requires `--print`) |
198226

0 commit comments

Comments
 (0)