@fabersep/atlas 0.0.0-stage → 0.1.0
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.
- package/CHANGELOG.md +30 -0
- package/LICENSE +202 -0
- package/README.md +139 -2
- package/dist/packs/csharp/calls.d.ts +4 -0
- package/dist/packs/csharp/calls.js +167 -0
- package/dist/packs/csharp/declarations.d.ts +4 -0
- package/dist/packs/csharp/declarations.js +142 -0
- package/dist/packs/csharp/pack.d.ts +2 -0
- package/dist/packs/csharp/pack.js +39 -0
- package/dist/packs/csharp/resolve.d.ts +2 -0
- package/dist/packs/csharp/resolve.js +35 -0
- package/dist/packs/csharp/signals.d.ts +7 -0
- package/dist/packs/csharp/signals.js +143 -0
- package/dist/packs/dart/calls.d.ts +4 -0
- package/dist/packs/dart/calls.js +130 -0
- package/dist/packs/dart/declarations.d.ts +11 -0
- package/dist/packs/dart/declarations.js +79 -0
- package/dist/packs/dart/members.d.ts +4 -0
- package/dist/packs/dart/members.js +62 -0
- package/dist/packs/dart/pack.d.ts +2 -0
- package/dist/packs/dart/pack.js +37 -0
- package/dist/packs/dart/resolve.d.ts +2 -0
- package/dist/packs/dart/resolve.js +32 -0
- package/dist/packs/index.d.ts +3 -0
- package/dist/packs/index.js +8 -0
- package/dist/packs/json/pack.d.ts +2 -0
- package/dist/packs/json/pack.js +27 -0
- package/dist/packs/msbuild/pack.d.ts +2 -0
- package/dist/packs/msbuild/pack.js +75 -0
- package/dist/packs/msbuild/xml.d.ts +16 -0
- package/dist/packs/msbuild/xml.js +123 -0
- package/dist/packs/typescript/calls.d.ts +4 -0
- package/dist/packs/typescript/calls.js +201 -0
- package/dist/packs/typescript/declarations.d.ts +9 -0
- package/dist/packs/typescript/declarations.js +74 -0
- package/dist/packs/typescript/members.d.ts +4 -0
- package/dist/packs/typescript/members.js +92 -0
- package/dist/packs/typescript/pack.d.ts +2 -0
- package/dist/packs/typescript/pack.js +53 -0
- package/dist/packs/typescript/resolve.d.ts +2 -0
- package/dist/packs/typescript/resolve.js +68 -0
- package/dist/packs/typescript/signals.d.ts +7 -0
- package/dist/packs/typescript/signals.js +186 -0
- package/dist/packs/yaml/pack.d.ts +2 -0
- package/dist/packs/yaml/pack.js +35 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +371 -0
- package/dist/src/graph/build.d.ts +17 -0
- package/dist/src/graph/build.js +41 -0
- package/dist/src/graph/metrics.d.ts +12 -0
- package/dist/src/graph/metrics.js +75 -0
- package/dist/src/graph/topology.d.ts +5 -0
- package/dist/src/graph/topology.js +54 -0
- package/dist/src/health/compare.d.ts +2 -0
- package/dist/src/health/compare.js +38 -0
- package/dist/src/health/duplicates.d.ts +11 -0
- package/dist/src/health/duplicates.js +66 -0
- package/dist/src/health/health.d.ts +12 -0
- package/dist/src/health/health.js +94 -0
- package/dist/src/health/types.d.ts +101 -0
- package/dist/src/health/types.js +5 -0
- package/dist/src/index.d.ts +23 -0
- package/dist/src/index.js +20 -0
- package/dist/src/init/init.d.ts +73 -0
- package/dist/src/init/init.js +305 -0
- package/dist/src/init/scout.d.ts +45 -0
- package/dist/src/init/scout.js +208 -0
- package/dist/src/jsonc.d.ts +5 -0
- package/dist/src/jsonc.js +34 -0
- package/dist/src/mcp/server.d.ts +266 -0
- package/dist/src/mcp/server.js +414 -0
- package/dist/src/metrics/doctor.d.ts +15 -0
- package/dist/src/metrics/doctor.js +125 -0
- package/dist/src/metrics/log.d.ts +43 -0
- package/dist/src/metrics/log.js +101 -0
- package/dist/src/metrics/stats.d.ts +43 -0
- package/dist/src/metrics/stats.js +172 -0
- package/dist/src/model.d.ts +178 -0
- package/dist/src/model.js +2 -0
- package/dist/src/outputs.d.ts +16 -0
- package/dist/src/outputs.js +48 -0
- package/dist/src/packs/calls.d.ts +9 -0
- package/dist/src/packs/calls.js +119 -0
- package/dist/src/packs/dataShape.d.ts +6 -0
- package/dist/src/packs/dataShape.js +54 -0
- package/dist/src/packs/pack.d.ts +51 -0
- package/dist/src/packs/pack.js +3 -0
- package/dist/src/packs/packFiles.d.ts +5 -0
- package/dist/src/packs/packFiles.js +12 -0
- package/dist/src/packs/symbols.d.ts +39 -0
- package/dist/src/packs/symbols.js +98 -0
- package/dist/src/packs/treeSitter.d.ts +8 -0
- package/dist/src/packs/treeSitter.js +107 -0
- package/dist/src/queries/flow.d.ts +42 -0
- package/dist/src/queries/flow.js +391 -0
- package/dist/src/queries/map.d.ts +28 -0
- package/dist/src/queries/map.js +102 -0
- package/dist/src/queries/neighborhood.d.ts +35 -0
- package/dist/src/queries/neighborhood.js +60 -0
- package/dist/src/scan/audit.d.ts +2 -0
- package/dist/src/scan/audit.js +41 -0
- package/dist/src/scan/records.d.ts +12 -0
- package/dist/src/scan/records.js +42 -0
- package/dist/src/scan/resolveImports.d.ts +3 -0
- package/dist/src/scan/resolveImports.js +47 -0
- package/dist/src/scan/roles.d.ts +5 -0
- package/dist/src/scan/roles.js +87 -0
- package/dist/src/scan/scan.d.ts +24 -0
- package/dist/src/scan/scan.js +72 -0
- package/dist/src/text/briefs.d.ts +13 -0
- package/dist/src/text/briefs.js +43 -0
- package/dist/src/text/collapse.d.ts +10 -0
- package/dist/src/text/collapse.js +58 -0
- package/dist/src/text/declarations.d.ts +12 -0
- package/dist/src/text/declarations.js +120 -0
- package/dist/src/text/structure.d.ts +2 -0
- package/dist/src/text/structure.js +15 -0
- package/dist/src/text/tree.d.ts +20 -0
- package/dist/src/text/tree.js +49 -0
- package/dist/src/tokens.d.ts +4 -0
- package/dist/src/tokens.js +9 -0
- package/dist/src/version.d.ts +10 -0
- package/dist/src/version.js +11 -0
- package/dist/src/walk/ignoreRules.d.ts +17 -0
- package/dist/src/walk/ignoreRules.js +72 -0
- package/dist/src/walk/walk.d.ts +11 -0
- package/dist/src/walk/walk.js +29 -0
- package/grammars/LICENSE-tree-sitter-dart +20 -0
- package/grammars/README.md +11 -0
- package/grammars/tree-sitter-dart.wasm +0 -0
- package/package.json +68 -4
- package/packs/csharp/README.md +9 -0
- package/packs/csharp/imports.scm +3 -0
- package/packs/csharp/symbols.scm +17 -0
- package/packs/dart/imports.scm +5 -0
- package/packs/dart/symbols.scm +13 -0
- package/packs/msbuild/README.md +11 -0
- package/packs/typescript/exports.scm +16 -0
- package/packs/typescript/imports.scm +9 -0
- package/packs/typescript/symbols.scm +19 -0
- package/schema/ast_code_map.schema.json +144 -0
- package/schema/schema-lock.json +7 -0
- package/schema/topology.schema.json +87 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@fabersep/atlas`. Versions follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## 0.1.0 (unreleased)
|
|
6
|
+
|
|
7
|
+
First release of FaberSEP Atlas, the successor of the private `code-intelligence` 0.8.0.
|
|
8
|
+
|
|
9
|
+
### Included
|
|
10
|
+
- Incremental Tree-sitter scanner with six language packs (TypeScript/JavaScript, Dart, C#, MSBuild, JSON, YAML), versioned JSON schemas and the `scan`, `map --zoom 0|1|2`, `brief`, `neighborhood`, `flow`, `impact`, `hubs`, `health` and `health-compare` commands.
|
|
11
|
+
- A stdio MCP server (`faber-atlas mcp`, 7 tools) that refreshes the index before each call.
|
|
12
|
+
- `faber-atlas init` for Claude Code, Antigravity, Cursor and Claude Desktop, with a default read-only Scout (Claude Code: `haiku`, `low` effort; Antigravity: `flash`), `--preview` and `--undo`; `faber-atlas scout` to change the Scout's model.
|
|
13
|
+
- `faber-atlas doctor`, and local-only `faber-atlas stats` / `stats --share` (no telemetry).
|
|
14
|
+
|
|
15
|
+
### Fixed before release (review of 2026-11-28)
|
|
16
|
+
- `init` wrote the MCP server into Claude Code's and Cursor's global settings with `--root` set to the project it ran in, so running it in a second project silently pointed every project at the second one. Entries no longer carry a project path (see "one-time setup" below).
|
|
17
|
+
- A settings file with comments or broken JSON was replaced by a file holding only Atlas's entry. It is now left untouched, and `init` prints the entry to add by hand.
|
|
18
|
+
- The `.bak` backup of `~/.claude.json` was readable by other users of the machine; it now keeps the original file's permissions.
|
|
19
|
+
- The `.faber-atlas/` index showed up in `git status`; it now ignores itself.
|
|
20
|
+
- `doctor` reported a failure right after a correct setup, because the index is only built on the first MCP call. A missing index is now a warning with a hint; an unreadable one is still a failure.
|
|
21
|
+
- The local metrics log stored any tool name an MCP client sent; unknown names are now logged as `unknown`.
|
|
22
|
+
|
|
23
|
+
### Changed (one-time setup)
|
|
24
|
+
- `init` runs once per computer instead of once per project. Each tool gets one global entry with no project pinned; the MCP server maps the project the tool has open (the workspace it reports through MCP `roots/list`, else the git root above the folder it started in) and refuses to map the whole home folder. The Scout moved to the user's folders (`~/.claude/agents/atlas-scout.md`, a block in `~/.gemini/GEMINI.md`), so `init` writes nothing into projects unless `--agents-md` is given. Per-project entries from the previous build are removed. Backups are named `<file>.faber-atlas.bak`.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- `faber-atlas --version`, this changelog, and a macOS job in CI.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
- The README is a plain-language, story-first introduction; commands and setup details are in `docs/cli-reference.md`.
|
package/LICENSE
ADDED
|
@@ -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 [yyyy] [name of copyright owner]
|
|
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.
|
package/README.md
CHANGED
|
@@ -1,3 +1,140 @@
|
|
|
1
|
-
#
|
|
1
|
+
# FaberSEP Atlas
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@fabersep/atlas)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
[](https://github.com/fabersep/atlas/actions/workflows/ci.yml)
|
|
6
|
+
|
|
7
|
+
**Your AI coding assistant spends much of its time, and your money, looking for code. FaberSEP Atlas gives it a map of your project, so it finds the right place in one step instead of twenty.**
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## The problem you already know
|
|
12
|
+
|
|
13
|
+
You ask your assistant: *"When a user changes their password, where do their other sessions get logged out?"*
|
|
14
|
+
|
|
15
|
+
It starts searching. It greps for `password`, opens five files, reads them top to bottom, greps again. Ten turns later it has an answer, and it is often incomplete: it missed the part where one service sends an event and another one, in a different folder, reacts to it. Meanwhile every file it read stays in the chat, making each next answer slower and more expensive.
|
|
16
|
+
|
|
17
|
+
On a bigger change it gets worse: it can invent a helper that doesn't exist, or forget the tests that call the code it just changed.
|
|
18
|
+
|
|
19
|
+
## What changes with FaberSEP Atlas
|
|
20
|
+
|
|
21
|
+
Atlas reads your project on your computer and keeps a map of it: every file, every class and function with its signature, who calls whom, and which events and background jobs connect them. When files change, it updates the map in milliseconds.
|
|
22
|
+
|
|
23
|
+
Your assistant asks the map instead of searching:
|
|
24
|
+
|
|
25
|
+
1. **"Show me the project."** It gets the folders and what they do in about 200 words, even for a project with hundreds of files.
|
|
26
|
+
2. **"What happens when `changePassword` runs?"** It gets the whole chain in one answer, with the exact file and line of each step:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
AuthController.changePassword (src/controllers/auth.controller.ts:121) [POST /change-password]
|
|
30
|
+
──calls──▶ AuthService.changePassword (src/services/auth.service.ts:169)
|
|
31
|
+
──calls──▶ UserRepository.update (src/repositories/user.repository.ts:195)
|
|
32
|
+
──emits──▶ event:AuthChangePassword
|
|
33
|
+
──handles──▶ SessionService.onAuthChangePassword (src/services/session.service.ts:91)
|
|
34
|
+
──calls──▶ SessionRepository.invalidateAll (src/repositories/session.repository.ts:104)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
3. **"What breaks if I change this?"** Before a refactor it gets every caller, every web route and job that reaches that code, and the tests to update.
|
|
38
|
+
|
|
39
|
+
Atlas also sets up a **Scout**: a small, cheap helper model (Haiku in Claude Code, Flash in Antigravity) that does this looking-up for your main model and hands back only the files and lines that matter. Your expensive model spends its effort on the change itself.
|
|
40
|
+
|
|
41
|
+
## Why you can trust it
|
|
42
|
+
|
|
43
|
+
- **Nothing leaves your computer.** No account, no server, no telemetry. Atlas never calls an AI model: the map comes from reading the code's structure, so the same code always gives the same map.
|
|
44
|
+
- **It only tells what it can see.** Every answer points at a real file and line. A file it cannot read is listed as such, not guessed.
|
|
45
|
+
- **Your projects stay clean.** The map lives in a `.faber-atlas/` folder that git ignores on its own.
|
|
46
|
+
- **Easy to undo.** Setup keeps a backup of every file it edits, never rewrites a settings file it cannot read safely, and `npx @fabersep/atlas init --undo` removes only what it added.
|
|
47
|
+
- **Works with the tools you already use:** Claude Code, Antigravity, Cursor and Claude Desktop.
|
|
48
|
+
- **Free and open source** (Apache-2.0).
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Get started (about 2 minutes)
|
|
53
|
+
|
|
54
|
+
You need **Node.js 20 or newer**. To check, run `node -v` in a terminal.
|
|
55
|
+
|
|
56
|
+
**1. Set it up**
|
|
57
|
+
|
|
58
|
+
Open a terminal and run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npx @fabersep/atlas init
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
You do this **once per computer**, in any folder. It finds the AI tools on your computer, connects Atlas to each of them, adds the Scout helper, and prints what it changed. From then on Atlas works in every project you open: it sees which project your tool has open and maps that one. Want to see first? Add `--preview`: nothing is written.
|
|
65
|
+
|
|
66
|
+
**2. Check it**
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx @fabersep/atlas doctor
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Run it inside a project. Right after setup it says the map is not built yet. That is expected: it is built the first time your assistant uses it in that project (or run `npx @fabersep/atlas scan .` now).
|
|
73
|
+
|
|
74
|
+
**3. Start a new chat in your AI tool and ask normally**
|
|
75
|
+
|
|
76
|
+
> *"Where do we send the order confirmation email, and what triggers it?"*
|
|
77
|
+
|
|
78
|
+
You don't need special commands. The assistant, or its Scout, uses the map on its own.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Measured on real projects
|
|
83
|
+
|
|
84
|
+
On the open-source [Immich](https://github.com/immich-app/immich) server (775 files): four real questions and edit tasks, each run with the main model alone and with the main model plus an Atlas Scout.
|
|
85
|
+
|
|
86
|
+
| | Main model alone | With Atlas Scout |
|
|
87
|
+
| :--- | ---: | ---: |
|
|
88
|
+
| Main model's tokens | 119,415 | **76,757** (-36%) |
|
|
89
|
+
| Main model's time | 61.8 s | **31.5 s** (-49%) |
|
|
90
|
+
| Tasks done correctly | 3 of 4 | **4 of 4** |
|
|
91
|
+
|
|
92
|
+
In the task it got wrong, the main model alone used a property that doesn't exist; with the Scout it found the real call and the test mocks to update. Four tasks is a small sample: the [Scout guide](docs/scout-guide.md) has every run, and `npx @fabersep/atlas stats` measures your own project.
|
|
93
|
+
|
|
94
|
+
On a private app with a Flutter client, a TypeScript API and a React admin (848 files), the map is 83% smaller than the code it describes; the first scan takes 1.3 s and an update after a change 55 ms (Apple M4 Pro).
|
|
95
|
+
|
|
96
|
+
## Languages
|
|
97
|
+
|
|
98
|
+
TypeScript and JavaScript (including React), Dart and Flutter, C# and .NET, plus .NET project files (`.csproj`, `.sln`), JSON and YAML. Python is next. A new language is one folder: see [Contributing](CONTRIBUTING.md).
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Common questions
|
|
103
|
+
|
|
104
|
+
**Does it slow my assistant down or cost more?**
|
|
105
|
+
It is meant to do the opposite: one short answer from the map replaces many file reads. Its tool descriptions add about 1,000 tokens to a chat.
|
|
106
|
+
|
|
107
|
+
**What does it put in my project?**
|
|
108
|
+
Only a `.faber-atlas/` folder with the map, which git ignores. The setup itself lives in your user folder (your AI tools' settings and the Scout), not in your projects.
|
|
109
|
+
|
|
110
|
+
**I use it in several projects. Do I set it up in each one?**
|
|
111
|
+
No. One `init` covers all of them: each time you open a project in your AI tool, Atlas maps that project and keeps its map in that project's `.faber-atlas/` folder. If you open the tool in your home folder, outside any project, Atlas says so instead of mapping your whole disk. (Claude Desktop has no project folder; there you pick one with `init --engine claude-desktop --root <folder>`.)
|
|
112
|
+
|
|
113
|
+
**Can I pick a different Scout model?**
|
|
114
|
+
Yes: `npx @fabersep/atlas scout` shows the choices. See the [Scout guide](docs/scout-guide.md).
|
|
115
|
+
|
|
116
|
+
**How do I see what it saves me?**
|
|
117
|
+
`npx @fabersep/atlas stats`. Add `--share` for a card with numbers only (no names, paths or code) that you can post.
|
|
118
|
+
|
|
119
|
+
**How do I remove it?**
|
|
120
|
+
Run `npx @fabersep/atlas init --undo`, then delete the `.faber-atlas/` folders in your projects.
|
|
121
|
+
|
|
122
|
+
**Something went wrong.**
|
|
123
|
+
Run `npx @fabersep/atlas doctor` first, then [open an issue](https://github.com/fabersep/atlas/issues).
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Going further
|
|
128
|
+
|
|
129
|
+
- **[CLI, MCP and library reference](docs/cli-reference.md):** every command and flag, where `init` writes for each tool, manual setup, the MCP tools.
|
|
130
|
+
- **[Scout guide](docs/scout-guide.md):** how the Scout works, choosing its model, the full benchmark.
|
|
131
|
+
- **[How this project is specified](docs/features/README.md):** [Master PRD](docs/master-prd.md), [architecture](docs/architecture.md) and feature specs.
|
|
132
|
+
- **[Roadmap](ROADMAP.md)**, **[Contributing](CONTRIBUTING.md)** and **[Changelog](CHANGELOG.md)**.
|
|
133
|
+
|
|
134
|
+
Works well with **[FaberSEP Spec](https://github.com/fabersep/spec)** (your assistant writes down what you mean before it builds) and **[FaberSEP Memory](https://github.com/fabersep/memory)** (it remembers the rules you approve, across tools). Each one also works on its own.
|
|
135
|
+
|
|
136
|
+
FaberSEP Atlas is part of [FaberSEP](https://github.com/fabersep), open-source tools that help AI coding assistants work with more discipline.
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
[Apache-2.0](LICENSE)
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { cleanTypeName, dedupeCalls, detectBoundary, isNoiseCall } from '../../src/packs/calls.js';
|
|
2
|
+
import { CONTAINER_KINDS, FUNCTION_KINDS } from '../../src/packs/symbols.js';
|
|
3
|
+
/** Static call and MediatR/async wiring extraction for C#. */
|
|
4
|
+
const MEDIATR_METHODS = new Set(['Send', 'Publish']);
|
|
5
|
+
const QUEUE_METHODS = new Set(['Enqueue', 'Schedule', 'QueueBackgroundWorkItem', 'SendMessageAsync']);
|
|
6
|
+
function extractPrimaryConstructorTypes(root, containers) {
|
|
7
|
+
const result = new Map();
|
|
8
|
+
for (const c of containers)
|
|
9
|
+
result.set(`${c.start}:${c.end}`, new Map());
|
|
10
|
+
const walk = (node) => {
|
|
11
|
+
if (node.type === 'class_declaration' || node.type === 'struct_declaration' || node.type === 'record_declaration') {
|
|
12
|
+
const map = result.get(`${node.startIndex}:${node.endIndex}`);
|
|
13
|
+
const params = node.childForFieldName('parameters');
|
|
14
|
+
if (map && params) {
|
|
15
|
+
for (const p of params.namedChildren) {
|
|
16
|
+
if (p?.type !== 'parameter')
|
|
17
|
+
continue;
|
|
18
|
+
const name = p.childForFieldName('name')?.text;
|
|
19
|
+
const type = cleanTypeName(p.childForFieldName('type')?.text);
|
|
20
|
+
if (name && type)
|
|
21
|
+
map.set(name, type);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
for (const ch of node.children)
|
|
26
|
+
if (ch)
|
|
27
|
+
walk(ch);
|
|
28
|
+
};
|
|
29
|
+
walk(root);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
function buildOwnerFieldTypes(items, root) {
|
|
33
|
+
const containers = items.filter((d) => CONTAINER_KINDS.has(d.kind));
|
|
34
|
+
const result = extractPrimaryConstructorTypes(root, containers);
|
|
35
|
+
for (const c of containers) {
|
|
36
|
+
const types = result.get(`${c.start}:${c.end}`) ?? new Map();
|
|
37
|
+
for (const m of items) {
|
|
38
|
+
if (m.start > c.start && m.end <= c.end && (m.kind === 'field' || m.kind === 'getter')) {
|
|
39
|
+
const t = cleanTypeName(m.type);
|
|
40
|
+
if (t)
|
|
41
|
+
types.set(m.name, t);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
result.set(`${c.start}:${c.end}`, types);
|
|
45
|
+
}
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
function enclosingContainer(item, containers) {
|
|
49
|
+
let best;
|
|
50
|
+
for (const c of containers) {
|
|
51
|
+
if (item.start > c.start && item.end <= c.end) {
|
|
52
|
+
if (!best || c.start > best.start)
|
|
53
|
+
best = c;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return best;
|
|
57
|
+
}
|
|
58
|
+
function firstNewObjectType(argsNode) {
|
|
59
|
+
const firstArg = argsNode?.namedChildren.find((c) => c?.type === 'argument');
|
|
60
|
+
const expr = firstArg?.namedChildren[firstArg.namedChildren.length - 1];
|
|
61
|
+
if (expr?.type === 'object_creation_expression') {
|
|
62
|
+
return cleanTypeName(expr.childForFieldName('type')?.text);
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
function extractCallsInRange(root, start, end, ownerName, fieldTypes) {
|
|
67
|
+
const sites = [];
|
|
68
|
+
const walk = (node) => {
|
|
69
|
+
if (node.endIndex <= start || node.startIndex >= end)
|
|
70
|
+
return;
|
|
71
|
+
if (node.type === 'invocation_expression' && node.startIndex >= start && node.endIndex <= end) {
|
|
72
|
+
const fn = node.childForFieldName('function');
|
|
73
|
+
const args = node.childForFieldName('arguments');
|
|
74
|
+
const line = node.startPosition.row + 1;
|
|
75
|
+
if (fn?.type === 'member_access_expression') {
|
|
76
|
+
const rawMethod = fn.childForFieldName('name')?.text ?? '';
|
|
77
|
+
const method = rawMethod.replace(/<.*$/s, '');
|
|
78
|
+
const expr = fn.childForFieldName('expression');
|
|
79
|
+
if (method && expr) {
|
|
80
|
+
let receiver;
|
|
81
|
+
let receiverType;
|
|
82
|
+
let isThisMember = false;
|
|
83
|
+
const callee = `${expr.text}.${method}`;
|
|
84
|
+
if (expr.type === 'this_expression' || expr.text === 'this') {
|
|
85
|
+
receiver = 'this';
|
|
86
|
+
receiverType = ownerName;
|
|
87
|
+
isThisMember = true;
|
|
88
|
+
}
|
|
89
|
+
else if (expr.type === 'member_access_expression' && (expr.childForFieldName('expression')?.text === 'this')) {
|
|
90
|
+
receiver = expr.childForFieldName('name')?.text;
|
|
91
|
+
receiverType = receiver ? fieldTypes.get(receiver) : undefined;
|
|
92
|
+
isThisMember = true;
|
|
93
|
+
}
|
|
94
|
+
else if (expr.type === 'identifier') {
|
|
95
|
+
receiver = expr.text;
|
|
96
|
+
receiverType = fieldTypes.get(receiver);
|
|
97
|
+
isThisMember = receiver.startsWith('_') || receiverType !== undefined;
|
|
98
|
+
}
|
|
99
|
+
else if (expr.type === 'member_access_expression') {
|
|
100
|
+
receiver = expr.childForFieldName('name')?.text;
|
|
101
|
+
receiverType = receiver ? fieldTypes.get(receiver) : undefined;
|
|
102
|
+
}
|
|
103
|
+
if (receiver && !isNoiseCall(receiver, receiverType, method, isThisMember)) {
|
|
104
|
+
let kind = 'calls';
|
|
105
|
+
let targetKey;
|
|
106
|
+
if (MEDIATR_METHODS.has(method) && /mediator|sender|publisher/i.test(receiverType ?? receiver)) {
|
|
107
|
+
const cmd = firstNewObjectType(args);
|
|
108
|
+
if (cmd) {
|
|
109
|
+
kind = 'sends';
|
|
110
|
+
targetKey = cmd;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
else if (QUEUE_METHODS.has(method)) {
|
|
114
|
+
const firstStr = args?.namedChildren[0]?.text.replace(/^@?"|"$/g, '');
|
|
115
|
+
if (firstStr && firstStr.length < 80) {
|
|
116
|
+
kind = 'queues';
|
|
117
|
+
targetKey = firstStr;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
const boundary = detectBoundary(kind, receiver, receiverType, method);
|
|
121
|
+
sites.push({
|
|
122
|
+
callee,
|
|
123
|
+
receiver,
|
|
124
|
+
...(receiverType ? { receiverType } : {}),
|
|
125
|
+
method,
|
|
126
|
+
line,
|
|
127
|
+
kind,
|
|
128
|
+
...(targetKey ? { targetKey } : {}),
|
|
129
|
+
...(boundary ? { boundary } : {}),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
else if (fn?.type === 'identifier' || fn?.type === 'generic_name') {
|
|
135
|
+
const method = fn.text.replace(/<.*$/s, '');
|
|
136
|
+
if (!isNoiseCall(undefined, undefined, method, false)) {
|
|
137
|
+
const boundary = detectBoundary('calls', undefined, undefined, method);
|
|
138
|
+
sites.push({
|
|
139
|
+
callee: method,
|
|
140
|
+
method,
|
|
141
|
+
line,
|
|
142
|
+
kind: 'calls',
|
|
143
|
+
...(boundary ? { boundary } : {}),
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
for (const c of node.children)
|
|
149
|
+
if (c)
|
|
150
|
+
walk(c);
|
|
151
|
+
};
|
|
152
|
+
walk(root);
|
|
153
|
+
return dedupeCalls(sites);
|
|
154
|
+
}
|
|
155
|
+
/** Attaches static `calls` sites to callable C# declarations. */
|
|
156
|
+
export function withCSharpCalls(items, root) {
|
|
157
|
+
const containers = items.filter((d) => CONTAINER_KINDS.has(d.kind));
|
|
158
|
+
const fieldTypeMaps = buildOwnerFieldTypes(items, root);
|
|
159
|
+
return items.map((item) => {
|
|
160
|
+
if (!FUNCTION_KINDS.has(item.kind))
|
|
161
|
+
return item;
|
|
162
|
+
const owner = enclosingContainer(item, containers);
|
|
163
|
+
const fieldTypes = owner ? (fieldTypeMaps.get(`${owner.start}:${owner.end}`) ?? new Map()) : new Map();
|
|
164
|
+
const calls = extractCallsInRange(root, item.start, item.end, owner?.name, fieldTypes);
|
|
165
|
+
return calls.length ? { ...item, calls } : item;
|
|
166
|
+
});
|
|
167
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Node } from 'web-tree-sitter';
|
|
2
|
+
import { type Declared } from '../../src/packs/symbols.js';
|
|
3
|
+
/** The declarations one captured node gives (a field declaration gives one per variable). */
|
|
4
|
+
export declare function describe(node: Node, source: string): Declared[];
|