# GitContext

This repository uses GitContext for AI-assisted knowledge capture.

## Proactive Context Retrieval

**At the start of any file-editing conversation**, call `get_context_for_file` with the file you are about to edit. This surfaces relevant docs and open blockers before you begin.

## Available MCP Tools

Use the `gitcontext` MCP server tools to capture and retrieve knowledge:

- `get_context_for_file` — get relevant docs and blockers for a specific file path
- `search_docs_for_context` — search docs with optional file/branch context, returns relevance reasons
- `list_doc_types` — list every doc type registered for this org (built-in **plus** any custom types). **Call this before capturing** to discover valid `type` slugs and their labels — the org may have custom types (e.g. "Release Changelog" → `release-changelog`) beyond the built-in learning/bug/convention/blocker set
- `capture_doc` — capture a doc of any org-registered type returned by `list_doc_types` (the built-in learning / bug / convention / blocker types **plus** any custom types)
- `get_git_context` — get current branch, commit, and recent changes
- `get_git_diff` — get diff between branches
- `list_open_blockers` — list currently open blockers

## When to Capture

- **Bug**: after fixing a non-obvious issue — include root cause and fix
- **Convention**: after making a design decision or establishing a code pattern
- **Learning**: after understanding something that will help future work
- **Blocker**: when hitting a blocking dependency or external issue
