> ## Documentation Index
> Fetch the complete documentation index at: https://www.greptile.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Knowledge Base

> Greptile builds a living knowledge base of your codebase - architecture, flows, and conventions - that is used to enhance the review.

Every repository that Greptile reviews has a knowledge base - a living set of docs that explain how your codebase actually works. Your team can read and edit it, and Greptile reads it on every review to further complement its context.

## What's in a knowledge base

Each repository gets:

* **An index** - a high-level tour of the system: an architecture overview, a glossary, and a map of where the files live.
* **Per-area docs** - every significant module and end-to-end flow gets its own doc explaining what it does, how it connects to the rest of the system, where the risk areas are, and key files you should look at.
* **A reverts section** - a collection of past high-signal revert/rollback/incident PRs that are present in your repository.

## Knowledge base generation

There's no manual setup required. Greptile automatically updates the knowledge base.

<Steps>
  <Step title="First build">
    The first time, Greptile does an initial scan of your repository and documents it end to end.
  </Step>

  <Step title="Stays in sync">
    After that, as you update your codebase, Greptile looks at the changes you've made and keeps the knowledge base updated.
  </Step>
</Steps>

## Why it matters

<CardGroup cols={1}>
  <Card title="Faster onboarding" icon="book-open" horizontal>
    New engineers can read the knowledge base to understand the system quickly.
  </Card>

  <Card title="Shared understanding" icon="users" horizontal>
    One living source of how your codebase works, maintained for you.
  </Card>

  <Card title="History-aware reviews" icon="magnifying-glass" horizontal>
    Reviews that also understand the setbacks you have encountered in the past.
  </Card>
</CardGroup>
