> ## Documentation Index
> Fetch the complete documentation index at: https://theagenticguy.github.io/opencodehub/llms.txt
> Use this file to discover all available pages before exploring further.
> Scoped bundles: [user-guide](https://theagenticguy.github.io/opencodehub/_llms-txt/user-guide.txt) · [mcp](https://theagenticguy.github.io/opencodehub/_llms-txt/mcp.txt) · [contributing](https://theagenticguy.github.io/opencodehub/_llms-txt/contributing.txt)

# codehub-onboarding

Produces a single ONBOARDING.md. The wedge is the **ranked reading order**
drawn from graph centrality — a generic README scaffold cannot produce this.

## Frontmatter

```yaml
name: codehub-onboarding
argument-hint: "[output-path] [--committed]"
color: green
model: sonnet
```

## Preconditions

- `mcp__opencodehub__list_repos` must return the target.
- `codehub status` must be fresh.

Both refuse loudly with a one-line remediation hint per spec 001 AC-3-1.

## Process

1. `mcp__opencodehub__project_profile` — languages, stacks, entry points.
2. `mcp__opencodehub__route_map` / `mcp__opencodehub__tool_map` — HTTP / MCP surface.
3. `mcp__opencodehub__sql` for top-centrality nodes:
   ```sql
   SELECT name, file_path, in_degree + out_degree AS centrality
   FROM nodes
   WHERE kind IN ('File','Module','Class')
   ORDER BY centrality DESC
   LIMIT 15
   ```
4. `mcp__opencodehub__context` on the top 8 for one-line summaries.
5. `mcp__opencodehub__owners` on top 3 folders → "ask these humans" table.
6. Dispatch one specialty `doc-onboarding` subagent.
7. Assemble ONBOARDING.md and write to the resolved output path.

## Output shape

```markdown
# <repo> · Onboarding

## TL;DR
2 sentences — what this repo does + the mental model to hold.

## Stack
| Layer | Tech | Source |

## Read these 10 files first (in order)
1. `packages/cli/src/bin.ts` — CLI entry point. (45 LOC)
2. `packages/mcp/src/server.ts` — MCP bootstrap. (320 LOC)
... (ranked by centrality)

## Walk one process end-to-end
(the highest-step-count process, traced step by step)

## Ask these humans
| Area | Owner | Share |

## Next steps
- Concrete first actions.
```

## Arguments

| Flag | Meaning |
|---|---|
| `[output-path]` | Where to write. Default: `.codehub/ONBOARDING.md` (gitignored). With `--committed`: `docs/ONBOARDING.md`. |
| `--committed` | Opt in to a committed path. |
**Reading order matters:** The list is 10 items, not 5 or 20, because a new engineer's working memory
breaks around 7–10 concepts. More than 10 is a catalog; fewer than 10
under-uses the centrality signal.

## Related

- [codehub-document](/opencodehub/skills/codehub-document/) — for the full architecture book
- [Skills index](/opencodehub/skills/)