@jesdi/skills 0.0.56 → 0.0.57

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.56",
3
+ "version": "0.0.57",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -122,7 +122,7 @@ Rules for each agent:
122
122
  | `critical` or `important` | One fix round. |
123
123
  | `minor` | It stays in the ledger and in the findings file. The final reviewer gets the list. |
124
124
 
125
- A fix round has three steps: the **fixer** (`prompts/fixer.md`) makes the gate green on its final commit, as the implementer does; the driver runs the gate on the new tip; a re-review reads the range of the fix. A mutation proof is repeated only when the fix changed its production line.
125
+ A fix round has three steps: the **fixer** (`prompts/fixer.md`) makes the gate green on its final commit, as the implementer does; the driver runs the gate on the new tip; a re-review reads the range of the fix. A mutation proof is repeated only when the fix changed its production line. A fixer whose findings need no change, for example because a test-writer correction before it already resolved them, makes no commit and gives in `concerns` a reason for each finding; the round still counts, and the re-review of the same tip checks each reason.
126
126
 
127
127
  A red gate on the commit of the implementer or of a fixer is a critical finding with source `gate`. Its file is the gate record, and the record holds the output. No review runs on that tip, and the next round starts: a red gate on the commit of the implementer starts round 1. The review after that round covers each fix since the last review and repeats each proof that one of them made due. Two red gates block the ticket: one after round 4, and one on the commit of a test-writer correction, because the correction is outside the fix rounds and a fixer may not edit the locked files.
128
128
 
