New Features in git11

git11 is an AI workspace for engineering teams. It understands repositories, auto-generates documentation, answers deep code questions, and works securely across your GitHub organization.

✦ AI Documentation for any repository

✦ Ask anything about your codebase

✦ Organization & team access with permissions

✦ Secure GitHub App integration with audit logs

git11 repository intelligence dashboard

Anatomy of the Modern Production Repository

Most production code spends 90% of its lifecycle being read by machines rather than humans.

By git11 Engineering · Sat Jul 11 2026 · 6 min read

Anatomy of the Modern Production Repository

A high-scale repository is a state machine, not a document store. In modern engineering, the .git directory is the most expensive asset an organization owns. Most developers focus on the code logic, but the surrounding infrastructure determines the success of the service.

The Root Directory

The root of a production repository communicates the system's operational standards. It contains the configuration surface area required to boot a developer's environment in seconds. You should find a Makefile, a README.md that omits fluff, and strict configuration files for the runtime.

  • Makefile handles task orchestration for local development.
  • docker-compose.yml defines the external dependencies like databases and caches.
  • .editorconfig enforces whitespace and encoding rules across different IDEs.
  • CODEOWNERS assigns specific directories to engineering teams to prevent unreviewed changes.

Avoid placing business logic in the root. Every file in the root should relate to the management, building, or deployment of the project. If a new engineer cannot run make setup and start contributing within ten minutes, the repository structure is failing.

Dependency Management

Production repositories must use version pinning for every external library. We see too many teams use ranges like ^1.2.0 in their package.json or requirements.txt. This introduces non-deterministic builds and makes debugging production outages impossible.

  1. Use a lockfile like go.sum, package-lock.json, or poetry.lock to ensure byte-for-byte consistency. 2. Run a dependency proxy or a private vendor directory for critical paths.
  1. Implement automated vulnerability scanning using dependabot or any CLI-based scanner. 4. Audit licenses to ensure no GPL code enters a proprietary codebase.

Dependencies are a liability. A lean repository with 50 well-vetted libraries outperforms a bloated one with 500. Every third-party package is a potential security hole and a maintenance burden.

Continuous Integration Pipelines

The .github/workflows/ directory contains the logic that allows the team to sleep at night. A modern pipeline is divided into three distinct phases: linting, testing, and security auditing. Each phase must pass before a human even looks at the pull request.

  • Linting checks for stylistic consistency using tools like eslint or ruff.
  • Static Analysis uses staticcheck or pyright to find logic errors without execution.
  • Unit tests verify individual functions with high coverage requirements.
  • Integration tests check the connectivity between the service and its database.

Speed is the primary metric for a CI pipeline. If your tests take more than five minutes, developers will context switch. We recommend parallelizing test jobs across multiple runners to keep feedback loops tight.

Automated Scripting

Every production repository needs a scripts/ or bin/ directory. This is where you store the operational glue that does not belong in the application code. These should be idempotent scripts written in Bash or Python.

  • Database migration runners that handle schema updates.
  • Seed scripts for generating anonymized production-like data.
  • Performance profiling tools for local flame graph generation.
  • Deployment helpers that wrap cloud provider CLIs.

Treat these scripts with the same rigor as production code. They require code reviews, unit tests, and documentation. If a script can delete data, it needs a dry-run mode by default.

The Source Directory

The src/ or internal/ directory is where the application lives. We prefer a domain-driven design over a technical-layer design. Avoid directories named controllers, models, and views which force developers to jump across the tree to change a single feature.

  1. Group code by business functionality, such as billing/, auth/, or search/. 2. Keep interfaces small and clearly defined.
  1. Use an internal/ directory to prevent other packages from importing private logic. 4. Documentation lives next to the code in doc.go or similar inline formats.

This structure makes the codebase navigable for AI agents and humans alike. When the folder structure mirrors the product's features, onboarding becomes intuitive. A developer should know exactly where to look when a specific feature breaks.

Observability and Instrumentation

Code that runs in production but cannot be observed is a black box. A well-structured repo includes a standard way to handle logging, tracing, and metrics. We implement this through a shared internal library or a pkg/observability directory.

  • Structured logging using JSON format for easy ingestion by aggregators.
  • Prometheus metrics for tracking request rates, errors, and durations.
  • OpenTelemetry spans for distributed tracing across microservices.
  • Sentry or Honeycomb integration for error reporting and event analysis.

Do not sprinkle logging statements randomly. Use a systematic approach where every entry point to the system logs the request ID and the outcome. This metadata allows you to correlate logs across your entire infrastructure during an incident.

Infrastructure as Code

Modern repositories often contain their own infrastructure definitions in a terraform/ or k8s/ directory. This ensures the environment evolves alongside the code. Separating the code from its infrastructure results in configuration drift.

  • Terraform files define the S3 buckets, RDS instances, and VPCs.
  • Kubernetes manifests or Helm charts describe the deployment strategy.
  • Environment variables are managed through secret managers, never hardcoded.
  • README files in these directories explain how to apply changes safely.

Infrastructure as code allows you to recreate your entire production environment from scratch if a region goes down. It also provides an audit trail for every architectural change made to the system.

Security and Secrets

Security is a fundamental part of the repository structure. We use .gitignore to prevent sensitive files from ever reaching the remote server. However, human error is inevitable, so we deploy automated safeguards.

  1. Pre-commit hooks check for API keys and passwords before a commit is created. 2. GitHub secret scanning blocks pushes containing known secret patterns.
  1. Use CODEOWNERS to restrict access to sensitive directories like security/ or infra/. 4. Rotate credentials programmatically rather than storing them in long-lived files.

Minimalism is a security feature. The less code and fewer dependencies you have, the smaller your attack surface. Remove dead code and unused files immediately.

Developer Experience

The CONTRIBUTING.md file should be a technical manual, not an ideological statement. It must list the exact versions of runtimes required, such as Node.js 20.x or Go 1.22. Include commands for running the test suite and building the production binary.

  • Provide a devcontainer.json for VS Code users to spin up a standardized environment.
  • Include a CHANGELOG.md to track user-facing changes manually or via semantic-release.
  • Use a tools.go file to track the versions of CLI tools used in the build process.
  • Standardize commit messages using conventional-commits to automate versioning.

A great repository is one that stays out of the developer's way. Automation should handle the mundane tasks, leaving the engineer to focus on the logic. Consistency across all repositories in an organization is more important than the specific choices made in any one of them.

Ask this question directly on your own repo →