@zigrivers/scaffold 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +411 -7
- package/content/knowledge/game/game-accessibility.md +328 -0
- package/content/knowledge/game/game-ai-patterns.md +542 -0
- package/content/knowledge/game/game-asset-pipeline.md +359 -0
- package/content/knowledge/game/game-audio-design.md +342 -0
- package/content/knowledge/game/game-binary-vcs-strategy.md +396 -0
- package/content/knowledge/game/game-design-document.md +260 -0
- package/content/knowledge/game/game-domain-patterns.md +297 -0
- package/content/knowledge/game/game-economy-design.md +355 -0
- package/content/knowledge/game/game-engine-selection.md +242 -0
- package/content/knowledge/game/game-input-systems.md +357 -0
- package/content/knowledge/game/game-level-content-design.md +455 -0
- package/content/knowledge/game/game-liveops-analytics.md +280 -0
- package/content/knowledge/game/game-localization.md +323 -0
- package/content/knowledge/game/game-milestone-definitions.md +337 -0
- package/content/knowledge/game/game-modding-ugc.md +390 -0
- package/content/knowledge/game/game-narrative-design.md +404 -0
- package/content/knowledge/game/game-networking.md +391 -0
- package/content/knowledge/game/game-performance-budgeting.md +378 -0
- package/content/knowledge/game/game-platform-certification.md +417 -0
- package/content/knowledge/game/game-project-structure.md +360 -0
- package/content/knowledge/game/game-save-systems.md +452 -0
- package/content/knowledge/game/game-testing-strategy.md +470 -0
- package/content/knowledge/game/game-ui-patterns.md +475 -0
- package/content/knowledge/game/game-vr-ar-design.md +313 -0
- package/content/knowledge/review/review-art-bible.md +305 -0
- package/content/knowledge/review/review-game-design.md +303 -0
- package/content/knowledge/review/review-game-economy.md +272 -0
- package/content/knowledge/review/review-netcode.md +280 -0
- package/content/knowledge/review/review-platform-cert.md +341 -0
- package/content/methodology/custom-defaults.yml +25 -0
- package/content/methodology/deep.yml +25 -0
- package/content/methodology/game-overlay.yml +145 -0
- package/content/methodology/mvp.yml +25 -0
- package/content/pipeline/architecture/ai-behavior-design.md +87 -0
- package/content/pipeline/architecture/netcode-spec.md +86 -0
- package/content/pipeline/architecture/review-netcode.md +78 -0
- package/content/pipeline/foundation/performance-budgets.md +91 -0
- package/content/pipeline/modeling/narrative-bible.md +84 -0
- package/content/pipeline/pre/game-design-document.md +89 -0
- package/content/pipeline/pre/review-gdd.md +74 -0
- package/content/pipeline/quality/analytics-telemetry.md +98 -0
- package/content/pipeline/quality/live-ops-plan.md +99 -0
- package/content/pipeline/quality/platform-cert-prep.md +129 -0
- package/content/pipeline/quality/playtest-plan.md +83 -0
- package/content/pipeline/specification/art-bible.md +87 -0
- package/content/pipeline/specification/audio-design.md +96 -0
- package/content/pipeline/specification/content-structure-design.md +141 -0
- package/content/pipeline/specification/economy-design.md +104 -0
- package/content/pipeline/specification/game-accessibility.md +82 -0
- package/content/pipeline/specification/game-ui-spec.md +97 -0
- package/content/pipeline/specification/input-controls-spec.md +81 -0
- package/content/pipeline/specification/localization-plan.md +113 -0
- package/content/pipeline/specification/modding-ugc-spec.md +116 -0
- package/content/pipeline/specification/online-services-spec.md +104 -0
- package/content/pipeline/specification/review-economy.md +87 -0
- package/content/pipeline/specification/review-game-ui.md +73 -0
- package/content/pipeline/specification/save-system-spec.md +116 -0
- package/dist/cli/commands/adopt.d.ts.map +1 -1
- package/dist/cli/commands/adopt.js +25 -0
- package/dist/cli/commands/adopt.js.map +1 -1
- package/dist/cli/commands/adopt.test.js +28 -1
- package/dist/cli/commands/adopt.test.js.map +1 -1
- package/dist/cli/commands/build.test.js +3 -0
- package/dist/cli/commands/build.test.js.map +1 -1
- package/dist/cli/commands/init.d.ts +1 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +6 -0
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/init.test.js +12 -1
- package/dist/cli/commands/init.test.js.map +1 -1
- package/dist/cli/commands/knowledge.test.js +8 -0
- package/dist/cli/commands/knowledge.test.js.map +1 -1
- package/dist/cli/commands/next.d.ts.map +1 -1
- package/dist/cli/commands/next.js +19 -5
- package/dist/cli/commands/next.js.map +1 -1
- package/dist/cli/commands/next.test.js +56 -0
- package/dist/cli/commands/next.test.js.map +1 -1
- package/dist/cli/commands/rework.d.ts.map +1 -1
- package/dist/cli/commands/rework.js +11 -2
- package/dist/cli/commands/rework.js.map +1 -1
- package/dist/cli/commands/rework.test.js +5 -0
- package/dist/cli/commands/rework.test.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +54 -4
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/run.test.js +384 -0
- package/dist/cli/commands/run.test.js.map +1 -1
- package/dist/cli/commands/skip.test.js +3 -0
- package/dist/cli/commands/skip.test.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +16 -3
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/status.test.js +55 -0
- package/dist/cli/commands/status.test.js.map +1 -1
- package/dist/cli/output/auto.d.ts +3 -0
- package/dist/cli/output/auto.d.ts.map +1 -1
- package/dist/cli/output/auto.js +9 -0
- package/dist/cli/output/auto.js.map +1 -1
- package/dist/cli/output/context.d.ts +6 -0
- package/dist/cli/output/context.d.ts.map +1 -1
- package/dist/cli/output/context.js.map +1 -1
- package/dist/cli/output/context.test.js +87 -0
- package/dist/cli/output/context.test.js.map +1 -1
- package/dist/cli/output/error-display.test.js +3 -0
- package/dist/cli/output/error-display.test.js.map +1 -1
- package/dist/cli/output/interactive.d.ts +3 -0
- package/dist/cli/output/interactive.d.ts.map +1 -1
- package/dist/cli/output/interactive.js +76 -0
- package/dist/cli/output/interactive.js.map +1 -1
- package/dist/cli/output/json.d.ts +3 -0
- package/dist/cli/output/json.d.ts.map +1 -1
- package/dist/cli/output/json.js +9 -0
- package/dist/cli/output/json.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +3 -2
- package/dist/config/loader.js.map +1 -1
- package/dist/config/schema.d.ts +641 -15
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +26 -1
- package/dist/config/schema.js.map +1 -1
- package/dist/config/schema.test.js +192 -1
- package/dist/config/schema.test.js.map +1 -1
- package/dist/core/assembly/overlay-loader.d.ts +24 -0
- package/dist/core/assembly/overlay-loader.d.ts.map +1 -0
- package/dist/core/assembly/overlay-loader.js +190 -0
- package/dist/core/assembly/overlay-loader.js.map +1 -0
- package/dist/core/assembly/overlay-loader.test.d.ts +2 -0
- package/dist/core/assembly/overlay-loader.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-loader.test.js +106 -0
- package/dist/core/assembly/overlay-loader.test.js.map +1 -0
- package/dist/core/assembly/overlay-resolver.d.ts +15 -0
- package/dist/core/assembly/overlay-resolver.d.ts.map +1 -0
- package/dist/core/assembly/overlay-resolver.js +58 -0
- package/dist/core/assembly/overlay-resolver.js.map +1 -0
- package/dist/core/assembly/overlay-resolver.test.d.ts +2 -0
- package/dist/core/assembly/overlay-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-resolver.test.js +246 -0
- package/dist/core/assembly/overlay-resolver.test.js.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.d.ts +26 -0
- package/dist/core/assembly/overlay-state-resolver.d.ts.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.js +63 -0
- package/dist/core/assembly/overlay-state-resolver.js.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.test.d.ts +2 -0
- package/dist/core/assembly/overlay-state-resolver.test.d.ts.map +1 -0
- package/dist/core/assembly/overlay-state-resolver.test.js +256 -0
- package/dist/core/assembly/overlay-state-resolver.test.js.map +1 -0
- package/dist/core/assembly/preset-loader.d.ts +1 -0
- package/dist/core/assembly/preset-loader.d.ts.map +1 -1
- package/dist/core/assembly/preset-loader.js +2 -0
- package/dist/core/assembly/preset-loader.js.map +1 -1
- package/dist/core/dependency/eligibility.test.js +3 -0
- package/dist/core/dependency/eligibility.test.js.map +1 -1
- package/dist/e2e/game-pipeline.test.d.ts +10 -0
- package/dist/e2e/game-pipeline.test.d.ts.map +1 -0
- package/dist/e2e/game-pipeline.test.js +298 -0
- package/dist/e2e/game-pipeline.test.js.map +1 -0
- package/dist/e2e/init.test.js +3 -0
- package/dist/e2e/init.test.js.map +1 -1
- package/dist/project/adopt.d.ts +3 -1
- package/dist/project/adopt.d.ts.map +1 -1
- package/dist/project/adopt.js +29 -1
- package/dist/project/adopt.js.map +1 -1
- package/dist/project/adopt.test.js +51 -1
- package/dist/project/adopt.test.js.map +1 -1
- package/dist/types/config.d.ts +50 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.test.d.ts +2 -0
- package/dist/types/config.test.d.ts.map +1 -0
- package/dist/types/config.test.js +97 -0
- package/dist/types/config.test.js.map +1 -0
- package/dist/utils/eligible.d.ts +3 -2
- package/dist/utils/eligible.d.ts.map +1 -1
- package/dist/utils/eligible.js +18 -4
- package/dist/utils/eligible.js.map +1 -1
- package/dist/utils/errors.d.ts +4 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +31 -0
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/errors.test.js +4 -1
- package/dist/utils/errors.test.js.map +1 -1
- package/dist/wizard/questions.d.ts +4 -0
- package/dist/wizard/questions.d.ts.map +1 -1
- package/dist/wizard/questions.js +59 -1
- package/dist/wizard/questions.js.map +1 -1
- package/dist/wizard/questions.test.js +178 -4
- package/dist/wizard/questions.test.js.map +1 -1
- package/dist/wizard/wizard.d.ts +1 -0
- package/dist/wizard/wizard.d.ts.map +1 -1
- package/dist/wizard/wizard.js +4 -1
- package/dist/wizard/wizard.js.map +1 -1
- package/dist/wizard/wizard.test.js +102 -4
- package/dist/wizard/wizard.test.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -76,6 +76,13 @@ Independent review from Google's model. Can run alongside or instead of Codex.
|
|
|
76
76
|
- Requires: Google account (free tier available)
|
|
77
77
|
- Verify: `gemini --version`
|
|
78
78
|
|
|
79
|
+
**mmr** (multi-model review CLI)
|
|
80
|
+
Automates dispatching, monitoring, and reconciling code reviews across multiple AI model CLIs. Works standalone or with Scaffold.
|
|
81
|
+
- Install: `npm install -g @zigrivers/mmr`
|
|
82
|
+
- Verify: `mmr --help`
|
|
83
|
+
- Setup: `mmr config init` (auto-detects installed CLIs)
|
|
84
|
+
- See: [mmr — Multi-Model Review CLI](#mmr--multi-model-review-cli)
|
|
85
|
+
|
|
79
86
|
**Playwright MCP** (web apps only)
|
|
80
87
|
Lets Claude control a real browser for visual testing and screenshots.
|
|
81
88
|
- Install: `claude mcp add playwright npx @playwright/mcp@latest`
|
|
@@ -151,6 +158,12 @@ npm update -g @zigrivers/scaffold
|
|
|
151
158
|
brew upgrade scaffold
|
|
152
159
|
```
|
|
153
160
|
|
|
161
|
+
### mmr
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npm update -g @zigrivers/mmr
|
|
165
|
+
```
|
|
166
|
+
|
|
154
167
|
### Plugin
|
|
155
168
|
|
|
156
169
|
```
|
|
@@ -343,6 +356,97 @@ scaffold dashboard # open a visual progress dashboard in your browser
|
|
|
343
356
|
- **The pipeline is a guide, not a cage.** Skip steps that don't apply (`scaffold skip <step> --reason "..."`). Run them out of order if you know what you're doing. Scaffold tracks dependencies so it'll tell you if you're missing a prerequisite.
|
|
344
357
|
- **Depth controls thoroughness.** Each step runs at a depth from 1 (focused, fast) to 5 (exhaustive). The mvp preset defaults to depth 1; deep defaults to 5. You can override per step or per session: `"Use depth 3 for everything"`.
|
|
345
358
|
|
|
359
|
+
### Game Development
|
|
360
|
+
|
|
361
|
+
Scaffold fully supports game development projects. When you select `game` as your project type, a **project-type overlay** activates 24 game-specific pipeline steps and injects game domain expertise into existing steps — all while keeping the standard pipeline workflow (status, next, rework, multi-model review) fully functional.
|
|
362
|
+
|
|
363
|
+
#### Getting Started
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# Interactive — the wizard asks about your engine, multiplayer, platforms, etc.
|
|
367
|
+
scaffold init
|
|
368
|
+
|
|
369
|
+
# Non-interactive with defaults (engine: custom, single-player, PC)
|
|
370
|
+
scaffold init --project-type game --auto
|
|
371
|
+
|
|
372
|
+
# Non-interactive with specific methodology
|
|
373
|
+
scaffold init --project-type game --methodology deep --auto
|
|
374
|
+
|
|
375
|
+
# Adopt an existing game project (auto-detects Unity/Unreal/Godot)
|
|
376
|
+
scaffold adopt
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
#### How It Works
|
|
380
|
+
|
|
381
|
+
Game support uses a **project-type overlay** architecture. You choose your methodology normally (`mvp`, `deep`, or `custom`), then `projectType: game` layers on top:
|
|
382
|
+
|
|
383
|
+
- **Enables 24 game steps** — GDD, performance budgets, art bible, audio design, etc.
|
|
384
|
+
- **Disables 3 web-centric steps** — `design-system`, `ux-spec`, `review-ux` (replaced by `game-ui-spec`)
|
|
385
|
+
- **Injects 29 game knowledge entries** into existing steps (e.g., game engine evaluation into `tech-stack`, game testing patterns into `tdd`)
|
|
386
|
+
- **Remaps artifact references** so downstream steps read game-specific docs instead of web ones
|
|
387
|
+
|
|
388
|
+
A game jam project uses `mvp` + game overlay (fewer steps, lower depth). An AAA project uses `deep` + game overlay (all steps, max depth).
|
|
389
|
+
|
|
390
|
+
#### Game Configuration
|
|
391
|
+
|
|
392
|
+
During `scaffold init`, the wizard asks game-specific questions with progressive disclosure:
|
|
393
|
+
|
|
394
|
+
| Category | Questions |
|
|
395
|
+
|----------|-----------|
|
|
396
|
+
| **Core** (always asked) | Game engine (Unity/Unreal/Godot/custom), multiplayer mode (none/local/online/hybrid), target platforms (PC/console/mobile/VR/AR) |
|
|
397
|
+
| **Conditional** | Online services (if multiplayer), content structure (levels/open-world/procedural/endless), economy type (none/progression/monetized) |
|
|
398
|
+
| **Advanced** (opt-in) | Narrative depth, supported locales, NPC AI complexity, mod support, persistence model |
|
|
399
|
+
|
|
400
|
+
These answers control which conditional steps activate. A single-player puzzle game gets a different pipeline than a multiplayer live-service RPG.
|
|
401
|
+
|
|
402
|
+
#### Game Pipeline Steps
|
|
403
|
+
|
|
404
|
+
**Always enabled** (12 steps):
|
|
405
|
+
|
|
406
|
+
| Step | Phase | What It Produces |
|
|
407
|
+
|------|-------|-----------------|
|
|
408
|
+
| `game-design-document` | Pre | Game pillars, core loop, mechanics catalog, progression systems |
|
|
409
|
+
| `review-gdd` | Pre | Multi-pass review of GDD for pillar coherence, scope feasibility |
|
|
410
|
+
| `performance-budgets` | Foundation | Frame budgets, memory budgets, GPU limits, loading targets per platform |
|
|
411
|
+
| `game-accessibility` | Specification | XAG-aligned accessibility plan (visual, motor, cognitive, auditory) |
|
|
412
|
+
| `input-controls-spec` | Specification | Input bindings, rebinding, haptics, dead zones, cross-play fairness |
|
|
413
|
+
| `game-ui-spec` | Specification | HUD, menus, controller navigation, settings, FTUE/tutorial, UI states |
|
|
414
|
+
| `review-game-ui` | Specification | Multi-pass review of game UI for completeness and accessibility |
|
|
415
|
+
| `content-structure-design` | Specification | Level layouts, world regions, procedural rulesets, or mission templates |
|
|
416
|
+
| `art-bible` | Specification | Art style, asset specs, naming conventions, DCC pipeline, LOD strategy |
|
|
417
|
+
| `audio-design` | Specification | Audio direction, adaptive music, spatial audio, middleware config, VO |
|
|
418
|
+
| `playtest-plan` | Quality | Playtest types, schedule, feedback templates, balance testing |
|
|
419
|
+
| `analytics-telemetry` | Quality | Event taxonomy, crash telemetry, data pipeline, privacy compliance |
|
|
420
|
+
|
|
421
|
+
**Conditional** (12 steps — activated by your game configuration):
|
|
422
|
+
|
|
423
|
+
| Step | Activates When | What It Produces |
|
|
424
|
+
|------|---------------|-----------------|
|
|
425
|
+
| `narrative-bible` | Narrative is light/heavy | World lore, characters, dialogue systems, branching narrative |
|
|
426
|
+
| `netcode-spec` | Multiplayer is online/hybrid | Network topology, tick rate, prediction, lag compensation, anti-cheat |
|
|
427
|
+
| `review-netcode` | Netcode spec enabled | Latency tolerance, bandwidth, cheat resistance review |
|
|
428
|
+
| `ai-behavior-design` | NPC AI is simple/complex | Behavior trees, pathfinding, perception, difficulty scaling |
|
|
429
|
+
| `economy-design` | Economy is not none | Currencies, loot tables, monetization, legal compliance |
|
|
430
|
+
| `review-economy` | Economy design enabled | Inflation analysis, exploit detection, ethical monetization review |
|
|
431
|
+
| `online-services-spec` | Online services selected | Identity, leaderboards, matchmaking, moderation, cloud save |
|
|
432
|
+
| `modding-ugc-spec` | Mod support enabled | Mod API, sandboxing, distribution, content moderation |
|
|
433
|
+
| `save-system-spec` | Persistence is not none | Save format, cloud sync, corruption recovery, migration |
|
|
434
|
+
| `localization-plan` | Multiple locales | String management, fonts (CJK/RTL), VO localization, LQA |
|
|
435
|
+
| `live-ops-plan` | Live-ops selected | Content cadence, events, hotfix deployment, maintenance |
|
|
436
|
+
| `platform-cert-prep` | Console/mobile/VR targets | Sony TRC, Xbox XR, Nintendo Lotcheck, store compliance checklists |
|
|
437
|
+
|
|
438
|
+
#### Engine Detection
|
|
439
|
+
|
|
440
|
+
`scaffold adopt` automatically detects game engines in existing projects:
|
|
441
|
+
|
|
442
|
+
| Engine | Detection Signal |
|
|
443
|
+
|--------|-----------------|
|
|
444
|
+
| Unity | `Assets/*.meta` files |
|
|
445
|
+
| Unreal | `*.uproject` file |
|
|
446
|
+
| Godot | `project.godot` file |
|
|
447
|
+
|
|
448
|
+
When detected, `scaffold adopt` sets `projectType: game` and `gameConfig.engine` in your config, enabling the full game overlay.
|
|
449
|
+
|
|
346
450
|
## The Pipeline
|
|
347
451
|
|
|
348
452
|
### Phase 0 — Product Vision (vision)
|
|
@@ -546,16 +650,291 @@ You don't need both — Scaffold works with whichever CLIs are available. Having
|
|
|
546
650
|
|
|
547
651
|
### mmr — Multi-Model Review CLI
|
|
548
652
|
|
|
549
|
-
|
|
653
|
+
`mmr` is a standalone CLI that automates multi-model code review. It solves the problems teams hit when manually orchestrating reviews across Claude, Codex, and Gemini: timeouts, auth failures, inconsistent prompts, fragile output parsing, and manual reconciliation.
|
|
654
|
+
|
|
655
|
+
**The core problem it solves:** Without `mmr`, an AI agent dispatching multi-model reviews has to manually construct CLI commands for each model, handle per-tool auth quirks, improvise timeout handling, parse different output formats, and reconcile findings across channels. In practice, this takes 4-6+ minutes per review and frequently fails. `mmr` reduces this to three commands.
|
|
550
656
|
|
|
657
|
+
#### How mmr Works
|
|
658
|
+
|
|
659
|
+
```
|
|
660
|
+
mmr review --pr 47 ──→ Dispatches to all channels in background
|
|
661
|
+
Returns job ID immediately
|
|
662
|
+
Agent continues working
|
|
663
|
+
|
|
664
|
+
mmr status mmr-a1b2c3 ──→ Poll progress (which channels done?)
|
|
665
|
+
Exit code: 0=done, 1=running, 2=failed
|
|
666
|
+
|
|
667
|
+
mmr results mmr-a1b2c3 ──→ Reconcile findings across channels
|
|
668
|
+
Apply severity gate
|
|
669
|
+
Output unified findings
|
|
670
|
+
Exit code: 0=passed, 1=gate failed
|
|
671
|
+
```
|
|
672
|
+
|
|
673
|
+
**Key features:**
|
|
674
|
+
|
|
675
|
+
- **Async job model** — reviews run in background processes. The agent fires `mmr review` and continues working. No blocking for 4-6 minutes.
|
|
676
|
+
- **Per-channel auth verification** — checks authentication before every dispatch. Auth failures are never silent — `mmr` tells you exactly what expired and the command to fix it.
|
|
677
|
+
- **Immutable core prompt** — every channel gets the same severity definitions (P0-P3), output format spec (JSON), and review criteria. No prompt drift between channels.
|
|
678
|
+
- **Automated reconciliation** — when two channels flag the same location, that's consensus (high confidence). When only one channel flags something, it's unique (medium confidence). P0 from any single source is always high confidence.
|
|
679
|
+
- **Configurable severity gate** — project default in `.mmr.yaml`, override per-review with `--fix-threshold`. Default: P2 (fix P0/P1/P2, skip P3).
|
|
680
|
+
- **Multiple output formats** — JSON (default, for machines), text (terminals), markdown (PR comments).
|
|
681
|
+
|
|
682
|
+
#### Installing mmr
|
|
683
|
+
|
|
684
|
+
**npm** (available now):
|
|
685
|
+
```bash
|
|
686
|
+
npm install -g @zigrivers/mmr
|
|
687
|
+
```
|
|
688
|
+
|
|
689
|
+
**Homebrew** (available after next scaffold release):
|
|
551
690
|
```bash
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
mmr results mmr-a1b2c3 # Reconciled findings + gate
|
|
555
|
-
mmr config test # Pre-flight auth check
|
|
691
|
+
brew tap zigrivers/scaffold
|
|
692
|
+
brew install mmr
|
|
556
693
|
```
|
|
557
694
|
|
|
558
|
-
|
|
695
|
+
Verify: `mmr --help`
|
|
696
|
+
|
|
697
|
+
#### Enabling mmr in an Existing Project
|
|
698
|
+
|
|
699
|
+
**Step 1: Install the model CLIs you want to use**
|
|
700
|
+
|
|
701
|
+
You need at least one. More models = more diverse review perspectives.
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
# Claude Code (you probably already have this)
|
|
705
|
+
npm install -g @anthropic-ai/claude-code
|
|
706
|
+
|
|
707
|
+
# Codex CLI (requires ChatGPT Plus/Pro/Team subscription)
|
|
708
|
+
npm install -g @openai/codex
|
|
709
|
+
|
|
710
|
+
# Gemini CLI (free tier available with Google account)
|
|
711
|
+
npm install -g @google/gemini-cli
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
**Step 2: Authenticate each CLI**
|
|
715
|
+
|
|
716
|
+
Each CLI needs a one-time interactive authentication:
|
|
717
|
+
|
|
718
|
+
```bash
|
|
719
|
+
# Claude — if not already logged in
|
|
720
|
+
claude login
|
|
721
|
+
|
|
722
|
+
# Codex — opens browser for OAuth
|
|
723
|
+
codex login
|
|
724
|
+
|
|
725
|
+
# Gemini — opens browser for OAuth
|
|
726
|
+
gemini -p "hello"
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
**Step 3: Initialize mmr in your project**
|
|
730
|
+
|
|
731
|
+
```bash
|
|
732
|
+
cd your-project
|
|
733
|
+
mmr config init
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
This auto-detects which CLIs are installed and generates `.mmr.yaml` in your project root:
|
|
737
|
+
|
|
738
|
+
```
|
|
739
|
+
Detected CLIs:
|
|
740
|
+
✓ claude (claude -p)
|
|
741
|
+
✓ gemini (gemini -p)
|
|
742
|
+
✗ codex (not found)
|
|
743
|
+
|
|
744
|
+
Generated .mmr.yaml with 2 enabled channels.
|
|
745
|
+
Run `mmr config test` to verify authentication.
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
**Step 4: Verify authentication**
|
|
749
|
+
|
|
750
|
+
```bash
|
|
751
|
+
mmr config test
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
```
|
|
755
|
+
claude ✓ installed ✓ authenticated
|
|
756
|
+
gemini ✓ installed ✓ authenticated
|
|
757
|
+
codex ✗ not installed (skipped)
|
|
758
|
+
|
|
759
|
+
2/3 channels ready.
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
If any channel shows an auth failure, `mmr` tells you the exact command to fix it.
|
|
763
|
+
|
|
764
|
+
**Step 5: Commit the config**
|
|
765
|
+
|
|
766
|
+
```bash
|
|
767
|
+
git add .mmr.yaml
|
|
768
|
+
git commit -m "chore: add mmr multi-model review config"
|
|
769
|
+
```
|
|
770
|
+
|
|
771
|
+
This ensures your team shares the same channel configuration.
|
|
772
|
+
|
|
773
|
+
**Step 6 (optional): Customize review criteria**
|
|
774
|
+
|
|
775
|
+
Edit `.mmr.yaml` to add project-specific review criteria that get injected into every review prompt:
|
|
776
|
+
|
|
777
|
+
```yaml
|
|
778
|
+
review_criteria:
|
|
779
|
+
- "Verify all database queries use parameterized statements"
|
|
780
|
+
- "Check that error messages do not leak internal state"
|
|
781
|
+
- "Ensure all API endpoints validate authentication"
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
You can also adjust per-channel timeouts, the default severity threshold, and named review templates for different review types (PR reviews, implementation plan reviews, etc.).
|
|
785
|
+
|
|
786
|
+
#### Using mmr Day-to-Day
|
|
787
|
+
|
|
788
|
+
**After creating a PR:**
|
|
789
|
+
|
|
790
|
+
```bash
|
|
791
|
+
mmr review --pr 47 --focus "auth flow, session handling"
|
|
792
|
+
# → Job mmr-a1b2c3 started. 2/2 channels dispatched.
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
**Continue working, then check back:**
|
|
796
|
+
|
|
797
|
+
```bash
|
|
798
|
+
mmr status mmr-a1b2c3
|
|
799
|
+
# → claude: completed (47s) | gemini: running (2m12s)
|
|
800
|
+
|
|
801
|
+
# Later:
|
|
802
|
+
mmr status mmr-a1b2c3
|
|
803
|
+
# → All channels complete.
|
|
804
|
+
```
|
|
805
|
+
|
|
806
|
+
**Collect reconciled results:**
|
|
807
|
+
|
|
808
|
+
```bash
|
|
809
|
+
mmr results mmr-a1b2c3
|
|
810
|
+
# → JSON output with gate_passed, reconciled_findings, per_channel details
|
|
811
|
+
|
|
812
|
+
mmr results mmr-a1b2c3 --format text
|
|
813
|
+
# → Human-readable terminal output
|
|
814
|
+
|
|
815
|
+
mmr results mmr-a1b2c3 --format markdown
|
|
816
|
+
# → Markdown table for PR comments
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
**Review staged changes before committing:**
|
|
820
|
+
|
|
821
|
+
```bash
|
|
822
|
+
mmr review --staged --focus "regression risk"
|
|
823
|
+
```
|
|
824
|
+
|
|
825
|
+
**Review a diff between branches:**
|
|
826
|
+
|
|
827
|
+
```bash
|
|
828
|
+
mmr review --base main --head feature/auth
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
**Override severity gate for a critical path:**
|
|
832
|
+
|
|
833
|
+
```bash
|
|
834
|
+
mmr review --pr 47 --fix-threshold P1 # Only fix P0 and P1
|
|
835
|
+
mmr review --pr 47 --fix-threshold P0 # Only fix critical/security issues
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
#### mmr Commands Reference
|
|
839
|
+
|
|
840
|
+
| Command | Purpose |
|
|
841
|
+
|---------|---------|
|
|
842
|
+
| `mmr review` | Dispatch a review job to all configured channels |
|
|
843
|
+
| `mmr status <job-id>` | Check progress of a running job |
|
|
844
|
+
| `mmr results <job-id>` | Collect, reconcile, and output findings |
|
|
845
|
+
| `mmr config init` | Auto-detect CLIs and generate `.mmr.yaml` |
|
|
846
|
+
| `mmr config test` | Verify all channels (installation + auth) |
|
|
847
|
+
| `mmr config channels` | List configured channels |
|
|
848
|
+
| `mmr jobs list` | Show recent review jobs |
|
|
849
|
+
| `mmr jobs prune` | Remove old jobs (default: older than 7 days) |
|
|
850
|
+
|
|
851
|
+
#### mmr Configuration (.mmr.yaml)
|
|
852
|
+
|
|
853
|
+
The config file controls channel definitions, defaults, and project-specific review criteria:
|
|
854
|
+
|
|
855
|
+
```yaml
|
|
856
|
+
version: 1
|
|
857
|
+
|
|
858
|
+
defaults:
|
|
859
|
+
fix_threshold: P2 # P0/P1/P2 block the gate, P3 is informational
|
|
860
|
+
timeout: 300 # Per-channel timeout in seconds
|
|
861
|
+
format: json # Default output format
|
|
862
|
+
job_retention_days: 7 # Auto-prune old jobs
|
|
863
|
+
|
|
864
|
+
# Project-specific criteria appended to every review prompt
|
|
865
|
+
review_criteria:
|
|
866
|
+
- "Check for SQL injection in all query builders"
|
|
867
|
+
- "Verify RBAC rules match API contract"
|
|
868
|
+
|
|
869
|
+
# Channel definitions (auto-generated by mmr config init)
|
|
870
|
+
channels:
|
|
871
|
+
claude:
|
|
872
|
+
enabled: true
|
|
873
|
+
command: claude -p
|
|
874
|
+
auth:
|
|
875
|
+
check: "claude -p 'respond with ok' 2>/dev/null"
|
|
876
|
+
timeout: 5
|
|
877
|
+
failure_exit_codes: [1]
|
|
878
|
+
recovery: "Run: claude login"
|
|
879
|
+
|
|
880
|
+
gemini:
|
|
881
|
+
enabled: true
|
|
882
|
+
command: gemini -p
|
|
883
|
+
flags:
|
|
884
|
+
- "--approval-mode yolo"
|
|
885
|
+
- "--output-format json"
|
|
886
|
+
env:
|
|
887
|
+
NO_BROWSER: "true"
|
|
888
|
+
auth:
|
|
889
|
+
check: "NO_BROWSER=true gemini -p 'respond with ok' -o json 2>&1"
|
|
890
|
+
timeout: 5
|
|
891
|
+
failure_exit_codes: [41]
|
|
892
|
+
recovery: "Run: gemini -p 'hello' (interactive, opens browser)"
|
|
893
|
+
timeout: 360 # Gemini tends to be slower
|
|
894
|
+
|
|
895
|
+
codex:
|
|
896
|
+
enabled: true
|
|
897
|
+
command: codex exec
|
|
898
|
+
flags:
|
|
899
|
+
- "--skip-git-repo-check"
|
|
900
|
+
- "-s read-only"
|
|
901
|
+
- "--ephemeral"
|
|
902
|
+
auth:
|
|
903
|
+
check: "codex login status 2>/dev/null"
|
|
904
|
+
timeout: 5
|
|
905
|
+
failure_exit_codes: [1]
|
|
906
|
+
recovery: "Run: codex login"
|
|
907
|
+
```
|
|
908
|
+
|
|
909
|
+
**User-level defaults** can be set in `~/.mmr/config.yaml` for settings that apply across all projects (e.g., which channels are installed on your machine). Project config overrides user config. CLI flags override everything.
|
|
910
|
+
|
|
911
|
+
**Adding a new model CLI** requires only a YAML config change — no code modifications to `mmr`. When a new model CLI ships, add its channel definition to `.mmr.yaml` and you're ready.
|
|
912
|
+
|
|
913
|
+
#### Severity Levels
|
|
914
|
+
|
|
915
|
+
mmr uses a standardized P0-P3 severity classification across all channels:
|
|
916
|
+
|
|
917
|
+
| Level | Name | Definition | Gate Default |
|
|
918
|
+
|-------|------|------------|-------------|
|
|
919
|
+
| **P0** | Critical | Will cause failure, data loss, security vulnerability, or fundamental architectural flaw | Blocks |
|
|
920
|
+
| **P1** | High | Will cause bugs in normal usage, inconsistency, or blocks downstream work | Blocks |
|
|
921
|
+
| **P2** | Medium | Improvement opportunity — style, naming, documentation, minor optimization | Blocks |
|
|
922
|
+
| **P3** | Trivial | Personal preference, trivial nits | Informational |
|
|
923
|
+
|
|
924
|
+
With the default `fix_threshold: P2`, any P0, P1, or P2 finding fails the gate. Only P3-only reviews pass.
|
|
925
|
+
|
|
926
|
+
#### Reconciliation Rules
|
|
927
|
+
|
|
928
|
+
When multiple channels return findings, mmr applies consensus rules:
|
|
929
|
+
|
|
930
|
+
| Scenario | Confidence | Action |
|
|
931
|
+
|----------|-----------|--------|
|
|
932
|
+
| 2+ channels flag same location, same severity | **High** | Report at agreed severity |
|
|
933
|
+
| 2+ channels flag same location, different severity | **Medium** | Report at higher severity |
|
|
934
|
+
| All channels approve (no findings) | **High** | Gate passed |
|
|
935
|
+
| One channel flags P0, others approve | **High** | Report P0 (critical from any source) |
|
|
936
|
+
| One channel flags P1/P2, others approve | **Medium** | Report with attribution |
|
|
937
|
+
| Channels contradict each other | **Low** | Present both for user adjudication |
|
|
559
938
|
|
|
560
939
|
### How It Works
|
|
561
940
|
|
|
@@ -771,6 +1150,7 @@ Options: `--dry-run` to preview, `minor`/`major`/`patch` to specify the bump, `c
|
|
|
771
1150
|
| **Knowledge base** | 60 domain expertise entries that get injected into prompts. Can be extended with project-local overrides. |
|
|
772
1151
|
| **MCP** | Model Context Protocol. A way for Claude to use external tools like a headless browser. |
|
|
773
1152
|
| **Meta-prompt** | A short intent declaration in `content/pipeline/` that gets assembled into a full prompt at runtime. |
|
|
1153
|
+
| **mmr** | Multi-Model Review CLI (`@zigrivers/mmr`). Standalone tool for async multi-model code review dispatch, reconciliation, and severity gating. |
|
|
774
1154
|
| **Methodology** | A preset (deep, mvp, custom) controlling which steps run and at what depth. |
|
|
775
1155
|
| **Multi-model review** | Independent validation from Codex/Gemini CLIs at depth 4-5, catching blind spots a single model misses. |
|
|
776
1156
|
| **PRD** | Product Requirements Document. The foundation for everything Scaffold builds. |
|
|
@@ -826,6 +1206,15 @@ NO_BROWSER=true gemini -p "Review this artifact..." --output-format json --appro
|
|
|
826
1206
|
```
|
|
827
1207
|
These are documented in detail in the `multi-model-dispatch` skill.
|
|
828
1208
|
|
|
1209
|
+
**mmr review dispatches but no channels return results**
|
|
1210
|
+
Check auth: `mmr config test`. If channels show auth failures, re-authenticate with the recovery command shown. If channels are installed but the review hangs, check the per-channel timeout in `.mmr.yaml` — some models take 3-5 minutes for large diffs. Increase `timeout` to 360-600 seconds for large PRs.
|
|
1211
|
+
|
|
1212
|
+
**mmr results says "gate failed" but I disagree with the findings**
|
|
1213
|
+
Use `mmr results <job-id> --format text` to see the full reconciled findings with source attribution and confidence scores. Single-source findings with "unique" agreement are less certain than "consensus" findings. Override the threshold for a specific review: `mmr review --pr 47 --fix-threshold P1` (only gate on P0 and P1).
|
|
1214
|
+
|
|
1215
|
+
**How do I add a new AI model CLI to mmr?**
|
|
1216
|
+
Add a channel definition to `.mmr.yaml` with the command, auth check, and output parser. No code changes needed. See the [mmr Configuration](#mmr-configuration-mmryaml) section for the full schema.
|
|
1217
|
+
|
|
829
1218
|
**I upgraded and my pipeline shows old step names**
|
|
830
1219
|
Run `scaffold status` — the state manager automatically migrates old step names (e.g., `add-playwright` → `add-e2e-testing`, `multi-model-review` → `automated-pr-review`) and removes retired steps.
|
|
831
1220
|
|
|
@@ -873,7 +1262,22 @@ content/
|
|
|
873
1262
|
├── tools/ # 10 tool meta-prompts (stateless, category: tool)
|
|
874
1263
|
├── knowledge/ # 61 domain expertise entries (core, product, review, validation, finalization, execution, tools)
|
|
875
1264
|
├── methodology/ # 3 YAML presets (deep, mvp, custom)
|
|
876
|
-
└── skills/ #
|
|
1265
|
+
└── skills/ # Skill templates with {{markers}} for multi-platform resolution (includes mmr)
|
|
1266
|
+
```
|
|
1267
|
+
|
|
1268
|
+
### mmr package layout
|
|
1269
|
+
|
|
1270
|
+
`@zigrivers/mmr` lives in `packages/mmr/` as an independent workspace package:
|
|
1271
|
+
|
|
1272
|
+
```
|
|
1273
|
+
packages/mmr/
|
|
1274
|
+
├── src/
|
|
1275
|
+
│ ├── commands/ # review, status, results, config, jobs (yargs)
|
|
1276
|
+
│ ├── config/ # Zod schema, 4-layer config loader, builtin channel presets
|
|
1277
|
+
│ ├── core/ # job-store, auth, prompt assembly, parser, reconciler, dispatcher
|
|
1278
|
+
│ └── formatters/ # json, text, markdown output formatters
|
|
1279
|
+
├── templates/ # Immutable core review prompt (severity defs, output format)
|
|
1280
|
+
└── tests/ # 60 tests across 11 files
|
|
877
1281
|
```
|
|
878
1282
|
|
|
879
1283
|
Generated output (gitignored):
|