Skip to content

Commit 42577b1

Browse files
committed
Clarify task workflow example
1 parent 87cbc9f commit 42577b1

1 file changed

Lines changed: 36 additions & 26 deletions

File tree

README.md

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -80,37 +80,47 @@ inside one local script.
8080

8181
## Tasks As Structural Backpressure
8282

83-
SharpClaw tasks are C# scripts. They can ask an agent to do work, then run the
84-
application-specific checks that decide whether the result is allowed to move
85-
forward.
83+
SharpClaw tasks are C# scripts. In everyday terms, a task is a fixed workflow
84+
that gives an agent the exact tools for one job, watches the handoffs, and
85+
keeps the work from drifting until a real finish condition is reached.
86+
87+
This inbox flow is just one example of that pattern.
8688

8789
```mermaid
8890
flowchart TD
89-
Trigger["PR changes an API route"]
90-
Task["Task script owns the invariant:<br/>route needs permission X"]
91-
Agent["Agent edits route, policy, tests,<br/>or module endpoint metadata"]
92-
Build["Build API + gateway"]
93-
Launch["Launch test host"]
94-
Probe["Call endpoint as admin,<br/>member, and anonymous"]
95-
Inspect["Read endpoint metadata<br/>and persisted policy"]
96-
Gate{"Only the allowed role succeeds?"}
97-
Continue["Continue release task"]
98-
Reject["Reject artifact with facts:<br/>anonymous got 200,<br/>or permission key is missing"]
99-
100-
Trigger --> Task
101-
Task --> Agent
102-
Agent --> Build
103-
Build --> Launch
104-
Launch --> Probe
105-
Probe --> Inspect
106-
Inspect --> Gate
107-
Gate -- yes --> Continue
108-
Gate -- no --> Reject
109-
Reject --> Agent
91+
Email["New email arrives"]
92+
Trigger["Task is triggered<br/>for this inbox rule"]
93+
Reviewer["Reviewer agent reads it<br/>and chooses next actions"]
94+
Toolbelt["Task-specific tools only:<br/>read thread, search records,<br/>open ticket, draft reply"]
95+
Plan["Reviewer splits the work"]
96+
Agents["Smaller agents handle pieces:<br/>billing check, schedule lookup,<br/>policy search, summary"]
97+
Reports["Agents report results<br/>back to reviewer"]
98+
Done{"Reviewer confirms<br/>the work is complete?"}
99+
More["Reviewer sends them back<br/>with specific missing items"]
100+
Reply["Reviewer drafts and sends<br/>the email response"]
101+
Close["Reviewer manually ends<br/>the task"]
102+
103+
Email --> Trigger
104+
Trigger --> Reviewer
105+
Trigger --> Toolbelt
106+
Toolbelt --> Reviewer
107+
Reviewer --> Plan
108+
Plan --> Agents
109+
Agents --> Reports
110+
Reports --> Done
111+
Done -- no --> More
112+
More --> Agents
113+
Done -- yes --> Reply
114+
Reply --> Close
110115
```
111116

112-
The model is not merely reminded to protect the route. The task makes the
113-
unsafe shape fail and sends the specific failure back into the next attempt.
117+
The task is the structure around the agent. It decides when the work starts,
118+
which tools are visible, how smaller agents are assigned, what counts as done,
119+
and when the loop is allowed to stop. The same shape can handle technical work
120+
such as release checks, dependency upgrades, incident review, migration
121+
planning, benchmark follow-up, and codebase maintenance, or everyday work such
122+
as support triage, appointment scheduling, invoice follow-up, document intake,
123+
meeting preparation, and status reporting.
114124

115125
## Runtime Shape
116126

0 commit comments

Comments
 (0)