grokmap 0.3.0__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {grokmap-0.3.0 → grokmap-0.3.1}/PKG-INFO +5 -1
- {grokmap-0.3.0 → grokmap-0.3.1}/README.md +4 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/pyproject.toml +1 -1
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/__init__.py +1 -1
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/mcp_server.py +65 -13
- {grokmap-0.3.0 → grokmap-0.3.1}/.gitignore +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/LICENSE +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/action.yml +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/packages/grokmap-mcp/README.md +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/skills/grokmap/SKILL.md +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/__main__.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/agent_tools.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/badge.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/cli.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/config.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/detect.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/gitutil.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/ledger.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/prdiff.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/quiz.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/report.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/report_template.html +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/scan.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/score.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/src/grokmap/trend.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/conftest.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/test_agent_tools.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/test_cli.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/test_detect_config.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/test_scan_score.py +0 -0
- {grokmap-0.3.0 → grokmap-0.3.1}/tests/test_trend_diff.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: grokmap
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Measure comprehension debt: the AI-written code in your repo that nobody understands.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Aadithya-kl/grokmap
|
|
6
6
|
Project-URL: Issues, https://github.com/Aadithya-kl/grokmap/issues
|
|
@@ -33,6 +33,8 @@ Description-Content-Type: text/markdown
|
|
|
33
33
|
[](https://github.com/Aadithya-kl/grokmap/actions/workflows/ci.yml)
|
|
34
34
|
[](https://pypi.org/project/grokmap/)
|
|
35
35
|
[](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.Aadithya-kl/grokmap)
|
|
36
|
+
[](https://glama.ai/mcp/servers/Aadithya-kl/grokmap)
|
|
37
|
+
[](https://scorecard.dev/viewer/?uri=github.com/Aadithya-kl/grokmap)
|
|
36
38
|

|
|
37
39
|

|
|
38
40
|

|
|
@@ -172,6 +174,8 @@ Prefer Docker? `docker build -t grokmap-mcp .` in this repo, then use `docker ru
|
|
|
172
174
|
| `pr_comprehension` | The AI-written lines a branch adds and how many are understood. |
|
|
173
175
|
| `ai_trend` | How much of the code added each week or month each agent wrote. |
|
|
174
176
|
|
|
177
|
+
[](https://glama.ai/mcp/servers/Aadithya-kl/grokmap)
|
|
178
|
+
|
|
175
179
|
Plus a `quiz_me` prompt. Everything runs locally on your git history: no network calls, no API keys. It's listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.Aadithya-kl/grokmap) as `io.github.Aadithya-kl/grokmap`.
|
|
176
180
|
|
|
177
181
|
## Quick start
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
[](https://github.com/Aadithya-kl/grokmap/actions/workflows/ci.yml)
|
|
8
8
|
[](https://pypi.org/project/grokmap/)
|
|
9
9
|
[](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.Aadithya-kl/grokmap)
|
|
10
|
+
[](https://glama.ai/mcp/servers/Aadithya-kl/grokmap)
|
|
11
|
+
[](https://scorecard.dev/viewer/?uri=github.com/Aadithya-kl/grokmap)
|
|
10
12
|

|
|
11
13
|

|
|
12
14
|

|
|
@@ -146,6 +148,8 @@ Prefer Docker? `docker build -t grokmap-mcp .` in this repo, then use `docker ru
|
|
|
146
148
|
| `pr_comprehension` | The AI-written lines a branch adds and how many are understood. |
|
|
147
149
|
| `ai_trend` | How much of the code added each week or month each agent wrote. |
|
|
148
150
|
|
|
151
|
+
[](https://glama.ai/mcp/servers/Aadithya-kl/grokmap)
|
|
152
|
+
|
|
149
153
|
Plus a `quiz_me` prompt. Everything runs locally on your git history: no network calls, no API keys. It's listed in the [official MCP Registry](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.Aadithya-kl/grokmap) as `io.github.Aadithya-kl/grokmap`.
|
|
150
154
|
|
|
151
155
|
## Quick start
|
|
@@ -72,8 +72,18 @@ def comprehension_risk(
|
|
|
72
72
|
],
|
|
73
73
|
repo: RepoArg = None,
|
|
74
74
|
) -> dict:
|
|
75
|
-
"""
|
|
76
|
-
|
|
75
|
+
"""Rate how risky it is to change specific files or folders, based on how much of their AI-written code anyone
|
|
76
|
+
on the team has shown they understand.
|
|
77
|
+
|
|
78
|
+
When to use: before editing existing code in a non-trivial way. Follow the returned advice: at high or very high,
|
|
79
|
+
keep the diff small, explain the change, and offer a quiz afterwards. For the whole repository use repo_status;
|
|
80
|
+
to find a reviewer use who_understands.
|
|
81
|
+
|
|
82
|
+
Returns {"repo", "results": [...]}, one entry per path with: risk (none, low, medium, high, very high),
|
|
83
|
+
lines, ai, understood, skimmed, fading, unread, debt_pct, ai_pct, agents (lines per AI agent), understood_by
|
|
84
|
+
(person -> lines), critical_path, advice, and most_unread_files. A path that does not exist has found=false.
|
|
85
|
+
Lines count as AI-written when the commit that last changed them carries an AI agent's marker
|
|
86
|
+
(e.g. a Co-Authored-By: Claude trailer)."""
|
|
77
87
|
return agent_tools.comprehension_risk(paths, repo)
|
|
78
88
|
|
|
79
89
|
|
|
@@ -83,8 +93,16 @@ def repo_status(
|
|
|
83
93
|
top: Annotated[int, Field(description="How many of the riskiest files to list.", ge=1, le=50)] = 10,
|
|
84
94
|
repo: RepoArg = None,
|
|
85
95
|
) -> dict:
|
|
86
|
-
"""
|
|
87
|
-
and
|
|
96
|
+
"""Summarize comprehension debt for the whole repository: how much code is AI-written, how much of that anyone
|
|
97
|
+
understands, and which files are riskiest.
|
|
98
|
+
|
|
99
|
+
When to use: the user asks how much of the code is AI-written, where the risk is, or for an overview. For
|
|
100
|
+
specific files you are about to change, use comprehension_risk instead; for change over time, use ai_trend.
|
|
101
|
+
|
|
102
|
+
Returns {"repo", "head", "risk", "total", "critical_paths", "riskiest_files"}. total and critical_paths hold
|
|
103
|
+
lines, human, ai, understood, skimmed, fading, unread, debt_pct, ai_pct, agents and understood_by.
|
|
104
|
+
riskiest_files lists up to `top` files with lines, ai_lines, unread, debt_pct and critical. Debt counts unread
|
|
105
|
+
AI-written lines in full and skimmed or fading ones (understood over 180 days ago) as half."""
|
|
88
106
|
return agent_tools.repo_status(repo, top)
|
|
89
107
|
|
|
90
108
|
|
|
@@ -94,8 +112,14 @@ def who_understands(
|
|
|
94
112
|
path: Annotated[str, Field(description="File or folder, relative to the repo root.")],
|
|
95
113
|
repo: RepoArg = None,
|
|
96
114
|
) -> dict:
|
|
97
|
-
"""
|
|
98
|
-
|
|
115
|
+
"""List the people who have shown they understand the AI-written code at a path, and who committed to it lately.
|
|
116
|
+
|
|
117
|
+
When to use: the user asks who knows this code, who should review a change, or whom to ask. For a risk rating
|
|
118
|
+
use comprehension_risk.
|
|
119
|
+
|
|
120
|
+
Returns {"path", "understood_by" (person -> lines they passed a quiz, explanation or review on), "ai_lines",
|
|
121
|
+
"unread" (AI-written lines nobody has checked), "recent_committers": [{"name", "commits"}], "note"}.
|
|
122
|
+
Committing code is not counted as understanding it: only recorded quizzes, explanations and reviews are."""
|
|
99
123
|
return agent_tools.who_understands(path, repo)
|
|
100
124
|
|
|
101
125
|
|
|
@@ -114,8 +138,16 @@ def quiz_brief(
|
|
|
114
138
|
max_lines: Annotated[int, Field(description="Cap on lines in the brief, to keep the quiz short.", ge=20, le=1000)] = 200,
|
|
115
139
|
repo: RepoArg = None,
|
|
116
140
|
) -> dict:
|
|
117
|
-
"""
|
|
118
|
-
|
|
141
|
+
"""Build a quiz brief: the exact AI-written lines a person has not yet shown they understand, with rules for
|
|
142
|
+
quizzing them.
|
|
143
|
+
|
|
144
|
+
When to use: the user asks to be quizzed, or agrees to a quiz after you finished a change (uncommitted=true for
|
|
145
|
+
that change, diff_base='main' for a whole branch, paths for specific code). Ask 2 to 6 questions one at a time,
|
|
146
|
+
grade each 0, 0.5 or 1, then call record_understanding with record_with.paths and the mean grade.
|
|
147
|
+
|
|
148
|
+
Returns {"who", "nothing_to_quiz", "line_count", "truncated", "brief_markdown" (the code and quiz rules),
|
|
149
|
+
"record_with": {"tool", "paths", "method", "score"}}. If nothing_to_quiz is true, tell the person there is
|
|
150
|
+
nothing new for them to check. Read-only: nothing is recorded until you call record_understanding."""
|
|
119
151
|
return agent_tools.quiz_brief(paths, uncommitted, diff_base, who, max_lines, repo)
|
|
120
152
|
|
|
121
153
|
|
|
@@ -135,8 +167,15 @@ def record_understanding(
|
|
|
135
167
|
note: Annotated[str, Field(description="Optional short note stored with the record.")] = "",
|
|
136
168
|
repo: RepoArg = None,
|
|
137
169
|
) -> dict:
|
|
138
|
-
"""Record that a person showed they understand these lines.
|
|
139
|
-
|
|
170
|
+
"""Record in the shared ledger (.grokmap/ledger.jsonl) that a person showed they understand these lines.
|
|
171
|
+
|
|
172
|
+
When to use: only after the person actually answered a quiz from quiz_brief, explained the change back to you,
|
|
173
|
+
reviewed it, or paired on it, with the score they earned. Never record understanding because you or they wrote
|
|
174
|
+
the code, and never round scores up. This is the only tool that writes: it appends to the ledger and changes
|
|
175
|
+
nothing else. Lines edited later count as not understood again.
|
|
176
|
+
|
|
177
|
+
Returns {"recorded", "who", "score", "counts_as" (understood, or skimmed for low scores and reviews),
|
|
178
|
+
"files", "lines", "ledger" (its path), "reminder"}."""
|
|
140
179
|
return agent_tools.record_understanding(paths, score, method, who, note, repo)
|
|
141
180
|
|
|
142
181
|
|
|
@@ -146,8 +185,14 @@ def pr_comprehension(
|
|
|
146
185
|
base: Annotated[str, Field(description="Branch to compare with, e.g. 'origin/main' or 'main'.")] = "origin/main",
|
|
147
186
|
repo: RepoArg = None,
|
|
148
187
|
) -> dict:
|
|
149
|
-
"""
|
|
150
|
-
understands.
|
|
188
|
+
"""Summarize a branch or pull request: the AI-written lines it adds compared with base and how many of them
|
|
189
|
+
anyone understands.
|
|
190
|
+
|
|
191
|
+
When to use: before opening or merging a pull request, or when asked how much of a branch is AI-written. For
|
|
192
|
+
the whole repository use repo_status. The base ref must exist locally (run git fetch if it is missing).
|
|
193
|
+
|
|
194
|
+
Returns {"base", "merge_base", "commits", "ai", "human", "understood", "unread", "tools" (AI lines per agent),
|
|
195
|
+
"files": [{"path", "ai", "human", "understood", "unread", "partial"}], "markdown" (a ready-to-post PR comment)}."""
|
|
151
196
|
return agent_tools.pr_comprehension(base, repo)
|
|
152
197
|
|
|
153
198
|
|
|
@@ -158,7 +203,14 @@ def ai_trend(
|
|
|
158
203
|
since: Annotated[str | None, Field(description="Only commits after this date, e.g. '2026-01-01' or '6 months ago'.")] = None,
|
|
159
204
|
repo: RepoArg = None,
|
|
160
205
|
) -> dict:
|
|
161
|
-
"""
|
|
206
|
+
"""Show how much of the code added over time was written by each AI agent versus people, per week or month.
|
|
207
|
+
|
|
208
|
+
When to use: the user asks how AI use has changed, which agents write the most code, or since when. For
|
|
209
|
+
today's totals use repo_status. Counts lines added in commits (from git log), attributed to an AI agent when
|
|
210
|
+
the commit carries its marker, e.g. a Co-Authored-By: Claude trailer or a Copilot bot author.
|
|
211
|
+
|
|
212
|
+
Returns {"by", "summary": {"human", "ai", "ai_pct", "tools" (lines per agent)},
|
|
213
|
+
"periods": [{"start", "human", "tools"}]}, oldest period first."""
|
|
162
214
|
return agent_tools.ai_trend(by, since, repo)
|
|
163
215
|
|
|
164
216
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|