agentleFS
Blinks44Blinks44/hearth/AGENTS.md

hearth

AGENTS.md46 starsChanged 11 days agoMITView on GitHub

Instructions for AI coding agents working on the Hearth repository (CLAUDE.md imports this file via @AGENTS.md). Hearth is a free local desktop application (macOS, Windows, Linux) that shows installed dev tools, PATH resolution, project version pins, local Docker/Kubernetes/databases, and AI coding agents (skills, MCP, instructions, usage), and applies fixes or installations only after showing a plan and diff. Stack: Go 1.27.3+, mygo v0.10 (native immediate-mode UI, no cgo, no WebView). Prefer Go stdlib and golang.org/x/* before introducing third-party dependencies. Run…

  • 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 35,040 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 repository6 other files it gives its agents.

The file

Show its rules and text

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

15 rules. About 0 are common, 7 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Run from the repository root (on Windows without make, use the equivalent commands in README.md):

    line 25
  2. Distinctive:

    Follow package boundaries in docs/architecture.md and preserve all invariants in docs/domain.md.

    line 37
  3. Very specific:

    Never do I/O or spawn processes on the UI thread.

    line 39
  4. Very specific:

    Read terminal/GUI environments and PATH only through internal/sysenv (GUI process env != terminal env).

    line 41
  5. Very specific:

    All user-visible UI strings must come from locales/ (en.json is the source catalog), not hardcoded literals.

    line 43
  6. Distinctive:

    Keep solutions simple and readable.

    line 48
  7. Very specific:

    Prefer built-in mygo / Go stdlib functionality over custom code.

    line 49
  8. Distinctive:

    Check docs/design.md for color tokens, window chrome rules, and recurring patterns before changing UI.

    line 54
  9. Distinctive:

    Keep action buttons, row heights, icon sizes, and column grids aligned across sibling screens.

    line 55
  10. Very specific:

    Verify long names, localization strings (en and ru at minimum), empty/loading/error states, scrolling, and both standard (1280x820) and …

    line 56
  11. Distinctive:

    Test meaningful behavior and invariants rather than chasing coverage percentages.

    line 62
  12. Distinctive:

    Write code, comments, documentation, and commit messages in English.

    line 66
  13. Very specific:

    Use Conventional Commits (feat: ..., fix: ..., docs: ..., chore: ...).

    line 67
  14. Very specific:

    Never commit secrets, personal hostnames, IPs, cluster names, emails, or machine-specific paths.

    line 68
  15. Distinctive:

    Update docs/product.md, docs/domain.md, or docs/decisions.md when user-facing behavior, invariants, or architectural decisions change.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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

Instructions for AI coding agents working on the Hearth repository (CLAUDE.md imports this file via @AGENTS.md).

Project Overview

Hearth is a free local desktop application (macOS, Windows, Linux) that shows installed dev tools, PATH resolution, project version pins, local Docker/Kubernetes/databases, and AI coding agents (skills, MCP, instructions, usage), and applies fixes or installations only after showing a plan and diff.

Stack: Go 1.27.3+, mygo v0.10 (native immediate-mode UI, no cgo, no WebView). Prefer Go stdlib and golang.org/x/* before introducing third-party dependencies.

main.go                 entry point: window, tray, and `hearth mcp` dispatch
internal/               application packages (see docs/architecture.md)
locales/                UI string catalogs: en.json (source), de, es, fr, ru, zh-Hans
resources/              app & tray icons, embedded fonts, SVG icons, NOTICE.txt
e2e/                    end-to-end test driving the built binary (`-tags e2e`)
website/                landing page (TanStack Start + ModUIX), isolated CI
docs/                   architecture, product overview, invariants, design tokens, ADRs, roadmap
tools/go.mod            dev tools (golangci-lint), separate from app dependencies
.agents/skills/         agent skills (.claude/skills symlinks to them)

Commands

Run from the repository root (on Windows without make, use the equivalent commands in README.md):

  • make dev - live-reload desktop window (go tool mygo dev; localized UI: go tool mygo dev -lang ru)
  • make check - full CI suite (golangci-lint fmt --diff, golangci-lint run, mygo vet, mygo i18n check, go test -race + ./internal/ui): run before finishing work
  • make test / make lint / make fmt - individual checks
  • make e2e - end-to-end test with the automation plugin (e2e/, requires a desktop session)
  • make build - release bundle for the current OS in build/<os>-<arch>/

Generated or local paths (do not edit generated files by hand): locales/catalog_gen.go (generated by mygo dev / mygo generate from locales/*.json; committed), build/, .mygo/, .local/.

Architecture & Coding Rules

  • Follow package boundaries in docs/architecture.md and preserve all invariants in docs/domain.md.
  • Discovery is strictly read-only. Every mutating action goes through internal/ops with an explicit Plan, preview, and user confirmation.
  • Never do I/O or spawn processes on the UI thread. Publish background results exclusively through win.Update(...). Keep view functions pure and never store ui.Element in state.
  • Execute external commands only through internal/run (explicit argv, ctx, timeout, output cap) - never via shell strings.
  • Read terminal/GUI environments and PATH only through internal/sysenv (GUI process env != terminal env).
  • Split OS-specific code using Go build-suffix files (_darwin.go, _windows.go, _linux.go, _unix.go) rather than branching on runtime.GOOS inside logic.
  • All user-visible UI strings must come from locales/ (en.json is the source catalog), not hardcoded literals.
  • Wrap errors with fmt.Errorf("...: %w", err). A single failing detector must never abort a scan.

Principles

  • Keep solutions simple and readable; avoid speculative abstractions, unused settings, or over-engineering.
  • Prefer built-in mygo / Go stdlib functionality over custom code.
  • Respect user setups: detect the owning manager (mise, fnm, brew, winget, apt, ...) and work through it. Edit user shell rc files only inside # >>> hearth >>> / # <<< hearth <<< markers with backups and diffs; lines outside the block may only be commented out (never deleted) after confirmation.

UI & UX Guidelines

  • Check docs/design.md for color tokens, window chrome rules, and recurring patterns before changing UI.
  • Keep action buttons, row heights, icon sizes, and column grids aligned across sibling screens.
  • Verify long names, localization strings (en and ru at minimum), empty/loading/error states, scrolling, and both standard (1280x820) and narrow (1000x680) window sizes. Lock important layout geometry in ui.NewTester tests.

Testing

  • Logic (sources, projects, detectors, parsers, operations): table-driven stdlib tests with fixtures in testdata/, fake run.Runner, and t.TempDir(). Real shell/OS tests use //go:build integration.
  • UI: ui.NewTester against fake inventory.Snapshot fixtures.
  • Test meaningful behavior and invariants rather than chasing coverage percentages.

Git & Documentation

  • Write code, comments, documentation, and commit messages in English.
  • Use Conventional Commits (feat: ..., fix: ..., docs: ..., chore: ...).
  • Never commit secrets, personal hostnames, IPs, cluster names, emails, or machine-specific paths. Keep temporary scratch files in .local/ (gitignored).
  • Update docs/product.md, docs/domain.md, or docs/decisions.md when user-facing behavior, invariants, or architectural decisions change.

Where to Look

TopicReference
mygo UI, state, threading, testing, buildsSkill mygo-maintenance (.agents/skills/mygo-maintenance/SKILL.md); module docs via go list -m -f '{{.Dir}}' github.com/egoist/mygo
Go testing & concurrency patternsSkills golang-testing, golang-concurrency (.agents/skills/)
Package boundaries & architecturedocs/architecture.md
Implemented user-facing behaviordocs/product.md
Product invariants & test mapdocs/domain.md
Design tokens & UI patternsdocs/design.md
Architectural decisionsdocs/decisions.md
Skill sources & licenses.agents/skills/SOURCES.md

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.