@@ -43,7 +43,7 @@ A language-specific parser walks the directory, parses each file into a tree-sit
4343| Language | Extensions | Key constructs |
4444| --- | --- | --- |
4545| Python | ` .py ` | functions, classes, methods |
46- | JavaScript | ` .js ` , ` .jsx ` | functions, classes, arrow functions |
46+ | JavaScript | ` .js ` , ` .jsx ` , ` .mjs ` , ` .cjs ` | functions, classes, arrow functions |
4747| TypeScript | ` .ts ` , ` .tsx ` | functions, classes, interfaces, enums |
4848| PHP | ` .php ` | functions, classes, interfaces, traits |
4949| Ruby | ` .rb ` | methods, classes, modules |
@@ -111,11 +111,17 @@ The `QueryEngine` provides a high-level API over the indexed graph:
111111| ` attack_surface() ` | Entrypoints tagged with trust level and asset value |
112112| ` complexity_hotspots(n) ` | Functions with cyclomatic complexity &ge ; n |
113113| ` functions_that_raise(exc) ` | Functions whose parser-detected exception list includes ` exc ` |
114- | ` annotate(name, kind, desc , source) ` | Add a semantic annotation to a node |
114+ | ` annotate(name, kind, description , source) ` | Add a semantic annotation to a node |
115115| ` annotations_of(name, kind=None) ` | Get annotations for a node, optionally filtered by kind |
116116| ` nodes_with_annotation(kind) ` | Every node tagged with the given annotation kind |
117117| ` clear_annotations(name, kind=None) ` | Remove annotations from a node |
118118| ` diff_against(other) ` | Structural diff of this engine's graph vs. another |
119+ | ` preanalysis() ` | Run the built-in pre-analysis passes and store annotations/subgraphs |
120+ | ` augment_sarif(path) ` | Merge SARIF findings into the graph |
121+ | ` augment_weaudit(path) ` | Merge weAudit findings into the graph |
122+ | ` findings(kind=None) ` | Return nodes carrying finding-style annotations |
123+ | ` subgraph(name) ` | Return the nodes in a named subgraph |
124+ | ` subgraph_names() ` | List every named subgraph currently on the graph |
119125| ` summary() ` | Node counts, edge counts, dependencies |
120126| ` to_json() ` | Full graph export |
121127
@@ -220,8 +226,16 @@ graph TD
220226
221227## Installation
222228
229+ The examples below track the current development branch. For the latest
230+ published package, install from PyPI. For the exact feature set described
231+ here, install from a checkout and run commands via ` uv run ` .
232+
223233``` bash
234+ # Latest published release
224235uv pip install trailmark
236+
237+ # Current checkout / development branch
238+ uv sync --all-groups
225239```
226240
227241Requires Python &ge ; 3.12.
@@ -394,6 +408,15 @@ before = QueryEngine.from_directory("before/")
394408diff = engine.diff_against(before)
395409# diff contains: summary_delta, nodes {added/removed/modified},
396410# edges {added/removed}, entrypoints {added/removed/modified}
411+
412+ # Run the built-in audit-oriented preanalysis passes
413+ engine.preanalysis()
414+ engine.findings()
415+ engine.subgraph_names()
416+
417+ # Programmatic augmentation hooks for external tooling
418+ engine.augment_sarif(" results.sarif" )
419+ engine.augment_weaudit(" findings.json" )
397420```
398421
399422## Development
@@ -410,7 +433,7 @@ uv run ruff format
410433uv tool install ty && ty check
411434
412435# Tests
413- uv run pytest -q
436+ uv run pytest -q tests/
414437
415438# Mutation testing (on macOS, set this env var to avoid rustworkx fork segfaults)
416439OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES uv run mutmut run
0 commit comments