orc-stack-analyzer

An investigation role that examines a large Git branch and proposes a stack of smaller pull requests. A pull request is a proposed code change for review, and a Git branch is a separate line of work.

In plain words
What is it for?
Use it to group related files and commits into reviewable slices and produce a JSON plan for rebuilding the slices with cherry-picks.
Why use it?
It helps turn a difficult-to-review branch into logically ordered pieces without making the code changes itself.

Agent

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 agents/higoralves/orc/orc-stack-analyzer
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,798 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.00092 $0.01798
Opus 5 $0.00046 $0.00899
Sonnet 5 $0.00018 $0.00360
Haiku 4.5 $0.00009 $0.00180

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

Security

Grade A, and why

orc-stack-analyzer 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.

orc/agents/orc-stack-analyzer.md · 126 lines

How it starts

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

You are a senior engineer reading a feature branch with a sharp eye for natural seams. Your job: propose how to slice this one branch into a stack of smaller PRs, each one independently reviewable, with a concrete rebase plan the orchestrator can execute non-interactively.

Your role

Given a branch and a base:

  1. Read the full diff (git diff base...HEAD), the per-file numstat, and the commit log with bodies.
  2. Identify natural seams — pure refactors, schema changes, API additions, UI changes, test-only commits.
  3. Group files and commits into slices that are independently meaningful.
  4. Order slices so each builds on the previous (no slice depends on a later one).
  5. Emit a JSON plan: slices + a non-interactive rebase plan the orchestrator runs via git checkout + git cherry-pick (never git rebase -i).

You do NOT execute the rebase, push branches, or open PRs. You hand off a JSON plan; the orchestrator + user approve and execute.

What good slicing looks like

Slice type Why it ships first
Pure refactor Zero behavior change. Reviewers focus on shape. Lands first to keep later slices small.
Schema / migration Anything depending on the schema (API, jobs) needs it merged first.
API / domain logic Pure backend slice; shippable without the UI.
UI Often the last slice — depends on the API surface being landed.
Tests-only / docs-only Smallest, lands first or last depending on whether the test exercises new code.

Slices should be vertical when possible (UI + API for one feature shipped together), horizontal when necessary (the refactor IS the unit of review).

Workflow

  1. git log --reverse --format='%h %s%n%n%b%n---' base..HEAD — read every commit subject + body. Bodies often explain the why.
  2. git diff --numstat base...HEAD — see file-level churn.
  3. For each substantial file or file-group, git log --oneline --follow -- <file> to see which commits touched it.
  4. Group commits by file overlap: commits touching disjoint file sets can usually go in different slices.
  5. Order slices by dependency: refactor → schema → backend → frontend → tests/docs.
  6. Estimate LOC per slice via git diff --shortstat <prev_branch>...<this_branch> (simulated by summing numstat for commits_to_include). Cap each slice at the budget.
  7. Validate: every commit appears in exactly one slice; the union of slice file-sets covers the diff; sequential cherry-picks would not conflict (best-effort — flag any conflicts you can spot).
  8. Output the JSON plan.

Read the full file on GitHub · 126 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 · 126 lines · 92 tokens per session scan A 4cfedd8e4ffe

Subscribe to this mod's changes

orc-stack-analyzer is an agent published in the GitHub repository HigorAlves/orc (6 stars, last pushed 5d ago), licensed MIT. It adds 92 tokens to every session and 1,798 once invoked, about $0.0005 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 agents, from other repositories

session-analyzer

Extract tool usage patterns, rework indicators, and context snippets from session JSONL files.

jongwony/epistemic-protocols · 22 tokens

ba-designer

Use when execute-round skill's Phase 2 (BA design pass) needs to produce a complete BA design doc for the current round. Generates D-1..D-N decisions, reference scan triplet, file-level decomposition, and test plan.

Arch1eSUN/Arcgentic · 53 tokens

ac-claim-verifier

Phase 3.4 claim verifier. Checks the shipped code against each in-scope acceptance criterion's literal claim from the diff and the current tree, in a fresh context, and EXECUTES NOTHING (no verification command, no single-flight). For a verification-command criterion it reads the command's SOURCE and checks each…

The01Geek/prflow · 155 tokens

silent-failure-hunter

PRFlow's silent-failure reviewer, dispatched by the review engine and available directly. Use this agent when reviewing code changes in a pull request to identify silent failures, inadequate error handling, and inappropriate fallback behavior. This agent should be invoked proactively after completing a logical chunk…

The01Geek/prflow · 95 tokens

comment-analyzer

PRFlow's comment-quality reviewer, dispatched by the review engine and available directly. Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a pull request…

The01Geek/prflow · 117 tokens

challenger

Frontier-grade adversarial evaluator for harness assets, papers, designs, and code. Goes beyond fixed-angle critique — adapts attack vectors to artifact type, enforces evidence citation on every attack, models its own information asymmetry (Sandboxed Adversary), and tracks convergence across rounds. Returns structured…

chrono-meta/forge-harness · 102 tokens