Skip to content

Commit 8b750ac

Browse files
Ylberclaude
andcommitted
docs: add mxcli-dev contributor command namespace and /mxcli-dev:review
Introduces a clear separation between commands meant for mxcli users (mendix/) and commands for contributors to this repo (mxcli-dev/). - Add .claude/commands/mxcli-dev/review.md — /mxcli-dev:review command with structured PR review workflow and a self-improving recurring findings table seeded from ako's reviews of #216 and #217 - Document the mendix: vs mxcli-dev: namespace split in CLAUDE.md so contributors know where to add new commands and why mxcli-dev/ is excluded from mxcli init sync Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 80dffe3 commit 8b750ac

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# /mxcli-dev:review — PR Review
2+
3+
Run a structured review of the current branch's changes against the CLAUDE.md
4+
checklist, then check the recurring findings table below for patterns that have
5+
burned us before.
6+
7+
## Steps
8+
9+
1. Run `gh pr view` and `gh pr diff` (or `git diff main...HEAD`) to read the change.
10+
2. Work through the CLAUDE.md "PR / Commit Review Checklist" in full.
11+
3. Then check every row in the Recurring Findings table below — flag any match.
12+
4. Report: blockers first, then moderate issues, then minor. Include a concrete fix
13+
option for every blocker (not just "this is wrong").
14+
5. After the review: **add a row** to the Recurring Findings table for any new
15+
pattern not already covered.
16+
17+
---
18+
19+
## Recurring Findings
20+
21+
Patterns caught in real reviews. Each row is a class of mistake worth checking
22+
proactively. Add a row after every review that surfaces something new.
23+
24+
| # | Finding | Category | Canonical fix |
25+
|---|---------|----------|---------------|
26+
| 1 | Formatter emits a keyword not present in `MDLParser.g4` → DESCRIBE output won't re-parse (e.g. `RANGE(...)`) | DESCRIBE roundtrip | Grep grammar before assuming a keyword is valid; if construct can't be expressed yet, emit `-- TypeName(field=value) — not yet expressible in MDL` |
27+
| 2 | Output uses `$currentObject/Attr` prefix — non-idiomatic; Studio Pro uses bare attribute names | Idiomatic output | Verify against a real Studio Pro BSON sample before choosing a prefix convention |
28+
| 3 | Malformed BSON field (missing key, wrong type) produces silent garbage output (e.g. `RANGE($x, , )`) | Error handling | Default missing numeric fields to `"0"`; or emit `-- malformed <TypeName>` rather than broken MDL |
29+
| 4 | No DESCRIBE roundtrip test — grammar gap went undetected until human review | Test coverage | Add roundtrip test: format struct → MDL string → parse → confirm no error |
30+
| 5 | Hardcoded personal path in committed file (e.g. `/c/Users/Ylber.Sadiku/...`) | Docs quality | Use bare commands (`go test ./...`) without absolute paths in any committed doc or skill |
31+
| 6 | Docs-only PR cites an unmerged PR as a "model example" — cited PR had blockers | Docs quality | Only cite merged, verified PRs; or annotate with known gaps if citing in-flight work |
32+
| 7 | Skill/doc table references a function that doesn't exist (e.g. `formatActionStatement()` vs `formatAction()`) | Docs quality | Grep function names before writing: `grep -r "func formatA" mdl/executor/` |
33+
| 8 | "Always X" rule is too absolute for trivial edge cases (e.g. "always write failing test first" for one-char typos) | Docs quality | Soften to "prefer X" or add an exception clause; include the reasoning so readers can judge edge cases |
34+
35+
---
36+
37+
## After Every Review
38+
39+
- [ ] All blockers have a concrete fix option stated.
40+
- [ ] Recurring Findings table updated with any new pattern.
41+
- [ ] If docs-only PR: every function name, path, and PR reference verified against
42+
live code before approving.

CLAUDE.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,22 @@ mxcli new MyApp --version 10.24.0 --output-dir ./projects/my-app
360360

361361
Steps performed: downloads MxBuild → `mx create-project``mxcli init` → downloads correct Linux mxcli binary for devcontainer. The result is a ready-to-open project with `.devcontainer/`, AI tooling, and a working `./mxcli` binary.
362362

363+
### Slash Command Namespaces
364+
365+
Commands in `.claude/commands/` are organised by audience:
366+
367+
| Namespace | Folder | Invoked as | Purpose |
368+
|-----------|--------|------------|---------|
369+
| `mendix:` | `.claude/commands/mendix/` | `/mendix:lint` | mxcli **user** commands — synced to Mendix projects via `mxcli init` |
370+
| `mxcli-dev:` | `.claude/commands/mxcli-dev/` | `/mxcli-dev:review` | **Contributor** commands — this repo only, never synced to user projects |
371+
372+
Both namespaces are discoverable by typing `/mxcli` in Claude Code. Add new contributor tooling (review workflows, debugging helpers, etc.) under `mxcli-dev/`. Add commands intended for Mendix project users under `mendix/`.
373+
363374
### mxcli init
364375

365376
`mxcli init` creates a `.claude/` folder with skills, commands, CLAUDE.md, and VS Code MDL extension in a target Mendix project. Source of truth for synced assets:
366377
- Skills: `reference/mendix-repl/templates/.claude/skills/`
367-
- Commands: `.claude/commands/mendix/`
378+
- Commands: `.claude/commands/mendix/` (the `mxcli-dev/` folder is **not** synced)
368379
- VS Code extension: `vscode-mdl/vscode-mdl-*.vsix`
369380

370381
Build-time sync: `make build` syncs everything automatically. Individual targets: `make sync-skills`, `make sync-commands`, `make sync-vsix`.

0 commit comments

Comments
 (0)