# Sense A `compute()` function that samples or derives external data. The only first-class citizen in nerve. ## Behavior - Returns `T | null` — non-null emits a Signal, null is silent (no storage write, no signal, no downstream trigger) - Each Sense has its own **independent SQLite database** - Cross-sense reads are read-only via `peers` parameter - Schema defined with Drizzle ORM (`schema.ts` is single source of truth) ## Sense → Workflow If `compute()` returns an object with `workflow: "name|maxRounds|prompt"`, the engine starts that workflow and does **not** emit a Signal. `workflow: null` or `""` means emit signal normally. See `routeSenseComputeOutput` / `parseSenseWorkflowDirective` in `@uncaged/nerve-core`. ## Config (nerve.yaml) ```yaml senses: cpu-usage: group: system # senses in same group share a worker throttle: 10s # min interval between computes timeout: 30s # max compute duration grace_period: 5s # wait before first compute interval: 30s # periodic trigger (optional) on: [disk-pressure] # trigger on signals from other senses (optional) ```