orchestrate

orchestrate is a command for Claude Code from jsohi/app-trading-engine. It costs 14 tokens per session (4,454 once invoked), scanned A, original, Apache-2.0.

An automated development loop that reviews code, runs tests, formats changes, pushes them, and checks another review. It repeats this process until no changes remain or three rounds are complete.

In plain words
What is it for?
Use it to run a fixed quality check on a full code change, including unit, integration, and end-to-end tests. It is also for tracking review findings and compliance results.
Why use it?
It removes the need to coordinate repeated review and testing steps manually. It also records which review comments were addressed in a final report.

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/orchestrate
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 orchestrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/jsohi/app-trading-engine/orchestrate.svg)](https://agentmods.dev/commands/jsohi/app-trading-engine/orchestrate)
Your own site
<a href="https://agentmods.dev/commands/jsohi/app-trading-engine/orchestrate"><img src="https://agentmods.dev/badge/commands/jsohi/app-trading-engine/orchestrate.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,454 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 $0.00014 $0.04454
Opus 5 $0.00007 $0.02227
Sonnet 5 $0.00003 $0.00891
Haiku 4.5 $0.00001 $0.00445

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

Security

Grade A, and why

orchestrate 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 3d 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/orchestrate.md · 376 lines

How it starts

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

Orchestrate — Automated Review-Fix-Push-Review Convergence Loop

Run the full quality loop until zero changes across all gates: local review, tests, formatting, push, and Gemini review. Produces a session report with every comment's status and industry compliance percentage.

MANDATORY EXECUTION RULES — READ FIRST

These rules are non-negotiable and OVERRIDE any judgment about efficiency or shortcuts:

  1. ALWAYS run /review every iteration — spawns 2 fresh agents on ALL changes. Never skip. Never do "quick delta check."
  2. ALWAYS run ALL 3 test suites./gradlew test, ./gradlew :integration-tests:test, ./gradlew e2e. Never skip even if "nothing changed."
  3. NEVER accept or defer ANY comment — dev phase means fix everything. No "accepted," no "out of scope," no "good enough."
  4. ALWAYS review ALL changes — every iteration reviews the full diff main...HEAD, not just the delta since last review.
  5. ALWAYS wait for and address Gemini review — after push, wait 270s, poll, fix all findings.
  6. NEVER terminate early — loop until zero changes in a full pass, or hit max 3 iterations.
  7. ALWAYS produce the final report — comment ledger + compliance dashboard + accepted/out-of-scope table (must be empty).
  8. ALWAYS write the report to a filedocs/review-reports/{issue}-session-{date}.md for persistence.

Step 0: Initialize

  1. Determine the Linear issue number from the branch name or argument (e.g., APP-35).
  2. Initialize the comment ledger — an empty list that accumulates every finding across all iterations:
    commentLedger = []
    iteration = 0
    converged = false
    startTime = now
    agentsSpawned = 0
    geminiRounds = 0
    
  3. Record the start time for the session report.
  4. Record the rollback checkpoint — save the current commit SHA so we can revert if the loop makes things worse:
    BASELINE_SHA=$(git rev-parse HEAD)
    
    If the loop hits max iterations without converging, offer to revert to this SHA.

Read the full file on GitHub · 376 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. 3d ago First seen · 376 lines · 14 tokens per session scan A 65ec2f53b2b9

Subscribe to this mod's changes

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