tools-cascade.md: simplify parallel example; clarify async consequence
This commit is contained in:
parent
f32f49c0a1
commit
a8f63d17ff
|
|
@ -11,13 +11,11 @@ Delegate mechanical subtasks to a cheaper/weaker model. Fire-and-forget: returns
|
|||
cascade: instruction="<fully self-contained task description>" [id="<optional-name>"]
|
||||
```
|
||||
|
||||
Parallel — use `{parallel: [...]}`:
|
||||
Parallel — issue multiple cascade calls in the same step; they execute concurrently:
|
||||
```
|
||||
execute_code: steps=[{parallel: [
|
||||
{code: "cascade 'Read /src/a.go and list all exported functions'"},
|
||||
{code: "cascade 'Read /src/b.go and list all exported functions'"},
|
||||
{code: "cascade 'Read /src/c.go and list all exported functions'"}
|
||||
]}]
|
||||
cascade 'Read /src/a.go and list all exported functions'
|
||||
cascade 'Read /src/b.go and list all exported functions'
|
||||
cascade 'Read /src/c.go and list all exported functions'
|
||||
```
|
||||
|
||||
**Returns** (KV, one per line):
|
||||
|
|
@ -41,6 +39,7 @@ You will receive this as your next queued turn. Correlate via the `[from=...]` h
|
|||
|
||||
- **Instructions must be fully self-contained.** The worker has zero context beyond what you put in the instruction string. Include file paths, expected formats, relevant snippets — everything it needs.
|
||||
- **Never wait for results.** After calling cascade, continue your own work or end your turn. You will be woken when results arrive.
|
||||
- **Results arrive asynchronously.** Because the callback is a queued turn, cascade is only appropriate for work whose result you do not need in the *current* turn. If you need the answer right now to proceed, do the work yourself.
|
||||
- **One task per call.** Do not bundle multiple unrelated tasks into one instruction.
|
||||
- **Parallelism is safe.** cascade is marked `ollie:parallel read` — multiple calls execute concurrently.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue