Skip to content

Made an adapter's owned output exclusive and matched Antigravity to its docs - #31

Open
dzykovic wants to merge 2 commits into
mainfrom
fix/antigravity-contract-conformance
Open

dzykovic wants to merge 2 commits into
mainfrom
fix/antigravity-contract-conformance

Conversation

@dzykovic

Copy link
Copy Markdown
Contributor

Summary

An audit of the antigravity adapter against Google's live documentation turned up
five defects — two in the adapter, two that any pair of adapters can hit, and one
latent in the shared rule rewrite.

owned is now exclusive across enabled adapters. Pointing Codex at .agents made
both it and Antigravity own .agents/agents: the one that synced last pruned the
other's files, both runs exited 0, and status --check reported all good. A
filtered sync <adapter> was the worst case, because it prunes those paths while
never loading the adapter whose output it destroys. Two managed claims on one path
stay legal — that sharing is what .agents/skills is built on.

Against the vendor's pages the adapter also:

  • listed search_web and read_url_content in a readonly agent's tools:, which no
    Antigravity page documents, while the vendor warns that an unmapped or misspelled
    tool name "may cause the subagent process to hang during execution". Readonly now
    carries the documented read tools only: view_file, grep_search;
  • stated the documented 12,000-character rule limit in a comment and never checked
    it. A scoped rule past the limit is now reported, with
    targets.antigravity.warn_rule_limit accepting the documented limit, another
    positive count, or false;
  • left .antigravity.md in place. The Antigravity CLI reads that workspace-root file
    ahead of GEMINI.md, which already outranks AGENTS.md, so one sitting in a
    project silently overrode every synced rule. Onboarding now quarantines it beside
    GEMINI.md, init detects Antigravity from it, and the Git policy ignores it.

Two new warnings cover configurations that render context nothing reads: an
antigravity.output outside .agents (its paths are fixed, and an earlier .agents/
copy stays the one the tool loads), and an agents.output away from the workspace-root
AGENTS.md while adapters that skip always-on rules depend on it carrying them. Both
warn rather than refuse — rendering elsewhere for inspection stays legitimate.

Finally, paths:globs: was applied to the whole rule file in both the Antigravity
and Cursor adapters, so a rule that documents rule syntax had its own example rewritten.
The substitution is now anchored to the frontmatter block.

The adapter header now records which vendor pages were checked and, where the adapter
renders something the vendor does not document (the rule frontmatter keys, the
GEMINI.md precedence), says so instead of implying a citation that does not exist.

Type of change

  • CLI lifecycle or package behavior
  • Sync engine or adapter
  • Rule, agent, or skill content
  • Documentation
  • Refactor with no behavior change

Public CLI check

  • Uses only the established groups: init, sync, update, upgrade, package, source, adapter, status, registry
  • Keeps preview/apply behavior explicit for planned writes
  • Covers automatic project alignment and CI refusal when project schema/content can change
  • Keeps fresh-clone package restoration behind intelligence sync

Verification

  • bash cli/tests/verify.sh reports verify ok and skipped nothing this change needed
  • intelligence status --check succeeds in the relevant fixture/project — and now reports the ownership conflict instead of all good
  • A second intelligence sync produces no unexpected diff
  • Adapter changes were checked against the real tool format and preserve hand-authored sibling files
  • User-facing docs and examples use the current public command groups

Beyond the suites: a byte-for-byte A/B of agents, antigravity, claude, codex,
cursor, opencode and pi output between main and this branch is identical, so
the rewrite anchoring and the new awk pass change nothing they should not. New
coverage lives in e2e-negative (sections 15b/15c: the conflict on sync, on a
filtered sync, on adapter enable and in status --check; both warnings; a
malformed warn_rule_limit) and in e2e-lifecycle (rendered allowlist, model,
a body paths: line surviving, the limit warning and its off switch, .antigravity.md
quarantine and ignore policy).

Versioned artifacts

  • The PR records its change under one concrete CHANGELOG.md version; there is no [Unreleased] section or duplicated release date
  • The current engine/VERSION release state was checked: v0.16.1 is published (2026-09-13), so this PR selects 0.17.0
  • If a new version was selected, every example's schema_version and exact @ainova-systems/sync pin changed with it
  • No stable release is implied or published without owner approval

Notes for reviewers

The ownership check runs over every enabled adapter regardless of the target filter,
so sync <adapter> now loads the contracts of adapters it will not render. That costs
a few extra subshells and means a broken contract on another enabled adapter stops a
filtered run too — deliberate, since that contract decides what the filtered run is
allowed to prune.

.antigravity.md and the GEMINI.md precedence are not stated on Google's docs host;
they come from the Antigravity CLI pages plus third-party reports of IDE 1.20.3. The
adapter comment marks both as such. Quarantine is safe either way: a project without
the file sees nothing happen, and the file is moved into the onboarding backup rather
than deleted.

…ts docs

Pointing a second adapter at `.agents` let it prune Antigravity's generated
agents while both syncs reported success and `status --check` stayed green.
A filtered `sync <adapter>` was the dangerous case: it prunes those paths
without ever loading the adapter whose output it destroys. An `owned` path is
now exclusive across enabled adapters, while two `managed` claims on one path
stay legal - that sharing is what `.agents/skills` is built on.

Checked against the vendor's own pages, the adapter also rendered two tool
names no Antigravity page documents, where the vendor warns an unmapped name
may hang the subagent; claimed a 12,000-character rule limit it never checked;
and left `.antigravity.md` in place, which the Antigravity CLI reads ahead of
GEMINI.md and therefore ahead of every synced rule. Sync now also warns when
generated context lands where no tool reads it - an Antigravity output outside
`.agents`, or an AGENTS.md away from the workspace root while adapters that
skip always-on rules depend on it carrying them.
Copilot AI lite review requested due to automatic review settings September 20, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Raw path aliases can bypass ownership protection and produce incorrect unread-output warnings.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 4 Medium severity

Open (5)
What changed in this PR

This PR hardens adapter ownership and aligns Antigravity rendering with documented behavior.

Changes:

  • Adds cross-adapter ownership conflict checks and context-placement warnings.
  • Updates Antigravity tools, rule limits, output quarantine, and frontmatter rewriting.
  • Updates documentation, changelog, tests, and versioned example artifacts.
File Description
README.md Refreshes adapter reference date and guidance.
packages/​sync/​references/​conventions.md Documents .antigravity.md policy.
packages/​sync/​references/​adapters.md Documents ownership and output warnings.
intelligence.yaml Updates schema and package version.
intelligence.lock Updates engine and package pins.
examples/​with-remote-skills/​intelligence.yaml Updates version pins.
examples/​platform-with-submodules/​intelligence.yaml Updates version pins.
examples/​platform-with-submodules/​intelligence.lock Updates lock version.
examples/​go-api/​intelligence.yaml Updates version pins.
examples/​go-api/​intelligence.lock Updates lock version.
examples/​go-api-with-pi-and-codex/​intelligence.yaml Updates version pins.
examples/​go-api-with-pi-and-codex/​intelligence.lock Updates lock version.
examples/​go-api-with-opencode/​intelligence.yaml Updates version pins.
examples/​go-api-with-opencode/​intelligence.lock Updates lock version.
examples/​go-api-with-antigravity/​intelligence.yaml Updates version pins.
examples/​go-api-with-antigravity/​intelligence.lock Updates lock version.
examples/​dotnet-api-with-react-frontend/​intelligence.yaml Updates version pins.
examples/​dotnet-api-with-react-frontend/​intelligence.lock Updates lock version.
examples/​cli-project/​intelligence.yaml Updates version pins.
engine/​VERSION Bumps release version to 0.17.0.
engine/​sync.sh Checks ownership and warns about unread context.
engine/​lib/​adapter-contract.sh Implements cross-adapter claim validation.
engine/​adapters/​cursor.sh Anchors paths rewriting to frontmatter.
engine/​adapters/​antigravity.sh Updates tools, limits, paths, and quarantine contracts.
cli/​tests/​e2e-negative.sh Adds ownership and warning coverage.
cli/​tests/​e2e-lifecycle.sh Adds Antigravity rendering and onboarding coverage.
cli/​internal/​target-state.sh Validates claims during adapter enablement.
cli/​internal/​check.sh Reports ownership conflicts in status checks.
cli/​commands/​init.sh Detects .antigravity.md.
CHANGELOG.md Records the 0.17.0 changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread engine/lib/adapter-contract.sh
Comment thread engine/adapters/antigravity.sh
Comment thread engine/adapters/antigravity.sh Outdated
Comment thread engine/adapters/cursor.sh
Comment thread engine/sync.sh Outdated
…re spelled

Review caught three lexical comparisons: the ownership claim, the Antigravity
unread-output warning and the AGENTS.md root check all matched raw strings,
while the writers and `validate_output_path` resolve them. `./.agents` beside
`.agents` was therefore a collision nothing reported, and `.agents//` or
`./AGENTS.md` raised a warning about output the tool does read. All three now
go through `normalize_path_var`.

Two regression gaps came with it: the documented numeric `warn_rule_limit`
override had no case, and Cursor runs its own copy of the frontmatter rewrite
that no test covered. Both are asserted now.
@dzykovic dzykovic added the ai:ready-to-merge CI green, reviews resolved, awaiting owner approval label Sep 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai:ready-to-merge CI green, reviews resolved, awaiting owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants