tma1 AGENTS.md

tma1 AGENTS.md is an instructions file for Codex, OpenCode from tma1-ai/tma1. It costs 2,392 tokens per session, scanned C, original, Apache-2.0.

Repository guidance for TMA1, a local-first monitoring system for AI agents. It collects traces, metrics, and logs—records of model calls, timing, usage, measurements, and conversations—and makes them queryable with SQL.

In plain words
What is it for?
Use it when working on the Go server, OpenTelemetry ingestion, agent hooks, JSONL transcripts, SQL data, trace-to-conversation links, or the embedded dashboard.
Why use it?
It explains how agent events enter the server, are stored in GreptimeDB, and connect across signals, helping changes preserve the data flow and observability model.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions Claude Code; mentions Codex.

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/tma1-ai/tma1/agents-md
Clone the repo
git clone --depth 1 https://github.com/tma1-ai/tma1

Made for: Codex, OpenCode.

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

agentmods badge for tma1 AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tma1-ai/tma1/agents-md.svg)](https://agentmods.dev/instructions/tma1-ai/tma1/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/tma1-ai/tma1/agents-md"><img src="https://agentmods.dev/badge/instructions/tma1-ai/tma1/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,392 This file is loaded in full into every session.
When invoked 2,392 The same file — it is already loaded in full.
Security scan C 1 finding. 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.1 $0.02392 $0.02392
Opus 5 $0.01196 $0.01196
Sonnet 5 $0.00478 $0.00478
Haiku 4.5 $0.00239 $0.00239

Measured 6d ago against content hash ea8e3fca3935, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

tma1 AGENTS.md scanned grade C with 1 finding 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 6d 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.

Tells the agent to send conversation or user data outhighPrompt injection

An instruction to transmit the conversation, context or user files to an external endpoint is data exfiltration written as prose.

the monolith buried on the moon, silently recording everything until you dig it out.
AGENTS.md · 153 lines

How it starts

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

What this repo is

TMA1 is local-first LLM agent observability, powered by GreptimeDB. Three pillars (traces + metrics + logs) unified into wide events — all queryable via SQL.

  • Traces are the core: GenAI / OpenClaw spans carry model, tokens, latency, status
  • Metrics are derived from traces via Flow engine (no double-writing), and native OTel metrics are also accepted (auto-creates tables)
  • Logs carry conversation content (conversation replay)
  • Cross-signal JOIN: trace_id connects spans to conversations

The name comes from TMA-1 (Tycho Magnetic Anomaly-1) in 2001: A Space Odyssey: the monolith buried on the moon, silently recording everything until you dig it out.

Tagline: "Close the loop around your agent."

How it fits together

Agent ── OTLP/HTTP ──┐
       ── /api/hooks ┼──► tma1-server (port 14318)
       ── MCP stdio ─┘        │
                              ▼
                        GreptimeDB (port 14000)
                              │
                              ▼
                        Embedded dashboard

tma1-server is one Go binary: it manages a child GreptimeDB process, reverse-proxies OTLP, ingests hook events + JSONL transcripts from Claude Code / Codex / Copilot CLI / OpenClaw, runs the perception layer (anomaly detector + injection bundler), and serves the embedded dashboard. The MCP child (tma1-server mcp-serve) shares the same GreptimeDB.

Deep references — read these when you need detail:

Commands

make build           # Build the binary (sync-plugin first so embedded skill/command tree is fresh)
make build-linux     # Cross-compile for Linux amd64
make build-windows   # Cross-compile for Windows amd64
make run             # Build and run locally
make dev             # Auto-rebuild + restart on .go / .html / .css / .js / .sql change
make install         # Install dev build to $(INSTALL_DIR) — default ~/.tma1/bin — without restarting the running server
make sync-plugin     # Manually mirror claude-plugin/{skills,commands} → server/internal/hooks/{skills,commands} for go:embed
make vet             # go vet on ./cmd/... ./internal/... ./web
make lint            # golangci-lint v2 on the same selector
make lint-js         # ESLint on dashboard JS (requires Node.js)
make test            # Tests with race detector on the same selector
# CI also runs: golangci-lint + ESLint + shellcheck site/public/install.sh + PSScriptAnalyzer on install.ps1

Read the full file on GitHub · 153 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. 6d ago First seen · 153 lines · 2,392 tokens per session scan C ea8e3fca3935

Subscribe to this mod's changes

tma1 AGENTS.md is an instructions file published in the GitHub repository tma1-ai/tma1 (117 stars, last pushed 2d ago), licensed Apache-2.0. It adds 2,392 tokens to every session, about $0.0120 per session on Opus 5. A static security scan graded it C with 1 finding (tells the agent to send conversation or user data out). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.