From 898b9d189f13f9406215c04e46453379667aba1b Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 13 Sep 2026 09:02:59 +0000 Subject: [PATCH] Add shared AI assistant context files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: køkkeligk --- .cursor/rules/project-context.mdc | 8 ++++ .github/copilot-instructions.md | 3 ++ AGENTS.md | 70 +++++++++++++++++++++++++++++++ CLAUDE.md | 3 ++ GEMINI.md | 3 ++ 5 files changed, 87 insertions(+) create mode 100644 .cursor/rules/project-context.mdc create mode 100644 .github/copilot-instructions.md create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 GEMINI.md diff --git a/.cursor/rules/project-context.mdc b/.cursor/rules/project-context.mdc new file mode 100644 index 00000000..54745d78 --- /dev/null +++ b/.cursor/rules/project-context.mdc @@ -0,0 +1,8 @@ +--- +description: Project layout, build commands and working agreements +alwaysApply: true +--- + +See [AGENTS.md](mdc:AGENTS.md) for project layout, build and test commands, code +style and working agreements. That file is the canonical context; this rule only +points at it. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..3e021891 --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,3 @@ +See [AGENTS.md](../AGENTS.md) for project layout, build and test commands, code +style and working agreements. That file is the canonical context; this one only +points at it. diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 00000000..87b9bd70 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,70 @@ +# Agent context + +Shared context for every AI assistant used on this repository: Cursor, GitHub +Copilot, Claude, Gemini and the Xcode extension itself. The other instruction +files (`CLAUDE.md`, `GEMINI.md`, `.github/copilot-instructions.md`, +`.cursor/rules/`) point here, so this file is the single place to edit. + +## Project + +GitHub Copilot for Xcode: a macOS app plus Xcode source editor extension. +Requires macOS 13+, Xcode 14+ and a GitHub account. + +Targets, and where the code lives: + +- `Copilot for Xcode` — host app and settings UI. Implemented in `Core/HostApp`. +- `EditorExtension` — sandboxed Xcode source editor extension. Forwards editor + content to the XPC service and writes the result back. +- `ExtensionService` — background process where the features live. Implemented + in `Core/Service`. +- `CommunicationBridge` — keeps the host app and extension talking to + `ExtensionService` across the sandbox boundary. +- `Core` and `Tool` — Swift packages holding most of the logic. + +`DEVELOPMENT.md` has the full description; read it before restructuring targets. + +## Build and test + +Node and `npm` must be on the system path, because an Xcode run script resolves +them with a very limited `PATH`: + +```sh +sudo ln -s `which npm` /usr/local/bin +sudo ln -s `which node` /usr/local/bin +``` + +Local build: + +```sh +cd ./Script +sh ./uninstall-app.sh # remove any previous installation +rm -rf ../build # clean the build directory +sh ./localbuild-app.sh # build a fresh copy +``` + +Unit tests run from the `Copilot for Xcode` target. New tests belong in +`TestPlan.xctestplan`. To exercise the editor extension, run `ExtensionService`, +`CommunicationBridge` and `EditorExtension` together. + +Versions for the app and all targets come from `Version.xcconfig`. + +## Code style + +SwiftFormat, following the Ray Wenderlich Swift style guide, with 4-space +indentation (the Xcode default) rather than 2. + +## Working agreements + +- Keep answers short. One task finished at a time, then say what is still + waiting. +- Split the work by tool: VS Code for running, debugging and small fixes; + Claude for long explanations when the error message is already in hand; + Perplexity for looking things up on the web; Cursor when many files have to be + read and changed at once. +- Do not start heavy subagents or long research rounds unless asked for. +- Never update, upgrade or self-update software unless the request says so in + that same message. This covers `brew update`/`brew upgrade`, + `pip install --upgrade`, npm and yarn upgrades, `mas`, OpenFOAM and Homebrew + Python, and app self-updates. Installing a missing package that was asked for + is fine; upgrading existing ones is not. +- Never change git config. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 00000000..078d9dac --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,3 @@ +See [AGENTS.md](./AGENTS.md) for project layout, build and test commands, code +style and working agreements. That file is the canonical context; this one only +points at it. diff --git a/GEMINI.md b/GEMINI.md new file mode 100644 index 00000000..078d9dac --- /dev/null +++ b/GEMINI.md @@ -0,0 +1,3 @@ +See [AGENTS.md](./AGENTS.md) for project layout, build and test commands, code +style and working agreements. That file is the canonical context; this one only +points at it.