sourcecode 1.73.0__tar.gz → 2.0.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-1.73.0 → sourcecode-2.0.0}/.gitignore +4 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/CHANGELOG.md +45 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/CONTRIBUTING.md +3 -3
- {sourcecode-1.73.0 → sourcecode-2.0.0}/PKG-INFO +125 -110
- {sourcecode-1.73.0 → sourcecode-2.0.0}/README.md +124 -109
- {sourcecode-1.73.0 → sourcecode-2.0.0}/pyproject.toml +3 -2
- sourcecode-2.0.0/scripts/compare_integration_engines.py +62 -0
- sourcecode-2.0.0/scripts/customer_smoke_test.sh +87 -0
- sourcecode-2.0.0/src/sourcecode/__init__.py +7 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/architecture_analyzer.py +63 -55
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/ast_extractor.py +130 -135
- sourcecode-2.0.0/src/sourcecode/call_surface.py +112 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/canonical_ir.py +62 -1
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/cli.py +220 -192
- sourcecode-2.0.0/src/sourcecode/context_graph.py +1022 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/contract_pipeline.py +16 -1
- sourcecode-2.0.0/src/sourcecode/dynamic_argument_surface.py +54 -0
- sourcecode-2.0.0/src/sourcecode/endpoint_literals.py +71 -0
- sourcecode-2.0.0/src/sourcecode/evidence_provider.py +90 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/explain.py +28 -13
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/graph_analyzer.py +82 -8
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/license.py +42 -13
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/onboarding/applier.py +14 -6
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/registry.py +22 -22
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/runner.py +2 -2
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/server.py +24 -24
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp_nudge.py +1 -1
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/pr_comment_renderer.py +7 -6
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/prepare_context.py +10 -13
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/repository_ir.py +882 -141
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/ris.py +1 -1
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/semantic_analyzer.py +146 -9
- sourcecode-2.0.0/src/sourcecode/semantic_impact_engine.py +403 -0
- sourcecode-2.0.0/src/sourcecode/semantic_integration_engine.py +299 -0
- sourcecode-2.0.0/src/sourcecode/semantic_services.py +229 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/serializer.py +24 -32
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/consent.py +1 -1
- sourcecode-2.0.0/src/sourcecode/type_usage_surface.py +101 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/validation_surface.py +173 -205
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/functions/README.md +1 -1
- sourcecode-2.0.0/supabase/sql/licensing_schema.sql +108 -0
- sourcecode-1.73.0/src/sourcecode/__init__.py +0 -3
- sourcecode-1.73.0/src/sourcecode/flow_analyzer.py +0 -671
- sourcecode-1.73.0/src/sourcecode/integration_detector.py +0 -435
- {sourcecode-1.73.0 → sourcecode-2.0.0}/.github/workflows/build-windows.yml +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/.ruff.toml +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/LICENSE +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/SECURITY.md +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/raw +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/scripts/generate_jdk_exports.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/adaptive_scanner.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/architecture_summary.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/cache.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/cir_graphs.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/classifier.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/code_notes_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/confidence_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/context_scorer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/context_summarizer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/contract_model.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/coverage_parser.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/dependency_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/__init__.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/base.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/csproj_parser.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/dart.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/dotnet.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/elixir.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/go.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/heuristic.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/hybrid.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/java.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/jvm_ext.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/nodejs.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/parsers.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/php.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/project.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/python.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/ruby.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/rust.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/systems.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/terraform.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/detectors/tooling.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/doc_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/entrypoint_classifier.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/env_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/error_schema.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/file_chunker.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/file_classifier.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/format_contract.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/fqn_utils.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/git_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/hibernate_strat.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/jdk_exports.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/__init__.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/onboarding/__init__.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/onboarding/backup.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/onboarding/detector.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/onboarding/planner.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/mcp/orchestrator.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/metrics_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/migrate_check.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/openapi_surface.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/output_budget.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/path_filters.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/pr_impact.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/progress.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/ranking_engine.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/redactor.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/relevance_scorer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/rename_refactor.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/repo_classifier.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/runtime_classifier.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/scanner.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/schema.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/security_config.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_event_topology.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_findings.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_impact.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_model.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_security_audit.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_semantic.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/spring_tx_analyzer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/summarizer.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/__init__.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/config.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/events.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/filters.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/telemetry/transport.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/tree_utils.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/version_check.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/src/sourcecode/workspace.py +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/functions/get-license/index.ts +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/functions/lemonsqueezy-webhook/index.ts +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/functions/telemetry/index.ts +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/sql/license_event_ordering.sql +0 -0
- {sourcecode-1.73.0 → sourcecode-2.0.0}/supabase/sql/telemetry_events.sql +0 -0
|
@@ -35,6 +35,10 @@ Thumbs.db
|
|
|
35
35
|
|
|
36
36
|
.planning
|
|
37
37
|
|
|
38
|
+
# ContextGraph baseline — full canonical outputs (multi-MB, from external repos).
|
|
39
|
+
# The light oracle (index.json) and convergence.json ARE committed.
|
|
40
|
+
tests/contextgraph_baseline/baseline/artifacts/
|
|
41
|
+
|
|
38
42
|
# Supabase local temp
|
|
39
43
|
supabase/.temp/
|
|
40
44
|
# Internal agent playbook (not distributed)
|
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.0.0] — 2026-07-06
|
|
4
|
+
|
|
5
|
+
**ASK Engine 2.0** — the product identity is now final. The engine is unchanged;
|
|
6
|
+
this major marks the CLI/product rename and is fully backward compatible.
|
|
7
|
+
|
|
8
|
+
### Changed — canonical command is now `ask`
|
|
9
|
+
|
|
10
|
+
- **`ask` is the canonical CLI command.** `ask impact`, `ask migrate-check`,
|
|
11
|
+
`ask review-pr`, `ask mcp init`, `ask activate …` — one short verb that matches
|
|
12
|
+
the product name (ASK Engine).
|
|
13
|
+
- **`sourcecode` becomes a deprecated compatibility alias.** It keeps working
|
|
14
|
+
(same single implementation, `prog_name` pinned to `ask`), prints a one-line
|
|
15
|
+
deprecation notice **only on an interactive terminal**, and forwards to `ask`.
|
|
16
|
+
Pipes and agents that still call `sourcecode` get byte-identical stdout **and**
|
|
17
|
+
clean (JSON-only) stderr — the machine contract is unchanged. The alias will be
|
|
18
|
+
removed in a future major.
|
|
19
|
+
- **New welcome wordmark**: a large `ASK` block with an `E N G I N E` label
|
|
20
|
+
replaces the old `SOURCE`/`CODE` banner. Help and banners read `CLI: ask`.
|
|
21
|
+
- **Config home moved to `~/.ask`** (canonical writes); the legacy `~/.sourcecode`
|
|
22
|
+
is still read as a fallback, so **no existing user loses their license or config**.
|
|
23
|
+
Cache dir (`.sourcecode-cache/`) and `SOURCECODE_*` env vars are unchanged.
|
|
24
|
+
- **MCP**: `ask mcp init` registers the client entry under `ask`; a pre-existing
|
|
25
|
+
`sourcecode` entry is recognized and migrated (and both are removed on
|
|
26
|
+
`mcp remove`).
|
|
27
|
+
- **Docs**: README, user guide, manual, tiers, demo and onboarding now say
|
|
28
|
+
**ASK Engine** and use `ask …` in every example. Package/install/config and
|
|
29
|
+
compatibility references are preserved and the compatibility strategy is
|
|
30
|
+
documented in `docs/PRODUCT_IDENTITY.md` (normative).
|
|
31
|
+
|
|
32
|
+
### Compatibility
|
|
33
|
+
|
|
34
|
+
- **PyPI/Homebrew distribution stays `sourcecode` this release**; installing it
|
|
35
|
+
provides both the `ask` and `sourcecode` commands. Renaming the distribution to
|
|
36
|
+
`ask-engine` is a separate, explicitly-breaking future change.
|
|
37
|
+
- Python package/import name (`sourcecode`), MCP protocol identity, cache format,
|
|
38
|
+
and all serialized/JSON outputs are unchanged.
|
|
39
|
+
|
|
40
|
+
### Also in this line (identity + precision, pre-2.0 increments)
|
|
41
|
+
|
|
42
|
+
- **Impact/`review-pr`**: a changed repository/service now surfaces **every**
|
|
43
|
+
affected entry point (controller) instead of collapsing an N-controller blast
|
|
44
|
+
radius to one — bounded by `max_impacts`, no new semantic fact, hash-neutral.
|
|
45
|
+
- **Product identity consolidation**: audited every `sourcecode` occurrence and
|
|
46
|
+
established `docs/PRODUCT_IDENTITY.md` as the normative product↔CLI mapping.
|
|
47
|
+
|
|
3
48
|
## [1.73.0] — 2026-07-01
|
|
4
49
|
|
|
5
50
|
### Fixed — audit reliability on a large non-Boot Spring monolith (Alfresco Community Repo field test)
|
|
@@ -30,8 +30,8 @@ This installs `sourcecode` in editable mode with all development dependencies (`
|
|
|
30
30
|
### Run the CLI locally
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
ask . --agent
|
|
34
|
+
ask . prepare-context explain
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### Run tests
|
|
@@ -150,7 +150,7 @@ Keep commits atomic. One logical change per commit.
|
|
|
150
150
|
## Reporting bugs
|
|
151
151
|
|
|
152
152
|
Open an issue with:
|
|
153
|
-
- `
|
|
153
|
+
- `ask --version` output
|
|
154
154
|
- Command you ran
|
|
155
155
|
- Expected behavior
|
|
156
156
|
- Actual behavior / error output
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sourcecode
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
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
|
|
@@ -36,22 +36,28 @@ Provides-Extra: mcp
|
|
|
36
36
|
Requires-Dist: mcp>=1.0.0; extra == 'mcp'
|
|
37
37
|
Description-Content-Type: text/markdown
|
|
38
38
|
|
|
39
|
-
#
|
|
39
|
+
# ASK Engine
|
|
40
40
|
|
|
41
41
|
**Persistent structural context and ultra-fast repeated analysis for AI coding agents.**
|
|
42
42
|
|
|
43
|
-

|
|
44
44
|

|
|
45
45
|
|
|
46
|
+
> **ASK Engine** is the product. The CLI command is **`ask`**. The legacy
|
|
47
|
+
> **`sourcecode`** command still works as a deprecated compatibility alias (it prints
|
|
48
|
+
> a one-line notice and forwards to `ask`) and remains the Python/PyPI package name
|
|
49
|
+
> for now. The authoritative version is whatever `ask version` reports. See
|
|
50
|
+
> [docs/PRODUCT_IDENTITY.md](docs/PRODUCT_IDENTITY.md).
|
|
51
|
+
|
|
46
52
|
---
|
|
47
53
|
|
|
48
54
|
## The problem
|
|
49
55
|
|
|
50
56
|
Every time an AI coding agent starts a new session, it has to re-parse the repository from scratch. For a large Java or TypeScript monolith, that means 5–15 seconds per invocation. Multiply by dozens of agent turns per hour, and repo context acquisition becomes a real bottleneck — not just latency, but tokens, compute, and iteration velocity.
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
ASK Engine solves this with a persistent structural cache keyed on file content hashes. After the first scan, every subsequent invocation returns pre-built context in milliseconds. The repo doesn't change? The cache doesn't expire.
|
|
53
59
|
|
|
54
|
-
**The cache is not a performance optimization. It is what makes
|
|
60
|
+
**The cache is not a performance optimization. It is what makes ASK Engine usable as infrastructure rather than a one-off tool.**
|
|
55
61
|
|
|
56
62
|
---
|
|
57
63
|
|
|
@@ -77,19 +83,19 @@ Cache keyed on content hashes — invalidated only when source changes. On repea
|
|
|
77
83
|
|
|
78
84
|
## What changes at 0.3s vs 2.7s
|
|
79
85
|
|
|
80
|
-
At 2.7s per call, you use
|
|
86
|
+
At 2.7s per call, you use ASK Engine to occasionally inspect a repo.
|
|
81
87
|
|
|
82
|
-
At 0.3s per call, you use
|
|
88
|
+
At 0.3s per call, you use ASK Engine as **constant infrastructure** inside agent loops:
|
|
83
89
|
|
|
84
90
|
```
|
|
85
91
|
agent loop iteration:
|
|
86
|
-
1.
|
|
87
|
-
2.
|
|
92
|
+
1. ask . --compact # 0.3s — instant structural context
|
|
93
|
+
2. ask impact PaymentService . --depth 1 # 0.4s — blast radius check
|
|
88
94
|
3. agent makes targeted change
|
|
89
95
|
4. repeat
|
|
90
96
|
```
|
|
91
97
|
|
|
92
|
-
Sub-second context retrieval changes the cost model for agent workflows. You can call
|
|
98
|
+
Sub-second context retrieval changes the cost model for agent workflows. You can call ASK Engine before every edit, before every PR review, before every test run — without batching or caching calls manually.
|
|
93
99
|
|
|
94
100
|
---
|
|
95
101
|
|
|
@@ -110,11 +116,20 @@ pip install sourcecode
|
|
|
110
116
|
pipx install sourcecode
|
|
111
117
|
```
|
|
112
118
|
|
|
119
|
+
> **Package vs. command.** The install package is still named `sourcecode` this
|
|
120
|
+
> release (renaming the PyPI/Homebrew distribution is a separate, breaking change).
|
|
121
|
+
> Installing it gives you the canonical **`ask`** command plus the deprecated
|
|
122
|
+
> **`sourcecode`** alias. A future release will publish `ask-engine` and drop the
|
|
123
|
+
> alias.
|
|
124
|
+
|
|
113
125
|
### Verify
|
|
114
126
|
|
|
115
127
|
```bash
|
|
128
|
+
ask version
|
|
129
|
+
# ask 2.0.0
|
|
130
|
+
|
|
131
|
+
# the deprecated alias still works (prints a one-line notice to stderr):
|
|
116
132
|
sourcecode version
|
|
117
|
-
# sourcecode 1.59.0
|
|
118
133
|
```
|
|
119
134
|
|
|
120
135
|
---
|
|
@@ -123,52 +138,52 @@ sourcecode version
|
|
|
123
138
|
|
|
124
139
|
```bash
|
|
125
140
|
# High-signal summary — warm cache: ~0.3s, cold: 2–10s depending on repo size
|
|
126
|
-
|
|
141
|
+
ask --compact
|
|
127
142
|
|
|
128
143
|
# Add git hotspots and uncommitted file count
|
|
129
|
-
|
|
144
|
+
ask --compact --git-context
|
|
130
145
|
|
|
131
146
|
# Structured output for AI agents — bounded, noise-free, ready to inject
|
|
132
|
-
|
|
147
|
+
ask --agent
|
|
133
148
|
|
|
134
149
|
# Blast radius: what breaks if this class changes?
|
|
135
|
-
|
|
150
|
+
ask impact OrderService /path/to/repo
|
|
136
151
|
|
|
137
152
|
# Spring Boot 2→3 migration readiness: javax→jakarta blockers, removed APIs
|
|
138
|
-
|
|
153
|
+
ask migrate-check /path/to/repo
|
|
139
154
|
|
|
140
155
|
# Spring semantic audit: TX anomalies + security surface (free)
|
|
141
|
-
|
|
156
|
+
ask spring-audit /path/to/repo
|
|
142
157
|
|
|
143
158
|
# Impact chain: systemic blast radius with TX/SEC enrichment (free)
|
|
144
|
-
|
|
159
|
+
ask impact-chain OrderService /path/to/repo
|
|
145
160
|
|
|
146
161
|
# Event topology: publisher → event → consumer graph (free)
|
|
147
|
-
|
|
162
|
+
ask impact-chain OrderPlacedEvent /path/to/repo --type events
|
|
148
163
|
|
|
149
164
|
# REST endpoint surface
|
|
150
|
-
|
|
165
|
+
ask endpoints /path/to/repo
|
|
151
166
|
|
|
152
167
|
# Request-body validation per endpoint: constraints + custom validators (free)
|
|
153
168
|
# Recovers constraints from the OpenAPI spec, or directly from Java DTO
|
|
154
169
|
# bean-validation annotations when no spec is present.
|
|
155
|
-
|
|
170
|
+
ask validation /path/to/repo
|
|
156
171
|
|
|
157
172
|
# Onboard to an unfamiliar codebase
|
|
158
|
-
|
|
173
|
+
ask onboard /path/to/repo
|
|
159
174
|
|
|
160
175
|
# PR review: risk, test gaps, changed modules
|
|
161
|
-
|
|
176
|
+
ask review-pr /path/to/repo --since main
|
|
162
177
|
|
|
163
178
|
# Bug triage: risk-ranked files by symptom
|
|
164
|
-
|
|
179
|
+
ask fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
165
180
|
```
|
|
166
181
|
|
|
167
182
|
---
|
|
168
183
|
|
|
169
184
|
## Cache system
|
|
170
185
|
|
|
171
|
-
|
|
186
|
+
ASK Engine maintains a persistent cache at `.sourcecode-cache/` inside each repository. Two layers:
|
|
172
187
|
|
|
173
188
|
- **L1 (core):** analysis result keyed by `(git_sha, analysis_flags)`. Survives format changes — you can regenerate `--compact` vs `--agent` views from the same core.
|
|
174
189
|
- **L2 (view):** rendered output keyed by `(core_hash, view_flags)`. Exact output match — no recomputation.
|
|
@@ -179,21 +194,21 @@ sourcecode maintains a persistent cache at `.sourcecode-cache/` inside each repo
|
|
|
179
194
|
|
|
180
195
|
```bash
|
|
181
196
|
# Inspect cache state
|
|
182
|
-
|
|
197
|
+
ask cache status
|
|
183
198
|
|
|
184
199
|
# Warm the cache ahead of an agent session
|
|
185
|
-
|
|
200
|
+
ask cache warm
|
|
186
201
|
|
|
187
202
|
# Clear cache
|
|
188
|
-
|
|
203
|
+
ask cache clear
|
|
189
204
|
|
|
190
205
|
# Check RIS freshness relative to current git HEAD
|
|
191
|
-
|
|
206
|
+
ask cache freshness
|
|
192
207
|
```
|
|
193
208
|
|
|
194
209
|
**`--no-cache`** bypasses both layers and forces a fresh scan. Use in CI or when you need to verify a fresh result.
|
|
195
210
|
|
|
196
|
-
**Visibility:** Cache hits are silent. Use `
|
|
211
|
+
**Visibility:** Cache hits are silent. Use `ask cache status` to see cache size, hit keys, and last-warmed timestamp.
|
|
197
212
|
|
|
198
213
|
---
|
|
199
214
|
|
|
@@ -203,75 +218,75 @@ sourcecode cache freshness
|
|
|
203
218
|
|
|
204
219
|
```bash
|
|
205
220
|
# Inject as first message to agent (bounded, deterministic)
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
221
|
+
ask /repo --compact # ~2,500–4,000 tokens
|
|
222
|
+
ask /repo --agent # ~4,500–5,500 tokens — more detail
|
|
223
|
+
ask onboard /repo # task-structured: entry points, key files, gaps
|
|
209
224
|
```
|
|
210
225
|
|
|
211
226
|
### Before every change — blast radius + TX/SEC check
|
|
212
227
|
|
|
213
228
|
```bash
|
|
214
229
|
# Always target the INTERFACE in Spring projects, not the implementation:
|
|
215
|
-
|
|
216
|
-
|
|
230
|
+
ask impact OrderService /repo # ✓ 30 callers, 11 endpoints
|
|
231
|
+
ask impact OrderServiceImpl /repo # ✗ 0 callers (Spring DI blindness)
|
|
217
232
|
|
|
218
233
|
# Impact chain: blast radius enriched with TX boundary and security surfaces
|
|
219
|
-
|
|
234
|
+
ask impact-chain OrderService /repo
|
|
220
235
|
|
|
221
236
|
# Event topology: who publishes/consumes this event, and in what TX phase?
|
|
222
|
-
|
|
237
|
+
ask impact-chain OrderPlacedEvent /repo --type events
|
|
223
238
|
|
|
224
239
|
# Spring audit: catch TX anomalies before they hit production
|
|
225
|
-
|
|
240
|
+
ask spring-audit /repo --scope tx
|
|
226
241
|
```
|
|
227
242
|
|
|
228
243
|
### Continuous agent loop — delta context
|
|
229
244
|
|
|
230
245
|
```bash
|
|
231
246
|
# Only changed files + their transitive importers — minimal token cost:
|
|
232
|
-
|
|
233
|
-
|
|
247
|
+
ask prepare-context delta /repo --since HEAD~1
|
|
248
|
+
ask . --changed-only --git-context
|
|
234
249
|
```
|
|
235
250
|
|
|
236
251
|
### PR review — structured risk signal
|
|
237
252
|
|
|
238
253
|
```bash
|
|
239
254
|
# JSON for programmatic use:
|
|
240
|
-
|
|
255
|
+
ask review-pr /repo --since main --output review.json
|
|
241
256
|
jq '.ci_decision' review.json # "analysis_success" | "git_ref_error"
|
|
242
257
|
|
|
243
258
|
# Markdown for GitHub comment:
|
|
244
|
-
|
|
259
|
+
ask review-pr /repo --since main --format github-comment
|
|
245
260
|
```
|
|
246
261
|
|
|
247
262
|
### Bug triage — symptom-driven
|
|
248
263
|
|
|
249
264
|
```bash
|
|
250
265
|
# Specific symptoms produce the best signal:
|
|
251
|
-
|
|
252
|
-
|
|
266
|
+
ask fix-bug /repo --symptom "OIDC token refresh fails after realm update"
|
|
267
|
+
ask fix-bug /repo --symptom "NullPointerException in OrderService during checkout"
|
|
253
268
|
|
|
254
269
|
# Generic symptoms produce noisy output — be specific.
|
|
255
|
-
|
|
270
|
+
ask fix-bug /repo --symptom "payment timeout" --output triage.json
|
|
256
271
|
```
|
|
257
272
|
|
|
258
273
|
### In CI — cached, deterministic, fast
|
|
259
274
|
|
|
260
275
|
```bash
|
|
261
276
|
# Content-hash cached — safe to run on every commit; cold only when code changes
|
|
262
|
-
|
|
277
|
+
ask /repo --compact --output context.json
|
|
263
278
|
|
|
264
279
|
# PR gate
|
|
265
|
-
|
|
280
|
+
ask review-pr /repo --since $BASE_REF --output review.json
|
|
266
281
|
DECISION=$(jq -r '.ci_decision' review.json)
|
|
267
282
|
if [ "$DECISION" != "analysis_success" ]; then echo "Review failed: $DECISION"; fi
|
|
268
283
|
```
|
|
269
284
|
|
|
270
285
|
---
|
|
271
286
|
|
|
272
|
-
## What
|
|
287
|
+
## What ASK Engine does (and doesn't)
|
|
273
288
|
|
|
274
|
-
**
|
|
289
|
+
**ASK Engine reduces exploration cost.** It accelerates context acquisition and minimizes repeated repo parsing. It does not replace reading code — it reduces how often an agent needs to.
|
|
275
290
|
|
|
276
291
|
Specifically:
|
|
277
292
|
|
|
@@ -317,10 +332,10 @@ when the work gets bigger or automated.
|
|
|
317
332
|
| Offline, no data egress, no account | ✅ | ✅ |
|
|
318
333
|
|
|
319
334
|
**Non-Java repos are free at any size** — the size limit counts Java source
|
|
320
|
-
files only, by design.
|
|
335
|
+
files only, by design. ASK Engine monetises enterprise Java monoliths.
|
|
321
336
|
|
|
322
337
|
```bash
|
|
323
|
-
|
|
338
|
+
ask activate <key> # activate a license key
|
|
324
339
|
```
|
|
325
340
|
|
|
326
341
|
Full breakdown: [docs/PRODUCT_TIERS.md](docs/PRODUCT_TIERS.md).
|
|
@@ -341,9 +356,9 @@ Core flags. Feed directly to AI agents as first-message context.
|
|
|
341
356
|
### `impact` — blast-radius analysis [free ≤500 Java files · Pro above]
|
|
342
357
|
|
|
343
358
|
```bash
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
359
|
+
ask impact ClassName /path/to/repo
|
|
360
|
+
ask impact org.example.OrderService /path/to/repo # FQN also accepted
|
|
361
|
+
ask impact OrderService . --depth 2 # limit BFS depth
|
|
347
362
|
```
|
|
348
363
|
|
|
349
364
|
| Field | Description |
|
|
@@ -368,9 +383,9 @@ sourcecode impact OrderService . --depth 2 # limit BFS depth
|
|
|
368
383
|
### `endpoints` — REST API surface
|
|
369
384
|
|
|
370
385
|
```bash
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
386
|
+
ask endpoints /path/to/repo
|
|
387
|
+
ask endpoints /path/to/repo --output endpoints.json
|
|
388
|
+
ask endpoints /path/to/repo --by-controller
|
|
374
389
|
```
|
|
375
390
|
|
|
376
391
|
Extracts all Spring MVC (`@GetMapping`, `@PostMapping`, `@RequestMapping`, etc.) and JAX-RS (`@GET`, `@POST`, `@Path`) endpoint methods. Returns HTTP method, path, controller class, and handler method. Each endpoint also carries its `return_type`. `--by-controller` groups the surface per controller (`{by_controller, controller_count, total}`) for an API-surface view.
|
|
@@ -399,10 +414,10 @@ Matching endpoints then report `policy: "custom"` with `annotation`, `resourceNa
|
|
|
399
414
|
### `export` — architecture views for downstream tooling
|
|
400
415
|
|
|
401
416
|
```bash
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
417
|
+
ask export /path/to/repo --by-directory # code map, path:line refs
|
|
418
|
+
ask export /path/to/repo --module-graph # module→module dependencies
|
|
419
|
+
ask export /path/to/repo --integrations # outbound HTTP/LDAP/JMS clients
|
|
420
|
+
ask export /path/to/repo --c4 # unified architecture + manifest
|
|
406
421
|
```
|
|
407
422
|
|
|
408
423
|
Emits **structured, tool-agnostic** codebase views as plain JSON/YAML — the kind of input an architecture-doc generator, diagram renderer, or code-search agent can consume directly instead of walking the tree file by file. Section labels map to the open [C4 model](https://c4model.com) (an open architecture notation, not a product); the schema is vendor-neutral.
|
|
@@ -419,15 +434,15 @@ The section flags compose (pass several for one multi-section document); `--c4`
|
|
|
419
434
|
### `spring-audit` — Spring semantic audit [free]
|
|
420
435
|
|
|
421
436
|
```bash
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
437
|
+
ask spring-audit /path/to/repo
|
|
438
|
+
ask spring-audit /path/to/repo --scope tx # TX anomalies only
|
|
439
|
+
ask spring-audit /path/to/repo --scope security # security surface only
|
|
440
|
+
ask spring-audit /path/to/repo --min-severity high
|
|
426
441
|
|
|
427
442
|
# CI/CD gate: exit 1 on any finding
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
443
|
+
ask spring-audit . --ci
|
|
444
|
+
ask spring-audit . --ci --min-severity high # exit 1 only on high/critical
|
|
445
|
+
ask spring-audit . --ci --format github-comment # Markdown output + exit 1
|
|
431
446
|
```
|
|
432
447
|
|
|
433
448
|
Detects structural Spring anomalies that survive code review and tests, but cause production failures:
|
|
@@ -450,9 +465,9 @@ Endpoints guarded by a project-specific authorization annotation are treated as
|
|
|
450
465
|
### `impact-chain` — systemic blast radius with TX/SEC enrichment [free]
|
|
451
466
|
|
|
452
467
|
```bash
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
468
|
+
ask impact-chain OrderService /path/to/repo
|
|
469
|
+
ask impact-chain com.example.OrderService#placeOrder /path/to/repo
|
|
470
|
+
ask impact-chain PaymentService . --depth 6
|
|
456
471
|
```
|
|
457
472
|
|
|
458
473
|
Unlike `impact` (which traces the caller graph), `impact-chain` builds on the SpringSemanticModel to enrich every step of the blast cone with transaction and security context:
|
|
@@ -479,7 +494,7 @@ Unlike `impact` (which traces the caller graph), `impact-chain` builds on the Sp
|
|
|
479
494
|
**Event topology** — query the publisher/consumer graph for a Spring event class:
|
|
480
495
|
|
|
481
496
|
```bash
|
|
482
|
-
|
|
497
|
+
ask impact-chain OrderPlacedEvent /path/to/repo --type events
|
|
483
498
|
```
|
|
484
499
|
|
|
485
500
|
| Field | Description |
|
|
@@ -499,8 +514,8 @@ sourcecode impact-chain OrderPlacedEvent /path/to/repo --type events
|
|
|
499
514
|
### `cold-start` — RIS bootstrap context
|
|
500
515
|
|
|
501
516
|
```bash
|
|
502
|
-
|
|
503
|
-
|
|
517
|
+
ask cold-start /path/to/repo
|
|
518
|
+
ask cold-start /path/to/repo --compact # ~10K token subset
|
|
504
519
|
```
|
|
505
520
|
|
|
506
521
|
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`.
|
|
@@ -510,12 +525,12 @@ Use `--compact` to get a ~10K token subset safe for direct LLM injection. Full s
|
|
|
510
525
|
### `repo-ir` — symbol-level IR
|
|
511
526
|
|
|
512
527
|
```bash
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
528
|
+
ask repo-ir /path/to/repo --summary-only # ~20K tokens
|
|
529
|
+
ask repo-ir /path/to/repo --since HEAD~1 # symbol-level diff
|
|
530
|
+
ask repo-ir /path/to/repo --files src/.../OrderService.java
|
|
531
|
+
ask repo-ir /path/to/repo --max-nodes 200 --max-edges 500 # limit graph size
|
|
532
|
+
ask repo-ir /path/to/repo --output ir.json.gz --gzip # compressed output (~70-80% smaller)
|
|
533
|
+
ask repo-ir /path/to/repo --include-tests # include test files
|
|
519
534
|
```
|
|
520
535
|
|
|
521
536
|
Builds a deterministic symbol graph: classes, methods, import/injection edges, Spring roles, subsystems.
|
|
@@ -536,9 +551,9 @@ Builds a deterministic symbol graph: classes, methods, import/injection edges, S
|
|
|
536
551
|
### `explain` — architectural summary for a class
|
|
537
552
|
|
|
538
553
|
```bash
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
554
|
+
ask explain UserService
|
|
555
|
+
ask explain OrderController /path/to/repo
|
|
556
|
+
ask explain UserService --format json
|
|
542
557
|
```
|
|
543
558
|
|
|
544
559
|
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.
|
|
@@ -546,8 +561,8 @@ Human-readable architectural summary derived entirely from static analysis: Spri
|
|
|
546
561
|
### `pr-impact` — PR blast-radius report
|
|
547
562
|
|
|
548
563
|
```bash
|
|
549
|
-
|
|
550
|
-
|
|
564
|
+
ask pr-impact --files changed_files.txt
|
|
565
|
+
ask pr-impact /path/to/repo --files diff.txt --format json
|
|
551
566
|
```
|
|
552
567
|
|
|
553
568
|
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.
|
|
@@ -555,13 +570,13 @@ Takes a file listing changed Java files (one path per line) and produces a conso
|
|
|
555
570
|
```bash
|
|
556
571
|
# Typical CI usage: pipe git diff to a file, then run
|
|
557
572
|
git diff --name-only main | grep '\.java$' > changed.txt
|
|
558
|
-
|
|
573
|
+
ask pr-impact . --files changed.txt --format json
|
|
559
574
|
```
|
|
560
575
|
|
|
561
576
|
### `onboard` — codebase orientation
|
|
562
577
|
|
|
563
578
|
```bash
|
|
564
|
-
|
|
579
|
+
ask onboard /path/to/repo
|
|
565
580
|
```
|
|
566
581
|
|
|
567
582
|
Entry points, architecture summary, key files, confidence level, and gaps. Designed to be injected as agent context at the start of a session.
|
|
@@ -569,8 +584,8 @@ Entry points, architecture summary, key files, confidence level, and gaps. Desig
|
|
|
569
584
|
### `review-pr` — PR review context [free ≤500 Java files · Pro above]
|
|
570
585
|
|
|
571
586
|
```bash
|
|
572
|
-
|
|
573
|
-
|
|
587
|
+
ask review-pr /path/to/repo --since main
|
|
588
|
+
ask review-pr /path/to/repo --since HEAD~3
|
|
574
589
|
```
|
|
575
590
|
|
|
576
591
|
Changed files, risk ranking, test coverage gaps, affected modules, and blast radius of changed classes. Returns a `ci_decision` field for CI/CD integration.
|
|
@@ -578,7 +593,7 @@ Changed files, risk ranking, test coverage gaps, affected modules, and blast rad
|
|
|
578
593
|
### `fix-bug` — Bug triage context [free ≤500 Java files · Pro above]
|
|
579
594
|
|
|
580
595
|
```bash
|
|
581
|
-
|
|
596
|
+
ask fix-bug /path/to/repo --symptom "NullPointerException in checkout"
|
|
582
597
|
```
|
|
583
598
|
|
|
584
599
|
Risk-ranked file list correlated to the symptom: keyword extraction, path matching, content matching, git commit correlation.
|
|
@@ -586,7 +601,7 @@ Risk-ranked file list correlated to the symptom: keyword extraction, path matchi
|
|
|
586
601
|
### `modernize` — Modernization planning [free ≤500 Java files · Pro above]
|
|
587
602
|
|
|
588
603
|
```bash
|
|
589
|
-
|
|
604
|
+
ask modernize /path/to/repo
|
|
590
605
|
```
|
|
591
606
|
|
|
592
607
|
High-coupling nodes (high fan-in = risky to change), dead zone candidates (isolated symbols), subsystem tangles.
|
|
@@ -594,10 +609,10 @@ High-coupling nodes (high fan-in = risky to change), dead zone candidates (isola
|
|
|
594
609
|
### `migrate-check` — Spring Boot 2→3 migration readiness
|
|
595
610
|
|
|
596
611
|
```bash
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
612
|
+
ask migrate-check /path/to/repo
|
|
613
|
+
ask migrate-check . --min-severity high
|
|
614
|
+
ask migrate-check . --format text
|
|
615
|
+
ask migrate-check . --output migration.json
|
|
601
616
|
```
|
|
602
617
|
|
|
603
618
|
Detects migration blockers across Java source files, Spring XML config files, and Maven/Gradle build files. 27 rules organized by target:
|
|
@@ -774,19 +789,19 @@ evidence. `migrate-check` enforces:
|
|
|
774
789
|
|
|
775
790
|
```bash
|
|
776
791
|
# inspect only the Hibernate rewrite targets
|
|
777
|
-
|
|
792
|
+
ask migrate-check . --format json | jq '.hibernate.rewrite_targets[]'
|
|
778
793
|
|
|
779
794
|
# product blockers only (excludes test/fixtures + hygiene)
|
|
780
|
-
|
|
795
|
+
ask migrate-check . --format json | jq '.blocking_count, .non_blocking, .hygiene_findings'
|
|
781
796
|
```
|
|
782
797
|
|
|
783
798
|
### `rename-class` — Java class rename
|
|
784
799
|
|
|
785
800
|
```bash
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
801
|
+
ask rename-class . --from ServiceA --to ServiceB
|
|
802
|
+
ask rename-class /path/to/repo --from OrderManager --to OrderService
|
|
803
|
+
ask rename-class . --from OldName --to NewName --dry-run
|
|
804
|
+
ask rename-class . --from OldName --to NewName --no-tests # src/main only
|
|
790
805
|
```
|
|
791
806
|
|
|
792
807
|
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`).
|
|
@@ -796,10 +811,10 @@ Use `--dry-run` to preview changes without writing to disk.
|
|
|
796
811
|
### `chunk-file` — split large Java files for agent consumption
|
|
797
812
|
|
|
798
813
|
```bash
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
814
|
+
ask chunk-file BigService.java
|
|
815
|
+
ask chunk-file BigService.java --max-lines 300
|
|
816
|
+
ask chunk-file BigService.java --chunk 5 # read chunk 5 only
|
|
817
|
+
ask chunk-file BigService.java --metadata-only # boundaries only, no content
|
|
803
818
|
```
|
|
804
819
|
|
|
805
820
|
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.
|
|
@@ -809,7 +824,7 @@ Splits a large Java file at method/class boundaries so AI agents can read files
|
|
|
809
824
|
Low-level access to all tasks with full options:
|
|
810
825
|
|
|
811
826
|
```bash
|
|
812
|
-
|
|
827
|
+
ask prepare-context TASK [PATH] [OPTIONS]
|
|
813
828
|
```
|
|
814
829
|
|
|
815
830
|
| Task | What it surfaces |
|
|
@@ -868,9 +883,9 @@ All outputs include:
|
|
|
868
883
|
Anonymous, **on by default (opt-out)**. Collects: version, OS, commands, flags, duration, repo size range, errors. No source code, paths, secrets, or output content. A one-time notice is shown on first interactive run.
|
|
869
884
|
|
|
870
885
|
```bash
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
886
|
+
ask telemetry status
|
|
887
|
+
ask telemetry enable
|
|
888
|
+
ask telemetry disable
|
|
874
889
|
```
|
|
875
890
|
|
|
876
891
|
Disable any time: `export SOURCECODE_TELEMETRY=0` (or `DO_NOT_TRACK=1`)
|
|
@@ -880,7 +895,7 @@ Disable any time: `export SOURCECODE_TELEMETRY=0` (or `DO_NOT_TRACK=1`)
|
|
|
880
895
|
## Configuration
|
|
881
896
|
|
|
882
897
|
```bash
|
|
883
|
-
|
|
898
|
+
ask config # show version, config file path, telemetry status
|
|
884
899
|
```
|
|
885
900
|
|
|
886
901
|
### `sourcecode.config.json` (repo root)
|