@jesdi/skills 0.0.93 → 0.0.94

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.93",
3
+ "version": "0.0.94",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -17,10 +17,10 @@ Before any agent starts, the driver checks these. Each failed check prints one l
17
17
  - `.agent/` is gitignored and the worktree has no uncommitted change.
18
18
  - Each ticket file `NN-name.md` has a title, a **Blocked by** line and a **Seam** line, and the graph has no cycle (`driver_tickets.py`). A ticket needs one criterion or more, unless its Seam is `none — refactor`. A ticket needs a **Touches** line when the set has more than one ticket. The [to-tickets skill](../to-tickets/SKILL.md) has the line format.
19
19
  - Each provider config file (see Models) and the `--models` file name only roles of the skill's `models.json`. A `correctness` or `explorer` key is a role that was removed: the error says so, names the file, and says that the key should be deleted from it.
20
- - Each model entry is valid, and the CLI of the first entry of each role is on PATH.
20
+ - Each model entry names a known provider, a model and an effort supported by that provider.
21
21
  - The `review-diff` skill is installed next to this one, with its `spec.md` and `correctness.md`, and the `deep-quality-review` skill is next to this one, in `${CLAUDE_CONFIG_DIR:-~/.claude}/skills` or in `~/.agents/skills`: the lenses of the final review follow them. One error per lens names its skill and its missing file.
22
22
  - With `--push`, `--unattended` or `--base`, the repository has an `origin` remote.
23
- - Each model entry of every list answers one short test prompt (the preflight), on each invocation. An entry that fails (a model the account cannot use or has no credits for, a CLI that is not signed in) is skipped for that invocation: each role that lists it goes on with its next entry, and one ledger sentence names the entry and the error. Only a role with no entry left stops the run, with one line naming each entry and its error. When no `final-reviewer` entry on another provider than the first `implementer` entry is left, or the config has none, the correctness lens and the scoped review run on the `final-reviewer` entries that are left, on the implementer's provider, and one more sentence says so. The driver prints these sentences and writes them to the ledger. The PR body's Review coverage names the entries that the ticket reviews, the correctness lens and the scoped review ran on, from the agents that ran, and flags an entry on a provider that also wrote code. `--dry-run` skips the preflight.
23
+ - Runtime availability is checked by the preflight: a missing CLI skips that entry just like an unusable model. Each available model entry of every list answers one short test prompt (the preflight), on each invocation. An entry that fails (a model the account cannot use or has no credits for, a CLI that is not signed in) is skipped for that invocation: each role that lists it goes on with its next entry, and one ledger sentence names the entry and the error. Only a role with no entry left stops the run, with one line naming each entry and its error. When no `final-reviewer` entry on another provider than the first `implementer` entry is left, or the config has none, the correctness lens and the scoped review run on the `final-reviewer` entries that are left, on the implementer's provider, and one more sentence says so. The driver prints these sentences and writes them to the ledger. The PR body's Review coverage names the entries that the ticket reviews, the correctness lens and the scoped review ran on, from the agents that ran, and flags an entry on a provider that also wrote code. `--dry-run` skips the preflight.
24
24
 
25
25
  A run that stopped is continued with the same command. `state.json` is the only input of a resume.
26
26
 
@@ -65,15 +65,13 @@ def split(entry: str) -> tuple[str, str, str]:
65
65
  return provider, model, effort
66
66
 
67
67
 
68
- def _entry_error(role: str, entry: str, first: bool) -> str | None:
68
+ def _entry_error(role: str, entry: str) -> str | None:
69
69
  provider, model, effort = split(entry)
70
70
  if provider not in PROVIDERS:
71
71
  return f"{role}: model entry {entry} names an unknown provider (known: {', '.join(PROVIDERS)})"
72
- cli, efforts = PROVIDERS[provider]
72
+ _, efforts = PROVIDERS[provider]
73
73
  if not model or effort not in efforts:
74
74
  return f"{role}: model entry {entry} needs a model and an effort from {', '.join(efforts)}"
75
- if first and not shutil.which(cli):
76
- return f"{role}: {cli} is not on PATH (model entry {entry})"
77
75
  return None
78
76
 
79
77
 
@@ -156,10 +154,7 @@ def lens_entries(models: dict[str, list[str]], role: str) -> list[str]:
156
154
 
157
155
  def _entry_errors(models: dict[str, list[str]]) -> list[str]:
158
156
  """Every entry error of the merged lists."""
159
- # The entries whose CLI must be on PATH; `_layer` gave each role a non-empty list.
160
- first = {(role, entries[0]) for role, entries in models.items()} | {
161
- ("final-reviewer", other_provider_entry(models))}
162
- found = [_entry_error(role, entry, (role, entry) in first) for role, entries in models.items() for entry in entries]
157
+ found = [_entry_error(role, entry) for role, entries in models.items() for entry in entries]
163
158
  if len(models["implementer"]) < 2:
164
159
  found.append("implementer: a second implementer model entry is required for fix round 2")
165
160
  return [error for error in found if error]
@@ -341,6 +341,46 @@ def test_a_model_the_account_cannot_use_is_skipped_and_its_roles_go_on_with_thei
341
341
  assert launches(w.tmp, "claude"), "the first agent starts on Anthropic"
342
342
 
343
343
 
344
+ def test_a_missing_first_cli_uses_the_available_reviewer_and_discloses_the_fallback(env):
345
+ """No fake runner, so the driver launches the CLI itself: `bin/claude` is a stub on the restricted PATH of `env`
346
+ that logs its argv like the `env` fakes and writes the reviewer's report, never the real claude."""
347
+ opus, unavailable = "anthropic/claude-opus-5@medium", "openai/gpt-astra@medium"
348
+ w = World(env, reviewer=[unavailable, opus], **{"final-reviewer": [unavailable, opus]})
349
+ (w.tmp / "bin/codex").unlink()
350
+ report = dict(status="DONE", files=[], concerns=[], findings=[])
351
+ (w.tmp / "bin/claude").write_text(f"""#!{sys.executable}
352
+ import re, sys
353
+ from pathlib import Path
354
+ prompt = sys.stdin.read()
355
+ if "implement-spec preflight" not in prompt:
356
+ with open({str(w.tmp / "argv-claude")!r}, "a") as log:
357
+ log.write("".join(arg + "\\0" for arg in sys.argv[1:]) + "\\x1e")
358
+ Path(re.search(r"JSON report at (\\S+?)\\.? ", prompt).group(1)).write_text({json.dumps(report)!r})
359
+ """)
360
+ proc = w.run(None, "--only", "reviewer", runner=False)
361
+ ok(proc)
362
+ assert "codex is not on PATH" in proc.stdout
363
+ argvs = launches(w.tmp, "claude")
364
+ assert argvs and all(value_after(argv, "--model") == "claude-opus-5" for argv in argvs), argvs
365
+ assert not launches(w.tmp, "codex")
366
+ assert "the correctness lens and the scoped review run on" in w.ledger()
367
+ assert f"{opus}, the implementer's provider" in w.ledger()
368
+ assert f"reviewer ran on {opus}" in w.ledger()
369
+ assert json.loads((w.repo / ".agent/implement/01/reviewer-0.json").read_text()) == report
370
+
371
+
372
+ def test_a_missing_cli_with_no_reviewer_fallback_fails_before_any_agent(env):
373
+ unavailable = "openai/gpt-astra@medium"
374
+ w = World(env, reviewer=[unavailable])
375
+ (w.tmp / "bin/codex").unlink()
376
+ proc = w.run(None, runner=False)
377
+ assert proc.returncode == 3, proc.stdout + proc.stderr
378
+ assert (f"reviewer: every model entry failed the preflight: model entry {unavailable}: codex is not on PATH"
379
+ in proc.stdout.splitlines())
380
+ assert not launches(w.tmp, "claude") and not launches(w.tmp, "codex")
381
+ assert "ticket/feat%2Fcsv/01" not in git(w.repo, "branch", "--list")
382
+
383
+
344
384
  def test_a_cli_that_fails_with_no_report_stops_the_run_with_exit_4_and_the_same_command_resumes(env):
345
385
  """Stop and ask: the first CLI failure stops the run, with no rerun on another entry of the list."""
346
386
  w = World(env, refactor=True)
@@ -223,13 +223,16 @@ def test_dirty_worktree_exits_3_naming_the_paths(env, tmp_path):
223
223
  assert "demo/export.py" in proc.stdout and "notes.txt" in proc.stdout
224
224
 
225
225
 
226
- def test_models_file_naming_a_provider_without_its_cli_exits_3(env, tmp_path):
227
- (tmp_path / "bin/codex").unlink()
226
+ def test_dry_run_checks_models_without_requiring_provider_clis(env, tmp_path):
227
+ for cli in ("claude", "codex"):
228
+ (tmp_path / f"bin/{cli}").unlink()
228
229
  repo = make_repo(tmp_path / "demo", three())
229
230
  models = models_file(tmp_path, implementer=["openai/gpt-sol@medium"])
231
+ before = snapshot(repo)
230
232
  proc = drive(env, repo, "--tickets", ".agent/tickets", "--gate", "make check", "--fast-gate", "make check", "--models", str(models), "--dry-run")
231
- assert proc.returncode == 3, proc.stderr
232
- assert any("implementer" in l and "codex" in l for l in proc.stdout.splitlines())
233
+ assert proc.returncode == 0, proc.stdout + proc.stderr
234
+ assert "max frontier width" in proc.stdout
235
+ assert_untouched(proc, repo, before, tmp_path)
233
236
 
234
237
 
235
238
  def test_one_implementer_model_is_rejected_before_any_agent(env, tmp_path):
@@ -82,7 +82,7 @@ def test_outside_a_git_worktree_git_errors_are_reported(tmp_path, monkeypatch, c
82
82
  assert code == 3 and "git status failed" in out
83
83
 
84
84
 
85
- def test_models_file_checks_the_first_entry_of_each_role(repo, capsys, tmp_path, monkeypatch):
85
+ def test_models_file_checks_configuration_without_runtime_availability(repo, capsys, tmp_path, monkeypatch):
86
86
  repo(t01=ticket("01"))
87
87
  monkeypatch.setattr(driver_agents.shutil, "which", lambda cli: None if cli == "codex" else cli)
88
88
  models = tmp_path.parent / f"{tmp_path.name}-models.json"
@@ -90,8 +90,7 @@ def test_models_file_checks_the_first_entry_of_each_role(repo, capsys, tmp_path,
90
90
  claude = {"reviewer": ["claude-opus-5-5@medium"], "final-reviewer": ["claude-opus-5-5@medium"]}
91
91
  models.write_text(json.dumps({"implementer": ["openai/gpt-sol@medium"], **claude, "fixer": ["other/x@low"]}))
92
92
  assert run(capsys, "--models", str(models)) == (
93
- 3, "implementer: codex is not on PATH (model entry openai/gpt-sol@medium)\n"
94
- "fixer: model entry other/x@low names an unknown provider (known: anthropic, openai)\n"
93
+ 3, "fixer: model entry other/x@low names an unknown provider (known: anthropic, openai)\n"
95
94
  "implementer: a second implementer model entry is required for fix round 2\n")
96
95
 
97
96
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-08T07:21:01.147Z",
3
+ "generatedAt": "2026-11-09T11:10:12.678Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "agents-wayfinder",
@@ -58,8 +58,8 @@
58
58
  },
59
59
  {
60
60
  "name": "implement-spec",
61
- "version": "0.1.55",
62
- "hash": "sha256-2580c33f386f59b4eb362c1416eeb84420baa8cd3a2edbff1ed07950dcea8ef4",
61
+ "version": "0.1.56",
62
+ "hash": "sha256-1f894f578c7ffea9d1de8b0994c94e3d5499612e67ea2b7267f50d14b8162fda",
63
63
  "description": "Implement a specification in code."
64
64
  },
65
65
  {