olympus

agent
Guvenlik Denetimi
Uyari
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 6 GitHub stars
Code Gecti
  • Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Open-source software factory runtime. Agents write the code; Olympus runs the checks, keeps the evidence, and gates the merge.

README.md

Olympus: done is earned, not reported. An open-source software factory. Agents write the code; Olympus runs the checks, keeps the evidence, and gates the merge.

Olympus

Olympus is a software factory runtime: a provider-neutral engine that carries
work from intent to merged code through a fixed line of stations, where policy
decides when work advances.

This is the v2 rewrite, on the v2 branch. main is the frozen v1 line and
nothing here builds on it.

Mission and claim

Mission. A fully autonomous software factory that defines, builds, and
ships working code.

Claim, today. Olympus produces auditable, tamper-resistant evidence that
autonomous work is real, so that a false-done failure is caught at the gate
rather than reported as done: the runtime derives what happened from checks it
ran itself, and a model's own account of its work is stored as a claim beside
the evidence, never as the verdict. That it measurably reduces false-done
failures is not asserted. Outcome measurement (R2) derives the rate from
finished runs, and the claim waits for that number from real runs.

The two are kept apart on purpose. The runtime is designed for the mission and
only the claim is asserted. Olympus does not claim lights-off autonomy. Every
autonomy level is capped by a policy file a human authors, an approval the
policy leaves unstated resolves to human-required, and the highest level is
not part of the first milestone.

Open-source boundary

Everything in this repository is MIT licensed and stays MIT: the runtime, the
contracts, the drivers, the conformance kit, and the command line. See
LICENSE.

The hosted control plane is a separate product in a separate repository.
Nothing in this repository depends on it, and no capability here is gated by
it.

Status

M1 is complete. The line runs end to end, from intake through
integrate: real sandboxes, a locked Vault, the Claude Code driver, verified
evidence, tamper detection, cost bounds, an enforcement record, and a merge
that is gated by all of them.

M2 is in progress. A merged run now enters observe, where it is watched
until its observation window closes. learn is not entered yet.
docs/plan/STATUS.md lists every unit and whether it is
done; it is generated, and a test fails when it falls behind.
node scripts/unit-status.ts prints the counts and the units ready to start.
docs/plan/DECOMPOSITION.md defines each unit.

How the line works

One task moving through Olympus. Olympus locks the tests and hands the task to an agent, which writes the code and claims it is done. Olympus runs the checks itself in a fresh sandbox, and a reviewer from a different model family reviews the change. The gate reads the locked tests, the claim, the check results, and the review verdict from the Vault, and either merges the work or sends it back.

Agents write the code; Olympus runs the checks, keeps the evidence in the Vault, and decides at the gate. The picture is simplified to six steps. The full line is below.

Work moves through ten stations, in order:

# Station What happens
1 intake A trigger enters. The payload is data inside an envelope; it selects a pre-declared template and supplies parameters only.
2 spec One shippable capability is written and locked.
3 test-design A black-box acceptance oracle is written against the spec and locked.
4 plan A task graph is emitted.
5 build Tasks run in sandboxes. Agents write only to their workspace.
6 verify The runtime runs the pinned checks in a fresh sandbox and collects evidence.
7 review Reviewers that never share the author's model family.
8 integrate Merge, gated by evidence and integrity.
9 observe Post-merge signals. A merged run is watched until its observation window closes.
10 learn What the next run should do differently. Not entered yet (R11).

Four autonomy levels bound how far a run may advance without a person:
L0 manual, L1 supervised, L2 delegated, L3 autonomous. The effective
cap is the tightest of the global cap, the station's cap, and the role's own
ceiling. Asking for more than policy allows is refused, never quietly
lowered.

Two places hold state. The Vault is the runtime-only store for everything
an agent must not be able to alter: locked specs and tests, policy, evidence,
violations, run state. The Workspace is the ephemeral, agent-writable
sandbox. The boundary between them is enforced where the sandbox is mounted,
not in application code.

The invariants

Ten rules the whole design rests on. None may be violated to make a task
easier; a change that does is wrong regardless of what it enables. Each maps
to executable assertions in the invariant registry,
and CI fails if any invariant has none.

Invariant Registry
I1 No agent writes to the Vault. Any level, any repo, any role. Enforced at the mount layer. i1.ts
I2 The runtime derives status; the model never reports it. TaskResult has no status field. i2.ts
I3 An agent may not be judged by an artifact it can write. Specs and acceptance tests are hashed before build. i3.ts
I4 Default deny. A capability not granted in policy is unavailable. i4.ts
I5 Fail closed. A missing check, missing capability, unsupported stack, or shrunken suite is a refusal, never a warning. i5.ts
I6 Reviewers never share the author's model family. The family is explicit, never inferred. i6.ts
I7 Event payloads are data, never instructions. Untrusted text never enters a prompt. i7.ts
I8 Every capability claim maps to an executable assertion that fails when the capability is deleted. i8.ts
I9 The runtime is a service; the CLI is a client. Nothing in core assumes a terminal. i9.ts
I10 Greek names never appear in code. Documentation and CLI output only. i10.ts

Run pnpm conformance to print the registry: which invariants are asserted,
partial, or pending, which unit owes each pending assertion, and how every
pending count compares with the committed baseline that CI ratchets it
against.

Repository layout

packages/
  core/         runs, tasks, the driver contract, policy, stations
  vault/        locked artifacts, evidence bundles, run state
  integrity/    checks, results, tamper analysis, violations
  sandbox/      the mount table and the sandbox provider contract
  triggers/     the untrusted-input envelope
  adapters/     per-stack test, coverage, mutation, behavioral hooks
  readiness/    the autonomy ceiling a repository supports, from probes that ran
  compiler/     the roles a person wrote, compiled and versioned by hash
  benchmark/    the false-done benchmark: seeded false-dones and clean controls, carried through the line
  api/          the runtime as a service: the line, the HTTP API, factory-host
  cli/          the command line, a client of the HTTP API and nothing more
  conformance/  the kit that proves invariants, and the registry
  drivers/
    claude-code/  the Claude Code CLI, run inside a provisioned sandbox
    codex/        the Codex CLI, run inside a provisioned sandbox
    openai-compatible/  any OpenAI-compatible chat endpoint; the loop on the host, every tool in the sandbox
docs/
  plan/         the spine, the decomposition into units, unit specs, and the status of every unit
  decisions/    every judgment call made while building each unit, one file per unit
  reviews/      external review findings and how each was resolved
  benchmark/    committed benchmark results
  proof/        recorded proof runs
  brand/        the banner, the diagrams, and the logo

Packages import each other only through their published entry, never through
a sibling's src/. core is the root of the graph.

Getting started

Requires Node 22 or later, pnpm 12 (the packageManager field pins the
exact version), and a Docker daemon. Without Docker the suites fail rather
than skip: the Vault boundary is enforced where the sandbox is mounted, and
there is no way to observe that without a container.

pnpm install
pnpm typecheck     # every package, strict
pnpm lint          # one ESLint configuration for the whole workspace
pnpm test          # every package's tests
pnpm conformance   # the invariant registry and its report

CI runs these four on every push and pull request to v2, along with the
maintainer tooling's own typecheck and tests. node scripts/local-check.ts preflight runs the quick subset for the packages a branch changed, and
node scripts/local-check.ts full runs everything in the order CI does. On a pull request, the tests
that call a paid model run only once a maintainer applies the run-driver
label, and the registry fails until they have run for that tree. A push
reuses the report of an earlier run of the same tree.

Run Olympus

The runtime runs as a service. The factory-host executable serves the HTTP
API and is configured only from its environment. The olympus-ai command
line is a client of that API and nothing more.

Supported hosts

  • Linux or macOS, with Node 22 or later, git, and a Docker daemon.
  • Windows: WSL2 (recommended). Run the host inside a WSL2 distribution,
    with Docker reachable from it.
  • Windows, native: Developer Mode required. A run's base is copied with
    its symbolic links kept as links, and native Windows lets a process create
    one only with Developer Mode on (Settings, System, For developers). The
    host checks this before it listens: it creates and removes one link under
    FACTORY_TREES, and refuses to start if that fails. Links are never
    emulated; a junction links only directories, and a link stored as a file
    would change the hash the locks are taken over.

Install

Neither package is published to npm yet. From a checkout, build, pack, and
install both executables into an empty directory:

pnpm install
node scripts/local-release.ts ~/olympus
export PATH="$HOME/olympus/node_modules/.bin:$PATH"

In PowerShell:

pnpm install
node scripts/local-release.ts $HOME\olympus
$env:Path = "$HOME\olympus\node_modules\.bin;$env:Path"

This is the path CI tests: it installs the same tarballs npm would publish,
then starts factory-host and drives it with olympus-ai.

Configure the host

factory-host reads these variables and no others, from its environment and
from the file --env-file <path> names; factory-host init writes that file
(see First run). .env.example lists them with comments. A
missing or invalid one stops the host before it listens, and the host prints
every problem in one list.

Variable Required Secret Purpose
FACTORY_API_TOKEN yes yes The local token every request must bear, at least 32 characters.
FACTORY_LISTEN_PORT yes no The port the API listens on.
FACTORY_LISTEN_HOST no no The address the API listens on. Default 127.0.0.1.
FACTORY_POLICY_FILE yes no The policy.yaml every run is admitted under.
FACTORY_ROLES_DIR yes no The roles directory seats are compiled from, outside the repository and the trees.
FACTORY_RUBRICS_DIR no no The rubrics a drafting run's critics are given. Unset, a run that drafts is refused at admission.
FACTORY_VAULT_STORE yes no The directory the Vault owns.
FACTORY_REPOSITORY yes no The git working copy runs are admitted from. create --workspace names this path.
FACTORY_TREES yes no Where each run's trees are kept. It must allow symbolic links.
ANTHROPIC_API_KEY yes yes The model key, held by the host's relays and given to no sandbox.
FACTORY_PRINCIPAL no no Who a request bearing the token is, as approvals record it. Default local.
FACTORY_GIT_REPOSITORY yes no The GitHub repository a passed run merges into, as owner/name.
FACTORY_GIT_BASE_BRANCH yes no The branch a passed run merges into.
FACTORY_GIT_TOKEN yes yes The token that merges, held by the host and given to no sandbox.
FACTORY_CONTAINER_UID no no The uid sandboxes run as. Both or neither with the gid. Required on a host with no uids, such as native Windows, where the host refuses to start without it; any non-root uid works there, and init writes 1000.
FACTORY_CONTAINER_GID no no The gid sandboxes run as.
FACTORY_ENDPOINT_CONFIG no no A JSON file naming an OpenAI-compatible endpoint and the seats it fills.
FACTORY_ENDPOINT_KEY no yes That endpoint's credential. Not set for an endpoint declaring scheme none.
FACTORY_CODEX_SEATS no no The seats the Codex driver fills, comma-separated. Both or neither with its key.
FACTORY_CODEX_KEY no yes The OpenAI key the Codex relay is given.
FACTORY_CHECKS_TOKEN no yes Reads check runs, for runs with an observation window. Unset, such a run is refused when its window closes.
FACTORY_WEBHOOK_* no yes Each webhook subscription's secret, by the full name the policy gives it. Unset, that subscription verifies no delivery.

The command line needs only the API's address and token: --url and
--token, FACTORY_API_URL and FACTORY_API_TOKEN, or --env-file
naming the host's file, from which it reads both. One command reads two
more: telemetry takes its collector from --endpoint and --header, or
from OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_EXPORTER_OTLP_HEADERS.

Configure policy

Policy decides what a run may do; anything it does not grant is unavailable.
examples/ holds a working set, and a test admits runs under it,
so it stays current:

  • examples/policy.yaml: a commented policy for a
    supervised (L1) run. It caps every run at L1; a person approves the spec,
    the acceptance tests, and the merge; the stations between run on their
    evidence. It declares the build and review roles, and the four drafting
    roles a run that drafts its spec or tests needs. Its installRegistries
    lets the runtime install a repository's dependencies: before any check
    runs, it installs the lockfile (package-lock.json or pnpm-lock.yaml,
    every package pinned by hash) in a sandbox of its own with no lifecycle
    scripts, and the checks run over that install with no network. A
    repository that declares dependencies under a policy granting no registry,
    or with a lockfile that is missing or unhashed, is refused, and so is one
    whose lockfile links a package to a directory of the repository (an npm or
    pnpm workspace, a file: directory) or patches one: either would put code
    the change can write where a check loads a dependency.
  • examples/roles/: the instructions for each seat. A role
    named in the policy must have a file here. Point FACTORY_ROLES_DIR at a
    copy you own, outside the repository.
  • examples/rubrics/: what the critics of a drafting run
    check a draft against. Point FACTORY_RUBRICS_DIR at a copy.
  • examples/run/: the files create reads for one small
    change: a spec, the acceptance tests, the verification manifest
    (verify.json, the checks the runtime runs, one of which must fail on the
    base commit), the spec's security part, and the task graph.

A role's tools are the driver's own names, case and all. The Claude Code
driver, which fills every seat not given to another driver, declares Read, Write, Edit, Bash, and
the rest of its CLI's built-in tools; create refuses a run that grants a
seat a tool its driver does not declare, naming the role and the tool. Each
role's budget is per task, and maxTokens counts the tokens a model reads
from its cache: a model reading the repository spends most of its tokens
there. The example gives the builder, the reviewer, and each drafter
1000000, and each critic 200000.

A run can draft its task graph too: create --draft-plan in place of
--graph. A planner then reads the locked spec and the repository at plan
and proposes the build tasks and their order; the runtime adds the review
itself, a critic checks the proposal against rubrics/plan.md, and the gate
at plan passes it, a person at L1, before any task is built. The example policy does not grant
this. To grant it, add a planning key naming the most build tasks a
drafted graph may hold and the roles a planner may seat them under, and a
scope at plan for the roles planner and plan-critic, with no egress:

planning:
  maxBuildTasks: 4
  roles: [builder]

Copy planner.md and plan-critic.md from
packages/compiler/roles/ into your roles
directory. The cost create prints for such a run is the bound's worst
case: that many build tasks under the costliest role listed, plus the
planner, its critic, and the review. A drafted graph past the bound, or
naming another role, is sent back and never run.

Every run is scanned by two security checks the manifest must pin, each with
the scanner image the runtime declares for it:

  • secret-scan runs gitleaks
    (zricethezav/gitleaks@sha256:0e99e8821643ea5b235718642b93bb32486af9c8162c8b8731f7cbdc951a7f46).
    config may be null, for gitleaks' default rules, or a gitleaks TOML
    config as a string.
  • static-analysis runs Semgrep
    (semgrep/semgrep@sha256:30e6afa99ebd8e7b4115d4904898108eb4bf77025819e9263f09cf14e6f6e549)
    on a repository whose stack has a static-analysis scanner: today one with
    a package.json. config is required, a string holding Semgrep rules
    YAML. On a repository without one, delete this check from the example's
    verify.json; pinning it there is refused.

A finding the change adds fails the run; one the base already had does not.

First run

factory-host init writes everything a first run needs, so no file is written
by hand. Run it in your repository's working copy, naming the branch a passed
run merges into (it is never guessed):

factory-host init --base-branch <branch>

