Skip to content

Commit 7a39002

Browse files
authored
Merge pull request #23 from reoring/roboppi/loop-20260227-121443
feat(agents): expand resident workflows and telemetry
2 parents 8195d37 + d33e109 commit 7a39002

79 files changed

Lines changed: 6760 additions & 188 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@ The format is based on Keep a Changelog, and this project follows SemVer where p
1313
### Fixed
1414

1515

16+
## [0.1.10] - 2026-03-09
17+
18+
### Added
19+
20+
- Added `roboppi agents tasks supersede` and `roboppi agents status get|set` for file-backed workflow status summaries and task replacement flow.
21+
- Extended the agents workflow DSL with seed task `id`/`depends_on`/`tags`/`requires_plan_approval`, member `role`, and worker `defaultArgs`.
22+
- Added TUI Timeline/Raw/Usage tabs with structured LLM log summaries, agent runtime usage stats, and dormant-agent visibility.
23+
24+
### Changed
25+
26+
- Agent coordination now prunes stopped resident agents before reconcile, skips dormant members, restores mailbox body previews, and emits task-superseded activity events.
27+
- The Codex CLI adapter now normalizes legacy sandbox/approval flags and merges task/profile `defaultArgs` before dispatch.
28+
29+
### Fixed
30+
31+
- Clarified agent task claimability and dependency handling, including seeded dependency resolution and broader test coverage.
32+
- Added verification around supervised IPC capability detection, TUI state/runtime accounting, and prompt-byte tracking in worker costs.
33+
34+
1635
## [0.1.9] - 2026-03-06
1736

1837
### Added

‎docs/features/agents.md‎

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ Directory root:
146146
in_progress/
147147
completed/
148148
blocked/
149+
superseded/
149150
tmp/
150151
_events.jsonl
151152
locks/
@@ -286,8 +287,9 @@ Task transitions are represented by moving the file:
286287

287288
- `pending/<taskId>.json` -> `in_progress/<taskId>.json`
288289
- `in_progress/<taskId>.json` -> `completed/<taskId>.json`
290+
- `pending|in_progress|blocked/<taskId>.json` -> `superseded/<taskId>.json`
289291

290-
Blocked tasks can be stored in `blocked/` to make discovery fast.
292+
Blocked tasks can be stored in `blocked/` to make discovery fast, and stale coordination tasks can be moved to `superseded/` to preserve audit history without leaving them claimable.
291293

292294
### 4.4 Event logs
293295

