openclaw - 💡(How to fix) Fix Docs: Create developer onboarding guide separate from user documentation [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59738Fetched 2026-04-08 02:41:08
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
cross-referenced ×1referenced ×1

Code Example

## Before You PR

- Test locally with your OpenClaw instance
- Run tests: `pnpm build && pnpm check && pnpm test`
- For extension/plugin changes, run the fast local lane first:
  - `pnpm test:extension <extension-name>`

---

docs/development/
├── README.md              # Developer onboarding start page
├── architecture/
│   ├── README.md         # High-level system diagram
│   ├── gateway.md        # Gateway protocol and WebSocket details
│   ├── plugins.md        # Plugin/extension architecture
│   └── channels.md       # Channel implementation patterns
├── setup.md              # Development environment setup
├── testing.md            # Testing philosophy and patterns
├── debugging.md          # Common debugging techniques
└── contributing/
    ├── code-review.md    # What to expect in review
    └── conventions.md    # Coding conventions beyond linting

---

# OpenClaw Development Guide

Welcome to OpenClaw development! This guide is for contributors working on
the core codebase, plugins, extensions, or tooling.

## Quick Start

1. **Environment**: Node 22+, pnpm, macOS/Linux/WSL2
2. **Clone**: `git clone https://github.com/openclaw/openclaw.git`
3. **Install**: `pnpm install`
4. **Build**: `pnpm build`
5. **Test**: `pnpm test:fast`

## Architecture Overview

---

## Key Code Locations

| Component | Location | Entry Point |
|-----------|----------|-------------|
| Gateway | `src/gateway/` | `src/gateway/server.ts` |
| Channels | `src/channels/` | `src/channels/channel-web.ts` |
| Plugin SDK | `src/plugin-sdk/` | `src/plugin-sdk/index.ts` |
| Extensions | `extensions/` | `extensions/<name>/index.ts` |
| CLI | `src/cli/` | `src/cli/*.ts` |

## Development Workflow

1. Check existing issues or discuss in Discord
2. Fork and branch
3. Make changes
4. Run relevant tests (see Testing Guide)
5. Submit PR (see Contributing Guide)

## Resources

- [Architecture](architecture/)
- [Testing Guide](testing.md)
- [Debugging Tips](debugging.md)

---

# Plugin/Extension Architecture

## Extension vs Plugin

- **Extensions**: Bundled with OpenClaw, in `extensions/` directory
- **Plugins**: Third-party, installed from npm or ClawHub

## Plugin SDK Boundary

Extensions must import only from `openclaw/plugin-sdk/*`:

---

## Extension Structure

---
RAW_BUFFERClick to expand / collapse

Problem

OpenClaw's documentation is primarily user-focused. New contributors lack a clear path to:

  • Understand the codebase architecture
  • Set up a development environment
  • Find where to make changes
  • Understand testing requirements

Current CONTRIBUTING.md covers the basics but doesn't provide deep architectural context.

Current State

From CONTRIBUTING.md:

## Before You PR

- Test locally with your OpenClaw instance
- Run tests: `pnpm build && pnpm check && pnpm test`
- For extension/plugin changes, run the fast local lane first:
  - `pnpm test:extension <extension-name>`

Missing:

  • Architecture overview
  • Code organization principles
  • How to read the plugin SDK
  • Extension vs Core boundaries

Proposed Solution

Create docs/development/ directory with:

docs/development/
├── README.md              # Developer onboarding start page
├── architecture/
│   ├── README.md         # High-level system diagram
│   ├── gateway.md        # Gateway protocol and WebSocket details
│   ├── plugins.md        # Plugin/extension architecture
│   └── channels.md       # Channel implementation patterns
├── setup.md              # Development environment setup
├── testing.md            # Testing philosophy and patterns
├── debugging.md          # Common debugging techniques
└── contributing/
    ├── code-review.md    # What to expect in review
    └── conventions.md    # Coding conventions beyond linting

Sample Content for docs/development/README.md

# OpenClaw Development Guide

Welcome to OpenClaw development! This guide is for contributors working on
the core codebase, plugins, extensions, or tooling.

## Quick Start

1. **Environment**: Node 22+, pnpm, macOS/Linux/WSL2
2. **Clone**: `git clone https://github.com/openclaw/openclaw.git`
3. **Install**: `pnpm install`
4. **Build**: `pnpm build`
5. **Test**: `pnpm test:fast`

## Architecture Overview

┌─────────────────────────────────────────────────────────────┐ │ Gateway │ │ (WebSocket control plane) │ ├──────────────┬──────────────┬──────────────┬─────────────────┤ │ Channels │ Agents │ Tools │ Sessions │ │ (Discord, │ (Pi RPC │ (Browser, │ (subagents, │ │ Telegram, │ mode) │ Canvas) │ history) │ │ etc.) │ │ │ │ └──────────────┴──────────────┴──────────────┴─────────────────┘


## Key Code Locations

| Component | Location | Entry Point |
|-----------|----------|-------------|
| Gateway | `src/gateway/` | `src/gateway/server.ts` |
| Channels | `src/channels/` | `src/channels/channel-web.ts` |
| Plugin SDK | `src/plugin-sdk/` | `src/plugin-sdk/index.ts` |
| Extensions | `extensions/` | `extensions/<name>/index.ts` |
| CLI | `src/cli/` | `src/cli/*.ts` |

## Development Workflow

1. Check existing issues or discuss in Discord
2. Fork and branch
3. Make changes
4. Run relevant tests (see Testing Guide)
5. Submit PR (see Contributing Guide)

## Resources

- [Architecture](architecture/)
- [Testing Guide](testing.md)
- [Debugging Tips](debugging.md)

Sample Content for docs/development/architecture/plugins.md

# Plugin/Extension Architecture

## Extension vs Plugin

- **Extensions**: Bundled with OpenClaw, in `extensions/` directory
- **Plugins**: Third-party, installed from npm or ClawHub

## Plugin SDK Boundary

Extensions must import only from `openclaw/plugin-sdk/*`:

```typescript
// ✅ Good
import { defineChannel } from "openclaw/plugin-sdk/channel-setup";

// ❌ Bad - internal implementation detail
import { something } from "../../src/channels/internal";

Extension Structure

extensions/<name>/
├── index.ts              # Entry point
├── package.json          # Extension metadata
├── manifest.json           # OpenClaw-specific config
└── src/
    └── ...

## Content to Migrate/Create

From existing docs:
- `AGENTS.md` → `docs/development/contributing/agents-guide.md`
- Testing patterns from `CONTRIBUTING.md` → `docs/development/testing.md`
- Architecture info from Discord/wiki → `docs/development/architecture/`

New content needed:
- Gateway protocol deep dive
- Plugin SDK reference
- Channel implementation walkthrough
- Debugging common issues

## Acceptance Criteria

- [ ] `docs/development/` directory created
- [ ] `README.md` with quick start and architecture overview
- [ ] `architecture/` with high-level diagrams
- [ ] `testing.md` with test selection guide
- [ ] `setup.md` with platform-specific notes
- [ ] Links added from `CONTRIBUTING.md` and main `README.md`

## References

- Current: `CONTRIBUTING.md`, `AGENTS.md`
- Related: Plugin SDK in `src/plugin-sdk/`
- Discord: #dev channel for architecture discussions

---

**Priority:** Medium
**Effort:** Medium (2-3 days)
**Labels:** docs, dx, good first issue

extent analysis

TL;DR

Create a docs/development/ directory with detailed guides on OpenClaw's architecture, setup, testing, and debugging to improve the contributor experience.

Guidance

  • Create the proposed directory structure under docs/development/ with the specified files and content to provide a clear path for new contributors.
  • Migrate relevant content from existing documentation, such as AGENTS.md and testing patterns from CONTRIBUTING.md, to their respective new locations.
  • Develop new content, including a gateway protocol deep dive, plugin SDK reference, and channel implementation walkthrough, to fill gaps in the documentation.
  • Ensure that the new documentation is linked from CONTRIBUTING.md and the main README.md for easy access.

Example

The sample content provided for docs/development/README.md and docs/development/architecture/plugins.md demonstrates the level of detail and clarity required for the new documentation.

Notes

The effort required for this task is estimated as medium (2-3 days), and it is labeled as a good first issue, indicating that it is suitable for new contributors.

Recommendation

Apply the proposed solution by creating the docs/development/ directory and populating it with the necessary guides and documentation to improve the contributor experience and provide a clear understanding of OpenClaw's architecture and development workflow.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING