@bendyline/gilde 0.1.37 → 0.1.38
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/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.3/craftbook.json +9 -8
- package/data/craftbook-templates/pu/pull-request-review/versions/1.7.1/craftbook.json +273 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.7.1/test.json +141 -0
- package/package.json +1 -1
- package/schemas/craftbook-doc.schema.json +4 -2
- package/schemas/craftbook-template-version.schema.json +4 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "powerpoint-deck",
|
|
3
3
|
"name": "PowerPoint from Content",
|
|
4
|
-
"description": "Turn supplied content or a factual topic into a real, editable,
|
|
4
|
+
"description": "Turn supplied content or a factual topic into a real, editable PowerPoint. Supplied sources remain authoritative, and internet research is strongly recommended for factual grounding; topic-only runs may proceed without it when access is unavailable or the deck is explicitly exploratory, provided unsupported facts are not invented. A researcher records the source boundary and fact ledger before a planner locks a numbered slide outline. A copywriter writes a task-specific Markdown deck with exactly one H1 per outline slide, while deterministic gates keep the slide count, titles, and order aligned. A reviewer checks factual traceability before a designer converts the Markdown to PPTX, previews every slide, and saves the requested PPTX in artifacts.\n\nEvery run gets its own workPath by default, so source packets, outlines, Markdown, and reviews cannot collide with an earlier PowerPoint task. Artifact working files must be read and written with the artifact tools; the Markdown deck source and user-facing PowerPoint remain in the workspace.",
|
|
5
5
|
"entryStepId": "research",
|
|
6
6
|
"triggers": [
|
|
7
7
|
"make a powerpoint",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
{
|
|
100
100
|
"id": "research",
|
|
101
101
|
"name": "Acquire and verify sources",
|
|
102
|
-
"description": "Read the exact supplied source
|
|
103
|
-
"prompt": "Build the source packet before planning any slides. This run's working namespace is `{{workPath}}`. Files outside it—including an earlier `notes/outline.md`, root `deck.md`, or another PowerPoint task directory—are not inputs and must not be read or reused unless `{{sourcePath}}` names one exactly. Exact source path: `{{sourcePath}}`. Topic: `{{topic}}`. Inline source brief: `{{content}}`. Audience: `{{audience}}`. 0. If source path, topic, and inline content are all empty, call `ask_user_question` for the missing subject or exact source and stop. Do not call `read_task_notes`, inspect the workspace, or reuse an earlier deck while the source boundary is missing. 1. When `{{sourcePath}}` is non-empty, your FIRST source action is `read_file` on that exact path. Never replace a named source with a similarly named file. 2. Otherwise treat non-empty `{{content}}` as supplied source material and `{{topic}}` as the research question
|
|
102
|
+
"description": "Read the exact supplied source and strongly prefer authoritative research before outlining, while allowing an honest no-research path.",
|
|
103
|
+
"prompt": "Build the source packet before planning any slides. This run's working namespace is `{{workPath}}`. Files outside it—including an earlier `notes/outline.md`, root `deck.md`, or another PowerPoint task directory—are not inputs and must not be read or reused unless `{{sourcePath}}` names one exactly. Exact source path: `{{sourcePath}}`. Topic: `{{topic}}`. Inline source brief: `{{content}}`. Audience: `{{audience}}`. 0. If source path, topic, and inline content are all empty, call `ask_user_question` for the missing subject or exact source and stop. Do not call `read_task_notes`, inspect the workspace, or reuse an earlier deck while the source boundary is missing. 1. When `{{sourcePath}}` is non-empty, your FIRST source action is `read_file` on that exact path. Never replace a named source with a similarly named file, and never skip a supplied source. 2. Otherwise treat non-empty `{{content}}` as supplied source material and `{{topic}}` as the research question. Strongly prefer real external source acquisition for factual grounding: use `web_search` when registered, otherwise `wikipedia_search`, then use `fetch_url` or browser automation to read the useful result. Prefer primary sources, official statistics, standards bodies, peer-reviewed work, or reputable institutional summaries. You may proceed without external research when external tools are unavailable or when the topic is explicitly exploratory, generative, or proposal-oriented. If you skip it, say so plainly, record why, frame unsourced content as original concepts or reasoning rather than established fact, and do not invent a source, URL, research result, or tool-verification workaround. Do not treat model memory, the task prompt, an earlier deck, or an invented URL as research. 3. Write `{{workPath}}/sources.md` with: the invocation inputs and their boundary; research status (`completed` or `skipped`, with reason); a source table with title, resolvable URL or exact file path, authority/date, and intended use (the table may be empty when research was honestly skipped); a fact ledger where every number, quotation, and externally checkable claim carries `(source: URL-or-path)`; a separate ledger of original proposals or reasoning that makes no factual-source claim; conflicts and uncertainties; and facts that must not be invented. Do not silently overwrite supplied facts with external claims—record conflicts explicitly. 4. When any source was used, include at least one resolvable citation. When none was used, include no citation rather than fabricating one. Call `write_task_note` with the sources used—or that research was skipped—and any uncertainty. Do not draft the outline or deck yet.\n\nStore `{{workPath}}/sources.md` in the artifacts drawer with `write_artifact`, then verify it with `read_artifact`; do not write this working file to the workspace.",
|
|
104
104
|
"suggestedRole": "researcher",
|
|
105
105
|
"advanceWhen": {
|
|
106
106
|
"file": "{{workPath}}/sources.md",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
{
|
|
121
121
|
"kind": "citationsResolve",
|
|
122
122
|
"file": "{{workPath}}/sources.md",
|
|
123
|
-
"minCitations":
|
|
123
|
+
"minCitations": 0,
|
|
124
124
|
"artifact": true
|
|
125
125
|
},
|
|
126
126
|
{
|
|
@@ -133,7 +133,8 @@
|
|
|
133
133
|
"browser_navigate",
|
|
134
134
|
"run_playwright_script"
|
|
135
135
|
],
|
|
136
|
-
"minSuccessful": 1
|
|
136
|
+
"minSuccessful": 1,
|
|
137
|
+
"externalOptional": true
|
|
137
138
|
}
|
|
138
139
|
],
|
|
139
140
|
"onReject": "research",
|
|
@@ -145,7 +146,7 @@
|
|
|
145
146
|
"id": "outline",
|
|
146
147
|
"name": "Lock the slide outline",
|
|
147
148
|
"description": "Lock the audience, purpose, sequence, evidence, and one message per slide.",
|
|
148
|
-
"prompt": "Read `{{workPath}}/sources.md` and plan the deck from its verified fact ledger. If `{{sourcePath}}` is non-empty, also read that exact source. Do not borrow facts, titles, or slide content from an earlier outline or deck outside `{{workPath}}`; a requested similarity is a structural constraint, not permission to mix source packets. 1. State the audience, occasion, and ONE takeaway. 2. Use exactly the slide count the user asked for; only when they gave none, draft 8-15 slides. Format every slide heading exactly as `## Slide N — Title`, numbered consecutively from 1. Under each heading write `Message:`, `Evidence:`, and `Visual:`. Every evidence line must point to a citation already recorded in `{{workPath}}/sources.md
|
|
149
|
+
"prompt": "Read `{{workPath}}/sources.md` and plan the deck from its verified fact ledger and original-proposal ledger. If `{{sourcePath}}` is non-empty, also read that exact source. Do not borrow facts, titles, or slide content from an earlier outline or deck outside `{{workPath}}`; a requested similarity is a structural constraint, not permission to mix source packets. 1. State the audience, occasion, and ONE takeaway. 2. Use exactly the slide count the user asked for; only when they gave none, draft 8-15 slides. Format every slide heading exactly as `## Slide N — Title`, numbered consecutively from 1. Under each heading write `Message:`, `Evidence:`, and `Visual:`. Every sourced factual evidence line must point to a citation already recorded in `{{workPath}}/sources.md`. When research was skipped, original concepts and reasoned recommendations may be labeled `PROPOSAL` and need no citation; mark any unsupported externally checkable claim `UNVERIFIED` rather than filling gaps from memory. 3. Open with context, make the middle a coherent argument, and close with the ask or next step. Include a Sources slide in this locked outline when the audience needs visible references and sources actually exist. 4. Write acceptance criteria: every numbered outline slide must become exactly one H1 in {{workPath}}/deck.md, with the same title and order; one idea per slide; no wall of text; factual claims remain traceable; proposals remain clearly framed as proposals; visual preview passes; an artifact copy is retained; and the exact workspace file `{{outputPath}}` is delivered. Write only `{{workPath}}/outline.md`, then call `write_task_note` with the exact slide count, takeaway, and requested output path. Do not write slide content or presentation code.\n\nOpen `{{workPath}}/sources.md` from the artifacts drawer with `read_artifact` before working. Store `{{workPath}}/outline.md` in the artifacts drawer with `write_artifact`, then verify it with `read_artifact`; do not write this working file to the workspace.",
|
|
149
150
|
"suggestedRole": "planner",
|
|
150
151
|
"advanceWhen": {
|
|
151
152
|
"file": "{{workPath}}/outline.md",
|
|
@@ -173,7 +174,7 @@
|
|
|
173
174
|
{
|
|
174
175
|
"kind": "citationsResolve",
|
|
175
176
|
"file": "{{workPath}}/outline.md",
|
|
176
|
-
"minCitations":
|
|
177
|
+
"minCitations": 0,
|
|
177
178
|
"artifact": true
|
|
178
179
|
}
|
|
179
180
|
],
|
|
@@ -222,7 +223,7 @@
|
|
|
222
223
|
{
|
|
223
224
|
"kind": "citationsResolve",
|
|
224
225
|
"file": "{{workPath}}/deck.md",
|
|
225
|
-
"minCitations":
|
|
226
|
+
"minCitations": 0
|
|
226
227
|
}
|
|
227
228
|
],
|
|
228
229
|
"onReject": "write",
|
|
@@ -0,0 +1,273 @@
|
|
|
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 scope step publishes deterministic 25-file batches and the runtime fans them out to one child reviewer per batch, each in its own session with only its own records in context; a per-batch coverage gate holds every child to its exact slice and a merge gate holds the run to the whole corpus. 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
|
+
"spawn": {
|
|
67
|
+
"overFile": "pr-review/batches.json",
|
|
68
|
+
"overArtifact": true,
|
|
69
|
+
"entryStepId": "review-batch",
|
|
70
|
+
"steps": [
|
|
71
|
+
{
|
|
72
|
+
"id": "review-batch",
|
|
73
|
+
"name": "Review batch {{batchNumber}} of PR #{{number}}",
|
|
74
|
+
"description": "Review one bounded slice of the pull-request corpus in a session that holds only that slice, then persist the batch's observations and its coverage shard.",
|
|
75
|
+
"prompt": "You are reviewing batch {{batchNumber}} of PR #{{number}} — records {{start}} through {{end}}. This batch is the whole of your assignment. Other reviewers hold the other batches; do not read, account for, or comment on files outside your slice.\n\nYour batch covers exactly these changed paths:\n\n{{paths}}\n\nRead exactly these artifact records — the runtime resolved their current filenames from the connector's identity sidecar, so no directory listing or ordinal reconstruction is needed:\n\n{{records}}\n\n1. Call `read_artifact` once for every exact record path in `{{records}}`. Each carries one complete changed-file patch and an authoritative `path` frontmatter. Binary/no-patch records still count toward coverage, but say so. Do not call `list_artifacts` on the pull-request corpus; that directory may contain more entries than one bounded listing can return.\n2. Review this batch for correctness, security, data loss, error handling, concurrency, compatibility, tests, and clarity, weighted by focus `{{focus}}` and intensity `{{intensity}}`. Cite exact `path:new-line` evidence from the diff hunks.\n3. Before claiming that a referenced API/type/module does not exist, call `find_symbol`, `search_code`, or `grep_files` against the checkout — its definition may live in a batch you were not given. Treat successful CI/typecheck evidence 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.\n4. Write the artifact `pr-review/observations-{{batchNumber}}.md` with `write_artifact`. Head it `## Batch {{batchNumber}} — files {{start}}–{{end}}`, then one short section per finding: severity (critical/major/minor/nit), `path:line`, what is wrong, and the fix. Add a `### Verified OK` list naming what you checked and found sound — the synthesizer needs to know what was examined, not only what failed. Number your findings `B{{batchNumber}}-1`, `B{{batchNumber}}-2`, … so they stay unique across batches.\n5. Write the artifact `pr-review/coverage-{{batchNumber}}.json` with `write_artifact` as `{ \"batchNumber\": {{batchNumber}}, \"reviewedFiles\": [...], \"reviewedRecords\": [...] }`, naming every exact `path` you reviewed and every exact artifact record path from `{{records}}`. Valid JSON, exact strings, this batch only. Then call `advance_task_step`.\n\nThe gate compares your shard against your batch's paths alone. Listing a path from another batch fails it just as surely as omitting one of yours.\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.",
|
|
76
|
+
"suggestedRole": "reviewer",
|
|
77
|
+
"advanceWhen": {
|
|
78
|
+
"file": "pr-review/coverage-{{batchNumber}}.json",
|
|
79
|
+
"minBytes": 2,
|
|
80
|
+
"sniff": "json-valid",
|
|
81
|
+
"artifact": true
|
|
82
|
+
},
|
|
83
|
+
"gate": {
|
|
84
|
+
"at": "completion",
|
|
85
|
+
"checks": [
|
|
86
|
+
{
|
|
87
|
+
"kind": "corpusCoverage",
|
|
88
|
+
"file": "pr-review/coverage-{{batchNumber}}.json",
|
|
89
|
+
"corpusDir": "{{corpusScope}}",
|
|
90
|
+
"expectPaths": "{{paths}}",
|
|
91
|
+
"artifact": true
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"kind": "minBytes",
|
|
95
|
+
"file": "pr-review/observations-{{batchNumber}}.md",
|
|
96
|
+
"bytes": 200,
|
|
97
|
+
"artifact": true
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"onReject": "review-batch",
|
|
101
|
+
"maxAttempts": 4
|
|
102
|
+
},
|
|
103
|
+
"terminal": true
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
},
|
|
107
|
+
"steps": [
|
|
108
|
+
{
|
|
109
|
+
"id": "scope",
|
|
110
|
+
"name": "Map the pull request corpus",
|
|
111
|
+
"description": "Read the launch-time PR overview and manifest, capture CI/check evidence, and publish the deterministic review batches the runtime fans out over.",
|
|
112
|
+
"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\n**The fanout input is already published.** On entering this step the runtime published the manifest's complete batch array to `pr-review/batches.json` and enriched each batch with its exact current `records` paths. That file is done — do not write it, and do not \"fix\" it. Retyping 500+ exact paths through a tool call is what this step used to ask for, and it cannot survive a per-turn output cap.\n\nYour job is the evidence and the scope note.\n\n1. Call `list_artifacts({ path: \"{{corpusScope}}\", recursive: false })` and read the overview Markdown record it returns. Read the manifest directly at `{{corpusScope}}/attachments/001/pr-{{number}}-files.json`. Do not recursively list the corpus.\n2. Call `read_artifact({ path: \"pr-review/batches.json\" })` and note the batch count and ranges from what is actually on disk.\n3. 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\nThen write 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}}`. Derive every path and count from the manifest and the published batches — never from memory. End by calling `advance_task_step`.\n\nThese deliverables live in the project's artifacts drawer — read them with `read_artifact`; the shipped workspace stays untouched.",
|
|
113
|
+
"suggestedRole": "reviewer",
|
|
114
|
+
"advanceWhen": {
|
|
115
|
+
"file": "pr-review/batches.json",
|
|
116
|
+
"minBytes": 2,
|
|
117
|
+
"sniff": "json-valid",
|
|
118
|
+
"artifact": true
|
|
119
|
+
},
|
|
120
|
+
"gate": {
|
|
121
|
+
"at": "completion",
|
|
122
|
+
"scripts": [
|
|
123
|
+
{
|
|
124
|
+
"name": "checkTaskNoteContains",
|
|
125
|
+
"scope": "standard",
|
|
126
|
+
"inputs": {
|
|
127
|
+
"pattern": "##\\s*Scope\\s*[—-]\\s*PR\\s*#{{number}}[\\s\\S]*(?:changed.file|files?)"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"checks": [
|
|
132
|
+
{
|
|
133
|
+
"kind": "corpusBatches",
|
|
134
|
+
"file": "pr-review/batches.json",
|
|
135
|
+
"corpusDir": "{{corpusScope}}",
|
|
136
|
+
"artifact": true
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"onReject": "scope",
|
|
140
|
+
"maxAttempts": 3
|
|
141
|
+
},
|
|
142
|
+
"next": "scan",
|
|
143
|
+
"onEnter": [
|
|
144
|
+
{
|
|
145
|
+
"name": "publishCorpusBatches",
|
|
146
|
+
"scope": "standard",
|
|
147
|
+
"inputs": {
|
|
148
|
+
"corpusDir": "{{corpusScope}}",
|
|
149
|
+
"outFile": "pr-review/batches.json"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"id": "scan",
|
|
156
|
+
"name": "Fan the batches out to the review crew",
|
|
157
|
+
"description": "Spawn one child reviewer per published batch. The runtime performs the fanout with no model turn; the crew is the work.",
|
|
158
|
+
"prompt": "The runtime spawns one child reviewer per entry in `pr-review/batches.json`, each in its own session holding only that batch's records. No turn is needed here.",
|
|
159
|
+
"spawnFanout": true,
|
|
160
|
+
"advanceWhen": {
|
|
161
|
+
"file": "pr-review/fanout.md",
|
|
162
|
+
"minBytes": 1,
|
|
163
|
+
"sniff": "nonempty",
|
|
164
|
+
"artifact": true
|
|
165
|
+
},
|
|
166
|
+
"next": "collect"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "collect",
|
|
170
|
+
"name": "Merge the batch ledgers",
|
|
171
|
+
"description": "Wait for the crew, merge every batch coverage shard into the run-wide ledger, and let the corpus gate prove nothing was dropped.",
|
|
172
|
+
"prompt": "The batch reviewers work in parallel; your job is to merge what they land. Some shards may not exist yet — that is expected, and the gate will send you back until they do.\n\n1. Call `list_artifacts({ path: \"pr-review\", recursive: true })` to see which `coverage-N.json` shards exist so far, and read each with `read_artifact`.\n2. Merge every shard's `reviewedFiles` and `reviewedRecords` into ONE artifact `pr-review-coverage.json`, written with `write_artifact` as `{ \"pullRequest\": {{number}}, \"reviewedFiles\": [...], \"reviewedRecords\": [...] }`. Union the entries, drop duplicates, and copy every string exactly — never retype a path.\n3. Call `advance_task_step`.\n\nThe gate compares the merged ledger against every per-file record in the corpus. While reviewers are still working it will reject and name what is outstanding; that is the crew still running, not a defect — merge the shards that have landed and advance again. Do not review files yourself to close the gap, and do not add a path to the ledger that no shard reported: a batch that is genuinely stuck belongs in a task note, not papered over here.\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.",
|
|
173
|
+
"suggestedRole": "reviewer",
|
|
174
|
+
"advanceWhen": {
|
|
175
|
+
"file": "pr-review-coverage.json",
|
|
176
|
+
"minBytes": 2,
|
|
177
|
+
"sniff": "json-valid",
|
|
178
|
+
"artifact": true
|
|
179
|
+
},
|
|
180
|
+
"gate": {
|
|
181
|
+
"at": "completion",
|
|
182
|
+
"checks": [
|
|
183
|
+
{
|
|
184
|
+
"kind": "corpusCoverage",
|
|
185
|
+
"file": "pr-review-coverage.json",
|
|
186
|
+
"corpusDir": "{{corpusScope}}",
|
|
187
|
+
"artifact": true
|
|
188
|
+
}
|
|
189
|
+
],
|
|
190
|
+
"onReject": "collect",
|
|
191
|
+
"maxAttempts": 8
|
|
192
|
+
},
|
|
193
|
+
"next": "report"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "report",
|
|
197
|
+
"name": "Synthesize the review",
|
|
198
|
+
"description": "Synthesize every batch's observations into a cited report, re-verifying cross-file claims and keeping CI status distinct from code-review judgment.",
|
|
199
|
+
"prompt": "The coverage gate has proved that every changed path in PR #{{number}} was reviewed. Read the Scope note and the artifact `pr-review-coverage.json`, then call `list_artifacts({ path: \"pr-review\", recursive: true })` and read EVERY `observations-N.md` shard with `read_artifact`. There is one per batch and each holds findings the others do not — synthesizing from a subset silently drops whole batches of review.\n\nRe-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. Reconcile duplicates: separate reviewers can raise the same defect from two batches — merge those into one row. 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.",
|
|
200
|
+
"suggestedRole": "reviewer",
|
|
201
|
+
"advanceWhen": {
|
|
202
|
+
"file": "pr-review.md",
|
|
203
|
+
"minBytes": 500,
|
|
204
|
+
"artifact": true
|
|
205
|
+
},
|
|
206
|
+
"gate": {
|
|
207
|
+
"at": "completion",
|
|
208
|
+
"checks": [
|
|
209
|
+
{
|
|
210
|
+
"kind": "minBytes",
|
|
211
|
+
"file": "pr-review.md",
|
|
212
|
+
"bytes": 500,
|
|
213
|
+
"artifact": true
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"kind": "contains",
|
|
217
|
+
"file": "pr-review.md",
|
|
218
|
+
"pattern": "#\\s+Pull Request Review\\s+[—-]\\s+PR\\s+#{{number}}",
|
|
219
|
+
"label": "PR-numbered title",
|
|
220
|
+
"artifact": true
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "contains",
|
|
224
|
+
"file": "pr-review.md",
|
|
225
|
+
"pattern": "Coverage:\\s*\\d+\\s*/\\s*\\d+\\s+changed files",
|
|
226
|
+
"label": "coverage summary",
|
|
227
|
+
"artifact": true
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"kind": "contains",
|
|
231
|
+
"file": "pr-review.md",
|
|
232
|
+
"pattern": "##\\s+Summary[\\s\\S]*##\\s+Findings[\\s\\S]*##\\s+Verdict",
|
|
233
|
+
"label": "required sections",
|
|
234
|
+
"artifact": true
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"kind": "contains",
|
|
238
|
+
"file": "pr-review.md",
|
|
239
|
+
"pattern": "Verdict:\\s*(approve|request-changes)",
|
|
240
|
+
"label": "verdict line",
|
|
241
|
+
"artifact": true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "tableShape",
|
|
245
|
+
"file": "pr-review.md",
|
|
246
|
+
"requiredColumns": [
|
|
247
|
+
"Severity",
|
|
248
|
+
"File",
|
|
249
|
+
"Line",
|
|
250
|
+
"Finding",
|
|
251
|
+
"Recommendation"
|
|
252
|
+
],
|
|
253
|
+
"artifact": true
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
"onReject": "report",
|
|
257
|
+
"maxAttempts": 4
|
|
258
|
+
},
|
|
259
|
+
"next": "done"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"id": "done",
|
|
263
|
+
"name": "Deliver the verdict",
|
|
264
|
+
"description": "The complete-coverage report passed its gates. Summarize the verdict and point the user to the local evidence files.",
|
|
265
|
+
"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`, the per-batch observations are under `pr-review/`, and nothing was posted to GitHub. Then call `advance_task_step` to complete the task.",
|
|
266
|
+
"suggestedRole": "reviewer",
|
|
267
|
+
"terminal": true
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
"minGezelVersion": "1.26231",
|
|
271
|
+
"version": "1.7.1",
|
|
272
|
+
"releasedAt": "2026-08-19T00:00:00Z"
|
|
273
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Complete-corpus pull request review",
|
|
4
|
+
"objective": "Verify that Pull Request Review fans a chunk-readable PR corpus out to per-batch reviewers, merges their coverage shards into a complete run-wide ledger, verifies an API use against a late definition held by a different batch, 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
|
+
"fanout"
|
|
11
|
+
],
|
|
12
|
+
"prompt": "Review the deterministic large pull-request corpus completely. Publish the review batches, let the crew review them in parallel, merge the coverage shards, 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.",
|
|
13
|
+
"setup": {
|
|
14
|
+
"projectName": "Large PR Review Eval",
|
|
15
|
+
"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.",
|
|
16
|
+
"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.",
|
|
17
|
+
"files": [
|
|
18
|
+
{
|
|
19
|
+
"path": "src/api/use-assured-api.ts",
|
|
20
|
+
"content": "import { assuredApi } from './assured-api.js';\n\nexport function loadWidget(id: string): string {\n return assuredApi(id);\n}\n"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "src/api/assured-api.ts",
|
|
24
|
+
"content": "export function assuredApi(id: string): string {\n return `widget:${id}`;\n}\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "src/security/late-authorization.ts",
|
|
28
|
+
"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"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"worker": {
|
|
32
|
+
"name": "Rina",
|
|
33
|
+
"role": "Reviewer",
|
|
34
|
+
"description": "A careful code reviewer who works through large change sets in bounded batches and verifies cross-file claims."
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"mocks": [],
|
|
38
|
+
"success": {
|
|
39
|
+
"summary": "The batches are published, every batch shard merges into a 120-file ledger, the report recognizes that assuredApi exists, cites the late authorization defect, requests changes, and leaves the seeded source unchanged.",
|
|
40
|
+
"deliverables": [
|
|
41
|
+
{
|
|
42
|
+
"path": "pr-review.md",
|
|
43
|
+
"kind": "markdown-report",
|
|
44
|
+
"minBytes": 500,
|
|
45
|
+
"checks": [
|
|
46
|
+
{
|
|
47
|
+
"kind": "contains",
|
|
48
|
+
"file": "pr-review.md",
|
|
49
|
+
"pattern": "Coverage:\\s*120\\s*/\\s*120\\s+changed files",
|
|
50
|
+
"flags": "i"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"kind": "contains",
|
|
54
|
+
"file": "pr-review.md",
|
|
55
|
+
"pattern": "src/security/late-authorization\\.ts(?::|\\s*\\|\\s*)4",
|
|
56
|
+
"flags": "i"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "contains",
|
|
60
|
+
"file": "pr-review.md",
|
|
61
|
+
"pattern": "Verdict:\\s*request-changes",
|
|
62
|
+
"flags": "i"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"kind": "notContains",
|
|
66
|
+
"file": "pr-review.md",
|
|
67
|
+
"pattern": "assuredApi.{0,80}(missing|does not exist|undefined)|(?:missing|does not exist|undefined).{0,80}assuredApi",
|
|
68
|
+
"flags": "is"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"path": "pr-review-coverage.json",
|
|
74
|
+
"kind": "json",
|
|
75
|
+
"minBytes": 500
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"path": "pr-review/batches.json",
|
|
79
|
+
"kind": "json",
|
|
80
|
+
"minBytes": 500,
|
|
81
|
+
"checks": [
|
|
82
|
+
{
|
|
83
|
+
"kind": "contains",
|
|
84
|
+
"file": "pr-review/batches.json",
|
|
85
|
+
"pattern": "\"batchNumber\"[\\s\\S]*\"paths\"[\\s\\S]*\"records\""
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"unchangedFixtures": [
|
|
91
|
+
"src/api/use-assured-api.ts",
|
|
92
|
+
"src/api/assured-api.ts",
|
|
93
|
+
"src/security/late-authorization.ts"
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"rubric": {
|
|
97
|
+
"artifact": {
|
|
98
|
+
"path": "pr-review.md",
|
|
99
|
+
"kind": "markdown"
|
|
100
|
+
},
|
|
101
|
+
"axes": [
|
|
102
|
+
{
|
|
103
|
+
"name": "coverage",
|
|
104
|
+
"description": "The review demonstrates complete 120-file coverage across every batch rather than reasoning from an early prefix or from whichever shards happened to land first."
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "cross-file-verification",
|
|
108
|
+
"description": "The report does not allege that assuredApi is missing. Its definition sits in a different batch than its use, so a batch reviewer must verify against the checkout rather than against the records it was handed."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "late-defect",
|
|
112
|
+
"description": "The report finds and cites the authorization defect deliberately placed in the final changed file — the last batch is reviewed as carefully as the first."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "synthesis",
|
|
116
|
+
"description": "The final report draws on every per-batch observations shard, merging duplicate findings raised by different reviewers instead of dropping or double-listing them."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "side-effects",
|
|
120
|
+
"description": "The review remains local and source fixtures stay unchanged."
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"qualityFocus": [
|
|
125
|
+
"complete large-PR coverage",
|
|
126
|
+
"per-batch fanout and shard merging",
|
|
127
|
+
"cross-file API verification",
|
|
128
|
+
"late-file defect detection",
|
|
129
|
+
"safe local-only delivery"
|
|
130
|
+
],
|
|
131
|
+
"extensions": {
|
|
132
|
+
"legacySimulators": [
|
|
133
|
+
{
|
|
134
|
+
"id": "large-pr-artifact-corpus",
|
|
135
|
+
"kind": "data-source",
|
|
136
|
+
"status": "implemented",
|
|
137
|
+
"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."
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
package/package.json
CHANGED
|
@@ -430,7 +430,8 @@
|
|
|
430
430
|
"artifacts",
|
|
431
431
|
"project-memory",
|
|
432
432
|
"gezel-memory",
|
|
433
|
-
"shared"
|
|
433
|
+
"shared",
|
|
434
|
+
"knowledge"
|
|
434
435
|
]
|
|
435
436
|
}
|
|
436
437
|
}
|
|
@@ -3364,7 +3365,8 @@
|
|
|
3364
3365
|
"artifacts",
|
|
3365
3366
|
"project-memory",
|
|
3366
3367
|
"gezel-memory",
|
|
3367
|
-
"shared"
|
|
3368
|
+
"shared",
|
|
3369
|
+
"knowledge"
|
|
3368
3370
|
]
|
|
3369
3371
|
}
|
|
3370
3372
|
}
|
|
@@ -83,7 +83,8 @@
|
|
|
83
83
|
"artifacts",
|
|
84
84
|
"project-memory",
|
|
85
85
|
"gezel-memory",
|
|
86
|
-
"shared"
|
|
86
|
+
"shared",
|
|
87
|
+
"knowledge"
|
|
87
88
|
]
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -3011,7 +3012,8 @@
|
|
|
3011
3012
|
"artifacts",
|
|
3012
3013
|
"project-memory",
|
|
3013
3014
|
"gezel-memory",
|
|
3014
|
-
"shared"
|
|
3015
|
+
"shared",
|
|
3016
|
+
"knowledge"
|
|
3015
3017
|
]
|
|
3016
3018
|
}
|
|
3017
3019
|
}
|