Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ronaldjdev/forge/llms.txt

Use this file to discover all available pages before exploring further.

inspect is Forge’s full architecture auditor. It evaluates the entire project against 180 points spread across 10 categories — structure, layer isolation, DI decorators, ownership, platform completeness, dependency direction, graph health, naming conventions, import rules, and custom project rules — then normalizes the result to a 0–100 score with an A–F grade. Every violation is reported with a severity level so you know exactly what to fix and in what order. Run inspect before pull requests, after major structural changes, or any time you need a definitive picture of your architecture’s health.

Usage

"inspeccionar"
"diagnóstico"
"evaluar"
Run inspect --json for machine-readable output suitable for CI pipelines, dashboards, or piping into external tools.

Scoring System

inspect evaluates 10 categories for a maximum of 180 raw points, then normalizes to a 0–100 score.
CategoryPointsWhat it Measures
Structure30Organization of platform, features, shared, and infra — every feature must have domain/, application/, and adapters/ subdirectories
Layers25Layer isolation: prohibited imports between layers, business logic in controllers, direct database access outside repositories
Decorators20Presence of @injectable() and @inject() in use cases, controllers, and repository implementations (for profiles using tsyringe)
Ownership20Orphans (components without a clear owner), duplicates (same artifact in multiple places), misplaced components (files in the wrong layer)
Platform15Technical backbone completeness — config, server, logger, database, DI, and other platform components expected by the active profile
Dependencies15Dependency direction (allowed vs. prohibited edges), cycles, and invalid graph edges
Graph20Architecture graph health: risk score, dependency health percentage, and rule violations (R1–R9)
Custom Rules5Rules defined in .forge/rules.json for project-specific architectural constraints
Naming10PascalCase artifact names, kebab-case directories, correct suffixes (.entity.ts, .uc.ts, .repository.ts, etc.)
Import Conventions20R10 (no bare specifiers), R11 (.js extension in imports), R12 (no bootstrap.di.js imports)
Total180Normalized to 0–100

Grade Scale

GradeScore RangeMeaning
A90–100Solid architecture. All principles upheld.
B80–89Minor inconsistencies. Easy to correct.
C65–79Several violations. Requires structured work.
D50–64Architecture compromised. Migration needed.
F< 50Project not yet migrated or widespread violations.

Reading the Output

inspect produces a color-coded report in the terminal (or structured JSON with --json). The output includes:

Overall Score & Grade

The normalized 0–100 score and letter grade displayed prominently at the top of the report.

Category Breakdown

Points earned vs. points available for each of the 10 categories, so you can see exactly where the project loses points.

Violations by Severity

Every violation listed with its severity (CRITICAL, ERROR, WARNING, INFO, SUGGESTION), the file and line involved, and the rule being violated.

Suggested Next Steps

Forge suggests the most impactful commands to run next based on the violation profile (e.g., quench --fix, temper, relocate).

Severity Reference

SeverityMeaningExample
CRITICALViolates a fundamental architectural principleDomain importing from adapters
ERRORViolates a layer or structure ruleController containing business logic
WARNINGInconsistency requiring attentionFeature missing a repository interface
INFOObservation about current stateIncomplete feature scaffold
SUGGESTIONRecommended improvementUse class tokens in @inject()

Custom Rules

inspect includes a Custom Rules category (5 points) that evaluates rules defined in .forge/rules.json at the project root. This lets you enforce project-specific architectural constraints beyond Forge’s built-in 13 rules — for example, naming conventions for your team’s specific domain vocabulary or additional layer restrictions.
// .forge/rules.json
{
  "rules": [
    {
      "id": "custom-1",
      "description": "Payment feature must not import from auth feature directly",
      "severity": "ERROR"
    }
  ]
}
inspect runs automatically as step 6 of Forge’s boot sequence. This means every Forge operation already has the latest inspection results available without requiring a separate invocation.

Build docs developers (and LLMs) love