Skip to content

Commit c84c00a

Browse files
committed
docs: update nullclaw executor scenario
1 parent f6dfd06 commit c84c00a

1 file changed

Lines changed: 43 additions & 4 deletions

File tree

nullclaw.md

Lines changed: 43 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,49 @@ curl -s -X POST -H "Content-Type: application/json" \
155155
"$BASE/tasks"
156156
```
157157

158-
## 3. Run one worker process per role
158+
## 3. Run role automation with nullclaw cron (Zig-native)
159159

160-
Each worker loop should:
160+
Use cron agent jobs when you want scheduled role execution without wrapping model calls in bash.
161+
162+
Requirements:
163+
164+
- `nullclaw` build that includes `cron add-agent` and `cron once-agent`
165+
- (at the moment, this is available in the implementation branch and then in the next merged release)
166+
167+
### 3.1 Example cron jobs by role
168+
169+
```bash
170+
cd /Users/igorsomov/Code/nullclaw
171+
172+
# Planner: refresh backlog every 15 minutes
173+
zig-out/bin/nullclaw cron add-agent "*/15 * * * *" \
174+
"Role: llm-planner. Review open tasks for Expense Tracker and propose next backlog updates with acceptance criteria." \
175+
--model "openrouter/anthropic/claude-sonnet-4"
176+
177+
# Reviewer: periodic quality pass
178+
zig-out/bin/nullclaw cron add-agent "*/20 * * * *" \
179+
"Role: llm-reviewer. Review recent completed feature work, verify tests/TDD quality, and list changes requested if needed." \
180+
--model "openrouter/anthropic/claude-opus-4"
181+
182+
# One-shot MVP scope generation
183+
zig-out/bin/nullclaw cron once-agent "30s" \
184+
"Role: llm-planner. Give me MVP Scope for Team Expense Tracker (API + SQLite + web UI) with feature breakdown and acceptance criteria." \
185+
--model "openrouter/anthropic/claude-sonnet-4"
186+
```
187+
188+
Inspect jobs:
189+
190+
```bash
191+
zig-out/bin/nullclaw cron list
192+
```
193+
194+
### 3.2 Tracker executor contract
195+
196+
For full `nullTracker` workflow execution, each role executor must still perform this API contract:
161197

162198
1. `POST /leases/claim` with its `agent_id` and `agent_role`.
163199
2. If `204`, sleep and retry.
164-
3. If `200`, run `nullclaw agent -m "<prompt>"` to produce output.
200+
3. If `200`, run the role prompt and generate output.
165201
4. `POST /runs/{id}/events` to stream progress.
166202
5. `POST /artifacts` to store result file URI.
167203
6. `POST /runs/{id}/transition` with a valid trigger from `GET /tasks/{task_id}` `available_transitions`.
@@ -293,7 +329,10 @@ For the Expense Tracker MVP, `llm-planner` can create tasks like:
293329

294330
Each feature task should include explicit acceptance criteria in `metadata`.
295331

296-
## 5. Minimal worker example (bash)
332+
## 5. Tracker Executor Bridge (bash, current practical adapter)
333+
334+
Use this when you want a complete end-to-end executor loop for `nullTracker` today.
335+
It bridges role claims/transitions and artifact writes through HTTP APIs.
297336

298337
```bash
299338
#!/usr/bin/env bash

0 commit comments

Comments
 (0)