agentleFS
mudriimudrii/openclaw-dashboard/AGENTS.md

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.

  • In this repository2 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

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

    Use these native Codex files:

    line 5
  2. Very specific:

    Do not treat repo-root SKILLS.md or RULES.md as native auto-loaded Codex files.

    line 11
  3. Very specific:

    Do not treat CLAUDE.md or .claude/ as the native Codex instruction mechanism.

    line 12
  4. Very specific:

    Use the go-rig skill for meaningful Go code changes.

    line 17
  5. Very specific:

    Use the go-review skill when the task is review-first.

    line 18
  6. Very specific:

    Use the frontend-dashboard skill when changing the embedded SPA or dashboard UI.

    line 19
  7. Very specific:

    Use the project-ops skill when changing Makefile, CI, release, or operational docs.

    line 20
  8. Distinctive:

    Keep output aligned with the current repo architecture and toolchain.

    line 21
  9. Distinctive:

    Do not add external dependencies unless explicitly justified and necessary.

    line 31
  10. Very specific:

    Treat go.mod, toolchain declarations, and CI as the source of truth.

    line 32
  11. Very specific:

    Prefer make targets when available.

    line 33
  12. Distinctive:

    Prefer repo-defined checks over invented commands.

    line 34
  13. Distinctive:

    No stale comments: explain why, not how.

    line 51
  14. Distinctive:

    Do not swallow errors.

    line 55
  15. Distinctive:

    Never panic on expected failures.

    line 56
  16. Distinctive:

    Use only when measurable.

    line 60
  17. Distinctive:

    Every goroutine must have a shutdown path.

    line 61
  18. Distinctive:

    No unsafe shared writes; protect maps when mutated concurrently.

    line 62
  19. Very specific:

    Use table-driven tests with t.Run.

    line 65
  20. Distinctive:

    Add acceptance-like coverage for user-visible behavior and meaningful unit tests for invariants.

    line 66
  21. Very specific:

    Avoid speculative abstractions and generic utility folders (helpers, util, common).

    line 73
  22. Very specific:

    Prefer slog for structured logging.

    line 76
  23. Very specific:

    After edits, run go vet ./..., tests, race tests where supported, then go mod tidy only when imports changed.

    line 85
  24. Distinctive:

    Prefer modern Go features when they improve clarity and match the current toolchain.

    line 100
  25. Very specific:

    Do not apply go fix rewrites blindly.

    line 101
  26. Very specific:

    Use stdlib testing features that are available in the project toolchain (t.Context, b.Loop, t.ArtifactDir, testing/synctest) when they …

    line 105

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

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

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

Default Behavior

  • Use the go-rig skill for meaningful Go code changes.
  • Use the go-review skill when the task is review-first.
  • Use the frontend-dashboard skill when changing the embedded SPA or dashboard UI.
  • Use the project-ops skill 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.mod has no require block, no go.sum).
  • web/index.html is embedded via //go:embed and 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 make targets when available.
  • Prefer repo-defined checks over invented commands.

Internal Packages

  • appconfig — config loading, env, dotenv
  • appruntime — path resolution, version detection
  • appchat — AI gateway HTTP communication
  • apprefresh — collection jobs and aggregations
  • appserver — HTTP routing, caching, rate limiting
  • appsystem — OS/system metrics and probes
  • appservice — OS service management

Style Baseline

  • Go fmt/gofmt only (mechanical formatting).
  • Stdlib first; x/ before third-party; justify every dependency.
  • Concrete types over abstractions; unexported by 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 %w and check with errors.Is/As.
  • Do not swallow errors.
  • Never panic on expected failures.
  • context.Context is 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/ and pkg/ 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 slog for 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 build
  • make test
  • make lint
  • make check
  • After edits, run go vet ./..., tests, race tests where supported, then go mod tidy only when imports changed.

Review Rejects

  • Swallowed errors
  • Context misuse
  • Goroutine leaks
  • Unsafe shared state
  • Blind go fix changes
  • 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 fix rewrites 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" and json:",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.html is embedded.

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.