java-codebase-rag 0.8.0__py3-none-any.whl → 0.9.0__py3-none-any.whl
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.
- java_codebase_rag/cli.py +14 -1
- java_codebase_rag/install_data/agents/explorer-rag-cli.md +65 -208
- java_codebase_rag/install_data/agents/explorer-rag-enhanced.md +78 -232
- java_codebase_rag/install_data/skills/explore-codebase/SKILL.md +44 -83
- java_codebase_rag/install_data/skills/explore-codebase-cli/SKILL.md +67 -135
- java_codebase_rag/installer.py +310 -32
- java_codebase_rag/jrag.py +112 -7
- java_codebase_rag/jrag_envelope.py +1 -1
- java_codebase_rag/jrag_render.py +12 -3
- java_codebase_rag/lance_optimize.py +18 -0
- java_codebase_rag/pipeline.py +14 -0
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/METADATA +2 -2
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/RECORD +20 -20
- mcp_v2.py +82 -26
- search_lancedb.py +149 -3
- server.py +11 -0
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/WHEEL +0 -0
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/entry_points.txt +0 -0
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/licenses/LICENSE +0 -0
- {java_codebase_rag-0.8.0.dist-info → java_codebase_rag-0.9.0.dist-info}/top_level.txt +0 -0
|
@@ -5,80 +5,63 @@ description: "MUST BE USED PROACTIVELY. Universal read-only codebase exploration
|
|
|
5
5
|
|
|
6
6
|
# /explore-codebase-cli — Universal codebase exploration via `jrag`
|
|
7
7
|
|
|
8
|
-
Read-only exploration combining **graph navigation through the `jrag` CLI** with **broad file-system search**.
|
|
8
|
+
Read-only exploration combining **graph navigation through the `jrag` CLI** with **broad file-system search**. `jrag` loads the same index as the MCP server but exposes one shell command per intent instead of five MCP tools.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Any time you need to search, locate, navigate, or explore the codebase. **Do NOT use when** the answer is already in open context or for a single known file — read that file directly.
|
|
10
|
+
Use any time you must search, locate, navigate, or explore. **Do NOT use when** the answer is already in context or for a single known file — read it directly.
|
|
13
11
|
|
|
14
12
|
## Core Principles
|
|
15
13
|
|
|
16
14
|
1. **Read-only.** Never edit, write, or modify any file.
|
|
17
|
-
2. **Names in, names out.** Every `<query>` is human-readable (FQN / simple name / route path / topic). Raw node IDs
|
|
18
|
-
3. **One command per intent.** `jrag` collapses resolve + walk into one call
|
|
15
|
+
2. **Names in, names out.** Every `<query>` is human-readable (FQN / simple name / route path / topic). Raw node IDs never required.
|
|
16
|
+
3. **One command per intent.** `jrag` collapses resolve + walk into one call — don't chain resolve→describe→neighbors manually.
|
|
19
17
|
4. **Stop when answered.** Don't prefetch unrelated subgraphs or directories.
|
|
20
18
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| Aspect | `jrag` CLI | MCP server (`java-codebase-rag-mcp`) |
|
|
24
|
-
| --- | --- | --- |
|
|
25
|
-
| Surface | Shell — one command per intent | 5 stdio MCP tools (`search` / `find` / `describe` / `neighbors` / `resolve`) |
|
|
26
|
-
| Resolve | **Internalized** — every `<query>` command runs `resolve_v2` first | Explicit — agent calls `resolve` then `describe` / `neighbors` |
|
|
27
|
-
| Output | Compact text by default; `--format json` for the envelope; `--detail brief\|normal\|full` (orthogonal to format) | JSON-RPC envelope |
|
|
28
|
-
| Host fit | Any agent that can run shell commands | MCP-aware hosts (Claude Code, Claude Desktop, Qwen Code, GigaCode) |
|
|
29
|
-
| Index | Reuses the operator's `~/.java-codebase-rag` / `.java-codebase-rag/` index | Same |
|
|
30
|
-
|
|
31
|
-
Pick **one** surface per project — running both strands the agent in two vocabularies. This skill is for the CLI surface.
|
|
19
|
+
**One surface per project.** This is the CLI surface; the MCP surface (`search`/`find`/`describe`/`neighbors`/`resolve`) is mutually exclusive — running both strands the agent in two vocabularies.
|
|
32
20
|
|
|
33
21
|
## Prerequisite: index must exist
|
|
34
22
|
|
|
35
|
-
`jrag` is a thin
|
|
23
|
+
`jrag` is a thin layer over the existing index. If unindexed, every command exits 2:
|
|
36
24
|
|
|
37
25
|
```
|
|
38
26
|
status: error
|
|
39
27
|
message: No index at <path>. Run: java-codebase-rag init --source-root <root>
|
|
40
28
|
```
|
|
41
29
|
|
|
42
|
-
Verify with `jrag status`
|
|
30
|
+
Verify with `jrag status` when in doubt.
|
|
43
31
|
|
|
44
32
|
## Tool Inventory
|
|
45
33
|
|
|
46
34
|
### `jrag` command groups
|
|
47
35
|
|
|
48
|
-
Run `jrag --help` for the canonical list.
|
|
36
|
+
Run `jrag --help` for the canonical list.
|
|
49
37
|
|
|
50
38
|
| Group | Commands |
|
|
51
39
|
| --- | --- |
|
|
52
40
|
| **Orientation** | `status`, `microservices`, `map`, `conventions`, `overview` |
|
|
53
41
|
| **Locate** | `find`, `search` |
|
|
54
|
-
| **Listings** | `routes`, `clients`, `producers`, `topics`, `jobs`, `listeners`, `entities` |
|
|
55
|
-
| **Traversal** | `callers`, `callees`, `hierarchy`, `implementations`, `subclasses`, `overrides`, `overridden-by`, `dependents`, `impact`, `flow`, `dependencies`, `connection` |
|
|
42
|
+
| **Listings** | `http-routes`, `http-clients`, `producers`, `topics`, `jobs`, `listeners`, `entities` |
|
|
43
|
+
| **Traversal** | `callers`, `callees`, `hierarchy`, `implementations`, `subclasses`, `overrides`, `overridden-by`, `dependents`, `impact`, `flow`, `decompose`, `dependencies`, `connection` |
|
|
56
44
|
| **Inspection** | `inspect`, `outline`, `imports` |
|
|
57
45
|
|
|
58
|
-
### Common flags
|
|
46
|
+
### Common flags
|
|
59
47
|
|
|
60
48
|
```
|
|
61
|
-
--service <name>
|
|
62
|
-
--module <name>
|
|
63
|
-
--limit <N>
|
|
64
|
-
--format text|json
|
|
65
|
-
--detail brief|normal|full
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
--index-dir <path> Index directory override (default: discovered from cwd)
|
|
49
|
+
--service <name> Filter by microservice
|
|
50
|
+
--module <name> Filter by module
|
|
51
|
+
--limit <N> Cap on results (default 20; 10 for fan-out)
|
|
52
|
+
--format text|json Output format (default: text)
|
|
53
|
+
--detail brief|normal|full How much of each node/edge is shown (default: normal);
|
|
54
|
+
orthogonal to --format. brief=name @service;
|
|
55
|
+
normal=+module/role/file/score; full=+signature/
|
|
56
|
+
annotations/snippet. inspect + orientation default to full.
|
|
57
|
+
--index-dir <path> Index directory override (default: discovered from cwd)
|
|
71
58
|
```
|
|
72
59
|
|
|
73
|
-
`--offset` is supported **only** on `find` and `search
|
|
60
|
+
`--offset` is supported **only** on `find` and `search`. Other commands emit `truncated: more results — narrow your query` when capped.
|
|
74
61
|
|
|
75
62
|
### File-system tools
|
|
76
63
|
|
|
77
|
-
-
|
|
78
|
-
- **Glob** — find files by name/path pattern (`**/*.java`, `**/*Controller*.java`, `**/application*.yml`)
|
|
79
|
-
- **Read** — read files (`offset`/`limit` for large files)
|
|
80
|
-
|
|
81
|
-
### Other: **Bash** (read-only: `git log`, `git blame`, `ls`, `find`), **WebSearch**/**WebFetch** (external lookups)
|
|
64
|
+
`Grep` (content/regex), `Glob` (name/path patterns), `Read` (`offset`/`limit`). Plus `Bash` (read-only: `git log`, `git blame`, `ls`, `find`), `WebSearch`/`WebFetch`.
|
|
82
65
|
|
|
83
66
|
---
|
|
84
67
|
|
|
@@ -87,74 +70,49 @@ Run `jrag --help` for the canonical list. Groups (PR-JRAG-1a..4):
|
|
|
87
70
|
| User asks… | First `jrag` command | Follow-up |
|
|
88
71
|
| ---------- | -------------------- | --------- |
|
|
89
72
|
| "Is the index fresh?" | `jrag status` | — |
|
|
90
|
-
| Identifier
|
|
73
|
+
| Identifier (FQN / simple name) | `jrag inspect <query>` | `callers` / `callees` |
|
|
91
74
|
| Fuzzy / NL "where is X" | `jrag search "<text>"` | `inspect <hit>` |
|
|
92
|
-
| All controllers in
|
|
93
|
-
| Interfaces in
|
|
75
|
+
| All controllers in S | `jrag find --role CONTROLLER --service S` | `callees` |
|
|
76
|
+
| Interfaces in S | `jrag find --java-kind interface --service S` | `implementations` |
|
|
94
77
|
| HTTP / messaging entry points | `jrag http-routes [--framework …] [--method …]` | `inspect <route>` |
|
|
95
78
|
| Outbound HTTP clients | `jrag http-clients [--calls-service …]` | `callees <client>` |
|
|
96
79
|
| Outbound async producers | `jrag producers [--topic-contains …]` | `callees <producer>` |
|
|
97
80
|
| Topics + consumers/producers | `jrag topics [--topic-contains …]` | — |
|
|
98
|
-
| Who calls
|
|
99
|
-
| What does M call? | `jrag callees <M>` | `inspect <callee>` |
|
|
81
|
+
| Who calls / what does M call? | `jrag callers <M>` / `jrag callees <M>` | `inspect` |
|
|
100
82
|
| Who hits this route? | `jrag callers <route>` | — |
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
| Methods that override me? | `jrag overridden-by <method>` | — |
|
|
105
|
-
| Who injects T? | `jrag dependencies <T>` | — |
|
|
106
|
-
| Who depends on T? | `jrag dependents <T>` | — |
|
|
83
|
+
| Implementations / subtypes of T? | `jrag implementations <T>` / `jrag subclasses <T>` | — |
|
|
84
|
+
| Overriding / overridden methods? | `jrag overrides <method>` (UP) / `jrag overridden-by <method>` | — |
|
|
85
|
+
| Who injects / depends on T? | `jrag dependencies <T>` / `jrag dependents <T>` | — |
|
|
107
86
|
| Blast-radius of changing X? | `jrag impact <X>` (bounded fan-in) | `Grep` fallback |
|
|
108
87
|
| Trace request flow A→B | `jrag flow <route>` | `connection <A> <B>` |
|
|
109
|
-
| File outline | `jrag outline <file>` | `inspect <row>` |
|
|
110
|
-
|
|
|
111
|
-
| "Explain service S" | `jrag overview <service>` | `http-routes` / `http-clients` / `producers` |
|
|
88
|
+
| File outline / imports | `jrag outline <file>` / `jrag imports <file>` | `inspect <row>` |
|
|
89
|
+
| "Explain service S" | `jrag overview <service>` | `http-routes`/`http-clients`/`producers` |
|
|
112
90
|
| "Explain route /topic" | `jrag overview <subject>` | `flow` |
|
|
113
|
-
| Find files
|
|
114
|
-
| Search for text in files | `Grep` | `Read` |
|
|
91
|
+
| Find files / text | `Glob` / `Grep` | `Read` |
|
|
115
92
|
| Who changed X and when? | Bash: `git log`/`git blame` | — |
|
|
116
|
-
| "How is this configured?" | `Glob` + `Grep
|
|
93
|
+
| "How is this configured?" | `Glob` + `Grep`; `jrag search "<key>" --table yaml` | `Read` sections |
|
|
117
94
|
|
|
118
|
-
**Escalation:** ① Most targeted command first → ②
|
|
95
|
+
**Escalation:** ① Most targeted command first → ② fall back gracefully (`callers` empty → `Grep`) → ③ cross-validate (CLI vs file disagree → **trust the file** — index may be stale).
|
|
119
96
|
|
|
120
|
-
**Rules of thumb:**
|
|
97
|
+
**Rules of thumb:** structure beats vector for exact questions (`find`/`inspect` + traversal); vector beats structure for fuzzy discovery (`search`); file-system beats stale index.
|
|
121
98
|
|
|
122
99
|
---
|
|
123
100
|
|
|
124
101
|
## Resolve-first contract (every `<query>` command)
|
|
125
102
|
|
|
126
|
-
Every `jrag` command that takes a `<query>` runs `resolve_v2` internally
|
|
103
|
+
Every `jrag` command that takes a `<query>` runs `resolve_v2` internally:
|
|
127
104
|
|
|
128
105
|
| `resolve_v2` status | `jrag` behavior |
|
|
129
106
|
| --- | --- |
|
|
130
107
|
| `one` | Run the traversal/listing against the resolved node. |
|
|
131
|
-
| `many` | Return the candidate list and stop. **No auto-pick.** Disambiguate with `--kind
|
|
132
|
-
| `none` |
|
|
108
|
+
| `many` | Return the candidate list and stop. **No auto-pick.** Disambiguate with `--kind`/`--role`/`--fqn-contains`/`--service`; re-run. |
|
|
109
|
+
| `none` | `status: not_found` envelope (exit 0). Fall back to `search` or `Grep`. |
|
|
133
110
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### Disambiguation flags
|
|
137
|
-
|
|
138
|
-
Only `--kind` is a true resolve input (`hint_kind`). The other narrowing flags (`--role`, `--java-kind`, `--fqn-contains`, `--service`, `--module`) post-filter the resolve result client-side. If a post-filter collapses `many` → `one`, the command proceeds; if it still leaves `many`, the narrowed candidates are returned.
|
|
139
|
-
|
|
140
|
-
---
|
|
111
|
+
Never look up a raw node ID — pass an FQN, simple name, prior `sym:`/`route:`/`client:`/`producer:` id, route path, or topic. Only `--kind` is a true resolve input; `--role`/`--java-kind`/`--fqn-contains` post-filter client-side, while `--service`/`--module` are resolve-time filters on `inspect`/`callers` and result filters elsewhere.
|
|
141
112
|
|
|
142
113
|
## Output envelope
|
|
143
114
|
|
|
144
|
-
`--format` (text|json)
|
|
145
|
-
`--format` picks the representation, `--detail` picks how much of each node/edge is
|
|
146
|
-
shown, and **both modes honor the same detail level** through one projection seam.
|
|
147
|
-
|
|
148
|
-
- Default is `text` + `normal`: a one-line-per-row listing that includes
|
|
149
|
-
`name @service module=… role=… file=… score=…` (the cheap, high-value fields).
|
|
150
|
-
`inspect` and the orientation commands default to `full` (their purpose is detail).
|
|
151
|
-
- `--detail brief` reproduces the ultra-terse `name @service` line (escape hatch).
|
|
152
|
-
- `--detail full` adds an indented block per row (`signature`, `annotations`,
|
|
153
|
-
`snippet` for search, `data`/`edge_summary` for inspect).
|
|
154
|
-
- `--format json` emits the **projected** envelope (same field set as the text at
|
|
155
|
-
that detail level). Empty fields are dropped at every level (no `null` noise).
|
|
156
|
-
|
|
157
|
-
`--format json` envelope shape (fields omitted when empty):
|
|
115
|
+
`--format` (text|json) picks the representation; `--detail` (brief|normal|full) picks how much of each node/edge shows — **both honor the same detail level**. Default: `text` + `normal`. `inspect` and orientation commands default to `full`. `--format json` emits the projected envelope (empty fields dropped):
|
|
158
116
|
|
|
159
117
|
```json
|
|
160
118
|
{
|
|
@@ -168,52 +126,31 @@ shown, and **both modes honor the same detail level** through one projection sea
|
|
|
168
126
|
}
|
|
169
127
|
```
|
|
170
128
|
|
|
171
|
-
|
|
172
|
-
- `agent_next_actions` is a CLI-native hint list (≤5) mapping the current result's edge labels to the next `jrag` command — use it as a starting point, not a directive.
|
|
173
|
-
- `file_location` is populated only on `one`-hit resolve (carries the resolved node's `filename` + `start_line`).
|
|
174
|
-
|
|
175
|
-
---
|
|
129
|
+
`truncated` is computed via +1-fetch on `find`/`search` (use `--limit`, then `--offset`); other commands emit the `more results` message when capped. `agent_next_actions` (≤5) maps result edges to next commands — a starting point, not a directive. `file_location` populates only on `one`-hit resolve.
|
|
176
130
|
|
|
177
131
|
## Traversal direction reference
|
|
178
132
|
|
|
179
|
-
`jrag` abstracts away `direction
|
|
133
|
+
`jrag` abstracts away `direction`/`edge_types` — you name the intent, it picks the edges:
|
|
180
134
|
|
|
181
135
|
| Intent (command) | Underlying edges |
|
|
182
136
|
| --- | --- |
|
|
183
|
-
| `callers` | `CALLS`
|
|
184
|
-
| `
|
|
185
|
-
| `
|
|
186
|
-
| `
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `
|
|
191
|
-
| `dependents` | `INJECTS` direction=in |
|
|
192
|
-
| `impact` | bounded fan-in: `CALLS`/`INJECTS`/`IMPLEMENTS`/`EXTENDS` direction=in (depth ≤2) |
|
|
193
|
-
| `flow <route>` | `trace_request_flow`: `EXPOSES`/`HTTP_CALLS`/`ASYNC_CALLS`/`CALLS` |
|
|
194
|
-
| `connection A B` | bounded search over the same edge set between A and B |
|
|
195
|
-
|
|
196
|
-
### Node id prefixes (from prior results)
|
|
137
|
+
| `callers` / `callees` | `CALLS` in / out |
|
|
138
|
+
| `hierarchy` | `EXTENDS` + `IMPLEMENTS`, both directions (parents + children) |
|
|
139
|
+
| `implementations` / `subclasses` | `IMPLEMENTS` / `EXTENDS` in |
|
|
140
|
+
| `overrides` / `overridden-by` | `OVERRIDES` out (subtype→supertype) / in |
|
|
141
|
+
| `dependencies` / `dependents` | `INJECTS` out / in |
|
|
142
|
+
| `impact` | bounded fan-in: `INJECTS`/`IMPLEMENTS`/`EXTENDS` in (depth ≤2) |
|
|
143
|
+
| `flow <route>` | `EXPOSES`/`HTTP_CALLS`/`ASYNC_CALLS`/`CALLS` |
|
|
144
|
+
| `connection A B` | bounded search over the same edge set |
|
|
197
145
|
|
|
198
|
-
`sym:` (Symbol), `route:`/`r:` (Route), `client:`/`c:` (Client), `producer:`/`p:` (Producer).
|
|
199
|
-
|
|
200
|
-
### Symbol FQN shape
|
|
201
|
-
|
|
202
|
-
`<package>.<Type>[.<NestedType>]#<methodName>(<SimpleType1>,<SimpleType2>,…)`. Generics erased, no spaces after commas. No-arg: `()`. Constructor: `#<init>(...)`.
|
|
203
|
-
|
|
204
|
-
---
|
|
146
|
+
**Node id prefixes (from prior results):** `sym:` (Symbol), `route:`/`r:` (Route), `client:`/`c:` (Client), `producer:`/`p:` (Producer). **Symbol FQN:** `<package>.<Type>[.<NestedType>]#<methodName>(<SimpleType1>,…)` — generics erased, no spaces after commas, no-arg `()`, constructor `#<init>(...)`.
|
|
205
147
|
|
|
206
148
|
## Ontology glossary
|
|
207
149
|
|
|
208
150
|
**Roles:** `CONTROLLER` | `SERVICE` | `REPOSITORY` | `COMPONENT` | `CONFIG` | `ENTITY` | `CLIENT` | `MAPPER` | `DTO` | `OTHER`.
|
|
209
|
-
|
|
210
151
|
**Capabilities:** `MESSAGE_LISTENER`, `MESSAGE_PRODUCER`, `HTTP_CLIENT`, `SCHEDULED_TASK`, `EXCEPTION_HANDLER`.
|
|
211
|
-
|
|
212
152
|
**Symbol kinds:** `class`, `interface`, `enum`, `record`, `annotation`, `method`, `constructor`.
|
|
213
|
-
|
|
214
|
-
**Route frameworks:** `spring_mvc`, `webflux`. Route *kinds*: `http_endpoint`, `http_consumer`, `kafka_topic`, `rabbit_queue`, `jms_destination`, `stream_binding`.
|
|
215
|
-
|
|
216
|
-
**Client kinds:** `feign_method`, `rest_template`, `web_client`. **Producer kinds:** `kafka_send`, `stream_bridge_send`. **Source layers (client/producer):** `builtin`, `layer_a_meta`, `layer_b_ann`, `layer_b_fqn`, `layer_c_source`.
|
|
153
|
+
**Route frameworks:** `spring_mvc`/`webflux` (HTTP), `kafka`/`rabbitmq`/`jms`/`stream` (messaging), `feign` (client mirrors). Route *kinds*: `http_endpoint`, `http_consumer`, `kafka_topic`, `rabbit_queue`, `jms_destination`, `stream_binding`. **Client kinds:** `feign_method`, `rest_template`, `web_client`. **Producer kinds:** `kafka_send`, `stream_bridge_send`. **Source layers:** `builtin`, `layer_a_meta`, `layer_b_ann`, `layer_b_fqn`, `layer_c_source`.
|
|
217
154
|
|
|
218
155
|
---
|
|
219
156
|
|
|
@@ -223,29 +160,24 @@ shown, and **both modes honor the same detail level** through one projection sea
|
|
|
223
160
|
|
|
224
161
|
| Symptom | Fix |
|
|
225
162
|
| ------- | --- |
|
|
226
|
-
| `status: error` "No index at …" | Run `java-codebase-rag init --source-root <root
|
|
227
|
-
| `status: not_found` |
|
|
228
|
-
| `many` candidates
|
|
229
|
-
| `find`
|
|
230
|
-
| Empty `search` | Try `--table all`; `find --fqn-contains`; `Grep`
|
|
231
|
-
| `truncated: true` | Narrow
|
|
232
|
-
| Empty
|
|
163
|
+
| `status: error` "No index at …" | Run `java-codebase-rag init --source-root <root>`; retry |
|
|
164
|
+
| `status: not_found` | `jrag search "<query>"`; or `find --fqn-contains …`; fallback `Grep` |
|
|
165
|
+
| `many` candidates | Add `--kind`/`--role`/`--fqn-contains`/`--service`; re-run |
|
|
166
|
+
| `find` too broad | Add `--service`, `--fqn-contains`, `--path-contains`, `--topic-contains` |
|
|
167
|
+
| Empty `search` | Try `--table all`; `find --fqn-contains`; `Grep` |
|
|
168
|
+
| `truncated: true` | Narrow, or page with `--offset` (`find`/`search` only) |
|
|
169
|
+
| Empty across commands | Index missing/stale → `Grep`/`Glob`/`Read`; ask operator to rebuild (`java-codebase-rag reprocess`) |
|
|
233
170
|
| CLI vs file disagree | **Trust the file**; report stale index |
|
|
234
|
-
| `--offset` rejected | Only `find`/`search` accept it;
|
|
235
|
-
| Wrong node picked | Resolve
|
|
171
|
+
| `--offset` rejected | Only `find`/`search` accept it; others narrow via filters |
|
|
172
|
+
| Wrong node picked | Resolve ambiguous — pass `--kind` |
|
|
236
173
|
|
|
237
174
|
---
|
|
238
175
|
|
|
239
176
|
## Workflow Patterns
|
|
240
177
|
|
|
241
|
-
**"Explain feature X":** `jrag search "X"` → pick 1–3 hits → `jrag inspect <hit>` → targeted traversal (`callees`/`implementations`) → stop when answered.
|
|
242
|
-
|
|
243
|
-
**"
|
|
244
|
-
|
|
245
|
-
**"
|
|
246
|
-
|
|
247
|
-
**"Trace flow from A to B":** `jrag flow <route-A>` to trace the request → `jrag connection A B` to confirm a path → `Grep` gaps → report with file:line.
|
|
248
|
-
|
|
249
|
-
**"How is this configured?":** `Glob` for `**/application*.yml` → `Grep` for the key → `Read` sections → `jrag search "<key>" --table yaml` supplement.
|
|
250
|
-
|
|
251
|
-
**"Orient in a new service":** `jrag overview <service>` (bundle) → `jrag conventions --service <service>` (dominant roles) → `jrag map --service <service>` (counts) → `jrag http-routes --service <service>` (entry points).
|
|
178
|
+
- **"Explain feature X":** `jrag search "X"` → pick 1–3 hits → `jrag inspect <hit>` → targeted traversal (`callees`/`implementations`) → stop when answered.
|
|
179
|
+
- **"Where is X used?":** `jrag inspect <X>` → `jrag callers <X>` + `jrag dependents <X>` → `Grep` fallback → report sites with file:line.
|
|
180
|
+
- **"Find all Y":** structural → `jrag find --role <ROLE> [--service <S>]`; textual → `Grep`; broad → `Glob`+`Grep`. Summarize, don't dump.
|
|
181
|
+
- **"Trace flow A→B":** `jrag flow <route-A>` → `jrag connection A B` → `Grep` gaps → report with file:line.
|
|
182
|
+
- **"How is this configured?":** `Glob` `**/application*.yml` → `Grep` the key → `Read` sections → `jrag search "<key>" --table yaml`.
|
|
183
|
+
- **"Orient in a new service":** `jrag overview <S>` → `jrag conventions --service <S>` → `jrag map --service <S>` → `jrag http-routes --service <S>`.
|