changemap 1.0.0__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.
Files changed (63) hide show
  1. changemap-1.0.0/.gitignore +11 -0
  2. changemap-1.0.0/CHANGELOG.md +73 -0
  3. changemap-1.0.0/LICENSE +202 -0
  4. changemap-1.0.0/PKG-INFO +347 -0
  5. changemap-1.0.0/README.md +302 -0
  6. changemap-1.0.0/pyproject.toml +109 -0
  7. changemap-1.0.0/src/changemap/__init__.py +3 -0
  8. changemap-1.0.0/src/changemap/__main__.py +7 -0
  9. changemap-1.0.0/src/changemap/cache.py +308 -0
  10. changemap-1.0.0/src/changemap/cli.py +306 -0
  11. changemap-1.0.0/src/changemap/delta.py +454 -0
  12. changemap-1.0.0/src/changemap/doctor.py +131 -0
  13. changemap-1.0.0/src/changemap/errors.py +5 -0
  14. changemap-1.0.0/src/changemap/feedback.py +71 -0
  15. changemap-1.0.0/src/changemap/flows.py +368 -0
  16. changemap-1.0.0/src/changemap/git.py +223 -0
  17. changemap-1.0.0/src/changemap/naming.py +72 -0
  18. changemap-1.0.0/src/changemap/others.py +119 -0
  19. changemap-1.0.0/src/changemap/outline.py +301 -0
  20. changemap-1.0.0/src/changemap/page.html +6530 -0
  21. changemap-1.0.0/src/changemap/page.py +43 -0
  22. changemap-1.0.0/src/changemap/parallel.py +249 -0
  23. changemap-1.0.0/src/changemap/pipeline.py +111 -0
  24. changemap-1.0.0/src/changemap/plan.py +334 -0
  25. changemap-1.0.0/src/changemap/py.typed +0 -0
  26. changemap-1.0.0/src/changemap/reader.py +753 -0
  27. changemap-1.0.0/src/changemap/readers/__init__.py +139 -0
  28. changemap-1.0.0/src/changemap/readers/_skip.py +50 -0
  29. changemap-1.0.0/src/changemap/readers/_treesitter.py +171 -0
  30. changemap-1.0.0/src/changemap/readers/base.py +170 -0
  31. changemap-1.0.0/src/changemap/readers/cpp.py +932 -0
  32. changemap-1.0.0/src/changemap/readers/html.py +333 -0
  33. changemap-1.0.0/src/changemap/readers/java.py +737 -0
  34. changemap-1.0.0/src/changemap/readers/python.py +894 -0
  35. changemap-1.0.0/src/changemap/readers/rust.py +1224 -0
  36. changemap-1.0.0/src/changemap/readers/typescript.py +1313 -0
  37. changemap-1.0.0/src/changemap/remote.py +767 -0
  38. changemap-1.0.0/src/changemap/scope.py +137 -0
  39. changemap-1.0.0/src/changemap/snapshot.py +251 -0
  40. changemap-1.0.0/src/changemap/watch.py +469 -0
  41. changemap-1.0.0/tests/conftest.py +106 -0
  42. changemap-1.0.0/tests/fixtures/plan-data.json +1 -0
  43. changemap-1.0.0/tests/readers/__init__.py +0 -0
  44. changemap-1.0.0/tests/readers/test_cpp.py +387 -0
  45. changemap-1.0.0/tests/readers/test_html.py +130 -0
  46. changemap-1.0.0/tests/readers/test_java.py +310 -0
  47. changemap-1.0.0/tests/readers/test_python.py +127 -0
  48. changemap-1.0.0/tests/readers/test_rust.py +312 -0
  49. changemap-1.0.0/tests/readers/test_typescript.py +385 -0
  50. changemap-1.0.0/tests/test_built.py +207 -0
  51. changemap-1.0.0/tests/test_cache.py +115 -0
  52. changemap-1.0.0/tests/test_cli.py +204 -0
  53. changemap-1.0.0/tests/test_compare.py +340 -0
  54. changemap-1.0.0/tests/test_example.py +40 -0
  55. changemap-1.0.0/tests/test_flows.py +221 -0
  56. changemap-1.0.0/tests/test_languages.py +148 -0
  57. changemap-1.0.0/tests/test_linker.py +372 -0
  58. changemap-1.0.0/tests/test_other.py +82 -0
  59. changemap-1.0.0/tests/test_plan.py +194 -0
  60. changemap-1.0.0/tests/test_remote.py +510 -0
  61. changemap-1.0.0/tests/test_scale.py +233 -0
  62. changemap-1.0.0/tests/test_tools.py +151 -0
  63. changemap-1.0.0/tests/test_watch.py +299 -0
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.pyc
3
+ node_modules/
4
+ dist/
5
+ .venv/
6
+ changemap.html
7
+ .mypy_cache/
8
+ .ruff_cache/
9
+ .pytest_cache/
10
+ *.egg-info/
11
+ build/
@@ -0,0 +1,73 @@
1
+ # Changelog
2
+
3
+ All notable changes are listed here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project follows
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [1.0.0]
8
+
9
+ First release.
10
+
11
+ ### Added
12
+
13
+ - `install.sh`: one-line install for macOS and Linux (uses uv or pipx, installs uv if neither is there).
14
+ - Reading aids: the calls a function makes next, in order, full names, calls in code as links, the flow
15
+ marked in the code, and "Read this part top to bottom".
16
+ - Flows for changes with no entry point: changed functions that no route, job or `main` reaches
17
+ become parts, group flows: a starting function and the changed code below it, with shared code as parts of its own. Every flow now carries `changed`,
18
+ `lines` and `spans`; the data lists `loose` (changed functions on no flow). Steps carry `id`,
19
+ functions carry `lines`, modules carry `module`.
20
+ - Data: `commits` (the author's own subjects, oldest first), `about` (a pull request description when it is known
21
+ without extra requests), and `other` (changed files the map does not draw, by kind, with line counts and, for
22
+ tests, the changed functions they name). A range of more than one commit is titled "N commits".
23
+ - An entry flow keeps the steps that run changed code when it is longer than sixteen steps.
24
+ - `--outline FILE` (`-` for standard output): a short plain-text outline of the flows and changed
25
+ functions, at most about 60 KB, for an agent to read in place of the data file.
26
+ - `--flows FILE`: flows an agent wrote, checked against the map (unknown steps dropped, hops with
27
+ no call marked as claimed) and drawn before the computed ones. Works with `--watch` (read again
28
+ on every rebuild) and `--plan FILE BASE HEAD`.
29
+ - The page draws the parts ("By part" or "By folder"), the flows an agent wrote (marked as
30
+ written by the agent and not checked), the changed functions on no flow, the commits, the
31
+ description, the files it does not draw, and why each skipped file was skipped.
32
+ - The `changemap` command: one offline HTML page from the current branch, two commits
33
+ (`changemap BASE HEAD`), a GitHub pull request (`changemap pr NUMBER`), a plan file
34
+ (`--plan`), or the working tree (`--watch`). Options: `--out`, `--open`, `--json`, `--outline`, `--flows`, `--repo`,
35
+ `--remote`, `--port`, `--no-cache`, `--version`. Commands: `doctor` and `feedback`.
36
+ - Pull requests by web address, with no clone: `changemap URL` for a pull request or compare
37
+ link on GitHub, or a merge or pull request on GitLab, Gitea, Forgejo, Codeberg, Azure DevOps
38
+ or Bitbucket Cloud, and `changemap --remote URL BASE HEAD` for two commits on any git
39
+ server. `changemap pr NUMBER` uses `gh` if it is installed and otherwise reads `origin`.
40
+ `--plan FILE URL` judges a plan against a pull request on a server. `changemap doctor` also
41
+ checks the language packages and the cache folder.
42
+ - Six language readers: Python (standard library `ast`), TypeScript and JavaScript, Java, Rust,
43
+ C and C++, and HTML templates (tree-sitter). Entry points found: routes, background tasks,
44
+ event listeners, commands (also argparse sub-commands and `[project.scripts]`) and `main`.
45
+ - The page: a map that opens in place from packages to modules to functions; Before, Now and
46
+ What changed on one layout; per-function diffs with line numbers and a whole-file tab; ordered
47
+ "how it runs" flows, before and now; flags with Markdown export; search, keys, Back and
48
+ Forward, light and dark theme; the totals of calls followed, matched by name and not followed (counted over the functions the map
49
+ draws, and the data says so in `reader.scope`).
50
+ - Plan view: draw a plan on today's code; accept, reject or ask on each item; edit the plan;
51
+ copy the answers back to the AI; and `--plan FILE BASE HEAD` to compare the plan with what
52
+ was built (built, not found in the code, built but not planned).
53
+ - `--watch`: serve the working tree on `127.0.0.1`; the open page redraws as files change and
54
+ marks what just changed.
55
+ - Side-by-side diffs, code that moved inside a function tagged as moved, a list of keys (`?`),
56
+ and a page that stays usable on very large maps.
57
+ - A parse cache keyed by git blob id, so a second run re-reads only what changed. Above 15,000
58
+ source files only the files the change can reach are read, and the page says so.
59
+ - One call-following step for all six languages: a call is followed when it is certain, matched
60
+ by name when only the name agrees, and counted as not followed otherwise. Places that only
61
+ refer to a function (a table, a callback) are counted apart from calls.
62
+ - The agent skill `skills/changemap/` (Agent Skills format) and the Claude Code plugin in
63
+ `.claude-plugin/`.
64
+ - Documentation, issue forms and a security policy.
65
+
66
+ ### Known limits
67
+
68
+ - Step order in a flow follows the order calls are written, not branches or loops.
69
+ - Calls through values the code does not type, function pointers and reflection are not
70
+ followed. The page counts them.
71
+ - The lines added or removed in a call are not shown on its arrow; the arrow's panel lists the
72
+ caller and callee pairs.
73
+ - Moved code is found only when a deleted and a new module in one package share function names.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 The changemap authors
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,347 @@
1
+ Metadata-Version: 2.5
2
+ Name: changemap
3
+ Version: 1.0.0
4
+ Summary: A clickable map of what a pull request changed: one offline HTML page, made by a script, no model.
5
+ Project-URL: Homepage, https://github.com/ankitkpandey1/changemap
6
+ Project-URL: Repository, https://github.com/ankitkpandey1/changemap
7
+ Project-URL: Issues, https://github.com/ankitkpandey1/changemap/issues
8
+ Project-URL: Changelog, https://github.com/ankitkpandey1/changemap/blob/main/CHANGELOG.md
9
+ Author: ankitkpandey1
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: agent skill,ai code review,ai generated code,architecture map,call graph,call graph diff,claude code,code review,code visualization,codex,cursor,diff,github copilot,offline,pr visualization,pull request,pull request review,static analysis,tree-sitter
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: Implementation :: CPython
26
+ Classifier: Topic :: Software Development :: Quality Assurance
27
+ Classifier: Topic :: Software Development :: Version Control :: Git
28
+ Classifier: Topic :: Utilities
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: tree-sitter-c>=0.24
32
+ Requires-Dist: tree-sitter-cpp>=0.23.4
33
+ Requires-Dist: tree-sitter-html>=0.23.2
34
+ Requires-Dist: tree-sitter-java>=0.23.5
35
+ Requires-Dist: tree-sitter-javascript>=0.25
36
+ Requires-Dist: tree-sitter-rust>=0.24.2
37
+ Requires-Dist: tree-sitter-typescript>=0.23.2
38
+ Requires-Dist: tree-sitter>=0.25
39
+ Provides-Extra: dev
40
+ Requires-Dist: mypy>=1.13; extra == 'dev'
41
+ Requires-Dist: pytest-xdist>=3; extra == 'dev'
42
+ Requires-Dist: pytest>=8; extra == 'dev'
43
+ Requires-Dist: ruff>=0.8; extra == 'dev'
44
+ Description-Content-Type: text/markdown
45
+
46
+ # changemap: review large AI-generated pull requests as one clickable map
47
+
48
+ [![CI](https://github.com/ankitkpandey1/changemap/actions/workflows/ci.yml/badge.svg)](https://github.com/ankitkpandey1/changemap/actions/workflows/ci.yml)
49
+ [![PyPI](https://img.shields.io/pypi/v/changemap)](https://pypi.org/project/changemap/)
50
+ [![Python](https://img.shields.io/pypi/pyversions/changemap)](https://pypi.org/project/changemap/)
51
+ [![Licence](https://img.shields.io/pypi/l/changemap)](https://github.com/ankitkpandey1/changemap/blob/main/LICENSE)
52
+
53
+ **Code review for AI-written code.** `changemap` turns a pull request of 1,000 to 15,000
54
+ lines into one offline HTML page. It opens on the parts of the change (when it has them), each a group of changed
55
+ functions that belong together, and on the flows: the order things run in, before and now. Click
56
+ down from a part to its modules, functions and per-function diffs, with Before, Now and What
57
+ changed. For agents, `--outline` prints the change as flows in plain text and `--flows` draws the
58
+ flows an agent wrote. It is a call-graph diff and PR visualisation made by a script. Your code is sent nowhere, no
59
+ model is used, no tokens are spent, and it gives no verdict. It works on a repository you have
60
+ not cloned: give it a pull request address. It also ships as an agent skill for Claude Code,
61
+ Cursor, GitHub Copilot, Codex and any agent that reads [Agent Skills](https://agentskills.io).
62
+
63
+ ![Opening a package, a module and a function diff, switching to side by side, following a flow and flagging it in changemap](https://raw.githubusercontent.com/ankitkpandey1/changemap/main/docs/demo.gif)
64
+
65
+ ## Install
66
+
67
+ macOS and Linux:
68
+
69
+ curl -LsSf https://raw.githubusercontent.com/ankitkpandey1/changemap/main/install.sh | sh
70
+
71
+ Any system, including Windows: `uv tool install changemap`, `pipx install changemap` or
72
+ `pip install changemap`. To run it without installing: `uvx changemap`.
73
+
74
+ Needs Python 3.10 or newer and `git`. The GitHub command-line tool `gh` is optional: it is used
75
+ for `changemap pr NUMBER` when present (without it changemap reads the pull request from
76
+ `origin`), for filing feedback, and it makes the web-address mode a little more reliable. No
77
+ Node, Java, compiler or Graphviz needed. `changemap doctor` checks git, Python, the language
78
+ packages, `gh` and the cache folder.
79
+
80
+ ## Quick start
81
+
82
+ **Works on a repository you have not cloned.** Give it the address of a pull request:
83
+
84
+ changemap https://github.com/OWNER/REPO/pull/123 --open
85
+
86
+ It fetches only the two commits and the source files it reads, from the git server, into a
87
+ small throwaway folder in your cache (deleted after 30 days unused). It works with a pull
88
+ request or compare link on GitHub, a merge request on GitLab, and pull requests on Gitea,
89
+ Forgejo, Codeberg, Azure DevOps and Bitbucket Cloud. As `changemap --remote URL BASE HEAD` it
90
+ reads two commits on any git server. Private repositories work through your own git login.
91
+
92
+ Or, in a git repository, on the branch you want to understand:
93
+
94
+ changemap --open
95
+
96
+ That compares your branch with where it left the default branch, writes `changemap.html`,
97
+ prints the path and opens it. Other ways in:
98
+
99
+ changemap BASE HEAD # two commits or refs
100
+ changemap pr 123 # a pull request, from inside a clone (uses gh; without it, reads origin)
101
+ changemap --remote URL BASE HEAD # two commits on any git server, no clone
102
+ changemap --watch --open # the working tree, redrawn as files change
103
+
104
+ Want to see a page before you install anything? Download
105
+ [`examples/litestar-fullstack-react.html`](https://github.com/ankitkpandey1/changemap/blob/main/examples/litestar-fullstack-react.html)
106
+ and open it. It was made from a public pull request,
107
+ [litestar-fullstack #237](https://github.com/litestar-org/litestar-fullstack/pull/237)
108
+ (MIT licence). It needs no server.
109
+
110
+ ## Why
111
+
112
+ An AI agent can write a 10,000-line pull request in an afternoon. Nobody reads it line by line,
113
+ and a flat diff sorted by file name does not tell you what the change did to the system.
114
+
115
+ You want to know four things. What is the approach? What does it touch? How does a route or job
116
+ run now, compared with before? Where could it break? `changemap` answers them from the code of
117
+ the two commits, so you decide how deep to go: the picture in two minutes, more in ten, the
118
+ exact lines only where you choose.
119
+
120
+ ## What you see
121
+
122
+ <picture>
123
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/ankitkpandey1/changemap/main/docs/screenshot-dark.png">
124
+ <img alt="changemap on a real pull request: a package opened to a function, with its signatures and a side-by-side diff" src="https://raw.githubusercontent.com/ankitkpandey1/changemap/main/docs/screenshot.png">
125
+ </picture>
126
+
127
+ - **Parts first.** When the change has parts, the page opens on them and the flows through
128
+ them. "By folder" switches to the code's own layout.
129
+ - **Reading order.** Each function shows the calls it makes next, in the order they run, with
130
+ full names; calls in the code are links, and a flow is marked in the code it runs through.
131
+ "Read this part top to bottom" walks a part in order.
132
+ - **A map you open in place.** Boxes are packages. Click one and it opens into its modules,
133
+ a module into its functions and the calls between them. Neighbours keep their places.
134
+ - **Before, Now and What changed.** One layout for all three, so you see what appears and
135
+ what goes. New is green, deleted red, changed amber. Each colour also has its word.
136
+ - **A diff for one function.** Click a function: its lines changed, with line numbers, plus
137
+ tabs for Before, Now and the whole file. Click an arrow: the calls behind it.
138
+ - **How it runs.** Routes, background tasks, event listeners and commands are listed as ordered
139
+ steps, before and now, side by side. Choose one and its path is numbered on the map.
140
+ - **Noise folded away.** Tests are left out. Functions where only comments changed are drawn
141
+ grey and counted.
142
+ - **Flags.** Flag any box, arrow or flow and write a note. Copy the notes or download them as
143
+ Markdown to give to the author or to an AI agent. They stay in your browser.
144
+ - **Side by side.** A function's diff shows in one column or side by side. Code that moved
145
+ inside a function is tagged "moved to line N".
146
+ - **Keys.** `/` searches, `Esc` returns to the whole picture, `j` and `k` go to the next or
147
+ previous changed function, `?` lists every key. Back and Forward work. Light and dark theme.
148
+
149
+ The flags export looks like this:
150
+
151
+ # Review notes: <title>
152
+
153
+ ## 1. <what you flagged>
154
+
155
+ Where: `module · function`
156
+
157
+ Your note.
158
+
159
+ ## Plan before code
160
+
161
+ Ask your agent to plan first. `changemap --plan plan.json --open` draws the plan on today's
162
+ code before any code is written. Planned boxes are dashed, and the page says on screen that a
163
+ dashed line is a model's claim, not something computed.
164
+
165
+ ![The plan view: a plan drawn on today's code, with accept, reject and ask on each item](https://raw.githubusercontent.com/ankitkpandey1/changemap/main/docs/plan.png)
166
+
167
+ - Accept, reject or ask a question on any box, function or arrow, with a note.
168
+ - Turn on "Edit the plan" to rename, add, delete or link boxes. Undo and Redo work.
169
+ - Press "Copy for the AI". The answers and your edits go back to the agent, which plans again.
170
+ - When the code exists, compare the plan with what was built:
171
+
172
+ changemap --plan plan.json BASE HEAD
173
+
174
+ Each planned item shows as built, not found in the code, and the code shows what was built
175
+ but never planned. For a pull request on a server, give its address instead of BASE HEAD.
176
+
177
+ The plan file format is in [`SPEC.md`](https://github.com/ankitkpandey1/changemap/blob/main/SPEC.md)
178
+ section 9. This repository's own plan is
179
+ [`plan/plan.json`](https://github.com/ankitkpandey1/changemap/blob/main/plan/plan.json).
180
+
181
+ ## Watch an agent work
182
+
183
+ changemap --watch --open
184
+
185
+ serves the working tree against its branch point on `127.0.0.1` and opens the page. As files
186
+ change (uncommitted and untracked files included), the page redraws itself and marks what just
187
+ changed. Pass a commit to compare against it: `changemap --watch BASE`. `--port N` picks the
188
+ port. Stop it with Ctrl-C.
189
+
190
+ ![The watch view: the page shows Live, a file just changed, and the function that changed](https://raw.githubusercontent.com/ankitkpandey1/changemap/main/docs/watch.png)
191
+
192
+ ## Languages
193
+
194
+ One map for a repository that mixes languages. Python is read with the standard library; the
195
+ others with [tree-sitter](https://tree-sitter.github.io/) grammars that install as ordinary
196
+ wheels.
197
+
198
+ | Language | Files | Reads | Entry points it finds |
199
+ |---|---|---|---|
200
+ | Python | `.py` | functions, methods, imports (star imports too), constants, types from annotations and `x = Class()` | HTTP route decorators with a path (FastAPI, Flask, Litestar style), `task` and `shared_task`, `listener("name")` event handlers, `emit` calls |
201
+ | TypeScript, JavaScript | `.ts .tsx .mts .cts .js .jsx .mjs .cjs` | functions, arrow functions, classes and constructors, React components, ES and CommonJS imports, `export *`, `this` calls | Express, Fastify, Hono and Koa style routes (handlers in other files too), NestJS decorators (routes, `@OnEvent`, `@Cron`), Next.js `app/**/route.ts` and `pages/api` files, event handlers, `cron.schedule`, `new Worker` |
202
+ | Java | `.java` | classes, interfaces, enums, records, overloads, fields, constructors, parent classes and interfaces, classes of the same package | Spring and JAX-RS routes, `@EventListener`, Kafka, Rabbit and JMS listeners, `@Scheduled`, `@Async`, `main` |
203
+ | Rust | `.rs` | functions, `impl` and trait methods, inline modules, `use` paths and glob imports, `mod x;` | `.route(...)` registrations (handler in another file too), route attributes such as `#[get("/x")]`, `#[tauri::command]`, `main` |
204
+ | C, C++ | `.c .h .cc .cpp .cxx .hpp .hh .hxx .ipp .inl` | functions, classes, constructors and destructors, headers paired with sources, `#include` | `main`, `Get`/`Post` style route registrations, callbacks given to `signal`, `atexit` and threads |
205
+ | HTML templates | `.html .htm .jinja .jinja2 .njk` | pages, `{% block %}` and macros, `<template>`, inline `<script>` functions | forms, links, `hx-*` attributes and `fetch` calls that point at a route |
206
+
207
+ Tests, generated and vendored code are left out. Details and limits for each language are in
208
+ [`docs/languages.md`](https://github.com/ankitkpandey1/changemap/blob/main/docs/languages.md).
209
+ Files in other languages are ignored.
210
+
211
+ ## How honest the map is
212
+
213
+ A tool that draws a call graph has to say what it could not see. Every call falls in one of
214
+ three groups, and the page shows all three totals:
215
+
216
+ - **Followed.** The reader traced the name to one definition.
217
+ - **Matched by name.** Only the method name matched. These arrows are drawn in a different
218
+ line style and marked.
219
+ - **Not followed.** Calls through values it cannot type, library calls that may run your code,
220
+ and the like. They are counted and, per function, listed.
221
+
222
+ On the public example above: 848 calls followed, 9 matched by name, 1 not followed. They count
223
+ the calls inside the functions the page draws; calls into libraries are not counted. The same
224
+ three numbers are in the data file (`reader`). A missing arrow is not proof that no call exists. Read
225
+ [`docs/how-it-works.md`](https://github.com/ankitkpandey1/changemap/blob/main/docs/how-it-works.md)
226
+ for how the map is computed and where it is blind.
227
+
228
+ ## Use it from an agent
229
+
230
+ Paste this into Claude Code, Cursor, Copilot, Codex or any coding agent:
231
+
232
+ > Install the `changemap` tool with `uv tool install changemap` (if `uv` is missing, use
233
+ > `pipx install changemap`). Check it with `changemap doctor`. Then install its skill: copy
234
+ > the folder `skills/changemap` from https://github.com/ankitkpandey1/changemap into your
235
+ > skills directory (in Claude Code: `/plugin marketplace add ankitkpandey1/changemap`, then
236
+ > `/plugin install changemap@changemap`). Then read the skill and use it when I ask what a
237
+ > pull request does. To remove everything later: `uv tool uninstall changemap` and delete the
238
+ > skill folder.
239
+
240
+ - **Claude Code.** `/plugin marketplace add ankitkpandey1/changemap`, then
241
+ `/plugin install changemap@changemap`. The plugin adds the skill; install the command first.
242
+ - **Any other agent that reads Agent Skills.** Copy `skills/changemap` into its skills
243
+ directory.
244
+ - **The data file.** `changemap --json data.json` writes what the page is drawn from. An agent
245
+ can answer "what changed" and "what runs now" from it without reading the diff, which saves
246
+ its tokens. The shape is in
247
+ [`skills/changemap/references/data-file.md`](https://github.com/ankitkpandey1/changemap/blob/main/skills/changemap/references/data-file.md).
248
+ - **The outline and the flows file.** `changemap --outline -` prints a short outline (at most
249
+ about 60 KB, no code) of the change as flows an agent can read. The agent can name the parts
250
+ in a flows file; `changemap --flows FILE` checks it against the code and draws it first (marked as
251
+ written by the agent). See
252
+ [`flows-file.md`](https://github.com/ankitkpandey1/changemap/blob/main/skills/changemap/references/flows-file.md).
253
+
254
+ The skill never gives a verdict. It writes a model summary only when you ask, from the data
255
+ file, and labels it as written by a model.
256
+
257
+ ## How it compares
258
+
259
+ - [CG-Diff](https://arxiv.org/abs/2609.32057) (research paper, 2026): organises pull request
260
+ review around call-graph subgraphs and tests it in a web interface. changemap is a tool you
261
+ can run, with a page and flows.
262
+ - calldiff (an npm package): a call-tree diff between git refs, built on tree-sitter, with
263
+ terminal, JSON, YAML or Markdown output. It writes no page.
264
+ - [CodeBoarding](https://github.com/CodeBoarding/CodeBoarding): architecture diagrams of a
265
+ whole project, with a model naming and describing the parts. It also has a pull request
266
+ review that groups changes by component. changemap maps one change and uses no model.
267
+ - [Diffcore](https://github.com/jamesaphoenix/diff-core): groups changed files into flows,
268
+ with an optional model step, and shows them in a desktop app or editor extension. changemap
269
+ draws before and now on a call map, in one offline page.
270
+ - [Greptile](https://www.greptile.com): a model-based review service whose reviews can include
271
+ generated diagrams. It runs in the cloud or on your own servers. changemap runs on your
272
+ machine and uses no model.
273
+ - [difftastic](https://difftastic.wilfred.me.uk) and
274
+ [SemanticDiff](https://semanticdiff.com): structural diffs of code. They show lines and
275
+ syntax; changemap shows how the parts connect. Use them together.
276
+
277
+ ## FAQ
278
+
279
+ **Does my code leave my machine?** No. The command has no telemetry and sends your code
280
+ nowhere. On a local repository it makes no network request at all. It talks to the network only
281
+ when you ask: `changemap URL` and `--remote` fetch from the git server you name (and, for a
282
+ pull request link, ask that site's web API once or twice for the title and the base, through
283
+ `gh` if it is installed), `changemap pr` fetches from `origin` (through `gh` if installed), and
284
+ feedback uses `gh`. The page makes no network request. Flags live in your
285
+ browser's local storage.
286
+
287
+ **Does it use an LLM?** No. Words on the page are short sentences computed from the code. Run
288
+ twice on the same two commits with the same changemap version, it wrote the same page and the
289
+ same data file, byte for byte (checked with and without the cache).
290
+
291
+ **Will it tell me the pull request is good or safe?** No. It shows. It gives no verdict, finds
292
+ no bugs and makes no style comments. It says plainly what it could not follow.
293
+
294
+ **Does it work on a big repository?** It reads both commits straight from git objects and never
295
+ checks anything out. Every source file in the two commits is read, so the map can follow calls
296
+ into code the change did not touch. Each distinct file is parsed once and cached by its content
297
+ under your user cache folder, so a second run on nearby commits parses only what changed.
298
+ `--no-cache` turns that off. A file that cannot be read (too large, minified, generated or
299
+ broken) is skipped, counted, and the page says so.
300
+
301
+ **My language is not in the table.** Its files are ignored and the map shows the rest. A
302
+ language is one adapter file: see
303
+ [`CONTRIBUTING.md`](https://github.com/ankitkpandey1/changemap/blob/main/CONTRIBUTING.md).
304
+
305
+ **Does it change my repository?** No. It reads commits and writes one HTML file (and, if you
306
+ ask, one JSON file).
307
+
308
+ **How do I remove it?** `uv tool uninstall changemap` (or `pipx uninstall changemap`), and
309
+ delete the skill folder or run `claude plugin uninstall changemap@changemap`.
310
+
311
+ ## Options
312
+
313
+ changemap [BASE HEAD] [--out FILE] [--open] [--json FILE] [--outline FILE] [--flows FILE]
314
+ [--repo DIR] [--remote URL] [--plan FILE] [--no-cache] [--watch] [--port N] [--version]
315
+ changemap pr NUMBER # uses gh; without it, reads origin
316
+ changemap URL # a pull request or compare link, or a merge request, with no clone
317
+ changemap --remote URL BASE HEAD
318
+ changemap --plan FILE [BASE HEAD | URL]
319
+ changemap --watch [BASE]
320
+ changemap doctor # checks git, Python, the language packages, gh and the cache folder
321
+ changemap feedback # drafts an issue about changemap itself
322
+
323
+ `changemap --help` lists every option. Exit codes: 0 the page was written, 1 `doctor` found a
324
+ problem, 2 a plain error (the message says what to do) or a command typed wrong.
325
+
326
+ ## Feedback
327
+
328
+ Problems with the tool (a wrong or missing arrow, a confusing screen, a crash, an idea) go to
329
+ [GitHub issues](https://github.com/ankitkpandey1/changemap/issues/new/choose).
330
+ `changemap feedback` drafts one. An agent drafts the issue, searches for duplicates, adds
331
+ `changemap doctor` output, leaves out your code, paths, names and URLs, shows you the whole
332
+ text, and files it only after you say yes. Security problems never go in a public issue: see
333
+ [`SECURITY.md`](https://github.com/ankitkpandey1/changemap/blob/main/SECURITY.md).
334
+
335
+ ## Contributing
336
+
337
+ Read [`CONTRIBUTING.md`](https://github.com/ankitkpandey1/changemap/blob/main/CONTRIBUTING.md).
338
+ What the tool must do is in
339
+ [`REQUIREMENTS.md`](https://github.com/ankitkpandey1/changemap/blob/main/REQUIREMENTS.md) and
340
+ how it is built in
341
+ [`SPEC.md`](https://github.com/ankitkpandey1/changemap/blob/main/SPEC.md). Agents working on
342
+ this repository read
343
+ [`AGENTS.md`](https://github.com/ankitkpandey1/changemap/blob/main/AGENTS.md).
344
+
345
+ ## Licence
346
+
347
+ Apache-2.0. See [`LICENSE`](https://github.com/ankitkpandey1/changemap/blob/main/LICENSE).