Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions .agents/skills/kane-cli/SKILL.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .agents/skills/kane-cli/references/agent-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ They follow the person across agents and projects, and they survive a skill rein
| Key | Values | Meaning |
|---|---|---|
| `preferences.watch` | `visible` Β· `quiet` Β· `results-only` | `visible`: no `--headless`. `quiet`, `results-only`: `--headless`. `results-only` also skips the progress summary |
| `preferences.purpose` | `one-off` Β· `suite` Β· `ask` | Whether to offer keeping passing runs as saved tests. With `suite` or `ask`, launch every one-off run with `--name <short-slug>` so keeping it costs nothing (`references/first-run.md` Β§4) |
| `preferences.purpose` | `one-off` Β· `suite` Β· `ask` | Whether to offer keeping passing runs as saved tests. With `suite` or `ask`, launch every one-off run with `--name <short-slug>` so keeping it costs nothing (`references/first-run.md` Β§4), except in a folder linked to a shared project (`shared-projects.md` Β§9) |
| `preferences.narration` | `quiet` Β· `milestones` Β· `every-step` | How much of the run you recount afterwards. Default `milestones` |
| `onboarding.asked` | list of `watch`, `results`, `purpose` | What was already asked. Never ask these again |
| `onboarding.first_run_explained` | boolean | The tour was shown |
Expand Down Expand Up @@ -90,4 +90,4 @@ Before you write, tell the person in one line what you are saving and where. The

## 5. Changing preferences later

