roughlogic.com AGENTS.md

Written guidance for AI agents working with roughlogic.com, an offline-first website containing 1,804 trade calculators and a local MCP server. MCP lets an AI agent search, inspect, and run those calculators through a local connection.

In plain words
What is it for?
Using, maintaining, or extending calculators for electrical, plumbing, HVAC, construction, restoration, and other US-standard trade work.
Why use it?
It explains how to find the right calculator and obtain its inputs, outputs, examples, citations, and limitations without manually browsing the whole site.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/clay-good/roughlogic.com/agents-md
Clone the repo
git clone --depth 1 https://github.com/clay-good/roughlogic.com

Made for: Codex, OpenCode.

Per session 1,028 This file is loaded in full into every session.
When invoked 1,028 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.01028 $0.01028
Opus 5 $0.00514 $0.00514
Sonnet 5 $0.00206 $0.00206
Haiku 4.5 $0.00103 $0.00103

Measured 2d ago against content hash 01ff1331b8b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

roughlogic.com AGENTS.md 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 2d 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.

AGENTS.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Guidance for AI agents working in or with this repository. (Humans: see README.md; the MCP server has its own mcp/README.md.)

What this repo is

roughlogic.com is a static, offline-first site of 1,804 calculators for the trades (electrical, plumbing, HVAC, construction, restoration, and more) across 57 calc modules, plus a local, zero-cost MCP server that exposes every one of them to an AI agent. US standards only. No AI at runtime. Calculator execution is local; the only hosted write path is the bounded, user-initiated D1 feedback endpoint, and the MCP server runs on your machine over stdio.

Use the calculators as an agent (the fast path)

The server is local, zero-dependency, Node 18+. Point any MCP client at it:

claude mcp add roughlogic -- node /absolute/path/to/roughlogic.com/mcp/server.mjs

Four tools, all read-only and safe to call freely:

  • search_calculators — find a calculator by keyword and/or trade (no args → trade overview).
  • describe_calculator — one tile's inputs (with select options, units, min/max), outputs, worked examples, citation, and any limitation banner.
  • run_calculator — evaluate a tile; returns the raw result plus rendered outputs (units + display strings), range warnings, and the limitation banner.
  • answer_query — a plain-language question with its numbers in it, answered in one call. Use it instead of chaining search + describe + run when the question already carries its values.
  • run_calculators — up to 50 { id, inputs } calls in one request, for sweeps and comparisons.

Typical flow: search_calculatorsdescribe_calculatorrun_calculator. The server also serves MCP resources (roughlogic://catalog, roughlogic://trade/{trade}, roughlogic://calculator/{id}) and prompts (find-calculator, run-with-inputs, size-and-check). See mcp/README.md for client-specific config.

The repo map

What Where
Compute functions and renderers calc-*.js (one module per trade group)
Tile registry (id → name, group, trades) tools-data.js
Tile id → compute function test/fixtures/compute-map.js
Tile id → renderer (for field schemas) test/fixtures/renderer-map.js (generated from tool-modules.js)
Publisher-verified worked examples test/fixtures/worked-examples.json
MCP server + catalog layer mcp/server.mjs, mcp/catalog.mjs
Shared calculator report UI report-feedback.js
Defensive report Worker + D1 report-worker.mjs, migrations/

Read the full file on GitHub · 75 lines

Changes

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.

  1. 2d ago First seen · 75 lines · 1,028 tokens per session scan A 01ff1331b8b9

Subscribe to this mod's changes

roughlogic.com AGENTS.md is an instructions file published in the GitHub repository clay-good/roughlogic.com (3 stars, last pushed 3d ago), licensed MIT. It adds 1,028 tokens to every session, about $0.0051 per session on Opus 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.

Related

Other instructions, from other repositories