diff --git a/README.md b/README.md index 5e63cb2..1f9f851 100644 --- a/README.md +++ b/README.md @@ -219,7 +219,7 @@ the request, the tree, the elicitation answers, the runtime **bridge catalog** | `interrupt:choice` | `scheduler.py:279` | request text + `[current process: ]` | `interrupt` / `defer` | | `priority:score` | `scheduler.py:296` | request text (+ `[current process: …]` when busy) | critical / high / medium / low | | `navigate:category` | `skills.py:682` | request text | every category name (+ `create_category`) | -| `navigate:leaf` | `skills.py:736` | request text + `[current process: ]` | every skill name + description (+ `create_skill`) | +| `navigate:leaf` | `skills.py:736` | request text + current category | every skill name + description (+ `create_skill`) | | `navigate:response` | `skills.py:634` | request text + category | canned reply names + descriptions (catchall last) | | `navigate:intent` | `skills.py:811` | `Requested action: ` + `Action of the existing skill: ` | `same` / `different` | | `assess:outcome` | `skill.py:257` | skill label + goal + action log | `success` / `failure` | diff --git a/semif_agent/skills.py b/semif_agent/skills.py index 8ee8005..f11b093 100644 --- a/semif_agent/skills.py +++ b/semif_agent/skills.py @@ -465,10 +465,10 @@ def unresolved_variables( return [name for name in (skill.contract or {}) if name not in merged] -def compose_state(request: Request, current: str | None = None) -> str: +def compose_state(request: Request, additional_context: str | None = None) -> str: parts = [request.text] if current: - parts.append(f"[current process: {current}]") + parts.append(f"({additional_context})") return " ".join(parts) @@ -629,7 +629,7 @@ def _navigate_canned( if len(ordered) == 1: return ordered[0] leaf = DecisionRequest( - state=compose_state(request, current=category), + state=compose_state(request, additional_context: f"all choices are within the {category} category"), question=( "Which canned response best fits this input? " f"Choose {ordered[-1].name} if none of the others does." @@ -731,7 +731,7 @@ def navigate( "No existing skill performs this action; create a new skill for it.", ) leaf = DecisionRequest( - state=compose_state(request, current=category), + state=compose_state(request), question=f"Which {category} skill performs the action this request asks for? " "Choose create_skill if none does.", options=[Option(s.name, s.description) for s in skills] + [create_skill],