compliance

compliance is a command for Claude Code from jsohi/app-trading-engine. It costs 9 tokens per session (3,879 once invoked), scanned A, original, Apache-2.0.

A command that measures a codebase against 13 weighted software-quality and production-readiness criteria and produces a percentage report.

In plain words
What is it for?
Assessing test coverage, allocation behavior, thread safety, documentation, autoboxing, and other standards for a production trading engine.
Why use it?
It replaces informal estimates with documented results from required scans and review checks.

Command for Claude Code

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 commands/jsohi/app-trading-engine/compliance
Clone the repo
git clone --depth 1 https://github.com/jsohi/app-trading-engine

Made for: Claude Code.

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 compliance

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsohi/app-trading-engine/compliance.svg)](https://agentmods.dev/commands/jsohi/app-trading-engine/compliance)
Your own site
<a href="https://agentmods.dev/commands/jsohi/app-trading-engine/compliance"><img src="https://agentmods.dev/badge/commands/jsohi/app-trading-engine/compliance.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,879 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00009 $0.03879
Opus 5 $0.00005 $0.01939
Sonnet 5 $0.00002 $0.00776
Haiku 4.5 $0.00001 $0.00388

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

Security

Grade A, and why

compliance 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 5d 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.

.claude/commands/compliance.md · 327 lines

How it starts

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

Compliance — Industry-Standard Scoring Dashboard

Score the codebase against 13 weighted industry metrics for a production trading engine. Produces a single percentage (0-100%) and a tabular report with per-category breakdown.

MANDATORY RULES

  1. NEVER mark anything as "accepted" or "out of scope" — dev phase means everything must meet the target.
  2. Score the ENTIRE codebase — not just the current branch's changes. This is a health check on all production code.
  3. Run ALL automated scans — do not skip any scan even if you "already know" the result.
  4. Spawn BOTH review agents — Agent A (Documentation + Thread-Safety) and Agent B (Allocation + Autoboxing + final var).
  5. NEVER estimate, guess, or approximate a score — every number in the report must come from an actual command execution. Never write "~", "approximately", "estimated", or "about". If a scan wasn't run, report "NOT MEASURED" instead of guessing.

Scoring Rubric — 13 Categories, 100 Points

# Category Weight Target Scope
1 Test Coverage (line + branch) 15 >= 80% combined All Java modules
2 Zero-Allocation Compliance 14 100% Hot-path: cluster, gateway, orchestrator, pricing-service, projections
3 Code Documentation Coverage 12 100% class + method All production Java
4 Determinism Compliance 10 100% cluster module
5 Collection Compliance 8 100% Hot-path modules
6 Autoboxing Compliance 8 100% Hot-path modules
7 FIX Protocol Compliance 7 100% trading-schema.xml
8 Formatting Compliance 5 Pass All Java
9 Logging Compliance 5 100% All modules
10 Clock Discipline 5 100% All non-test modules
11 final var Usage 4 >= 90% All production Java
12 Security (OWASP CVE) 4 0 findings >= 7.0 CVSS Full dependency tree
13 Thread-Safety Documentation 3 >= 90% All production public classes

Read the full file on GitHub · 327 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. 5d ago First seen · 327 lines · 9 tokens per session scan A cc54d5ac2c70

Subscribe to this mod's changes

compliance is a command published in the GitHub repository jsohi/app-trading-engine (2 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 9 tokens to every session and 3,879 once invoked, about $0.0000 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.