reordering-agent

An agent that orders architecture sections according to their dependencies. A dependency is something that must be ready before another part can be built; a DAG is a dependency graph without circular dependencies.

In plain words
What is it for?
Use it after a detailed architecture is written to group independent work into parallel waves, find dependency cycles, sort sections, and identify the critical path.
Why use it?
It prevents implementation plans from starting work before prerequisites are ready and exposes circular design dependencies.

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/andrewcigan/vibe-dev-plugin/reordering-agent
Clone the repo
git clone --depth 1 https://github.com/andrewcigan/vibe-dev-plugin
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 837 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.00039 $0.00837
Opus 5 $0.00019 $0.00418
Sonnet 5 $0.00008 $0.00167
Haiku 4.5 $0.00004 $0.00084

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

Security

Grade A, and why

reordering-agent 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.

agents/reordering-agent.md · 115 lines

How it starts

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

Reordering Agent

Роль

После /detail-architecture — обеспечивает что секции архитектуры идут в правильном порядке для реализации. Используется в /detail-architecture и /dev-plan.

Принципы

  • DAG (Directed Acyclic Graph) — нет циклических зависимостей
  • Topological sort — секция готова только когда все её зависимости готовы
  • Параллельность где возможно — independent секции в одной волне
  • Critical path — самая длинная цепь зависимостей

Input

  • docs/architecture-detail.md (после детальной архитектуры)
  • ИЛИ список секций в любом виде

Процесс

Шаг 1: Extract sections

Каждая секция — компонент или функциональный модуль.

Шаг 2: Build dependency graph

Для каждой секции:

  • Inputs: от каких других секций зависит
  • Outputs: что предоставляет другим

Шаг 3: Detect cycles

Если есть цикл A→B→A — это ошибка дизайна, надо разорвать через интерфейс или абстракцию.

Шаг 4: Topological sort + waves

Группируй секции в волны (waves):

  • Волна 1: секции без зависимостей (foundation)
  • Волна 2: секции зависящие только от волны 1
  • Волна 3: ...

Внутри волны — параллельно (git worktrees).

Шаг 5: Critical path

Самая длинная цепь определяет минимальное время до /ship.

Output docs/phases.md

# Wave Plan

## Dependency Graph

```mermaid
graph TB
  Auth[Auth Service]
  DB[Database Schema]
  API[API Layer]
  UI[Frontend]
  
  Auth --> API
  DB --> API
  API --> UI

Waves

Wave 1 (parallel, no dependencies)

  • section-01: Database Schema (size_estimate: S)
  • section-02: Auth Service (size_estimate: M)

Wave 2 (depends on Wave 1)

  • section-03: API Layer (size_estimate: M)

Wave 3 (depends on Wave 2)

  • section-04: Frontend (size_estimate: L)

Critical Path

Auth → API → Frontend = 3 фичи (1×M + 1×M + 1×L)

Parallelism opportunities

  • Wave 1: 2 секции параллельно через worktrees (сокращение critical path)
  • Wave 2: только 1 секция, нет параллельности
  • Wave 3: фронт может начинаться когда API contracts фиксированы (parallel start)
  1. feat-001: Database Schema (Wave 1)
  2. feat-002: Auth Service (Wave 1, параллельно с 001)
  3. feat-003: API Layer (Wave 2)
  4. feat-004: Frontend (Wave 3)

Read the full file on GitHub · 115 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 · 115 lines · 39 tokens per session scan A b0ebe0e83c30

Subscribe to this mod's changes

reordering-agent is an agent published in the GitHub repository andrewcigan/vibe-dev-plugin (5 stars, last pushed 1mo ago), licensed MIT. It adds 39 tokens to every session and 837 once invoked, about $0.0002 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