One brief at night. One sourced visual object in the morning.
Six bounded roles, exact API receipts, and a human publishing gate.
Overnight is a six-bot workflow for producing sourced non-fiction short-form media. The repository contains the bot instructions, a safe roster installer, a strict work-card format, validation tests, and a static gallery generator. It contains no claimed completed work, credentials, generated media, or public posting automation.
The Overnight group uses the current Grok Bot group limit of six participants and assigns one stable boundary to each:
- Chief coordinates only and has zero tools.
- Researcher produces claims, facts, uncertainty, and HTTP(S) sources.
- Director turns approved evidence into a timed treatment and shot plan.
- Render alone uses
imagine-mcp, creates assets, and records every billable attempt. - Editor independently approves or rejects the candidate.
- Publisher writes the work card and publication package, announces the human gate, and stops.
The sequence is strict:
flowchart LR
H["Human brief<br/>+ spend cap"] --> C["Chief<br/>coordination only"]
C --> R["Researcher<br/>claims + sources"]
R --> D["Director<br/>script + shot plan"]
D --> X["Render<br/>Imagine MCP only"]
X --> E{"Editor<br/>quality gate"}
E -->|reject plan| D
E -->|reject execution| X
E -->|approved| P["Publisher<br/>card + package"]
P --> G{"Human<br/>public approval"}
Chief may route a planning rejection back to Director. No stage may silently perform another role. The six-member design fills the product's group-chat limit; adding a seventh specialist requires a separate workflow rather than weakening a boundary.
imagine-mcp is the render
boundary. foreman is the optional
observability layer that detects stalled or looping crew work without
pretending to know Grok Bot token spend.
Overnight has three distinct gates:
- Spend gate: Render makes no paid xAI API call without an explicit per-run human budget.
- Editorial gate: Publisher receives a run only after Editor explicitly says
APPROVED; Editor can returnREJECTEDrepeatedly. - Public gate: Publisher writes the card and public package, prints
HUMAN APPROVAL REQUIRED — NOTHING HAS BEEN PUBLISHED, and stops. Posting, uploading, scheduling, deploying, committing, and pushing remain human actions.
A routine schedule, budget approval, or Editor approval is never public-publication approval.
Node.js 20 or newer is required. There are no runtime dependencies.
./init.shinit.sh validates works/ and builds site/dist/index.html. It does not invoke gbot, Grok, imagine-mcp, or a network service. Open the generated HTML directly or serve site/dist/ with a local static server.
Other commands:
npm run validate # validate every works/*/card.json and local asset path
npm test # card and aggregation tests
npm run build # rebuild the static gallery
./test.sh # validation, tests, and build
./stop.sh # no-op; no background server is startedThe gallery is honest when empty. Its summary contains only work count, the exact xAI API cost recorded in cards, and total wall-clock minutes. It has no scores, verdict badges, or synthetic examples.
vercel.json builds the same static output and publishes site/dist/. A
deployment does not connect to Grok Bot or grant publishing access; it only
serves schema-valid work cards already committed to this repository.
This is a real-account mutation and is deliberately separate from local setup. Review all six files under bots/ first.
On macOS, install Node.js 18+ and the current grok-bot-cli, open the Grok Bot app, and sign in. Then run, yourself:
./setup/install.shThe installer:
- requires macOS, Node.js 18+, and
gbot; - reads the current roster via
gbot --json bots listandgbot --json groups list; - creates missing Overnight bots and updates instructions on exact-name matches;
- creates or updates the
Overnightgroup, then sets its membership to exactly the six managed bot IDs; - aborts on duplicate exact names or arbitrary CLI/JSON errors;
- never deletes a bot or group; and
- does not configure MCP, create a routine, send a message, or publish.
Setting exact group membership can remove unrelated members from an existing group named Overnight, but it does not delete those bots. Use setup/manual.md for non-macOS or fully manual setup.
Do not run setup/install.sh in CI or repository validation.
Set up imagine-mcp according to
its own documentation. Configure a private x-mcp-secret header on both ends,
then enable the MCP connection for Overnight Render only. Never put the
secret in this repository or a bot conversation.
See mcp/README.md for the boundary and connection checklist.
After a no-spend dry run:
- Open Overnight Chief's routine controls.
- Set
21:00and choose the intended time zone explicitly. - Require a fresh human topic, source constraints, target runtime, and per-run spend cap.
- Preserve the Researcher → Director → Render → Editor → Publisher sequence.
- Stop on missing evidence, spend approval, assets, or editorial approval.
- Keep public posting manual.
The installer prints the same manual handoff at completion and does not create the routine.
Each real contribution lives at works/<date-and-slug>/card.json. Optional poster/video files stay inside that same directory. The validator rejects traversal, absolute or external local paths, URLs in asset fields, symlinks, missing assets, and unsupported browser-media formats.
Before opening a pull request:
- Use the full Render ledger, including billed retries, for
cost_usd. - Add only claims backed by the listed sources and assets approved by Editor.
- Omit media paths when files cannot be contributed; never add placeholders.
- Run
./test.sh. - Inspect
site/dist/index.html.
GitHub Actions performs locked install metadata setup, shell syntax checks, schema-equivalent card validation, tests, and a gallery build on every pull request. See works/README.md, works/card.schema.json, and COST.md.
- No secret belongs in bot instructions, work cards, gallery output, or git.
- The publisher never calls a real account.
- Costs cover observable xAI API media/TTS usage, not unobservable Grok Bot subscription credits.
The repository is MIT licensed. Fork the workflow and its prompts, but keep the evidence, spend, editorial, and public-action gates intact when describing what your version can do.