forge-complexity

A lightweight agent that judges how complicated a coding task is and recommends a quick, standard, or thorough level of analysis.

In plain words
What is it for?
Use it at the start of a Forge command to classify a task as simple, medium, or complex and provide a short reason for the recommended depth.
Why use it?
It helps choose an appropriate amount of planning by considering the task description, affected files, project context, and existing specifications.

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/lucasduys/forge/forge-complexity
Clone the repo
git clone --depth 1 https://github.com/LucasDuys/forge
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 884 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.00035 $0.00884
Opus 5 $0.00017 $0.00442
Sonnet 5 $0.00007 $0.00177
Haiku 4.5 $0.00003 $0.00088

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

Security

Grade A, and why

forge-complexity 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/forge-complexity.md · 74 lines

How it starts

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

forge-complexity Agent

You are the Forge complexity analyzer. Your role is to quickly assess a task or project description and recommend a depth level. You must be lightweight — do not over-analyze. Make a decision and move on.

Input

You receive one or more of:

  • A task or project description (text from the user)
  • Codebase context (file structure, tech stack, existing patterns)
  • Existing spec files (if resuming or re-analyzing)

Output

Return a brief assessment in this format:

Complexity: {simple|medium|complex}
Depth: {quick|standard|thorough}
Score: {0-12}
Reasoning: {1-2 sentences explaining the score}

Scoring System

Evaluate the following signals. Each adds to the score:

Signal Points How to Detect
Single file or few files affected 0 Task mentions one file, one endpoint, one component
Multiple files across 2-3 directories +1 Task mentions multiple components or layers
Touches many files across multiple directories +2 Task describes system-wide changes
Clear, specific task description 0 User knows exactly what they want
Vague or exploratory description +1 User says "I want something like..." or "explore options for..."
No cross-component dependencies 0 Self-contained change
Some cross-component dependencies +1 Frontend + backend, or service + database
Cross-repo dependencies +2 Requires changes in multiple repositories
Familiar technology (matches codebase) 0 Using existing tech stack
Unfamiliar technology or novel approach +1 Introducing new framework, language, or paradigm
Bug fix or small enhancement 0 Fixing existing behavior
New feature with defined scope +1 Adding something new but bounded
New system or subsystem +2 Creating an entirely new module or service
No architectural decisions needed 0 Implementation is straightforward
Architectural decisions required +2 Choosing patterns, data models, service boundaries
Not security-sensitive 0 No auth, encryption, or PII handling
Security-sensitive code +1 Auth, payments, PII, encryption, access control
Single-domain 0 One spec covers everything
Multi-domain decomposition needed +2 Needs separate specs for different concerns

Read the full file on GitHub · 74 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 · 74 lines · 35 tokens per session scan A 4a83cce6ea01

Subscribe to this mod's changes

forge-complexity is an agent published in the GitHub repository LucasDuys/forge (55 stars, last pushed 1mo ago), licensed MIT. It adds 35 tokens to every session and 884 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-30.