@jesdi/skills 0.0.98 → 0.0.99

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.
@@ -15,7 +15,8 @@ Interface choices (ticket 06):
15
15
  - a tidied commit has the subject `feat(NN): <ticket title>` and a body line `Ticket: <ticket file name>`.
16
16
  - the final fixer's `commits` hold `{"sha", "ticket"}` objects, and the driver renames each fixer commit to
17
17
  `fix(NN): <its subject>` before the gate and the scoped review run (no rewrite after a review).
18
- - a finding open after the scoped review: question `final-ticket-blocked-<n>`, options `retry` and `edit`.
18
+ - a finding open after the scoped review: question `final-finding-open-<n>`, options `retry`, `accept` and
19
+ `follow-up`.
19
20
  - local stop: stdout lines `Branch tip: <sha>`, `Reviewed tip: <sha>` and the rerun command, which has `--push`.
20
21
  - the PR body lists, per ticket, a line with the ticket number and its commit's first 7 hex, and every ruling line.
21
22
  - stage.json at a clean unattended end is `{"stage": "implement", "status": "done"}`.
@@ -36,7 +37,7 @@ import pytest
36
37
 
37
38
  from test_cli import SKILL, git, ticket
38
39
  from test_review import ASTRA, FABLE, HOOKED, ONE, OPUS, Review, finding, gate_rule, no_full_gate, review
39
- from test_stops import UNATTENDED, stage
40
+ from test_stops import DONE, UNATTENDED, stage
40
41
  from test_walk import fix, impl, plan
41
42
 
42
43
  SCOPED = HOOKED
@@ -81,9 +82,16 @@ for i, a in enumerate(argv[:-1]):
81
82
  body = argv[i + 1]
82
83
  if a in ("--body-file", "-F"):
83
84
  body = sys.stdin.read() if argv[i + 1] == "-" else Path(argv[i + 1]).read_text()
