chain multi-step requests across known skills
Add the run-ledger chained-run path and make a compound request run its known skills in order instead of authoring one monolithic skill. - scheduler/skill: `assess:outcome` gains a `continue` verdict; a continued step is re-dispatched with a bounded run ledger (max_reentries + a monotonic-progress guard), and the ledger is rendered into the routing and assessment state. - navigation leaf guard (`confirm_skill_fit`) becomes same/part/different and is ledger-aware, so the first step of a compound request runs instead of being rejected into `create_skill` (a real run picked calculator.calculate at 0.99 and was rejected into create_skill). - results flow forward through `request.run_ledger` (`last_result` helper); `simplex.send_message` sends the prior step's result rather than asking the LLM bridge to recompute it. Documented in CODEGEN.md. - `assess:outcome` stays the sole continuation authority: the guard only decides whether a skill contributes, never forces a continuation (a forced continue on `part` overrode a correct `done` on the final step and authored a spurious category). - verbosity levels, structured SchedulerReply fields, and a send_message hermetic test for the chained-result path.
This commit is contained in:
1 parent
9ba14fdab0
commit
ab0defca1e
20 files changed
+1046
-324
No files matched your search
@@ -12,8 +12,11 @@ probability.
|
||||
description plus `create_category`; `confirm_category_fit` confirms the
|
||||
winner's scope. `navigation.category_tau` is that guard's P(covers) floor.
|
||||
- **Leaf**: the softmax offers only existing skills; `confirm_skill_fit`
|
||||
compares the winner's action to the request. `navigation.intent_tau` is that
|
||||
guard's P(same) floor.
|
||||
decides what the winner does for the request (`same` / `part` / `different`).
|
||||
`navigation.intent_tau` is that guard's P(same or part) floor: `same` or
|
||||
`part` runs the skill, and only `different` authors a new leaf. The guard
|
||||
decides contribution only; whether more work remains is `assess:outcome`'s
|
||||
call.
|
||||
|
||||
This replays a hand-labeled eval set through the **real** decision engine and
|
||||
the **real** skill tree, measuring each guard's probability per request so the
|
||||
@@ -122,7 +125,10 @@ def measure(
|
||||
confirm_skill_fit(scheduler.engine, log, trace, request, nav, tau=tau)
|
||||
events = trace.read()[before:]
|
||||
guard = next((e for e in events if e["kind"] == "intent_guard"), None)
|
||||
return {"picked": f"{nav.category}.{nav.name}", "p": guard["probs"]["same"] if guard else None}
|
||||
# The guard accepts a skill that is the same action OR one required part of a
|
||||
# compound request, so the "does it contribute" mass is same + part.
|
||||
p = (guard["probs"]["same"] + guard["probs"]["part"]) if guard else None
|
||||
return {"picked": f"{nav.category}.{nav.name}", "p": p}
|
||||
|
||||
|
||||
def verdict(measured: dict, tau: float) -> str:
|
||||
|
||||
Reference in new issue
Block a user