Skip to content
ottr-aiPublic

About

Provisions omp agent rules, skills, the omp user layer and per-project agent context from your own private data repo.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

374 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alate

Built with Ottr

"Alate (Latin ālātus, from āla ('wing')) is an adjective and noun used in entomology and botany to mean 'winged'" — the winged reproductive form of an ant. (Wikipedia: Alate)

alate — a smiling winged ant

alate provisions an omp agent on any machine: global agent rules, the omp user layer, and per-project agent-context snapshots. It ships no rules or user-layer content of its own. All content lives in your own private data repo, so the tool stays public and your rules and machine state stay private. Alate also ships the skills vendored from Ottr's .agents/skills at a pinned commit; see "Skills alate ships" below.

Quick start

  1. Clone alate, then copy examples/data into a new private GitHub repo. It is a starter template.

    git clone https://github.com/ottr-ai/alate && cd alate
  2. Capture: fill the repo from the machine that already runs omp.

    node sync-user.mjs --first --data /path/to/your-data-repo
    node sync-projects.mjs --first --data /path/to/your-data-repo   # optional
    git add . && git commit -m "capture" && git push

    Capture keeps a baseline state file per machine, outside the data repo: sync-projects.mjs at <workspace-root>/.alate/captured-projects.json, sync-user.mjs at <home>/.alate/captured-user.json. When only the snapshot changed elsewhere, the capture refreshes the project copy, or keeps the user snapshot for the next provision. The refresh passes a project .md/.mdc item through the hidden-character gate first. A laced snapshot keeps the machine copy, and the run exits with code 1. When a file changed on both sides, the run refuses with exit 1 and names both paths. A first capture with no baseline state refuses a machine file that differs from its committed snapshot, with both paths and both sha256 values in the report. The --first flags above adopt the machine copies instead: a fresh data repo from this template holds placeholders that the first capture replaces. On an established data repo, provision the machine first, and capture again. The state files are machine-local. Do not commit them.

    The data repo holds one canonical, OS-neutral form of every file: LF text, absolute JSON paths under the snapshot home /root, and file modes from the git index (git update-index --chmod=+x marks a file executable; the filesystem's exec bit never installs). A capture normalizes a Windows copy (CRLF text, C:\Users\... paths) into that form; a provision renders it for the target OS — LF text, CRLF *.cmd/*.bat, re-rooted home paths. The template's .gitattributes pins the same rules; see specs/canonical-form.md.

  3. Run the server:

    docker compose up -d
    docker compose logs alate   # first start prints: alate API key: <key>

    The named volumes keep the server key, the SQLite db, and the provisioned omp home across restarts.

  4. Open http://127.0.0.1:4570, import your repo as owner/name, and provision. When your repo sits on a GitHub Enterprise Cloud tenant (acme.ghe.com) or an Enterprise Server host, set ALATE_GITHUB_HOST to that host before you start the server, then import as <host>/owner/name. The token rides only to the ALATE_GITHUB_HOST host: without that setting, a private Enterprise clone fails, and alate remembers the attempted host, so the update check keeps querying github.com without a token.

Capture is the prepared way to get a usable setup. Docker Compose is the prepared way to run the server.

Local image builds on Windows

The compose file builds the image from this checkout (build: .). The repo pins LF in .gitattributes (* text=auto eol=lf), so git writes LF working files on Windows too. Git applies the attribute only at checkout. A checkout made before the .gitattributes commit keeps its old CRLF working files.

The Dockerfile copies the whole checkout into the image. The SkillSpector baselines for the vendored skills are fingerprints over LF bytes, so a CRLF vendored skill fails the scan at provision time. Commit or stash your changes first. Then run this once to refresh the working files:

git rm -r --cached . && git reset --hard

Start from your current setup

The create-data-repo skill runs the quick start for you. It checks the prerequisites, captures this machine's omp setup with sync-user.mjs and sync-projects.mjs, scans the result for secrets, and creates the private repo. It asks before each step outside your machine and refuses a public repo.

Install it on the machine that already runs omp:

npx skills add ottr-ai/alate --skill create-data-repo

Then ask your agent to run the skill. The scan stops before any commit when it finds a secret. The quick start above is the manual path.

How it works

  • Import stores a snapshot of the data repo in SQLite on the server.
  • Provision runs sync.mjs (rules into ~/.omp/agent/rules), install-user.mjs (the user layer) from the snapshot into the container home volume, and install-projects.mjs (the per-project files that projects/projects.json lists, into the workspace checkouts; see specs/install-projects.md). The provision is per item (see specs/provision-item-by-item.md): every item that passes its gates installs, a failed item stays out and is reported with its rule and file, and the run still exits non-zero when an item failed. All three scripts run in order; the pipeline stops early only on a whole-run refusal (a missing or wrong-version scanner, a data repo skill baseline whose scanner_version is not the pinned scanner version, an invalid worker list, a broken upstreams.json, an invalid skillspector-reviews.json, machine-changed copies) or a crashed child. A skill whose scan would reject it while its baseline names another scanner version keeps its previous copy (specs/baseline-version-lockstep.md). The dashboard shows each item's result next to it, and a run that fails with no failed item — a whole-run refusal or a crashed child — shows a danger "Provision failed" line with the failing script's captured output. When a run lost skills that the previous layer had, the dashboard shows the count in a danger line. The image carries the pinned SkillSpector build that install-user.mjs requires; the image pins the scanner to an absolute path (SKILLSPECTOR_BIN=/usr/local/bin/skillspector) and sets PYTHONNOUSERSITE=1, so neither the scanner binary nor its Python modules ever come from the mounted home volume the workers mount. A host that runs the script outside the image installs it by hand (see the script header). The provisioned config.yml never carries a memory backend. The board injects the backend at spawn time as a deployment setting, and install drops the entry from snapshots that an older alate captured. It never carries skills.customDirectories either. The skill gates check only the skills and managed-skills folders, so install drops the entry from the snapshot and from a kept machine copy. After the drop, install checks the whole config.yml that it writes, deployment blocks included, with the same YAML syntax gate as capture. The gate also refuses an indented root mapping and a CR-only line break. A customDirectories key that is still in the file after the drop also fails the check. If the snapshot copy fails the check, install rejects that item. If a kept machine copy fails the gate, the snapshot copy replaces it.

With ALATE_LAYER=1 (compose.yaml sets it), install-user.mjs installs each provision into a new .alate/layers/<commit>-<n> folder and switches .alate/current with one atomic symlink rename. The commit is the imported snapshot's commit: the server passes it to the installer for a repo source, a source without one names the layer nogit. A provision never changes files a running turn reads. State outside the layer (agent.db, oauth, sessions, git/gh config, caches) stays shared through symlinks. Old layers are cleaned up after the switch; current and the one before it are kept, and layers a running turn pins are protected through .alate/in-use.json. The first layer over an existing in-place home takes the machine part of config.yml (the deployment blocks and any machine edits) from the home, so the migration keeps it. A home config.yml that still holds what the in-place install wrote — its record in the home's installed.json, compared modulo the deployment blocks and the memory backend entry — takes the snapshot instead, so a stale pre-layer config never freezes. This covers a home that an alate older than the strip installed: its record hashes the entry as part of the snapshot, and a home that still holds exactly those bytes takes the snapshot too. The --layer flag enables the same behavior on any home. Without it, the in-place install stays as before.

The runner records live leases as {"layers":[{"id":"<layer-id>","since":1795000000000}]} in .alate/in-use.json. Alate protects each lease's id without an age limit. If the registry is unreadable or unusable, Alate keeps every layer and reports the reason. An absent registry or a valid empty layers array permits cleanup.

  • Workers mount the same volume.

  • The dashboard lists the snapshot inventory, edits files and bundle lists, offers Turn on bundles on a repo with no bundles, and shows the last provision's per-item results next to each rule, skill, and user-layer file (failed items carry their report). Each edit commits and pushes. Every git process of the server runs with the allowlisted child environment (no ALATE_API_KEY, GH_TOKEN or GITHUB_TOKEN) and without global or system git config, because worker turns can write ~/.gitconfig in the shared home. Repo-source git (clone, ls-remote, push) also accepts only https and local paths. For a path source, the repo's own hooks and .git/config still apply. A global credential helper or identity does not apply: put them in the repo config. The server passes safe.directory for the source folder it starts with, so git accepts a folder that another user owns there. A source folder chosen at runtime keeps the ownership check. Without a credential there, the push fails and the commit stays local. Without an identity, the commit uses alate <alate@localhost>.

  • The dashboard shows upstream updates with a 7-day age gate. For a GitHub path or branch item, including skill and plugin heads, the 7 days run from the checker's first sight of the head commit. Every new commit restarts the wait. A GitHub release waits only 2 days when it marks a security fix: its notes cite a CVE or GHSA id or have a security-release line (for example ## Security release), or a published advisory of its repository names it as patched. It waits 0 days when a live OSV record for a cited CVE binds an affected package to its GitHub repository, and that package's ranges cover the installed version but not the release. Only SemVer versions (SEMVER ranges, and the npm and crates.io ecosystems) can remove the gate. Other ecosystems, such as PyPI or Debian, keep the 2-day gate. It also waits 0 days when a CISA alert or a CERT-EU advisory names a cited CVE and, in its title, the product that the item's check.advisoryProduct in upstreams.json names (for example "advisoryProduct": "PHP"). Without that field, alerts do not count. A Node.js release that index.json marks as a security release gets the same tiers: its release announcement supplies the CVE ids, and the OSV record must bind nodejs/node. Set securityFastPath to false in server-config.json to keep the 7-day gate for all releases.

  • Skill update checks accept https://github.com/<owner>/<repo> with an optional .git suffix or trailing slash. They also accept /tree/<commit>/<path> after the repository, with a full 40-character hexadecimal commit and a nonempty path. The lock keeps its original sourceUrl. Checks use the lock's ref or fallback branch, plus skillPath, not the URL's commit or path.

    A 64-character hexadecimal skillFolderHash selects the skills@1.7.0 SHA-256 digest. Other values keep the GitHub tree SHA comparison. Both path and release checks use the selected hash type. The digest sorts relative file paths with localeCompare. It hashes each path, then its raw bytes. It excludes .git and node_modules directories at any depth, symlinks, and submodules. A skill with SKILL.md at the repository root has no folder tree SHA. For that skill, the check compares the blob SHA of the root SKILL.md, the value that the skills CLI writes. The digest also needs a root SKILL.md. A tag without a root SKILL.md counts as removed.

    Release checks match the installed folder against at most ten newest tags in the selected stream. For SHA-256 locks, incomplete trees and failed or invalid blob reads produce an error. The error clears any previous target. These checks compare upstream source bytes, not local patches. They do not approve replacement of local files.

Data repo layout

  • Root *.md and *.mdc files: the rules, each with a description: frontmatter line.
  • user/: home-relative snapshot without the leading dot (~/.omp/agent/config.yml → user/omp/agent/config.yml). Capture strips the backend: entry under the top-level memory: key, and the emptied memory: mapping with it. The memory backend is a deployment setting that the board injects at spawn time, not agent-layer content. A *.md or *.mdc file directly under user/omp/agent/rules/ is a rule: it needs the same description: frontmatter and clean characters as the root rules. Every other *.md/*.mdc in the snapshot (agent context such as AGENTS.md or RULES.md) needs the same clean characters.
  • projects/projects.json plus projects/<name>/: per-project agent-context snapshots.
  • workers/<project>/ plus the fleet folder workers/_all/: the worker additions Ottr's turns install. apt.txt lists Debian packages, one per line, # comments. tools.json is a JSON array of downloads; each entry has name, url (https:// only), sha256 (64 lowercase hex characters), unpack (zip, tar.gz or none), and bin (the executable inside the archive; absent when unpack is none). env.txt lists env var names, one per line, each optionally followed by the word plain, # comments; names only, never values. requirements.txt lists Python packages, one pinned and hashed line per package: name==version --hash=sha256:<64 hex>, one or more --hash tokens, # comments and blank lines, no options, extras, or URL requirements. install-user.mjs validates tools.json, env.txt, and requirements.txt before it writes anything.
  • bundles/<name>/: named folders that group skills, plugins, and worker lists per project. A folder holds any of six list files, and the Bundles section below describes the format.
  • upstreams.json (optional): records the origin of each public item. When the file exists, an item with no recorded origin stays out of the install and the run reports it (no origin); a rule keeps its installed copy only when it changed on the machine. A broken upstreams.json (unreadable or structurally invalid) refuses the whole run. The root own list holds files you wrote yourself. sync.mjs also checks the MCP servers in user/omp/agent/mcp.json: a server that runs a pinned npx, bunx, uvx, or pipx run package needs a kind: "mcp" item with an npm or pypi check for that package, and a self-written server needs an own entry for its command path.

MCP servers

When upstreams.json exists, an mcp.json server with no recorded origin stays out of the verdict as a failed item (no origin); the other items still install, and the mcp.json file itself still installs so one uncovered server never disconnects the other servers on the machine. A server counts as covered when one of these holds:

  • Its command or args mention a plugins/ path. These are the bundled plugin servers.
  • It runs npx or bunx, and a kind: "mcp" item has check: { "type": "npm", "package": ... } that matches the first non-flag arg as package or package@version.
  • It runs uvx, or pipx with first arg run, and a kind: "mcp" item has check: { "type": "pypi", "package": ... } that matches the first non-flag spec as package or package==version (PEP 440).
  • Its command path is an absolute path under the home of the machine that provisions, and the path matches a glob in the root own list. The globs accept only **, * and ?. A glob alone does not cover a command outside the home, and it never covers a bare program name such as uvx or npx. Use this for a server you wrote yourself.

Pin each Python server: a uvx or pipx run spec counts as pinned only with a concrete ==version. An empty version (pkg==), a wildcard (pkg==1.*), or a range is an unpinned server, and the report uses the same message as a missing version. A concrete prerelease pin such as pkg==1.0rc1 counts as pinned. The failed item's report names the package and tells you to pin it or add the pypi check item. An uncovered server's report names the server and tells you to add an item or an own entry. Each failed item appears in the run's Failed items: block, and the run exits non-zero. The machine that runs the server needs uvx or pipx on its PATH; alate records only the origin and does not install uv or pipx. The updates board checks pypi items like npm items, with the PyPI JSON API. It counts only strict PEP 440 final and .postN versions as stable, so a prerelease or dev marker (1.0rc1, 1.0b2, 1.0.dev3) never shows as latest or target. A .postN version ranks above the bare release.

Bundles

A bundle is a named folder bundles/<name>/ in the data repo. It groups skills, plugins, and worker lists per project. A bundle folder holds any of six list files: apt.txt, tools.json, env.txt, requirements.txt, skills.txt, and plugins.txt. The first four follow the workers/<p>/ formats and validators. skills.txt and plugins.txt list item names, one per line, with # comments and blank lines.

Projects and the core bundle

projects/projects.json keeps two value forms per project: the legacy extras array, and the object form with optional extras and bundles arrays. The optional bundles array names the bundles that the project uses. A bundle named core applies to every project when the folder bundles/core/ exists. A project with no bundles key gets core plus its own workers/<p>/ lists. With no core bundle, that project gets only its own lists.

Merge order

For each project, alate merges the lists in this order:

  1. bundles/core/, when the folder exists.
  2. The project's bundles array, in array order.
  3. The project's own workers/<p>/ lists.

An item named twice counts once, at its first name. The merge dedups each file type: apt.txt on the package name, requirements.txt on the name before == (lowercased, so PyYAML and pyyaml count as one package, and the first pin wins), tools.json on the entry name, and env.txt on the name — a name that a later list states again takes the later line, so a plain modifier in a later list survives.

What installs where

  • A skill named by core installs into the home skill roots, as today. A skill that core names and a bundle also names installs once, in the home roots.
  • A skill that core does not name, and that the project's bundles or its own workers/<p>/skills.txt names, installs into .ottr/project-skills/<project>/. A project with no non-core skills gets no per-project folder.
  • The merged worker lists install into .ottr/workers/<project>/, as today.
  • The merged per-project plugin names install into .ottr/plugins/<project>.txt. The file exists for every project in bundles mode; an empty merged set installs an empty file, because the board scopes a project's plugins only when the file exists. The home plugin install from the captured lockfile stays as today.
  • The vendored shipped skills install globally, as today.

The shelf

Items that no bundle names stay in the repo. alate scans them with the same gates as today. A rejected shelf item still fails the run with that item. The items install nowhere and load nowhere. The dashboard lists them under "Not in any bundle" and offers an Add to bundle picker for each.

Activation

Bundles mode is active when bundles/ exists as a directory in the data repo. Git tracks no empty folders, so a repo that wants bundles mode commits at least one bundle folder. Without the bundles/ directory, today's behavior stays exactly. Every skill installs into the home roots for every project. No .ottr/project-skills/ or .ottr/plugins/ folder appears.

The dashboard starts bundles mode safely: with no bundles/ in the repo, the Bundles section shows a note and one Turn on bundles button. The confirm step names the commit. The action creates bundles/core/ with every skill and plugin that installs today, in one commit, and copies no worker list: core merges first for every project and the first pin or tool wins, so a copied fleet list would let a fleet entry beat a project's own entry, and workers/_all/apt.txt has no consumer today. The fleet folder keeps its verbatim install, and the turn-time merge keeps its project-first precedence. After it, every project keeps the effective items it had before: every skill and plugin stays global through core, and each project's worker items are its own lists. A second click refuses, and the board takes over with the normal bundle editing. A known name that the install's own name rules refuse (a skill folder name outside the rule, or an installed-plugin key the plugin rule misses) refuses the turn-on with 400 and names every offender, before any write, so the turn-on never creates bundles content that a later provision refuses.

Refusals

Every refusal stops the run in the plan phase, before the first write.

  • An unknown skill or plugin name in a bundles/<name>/ list stops the run. The message names the bundle and the item.
  • An unknown name in a workers/<p>/skills.txt or plugins.txt stops the run. The message names the project and the item.
  • A bundles entry that names no folder under bundles/ stops the run. The message names the project and the bundle.
  • A file in a bundle folder that is not one of the six list files stops the run. The message names the bundle and the file.
  • A bundles/<name> folder that is a directory symlink resolving outside the data repo stops the run before any read of the folder, so no outside content reaches an install or a message. A symlink that resolves inside the data repo is a bundle folder like a real directory. Its lists validate like a real folder's lists.

Turn consumption

This change ships the data side only. A turn does not read the per-project folders and plugin lists yet. The board-side wiring ships separately in the ottr project.

Dashboard

The dashboard inventory scans bundles/ and reports, per bundle, its list files and its items by kind. A name that the repo does not hold gets a warning on the dashboard. The install itself refuses that name. The Overview is project first. Each project card shows its bundles as chips: core is marked "every project" and cannot be removed, each other bundle has a remove control, and an Add bundle picker adds a bundle. The card folds the merged effective lists, with the source of each item (core, the bundle name, or workers/<p>), into a closed section. The Bundles section lists each bundle with its item count, the projects that use it, and links to its list files. Each skill and plugin row shows the bundles that name it, or an in no bundle marker. The counts row gains the bundle count.

The dashboard also edits. The + on the bundles folder in the file index creates a bundle. The Checklist tab of a bundle's skills.txt or plugins.txt adds and removes items with checkboxes; the four worker lists are edited in their files. The project chips assign and unassign bundles. Bundle actions go through POST /api/bundle, write through the file editor's save path, and make one commit per save. An unknown name gets the install's refusal. The worker list rules mirror the install validators.

The file index also creates and deletes whole entries (specs/index-create-delete.md). The + on Rules, Skills and Projects opens the new main file as an unsaved draft. Its commit, through POST /api/entry, also writes the references: an own entry in upstreams.json for a new skill (and for a new rule that no pattern covers), the optional bundle line, or the projects/projects.json key. A file or folder view of a skill or project offers Delete skill or Delete project, which removes the folder and its references in one commit.

Skills alate ships

Alate vendors the whole .agents/skills tree of github.com/ottr-ai/ottr at the pinned commit 137cad33cd40d6e0d37c59ae8d1785e4053515bd, and installs every skill folder in that tree into every provisioned home. Today this tree holds seven skills:

  • check-ottr-board
  • diff-security-review
  • explain-project
  • llm-to-code
  • retro
  • ui-ux-check
  • web-perf-audit

The vendored tree is shipped/ottr/.agents/skills/<name>, and the pin lives in lib/shipped.mjs. omp loads .agents/skills only for runs inside the Ottr checkout itself, so a provisioned home has none of these skills unless alate ships them.

A data repo skill of the same name wins. When your snapshot holds a skill folder with the same name as any vendored skill folder, alate skips the shipped copy for that name and logs shipped skill <name> skipped: the data repo has its own copy. Only a snapshot copy the gates accept counts: a copy the origin or structure gate rejects installs nothing, so it never suppresses the shipped skill.

sync-user.mjs keeps the shipped skills out of the snapshot. It leaves a child of every skill root it captures (.agents/skills, .omp/agent/skills, .omp/agent/managed-skills) out of the capture only when its bytes equal the vendored copy, and it captures an edited skill like any machine state. The bridge shape .omp/agent/skills -> .agents/skills is covered too, so a shipped skill never lands as user/omp/agent/skills/<name>. Each left-out name logs note: user/<root>/<name>: the bytes equal the vendored shipped copy; left out of the capture.

The update checker shows one update row per vendored skill folder, with the pinned commit as current. These rows are pinned-source rows (kind: image-pin, the pin-applied-in-the-owning-repo kind): the card generator treats them as a pin in this repository, so the update is the documented re-pin commit, never the skills CLI. The row uses the same 7-day first-seen age gate as other upstream skills. Applying an update is an alate change, not a provision action: copy the whole .agents/skills tree at the new upstream commit into shipped/ottr/, regenerate each vendored skill's .skillspector-baseline.yaml (skillspector baseline <skill-dir> --no-llm with the pinned scanner), restore each entry's accepted reason from the previous baseline, then bump the commit in lib/shipped.mjs. When a baseline accepts a finding above MEDIUM, review it and update its entry in shipped/skillspector-reviews.json: the install rejects that skill and prints the entry to add (specs/skillspector-reviewed-acceptances.md). Baseline fingerprints bind the scan mode and the exact bytes, so an upstream baseline can fail alate's --no-llm scan; the .skillspector-baseline.yaml files are alate's own scan records, not upstream files. A data repo copy suppresses the row for its name. The row routes to the alate repository (ottr-ai/alate), because applying an update is an alate re-pin commit.

The SkillSpector scan gate therefore applies to every provision. A provision needs a working pinned scanner even when the data repo carries no skills, and the gate stays fail-closed for the shipped skills as for skill snapshots.

Scripts

Script Purpose Key flags
sync.mjs Install the data repo's rules into omp's rules dir. [targetDir]
install-user.mjs Restore the user/ snapshot onto a machine, item by item: a snapshot *.md/*.mdc file with hidden characters, a rule under user/omp/agent/rules/ with no description: frontmatter, a skill whose folder holds a hidden character outside its SKILL.md, a skill the scan rejects, or a skill with no recorded origin stays out and is reported with its rule and file; everything that passes installs. A skill the scan rejects never installs its snapshot bytes, and its previously installed, record-matching copy stays with a warning note; a copy that changed on the machine stays with the existing note and loses its record. Any other rejected item (a hidden character, a missing rule frontmatter, no recorded origin) loses its installed record-matching copy. Whole-run refusals before any write: a missing or wrong-version scanner, a CR byte in a text file of a snapshot skill that ships .skillspector-baseline.yaml when the bytes differ from the committed blob (a stale CRLF checkout poisons every baseline fingerprint; the refusal names the files and the fix; bytes the data repo already commits, such as a Windows .cmd script, install as they are), an invalid worker list, a broken upstreams.json, an invalid skillspector-reviews.json, machine-changed copies, a snapshot entry user/alate in any case (it would land in ~/.alate, alate's own state). Scans every skill snapshot first with SkillSpector (fail-closed, pinned tag, the snapshot's shipped .skillspector-baseline.yaml applied; needs Python 3.12+ and the pinned build, see the script). A skill's own baseline can accept LOW and MEDIUM findings only. Each accepted finding of another severity needs a review entry in skillspector-reviews.json at the data repo root (shipped/skillspector-reviews.json in this repo for the vendored skills); otherwise the skill is rejected with rule unreviewed baseline acceptance, and the report prints the entry to add after review (specs/skillspector-reviewed-acceptances.md). An entry binds the whole bytes of the flagged file, so any edit to that file needs a new review. The scan resolves the scanner as SKILLSPECTOR_BIN (absolute path outside the home, else refuse), then a pinned venv (SKILLSPECTOR_VENV, accepted only when root-owned and outside the home it installs into), then PATH, and refuses a scanner whose version is not the pin; a candidate inside the turn-writable home is never executed, and every provision child runs with an allowlisted environment, so ALATE_API_KEY never reaches a spawned process. The scanner child always runs with PYTHONNOUSERSITE=1, so Python never loads user site-packages from the home. The scans run in parallel (at most min(8, availableParallelism()) children, each report printed as one block) and only changed skills rescan: a passed verdict is cached under <home>/.alate/skillspector-pass.json, keyed on the skill folder's own content hash plus the scanner build, scan arguments, and the skill's review entries; a rejection is never cached, and a changed skill, scanner, or unreadable cache file means a full rescan of that skill. A scan that still hits the scanner's runtime limit after the sequential re-scan and one raised-budget retry ends inconclusive: the skill keeps its previous install status, the run reports it and exits non-zero, and the next provision rescans it. In layer mode a machine change to the plugins install files (omp/plugins/package.json, bun.lock, patches/) never rides into the new layer: the snapshot wins, and a note names each file. The plugins bun install runs --ignore-scripts unless the data repo ships a plugins-allow-scripts marker at its root, and with an allowlisted environment, so server secrets never reach bun or a lifecycle script. While bun runs, ~/.omp/package.json holds a barrier with empty workspaces, so bun never adopts a package.json higher in the home as its workspace root or runs its scripts; an entry already at that path moves aside and comes back after the install. The install uses bun's copyfile backend and hoisted linker (the isolated linker, the default for a manifest with workspaces, hardlinks file: deps), so the provisioner never creates a hard link into the snapshot tree. Each install gets a fresh package cache in the OS temp dir (BUN_INSTALL_CACHE_DIR), and the script deletes it after the install. Bun does not check cached package bytes against bun.lock, so a package that a turn writes into the shared ~/.bun cache never gets into the plugins. In bundles mode (bundles/ in the data repo), core skills still install into the home roots, each non-core bundle skill installs into .ottr/project-skills/<project>/, and an unknown bundle name refuses the run before any write (see the Bundles section). --home, --force, --skip-plugins
sync-user.mjs Capture this machine's omp user layer into the repo. --home
sync-projects.mjs Refresh per-project snapshots into the repo. --root
install-projects.mjs Install the per-project snapshot files that projects/projects.json lists into the workspace checkouts. A changed listed file installs on the next provision; a replaced local edit is logged and names both paths; a file or checkout missing from the snapshot or the workspace is skipped with a note. Whole-run refusals before any write: an invalid manifest, an unsafe source or destination path. Snapshot .md/.mdc items (in any letter case) get the sibling hidden-character gate: a laced file is rejected per item (never installed, a copy this path installed before is removed, a machine-changed laced copy stays with a note), passing items still install, and the run exits 1. Shares the capture baseline record with sync-projects.mjs, so a later capture sees the installed bytes as adopted. --root

All install scripts take --data <dir> or --repo <owner/name[@ref]> (set GH_TOKEN for private repos). The repo form also accepts <host>/owner/name[@ref] for a GitHub Enterprise Cloud tenant (acme.ghe.com) or Enterprise Server host (git.example.com), or a full https:// URL; ALATE_GITHUB_HOST is the ambient default host. The token rides only to the configured host: a repo spec on another host clones without it, and the update checker queries github.com without a token unless the configured host and the repo source host are both github.com and no repo import named another host. After a repo import names another host, the stored key rides nowhere: every clone, remote check and editor push runs without it, even for a github.com source. Capture scripts take --data <dir> plus the --first flag; install-projects.mjs takes --data <dir> only.

The CLI resets runtime Git config before each clone, with or without a token. It removes inherited GIT_CONFIG_COUNT and all numeric-index GIT_CONFIG_KEY_<n> and GIT_CONFIG_VALUE_<n> variables. Eligible authentication adds one entry at index zero. Other variables stay unchanged, including GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM, and GIT_CONFIG_NOSYSTEM.

Each capture script keeps a baseline state file outside the data repo: sync-projects.mjs at <workspace-root>/.alate/captured-projects.json, sync-user.mjs at <home>/.alate/captured-user.json. When only the committed snapshot changed, the capture refreshes the project copy from the snapshot, or keeps the user snapshot for the next provision. The refresh passes a project .md/.mdc item through the hidden-character gate first. A laced snapshot keeps the machine copy, and the run exits with code 1. When a file changed on both sides, the run refuses with exit 1 before any write and names both paths on stderr. A first capture with no baseline state refuses a machine file that differs from its committed snapshot. The report names both paths and both sha256 values. The run still captures the other files and exits with code 1. The --first flag adopts the machine copies instead: it exists for the first capture of a fresh data repo from examples/data, whose placeholder snapshots exist to be replaced. On an established data repo, provision the machine first, and capture again. The state files are machine-local. Do not commit them. See specs/capture-baseline.md.

Before any target write or SkillSpector call, install-user.mjs checks every source skill directory for a readable SKILL.md. Each file needs frontmatter at byte 0, a complete closing marker, a non-empty name and description, and no forbidden hidden characters. The name must match ^[a-z0-9][a-z0-9-]*$. An invalid skill stays out of the install, is reported with its problems, and is never scanned; every skill that passes still installs, and a previously installed, record-matching copy of the invalid skill is deleted. A whole-run refusal leaves the home, manifest, scanner cache, and layers unchanged. This check runs even when SkillSpector has a cached pass. A folder whose name matches skills or managed-skills only without case (for example Skills/) stays out of the install as one rejected item: Windows and macOS read it as the real skill root, but the skill gates check only the exact names. The same one-item rejection covers an 8.3 short name of a root (MANAGE~1/ — NTFS resolves it into the long folder on the default Windows setup), a name that matches a root once the Unicode default-ignorable code points are ignored (skil\u200Cls/ — HFS+ name comparison ignores them), and a name that Win32 normalizes onto a root by stripping trailing dots or spaces (skills./).

See the skill snapshot structure gate specification for accepted scalar forms and boundaries.

API

Route Auth Behavior
GET /health none Server, source, update, and layer-mode status.
POST /api/login none {"key": "<app key>"} sets a session cookie for the dashboard. The cookie holds a random session id with Path=/api. The server keeps the session in memory only, so a server restart ends it.
POST /api/key dashboard access plus the current key Send the current key as Authorization: Bearer <current app key> or as a {"key": "<current app key>"} body. Returns a new key once. The old key and every dashboard session stop working at once. A missing or wrong current key gets 403.
POST /config Bearer Import {"repo": "owner/name"} or {"path": "<dir>"}. An optional "projectsRoot" names the workspace folder that holds the project checkouts for install-projects.mjs; a path source derives it from the source folder's parent, and the explicit value wins.
POST /provision Bearer The body can be empty. Run sync.mjs, install-user.mjs and install-projects.mjs from the stored snapshot. Provision reads the stored snapshot, so a source change outside the server needs POST /config again first. All three run in order; the pipeline stops early only on a whole-run refusal or a crashed child. ok is false when any script exits non-zero (an item failed or the run was refused). GET /api/state carries the per-item results under provision, pinned to the imported snapshot sha.
GET /api/updates Bearer Board contract records only, one record per pinnable upstream. /api/state keeps every row.
POST /api/updates/check Bearer Run the upstream check now and return the fresh list.

Dashboard routes under /api need no key on a loopback bind. On a loopback bind, dashboard writes also need a same-origin Origin header or a same-host Referer header (the dashboard sends them; scripts use the Bearer token). On a loopback bind, the server also refuses any request whose Host header does not name the server (localhost, 127.x.x.x, [::1]). On a loopback bind, a request with an X-Forwarded-For, Forwarded, or X-Real-IP header needs the key or a login session. On any other bind, dashboard routes need the key or a login session.

Security

  • Treat the data repo as trusted code. Rules change agent behavior. Skills and plugins run code. install-user scans every skill snapshot statically with SkillSpector before it lands (fail-closed, pinned tag, the snapshot's shipped .skillspector-baseline.yaml applied, see the script list above); a skill's own baseline cannot accept a finding above MEDIUM without a review entry in skillspector-reviews.json, which lives outside the skill folders so a skill author cannot ship it; the scanner binary itself is resolved only from trusted locations, the scanner child runs with PYTHONNOUSERSITE=1 so planted Python modules in the home never load, and the provision pipeline spawns every child with an allowlisted environment; the scan checks content, the upstreams origin gate checks provenance, and neither replaces review of the data repo itself.
  • Keep credentials in environment variables. Capture refuses credential-shaped values, but it cannot prove that a file is secret-free.
  • A non-loopback bind serves plain HTTP, and the session cookie carries no Secure flag. Put a TLS reverse proxy in front for remote access.
  • A reverse proxy on the same host connects from loopback and can send a loopback Host (nginx sends 127.0.0.1:4570 by default). If the proxy sends a forwarding header (X-Forwarded-For, Forwarded, or X-Real-IP), a loopback bind asks for the key. If the proxy sends none of these headers, the dashboard is key-free for remote clients. Thus, configure the proxy to send X-Forwarded-For, or bind the server to a non-loopback address.
  • Browsers do not isolate cookies by port. Another service on the same host name can receive the session cookie. The cookie holds a random id, not a hash of the key, and a key rotation needs the current key.
  • The compose file publishes the port on host loopback only (127.0.0.1:4570:4570).
  • The dashboard refuses to be framed (frame-ancestors 'none', X-Frame-Options: DENY). On a loopback bind the dashboard is key-free, so a framed page could otherwise change its state with one click.
  • On a loopback bind the server refuses requests whose Host header does not name the server. A page at a DNS-rebound hostname sends an Origin that matches the request Host; the Host check stops that page from reaching the key-free dashboard.
  • Keep /state (server key and SQLite db) out of the image.

Run without Docker

npm ci && node server.ts --data examples/data

Needs Node 24.12+. Flags: --port or PORT, --host or ALATE_HOST, --config <file>, --db <file>. --exit-when-stdin-closes is a test-fixture flag: the server exits when its stdin closes. The test fixture uses it as a second guard. An external owner process for each server kills the whole server process tree when the test runner dies. In the test suite, a server starts only after its owner is ready. The default bind is 127.0.0.1:4570. The server prints alate API key: <key> on first start; with ALATE_API_KEY set, it prints alate API key: taken from ALATE_API_KEY.

ALATE_API_KEY sets the first-start API key from the environment, so a deployment can pair a board (for example Ottr's compose file) without a manual copy of the key. The value needs 32 characters or more: a shorter value makes the server exit with an error instead of generating a key, because the paired board would then fail silently. The value is saved to the config file and never printed. A key that is already in the config wins over the env value, and POST /api/key still rotates the key when the caller sends the current key.

Update checks go through a proxy when HTTP_PROXY or HTTPS_PROXY is set. NO_PROXY keeps named hosts on the direct route. Node reads these variables at startup and honors them for fetch only with NODE_USE_ENV_PROXY=1 (Node 24+). The server sets that variable itself: when a proxy variable is set and NODE_USE_ENV_PROXY is unset, the server re-spawns once with the variable and continues in the new process. Set NODE_USE_ENV_PROXY=0 to opt out. The Docker image carries the variable already. For Docker, export HTTP_PROXY, HTTPS_PROXY and NO_PROXY in the shell that runs docker compose up; the compose file passes them to the container.

Development

One manifest, one lockfile, no build step. The verified chain:

npm ci && npm audit --omit=dev --audit-level=low && node license-gate.mjs && node zero-deps.test.mjs && node license-gate.test.mjs && node crlf.test.mjs && node home-guard.test.mjs && node home-guard.test.mjs record && node sync.mjs "$(mktemp -d)" --data examples/data && node sync.test.mjs && node install-user.test.mjs && node install-user-gates.test.mjs && node install-user-scan.test.mjs && node install-user-flows.test.mjs && node install-user-layers.test.mjs && node sync-user.test.mjs && node sync-projects.test.mjs && node install-projects.test.mjs && node lib/bundles.test.mjs && node lib/canonical.test.mjs && node install-bundles.test.mjs && node canonical-form.test.mjs && node architecture.test.mjs && node clone.test.mjs && node skills/create-data-repo/scan-secrets.test.mjs && node scripts/mutant-run.test.mjs && npx tsc --noEmit && node lib/env-proxy.test.mjs && node server.test.mjs && node home-guard.test.mjs check

home-guard.test.mjs brackets the chain: the early record snapshots the home's .alate, .agents and .omp, and the final check fails the run when a path or an mtime there changed. The platform's own runtime files (the omp databases, logs, cache, run, the session stores under .omp, the live worker's memories and agent/memories stores, the cache and session stores of the browser profiles under .omp/browser-profiles, and the two bookkeeping files under .alate) stay excluded: a live worker writes them during any chain. A directory mtime diff is dropped when no checked direct child has a diff of its own: the memory backend can create agent/memories mid-chain, which moves the agent mtime alone.

The guard also ignores plugins/cache and plugins/node_modules under .omp, including each layer's .omp. The platform seed rewrites plugin dependency shims there. Other paths under plugins/ stay watched.

npm test runs this chain's checks after an npm ci.

CI runs this chain on every push. release.yml builds a multi-arch Docker image and publishes it to ghcr.io/ottr-ai/alate on each GitHub release, tagged latest, vX.Y.Z and X.Y.Z.

License

MIT. See LICENSE.

About

Provisions omp agent rules, skills, the omp user layer and per-project agent context from your own private data repo.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages