Skip to content

feat: context parity across cloud vendors + cloud env configs (ARN-415) - #474

Open
rita-aga wants to merge 1 commit into
mainfrom
claude/context-parity
Open

feat: context parity across cloud vendors + cloud env configs (ARN-415)#474
rita-aga wants to merge 1 commit into
mainfrom
claude/context-parity

Conversation

@rita-aga

@rita-aga rita-aga commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Distillation only delivered the global layer to Claude (a .claude/ hook). Cursor and Codex cloud agents read the repo AGENTS.md and never saw the global rules. This vendors the stack global into AGENTS.md (one path all three harnesses read, single source stays arni-labs/stack via stack/vendor-global.sh), removes the redundant Claude-only hook, and adds cloud-setup.sh + .cursor/environment.json so a cloud agent's machine installs the shared stack skills.

Authored by Fable 5 via Claude Code.

Greptile Summary

This PR moves shared global agent guidance into the repository-wide AGENTS.md, removes the Claude-only injection hook, and adds cloud environment bootstrapping for shared stack skills and repository dependencies.

  • Vendors the shared stack instruction layer into AGENTS.md.
  • Removes .claude/global.md and its SessionStart hook.
  • Adds Cursor snapshot configuration and a stack synchronization script.

Confidence Score: 4/5

The setup failure masking should be fixed before merging because it can accept an incomplete cloud environment and defer failures until agent work begins.

The new Cursor installation command and cloud bootstrap suppress failures from required dependency and skill installation, so snapshot creation cannot distinguish a usable environment from a partially configured one.

Files Needing Attention: .cursor/environment.json and scripts/cloud-setup.sh

Important Files Changed

Filename Overview
.cursor/environment.json Adds the Cursor snapshot installer, but suppresses setup diagnostics and converts every bootstrap failure into success.
scripts/cloud-setup.sh Clones and synchronizes shared stack skills, while ignoring update and synchronization failures and unconditionally reporting installation.
AGENTS.md Vendors the shared global instruction layer ahead of the existing repository-specific contract.
.claude/settings.json Removes the obsolete SessionStart context hook while retaining the stack plugin configuration.
.claude/global.md Deletes the former Claude-specific copy of global instructions.
.claude/hooks/global-context.sh Deletes the hook that conditionally emitted the former Claude-specific global instruction file.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    Snapshot[Cursor snapshot build] --> Install[environment.json install]
    Install --> Stack[cloud-setup.sh]
    Stack --> Clone[Clone or update stack]
    Clone --> Sync[Run stack sync.sh]
    Sync --> Repo[make setup]
    Repo --> Ready[Configured cloud environment]
    Stack -. masked failure .-> Incomplete[Incomplete environment accepted]
    Repo -. masked failure .-> Incomplete
Loading

Fix all with Greploop Fix All in Claude Code Fix All in Codex Fix All in Cursor

Reviews (1): Last reviewed commit: "feat: context parity across cloud vendor..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

The distilled AGENTS.md only reached the global layer to Claude (via a
.claude/ SessionStart hook). Cursor and Codex cloud agents read the repo
AGENTS.md and never saw it. Fix:

- Vendor the stack global into AGENTS.md as a marked, regenerated block
  (stack/vendor-global.sh; single source stays arni-labs/stack). All three
  harnesses read AGENTS.md, so all three now get the same global.
- Remove the now-redundant Claude-only hook + .claude/global.md (CLAUDE.md
  symlinks to AGENTS.md, so Claude reads the global there). Kept the stack
  plugin for Claude-cloud skill delivery.
- scripts/cloud-setup.sh: clones the stack and installs its skills, so a
  cloud agent's machine reaches laptop parity for the shared skills.
- .cursor/environment.json: Cursor Background Agents run cloud-setup on build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VLPhB9kjLeE48kLUyAXXq2
Comment thread .cursor/environment.json
@@ -0,0 +1,5 @@
{
"//": "Cursor Background Agent environment. install runs once on snapshot build.",
"install": "bash scripts/cloud-setup.sh && make setup 2>/dev/null || true",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Setup failures are masked

When stack synchronization or repository setup fails, the trailing || true accepts the snapshot while 2>/dev/null discards its diagnostics, causing the cloud agent to start without required skills, dependencies, WASM targets, fetched crates, or environment configuration.

Fix in Claude Code Fix in Codex Fix in Cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant