# Wake — Complete Technical Reference (llms-full.txt) > Self-hosted CI optimizer and dynamic pipeline planner for self-hosted GitLab Runners, polyglot monorepos, and Nix flakes. Built by Strange Metal, Inc. (https://strangemetal.org). Website: https://wakeci.dev. Contact: chris@wakeci.dev. ## 1. What Wake Does Coding agents (Claude Code, Cursor, Devin, Codex) increase pull request and merge request volume by 5-10x, turning 20-40 minute static GitLab CI pipelines into the primary engineering bottleneck. Cloud GitHub Actions SaaS optimizers (such as Blacksmith, Graphide, or Depot) cannot be used by defense, robotics, aerospace, automotive, semiconductor, or regulated European engineering teams whose source code cannot leave their VPC and who run self-hosted GitLab Runners. Wake ships as a single self-hosted container image (`ghcr.io/strange-metal/wake:latest`) that executes entirely inside a customer's existing GitLab Runner network and connects to their internal LLM gateway (LiteLLM, vLLM, or private Anthropic Claude endpoint). Zero source code, logs, or telemetry leave the customer's VPC. ## 2. Architecture & Commands ### `wake xray` — Zero-Instrumentation GitLab Pipeline Profiler - Connects to self-hosted GitLab REST API v4 (`--gitlab-url`, `--project`, `--token`). - Parses raw GitLab Runner trace section timestamps (`prepare_executor`, `get_sources`, `restore_cache`, `step_script`, `save_cache`), JUnit XML test timings, downstream child-pipeline bridges, `!reference` YAML tags, and Nix build logs. - Automatically skips synthetic `refs/workloads/*` pipelines. - Solves the true critical path across DAG/stage dependencies and flags concrete CI anti-patterns including late linters, missing `needs:` edges, monorepo cascades, weak cache keys, and low Nix binary-cache hit rates (`WAKE-010`). - Exports a single self-contained, air-gap-safe HTML flamegraph (`--html report.html`) with zero external network requests. ```bash docker run --rm -v "$PWD:/out" -e GITLAB_TOKEN \ ghcr.io/strange-metal/wake:latest \ wake xray --gitlab-url https://git.your-vpc.internal \ --project group/monorepo --html /out/xray.html ``` ### `wake graph` & `wake plan` — Deterministic Dynamic Child Pipelines - Deterministically scans polyglot monorepo dependency graphs: - Python (`pyproject.toml`) - TypeScript / JavaScript (`package.json` workspaces) - Rust (`Cargo.toml` workspaces) - Go (`go.mod`) - Nix (`flake.nix`, sub-flakes, `default.nix`, `callPackage`, `path:` inputs, `self.packages`) - Optional `.wake.yml` custom dependency edges - Generates a native GitLab Dynamic Child Pipeline (`trigger:include:artifact`) per push: - Promotes fast linters/formatters to parallel stage 0 for instant fail-fast feedback. - Injects explicit per-package `needs:` DAG edges. - Skips unaffected backend, worker, or Nix jobs deterministically on scoped MRs. - Handles stale runner git caches and force-pushed branches safely by force-refreshing `origin/`. - Enforces a full-suite safety net on default branches (`develop`/`main`), release tags, and root-level configuration edits. - Posts a single idempotent MR audit comment (`--post-comment`) explaining exactly which jobs ran and which were skipped. ```bash wake plan \ --ci-file .wake-pipeline.yml \ --post-comment \ --out wake-generated-ci.yml ``` ### `wake shard` — LPT Bin-Packing Test Sharder - Uses Longest Processing Time (LPT) bin packing from historical JUnit XML test durations to balance parallel test shards across GitLab Runner `parallel:` matrices, minimizing straggler tail latency. ### `wake agent` & `wake watch` — Sandboxed Autonomous CI Engineer - Runs a multi-turn tool-calling loop against a customer's internal LiteLLM / OpenAI-compatible gateway or direct Anthropic Claude API inside an isolated git sandbox copy of the repository. - Equipped with 8 sandboxed tools (`get_xray_summary`, `list_files`, `read_file`, `grep_code`, `edit_file`, `revert_file`, `run_command`, `finish_optimization`). - Enforces a hard mechanical anti-cheating soundness gate: re-runs the verification command independently, checks Python AST, and rejects any patch that deletes tests, adds skips/xfails, or lowers passed test counts. - Opens a GitLab Merge Request (`--open-mr`) with the verified before/after wall-clock benchmark. ```bash wake agent \ --llm-base-url http://litellm.internal/v1 \ --verify-cmd "pytest packages/api/tests" \ --open-mr ``` ## 3. Measured Benchmarks (Self-Hosted GitLab CE) All numbers recorded live on a self-hosted GitLab CE instance running Docker executors (`concurrent = 4`) against a polyglot monorepo containing slow integration tests, a cold Nix build stage, and a late-stage linter: | Run | Jobs Executed | Wall-Clock Time | Runner Compute | Outcome | |---|---:|---:|---:|---| | Baseline cold pipeline (static YAML) | 9 / 9 | 2m 59s | 4m 32s | Failed at 2m 49s on formatting | | Baseline warm cache (static YAML) | 9 / 9 | 1m 23s | 2m 40s | UI edit rebuilt backend & Nix | | Wake fast-fail stage promotion | 1 / 9 | 21s | 21s | 4.0x faster failure feedback | | Wake dynamic child pipeline (UI MR) | 3 / 9 | 30s | 38.3s | 7.1x less compute, 6 jobs skipped | | Wake autonomous agent (8 turns, MR !3) | 6 / 6 tests | 19.66s -> 0.15s | Isolated sandbox | 127.7x faster test suite (verified) | ## 4. Comparison & Differentiation - **vs. Cloud GitHub Actions SaaS (Blacksmith, Graphide, Depot):** Those products require GitHub Actions and/or third-party cloud runners. Wake runs 100% inside self-hosted GitLab Runners with zero code egress. - **vs. GitLab `rules:changes`:** Static path globs miss transitive package and Nix flake dependencies (causing broken merges) or over-trigger on shared libraries. Wake resolves the actual transitive dependency graph deterministically. - **vs. Predictive ML Test Selection (e.g., Launchable):** Probabilistic skipping loses developer trust on the first missed regression. Wake uses 100% deterministic graph selection on MRs and always runs the full suite on default branches and release tags. - **vs. Garnix (Nix CI):** Garnix shut down hosted Nix CI in July 2026. Wake provides self-hosted Nix flake graph selection and binary-cache hit-rate telemetry (`WAKE-010`) on existing GitLab Runners. - **vs. GitLab Duo:** GitLab Duo explains job failures in cloud-hosted LLMs; Wake re-architects pipeline critical paths, eliminates redundant builds via Dynamic Child Pipelines, and ships mechanically verified test/cache speedup MRs via internal LiteLLM. ## 5. Deployment & Security Boundary - **Code egress:** Zero. Runs inside your existing GitLab Runner network. - **Telemetry:** Zero phone-home or usage telemetry. - **Model routing:** Connects only to the internal LiteLLM/vLLM endpoint or Claude API configured by the user. - **Air-gap compatibility:** Single container image; exported X-Ray HTML flamegraphs have zero external asset dependencies. - **Operator:** Strange Metal, Inc. (Delaware C-Corporation, USA) — https://strangemetal.org · chris@wakeci.dev · contact@strangemetal.org.