Loading...
Loading...
Compare original and translation side by side
| Pattern | Tool / Command | Key Points |
|---|---|---|
| Context packing | | Package subdirectories into AI-optimized bundles |
| Signatures only | | Compression extracts signatures via Tree-sitter |
| Repository digest | | Prompt-friendly summary for quick onboarding |
| Dependency context | | LLM-ready context for a function with 95% token saving |
| Caller tracing | | Reverse call graph to assess change blast radius |
| Forward call graph | | Build forward call graph across the project |
| Semantic search | | Find logic by meaning when naming is inconsistent |
| Architecture audit | | Detect circular deps, layer violations, dead code |
| Dead code finder | | Find unreachable functions with zero callers |
| File extraction | | Extract AST (functions, classes, imports) from a file |
| Secret scanning | Repomix built-in secretlint | Ensure context bundles contain no keys or PII |
| 模式 | 工具/命令 | 核心要点 |
|---|---|---|
| 上下文打包 | | 将子目录打包为AI优化的上下文包 |
| 仅获取签名 | | 压缩功能通过Tree-sitter提取签名 |
| 仓库摘要生成 | | 便于在提示词中使用的摘要,助力快速上手仓库 |
| 依赖上下文获取 | | 为函数生成适配LLM的上下文,可减少95%的Token消耗 |
| 调用方追踪 | | 生成反向调用图,评估代码变更的影响范围 |
| 正向调用图构建 | | 构建跨项目的正向调用图 |
| 语义搜索 | | 当命名不规范时,通过语义查找相关逻辑 |
| 架构审计 | | 检测循环依赖、层级违规与死代码 |
| 死代码查找 | | 查找无调用方的不可达函数 |
| 文件内容提取 | | 从文件中提取AST(函数、类、导入项) |
| 密钥扫描 | Repomix内置secretlint | 确保上下文包中不包含密钥或个人身份信息(PII) |
| Mistake | Correct Pattern |
|---|---|
| Reading entire large files without checking structure first | Run |
Using | Use |
Packing | Configure Repomix ignore-list to exclude generated and vendor directories |
| Assuming semantic search results are exhaustive | Verify top matches against actual source and cross-reference with |
| Running Repomix without compression on large directories | Use |
| Including irrelevant context that dilutes signal quality | Follow top-down priority: index, signatures, core logic, then adjacent context |
| 误区 | 正确做法 |
|---|---|
| 未先检查结构就读取整个大文件 | 在读取完整文件前,先运行 |
使用 | 使用 |
将 | 配置Repomix忽略列表,排除生成目录与第三方依赖目录 |
| 认为语义搜索结果是全面的 | 将顶部匹配结果与实际源码对比,并使用 |
| 不对大型目录启用压缩就运行Repomix | 使用 |
| 包含无关上下文,降低信号质量 | 遵循自上而下的优先级:索引、签名、核心逻辑,再到相邻上下文 |
ExploreTaskPlanExploreTaskPlan