sourcecode 0.10.0__tar.gz → 0.11.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.
- sourcecode-0.11.0/-o +296 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/PKG-INFO +1 -1
- {sourcecode-0.10.0 → sourcecode-0.11.0}/docs/schema.md +2 -2
- {sourcecode-0.10.0 → sourcecode-0.11.0}/pyproject.toml +1 -1
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/__init__.py +1 -1
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/cli.py +38 -7
- sourcecode-0.11.0/src/sourcecode/prepare_context.py +197 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/.gitignore +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/.ruff.toml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/README.md +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/architecture_summary.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/classifier.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/coverage_parser.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/dependency_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/__init__.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/base.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/dart.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/dotnet.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/elixir.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/go.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/heuristic.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/java.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/nodejs.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/parsers.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/php.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/project.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/python.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/ruby.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/rust.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/systems.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/terraform.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/detectors/tooling.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/doc_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/graph_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/metrics_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/redactor.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/scanner.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/schema.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/semantic_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/serializer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/summarizer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/tree_utils.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/src/sourcecode/workspace.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/__init__.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/conftest.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/coverage.xml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/fastapi_app/pyproject.toml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/fastapi_app/src/main.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/go_service/cmd/api/main.go +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/go_service/go.mod +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/jacoco.xml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/lcov.info +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/nextjs_app/app/page.tsx +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/nextjs_app/package.json +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/nextjs_app/pnpm-lock.yaml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/apps/web/app/page.tsx +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/apps/web/package.json +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/packages/api/main.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/packages/api/pyproject.toml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/pnpm-workspace.yaml +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_architecture_summary.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_classifier.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_cli.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_coverage_parser.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_dependency_analyzer_node_python.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_dependency_analyzer_polyglot.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_dependency_schema.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_go_rust_java.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_nodejs.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_php_ruby_dart.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_python.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_universal_managed.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detector_universal_systems.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_detectors_base.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_doc_analyzer_jsdom.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_doc_analyzer_python.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_graph_analyzer_polyglot.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_graph_analyzer_python_node.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_graph_schema.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_dependencies.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_detection.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_docs.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_graph_modules.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_lqn.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_metrics.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_multistack.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_semantics.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_integration_universal.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_metrics_analyzer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_packaging.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_real_projects.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_redactor.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_scanner.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_schema.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_semantic_analyzer_node.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_semantic_analyzer_python.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_semantic_import_resolution.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_semantic_schema.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_summarizer.py +0 -0
- {sourcecode-0.10.0 → sourcecode-0.11.0}/tests/test_workspace_analyzer.py +0 -0
sourcecode-0.11.0/-o
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"schema_version": "1.0",
|
|
4
|
+
"generated_at": "2026-04-14T20:22:58.957857+00:00",
|
|
5
|
+
"sourcecode_version": "0.11.0",
|
|
6
|
+
"analyzed_path": "/Users/user/Downloads/atlas-cli"
|
|
7
|
+
},
|
|
8
|
+
"file_tree": {
|
|
9
|
+
"pyproject.toml": null,
|
|
10
|
+
"README.md": null,
|
|
11
|
+
".gitignore": null,
|
|
12
|
+
".ruff.toml": null,
|
|
13
|
+
"tests": {
|
|
14
|
+
"test_detector_go_rust_java.py": null,
|
|
15
|
+
"test_integration_graph_modules.py": null,
|
|
16
|
+
"test_real_projects.py": null,
|
|
17
|
+
"conftest.py": null,
|
|
18
|
+
"test_detector_python.py": null,
|
|
19
|
+
"test_dependency_analyzer_polyglot.py": null,
|
|
20
|
+
"test_redactor.py": null,
|
|
21
|
+
"test_semantic_schema.py": null,
|
|
22
|
+
"test_integration_detection.py": null,
|
|
23
|
+
"test_dependency_schema.py": null,
|
|
24
|
+
"test_packaging.py": null,
|
|
25
|
+
"test_semantic_analyzer_node.py": null,
|
|
26
|
+
"test_integration_docs.py": null,
|
|
27
|
+
"test_coverage_parser.py": null,
|
|
28
|
+
"test_scanner.py": null,
|
|
29
|
+
"test_detector_universal_systems.py": null,
|
|
30
|
+
"test_integration_semantics.py": null,
|
|
31
|
+
"test_summarizer.py": null,
|
|
32
|
+
"__init__.py": null,
|
|
33
|
+
"test_detector_php_ruby_dart.py": null,
|
|
34
|
+
"test_integration_multistack.py": null,
|
|
35
|
+
"test_dependency_analyzer_node_python.py": null,
|
|
36
|
+
"test_architecture_summary.py": null,
|
|
37
|
+
"test_schema.py": null,
|
|
38
|
+
"test_integration_dependencies.py": null,
|
|
39
|
+
"test_workspace_analyzer.py": null,
|
|
40
|
+
"test_integration_lqn.py": null,
|
|
41
|
+
"test_doc_analyzer_jsdom.py": null,
|
|
42
|
+
"test_integration_metrics.py": null,
|
|
43
|
+
"test_semantic_analyzer_python.py": null,
|
|
44
|
+
"test_graph_analyzer_python_node.py": null,
|
|
45
|
+
"test_graph_analyzer_polyglot.py": null,
|
|
46
|
+
"test_metrics_analyzer.py": null,
|
|
47
|
+
"test_integration.py": null,
|
|
48
|
+
"test_semantic_import_resolution.py": null,
|
|
49
|
+
"test_detector_universal_managed.py": null,
|
|
50
|
+
"test_cli.py": null,
|
|
51
|
+
"test_graph_schema.py": null,
|
|
52
|
+
"test_detector_nodejs.py": null,
|
|
53
|
+
"test_detectors_base.py": null,
|
|
54
|
+
"test_doc_analyzer_python.py": null,
|
|
55
|
+
"test_classifier.py": null,
|
|
56
|
+
"test_integration_universal.py": null,
|
|
57
|
+
"fixtures": {
|
|
58
|
+
"lcov.info": null,
|
|
59
|
+
"coverage.xml": null,
|
|
60
|
+
"jacoco.xml": null,
|
|
61
|
+
"pnpm_monorepo": {
|
|
62
|
+
"pnpm-workspace.yaml": null,
|
|
63
|
+
"packages": {},
|
|
64
|
+
"apps": {}
|
|
65
|
+
},
|
|
66
|
+
"fastapi_app": {
|
|
67
|
+
"pyproject.toml": null,
|
|
68
|
+
"src": {}
|
|
69
|
+
},
|
|
70
|
+
"nextjs_app": {
|
|
71
|
+
"pnpm-lock.yaml": null,
|
|
72
|
+
"package.json": null,
|
|
73
|
+
"app": {}
|
|
74
|
+
},
|
|
75
|
+
"go_service": {
|
|
76
|
+
"go.mod": null,
|
|
77
|
+
"cmd": {}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"docs": {
|
|
82
|
+
"schema.md": null
|
|
83
|
+
},
|
|
84
|
+
"src": {
|
|
85
|
+
"sourcecode": {
|
|
86
|
+
"scanner.py": null,
|
|
87
|
+
"semantic_analyzer.py": null,
|
|
88
|
+
"classifier.py": null,
|
|
89
|
+
"doc_analyzer.py": null,
|
|
90
|
+
"redactor.py": null,
|
|
91
|
+
"dependency_analyzer.py": null,
|
|
92
|
+
"__init__.py": null,
|
|
93
|
+
"metrics_analyzer.py": null,
|
|
94
|
+
"cli.py": null,
|
|
95
|
+
"coverage_parser.py": null,
|
|
96
|
+
"tree_utils.py": null,
|
|
97
|
+
"serializer.py": null,
|
|
98
|
+
"summarizer.py": null,
|
|
99
|
+
"workspace.py": null,
|
|
100
|
+
"graph_analyzer.py": null,
|
|
101
|
+
"architecture_summary.py": null,
|
|
102
|
+
"schema.py": null,
|
|
103
|
+
"detectors": {
|
|
104
|
+
"java.py": null,
|
|
105
|
+
"systems.py": null,
|
|
106
|
+
"terraform.py": null,
|
|
107
|
+
"nodejs.py": null,
|
|
108
|
+
"__init__.py": null,
|
|
109
|
+
"ruby.py": null,
|
|
110
|
+
"dart.py": null,
|
|
111
|
+
"parsers.py": null,
|
|
112
|
+
"elixir.py": null,
|
|
113
|
+
"python.py": null,
|
|
114
|
+
"tooling.py": null,
|
|
115
|
+
"go.py": null,
|
|
116
|
+
"php.py": null,
|
|
117
|
+
"dotnet.py": null,
|
|
118
|
+
"jvm_ext.py": null,
|
|
119
|
+
"base.py": null,
|
|
120
|
+
"project.py": null,
|
|
121
|
+
"heuristic.py": null,
|
|
122
|
+
"rust.py": null
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"stacks": [
|
|
128
|
+
{
|
|
129
|
+
"stack": "python",
|
|
130
|
+
"detection_method": "manifest",
|
|
131
|
+
"confidence": "high",
|
|
132
|
+
"frameworks": [
|
|
133
|
+
{
|
|
134
|
+
"name": "Typer",
|
|
135
|
+
"source": "manifest"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"package_manager": "pip",
|
|
139
|
+
"manifests": [
|
|
140
|
+
"pyproject.toml"
|
|
141
|
+
],
|
|
142
|
+
"primary": false,
|
|
143
|
+
"root": ".",
|
|
144
|
+
"workspace": null,
|
|
145
|
+
"signals": [
|
|
146
|
+
"manifest:pyproject.toml",
|
|
147
|
+
"framework:Typer",
|
|
148
|
+
"package_manager:pip",
|
|
149
|
+
"extensions:79"
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"stack": "nodejs",
|
|
154
|
+
"detection_method": "manifest",
|
|
155
|
+
"confidence": "medium",
|
|
156
|
+
"frameworks": [],
|
|
157
|
+
"package_manager": null,
|
|
158
|
+
"manifests": [
|
|
159
|
+
"package.json"
|
|
160
|
+
],
|
|
161
|
+
"primary": true,
|
|
162
|
+
"root": ".claude",
|
|
163
|
+
"workspace": ".claude",
|
|
164
|
+
"signals": [
|
|
165
|
+
"manifest:package.json",
|
|
166
|
+
"extensions:6"
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
"project_type": "fullstack",
|
|
171
|
+
"entry_points": [],
|
|
172
|
+
"dependencies": [],
|
|
173
|
+
"dependency_summary": null,
|
|
174
|
+
"module_graph": null,
|
|
175
|
+
"module_graph_summary": null,
|
|
176
|
+
"docs": [],
|
|
177
|
+
"doc_summary": null,
|
|
178
|
+
"file_paths": [
|
|
179
|
+
"pyproject.toml",
|
|
180
|
+
"README.md",
|
|
181
|
+
".gitignore",
|
|
182
|
+
".ruff.toml",
|
|
183
|
+
"tests",
|
|
184
|
+
"tests/test_detector_go_rust_java.py",
|
|
185
|
+
"tests/test_integration_graph_modules.py",
|
|
186
|
+
"tests/test_real_projects.py",
|
|
187
|
+
"tests/conftest.py",
|
|
188
|
+
"tests/test_detector_python.py",
|
|
189
|
+
"tests/test_dependency_analyzer_polyglot.py",
|
|
190
|
+
"tests/test_redactor.py",
|
|
191
|
+
"tests/test_semantic_schema.py",
|
|
192
|
+
"tests/test_integration_detection.py",
|
|
193
|
+
"tests/test_dependency_schema.py",
|
|
194
|
+
"tests/test_packaging.py",
|
|
195
|
+
"tests/test_semantic_analyzer_node.py",
|
|
196
|
+
"tests/test_integration_docs.py",
|
|
197
|
+
"tests/test_coverage_parser.py",
|
|
198
|
+
"tests/test_scanner.py",
|
|
199
|
+
"tests/test_detector_universal_systems.py",
|
|
200
|
+
"tests/test_integration_semantics.py",
|
|
201
|
+
"tests/test_summarizer.py",
|
|
202
|
+
"tests/__init__.py",
|
|
203
|
+
"tests/test_detector_php_ruby_dart.py",
|
|
204
|
+
"tests/test_integration_multistack.py",
|
|
205
|
+
"tests/test_dependency_analyzer_node_python.py",
|
|
206
|
+
"tests/test_architecture_summary.py",
|
|
207
|
+
"tests/test_schema.py",
|
|
208
|
+
"tests/test_integration_dependencies.py",
|
|
209
|
+
"tests/test_workspace_analyzer.py",
|
|
210
|
+
"tests/test_integration_lqn.py",
|
|
211
|
+
"tests/test_doc_analyzer_jsdom.py",
|
|
212
|
+
"tests/test_integration_metrics.py",
|
|
213
|
+
"tests/test_semantic_analyzer_python.py",
|
|
214
|
+
"tests/test_graph_analyzer_python_node.py",
|
|
215
|
+
"tests/test_graph_analyzer_polyglot.py",
|
|
216
|
+
"tests/test_metrics_analyzer.py",
|
|
217
|
+
"tests/test_integration.py",
|
|
218
|
+
"tests/test_semantic_import_resolution.py",
|
|
219
|
+
"tests/test_detector_universal_managed.py",
|
|
220
|
+
"tests/test_cli.py",
|
|
221
|
+
"tests/test_graph_schema.py",
|
|
222
|
+
"tests/test_detector_nodejs.py",
|
|
223
|
+
"tests/test_detectors_base.py",
|
|
224
|
+
"tests/test_doc_analyzer_python.py",
|
|
225
|
+
"tests/test_classifier.py",
|
|
226
|
+
"tests/test_integration_universal.py",
|
|
227
|
+
"tests/fixtures",
|
|
228
|
+
"tests/fixtures/lcov.info",
|
|
229
|
+
"tests/fixtures/coverage.xml",
|
|
230
|
+
"tests/fixtures/jacoco.xml",
|
|
231
|
+
"tests/fixtures/pnpm_monorepo",
|
|
232
|
+
"tests/fixtures/pnpm_monorepo/pnpm-workspace.yaml",
|
|
233
|
+
"tests/fixtures/pnpm_monorepo/packages",
|
|
234
|
+
"tests/fixtures/pnpm_monorepo/apps",
|
|
235
|
+
"tests/fixtures/fastapi_app",
|
|
236
|
+
"tests/fixtures/fastapi_app/pyproject.toml",
|
|
237
|
+
"tests/fixtures/fastapi_app/src",
|
|
238
|
+
"tests/fixtures/nextjs_app",
|
|
239
|
+
"tests/fixtures/nextjs_app/pnpm-lock.yaml",
|
|
240
|
+
"tests/fixtures/nextjs_app/package.json",
|
|
241
|
+
"tests/fixtures/nextjs_app/app",
|
|
242
|
+
"tests/fixtures/go_service",
|
|
243
|
+
"tests/fixtures/go_service/go.mod",
|
|
244
|
+
"tests/fixtures/go_service/cmd",
|
|
245
|
+
"docs",
|
|
246
|
+
"docs/schema.md",
|
|
247
|
+
"src",
|
|
248
|
+
"src/sourcecode",
|
|
249
|
+
"src/sourcecode/scanner.py",
|
|
250
|
+
"src/sourcecode/semantic_analyzer.py",
|
|
251
|
+
"src/sourcecode/classifier.py",
|
|
252
|
+
"src/sourcecode/doc_analyzer.py",
|
|
253
|
+
"src/sourcecode/redactor.py",
|
|
254
|
+
"src/sourcecode/dependency_analyzer.py",
|
|
255
|
+
"src/sourcecode/__init__.py",
|
|
256
|
+
"src/sourcecode/metrics_analyzer.py",
|
|
257
|
+
"src/sourcecode/cli.py",
|
|
258
|
+
"src/sourcecode/coverage_parser.py",
|
|
259
|
+
"src/sourcecode/tree_utils.py",
|
|
260
|
+
"src/sourcecode/serializer.py",
|
|
261
|
+
"src/sourcecode/summarizer.py",
|
|
262
|
+
"src/sourcecode/workspace.py",
|
|
263
|
+
"src/sourcecode/graph_analyzer.py",
|
|
264
|
+
"src/sourcecode/architecture_summary.py",
|
|
265
|
+
"src/sourcecode/schema.py",
|
|
266
|
+
"src/sourcecode/detectors",
|
|
267
|
+
"src/sourcecode/detectors/java.py",
|
|
268
|
+
"src/sourcecode/detectors/systems.py",
|
|
269
|
+
"src/sourcecode/detectors/terraform.py",
|
|
270
|
+
"src/sourcecode/detectors/nodejs.py",
|
|
271
|
+
"src/sourcecode/detectors/__init__.py",
|
|
272
|
+
"src/sourcecode/detectors/ruby.py",
|
|
273
|
+
"src/sourcecode/detectors/dart.py",
|
|
274
|
+
"src/sourcecode/detectors/parsers.py",
|
|
275
|
+
"src/sourcecode/detectors/elixir.py",
|
|
276
|
+
"src/sourcecode/detectors/python.py",
|
|
277
|
+
"src/sourcecode/detectors/tooling.py",
|
|
278
|
+
"src/sourcecode/detectors/go.py",
|
|
279
|
+
"src/sourcecode/detectors/php.py",
|
|
280
|
+
"src/sourcecode/detectors/dotnet.py",
|
|
281
|
+
"src/sourcecode/detectors/jvm_ext.py",
|
|
282
|
+
"src/sourcecode/detectors/base.py",
|
|
283
|
+
"src/sourcecode/detectors/project.py",
|
|
284
|
+
"src/sourcecode/detectors/heuristic.py",
|
|
285
|
+
"src/sourcecode/detectors/rust.py"
|
|
286
|
+
],
|
|
287
|
+
"project_summary": "Genera un mapa de contexto estructurado de proyectos de software para agentes IA. Stack principal: Python (Typer).",
|
|
288
|
+
"architecture_summary": "Entry point principal: src/sourcecode/cli.py expone la CLI del proyecto.\nOrquesta modulos internos: dependency_analyzer, detectors, doc_analyzer, graph_analyzer, metrics_analyzer, redactor, scanner, schema.\nActiva analisis opcionales: DependencyAnalyzer (--dependencies), GraphAnalyzer (--graph-modules), DocAnalyzer (--docs), MetricsAnalyzer (--full-metrics), SemanticAnalyzer (--semantics).\nProduce un SourceMap serializado en JSON/YAML y una vista compacta con redaccion de secretos.",
|
|
289
|
+
"key_dependencies": [],
|
|
290
|
+
"file_metrics": [],
|
|
291
|
+
"metrics_summary": null,
|
|
292
|
+
"semantic_calls": [],
|
|
293
|
+
"semantic_symbols": [],
|
|
294
|
+
"semantic_links": [],
|
|
295
|
+
"semantic_summary": null
|
|
296
|
+
}
|
|
@@ -63,7 +63,7 @@ Campos:
|
|
|
63
63
|
{
|
|
64
64
|
"schema_version": "1.0",
|
|
65
65
|
"generated_at": "2026-04-07T19:41:05.686277+00:00",
|
|
66
|
-
"sourcecode_version": "0.
|
|
66
|
+
"sourcecode_version": "0.11.0",
|
|
67
67
|
"analyzed_path": "/abs/path/to/project"
|
|
68
68
|
}
|
|
69
69
|
```
|
|
@@ -583,7 +583,7 @@ Ejemplo de salida para un monorepo con web Node.js y API Python con `--dependenc
|
|
|
583
583
|
"metadata": {
|
|
584
584
|
"schema_version": "1.0",
|
|
585
585
|
"generated_at": "2026-04-07T19:41:05.686277+00:00",
|
|
586
|
-
"sourcecode_version": "0.
|
|
586
|
+
"sourcecode_version": "0.11.0",
|
|
587
587
|
"analyzed_path": "/abs/path/to/project"
|
|
588
588
|
},
|
|
589
589
|
"file_tree": {
|
|
@@ -473,10 +473,10 @@ def main(
|
|
|
473
473
|
semantic_summary=sem_sum,
|
|
474
474
|
)
|
|
475
475
|
|
|
476
|
-
# Phase 9: LLM Output Quality — poblar campos derivados
|
|
477
|
-
from sourcecode.architecture_summary import ArchitectureSummarizer
|
|
478
|
-
from sourcecode.summarizer import ProjectSummarizer
|
|
479
|
-
from sourcecode.tree_utils import flatten_file_tree
|
|
476
|
+
# Phase 9: LLM Output Quality — poblar campos derivados
|
|
477
|
+
from sourcecode.architecture_summary import ArchitectureSummarizer
|
|
478
|
+
from sourcecode.summarizer import ProjectSummarizer
|
|
479
|
+
from sourcecode.tree_utils import flatten_file_tree
|
|
480
480
|
|
|
481
481
|
# LQN-01: lista plana de paths del file_tree con separador forward-slash
|
|
482
482
|
sm.file_paths = [
|
|
@@ -496,9 +496,9 @@ def main(
|
|
|
496
496
|
|
|
497
497
|
sm.key_dependencies = sorted(direct_deps, key=_dep_sort_key)[:15]
|
|
498
498
|
|
|
499
|
-
# LQN-02: resumen NL deterministico
|
|
500
|
-
sm.project_summary = ProjectSummarizer(target).generate(sm)
|
|
501
|
-
sm.architecture_summary = ArchitectureSummarizer(target).generate(sm)
|
|
499
|
+
# LQN-02: resumen NL deterministico
|
|
500
|
+
sm.project_summary = ProjectSummarizer(target).generate(sm)
|
|
501
|
+
sm.architecture_summary = ArchitectureSummarizer(target).generate(sm)
|
|
502
502
|
|
|
503
503
|
# 4. Serializar (con o sin modo compact)
|
|
504
504
|
if compact:
|
|
@@ -535,3 +535,34 @@ def main(
|
|
|
535
535
|
|
|
536
536
|
# 5. Escribir output (CLI-04)
|
|
537
537
|
write_output(content, output=output)
|
|
538
|
+
|
|
539
|
+
from sourcecode.prepare_context import ContextBuilder
|
|
540
|
+
|
|
541
|
+
@app.command("prepare-context")
|
|
542
|
+
def prepare_context_cmd(
|
|
543
|
+
task: str = typer.Argument(..., help="Descripción de la tarea"),
|
|
544
|
+
path: Path = typer.Option(".", help="Directorio del proyecto"),
|
|
545
|
+
):
|
|
546
|
+
"""
|
|
547
|
+
Prepara contexto mínimo optimizado para que un LLM modifique el código.
|
|
548
|
+
"""
|
|
549
|
+
target = path.resolve()
|
|
550
|
+
|
|
551
|
+
if not target.exists() or not target.is_dir():
|
|
552
|
+
typer.echo(f"Error: '{target}' no es un directorio válido.", err=True)
|
|
553
|
+
raise typer.Exit(code=1)
|
|
554
|
+
|
|
555
|
+
builder = ContextBuilder(target)
|
|
556
|
+
result = builder.prepare(task)
|
|
557
|
+
|
|
558
|
+
output = {
|
|
559
|
+
"task": result.task,
|
|
560
|
+
"entry_points": result.entry_points,
|
|
561
|
+
"relevant_files": [f.__dict__ for f in result.relevant_files],
|
|
562
|
+
"call_flow": result.call_flow,
|
|
563
|
+
"snippets": [s.__dict__ for s in result.snippets],
|
|
564
|
+
"tests": result.tests,
|
|
565
|
+
"notes": result.notes,
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
typer.echo(json.dumps(output, indent=2, ensure_ascii=False))
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Any, Dict, List, Optional
|
|
6
|
+
|
|
7
|
+
from sourcecode.semantic_analyzer import SemanticAnalyzer
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# =========================
|
|
11
|
+
# Output schema (simple)
|
|
12
|
+
# =========================
|
|
13
|
+
|
|
14
|
+
@dataclass
|
|
15
|
+
class ContextSnippet:
|
|
16
|
+
file: str
|
|
17
|
+
symbol: str
|
|
18
|
+
code: str
|
|
19
|
+
reason: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
@dataclass
|
|
23
|
+
class ContextFile:
|
|
24
|
+
path: str
|
|
25
|
+
role: str
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dataclass
|
|
29
|
+
class ContextResult:
|
|
30
|
+
task: str
|
|
31
|
+
entry_points: List[Dict[str, str]]
|
|
32
|
+
relevant_files: List[ContextFile]
|
|
33
|
+
call_flow: List[Dict[str, Any]]
|
|
34
|
+
snippets: List[ContextSnippet]
|
|
35
|
+
tests: List[Dict[str, str]]
|
|
36
|
+
notes: List[str]
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# =========================
|
|
40
|
+
# Core Builder
|
|
41
|
+
# =========================
|
|
42
|
+
|
|
43
|
+
class ContextBuilder:
|
|
44
|
+
def __init__(self, root: Path) -> None:
|
|
45
|
+
self.root = root
|
|
46
|
+
self.analyzer = SemanticAnalyzer(root)
|
|
47
|
+
|
|
48
|
+
# -------------------------
|
|
49
|
+
# Public API
|
|
50
|
+
# -------------------------
|
|
51
|
+
|
|
52
|
+
def prepare(self, task: str) -> ContextResult:
|
|
53
|
+
"""
|
|
54
|
+
Entry point principal.
|
|
55
|
+
"""
|
|
56
|
+
semantic = self.analyzer.analyze()
|
|
57
|
+
|
|
58
|
+
entry_points = self._detect_entrypoints(semantic)
|
|
59
|
+
relevant_files = self._select_relevant_files(task, entry_points)
|
|
60
|
+
snippets = self._extract_snippets(relevant_files)
|
|
61
|
+
tests = self._find_related_tests(relevant_files)
|
|
62
|
+
call_flow = self._build_call_flow(entry_points)
|
|
63
|
+
|
|
64
|
+
notes = self._generate_notes(task)
|
|
65
|
+
|
|
66
|
+
return ContextResult(
|
|
67
|
+
task=task,
|
|
68
|
+
entry_points=entry_points,
|
|
69
|
+
relevant_files=relevant_files,
|
|
70
|
+
call_flow=call_flow,
|
|
71
|
+
snippets=snippets,
|
|
72
|
+
tests=tests,
|
|
73
|
+
notes=notes,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
# -------------------------
|
|
77
|
+
# Heurísticas básicas
|
|
78
|
+
# -------------------------
|
|
79
|
+
|
|
80
|
+
def _detect_entrypoints(self, semantic: Any) -> List[Dict[str, str]]:
|
|
81
|
+
"""
|
|
82
|
+
MVP: detecta cli.py o main functions
|
|
83
|
+
"""
|
|
84
|
+
entrypoints: List[Dict[str, str]] = []
|
|
85
|
+
|
|
86
|
+
for path in semantic.file_paths:
|
|
87
|
+
if path.endswith("cli.py") or path.endswith("__main__.py"):
|
|
88
|
+
entrypoints.append({
|
|
89
|
+
"file": path,
|
|
90
|
+
"symbol": "main",
|
|
91
|
+
"reason": "CLI entrypoint"
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
return entrypoints
|
|
95
|
+
|
|
96
|
+
def _select_relevant_files(
|
|
97
|
+
self,
|
|
98
|
+
task: str,
|
|
99
|
+
entry_points: List[Dict[str, str]],
|
|
100
|
+
) -> List[ContextFile]:
|
|
101
|
+
"""
|
|
102
|
+
Heurística simple:
|
|
103
|
+
- incluir entrypoints
|
|
104
|
+
- incluir archivos con palabras clave del task
|
|
105
|
+
"""
|
|
106
|
+
files: List[ContextFile] = []
|
|
107
|
+
|
|
108
|
+
for ep in entry_points:
|
|
109
|
+
files.append(ContextFile(path=ep["file"], role="entrypoint"))
|
|
110
|
+
|
|
111
|
+
keywords = task.lower().split()
|
|
112
|
+
|
|
113
|
+
for path in self.analyzer.scan.file_paths: # fallback simple
|
|
114
|
+
if any(k in path.lower() for k in keywords):
|
|
115
|
+
files.append(ContextFile(path=path, role="matched"))
|
|
116
|
+
|
|
117
|
+
# deduplicar
|
|
118
|
+
seen = set()
|
|
119
|
+
unique = []
|
|
120
|
+
for f in files:
|
|
121
|
+
if f.path not in seen:
|
|
122
|
+
seen.add(f.path)
|
|
123
|
+
unique.append(f)
|
|
124
|
+
|
|
125
|
+
return unique[:8]
|
|
126
|
+
|
|
127
|
+
def _extract_snippets(self, files: List[ContextFile]) -> List[ContextSnippet]:
|
|
128
|
+
"""
|
|
129
|
+
Extrae primeras ~30 líneas como snippet simple.
|
|
130
|
+
"""
|
|
131
|
+
snippets: List[ContextSnippet] = []
|
|
132
|
+
|
|
133
|
+
for f in files:
|
|
134
|
+
abs_path = self.root / f.path
|
|
135
|
+
if not abs_path.exists():
|
|
136
|
+
continue
|
|
137
|
+
|
|
138
|
+
try:
|
|
139
|
+
content = abs_path.read_text(encoding="utf-8", errors="ignore")
|
|
140
|
+
except Exception:
|
|
141
|
+
continue
|
|
142
|
+
|
|
143
|
+
snippet = "\n".join(content.splitlines()[:30])
|
|
144
|
+
|
|
145
|
+
snippets.append(ContextSnippet(
|
|
146
|
+
file=f.path,
|
|
147
|
+
symbol="module",
|
|
148
|
+
code=snippet,
|
|
149
|
+
reason=f"contenido inicial de {f.role}"
|
|
150
|
+
))
|
|
151
|
+
|
|
152
|
+
return snippets[:12]
|
|
153
|
+
|
|
154
|
+
def _find_related_tests(self, files: List[ContextFile]) -> List[Dict[str, str]]:
|
|
155
|
+
"""
|
|
156
|
+
Busca tests por naming convention.
|
|
157
|
+
"""
|
|
158
|
+
tests: List[Dict[str, str]] = []
|
|
159
|
+
|
|
160
|
+
for f in files:
|
|
161
|
+
name = Path(f.path).name
|
|
162
|
+
test_name = f"test_{name}"
|
|
163
|
+
|
|
164
|
+
test_path = self.root / "tests" / test_name
|
|
165
|
+
if test_path.exists():
|
|
166
|
+
tests.append({
|
|
167
|
+
"file": f"tests/{test_name}",
|
|
168
|
+
"reason": "posible test relacionado"
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
return tests
|
|
172
|
+
|
|
173
|
+
def _build_call_flow(self, entry_points: List[Dict[str, str]]) -> List[Dict[str, Any]]:
|
|
174
|
+
"""
|
|
175
|
+
MVP: placeholder (hasta que uses call graph real)
|
|
176
|
+
"""
|
|
177
|
+
flow: List[Dict[str, Any]] = []
|
|
178
|
+
|
|
179
|
+
for ep in entry_points:
|
|
180
|
+
flow.append({
|
|
181
|
+
"from": ep["symbol"],
|
|
182
|
+
"to": ["unknown"]
|
|
183
|
+
})
|
|
184
|
+
|
|
185
|
+
return flow
|
|
186
|
+
|
|
187
|
+
def _generate_notes(self, task: str) -> List[str]:
|
|
188
|
+
notes: List[str] = []
|
|
189
|
+
|
|
190
|
+
if "flag" in task or "--" in task:
|
|
191
|
+
notes.append("probablemente necesitas modificar argumentos CLI")
|
|
192
|
+
if "test" in task:
|
|
193
|
+
notes.append("asegúrate de actualizar tests relacionados")
|
|
194
|
+
if "refactor" in task:
|
|
195
|
+
notes.append("mantener compatibilidad hacia atrás")
|
|
196
|
+
|
|
197
|
+
return notes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sourcecode-0.10.0 → sourcecode-0.11.0}/tests/fixtures/pnpm_monorepo/packages/api/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|