@moda-ai/cli 1.26.0 → 1.27.1
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/package.json
CHANGED
package/skills/moda-cli/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moda-cli
|
|
3
|
-
version: 2.
|
|
3
|
+
version: 2.4.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.
|
|
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.
|
|
60
|
+
`export MODA_SKILL_VERSION=2.3.0`.
|
|
61
61
|
|
|
62
62
|
## Setup
|
|
63
63
|
|
|
@@ -614,6 +614,77 @@ 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
|
+
Fixes are typed by where the evidence points: `PROMPT` (a managed prompt
|
|
625
|
+
revision — the checkout/verify/submit loop below), `TOOL_SCHEMA` (a proposed
|
|
626
|
+
rewrite of one tool's description), and `SKILL` (a drafted SKILL.md for an
|
|
627
|
+
agent-behavior problem). Tool and skill candidates are not repo files: read
|
|
628
|
+
them from the packet (they are also written locally under
|
|
629
|
+
`.moda/fixes/<SHORTREF>/`), apply them in your own stack, then confirm with
|
|
630
|
+
`moda fix mark-applied` — no GitHub integration required.
|
|
631
|
+
|
|
632
|
+
The fail-to-pass loop:
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
moda fixes # ranked queue of fixes with proof
|
|
636
|
+
moda fix <fix_id> --packet # moda.fix_packet.v1: cause, target
|
|
637
|
+
# file, evidence links, verify cmd,
|
|
638
|
+
# handback + magic word; tool/skill
|
|
639
|
+
# candidates land in .moda/fixes/
|
|
640
|
+
moda fix start <problem_id> --wait # draft from a Problem and drive
|
|
641
|
+
# scope -> propose -> gate
|
|
642
|
+
moda fix checkout <fix_id> # PROMPT fixes: write the candidate
|
|
643
|
+
# at its target source path
|
|
644
|
+
# (NEVER runs git)
|
|
645
|
+
# ...edit the target file...
|
|
646
|
+
moda fix verify <fix_id> --prompt-file=<path> # re-gate local content on the
|
|
647
|
+
# frozen holdout (PROMPT only)
|
|
648
|
+
# iterate edit -> verify until exit 0, then hand back:
|
|
649
|
+
moda fix submit <fix_id> --pr # draft PR via the Moda GitHub App
|
|
650
|
+
moda fix submit <fix_id> --local-ref=<branch> # or record your own branch
|
|
651
|
+
moda fix mark-applied <fix_id> --note="…" # tool/skill/no-PR path: confirm a
|
|
652
|
+
# candidate you applied yourself
|
|
653
|
+
moda fix dismiss <fix_id> --reason="why" # reject (feeds problem feedback)
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
**`moda fix verify` exit codes are the contract — branch on them:**
|
|
657
|
+
|
|
658
|
+
| Exit | Meaning | How to treat it |
|
|
659
|
+
|---|---|---|
|
|
660
|
+
| `0` | gate pass — the candidate beat baseline on the frozen holdout (wins clear the noise floor) | Safe to submit. |
|
|
661
|
+
| `1` | gate fail — per-case findings ride the envelope's `findings[]` (`case:<id>` entries with baseline/candidate pass) | Edit the candidate and re-`verify`. |
|
|
662
|
+
| `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`. |
|
|
663
|
+
|
|
664
|
+
Rules that keep the proof honest:
|
|
665
|
+
|
|
666
|
+
- The verdict reads only **holdout** cases the proposer never saw; repair
|
|
667
|
+
rows are training cases, never the headline.
|
|
668
|
+
- The gate compares against a noise floor from a baseline-vs-baseline control
|
|
669
|
+
run — a "win" inside the noise floor does not pass.
|
|
670
|
+
- `checkout` only writes the file. Branching (`moda/fix/<shortref-lower>`),
|
|
671
|
+
committing, and pushing are yours; the CLI never runs git.
|
|
672
|
+
- Fix PRs end with the magic word `Fixes MODA-FIX-<SHORTREF>` in the body —
|
|
673
|
+
Moda-authored PRs carry it automatically; hand-authored PRs must include it
|
|
674
|
+
so the merge confirms the fix and starts production monitoring.
|
|
675
|
+
- `mark-applied` is the confirmation for changes shipped without a PR (tool
|
|
676
|
+
descriptions, installed skills, hand-applied prompts): it flips the fix to
|
|
677
|
+
`SHIPPED`, records your `--note`, and starts the same monitoring the merge
|
|
678
|
+
webhook would. It is idempotent — repeating it is a duplicate no-op.
|
|
679
|
+
- `TOOL_SCHEMA` fixes gate like prompt fixes (both arms pin the same current
|
|
680
|
+
prompt; the proposed description is the only delta). `SKILL` fixes rest at
|
|
681
|
+
`PROPOSED` until the skill is registered with the Moda skill harness — an
|
|
682
|
+
inline drafted SKILL.md cannot enter the gate, so deliver it via the packet
|
|
683
|
+
and `mark-applied`.
|
|
684
|
+
- The pipeline is advance-on-poll: `--wait` (on `start`, `verify`, or
|
|
685
|
+
`moda fix <fix_id> --wait`) drives it; a fix left `GATING` will not finish
|
|
686
|
+
on its own.
|
|
687
|
+
|
|
617
688
|
## Common workflow recipes
|
|
618
689
|
|
|
619
690
|
### Find where something happened (search → context)
|
|
@@ -791,6 +862,14 @@ npx: `npx -p @moda-ai/cli moda <command>`.
|
|
|
791
862
|
| `moda prompts diff` | Read-only local prompt diff/status |
|
|
792
863
|
| `moda prompts sync` | Upload changed prompt versions and update lockfile |
|
|
793
864
|
| `moda prompts promote <key>` | Move a remote prompt label |
|
|
865
|
+
| `moda fixes` | Ranked queue of Fixes ("a fix with proof"); `--status=S`, `--limit=N`, `--cursor=TOKEN` |
|
|
866
|
+
| `moda fix <fix_id>` | One Fix: status + gate result; `--packet` prints `moda.fix_packet.v1` and writes tool/skill candidates under `.moda/fixes/<ref>/`; `--wait` drives a running pipeline to rest |
|
|
867
|
+
| `moda fix start <problem_id>` | Draft a Fix from a Problem (`--type=auto\|prompt`); `--wait` drives scope → propose → gate |
|
|
868
|
+
| `moda fix verify <fix_id>` | Re-gate on the frozen holdout; `--prompt-file=P` gates local content, PROMPT fixes only (exit `0` pass / `1` fail with per-case findings / `3` degraded — never a pass) |
|
|
869
|
+
| `moda fix checkout <fix_id>` | Write the candidate at its target source path (never runs git; PROMPT fixes only) |
|
|
870
|
+
| `moda fix submit <fix_id>` | Deliver: `--pr` opens a draft PR \| `--local-ref=<branch>` records your branch |
|
|
871
|
+
| `moda fix mark-applied <fix_id>` | Confirm a candidate you applied in your own stack (`--note=TEXT`, ≤600 chars); no PR needed — flips to SHIPPED and starts monitoring |
|
|
872
|
+
| `moda fix dismiss <fix_id>` | Reject with `--reason=TEXT` (feeds problem feedback) |
|
|
794
873
|
|
|
795
874
|
`moda search` flags: `--mode=keyword|semantic|hybrid` (default `hybrid`),
|
|
796
875
|
`--user-id`, `--time-range=<range>`, `--limit=N` (1–100, default 20).
|