sourcecode 1.35.33__tar.gz → 1.35.35__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-1.35.33 → sourcecode-1.35.35}/PKG-INFO +182 -13
- {sourcecode-1.35.33 → sourcecode-1.35.35}/README.md +181 -12
- {sourcecode-1.35.33 → sourcecode-1.35.35}/pyproject.toml +1 -1
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/__init__.py +1 -1
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/cli.py +311 -368
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/java.py +30 -1
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/explain.py +3 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/license.py +122 -26
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/prepare_context.py +9 -2
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/rename_refactor.py +15 -2
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/repository_ir.py +32 -7
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/serializer.py +9 -7
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_findings.py +1 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/.github/workflows/build-windows.yml +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/.gitignore +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/.ruff.toml +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/CHANGELOG.md +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/CONTRIBUTING.md +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/LICENSE +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/SECURITY.md +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/raw +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/adaptive_scanner.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/architecture_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/architecture_summary.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/ast_extractor.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/cache.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/canonical_ir.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/cir_graphs.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/classifier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/code_notes_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/confidence_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/context_scorer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/context_summarizer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/contract_model.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/contract_pipeline.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/coverage_parser.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/dependency_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/__init__.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/base.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/csproj_parser.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/dart.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/dotnet.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/elixir.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/go.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/heuristic.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/hybrid.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/jvm_ext.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/nodejs.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/parsers.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/php.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/project.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/python.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/ruby.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/rust.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/systems.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/terraform.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/detectors/tooling.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/doc_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/entrypoint_classifier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/env_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/error_schema.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/file_chunker.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/file_classifier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/flow_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/fqn_utils.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/git_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/graph_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/__init__.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/onboarding/applier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/onboarding/backup.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/onboarding/detector.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/onboarding/planner.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/orchestrator.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/registry.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/runner.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp/server.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/mcp_nudge.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/metrics_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/migrate_check.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/output_budget.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/path_filters.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/pr_comment_renderer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/pr_impact.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/progress.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/ranking_engine.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/redactor.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/relevance_scorer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/repo_classifier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/ris.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/runtime_classifier.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/scanner.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/schema.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/semantic_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_event_topology.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_impact.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_model.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_security_audit.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_semantic.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/spring_tx_analyzer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/summarizer.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/__init__.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/config.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/consent.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/events.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/filters.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/telemetry/transport.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/tree_utils.py +0 -0
- {sourcecode-1.35.33 → sourcecode-1.35.35}/src/sourcecode/workspace.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version: 1.35.
|
|
3
|
+
Version: 1.35.35
|
|
4
4
|
Summary: Persistent structural context and ultra-fast repeated analysis for AI coding agents
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Keywords: agents,ai,codebase,context,developer-tools,llm
|
|
@@ -40,7 +40,7 @@ Description-Content-Type: text/markdown
|
|
|
40
40
|
|
|
41
41
|
**Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
|
|
42
42
|
|
|
43
|
-

|
|
44
44
|

