initialize — first-run setup interview
You are the Danus main agent meeting this operator for the first time on this
deployment. Collect the few critical settings by asking (never auto-decide),
set everything up, and leave a clean, initialized, running system. Open the interview in the operator's language if you
already know it; otherwise use English, then honor the language they pick below
(this is the moment their language preference is first captured — record it in
OPERATOR.md and follow it thereafter).
0. Greet + orient (brief)
Tell the operator, in 2–3 sentences: Danus is an automated mathematics system —
codex workers prove, a verifier is the sole gate on correctness, and you
(codex) orchestrate; you'll ask a few setup questions, then you're ready
to take a problem. Say the answers are saved permanently (OPERATOR.md), so this
is a one-time setup.
1. Read current state (so you don't ask about what's already done)
bash scripts/doctor.sh
git branch --show-current
Note: codex reachable? on main (needs a working branch)? config/danus.env
present? OPERATOR.md filled or still the template?
2. Ask the choices — as plain questions in the conversation
Ask this multiple-choice question in the chat (state the options; put the
recommended one first and label it). There is no popup — codex asks in plain text
and reads the operator's reply:
- codex backend (what the workers + verifier run on) —
- OpenAI-compatible API key (recommended): the key you place in
config/codex.env — works immediately, no login.
- My own ChatGPT subscription: device-code login.
Then ask, as plain text questions:
- How to address them (name), and their language (default English) — this sets
the language you use with them from now on (
OPERATOR.md records it).
- The git working branch name (default
deploy/<operator-or-host>).
- If they chose the paid-API backend: a spend ceiling (USD) to warn at.
3. Provision — act on the answers, persisting each before moving on
- Branch: if on
main, git checkout -b <branch> (never work on main).
- Config:
cp -n config/danus.env.example config/danus.env; set CODEX_BACKEND
to their choice. If the backend is
the OpenAI-compatible key, cp -n config/codex.env.example config/codex.env and
make sure the operator's key + endpoint are filled there (CODEX_* / OPENAI_*).
Never put secrets anywhere but config/*.env.
- OPERATOR.md: fill name / language / spend ceiling /
default worker roster, in place (no duplicates).
- codex: backend=api →
bash scripts/check-codex.sh (confirm reachable);
backend=chatgpt → you run bash scripts/setup-codex.sh login and give the
operator the printed URL + device code (they only open it and authorize).
- Services (must persist beyond your session —
services.sh uses setsid):
bash scripts/services.sh up verify (required — no verify means fact_submit
fails and the whole pipeline is silently dead).
- Verify the stack:
bash scripts/doctor.sh; report green/red plainly.
- Mark done:
mkdir -p runtime && date -u +%FT%TZ > runtime/.danus-initialized.
- Commit (git discipline): commit
OPERATOR.md (and the new branch) locally — do
not push (push is an explicit operator action, never automatic; see AGENTS.md).
Never commit config/*.env or runtime/.
4. Hand off
Summarize the chosen backend, confirm the system is up, then ask
for the math problem (or return to the operator's original request). When they
give it, write runtime/projects/<p>/PROBLEM.md and begin the strategic loop.
Also mention, in one line, a capability they'll want later so it isn't hidden:
when you eventually write a paper, you can drop your own papers into the
write-paper skill's style/anchors/ folder so the output matches your writing
voice (see that folder's README.md; a complete paper is produced either way).
Rules:
- Ask, don't assume — the choices are the operator's call. "Use the defaults"
is fine, but record it explicitly. If a step needs something only they can supply
(a key, a login), pause and ask rather than guessing.
- Verify, never claim unchecked. Before telling the operator a service/endpoint
is up or that a step worked, confirm it (
check-codex.sh exits non-zero on ping
failure; doctor.sh for the rest). A premature
"it's up" that turns out to be a failure is exactly what to avoid.
- Never work on
main — branch first if on main.
- Secrets only in
config/*.env — never commit config/*.env or runtime/;
only OPERATOR.md (and the branch) are committed.
- Invoke scripts from the repo root (or by absolute path). The scripts
self-locate, but a stray
cd earlier in the session will make a relative
bash scripts/... call fail — cd to the project dir first if unsure.
- Persist each answer before moving on, and only write
runtime/.danus-initialized
once the stack verifies green — the sentinel is what suppresses re-running the interview.
1---2name: initialize3description: First-run setup interview for a Danus deployment. Run it on the FIRST session, whenever runtime/.danus-initialized is absent or OPERATOR.md is still the blank template, or when the operator asks to set up / initialize / onboard / re-configure. It greets the operator, explains Danus, asks the critical choice (codex backend) plus a few free-text fields (how to address them, language, git branch, spend ceiling), then provisions everything (branch, config/danus.env, OPERATOR.md, codex login, verify service) and marks runtime/.danus-initialized. The system cannot run without these answers, so do not skip it.4---56# initialize — first-run setup interview78You are the Danus main agent meeting this operator for the first time on this9deployment. Collect the few critical settings **by asking** (never auto-decide),10set everything up, and leave a clean, initialized, running system. Open the interview in the operator's language if you11already know it; otherwise use English, then honor the language they pick below12(this is the moment their language preference is first captured — record it in13`OPERATOR.md` and follow it thereafter).1415## 0. Greet + orient (brief)1617Tell the operator, in 2–3 sentences: Danus is an automated mathematics system —18codex **workers** prove, a **verifier** is the sole gate on correctness, and you19(codex) **orchestrate**; you'll ask a few setup questions, then you're ready20to take a problem. Say the answers are saved permanently (`OPERATOR.md`), so this21is a one-time setup.2223## 1. Read current state (so you don't ask about what's already done)2425```bash26bash scripts/doctor.sh27git branch --show-current28```29Note: codex reachable? on `main` (needs a working branch)? `config/danus.env`30present? `OPERATOR.md` filled or still the template?3132## 2. Ask the choices — as plain questions in the conversation3334Ask this multiple-choice question in the chat (state the options; put the35recommended one first and label it). There is no popup — codex asks in plain text36and reads the operator's reply:3738- **codex backend** (what the workers + verifier run on) —39 - *OpenAI-compatible API key* (recommended): the key you place in40 `config/codex.env` — works immediately, no login.41 - *My own ChatGPT subscription*: device-code login.4243Then ask, as plain text questions:44- How to address them (name), and their **language** (default English) — this sets45 the language you use with them from now on (`OPERATOR.md` records it).46- The **git working branch** name (default `deploy/<operator-or-host>`).47- If they chose the **paid-API** backend: a **spend ceiling** (USD) to warn at.4849## 3. Provision — act on the answers, persisting each before moving on5051- **Branch:** if on `main`, `git checkout -b <branch>` (never work on `main`).52- **Config:** `cp -n config/danus.env.example config/danus.env`; set `CODEX_BACKEND`53 to their choice. If the backend is54 the OpenAI-compatible key, `cp -n config/codex.env.example config/codex.env` and55 make sure the operator's key + endpoint are filled there (`CODEX_*` / `OPENAI_*`).56 Never put secrets anywhere but `config/*.env`.57- **OPERATOR.md:** fill name / language / spend ceiling /58 default worker roster, in place (no duplicates).59- **codex:** backend=api → `bash scripts/check-codex.sh` (confirm reachable);60 backend=chatgpt → **you** run `bash scripts/setup-codex.sh login` and give the61 operator the printed URL + device code (they only open it and authorize).62- **Services (must persist beyond your session — `services.sh` uses setsid):**63 `bash scripts/services.sh up verify` (required — no verify means `fact_submit`64 fails and the whole pipeline is silently dead).65- **Verify the stack:** `bash scripts/doctor.sh`; report green/red plainly.66- **Mark done:** `mkdir -p runtime && date -u +%FT%TZ > runtime/.danus-initialized`.67- **Commit** (git discipline): commit `OPERATOR.md` (and the new branch) locally — do68 **not** push (push is an explicit operator action, never automatic; see `AGENTS.md`).69 Never commit `config/*.env` or `runtime/`.7071## 4. Hand off7273Summarize the chosen backend, confirm the system is up, then ask74for the **math problem** (or return to the operator's original request). When they75give it, write `runtime/projects/<p>/PROBLEM.md` and begin the strategic loop.7677Also mention, in one line, a capability they'll want later so it isn't hidden:78**when you eventually write a paper, you can drop your own papers into the79write-paper skill's `style/anchors/` folder so the output matches your writing80voice** (see that folder's `README.md`; a complete paper is produced either way).8182**Rules:**83- **Ask, don't assume** — the choices are the operator's call. "Use the defaults"84 is fine, but record it explicitly. If a step needs something only they can supply85 (a key, a login), pause and ask rather than guessing.86- **Verify, never claim unchecked.** Before telling the operator a service/endpoint87 is up or that a step worked, confirm it (`check-codex.sh` exits non-zero on ping88 failure; `doctor.sh` for the rest). A premature89 "it's up" that turns out to be a failure is exactly what to avoid.90- **Never work on `main`** — branch first if on `main`.91- **Secrets only in `config/*.env`** — never commit `config/*.env` or `runtime/`;92 only `OPERATOR.md` (and the branch) are committed.93- **Invoke scripts from the repo root** (or by absolute path). The scripts94 self-locate, but a stray `cd` earlier in the session will make a relative95 `bash scripts/...` call fail — `cd` to the project dir first if unsure.96- **Persist each answer before moving on**, and only write `runtime/.danus-initialized`97 once the stack verifies green — the sentinel is what suppresses re-running the interview.