{"success":true,"name":"brimind-codex-rails","description":"A task needs a sourced web answer, reading what is in a photo or screenshot, a real PDF/Word/Excel/PowerPoint file, a chart from numbers, a short story video for social, a second-opinion code review, or an image — use the Codex rails (ChatGPT Plus, flat fee, no token bill, no browser window) before improvising a pipeline, opening a browser, or asking the owner for a tool or a subscription.","category":"unitary","path":"unitary/brimind-codex-rails/SKILL.md","file":"SKILL.md","content":"---\nname: brimind-codex-rails\ndescription: A task needs a sourced web answer, reading what is in a photo or screenshot, a real PDF/Word/Excel/PowerPoint file, a chart from numbers, a short story video for social, a second-opinion code review, or an image — use the Codex rails (ChatGPT Plus, flat fee, no token bill, no browser window) before improvising a pipeline, opening a browser, or asking the owner for a tool or a subscription.\n---\n> Imported from [PRIVATE_HOST] `~/unitary/agents/skills/brimind-codex-rails`. Paths are relative to `[PRIVATE_HOST]:[PATH]`; run commands there via `ssh [PRIVATE_HOST] 'cd ~/unitary && ...'`. Owner send rules from skill i7-remote-ops still apply.\n\n\n# The Codex rails — one command per job\n\nOwner, 2026-10-07: *\"check the OpenAI Codex CLI, try all, … when each is done and\nverified, create a rail for it, add it as instruction and skill to the agent that\nneeds it.\"* Every rail below was run for real on 07/10 and its result checked.\n\nAll of them run `codex exec` through `agents/tools/codex-run.cjs`: inside the bwrap\nbox (`/home` hidden, every secret masked, Unitary **read-only**; a rail that writes\ngets only its own work folder), the policeman checks the model before and the\ntranscript after. A policeman block is a failure, never a delivered result.\nOutput lands in `agents/method/data/<rail>/` (inside `generated/`), each rail has a\n`log.jsonl`. Exit codes everywhere: **0 done · 1 refused (argument, policeman) ·\n2 unknown (no result, timeout)** — read the `✖` line, never loop on 2.\n\n| Need | Command | Time |\n|---|---|---|\n| **Web answer with sources** (prices, hours, a company, a market figure) | `node agents/method/search.mjs \"question\" [--json] [--lang fr] --agent <you>` | ~25 s |\n| **Read an image** (menu, card, sign, Maps photo, screenshot, error) | `node agents/method/see.mjs --image f.jpg --ask \"…\"` | ~10-20 s |\n| **Contact details from a photo** (business card, shop front, flyer) | `node agents/method/see.mjs --image card.jpg --contact` → JSON | ~15 s |\n| **Proof-read the text in a visual** before it is posted | `node agents/method/see.mjs --image post.png --check \"exact text\"` → exit 0 PASS / 1 FAIL + errors | ~10 s |\n| **A document file** — devis, proposal, report, deck, workbook | `node agents/method/doc.mjs --kind pdf\\|docx\\|xlsx\\|pptx --brief \"…\" [--data f.csv] [--image logo.png] [--json]` | 45 s-2 min |\n| **A chart / numbers report** | same rail: `--kind pdf` (matplotlib chart) or `--kind xlsx` (native Excel chart + formulas) with `--data` | ~45 s |\n| **A short story video** (Reel/TikTok/Short: shots + voice + captions + music) | `node agents/method/story.mjs --brief \"…\" [--scenes 4] [--vertical] [--lang fr] [--music f.mp3] --agent <you>` | ~4 min |\n| **Second-opinion code review** before you ship | `node agents/method/review.mjs --files a.mjs b.cjs` (or `--commit <sha>`, `--base <branch>`) → exit 3 = high/critical found | 2-4 min |\n| **An image** (generate, edit, transparent, exact FR/AR text) | `node agents/method/image.mjs --prompt \"…\" [--size portrait] [--ref logo.png] [--edit photo.png] [--transparent]` | ~1 min |\n\n## What each one guarantees (and what it does not)\n\n- **search** — every fact carries the URL it was read on; no source → exit 2, not\n  an answer. `unsure` says what could not be verified. Check one source yourself\n  before a figure goes in a client message. Free alternative: `omni search` (raw links).\n- **see** — reports only what is visible; `--check` fails on a single wrong\n  accent or digit (tested: it caught 1,800 → 2,500 DT). Up to 8 images per call.\n- **doc** — the file is opened by LibreOffice, its pages counted and its text read\n  back before it is published; a `.preview.png` of page 1 sits next to it. It never\n  invents figures: give the prices, names and numbers in `--brief` or `--data`.\n  Arabic and accents render (embedded DejaVu). Libraries missing → `node agents/method/doc.mjs --setup`.\n- **story** — Codex has **no video tool**. The rail writes a storyboard, draws shot 1,\n  then every other shot with shot 1 as reference (same characters and place), says\n  each line with your piper voice, zooms slowly on each shot, burns in captions\n  (not in Arabic: drawtext cannot join letters) and mixes the music 14 dB under.\n  The shots and `board.json` are kept in `<film>.shots/`. A motion-design film\n  (animated titles, 3D) is **not** this rail: that is Next.js (`brand-motion-design`).\n  Never name the music tool in client-facing text.\n- **review** — read-only; findings are file:line, severity, a concrete breaking\n  scenario and a fix. A review that could not read the diff fails (exit 2) instead of\n  saying \"no defect\". It found 7 real bugs in these very rails on 07/10. It does not\n  fix: the fix is yours, then run the tests.\n\n## Chain them\n\n- Visual for a post: `image.mjs` → `see.mjs --check \"the text\"` → post only on exit 0.\n- Prospect recon: Maps photo → `see.mjs --contact` / `--ask \"price list?\"` → `search.mjs`\n  for the facts the photo cannot give → the two facts the message needs.\n- Devis: facts from the chat → `doc.mjs --kind pdf --brief \"…\" --image \"Media metrials/icons and logos/icon-512.png\"`.\n\n## Not here\n\nAudio and transcription (Codex has neither in `exec`): use `voice.mjs` / whisper.\nBuilding or changing code in Unitary is the **Codex engine** of the Team tab, not a rail.\n","linked_files":[],"origin":"brimind","owner_id":null,"source":"router"}