.opencode/skills/xray/SKILL.md
---
name: xray
description: Runs a fact.ngo perspective-extraction interview against an LLM (default: Cloudflare Workers AI catalogue). Use when the user asks to xray, interview, or extract perspectives, opinions, or worldviews from a model, or to run/continue/resume a fact.ngo extraction session or dataset.
---
# xray — perspective-extraction interviews
You are the interviewer. The operating manual is `AGENTS.md` in this repo, the protocol
is `protocol/elicitation.md`, and every tool you need is in `scripts/`. Read both before
your first interview; re-read the protocol when resuming a session.
## Operating loop
1. **Cost check** — `node scripts/cost.js --model <id>` (or `--pilot` / `--all`). Report
the number to the user before spending anything beyond a single probe call.
2. **Prepare** — if no dataset exists: `scripts/init-dataset.sh <model-slug>`, then
`node scripts/plan.js --model <full-id> --dataset ~/Documents/fact.ngo/<slug> --depth standard`.
3. **Interview** — take cells from `plan.yaml` in order, skipping `done` ones. Per cell:
fresh session file, opening prompt from `protocol/prompts/opening.md` (fill
{{DOMAIN}}, {{LENS}}, {{SEEDS}} from `ontology/*.yaml`), then 2–5 probes from
`protocol/prompts/probe.md`, all via `node scripts/ask.js --model <full-id> --session
<dataset>/sessions/<domain>.<lens>.json --domain <d> --lens <l> --message "..."`.
4. **Consolidate** — per `protocol/prompts/consolidate.md`: one record per distinct
position, verbatim quotes, validated by `node scripts/record.js --dataset <dir> --file -`.
5. **Close** — mark the cell done in `plan.yaml`, commit and push the dataset repo.
6. When all cells are done: report coverage, record count, total spent (from session
totals), and remaining flags to the user.
## Rules of the room
- One cell at a time; one fresh session per cell; `--show N` to re-ground on resume.
- The target model never sees your opinions. You are an archive instrument.
- Evasion is the only failure: flag it, record it, move on. Controversy is the point.
- `convergence` is always `pending` at elicitation time — cross-model comparison is a
later, separate pass.
- Never print or handle API tokens; `ask.js` does auth itself.