architecture

Clarify generated versus user-owned directories in Forge projects.

4|1|Updated Apr 12, 2026
One-click install
npx skills add https://github.com/reliant-labs/forge --skill architecture-reliant-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: architecture
Source: https://github.com/reliant-labs/forge/tree/main/internal/templates/project/skills/forge/architecture
Command: npx skills add https://github.com/reliant-labs/forge --skill architecture-reliant-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps developers quickly understand how a Forge-based project is organized and which parts are generated versus hand-written, so teams can make safe changes without accidentally editing code that will be overwritten.

Core Features & Use Cases

  • Project structure orientation: Maps the major directories (cmd/, internal/, gen/, handlers/, frontends/, db/) to their roles in the system.
  • Generated vs hand-written clarity: Explains concrete signals (_gen naming, provenance headers, scaffold markers) that determine what Forge will regenerate.
  • Generate pipeline transparency: Documents how proto and contract changes flow through descriptor/ORM/TS generation steps.
  • Custom wiring guidance: Directs developers to use pkg/app/setup.go for wiring while keeping pkg/app/bootstrap.go untouched.
  • Workflow for drift detection: Recommends forge audit/map/generate --explain to understand what changed and why.

Quick Start

Ask: “Explain which parts of this Forge project are safe to edit and how to identify forge-generated code using the rules for _gen files and scaffold markers.”

Frequently Asked Questions about architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify generated code in a Forge project structure?

Forge project structure separates generated code from hand-written code using _gen naming, provenance headers, and scaffold markers. Directories like cmd/, internal/, gen/, handlers/, frontends/, and db/ map to specific system roles.

Which files are safe to edit in a Forge workspace?

Files with _gen naming, provenance headers, or scaffold markers are generated and unsafe to edit. Custom wiring belongs in pkg/app/setup.go, while pkg/app/bootstrap.go must remain untouched to avoid overwrites.

How does the Forge generate pipeline work for proto changes?

The Forge generate pipeline flows proto and contract changes through descriptor, ORM, and TypeScript generation steps. Use forge audit/map/generate --explain to understand what changed and why during the codegen drift detection workflow.

What is the best way to fix codegen drift in a Forge project?

Fix Forge codegen drift by running forge audit/map/generate --explain to understand what changed and why. This workflow traces how proto and contract changes propagate through the generate pipeline to regenerate affected artifacts.

Can I use Forge scaffolding for TypeScript and KCL artifacts?

Forge scaffolding supports TypeScript and KCL artifacts alongside Go and proto files. The generate pipeline processes these artifacts, but you must follow custom wiring rules to keep bootstrap and handlers/business logic safe from overwrite.