|
|
45
45
|
|
|
46
46
|
---
|
|
@@ -114,9 +114,7 @@ pipx install sourcecode
|
|
|
114
114
|
|
|
115
115
|
```bash
|
|
116
116
|
sourcecode version
|
|
117
|
-
# sourcecode 1.35.
|
|
118
|
-
|
|
119
|
-
**v1.35.28** — 7 bug fixes: `rename-class` cross-package disambiguation (BUG-4), `rename-class` collision detection (BUG-2), `find_java_files` false positive on `com/test/` package paths (BUG-1), `cold-start --compact` correct key names (BUG-6), `@EnableMethodSecurity` no longer suppresses SEC-001 (BUG-3), `explain` @Entity stereotype detection (BUG-5), XML+annotation mixed security retagging (BUG-7).
|
|
117
|
+
# sourcecode 1.35.35
|
|
120
118
|
```
|
|
121
119
|
|
|
122
120
|
---
|
|
@@ -136,6 +134,9 @@ sourcecode --agent
|
|
|
136
134
|
# Blast radius: what breaks if this class changes?
|
|
137
135
|
sourcecode impact OrderService /path/to/repo
|
|
138
136
|
|
|
137
|
+
# Spring Boot 2→3 migration readiness: javax→jakarta blockers, removed APIs
|
|
138
|
+
sourcecode migrate-check /path/to/repo
|
|
139
|
+
|
|
139
140
|
# Spring semantic audit: TX anomalies + security surface (free)
|
|
140
141
|
sourcecode spring-audit /path/to/repo
|
|
141
142
|
|
|
@@ -180,6 +181,9 @@ sourcecode cache warm
|
|
|
180
181
|
|
|
181
182
|
# Clear cache
|
|
182
183
|
sourcecode cache clear
|
|
184
|
+
|
|
185
|
+
# Check RIS freshness relative to current git HEAD
|
|
186
|
+
sourcecode cache freshness
|
|
183
187
|
```
|
|
184
188
|
|
|
185
189
|
**`--no-cache`** bypasses both layers and forces a fresh scan. Use in CI or when you need to verify a fresh result.
|
|
@@ -286,6 +290,35 @@ Specifically:
|
|
|
286
290
|
|
|
287
291
|
---
|
|
288
292
|
|
|
293
|
+
## Pricing
|
|
294
|
+
|
|
295
|
+
Two tiers. **Gating is by repo size and automation — never by command.** Every
|
|
296
|
+
command runs at full power on Free for small and mid-size repos. You upgrade
|
|
297
|
+
when the work gets bigger or automated.
|
|
298
|
+
|
|
299
|
+
| | **Free** — €0 | **Pro** — €19/mo · €190/yr per dev |
|
|
300
|
+
|---|---|---|
|
|
301
|
+
| Repo size | ≤ 500 Java source files | **> 500 Java files** (enterprise monoliths) |
|
|
302
|
+
| Commands | All of them, full output | Same commands, unlocked at scale |
|
|
303
|
+
| `impact` / `fix-bug` / `review-pr` / `modernize` | ✅ full on small repos | ✅ full on large repos (Free gets a capped preview) |
|
|
304
|
+
| `--full`, git-churn ranking, uncapped graph/semantic | ✅ on small repos | ✅ on large repos |
|
|
305
|
+
| `prepare-context delta` | 30 free runs/repo | unlimited — CI/CD automation |
|
|
306
|
+
| `prepare-context generate-tests` | small repos | large repos |
|
|
307
|
+
| MCP local server (`mcp serve`) | ✅ | ✅ |
|
|
308
|
+
| Offline, no data egress, no account | ✅ | ✅ |
|
|
309
|
+
|
|
310
|
+
**Non-Java repos are free at any size** — the size limit counts Java source
|
|
311
|
+
files only, by design. sourcecode monetises enterprise Java monoliths.
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
sourcecode auth login # browser device-code auth
|
|
315
|
+
sourcecode activate <key> # or activate a license key directly
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Full breakdown: [docs/PRODUCT_TIERS.md](docs/PRODUCT_TIERS.md).
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
289
322
|
## Command reference
|
|
290
323
|
|
|
291
324
|
### `--compact` and `--agent`
|
|
@@ -297,7 +330,7 @@ Core flags. Feed directly to AI agents as first-message context.
|
|
|
297
330
|
| `--compact` | High-signal summary: stacks, entry points, dependencies, confidence, gaps | ~2,500–4,000 |
|
|
298
331
|
| `--agent` | Structured JSON: identity, entry points, architecture, event flows | ~4,500–5,500 |
|
|
299
332
|
|
|
300
|
-
### `impact` — blast-radius analysis
|
|
333
|
+
### `impact` — blast-radius analysis [free ≤500 Java files · Pro above]
|
|
301
334
|
|
|
302
335
|
```bash
|
|
303
336
|
sourcecode impact ClassName /path/to/repo
|
|
@@ -337,9 +370,14 @@ Extracts all Spring MVC (`@GetMapping`, `@PostMapping`, `@RequestMapping`, etc.)
|
|
|
337
370
|
|
|
338
371
|
```bash
|
|
339
372
|
sourcecode spring-audit /path/to/repo
|
|
340
|
-
sourcecode spring-audit /path/to/repo --scope tx
|
|
373
|
+
sourcecode spring-audit /path/to/repo --scope tx # TX anomalies only
|
|
341
374
|
sourcecode spring-audit /path/to/repo --scope security # security surface only
|
|
342
375
|
sourcecode spring-audit /path/to/repo --min-severity high
|
|
376
|
+
|
|
377
|
+
# CI/CD gate: exit 1 on any finding
|
|
378
|
+
sourcecode spring-audit . --ci
|
|
379
|
+
sourcecode spring-audit . --ci --min-severity high # exit 1 only on high/critical
|
|
380
|
+
sourcecode spring-audit . --ci --format github-comment # Markdown output + exit 1
|
|
343
381
|
```
|
|
344
382
|
|
|
345
383
|
Detects structural Spring anomalies that survive code review and tests, but cause production failures:
|
|
@@ -406,20 +444,59 @@ sourcecode cold-start /path/to/repo --compact # ~10K token subset
|
|
|
406
444
|
|
|
407
445
|
Returns the Repository Intelligence Snapshot (RIS) instantly — zero re-analysis. The RIS is built by a prior warm cache pass and includes stacks, entry points, endpoint surface, and Spring semantic signals. Status field: `cold_start_ready` | `cold_start_stale` | `no_ris`.
|
|
408
446
|
|
|
409
|
-
Use `--compact` to get a ~10K token subset safe for direct LLM injection. Full snapshot
|
|
447
|
+
Use `--compact` to get a ~10K token subset safe for direct LLM injection. Full snapshot ranges from ~100K–200K tokens on medium repos — use `--output FILE` for local search tooling.
|
|
410
448
|
|
|
411
449
|
### `repo-ir` — symbol-level IR
|
|
412
450
|
|
|
413
451
|
```bash
|
|
414
|
-
sourcecode repo-ir /path/to/repo --summary-only
|
|
415
|
-
sourcecode repo-ir /path/to/repo --since HEAD~1
|
|
452
|
+
sourcecode repo-ir /path/to/repo --summary-only # ~20K tokens
|
|
453
|
+
sourcecode repo-ir /path/to/repo --since HEAD~1 # symbol-level diff
|
|
416
454
|
sourcecode repo-ir /path/to/repo --files src/.../OrderService.java
|
|
455
|
+
sourcecode repo-ir /path/to/repo --max-nodes 200 --max-edges 500 # limit graph size
|
|
456
|
+
sourcecode repo-ir /path/to/repo --output ir.json.gz --gzip # compressed output (~70-80% smaller)
|
|
457
|
+
sourcecode repo-ir /path/to/repo --include-tests # include test files
|
|
417
458
|
```
|
|
418
459
|
|
|
419
460
|
Builds a deterministic symbol graph: classes, methods, import/injection edges, Spring roles, subsystems.
|
|
420
461
|
|
|
462
|
+
**Size control flags:**
|
|
463
|
+
|
|
464
|
+
| Flag | Description |
|
|
465
|
+
|------|-------------|
|
|
466
|
+
| `--summary-only` | Omit full graph nodes/edges; keep analysis summary, impact, and change_set (<300KB typical) |
|
|
467
|
+
| `--max-nodes N` | Keep top N nodes by impact score |
|
|
468
|
+
| `--max-edges N` | Keep top N edges (priority: edges between kept nodes) |
|
|
469
|
+
| `--gzip` | Compress output with gzip. Requires `--output`. ~70–80% smaller. |
|
|
470
|
+
| `--force` | Bypass the 50K-token size guard and emit output anyway |
|
|
471
|
+
| `--include-tests` | Include test source files (excluded by default) |
|
|
472
|
+
|
|
421
473
|
**Size warning:** Without `--summary-only`, output can exceed 1MB for mid-size repos. Always use `--summary-only` unless you need the full graph for downstream tooling.
|
|
422
474
|
|
|
475
|
+
### `explain` — architectural summary for a class
|
|
476
|
+
|
|
477
|
+
```bash
|
|
478
|
+
sourcecode explain UserService
|
|
479
|
+
sourcecode explain OrderController /path/to/repo
|
|
480
|
+
sourcecode explain UserService --format json
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Human-readable architectural summary derived entirely from static analysis: Spring stereotype, public methods, incoming callers, outgoing dependencies, events published/consumed, `@Transactional` boundaries, security constraints, and related REST endpoints. JAVA/SPRING ONLY.
|
|
484
|
+
|
|
485
|
+
### `pr-impact` — PR blast-radius report
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
sourcecode pr-impact --files changed_files.txt
|
|
489
|
+
sourcecode pr-impact /path/to/repo --files diff.txt --format json
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Takes a file listing changed Java files (one path per line) and produces a consolidated report: modified classes, affected REST endpoints reachable through the call chain, direct callers of each changed class, event publishers/consumers triggered, `@Transactional` methods in changed classes, and a consolidated risk level (`CRITICAL` / `HIGH` / `MEDIUM` / `LOW`). JAVA/SPRING ONLY.
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
# Typical CI usage: pipe git diff to a file, then run
|
|
496
|
+
git diff --name-only main | grep '\.java$' > changed.txt
|
|
497
|
+
sourcecode pr-impact . --files changed.txt --format json
|
|
498
|
+
```
|
|
499
|
+
|
|
423
500
|
### `onboard` — codebase orientation
|
|
424
501
|
|
|
425
502
|
```bash
|
|
@@ -428,7 +505,7 @@ sourcecode onboard /path/to/repo
|
|
|
428
505
|
|
|
429
506
|
Entry points, architecture summary, key files, confidence level, and gaps. Designed to be injected as agent context at the start of a session.
|
|
430
507
|
|
|
431
|
-
### `review-pr` —
|
|
508
|
+
### `review-pr` — PR review context [free ≤500 Java files · Pro above]
|
|
432
509
|
|
|
433
510
|
```bash
|
|
434
511
|
sourcecode review-pr /path/to/repo --since main
|
|
@@ -437,7 +514,7 @@ sourcecode review-pr /path/to/repo --since HEAD~3
|
|
|
437
514
|
|
|
438
515
|
Changed files, risk ranking, test coverage gaps, affected modules, and blast radius of changed classes. Returns a `ci_decision` field for CI/CD integration.
|
|
439
516
|
|
|
440
|
-
### `fix-bug` —
|
|
517
|
+
### `fix-bug` — Bug triage context [free ≤500 Java files · Pro above]
|
|
441
518
|
|
|
442
519
|
```bash
|
|
443
520
|
sourcecode fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
@@ -445,7 +522,7 @@ sourcecode fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
|
445
522
|
|
|
446
523
|
Risk-ranked file list correlated to the symptom: keyword extraction, path matching, content matching, git commit correlation.
|
|
447
524
|
|
|
448
|
-
### `modernize` — [Pro]
|
|
525
|
+
### `modernize` — Modernization planning [free ≤500 Java files · Pro above]
|
|
449
526
|
|
|
450
527
|
```bash
|
|
451
528
|
sourcecode modernize /path/to/repo
|
|
@@ -453,6 +530,98 @@ sourcecode modernize /path/to/repo
|
|
|
453
530
|
|
|
454
531
|
High-coupling nodes (high fan-in = risky to change), dead zone candidates (isolated symbols), subsystem tangles.
|
|
455
532
|
|
|
533
|
+
### `migrate-check` — Spring Boot 2→3 migration readiness
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
sourcecode migrate-check /path/to/repo
|
|
537
|
+
sourcecode migrate-check . --min-severity high
|
|
538
|
+
sourcecode migrate-check . --format text
|
|
539
|
+
sourcecode migrate-check . --output migration.json
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Detects migration blockers across Java source files, Spring XML config files, and Maven/Gradle build files. 27 rules organized by target:
|
|
543
|
+
|
|
544
|
+
**Jakarta namespace (MIG-001..009) — javax→jakarta**
|
|
545
|
+
|
|
546
|
+
| Rule | Severity | Pattern |
|
|
547
|
+
|------|----------|---------|
|
|
548
|
+
| `MIG-001` | critical | `javax.persistence` import — JPA will not compile |
|
|
549
|
+
| `MIG-002` | high | `javax.servlet` import — Servlet API changed |
|
|
550
|
+
| `MIG-003` | high | `javax.validation` import — Bean Validation changed |
|
|
551
|
+
| `MIG-004` | high | `javax.transaction` import — TX API changed |
|
|
552
|
+
| `MIG-006` | medium | `javax.annotation` import — CDI annotations changed |
|
|
553
|
+
| `MIG-007` | medium | `javax.inject` import — DI annotations changed |
|
|
554
|
+
| `MIG-008` | medium | `javax.ws.rs` import — JAX-RS changed |
|
|
555
|
+
| `MIG-009` | medium | `javax.jms` import — JMS API changed |
|
|
556
|
+
|
|
557
|
+
**Spring Security 6 (MIG-005, MIG-019, MIG-020)**
|
|
558
|
+
|
|
559
|
+
| Rule | Severity | Pattern |
|
|
560
|
+
|------|----------|---------|
|
|
561
|
+
| `MIG-005` | high | `extends WebSecurityConfigurerAdapter` — removed in Spring Security 6 |
|
|
562
|
+
| `MIG-019` | high | SpringFox / `@EnableSwagger2` — incompatible with Spring Boot 3 |
|
|
563
|
+
| `MIG-020` | high | `antMatchers()` / `authorizeRequests()` — replaced in Spring Security 6 |
|
|
564
|
+
|
|
565
|
+
**Java version compatibility (MIG-010..025)**
|
|
566
|
+
|
|
567
|
+
| Rule | Severity | Pattern |
|
|
568
|
+
|------|----------|---------|
|
|
569
|
+
| `MIG-010` | critical | `SecurityManager` / `AccessController` — removed in Java 17 (JEP 411) |
|
|
570
|
+
| `MIG-011` | high | `sun.*` / `com.sun.net.*` internal API imports — strong encapsulation since Java 9 |
|
|
571
|
+
| `MIG-012` | high | Nashorn `ScriptEngine` — removed in Java 15 |
|
|
572
|
+
| `MIG-013` | high | `sun.misc.Unsafe` — requires `--add-opens` on Java 9+ |
|
|
573
|
+
| `MIG-014` | medium | `setAccessible(true)` — may throw `InaccessibleObjectException` on Java 17+ |
|
|
574
|
+
| `MIG-015` | medium | `finalize()` override — deprecated for removal since Java 18 |
|
|
575
|
+
| `MIG-016` | low | `java.util.Date` / `Calendar` / `SimpleDateFormat` — use `java.time` |
|
|
576
|
+
| `MIG-021` | high | `javax.xml.bind` (JAXB) — removed from JDK in Java 11 |
|
|
577
|
+
| `MIG-022` | high | `javax.xml.ws` (JAX-WS) — removed from JDK in Java 11 |
|
|
578
|
+
| `MIG-023` | critical | `org.omg.*` / CORBA APIs — removed from JDK in Java 11 |
|
|
579
|
+
| `MIG-024` | medium | `Thread.stop()` / `Thread.suspend()` / `Thread.resume()` — deprecated for removal |
|
|
580
|
+
| `MIG-025` | medium | `ReflectionFactory` / `MethodHandles.privateLookupIn` — JPMS deep-reflection risk |
|
|
581
|
+
|
|
582
|
+
**Spring XML config (MIG-030..032)**
|
|
583
|
+
|
|
584
|
+
| Rule | Severity | Pattern |
|
|
585
|
+
|------|----------|---------|
|
|
586
|
+
| `MIG-030` | high | `javax.*` class reference in Spring XML bean definitions |
|
|
587
|
+
| `MIG-031` | high | `<http auto-config>` or versioned spring-security ≤5 schema in XML |
|
|
588
|
+
| `MIG-032` | high | `web.xml` with Servlet ≤4 namespace — must migrate to `jakarta.ee` |
|
|
589
|
+
|
|
590
|
+
**Build file dependencies (MIG-040..043)**
|
|
591
|
+
|
|
592
|
+
| Rule | Severity | Pattern |
|
|
593
|
+
|------|----------|---------|
|
|
594
|
+
| `MIG-040` | high | `io.springfox` dependency — incompatible with Spring Boot 3 |
|
|
595
|
+
| `MIG-041` | high | Hibernate 5.x explicitly pinned — Spring Boot 3 requires Hibernate 6 |
|
|
596
|
+
| `MIG-042` | medium | ByteBuddy < 1.12.x — may not support Java 17+ strong encapsulation |
|
|
597
|
+
| `MIG-043` | high | EhCache 2.x (`net.sf.ehcache`) — incompatible with Spring Boot 3 |
|
|
598
|
+
|
|
599
|
+
Each finding includes `severity`, `title`, `source_file`, `first_line`, `explanation`, `fix_hint`, `migration_target`, and `openrewrite_recipe` (when an automated recipe exists).
|
|
600
|
+
|
|
601
|
+
### `rename-class` — Java class rename
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
sourcecode rename-class . --from ServiceA --to ServiceB
|
|
605
|
+
sourcecode rename-class /path/to/repo --from OrderManager --to OrderService
|
|
606
|
+
sourcecode rename-class . --from OldName --to NewName --dry-run
|
|
607
|
+
sourcecode rename-class . --from OldName --to NewName --no-tests # src/main only
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
Renames a Java class safely throughout the repository: declaration, constructor, all import statements, type references (fields, params, return types), `extends`/`implements`, generics, casts, and Spring `@Qualifier` names. Renames the physical `.java` file. Emits a structured change audit trail (`file`, `before_lines`, `after_lines`, `intent`, `diff`).
|
|
611
|
+
|
|
612
|
+
Use `--dry-run` to preview changes without writing to disk.
|
|
613
|
+
|
|
614
|
+
### `chunk-file` — split large Java files for agent consumption
|
|
615
|
+
|
|
616
|
+
```bash
|
|
617
|
+
sourcecode chunk-file BigService.java
|
|
618
|
+
sourcecode chunk-file BigService.java --max-lines 300
|
|
619
|
+
sourcecode chunk-file BigService.java --chunk 5 # read chunk 5 only
|
|
620
|
+
sourcecode chunk-file BigService.java --metadata-only # boundaries only, no content
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
Splits a large Java file at method/class boundaries so AI agents can read files with 10K–25K+ lines in context-sized pieces. Each chunk includes `chunk_id`, `start_line`, `end_line`, `chunk_type`, symbol name, a `context_header` (package + class + imports summary), and `content`. A `size_warning` flag marks methods that exceed `--max-lines` and cannot be split further.
|
|
624
|
+
|
|
456
625
|
### `prepare-context` — task-specific context
|
|
457
626
|
|
|
458
627
|
Low-level access to all tasks with full options:
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|

|
|
7
7
|
|
|
8
8
|
---
|
|
@@ -76,9 +76,7 @@ pipx install sourcecode
|
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
78
|
sourcecode version
|
|
79
|
-
# sourcecode 1.35.
|
|
80
|
-
|
|
81
|
-
**v1.35.28** — 7 bug fixes: `rename-class` cross-package disambiguation (BUG-4), `rename-class` collision detection (BUG-2), `find_java_files` false positive on `com/test/` package paths (BUG-1), `cold-start --compact` correct key names (BUG-6), `@EnableMethodSecurity` no longer suppresses SEC-001 (BUG-3), `explain` @Entity stereotype detection (BUG-5), XML+annotation mixed security retagging (BUG-7).
|
|
79
|
+
# sourcecode 1.35.35
|
|
82
80
|
```
|
|
83
81
|
|
|
84
82
|
---
|
|
@@ -98,6 +96,9 @@ sourcecode --agent
|
|
|
98
96
|
# Blast radius: what breaks if this class changes?
|
|
99
97
|
sourcecode impact OrderService /path/to/repo
|
|
100
98
|
|
|
99
|
+
# Spring Boot 2→3 migration readiness: javax→jakarta blockers, removed APIs
|
|
100
|
+
sourcecode migrate-check /path/to/repo
|
|
101
|
+
|
|
101
102
|
# Spring semantic audit: TX anomalies + security surface (free)
|
|
102
103
|
sourcecode spring-audit /path/to/repo
|
|
103
104
|
|
|
@@ -142,6 +143,9 @@ sourcecode cache warm
|
|
|
142
143
|
|
|
143
144
|
# Clear cache
|
|
144
145
|
sourcecode cache clear
|
|
146
|
+
|
|
147
|
+
# Check RIS freshness relative to current git HEAD
|
|
148
|
+
sourcecode cache freshness
|
|
145
149
|
```
|
|
146
150
|
|
|
147
151
|
**`--no-cache`** bypasses both layers and forces a fresh scan. Use in CI or when you need to verify a fresh result.
|
|
@@ -248,6 +252,35 @@ Specifically:
|
|
|
248
252
|
|
|
249
253
|
---
|
|
250
254
|
|
|
255
|
+
## Pricing
|
|
256
|
+
|
|
257
|
+
Two tiers. **Gating is by repo size and automation — never by command.** Every
|
|
258
|
+
command runs at full power on Free for small and mid-size repos. You upgrade
|
|
259
|
+
when the work gets bigger or automated.
|
|
260
|
+
|
|
261
|
+
| | **Free** — €0 | **Pro** — €19/mo · €190/yr per dev |
|
|
262
|
+
|---|---|---|
|
|
263
|
+
| Repo size | ≤ 500 Java source files | **> 500 Java files** (enterprise monoliths) |
|
|
264
|
+
| Commands | All of them, full output | Same commands, unlocked at scale |
|
|
265
|
+
| `impact` / `fix-bug` / `review-pr` / `modernize` | ✅ full on small repos | ✅ full on large repos (Free gets a capped preview) |
|
|
266
|
+
| `--full`, git-churn ranking, uncapped graph/semantic | ✅ on small repos | ✅ on large repos |
|
|
267
|
+
| `prepare-context delta` | 30 free runs/repo | unlimited — CI/CD automation |
|
|
268
|
+
| `prepare-context generate-tests` | small repos | large repos |
|
|
269
|
+
| MCP local server (`mcp serve`) | ✅ | ✅ |
|
|
270
|
+
| Offline, no data egress, no account | ✅ | ✅ |
|
|
271
|
+
|
|
272
|
+
**Non-Java repos are free at any size** — the size limit counts Java source
|
|
273
|
+
files only, by design. sourcecode monetises enterprise Java monoliths.
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
sourcecode auth login # browser device-code auth
|
|
277
|
+
sourcecode activate <key> # or activate a license key directly
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Full breakdown: [docs/PRODUCT_TIERS.md](docs/PRODUCT_TIERS.md).
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
251
284
|
## Command reference
|
|
252
285
|
|
|
253
286
|
### `--compact` and `--agent`
|
|
@@ -259,7 +292,7 @@ Core flags. Feed directly to AI agents as first-message context.
|
|
|
259
292
|
| `--compact` | High-signal summary: stacks, entry points, dependencies, confidence, gaps | ~2,500–4,000 |
|
|
260
293
|
| `--agent` | Structured JSON: identity, entry points, architecture, event flows | ~4,500–5,500 |
|
|
261
294
|
|
|
262
|
-
### `impact` — blast-radius analysis
|
|
295
|
+
### `impact` — blast-radius analysis [free ≤500 Java files · Pro above]
|
|
263
296
|
|
|
264
297
|
```bash
|
|
265
298
|
sourcecode impact ClassName /path/to/repo
|
|
@@ -299,9 +332,14 @@ Extracts all Spring MVC (`@GetMapping`, `@PostMapping`, `@RequestMapping`, etc.)
|
|
|
299
332
|
|
|
300
333
|
```bash
|
|
301
334
|
sourcecode spring-audit /path/to/repo
|
|
302
|
-
sourcecode spring-audit /path/to/repo --scope tx
|
|
335
|
+
sourcecode spring-audit /path/to/repo --scope tx # TX anomalies only
|
|
303
336
|
sourcecode spring-audit /path/to/repo --scope security # security surface only
|
|
304
337
|
sourcecode spring-audit /path/to/repo --min-severity high
|
|
338
|
+
|
|
339
|
+
# CI/CD gate: exit 1 on any finding
|
|
340
|
+
sourcecode spring-audit . --ci
|
|
341
|
+
sourcecode spring-audit . --ci --min-severity high # exit 1 only on high/critical
|
|
342
|
+
sourcecode spring-audit . --ci --format github-comment # Markdown output + exit 1
|
|
305
343
|
```
|
|
306
344
|
|
|
307
345
|
Detects structural Spring anomalies that survive code review and tests, but cause production failures:
|
|
@@ -368,20 +406,59 @@ sourcecode cold-start /path/to/repo --compact # ~10K token subset
|
|
|
368
406
|
|
|
369
407
|
Returns the Repository Intelligence Snapshot (RIS) instantly — zero re-analysis. The RIS is built by a prior warm cache pass and includes stacks, entry points, endpoint surface, and Spring semantic signals. Status field: `cold_start_ready` | `cold_start_stale` | `no_ris`.
|
|
370
408
|
|
|
371
|
-
Use `--compact` to get a ~10K token subset safe for direct LLM injection. Full snapshot
|
|
409
|
+
Use `--compact` to get a ~10K token subset safe for direct LLM injection. Full snapshot ranges from ~100K–200K tokens on medium repos — use `--output FILE` for local search tooling.
|
|
372
410
|
|
|
373
411
|
### `repo-ir` — symbol-level IR
|
|
374
412
|
|
|
375
413
|
```bash
|
|
376
|
-
sourcecode repo-ir /path/to/repo --summary-only
|
|
377
|
-
sourcecode repo-ir /path/to/repo --since HEAD~1
|
|
414
|
+
sourcecode repo-ir /path/to/repo --summary-only # ~20K tokens
|
|
415
|
+
sourcecode repo-ir /path/to/repo --since HEAD~1 # symbol-level diff
|
|
378
416
|
sourcecode repo-ir /path/to/repo --files src/.../OrderService.java
|
|
417
|
+
sourcecode repo-ir /path/to/repo --max-nodes 200 --max-edges 500 # limit graph size
|
|
418
|
+
sourcecode repo-ir /path/to/repo --output ir.json.gz --gzip # compressed output (~70-80% smaller)
|
|
419
|
+
sourcecode repo-ir /path/to/repo --include-tests # include test files
|
|
379
420
|
```
|
|
380
421
|
|
|
381
422
|
Builds a deterministic symbol graph: classes, methods, import/injection edges, Spring roles, subsystems.
|
|
382
423
|
|
|
424
|
+
**Size control flags:**
|
|
425
|
+
|
|
426
|
+
| Flag | Description |
|
|
427
|
+
|------|-------------|
|
|
428
|
+
| `--summary-only` | Omit full graph nodes/edges; keep analysis summary, impact, and change_set (<300KB typical) |
|
|
429
|
+
| `--max-nodes N` | Keep top N nodes by impact score |
|
|
430
|
+
| `--max-edges N` | Keep top N edges (priority: edges between kept nodes) |
|
|
431
|
+
| `--gzip` | Compress output with gzip. Requires `--output`. ~70–80% smaller. |
|
|
432
|
+
| `--force` | Bypass the 50K-token size guard and emit output anyway |
|
|
433
|
+
| `--include-tests` | Include test source files (excluded by default) |
|
|
434
|
+
|
|
383
435
|
**Size warning:** Without `--summary-only`, output can exceed 1MB for mid-size repos. Always use `--summary-only` unless you need the full graph for downstream tooling.
|
|
384
436
|
|
|
437
|
+
### `explain` — architectural summary for a class
|
|
438
|
+
|
|
439
|
+
```bash
|
|
440
|
+
sourcecode explain UserService
|
|
441
|
+
sourcecode explain OrderController /path/to/repo
|
|
442
|
+
sourcecode explain UserService --format json
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
Human-readable architectural summary derived entirely from static analysis: Spring stereotype, public methods, incoming callers, outgoing dependencies, events published/consumed, `@Transactional` boundaries, security constraints, and related REST endpoints. JAVA/SPRING ONLY.
|
|
446
|
+
|
|
447
|
+
### `pr-impact` — PR blast-radius report
|
|
448
|
+
|
|
449
|
+
```bash
|
|
450
|
+
sourcecode pr-impact --files changed_files.txt
|
|
451
|
+
sourcecode pr-impact /path/to/repo --files diff.txt --format json
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
Takes a file listing changed Java files (one path per line) and produces a consolidated report: modified classes, affected REST endpoints reachable through the call chain, direct callers of each changed class, event publishers/consumers triggered, `@Transactional` methods in changed classes, and a consolidated risk level (`CRITICAL` / `HIGH` / `MEDIUM` / `LOW`). JAVA/SPRING ONLY.
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
# Typical CI usage: pipe git diff to a file, then run
|
|
458
|
+
git diff --name-only main | grep '\.java$' > changed.txt
|
|
459
|
+
sourcecode pr-impact . --files changed.txt --format json
|
|
460
|
+
```
|
|
461
|
+
|
|
385
462
|
### `onboard` — codebase orientation
|
|
386
463
|
|
|
387
464
|
```bash
|
|
@@ -390,7 +467,7 @@ sourcecode onboard /path/to/repo
|
|
|
390
467
|
|
|
391
468
|
Entry points, architecture summary, key files, confidence level, and gaps. Designed to be injected as agent context at the start of a session.
|
|
392
469
|
|
|
393
|
-
### `review-pr` —
|
|
470
|
+
### `review-pr` — PR review context [free ≤500 Java files · Pro above]
|
|
394
471
|
|
|
395
472
|
```bash
|
|
396
473
|
sourcecode review-pr /path/to/repo --since main
|
|
@@ -399,7 +476,7 @@ sourcecode review-pr /path/to/repo --since HEAD~3
|
|
|
399
476
|
|
|
400
477
|
Changed files, risk ranking, test coverage gaps, affected modules, and blast radius of changed classes. Returns a `ci_decision` field for CI/CD integration.
|
|
401
478
|
|
|
402
|
-
### `fix-bug` —
|
|
479
|
+
### `fix-bug` — Bug triage context [free ≤500 Java files · Pro above]
|
|
403
480
|
|
|
404
481
|
```bash
|
|
405
482
|
sourcecode fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
@@ -407,7 +484,7 @@ sourcecode fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
|
407
484
|
|
|
408
485
|
Risk-ranked file list correlated to the symptom: keyword extraction, path matching, content matching, git commit correlation.
|
|
409
486
|
|
|
410
|
-
### `modernize` — [Pro]
|
|
487
|
+
### `modernize` — Modernization planning [free ≤500 Java files · Pro above]
|
|
411
488
|
|
|
412
489
|
```bash
|
|
413
490
|
sourcecode modernize /path/to/repo
|
|
@@ -415,6 +492,98 @@ sourcecode modernize /path/to/repo
|
|
|
415
492
|
|
|
416
493
|
High-coupling nodes (high fan-in = risky to change), dead zone candidates (isolated symbols), subsystem tangles.
|
|
417
494
|
|
|
495
|
+
### `migrate-check` — Spring Boot 2→3 migration readiness
|
|
496
|
+
|
|
497
|
+
```bash
|
|
498
|
+
sourcecode migrate-check /path/to/repo
|
|
499
|
+
sourcecode migrate-check . --min-severity high
|
|
500
|
+
sourcecode migrate-check . --format text
|
|
501
|
+
sourcecode migrate-check . --output migration.json
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
Detects migration blockers across Java source files, Spring XML config files, and Maven/Gradle build files. 27 rules organized by target:
|
|
505
|
+
|
|
506
|
+
**Jakarta namespace (MIG-001..009) — javax→jakarta**
|
|
507
|
+
|
|
508
|
+
| Rule | Severity | Pattern |
|
|
509
|
+
|------|----------|---------|
|
|
510
|
+
| `MIG-001` | critical | `javax.persistence` import — JPA will not compile |
|
|
511
|
+
| `MIG-002` | high | `javax.servlet` import — Servlet API changed |
|
|
512
|
+
| `MIG-003` | high | `javax.validation` import — Bean Validation changed |
|
|
513
|
+
| `MIG-004` | high | `javax.transaction` import — TX API changed |
|
|
514
|
+
| `MIG-006` | medium | `javax.annotation` import — CDI annotations changed |
|
|
515
|
+
| `MIG-007` | medium | `javax.inject` import — DI annotations changed |
|
|
516
|
+
| `MIG-008` | medium | `javax.ws.rs` import — JAX-RS changed |
|
|
517
|
+
| `MIG-009` | medium | `javax.jms` import — JMS API changed |
|
|
518
|
+
|
|
519
|
+
**Spring Security 6 (MIG-005, MIG-019, MIG-020)**
|
|
520
|
+
|
|
521
|
+
| Rule | Severity | Pattern |
|
|
522
|
+
|------|----------|---------|
|
|
523
|
+
| `MIG-005` | high | `extends WebSecurityConfigurerAdapter` — removed in Spring Security 6 |
|
|
524
|
+
| `MIG-019` | high | SpringFox / `@EnableSwagger2` — incompatible with Spring Boot 3 |
|
|
525
|
+
| `MIG-020` | high | `antMatchers()` / `authorizeRequests()` — replaced in Spring Security 6 |
|
|
526
|
+
|
|
527
|
+
**Java version compatibility (MIG-010..025)**
|
|
528
|
+
|
|
529
|
+
| Rule | Severity | Pattern |
|
|
530
|
+
|------|----------|---------|
|
|
531
|
+
| `MIG-010` | critical | `SecurityManager` / `AccessController` — removed in Java 17 (JEP 411) |
|
|
532
|
+
| `MIG-011` | high | `sun.*` / `com.sun.net.*` internal API imports — strong encapsulation since Java 9 |
|
|
533
|
+
| `MIG-012` | high | Nashorn `ScriptEngine` — removed in Java 15 |
|
|
534
|
+
| `MIG-013` | high | `sun.misc.Unsafe` — requires `--add-opens` on Java 9+ |
|
|
535
|
+
| `MIG-014` | medium | `setAccessible(true)` — may throw `InaccessibleObjectException` on Java 17+ |
|
|
536
|
+
| `MIG-015` | medium | `finalize()` override — deprecated for removal since Java 18 |
|
|
537
|
+
| `MIG-016` | low | `java.util.Date` / `Calendar` / `SimpleDateFormat` — use `java.time` |
|
|
538
|
+
| `MIG-021` | high | `javax.xml.bind` (JAXB) — removed from JDK in Java 11 |
|
|
539
|
+
| `MIG-022` | high | `javax.xml.ws` (JAX-WS) — removed from JDK in Java 11 |
|
|
540
|
+
| `MIG-023` | critical | `org.omg.*` / CORBA APIs — removed from JDK in Java 11 |
|
|
541
|
+
| `MIG-024` | medium | `Thread.stop()` / `Thread.suspend()` / `Thread.resume()` — deprecated for removal |
|
|
542
|
+
| `MIG-025` | medium | `ReflectionFactory` / `MethodHandles.privateLookupIn` — JPMS deep-reflection risk |
|
|
543
|
+
|
|
544
|
+
**Spring XML config (MIG-030..032)**
|
|
545
|
+
|
|
546
|
+
| Rule | Severity | Pattern |
|
|
547
|
+
|------|----------|---------|
|
|
548
|
+
| `MIG-030` | high | `javax.*` class reference in Spring XML bean definitions |
|
|
549
|
+
| `MIG-031` | high | `<http auto-config>` or versioned spring-security ≤5 schema in XML |
|
|
550
|
+
| `MIG-032` | high | `web.xml` with Servlet ≤4 namespace — must migrate to `jakarta.ee` |
|
|
551
|
+
|
|
552
|
+
**Build file dependencies (MIG-040..043)**
|
|
553
|
+
|
|
554
|
+
| Rule | Severity | Pattern |
|
|
555
|
+
|------|----------|---------|
|
|
556
|
+
| `MIG-040` | high | `io.springfox` dependency — incompatible with Spring Boot 3 |
|
|
557
|
+
| `MIG-041` | high | Hibernate 5.x explicitly pinned — Spring Boot 3 requires Hibernate 6 |
|
|
558
|
+
| `MIG-042` | medium | ByteBuddy < 1.12.x — may not support Java 17+ strong encapsulation |
|
|
559
|
+
| `MIG-043` | high | EhCache 2.x (`net.sf.ehcache`) — incompatible with Spring Boot 3 |
|
|
560
|
+
|
|
561
|
+
Each finding includes `severity`, `title`, `source_file`, `first_line`, `explanation`, `fix_hint`, `migration_target`, and `openrewrite_recipe` (when an automated recipe exists).
|
|
562
|
+
|
|
563
|
+
### `rename-class` — Java class rename
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
sourcecode rename-class . --from ServiceA --to ServiceB
|
|
567
|
+
sourcecode rename-class /path/to/repo --from OrderManager --to OrderService
|
|
568
|
+
sourcecode rename-class . --from OldName --to NewName --dry-run
|
|
569
|
+
sourcecode rename-class . --from OldName --to NewName --no-tests # src/main only
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
Renames a Java class safely throughout the repository: declaration, constructor, all import statements, type references (fields, params, return types), `extends`/`implements`, generics, casts, and Spring `@Qualifier` names. Renames the physical `.java` file. Emits a structured change audit trail (`file`, `before_lines`, `after_lines`, `intent`, `diff`).
|
|
573
|
+
|
|
574
|
+
Use `--dry-run` to preview changes without writing to disk.
|
|
575
|
+
|
|
576
|
+
### `chunk-file` — split large Java files for agent consumption
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
sourcecode chunk-file BigService.java
|
|
580
|
+
sourcecode chunk-file BigService.java --max-lines 300
|
|
581
|
+
sourcecode chunk-file BigService.java --chunk 5 # read chunk 5 only
|
|
582
|
+
sourcecode chunk-file BigService.java --metadata-only # boundaries only, no content
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
Splits a large Java file at method/class boundaries so AI agents can read files with 10K–25K+ lines in context-sized pieces. Each chunk includes `chunk_id`, `start_line`, `end_line`, `chunk_type`, symbol name, a `context_header` (package + class + imports summary), and `content`. A `size_warning` flag marks methods that exceed `--max-lines` and cannot be split further.
|
|
586
|
+
|
|
418
587
|
### `prepare-context` — task-specific context
|
|
419
588
|
|
|
420
589
|
Low-level access to all tasks with full options:
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sourcecode"
|
|
7
|
-
version = "1.35.
|
|
7
|
+
version = "1.35.35"
|
|
8
8
|
description = "Persistent structural context and ultra-fast repeated analysis for AI coding agents"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|