๐งถ Context Weaver โ Repo Onboarding Tour
A Cline-integrated VS Code extension that automatically scans a repository to extract the true onboarding context โ architecture, conventions, DB schema, environment variables, and "gotchas" โ then produces an interactive, editor-native guided tour.
Why?
Onboarding to a new codebase is painful. READMEs go stale, tribal knowledge lives in Slack threads, and new devs spend days figuring out what goes where. Context Weaver fixes this by reading the code itself โ not relying on docs that may be outdated.
What It Scans
| Scanner | What It Detects |
|---|---|
| Architecture | Languages, frameworks, tools, runtime versions, directory structure, entry points |
| Conventions | ESLint, Prettier, Biome, EditorConfig, Ruff, Black, test frameworks, git hooks, commitlint, import aliases, barrel exports |
| DB Schema | Prisma, TypeORM, Sequelize, Mongoose, Drizzle, raw SQL migrations, seed files |
| Environment | .env files, process.env / import.meta.env / os.environ references in code, Docker Compose env vars, secret detection |
| Gotchas | Multiple lockfiles, missing .dockerignore, .env not gitignored, deprecated packages, hardcoded localhost, missing test scripts, HACK/FIXME annotations |
Installation
# Clone the repo
git clone https://github.com/your-org/cline-context-weaver.git
cd cline-context-weaver
# Install dependencies
npm install
# Compile
npm run compile
Then press F5 in VS Code to launch the Extension Development Host.
Usage
1. Scan & Generate Tour
Open the Command Palette (Ctrl+Shift+P) and run:
Context Weaver: Scan Repo & Generate Onboarding Tour
This will:
- Run all 5 scanners against your workspace
- Generate a structured
OnboardingContextJSON - Produce an interactive
GuidedTourwith step-by-step navigation - Export human-readable Markdown documents
- Open the interactive tour in the sidebar
2. Open Existing Tour
Context Weaver: Open Onboarding Tour
Opens a previously generated tour from .context-weaver/guided-tour.json.
3. Export as Markdown
Context Weaver: Export Onboarding Context as Markdown
Generates .context-weaver/ONBOARDING.md โ a standalone document you can commit to your repo.
Output Files
All outputs are saved to .context-weaver/ in your workspace root:
| File | Purpose |
|---|---|
onboarding-context.json |
Full structured context (machine-readable) |
guided-tour.json |
Interactive tour steps (machine-readable) |
ONBOARDING.md |
Human-readable onboarding document |
TOUR.md |
Human-readable guided tour with TOC |
Interactive Tour UI
The sidebar webview provides:
- Section navigation โ jump between Overview, Architecture, Conventions, Database, Environment, Gotchas
- Step-by-step progression โ with Previous/Next buttons and progress bar
- File links โ click to open referenced files directly in the editor at the relevant line
- Collapsible step list โ see all steps at a glance and jump to any one
Cline Integration
The .clinerules file at the project root instructs Cline to:
- Auto-load the onboarding context when it exists
- Ground answers in the detected stack, architecture, and conventions
- Follow conventions when generating code (formatting, imports, naming)
- Warn about gotchas proactively when changes touch affected areas
- Reference the correct ORM patterns when writing data layer code
For Your Own Repos
Copy the .clinerules pattern into any repo where you want Cline to leverage Context Weaver's output. After running a scan, Cline will automatically use .context-weaver/onboarding-context.json as grounding context.
Architecture
src/
โโโ types.ts # Core type definitions
โโโ extension.ts # VS Code extension entry point
โโโ contextAggregator.ts # Orchestrates all scanners
โโโ tourGenerator.ts # Transforms context โ guided tour
โโโ markdownExporter.ts # Exports context/tour as Markdown
โโโ tourWebviewPanel.ts # Interactive sidebar webview UI
โโโ scanners/
โโโ index.ts # Scanner barrel exports
โโโ utils.ts # Shared file I/O utilities
โโโ architectureScanner.ts # Stack & directory detection
โโโ conventionScanner.ts # Linting, formatting, git conventions
โโโ dbSchemaScanner.ts # ORM, migrations, schema detection
โโโ envScanner.ts # Environment variable detection
โโโ gotchaScanner.ts # Pitfall & warning detection
Contributing
- Each scanner is independent โ add new ones by implementing the
Scanner<T>interface - Add new gotcha detections in
gotchaScanner.ts - Extend framework detection in
architectureScanner.tsby adding toFRAMEWORK_SIGNATURES
License
MIT
Built With
- json
- yaml
Log in or sign up for Devpost to join the conversation.