agentleFS
AFK-surfAFK-surf/OpenBridge/AGENTS.md

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…

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
  1. Distinctive:

    Do not generate markdown documents after files changed.

    line 39
  2. Distinctive:

    Do not add comments solely for chat information.

    line 40
  3. Distinctive:

    Use early returns to reduce nesting.

    line 46
  4. Distinctive:

    Keep functions and methods focused and small.

    line 47
  5. Distinctive:

    Use meaningful variable names.

    line 48
  6. Distinctive:

    Prefer dependency injection over singletons.

    line 50
  7. Distinctive:

    Prefer composition over inheritance.

    line 51
  8. Very specific:

    Prefer the provided scripts and make targets for day-to-day work.

    line 55
  9. Very specific:

    Before launching a freshly built app, close any already-running OpenBridge instances first:

    line 73
  10. Very specific:

    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.

    line 80
  11. Very specific:

    Prefer make targets for local work.

    line 87
  12. Very specific:

    Use context.Context for cancellation and timeouts.

    line 90
  13. Very specific:

    Use table-driven tests with _test.go suffix.

    line 92
  14. Very specific:

    Prefer DevKit build scripts.

    line 97
  15. Very specific:

    Use @Observable macro rather than ObservableObject/@Published.

    line 98
  16. Very specific:

    Use Swift concurrency: async/await, Task, actor.

    line 99
  17. Very specific:

    Use String(localized:) for user-facing strings.

    line 101
  18. Very specific:

    Never edit .xcstrings directly.

    line 102
  19. Distinctive:

    Use yarn for package management and rspack for bundling.

    line 106
  20. Distinctive:

    Use oxlint and prettier for code quality.

    line 107
  21. Distinctive:

    Use Tailwind CSS for styling.

    line 108
  22. Very specific:

    Keep web/src/embedded focused on WebViews embedded in the macOS app.

    line 109

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS.md

This file provides guidance to LLM coding agents when working with code in this repository.

Note: CLAUDE.md is 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 pipelines

Component 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 .xcstrings localization 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.

ComponentBuild CommandTest Command
macOS Appcd macos && BUILD_CONFIGURATION=UnsignedDebug bash DevKit/Scripts/workspace_build_debug.shcd macos && bash DevKit/Scripts/workspace_test_unit.sh
Sandbox VMmake -C sandbox-vm frameworkmake -C sandbox-vm go-test
Web embedded assetscd web && yarn build:embedded—
kwwkcd kwwk && swift buildcd 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.sh

Before 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 make targets for local work.
  • Tabs for indentation.
  • Wrap errors with context: fmt.Errorf("context: %w", err).
  • Use context.Context for cancellation and timeouts.
  • Define interfaces where used, not where implemented.
  • Use table-driven tests with _test.go suffix.

Swift

  • 4 spaces for indentation.
  • Prefer DevKit build scripts; avoid invoking xcodebuild or swift build manually for the app.
  • Use @Observable macro rather than ObservableObject/@Published.
  • Use Swift concurrency: async/await, Task, actor.
  • Split files using the Xxx+Xxx.swift pattern.
  • Use String(localized:) for user-facing strings.
  • Never edit .xcstrings directly; use i18n.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/embedded focused on WebViews embedded in the macOS app.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.