Grok-map
v0.7.3Shows coding agents which AI-written code nobody on the team understands, and quizzes you on it.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
comprehension_risk
Rate how risky it is to change specific files or folders, based on how much of their AI-written code anyone on the team has shown they understand. When to use: before editing existing code in a non-trivial way. Follow the returned advice: at high or very high, keep the diff small, explain the change, and offer a quiz afterwards. For the whole repository use repo_status; to find a reviewer use who_understands. Returns {"repo", "results": [...]}, one entry per path with: risk (none, low, medium, high, very high), lines, ai, understood, skimmed, fading, unread, debt_pct,…
| Parameter | Type | Description |
|---|---|---|
paths * | array | Files or folders you are about to change, relative to the repo root. '.' means the whole repo. |
repo | Path inside the git repository. Defaults to the server's working directory. |
repo_status
Summarize comprehension debt for the whole repository: how much code is AI-written, how much of that anyone understands, and which files are riskiest. When to use: the user asks how much of the code is AI-written, where the risk is, or for an overview. For specific files you are about to change, use comprehension_risk instead; for change over time, use ai_trend. Returns {"repo", "head", "risk", "total", "critical_paths", "riskiest_files"}. total and critical_paths hold lines, human, ai, understood, skimmed, fading, unread, debt_pct, ai_pct, agents and understood_by. r…
| Parameter | Type | Description |
|---|---|---|
repo | Path inside the git repository. Defaults to the server's working directory. | |
top | integer | How many of the riskiest files to list. |
who_understands
List the people who have shown they understand the AI-written code at a path, and who committed to it lately. When to use: the user asks who knows this code, who should review a change, or whom to ask. For a risk rating use comprehension_risk. Returns {"path", "understood_by" (person -> lines they passed a quiz, explanation or review on), "ai_lines", "unread" (AI-written lines nobody has checked), "recent_committers": [{"name", "commits"}], "note"}. Committing code is not counted as understanding it: only recorded quizzes, explanations and reviews are.
| Parameter | Type | Description |
|---|---|---|
path * | string | File or folder, relative to the repo root. |
repo | Path inside the git repository. Defaults to the server's working directory. |
quiz_brief
Build a quiz brief: the exact AI-written lines a person has not yet shown they understand, with rules for quizzing them. When to use: the user asks to be quizzed, or agrees to a quiz after you finished a change (uncommitted=true for that change, diff_base='main' for a whole branch, paths for specific code). Ask 2 to 6 questions one at a time, grade each 0, 0.5 or 1, then call record_understanding with record_with.paths and the mean grade. Returns {"who", "nothing_to_quiz", "line_count", "truncated", "brief_markdown" (the code and quiz rules), "record_with": {"tool", "…
| Parameter | Type | Description |
|---|---|---|
diff_base | Quiz on everything changed since this git ref, e.g. 'main' for a branch. | |
max_lines | integer | Cap on lines in the brief, to keep the quiz short. |
paths | Files or folders to quiz on. Leave empty with uncommitted=true for the change just made. | |
repo | Path inside the git repository. Defaults to the server's working directory. | |
uncommitted | boolean | Quiz on uncommitted changes and new files (what you just wrote). |
who | Person being quizzed. Defaults to git user.email. |
record_understanding
Record in the shared ledger (.grokmap/ledger.jsonl) that a person showed they understand these lines. When to use: only after the person actually answered a quiz from quiz_brief, explained the change back to you, reviewed it, or paired on it, with the score they earned. Never record understanding because you or they wrote the code, and never round scores up. This is the only tool that writes: it appends to the ledger and changes nothing else. Lines edited later count as not understood again. Returns {"recorded", "who", "score", "counts_as" (understood, or skimmed for low…
| Parameter | Type | Description |
|---|---|---|
paths * | array | Paths exactly as quiz_brief returned them, e.g. 'src/a.py:10-40,55-60'. |
score * | number | Mean of the grades, 0 to 1. |
method | string | quiz: answered questions. explain: explained the change back. review: only skimmed (counts as half). |
note | string | Optional short note stored with the record. |
repo | Path inside the git repository. Defaults to the server's working directory. | |
who | Person who answered. Defaults to git user.email. Only set it when the user says who is answering. |
pr_comprehension
Summarize a branch or pull request: the AI-written lines it adds compared with base and how many of them anyone understands. When to use: before opening or merging a pull request, or when asked how much of a branch is AI-written. For the whole repository use repo_status. The base ref must exist locally (run git fetch if it is missing). Returns {"base", "merge_base", "commits", "ai", "human", "understood", "unread", "tools" (AI lines per agent), "files": [{"path", "ai", "human", "understood", "unread", "partial"}], "markdown" (a ready-to-post PR comment)}.
| Parameter | Type | Description |
|---|---|---|
base | string | Branch to compare with, e.g. 'origin/main' or 'main'. |
repo | Path inside the git repository. Defaults to the server's working directory. |
ai_trend
Show how much of the code added over time was written by each AI agent versus people, per week or month. When to use: the user asks how AI use has changed, which agents write the most code, or since when. For today's totals use repo_status. Counts lines added in commits (from git log), attributed to an AI agent when the commit carries its marker, e.g. a Co-Authored-By: Claude trailer or a Copilot bot author. Returns {"by", "summary": {"human", "ai", "ai_pct", "tools" (lines per agent)}, "periods": [{"start", "human", "tools"}]}, oldest period first.
| Parameter | Type | Description |
|---|---|---|
by | string | Bucket size. |
repo | Path inside the git repository. Defaults to the server's working directory. | |
since | Only commits after this date, e.g. '2026-01-01' or '6 months ago'. |