Configuration
All Morning Ritual settings live under the triage block in ~/.optimalos/config.json. Defaults and env overrides are defined in optimalOS/src/config.ts:81-98,199-209.
Config keys
| Key | Type | Default | Env override | Description |
|---|---|---|---|---|
triage.ollama_url | string | http://localhost:11434 | TRIAGE_OLLAMA_URL | Base URL of the Ollama endpoint (OpenAI-compatible /v1/chat/completions). |
triage.ollama_token | string | null | null | TRIAGE_OLLAMA_TOKEN | Bearer token if Ollama is fronted by an auth proxy. |
triage.model | string | deepseek-r1:14b | TRIAGE_MODEL | Ollama model tag. Any 1M-context model that supports JSON-object response format will work. |
triage.max_now | number | 3 | — | Hard cap for NOW lane. |
triage.max_next | number | 7 | — | Hard cap for NEXT lane. |
triage.max_later | number | 30 | — | Hard cap for LATER lane. |
triage.context_token_budget | number | 900000 | — | Soft prompt-token budget per batch. The workflow refuses to ship a chunk whose estimated tokens exceed 950_000 (the hard limit, slightly above this soft budget). |
triage.rerun_requires_brief | boolean | false | — | When true, /api/triage/rerun should return 400 unless an unconsumed brief exists. Not currently enforced in the route — see callout below. |
triage.batch_size | number | 25 | — | Tasks per Ollama call. ≤ 25 keeps small models accurate. Set to 0 to disable batching and send everything in one call. |
Example
{
"triage": {
"ollama_url": "http://pop-os:11434",
"ollama_token": null,
"model": "deepseek-r1:14b",
"max_now": 3,
"max_next": 7,
"max_later": 30,
"context_token_budget": 900000,
"rerun_requires_brief": false,
"batch_size": 25
}
}Env overrides
Three keys can be overridden via environment variable, useful for shell-based deploys and dev work where you don't want to edit config.json:
export TRIAGE_OLLAMA_URL=http://pop-os:11434
export TRIAGE_OLLAMA_TOKEN=sk-...
export TRIAGE_MODEL=deepseek-r1:14bThe remaining keys are config-file only.
Caveats
`triage.rerun_requires_brief` is not enforced
As of 2026-04-27 the config key exists and is parsed correctly, but the rerun route at optimalOS/src/routes/triage.ts:16-60 does not check it. Setting it to true has no effect on the API. Either treat the flag as informational until the route is patched, or gate reruns on the client side.
First-run behavior
On the very first triage run after upgrading (migration v5 creates the new tables and columns), every non-completed task is sent to the model fresh. The legacy priority field is not included in the prompt — the model scores from scratch. Expect many former P1s to demote below the NOW cap of 3. Lock the genuine NOW items via POST /api/triage/lock/:task_id and rerun; scores stabilize after 2-3 cycles. See Overrides & Locking.