@@ -308,6 +310,7 @@ audit. These logs MUST be safe by default.
308310
{ "ts": 1710000000000, "type": "task_added", "task_id": "...", "title": "..." }
309311
{ "ts": 1710000005000, "type": "task_claimed", "task_id": "...", "by": "researcher" }
310312
{ "ts": 1710000010000, "type": "task_completed", "task_id": "...", "by": "researcher" }
313+
{ "ts": 1710000015000, "type": "task_superseded", "task_id": "...", "by": "lead", "reason": "stale contract" }
311314
```
312315

313316
The full message body SHOULD NOT be copied into `_events.jsonl` unless explicitly
@@ -408,9 +411,10 @@ Add a `roboppi agents` CLI group:
408411
- `roboppi agents message ack --context <dir> --for <memberId> --message-id <uuid>`
409412

410413
- `roboppi agents tasks add --context <dir> --title ... --description ... [--depends-on ...]`
411-
- `roboppi agents tasks list --context <dir> [--status pending|in_progress|completed]`
414+
- `roboppi agents tasks list --context <dir> [--status pending|in_progress|completed|blocked|superseded]`
412415
- `roboppi agents tasks claim --context <dir> --task-id <uuid> --member <memberId>`
413416
- `roboppi agents tasks complete --context <dir> --task-id <uuid> --member <memberId> [--artifact <path>]`
417+
- `roboppi agents tasks supersede --context <dir> --task-id <uuid> --member <memberId> [--reason <text>] [--replacement-task-id <uuid>]`
414418

415419
Return values MUST be JSON so workers can parse them reliably.
416420

@@ -486,10 +490,10 @@ Implementation note:
486490
- Prefer `roboppi agents message ...` subcommands that accept structured JSON via
487491
stdin (`--json-stdin`) to avoid quoting errors.
488492

489-
### 6.3 Optional: MCP server (future)
493+
### 6.3 MCP server
490494

491-
For better ergonomics (no shell quoting, richer schemas), provide an MCP server
492-
`roboppi agents mcp` that exposes tools:
495+
For better ergonomics (no shell quoting, richer schemas), `roboppi agents mcp`
496+
exposes a stdio MCP server with tools:
493497

494498
- `agents_send_message`
495499
- `agents_broadcast`
@@ -499,6 +503,11 @@ For better ergonomics (no shell quoting, richer schemas), provide an MCP server
499503
- `agents_tasks_list`
500504
- `agents_tasks_claim`
501505
- `agents_tasks_complete`
506+
- `agents_tasks_supersede`
507+
- `agents_status_get`
508+
- `agents_status_set`
509+
- `agents_specialist_activate`
510+
- `agents_specialist_deactivate`
502511

503512
Teammate sessions (Claude Code) already load MCP servers as part of context.
504513
This aligns with the Claude agent teams note that teammates "load the same

‎docs/guides/agents.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,17 @@ roboppi agents tasks complete \
248248

249249
Artifact paths must be relative and must not contain `..` segments.
250250

251+
Supersede stale coordination work without pretending it succeeded:
252+
253+
```bash
254+
roboppi agents tasks supersede \
255+
--context "$ROBOPPI_AGENTS_CONTEXT_DIR" \
256+
--task-id "<uuid>" \
257+
--member lead \
258+
--reason "stale rerun contract" \
259+
--replacement-task-id "<new-uuid>"
260+
```
261+
251262
### Housekeeping
252263

253264
Requeue stale processing messages and stale in-progress tasks:

‎docs/spec/agents.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Out of scope for this document:
2424

2525
- multi-host agents support
2626
- nested agentss
27-
- MCP transport delivery (`roboppi agents mcp`) in v1
27+
- broader MCP coverage beyond the current `roboppi agents mcp` surface
2828

2929
## 1. Source Of Truth
3030

@@ -44,7 +44,7 @@ The following are treated as implemented baseline:
4444
- `init`
4545
- `members list`
4646
- `message send|broadcast|recv|ack`
47-
- `tasks add|list|claim|complete`
47+
- `tasks add|list|claim|complete|supersede`
4848
- `housekeep`
4949
- Metadata-only `_events.jsonl` emission for mailbox/tasks.
5050
- Capability wiring of `MAILBOX` / `TASKS` in workflow/daemon/type layers.

‎examples/README.ja.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ timeout 10s ./roboppi daemon examples/daemon/simple-cron.yaml --verbose
4242
- `examples/todo-loop.yaml`: 反復ループの最小パターン
4343
- `examples/agent-pr-loop.yaml`: 大きめのエージェントループ(デモは `examples/agent-pr-loop-demo/`)
4444
- `examples/appthrust-dashboard/workflow.yaml`: チームプロジェクト向けの本番ワークフロー(design -> todo -> implement -> validate)
45+
- `examples/kubernetes-operator-dev-loop/workflow.yaml`: Kubernetes operator / controller 開発向けの汎用的な長期 agents ループ
4546

4647
## daemon の例
4748

‎examples/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ timeout 10s ./roboppi daemon examples/daemon/simple-cron.yaml --verbose
4343
- `examples/subworkflow-loop.yaml`: subworkflow step + completion_check loop (see `examples/subworkflow-loop-child.yaml`)
4444
- `examples/agent-pr-loop.yaml`: larger multi-step agent loop (see demo under `examples/agent-pr-loop-demo/`)
4545
- `examples/appthrust-dashboard/workflow.yaml`: production workflow for a team project (design -> todo -> implement -> validate)
46+
- `examples/kubernetes-operator-dev-loop/workflow.yaml`: generic long-running agents loop for Kubernetes operator / controller development
4647

4748
## Daemon examples
4849

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Kubernetes Operator Dev Loop
2+
3+
This example is a generic long-running agents workflow for developing a
4+
Kubernetes operator or controller-based platform component.
5+
6+
It is derived from a real multi-agent development loop, but the repo-specific
7+
names and assumptions were removed so it can serve as a reusable example.
8+
9+
## What It Demonstrates
10+
11+
- A lead-driven implement -> review -> verify loop
12+
- Planner-owned living TODO, memory, issue index, and rerun contract state
13+
- Dormant specialist activation for:
14+
- manual verification
15+
- long-running E2E
16+
- Kubernetes debugging
17+
- spec clarification
18+
- provenance / rerun gatekeeping
19+
- loop and stall recovery
20+
- Completion checks that look at TODO state, blockers, and verification results
21+
22+
## Intended Workspace
23+
24+
Run it against a repository that already has some combination of:
25+
26+
- `request.md`
27+
- `implementation-plan.md` or an equivalent repo-local design/plan document
28+
- `ARCHITECTURE.md` or `docs/**`
29+
- controller / API / chart / test code
30+
31+
Typical fit:
32+
33+
- an operator repo with CRDs and controllers
34+
- a platform repo with Kubernetes reconciliation logic
35+
- a repo where local fast gates and separate cluster-backed validation both exist
36+
37+
## Run
38+
39+
```bash
40+
cd /home/reoring/project/roboppi
41+
bun run src/workflow/run.ts \
42+
examples/kubernetes-operator-dev-loop/workflow.yaml \
43+
--workspace /path/to/your/operator-repo \
44+
--verbose
45+
```
46+
47+
Or with the built binary:
48+
49+
```bash
50+
cd /home/reoring/project/roboppi
51+
./roboppi workflow \
52+
examples/kubernetes-operator-dev-loop/workflow.yaml \
53+
--workspace /path/to/your/operator-repo \
54+
--verbose
55+
```
56+
57+
## Notes
58+
59+
- The workflow loads the colocated `agents.yaml` automatically.
60+
- `context_dir` is relative to the target workspace, so state is written under
61+
`.roboppi-loop/operator-dev/` in that repo.
62+
- You will usually want to adapt:
63+
- the fast-gate commands in `workflow.yaml`
64+
- the repo-local plan filename
65+
- the dormant specialist policies in `agents.yaml`
66+
- the completion-check criteria

0 commit comments

Comments
 (0)