Add Cursor rules and agent settings for CLI agents#3
Merged
Conversation
This was referenced May 5, 2026
HumanBean17
added a commit
that referenced
this pull request
May 6, 2026
…ty (#32) Implements propose merged in #28. Sequences after PR-F1 (#31, merged) and PR-G1 (#30, merged). Hard rename — no deprecation alias, MCP bundle has no users yet and breaking changes are explicitly allowed. Single PR, ~115 LOC, ontology bump 8→9. Single source-of-truth flips at ast_java.py:91 (role) and ast_java.py:114 (HTTP_CLIENT capability); VALID_ROLES / VALID_CAPABILITIES are auto-derived so no java_ontology.py edit needed. 9 new tests in tests/test_client_role_rename.py target ~290 passed, 4 skipped (281 baseline + 9). Plan delta from propose: test #4 asserts warn-and-drop behaviour (stderr warning + override silently dropped) matching actual graph_enrich.py:443-447, 481-486, NOT raised ValueError as the propose's example suggested. Out of scope: async role/capability changes (MESSAGE_PRODUCER already covers Kafka/Rabbit/JMS), auto-promoting RestTemplate/WebClient to HTTP_CLIENT (brownfield-only opt-in), backwards-compat alias, RegisterRestClient (followup #3).
This was referenced May 6, 2026
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Cursor settings to help Cursor CLI agents (and other agentic
tools) navigate this repo correctly without rediscovering the same
invariants on every run.
The repo previously had a single
.cursor/rules/breaking-changes.mdc.This PR keeps it and layers six topic-scoped rule files plus a
top-level
AGENTS.mdand.cursorignore.What's added
.cursor/rules/project-overview.mdc(alwaysApply) — high-level map: whatthe bundle is, the file table, the env vars, the
module/microserviceresolution order, and which docs to read beforenon-trivial edits.
python-style.mdc(globs**/*.py) — Python 3.11+conventions used here:
from __future__ import annotations, PEP 604unions, dataclasses vs Pydantic, stderr-only diagnostics (stdout is
the MCP transport), the no-cocoindex-import rule outside the flow
module, and ruff/pytest tooling.
tests-and-fixtures.mdc(globstests/**) — distilledversion of
tests/README.md's "DO NOT OVERFIT" guidance: invariantsover exact counts, no fixture-special-casing in production code,
contract-vs-integration split, gating heavy tests behind
LANCEDB_MCP_RUN_HEAVY=1.graph-and-ast.mdc(globsast_java.py,build_ast_graph.py,graph_enrich.py,kuzu_queries.py,java_ontology.py, related tests) — node/edge model, role andcapability inference order, brownfield consistency rule (one
collect_annotation_meta_chainwalk for both Kuzu and Lance),call-graph semantics (anonymous classes, lambdas,
this.f1.f2.m()chains, receiver scope), and project-root semantics across all three
index call sites.
search-and-ranking.mdc(globssearch_lancedb.py,java_index_flow_lancedb.py, related tests) —JavaLanceChunkschema invariants, the role-weight table, the symbol-bonus formula
(overlap / action-verb / type-name), the "weights skipped when
role=locked" rule, filter modes, and theLANCEDB_MCP_DEBUG_CONTEXTdebugging flag.mcp-server.mdc(globsserver.py,test_mcp_tools.py) —stdio invariants, the contract that tool descriptions are LLM
prompts (so updates must propagate to README +
_INSTRUCTIONS),defaults agents rely on (e.g.
trace_flow.follow_calls=true,find_callers/find_callees.exclude_external=true), and the stepsfor adding a new tool.
agent-workflow.mdc(alwaysApply) — investigate → propose(when non-trivial) → implement → validate (
ruff+pytest) →commit/PR loop, matching the existing branch-naming convention
(
plan/<name>, now alsocursor/<topic>) and commit-message style.Repo root
AGENTS.md— flat summary of the hard rules and investigationorder for tools that don't read
.cursor/rules/..cursorignore— keeps Cursor's context out of regenerable /binary noise:
lancedb_data/,*.kuzu,__pycache__/,.venv/,htmlcov/, etc. Mirrors.gitignoreplus a few build artifactsinside
tests/**/target/andtests/**/build/.Why these specific rules
Each rule encodes a fact that an agent would otherwise have to
reconstruct from
README.md+CODEBASE_REQUIREMENTS.md(~50 KB ofprose) on every run:
collect_annotation_meta_chainwalk).roleweights and symbol bonus are skipped when thecaller locks
role=.print()to stdout breaks the MCP transport.ontology_versionbump.
bank-chat fixture.
Out of scope