When the person says "kane preferences" (or asks to change how runs behave), show the current values in plain words, ask what to change, and write the file again. To change where results go, use the flow in `references/test-manager.md`: that setting is global and belongs to kane-cli.
When the person says "kane preferences" (or asks to change how runs behave), show the current values in plain words, ask what to change, and write the file again. To change where results go, use the flow in `references/test-manager.md`: that setting is global and belongs to kane-cli (in a folder linked to a shared project, designed tests directly in its `.testmuai/tests/` run on that project's cases whatever it says: `shared-projects.md`).
329 changes: 329 additions & 0 deletions .agents/skills/kane-cli/references/agent-contract.md

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions .agents/skills/kane-cli/references/assurance-parsing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# Assurance NDJSON β€” Wire Contract

> In a folder linked to a shared project (kane-cli 0.10.0+) the same commands add their own events (for example
> `folder_linked`, `nothing_new`, `remote_*` progress, `session_save`, `session_discard`, `session_ended`, `pull_test`)
> and refusal codes, and `session_complete` there carries the save's `next`. They are in `agent-contract.md` Β§3 and Β§6;
> this page covers the local store.

`kane-cli context extract --mode agent`, `kane-cli context ingest … --mode agent`, and `kane-cli design tests --mode agent` speak a versioned NDJSON vocabulary on stdout β€” one JSON object per line, envelope `{"type": "<name>", "v": 1, "verb": "extract"|"design", ...}`. On 0.7.2+ the stream is **strict**: stdout carries only NDJSON and stderr stays silent (crash traces excepted); on 0.7.1, prose diagnostics could ride stderr. `maintain reconcile --mode agent` (verb `reconcile`) and `cover`/`cover gaps --mode agent` (verbs `cover`/`gaps`) share the envelope with their own event sets (below).

**The vocabulary is open**: new event types and fields may appear in any release β€” tolerate unknowns, never fail on them.
Expand All @@ -19,7 +24,7 @@ for each line:
else β†’ per-type handling below
```

A stream that ends **without** `done` means the process crashed β€” outcome unknown; inspect `context sessions --json` and `context list` before retrying anything paid. One designed exception: `kane-cli context review --mode agent` keeps its `--json` shape β€” verdict and drift listings are one JSON object per line with no `done` (an empty listing prints nothing, exit `0`); its early refusals β€” no store, an open rebase, a verdict queue that needs a terminal (`TTY_REQUIRED`) β€” are typed events followed by `done`; its later refusals exit without `done`. Read its exit code instead. One version-scoped rule for merged-ingest landing failures (bad path, unsupported media, refused URL, a misused `--mode` or `--as`): on 0.7.2+ they ride the stream as `error` (codes `MODE_USAGE`, `AS_SINGLE_SOURCE`, `UNSUPPORTED_URL`, `INGEST_FAILED`) + `done` β€” the guarantee covers the whole invocation; on 0.7.1 they end with prose + exit `1`/`2` **before any NDJSON begins** β€” no stream at all is a refusal to fix, not a crash, and the guarantee starts with the extraction stream.
A stream that ends **without** `done` means the process crashed β€” outcome unknown; inspect `context sessions --json` and `context list` before retrying anything paid. No stream at all, with one line on stderr and exit `2`, is a command-line refusal before anything ran (for example `--json` with `--mode agent`): fix the command, don't treat it as a crash. One designed exception: `kane-cli context review --mode agent` keeps its `--json` shape β€” verdict and drift listings are one JSON object per line with no `done` (an empty listing prints nothing, exit `0`); its early refusals β€” no store, an open rebase, a verdict queue that needs a terminal (`TTY_REQUIRED`) β€” are typed events followed by `done`; its later refusals exit without `done`. Read its exit code instead. One version-scoped rule for merged-ingest landing failures (bad path, unsupported media, refused URL, a misused `--mode` or `--as`): on 0.7.2+ they ride the stream as `error` (codes `MODE_USAGE`, `AS_SINGLE_SOURCE`, `UNSUPPORTED_URL`, `INGEST_FAILED`) + `done` β€” the guarantee covers the whole invocation; on 0.7.1 they end with prose + exit `1`/`2` **before any NDJSON begins** β€” no stream at all is a refusal to fix, not a crash, and the guarantee starts with the extraction stream.

## Events (extract / design)

Expand Down Expand Up @@ -93,12 +98,12 @@ Use `text` + `options[].label` + `recommended_index` + `rationale` to decide or
| `child_start` / `child_end` | around the design run, after a proceed | `child: "design"`, `subject` / `ok`, `dur_s`, `exit_code?` |
| *(the design run's events)* | between the two, stamped `verb: "design"` | every event of `design tests --mode agent` except its `done`; a paused design session arrives as `session_paused` with `sid`, `resume`, `next[]` |
| `evolve_diff` | after a clean design run | `use_case`, `generation` (`before`, `after`), `superseded[]`, `minted[]`, `retained[]` (pairs as `scenario` + `test`), `moves[]` (`ac`, `before[]`, `after[]`) |
| `evolve_skipped` | a use-case not evolved | `use_case`, `reason`: `declined`, or `no-design` in a `--from-stale` batch |
| `evolve_skipped` | a use-case not evolved | `use_case`, `reason`: `declined`, `no-design` in a `--from-stale` batch, or `source_changed` (out of date only because its source changed; `next?` reviews that change with `kane-cli maintain reconcile`, `remedy?`) |
| `error` | a refusal or failure | `message`, `code?`: `MODE_USAGE` (only `interactive` and `agent` are accepted), `ANSWER_USAGE` (an answer to a question the run does not ask, or a value that is neither option) |
| `done` | last | `status`, `exit_code`, `next?`: `complete` 0, `refused` 2, `paused` 3, `error` with the design run's own code; `next[]` carries every paused session's resume, uncapped |

- **Answering.** `--answer evolve:<use-case>=1` (or `=proceed`) and `--answer evolve:<use-case>=2` (or `=decline`), repeatable, with `--mode agent`. A refused answer is `error` + `done` with nothing before it.
- **Refusals.** An explicit target that is fresh and has no `--because`, or that was never designed, exits `2`. A `--from-stale` run with nothing stale exits `0`.
- **Refusals.** An explicit target that is fresh and has no `--because`, that was never designed, or that is out of date only because its source changed (`evolve_skipped` `source_changed`; `--because` lets it run), exits `2`. A `--from-stale` run with nothing stale exits `0`, and one whose every stale use-case is source-changed sends those `evolve_skipped` events and exits `0`.
- **Batches.** Every use-case runs whatever the earlier ones did. The exit is the first design-run code that is neither 0 nor 3; otherwise 3 if any paused; otherwise 0.

## Sync events (verb `sync`) *(0.8.14+)*
Expand Down
Loading
Loading