tool-customization
Extend ROSA with safe LangChain tools, tool packages, blacklist-aware filtering, robot-specific prompts, deterministic utilities, and bounded robot adaptations.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- tool-customization
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Extend ROSA with safe LangChain tools, tool packages, blacklist-aware filtering, robot-specific prompts, deterministic utilities, and bounded robot adaptations.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/api-reference.md6.6 KB
- 参考文档references/tool-catalog.md7.1 KB
- 参考文档references/troubleshooting.md7.9 KB
- 参考文档references/workflows.md8.5 KB
- 脚本scripts/custom_tool_template.py2.6 KB
03 SKILL.md 正文
ROSA tool customization
Use this route when a task adds an @tool, passes tools or
tool_packages, needs a ROS-tool blacklist, defines a robot persona or
guardrails, uses ROSA's math/log/system utilities, or considers a safe
subclass/adaptation. This is an extension and inspection route, not an
executor or provider lifecycle route.
Route and boundaries
- Read api-reference.md for the exact
ROSATools, blacklist-injection, prompt, and constructor handoff contracts. - Use tool-catalog.md before choosing an existing deterministic tool; record units and undefined/error cases.
- Follow workflows.md for individual tools, packages, prompts, and bounded action-tool design.
- Diagnose failures with troubleshooting.md.
- For model configuration, invocation, streaming, history, and executor behavior, route to agent-core.
- For live ROS 1 or ROS 2 tools, discovery, middleware, and action safety, route to ros1-operations or ros2-operations. Do not reproduce their exhaustive API catalogs here.
The public extension point is a LangChain tool object: a decorated function
with tool metadata (name, func, and a generated argument schema). A plain
function is not enough for ROSA's package scanner. Keep custom tools
self-contained, deterministic where possible, bounded, and explicit about
side effects. A plan/calculation tool should be separate from a tool that can
move or mutate a robot. Never put arbitrary shell execution, credential
handling, network access, or live robot launches in this route's bundled
helper.
ROS-version boundary
ROSA always builds ROSATools for the selected ros_version, so a normal
agent construction also imports the selected ROS-family module. The tools
package first adds the base calculation, log, and system modules and then
imports only rosa.tools.ros1 for ROS 1 or only rosa.tools.ros2 for ROS 2;
it does not intentionally import both families. Consequently, base
rosa.tools.calculation, rosa.tools.log, and rosa.tools.system can be
imported and inspected without middleware, while ROSATools(1) or
ROSATools(2) can still fail if the selected ROS Python/runtime dependency is
absent. Treat middleware availability as a separate prerequisite; do not
paper over it by selecting the other ROS version.
Quick selection
| Need | Use | Important check |
|---|---|---|
| One pure helper | @tool plus ROSA(..., tools=[...]) |
Typed signature and docstring produce a useful schema |
| Several helpers | A module/package plus tool_packages=[...] |
Public attributes must be decorated tools |
| Hide selected ROS results | blacklist=[...] |
Only blacklist-aware tools consume the injected list |
| Robot persona/constraints | A fresh RobotSystemPrompts |
Keep secrets and untrusted instructions out |
| Existing math/log/debug behavior | Built-in catalog | Validate domain, size, global-state, and wait limits |
| Deep construction override | Protected ROSA methods/subclass | Preserve constructor and executor safety; see workflows.md |
The safe template at scripts/custom_tool_template.py prints its schema and a deterministic result by default. It imports no ROS, LLM, network, credential, or filesystem functionality.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).