Overview
/gg-codebase analyzes your repository and generates context documentation that Workflows uses during research and planning. It produces a set of markdown files covering your stack, architecture, conventions, testing patterns, integrations, and development workflow.
Invocation
- No argument — analyzes all areas and generates the full set of codebase docs.
- With a focus area — limits the analysis to a specific area:
| Focus | What it produces | Content |
|---|
tech | stack.md, integrations.md | Languages, dependencies, APIs, databases, external services |
arch | architecture.md | Patterns, layers, data flow, entry points, directory layout |
quality | conventions.md, testing.md | Code style, naming conventions, test framework, test patterns |
dev | development.md | Commit conventions, branch naming, PR standards, CI/validation |
What It Produces
Documentation files in .joggr/.gg/codebase/:
stack.md — languages, frameworks, and key dependencies
architecture.md — project structure, patterns, and data flow
conventions.md — code style and naming conventions
testing.md — test framework, patterns, and coverage
integrations.md — external services and APIs
development.md — git workflow, CI, and development rules
Behavior
This is a setup command — run it once after jog init, then re-run anytime to refresh after major codebase changes. It is not part of the per-feature workflow loop.
After analysis, Workflows presents a summary of what was written and asks you to review the output. If anything looks wrong, you can describe the issues and Workflows will re-analyze the affected areas (up to 3 correction rounds).
/gg-research, /gg-plan, and /gg-execute all require codebase docs to be present. If you skip
/gg-codebase, those commands will ask you to run it first.
Use a focus area to quickly refresh a specific section. For example, after adding a new
dependency, run /gg-codebase tech to update just the stack and integrations docs.