home / skills / bdambrosio / cognitive_workbench / debug-grid-cell

This skill lets you query a specific agent-relative voxel grid cell and receive its block, solidity, and support details.

npx playbooks add skill bdambrosio/cognitive_workbench --skill debug-grid-cell

Review the files below or copy the command above to add this skill to your agents.

Files (2)
Skill.md
809 B
---
name: debug-grid-cell
type: python
hidden: true
description: "Debug tool: Query specific cell in observed voxel grid"
---

# debug-grid-cell

Debug tool for testing coordinate system. Queries a specific cell in the observed voxel grid.

## Input

- `dx`: int - Agent-relative X coordinate
- `dy`: int - Agent-relative Y coordinate
- `dz`: int - Agent-relative Z coordinate
- `radius`: int - Optional grid radius (default: 2)

## Output

Returns uniform return format with:
- `value`: Summary text
- `data`: Cell dict with:
  - `dx, dy, dz`: Agent-relative coordinates
  - `block_id`: Block name or null
  - `solid`: bool
  - `support`: bool

## Notes

- Hidden from planner catalog (debug/testing only)
- Queries agent-relative coordinates
- Accessible via direct `{"type": "debug-grid-cell"}` invocation

Overview

This skill is a debug tool that queries a specific cell in an observed voxel grid relative to the agent. It returns a concise summary and a structured data object describing the cell at the requested agent-relative coordinates. It is intended for testing and verifying coordinate systems, visibility, and block properties in environments that expose a voxel observation grid.

How this skill works

You call the skill with agent-relative coordinates (dx, dy, dz) and an optional radius to limit the observation area. The skill inspects the observed voxel grid at the requested location and returns a uniform response containing a human-readable value and a data dictionary. The data dictionary reports the coordinates, block identifier (or null), and boolean flags for solidity and support.

When to use it

  • Verifying that agent-relative coordinate math maps to observed voxels correctly.
  • Testing whether a particular cell is occupied or empty during environment debugging.
  • Confirming block IDs and support properties for pathfinding or physics experiments.
  • Quickly checking nearby cells without scanning the entire observation grid.
  • Unit testing or integration tests that need deterministic voxel queries.

Best practices

  • Provide agent-relative coordinates to avoid confusion with world or global frames.
  • Use the default radius for single-cell checks; increase radius only when needed.
  • Handle null block_id as an empty or unknown cell in downstream code.
  • Treat solid and support as independent booleans; a cell can be solid but not provide support.
  • Keep debug calls out of production planners; use them only in testing or diagnostics.

Example use cases

  • Check the cell directly in front of the agent to validate collision detection.
  • Inspect the block under the agent to confirm support before attempting to stand or jump.
  • Validate coordinate transforms during agent rotations by querying symmetric offsets.
  • Automated tests that assert expected block_id and solidity at specific relative positions.
  • On-demand diagnostics when environment behavior diverges from expectations.

FAQ

What input fields are required?

dx, dy, and dz are required integers; radius is optional and defaults to 2.

What does null block_id mean?

Null block_id indicates no recognized block at that cell or missing data for the cell.