gap-analysis

A broad project review that examines testing, documentation, security, code structure, and performance. It combines findings from several specialised checks and ranks problems by severity with suggested repair phases.

In plain words
What is it for?
Use it for a general health check, preparing a remediation plan, or finding missing tests, documentation, security issues, structural problems, and performance concerns.
Why use it?
Important weaknesses are often scattered across different parts of a project, so checking only tests or security can leave major gaps. This brings those areas into one diagnostic report.

Command

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/nxtg-ai/forge-plugin/gap-analysis
Clone the repo
git clone --depth 1 https://github.com/nxtg-ai/forge-plugin
Per session 0 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,425 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.00000 $0.01425
Opus 5 $0.00000 $0.00713
Sonnet 5 $0.00000 $0.00285
Haiku 4.5 $0.00000 $0.00143

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

Security

Grade A, and why

gap-analysis 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.

docs/commands/gap-analysis.md · 138 lines

How it starts

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

/forge:gap-analysis

Comprehensive five-dimension project analysis covering testing, documentation, security, architecture, and performance -- with severity-ranked findings and phased remediation plans.

Level L1 Vibe Coder
Category Governance
Syntax `/forge:gap-analysis [--scope testing

What It Does

/forge:gap-analysis is the deepest diagnostic command in Forge. It spawns five parallel agents (testing, docs, security, detective, performance) that simultaneously analyze your project across every quality dimension. The testing agent maps source files to test files and calculates file-level coverage. The docs agent checks for README, CHANGELOG, JSDoc on exports, and API documentation. The security agent scans for hardcoded secrets, dangerous patterns (eval, innerHTML), dependency vulnerabilities, and committed .env files. The detective agent finds large files, coupling indicators, type safety issues, and technical debt markers. The performance agent measures bundle size, dependency counts, and production console usage.

Before running local analysis, the command pulls orchestrator data if available -- governance health, drift detection against your project vision, and existing knowledge base entries. This means gap-analysis findings account for strategic alignment, not just code metrics.

The output is a severity-ranked list of gaps (CRITICAL, HIGH, MEDIUM, LOW) with estimated remediation effort in hours and a top-5 priority list. With --fix, it generates a phased remediation plan: Phase 1 for critical fixes this sprint, Phase 2 for high priority next sprint, and Phase 3 for medium priority backlog items.

Syntax & Options

/forge:gap-analysis [--scope testing|docs|security|architecture|performance] [--severity critical|high] [--fix] [--json]
Option Description
--scope <area> Limit analysis to a specific dimension: testing, docs, security, architecture, or performance
--severity <level> Filter results to show only gaps at or above the specified severity
--fix Generate a phased remediation plan with effort estimates after the analysis
--json Output all findings as a JSON object

Read the full file on GitHub · 138 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 · 138 lines · 0 tokens per session scan A bfb58617f81b

Subscribe to this mod's changes

gap-analysis is a command published in the GitHub repository nxtg-ai/forge-plugin (5 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,425 tokens. 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.