Skip to content

Commit d65c7ad

Browse files
authored
Merge pull request #9 from reoring/docs/restructure-readme
docs: restructure README (EN/JA) for readability
2 parents 6702cd0 + 75629ad commit d65c7ad

2 files changed

Lines changed: 162 additions & 132 deletions

File tree

‎README.ja.md‎

Lines changed: 83 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,26 @@
11
# Roboppi
22

3-
[English](README.md) | 日本語
3+
<p align="center">
4+
<img src="assets/roboppi-hero.png" alt="Roboppi" width="900" />
5+
</p>
46

5-
Roboppi(ろぼっぴ)は、エージェント(worker)の実行を安全に制御するための「実行制御ランタイム」です。
7+
[English](README.md) | 日本語
68

7-
Roboppi 自身が「エージェントとして仕事をする」ことは目的にしません。外部の worker CLI(OpenCode / Claude Code / Codex CLI / シェル)に重い作業(編集/コマンド/テスト)を委譲し、Roboppi は安全の不変条件(止める/制限する/観測する/隔離する)を強制します。
9+
Roboppi(ろぼっぴ)は、エージェント(worker)の実行を安全に制御するための「実行制御ランタイム」です。Roboppi 自身がエージェントとして仕事をするのではなく、外部の worker CLI(OpenCode / Claude Code / Codex CLI / シェル)に重い作業を委譲し、安全の不変条件(止める・制限する・観測する・隔離する)を強制します。
810

911
注意: 主な CLI/バイナリ名は `roboppi` です。
1012
- 環境変数/状態ディレクトリ: `ROBOPPI_` / `.roboppi-loop/` を使います。
1113

12-
## Roboppiでできること(Capabilities)
13-
14-
実行制御(Core ランタイム):
15-
16-
- ハードな予算制約: timeout / max attempts / concurrency / RPS /(任意で)cost cap
17-
- エンドツーエンドのキャンセル: Job -> Permit -> Worker を AbortSignal で伝播(best-effort で SIGTERM -> SIGKILL)
18-
- 失敗の封じ込め: circuit breaker + backpressure(過負荷時の reject/defer/degrade)
19-
- プロセス隔離: heavy work を別プロセスに委譲して blast radius を限定
20-
- 監査性: 構造化ログ + アーティファクト(stdout/stderr の要約、diff/patch、実行コマンド、時間など)
21-
22-
ワークフロー(YAML オーケストレーション):
23-
24-
- 複数ステップの DAG 実行(`depends_on`)と並列度制御(`concurrency`)
25-
- `context/` を使ったファイルベースの成果物受け渡し(`outputs` / `inputs`)
26-
- 失敗ポリシー(`retry` / `continue` / `abort`)と自動リトライ
27-
- `completion_check` + `max_iterations` による「完了するまでループ」
28-
- (任意)ループ収束ガード: 停滞検知 + スコープ/差分予算(`allowed_paths`, `max_changed_files`)
29-
30-
自動化(Daemon モード):
31-
32-
- interval/cron/fswatch/webhook/command のイベントで workflow を常駐実行
33-
- evaluate/analyze ゲート(条件成立時だけ LLM/worker を走らせる)
34-
- supervised 実行: Supervisor -> Core -> Worker のプロセスツリーを IPC で維持(socket transport あり)
35-
36-
リポジトリ安全(git workspace):
14+
## 特徴
3715

