codebase-onboarding
Use when a newcomer asks to learn a codebase through guided lessons, asks for onboarding, a learning path, a newcomer guide, or systematic study of how a project works.
- License 许可
- MIT
- 最近更新
- 2026-10-28
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- codebase-onboarding
- tags
- [ "onboarding", "codebase-study", "learning-path", "newcomer-guide", "source-citation", "新人", "上手", "读懂代码", "看懂项目", "带我过一遍", "搞懂", "入门" ]
- type
- discipline
- bucket
- engineering
- version
- 1.0.0
- description
- Use when a newcomer asks to learn a codebase through guided lessons, asks for onboarding, a learning path, a newcomer guide, or systematic study of how a project works.
- related_skills
- [ "domain-modeling", "deep-dive-protocol", "bounded-context-guardian" ]
- disable-model-invocation
- true
03 SKILL.md 正文
Codebase Onboarding
When to use
- 教我做这个项目 / 系统学习 / onboarding / 上手 / 新人导读 / codebase 怎么学
- codebase onboarding / learning path / newcomer guide
- Requests for a structured, lesson-based introduction to a codebase rather than a one-off lookup
When not to use
- Code changes, debugging, refactoring, or implementation tasks
- External framework or library tutorials that are not project-specific
- One-line "where is X defined" lookups
- Creating non-onboarding project documentation
Procedure
- Verify prerequisites. Confirm
docs/CONTEXT.mdexists as the domain SSOT anddocs/adr/contains decision records. If either is missing, report the gap before producing onboarding artifacts. - Initialize the onboarding workspace in the project root:
MISSION.md— overall learning objectives, bounded-context path, and success criterialessons/— one lesson per bounded context or coherent workflowreference/— source map and ADR indexlearning-records/— user progress trackerassets/— reusable diagrams or screenshots
- Draft
MISSION.mdby readingdocs/CONTEXT.mdwith thedomain-modelingskill. List bounded contexts, their responsibilities, and the recommended learning order. - Build each lesson as a standalone file. Anchor every lesson to a bounded-context boundary using
bounded-context-guardian. Include concept overview, walkthrough, and exercises. Every factual claim must cite project sources. - Produce citations in this exact format:
### Lesson: 用户下单流程
涉及源码:
- `src/order/create.py:45-78` — `Order.create()` 入口
- `src/payment/charge.py:23-50` — `PaymentGateway.charge()` 实际扣款
涉及决策:
- ADR-0001 (选 PostgreSQL 作主存储) — 因为订单需强一致性
- ADR-0007 (event-sourced orders) — Order 状态机基于事件回放
- Build
reference/source-map.mdmapping each lesson to source ranges and decision records. Buildreference/adr-index.mdlisting every ADR referenced by lessons. - Create
learning-records/template.mdwith checkboxes for lesson completion, exercises, and open questions. - When a term or behavior needs clarification during lesson writing, invoke
deep-dive-protocoland record the result as a citation, not as prose speculation. - Treat the workspace as incrementally maintainable. When the codebase changes, update the affected lesson and reference files, leaving unchanged lessons intact.
Acceptance Criteria
- [ ]
MISSION.mdexists and names every bounded context drawn fromdocs/CONTEXT.md - [ ]
lessons/contains at least one lesson per bounded context or coherent workflow - [ ] Every lesson contains at least one source citation in the form
path/file.ext:line-line - [ ] Every lesson references at least one ADR by ID in the form
ADR-NNNN - [ ]
reference/source-map.mdandreference/adr-index.mdexist and are consistent with lesson citations - [ ]
learning-records/template.mdexists with progress checkboxes - [ ] Zero external URLs are used as evidence or citations
- [ ] All artifacts are generic to the project; no private namespace bindings
Verification
Skill type: discipline
Bar level: discipline
Rationalization Table
| Excuse | Reality |
|---|---|
| "External docs are more readable than code" | External docs drift from the codebase. The project SSOT is the code plus docs/adr/. |
"Copying docs/CONTEXT.md into the lesson is faster" |
Duplicated text rots. Lessons must reference the SSOT, not replicate it. |
| "One long markdown file is enough" | A monolith violates progressive disclosure and makes incremental updates impossible. |
| "The user only wanted a quick answer" | Quick lookups belong to exploration tools, not structured onboarding. |
| "Precise citations are too verbose" | Verbose citations now prevent hallucinated explanations later. |
| "Bounded contexts are just folders" | Boundaries are semantic contracts; use bounded-context-guardian to validate them. |
Red Flags
- Any lesson cites an external URL such as
https://docs.example.com/...instead of project sources. - A lesson pastes the full text of
docs/CONTEXT.mdor an ADR rather than referencing the file path. - No
learning-records/directory or progress tracker exists. - Onboarding output is a single monolithic document instead of a
lessons/directory. - Acceptance criteria use "should" or "probably" instead of binary yes/no checks.
- A source citation lacks a line range or refers to a file that does not exist.
04 同仓库更多 Skills
writing-plans
Use when turning a buildable spec into ordered tracer bullets after architecture-change-reviewer. Covers vertical slicing, dependency order, and headroom for the implementer. Triggers on 写计划, 拆任务, 任务分解, 制定方案, 跨文件改动, 计划.
wayfinder
Use when a chunk of work is more than one agent session can hold — plan it as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
verification-before-completion
This skill should be used when claiming "完成" / "done" / "fixed" / "passing" / "ready to ship", before trusting a subagent success report, or when checking "对照计划" / "对照 spec" — whether this run's delivery matches its basis.
using-agent-skills
Use when starting a new session, switching tasks, or unsure which arthurpower skill applies. Routes incoming work to the matching skill via flowchart before invoking. Activates on phrases like "which skill should I use", "skill check", "pre-task skill check", "how to start", "router", "skill routing", or when multiple competing skills could apply. Does not auto-invoke user-invoked authoring skills (skill-authoring, self-evolving-rules).
test-driven-development
Use when implementing logic, fixing a bug, or changing behavior — write the failing test first (RED), then minimal code (GREEN), then refactor. Triggers on "write the failing test first", "Prove-It", or a bug that needs a reproduction test before the fix.
systematic-debugging
Use when debugging a test failure, build break, unexpected runtime error, flaky test, or hanging process. Triggers on phrases like "fix this bug", "getting an error", "failing test", "flaky", "hanging", "halfway through debugging", "this used to work", "intermittent failure", "stack trace shows X", or any case where behavior does not match expectations. Prevents shotgun debugging.