featmap 0.1.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.
- featmap-0.1.1/LICENSE +24 -0
- featmap-0.1.1/PKG-INFO +95 -0
- featmap-0.1.1/README.md +83 -0
- featmap-0.1.1/featmap.egg-info/PKG-INFO +95 -0
- featmap-0.1.1/featmap.egg-info/SOURCES.txt +133 -0
- featmap-0.1.1/featmap.egg-info/dependency_links.txt +1 -0
- featmap-0.1.1/featmap.egg-info/entry_points.txt +2 -0
- featmap-0.1.1/featmap.egg-info/top_level.txt +1 -0
- featmap-0.1.1/fmap/__init__.py +1 -0
- featmap-0.1.1/fmap/__main__.py +3 -0
- featmap-0.1.1/fmap/axum.py +485 -0
- featmap-0.1.1/fmap/cache.py +25 -0
- featmap-0.1.1/fmap/cli.py +907 -0
- featmap-0.1.1/fmap/goext/go.mod +3 -0
- featmap-0.1.1/fmap/goext/main.go +547 -0
- featmap-0.1.1/fmap/goext.py +43 -0
- featmap-0.1.1/fmap/graph.py +920 -0
- featmap-0.1.1/fmap/impact.py +171 -0
- featmap-0.1.1/fmap/index.py +66 -0
- featmap-0.1.1/fmap/pyx.py +1133 -0
- featmap-0.1.1/fmap/routes.py +163 -0
- featmap-0.1.1/fmap/rsx.py +381 -0
- featmap-0.1.1/fmap/scip.py +80 -0
- featmap-0.1.1/fmap/trace_site.py +63 -0
- featmap-0.1.1/fmap/tsx.cjs +1258 -0
- featmap-0.1.1/fmap/tsx.py +98 -0
- featmap-0.1.1/fmap/vendor/typescript/LICENSE.txt +55 -0
- featmap-0.1.1/fmap/vendor/typescript/ThirdPartyNoticeText.txt +193 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.d.ts +22 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.decorators.d.ts +384 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.dom.d.ts +39429 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.dom.iterable.d.ts +571 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.collection.d.ts +147 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.core.d.ts +597 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.d.ts +28 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.generator.d.ts +77 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.promise.d.ts +81 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2016.d.ts +21 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2016.full.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2016.intl.d.ts +31 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.d.ts +26 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.date.d.ts +31 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.full.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.intl.d.ts +44 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.object.d.ts +49 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.string.d.ts +45 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.intl.d.ts +83 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.promise.d.ts +30 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.array.d.ts +79 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.intl.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.object.d.ts +33 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.string.d.ts +37 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.d.ts +27 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.date.d.ts +42 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.intl.d.ts +474 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.number.d.ts +28 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.promise.d.ts +47 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.string.d.ts +44 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.intl.d.ts +166 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.promise.d.ts +48 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.string.d.ts +33 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.array.d.ts +121 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.d.ts +25 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.error.d.ts +75 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.intl.d.ts +145 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.object.d.ts +26 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2022.string.d.ts +25 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2023.array.d.ts +924 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2023.collection.d.ts +21 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2023.d.ts +22 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2023.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2023.intl.d.ts +56 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.collection.d.ts +29 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.d.ts +26 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.object.d.ts +29 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.promise.d.ts +35 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es2024.string.d.ts +29 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es5.d.ts +4601 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.es6.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.array.d.ts +35 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.collection.d.ts +96 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.d.ts +29 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.error.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.float16.d.ts +445 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.full.d.ts +24 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.intl.d.ts +21 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.promise.d.ts +34 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.scripthost.d.ts +322 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.webworker.d.ts +13150 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- featmap-0.1.1/fmap/vendor/typescript/lib/typescript.js +200276 -0
- featmap-0.1.1/fmap/vendor/typescript/package.json +120 -0
- featmap-0.1.1/pyproject.toml +25 -0
- featmap-0.1.1/setup.cfg +4 -0
- featmap-0.1.1/tests/test_acceptance.py +56 -0
- featmap-0.1.1/tests/test_fmap.py +3978 -0
- featmap-0.1.1/tests/test_routes.py +149 -0
featmap-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ardamayk
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
The bundled TypeScript compiler in fmap/vendor/typescript is licensed separately
|
|
24
|
+
under the Apache License 2.0; see fmap/vendor/typescript/LICENSE.txt.
|
featmap-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: featmap
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Exact code + feature map for coding agents
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: fmap/vendor/typescript/LICENSE.txt
|
|
10
|
+
License-File: fmap/vendor/typescript/ThirdPartyNoticeText.txt
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# featmap
|
|
14
|
+
|
|
15
|
+
An exact call graph and feature map of your repository, built for coding agents.
|
|
16
|
+
|
|
17
|
+
`featmap build` writes `featmap.json`. Then you can ask:
|
|
18
|
+
|
|
19
|
+
- who calls a function, and what does it call;
|
|
20
|
+
- which features a change touches, and which tests should run;
|
|
21
|
+
- which backend route a frontend `fetch` reaches.
|
|
22
|
+
|
|
23
|
+
featmap never guesses. An edge is either proven from the code, or marked as uncertain with `?`. A wrong edge is never written.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv tool install featmap # or: pipx install featmap
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You need Git and Python 3.12 or newer, plus the toolchain for each language you analyze:
|
|
32
|
+
|
|
33
|
+
| Language | Needs |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Python | nothing extra |
|
|
36
|
+
| TypeScript / JavaScript | Node.js 14.17+ (TypeScript 5.9 is bundled) |
|
|
37
|
+
| Go | Go 1.22+ |
|
|
38
|
+
| Rust | Cargo and `rustup component add rust-analyzer` |
|
|
39
|
+
|
|
40
|
+
featmap downloads nothing. Project dependencies must already be installed.
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd your-repo
|
|
46
|
+
featmap build # writes featmap.json
|
|
47
|
+
featmap callers normalize # who calls `normalize`
|
|
48
|
+
featmap callees run --depth 3
|
|
49
|
+
featmap path main save # a call path from one symbol to another
|
|
50
|
+
featmap find "quality gate" # search features, symbols and UI text
|
|
51
|
+
featmap show quality-gate # a feature's whole chain, from entry point to leaves
|
|
52
|
+
featmap impact # what changed since HEAD, and which tests to run
|
|
53
|
+
featmap verify # run those tests
|
|
54
|
+
featmap check # exit 1 on stale map or unresolved calls (CI / hooks)
|
|
55
|
+
featmap hook install # rebuild and check the map on every commit
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Query commands take `--json` and `--budget N` (an output size limit for agents).
|
|
59
|
+
|
|
60
|
+
## What it understands
|
|
61
|
+
|
|
62
|
+
- **Languages:** Python (`ast`), TypeScript/JavaScript (the TypeScript checker), Go (`go/types`), Rust (rust-analyzer SCIP).
|
|
63
|
+
- **Entry points:** Python CLI flags, FastAPI, Hono, TanStack and Next.js routes, axum, OpenAPI, `package.json` scripts, UI text and `data-testid`.
|
|
64
|
+
- **Across languages:** a `fetch` call links to the backend route it hits, Tauri `invoke` to `#[tauri::command]`, and a subprocess to the script it runs.
|
|
65
|
+
|
|
66
|
+
Edge kinds: `call`, `ref`, `impl`, `render`, `http`. Uncertain edges start with `?`, for example `?callback`, `?http` or `?macro`. Only `unresolved` blocks `featmap check`.
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
`featmap.toml` is optional. Use it to name features and to declare what the code cannot show:
|
|
71
|
+
|
|
72
|
+
```toml
|
|
73
|
+
[feature.quality-gate]
|
|
74
|
+
title = "Quality gate"
|
|
75
|
+
entry = ["engine/quality.py:quality"]
|
|
76
|
+
test = ["bash tests/ladder.sh"]
|
|
77
|
+
|
|
78
|
+
[[http_client]] # a project HTTP wrapper
|
|
79
|
+
symbol = "app/src/lib/http.ts:request"
|
|
80
|
+
url = 0
|
|
81
|
+
method_arg = "1.method"
|
|
82
|
+
reason = "Authenticated HTTP transport"
|
|
83
|
+
|
|
84
|
+
[[exclude]]
|
|
85
|
+
glob = "static/*.js"
|
|
86
|
+
reason = "Third-party assets"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Limits
|
|
90
|
+
|
|
91
|
+
Dynamic calls are shown as `?` and never resolved by guessing. This includes a function picked by a string, a plugin, or a URL built at runtime. Only JSON OpenAPI files are read.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT. The bundled TypeScript compiler is Apache-2.0.
|
featmap-0.1.1/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# featmap
|
|
2
|
+
|
|
3
|
+
An exact call graph and feature map of your repository, built for coding agents.
|
|
4
|
+
|
|
5
|
+
`featmap build` writes `featmap.json`. Then you can ask:
|
|
6
|
+
|
|
7
|
+
- who calls a function, and what does it call;
|
|
8
|
+
- which features a change touches, and which tests should run;
|
|
9
|
+
- which backend route a frontend `fetch` reaches.
|
|
10
|
+
|
|
11
|
+
featmap never guesses. An edge is either proven from the code, or marked as uncertain with `?`. A wrong edge is never written.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv tool install featmap # or: pipx install featmap
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
You need Git and Python 3.12 or newer, plus the toolchain for each language you analyze:
|
|
20
|
+
|
|
21
|
+
| Language | Needs |
|
|
22
|
+
|---|---|
|
|
23
|
+
| Python | nothing extra |
|
|
24
|
+
| TypeScript / JavaScript | Node.js 14.17+ (TypeScript 5.9 is bundled) |
|
|
25
|
+
| Go | Go 1.22+ |
|
|
26
|
+
| Rust | Cargo and `rustup component add rust-analyzer` |
|
|
27
|
+
|
|
28
|
+
featmap downloads nothing. Project dependencies must already be installed.
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd your-repo
|
|
34
|
+
featmap build # writes featmap.json
|
|
35
|
+
featmap callers normalize # who calls `normalize`
|
|
36
|
+
featmap callees run --depth 3
|
|
37
|
+
featmap path main save # a call path from one symbol to another
|
|
38
|
+
featmap find "quality gate" # search features, symbols and UI text
|
|
39
|
+
featmap show quality-gate # a feature's whole chain, from entry point to leaves
|
|
40
|
+
featmap impact # what changed since HEAD, and which tests to run
|
|
41
|
+
featmap verify # run those tests
|
|
42
|
+
featmap check # exit 1 on stale map or unresolved calls (CI / hooks)
|
|
43
|
+
featmap hook install # rebuild and check the map on every commit
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Query commands take `--json` and `--budget N` (an output size limit for agents).
|
|
47
|
+
|
|
48
|
+
## What it understands
|
|
49
|
+
|
|
50
|
+
- **Languages:** Python (`ast`), TypeScript/JavaScript (the TypeScript checker), Go (`go/types`), Rust (rust-analyzer SCIP).
|
|
51
|
+
- **Entry points:** Python CLI flags, FastAPI, Hono, TanStack and Next.js routes, axum, OpenAPI, `package.json` scripts, UI text and `data-testid`.
|
|
52
|
+
- **Across languages:** a `fetch` call links to the backend route it hits, Tauri `invoke` to `#[tauri::command]`, and a subprocess to the script it runs.
|
|
53
|
+
|
|
54
|
+
Edge kinds: `call`, `ref`, `impl`, `render`, `http`. Uncertain edges start with `?`, for example `?callback`, `?http` or `?macro`. Only `unresolved` blocks `featmap check`.
|
|
55
|
+
|
|
56
|
+
## Configuration
|
|
57
|
+
|
|
58
|
+
`featmap.toml` is optional. Use it to name features and to declare what the code cannot show:
|
|
59
|
+
|
|
60
|
+
```toml
|
|
61
|
+
[feature.quality-gate]
|
|
62
|
+
title = "Quality gate"
|
|
63
|
+
entry = ["engine/quality.py:quality"]
|
|
64
|
+
test = ["bash tests/ladder.sh"]
|
|
65
|
+
|
|
66
|
+
[[http_client]] # a project HTTP wrapper
|
|
67
|
+
symbol = "app/src/lib/http.ts:request"
|
|
68
|
+
url = 0
|
|
69
|
+
method_arg = "1.method"
|
|
70
|
+
reason = "Authenticated HTTP transport"
|
|
71
|
+
|
|
72
|
+
[[exclude]]
|
|
73
|
+
glob = "static/*.js"
|
|
74
|
+
reason = "Third-party assets"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Limits
|
|
78
|
+
|
|
79
|
+
Dynamic calls are shown as `?` and never resolved by guessing. This includes a function picked by a string, a plugin, or a URL built at runtime. Only JSON OpenAPI files are read.
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT. The bundled TypeScript compiler is Apache-2.0.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: featmap
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Exact code + feature map for coding agents
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: fmap/vendor/typescript/LICENSE.txt
|
|
10
|
+
License-File: fmap/vendor/typescript/ThirdPartyNoticeText.txt
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# featmap
|
|
14
|
+
|
|
15
|
+
An exact call graph and feature map of your repository, built for coding agents.
|
|
16
|
+
|
|
17
|
+
`featmap build` writes `featmap.json`. Then you can ask:
|
|
18
|
+
|
|
19
|
+
- who calls a function, and what does it call;
|
|
20
|
+
- which features a change touches, and which tests should run;
|
|
21
|
+
- which backend route a frontend `fetch` reaches.
|
|
22
|
+
|
|
23
|
+
featmap never guesses. An edge is either proven from the code, or marked as uncertain with `?`. A wrong edge is never written.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv tool install featmap # or: pipx install featmap
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You need Git and Python 3.12 or newer, plus the toolchain for each language you analyze:
|
|
32
|
+
|
|
33
|
+
| Language | Needs |
|
|
34
|
+
|---|---|
|
|
35
|
+
| Python | nothing extra |
|
|
36
|
+
| TypeScript / JavaScript | Node.js 14.17+ (TypeScript 5.9 is bundled) |
|
|
37
|
+
| Go | Go 1.22+ |
|
|
38
|
+
| Rust | Cargo and `rustup component add rust-analyzer` |
|
|
39
|
+
|
|
40
|
+
featmap downloads nothing. Project dependencies must already be installed.
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd your-repo
|
|
46
|
+
featmap build # writes featmap.json
|
|
47
|
+
featmap callers normalize # who calls `normalize`
|
|
48
|
+
featmap callees run --depth 3
|
|
49
|
+
featmap path main save # a call path from one symbol to another
|
|
50
|
+
featmap find "quality gate" # search features, symbols and UI text
|
|
51
|
+
featmap show quality-gate # a feature's whole chain, from entry point to leaves
|
|
52
|
+
featmap impact # what changed since HEAD, and which tests to run
|
|
53
|
+
featmap verify # run those tests
|
|
54
|
+
featmap check # exit 1 on stale map or unresolved calls (CI / hooks)
|
|
55
|
+
featmap hook install # rebuild and check the map on every commit
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Query commands take `--json` and `--budget N` (an output size limit for agents).
|
|
59
|
+
|
|
60
|
+
## What it understands
|
|
61
|
+
|
|
62
|
+
- **Languages:** Python (`ast`), TypeScript/JavaScript (the TypeScript checker), Go (`go/types`), Rust (rust-analyzer SCIP).
|
|
63
|
+
- **Entry points:** Python CLI flags, FastAPI, Hono, TanStack and Next.js routes, axum, OpenAPI, `package.json` scripts, UI text and `data-testid`.
|
|
64
|
+
- **Across languages:** a `fetch` call links to the backend route it hits, Tauri `invoke` to `#[tauri::command]`, and a subprocess to the script it runs.
|
|
65
|
+
|
|
66
|
+
Edge kinds: `call`, `ref`, `impl`, `render`, `http`. Uncertain edges start with `?`, for example `?callback`, `?http` or `?macro`. Only `unresolved` blocks `featmap check`.
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
`featmap.toml` is optional. Use it to name features and to declare what the code cannot show:
|
|
71
|
+
|
|
72
|
+
```toml
|
|
73
|
+
[feature.quality-gate]
|
|
74
|
+
title = "Quality gate"
|
|
75
|
+
entry = ["engine/quality.py:quality"]
|
|
76
|
+
test = ["bash tests/ladder.sh"]
|
|
77
|
+
|
|
78
|
+
[[http_client]] # a project HTTP wrapper
|
|
79
|
+
symbol = "app/src/lib/http.ts:request"
|
|
80
|
+
url = 0
|
|
81
|
+
method_arg = "1.method"
|
|
82
|
+
reason = "Authenticated HTTP transport"
|
|
83
|
+
|
|
84
|
+
[[exclude]]
|
|
85
|
+
glob = "static/*.js"
|
|
86
|
+
reason = "Third-party assets"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Limits
|
|
90
|
+
|
|
91
|
+
Dynamic calls are shown as `?` and never resolved by guessing. This includes a function picked by a string, a plugin, or a URL built at runtime. Only JSON OpenAPI files are read.
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT. The bundled TypeScript compiler is Apache-2.0.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
featmap.egg-info/PKG-INFO
|
|
5
|
+
featmap.egg-info/SOURCES.txt
|
|
6
|
+
featmap.egg-info/dependency_links.txt
|
|
7
|
+
featmap.egg-info/entry_points.txt
|
|
8
|
+
featmap.egg-info/top_level.txt
|
|
9
|
+
fmap/__init__.py
|
|
10
|
+
fmap/__main__.py
|
|
11
|
+
fmap/axum.py
|
|
12
|
+
fmap/cache.py
|
|
13
|
+
fmap/cli.py
|
|
14
|
+
fmap/goext.py
|
|
15
|
+
fmap/graph.py
|
|
16
|
+
fmap/impact.py
|
|
17
|
+
fmap/index.py
|
|
18
|
+
fmap/pyx.py
|
|
19
|
+
fmap/routes.py
|
|
20
|
+
fmap/rsx.py
|
|
21
|
+
fmap/scip.py
|
|
22
|
+
fmap/trace_site.py
|
|
23
|
+
fmap/tsx.cjs
|
|
24
|
+
fmap/tsx.py
|
|
25
|
+
fmap/goext/go.mod
|
|
26
|
+
fmap/goext/main.go
|
|
27
|
+
fmap/vendor/typescript/LICENSE.txt
|
|
28
|
+
fmap/vendor/typescript/ThirdPartyNoticeText.txt
|
|
29
|
+
fmap/vendor/typescript/package.json
|
|
30
|
+
fmap/vendor/typescript/lib/lib.d.ts
|
|
31
|
+
fmap/vendor/typescript/lib/lib.decorators.d.ts
|
|
32
|
+
fmap/vendor/typescript/lib/lib.decorators.legacy.d.ts
|
|
33
|
+
fmap/vendor/typescript/lib/lib.dom.asynciterable.d.ts
|
|
34
|
+
fmap/vendor/typescript/lib/lib.dom.d.ts
|
|
35
|
+
fmap/vendor/typescript/lib/lib.dom.iterable.d.ts
|
|
36
|
+
fmap/vendor/typescript/lib/lib.es2015.collection.d.ts
|
|
37
|
+
fmap/vendor/typescript/lib/lib.es2015.core.d.ts
|
|
38
|
+
fmap/vendor/typescript/lib/lib.es2015.d.ts
|
|
39
|
+
fmap/vendor/typescript/lib/lib.es2015.generator.d.ts
|
|
40
|
+
fmap/vendor/typescript/lib/lib.es2015.iterable.d.ts
|
|
41
|
+
fmap/vendor/typescript/lib/lib.es2015.promise.d.ts
|
|
42
|
+
fmap/vendor/typescript/lib/lib.es2015.proxy.d.ts
|
|
43
|
+
fmap/vendor/typescript/lib/lib.es2015.reflect.d.ts
|
|
44
|
+
fmap/vendor/typescript/lib/lib.es2015.symbol.d.ts
|
|
45
|
+
fmap/vendor/typescript/lib/lib.es2015.symbol.wellknown.d.ts
|
|
46
|
+
fmap/vendor/typescript/lib/lib.es2016.array.include.d.ts
|
|
47
|
+
fmap/vendor/typescript/lib/lib.es2016.d.ts
|
|
48
|
+
fmap/vendor/typescript/lib/lib.es2016.full.d.ts
|
|
49
|
+
fmap/vendor/typescript/lib/lib.es2016.intl.d.ts
|
|
50
|
+
fmap/vendor/typescript/lib/lib.es2017.arraybuffer.d.ts
|
|
51
|
+
fmap/vendor/typescript/lib/lib.es2017.d.ts
|
|
52
|
+
fmap/vendor/typescript/lib/lib.es2017.date.d.ts
|
|
53
|
+
fmap/vendor/typescript/lib/lib.es2017.full.d.ts
|
|
54
|
+
fmap/vendor/typescript/lib/lib.es2017.intl.d.ts
|
|
55
|
+
fmap/vendor/typescript/lib/lib.es2017.object.d.ts
|
|
56
|
+
fmap/vendor/typescript/lib/lib.es2017.sharedmemory.d.ts
|
|
57
|
+
fmap/vendor/typescript/lib/lib.es2017.string.d.ts
|
|
58
|
+
fmap/vendor/typescript/lib/lib.es2017.typedarrays.d.ts
|
|
59
|
+
fmap/vendor/typescript/lib/lib.es2018.asyncgenerator.d.ts
|
|
60
|
+
fmap/vendor/typescript/lib/lib.es2018.asynciterable.d.ts
|
|
61
|
+
fmap/vendor/typescript/lib/lib.es2018.d.ts
|
|
62
|
+
fmap/vendor/typescript/lib/lib.es2018.full.d.ts
|
|
63
|
+
fmap/vendor/typescript/lib/lib.es2018.intl.d.ts
|
|
64
|
+
fmap/vendor/typescript/lib/lib.es2018.promise.d.ts
|
|
65
|
+
fmap/vendor/typescript/lib/lib.es2018.regexp.d.ts
|
|
66
|
+
fmap/vendor/typescript/lib/lib.es2019.array.d.ts
|
|
67
|
+
fmap/vendor/typescript/lib/lib.es2019.d.ts
|
|
68
|
+
fmap/vendor/typescript/lib/lib.es2019.full.d.ts
|
|
69
|
+
fmap/vendor/typescript/lib/lib.es2019.intl.d.ts
|
|
70
|
+
fmap/vendor/typescript/lib/lib.es2019.object.d.ts
|
|
71
|
+
fmap/vendor/typescript/lib/lib.es2019.string.d.ts
|
|
72
|
+
fmap/vendor/typescript/lib/lib.es2019.symbol.d.ts
|
|
73
|
+
fmap/vendor/typescript/lib/lib.es2020.bigint.d.ts
|
|
74
|
+
fmap/vendor/typescript/lib/lib.es2020.d.ts
|
|
75
|
+
fmap/vendor/typescript/lib/lib.es2020.date.d.ts
|
|
76
|
+
fmap/vendor/typescript/lib/lib.es2020.full.d.ts
|
|
77
|
+
fmap/vendor/typescript/lib/lib.es2020.intl.d.ts
|
|
78
|
+
fmap/vendor/typescript/lib/lib.es2020.number.d.ts
|
|
79
|
+
fmap/vendor/typescript/lib/lib.es2020.promise.d.ts
|
|
80
|
+
fmap/vendor/typescript/lib/lib.es2020.sharedmemory.d.ts
|
|
81
|
+
fmap/vendor/typescript/lib/lib.es2020.string.d.ts
|
|
82
|
+
fmap/vendor/typescript/lib/lib.es2020.symbol.wellknown.d.ts
|
|
83
|
+
fmap/vendor/typescript/lib/lib.es2021.d.ts
|
|
84
|
+
fmap/vendor/typescript/lib/lib.es2021.full.d.ts
|
|
85
|
+
fmap/vendor/typescript/lib/lib.es2021.intl.d.ts
|
|
86
|
+
fmap/vendor/typescript/lib/lib.es2021.promise.d.ts
|
|
87
|
+
fmap/vendor/typescript/lib/lib.es2021.string.d.ts
|
|
88
|
+
fmap/vendor/typescript/lib/lib.es2021.weakref.d.ts
|
|
89
|
+
fmap/vendor/typescript/lib/lib.es2022.array.d.ts
|
|
90
|
+
fmap/vendor/typescript/lib/lib.es2022.d.ts
|
|
91
|
+
fmap/vendor/typescript/lib/lib.es2022.error.d.ts
|
|
92
|
+
fmap/vendor/typescript/lib/lib.es2022.full.d.ts
|
|
93
|
+
fmap/vendor/typescript/lib/lib.es2022.intl.d.ts
|
|
94
|
+
fmap/vendor/typescript/lib/lib.es2022.object.d.ts
|
|
95
|
+
fmap/vendor/typescript/lib/lib.es2022.regexp.d.ts
|
|
96
|
+
fmap/vendor/typescript/lib/lib.es2022.string.d.ts
|
|
97
|
+
fmap/vendor/typescript/lib/lib.es2023.array.d.ts
|
|
98
|
+
fmap/vendor/typescript/lib/lib.es2023.collection.d.ts
|
|
99
|
+
fmap/vendor/typescript/lib/lib.es2023.d.ts
|
|
100
|
+
fmap/vendor/typescript/lib/lib.es2023.full.d.ts
|
|
101
|
+
fmap/vendor/typescript/lib/lib.es2023.intl.d.ts
|
|
102
|
+
fmap/vendor/typescript/lib/lib.es2024.arraybuffer.d.ts
|
|
103
|
+
fmap/vendor/typescript/lib/lib.es2024.collection.d.ts
|
|
104
|
+
fmap/vendor/typescript/lib/lib.es2024.d.ts
|
|
105
|
+
fmap/vendor/typescript/lib/lib.es2024.full.d.ts
|
|
106
|
+
fmap/vendor/typescript/lib/lib.es2024.object.d.ts
|
|
107
|
+
fmap/vendor/typescript/lib/lib.es2024.promise.d.ts
|
|
108
|
+
fmap/vendor/typescript/lib/lib.es2024.regexp.d.ts
|
|
109
|
+
fmap/vendor/typescript/lib/lib.es2024.sharedmemory.d.ts
|
|
110
|
+
fmap/vendor/typescript/lib/lib.es2024.string.d.ts
|
|
111
|
+
fmap/vendor/typescript/lib/lib.es5.d.ts
|
|
112
|
+
fmap/vendor/typescript/lib/lib.es6.d.ts
|
|
113
|
+
fmap/vendor/typescript/lib/lib.esnext.array.d.ts
|
|
114
|
+
fmap/vendor/typescript/lib/lib.esnext.collection.d.ts
|
|
115
|
+
fmap/vendor/typescript/lib/lib.esnext.d.ts
|
|
116
|
+
fmap/vendor/typescript/lib/lib.esnext.decorators.d.ts
|
|
117
|
+
fmap/vendor/typescript/lib/lib.esnext.disposable.d.ts
|
|
118
|
+
fmap/vendor/typescript/lib/lib.esnext.error.d.ts
|
|
119
|
+
fmap/vendor/typescript/lib/lib.esnext.float16.d.ts
|
|
120
|
+
fmap/vendor/typescript/lib/lib.esnext.full.d.ts
|
|
121
|
+
fmap/vendor/typescript/lib/lib.esnext.intl.d.ts
|
|
122
|
+
fmap/vendor/typescript/lib/lib.esnext.iterator.d.ts
|
|
123
|
+
fmap/vendor/typescript/lib/lib.esnext.promise.d.ts
|
|
124
|
+
fmap/vendor/typescript/lib/lib.esnext.sharedmemory.d.ts
|
|
125
|
+
fmap/vendor/typescript/lib/lib.scripthost.d.ts
|
|
126
|
+
fmap/vendor/typescript/lib/lib.webworker.asynciterable.d.ts
|
|
127
|
+
fmap/vendor/typescript/lib/lib.webworker.d.ts
|
|
128
|
+
fmap/vendor/typescript/lib/lib.webworker.importscripts.d.ts
|
|
129
|
+
fmap/vendor/typescript/lib/lib.webworker.iterable.d.ts
|
|
130
|
+
fmap/vendor/typescript/lib/typescript.js
|
|
131
|
+
tests/test_acceptance.py
|
|
132
|
+
tests/test_fmap.py
|
|
133
|
+
tests/test_routes.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fmap
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|