38-
- base branch の決定を固定化し、起動時 SHA を記録(追跡/再現性)
39-
- Branch Lock: 実行中の repo/branch ドリフトを step 実行前に fail-fast
40-
- Protected branch guard: `main` などへの直接編集をデフォルトでブロック(明示 override が必要)
41-
42-
拡張性:
43-
44-
- `WorkerAdapter` インタフェースで worker を追加
45-
- agent catalog(`agents.yaml`)で `step.agent` による再利用プロファイル
46-
47-
スケジューリング(参照実装):
48-
49-
- 優先度付きジョブキュー(interactive vs batch)
50-
- idempotency key による重複制御(`coalesce` / `latest-wins` / `reject`)
51-
- リトライポリシー(指数バックオフ + jitter)と DLQ
52-
- Core を起動/監視する Supervisor(クラッシュ/ハング対策)
53-
54-
## アーキテクチャ(概要)
55-
56-
Roboppi は 3 層構造として設計されています。
57-
58-
```
59-
Supervisor / Runner(policy, 親プロセス)
60-
-> Core(mechanism, 子プロセス)
61-
-> Worker プロセス(外部 CLI)
62-
```
63-
64-
- Core が安全の不変条件(permits, budgets, cancellation, cutoffs)を保持します。
65-
- policy(順序、リトライ、重複制御など)は Supervisor/Runner 側に寄せて差し替え可能にします。
66-
- Core と Supervisor は JSON Lines IPC で通信します。
67-
68-
設計資料:
69-
70-
- `docs/design.md`
71-
- `docs/guide/architecture.md`
16+
- ハードな予算制約 -- timeout / max attempts / concurrency / RPS / cost cap
17+
- エンドツーエンドのキャンセル -- Job -> Permit -> Worker を AbortSignal で伝播
18+
- 失敗の封じ込め -- circuit breaker + backpressure による過負荷制御
19+
- プロセス隔離 -- heavy work を別プロセスに委譲して blast radius を限定
20+
- YAML ワークフロー -- DAG 実行、並列度制御、ループ完了判定、失敗ポリシー
21+
- Daemon モード -- interval/cron/fswatch/webhook で workflow を常駐実行
22+
- ブランチ安全 -- base branch 固定、Branch Lock、保護ブランチガード
23+
- 構造化ログとアーティファクト -- stdout/stderr 要約、diff/patch、実行コマンド、時間
7224

7325
## インストール
7426

@@ -201,7 +153,72 @@ ROBOPPI_ROOT="$ROBOPPI_ROOT" bun run --cwd "$ROBOPPI_ROOT" src/workflow/run.ts \
201153
- workflow は target workspace 内に `.roboppi-loop/` と `context/` を作ります(通常は gitignore 推奨)。
202154
- PR 作成は `.roboppi-loop/enable_pr` による opt-in です。
203155

204-
## Workflow YAML の最小例
156+
## アーキテクチャ(概要)
157+
158+
Roboppi は 3 層構造として設計されています。
159+
160+
```
161+
Supervisor / Runner(policy, 親プロセス)
162+
-> Core(mechanism, 子プロセス)
163+
-> Worker プロセス(外部 CLI)
164+
```
165+
166+
- Core が安全の不変条件(permits, budgets, cancellation, cutoffs)を保持します。
167+
- policy(順序、リトライ、重複制御など)は Supervisor/Runner 側に寄せて差し替え可能にします。
168+
- Core と Supervisor は JSON Lines IPC で通信します。
169+
170+
設計資料:
171+
172+
- `docs/design.md`
173+
- `docs/guide/architecture.md`
174+
175+
---
176+
177+
## リファレンス
178+
179+
### 機能の詳細
180+
181+
**実行制御(Core ランタイム):**
182+
183+
- ハードな予算制約: timeout / max attempts / concurrency / RPS /(任意で)cost cap
184+
- エンドツーエンドのキャンセル: Job -> Permit -> Worker を AbortSignal で伝播(best-effort で SIGTERM -> SIGKILL)
185+
- 失敗の封じ込め: circuit breaker + backpressure(過負荷時の reject/defer/degrade)
186+
- プロセス隔離: heavy work を別プロセスに委譲して blast radius を限定
187+
- 監査性: 構造化ログ + アーティファクト(stdout/stderr の要約、diff/patch、実行コマンド、時間など)
188+
189+
**ワークフロー(YAML オーケストレーション):**
190+
191+
- 複数ステップの DAG 実行(`depends_on`)と並列度制御(`concurrency`)
192+
- `context/` を使ったファイルベースの成果物受け渡し(`outputs` / `inputs`)
193+
- 失敗ポリシー(`retry` / `continue` / `abort`)と自動リトライ
194+
- `completion_check` + `max_iterations` による「完了するまでループ」
195+
- (任意)ループ収束ガード: 停滞検知 + スコープ/差分予算(`allowed_paths`, `max_changed_files`)
196+
197+
**自動化(Daemon モード):**
198+
199+
- interval/cron/fswatch/webhook/command のイベントで workflow を常駐実行
200+
- evaluate/analyze ゲート(条件成立時だけ LLM/worker を走らせる)
201+
- supervised 実行: Supervisor -> Core -> Worker のプロセスツリーを IPC で維持(socket transport あり)
202+
203+
**リポジトリ安全(git workspace):**
204+
205+
- base branch の決定を固定化し、起動時 SHA を記録(追跡/再現性)
206+
- Branch Lock: 実行中の repo/branch ドリフトを step 実行前に fail-fast
207+
- Protected branch guard: `main` などへの直接編集をデフォルトでブロック(明示 override が必要)
208+
209+
**拡張性:**
210+
211+
- `WorkerAdapter` インタフェースで worker を追加
212+
- agent catalog(`agents.yaml`)で `step.agent` による再利用プロファイル
213+
214+
**スケジューリング(参照実装):**
215+
216+
- 優先度付きジョブキュー(interactive vs batch)
217+
- idempotency key による重複制御(`coalesce` / `latest-wins` / `reject`)
218+
- リトライポリシー(指数バックオフ + jitter)と DLQ
219+
- Core を起動/監視する Supervisor(クラッシュ/ハング対策)
220+
221+
### Workflow YAML の最小例
205222

