Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/SafetyMP/Autonomous-EHS-ManagementWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions)<a href="https://agentmods.dev/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions"><img src="https://agentmods.dev/badge/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions"><img src="https://agentmods.dev/badge/rules/safetymp/autonomous-ehs-management/ehs-ims-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00722 | $0.00722 |
| Opus 5.5 | $0.00289 | $0.00289 |
| Sonnet 5.5 | $0.00144 | $0.00144 |
| Haiku 4.5 | $0.00072 | $0.00072 |
Grade A, and why
ehs-ims-conventions scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Autonomous EHS — agent & developer conventions
Single system of record
- PostgreSQL + Drizzle is authoritative for commitments, statuses, approvals, and audit-relevant facts.
- Never introduce “TypeScript-only” columns or tables: every schema change needs a Drizzle migration (
npm run db:generate) and a deploy path.
RBAC
- Permission keys live in
src/lib/rbac.ts(PERMISSIONS). New procedures must callassertPermission(or equivalent) with the correct key. - Do not bypass RBAC for “internal” routes; agent/tool callers must use the same checks with a service identity if you add one later.
tRPC
- Routers live under
src/server/trpc/routers/. Register insrc/server/trpc/root.ts. - Prefer clear procedure names:
list,get,create,update,updateStatus— match existing routers (e.g.incident,capa,document). - Mutations that change regulated data should write
audit_logviawriteAuditLogwhere the codebase already does for other entities. - Compliance- or retention-affecting work (incident lifecycle,
data_retention_policy, RAG PII,COMPLIANCE.md,compliance.*routers): follow.cursor/skills/corporate-compliance-data-governance/SKILL.mdand the requestable rule compliance-data-governance.
Drizzle
- Schema:
src/server/db/schema.ts. Match naming and relation patterns already used (enums,updatedAt, FKonDelete). - After editing schema, run
npm run db:generateand commit the new SQL underdrizzle/migrations/.
Tests and risky areas
- Do not change auth session shape, proxy/dashboard auth gating, or env validation without updating Vitest and smoke E2E expectations.
- RBAC matrices and seed scripts: changing
PERMISSIONSrequiresscripts/seed.ts/ migration ofpermissionrows for existing orgs.
AI / LLM (when added)
- Structured outputs: validate model JSON against Zod schemas shared with or mirrored from API inputs — never trust free-form prose into the DB without parsing.
- Tool use: assistants must call typed tRPC or internal server handlers, not ad-hoc SQL or filesystem paths.
- Gateway: route all provider calls through
src/lib/ai/gateway.ts(or successor); no scatteredfetchto model APIs. - Safety: tie expensive AI routes to Upstash rate limits (
src/server/ratelimit.ts). Redact PII in prompts and logs where required. - Human-in-the-loop: do not auto-close investigations, auto-verify CAPA effectiveness, or silently commit regulatory classification without product policy.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 47 lines · 722 tokens per session scan A 1fed50f14e92
ehs-ims-conventions is a cursor rule published in the GitHub repository SafetyMP/Autonomous-EHS-Management (9 stars, last pushed 2d ago), licensed Apache-2.0. It adds 722 tokens to every session, about $0.0029 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
ehs-ims-conventions compared with cursor rules from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| ehs-ims-conventionsSafetyMP/Autonomous-EHS-Management | Cursor rule | 9 | 2d ago | Apache-2.0 | A | 722 | Cursor |
| rulesforconvexwaynesutton/markdown-site | Cursor rule | 627 | 6mo ago | MIT | A | 514 | Cursor |
| convex2waynesutton/markdown-site | Cursor rule | 627 | 6mo ago | MIT | A | 6,284 | Cursor |
| backend0xJacky/nginx-ui | Cursor rule | 12k | today | AGPL-3.0 | A | 441 | Cursor |
| cursorruleskortix-ai/suna | Cursor rule | 21k | 2d ago | none | A | 4,277 | Cursor |
| vibes-plug-backendroedyrustam/vibes-plug | Cursor rule | 130 | 4d ago | MIT | A | 0 | Cursor |
| startup-migration-bounded-workTACC/HPCPerfStats | Cursor rule | 60 | yesterday | LGPL-2.1 | A | 0 | Cursor |