@jevitate/cli 0.1.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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/dist/ai-cli.d.ts +31 -0
  3. package/dist/ai-cli.js +238 -0
  4. package/dist/ai-cli.js.map +1 -0
  5. package/dist/bin.d.ts +2 -0
  6. package/dist/bin.js +50663 -0
  7. package/dist/bin.js.map +1 -0
  8. package/dist/data-dir.d.ts +9 -0
  9. package/dist/data-dir.js +13 -0
  10. package/dist/data-dir.js.map +1 -0
  11. package/dist/envelope.d.ts +11 -0
  12. package/dist/envelope.js +7 -0
  13. package/dist/envelope.js.map +1 -0
  14. package/dist/explore-api.d.ts +187 -0
  15. package/dist/explore-api.js +302 -0
  16. package/dist/explore-api.js.map +1 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +3 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/init-keys.d.ts +14 -0
  21. package/dist/init-keys.js +18 -0
  22. package/dist/init-keys.js.map +1 -0
  23. package/dist/init-mcp.d.ts +87 -0
  24. package/dist/init-mcp.js +198 -0
  25. package/dist/init-mcp.js.map +1 -0
  26. package/dist/init-skills.d.ts +80 -0
  27. package/dist/init-skills.js +256 -0
  28. package/dist/init-skills.js.map +1 -0
  29. package/dist/journey-api.d.ts +37 -0
  30. package/dist/journey-api.js +55 -0
  31. package/dist/journey-api.js.map +1 -0
  32. package/dist/load-api.d.ts +48 -0
  33. package/dist/load-api.js +84 -0
  34. package/dist/load-api.js.map +1 -0
  35. package/dist/mcp-api.d.ts +116 -0
  36. package/dist/mcp-api.js +359 -0
  37. package/dist/mcp-api.js.map +1 -0
  38. package/dist/mission-api.d.ts +56 -0
  39. package/dist/mission-api.js +65 -0
  40. package/dist/mission-api.js.map +1 -0
  41. package/dist/program.d.ts +77 -0
  42. package/dist/program.js +1938 -0
  43. package/dist/program.js.map +1 -0
  44. package/dist/record-api.d.ts +74 -0
  45. package/dist/record-api.js +93 -0
  46. package/dist/record-api.js.map +1 -0
  47. package/dist/regression-api.d.ts +17 -0
  48. package/dist/regression-api.js +16 -0
  49. package/dist/regression-api.js.map +1 -0
  50. package/dist/self-heal-adapter.d.ts +31 -0
  51. package/dist/self-heal-adapter.js +70 -0
  52. package/dist/self-heal-adapter.js.map +1 -0
  53. package/dist/source-api.d.ts +147 -0
  54. package/dist/source-api.js +208 -0
  55. package/dist/source-api.js.map +1 -0
  56. package/dist/source-run-api.d.ts +57 -0
  57. package/dist/source-run-api.js +91 -0
  58. package/dist/source-run-api.js.map +1 -0
  59. package/dist/ui-api.d.ts +35 -0
  60. package/dist/ui-api.js +369 -0
  61. package/dist/ui-api.js.map +1 -0
  62. package/dist/ux-api.d.ts +75 -0
  63. package/dist/ux-api.js +231 -0
  64. package/dist/ux-api.js.map +1 -0
  65. package/dist/version.d.ts +1 -0
  66. package/dist/version.js +37 -0
  67. package/dist/version.js.map +1 -0
  68. package/package.json +85 -0
  69. package/skills/jevitate-explore/SKILL.md +108 -0
  70. package/skills/jevitate-load-test/SKILL.md +42 -0
  71. package/skills/jevitate-mission-scope/SKILL.md +107 -0
  72. package/skills/jevitate-record/SKILL.md +78 -0
  73. package/skills/jevitate-run-journey/SKILL.md +72 -0
  74. package/skills/jevitate-sources/SKILL.md +88 -0
  75. package/skills/jevitate-ux-review/SKILL.md +68 -0
  76. package/ui/app.js +538 -0
  77. package/ui/index.html +546 -0
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: jevitate-record
3
+ description: Capture a demonstrated browser flow into a Recording (`jevitate record --url`) and post-process it — diff multiple takes, review/classify fill steps (postdoc), fit a timing policy, promote a value to a variable — via the jevitate CLI. Use to record human-demonstrated takes and turn them into a parameterized, replayable artifact.
4
+ ---
5
+
6
+ You drive Jevitate's human-driven authoring mode (RxD): capturing a take from a
7
+ live demonstration, then post-processing one or more takes into a clean,
8
+ parameterized `Recording` a Journey can be built from. Capture is a live,
9
+ headed browser demonstration a human performs — you launch it and they drive.
10
+
11
+ ## Capture a take (live demonstration)
12
+
13
+ - `jevitate record --url <authorized-url> [--intent "<framing>"] [--retro
14
+ "<note>"] [--allow <origin>] [--out <dir>] --json` opens a headed browser at
15
+ an authorized origin and records the human's demonstrated flow into a
16
+ `Recording` JSON file (default `~/.jevitate/recordings`). The session is
17
+ headed by design — a record session IS a live human demonstration; add
18
+ `--headless` only when a caller explicitly asks. The target must be
19
+ authorized (defaults to `--url`'s own origin; widen only with explicit
20
+ `--allow`), and an unauthorized target is refused
21
+ (`E_UNAUTHORIZED_EXPLORE_TARGET`).
22
+ - The emitted `recordingPath` is the take you then feed into the diff/postdoc
23
+ flow below. Capture two or more takes of the same flow (varying the data each
24
+ time) when you want `diff` to classify which values are variables.
25
+
26
+ ## Diff multiple takes
27
+
28
+ - `jevitate recording diff <takeA.json> <takeB.json> [more.json...] --json` —
29
+ compares fill/select steps across takes and classifies each varying value
30
+ (constant vs. likely-variable) with a confidence score. Read the confidences;
31
+ do not treat a low-confidence classification as settled — surface it to the
32
+ human via `postdoc` instead of deciding for them.
33
+
34
+ ## Review and classify (postdoc)
35
+
36
+ - `jevitate recording postdoc <take1.json> [more.json...] --decisions <decisions.json> --out <result.json> --json`
37
+ applies a `PostdocDecision[]` (one decision per varying fill/select step:
38
+ `classify: "constant" | "variable" | "handback"`, with a `name` for
39
+ `"variable"` or a `prompt` for `"handback"`) non-interactively. Build the
40
+ decisions file yourself from the `diff` output and the user's stated intent
41
+ (e.g. "the quantity should be a variable, everything else is fixed") — do not
42
+ ask the human to run the interactive prompt flow when you already know the
43
+ answer from context.
44
+ - Without `--decisions`, `postdoc` is interactive (prompts a human at the
45
+ terminal) — only omit `--decisions` when you are explicitly handing control
46
+ to a human, not when driving autonomously.
47
+
48
+ ## Fit a timing policy
49
+
50
+ - `jevitate recording fit <recording.json> --json` derives a `SitePolicy`
51
+ (interaction timing) from a recording's captured pacing. Hand the result to
52
+ `jevitate site policy set <site> --file <policy.json>` if the user wants it
53
+ applied.
54
+
55
+ ## Promote a value to a variable directly (single-take shortcut)
56
+
57
+ - `jevitate recording promote <file.json> --page <n> --step <n> --var <name>` —
58
+ for the simple case of a single take with one known value to parameterize,
59
+ skipping the full diff/postdoc review flow.
60
+
61
+ ## Publishing the result
62
+
63
+ - The output of `postdoc`/`promote` is a `Recording` JSON file — one authoring
64
+ artifact short of a runnable Journey. Two autonomous authoring paths write a
65
+ Journey directly from a goal-based exploration: `jevitate
66
+ explore-author-journey` (see `jevitate-explore`) emits an UNPROMOTED,
67
+ parameterized Journey a human must still promote. To share a promoted local
68
+ Journey to a distributed source, use `jevitate journey publish <id> --to
69
+ <source>` (see `jevitate-sources`).
70
+
71
+ ## Known gaps
72
+
73
+ - There is no single-command "postdoc result -> promoted local Journey" verb: a
74
+ `Recording` produced here still becomes a Journey through the authoring paths
75
+ above (`explore-author-journey`) or the `JourneyRegistry` API, and promotion
76
+ stays a deliberate human gate. `jevitate explore-author-journey` is a
77
+ separate, Jev-driving authoring path (not human capture) that may be what a
78
+ user who wants a Journey "recorded for them" actually needs.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: jevitate-run-journey
3
+ description: Find and run a promoted Jevitate Journey by id, with typed params, via the jevitate CLI or the find_capabilities/run_journey MCP tools. Use when a user wants to execute a known, already-recorded browser automation (a login, a checkout, a form submission) rather than explore or record a new one.
4
+ ---
5
+
6
+ You drive already-published, promoted Jevitate Journeys. You never write or invent
7
+ automation steps yourself — a Journey is a deterministic, pre-recorded, reviewed
8
+ artifact; your job is to find the right one and run it with the right params.
9
+
10
+ ## Discover
11
+
12
+ - CLI: `jevitate journey find "<query>" --json` — searches promoted Journeys by
13
+ name/description. Returns `{ id, name, description, params }[]`.
14
+ - MCP: `find_capabilities(query)` returns the same shape. Prefer this when you are
15
+ already inside an MCP-connected session — it is scoped to the same
16
+ promoted-only allowlist.
17
+ - `jevitate journey list --json` shows ALL Journeys including unpromoted ones —
18
+ use this only for authoring/debugging with a human present, never to find
19
+ something to run autonomously (an unpromoted Journey is unpromoted for a
20
+ reason and `journey run`/`run_journey` will refuse it anyway).
21
+
22
+ ## Run
23
+
24
+ - CLI: `jevitate journey run <id> --param key=value --param key2=value2 --json`.
25
+ Every param the `find`/`find_capabilities` result listed under `params` is
26
+ required; passing an unknown param key is a refusal (`E_INVALID_PARAMS`), not
27
+ a silent ignore. An unknown id is `E_UNKNOWN_JOURNEY`.
28
+ - MCP: `run_journey(id, params)` — same param-schema validation, same refusal on
29
+ an unknown id or params. It NEVER accepts inline steps or a raw recording —
30
+ a published id only.
31
+ - Read the JSON envelope's `outcome` field. `"ok"` and `"healed"` (a run that
32
+ recovered via self-heal) are both successes; `"quarantined"` (and any other
33
+ value, including a secret-handback pause) means it did not complete — report
34
+ that honestly, do not summarize a non-success outcome as success.
35
+
36
+ ## Self-heal (optional, additive)
37
+
38
+ - `jevitate journey run <id> --self-heal <fail-closed|hybrid|full>` opts a run
39
+ into scoped self-healing when a selector drifts. The default `fail-closed`
40
+ preserves the plain, unhealed behavior. `hybrid`/`full` need an AI gateway
41
+ (`--real` after `jevitate ai setup`, or `--fake-ai` for a pipeline smoke);
42
+ requesting a heal mode without one fails closed rather than running unhealed.
43
+ - A write/irreversible step NEVER auto-heals in any mode — that floor is
44
+ enforced by the runtime, not something you can override from a flag.
45
+
46
+ ## What you must never do
47
+
48
+ - Never pass inline steps, a raw URL, or a selector anywhere in this flow — you
49
+ only ever pass an `id` that came from `find`/`find_capabilities`.
50
+ - Never guess a param value that looks like a secret (a password, an API key) —
51
+ if a Journey's params include something secret-shaped, tell the user it needs
52
+ to be supplied by them or via the configured secret manager, never invent one.
53
+ - Never try to run an id you have not first seen in a `find`/`find_capabilities`
54
+ result in this same session — a promoted id can be revoked; don't rely on a
55
+ memorized id from an earlier conversation.
56
+
57
+ ## Publishing to a distributed source
58
+
59
+ - `jevitate journey publish <id> --to <source>` pushes a PROMOTED local Journey
60
+ up to a registered distributed source (see `jevitate-sources`). It preserves
61
+ every publish-side guard: promoted-only, secret-references-only, and
62
+ declared-origin coverage; it writes onto a new `publish/<id>` branch and,
63
+ when `gh` is present, opens a PR. It never publishes an unpromoted Journey.
64
+
65
+ ## Known gaps
66
+
67
+ - There is no single "raw Recording -> promoted Journey" command: a Recording
68
+ becomes a Journey through the authoring paths (`jevitate
69
+ explore-author-journey`, which writes an UNPROMOTED Journey a human still
70
+ promotes) or the `JourneyRegistry` API, and promotion stays a deliberate
71
+ human gate. If a user asks you to "promote this recording," recommend those
72
+ paths rather than guessing at a promote command — do not invent one.
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: jevitate-sources
3
+ description: Manage Jevitate's distributed Journey sources — add/list/pull/update/remove git-backed sources, trust individual Journeys (content-hash-bound), run a trusted remote Journey through the run-gate, and publish a local promoted Journey up to a source — via `jevitate source ...` and `jevitate journey publish`. Use when sharing Journeys across repos or trusting/running a third-party Journey; use jevitate-run-journey for an already-local Journey.
4
+ ---
5
+
6
+ You add, trust, run, and publish federated Journeys across git-backed sources.
7
+ `@jevitate/sources` (git-backed remote sources, a local source,
8
+ trust/acknowledgement tracking, a lockfile pinning each source at a commit, a
9
+ publish flow, and a risk-classifying run-gate) is fully wired to the
10
+ `jevitate source ...` and `jevitate journey publish` commands — this is a real,
11
+ invokable surface, not a programmatic-only capability.
12
+
13
+ ## The model
14
+
15
+ - A `JourneySource` (local or remote/git) exposes a promoted-only
16
+ `list()`/`find()` just like a local `JourneyRegistry`. Each result carries a
17
+ `source`, an optional `pin` (a locked commit), a `riskClass` (`"read-only" |
18
+ "risky"`), and `trusted` (whether this project has acknowledged that exact
19
+ content). Trust is LOCAL and per-user; it is bound to a content hash, so any
20
+ change to a Journey's content invalidates its trust until re-approved.
21
+
22
+ ## Add and manage sources
23
+
24
+ - `jevitate source add <name> <gitUrl> [--accept-tou] --json` clones and pins a
25
+ source at its current commit and prints its declared Terms of Use per origin.
26
+ A source's Journeys cannot RUN until its ToU is acknowledged — pass
27
+ `--accept-tou` (an explicit human act) to acknowledge at add time, or re-run
28
+ later. `add` never trusts any Journey implicitly.
29
+ - `jevitate source list --json` — registered sources, their pinned commit, and
30
+ the set of trusted Journey ids.
31
+ - `jevitate source pull <name> --json` fetches without moving the pin;
32
+ `jevitate source update <name> --json` advances the pin to the fetched head.
33
+ - `jevitate source remove <name> --json` — deregister a source.
34
+
35
+ ## Trust an individual Journey
36
+
37
+ - `jevitate source trust <name> <journeyId> --json` explicitly trusts ONE
38
+ Journey in a source, bound to its current content hash. This is the gate a
39
+ `risky`-classified Journey must pass before it can run. Trust never comes from
40
+ `add`/`pull`/`update` — only from this explicit act, and it emits only the
41
+ address + bound hash, never the Journey's content.
42
+
43
+ ## Run a trusted remote Journey (through the run-gate)
44
+
45
+ - `jevitate source run <name> <journeyId> --param k=v ... --json` runs a
46
+ remote-source Journey THROUGH `@jevitate/sources`' `resolveForRun` gate. Every
47
+ refusal is a typed error thrown BEFORE any browser launches, each with its own
48
+ code so a caller knows WHY:
49
+ - `E_SOURCE_RUN_HASH_MISMATCH` — the pinned content no longer matches what was
50
+ trusted.
51
+ - `E_SOURCE_RUN_UNTRUSTED` — a `risky` Journey that was never trusted.
52
+ - `E_SOURCE_RUN_ORIGIN` — a navigate target outside the Journey's declared
53
+ origins.
54
+ - `E_SOURCE_RUN_TOU` — the source's Terms of Use were never acknowledged.
55
+ - `E_SOURCE_RUN_SECRET` — an embedded secret (Journeys carry secret
56
+ references, never values).
57
+ - `source run` is the REMOTE trust boundary; `jevitate journey run` stays the
58
+ LOCAL `FsJourneyStore` path. Keep them separate — a remote run never bypasses
59
+ the gate.
60
+
61
+ ## Publish a local Journey up to a source
62
+
63
+ - `jevitate journey publish <id> --to <source> [--declare-origin <origin> ...]
64
+ [--as <newId>] --json` pushes a PROMOTED local Journey up to a registered
65
+ source. It preserves every publish-side guard (promoted-only,
66
+ secret-references-only, declared-origin coverage), writes onto a new
67
+ `publish/<id>` branch, and opens a PR when `gh` is present (degrading to
68
+ printed instructions when it is not). It refuses an unpromoted Journey
69
+ (`E_JOURNEY_PUBLISH_NOT_PROMOTED`) and an embedded secret
70
+ (`E_JOURNEY_PUBLISH_SECRET`).
71
+
72
+ ## What you must never do
73
+
74
+ - Never acknowledge a source's ToU (`--accept-tou`) or trust a Journey
75
+ (`source trust`) on the user's behalf without their explicit say-so — both are
76
+ human-consent gates, not conveniences to auto-satisfy.
77
+ - Never treat an untrusted or `risky`-classified federated Journey as safe to
78
+ run — the run-gate exists precisely to stop that, and a refusal is the correct
79
+ outcome to surface, not an obstacle to work around.
80
+ - Never widen a Journey's declared origins on publish beyond what the human
81
+ authorized just to make coverage pass.
82
+
83
+ ## Known gaps
84
+
85
+ - There is no MCP-tool surface over federated sources yet — the
86
+ `find_capabilities`/`run_journey` MCP tools operate over the LOCAL promoted
87
+ store, not remote sources. Federated add/trust/run/publish are CLI-only today;
88
+ drive the `jevitate source ...` commands directly.
@@ -0,0 +1,68 @@
1
+ ---
2
+ name: jevitate-ux-review
3
+ description: Produce ranked, cited, advisory usability findings for a flow — offline over a saved Recording (`jevitate ux <recording> --app-class`) or live over an authorized target (`jevitate explore --strategy usability --goal --app-class`). Use when a human wants a UX/usability critique of a journey, not a pass/fail functional test. Findings are advisory and never gate a run.
4
+ ---
5
+
6
+ You produce a UX review: ranked, cited, evidence-anchored usability findings for
7
+ a flow. This is advisory analysis, not a functional gate — a UX finding never
8
+ fails a run or a build. Every finding is calibrated to an app class (a consumer
9
+ signup and an internal admin tool are held to different bars) and cites a rubric
10
+ item; the platform structurally cannot emit an uncited finding.
11
+
12
+ ## Two modes — pick by what you have
13
+
14
+ - OFFLINE, over a saved Recording — `jevitate ux <recording.json> --app-class
15
+ <class> [--persona <p>] [--job "<text>"] [--out <dir>] --json`. Analyzes a
16
+ Recording you already captured (e.g. from `jevitate-record` or a successful
17
+ `jevitate explore`). It launches no browser. `--app-class` is REQUIRED
18
+ (e.g. `consumer`, `admin`, `internal`); `--job` sharpens relevance.
19
+ - LIVE, against an authorized target — `jevitate explore --strategy usability
20
+ --url <authorized-url> --goal "<the job>" --app-class <class> [--allow
21
+ <origin>] [--secret <value>] [--max-actions <n>] --real --json`. Drives the
22
+ exploration loop toward the job (Jev makes the browsing decisions, not you)
23
+ and reviews each observed screen against the rubric as it goes. Needs a
24
+ gateway: `--real` (live, after `jevitate ai setup`) or `--fake-ai` (a
25
+ deterministic pipeline smoke that will NOT produce a real review). No
26
+ selection fails closed.
27
+
28
+ Prefer OFFLINE when a Recording already exists — it is cheaper, deterministic,
29
+ and touches no live site. Use LIVE only when there is no Recording and the human
30
+ authorized the target.
31
+
32
+ ## Choosing inputs
33
+
34
+ - `--app-class` is the single most important calibration input — state the real
35
+ class of the app under review; do not default to `consumer` to be lenient or
36
+ `internal` to be harsh. If you don't know it, ask.
37
+ - For the live mode, write `--goal` as the JOB the user is trying to accomplish
38
+ in plain language ("sign up and reach the dashboard"), the same as a goal-based
39
+ exploration — the review is calibrated against how well the flow serves that
40
+ job.
41
+ - Live mode is authoring/test-plane only and refuses an unauthorized target
42
+ (`E_UNAUTHORIZED_EXPLORE_TARGET`). Never widen `--allow` beyond what the human
43
+ authorized. Pass real secrets/PII via `--secret` so they stay out of every
44
+ model call.
45
+
46
+ ## Reading the result
47
+
48
+ - The report is a set of findings, each with a `severity` (`info` | `minor` |
49
+ `major`), a rubric `citation` (`source` + `ref`), and redacted evidence refs
50
+ pointing at the screen/control it is about. Rank your summary by severity and
51
+ lead with the `major` findings.
52
+ - Report findings as ADVISORY recommendations, with their citations — never as
53
+ defects that block shipping, and never restate a finding without the rubric
54
+ citation the tool attached (the citation is what makes it more than an
55
+ opinion).
56
+ - An analysis that FAILED (`E_UX_ANALYSIS`) is a real failure to surface
57
+ honestly — never fabricate a clean "no issues found" report from a failed run.
58
+ Offline review over a bare Recording is coverage-limited (it sees only what
59
+ the Recording captured — no live a11y tree, no runtime contrast); say so when
60
+ the Recording is thin, rather than implying the flow is fully vetted.
61
+
62
+ ## What you must never do
63
+
64
+ - Never present UX findings as pass/fail gates — they are advisory by design.
65
+ - Never emit or paraphrase a finding without its rubric citation.
66
+ - Never run the live mode against a production or unauthorized target — UX review
67
+ is authoring/test-plane only.
68
+ - Never fabricate a clean report from a failed or empty analysis.