hierarchy

hierarchy is a command for Claude Code from ai-sdlc-framework/ai-sdlc. It costs 50 tokens per session (881 once invoked), scanned A, original, Apache-2.0.

A command for managing a session hierarchy of planners, dispatchers, and executors. It starts, checks, connects to, and stops these running roles.

In plain words
What is it for?
Use it to start or inspect the hierarchy, view terminals, show a brief, attach to a session, or shut it down.
Why use it?
It provides one interface for coordinating several agent roles instead of managing each process separately.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the ai-sdlc plugin — 1 skill, 23 commands, 14 agents shipped together

Good fit Use it to start or inspect the hierarchy, view terminals, show a brief, attach to a session, or shut it down.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add ai-sdlc-framework/ai-sdlc
Claude Code
/plugin install ai-sdlc

Made for: Claude Code.

Or install ai-sdlc, the plugin that ships this one along with the rest of its 1 skill, 23 commands, 14 agents.

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 hierarchy

README.md
[![agentmods](https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/hierarchy/github.svg)](https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/hierarchy)
Your own site
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/hierarchy"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/hierarchy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hierarchy

Your own site · 80×15
<a href="https://agentmods.dev/commands/ai-sdlc-framework/ai-sdlc/hierarchy"><img src="https://agentmods.dev/badge/commands/ai-sdlc-framework/ai-sdlc/hierarchy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 881 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00050 $0.00881
Opus 5.5 $0.00020 $0.00352
Sonnet 5.5 $0.00010 $0.00176
Haiku 4.5 $0.00005 $0.00088

Measured today against content hash a634c8c2c659, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hierarchy 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 today.

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.

ai-sdlc-plugin/commands/hierarchy.md · 83 lines

How it starts

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

Run cli-hierarchy $ARGUMENTS (reference: docs/operations/cli-hierarchy.md) and surface its output unchanged. All logic lives in ai-sdlc-plugin/scripts/hierarchy-dispatch.mjs; this body only resolves the plugin scripts directory and forwards the arguments.

Usage

/ai-sdlc hierarchy
/ai-sdlc hierarchy status
/ai-sdlc hierarchy up --executors 1
/ai-sdlc hierarchy down
  • up, status, terminals, brief, down run as given.
  • attach <name> and up --attach cannot switch your terminal from inside Claude Code: the script prints the exact shell command to run instead.
  • clear, tick, restart, register, route-decision, check-sender, check-repo, executor-start are refused with a one-line explanation: they belong to the dispatch and executor loop bodies.
  • No arguments prints cli-hierarchy --help followed by a common-recipes block.
  • If the pipeline-cli bin cannot be found, the same install hint as /ai-sdlc doctor is printed.

VS Code terminals

up keeps .vscode/tasks.json current (unless --no-vscode-tasks), as long as the file is absent or carries the ai-sdlc.generated marker. To get one terminal per agent:

  1. /ai-sdlc hierarchy up --executors 5 (regenerates the tasks file).
  2. In VS Code run Terminal > Run Task > hierarchy: open all agents.

A hand-written tasks.json is never overwritten; merge by hand from /ai-sdlc hierarchy terminals --vscode --print.

Implementation contract

Run from the repository root:

if [ -n "${CLAUDE_PLUGIN_DIR:-}" ]; then
  PLUGIN_SCRIPTS_DIR="$CLAUDE_PLUGIN_DIR/scripts"
elif [ -n "${CLAUDE_PLUGIN_ROOT:-}" ]; then
  PLUGIN_SCRIPTS_DIR="$CLAUDE_PLUGIN_ROOT/scripts"
else
  PLUGIN_SCRIPTS_DIR="$(pwd)/ai-sdlc-plugin/scripts"
fi
cd "$(git rev-parse --show-toplevel)"
node "$PLUGIN_SCRIPTS_DIR/hierarchy-dispatch.mjs" $ARGUMENTS

Confirming down

down with no --role stops every session and returns inflight manifests to the queue. The script exits 3 and prints a notice when it is run unconfirmed. When that happens, ask the operator once whether to stop every session; only on a yes, run the same command again with --confirmed appended:

Read the full file on GitHub · 83 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. today Changed · +2 lines a634c8c2c659
  2. 5d ago Changed · +9 lines e87b07bd50c7
  3. 7d ago Changed · +11 lines bea5856dd9d8
  4. 8d ago Changed 0044950704ff
  5. 10d ago First seen · 61 lines · 50 tokens per session scan A 815c57dd285a

Subscribe to this mod's changes

hierarchy is a command published in the GitHub repository ai-sdlc-framework/ai-sdlc (415 stars, last pushed yesterday), licensed Apache-2.0. It adds 50 tokens to every session and 881 once invoked, about $0.0002 per session on Opus 5.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-10-08.