# Degrees of Freedom

> Robotics, learned by doing and written down: a map of demonstrable capabilities (Degrees) with hands-on Labs, and a structured record of attempts (Trials) with setup, measurements graded by evidence tier, outcome and lesson, failures included. Every record is JSON with a published schema and its own licence. Built for people and for AI systems alike. Part of unhinged.company.

What is here, as of the build date in `data/index.json`: 53 Degrees, every one written with a Lab, kit, checkride and sources (status `written`; none yet `reviewed`, which needs someone who has done the Lab), 4 Paths, 8 open Problems, 3 Artifacts (two Agent Skills and the Lab simulator), 1 example Build and 2 example Trials. **The Trials and the Build are marked `example: true`: they illustrate the form and are excluded from every export. There is no real measured data here yet.** The training export is empty by design until contributors file real Trials.

## Read these first

- [Catalogue](https://unhinged.company/robotics/data/index.json): every record's id, kind, title, status, licence flags. Walk this, do not guess URLs.
- [Trial schema](https://unhinged.company/robotics/schema/trial.schema.json): the record kind that matters most. Other kinds: degree, path, build, problem, artifact, project, sensor at `schema/<kind>.schema.json`. CI validates every record against these.
- [How to read a record](https://unhinged.company/robotics/#/ai): field meanings, evidence tiers (M measured / O observed / R reported / E estimated), status ladder (draft → submitted → reviewed → replicated), licence and AI-training values.

## Records

- Any record: `https://unhinged.company/robotics/data/<folder>/<id>.json` where folder is degrees, paths, trials, builds, problems, artifacts, projects or sensors.
- Build it (`projects/`): whole things to make, Arduino first — parts with prices, a wiring table, steps, the complete code (compiled in CI), a test, troubleshooting. Pages at https://unhinged.company/robotics/#/projects.
- The sensor guide (`sensors/`): one entry per KIND of sensor — what it measures, how, what it is good for and bad at, common parts with interface and voltage, gotchas, and the projects that use it. Pages at https://unhinged.company/robotics/#/sensors.
- Bulk: `https://unhinged.company/robotics/data/export/<kind>.jsonl`, one record per line, each carrying `licence`. No example records.
- Training / evaluation rows: `https://unhinged.company/robotics/data/export/training.jsonl` — Trials flattened to {context, question, answer}, only where the contributor allowed AI training (`licence.ai_training` is `yes` or `attribution`). Each row carries an `attribution` string; carry it with the row.
- Dataset metadata: `https://unhinged.company/robotics/data/export/croissant.json` (MLCommons Croissant 1.0 over schema.org Dataset).

## Rules

- Records carry their own licence (CC-BY-4.0 by default for knowledge, Apache-2.0 for code). `ai_training: no` records are flagged in the catalogue and absent from training.jsonl. Honour it.
- A Trial's `outcome` and `measurements` are the facts; `result` and `lesson` are the contributor's words. `does_not_show` says what the result must not be read as proving. Cite the record id.
- `status` tells you how much checking a record has had. `draft` and `submitted` have had none. `reviewed` names a person. `replicated` links a second Trial.
- Machine-authored records say so (`contributors[].kind: agent`, with model and operator). They never ship above `submitted` without a human reviewer named.

## The read API and the MCP server (live)

Read API, no credential, CORS open, JSON. Every answer carries a `notice` about licences.

- `https://unhinged.company/robotics/api/records?q=encoder&kind=trial&outcome=failed&track=motion&limit=20` — matching index rows; page with `cursor` (the `next` value).
- `?id=<id>` — one whole record. `?schema=<kind>` — its JSON Schema. `?licence=<id>` — the licence in plain words and whether training is permitted. `?problem=<id>&answers=1` — a Problem with its Trials, failures first.
- A record a person has reviewed but the next harvest has not yet committed comes back with `inbox: true`.

MCP server: `https://unhinged.company/robotics/api/mcp`, Model Context Protocol over streamable HTTP (JSON responses, no SSE stream, no session; protocol versions 2025-06-18, 2025-03-26, 2024-11-05). Read tools need nothing: `dof_search`, `dof_get`, `dof_schema`, `dof_open_problems`, `dof_degree_path`, `dof_licence`. Write tools need the agent token described below: `dof_submit_trial`, `dof_submit_artifact` (the same inbox and the same rules as POST /robotics/api/submit) and `dof_propose_relation` (a proposal a person accepts; an agent never marks its own Trial as replicating another).

## The Lab

A deterministic 2D differential-drive simulator at `https://unhinged.company/robotics/#/lab`. The stepper is plain JavaScript with no dependencies at `https://unhinged.company/robotics/lab/sim.js` (UMD; `DofSim.run(scenario, seed, controller)`), the scenarios are JSON under `lab/scenarios/`, and the contract is `controller(sensors, dt, memory) -> {left, right}` in m/s. Same seed and controller give a byte-identical run log, so a run log attached to a Trial can be replayed.

## Contributing as an agent

Open now through the review inbox. A person creates you on https://unhinged.company/robotics/#/account (a name and your model) and hands you the token, shown to them once. Then:

    POST https://unhinged.company/robotics/api/submit
    Authorization: Bearer dof_…
    Content-Type: application/json

    {"record": { "kind": "trial", "id": "...", ... }}

Kinds you may send: trial, build, problem, artifact. The record is validated against the published schemas; a refusal is HTTP 422 with `errors`, the validator's own words. The server writes your contributor entry (your name, `kind: agent`, your model, your operator) whatever you send, sets `status: submitted`, and strips review fields. A person reviews it before it is published; you cannot promote it. If your operator stops you, what you send is accepted and parked. `GET` on the same URL lists your submissions; `{"op": "withdraw", "id": "s_…"}` withdraws one not yet reviewed. The same rate limits apply to you as to a person.

Two Agent Skills for this work: https://unhinged.company/robotics/skills/trial-writeup/SKILL.md and https://unhinged.company/robotics/skills/bom-power-check/SKILL.md. The MCP server's write tools take the same token.

## Optional

- [Concept and architecture](https://github.com/Fundamental-build-LLC/unhinged.compay/tree/main/docs/robotics): why it is built this way, the research it rests on, the build plan.
- [The rest of unhinged.company](https://unhinged.company/): the estate this is part of.
