Files
nexus/wiki/concepts/CodebaseOnboarding.md
2026-05-03 05:42:12 +08:00

37 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "CodebaseOnboarding"
type: concept
tags: []
last_updated: 2026-05-02
---
## Definition
Codebase Onboarding 是帮助新开发者快速理解陌生代码库的方法论和实践体系。核心目标是缩短从"首次接触代码库"到"能够独立定位问题、修改代码"的认知建立时间。
## Core Principles
- **Evidence-first**: 只陈述代码中可验证的事实
- **Layered explanation**: 分层递进式解释(一句话 → 五分钟 → 深度代码流)
- **File-level precision**: 所有结论必须指向具体文件路径
- **Honest scope**: 明确告知哪些部分已检查、哪些未检查
## Key Methods
1. **Inventory & Classification** — 识别清单文件manifests/lockfiles、框架标记、构建工具、顶层目录
2. **Entry Point Discovery** — 找到启动文件、路由、处理器、CLI 命令
3. **Execution Tracing** — 端到端追踪输入→验证→编排→持久化→输出
4. **Boundary Analysis** — 识别模块边界、包边界、共享工具、重复职责
## Usage Context
- 新开发者 onboarding
- 大型代码库结构探索
- 故障定位前的代码结构理解
## Related Concepts
- [[ExecutionTracing]] — 执行路径追踪
- [[EvidenceFirstReasoning]] — 证据优先推理
- [[MinimalChangePrinciple]] — 与 [[EngineeringMinimalChangeEngineer]] 配合使用