AGENT SKILL

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

  1. Verify prerequisites. Confirm docs/CONTEXT.md exists as the domain SSOT and docs/adr/ contains decision records. If either is missing, report the gap before producing onboarding artifacts.
  2. Initialize the onboarding workspace in the project root:
    • MISSION.md — overall learning objectives, bounded-context path, and success criteria
    • lessons/ — one lesson per bounded context or coherent workflow
    • reference/ — source map and ADR index
    • learning-records/ — user progress tracker
    • assets/ — reusable diagrams or screenshots
  3. Draft MISSION.md by reading docs/CONTEXT.md with the domain-modeling skill. List bounded contexts, their responsibilities, and the recommended learning order.
  4. 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.
  5. 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 状态机基于事件回放
  1. Build reference/source-map.md mapping each lesson to source ranges and decision records. Build reference/adr-index.md listing every ADR referenced by lessons.
  2. Create learning-records/template.md with checkboxes for lesson completion, exercises, and open questions.
  3. When a term or behavior needs clarification during lesson writing, invoke deep-dive-protocol and record the result as a citation, not as prose speculation.
  4. Treat the workspace as incrementally maintainable. When the codebase changes, update the affected lesson and reference files, leaving unchanged lessons intact.

Acceptance Criteria

  • [ ] MISSION.md exists and names every bounded context drawn from docs/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.md and reference/adr-index.md exist and are consistent with lesson citations
  • [ ] learning-records/template.md exists 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.md or 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

winter6205
winter6205/arthurpower

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 写计划, 拆任务, 任务分解, 制定方案, 跨文件改动, 计划.

★ 2
winter6205
winter6205/arthurpower

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.

★ 2
winter6205
winter6205/arthurpower

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.

★ 2
winter6205
winter6205/arthurpower

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).

★ 2
winter6205
winter6205/arthurpower

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.

★ 2
winter6205
winter6205/arthurpower

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.

★ 2