openclaw-dashboard
AGENTS.md457 starsChanged 3 months agoMITView on GitHub
This AGENTS.md is the native always-on Codex instruction file for this repository. Use these native Codex files: - .codex/skills/go-rig/SKILL.md for Go implementation and refactoring work - .codex/skills/go-review/SKILL.md for Go-focused review work - .codex/skills/frontend-dashboard/SKILL.md for embedded frontend/UI work - .codex/skills/project-ops/SKILL.md for build, CI, release, and command-surface work Do not treat repo-root SKILLS.md or RULES.md as native auto-loaded Codex files. Do not treat CLAUDE.md or .claude/ as the native Codex instruction mechanism. Those files remain for compatibility and reference only. Zero-dependency Go…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 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.
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
26 rules. About 0 are common, 12 are distinctive, and 14 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use these native Codex files:
- Very specific: line 11
Do not treat repo-root SKILLS.md or RULES.md as native auto-loaded Codex files.
- Very specific: line 12
Do not treat CLAUDE.md or .claude/ as the native Codex instruction mechanism.
- Very specific: line 17
Use the go-rig skill for meaningful Go code changes.
- Very specific: line 18
Use the go-review skill when the task is review-first.
- Very specific: line 19
Use the frontend-dashboard skill when changing the embedded SPA or dashboard UI.
- Very specific: line 20
Use the project-ops skill when changing Makefile, CI, release, or operational docs.
- Distinctive: line 21
Keep output aligned with the current repo architecture and toolchain.
- Distinctive: line 31
Do not add external dependencies unless explicitly justified and necessary.
- Very specific: line 32
Treat go.mod, toolchain declarations, and CI as the source of truth.
- Very specific: line 33
Prefer make targets when available.
- Distinctive: line 34
Prefer repo-defined checks over invented commands.
- Distinctive: line 51
No stale comments: explain why, not how.
- Distinctive: line 55
Do not swallow errors.
- Distinctive: line 56
Never panic on expected failures.
- Distinctive: line 60
Use only when measurable.
- Distinctive: line 61
Every goroutine must have a shutdown path.
- Distinctive: line 62
No unsafe shared writes; protect maps when mutated concurrently.
- Very specific: line 65
Use table-driven tests with t.Run.
- Distinctive: line 66
Add acceptance-like coverage for user-visible behavior and meaningful unit tests for invariants.
- Very specific: line 73
Avoid speculative abstractions and generic utility folders (helpers, util, common).
- Very specific: line 76
Prefer slog for structured logging.
- Very specific: line 85
After edits, run go vet ./..., tests, race tests where supported, then go mod tidy only when imports changed.
- Distinctive: line 100
Prefer modern Go features when they improve clarity and match the current toolchain.
- Very specific: line 101
Do not apply go fix rewrites blindly.
- Very specific: line 105
Use stdlib testing features that are available in the project toolchain (t.Context, b.Loop, t.ArtifactDir, testing/synctest) when they …
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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
OpenClaw Dashboard — Codex Instructions
This AGENTS.md is the native always-on Codex instruction file for this repository.
Use these native Codex files:
.codex/skills/go-rig/SKILL.mdfor Go implementation and refactoring work.codex/skills/go-review/SKILL.mdfor Go-focused review work.codex/skills/frontend-dashboard/SKILL.mdfor embedded frontend/UI work.codex/skills/project-ops/SKILL.mdfor build, CI, release, and command-surface work
Do not treat repo-root SKILLS.md or RULES.md as native auto-loaded Codex files.
Do not treat CLAUDE.md or .claude/ as the native Codex instruction mechanism.
Those files remain for compatibility and reference only.
Default Behavior
- Use the
go-rigskill for meaningful Go code changes. - Use the
go-reviewskill when the task is review-first. - Use the
frontend-dashboardskill when changing the embedded SPA or dashboard UI. - Use the
project-opsskill when changing Makefile, CI, release, or operational docs. - Keep output aligned with the current repo architecture and toolchain.
Go Development Standards
Zero-dependency Go HTTP server with embedded SPA frontend:
- Zero third-party dependencies (
go.modhas norequireblock, nogo.sum). web/index.htmlis embedded via//go:embedand rebuilds on frontend changes.- Root package is a façade: internal logic in
internal/app<domain>/, thin wrappers at repo root.
Project Constraints
- Do not add external dependencies unless explicitly justified and necessary.
- Treat
go.mod, toolchain declarations, and CI as the source of truth. - Prefer
maketargets when available. - Prefer repo-defined checks over invented commands.
Internal Packages
appconfig— config loading, env, dotenvappruntime— path resolution, version detectionappchat— AI gateway HTTP communicationapprefresh— collection jobs and aggregationsappserver— HTTP routing, caching, rate limitingappsystem— OS/system metrics and probesappservice— OS service management
Style Baseline
- Go fmt/gofmt only (mechanical formatting).
- Stdlib first;
x/before third-party; justify every dependency. - Concrete types over abstractions;
unexportedby default. - Short interfaces; consumer-side only; accept interfaces, return structs.
- Early returns and one-pass readable functions.
- No stale comments: explain why, not how.
Errors and Context
- Wrap errors with
%wand check witherrors.Is/As. - Do not swallow errors.
- Never panic on expected failures.
context.Contextis first parameter for I/O and request-scoped functions.
Concurrency
- Use only when measurable.
- Every goroutine must have a shutdown path.
- No unsafe shared writes; protect maps when mutated concurrently.
Testing
- Use table-driven tests with
t.Run. - Add acceptance-like coverage for user-visible behavior and meaningful unit tests for invariants.
- Fakes/stubs over mocks when possible.
- Deterministic seams for time, randomness, I/O.
Layout and Design
- Domain-oriented packages under
internal/andpkg/only when intentionally reusable. - Root wrappers must be zero-logic forwarding for compatibility.
- Avoid speculative abstractions and generic utility folders (
helpers,util,common).
Security and Ops
- Prefer
slogfor structured logging. - Validate config at startup; keep secrets out of logs and code.
- Set timeouts in HTTP/db/client usage and close all resources.
Commands (Common)
make buildmake testmake lintmake check- After edits, run
go vet ./..., tests, race tests where supported, thengo mod tidyonly when imports changed.
Review Rejects
- Swallowed errors
- Context misuse
- Goroutine leaks
- Unsafe shared state
- Blind
go fixchanges - Transport logic inside domain packages
- Behavior-changing refactors without matching tests
- Hardcoded magic values
- Unnecessary dependency creep
Go Version and Modernization
- Go toolchain follows project
go.mod/toolchain(1.27.x in CI context). - Prefer modern Go features when they improve clarity and match the current toolchain.
- Do not apply
go fixrewrites blindly; review behavior changes before accepting them.
Testing Guidance
- Use stdlib testing features that are available in the project toolchain (
t.Context,b.Loop,t.ArtifactDir,testing/synctest) when they improve test clarity. - For complex comparisons in this zero-dependency repo, prefer stdlib approaches or small purpose-built helpers. Do not assume
github.com/google/go-cmp/cmp.
JSON and API Compatibility
json:",omitzero"andjson:",omitempty"are available in the current toolchain, but tag changes are wire-format changes and must be reviewed as compatibility work.- Nil vs empty slice/map behavior must be intentional in JSON responses and persisted data.
Architecture Summary
- The repo is a zero-dependency Go HTTP server with an embedded SPA.
- Core logic belongs in
internal/app<domain>/. - The root package is a facade and must stay zero-logic.
- Frontend changes require rebuild because
web/index.htmlis embedded.
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.

