Working With AI
Before you start
- An AI coding tool that can work with local files
- Complete Robot Access and SDK Overview
- Open the tool in ~/gather-sdk/projects
The prompt cards are designed for an AI coding agent opened directly in ~/gather-sdk/projects. They ask the agent to inspect files, make a bounded code change, and run checks that do not operate the robot.
They are provider-neutral: use any coding tool that can read and edit the local project folder. A chat-only tool can still return a patch, but it must not pretend that it changed or tested local files.
Learning Goals
You will learn how to:
- Give an AI coding agent a specific file and outcome.
- Keep changes inside the prepared project workspace.
- Require a diff and hardware-independent validation.
- Separate successful code checks from unverified hardware behavior.
Recommended Workflow
- Open Terminal on the robot.
- Change to
~/gather-sdk/projects. - Start the approved AI coding tool in that folder.
- Choose a prompt card from the SDK Overview, Camera, or Robot guide.
- Add the project goal and identify any existing file to modify.
- Review every changed file and the agent's validation output.
- Decide whether a manual hardware run is appropriate.
What The Agent Should Do
- Inspect relevant files before editing them.
- Create or modify Python files only in
~/gather-sdk/projects. - Use
CameraorRobotbefore selected advanced backends. - Keep context-manager cleanup and optional sensor values correct.
- Run
python3.10 -m py_compileor mocked tests. - Report files changed, validation commands, and unresolved assumptions.
- Leave one concrete output or behavior for you to verify.
What The Agent Must Not Do
- Edit the installed SDK source unless an instructor explicitly requests it.
- Change the operating system, network, or controller configuration.
- Initiate physical motion or run a motion program.
- Treat a successful compile as proof that a camera or controller worked.
- Claim a hardware action succeeded without real output.
Start A Project
Build a first Gather project
AI coding promptbuildCreate a small Python project in the prepared robot workspace using Camera or Robot.
Verify before running
Review the created file and run the compile command before deciding whether to run it with hardware.
Preview the prompt
You are a coding agent working on an assigned Gather robot. Work only inside ~/gather-sdk/projects. Inspect the existing files before changing anything, then create the smallest useful Python program for the goal I provide. Start with from gather_sdk import Camera or Robot and prefer Camera unless the project needs robot safety state. Do not use advanced backends or edit the installed SDK source. Keep hardware cleanup explicit with a context manager. Run python3.10 -m py_compile on every Python file you create or change. Never initiate physical motion, run the program against hardware, or claim a camera, controller, or robot action succeeded without reported evidence. Summarize the files changed, explain the important code in plain language, and leave one concrete output or behavior for me to verify before the project continues.
Paste this into an AI coding tool opened in ~/gather-sdk/projects.
Review Generated Code
Before running generated code, confirm:
- It imports
CameraorRobotfromgather_sdk. - It uses a
withblock or reliable cleanup. - It treats optional
CameraFramevalues as possiblyNone. - It uses methods and fields listed in the relevant SDK guide.
- It changes files only under
~/gather-sdk/projects. - Any motion code has explicit limits, guaranteed cleanup, and instructor review.
When The Agent Reaches A Boundary
The agent should stop and report the boundary when the evidence points to a missing platform dependency, camera connection, controller connection, or physical safety state. Those conditions cannot be repaired by inventing code or changing robot configuration.
Use these guides for the next code task:
- SDK Overview for a first project.
- Camera Module for Camera features and code repair.
- Robot Module for sensor-only programs and motion-code review.