# P(Doom) Tree > A collaborative platform for mapping AI risk scenarios as probability trees. Users assign probabilities to branching decision points, producing compound outcome probabilities across different causal paths. The core value: force people to make implicit causal assumptions explicit. Instead of arguing about P(doom) as a single number, users walk through specific steps — AGI timeline, alignment difficulty, deployment decisions, response quality — and assign probabilities to each branch. ## API - [OpenAPI 3.0 Spec](/api/openapi.json): Full machine-readable API contract. Fetch this to understand every endpoint, request/response schema, and auth model. - [Health Check](/api/health): Verify the API is reachable. ## For AI Agents You can complete all three core user flows entirely through the API — no web UI required. **Auth model**: Email-only magic code. No passwords, no OAuth. 1. `POST /api/auth/request-code` with `{ "email": "user@example.com" }` — sends a short code to the user's email 2. `POST /api/auth/verify-code` with `{ "email": "...", "code": "..." }` — returns a bearer token 3. Include `Authorization: Bearer ` on all subsequent requests **Flow 1 — Create a probability tree** 1. Authenticate the user (magic code flow above) 2. `GET /api/topics` — list existing topics, or `POST /api/topics` to create one 3. `POST /api/trees` with `{ "title": "...", "topic_id": "..." }` — creates a draft tree 4. `POST /api/trees/:id/nodes` — add decision nodes (questions with branches) and terminal nodes (outcomes) 5. `POST /api/trees/:id/nodes/:node_id/branches` — add branches to each non-terminal node 6. `POST /api/trees/:id/publish` — lock identity hashes and publish (irreversible) **Flow 2 — Fill out a tree (assign probabilities)** 1. Authenticate the user 2. `GET /api/trees?topic=ai-existential-risk` — list published trees sorted by vote count 3. `GET /api/trees/:id` — fetch full tree structure with all nodes and branches 4. `PUT /api/trees/:id/my-response/assignments/:node_id` — save probability for each branch at a node (must sum to 1.0) 5. `POST /api/trees/:id/my-response/submit` — submit when all nodes are filled 6. Optionally: `POST /api/votes` to cast a tree vote **Flow 3 — Read aggregate summary** 1. No auth required for reading 2. `GET /api/trees?topic=ai-existential-risk` — find top-voted trees 3. `GET /api/trees/:id/summary` — returns compound outcome probabilities using two methods: per-user paths and aggregate-node. Both methods return mean, median, p10, p90 per terminal outcome plus divergence rankings. 4. `GET /api/trees/:id/fork-family` — show lineage and sibling forks with vote counts **Evidence** Evidence is attached to nodes by identity hash, meaning it is shared across all trees that contain the same logical node. `GET /api/nodes/:node_identity_hash/evidence` and `POST /api/nodes/:node_identity_hash/evidence`. ## Topics - ai-existential-risk — AI Existential Risk - (more user-created topics via the API) ## Key Concepts - **Nodes**: Non-terminal nodes have a `question` and `description`. Terminal nodes have a `label` and `outcome_type` (e.g. "catastrophic", "flourishing", "neutral"). - **Identity hash**: SHA-256 of a node's question, description, sorted branch labels, and terminal fields. Two nodes across any trees with the same hash share evidence and probability imports. - **Draft vs published**: Trees start as drafts (editable). Publishing is irreversible and locks identity hashes. - **Fork**: Any published tree can be forked into a new draft. Edited nodes break their identity hash, losing continuity with the parent. - **Responses**: Saved as drafts until explicitly submitted. Only submitted responses count toward summaries.