Skip to content

Commit 993ee9b

Browse files
sync docs and agent files with landed hints and ontology 13
Move HINTS propose/plan to completed, refresh AGENT-GUIDE, README, verification checklist, exploration skill, and architecture paper (five tools, ten edges, no Karpathy cite); rebuild paper.pdf. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1fa1b28 commit 993ee9b

15 files changed

Lines changed: 73 additions & 70 deletions

.cursor/rules/project-overview.mdc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ when needed.
1919
## Where to look
2020

2121
- `README.md` — feature surface, env vars, ranking, capabilities,
22-
MCP tools (`search` / `find` / `describe` / `neighbors` / `resolve`), `java-codebase-rag` CLI,
22+
MCP tools (`search` / `find` / `describe` / `neighbors` / `resolve`; response
23+
`hints` + pagination echo on locate tools — see README), `java-codebase-rag` CLI,
2324
"Re-index required" callouts. The current
2425
`ontology_version` is **13** (material `OVERRIDES` Symbol→Symbol edges: subtype
2526
instance method → supertype declaration with matching `signature`, one
@@ -57,6 +58,7 @@ when needed.
5758
| `graph_enrich.py` | `module` / `microservice` resolution, `BrownfieldOverrides` (route + role + capability + http client + async producer), meta-annotation walk, `resolve_routes_for_method` / `resolve_http_client_for_method` / `resolve_async_producer_for_method`. |
5859
| `java_ontology.py` | Source of truth for `VALID_ROLES`, `VALID_CAPABILITIES`, `VALID_CLIENT_KINDS`, `VALID_HTTP_CALL_STRATEGIES`, `VALID_ASYNC_CALL_STRATEGIES`, `VALID_HTTP_CALL_MATCHES`. |
5960
| `chunk_heuristics.py` | Query-time chunk hints (no AST / no re-index). |
61+
| `mcp_hints.py` | MCP v2 road-sign `hints` catalog (`generate_hints`; locked v1 templates in `propose/completed/HINTS-ROAD-SIGNS-PROPOSE.md`). |
6062
| `index_common.py` | Embedding config (no CocoIndex dep). |
6163
| `java_index_flow_lancedb.py` | CocoIndex flow (used by `java-codebase-rag init` / `increment` / `reprocess` / `erase`). |
6264
| `java_index_v1_common.py` | Shared file walker / exclude patterns. |

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ for tools that don't read `.cursor/rules/`.
88
## Where to look
99

1010
- `README.md` — feature surface, env vars, ranking, capabilities,
11-
MCP tool list (`search` / `find` / `describe` / `neighbors` / `resolve`),
11+
MCP tool list (`search` / `find` / `describe` / `neighbors` / `resolve`;
12+
response `hints` + pagination echo — see README),
1213
CLI ops (`java-codebase-rag --help`), and "Re-index required" callouts.
1314
**`ontology_version` is currently 13** (stored `OVERRIDES` method→method edges traversable via `neighbors`; plus v12 HTTP brownfield rename, `CodebaseHttpMethod` enum, inbound HTTP layer-C replace — see README graph section).
1415
- [`docs/JAVA-CODEBASE-RAG-CLI.md`](./docs/JAVA-CODEBASE-RAG-CLI.md) — operator guide for the `java-codebase-rag` CLI (`init` / `increment` / `reprocess` / `erase`, `meta`, `tables`, `diagnose-ignore`, `analyze-pr`; hidden `refresh` alias → `reprocess` — see that doc).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ Example:
261261
{"kind":"symbol","filter":{"microservice":"chat-core","symbol_kind":"interface"}}
262262
```
263263

264-
**MCP v2 response extras (`hints`, pagination echo):** On success, `search`, `find`, `describe`, and `neighbors` return a `hints` field (`list[str]`, capped at five unique strings) with short, templated suggestions for likely next tool calls; hints are advisory. `hints` is always empty when `success` is false. `search` and `find` additionally echo the request’s `limit` and `offset` on success; on failure those echoed fields are omitted (`null` in JSON). The find page-full hint fires only when another page may exist (handler over-fetches by one row; not exposed on the output model). `neighbors` echoes `requested_edge_types` (deduped edge labels from the request) on success for empty-result hints and diagnostics. See [`propose/HINTS-ROAD-SIGNS-PROPOSE.md`](./propose/HINTS-ROAD-SIGNS-PROPOSE.md) Appendix A for the locked v1 template catalog.
264+
**MCP v2 response extras (`hints`, pagination echo):** On success, `search`, `find`, `describe`, and `neighbors` return a `hints` field (`list[str]`, capped at five unique strings) with short, templated suggestions for likely next tool calls; hints are advisory. `hints` is always empty when `success` is false. `search` and `find` additionally echo the request’s `limit` and `offset` on success; on failure those echoed fields are omitted (`null` in JSON). The find page-full hint fires only when another page may exist (handler over-fetches by one row; not exposed on the output model). `neighbors` echoes `requested_edge_types` (deduped edge labels from the request) on success for empty-result hints and diagnostics. See [`propose/completed/HINTS-ROAD-SIGNS-PROPOSE.md`](./propose/completed/HINTS-ROAD-SIGNS-PROPOSE.md) Appendix A for the locked v1 template catalog.
265265

266266
---
267267

docs/AGENT-GUIDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
> replace same-method built-in rows). **Design rationale:** navigation surface and tools —
2121
> [`propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md`](../propose/completed/MCP-API-V2-REDESIGN-PROPOSE.md);
2222
> HTTP brownfield rename, `CodebaseHttpMethod`, and exclusivity —
23-
> [`propose/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md`](../propose/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md).
23+
> [`propose/completed/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md`](../propose/completed/HTTP-ROUTE-METHOD-ENUM-PROPOSE.md).
2424
2525
---
2626

@@ -35,6 +35,8 @@ This MCP indexes Java enterprise projects into two stores:
3535

3636
**MCP surface (navigation only):** `search`, `find`, `describe`, `neighbors`, `resolve`.
3737

38+
**Response extras (advisory):** On success, `search`, `find`, `describe`, and `neighbors` include a top-level `hints` list (≤5 templated next-call strings). `search` and `find` also echo `limit` / `offset`. Hints are safe to ignore; they are empty when `success` is false. Locked catalog: [`propose/completed/HINTS-ROAD-SIGNS-PROPOSE.md`](../propose/completed/HINTS-ROAD-SIGNS-PROPOSE.md) Appendix A.
39+
3840
**Operator / diagnostics (not MCP):** use the **`java-codebase-rag`** CLI — lifecycle (`init`, `increment`, `reprocess`, `erase`) plus `meta`, `tables`, `diagnose-ignore`, `analyze-pr`. Rebuilds are slow; the coding agent should not pretend it can reindex via MCP. For lifecycle commands, subprocess progress is written to **stderr** (use **`--quiet`** to suppress it); **stdout** is only the structured result payload.
3941

4042
**Use this MCP when** you need whole-codebase context: who calls what, what handles a route, what a method invokes, where clients point, or fuzzy “where is concept X” entry points.

docs/MANUAL-VERIFICATION-CHECKLIST.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ Each item has:
1313
- a **Verification prompt** — paste verbatim into your agent (or run the
1414
shell snippet yourself)
1515
- **Expected (calibration)** — what the same prompt produces on
16-
`tests/bank-chat-system` (ontology **11**). If your numbers diverge wildly,
16+
`tests/bank-chat-system` (ontology **13**). If your numbers diverge wildly,
1717
that's a signal, not a verdict — what matters is the **shape** (proportions,
1818
error rates, presence of expected edges).
1919
- **If failing → fix** — concrete next step
2020

2121
Calibration was captured against `tests/bank-chat-system` on
22-
`master @ e90cbecc` (ontology version **11**): 84 files, 92 types, 474
23-
members, 0 parse errors, 17 routes, 11 `EXPOSES`, 793 `CALLS`, 2 `HTTP_CALLS`,
24-
5 `ASYNC_CALLS`, 2 `Client` rows, microservices = `chat-core` + `chat-assign`.
22+
`chore/docs-sync @ 1fa1b28` (ontology version **13**): 84 files, 92 types, 474
23+
members, 0 parse errors, 17 routes, 11 `EXPOSES`, 793 `CALLS`, 24 `OVERRIDES`,
24+
2 `HTTP_CALLS`, 5 `ASYNC_CALLS`, 2 `Client` rows, microservices = `chat-core` + `chat-assign`.
2525

2626
**Convention:** Graph ops use MCP. Index health / rebuild / PR analysis use
2727
**`java-codebase-rag`** (see README **CLI reference**). Example:
@@ -83,16 +83,16 @@ export JAVA_CODEBASE_RAG_INDEX_DIR=/tmp/verify_index
8383

8484
## Phase 1 — Index health (4 items)
8585

86-
### 1.1 ☐ Ontology version is 11
86+
### 1.1 ☐ Ontology version is 13
8787

8888
**Verification prompt:**
8989

9090
> In a shell with `JAVA_CODEBASE_RAG_INDEX_DIR` and `JAVA_CODEBASE_RAG_SOURCE_ROOT`
9191
> set for your graph, run `java-codebase-rag meta` (JSON output if piped). Report
9292
> `ontology_version`, `built_at`, `source_root`, and `parse_errors`. Does
93-
> `ontology_version` equal `11`?
93+
> `ontology_version` equal `13`?
9494
95-
**Expected (calibration):** `ontology_version: 11`,
95+
**Expected (calibration):** `ontology_version: 13`,
9696
`parse_errors: 0`.
9797

9898
**If failing → fix:** older ontology means a stale graph file. Re-pull the
@@ -313,7 +313,7 @@ exact count.
313313
> with `{"kind":"client","filter":{},"limit":200}`. Rows should include
314314
> `client_kind`, `target_service`, paths, `source_layer`.
315315
316-
**Expected (calibration):** `ontology_version=11`, `counts.clients=2`, both
316+
**Expected (calibration):** `ontology_version=13`, `counts.clients=2`, both
317317
`rest_template` in the fixture.
318318

319319
**If failing → fix:** ontology < 10 → full rebuild. Zero clients when you
@@ -496,7 +496,7 @@ expect Feign → README §3c brownfield.
496496
If everything is green:
497497

498498
- Commit `.java-codebase-rag.yml` and `@Codebase*` stubs.
499-
- Record **ontology 11** (or current `java-codebase-rag meta` value) in your team docs.
499+
- Record **ontology 13** (or current `java-codebase-rag meta` value) in your team docs.
500500
- Periodically diff `java-codebase-rag meta` `counts` after large refactors.
501501

502502
If something is red:
@@ -522,4 +522,4 @@ java-codebase-rag meta --source-root tests/bank-chat-system --index-dir /tmp/cal
522522

523523
`build_ast_graph.py` still takes `--kuzu-path` (the Kuzu file). Point it at `<index-dir>/code_graph.kuzu` so it matches the layout `java-codebase-rag meta --index-dir` expects under that directory.
524524

525-
Current snapshot: `tests/bank-chat-system`, `master @ e90cbecc`, ontology **11**.
525+
Current snapshot: `tests/bank-chat-system`, `chore/docs-sync @ 1fa1b28`, ontology **13**.

docs/paper/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ architecture report:
88
> May 2026.
99
1010
The paper describes the three-layer architecture (Extract \& Store / Navigate /
11-
Reason), the four-tool MCP surface, the GPS metaphor (locate \-- inspect \-- walk),
12-
the design principles that drove a v1\->v2 collapse from 9 tools to 4, and what
11+
Reason), the five-tool MCP surface, the GPS metaphor (locate \-- inspect \-- walk),
12+
the design principles that drove a v1\->v2 collapse from 9 tools to a small fixed
13+
set (currently five navigation tools), and what
1314
the system deliberately does not do. It contains no empirical evaluation;
1415
testing on real legacy codebases is in progress and the data is not yet ready
1516
to publish.
@@ -19,7 +20,7 @@ to publish.
1920
| File | Purpose |
2021
|---|---|
2122
| `paper.tex` | Main LaTeX source. Single-file paper, ~320 lines. |
22-
| `references.bib` | BibTeX bibliography (13 entries). |
23+
| `references.bib` | BibTeX bibliography. |
2324
| `figures/layers.tex` | TikZ source: three-layer architecture diagram. |
2425
| `figures/gps.tex` | TikZ source: GPS-metaphor / three-primitive diagram. |
2526
| `figures/workflow.tex` | TikZ source: canonical agent-interaction trace. |

docs/paper/figures/gps.tex

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@
2424
\node[prim, walk, right=of inspect] (walk) {WALK\\ \footnotesize\itshape where can I go?};
2525

2626
% --- Tools above each primitive ---
27-
\node[tool, above=0.7cm of locate, xshift=-0.85cm] (s) {search};
28-
\node[tool, above=0.7cm of locate, xshift=0.85cm] (f) {find};
29-
\node[tool, above=0.7cm of inspect] (d) {describe};
30-
\node[tool, above=0.7cm of walk] (n) {neighbors};
27+
\node[tool, above=0.7cm of locate, xshift=-1.15cm] (s) {search};
28+
\node[tool, above=0.7cm of locate, xshift=0cm] (f) {find};
29+
\node[tool, above=0.7cm of locate, xshift=1.15cm] (r) {resolve};
30+
\node[tool, above=0.7cm of inspect] (d) {describe};
31+
\node[tool, above=0.7cm of walk] (n) {neighbors};
3132

3233
% --- Connections tools -> primitives ---
3334
\draw[arr] (s) -- (locate.north -| s);
3435
\draw[arr] (f) -- (locate.north -| f);
36+
\draw[arr] (r) -- (locate.north -| r);
3537
\draw[arr] (d) -- (inspect);
3638
\draw[arr] (n) -- (walk);
3739

docs/paper/paper.pdf

107 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)