saffron-ai 0.5.5 → 0.5.7
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/CHANGELOG.md +35 -0
- package/README.md +7 -6
- package/dist-pkg/cli.js +97 -97
- package/package.json +4 -3
- package/skills/saffron/SKILL.md +31 -6
- package/skills/saffron/references/config.md +18 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,41 @@ All notable changes to Saffron, in one place: the `saffron-ai` runner (npm),
|
|
|
4
4
|
the VS Code extension (`ChathurangaJayasinghe.saffron-vscode`) and the
|
|
5
5
|
JetBrains plugin (`ai.saffron.jetbrains`). Dates are publish dates.
|
|
6
6
|
|
|
7
|
+
## 0.5.7
|
|
8
|
+
|
|
9
|
+
Released 2026-09-17.
|
|
10
|
+
|
|
11
|
+
Runner
|
|
12
|
+
|
|
13
|
+
- `saffron mcp` gains a `project_status` tool (the `saffron status --json`
|
|
14
|
+
overview) next to `search_steps` and `list_step_sets`, and reports the
|
|
15
|
+
real package version.
|
|
16
|
+
|
|
17
|
+
Agents
|
|
18
|
+
|
|
19
|
+
- **Claude Code plugin**: `claude-plugin/` packages the language server,
|
|
20
|
+
the MCP server and the skill as one plugin (`/plugin marketplace add
|
|
21
|
+
s-chathuranga-j/saffron-claude-plugin`, `/plugin install
|
|
22
|
+
saffron@saffron`). `saffron lsp` now adopts the workspace root the
|
|
23
|
+
editor sends in `initialize`, so plugin-launched servers index the
|
|
24
|
+
right project.
|
|
25
|
+
- The bundled skill covers `saffron status`, accepting or rejecting chosen
|
|
26
|
+
proposals, subscription versus API-key cost reporting, Scenario Outline
|
|
27
|
+
recording, and the IDE integrations; the `AGENTS.md` managed block
|
|
28
|
+
points at `saffron status`. Run `npx saffron init` again to refresh both
|
|
29
|
+
in a project.
|
|
30
|
+
|
|
31
|
+
## 0.5.6
|
|
32
|
+
|
|
33
|
+
Released 2026-09-17.
|
|
34
|
+
|
|
35
|
+
Runner
|
|
36
|
+
|
|
37
|
+
- `saffron status` no longer lists the same step with different quoted
|
|
38
|
+
arguments (`"<password>"`, `"{env:SAUCE_PASSWORD}"`, a literal) as
|
|
39
|
+
duplicate wordings; steps are compared by their quote-generalised
|
|
40
|
+
pattern.
|
|
41
|
+
|
|
7
42
|
## 0.5.5
|
|
8
43
|
|
|
9
44
|
Released 2026-09-17.
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ When the UI changes and a cached step fails at runtime, the agent takes over mid
|
|
|
15
15
|
- **Diagnose before adapting.** On a step failure the agent first decides: UI drift (heal) or application defect (fail with a diagnosis).
|
|
16
16
|
- **Caches are git artifacts.** Proposals show diffs, including a suggested `.feature` edit when the written steps no longer match reality, and nothing is committed without you.
|
|
17
17
|
- **Verified proposals.** Every recording/heal is proof-replayed zero-AI before it's filed (with one bounded refinement pass on failure), so proposals arrive stamped `verified ✓` or honestly `UNVERIFIED ✗`.
|
|
18
|
-
- **Honest cost reporting.** Reports break out prompt-cache reads/writes (the real bill of agent sessions) next to the in+out token count, per scenario and in totals.
|
|
18
|
+
- **Honest cost reporting.** Reports break out prompt-cache reads/writes (the real bill of agent sessions) next to the in+out token count, per scenario and in totals, and name the models used. On an API key the dollars are what was billed; on a Claude subscription the headline is the 5-hour plan window before and after the run, with the dollars as the API-equivalent.
|
|
19
19
|
- **Trend memory.** Every run appends to `.saffron/history.jsonl`; reports show deltas vs the previous run and 20-run sparklines, and Saffron flags **chronic scenarios** (healing repeatedly. Re-record instead of paying again) plus recurring failure themes.
|
|
20
20
|
|
|
21
21
|
## Step reuse: new scenarios get cheaper as your suite grows
|
|
@@ -24,7 +24,7 @@ Like a maturing Cucumber suite, most of a new feature file is steps you already
|
|
|
24
24
|
|
|
25
25
|
**Step sets** (shipped): `.saffron` files, a superset dialect of Gherkin, add the `StepSet:` keyword for named, reusable step sequences invoked with `StepSet <name>` inside any scenario. Sets expand at parse time, so their steps cache and seed like ordinary steps; editing a set makes every invoking scenario honestly stale (re-recorded mostly seeded), and heal edits route to the set definition, one fix, every caller follows. Sets are **project-wide**: keep application-wide flows in a sets-only library file (convention: `features/shared.steps.saffron`) and invoke them from any feature.
|
|
26
26
|
|
|
27
|
-
**IDE integration & authoring** (shipped): `saffron steps` lists the project vocabulary with recorded/divergent/unrecorded badges (`--snippets` for native VS Code completion), `saffron mcp` serves it to AI assistants, `saffron lsp` brings completion/navigation/diagnostics to **JetBrains** (incl. Community editions via LSP4IJ) and Neovim, `saffron author` drafts feature files from prose in your own vocabulary, and duplicate wordings that record identical actions get **behavior-proven rename proposals**. The **Saffron VS Code extension** is on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=ChathurangaJayasinghe.saffron-vscode) (`code --install-extension ChathurangaJayasinghe.saffron-vscode`). JetBrains users get the same in one click from the **Saffron JetBrains plugin** ([source](https://github.com/s-chathuranga-j/saffron-jetbrains-plugin): `.saffron` file type, bundled grammar, LSP4IJ wiring
|
|
27
|
+
**IDE integration & authoring** (shipped): `saffron steps` lists the project vocabulary with recorded/divergent/unrecorded badges (`--snippets` for native VS Code completion), `saffron mcp` serves it to AI assistants, `saffron lsp` brings completion/navigation/diagnostics to **JetBrains** (incl. Community editions via LSP4IJ) and Neovim, `saffron author` drafts feature files from prose in your own vocabulary, and duplicate wordings that record identical actions get **behavior-proven rename proposals**. The **Saffron VS Code extension** is on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=ChathurangaJayasinghe.saffron-vscode) (`code --install-extension ChathurangaJayasinghe.saffron-vscode`). JetBrains users get the same in one click from the **Saffron JetBrains plugin** ([Marketplace](https://plugins.jetbrains.com/plugin/34240-saffron), [source](https://github.com/s-chathuranga-j/saffron-jetbrains-plugin)): `.saffron` file type, bundled grammar, LSP4IJ wiring. Both editors also **run from the IDE**: right-click Run on `.saffron` files and folders, Saffron run configurations (JetBrains), and a Saffron panel with feature files, tags to run, proposals to accept or reject, vocabulary health, config, and the run report as an in-editor dashboard, all fed by `saffron status --json`.
|
|
28
28
|
|
|
29
29
|
Data tables and doc strings are first-class: 2-column key/value tables parameterize the recording (`<table:username>`), multi-row record tables parameterize per cell (`<table:1:firstName>`), and `"""` doc strings record as `<docstring>`, so editing *values* or *content* replays at zero tokens, while structural changes (keys, headers, row counts) honestly re-record. Unambiguous params are scenario-wide, so a later assertion on a note's text follows content edits too. **Secrets** stay out of everything: `{env:VAR}` resolves from the environment (or a git-ignored `.env`) at replay, recordings and reports are masked back to the token, and missing variables fail fast by name.
|
|
30
30
|
|
|
@@ -43,7 +43,7 @@ of short `.saffron` scenarios against the public demo shop at saucedemo.com
|
|
|
43
43
|
the middle of scenarios) so the first run records and replays something
|
|
44
44
|
real.
|
|
45
45
|
|
|
46
|
-
**Built for the AI era:** the package ships an [Agent Skill](https://agentskills.io) that teaches Claude Code, Codex, Cursor, Copilot and any skill-aware agent to write Saffron tests efficiently. Reuse recorded wordings, keep assertions sacred, secrets as `{env:VAR}`, so the tests your agents write replay at zero tokens instead of paying for near-duplicate recordings.
|
|
46
|
+
**Built for the AI era:** Claude Code users install everything at once from the [Saffron plugin](https://github.com/s-chathuranga-j/saffron-claude-plugin) (`/plugin marketplace add s-chathuranga-j/saffron-claude-plugin`, then `/plugin install saffron@saffron`): the language server for diagnostics and navigation while Claude edits `.saffron` files, the MCP server, and the skill. For every other agent, the package ships an [Agent Skill](https://agentskills.io) that teaches Claude Code, Codex, Cursor, Copilot and any skill-aware agent to write Saffron tests efficiently. Reuse recorded wordings, keep assertions sacred, secrets as `{env:VAR}`, so the tests your agents write replay at zero tokens instead of paying for near-duplicate recordings.
|
|
47
47
|
|
|
48
48
|
CI tip: `saffron run --strict` treats yellow (passed-with-adaptation) as a
|
|
49
49
|
failure until its cache proposal is reviewed: cached-green-only builds.
|
|
@@ -73,10 +73,11 @@ node dist/cli/index.js -p examples accept --all
|
|
|
73
73
|
| Command | What it does |
|
|
74
74
|
|---|---|
|
|
75
75
|
| `saffron run [paths] [--headed] [--filter @tags] [--rerecord] [--no-agent] [--strict] [--browser b] [--workers n] [--heal-model m] [--no-verify] [--no-reuse] [--model m] [--storage-state f]` | Run features. Cached replays are deterministic; misses/failures escalate to the agent (unless `--no-agent`). Replay cross-browser with `--browser firefox\|webkit`, parallelize with `--workers N`, heal on a cheaper model with `--heal-model`. Exit 1 on red (and on yellow with `--strict`). |
|
|
76
|
-
| `saffron accept [
|
|
77
|
-
| `saffron reject [
|
|
76
|
+
| `saffron accept [files... \| --all] [--include-unverified] [--with-feature-edit] [--propagate]` | Promote cache proposals to committed caches (`--all` skips UNVERIFIED ones unless `--include-unverified`); `--with-feature-edit` also rewrites the adapted steps in the `.feature` file (and keeps the cache in sync); `--propagate` applies the heal's locator fixes to every other cache using the same locator. One heal repairs N scenarios before they ever fail. No args: list pending proposals. |
|
|
77
|
+
| `saffron reject [files... \| --all]` | Discard proposals; the agent will try again next run. |
|
|
78
|
+
| `saffron status [--json]` | Project overview for people, IDE panels and dashboards: feature files and scenarios with cache state, tags, pending proposals, last run, history, vocabulary health (divergent steps, duplicate wordings proven by identical recordings), effective config. |
|
|
78
79
|
| `saffron steps [search] [--json] [--snippets]` | List/search the step vocabulary (files + caches) with recorded/divergent/unrecorded badges and usage; `--snippets` writes `.vscode/saffron.code-snippets` for native VS Code completion. |
|
|
79
|
-
| `saffron mcp` | Serve the vocabulary to AI assistants over stdio MCP (`search_steps`, `list_step_sets`), e.g. `claude mcp add saffron -- npx saffron mcp`. |
|
|
80
|
+
| `saffron mcp` | Serve the vocabulary and the project overview to AI assistants over stdio MCP (`search_steps`, `list_step_sets`, `project_status`), e.g. `claude mcp add saffron -- npx saffron mcp`. |
|
|
80
81
|
| `saffron author <prose-file> [-o out]` | Draft a `.saffron` feature file from plain-paragraph requirements, reusing the project's step vocabulary (AI; reports how many lines are seedable). |
|
|
81
82
|
| `saffron lsp` | Run the Saffron language server over stdio for JetBrains (LSP4IJ/Ultimate), Neovim, any LSP editor: badge completion, StepSet go-to-definition, hover, diagnostics. Highlighting for JetBrains comes from the bundled TextMate grammar (`textmate/saffron` in the package); run `npx saffron lsp` in a terminal for setup steps. |
|
|
82
83
|
| `saffron init [--agents list] [--examples]` | Make the project agent-ready (`--examples` installs the Saucedemo example suite): installs the bundled **Saffron agent skill** into `.claude/skills` and `.agents/skills` (Copilot/Cursor via `--agents`), registers the `saffron mcp` server in `.mcp.json` / `.cursor/mcp.json` / `.vscode/mcp.json`, adds a managed block to `AGENTS.md`/`CLAUDE.md`, scaffolds config. |
|