AGENT SKILL

extension-and-control

This skill guides users through IR-SIM registry extensions, external state ownership, and keyboard or Matplotlib control integration.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
extension-and-control
license
MIT
metadata
{ "disco-role": "operating" }
description
This skill guides users through IR-SIM registry extensions, external state ownership, and keyboard or Matplotlib control integration.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Extension and control

Use this route when a task involves a custom individual or group behavior, kinematics or map-generator registration, an external state owner, keyboard or mouse input, or a controller boundary such as a CBF/QP wrapper. Keep ordinary YAML scene authoring in scene-configuration, the simulation lifecycle in simulation-environments, sensor/map consumption in sensing-and-mapping, and built-in behavior or planner selection in navigation-and-planning.

Start safely

  1. Install the base distribution and verify the import before adding optional input or solver packages:

    python -m pip install ir-sim
    python -c "import irsim; print(irsim.__version__)"
    
  2. Decide who owns state. Use normal internal stepping for IR-SIM kinematics, behaviors, or an action supplied to env.step(action). Use external stepping when another simulator/controller supplies every object's state and velocity; follow the external sequence.

  3. Load custom behavior modules explicitly with env.load_behavior("module_name") after the module is importable on sys.path. The loader reinitializes registered individual and group class handlers; it does not make a file importable by filename alone.

  4. Run the bundled, headless registration check from the sub-skill directory:

    python scripts/custom_behavior_smoke.py
    

    It uses process-local registries and in-memory fixtures; it does not open a GUI or require pynput, pyrvo, or a QP solver. Check its parser without running it with python scripts/custom_behavior_smoke.py --help.

Choose the extension contract

  • Per-object, group, stateful, or map/kinematics registration: read custom behaviors and registries.
  • Caller-supplied states, velocity ownership, refresh ordering, or CBF/QP integration boundaries: read external control.
  • Interactive keyboard, MPL fallback, mouse zoom/clicks, and headless limits: read GUI control.
  • Import, duplicate-key, dimension, stale-cache, and backend recovery: read troubleshooting.

Non-negotiable checks

  • Registry keys are exact (kinematics, name) pairs. Register the behavior for the kinematics used by the YAML object and return an action with that kinematics' action dimension; a behavior name alone is not portable.
  • Do not register over a built-in or previously imported custom key. The behavior decorators reject duplicate keys with ValueError; kinematics registration also rejects a different class under the same normalized key. Use an isolated process or unique test names for experiments.
  • A custom map generator must be imported before the YAML map is built. Its non-empty name, yaml_param_names, constructor, and _build_grid() define the YAML-facing contract; the framework injects grid width and height and computes them from resolution.
  • In external mode, update state and velocity, then call env.step() with no action. Do not mix env.step(action=...) with external state ownership. Use env.refresh() when a direct state mutation must be observable before a step; never mutate private state fields as a shortcut.
  • Treat live keyboard input, OS global hooks, and external CBF/QP solvers as integration surfaces. Validate their mocked/headless paths first and report optional or unverified dependencies rather than claiming a live test.

The helper and references are self-contained runtime material. The source checkout, usage scripts, native tests, and private inspection environment are evidence only and are not runtime dependencies.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351