@bendyline/gilde 0.1.40 → 0.1.42
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/gstack/overlays/investigate.json +1 -0
- package/authoring/gstack/overlays/qa-only.json +1 -0
- package/authoring/gstack/wave.json +12 -2
- package/authoring/tactical/books/accessibility-retrofit.json +188 -0
- package/authoring/tactical/books/apply-review-findings.json +189 -0
- package/authoring/tactical/books/bug-fix-tdd.json +237 -0
- package/authoring/tactical/books/ci-pipeline.json +168 -0
- package/authoring/tactical/books/codemod-sweep.json +182 -0
- package/authoring/tactical/books/dependency-upgrade.json +196 -0
- package/authoring/tactical/books/flaky-test-fix.json +238 -0
- package/authoring/tactical/books/hotfix-flow.json +187 -0
- package/authoring/tactical/books/perf-optimization.json +219 -0
- package/authoring/tactical/books/refactor-module.json +217 -0
- package/authoring/tactical/books/schema-migration.json +192 -0
- package/authoring/tactical/books/test-suite-backfill.json +172 -0
- package/authoring/tactical/books/type-safety-pass.json +185 -0
- package/authoring/tactical/books/ux-update.json +178 -0
- package/authoring/tactical/evals/accessibility-retrofit.json +230 -0
- package/authoring/tactical/evals/apply-review-findings.json +290 -0
- package/authoring/tactical/evals/bug-fix-tdd.json +221 -0
- package/authoring/tactical/evals/ci-pipeline.json +227 -0
- package/authoring/tactical/evals/codemod-sweep.json +252 -0
- package/authoring/tactical/evals/dependency-upgrade.json +235 -0
- package/authoring/tactical/evals/flaky-test-fix.json +239 -0
- package/authoring/tactical/evals/hotfix-flow.json +220 -0
- package/authoring/tactical/evals/perf-optimization.json +235 -0
- package/authoring/tactical/evals/refactor-module.json +241 -0
- package/authoring/tactical/evals/schema-migration.json +225 -0
- package/authoring/tactical/evals/test-suite-backfill.json +197 -0
- package/authoring/tactical/evals/type-safety-pass.json +221 -0
- package/authoring/tactical/evals/ux-update.json +206 -0
- package/authoring/tactical/wave.json +89 -0
- package/data/chat-models/de/deepseek-r1-8b-q4/manifest.json +56 -1
- package/data/chat-models/gl/glm-5.2-754b-q2/manifest.json +56 -0
- package/data/chat-models/gp/gpt-oss-120b-q4/manifest.json +73 -1
- package/data/chat-models/gp/gpt-oss-20b-q4/manifest.json +77 -1
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/ll/llama3.2-3b-q4/manifest.json +3 -1
- package/data/chat-models/mi/mistral-7b-q4/manifest.json +54 -3
- package/data/chat-models/mi/mistral-medium-3.5-128b-q4/manifest.json +76 -1
- package/data/craftbook-templates/ac/accessibility-retrofit/manifest.json +5 -4
- package/data/craftbook-templates/ac/accessibility-retrofit/versions/2.0.0/craftbook.json +451 -0
- package/data/craftbook-templates/ac/accessibility-retrofit/versions/2.0.0/test.json +231 -0
- package/data/craftbook-templates/al/alt-text-pass/manifest.json +5 -1
- package/data/craftbook-templates/ap/apply-review-findings/art.json +12 -0
- package/data/craftbook-templates/ap/apply-review-findings/logo.webp +0 -0
- package/data/craftbook-templates/ap/apply-review-findings/manifest.json +23 -0
- package/data/craftbook-templates/ap/apply-review-findings/versions/1.0.0/craftbook.json +436 -0
- package/data/craftbook-templates/ap/apply-review-findings/versions/1.0.0/test.json +291 -0
- package/data/craftbook-templates/br/browser-qa-audit/manifest.json +5 -1
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.5/craftbook.json +438 -0
- package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.5/test.json +379 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/manifest.json +3 -3
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.0/craftbook.json +545 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.0/test.json +222 -0
- package/data/craftbook-templates/ch/changelog-cut/manifest.json +5 -1
- package/data/craftbook-templates/ch/changelog-writeup/manifest.json +5 -1
- package/data/craftbook-templates/ci/ci-pipeline/manifest.json +5 -3
- package/data/craftbook-templates/ci/ci-pipeline/versions/2.0.0/craftbook.json +423 -0
- package/data/craftbook-templates/ci/ci-pipeline/versions/2.0.0/test.json +228 -0
- package/data/craftbook-templates/co/codemod-sweep/art.json +12 -0
- package/data/craftbook-templates/co/codemod-sweep/logo.webp +0 -0
- package/data/craftbook-templates/co/codemod-sweep/manifest.json +23 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.0/craftbook.json +441 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.0/test.json +253 -0
- package/data/craftbook-templates/de/dependency-upgrade/art.json +12 -0
- package/data/craftbook-templates/de/dependency-upgrade/logo.webp +0 -0
- package/data/craftbook-templates/de/dependency-upgrade/manifest.json +23 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.0/craftbook.json +459 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.0/test.json +236 -0
- package/data/craftbook-templates/fe/feature-flag-release/manifest.json +5 -1
- package/data/craftbook-templates/fe/feature-flag-rollout/manifest.json +4 -1
- package/data/craftbook-templates/fe/feature-flag-rollout/versions/1.1.0/craftbook.json +203 -0
- package/data/craftbook-templates/fe/feature-flag-rollout/versions/1.1.0/test.json +165 -0
- package/data/craftbook-templates/fl/flaky-test-fix/art.json +12 -0
- package/data/craftbook-templates/fl/flaky-test-fix/logo.webp +0 -0
- package/data/craftbook-templates/fl/flaky-test-fix/manifest.json +24 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.0/craftbook.json +534 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.0/test.json +240 -0
- package/data/craftbook-templates/ho/hotfix-flow/manifest.json +5 -3
- package/data/craftbook-templates/ho/hotfix-flow/versions/2.0.0/craftbook.json +442 -0
- package/data/craftbook-templates/ho/hotfix-flow/versions/2.0.0/test.json +221 -0
- package/data/craftbook-templates/in/investigate/manifest.json +4 -1
- package/data/craftbook-templates/in/investigate-root-cause/manifest.json +5 -1
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/li/live-browser-qa/manifest.json +5 -1
- package/data/craftbook-templates/ni/nightly-fix-sweep/art.json +12 -0
- package/data/craftbook-templates/ni/nightly-fix-sweep/logo.webp +0 -0
- package/data/craftbook-templates/ni/nightly-fix-sweep/manifest.json +23 -0
- package/data/craftbook-templates/ni/nightly-fix-sweep/versions/1.0.0/craftbook.json +145 -0
- package/data/craftbook-templates/ni/nightly-fix-sweep/versions/1.0.0/test.json +121 -0
- package/data/craftbook-templates/pe/perf-audit/versions/1.1.0/craftbook.json +195 -0
- package/data/craftbook-templates/pe/perf-audit/versions/1.1.0/test.json +165 -0
- package/data/craftbook-templates/pe/perf-optimization/manifest.json +3 -3
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.0/craftbook.json +511 -0
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.0/test.json +236 -0
- package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.4/test.json +0 -1
- package/data/craftbook-templates/pu/pull-request-review/versions/1.8.0/craftbook.json +304 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.8.0/test.json +144 -0
- package/data/craftbook-templates/qa/qa/manifest.json +3 -1
- package/data/craftbook-templates/re/refactor-module/manifest.json +2 -2
- package/data/craftbook-templates/re/refactor-module/versions/1.0.4/craftbook.json +150 -0
- package/data/craftbook-templates/re/refactor-module/versions/1.0.4/test.json +95 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.0/craftbook.json +509 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.0/test.json +242 -0
- package/data/craftbook-templates/re/release-notes/manifest.json +5 -1
- package/data/craftbook-templates/re/release-notes/versions/1.0.3/craftbook.json +220 -0
- package/data/craftbook-templates/re/release-notes/versions/1.0.3/test.json +114 -0
- package/data/craftbook-templates/re/release-pipeline-ci/manifest.json +5 -1
- package/data/craftbook-templates/re/release-readiness-review/versions/1.1.0/craftbook.json +192 -0
- package/data/craftbook-templates/re/release-readiness-review/versions/1.1.0/test.json +113 -0
- package/data/craftbook-templates/ro/root-cause-investigation/manifest.json +7 -1
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.5/craftbook.json +433 -0
- package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.5/test.json +157 -0
- package/data/craftbook-templates/sc/schema-migration/manifest.json +4 -4
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.0/craftbook.json +459 -0
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.0/test.json +226 -0
- package/data/craftbook-templates/te/test-coverage-review/versions/1.2.0/craftbook.json +195 -0
- package/data/craftbook-templates/te/test-coverage-review/versions/1.2.0/test.json +116 -0
- package/data/craftbook-templates/te/test-suite-backfill/manifest.json +1 -2
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.0/craftbook.json +428 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.0/test.json +198 -0
- package/data/craftbook-templates/ty/type-safety-pass/manifest.json +3 -3
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.0/craftbook.json +428 -0
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.0/test.json +222 -0
- package/data/craftbook-templates/ux/ux-update/art.json +12 -0
- package/data/craftbook-templates/ux/ux-update/logo.webp +0 -0
- package/data/craftbook-templates/ux/ux-update/manifest.json +22 -0
- package/data/craftbook-templates/ux/ux-update/versions/1.0.0/craftbook.json +439 -0
- package/data/craftbook-templates/ux/ux-update/versions/1.0.0/test.json +207 -0
- package/data/craftbook-templates/ve/version-bump/versions/1.1.0/craftbook.json +206 -0
- package/data/craftbook-templates/ve/version-bump/versions/1.1.0/test.json +95 -0
- package/data/gezel-templates/bo/boekwachter/versions/1.1.0/about.md +29 -0
- package/data/gezel-templates/bo/boekwachter/versions/1.1.0/manifest.json +16 -0
- package/data/gezel-templates/bu/builder/versions/1.5.0/about.md +34 -0
- package/data/gezel-templates/bu/builder/versions/1.5.0/manifest.json +16 -0
- package/data/gezel-templates/de/developer/versions/1.5.0/about.md +34 -0
- package/data/gezel-templates/de/developer/versions/1.5.0/manifest.json +21 -0
- package/data/gezel-templates/index.json +1 -1
- package/data/gezel-templates/re/reviewer/versions/1.4.0/about.md +49 -0
- package/data/gezel-templates/re/reviewer/versions/1.4.0/manifest.json +21 -0
- package/data/project-types/index.json +1 -1
- package/data/project-types/so/software-project/manifest.json +20 -0
- package/data/project-types/so/software-project/versions/1.0.0/about.md +3 -0
- package/data/project-types/so/software-project/versions/1.0.0/manifest.json +41 -0
- package/data/project-types/so/software-project/versions/1.0.0/mission.md +4 -0
- package/package.json +1 -1
- package/schemas/craftbook-doc.schema.json +248 -0
- package/schemas/craftbook-template-version.schema.json +248 -0
- package/schemas/craftbook-test.schema.json +200 -0
|
@@ -0,0 +1,144 @@
|
|
|
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, deterministically merges their exact coverage shards into a provenance-checked 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, let the runtime merge and provenance-check their coverage shards, verify the early API call against its late definition, find the late-file authorization defect, and write tasks/eval/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
|
+
"craftbookParams": {
|
|
37
|
+
"workPath": "tasks/eval"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"mocks": [],
|
|
41
|
+
"success": {
|
|
42
|
+
"summary": "The batches are published, every exact batch shard is deterministically merged into a provenance-stamped 120-file ledger, the report recognizes that assuredApi exists, cites the late authorization defect, requests changes, and leaves the seeded source unchanged.",
|
|
43
|
+
"deliverables": [
|
|
44
|
+
{
|
|
45
|
+
"path": "tasks/eval/pr-review.md",
|
|
46
|
+
"kind": "markdown-report",
|
|
47
|
+
"minBytes": 500,
|
|
48
|
+
"checks": [
|
|
49
|
+
{
|
|
50
|
+
"kind": "contains",
|
|
51
|
+
"file": "tasks/eval/pr-review.md",
|
|
52
|
+
"pattern": "Coverage:\\s*120\\s*/\\s*120\\s+changed files",
|
|
53
|
+
"flags": "i"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"kind": "contains",
|
|
57
|
+
"file": "tasks/eval/pr-review.md",
|
|
58
|
+
"pattern": "src/security/late-authorization\\.ts(?::|\\s*\\|\\s*)4",
|
|
59
|
+
"flags": "i"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"kind": "contains",
|
|
63
|
+
"file": "tasks/eval/pr-review.md",
|
|
64
|
+
"pattern": "Verdict:\\s*request-changes",
|
|
65
|
+
"flags": "i"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"kind": "notContains",
|
|
69
|
+
"file": "tasks/eval/pr-review.md",
|
|
70
|
+
"pattern": "assuredApi.{0,80}(missing|does not exist|undefined)|(?:missing|does not exist|undefined).{0,80}assuredApi",
|
|
71
|
+
"flags": "is"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"path": "tasks/eval/pr-review-coverage.json",
|
|
77
|
+
"kind": "json",
|
|
78
|
+
"minBytes": 500
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"path": "tasks/eval/pr-review/batches.json",
|
|
82
|
+
"kind": "json",
|
|
83
|
+
"minBytes": 500,
|
|
84
|
+
"checks": [
|
|
85
|
+
{
|
|
86
|
+
"kind": "contains",
|
|
87
|
+
"file": "tasks/eval/pr-review/batches.json",
|
|
88
|
+
"pattern": "\"batchNumber\"[\\s\\S]*\"paths\"[\\s\\S]*\"records\""
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"unchangedFixtures": [
|
|
94
|
+
"src/api/use-assured-api.ts",
|
|
95
|
+
"src/api/assured-api.ts",
|
|
96
|
+
"src/security/late-authorization.ts"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"rubric": {
|
|
100
|
+
"artifact": {
|
|
101
|
+
"path": "tasks/eval/pr-review.md",
|
|
102
|
+
"kind": "markdown"
|
|
103
|
+
},
|
|
104
|
+
"axes": [
|
|
105
|
+
{
|
|
106
|
+
"name": "coverage",
|
|
107
|
+
"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."
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"name": "cross-file-verification",
|
|
111
|
+
"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."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "late-defect",
|
|
115
|
+
"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."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "synthesis",
|
|
119
|
+
"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."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "side-effects",
|
|
123
|
+
"description": "The review remains local and source fixtures stay unchanged."
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"qualityFocus": [
|
|
128
|
+
"complete large-PR coverage",
|
|
129
|
+
"per-batch fanout and deterministic provenance-checked shard merging",
|
|
130
|
+
"cross-file API verification",
|
|
131
|
+
"late-file defect detection",
|
|
132
|
+
"safe local-only delivery"
|
|
133
|
+
],
|
|
134
|
+
"extensions": {
|
|
135
|
+
"legacySimulators": [
|
|
136
|
+
{
|
|
137
|
+
"id": "large-pr-artifact-corpus",
|
|
138
|
+
"kind": "data-source",
|
|
139
|
+
"status": "implemented",
|
|
140
|
+
"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."
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
"role": "maintenance-review",
|
|
6
6
|
"category": "code-quality",
|
|
7
7
|
"name": "Behavior-Preserving Refactor",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Restructure code without changing what it does, with proof at every stage: a green suite recorded before anything moves (characterization tests pinned first when coverage is thin), small reversible stages that keep the tests green, a re-measured structure target, and an enforced independent review.",
|
|
9
9
|
"tags": [
|
|
10
|
-
"gallery",
|
|
11
10
|
"refactor",
|
|
12
11
|
"cleanup",
|
|
13
12
|
"code-quality",
|
|
14
13
|
"maintainability",
|
|
14
|
+
"duplication",
|
|
15
15
|
"tests"
|
|
16
16
|
],
|
|
17
17
|
"maintainer": {
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "refactor-module",
|
|
3
|
+
"name": "Behavior-Preserving Refactor",
|
|
4
|
+
"description": "Refactor a module to improve its structure, readability, or design WITHOUT changing observable behavior — the defining constraint is that the tests stay green throughout. Plans the refactor FIRST — the target structure, the seams to introduce, the safe step sequence, and the green-tests guardrail — then refactors in small reversible steps, then a reviewer confirms behavior is unchanged and the code is genuinely cleaner. Covers extract-function/module, dependency seams, removing duplication, naming, and test-green-as-invariant refactoring.\n\nA gallery craftbook generated from an archetype spec. It runs\n`phase → (per-phase gate) → … → evaluate → (loop) → finish`. Each build\nphase that produces a checkable artifact is followed by a **runtime\ngate-checkpoint** — the runtime verifies the artifact and routes with no\nmodel turn, looping back to redo the phase on a miss. The final `evaluate`\nstep holds a static deliverable gate plus a reviewer QA pass. What it adds\nover the generic `build-loop`: a specialist role per phase, a\ndomain-correct ordering, and a concrete per-phase quality bar.\n\nDeliverables marked \"artifact\" land in the project's artifacts drawer (`write_artifact` / `read_artifact`), not the shipped workspace — review output is not product source.\n\nPhases:\n\n1. Plan the refactor (planner) — lock target structure, steps, green-tests guardrail → gated on artifact `{{workPath}}/plan.md` (markdown-notes)\n2. Refactor (developer) — apply small reversible steps, tests green throughout → gated on artifact `{{workPath}}/refactor.md` (markdown-notes)\n3. Verify behavior preserved (reviewer) — confirm tests green and code is genuinely cleaner → gated on artifact `{{workPath}}/verify.md` (markdown-notes)\n\nThe gates never advance with an unmet criterion, and loop back to the\nowning phase to fix named gaps.\n",
|
|
5
|
+
"entryStepId": "plan",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"refactor this module",
|
|
8
|
+
"clean up the code",
|
|
9
|
+
"improve code structure",
|
|
10
|
+
"behavior-preserving refactor",
|
|
11
|
+
"reduce duplication"
|
|
12
|
+
],
|
|
13
|
+
"paramSchema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"properties": {
|
|
16
|
+
"workPath": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"title": "Working folder",
|
|
19
|
+
"description": "Per-task working folder in the artifacts drawer. Defaults to this task's own folder so runs never collide; override with a stable name when you deliberately want runs to share files.",
|
|
20
|
+
"default": "{{task.dir}}"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"steps": [
|
|
25
|
+
{
|
|
26
|
+
"id": "plan",
|
|
27
|
+
"name": "Plan the refactor",
|
|
28
|
+
"description": "lock target structure, steps, green-tests guardrail",
|
|
29
|
+
"prompt": "Plan the refactor before touching code — the prime directive is preserving behavior. Step 1: Identify the specific smells (duplication, long function, tangled responsibilities, poor names) and the target structure you want. Step 2: Confirm there is a test safety net; if coverage is thin, note the characterization tests to add FIRST so behavior is pinned before changing structure. Step 3: Break the work into small, individually-reversible steps (extract this function, introduce this seam, rename that), each of which keeps tests green. Step 4: Write a numbered acceptance-criteria checklist of 5-9 items (e.g. 'all existing tests pass before and after', 'public API/behavior is unchanged', 'the targeted duplication is gone', 'no function exceeds N lines / responsibilities are separated'). `write_task_note` the plan + checklist and write the same to the produces path.\n\nThe deliverable `{{workPath}}/plan.md` lands in the project's artifacts drawer — write it with `write_artifact` and read it back with `read_artifact`; the shipped workspace stays untouched.",
|
|
30
|
+
"suggestedRole": "planner",
|
|
31
|
+
"advanceWhen": {
|
|
32
|
+
"file": "{{workPath}}/plan.md",
|
|
33
|
+
"minBytes": 1,
|
|
34
|
+
"sniff": "nonempty",
|
|
35
|
+
"artifact": true
|
|
36
|
+
},
|
|
37
|
+
"gate": {
|
|
38
|
+
"at": "completion",
|
|
39
|
+
"checks": [
|
|
40
|
+
{
|
|
41
|
+
"kind": "minBytes",
|
|
42
|
+
"file": "{{workPath}}/plan.md",
|
|
43
|
+
"bytes": 120,
|
|
44
|
+
"artifact": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "sniff",
|
|
48
|
+
"file": "{{workPath}}/plan.md",
|
|
49
|
+
"sniff": "nonempty",
|
|
50
|
+
"artifact": true
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"onReject": "plan",
|
|
54
|
+
"maxAttempts": 3
|
|
55
|
+
},
|
|
56
|
+
"next": "refactor"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "refactor",
|
|
60
|
+
"name": "Refactor",
|
|
61
|
+
"description": "apply small reversible steps, tests green throughout",
|
|
62
|
+
"prompt": "Execute the refactor in small steps, keeping the tests green the entire time. The code changes happen IN PLACE in the module's existing files — there is no separate output file for the code. Step 1: If the plan called for characterization tests, add them first and confirm they pass against current behavior. Step 2: Apply one planned step at a time — extract, rename, dedupe, introduce a seam — and run the tests after EACH step; if a step breaks them, revert it and try smaller. Step 3: Do not change public signatures or observable behavior unless the plan explicitly says so. Step 4: Stop when the target structure is reached and the smells are gone. Write the refactor summary (which files changed, what changed structurally, tests still green) to the produces path. On a loop-back, address only the reviewer's points. `write_task_note` the summary and which criteria now pass.\n\nThe deliverable `{{workPath}}/refactor.md` lands in the project's artifacts drawer — write it with `write_artifact` and read it back with `read_artifact`; the shipped workspace stays untouched.",
|
|
63
|
+
"suggestedRole": "developer",
|
|
64
|
+
"advanceWhen": {
|
|
65
|
+
"file": "{{workPath}}/refactor.md",
|
|
66
|
+
"minBytes": 1,
|
|
67
|
+
"sniff": "nonempty",
|
|
68
|
+
"artifact": true
|
|
69
|
+
},
|
|
70
|
+
"gate": {
|
|
71
|
+
"at": "completion",
|
|
72
|
+
"checks": [
|
|
73
|
+
{
|
|
74
|
+
"kind": "minBytes",
|
|
75
|
+
"file": "{{workPath}}/refactor.md",
|
|
76
|
+
"bytes": 120,
|
|
77
|
+
"artifact": true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"kind": "sniff",
|
|
81
|
+
"file": "{{workPath}}/refactor.md",
|
|
82
|
+
"sniff": "nonempty",
|
|
83
|
+
"artifact": true
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"onReject": "refactor",
|
|
87
|
+
"maxAttempts": 3
|
|
88
|
+
},
|
|
89
|
+
"next": "verify"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"id": "verify",
|
|
93
|
+
"name": "Verify behavior preserved",
|
|
94
|
+
"description": "confirm tests green and code is genuinely cleaner",
|
|
95
|
+
"prompt": "Verify the refactor preserved behavior and actually improved the code. Step 1: Run the full test suite and confirm it is green (this is the hard gate). Step 2: Confirm the public API/observable behavior is identical to before. Step 3: Confirm the targeted smell is actually fixed — the duplication is gone, the function is decomposed, names are clearer — not just moved around. Step 4: Confirm no behavior was sneaked in under cover of the refactor. Write a verification note with the test result and a before/after readability assessment to the produces path.\n\nThe deliverable `{{workPath}}/verify.md` lands in the project's artifacts drawer — write it with `write_artifact` and read it back with `read_artifact`; the shipped workspace stays untouched.",
|
|
96
|
+
"suggestedRole": "reviewer",
|
|
97
|
+
"advanceWhen": {
|
|
98
|
+
"file": "{{workPath}}/verify.md",
|
|
99
|
+
"minBytes": 1,
|
|
100
|
+
"sniff": "nonempty",
|
|
101
|
+
"artifact": true
|
|
102
|
+
},
|
|
103
|
+
"gate": {
|
|
104
|
+
"at": "completion",
|
|
105
|
+
"checks": [
|
|
106
|
+
{
|
|
107
|
+
"kind": "minBytes",
|
|
108
|
+
"file": "{{workPath}}/verify.md",
|
|
109
|
+
"bytes": 120,
|
|
110
|
+
"artifact": true
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"kind": "sniff",
|
|
114
|
+
"file": "{{workPath}}/verify.md",
|
|
115
|
+
"sniff": "nonempty",
|
|
116
|
+
"artifact": true
|
|
117
|
+
}
|
|
118
|
+
],
|
|
119
|
+
"onReject": "verify",
|
|
120
|
+
"maxAttempts": 4
|
|
121
|
+
},
|
|
122
|
+
"next": "evaluate"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"id": "evaluate",
|
|
126
|
+
"name": "Evaluate",
|
|
127
|
+
"description": "Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap.",
|
|
128
|
+
"prompt": "Run the test suite. For EACH acceptance criterion: confirm ALL existing tests pass (green is mandatory), confirm public behavior is unchanged, confirm the targeted smell is genuinely fixed, and confirm no new behavior crept in. Write PASS/FAIL per criterion; a single failing test is an automatic FAIL of the whole refactor.\n\nThe deliverable lives in the project's artifacts drawer — open `{{workPath}}/verify.md` with `read_artifact`, not `read_file`.\n\nThen route — this is the whole point of the loop:\n\n- **Every criterion PASSES →** call `advance_task_step({ ref, stepId: \"evaluate\", next: \"finish\" })`.\n- **Any criterion FAILS →** write the specific gaps to notes, then call `advance_task_step({ ref, stepId: \"evaluate\", next: \"refactor\" })` to loop back. The builder fixes exactly those gaps.\n\nNever route to `finish` while any criterion is unmet. The build phase's completion gate already blocked a grossly-incomplete deliverable; your job is the judgment an automated check cannot make (does it actually work, read well, look right). After ~3 unproductive loops, stop and report DONE_WITH_CONCERNS so the user can step in.",
|
|
129
|
+
"suggestedRole": "reviewer",
|
|
130
|
+
"consumes": [
|
|
131
|
+
{
|
|
132
|
+
"file": "{{workPath}}/verify.md",
|
|
133
|
+
"artifact": true
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"next": "refactor"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"id": "finish",
|
|
140
|
+
"name": "Finish",
|
|
141
|
+
"description": "All acceptance criteria met. Stamp a short summary and report DONE.",
|
|
142
|
+
"prompt": "Every acceptance criterion passed. Write a one-paragraph DONE summary to task notes via `write_task_note`: what was built, the deliverable path(s), and a one-line confirmation that each criterion is met. Then report DONE.",
|
|
143
|
+
"suggestedRole": "developer",
|
|
144
|
+
"terminal": true
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"version": "1.0.4",
|
|
148
|
+
"releasedAt": "2026-08-24T00:00:00Z",
|
|
149
|
+
"minGezelVersion": "1.26233"
|
|
150
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Behavior-Preserving Refactor smoke eval",
|
|
4
|
+
"objective": "Self-contained smoke eval for the Behavior-Preserving Refactor craftbook using the code generic harness.",
|
|
5
|
+
"tags": [
|
|
6
|
+
"code"
|
|
7
|
+
],
|
|
8
|
+
"prompt": "We need a small Node helper for this — the requirments are in source/requirements.md. Put it in src/solution.mjs.",
|
|
9
|
+
"setup": {
|
|
10
|
+
"projectName": "Behavior-Preserving Refactor Eval",
|
|
11
|
+
"about": "Self-contained eval project for refactor-module. Seeded inputs are under workspace/source or workspace/fixtures; final deliverable is workspace/src/solution.mjs.",
|
|
12
|
+
"missionObjectives": "Use the Behavior-Preserving Refactor craftbook/template, read the seeded local fixtures, and write src/solution.mjs without network calls, real credentials, or live services.",
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "source/brief.md",
|
|
16
|
+
"content": "# Behavior-Preserving Refactor Eval Brief\n\nClient: Boreal Desk, a home-office accessories company.\nAudience: operations leads who need an artifact they can use this week.\n\nFixed source facts for grounding:\n- The returns desk pilot covered 18 SKUs.\n- Median first response improved from 18 hours to 6 hours.\n- Preventable refund leakage fell from 14.2% to 8.9%.\n- The top unresolved complaint is status silence after photo submission.\n- Required next actions are automated status emails, barcode-exception training, and a weekly Finance exception export.\n\nUse these facts when the task asks for prose, analysis, copy, UI content, or test data. Do not use live web services, real credentials, or current outside data.\n\nCraftbook under test: refactor-module - Behavior-Preserving Refactor.\n"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"path": "source/requirements.md",
|
|
20
|
+
"content": "# Runner Requirements\n\nBuild a dependency-free Node ESM helper for Boreal Desk support operations. Export at least one function. Include a tiny self-test section using node:assert or an equivalent assertion helper. Use fixture values for 18 -> 6 hour response time and 14.2 -> 8.9 refund leakage.\n"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"worker": {
|
|
24
|
+
"name": "Jules",
|
|
25
|
+
"role": "Developer"
|
|
26
|
+
},
|
|
27
|
+
"craftbookParams": {
|
|
28
|
+
"workPath": "tasks/eval"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"mocks": [],
|
|
32
|
+
"success": {
|
|
33
|
+
"summary": "src/solution.mjs is a local ESM module with basic self-test scaffolding.",
|
|
34
|
+
"deliverables": [
|
|
35
|
+
{
|
|
36
|
+
"path": "src/solution.mjs",
|
|
37
|
+
"kind": "code-with-tests",
|
|
38
|
+
"minBytes": 1500,
|
|
39
|
+
"checks": [
|
|
40
|
+
{
|
|
41
|
+
"kind": "esmImports",
|
|
42
|
+
"file": "src/solution.mjs"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"kind": "contains",
|
|
46
|
+
"file": "src/solution.mjs",
|
|
47
|
+
"pattern": "export\\s+(function|const|class)|export\\s*\\{",
|
|
48
|
+
"flags": "i"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"kind": "contains",
|
|
52
|
+
"file": "src/solution.mjs",
|
|
53
|
+
"pattern": "assert|test|describe|it|expect",
|
|
54
|
+
"flags": "i"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"kind": "contains",
|
|
58
|
+
"file": "src/solution.mjs",
|
|
59
|
+
"pattern": "18|6|14\\.2|8\\.9|Boreal",
|
|
60
|
+
"flags": "i"
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"rubric": {
|
|
67
|
+
"artifact": {
|
|
68
|
+
"path": "src/solution.mjs",
|
|
69
|
+
"kind": "typescript"
|
|
70
|
+
},
|
|
71
|
+
"axes": [
|
|
72
|
+
{
|
|
73
|
+
"name": "correctness",
|
|
74
|
+
"description": "The module does what the requirements ask, with sensible edge handling."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "verification",
|
|
78
|
+
"description": "Self-tests exercise real behavior, not trivial truths."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "clarity",
|
|
82
|
+
"description": "Exports, naming, and structure make the module usable without reading every line."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "robustness",
|
|
86
|
+
"description": "Invalid input and boundary cases fail loudly rather than silently."
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"qualityFocus": [
|
|
91
|
+
"runnable ESM",
|
|
92
|
+
"test scaffolding",
|
|
93
|
+
"local fixtures"
|
|
94
|
+
]
|
|
95
|
+
}
|