Codebase Onboarding
Description
Build a working map of an unfamiliar codebase, including entry points, conventions, hot paths, and test layout, before making changes, using measured signals rather than guessing. The procedure is constrained by explicit inputs and acceptance criteria rather than best-effort judgment alone.
When to Use
- A task requires codebase onboarding before downstream steps can proceed safely.
- Ambiguity or missing evidence would change the outcome.
- The result must be recorded with reasons and evidence for later verification.
Inputs / Outputs
| Area |
Contract |
| Inputs |
Task context, candidate inputs, and explicit acceptance criteria for codebase onboarding. |
| Outputs |
A decision or artifact with recorded reasons, rejected alternatives, and verification evidence. |
| Safety |
Failures must fail closed and be reported with evidence rather than retried silently. |
Procedure
- Normalize the task into explicit inputs, constraints, and acceptance criteria.
- Gather the required evidence and check completeness before proceeding.
- Apply the codebase onboarding procedure using the declared criteria only.
- Record the outcome, rejected alternatives, and the reason for each rejection.
- Verify the result against the acceptance criteria with an independent check.
- Report the result with evidence, and escalate explicitly when a criterion cannot be met.
Runnable Example
# Codebase Onboarding: deterministic check
candidates = [{"id": "a", "score": 0.8, "cost": 2}, {"id": "b", "score": 0.95, "cost": 9}]
eligible = [c for c in candidates if c["score"] >= 0.8]
selected = min(eligible, key=lambda c: c["cost"])
assert selected["id"] == "a"
print("selected:", selected["id"])
Failure Modes
- Proceeding with codebase onboarding without the required evidence or inputs.
- Treating an unverified result as verified.
- Silently swallowing errors instead of failing closed with reasons.
- Optimizing the stated metric while violating the stated constraint.
- Losing the audit trail of decisions and rejected alternatives.
Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result.
Evidence
Coding agents joining new repositories is a dominant 2026 use case; public coding-agent threads request structured onboarding maps. These are dated public signals, not adoption metrics.
Related
- code-reading.md
- code-search.md
- ide-integration.md
1---2name: codebase-onboarding3description: Build a working map of an unfamiliar codebase, including entry points, conventions, hot paths, and test layout, before making changes, using measured signals rather than guessing.4metadata:5 source: https://skillmd.com/skills/samotech/codebase-onboarding6 upstream: skills/05-code/codebase-onboarding.md7 category: 05-code8 version: "v1"9---1011# Codebase Onboarding1213## Description14Build a working map of an unfamiliar codebase, including entry points, conventions, hot paths, and test layout, before making changes, using measured signals rather than guessing. The procedure is constrained by explicit inputs and acceptance criteria rather than best-effort judgment alone.1516## When to Use17- A task requires codebase onboarding before downstream steps can proceed safely.18- Ambiguity or missing evidence would change the outcome.19- The result must be recorded with reasons and evidence for later verification.2021## Inputs / Outputs22| Area | Contract |23|---|---|24| Inputs | Task context, candidate inputs, and explicit acceptance criteria for codebase onboarding. |25| Outputs | A decision or artifact with recorded reasons, rejected alternatives, and verification evidence. |26| Safety | Failures must fail closed and be reported with evidence rather than retried silently. |2728## Procedure291. Normalize the task into explicit inputs, constraints, and acceptance criteria.302. Gather the required evidence and check completeness before proceeding.313. Apply the codebase onboarding procedure using the declared criteria only.324. Record the outcome, rejected alternatives, and the reason for each rejection.335. Verify the result against the acceptance criteria with an independent check.346. Report the result with evidence, and escalate explicitly when a criterion cannot be met.3536## Runnable Example37```python38# Codebase Onboarding: deterministic check39candidates = [{"id": "a", "score": 0.8, "cost": 2}, {"id": "b", "score": 0.95, "cost": 9}]40eligible = [c for c in candidates if c["score"] >= 0.8]41selected = min(eligible, key=lambda c: c["cost"])42assert selected["id"] == "a"43print("selected:", selected["id"])44```4546## Failure Modes47- Proceeding with codebase onboarding without the required evidence or inputs.48- Treating an unverified result as verified.49- Silently swallowing errors instead of failing closed with reasons.50- Optimizing the stated metric while violating the stated constraint.51- Losing the audit trail of decisions and rejected alternatives.5253## Boundary54This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result.5556## Evidence57Coding agents joining new repositories is a dominant 2026 use case; public coding-agent threads request structured onboarding maps. These are dated public signals, not adoption metrics.5859## Related60- code-reading.md61- code-search.md62- ide-integration.md