declare category as category in prompt for skill selection

This commit is contained in:
Denton Social committed 2026-10-01 15:05:05 -05:00
1 parent 567c280ee2
commit 857ad1ac39
2 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ the request, the tree, the elicitation answers, the runtime **bridge catalog**
| `interrupt:choice` | `scheduler.py:279` | request text + `[current process: <skill>]` | `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: <category>]` | 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: <text>` + `Action of the existing skill: <description>` | `same` / `different` |
| `assess:outcome` | `skill.py:257` | skill label + goal + action log | `success` / `failure` |
+4 -4
View File
@@ -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],