chore: publish rSkill OpenRAL/rskill-playbook-clarify_ambiguity v0.1.0
Browse files- PLAYBOOK.md +56 -0
- SKILL.md +64 -0
- rskill.yaml +71 -0
PLAYBOOK.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# clarify-ambiguity
|
| 2 |
+
|
| 3 |
+
> **Hand-authored decision procedure (SOP).** Unlike the generated `SKILL.md`
|
| 4 |
+
> discovery view, this file is the *content the S2 Reasoner reads and follows*.
|
| 5 |
+
> It is injected into the reasoner's system prompt when this playbook is
|
| 6 |
+
> installed. The `rskill.yaml` `playbook.body_uri` points here.
|
| 7 |
+
|
| 8 |
+
## Trigger
|
| 9 |
+
The instruction has more than one valid interpretation β e.g. "put the bowl in
|
| 10 |
+
the drawer" when **two** bowls are present, or a request with a **missing**
|
| 11 |
+
destination ("put it away" with no place given). Any underspecified or
|
| 12 |
+
unsafe-to-guess referent or parameter trips this playbook **before** acting.
|
| 13 |
+
|
| 14 |
+
## Preconditions
|
| 15 |
+
- A spatial-memory backend is available (`memory_search` / `recall_object` tools).
|
| 16 |
+
- A scene query is available (`query_scene`) to enumerate candidate referents.
|
| 17 |
+
- An operator channel is available (`emit_prompt`) for the disambiguation question.
|
| 18 |
+
|
| 19 |
+
## Steps
|
| 20 |
+
1. **Detect.** Pin down the ambiguity precisely: *which* referent or parameter
|
| 21 |
+
is unresolved (the target object? the destination? a side/colour?), and *how
|
| 22 |
+
many* candidates fit. If exactly one interpretation is valid, there is no
|
| 23 |
+
ambiguity β exit and proceed.
|
| 24 |
+
2. **Resolve from memory first.** Call `memory_search(<referent>)` over the
|
| 25 |
+
`MEMORY.md` Preferences log for a stated user preference that disambiguates
|
| 26 |
+
("the user means the **left** bowl"). A recorded preference beats asking again.
|
| 27 |
+
3. **Resolve from the scene.** Call `query_scene` / `recall_object(<referent>)`.
|
| 28 |
+
If exactly **one** candidate actually matches the description in the current
|
| 29 |
+
scene, the ambiguity is resolved β skip to **Verify**.
|
| 30 |
+
4. **Ask, don't guess** (only if STILL ambiguous **and** the action is
|
| 31 |
+
irreversible β placing, pouring, opening). `emit_prompt` a short, **specific**
|
| 32 |
+
disambiguation question to the operator ("There are two black bowls β the
|
| 33 |
+
**left** one or the **right** one?") and **WAIT** for the answer. Do not guess.
|
| 34 |
+
5. **Record the resolution.** Once resolved, `memory_write(op=add,
|
| 35 |
+
section="preferences", target=<referent>, content=<resolution>)` so the same
|
| 36 |
+
question isn't asked again on the next task.
|
| 37 |
+
|
| 38 |
+
## Verify (done predicate)
|
| 39 |
+
A **single concrete** referent / parameter, sourced from memory, the scene, or
|
| 40 |
+
the operator. The downstream skill now has an unambiguous goal to dispatch.
|
| 41 |
+
|
| 42 |
+
## Fallbacks
|
| 43 |
+
- No operator response within the task budget β **hold the action** and
|
| 44 |
+
`emit_prompt` that the task is blocked pending clarification. This is the
|
| 45 |
+
terminal human-handoff rung; **never** proceed on a guess for an irreversible
|
| 46 |
+
step.
|
| 47 |
+
- **Never** loop past `max_steps`. Every candidate considered, every memory/scene
|
| 48 |
+
query, and the operator exchange are on the OTel trace, so the resolution is
|
| 49 |
+
replayable.
|
| 50 |
+
|
| 51 |
+
## Safety
|
| 52 |
+
This playbook only *decides* β it resolves the goal and then **gates** the
|
| 53 |
+
downstream skill. Refusing to guess on an irreversible action is the safe
|
| 54 |
+
default (CLAUDE.md Β§1.1, Β§1.4): a wrong referent would yield a wrong placement
|
| 55 |
+
the C++ safety kernel cannot un-do, so the playbook asks first rather than
|
| 56 |
+
relaxing any check. Every motion it eventually unblocks still crosses the kernel.
|
SKILL.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
name: clarify-ambiguity
|
| 3 |
+
description: >-
|
| 4 |
+
S2 decision-procedure playbook (weightless). Capabilities: plan on ambiguous reference. S2 decision procedure: when the goal is underspecified or ambiguous, resolve it from memory/scene or ask the operator a concise question before acting β never guessing on an irreversible action. Composes query_scene, memory_search, recall_object and emit_prompt. Discovery view of an OpenRAL rSkill β NOT directly runnable by an agent harness; it runs via rSkill.from_pretrained + the robot HAL.
|
| 5 |
+
metadata:
|
| 6 |
+
openral_rskill: true # generated discovery view of an rSkill
|
| 7 |
+
schema_version: 0.1
|
| 8 |
+
rskill_id: OpenRAL/rskill-playbook-clarify_ambiguity
|
| 9 |
+
manifest: ./rskill.yaml
|
| 10 |
+
role: s2
|
| 11 |
+
kind: playbook
|
| 12 |
+
embodiment_tags: [any]
|
| 13 |
+
actions: [plan]
|
| 14 |
+
objects: [ambiguous reference]
|
| 15 |
+
scenes: [indoor, household]
|
| 16 |
+
chunk_size: 1
|
| 17 |
+
latency_budget: {per_chunk_ms: 5000.0}
|
| 18 |
+
license_code: Apache-2.0
|
| 19 |
+
license_weights: apache-2.0
|
| 20 |
+
paper_url: https://github.com/OpenRAL/openral/blob/master/docs/decisions.md
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# clarify-ambiguity β rSkill discovery view
|
| 24 |
+
|
| 25 |
+
> **Generated view, not a hand-written skill.** This `SKILL.md` is a discovery-only
|
| 26 |
+
> mirror of [`rskill.yaml`](./rskill.yaml), produced by `tools/generate_rskill_skillmd.py`.
|
| 27 |
+
> It lets tools that read the standard agent-skill format find and reason about this
|
| 28 |
+
> OpenRAL rSkill. The `rskill.yaml` manifest is the single source of truth
|
| 29 |
+
> (CLAUDE.md Β§1.3). Do not edit by hand β edit the manifest and regenerate.
|
| 30 |
+
|
| 31 |
+
## What it is
|
| 32 |
+
|
| 33 |
+
An OpenRAL **decision-procedure playbook (weightless)** (`role: s2`, `kind: playbook`). S2 decision procedure: when the goal is underspecified or ambiguous, resolve it from memory/scene or ask the operator a concise question before acting β never guessing on an irreversible action. Composes query_scene, memory_search, recall_object and emit_prompt.
|
| 34 |
+
|
| 35 |
+
## Capabilities
|
| 36 |
+
|
| 37 |
+
- **Verbs:** plan
|
| 38 |
+
- **Objects:** ambiguous reference
|
| 39 |
+
- **Scenes:** indoor Β· household
|
| 40 |
+
- **Embodiments:** any
|
| 41 |
+
|
| 42 |
+
## Why this is discovery-only
|
| 43 |
+
|
| 44 |
+
An agent skill is natural-language instructions loaded into an LLM's context. An rSkill
|
| 45 |
+
is an executable artifact: it carries a typed capability/embodiment contract
|
| 46 |
+
a runtime, and a license/provenance gate β none of which fit in freeform markdown. So an
|
| 47 |
+
agent can use this view to *select* the right skill, but cannot *execute* it by loading
|
| 48 |
+
this file. Execution always goes through the OpenRAL loader and the robot HAL.
|
| 49 |
+
|
| 50 |
+
## License
|
| 51 |
+
|
| 52 |
+
- **Code:** Apache-2.0. This is a weightless rSkill (the manifest *is* the artifact).
|
| 53 |
+
|
| 54 |
+
## How to actually run it (not via an agent harness)
|
| 55 |
+
|
| 56 |
+
```python
|
| 57 |
+
from openral_rskill import rSkill
|
| 58 |
+
|
| 59 |
+
skill = rSkill.from_pretrained("OpenRAL/rskill-playbook-clarify_ambiguity")
|
| 60 |
+
# the loader validates embodiment / sensors / runtime / quantization against the target
|
| 61 |
+
# RobotDescription and enforces the weight-license gate before any weights load.
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
See [`rskill.yaml`](./rskill.yaml) for the authoritative, validated manifest.
|
rskill.yaml
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# rSkill manifest β clarify-ambiguity (kind: playbook)
|
| 2 |
+
#
|
| 3 |
+
# A symbolic S2 *decision procedure* the Reasoner reads (not a neural policy):
|
| 4 |
+
# when the goal is underspecified or ambiguous, resolve it from memory/scene or
|
| 5 |
+
# ask the operator a concise question before acting. Composes existing read-only
|
| 6 |
+
# reasoner tools; carries no weights and never actuates directly (it gates the
|
| 7 |
+
# downstream ExecuteRskill β Action chunk β C++ safety kernel).
|
| 8 |
+
|
| 9 |
+
schema_version: "0.1"
|
| 10 |
+
name: "OpenRAL/rskill-playbook-clarify_ambiguity"
|
| 11 |
+
version: "0.1.0"
|
| 12 |
+
license: "apache-2.0"
|
| 13 |
+
role: "s2"
|
| 14 |
+
kind: "playbook"
|
| 15 |
+
|
| 16 |
+
# Embodiment-agnostic β a playbook is gated by capabilities_required, not by a
|
| 17 |
+
# specific embodiment. Declared explicitly with the "any" wildcard (never an
|
| 18 |
+
# empty list, which the manifest validator rejects).
|
| 19 |
+
embodiment_tags: ["any"]
|
| 20 |
+
|
| 21 |
+
# No capability flags: resolving an ambiguous reference is operator interaction
|
| 22 |
+
# plus memory/scene queries β it works on any robot. The kept-empty mapping
|
| 23 |
+
# `capabilities_required: {}` is the explicit "no flags" form; the read-only
|
| 24 |
+
# scene/memory queries the SOP performs are gated at runtime by the composed
|
| 25 |
+
# tools' own requirements, not by this playbook.
|
| 26 |
+
capabilities_required: {}
|
| 27 |
+
|
| 28 |
+
# A playbook actuates nothing itself.
|
| 29 |
+
actuators_required: []
|
| 30 |
+
|
| 31 |
+
# Required field; pinned to 1 like the perception kinds (no Action rows).
|
| 32 |
+
chunk_size: 1
|
| 33 |
+
|
| 34 |
+
# S2 planning budget (~0.2 Hz tick). CI enforces on the reference host.
|
| 35 |
+
latency_budget:
|
| 36 |
+
per_chunk_ms: 5000.0
|
| 37 |
+
|
| 38 |
+
description: >
|
| 39 |
+
S2 decision procedure: when the goal is underspecified or ambiguous, resolve
|
| 40 |
+
it from memory/scene or ask the operator a concise question before acting β
|
| 41 |
+
never guessing on an irreversible action. Composes query_scene, memory_search,
|
| 42 |
+
recall_object and emit_prompt.
|
| 43 |
+
|
| 44 |
+
# RSkillAction.PLAN β registry/discovery metadata only (a playbook is role s2,
|
| 45 |
+
# never an ExecuteSkill dispatch verb).
|
| 46 |
+
actions:
|
| 47 |
+
- "plan"
|
| 48 |
+
|
| 49 |
+
objects:
|
| 50 |
+
- "ambiguous reference"
|
| 51 |
+
scenes:
|
| 52 |
+
- "indoor"
|
| 53 |
+
- "household"
|
| 54 |
+
|
| 55 |
+
# Provenance citation (a playbook has no weights / upstream model repo, so a
|
| 56 |
+
# citation is still required for publish-readiness β CLAUDE.md Β§6.4). The
|
| 57 |
+
# The authoring decision record is private (OpenRAL/management); this points at
|
| 58 |
+
# the public stub that explains where it lives.
|
| 59 |
+
paper_url: "https://github.com/OpenRAL/openral/blob/master/docs/decisions.md"
|
| 60 |
+
|
| 61 |
+
# The playbook decision-procedure contract.
|
| 62 |
+
playbook:
|
| 63 |
+
trigger: "the goal is underspecified or ambiguous β multiple candidate referents, a missing target or destination, or an unsafe-to-guess choice"
|
| 64 |
+
body_uri: "./PLAYBOOK.md"
|
| 65 |
+
composes_tools:
|
| 66 |
+
- "query_scene"
|
| 67 |
+
- "memory_search"
|
| 68 |
+
- "recall_object"
|
| 69 |
+
- "emit_prompt"
|
| 70 |
+
done_predicate: "the goal has a single unambiguous interpretation, confirmed from memory/scene or by the operator"
|
| 71 |
+
max_steps: 5
|