Files
rui-docs/backend/guides/gitnexus-guide.md
T
vifo a7f3ee3565 refactor: 全局替换 spring-ai -> rui-framework
同步仓库名称变更,涉及 16 个文件 66 处引用:
- ai-skills: 菜单配置
- backend/guides: AI操作手册、环境配置、部署、gitnexus、opencode 工作流
- backend: 模块创建规则、通信规范、协作工作流、实施规范
- frontend: 收银设计、管理后台实施计划
- standards: 数据库设计规范
2026-06-08 12:56:39 +08:00

2.5 KiB

GitNexus — Code Intelligence 使用指南

项目索引: rui-framework (2690 symbols, 5387 relationships, 218 execution flows)

基本概念

GitNexus 是一个代码智能工具,通过索引代码库构建知识图谱,帮助开发者理解代码、评估影响、安全导航。

核心原则

Always Do

  • MUST run impact analysis before editing any symbol. Before modifying a function, class, or method, run gitnexus_impact({target: "symbolName", direction: "upstream"}) and report the blast radius (direct callers, affected processes, risk level) to the user.
  • MUST run gitnexus_detect_changes() before committing to verify your changes only affect expected symbols and execution flows.
  • MUST warn the user if impact analysis returns HIGH or CRITICAL risk before proceeding with edits.
  • When exploring unfamiliar code, use gitnexus_query({query: "concept"}) to find execution flows instead of grepping. It returns process-grouped results ranked by relevance.
  • When you need full context on a specific symbol — callers, callees, which execution flows it participates in — use gitnexus_context({name: "symbolName"}).

Never Do

  • NEVER edit a function, class, or method without first running gitnexus_impact on it.
  • NEVER ignore HIGH or CRITICAL risk warnings from impact analysis.
  • NEVER rename symbols with find-and-replace — use gitnexus_rename which understands the call graph.
  • NEVER commit changes without running gitnexus_detect_changes() to check affected scope.

资源速查

Resource Use for
gitnexus://repo/rui-framework/context Codebase overview, check index freshness
gitnexus://repo/rui-framework/clusters All functional areas
gitnexus://repo/rui-framework/processes All execution flows
gitnexus://repo/rui-framework/process/{name} Step-by-step execution trace

技能参考

场景 技能文件
架构理解 / "How does X work?" .claude/skills/gitnexus/gitnexus-exploring/SKILL.md
影响分析 / "What breaks if I change X?" .claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md
Bug 追踪 / "Why is X failing?" .claude/skills/gitnexus/gitnexus-debugging/SKILL.md
重构 / "Rename this function" .claude/skills/gitnexus/gitnexus-refactoring/SKILL.md
工具参考 .claude/skills/gitnexus/gitnexus-guide/SKILL.md
CLI 命令 .claude/skills/gitnexus/gitnexus-cli/SKILL.md

索引维护

如果 GitNexus 工具提示索引过期,执行:

npx gitnexus analyze