Install

Install Dark Factory
in three pieces.

A server-side critic on every PR, a local critic on every commit, and the matching agent context (CLAUDE.md / AGENTS.md / .claude/agents) wired into the repo. Each step is independently useful — install the gate without the agent context, or scaffold a product with the full set out of the box.


01

Install the GitHub App

momentiq-dark-factory on GitHub Apps. Once installed on a repo, every pull request runs through the multi-vendor adversarial critic (Cursor, Codex, Gemini, Grok, MiniMax) and a verdict lands as a check run. Calibrated prompt overlays are the hosted IP; every bypass is a logged, attributable audit event.

Install on GitHub →

02

Install the CLI + hooks

The local critic complements the GitHub App — it runs against every commit before the push, so most quality issues never reach CI. Subscription auth where possible (Cursor + Codex CLIs already logged in), API key fallback where not.

install bash
npm install --save-dev @momentiq/dark-factory-cli husky

Initialize hook infrastructure:

init bash
npx husky init            # writes .husky/_ scaffold
git config --local core.hooksPath .husky

Declare the critic portfolio at .agent-review/config.json:

.agent-review/config.json jsonc
// .agent-review/config.json
{
  "version": 1,
  "critics": [
    { "id": "cursor-local-chief-engineer", "adapter": "cursor-sdk", "runtime": "local",
      "model": { "id": "gpt-5.5", "params": [/* ... */] } },
    { "id": "codex-local-chief-engineer", "adapter": "codex-sdk", "runtime": "local",
      "model": { "id": "gpt-5.5", "params": [/* ... */] } }
  ],
  "aggregation": {
    "policy": "min-complete-quorum",
    "blockingSeverities": ["blocker", "high"],
    "quorum": 2
  },
  "profiles": {
    "local": { "criticIds": ["cursor-local-chief-engineer", "codex-local-chief-engineer"],
               "quorum": 2, "auth": { "codex-local-chief-engineer": "chatgpt" } }
  }
}

Wire the hooks (pre-commit runs your project's build/test gate; post-commit runs df review in the background; pre-push reads the per-SHA artifact and blocks on blockers):

.husky/post-commit + .husky/pre-push bash
# .husky/post-commit — local critic runs in background per commit
nohup ./node_modules/.bin/df review --commit "$(git rev-parse HEAD)" --profile local \
  > .git/agent-reviews/post-commit.log 2>&1 < /dev/null &
disown || true

# .husky/pre-push — block pushes with unresolved critic blockers
./node_modules/.bin/df gate-push   # bypass: AGENT_REVIEW_BYPASS="reason" git push
03

Verify with df doctor

Reports node version, hook paths, core.hooksPath, per-adapter auth (subscription or API key), and model availability. All [OK] means the local critic loop is wired correctly — your next commit will fire the post-commit critic and your next push will be gated on its verdict.

terminal bash
npx df doctor --profile local

# Verifies node version, hook paths, core.hooksPath,
# per-adapter auth (subscription / API key), model availability.
# All [OK] = local critic loop is wired correctly.
04 — Optional

Get the agent context into your repo

The Dark Factory gate runs against your commits regardless of what AI agent (or human) authored them. To get the matching agent context — CLAUDE.md, AGENTS.md, GEMINI.md, .claude/agents/, and a cycle-doc planning skeleton — into your repo, pick the path that matches your starting point:

Spawning a new product? Use Sage — the scaffold ships the full agent context out of the box.

terminal bash
npx @momentiq/sage-cli init my-product \
  --product-name "My Product" \
  --primary-persona employer \
  --domain my-product.example

Retrofitting an existing repo? Use df onboard — analyses your repo and merges/scaffolds the agent context set against what's already there.

terminal bash
npx @momentiq/dark-factory-cli df onboard --apply

The agent context is what teaches Claude Code, Cursor, Codex, and Gemini what "correct" looks like in your product. The critic gate enforces it; the agent context guides what gets written in the first place. Together they close the loop.


Get Started

Need hosted CI + fleet dashboard?

The GitHub App covers the multi-vendor critic on every PR. The dashboard surfaces verdicts, per-critic findings, and per-PR cost across your fleet. SSO, SOC2 Type II evidence, BYOK, VPC deployment available.