Context for AI
If an assistant misunderstands this project, give it this page or the repo root file AGENTS.md (same facts, optimized for tools that auto-read the repository).
VeltoKit = biblioteka Swift (VeltoKit/). gametriki = przykładowa aplikacja iOS (app/). Gry czytają tylko GameInput, nie surowe BLE. Szukaj w docs: Search (⌘K / Ctrl+K). Skill do Cursor/Claude: For Cursor Claude.
Copy-paste prompt for any AI
You are working on the VeltoKit repository (gametriki monorepo).
Read AGENTS.md at the repo root before answering or editing.
VeltoKit/ is the Swift SDK (MotionSDK → GameInput). app/ is the sample iOS app.
Games must use GameInput only. Triki UI is app-only navigation, not part of the SDK target.
When unsure, open VeltoKit/MotionSDK.swift, VeltoKit/GameInput.swift, and the matching file in app/Games/.
Human documentation source lives in website/docs/ (English).
One-sentence summary
VeltoKit converts BLE cap IMU + button packets into GameInput each frame; gametriki is the reference app that demonstrates Pong, Dart, Bowling, and Quiz.
Architecture (read in this order)
- Architecture — layers and frame pipeline
- GameInput — field contract (what games use)
- MotionSDK API —
connect,pollInput,enqueueBLE - Module map — file-level map
flowchart LR
BLE[BLE bytes]
SDK[MotionSDK]
GI[GameInput]
G[app/Games]
BLE --> SDK --> GI --> G
Repo paths (not website URLs)
| Path | Role |
|---|---|
VeltoKit/MotionSDK.swift | Public SDK entry |
VeltoKit/GameInput.swift | Output struct — ground truth for game code |
app/Platform/TrikiInputAdapter.swift | Sample adapter + calibration |
app/Engine/GameManager.swift | Sets MotionMode per game |
app/Games/*.swift | Integration examples |
website/docs/ | Documentation you are reading now |
AGENTS.md (repo root) | Machine-oriented duplicate of this page |
MotionMode cheat sheet
| Mode | Sample game | Key GameInput fields |
|---|---|---|
.paddle | Pong, Quiz | posX, primaryAction |
.pointer | Dart | posX, posY, shotTriggered |
.gesture | Bowling | shotTriggered, throwPower |
Details: examples · configuration.
Task → which doc / file
| You want to… | Open |
|---|---|
| Add VeltoKit to a new app | Quick Start, installation |
| Understand BLE bytes | BLE integration, VeltoKit/BLE/ |
| Fix throw / gesture | Gestures, VeltoKit/GestureDetector.swift |
| Fix cap menus (focus, hold) | Triki UI, app/UI/TrikiUI/ |
| Calibrate + simple Triki menu | Triki UI — calibration & simple menu, QuizFlowView.swift |
| Match Pong/Dart/Bowling/Quiz | website/docs/examples/* + app/Games/ |
Mistakes assistants often make
- Calling the sample app framework “gametriki SDK” — the SDK name is VeltoKit only.
- Inventing
GameInputfields that do not exist inVeltoKit/GameInput.swift. - Putting CoreBluetooth code inside
app/Games/(belongs in SDK or Platform). - Ignoring
MotionModewhen changingposX/ throw behavior.
Downloadable skills
One-file prompts for Cursor or Claude. In a clone they are at website/static/skills/. Use the docs Search box in the navbar (⌘K / Ctrl+K) to find SDK topics quickly.
PL: Wyszukiwarka — pole Search w prawym górnym rogu (`⌘K` / `Ctrl+K`). Pobranie skilli — przyciski poniżej lub menu AI Skills → ↓ Download Cursor (.md) / ↓ Download Claude (.md).
Direct links (copy)
- On this site: https://koderhack.github.io/veltokit/skills/cursor-skill.md
- On this site: https://koderhack.github.io/veltokit/skills/claude-skill.md
- GitHub raw: https://raw.githubusercontent.com/koderhack/veltokit/main/website/static/skills/cursor-skill.md
- GitHub raw: https://raw.githubusercontent.com/koderhack/veltokit/main/website/static/skills/claude-skill.md
Best for understanding the repo: open AGENTS.md at the repo root (already in clone). Cursor: skill is at .cursor/skills/veltokit/SKILL.md or paste downloaded file into chat. Claude: attach AGENTS.md or add Project instructions from the downloaded file.
Also install from clone: .cursor/skills/veltokit/SKILL.md (Cursor) or paste into Claude Project instructions.