Skip to content

Deviations, drift, and CI

Running openlune apply once is easy. Living with a manifest across a whole team—with five different AI clients, pull requests, and local tweaks—is where the real details matter.

Here is how OpenLune keeps things predictable day to day.

Not every AI client supports every feature in openlune/manifest.yaml. Codex doesn’t support path-scoped glob rules. Grok Build and Codex don’t restrict subagent tools. Antigravity doesn’t have an agent effort setting or environment-backed HTTP headers.

Instead of failing your manifest or silently dropping what you wrote, OpenLune treats these gaps as deviations:

  1. OpenLune renders the client’s closest valid behavior.
  2. openlune plan and openlune apply clearly list every deviation and explain what the client will do instead.
  3. During openlune apply, OpenLune asks you to explicitly accept the deviations before writing anything.
  4. Once accepted, OpenLune remembers your acceptance in .openlune/ so future applies won’t nag you again—unless a declaration changes and introduces a new or different deviation.

Accepting deviations in scripts or non-interactive shells

Section titled “Accepting deviations in scripts or non-interactive shells”

Passing --yes alone approves file writes, tool installations, and initializers—it deliberately does not auto-accept new deviations. That way a script won’t quietly grant an agent broader tools than you expected.

If you have reviewed the plan and want to apply non-interactively including its deviations, pass both flags:

Terminal window
openlune apply --yes --deviate

Protecting your files from silent overwrites

Section titled “Protecting your files from silent overwrites”

OpenLune keeps a local ownership record in .openlune/ tracking every file and config entry it published (along with a hash of what it wrote).

  • Existing unmanaged files are never overwritten. If you already have a hand-written CLAUDE.md before adopting OpenLune, openlune apply will refuse to clobber it. Move its content into openlune/instructions.md, delete or rename the old CLAUDE.md, and run openlune apply.
  • Local edits are protected too. If you tweak a generated file by hand after applying, openlune verify reports drift and openlune apply refuses to overwrite your edits. Either fold your edit back into openlune/ and restore the generated file, or delete the modified generated file so OpenLune can regenerate it cleanly.
  • Unrelated settings in shared config files stay intact. Files like .mcp.json, .cursor/mcp.json, .agents/mcp_config.json, and .codex/config.toml often hold personal servers or client preferences. OpenLune merges only the specific entries it owns and leaves everything else untouched.

When you delete an instruction, agent, skill, or MCP server from openlune/manifest.yaml and run openlune apply:

  • OpenLune previews the removal just like any other change.
  • After you confirm, it removes the generated file (or config entry) only if it still matches what OpenLune published and no other applied client in that checkout still uses it (for example, AGENTS.md or .agents/skills/ shared between Codex and Antigravity).
  • If you edited a removed file locally, OpenLune leaves it in place rather than deleting your changes.
  • Switching clients: Run openlune apply --client <new-client>. OpenLune updates .openlune/selection.json and sets up the new client. Successful MCP initializers are reused automatically—they don’t re-run just because you switched clients. Note that OpenLune does not automatically remove files left behind by your previous client.
  • Moving or renaming a repo folder: Saved MCP launch configs store the absolute path to your repository root. If you move a checkout to a new directory, run openlune apply again from the new location to refresh the paths.

Validating manifests in CI with openlune check

Section titled “Validating manifests in CI with openlune check”

openlune check compiles your manifest against every supported client—regardless of which client you use locally, without reading .openlune/, and without touching disk or network.

Run it locally before opening a PR, and add it to CI:

.github/workflows/openlune.yml
name: OpenLune
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OpenLune
run: curl -fsSL https://openlune.io/install.sh | bash
- name: Check manifest
run: ~/.local/bin/openlune check

What openlune check catches:

  • Invalid YAML or schema mistakes (unknown fields, missing source files, bad capability names, broken headersFrom templates).
  • Client-specific rejections (like a Grok Build skill name that doesn’t match its ID, an invalid Antigravity model tier, or a ${...} literal in a committed plain stdio server).
  • Shared-output conflicts between clients (for instance, if two committed clients render .mcp.json differently, such as Copilot and Claude Code sharing an HTTP server with a tools filter).
  • Stale committed files in repos using commit: [...]—failing with the exact path of any file that needs openlune apply.

openlune check prints deviations as informational output (they do not fail the check), and exits with code 0 when every client compiles cleanly and all committed outputs are up to date, or 1 if anything fails.