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.
- CLAUDE.mdCLAUDE.md
- golang-concurrencySkill
- golang-testingSkill
- mygo-maintenanceSkill
- sketch-design-from-referenceSkill
- sketch-design-to-codeSkill
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
- Very specific: line 25
Run from the repository root (on Windows without make, use the equivalent commands in README.md):
- Distinctive: line 37
Follow package boundaries in docs/architecture.md and preserve all invariants in docs/domain.md.
- Very specific: line 39
Never do I/O or spawn processes on the UI thread.
- Very specific: line 41
Read terminal/GUI environments and PATH only through internal/sysenv (GUI process env != terminal env).
- Very specific: line 43
All user-visible UI strings must come from locales/ (en.json is the source catalog), not hardcoded literals.
- Distinctive: line 48
Keep solutions simple and readable.
- Very specific: line 49
Prefer built-in mygo / Go stdlib functionality over custom code.
- Distinctive: line 54
Check docs/design.md for color tokens, window chrome rules, and recurring patterns before changing UI.
- Distinctive: line 55
Keep action buttons, row heights, icon sizes, and column grids aligned across sibling screens.
- Very specific: line 56
Verify long names, localization strings (en and ru at minimum), empty/loading/error states, scrolling, and both standard (1280x820) and …
- Distinctive: line 62
Test meaningful behavior and invariants rather than chasing coverage percentages.
- Distinctive: line 66
Write code, comments, documentation, and commit messages in English.
- Very specific: line 67
Use Conventional Commits (feat: ..., fix: ..., docs: ..., chore: ...).
- Very specific: line 68
Never commit secrets, personal hostnames, IPs, cluster names, emails, or machine-specific paths.
- Distinctive: line 69
Update docs/product.md, docs/domain.md, or docs/decisions.md when user-facing behavior, invariants, or architectural decisions change.
≈ “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.
Files
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 workmake test/make lint/make fmt- individual checksmake e2e- end-to-end test with theautomationplugin (e2e/, requires a desktop session)make build- release bundle for the current OS inbuild/<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/opswith an explicitPlan, 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 storeui.Elementin state. - Execute external commands only through
internal/run(explicitargv,ctx, timeout, output cap) - never via shell strings. - Read terminal/GUI environments and
PATHonly throughinternal/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 onruntime.GOOSinside logic. - All user-visible UI strings must come from
locales/(en.jsonis 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 (
enandruat minimum), empty/loading/error states, scrolling, and both standard (1280x820) and narrow (1000x680) window sizes. Lock important layout geometry inui.NewTestertests.
Testing
- Logic (
sources,projects, detectors, parsers, operations): table-driven stdlib tests with fixtures intestdata/, fakerun.Runner, andt.TempDir(). Real shell/OS tests use//go:build integration. - UI:
ui.NewTesteragainst fakeinventory.Snapshotfixtures. - 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
| Topic | Reference |
mygo UI, state, threading, testing, builds | Skill mygo-maintenance (.agents/skills/mygo-maintenance/SKILL.md); module docs via go list -m -f '{{.Dir}}' github.com/egoist/mygo |
| Go testing & concurrency patterns | Skills golang-testing, golang-concurrency (.agents/skills/) |
| Package boundaries & architecture | docs/architecture.md |
| Implemented user-facing behavior | docs/product.md |
| Product invariants & test map | docs/domain.md |
| Design tokens & UI patterns | docs/design.md |
| Architectural decisions | docs/decisions.md |
| Skill sources & licenses | .agents/skills/SOURCES.md |
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.

