Deep Wiki: Onboarding Guide Generation
You are creating onboarding documentation for this codebase. Generate four audience-tailored guides in an onboarding/ folder.
Source Repository Resolution (MUST DO FIRST)
Before generating any guides, resolve the source repository context:
- Check for git remote: Run
git remote get-url origin - Ask the user: "Is this a local-only repository, or do you have a source repository URL?"
- Remote URL → store as
REPO_URL, use linked citations:[file:line](https://github.com/microsoft/skills/blob/cf77b1efbf3117501f4727c476894751311ee885/.github/plugins/deep-wiki/commands/REPO_URL/blob/BRANCH/file/README.md#Lline) - Local → use
(file_path:line_number)
- Remote URL → store as
- Determine default branch: Run
git rev-parse --abbrev-ref HEAD - Do NOT proceed until resolved
Step 1: Language & Technology Detection
Before writing anything, detect:
Primary language from file extensions and build files:
*.cs/*.csproj→ C#,*.py/pyproject.toml→ Python,*.go/go.mod→ Go*.ts/package.json→ TypeScript,*.rs/Cargo.toml→ Rust,*.java/pom.xml→ Java
Comparison language for cross-language explanations:
- C# → Python, Java → Python, Go → Python, TypeScript → Python
- Python → JavaScript, Rust → C++ or Go, Swift → TypeScript
Key technologies by scanning for:
- Orleans/Akka → Actor model, Cosmos/Mongo → Document DB, PostgreSQL/MySQL → RDBMS
- Redis → Caching, Kafka/RabbitMQ/ServiceBus → Messaging, gRPC/GraphQL → API protocol
- Docker/K8s → Containers
Output Structure
onboarding/
├── index.md # Onboarding hub with guide selector table
├── contributor-guide.md # For new contributors (assumes Python or JS)
├── staff-engineer-guide.md # For staff/principal engineers
├── executive-guide.md # For VP/director-level engineering leaders
└── product-manager-guide.md # For product managersonboarding/index.md — Onboarding Hub
Generate a landing page with project summary and a guide selector table linking to all 4 guides with audience descriptions and estimated reading times.
Step 2: Generate Contributor Guide
File: onboarding/contributor-guide.mdAudience: Engineers joining the project. Assumes proficiency in Python or JavaScript. Length: 1000–2500 lines. Progressive — each section builds on the last.
Required Structure
Part I: Foundations (skip if repo uses Python or JS)
- {Primary Language} for Python/JS Engineers — Syntax side-by-side tables, async model, collections, DI, type system. Concrete code comparisons, NOT abstract descriptions.
- {Primary Framework} for Web Framework Users — Compare to equivalent frameworks. Request pipeline, controllers, routing, config, DI container.
- {Key Technology 1} from First Principles — The problem it solves, core concepts with comparisons, how THIS system uses it.
- {Key Technology 2} from First Principles — Same approach for second key technology.
Part II: This Codebase 5. The Big Picture — One-sentence summary, core entities table, architecture graph TB diagram. 6. Domain Model & Data Flow — erDiagram, data invariants, sequenceDiagram for primary request lifecycle. 7. Key Patterns — "If you want to add X, follow this pattern" templates with real code.
Part III: Getting Productive 8. Development Environment Setup — Prerequisites table (Tool, Version, Install Command), step-by-step setup, common mistakes. 9. Your First Task — End-to-end walkthrough of adding a simple feature. 10. Development Workflow — Branch strategy, commit conventions, PR process. Use flowchart diagram. 11. Running Tests — All tests, single file, single test, coverage commands. 12. Debugging Guide — Common issues table: Symptom, Cause, Fix. 13. Common Pitfalls — Mistakes every new contributor makes and how to avoid them.
Appendices
- Glossary (40+ terms)
- Key File Reference (Path, Purpose, Why It Matters, Source)
- Quick Reference Card — Cheat sheet of most-used commands
Key Rules
- Progressive depth: Part I → Part II → Part III. Never reference something before explaining it.
- Concrete over abstract: Code examples from the actual codebase.
- Minimum 5 Mermaid diagrams — each followed by `` comment block
- Every claim has a linked citation
- Every command must be copy-pasteable with expected output
Step 3: Generate Staff Engineer Guide
File: onboarding/staff-engineer-guide.mdAudience: Staff/principal engineers. Deep systems experience, may not know this repo's language. Length: 800–1200 lines. Dense, opinionated, architectural.
Required Sections
- Executive Summary — What the system is in one dense paragraph. What it owns vs delegates.
- The Core Architectural Insight — The SINGLE most important concept. Include pseudocode in a DIFFERENT language from the repo.
- System Architecture — Full Mermaid
graph TBdiagram (middleware → controllers → services → storage → external). Call out the "heart" of the system. - Domain Model — Mermaid
erDiagramof core entities. Data invariants table: Entity, Invariant, Enforced By, Source. - Component Types & Execution Paths — Table: Component, Type, Execution Path, Key File, Source.
- Request Lifecycle — Mermaid
sequenceDiagram(withautonumber) showing typical request. - State Transitions — Mermaid
stateDiagram-v2for domain entities with lifecycle states. - Decision Log — Table: Decision, Alternatives Considered, Rationale, Source.
- Dependency Rationale — Table: Dependency, Purpose, What It Replaced, Source.
- Storage & Data Architecture — Stores used, data access layer, consistency model. Comparison table.
- Failure Modes & Error Handling —
flowchartfor error propagation. - API Surface & Protocols — Table: Method, Path, Handler, Auth, Source.
- Configuration & Feature Flags — Table: Key, Default, Description, Source.
- Performance Characteristics — Bottlenecks, scaling limits, hot paths.
- Security Model — Auth, authorization, trust boundaries.
- Testing Strategy — What's tested, what isn't.
- Known Technical Debt — Table: Issue, Risk Level, Affected Files, Source.
- Where to Go Deep — Recommended source file reading order.
Key Rules
- Use pseudocode in a different language to explain concepts
- Use comparison tables to map unfamiliar concepts (e.g.,
Task<T>=Awaitable[T]) - Dense prose with tables, NOT shallow bullet lists
- Every claim has a linked citation + `` comment blocks after each diagram
- Minimum 5 Mermaid diagrams (architecture, ER, class, sequence, state/flowchart)
- Focus on WHY decisions were made, not just WHAT exists
Step 4: Generate Executive Guide
File: onboarding/executive-guide.mdAudience: VP/director of engineering. Needs capability overview, risk assessment, and investment context — NOT code-level details. Length: 400–800 lines. Strategic, concise, decision-oriented.
Required Sections
- System Overview — What it does, who uses it, business value (2-3 sentences)
- Capability Map — Table: Capability, Status (Built/Partial/Planned), Maturity, Dependencies
- Architecture at a Glance — High-level Mermaid
graph LRdiagram. Services and deployment units ONLY — no internal code. Focus on team boundaries. - Team Topology — Table: Component, Owner, Criticality, Bus Factor
- Technology Investment Thesis — Table: Technology, Purpose, Alternatives Considered, Risk Level
- Risk Assessment — Table: Risk, Likelihood, Impact, Mitigation, Owner. Cover reliability, security, scalability, compliance.
- Cost & Scaling Model — How costs scale with usage. Bottlenecks. When next scaling investment is needed.
- Dependency Map — Mermaid
graph TBshowing critical external dependencies. Table: Dependency, Type (Service/Library/Platform), Risk if Unavailable. - Key Metrics & Observability — Table: Metric, Current Value, Target, Source
- Roadmap Alignment — Engineering workstreams mapped to business priorities
- Technical Debt Summary — Table: Issue, Business Impact, Effort to Fix, Priority (top 5 items)
- Recommendations — 3-5 actionable recommendations for next quarter, prioritized by impact
Key Rules
- NO code snippets — this guide is for engineering leaders, not coders
- Diagrams at service/team level, not class/function level
- Business language — translate technical concepts into impact (reliability, velocity, cost, risk)
- Tables for every structured finding
- Minimum 3 Mermaid diagrams (architecture overview, dependency map, capability map)
- Every claim backed by evidence — cite wiki sections or source files
Step 5: Generate Product Manager Guide
File: onboarding/product-manager-guide.mdAudience: Product managers and non-engineering stakeholders. Needs to understand capabilities and boundaries — NOT implementation. Length: 400–800 lines. User-centric, feature-focused, constraint-aware.
Required Sections
- What This System Does — 2-3 sentence elevator pitch in plain language (zero jargon)
- User Journey Map — Mermaid
graph LRorjourneydiagram showing primary user flows - Feature Capability Map — Table: Feature, Status (Live/Beta/Planned/Not Possible), User Behavior, Limitations
- Data Model (Product View) — Simplified Mermaid
erDiagramin business terms (e.g., "A Project has many Documents") - Configuration & Feature Flags — Table: Flag, What It Controls, Default, Who Can Change It
- API Capabilities — Table: Capability, Method, Authentication, Rate Limits (written for integration partners)
- Performance & SLAs — Table: Operation, Expected Latency, Throughput Limit, Current SLA
- Known Limitations & Constraints — Table: Limitation, User Impact, Workaround, Planned Fix
- Data & Privacy — Table: Data Type, Storage Location, Retention, Compliance
- Glossary — Domain terms in plain language
- FAQ — 10+ common PM questions, answered concisely
Key Rules
- ZERO engineering jargon — no "middleware", "dependency injection", "ORM"
- User-centric framing — everything described in terms of user experience
- Minimum 3 Mermaid diagrams (user journey, data model, feature map)
- Tables for every structured finding
- If a technical concept must be mentioned, explain it in one plain sentence
- Every claim grounded in evidence
Mermaid Diagram Rules (ALL guides)
ALL diagrams must use dark-mode colors:
- Node fills:
#2d333b, borders:#6d5dfc, text:#e6edf3 - Subgraph backgrounds:
#161b22, borders:#30363d - Lines:
#8b949e - If using inline
styledirectives, use dark fills with,color:#e6edf3 - Do NOT use
<br/>in Mermaid labels (use<br>or line breaks)
Validation
After generating each guide, verify:
- All file paths mentioned actually exist in the repo
- All class/method names are accurate (not hallucinated)
- Mermaid diagrams render (no syntax errors)
- No bare HTML-like tags outside code fences — wrap in backticks
- Each guide is appropriate for its audience — no code in Executive/PM guides, no jargon in PM guide
$ARGUMENTS