@moda-ai/cli 1.26.0 → 1.27.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.
@@ -9,7 +9,7 @@ import {
9
9
  runPromptSync,
10
10
  runSkillSync,
11
11
  upsertSkillManifestRecord
12
- } from "./cli-xf5nx5hc.js";
12
+ } from "./cli-cjqzrp9k.js";
13
13
  import {
14
14
  codingAgentDisplayName,
15
15
  describeCodingAgentEvent,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda-ai/cli",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "description": "CLI for Moda - AI agent analytics and observability",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": "moda.skill_index.v1",
3
- "bundled_at": "2026-08-17T00:50:53.917Z",
4
- "cli_version": "1.26.0",
3
+ "bundled_at": "2026-08-17T23:28:03.271Z",
4
+ "cli_version": "1.27.0",
5
5
  "skills": [
6
6
  {
7
7
  "id": "integration-node-anthropic",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: moda-cli
3
- version: 2.2.0
3
+ version: 2.3.0
4
4
  description: Query Moda's AI agent conversation analytics and manage code-first prompt versions from the terminal — semantic/keyword/hybrid message search, overview KPIs, topic clusters, message context, user frustration detections, tool failures, and moda prompts status/sync/promote. Use when the user asks about moda, modaflows, conversation analytics, prompt management, user frustrations, agent observability, tool failure debugging, wants to find conversations or tool calls about a topic, or wants to investigate how their AI agent is performing.
5
5
  ---
6
6
 
@@ -55,9 +55,9 @@ Optional:
55
55
 
56
56
  - `MODA_BASE_URL` defaults to `https://moda.dev`; override only for
57
57
  self-hosted or staging.
58
- - `MODA_SKILL_VERSION` — export to `2.2.0` so search-adoption telemetry can
58
+ - `MODA_SKILL_VERSION` — export to `2.3.0` so search-adoption telemetry can
59
59
  attribute usage to this skill version. Set it once per session:
60
- `export MODA_SKILL_VERSION=2.2.0`.
60
+ `export MODA_SKILL_VERSION=2.3.0`.
61
61
 
62
62
  ## Setup
63
63
 
@@ -614,6 +614,56 @@ Do not copy prompt text from the dashboard into source code. The repo prompt
614
614
  files are the source of truth; the dashboard is for visibility, usage, labels,
615
615
  and future evals.
616
616
 
617
+ ### 8. Fixing detected Problems (`moda fix` — a fix with proof)
618
+
619
+ Moda turns detected Problems into **Fixes**: a routed candidate change plus a
620
+ replay **gate** that proves it on held-out production evidence. Use this loop
621
+ whenever you are asked to fix a detected Problem, or before hand-editing
622
+ prompt/skill files in a repo that talks to Moda.
623
+
624
+ The fail-to-pass loop:
625
+
626
+ ```bash
627
+ moda fixes # ranked queue of fixes with proof
628
+ moda fix <fix_id> --packet # moda.fix_packet.v1: cause, target
629
+ # file, evidence links, verify cmd,
630
+ # handback + magic word
631
+ moda fix start <problem_id> --wait # draft from a Problem and drive
632
+ # scope -> propose -> gate
633
+ moda fix checkout <fix_id> # write the candidate at its target
634
+ # source path (NEVER runs git)
635
+ # ...edit the target file...
636
+ moda fix verify <fix_id> --prompt-file=<path> # re-gate local content on the
637
+ # frozen holdout
638
+ # iterate edit -> verify until exit 0, then hand back:
639
+ moda fix submit <fix_id> --pr # draft PR via the Moda GitHub App
640
+ moda fix submit <fix_id> --local-ref=<branch> # or record your own branch
641
+ moda fix dismiss <fix_id> --reason="why" # reject (feeds problem feedback)
642
+ ```
643
+
644
+ **`moda fix verify` exit codes are the contract — branch on them:**
645
+
646
+ | Exit | Meaning | How to treat it |
647
+ |---|---|---|
648
+ | `0` | gate pass — the candidate beat baseline on the frozen holdout (wins clear the noise floor) | Safe to submit. |
649
+ | `1` | gate fail — per-case findings ride the envelope's `findings[]` (`case:<id>` entries with baseline/candidate pass) | Edit the candidate and re-`verify`. |
650
+ | `3` | degraded/inconclusive — too many abstentions, blocked coverage, or no verdict | **Never treat as a pass.** Re-verify or read `moda fix <fix_id> --packet`. |
651
+
652
+ Rules that keep the proof honest:
653
+
654
+ - The verdict reads only **holdout** cases the proposer never saw; repair
655
+ rows are training cases, never the headline.
656
+ - The gate compares against a noise floor from a baseline-vs-baseline control
657
+ run — a "win" inside the noise floor does not pass.
658
+ - `checkout` only writes the file. Branching (`moda/fix/<shortref-lower>`),
659
+ committing, and pushing are yours; the CLI never runs git.
660
+ - Fix PRs end with the magic word `Fixes MODA-FIX-<SHORTREF>` in the body —
661
+ Moda-authored PRs carry it automatically; hand-authored PRs must include it
662
+ so the merge confirms the fix and starts production monitoring.
663
+ - The pipeline is advance-on-poll: `--wait` (on `start`, `verify`, or
664
+ `moda fix <fix_id> --wait`) drives it; a fix left `GATING` will not finish
665
+ on its own.
666
+
617
667
  ## Common workflow recipes
618
668
 
619
669
  ### Find where something happened (search → context)
@@ -791,6 +841,13 @@ npx: `npx -p @moda-ai/cli moda <command>`.
791
841
  | `moda prompts diff` | Read-only local prompt diff/status |
792
842
  | `moda prompts sync` | Upload changed prompt versions and update lockfile |
793
843
  | `moda prompts promote <key>` | Move a remote prompt label |
844
+ | `moda fixes` | Ranked queue of Fixes ("a fix with proof"); `--status=S`, `--limit=N`, `--cursor=TOKEN` |
845
+ | `moda fix <fix_id>` | One Fix: status + gate result; `--packet` prints `moda.fix_packet.v1`; `--wait` drives a running pipeline to rest |
846
+ | `moda fix start <problem_id>` | Draft a Fix from a Problem (`--type=auto\|prompt`); `--wait` drives scope → propose → gate |
847
+ | `moda fix verify <fix_id>` | Re-gate on the frozen holdout; `--prompt-file=P` gates local content (exit `0` pass / `1` fail with per-case findings / `3` degraded — never a pass) |
848
+ | `moda fix checkout <fix_id>` | Write the candidate at its target source path (never runs git) |
849
+ | `moda fix submit <fix_id>` | Deliver: `--pr` opens a draft PR \| `--local-ref=<branch>` records your branch |
850
+ | `moda fix dismiss <fix_id>` | Reject with `--reason=TEXT` (feeds problem feedback) |
794
851
 
795
852
  `moda search` flags: `--mode=keyword|semantic|hybrid` (default `hybrid`),
796
853
  `--user-id`, `--time-range=<range>`, `--limit=N` (1–100, default 20).