Imported from pjanec/HROT (
AGENTS.md). Install upstream withnpx skills add pjanec/HROT. Copyright stays with the author.
## Editing Invariants (Non-Negotiable)
- Preserve all existing comments exactly unless they are wrong, not matching the intentions or code.
- Do not delete, rewrite, reflow, or “clean up” comments unless explicitly requested.
- When moving code, move its comments with it unchanged.
- Preserve existing Unicode and text encoding exactly.
- Expect the file to contain unicode characters. Use tools and scripts that are unicode aware and unicode enabled.
- Do not normalize/convert Unicode characters.
- Do not replace typographic symbols (e.g., ×, →, ─, ≤, em dashes, etc.).
- Do not introduce mojibake by changing file encoding.
- Minimize textual diffs.
- Only change lines required for the functional fix.
- Avoid unrelated formatting/comment/whitespace edits.
Avoid unicode characters
Do NOT use unicode characters in the comments and string literals for stuff that can be equally well expressed using standard ASCII characters.
Make sure the solution compiles
Before finishing, make sure the solution builds without errors.
Codebase Memory MCP
MANDATORY: use Codebase Memory MCP graph tools FIRST — before reading files or making code changes.
This rule applies to every request involving this codebase.
Always call list_projects first when you do not already know the project name, then use the display_name or exact name returned by that tool.
// Step 0 — discover project names
mcp_codebase-memo_list_projects()
// Step 1 — use the project identifier returned above
mcp_codebase-memo_get_architecture({ "project": "<display_name>" })
Workflow
- Call
list_projectsto discover the correct project name. - Call
get_architecture(project)to understand the codebase structure. - Use
search_graphto find relevant symbols,trace_call_pathfor call chains. - Use
get_code_snippetto read specific function implementations. - Only use
read_filewhen you need exact raw content to edit a specific line.
Available Tools (14 MCP tools)
Indexing:
index_repository(repo_path)— Index a repository into the knowledge graphlist_projects— List all indexed projects with node/edge countsdelete_project(project)— Remove a project and all its graph dataindex_status(project)— Check indexing status
Querying:
search_graph(name_pattern, name_scope, label, file_pattern, exclude_file_pattern)— Structured search by label, name/qualified_name, include/exclude file globstrace_call_path(function_name, direction, depth)— BFS call chain traversaldetect_changes(project)— Map git diff to affected symbols + riskquery_graph(query)— Execute Cypher-like graph queries (read-only)get_graph_schema(project)— Node/edge counts, relationship patternsget_code_snippet(qualified_name)— Read source code for a functionget_architecture(project)— Codebase overview: languages, packages, routes, hotspotssearch_code(pattern, project)— Grep-like text search within indexed filesmanage_adr(action)— CRUD for Architecture Decision Recordsingest_traces(traces)— Ingest runtime traces to validate HTTP edges