rajatslakhina

Agent Context Contract Article Demo — Development skill for Claude Code

Development community

ContextContract: scan a CLAUDE.md into portable, vendor-bound and enforce-not-describe lines; compile AGENTS.md + overlays + an enforcement plan.

How to install Agent Context Contract Article Demo

This entry records only its repository, not the path inside it, so there is no exact command to give. Open rajatslakhina/agent-context-contract-article-demo and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Context Contract Article Demo does

ContextContract: scan a CLAUDE.md into portable, vendor-bound and enforce-not-describe lines; compile AGENTS.md + overlays + an enforcement plan. Swift library + SwiftUI demo for the Xcode 27 / ACP article.

Alternatives in Development

  • Bypass 403 — Probe a 403/401 endpoint with the most-paid bypass tricks (header injection, path encoding, method swap, WAF f 4.5k ★
  • SwiftUI Expert Skill — Modern SwiftUI best practices and iOS 26+ Liquid Glass adoption 2.3k ★
  • Claude Code iOS Dev Guide — A comprehensive guide for setting up Claude Code CLI with PRD-driven workflows, extended thinking (ultrathink) 492 ★

README

ContextContract — the CLAUDE.md scanner for the day Xcode makes your coding agent a dropdown

A small, tested Swift library that reads an agent instructions file (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, anything markdown) and sorts every directive into the three things such a file is always made of: lines any agent can act on, lines written for one vendor, and lines that *claim* to enforce something prose cannot enforce. Then it compiles the file into a vendor-neutral contract plus per-vendor overlays plus an enforcement plan, and reports which agents can read each version.

Article: (added after publish)

![Diagram: one CLAUDE.md with 28 lines splits into 12 portable lines (to AGENTS.md), 9 vendor-bound lines (to CLAUDE.md, GEMINI.md and a Codex heading) and 7 enforcement claims (to ENFORCEMENT.md and the permission layer)](Article/2026-09-10-agent-context-contract-split.png)

Why

Xcode 27 (release candidate, 9 September 2026) adds *Settings ▸ Intelligence ▸ Add an Agent…*: any binary that speaks the [Agent Client Protocol](https://agentclientprotocol.com) runs inside Xcode as a subprocess, next to the Claude, Codex and Gemini agents Apple wired in itself. ACP's `session/new` carries the editor's MCP server list, so tool servers follow you across agents. It carries no instructions file. Each agent reads its own from the working directory — Claude Code reads `CLAUDE.md`, Codex reads `AGENTS.md`, Gemini CLI reads `GEMINI.md` — so the day someone picks a different item in that dropdown, the file you wrote is not read at all.

What it shows

  • Vendor — Claude Code, Codex, Gemini CLI, Cursor, GitHub Copilot: the file each reads natively and what it takes to make it read AGENTS.md (reads(_:).native / .viaImport(how) / nil).
  • VendorSignature — conservative evidence per vendor: product names (proper nouns only), vendor-owned paths (.claude/, GEMINI.md, .cursor/rules), the vendor's tool names (MultiEdit, apply_patch, `run_shell_comm