agentleFS
subgenticsubgentic/coral/CLAUDE.md

coral

CLAUDE.md137 starsChanged 7 months agoApache-2.0View on GitHub

The Go codebase (coral-go/) is Coral's implementation. RULES: 1. The Go codebase is the source of truth. Improve it freely. 2. Only modify code under coral-go/ and tests/. All Makefile targets sync agent_docs automatically before building. The dev build tag skips the EULA. CRITICAL: Always use a separate data directory for test servers. The production Coral instance uses ~/.coral/ — running a test server against the same database will corrupt live sessions, kill running agents, and lose state. Use CORAL_DATA_DIR…

  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. cdknorow/coral★ 137100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this CLAUDE.md into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Only modify code under coral-go/ and tests/.

    line 9
  2. Distinctive:

    Write or update Go unit tests.

    line 51
  3. Very specific:

    Run go test ./... to ensure no regressions.

    line 52
  4. Distinctive:

    All Makefile targets sync agent_docs automatically before building.

    line 68
  5. Distinctive:

    Every tag builds Linux, macOS and Windows.

    line 120

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.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
CLAUDE.md

CLAUDE.md - Coral Go

Mission

The Go codebase (coral-go/) is Coral's implementation.

RULES:

  1. The Go codebase is the source of truth. Improve it freely.
  2. Only modify code under coral-go/ and tests/.

Testing

Go Unit Tests

cd coral-go && go test ./...

Project Structure

coral-go/               # The Go implementation
  cmd/                  # Entry points (coral, launch-coral, coral-board, coral-agent, coral-tray, coral-app, the hooks, mock-agent)
  internal/             # Core packages
    agent/              # Agent implementations (claude, gemini)
    background/         # Background services (git poller, indexer, scheduler, etc.)
    board/              # Message board store
    config/             # Configuration
    jsonl/              # JSONL log reader
    license/            # EULA (terms acceptance)
    pulse/              # Pulse event parser
    ptymanager/         # PTY/tmux session management
    server/             # HTTP server, routes, frontend assets
    store/              # SQLite storage layer
    tmux/               # Tmux client
  go.mod / go.sum       # Go module dependencies
tests/                  # Suites outside the Go module
  frontend/             # Dashboard tests: CDP browser suites (run_cdp_suites.mjs) and node tests (npm run test:cloud)
  stress/               # Stress and workflow runners against an isolated server
  release/              # Package checks the release workflow runs
  latency/              # Opt-in dashboard latency-budget guard (epoch only)
Casks/                  # Homebrew Cask definition
installers/             # Local build scripts per platform
tools/                  # Build, release and maintenance scripts
licenses/               # Third-party license texts
assets/                 # App icons and screenshots

Development Workflow

  1. Implement or fix features in coral-go/.
  2. Write or update Go unit tests.
  3. Run go test ./... to ensure no regressions.
  4. Build and manually verify as needed.

Development

Agent Docs

Agent docs live in coral-go/agent_docs/ (single source of truth) and are synced to the static embed directory at build time. The Makefile handles this automatically. Production builds sync via bundle-frontend.sh.

Building (via Makefile)

cd coral-go && make build       # production build
cd coral-go && make dev         # dev build (skips the EULA)
cd coral-go && make run         # dev build + run on :8420
cd coral-go && make test-server # dev build + run on :8450 (0.0.0.0)
cd coral-go && make test        # run all tests

All Makefile targets sync agent_docs automatically before building.

Building (manual)

cd coral-go && go build -o coral ./cmd/coral/

Dev Mode

cd coral-go && go build -tags dev -o coral ./cmd/coral/ && ./coral --host 127.0.0.1 --port 8420

The dev build tag skips the EULA.

Test Server

To spin up a test server for manual verification, use 0.0.0.0 (not 127.0.0.1) so it's reachable from other machines, and a non-default port to avoid conflicts.

CRITICAL: Always use a separate data directory for test servers. The production Coral instance uses ~/.coral/ — running a test server against the same database will corrupt live sessions, kill running agents, and lose state. Use CORAL_DATA_DIR to isolate test data:

cd coral-go && go build -tags dev -o coral ./cmd/coral/ && CORAL_DATA_DIR=/tmp/coral-test ./coral --host 0.0.0.0 --port 8450 --cloud-url off --no-browser

--cloud-url off keeps a test server away from the real Coral Hub (a release build connects to app.coralhub.dev by default, and a CORAL_CLOUD_URL in the shell would point it there). --no-browser keeps it from opening its dashboard in the operator's default browser at startup (with an isolated profile that is a fresh-profile browser window on their desktop). Build the agent tools with the server (go build -tags dev -o <dir>/ ./cmd/coral ./cmd/coral-board ./cmd/coral-agent ./cmd/coral-hook-*, which make dev does), or set CORAL_HOOK_DIR: a dev or test server never uses the installed app's hooks, and its startup log names where its agents' hooks come from.

Database

  • SQLite with WAL mode, stored at ~/.coral/sessions.db
  • Message board DB at ~/.coral/messageboard.db
  • Never run test servers against the production ~/.coral/ directory. Always set CORAL_DATA_DIR to a temp/test path when running manual test servers or integration tests that start a full server process.

Releases

Local Builds

Build installers for each platform from any OS:

./installers/build-windows.sh 0.7.0   # → installers/dist/coral-windows-amd64-0.7.0.zip
./installers/build-macos.sh 0.7.0     # → installers/dist/Coral-0.7.0.dmg (or .tar.gz on Linux)
./installers/build-linux.sh 0.7.0     # → installers/dist/coral-linux-amd64-0.7.0.tar.gz (add arm64 for coral-linux-arm64-…)

Tagged Release (CI)

Pushing a tag triggers the GitHub Actions release workflow. Tag suffixes control build behavior:

Build Tiers

Tiers are selected via compile-time build tags (not ldflags). Coral has no licence and no usage limits in any tier. Tiers differ only in the EULA and the default Coral Hub (TierDefaultCloudURL: https://app.coralhub.dev for prod and staging; none for dev). The beta and dropboxers tiers were removed (#15075): a stale -tags beta or -tags dropboxers builds prod, and an old -beta or -forDropbox tag still parses (a prerelease that builds prod):

TierBuild TagEULA
Prod(default)Required
Dev-tags devSkipped

Tag Naming Conventions

Every tag builds Linux, macOS and Windows. The suffix picks the build tier and whether the release is a prerelease (never shown as "Latest", so installed Corals don't offer it as an update):

Tag FormatTierRelease
v0.x.xprodLatest (use this for production)
v0.x.x-devdev (EULA skipped)prerelease
v0.x.x-rc…prodprerelease

The version is the tag name without the leading v, suffix included, so tag production releases as plain vX.Y.Z: the old -windows / -all suffixes no longer change the build and would end up in the version string.

Local builds with tiers

# Dev build (no EULA)
CORAL_TIER=dev ./installers/build-macos.sh 0.10.15

# Prod build (default — EULA required)
./installers/build-macos.sh 0.10.15

Example release flow

# Dev build (no EULA; prerelease)
git tag v0.10.15-dev
git push origin main --tags

# Production release (all platforms; the workflow creates the GitHub Release,
# uploads the packages, SHA256SUMS.txt and their Sigstore bundles, and attests provenance)
git tag v0.10.15
git push origin main --tags

The workflow (.github/workflows/release.yml) produces:

  • Linux: coral-linux-amd64-<version>.tar.gz and coral-linux-arm64-<version>.tar.gz (each built and smoke-tested on its own native runner), each with a .sigstore.json bundle
  • Windows: Coral-<version>-x64.msi + Coral-<version>-x64-portable.zip
  • macOS: Coral.dmg (universal binary, signed + notarized if certs configured)

Required GitHub Secrets (for signing)

  • macOS: MACOS_CERTIFICATE, MACOS_CERTIFICATE_PWD, MACOS_SIGNING_IDENTITY, APPLE_ID, APPLE_TEAM_ID, APPLE_APP_PASSWORD
  • Windows: WINDOWS_CERTIFICATE, WINDOWS_CERTIFICATE_PWD

Signing is optional — builds succeed without secrets, just unsigned.

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.