mecatl
AGENTS.md308 starsChanged 37 days agoApache-2.0View on GitHub
Coding-agent instructions for this harness, built in Go 1.27.3 minimum. CLAUDE.md is a symlink; edit this file, never the symlink. Build through the Taskfile; bare root go build leaves stray binaries. - While iterating, run the smallest focused test that exercises the change and its direct integration boundary. Run task test once per integrated change set, not after every edit. - Before a PR is ready, task lint && task test:race must pass and the offline demo must show tool…
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 31,774 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 repository12 other files it gives its agents.
- engine/AGENTS.mdAGENTS.md
- internal/AGENTS.mdAGENTS.md
- user-docs/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- cut-releaseSkill
- mecak8s-kind-manual-verifySkill
- mecatl-learning-configSkill
- mecatl-model-router-configSkill
- panel-reviewSkill
- perf-mcp-interpretationSkill
- perf-optimizationSkill
- tech-writerSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 1 is common, 3 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Before a PR is ready, task lint && task test:race must pass and the offline demo must show tool call, permission ask/approval, and result.
- Distinctive: line 54
Follow the scoped rule; surface breaks and their upgrade implications to the operator before implementation.
- Common: line 62
Default secret scrubbing stays on.
- Very specific: line 71
Use injected port.Diagnostics, not default or package-level slog, in engine/ and internal/.
- Very specific: line 82
When delegating, pass known paths and context.
- Very specific: line 96
Before editing user-docs/, use the tech-writer skill and read user-docs/AGENTS.md.
- Distinctive: line 107
When an edit is needed, make the smallest in-place correction rather than appending a paragraph about the change.
- Distinctive: line 109
Keep per-fix implementation details and regression cases in code and tests.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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: Mecatl
Coding-agent instructions for this harness, built in Go 1.27.3 minimum. CLAUDE.md is a
symlink; edit this file, never the symlink.
Build and test
Build through the Taskfile; bare root go build leaves stray binaries.
task build # binaries in bin/
task test # complete offline suite, all modules and standalone proofs
task test:race # complete suite with race detection
task lint # root, engine, authn/oidc, and provider modules
task docs # regenerate references and run strict documentation checks
task generate # regenerate protobuf contracts and configuration reference
go run ./cmd/mecademo # offline session smoke test- While iterating, run the smallest focused test that exercises the change and its
direct integration boundary. Run
task testonce per integrated change set, not after every edit. - Before a PR is ready,
task lint && task test:racemust pass and the offline demo must show tool call, permission ask/approval, and result. CI verifies the branch independently; it does not replace these local gates. Give complete Go test suites (test,test:race,test:workspace, andtest:workspace:race) an outer timeout of 1800 seconds (30 minutes). Give other full gates a 600-second timeout. - Tests are offline and isolated from operator state: prefer
mockllm,memfs,memstore, and the conformance suites; real-adapter tests need explicit fixtures.task e2euses live providers and costs money; it is not an offline gate. - For changes spanning Go modules, follow the cross-module workflow
before changing dependency pins. Use
task test:workspace:racefor same-checkout evidence; it does not replace standalone/publication checks. Keep module sums tracked; rootgo.work.sumis ignored. - See Taskfile.yml for golden updates, benchmarks, and other tasks.
Module layout
The root is one Go module; engine/ is its own. Root go test ./... does not cross
the module boundary; task test does. engine/,
internal/, and website/ have their own
AGENTS.md. When the code doesn't explain how parts fit together, read the chapter
for that area from docs/READING.md.
Implementation boundaries
- Dependencies point inward (depguard): core
engine,agent, andteamcode never imports adapters, hostinternal, generated contracts,os, SDKs, or gRPC. Core tests may use referenceengine/adapter/*, never hostinternal. Wiring lives ininternal/appandcmdmains. Keep depguard, DAG, and standalone-module guards and their existing narrow exceptions. - Remote-observable API changes, including engine-originated semantics, require the wire API compatibility assessment. Follow the scoped rule; surface breaks and their upgrade implications to the operator before implementation.
- File writes preserve read-before-edit, exact matching, uniqueness, and CAS; new-file writes are create-only. Dispatch stays read-parallel/mutate-serial; direct-write children mutate the parent and run behind the barrier.
- Permissions are deny-dominant; configured Ask is never bypassed by posture. Keep shell checks substitution-aware and project trust root-aware: posture alone does not trust a headless checkout.
- Default secret scrubbing stays on. Never inspect or disclose credential values. Scrubbing is not an OS sandbox.
- No-FS children stay file-less. Skills expose logical assets, not extra workspace or execution roots.
- Fence untrusted content with the canonical governance fences and keep child isolation. MCP is streaming-HTTP only; never spawn stdio MCP servers. Post-tool hooks cannot undo execution: enforce incoming-result checks by rewriting the effective payload, keeping recorded, streamed, and model-visible content equal and repairing UTF-8. Keep secret-shaped headers byte-exact and out of projections.
- Use injected
port.Diagnostics, not default or package-level slog, inengine/andinternal/. Diagnostics, audit, and durable events have distinct contracts; logs can contain user data. - A model-dependent affordance needs a model-visible instruction and a test proving it reaches the right system-prompt layer through the real factory. Do not pin arbitrary documentation prose in tests.
Working conventions
- Find unfamiliar symbols with
Grep, then boundedReadcalls; avoid parallel full-file reads and searching scratch worktrees or dependencies. - When delegating, pass known paths and context. Omit
max_run_tokens,max_turns,max_tool_calls, andtimeout_msunless the task needs a bound, and omitauthorityunless deliberately reducing it. - Work notes and smoke-test artifacts go under ignored
.scratch/. Disposable test files uset.TempDir()(Go) or$TMPDIR(Shell), not.scratch/or a hard-coded/tmp: the managed Shell lease is reclaimed even if the test process is killed. - Shell is POSIX
/bin/sh. Forgh, put multiline Markdown in a scratch file and use--body-file; don't build Markdown with Bash-only syntax,eval, or command substitution. - Stage explicit paths, never
git add -A. End commits withCo-Authored-By. Humans alone merge PRs. - Generated files change only via
task generate, never by hand. docs/drafts/holds proposals and work records, not current behavior; don't rely on it for how Mecatl works.- Before editing
user-docs/, use thetech-writerskill and readuser-docs/AGENTS.md. It owns documentation scope and authoring guidance. - Markdown changes run
task docs. User-facing changes update the owninguser-docs/page when documentation adds information beyond UI hints or self-evident behavior. - Architecture docs record stable boundaries, ownership, dependencies, data flow, contracts, and rationale. Update them only when an existing architectural claim becomes false or materially incomplete, or a new architectural concept needs explaining.
- A bug fix that restores an existing invariant normally needs no architecture edit. When an edit is needed, make the smallest in-place correction rather than appending a paragraph about the change.
- Keep per-fix implementation details and regression cases in code and tests; keep change history in PR descriptions or release notes, not architecture chapters.
Path-scoped invariants live in .claude/rules/*.md, including test isolation
(composition helpers and a test-owned UserModelDir).
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.

