|
| 1 | +--- |
| 2 | +name: mcpp-ide-contributing |
| 3 | +description: Use when contributing to mcpp-ide -- reporting a bug, proposing a feature, opening an issue or a pull request, or making any change as a person or an AI agent. Covers triage (core or plugin, fix or workaround), issue and pull-request conventions, commits, review and merge. |
| 4 | +--- |
| 5 | + |
| 6 | +# Contributing to mcpp-ide |
| 7 | + |
| 8 | +Read [AGENTS.md](../../../AGENTS.md) first: who owns what, and the rules every change follows. The |
| 9 | +flow is **issue → branch → pull request → CI → review → squash merge**. Nothing is pushed to `main` |
| 10 | +directly, whatever its size, and that includes a version bump or a change to documentation. |
| 11 | + |
| 12 | +## 1. Triage before anything else |
| 13 | + |
| 14 | +Answer the three questions of AGENTS.md §3 and write the answers into the issue: |
| 15 | + |
| 16 | +| Question | How to decide | Outcome | |
| 17 | +|---|---|---| |
| 18 | +| Whose problem? | reproduce without the editor: `mcpp-ide self-check --json`, `mcpp-ide serve`, the mock mcpp | mcpp, mcppls or an editor's upstream: report it there and link it here | |
| 19 | +| Core or plugin? | would another editor need the same change? | yes → backend (`src/`, `spec/`, `protocol/`); no → `mide-plugins/<editor>` | |
| 20 | +| Fix or workaround? | does the cause lie in this repository? | no → no workaround by default; an exception states its cause, the upstream issue, why it cannot wait and when it is removed | |
| 21 | + |
| 22 | +## 2. Issues |
| 23 | + |
| 24 | +Open one with a template (`.github/ISSUE_TEMPLATE/`): **Bug report**, **Feature request** or |
| 25 | +**Task**. A blank issue is not offered, and a question goes to the |
| 26 | +[forum](https://forum.d2learn.org/category/20). |
| 27 | + |
| 28 | +- Title: `<type>(<component>): <sentence>`, for example `fix(clion): the test tree loses a case's |
| 29 | + location after a rebuild`. The type is one of `feat`, `fix`, `refactor`, `perf`, `test`, `docs`, |
| 30 | + `ci`, `chore`. The component is `backend`, `vscode`, `clion`, `nvim`, `docs` or `ci`. |
| 31 | +- A bug carries the output of `mcpp-ide self-check --json` (backend, mcpp, mcppls, xlings, trust), |
| 32 | + the editor and its version, the steps, the expected and actual behaviour, and the triage answers. |
| 33 | + The IDE report (**mcpp: Export IDE Report**) is attached when the backend is involved. |
| 34 | +- A feature states the motivation, which party it belongs to, the protocol or `spec/` change it |
| 35 | + needs, and what each editor shows. A change larger than one pull request gets a design record in |
| 36 | + `.agents/docs/` (`YYYY-MM-DD-<subject>.md`, opening with its status) before any code. |
| 37 | + |
| 38 | +## 3. Branches and commits |
| 39 | + |
| 40 | +- Branch from the latest `main`: `<type>/<subject>`, for example `fix/clion-case-location`. A |
| 41 | + release is made on `release/X.Y.Z` (see [mcpp-ide-development](../mcpp-ide-development/SKILL.md)). |
| 42 | +- A commit is English and declarative, `<type>(<component>): <sentence>` or `X.Y.Z: <sentence>` for |
| 43 | + a release, with no emoji. Its body says why, citing the issue, the design record or mcpp's spec |
| 44 | + clause where there is one. |
| 45 | + |
| 46 | +## 4. Pull requests |
| 47 | + |
| 48 | +- One pull request does one thing and links the issue it closes (`Closes #N`). The title follows |
| 49 | + the commit form, since it becomes the subject of the squash merge. |
| 50 | +- The body follows `.github/pull_request_template.md`: summary, triage, the criteria (the test that |
| 51 | + fails before and passes after, and where it ran), compatibility and the checklist. |
| 52 | +- A change of behaviour updates, in the same pull request: `protocol/protocol.schema.json`, the docs |
| 53 | + it touches (README.md and README.zh-CN.md together), `spec/i18n` in both languages, and |
| 54 | + CHANGELOG.md under its series. |
| 55 | +- The required check is `ci`. It runs the components the change reaches (`.github/components.tsv`), |
| 56 | + so a backend change runs every plugin. A red job is fixed, never retried until green. |
| 57 | +- The merge is a squash with an explicit subject and body; GitHub's composed message is not used. |
| 58 | + |
| 59 | +## 5. AI agents |
| 60 | + |
| 61 | +An agent contributes under the same rules, plus these: |
| 62 | + |
| 63 | +- **Read before writing:** AGENTS.md, the docs it links for the area, and the neighbouring code. Do |
| 64 | + the triage before editing, and say in the pull request which party the problem belongs to. |
| 65 | +- **Ask before outward actions:** creating an issue, a pull request, a comment, a tag or a release |
| 66 | + needs the person's confirmation. Never push to `main`, force-push a shared branch, merge, tag or |
| 67 | + publish unless explicitly asked. |
| 68 | +- **Report what ran:** each criterion says whether it ran locally, on which system, or was left to |
| 69 | + CI. A test that did not run is not described as passing. |
| 70 | +- **Stay in scope:** no drive-by refactors, no new dependency and no workaround for another party's |
| 71 | + problem without the person's decision. |
| 72 | +- **No attribution trailers:** commits and pull requests carry no `Co-Authored-By` lines or |
| 73 | + generated-by footers. The person who submits a change is responsible for it. |
0 commit comments