It reads the repository's stack with the same detector a run uses: vitest or
jest declared in package.json, or pytest. A repository with none, or with
two, is refused, naming what was found. It refuses to overwrite any file that
exists, and then writes nothing at all. It writes:

  • in ~/.factory/ (another directory with --config-dir), outside the
    repository and every tree a model can write: policy.yaml, the
    example policy, at L1, where a person approves the
    spec, the acceptance tests, and the merge; roles/ and rubrics/, the
    examples' own; host.env, every variable the host needs except the two
    secrets below, with a generated API token, and on native Windows
    FACTORY_CONTAINER_UID and FACTORY_CONTAINER_GID as 1000; and the
    empty vault/ and trees/ directories host.env names.
  • in the repository, .factory/verify.json, the checks the runtime runs
    (the stack's tests, secret-scan, and static-analysis), and
    .factory/graph.json, one build task and its review. You need not commit
    them.

It ends by printing the next two commands. Start the host with the model key
and the git token set in its environment. In bash:

export ANTHROPIC_API_KEY=<key> FACTORY_GIT_TOKEN=<token>
factory-host --env-file ~/.factory/host.env

In PowerShell:

$env:ANTHROPIC_API_KEY = "<key>"; $env:FACTORY_GIT_TOKEN = "<token>"
factory-host --env-file $HOME\.factory\host.env

factory-host --env-file reads the file through the same table as its
environment: a name the host does not read is refused, and so is one set in
both with different values. Before it listens it asks the model provider
whether it accepts ANTHROPIC_API_KEY, with one request that spends nothing,
and does not start on a key the provider rejects or one it could not check.
Once it listens it prints one line, and stays in the foreground until Ctrl+C:

factory-host: listening on http://127.0.0.1:7300, admitting runs from /path/to/repo; stop with Ctrl+C

In another terminal, from the repository, start the run with the create
command init printed, which has your workspace filled in, with your intent
in place of <what to change>. Its shape:

olympus-ai --env-file ~/.factory/host.env create --workspace /path/to/repo --base-commit <full sha of HEAD> \
  --level 1 --draft-spec --draft-tests --intent "<what to change>" --manifest .factory/verify.json --graph .factory/graph.json

git rev-parse HEAD prints the full sha in either shell. Every command takes
--env-file, which gives it the host's address and token; --url and
--token, or FACTORY_API_URL and FACTORY_API_TOKEN, do the same.

The first create starts nothing. It checks everything it can refuse a run
for, the manifest and the tool grants included, and then prints the run's
worst-case cost: the most it could spend, in US dollars, if every task used
every call and every retry its role's budget allows. Approve that exact
figure by running the same command again with --approve-cost <usd>.

Then follow it with olympus-ai status <run id> or events <run id>. When
status shows the run awaiting approval, pass the gate with
olympus-ai approve <run id> <station>:1. At spec and test-design, which
were drafted, read the draft first: olympus-ai draft <run id> spec (or
test-design) prints its files, its open questions and assumptions, its
hash, and the approve command for it, which adds --draft <hash>. To send
it back instead, olympus-ai reject takes the same hash.
olympus-ai report <run id> prints what it cost
and what was decided. Every command prints its flags with
olympus-ai <command> --help.

The other commands:

Command What it does
cancel <run id> Stops a run.
outcomes [--from <time>] [--to <time>] Safety and throughput rates over every run, each with its sample and bound.
findings Every located review, critic, and nightly finding, and whether it is open, addressed, or dismissed.
dismiss-finding <finding id> --cause <cause> Records that a finding will not be worked, with a cause and no text.
telemetry <run id>... A finished run as OTLP/JSON traces and metrics, printed or sent to a collector.
readiness [--revision <rev>] The autonomy ceiling the repository supports at a commit (see Readiness).

A run is built over the tree of --base-commit as git stores it, never over
the working copy: nothing uncommitted, untracked, or ignored there (a .env,
node_modules/, a build output) reaches a model, and uncommitted changes do
not matter to a run. The one exception is the run's own files, the ones
create names: they join that tree with the bytes create read. If you
commit them, commit them as they stand, since a committed run file whose
bytes differ from the working copy's (on a core.autocrlf=true checkout its
line endings do) is refused. A secret that is committed is in the tree; keep
it out of every model's tree with the policy's sensitivePaths.

When a model or sandbox call fails, the run retries it, and the failure is
recorded with the error's first 400 characters: events shows each one as it
happens, and a run stopped by its retries shows the last under
lastFailure in status. That text is the CLI's or the container's own
output, shown as it was written.

To write the run files by hand instead, examples/run/ holds a
set for one small change: a spec, the acceptance tests, a verification
manifest with a check that fails on the base, the spec's security part, and
the task graph. Copy it into the working copy and name its files to create
with --spec, --tests, --security-part, --manifest, and --graph.

Readiness

olympus-ai readiness [--revision <rev>] asks the host to scan
FACTORY_REPOSITORY at a revision (default HEAD) and prints the highest
autonomy level the repository can support, with every probe's outcome and
the probe that holds the ceiling. The scan installs and runs the repository's
checks in sandboxes and takes minutes. A scan calls no model and spends no
API credit: every probe's outcome is computed from what the runtime observes.
The sandboxes have no network access except during the install step, which
can only reach the package registries for the repo's stack (the public npm
registry or PyPI for Python lockfiles, by default) and no other hosts. It
writes nothing.

Admission runs the same scan on a run's base commit. A run that asks for a
level above that commit's ceiling is refused, never lowered, and the refusal
names the probe or the scan limit that holds the ceiling. Policy still caps
the level as before; the lower of the two binds.

Contributing

Work is cut into units that a contributor can finish and verify alone, without
running the whole factory. CONTRIBUTING.md has the rule
every unit follows, how to send a small fix, and how to write a conformance
suite with the kit. The units themselves are defined in
docs/plan: the spine, the decomposition, and a spec for each unit
that needs one, and STATUS.md, which says which units
are done. Decisions made while building each unit are recorded in
docs/decisions, one file per unit.

Questions, ideas, and things you built with Olympus go in
Discussions. Issues are
for work with a known shape; a discussion is the place to start when it does
not have one yet.

License

MIT. See LICENSE.

Yorumlar (0)

Sonuc bulunamadi