@jesdi/skills 0.0.61 → 0.0.62
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 +1 -1
- package/skills/implement-spec/README.md +5 -5
- package/skills/implement-spec/driver_report.py +3 -2
- package/skills/implement-spec/prompts/correctness.md +1 -2
- package/skills/implement-spec/prompts/final-reviewer.md +1 -2
- package/skills/implement-spec/prompts/pr-writer.md +1 -2
- package/skills/implement-spec/prompts/reviewer.md +1 -2
- package/skills/implement-spec/tests/test_fixloop.py +0 -7
- package/skills/implement-spec/tests/test_report.py +10 -0
- package/skills-manifest.json +3 -3
package/package.json
CHANGED
|
@@ -173,21 +173,21 @@ The defaults need both `claude` and `codex` on PATH. The `openai` defaults name
|
|
|
173
173
|
|
|
174
174
|
Each agent writes one JSON report. The schema of a role is the `json` block of its prompt template, so the agent reads the text that the driver enforces. `driver_report.py` `validate` checks the report against the schema, against git and against the log of the agent. A field that the schema does not name is ignored.
|
|
175
175
|
|
|
176
|
-
Every report has `status` (`DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, `BLOCKED`), `
|
|
176
|
+
Every report has `status` (`DONE`, `DONE_WITH_CONCERNS`, `NEEDS_CONTEXT`, `BLOCKED`), `files` and `concerns`. A role that commits also has `commits`. A read-only role (reviewer, correctness, final-reviewer, pr-writer) has none: a reviewer reads `commits` as the commits it reviews, and the driver would refuse each of them as not new. The driver checks instead that a read-only role leaves its slot on the tip it got, with a clean tree.
|
|
177
177
|
|
|
178
178
|
| Role | Template | More fields | Checks after the schema |
|
|
179
179
|
|---|---|---|---|
|
|
180
180
|
| test-writer | `prompts/test-writer.md` | `locked` (test file paths), `red` (`test`, `line`), optional `fixtures` (each locked file that holds no test, as a fake `gh`) | The driver reads a test node id `<file>::<test>` in `locked` as its file. Each fixture is in `locked`; the ticket record keeps it a fixture until a later correction lists the file again. With DONE: one commit, one locked file and one red line or more. Each locked path is in a commit that the role made. Each `line` is in the log. A locked file of a merged ticket that the role changed is in `locked`. A correction (after `overrule-test`, or for a review finding) changes only the files that it lists in `locked` and the files that the driver restored before it. When the gate is red on the restore commit, a DONE correction lists a restored file in `locked`. Each `not_addressed[].finding` is the title of a finding of the correction; a DONE correction with each of its findings there needs no commit. |
|
|
181
181
|
| implementer | `prompts/implementer.md` | `green` | With DONE and no commit: no new commit on the branch, no uncommitted change, and a concern that says why the start needs no change. The driver then gates and reviews the start commit. |
|
|
182
|
-
| reviewer | `prompts/reviewer.md` | `findings` (`severity`, `file`, `line`, `title`, `evidence`, `kind`), `mutations` (`test`, `file`, `line`, `red`)
|
|
183
|
-
| correctness | `prompts/correctness.md` | the same as the reviewer
|
|
182
|
+
| reviewer | `prompts/reviewer.md` | `findings` (`severity`, `file`, `line`, `title`, `evidence`, `kind`), `mutations` (`test`, `file`, `line`, `red`) | 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>`). A locked fixture needs no proof: it holds no test that a proof could name, and the locked-file check protects it. Each `red` is in the log. |
|
|
183
|
+
| correctness | `prompts/correctness.md` | the same as the reviewer | `mutations` is optional. |
|
|
184
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
|
-
| pr-writer | `prompts/pr-writer.md` | `body
|
|
186
|
+
| pr-writer | `prompts/pr-writer.md` | `body` | 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. |
|
|
188
188
|
| conflict | `prompts/conflict.md`, `prompts/rebase-conflict.md` | none | With DONE: one commit or more. No locked file may change. |
|
|
189
189
|
|
|
190
|
-
For each role, every commit in `commits` must be new since the role started and on its branch. `severity` is `critical`, `important` or `minor`. `kind` is `code`, `test` or `fixture`. A read-only `codex` agent cannot write a file, so it gives the JSON as its last message and the CLI saves it as the report.
|
|
190
|
+
For each role that commits, every commit in `commits` must be new since the role started and on its branch. `severity` is `critical`, `important` or `minor`. `kind` is `code`, `test` or `fixture`. A read-only `codex` agent cannot write a file, so it gives the JSON as its last message and the CLI saves it as the report.
|
|
191
191
|
|
|
192
192
|
## Question kinds
|
|
193
193
|
|
|
@@ -41,8 +41,9 @@ def _seen(line: str, log: str) -> bool:
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
def _shas(report: dict) -> list[str]:
|
|
44
|
-
"""`commits` as SHAs: the fix batch of the final review gives each commit with its ticket.
|
|
45
|
-
|
|
44
|
+
"""`commits` as SHAs: the fix batch of the final review gives each commit with its ticket. A read-only role has
|
|
45
|
+
no `commits` (issue #129)."""
|
|
46
|
+
return [commit["sha"] if isinstance(commit, dict) else commit for commit in report.get("commits", [])]
|
|
46
47
|
|
|
47
48
|
|
|
48
49
|
def _owner_errors(report: dict, context: dict) -> list[str]:
|
|
@@ -24,10 +24,9 @@ Write one JSON report at {report}. When your sandbox is read-only, give the JSON
|
|
|
24
24
|
```json
|
|
25
25
|
{
|
|
26
26
|
"type": "object",
|
|
27
|
-
"required": ["status", "
|
|
27
|
+
"required": ["status", "files", "concerns", "findings"],
|
|
28
28
|
"properties": {
|
|
29
29
|
"status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
|
|
30
|
-
"commits": {"description": "Only the commits you created. A review creates none, so this list is empty: never list a commit of the range.", "type": "array", "items": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}},
|
|
31
30
|
"files": {"type": "array", "items": {"type": "string"}},
|
|
32
31
|
"concerns": {"type": "array", "items": {"type": "string"}},
|
|
33
32
|
"findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}},
|
|
@@ -22,10 +22,9 @@ Write one JSON report at {report} that matches this schema:
|
|
|
22
22
|
```json
|
|
23
23
|
{
|
|
24
24
|
"type": "object",
|
|
25
|
-
"required": ["status", "
|
|
25
|
+
"required": ["status", "files", "concerns", "findings"],
|
|
26
26
|
"properties": {
|
|
27
27
|
"status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
|
|
28
|
-
"commits": {"type": "array", "items": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}},
|
|
29
28
|
"files": {"type": "array", "items": {"type": "string"}},
|
|
30
29
|
"concerns": {"type": "array", "items": {"type": "string"}},
|
|
31
30
|
"findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}}
|
|
@@ -17,10 +17,9 @@ Write one JSON report at {report} that matches this schema:
|
|
|
17
17
|
```json
|
|
18
18
|
{
|
|
19
19
|
"type": "object",
|
|
20
|
-
"required": ["status", "
|
|
20
|
+
"required": ["status", "files", "concerns", "body"],
|
|
21
21
|
"properties": {
|
|
22
22
|
"status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
|
|
23
|
-
"commits": {"type": "array", "maxItems": 0},
|
|
24
23
|
"files": {"type": "array", "items": {"type": "string"}},
|
|
25
24
|
"concerns": {"type": "array", "items": {"type": "string"}},
|
|
26
25
|
"body": {"type": "string", "minLength": 1}
|
|
@@ -19,10 +19,9 @@ Write one JSON report at {report}. When your sandbox is read-only, give the JSON
|
|
|
19
19
|
```json
|
|
20
20
|
{
|
|
21
21
|
"type": "object",
|
|
22
|
-
"required": ["status", "
|
|
22
|
+
"required": ["status", "files", "concerns", "findings"],
|
|
23
23
|
"properties": {
|
|
24
24
|
"status": {"enum": ["DONE", "DONE_WITH_CONCERNS", "NEEDS_CONTEXT", "BLOCKED"]},
|
|
25
|
-
"commits": {"description": "Only the commits you created. A review creates none, so this list is empty: never list a commit of the range.", "type": "array", "items": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"}},
|
|
26
25
|
"files": {"type": "array", "items": {"type": "string"}},
|
|
27
26
|
"concerns": {"type": "array", "items": {"type": "string"}},
|
|
28
27
|
"findings": {"type": "array", "items": {"type": "object", "required": ["severity", "file", "line", "title", "evidence", "kind"], "properties": {"severity": {"enum": ["critical", "important", "minor"]}, "file": {"type": "string"}, "line": {"type": "integer"}, "title": {"type": "string", "minLength": 1}, "evidence": {"type": "string", "minLength": 1}, "kind": {"enum": ["code", "fixture", "test"]}}}},
|
|
@@ -1245,13 +1245,6 @@ def test_a_review_stop_answered_redesign_keeps_the_ticket_blocked(tmp_path):
|
|
|
1245
1245
|
assert len(rig.calls("02", "correctness")) == 1
|
|
1246
1246
|
|
|
1247
1247
|
|
|
1248
|
-
@pytest.mark.parametrize("role", ["reviewer", "correctness"])
|
|
1249
|
-
def test_the_schema_of_a_review_says_that_commits_holds_only_the_agents_own_commits(role):
|
|
1250
|
-
"""Issue 66: a reviewer that lists a commit of the range costs a rerun (`is not a new commit`)."""
|
|
1251
|
-
description = driver_report.schema(role)["properties"]["commits"]["description"]
|
|
1252
|
-
assert "only the commits you created" in description.lower() and "empty" in description
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
1248
|
def test_the_reviewer_schema_asks_for_one_proof_for_each_locked_test_file_in_the_first_review():
|
|
1256
1249
|
"""Issue 66: a first review with no proof for a locked test file costs a rerun."""
|
|
1257
1250
|
description = driver_report.schema("reviewer")["properties"]["mutations"]["description"]
|
|
@@ -8,6 +8,7 @@ import subprocess
|
|
|
8
8
|
|
|
9
9
|
import pytest
|
|
10
10
|
|
|
11
|
+
from driver_agents import READ_ONLY
|
|
11
12
|
from driver_report import validate
|
|
12
13
|
|
|
13
14
|
GIT = ["git", "-c", "user.name=t", "-c", "user.email=t@example.com", "-c", "commit.gpgsign=false"]
|
|
@@ -192,3 +193,12 @@ def test_reviewer_fields_and_mutation_proofs(world):
|
|
|
192
193
|
assert any("mutations" in e for e in check("reviewer", no_proof, start=shas["impl"], full=True))
|
|
193
194
|
fake = reviewer(mutations=[{"test": "t", "file": "demo/export.py", "line": 2, "red": "never ran"}])
|
|
194
195
|
assert any("not found in log" in e for e in check("reviewer", fake, start=shas["impl"], full=True))
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
@pytest.mark.parametrize("role", READ_ONLY)
|
|
199
|
+
def test_a_read_only_role_lists_no_commits_so_the_commits_it_reviewed_are_not_refused(world, role):
|
|
200
|
+
# Issue #129: the final reviewer read `commits` as the commits under review, and each was refused as not new.
|
|
201
|
+
shas, check, _ = world
|
|
202
|
+
report = {"status": "DONE", "files": [], "concerns": [], "findings": [], "body": "b"}
|
|
203
|
+
assert check(role, report, start=shas["impl"]) == []
|
|
204
|
+
assert check(role, {**report, "commits": [shas["tests"], shas["impl"]]}, start=shas["impl"]) == []
|
package/skills-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-20T22:
|
|
3
|
+
"generatedAt": "2026-10-20T22:41:26.424Z",
|
|
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.
|
|
50
|
-
"hash": "sha256-
|
|
49
|
+
"version": "0.1.37",
|
|
50
|
+
"hash": "sha256-87d03c44e4dfd6624de7cc987f793fce31f419939c29ddbfee19fbabd88dac3e",
|
|
51
51
|
"description": "Implement a specification in code."
|
|
52
52
|
},
|
|
53
53
|
{
|