206223
```yaml
207224
name: build-test
@@ -228,7 +245,7 @@ steps:
228245

229246
詳細: `docs/guide/workflow.md`
230247

231-
## Agent Catalog(再利用できるエージェント定義)
248+
### Agent Catalog(再利用できるエージェント定義)
232249

233250
同じ worker/model/capabilities/base-instructions を繰り返す場合、外部 YAML(agent catalog)にまとめられます。
234251

@@ -258,7 +275,7 @@ steps:
258275
- `docs/guides/agents.md`
259276
- `docs/guides/agents.ja.md`
260277

261-
## ブランチ安全(git workspace)
278+
### ブランチ安全(git workspace)
262279

263280
git repo に対する workflow 実行向けに、base branch 解決 / Branch Lock / 保護ブランチガードを提供します。
264281

@@ -273,7 +290,7 @@ git repo に対する workflow 実行向けに、base branch 解決 / Branch Loc
273290
- `docs/guides/branch.md`
274291
- `docs/guides/branch.ja.md`
275292

276-
## Supervised IPC transport(supervised 実行)
293+
### Supervised IPC transport(supervised 実行)
277294

278295
supervised 実行では runner/daemon が Core 子プロセスを起動し、IPC 経由で step を委譲します。
279296

‎README.md‎

Lines changed: 79 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,73 +6,21 @@
66

77
English | [日本語](README.ja.md)
88

9-
Roboppi (ろぼっぴ, pronounced "roh-boh-pee") is an execution-control runtime for agentic workers.
10-
11-
It does not try to be "the agent". It enforces safety invariants around external worker CLIs (OpenCode / Claude Code / Codex CLI / plain shell), so your automation stops when it should, stays within budgets, and leaves a trail you can audit.
9+
Roboppi (ろぼっぴ, pronounced "roh-boh-pee") is an execution-control runtime for agentic workers. It does not try to be "the agent" — it enforces safety invariants around external worker CLIs (OpenCode / Claude Code / Codex CLI / plain shell), so your automation stops when it should, stays within budgets, and leaves a trail you can audit.
1210

1311
Note: the primary CLI/binary name is `roboppi`.
1412
- Env vars/state dirs: use `ROBOPPI_` / `.roboppi-loop/`.
1513

16-
## What Roboppi Can Do (Capabilities)
17-
18-
Execution control (Core runtime):
19-
20-
- Enforce hard budgets: timeouts, max attempts, concurrency, RPS, optional cost caps
21-
- End-to-end cancellation: Job -> Permit -> Worker via AbortSignal (best-effort SIGTERM -> SIGKILL)
22-
- Failure containment: circuit breakers + backpressure responses under overload
23-
- Process isolation: delegate heavy work to separate worker processes (limit blast radius)
24-
- Auditability: structured logs + artifacts (stdout/stderr summaries, diffs/patches, executed commands, timings)
25-
26-
Workflow orchestration (YAML):
27-
28-
- Run multi-step DAG workflows (`depends_on`) with optional parallelism (`concurrency`)
29-
- Pass files between steps with declared `outputs`/`inputs` via a `context/` directory
30-
- Automatic step retries and failure policy (`retry` / `continue` / `abort`)
31-
- Loop until complete with `completion_check` + `max_iterations`
32-
- Optional convergence guard for loops: stall detection + scope/diff budgets (`allowed_paths`, `max_changed_files`)
33-
34-
Automation (Daemon mode):
35-
36-
- Run workflows on interval/cron/fswatch/webhook/command events
37-
- Optional evaluate/analyze gates (run LLM work only when conditions are met)
38-
- Supervised execution: Supervisor -> Core -> Worker process tree via IPC (socket-based transport available)
39-
40-
Repo safety (git workspaces):
41-
42-
- Deterministic base branch resolution (records base commit SHA)
43-
- Branch Lock drift detection (fail-fast before a step runs)
44-
- Protected-branch guard to avoid direct edits on `main` (override must be explicit)
45-
46-
Extensibility:
47-
48-
- Add worker adapters behind a unified `WorkerAdapter` interface
49-
- Reusable agent profiles via agent catalogs (`agents.yaml`) referenced by `step.agent`
50-
51-
Scheduling (reference implementation):
52-
53-
- Prioritized job queue (interactive vs batch)
54-
- Deduplication via idempotency keys (`coalesce` / `latest-wins` / `reject`)
55-
- Retry policy (exponential backoff + jitter) + DLQ storage
56-
- Supervisor that launches/monitors the Core process (crash/hang handling)
57-
58-
## Architecture (High Level)
14+
## Features at a Glance
5915

60-
Roboppi is designed as a 3-layer system:
61-
62-
```
63-
Supervisor / Runner (policy, parent process)
64-
-> Core (mechanism, child process)
65-
-> Worker processes (external CLIs)
66-
```
67-
68-
- Core owns safety invariants (permits, budgets, cancellation, cutoffs).
69-
- Policy (ordering, retries, dedup strategy) stays swappable at the supervisor/runner level.
70-
- Core and supervisor communicate over JSON Lines IPC.
71-
72-
Design docs:
73-
74-
- `docs/design.md`
75-
- `docs/guide/architecture.md`
16+
- **Hard budget enforcement** — timeouts, max attempts, concurrency, RPS, cost caps
17+
- **End-to-end cancellation** — Job to Permit to Worker via AbortSignal (SIGTERM then SIGKILL)
18+
- **Failure containment** — circuit breakers and backpressure under overload
19+
- **Process isolation** — delegate heavy work to separate worker processes, limiting blast radius
20+
- **YAML workflow orchestration** — multi-step DAGs with parallelism, retries, and loop-until-complete
21+
- **Daemon mode** — trigger workflows on interval, cron, fswatch, webhook, or command events
22+
- **Branch safety** — base-branch resolution, drift detection, and protected-branch guards
23+
- **Extensible worker adapters** — unified interface for OpenCode, Claude Code, Codex CLI, and custom agents
7624

7725
## Install
7826

@@ -208,7 +156,72 @@ Notes:
208156
- The workflow writes state/artifacts under `.roboppi-loop/` and `context/` inside the target workspace (typically gitignored).
209157
- PR creation is opt-in via `.roboppi-loop/enable_pr`.
210158

211-
## Workflow YAML At A Glance
159+
## Architecture
160+
161+
Roboppi is designed as a 3-layer system:
162+
163+
```
164+
Supervisor / Runner (policy, parent process)
165+
-> Core (mechanism, child process)
166+
-> Worker processes (external CLIs)
167+
```
168+
169+
- Core owns safety invariants (permits, budgets, cancellation, cutoffs).
170+
- Policy (ordering, retries, dedup strategy) stays swappable at the supervisor/runner level.
171+
- Core and supervisor communicate over JSON Lines IPC.
172+
173+
Design docs:
174+
175+
- `docs/design.md`
176+
- `docs/guide/architecture.md`
177+
178+
---
179+
180+
## Reference
181+
182+
### Capabilities in Detail
183+
184+
**Execution control (Core runtime):**
185+
186+
- Enforce hard budgets: timeouts, max attempts, concurrency, RPS, optional cost caps
187+
- End-to-end cancellation: Job -> Permit -> Worker via AbortSignal (best-effort SIGTERM -> SIGKILL)
188+
- Failure containment: circuit breakers + backpressure responses under overload
189+
- Process isolation: delegate heavy work to separate worker processes (limit blast radius)
190+
- Auditability: structured logs + artifacts (stdout/stderr summaries, diffs/patches, executed commands, timings)
191+
192+
**Workflow orchestration (YAML):**
193+
194+
- Run multi-step DAG workflows (`depends_on`) with optional parallelism (`concurrency`)
195+
- Pass files between steps with declared `outputs`/`inputs` via a `context/` directory
196+
- Automatic step retries and failure policy (`retry` / `continue` / `abort`)
197+
- Loop until complete with `completion_check` + `max_iterations`
198+
- Optional convergence guard for loops: stall detection + scope/diff budgets (`allowed_paths`, `max_changed_files`)
199+
200+
**Automation (Daemon mode):**
201+
202+
- Run workflows on interval/cron/fswatch/webhook/command events
203+
- Optional evaluate/analyze gates (run LLM work only when conditions are met)
204+
- Supervised execution: Supervisor -> Core -> Worker process tree via IPC (socket-based transport available)
205+
206+
**Repo safety (git workspaces):**
207+
208+
- Deterministic base branch resolution (records base commit SHA)
209+
- Branch Lock drift detection (fail-fast before a step runs)
210+
- Protected-branch guard to avoid direct edits on `main` (override must be explicit)
211+
212+
**Extensibility:**
213+
214+
- Add worker adapters behind a unified `WorkerAdapter` interface
215+
- Reusable agent profiles via agent catalogs (`agents.yaml`) referenced by `step.agent`
216+
217+
**Scheduling (reference implementation):**
218+
219+
- Prioritized job queue (interactive vs batch)
220+
- Deduplication via idempotency keys (`coalesce` / `latest-wins` / `reject`)
221+
- Retry policy (exponential backoff + jitter) + DLQ storage
222+
- Supervisor that launches/monitors the Core process (crash/hang handling)
223+
224+
### Workflow YAML At A Glance
212225

213226
Minimal example:
214227

@@ -237,7 +250,7 @@ For loops:
237250

238251
See `docs/guide/workflow.md` for the full schema.
239252

240-
## Agent Catalogs (Reusable Agent Profiles)
253+
### Agent Catalogs (Reusable Agent Profiles)
241254

242255
If you repeat the same worker/model/capabilities/base-instructions across steps, define an agent catalog:
243256

@@ -267,7 +280,7 @@ Docs:
267280
- `docs/guides/agents.md`
268281
- `docs/guides/agents.ja.md`
269282

270-
## Branch Safety (Git Workspaces)
283+
### Branch Safety (Git Workspaces)
271284

272285
For workflows that operate on git repos, Roboppi provides base-branch resolution, Branch Lock drift detection, and protected-branch guards.
273286

@@ -282,7 +295,7 @@ Docs:
282295
- `docs/guides/branch.md`
283296
- `docs/guides/branch.ja.md`
284297

285-
## Supervised IPC Transport (For `--supervised`)
298+
### Supervised IPC Transport (For `--supervised`)
286299

287300
Workflows/daemon run supervised by default. In supervised mode, the runner starts a Core child process and delegates steps over IPC.
288301

0 commit comments

Comments
 (0)