diff --git a/plugins/Wzdhehe/mcode-webui/CONTRIBUTING.md b/plugins/Wzdhehe/mcode-webui/CONTRIBUTING.md new file mode 100644 index 0000000..f302fab --- /dev/null +++ b/plugins/Wzdhehe/mcode-webui/CONTRIBUTING.md @@ -0,0 +1,171 @@ +# Contributing to Mcode Web UI + +Thanks for your interest in Mcode Web UI! This document covers +the day-to-day contribution workflow. For the bigger picture (plugin +packaging, release process), see [`docs/DEVELOPMENT.md`](docs/DEVELOPMENT.md) +and [`plugins/Wzdhehe/mcode-webui/README.md`](plugins/Wzdhehe/mcode-webui/README.md). + +## Code of conduct + +Be kind. We review for substance, not for style preferences. If a +change makes the webui more correct / faster / easier to use, it's +in scope. + +## Development setup + +Requirements: + +- **Node 22.19+** (uses `node:test`, `URL.parse`, `Blob.stream`) +- **Mcode CLI 0.1.4+** on `PATH` (or `MCODE_CMD` pointing to it) +- A POSIX-like shell on Windows: PowerShell 7+ or Git Bash + +Clone and run: + +```bash +git clone https://github.com/Wzdhehe/Mcode-webui.git +cd Mcode-webui +npm install # only devDeps (eslint, prettier, c8) +npm test # 382 unit tests + 1 skipped (383 total) +npm run lint # eslint flat config, must be 0 warnings +npm run dev # node server.js +# → http://127.0.0.1:8080/ +``` + +`npm test` and `npm run lint` **must pass** before opening a PR. + +## Repository layout + +This repo has a **dual layout** — both copies are kept in sync: + +``` +Mcode-webui/ # ← the development tree (root) +├── server/ public/ test/ # Node + frontend + tests +├── docs/ # ARCHITECTURE, API, CAPABILITIES, … +├── acp.mjs, server.js, package.json +│ +└── plugins/Wzdhehe/mcode-webui/ # ← the plugin artifact + ├── server/ public/ test/ # ↑ real copies, not symlinks + ├── docs/ references/ skills/ + ├── plugin.json package.json LICENSE + ├── README.md PR_DESCRIPTION.md + └── SKILL.md # lives at skills/mcode-webui/SKILL.md +``` + +**Why two copies?** The community plugin registry takes the +`plugins/.../Mcode-webui/` tree as the submission. We keep it as a +real directory copy (not a junction or symlink — those break +zip-packaging and confuse `git log`). + +`npm run setup:plugin` is a no-op on the current layout (it used to +create junctions; the trees have been expanded since). + +## Editing flow + +1. **Edit at the repo root** (`server/`, `public/`, `test/`). +2. **Mirror the change to the plugin tree** — copy the changed files + from `/server/...` to `plugins/Wzdhehe/mcode-webui/server/...`, + and the same for `public/`, `test/`, `docs/`. + (The `package:plugin` script does this for you, but a + per-PR manual sync is fine for small changes.) +3. **Run the gate**: + ```bash + npm test + npm run lint + npm run validate:plugin + ``` +4. **Commit** with a conventional message (see below). +5. **Push** to a feature branch and open a PR. + +## Commit message format + +We loosely follow [Conventional Commits](https://www.conventionalcommits.org/): + +``` +(): + + +