84
- with (Path(__file__).resolve().parent.parent / "gh.jsonl").open("a") as log:
85
- log.write(json.dumps(dict(argv=argv, body=body)) + "\\n")
86
- print("https://github.example/pull/1")
85
+ log = Path(__file__).resolve().parent.parent / "gh.jsonl"
86
+ if argv[:2] == ["issue", "list"]: # an issue whose body has the searched marker, as `gh issue create` logged it
87
+ marker = argv[argv.index("--search") + 1].split('"')[1]
88
+ rows = [json.loads(line) for line in log.read_text().splitlines()] if log.exists() else []
89
+ print(next(("https://github.example/issues/1" for row in rows
90
+ if row["argv"][:2] == ["issue", "create"] and marker in row["body"]), ""))
91
+ sys.exit(0)
92
+ with log.open("a") as out:
93
+ out.write(json.dumps(dict(argv=argv, body=body)) + "\\n")
94
+ print("https://github.example/issues/1" if argv[:2] == ["issue", "create"] else "https://github.example/pull/1")
87
95
  """
88
96
  HOOK = '#!/bin/sh\nwhile read old new ref; do echo "$ref $new" >> "%s"; done\n'
89
97
 
@@ -317,7 +325,7 @@ def test_green_ticket_carries_cap_finding_into_required_final_fix(tmp_path):
317
325
  assert len(rig.final_calls("fixer")) == 1
318
326
 
319
327
 
320
- def test_unresolved_must_fix_cannot_be_accepted_or_published(tmp_path):
328
+ def test_unresolved_must_fix_asks_and_is_not_published_while_the_operator_is_asked(tmp_path):
321
329
  rig = Final(tmp_path, THREE, {"implementer": [OPUS, FABLE]})
322
330
  recurring = review("02", [{**finding("MERGED-QUOTING-REGRESSION"), "basis": "regression"}])
323
331
  batch = fixer(fn("02"), "attempt quoting fix", ticket_of="02")
@@ -330,7 +338,7 @@ def test_unresolved_must_fix_cannot_be_accepted_or_published(tmp_path):
330
338
 
331
339
  assert rig.code == 2, rig.output()
332
340
  (question,) = rig.state()["run"]["questions"]
333
- assert question["id"] == "final-ticket-blocked-1" and "MERGED-QUOTING-REGRESSION" in question["subject"]
341
+ assert question["id"] == "final-finding-open-1" and "MERGED-QUOTING-REGRESSION" in question["subject"]
334
342
  assert [item["title"] for item in rig.state()["run"]["final"]["open"]] == ["MERGED-QUOTING-REGRESSION"]
335
343
  assert not rig.pushes() and not rig.prs()
336
344
  rig.run(steps)
@@ -468,7 +476,7 @@ def test_unattended_with_everything_validated_pushes_once_opens_the_pr_and_write
468
476
  assert rig.pushes() == [f"refs/heads/feat/csv {tip}"] and ref(rig.origin, "refs/heads/feat/csv") == tip
469
477
  (pr,) = rig.prs()
470
478
  assert [l for l in pr["body"].splitlines() if "01" in l and tip[:7] in l], pr["body"]
471
- assert stage(rig) == {"stage": "implement", "status": "done"}
479
+ assert stage(rig) == DONE
472
480
 
473
481
 
474
482
  def test_unattended_with_a_blocked_ticket_pushes_nothing_and_exits_1(tmp_path):
@@ -604,7 +612,7 @@ def test_a_cached_body_that_no_longer_validates_is_rewritten_before_gh_pr_create
604
612
  steps = plan(**{"final/pr-writer": [writer(risk_body()), writer(risk_body())]})
605
613
  rig, _ = pushed_run(tmp_path, monkeypatch, steps, "claude", gh_fails=True)
606
614
  assert rig.code != 0 and "gh pr create failed" in rig.out and len(rig.final_calls("pr-writer")) == 1, rig.out
607
- cached = rig.repo / ".agent/implement/final/pr-body.md"
615
+ cached = rig.repo / ".agent/implement/final/pr-writer-body.md"
608
616
  cached.write_text(cached.read_text().replace("touches: [docs]", "touches: [styles]"))
609
617
  (tmp_path / "bin/gh").write_text(GH)
610
618
  rig.rerun()
@@ -1139,7 +1139,7 @@ def test_the_templates_of_the_new_roles_hold_a_valid_schema_and_end_with_the_rul
1139
1139
 
1140
1140
  def test_no_template_names_the_ledger_and_the_method_of_step_6_is_in_the_reviewer_prompt():
1141
1141
  # The final review gets the ledger as a pointer (requirement 19); no other prompt names it.
1142
- final = ("final-reviewer.md", "final-lens.md", "lens-correctness.md")
1142
+ final = ("final-reviewer.md", "final-lens.md", "lens-correctness.md", "arbiter.md")
1143
1143
  for path in driver_report.PROMPTS.glob("*.md"):
1144
1144
  assert ("ledger" in path.read_text().lower()) == (path.name in final), path.name
1145
1145
  reviewer = (driver_report.PROMPTS / "reviewer.md").read_text()
@@ -202,7 +202,7 @@ def test_reviewer_fields(world):
202
202
  def test_a_read_only_role_lists_no_commits_so_the_commits_it_reviewed_are_not_refused(world, role):
203
203
  # Issue #129: the final reviewer read `commits` as the commits under review, and each was refused as not new.
204
204
  shas, check, _ = world
205
- report = {"status": "DONE", "files": [], "concerns": [], "findings": [], "body": "b"}
205
+ report = {"status": "DONE", "files": [], "concerns": [], "findings": [], "body": "b", "rulings": []}
206
206
  template = "final-lens" if role in LENSES else role # the lenses share one prompt
207
207
  assert check(template, report, start=shas["impl"]) == []
208
208
  assert check(template, {**report, "commits": [shas["tests"], shas["impl"]]}, start=shas["impl"]) == []
@@ -1,6 +1,6 @@
1
1
  """Fewer roles, ticket 04: after the fix batch of the final review, one scoped re-review runs, the `final-reviewer`
2
- role on the other-provider entry of the `final-reviewer` list. A finding it leaves open asks `final-ticket-blocked`:
3
- only a `retry` starts another batch and scoped review.
2
+ role on the other-provider entry of the `final-reviewer` list. A finding it leaves open asks `final-finding-open`:
3
+ only a `retry` starts another batch and scoped review; `accept` and `follow-up` ship the PR with it.
4
4
 
5
5
  In process, on the rig of test_tidy and test_lenses."""
6
6
  import json
@@ -28,7 +28,7 @@ def test_the_scoped_review_is_one_agent_on_the_other_provider_over_the_fix_batch
28
28
  assert [(f["title"], f["source"]) for f in findings_file(rig, 1)] == [("Q-ONE", "final-reviewer")]
29
29
 
30
30
 
31
- def test_a_must_fix_the_scoped_review_leaves_out_of_resolved_must_fix_asks_final_ticket_blocked(tmp_path):
31
+ def test_a_must_fix_the_scoped_review_leaves_out_of_resolved_must_fix_asks_final_finding_open(tmp_path):
32
32
  rig = Inside(tmp_path, RISKY, MODELS)
33
33
  escaping = {**finding("quote escaping", file="csv.py", line=30), "basis": "regression"}
34
34
  batch = fixer(fn("02"), "escape quotes", ticket_of="02")
@@ -37,14 +37,14 @@ def test_a_must_fix_the_scoped_review_leaves_out_of_resolved_must_fix_asks_final
37
37
  "final/final-reviewer": [final()], "final/fixer": [batch]}))
38
38
  assert rig.code == 2, rig.out
39
39
  (question,) = decisions(rig)["questions"]
40
- assert question["id"] == Q and "quote escaping (csv.py:30)" in question["title"]
40
+ assert question["id"] == Q and "quote escaping (csv.py)" in question["title"]
41
41
  assert len(rig.final_calls("final-reviewer")) == 1
42
42
 
43
43
 
44
44
  # ---------------------------------------------------------------- a finding open after the scoped review
45
45
 
46
46
  ATOMIC = finding("ledger write not atomic", file="ledger.py", line=12)
47
- Q = "final-ticket-blocked-1"
47
+ Q = "final-finding-open-1"
48
48
 
49
49
 
50
50
  def open_after_batch(tmp_path):
@@ -55,13 +55,14 @@ def open_after_batch(tmp_path):
55
55
  return rig.run(steps, *UNATTENDED), steps
56
56
 
57
57
 
58
- def test_a_finding_open_after_the_scoped_review_asks_one_final_ticket_blocked_and_pushes_nothing(tmp_path):
58
+ def test_a_finding_open_after_the_scoped_review_asks_one_finding_open_and_pushes_nothing(tmp_path):
59
59
  rig, _ = open_after_batch(tmp_path)
60
60
  assert rig.code == 2 and not rig.pushes() and not rig.prs(), rig.out
61
61
  (question,) = decisions(rig)["questions"]
62
- assert question["id"] == Q and "ledger write not atomic (ledger.py:12)" in question["title"]
63
- assert [o["id"] for o in question["options"]] == ["retry", "edit"] and question["recommended"] == "retry"
64
- assert rig.led("End of run: the operator decides on 1 question of kind ticket-blocked")
62
+ assert question["id"] == Q and "ledger write not atomic (ledger.py)" in question["title"]
63
+ assert [o["id"] for o in question["options"]] == ["retry", "accept", "follow-up"]
64
+ assert question["recommended"] == "retry"
65
+ assert rig.led("End of run: the operator decides on 1 question of kind finding-open")
65
66
 
66
67
 
67
68
  def test_retry_on_an_open_final_finding_runs_one_more_fix_batch_and_one_scoped_review(tmp_path):
@@ -86,12 +87,13 @@ def test_with_retries_the_driver_runs_the_one_more_fix_batch_itself_and_pushes_w
86
87
  assert [len(rig.final_calls(role)) for role in LENSES] == [1, 1, 1]
87
88
 
88
89
 
89
- def test_edit_on_an_open_final_finding_keeps_the_end_of_run_blocked_and_runs_no_agent(tmp_path):
90
+ def test_accept_on_an_open_final_finding_ships_it_with_no_fix_batch_and_lists_the_operator_ruling(tmp_path):
90
91
  rig, steps = open_after_batch(tmp_path)
91
- calls = len(rig.calls())
92
- rig.run(steps, "--answer", f"{Q}=edit", *UNATTENDED)
93
- assert rig.code == 1 and len(rig.calls()) == calls and not rig.pushes() and not rig.prs(), rig.out
94
- assert rig.led("End of run: BLOCKED at the operator keeps the end of run BLOCKED for an edit (edit)")
92
+ rig.run(steps, "--answer", f"{Q}=accept", *UNATTENDED)
93
+ assert rig.code == 0 and rig.pushes() and len(rig.final_calls("fixer")) == 1, rig.out
94
+ (pr,) = rig.prs()
95
+ assert "- Ruling: final ships with the finding open (accept): ledger write not atomic (ledger.py).\n" in pr["body"]
96
+ assert "--draft" not in pr["argv"] and not rig.final_calls("arbiter")
95
97
 
96
98
 
97
99
  # ---------------------------------------------------------------- the locked files
@@ -128,7 +130,7 @@ def test_a_run_of_an_older_driver_after_its_first_round_resumes_into_the_fix_bat
128
130
  (folder / "findings-0.json").write_text(json.dumps(old))
129
131
  before = len(rig.ledger())
130
132
 
131
- rig.run(steps, "--answer", f"{Q}=retry")
133
+ rig.run(steps, "--answer", "final-ticket-blocked-1=retry")
132
134
  assert rig.code == 0, rig.out
133
135
  assert [len(rig.final_calls(role)) for role in LENSES] == [1, 1, 1]
134
136
  assert len(rig.final_calls("fixer")) == 3 and len(rig.final_calls("final-reviewer")) == 1
@@ -40,6 +40,7 @@ from test_walk import impl, plan
40
40
 
41
41
  STOP = "no write access to fixtures/"
42
42
  UNATTENDED = ("--unattended", "--stage-json", ".agent/stage.json")
43
+ DONE = {"stage": "implement", "status": "done", "draft": False, "decisions": 0} # a ready PR, no ruling
43
44
  Q1 = "01-ticket-blocked-1"
44
45
  RULED = "Ruling: 01 runs again (retry)"
45
46
 
@@ -214,7 +215,7 @@ def test_unattended_rerun_with_a_submitted_answers_file_at_the_current_revision_
214
215
  assert rig.code == 0, rig.output()
215
216
  assert Q1 not in rig.out + rig.err and rig.led(RULED)
216
217
  assert len(rig.calls("01", "implementer")) == 3 and "feat: 01 rows" in rig.pr_subjects()
217
- assert stage(rig) == {"stage": "implement", "status": "done"}
218
+ assert stage(rig) == DONE
218
219
 
219
220
 
220
221
  def test_unattended_blocked_ticket_ends_with_stage_json_blocked_naming_it_and_exit_1(tmp_path):
@@ -21,7 +21,7 @@ from test_cli import git
21
21
  from test_final import FILES, FINAL_MODELS, RESOLVE, THREE, TITLES, final, fixer, fn, ref, stop_lines
22
22
  from test_fixloop import inside # noqa: F401 (the autouse fixture puts the rig's CLIs on PATH)
23
23
  from test_review import FABLE, ONE, finding
24
- from test_stops import UNATTENDED, decisions, stage
24
+ from test_stops import DONE, UNATTENDED, decisions, stage
25
25
  from test_walk import fix, plan, tw
26
26
 
27
27
 
@@ -344,7 +344,7 @@ def test_a_base_that_moved_with_no_conflict_is_rebased_onto_with_no_agent_and_on
344
344
  assert [p.name for p in (rig.repo / ".agent/implement/final").glob("gate-*.log")] == [f"gate-full-{rig.branch()[:7]}.log"]
345
345
  assert rig.final()["commits"] == {nn: row["sha"] for nn, row in zip(order, rows)}
346
346
  assert rig.final()["onto"] == base and f"Range: {base}..{rig.branch()}\n" in rig.final_calls("final-spec")[0]["prompt"]
347
- assert rig.pushes() == [f"refs/heads/feat/csv {rig.branch()}"] and stage(rig) == {"stage": "implement", "status": "done"}
347
+ assert rig.pushes() == [f"refs/heads/feat/csv {rig.branch()}"] and stage(rig) == DONE
348
348
 
349
349
 
350
350
  def test_a_resolved_rebase_keeps_ticket_messages_and_gates_only_the_final_tidied_tip(tmp_path):
@@ -470,7 +470,7 @@ def test_a_push_or_a_pr_that_fails_is_tried_again_and_nothing_is_sent_twice(tmp_
470
470
  calls = len(rig.calls())
471
471
  rig.run(plan(), *UNATTENDED)
472
472
  assert rig.code == 0 and len(rig.pushes()) == 1 and len(rig.prs()) == 1 and len(rig.calls()) == calls, rig.out
473
- assert stage(rig) == {"stage": "implement", "status": "done"} and rig.final()["pr"] == "https://github.example/pull/1"
473
+ assert stage(rig) == DONE and rig.final()["pr"] == "https://github.example/pull/1"
474
474
 
475
475
 
476
476
  def test_a_reviewed_tip_with_no_green_gate_record_is_not_pushed(tmp_path):
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-11-15T02:04:59.583Z",
3
+ "generatedAt": "2026-11-16T00:15:36.754Z",
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.60",
62
- "hash": "sha256-7a558238b6b63630865609d10cba0d5798aca66eaa48a5fb6fb0f141ce91ebad",
61
+ "version": "0.1.61",
62
+ "hash": "sha256-94886542aabc6729b225228693c4049ae7fc3241eedb37778fde9da6b2ed621d",
63
63
  "description": "Implement a specification in code."
64
64
  },
65
65
  {