@@ -181,7 +181,7 @@ Every report has `status` (`DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, `BLOCK
181
181
  | implementer | `prompts/implementer.md` | `green` | With DONE: one commit or more. |
182
182
  | reviewer | `prompts/reviewer.md` | `findings` (`severity`, `file`, `line`, `title`, `evidence`, `kind`), `mutations` (`test`, `file`, `line`, `red`); `commits` is empty | In a full review (one with no fix range: round 1, and the review after a test-writer correction): `mutations` is required, with a proof for each locked test file (`test` is `<locked file>::<test name>`). Each `red` is in the log. |
183
183
  | correctness | `prompts/correctness.md` | the same as the reviewer; `commits` is empty | `mutations` is optional. |
184
- | fixer | `prompts/fixer.md` | `green`, `ticket` | With DONE: one commit or more. |
184
+ | fixer | `prompts/fixer.md` | `green`, `ticket` | With DONE and no commit: no new commit on the branch, no uncommitted change, a gate that is green on the start, and a concern that names each finding of the round. |
185
185
  | final-reviewer | `prompts/final-reviewer.md` | `findings` | None. |
186
186
  | pr-writer | `prompts/pr-writer.md` | `body`; `commits` is empty | None. |
187
187
  | fixer of the final review | `prompts/final-fixer.md` | `green`; `commits` is a list of (`sha`, `ticket`) | Each new commit on the branch is in `commits`, with a ticket of the run. |
@@ -67,6 +67,7 @@ def _run_reviewers(job: Job, cast: list[tuple[str, str]], locked: list[str]) ->
67
67
  earlier stop of that role lets the review go on with its report."""
68
68
  number = job.ticket.number
69
69
  values, running = job.pointers(job.round - 1), [role for role, _ in cast]
70
+ values["fixer_report"] = os.path.relpath(OUT / number / f"fixer-{job.round}.json", job.slot)
70
71
  errors, stops = {}, {}
71
72
  accepted = driver_decisions.accepted(job.run.state.read()["run"]["questions"], number, "review-stopped")
72
73
 
@@ -74,6 +75,7 @@ def _run_reviewers(job: Job, cast: list[tuple[str, str]], locked: list[str]) ->
74
75
  # A full review (no fix range) must give a mutation proof for each locked test file; the prompt names them.
75
76
  full = not job.previous and role == "reviewer"
76
77
  notes = ["rereview"] if job.previous else ["full-review"] if full else []
78
+ notes += ["unchanged"] * (job.previous == job.tip) # a fixer with no commit: its reasons need a check
77
79
  try:
78
80
  return job.run.agent(role, job.ticket.number, job.slot, values, entry=entry, fix_round=job.round,
79
81
  notes=notes, check={"full": True, "locked": locked} if full else {},
@@ -177,8 +179,9 @@ def _uncorrected(job: Job, findings: list[dict], not_addressed: list[dict]) -> l
177
179
  return list(code.values())
178
180
 
179
181
 
180
- def _fix(job: Job) -> None:
181
- """Run the next fix round: a fixer on the implementer's list."""
182
+ def _fix(job: Job, findings: list[dict]) -> None:
183
+ """Run the next fix round: a fixer on the implementer's list, for `findings`. A fixer that makes no commit gives
184
+ a reason per finding, and the review of the same tip checks them (issue #123)."""
182
185
  run, number = job.run, job.ticket.number
183
186
  job.round += 1
184
187
  on = entry(run.models, job.round)
@@ -188,7 +191,8 @@ def _fix(job: Job) -> None:
188
191
  elif job.round == 3:
189
192
  ledger(f"Ticket {number} round 3: the implementer has no next entry, so the round stays on {on}.")
190
193
  with during(f"fix round {job.round}"):
191
- run.agent("fixer", number, job.slot, job.pointers(job.round - 1), entry=on, fix_round=job.round)
194
+ run.agent("fixer", number, job.slot, job.pointers(job.round - 1), entry=on, fix_round=job.round,
195
+ check={"fix": [finding["title"] for finding in findings], "red": job.red})
192
196
  before, job.tip = job.tip, driver_slots.head(job.slot)
193
197
  run.state.ticket(number, tip=job.tip)
194
198
  followed = driver_review.follow(job.slot, before, job.tip, job.proofs)
@@ -237,7 +241,7 @@ def _act_on(job: Job, found: list[dict]) -> bool:
237
241
  evidence = OUT / job.ticket.number / f"findings-{ROUNDS}.json"
238
242
  job.run.ask(job.ticket.number, "finding", titles, str(evidence))
239
243
  raise Blocked(f"the review: after round {ROUNDS} these findings are open: {'; '.join(titles)}")
240
- _fix(job)
244
+ _fix(job, to_fix)
241
245
  return False
242
246
 
243
247
 
@@ -3,7 +3,8 @@
3
3
  context: repo (slot path), branch, start (HEAD when the role started), log, full (a full review: no fix range), locked,
4
4
  correction (a test-writer corrects locked tests), restored (locked files the driver put back before it),
5
5
  restore_red (the gate is red on the commit of that restore), findings (the titles a correction gets),
6
- owners (ticket numbers, for the final fix batch), merged (locked files of merged tickets, not its own), pr (tip)."""
6
+ owners (ticket numbers, for the final fix batch), merged (locked files of merged tickets, not its own), pr (tip),
7
+ fix (the titles of the findings a fixer gets), red (the gate is red on `start`)."""
7
8
  from __future__ import annotations
8
9
 
9
10
  import json
@@ -68,6 +69,28 @@ def _commit_errors(report: dict, context: dict) -> list[str]:
68
69
  return errors
69
70
 
70
71
 
72
+ def _unchanged_errors(report: dict, context: dict) -> list[str]:
73
+ """A DONE fixer with no commit (issue #123): the branch did not move, no change is left uncommitted, the gate of
74
+ the start is green, and a concern names each finding, with why it needs no change."""
75
+ if "fix" not in context or report["commits"] or report["status"] not in ("DONE", "DONE_WITH_CONCERNS"):
76
+ return []
77
+ return _moved_errors(context) + [
78
+ f"no commit, and no concern names the finding {title}: give each finding a concern that says why it needs no "
79
+ "change" for title in context["fix"] if not any(title in concern for concern in report["concerns"])]
80
+
81
+
82
+ def _moved_errors(context: dict) -> list[str]:
83
+ """What a report with no commit leaves out: a commit on the branch, a change in the tree, a red gate."""
84
+ repo, branch = context["repo"], context["branch"]
85
+ errors = [f"commit {sha[:7]} is on {branch} and not in `commits`: list each commit you made"
86
+ for sha in _git(repo, "rev-list", f"{context['start']}..{branch}")]
87
+ if _git(repo, "status", "--porcelain", "--untracked-files=no"):
88
+ errors.append("no commit, and the tree has uncommitted changes: commit the fix and list the commit")
89
+ if context.get("red"):
90
+ errors.append(f"no commit, and the gate is red on {context['start'][:7]}: a fix of a red gate is a commit")
91
+ return errors
92
+
93
+
71
94
  def _correction_errors(report: dict, context: dict) -> list[str]:
72
95
  """A correction changes only the files it lists in `locked` and the files the driver `restored`."""
73
96
  if not context.get("correction"):
@@ -134,5 +157,6 @@ def validate(role: str, path: str, context: dict) -> list[str]:
134
157
  report = {name: value for name, value in report.items() if name in rules["properties"]}
135
158
  if "locked" in report:
136
159
  report["locked"] = locked_files(report["locked"])
137
- return (_commit_errors(report, context) + _owner_errors(report, context) + _correction_errors(report, context)
138
- + _merged_errors(report, context) + _proof_errors(report, context) + _locked_errors(report, context))
160
+ return (_commit_errors(report, context) + _owner_errors(report, context) + _unchanged_errors(report, context)
161
+ + _correction_errors(report, context) + _merged_errors(report, context) + _proof_errors(report, context)
162
+ + _locked_errors(report, context))
@@ -14,6 +14,7 @@ Use targeted tests while you work.
14
14
  Before you report DONE or DONE_WITH_CONCERNS, make the gate green on your final commit: run `{gate}` with IMPLEMENT_SPEC_BASE={pr_branch} in the environment, then fix, commit, and run it again until it passes. The driver runs the gate again on that commit, and a re-review reads the lines you changed.
15
15
  A finding from the `gate` is a red gate: its file is the gate record. Read the output there and make the gate green.
16
16
  Commit your work on the checked-out ticket branch. Do not dispatch subagents.
17
+ When a finding needs no change, for example because a correction before you already resolved it, change nothing for it. When no finding needs a change, make no commit: report DONE_WITH_CONCERNS, list no commit in `commits`, and give one concern per finding to fix that starts with its title and says why it needs no change. A re-review checks each reason. This is not for a red gate: a fix of a red gate is a commit.
17
18
  In `ticket`, give the number of the ticket that owns your commits. In `green`, give the summary lines of the passing test output.
18
19
 
19
20
  Write one JSON report at {report} that matches this schema:
@@ -24,14 +25,12 @@ Write one JSON report at {report} that matches this schema:
24
25
  "required": ["status", "commits", "files", "concerns", "green", "ticket"],
25
26
  "properties": {
26
27
  "status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
27
- "commits": {"type": "array", "items": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}},
28
+ "commits": {"description": "Only the commits you made, so empty when you changed nothing: never list a commit that was on the branch at your start.", "type": "array", "items": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}},
28
29
  "files": {"type": "array", "items": {"type": "string"}},
29
30
  "concerns": {"type": "array", "items": {"type": "string"}},
30
31
  "green": {"type": "array", "items": {"type": "string"}},
31
32
  "ticket": {"type": "string", "pattern": "^[0-9]+$"}
32
- },
33
- "if": {"properties": {"status": {"enum": ["DONE", "DONE_WITH_CONCERNS"]}}},
34
- "then": {"properties": {"commits": {"minItems": 1}}}
33
+ }
35
34
  }
36
35
  ```
37
36
 
@@ -8,7 +8,7 @@ Locked files: {locked}
8
8
 
9
9
  Make the locked tests green and meet each criterion of the ticket. For internal code, work in vertical test-first slices: one failing test, the smallest code that passes it, then the next slice.
10
10
  Never edit a locked file. If a locked test contradicts the spec or the ticket, stop and report BLOCKED with a concern that starts with `locked test contradicts spec:`, then the test and the evidence.
11
- Commit your work on the checked-out ticket branch. Do not dispatch subagents.
11
+ Commit your work on the checked-out ticket branch. Do not dispatch subagents. In `commits`, list only the commits you made: the start commit and each commit before it are not yours.
12
12
  Use targeted tests while you work.
13
13
  Before you report DONE or DONE_WITH_CONCERNS, make the gate green on your final commit: run `{gate}` with IMPLEMENT_SPEC_BASE={pr_branch} in the environment, then fix, commit, and run it again until it passes. The driver runs the gate again on that commit.
14
14
  In `green`, give the summary lines of the passing test output.
@@ -0,0 +1 @@
1
+ The fixer of round {round} changed nothing: its report {fixer_report} gives in `concerns` why each finding needs no change. Check each reason at {start_sha}, and report again each finding that still holds.
@@ -582,6 +582,24 @@ def test_four_rounds_then_blocked_with_the_escalation_at_round_3(tmp_path):
582
582
  assert rig.state()["tickets"]["03"]["phase"] == "merged"
583
583
 
584
584
 
585
+ def test_a_fixer_with_nothing_to_change_is_accepted_and_the_same_tip_is_reviewed_again(tmp_path):
586
+ """Issue 123: a fixer whose finding needs no change reports no commit. That is no rerun: the round counts, the
587
+ gate of the tip stands, and the re-review weighs the fixer's reason."""
588
+ rig = Inside(tmp_path)
589
+ nothing = {"report": {"status": "DONE_WITH_CONCERNS", "commits": [], "files": [], "green": ["1 passed"],
590
+ "ticket": "01", "concerns": ["STUCK: the code already handles it"]}}
591
+ rig.run(plan(**{"01/reviewer": [review("01", [STUCK]), review("01")], "01/fixer": [nothing]}))
592
+ assert rig.code == 0, rig.ledger()
593
+ assert len(rig.calls("01", "fixer")) == 1 and rig.led("fixer ran on", "report accepted")
594
+ assert rig.state()["tickets"]["01"]["round"] == 1 and rig.state()["tickets"]["01"]["phase"] == "merged"
595
+ tip = rig.sha("01", "implementer")
596
+ assert [gate["commit"] for gate in rig.gates()].count(tip) == 1
597
+ again = rig.prompt("reviewer-1")
598
+ assert f"The fix is {tip}..{tip}" in again and "The fixer of round 1 changed nothing" in again
599
+ assert ".agent/implement/01/fixer-1.json" in again and "no concern names" not in rig.prompt("fixer-1")
600
+ assert "list no commit" in rig.prompt("fixer-1")
601
+
602
+
585
603
  def test_a_red_gate_on_a_fixer_commit_starts_the_next_round_with_the_record_as_evidence(tmp_path):
586
604
  """Issue 64: the gate of a fix round is red. That is a finding for the next round, not a BLOCKED ticket."""
587
605
  rig = Inside(tmp_path, gate={"subjects": ["fix: 01 round 1"]})
@@ -134,6 +134,26 @@ def test_implementer_without_a_new_commit_is_a_violation(world):
134
134
  assert check("implementer", implementer(shas), start=shas["impl"]) # its only commit is not new
135
135
 
136
136
 
137
+ def test_a_fixer_with_nothing_to_change_reports_no_commit_and_a_reason_per_finding(world):
138
+ """Issue 123: a fixer whose findings need no change has a report the driver accepts: no commit, a concern each."""
139
+ shas, check, tmp = world
140
+ fixer = lambda **changes: implementer(shas, **{"commits": [], "ticket": "01", **changes})
141
+ fix = {"start": shas["impl"], "fix": ["STUCK", "LOOSE"]}
142
+ reasons = ["STUCK: the correction at abc1234 resolved it", "LOOSE: the code already handles it"]
143
+ assert check("fixer", fixer(status="DONE_WITH_CONCERNS", concerns=reasons), **fix) == []
144
+ assert check("fixer", fixer(concerns=reasons[:1]), **fix) == [
145
+ "no commit, and no concern names the finding LOOSE: give each finding a concern that says why it needs no change"]
146
+ assert check("fixer", fixer(concerns=reasons), **fix, red=True) == [
147
+ f"no commit, and the gate is red on {shas['impl'][:7]}: a fix of a red gate is a commit"]
148
+ # A commit that predates the fixer is still refused, and a commit it made is in `commits`.
149
+ assert check("fixer", fixer(commits=[shas["impl"]], concerns=reasons), **fix)
150
+ assert check("fixer", fixer(concerns=reasons), **{**fix, "start": shas["tests"]}) == [
151
+ f"commit {shas['impl'][:7]} is on ticket/01 and not in `commits`: list each commit you made"]
152
+ (tmp / "slot" / "demo/export.py").write_text("changed\n")
153
+ assert check("fixer", fixer(concerns=reasons), **fix) == [
154
+ "no commit, and the tree has uncommitted changes: commit the fix and list the commit"]
155
+
156
+
137
157
  def test_locked_path_absent_from_the_commit_is_a_violation(world):
138
158
  shas, check, _ = world
139
159
  assert check("test-writer", writer(shas), start=shas["base"]) == []
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-10-20T15:09:12.275Z",
3
+ "generatedAt": "2026-10-20T15:11:42.597Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "backlog",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  {
48
48
  "name": "implement-spec",
49
- "version": "0.1.31",
50
- "hash": "sha256-122fcb172321462eacb9a527a876c568c687bbf315b6fce67cdca7a5a6445ba8",
49
+ "version": "0.1.32",
50
+ "hash": "sha256-65312a2ea436f3f7c99c5b53fced3118d07c4c90602f46cfb8037ed2e5c4eb9b",
51
51
  "description": "Implement a specification in code."
52
52
  },
53
53
  {