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.
ARCHITECTURE.md is Forge’s living architecture document — a machine-generated, always-current snapshot of your project’s structural state. It captures everything that matters for understanding the system: the detected technology stack, all four architectural layers, the ownership report, the full architecture graph with its 6 node types, dependency health, risk score, every active rule violation, and the latest audit score. Because it is committed to version control alongside your code, it serves as a shared contract between developers and AI agents about the current architectural state — reviewers never have to run a tool to understand what the architecture looks like right now.
Usage
What ARCHITECTURE.md Contains
inscribe generates a comprehensive document with the following sections:
Project Metadata
Auto-detected tech stack: framework (Express / Fastify / NestJS), database (MongoDB / PostgreSQL), ORM (Mongoose / Prisma / Drizzle), DI strategy (tsyringe / NestJS DI / manual), active technology profile, and architecture model name.
Platform Components
Every component detected in
src/platform/ — config, database, HTTP, server, logger, cache, security, events, scheduler, observability, and DI.Features List
All feature slices in
src/features/, each with their detected subdirectories and completeness status.Infrastructure Implementations
All adapters in
src/infra/: Prisma client, MongoDB config, Redis service, mail service, and any others detected.Ownership Report
The output of
armorer.mjs: ownership health score, count of orphans (components with no owner), duplicates (same artifact in multiple places), and misplaced components (files in the wrong layer), with relocation suggestions.Architecture Graph
The full graph with all 4 layers rendered as sections — Platform Layer, Feature Layer, Shared Layer, Infrastructure Layer, Domain Layer, and Adapter Layer. Includes total node and edge counts.
Dependency Health & Risk Score
Valid edge ratio (e.g.,
19/20), dependency health percentage, and a risk score from 0 to 100 (lower is better).Rule Violations (R1–R13)
Every active violation in a table: rule ID, source node, target node, severity, and description.
Sample Format
Auto-Update
inscribe runs automatically twice during every Forge operation — at step 7 (before the command executes) and step 9 (after the command completes) of the boot sequence. This means ARCHITECTURE.md is always current after any cast, quench, inspect, or other Forge command, with no manual intervention required.
The document is updated in-place. Forge preserves any additional sections you write manually (such as Architecture Decision Records or team notes) while regenerating only the auto-detected fields.
ARCHITECTURE.md should be committed to version control. It is not a build artifact — it is a first-class project document that serves as a contract between developers and AI agents about the current architectural state. Forge reads it at the start of every interaction to orient itself before acting.
Fields Auto-Detected
| Field | Source Script |
|---|---|
| Framework, Database, ORM, DI Strategy | context.mjs |
| Active Profile | profile.mjs |
| Platform, Features, Shared, Infra lists | context.mjs |
| Ownership health, orphans, duplicates, misplaced | armorer.mjs |
| Architecture graph (nodes, edges, layers) | graph.mjs |
| Risk Score, Dependency Health | graph.mjs → stats |
| Rule violations (R1–R13) | graph.mjs → violations |
| Last Audit score and grade | inspect.mjs |
Staleness Detection
IfARCHITECTURE.md was last updated more than 7 days ago, Forge detects it as stale and suggests running inscribe to refresh it. This check happens automatically during the boot sequence so you are always notified before the stale data influences a decision.