BlogCase Study
Case Study4 min read· April 4, 2026

C4 Docs Baked Into Every Template

Carolina Fogliato

Published April 4, 2026

Architecture docs that live in the repo get read; docs that live in a wiki don't. Here's why C4 + invariants ship with every template.

Architecture docs that live in a wiki die in a wiki. The docs that get read are the ones in the repo — and the docs that get written are the ones the scaffold already included.

Most architecture docs are written after the fact, in a separate tool, by someone who wasn't there. They rot. C4 — Context, Container, Component, Code — works because it's structured, and it works in a repo because it lives next to the code it describes.

First Things: Docs Before Code

Begin with the end in mind: what should a new dev understand in ten minutes? The C4 model answers that — the context the system operates in, the containers it's made of, the components inside them, and the code-level invariants. If those are in the repo, onboarding is a README away.

  • Context: what the system talks to and why.
  • Container: the deployable units and their boundaries.
  • Component: the pieces inside each container.
  • Code: the invariants — the decisions that don't change.

Issue-Tree the Rot

Why do architecture docs rot? They live apart from the code, they're written once, and nobody updates them. C4 in the repo fixes all three: it's next to the code, it's structured, and the invariants section is the part that should change least.

What the Templates Ship

Every FACTA Template ships its own README, architecture docs (C4 + invariants), and skeleton. The docs aren't a phase two — they're baked in, so the agent and the human both inherit the architecture instead of guessing it.

Who It's For

This is for the small team that can't afford a dedicated architect but can't afford architectural drift either. C4 in the repo is the cheapest architectural discipline that actually survives — because it lives where the code lives.

Conclusion

Architecture docs work when they're structured, in the repo, and inherited from the scaffold. C4 + invariants baked into every template is the cheapest way to give a small team the discipline of a much larger one.

About FACTA

FACTA helps startups and growth-stage teams turn AI into production systems that keep running — not demos that impress once.

We design the architecture around the parts that actually break under real usage: tooling you own, credentials you control, failover, cost controls, observability. The boring infrastructure that keeps a system alive after launch.

Led by Matías Baglieri and Carolina Fogliato, we focus on one thing:

AI leadership that builds. Not just advises.

Copy a template and get the C4 docs with it.

See the invariants post for why the invariants section matters most.

Explore AI Automation
Book a 30-minute call →

No pitch. No pressure. Just a look at where your AI stack is fragile — and what to fix first.

Stay Updated

Get production AI insights in your inbox

Weekly insights. No spam. Unsubscribe anytime.

Your Privacy Matters

We use cookies to enhance your experience, analyze traffic, and serve targeted ads.

By clicking "Accept All", you consent to all cookies. Cookie Policy