@bendyline/gilde 0.1.29 → 0.1.30
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/authoring/chat-models/qwen3.8-27b-q4.json +11 -7
- package/authoring/chat-models/qwen3.8-27b-q8.json +185 -0
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/qw/qwen3.8-27b-q4/manifest.json +83 -10
- package/data/chat-models/qw/qwen3.8-27b-q4/versions/1.0.1/manifest.json +93 -0
- package/data/chat-models/qw/qwen3.8-27b-q8/manifest.json +279 -0
- package/data/chat-models/qw/qwen3.8-27b-q8/versions/1.0.0/manifest.json +113 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/pu/pull-request-review/versions/1.5.0/craftbook.json +188 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.5.0/test.json +123 -0
- package/package.json +1 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "pull-request-review",
|
|
3
|
+
"name": "Pull Request Review",
|
|
4
|
+
"description": "Review a GitHub pull request from a complete, launch-time local mirror rather than a context-sized API response. The runtime resolves the explicit PR number or current-branch PR, materializes an overview, a machine-readable changed-file manifest, one untruncated patch record per changed path, comments, and the full diff. The reviewer processes at most 25 records per activation; a mechanical coverage gate reactivates the scan with a fresh context until every changed path is accounted for. Repository symbol search and GitHub check status ground cross-file and compile/CI claims before the final local verdict.",
|
|
5
|
+
"basedOn": {
|
|
6
|
+
"name": "Gezel Code Review",
|
|
7
|
+
"url": "https://github.com/bendyline/gezel"
|
|
8
|
+
},
|
|
9
|
+
"entryStepId": "scope",
|
|
10
|
+
"triggers": [
|
|
11
|
+
"review this pr",
|
|
12
|
+
"review the current pr",
|
|
13
|
+
"review this pull request",
|
|
14
|
+
"pr review",
|
|
15
|
+
"review the github pull request"
|
|
16
|
+
],
|
|
17
|
+
"requirements": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "github"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"connectors": [
|
|
23
|
+
{
|
|
24
|
+
"typeId": "github-pulls",
|
|
25
|
+
"reason": "materialize the selected pull request as a complete, chunk-readable local corpus"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"toolsets": [
|
|
29
|
+
{
|
|
30
|
+
"toolsetId": "github",
|
|
31
|
+
"optional": true,
|
|
32
|
+
"autoAllow": true,
|
|
33
|
+
"reason": "read CI/check status and perform targeted PR verification"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"paramSchema": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"number": {
|
|
40
|
+
"type": "number",
|
|
41
|
+
"title": "Pull request number",
|
|
42
|
+
"description": "Optional PR number. Leave blank to use the open PR whose head matches the project's checked-out branch."
|
|
43
|
+
},
|
|
44
|
+
"focus": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"title": "Review focus",
|
|
47
|
+
"default": "general correctness",
|
|
48
|
+
"description": "Optional area to emphasize, e.g. security, performance, or tests."
|
|
49
|
+
},
|
|
50
|
+
"intensity": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"title": "Intensity",
|
|
53
|
+
"enum": [
|
|
54
|
+
"low",
|
|
55
|
+
"medium",
|
|
56
|
+
"high"
|
|
57
|
+
],
|
|
58
|
+
"default": "medium",
|
|
59
|
+
"squisq": {
|
|
60
|
+
"control": "segmented"
|
|
61
|
+
},
|
|
62
|
+
"description": "How deep to go on each changed-file batch. Coverage remains complete at every intensity."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"steps": [
|
|
67
|
+
{
|
|
68
|
+
"id": "scope",
|
|
69
|
+
"name": "Map the pull request corpus",
|
|
70
|
+
"description": "Read the launch-time PR overview and manifest, record the authoritative changed-file count and review batches, and capture current CI/check evidence.",
|
|
71
|
+
"prompt": "**You are reviewing PR #{{number}}, not authoring it. Never modify project source in this craftbook.** The runtime already mirrored the selected PR into `{{corpusScope}}`; this corpus, not a single live diff call, is the authoritative review surface.\n\nCall `list_artifacts({ path: \"{{corpusScope}}\", recursive: true })`. Find and read the overview Markdown record and its attached `pr-{{number}}-files.json` manifest. The manifest contains the complete changed-file list and deterministic 25-file batches. Read the overview's PR metadata and existing comments. Call `github_check_status` for the overview's head ref and record whether checks are success, failure, pending, or unknown; this is evidence, not a substitute for reviewing the diff.\n\nWrite ONE task note beginning `## Scope — PR #{{number}}`. Include title, URL, head → base, draft state, exact changed-file count, manifest path, batch count/ranges, CI/check status, existing-review themes, and 3–6 review themes weighted by focus `{{focus}}` and intensity `{{intensity}}`. Do not retype paths from memory: derive them from the manifest. End by calling `advance_task_step`.",
|
|
72
|
+
"suggestedRole": "reviewer",
|
|
73
|
+
"gate": {
|
|
74
|
+
"at": "completion",
|
|
75
|
+
"scripts": [
|
|
76
|
+
{
|
|
77
|
+
"name": "checkTaskNoteContains",
|
|
78
|
+
"scope": "standard",
|
|
79
|
+
"inputs": {
|
|
80
|
+
"pattern": "##\\s*Scope\\s*[—-]\\s*PR\\s*#{{number}}[\\s\\S]*(?:changed.file|files?)"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"onReject": "scope",
|
|
85
|
+
"maxAttempts": 3
|
|
86
|
+
},
|
|
87
|
+
"next": "scan"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "scan",
|
|
91
|
+
"name": "Review the next changed-file batch",
|
|
92
|
+
"description": "Review at most 25 previously unreviewed PR records, persist observations and exact path coverage, then let the runtime reactivate this step with a fresh context until the corpus is complete.",
|
|
93
|
+
"prompt": "Process exactly ONE bounded batch this activation; do not try to load the whole PR into context.\n\n1. Call `list_artifacts({ path: \"{{corpusScope}}/files\", recursive: true })`. Read the artifact `pr-review-coverage.json` with `read_artifact` if it exists; otherwise start `{ \"pullRequest\": {{number}}, \"reviewedFiles\": [], \"reviewedRecords\": [] }`.\n2. Choose the next at-most-25 artifact record paths not present in `reviewedRecords`. Read every selected record with `read_artifact`; each carries one complete changed-file patch and authoritative `path` frontmatter. Binary/no-patch records still count, but note that limitation.\n3. Review this batch for correctness, security, data loss, error handling, concurrency, compatibility, tests, and clarity, weighted by focus `{{focus}}` and intensity `{{intensity}}`. Append concise batch observations and candidate findings to the artifact `pr-review-observations.md` (`read_artifact`, then `write_artifact` with the previous content plus this batch — the drawer has no append tool). Include exact `path:new-line` evidence from diff hunks.\n4. Before claiming that a referenced API/type/module does not exist, call `find_symbol`, `search_code`, or `grep_files` against the checkout. Treat successful CI/typecheck evidence from the Scope note as rebuttable evidence that typed APIs resolve; never allege a missing typed API without a failed symbol/search verification. Use `github_pr_file` or paginated `github_pr_diff({ path, offset })` only for targeted live confirmation when the corpus record is ambiguous.\n5. Write the artifact `pr-review-coverage.json` with `write_artifact` after the observations, adding every exact `path` you actually reviewed to `reviewedFiles` and every artifact record path you read to `reviewedRecords`. Preserve prior entries and use valid JSON. Then call `advance_task_step`.\n\nThe completion gate compares `reviewedFiles` with every per-file corpus record. If files remain, rejection is expected: it names missing paths and reactivates this step in a fresh session. Continue with the next batch. Never claim complete coverage until the gate approves.\n\nThese deliverables live in the project's artifacts drawer — write them with `write_artifact` and read them back with `read_artifact`; the shipped workspace stays untouched. A pull-request review never modifies project source.",
|
|
94
|
+
"suggestedRole": "reviewer",
|
|
95
|
+
"gate": {
|
|
96
|
+
"at": "completion",
|
|
97
|
+
"checks": [
|
|
98
|
+
{
|
|
99
|
+
"kind": "corpusCoverage",
|
|
100
|
+
"file": "pr-review-coverage.json",
|
|
101
|
+
"corpusDir": "{{corpusScope}}",
|
|
102
|
+
"artifact": true
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"onReject": "scan",
|
|
106
|
+
"maxAttempts": 6
|
|
107
|
+
},
|
|
108
|
+
"next": "report"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"id": "report",
|
|
112
|
+
"name": "Synthesize the review",
|
|
113
|
+
"description": "Synthesize the complete batch ledger into a cited report, re-verifying cross-file claims and keeping CI status distinct from code-review judgment.",
|
|
114
|
+
"prompt": "The coverage gate has proved that every changed path in PR #{{number}} was reviewed. Read the Scope note and the artifacts `pr-review-coverage.json` and `pr-review-observations.md` (`read_artifact`). Re-check every critical or major candidate against the relevant workspace source with `find_symbol`, `search_code`, `grep_files`, `read_file`, or `read_files`; call `github_check_status` again if the earlier status was pending. Drop any candidate that is not supported. Do not repeat an existing PR comment unless it still needs action and you explicitly say it was already raised.\n\nCite every finding as `path:line` using a changed path and a new-side diff line. Any critical or major finding requires `request-changes`; otherwise use `approve`. CI success is evidence that the checked revision compiled/tested as configured, but it does not erase logic findings. CI unknown/pending is not itself a code defect.\n\nWrite `pr-review.md` in ONE `write_artifact` call using exactly this skeleton:\n\n```\n# Pull Request Review — PR #{{number}}: <title>\n\n## Summary\n<2–6 sentences: what changes, overall risk, existing-comment coverage, and CI/check status. Say \"No findings.\" when there are none.>\n\nCoverage: <reviewed count>/<changed-file count> changed files across <batch count> batches.\n\n## Findings\n| # | Severity | File | Line | Finding | Recommendation |\n|---|----------|------|------|---------|----------------|\n<one row per finding; severities: critical, major, minor, nit. Keep the header when there are no findings.>\n\n## Verdict\nVerdict: approve\n<or> Verdict: request-changes\n<one sentence of rationale>\n```\n\nDo not modify source and do not call `github_pr_comment`; the report is local. If the gate rejects, repair the named gap and rewrite the whole report. Then call `advance_task_step`.\n\nThese deliverables live in the project's artifacts drawer — write them with `write_artifact` and read them back with `read_artifact`; the shipped workspace stays untouched. A pull-request review never modifies project source.",
|
|
115
|
+
"suggestedRole": "reviewer",
|
|
116
|
+
"advanceWhen": {
|
|
117
|
+
"file": "pr-review.md",
|
|
118
|
+
"minBytes": 500,
|
|
119
|
+
"artifact": true
|
|
120
|
+
},
|
|
121
|
+
"gate": {
|
|
122
|
+
"at": "completion",
|
|
123
|
+
"checks": [
|
|
124
|
+
{
|
|
125
|
+
"kind": "minBytes",
|
|
126
|
+
"file": "pr-review.md",
|
|
127
|
+
"bytes": 500,
|
|
128
|
+
"artifact": true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"kind": "contains",
|
|
132
|
+
"file": "pr-review.md",
|
|
133
|
+
"pattern": "#\\s+Pull Request Review\\s+[—-]\\s+PR\\s+#{{number}}",
|
|
134
|
+
"label": "PR-numbered title",
|
|
135
|
+
"artifact": true
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"kind": "contains",
|
|
139
|
+
"file": "pr-review.md",
|
|
140
|
+
"pattern": "Coverage:\\s*\\d+\\s*/\\s*\\d+\\s+changed files",
|
|
141
|
+
"label": "coverage summary",
|
|
142
|
+
"artifact": true
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "contains",
|
|
146
|
+
"file": "pr-review.md",
|
|
147
|
+
"pattern": "##\\s+Summary[\\s\\S]*##\\s+Findings[\\s\\S]*##\\s+Verdict",
|
|
148
|
+
"label": "required sections",
|
|
149
|
+
"artifact": true
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "contains",
|
|
153
|
+
"file": "pr-review.md",
|
|
154
|
+
"pattern": "Verdict:\\s*(approve|request-changes)",
|
|
155
|
+
"label": "verdict line",
|
|
156
|
+
"artifact": true
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"kind": "tableShape",
|
|
160
|
+
"file": "pr-review.md",
|
|
161
|
+
"requiredColumns": [
|
|
162
|
+
"Severity",
|
|
163
|
+
"File",
|
|
164
|
+
"Line",
|
|
165
|
+
"Finding",
|
|
166
|
+
"Recommendation"
|
|
167
|
+
],
|
|
168
|
+
"artifact": true
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"onReject": "report",
|
|
172
|
+
"maxAttempts": 4
|
|
173
|
+
},
|
|
174
|
+
"next": "done"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"id": "done",
|
|
178
|
+
"name": "Deliver the verdict",
|
|
179
|
+
"description": "The complete-coverage report passed its gates. Summarize the verdict and point the user to the local evidence files.",
|
|
180
|
+
"prompt": "Read the artifacts `pr-review.md` and `pr-review-coverage.json` with `read_artifact`, then write one final task note with `write_task_note`: `PR #{{number}} — Verdict: <approve|request-changes> — N findings (a critical, b major, c minor, d nit) — coverage X/X` plus a one-paragraph summary. Tell the user the full local review is at `pr-review.md` in the project's artifacts drawer, the coverage ledger is beside it at `pr-review-coverage.json`, and nothing was posted to GitHub. Then call `advance_task_step` to complete the task.",
|
|
181
|
+
"suggestedRole": "reviewer",
|
|
182
|
+
"terminal": true
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
"minGezelVersion": "1.26227",
|
|
186
|
+
"version": "1.5.0",
|
|
187
|
+
"releasedAt": "2026-08-15T00:00:00Z"
|
|
188
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Complete-corpus pull request review",
|
|
4
|
+
"objective": "Verify that Pull Request Review accounts for every changed path in a chunk-readable PR corpus, verifies an API use against a late definition, finds a late-file defect, reports CI evidence separately, and writes a cited local verdict without modifying source or posting to GitHub.",
|
|
5
|
+
"tags": [
|
|
6
|
+
"external",
|
|
7
|
+
"pull-request",
|
|
8
|
+
"large-corpus",
|
|
9
|
+
"coverage"
|
|
10
|
+
],
|
|
11
|
+
"prompt": "Review the deterministic large pull-request corpus completely. Work in bounded batches, maintain pr-review-coverage.json, verify the early API call against its late definition, find the late-file authorization defect, and write pr-review.md. Do not modify source or post a GitHub comment.",
|
|
12
|
+
"setup": {
|
|
13
|
+
"projectName": "Large PR Review Eval",
|
|
14
|
+
"about": "A deterministic PR-review fixture. The registered hand-authored scenario materializes more than 100 changed-file records and more than 80 KB of patch text in the artifacts corpus.",
|
|
15
|
+
"missionObjectives": "Account for every changed path, avoid a false missing-API finding, catch the late authorization defect, and deliver a local request-changes report with exact path:line evidence.",
|
|
16
|
+
"files": [
|
|
17
|
+
{
|
|
18
|
+
"path": "src/api/use-assured-api.ts",
|
|
19
|
+
"content": "import { assuredApi } from './assured-api.js';\n\nexport function loadWidget(id: string): string {\n return assuredApi(id);\n}\n"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "src/api/assured-api.ts",
|
|
23
|
+
"content": "export function assuredApi(id: string): string {\n return `widget:${id}`;\n}\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "src/security/late-authorization.ts",
|
|
27
|
+
"content": "export function canDeleteProject(userId: string, ownerId: string): boolean {\n if (!userId) return false;\n // Regression: any authenticated user can delete another owner's project.\n return true;\n}\n"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"worker": {
|
|
31
|
+
"name": "Rina",
|
|
32
|
+
"role": "Reviewer",
|
|
33
|
+
"description": "A careful code reviewer who works through large change sets in bounded batches and verifies cross-file claims."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"mocks": [],
|
|
37
|
+
"success": {
|
|
38
|
+
"summary": "The report covers all 120 changed files, recognizes that assuredApi exists, cites the late authorization defect, requests changes, and leaves the seeded source unchanged.",
|
|
39
|
+
"deliverables": [
|
|
40
|
+
{
|
|
41
|
+
"path": "pr-review.md",
|
|
42
|
+
"kind": "markdown-report",
|
|
43
|
+
"minBytes": 500,
|
|
44
|
+
"checks": [
|
|
45
|
+
{
|
|
46
|
+
"kind": "contains",
|
|
47
|
+
"file": "pr-review.md",
|
|
48
|
+
"pattern": "Coverage:\\s*120\\s*/\\s*120\\s+changed files",
|
|
49
|
+
"flags": "i"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"kind": "contains",
|
|
53
|
+
"file": "pr-review.md",
|
|
54
|
+
"pattern": "src/security/late-authorization\\.ts(?::|\\s*\\|\\s*)4",
|
|
55
|
+
"flags": "i"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"kind": "contains",
|
|
59
|
+
"file": "pr-review.md",
|
|
60
|
+
"pattern": "Verdict:\\s*request-changes",
|
|
61
|
+
"flags": "i"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"kind": "notContains",
|
|
65
|
+
"file": "pr-review.md",
|
|
66
|
+
"pattern": "assuredApi.{0,80}(missing|does not exist|undefined)|(?:missing|does not exist|undefined).{0,80}assuredApi",
|
|
67
|
+
"flags": "is"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"path": "pr-review-coverage.json",
|
|
73
|
+
"kind": "json",
|
|
74
|
+
"minBytes": 500
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"unchangedFixtures": [
|
|
78
|
+
"src/api/use-assured-api.ts",
|
|
79
|
+
"src/api/assured-api.ts",
|
|
80
|
+
"src/security/late-authorization.ts"
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"rubric": {
|
|
84
|
+
"artifact": {
|
|
85
|
+
"path": "pr-review.md",
|
|
86
|
+
"kind": "markdown"
|
|
87
|
+
},
|
|
88
|
+
"axes": [
|
|
89
|
+
{
|
|
90
|
+
"name": "coverage",
|
|
91
|
+
"description": "The review demonstrates complete 120-file coverage rather than reasoning from an early prefix."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"name": "cross-file-verification",
|
|
95
|
+
"description": "The report does not allege that assuredApi is missing because its definition exists later in the corpus and checkout."
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "late-defect",
|
|
99
|
+
"description": "The report finds and cites the authorization defect deliberately placed in the final changed file."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "side-effects",
|
|
103
|
+
"description": "The review remains local and source fixtures stay unchanged."
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"qualityFocus": [
|
|
108
|
+
"complete large-PR coverage",
|
|
109
|
+
"cross-file API verification",
|
|
110
|
+
"late-file defect detection",
|
|
111
|
+
"safe local-only delivery"
|
|
112
|
+
],
|
|
113
|
+
"extensions": {
|
|
114
|
+
"legacySimulators": [
|
|
115
|
+
{
|
|
116
|
+
"id": "large-pr-artifact-corpus",
|
|
117
|
+
"kind": "data-source",
|
|
118
|
+
"status": "implemented",
|
|
119
|
+
"description": "The hand-authored eval scenario seeds 120 per-file PR records totaling more than 80 KB, with an API use early, its valid definition late, and a real authorization defect in the final record."
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|