OpenBridge
AGENTS.md430 starsChanged 6 months agoMITView on GitHub
This file provides guidance to LLM coding agents when working with code in this repository. Note: CLAUDE.md is a symlink to this file. OpenBridge is a macOS-first local agent chat app. It preserves the native macOS chat experience, embedded WebViews, skills, schedules, memory, computer-use workflows, and sandbox VM execution while removing login, payment, usage, backend-hosted LLM clients, clipboard history, and Lens/screenshot capture features. The local agent runtime is built around vendored kwwk in this repository. Keep kwwk broadly useful as…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository18 other files it gives its agents.
- macos/AGENTS.mdAGENTS.md
- sandbox-vm/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- macos/CLAUDE.mdCLAUDE.md
- sandbox-vm/CLAUDE.mdCLAUDE.md
- app-store-changelogSkill
- bridge-agent-log-analyzerSkill
- gh-issue-fix-flowSkill
- githubSkill
- react-component-performanceSkill
- swift-concurrency-expertSkill
- swift-concurrencySkill
- swift-testing-expertSkill
- swiftui-expert-skillSkill
- swiftui-performance-auditSkill
- swiftui-ui-patternsSkill
- swiftui-view-refactorSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 10 are distinctive, and 12 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 39
Do not generate markdown documents after files changed.
- Distinctive: line 40
Do not add comments solely for chat information.
- Distinctive: line 46
Use early returns to reduce nesting.
- Distinctive: line 47
Keep functions and methods focused and small.
- Distinctive: line 48
Use meaningful variable names.
- Distinctive: line 50
Prefer dependency injection over singletons.
- Distinctive: line 51
Prefer composition over inheritance.
- Very specific: line 55
Prefer the provided scripts and make targets for day-to-day work.
- Very specific: line 73
Before launching a freshly built app, close any already-running OpenBridge instances first:
- Very specific: line 80
When iterating on web/src/embedded/chat with cd web && yarn serve:chat, do not rebuild or relaunch the macOS app for every chat-only change.
- Very specific: line 87
Prefer make targets for local work.
- Very specific: line 90
Use context.Context for cancellation and timeouts.
- Very specific: line 92
Use table-driven tests with _test.go suffix.
- Very specific: line 97
Prefer DevKit build scripts.
- Very specific: line 98
Use @Observable macro rather than ObservableObject/@Published.
- Very specific: line 99
Use Swift concurrency: async/await, Task, actor.
- Very specific: line 101
Use String(localized:) for user-facing strings.
- Very specific: line 102
Never edit .xcstrings directly.
- Distinctive: line 106
Use yarn for package management and rspack for bundling.
- Distinctive: line 107
Use oxlint and prettier for code quality.
- Distinctive: line 108
Use Tailwind CSS for styling.
- Very specific: line 109
Keep web/src/embedded focused on WebViews embedded in the macOS app.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance to LLM coding agents when working with code in this repository.
Note:
CLAUDE.mdis a symlink to this file.
Project Overview
OpenBridge is a macOS-first local agent chat app. It preserves the native macOS chat experience, embedded WebViews, skills, schedules, memory, computer-use workflows, and sandbox VM execution while removing login, payment, usage, backend-hosted LLM clients, clipboard history, and Lens/screenshot capture features.
The local agent runtime is built around vendored kwwk in this repository. Keep kwwk broadly useful as an agent SDK; avoid adding OpenBridge-specific business concepts to it unless they are general SDK primitives.
Repository Structure
openbridge/
├── sandbox-vm/ # Go sandbox VM control library and macOS runtime framework
├── macos/ # SwiftUI macOS application
├── kwwk/ # Vendored local agent SDK/runtime
├── web/ # Embedded WebView React assets
│ └── src/
│ ├── assets/ # Shared assets
│ ├── embedded/ # WebViews embedded in macOS app
│ └── utils/ # Shared utilities and JSBridge client
├── scripts/ # Shared utility scripts
├── docs/ # Project documentation
└── .github/workflows/ # CI pipelinesComponent Guidelines
- sandbox-vm/AGENTS.md — Go sandbox VM control library and macOS runtime framework
- macos/AGENTS.md — SwiftUI macOS application
- web/AGENTS.md — TypeScript/React embedded WebViews
- macos/DevKit/XcodeStringsHelper/AGENTS.md — Xcode
.xcstringslocalization tooling
Agent Guide
- Do not generate markdown documents after files changed; output directly.
- Do not add comments solely for chat information; comments must have long-term value.
- Limit batch sizes to about 100 items when generating large outputs.
- Clean up temporary files after completing generation tasks.
Common Principles
- Use early returns to reduce nesting.
- Keep functions and methods focused and small.
- Use meaningful variable names.
- Maintain one authoritative source for each piece of logic.
- Prefer dependency injection over singletons.
- Prefer composition over inheritance.
Build Commands
Prefer the provided scripts and make targets for day-to-day work. CI, Makefiles, and repo scripts may invoke underlying tools directly; avoid running low-level build commands manually unless debugging the scripts themselves.
| Component | Build Command | Test Command |
| macOS App | cd macos && BUILD_CONFIGURATION=UnsignedDebug bash DevKit/Scripts/workspace_build_debug.sh | cd macos && bash DevKit/Scripts/workspace_test_unit.sh |
| Sandbox VM | make -C sandbox-vm framework | make -C sandbox-vm go-test |
| Web embedded assets | cd web && yarn build:embedded | — |
| kwwk | cd kwwk && swift build | cd kwwk && swift test |
Fresh Worktree Bootstrap
On a fresh worktree, build embedded WebView resources before building the macOS app:
cd web && yarn install --immutable && yarn build:embedded
cd macos && BUILD_CONFIGURATION=UnsignedDebug bash DevKit/Scripts/workspace_build_debug.shBefore launching a freshly built app, close any already-running OpenBridge instances first:
pkill -f '/OpenBridge.app/Contents/MacOS/OpenBridge' || true
open -na "/absolute/path/to/macos/.build/DerivedData/Build/Products/UnsignedDebug/OpenBridge.app"When iterating on web/src/embedded/chat with cd web && yarn serve:chat, do not rebuild or relaunch the macOS app for every chat-only change. Rebuild/relaunch only when native macOS code, JS bridge/native integration, or packaged WebKitBridgeResources change.
Language-Specific Guidelines
Go
- Go 1.24+ required.
- Prefer
maketargets for local work. - Tabs for indentation.
- Wrap errors with context:
fmt.Errorf("context: %w", err). - Use
context.Contextfor cancellation and timeouts. - Define interfaces where used, not where implemented.
- Use table-driven tests with
_test.gosuffix.
Swift
- 4 spaces for indentation.
- Prefer DevKit build scripts; avoid invoking
xcodebuildorswift buildmanually for the app. - Use
@Observablemacro rather thanObservableObject/@Published. - Use Swift concurrency:
async/await,Task,actor. - Split files using the
Xxx+Xxx.swiftpattern. - Use
String(localized:)for user-facing strings. - Never edit
.xcstringsdirectly; usei18n.py apply.
TypeScript/React
- Use yarn for package management and rspack for bundling.
- Use oxlint and prettier for code quality.
- Use Tailwind CSS for styling.
- Keep
web/src/embeddedfocused on WebViews embedded in the macOS app.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

