@bendyline/gilde 0.3.0 → 0.3.2

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.
Files changed (94) hide show
  1. package/authoring/tactical/wave.json +18 -18
  2. package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.5/craftbook.json +418 -0
  3. package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.5/test.json +196 -0
  4. package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.6/craftbook.json +432 -0
  5. package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.6/test.json +192 -0
  6. package/data/craftbook-templates/al/alert-rules/versions/1.0.5/craftbook.json +384 -0
  7. package/data/craftbook-templates/al/alert-rules/versions/1.0.5/test.json +145 -0
  8. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/craftbook.json +736 -0
  9. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/test.json +221 -0
  10. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.7/craftbook.json +799 -0
  11. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.7/test.json +221 -0
  12. package/data/craftbook-templates/ch/changelog-writeup/versions/1.0.3/craftbook.json +119 -0
  13. package/data/craftbook-templates/ch/changelog-writeup/versions/1.0.3/test.json +128 -0
  14. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/craftbook.json +607 -0
  15. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/test.json +252 -0
  16. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.6/craftbook.json +661 -0
  17. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.6/test.json +252 -0
  18. package/data/craftbook-templates/co/cohort-analysis/versions/1.0.5/craftbook.json +416 -0
  19. package/data/craftbook-templates/co/cohort-analysis/versions/1.0.5/test.json +238 -0
  20. package/data/craftbook-templates/co/content-accuracy-review/versions/1.1.2/craftbook.json +494 -0
  21. package/data/craftbook-templates/co/content-accuracy-review/versions/1.1.2/test.json +167 -0
  22. package/data/craftbook-templates/co/corpus-synthesis/versions/1.0.5/craftbook.json +419 -0
  23. package/data/craftbook-templates/co/corpus-synthesis/versions/1.0.5/test.json +172 -0
  24. package/data/craftbook-templates/cs/csv-transformer/versions/1.2.6/craftbook.json +285 -0
  25. package/data/craftbook-templates/cs/csv-transformer/versions/1.2.6/test.json +102 -0
  26. package/data/craftbook-templates/da/data-quality-audit/versions/1.0.5/craftbook.json +431 -0
  27. package/data/craftbook-templates/da/data-quality-audit/versions/1.0.5/test.json +348 -0
  28. package/data/craftbook-templates/de/deep-security-review/versions/1.1.5/craftbook.json +452 -0
  29. package/data/craftbook-templates/de/deep-security-review/versions/1.1.5/test.json +184 -0
  30. package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/craftbook.json +625 -0
  31. package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/test.json +235 -0
  32. package/data/craftbook-templates/di/digest-from-feeds/versions/1.0.6/craftbook.json +312 -0
  33. package/data/craftbook-templates/di/digest-from-feeds/versions/1.0.6/test.json +87 -0
  34. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.18/craftbook.json +702 -0
  35. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.18/test.json +191 -0
  36. package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/craftbook.json +720 -0
  37. package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/test.json +239 -0
  38. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.5/craftbook.json +480 -0
  39. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.5/test.json +176 -0
  40. package/data/craftbook-templates/in/investigate/versions/1.1.1/craftbook.json +85 -0
  41. package/data/craftbook-templates/in/investigate/versions/1.1.1/test.json +118 -0
  42. package/data/craftbook-templates/in/invoice-run/versions/1.1.9/craftbook.json +515 -0
  43. package/data/craftbook-templates/in/invoice-run/versions/1.1.9/test.json +140 -0
  44. package/data/craftbook-templates/index.json +1 -1
  45. package/data/craftbook-templates/ma/market-scan/versions/1.0.5/craftbook.json +480 -0
  46. package/data/craftbook-templates/ma/market-scan/versions/1.0.5/test.json +223 -0
  47. package/data/craftbook-templates/me/meeting-prep-brief/versions/1.0.5/craftbook.json +255 -0
  48. package/data/craftbook-templates/me/meeting-prep-brief/versions/1.0.5/test.json +140 -0
  49. package/data/craftbook-templates/mo/morning-brief/versions/1.0.6/craftbook.json +270 -0
  50. package/data/craftbook-templates/mo/morning-brief/versions/1.0.6/test.json +105 -0
  51. package/data/craftbook-templates/pe/perf-audit/versions/1.1.3/craftbook.json +320 -0
  52. package/data/craftbook-templates/pe/perf-audit/versions/1.1.3/test.json +94 -0
  53. package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/craftbook.json +699 -0
  54. package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/test.json +235 -0
  55. package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.19/craftbook.json +603 -0
  56. package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.19/test.json +266 -0
  57. package/data/craftbook-templates/pr/press-release/versions/1.0.6/craftbook.json +450 -0
  58. package/data/craftbook-templates/pr/press-release/versions/1.0.6/test.json +356 -0
  59. package/data/craftbook-templates/raw-index.json +1 -1
  60. package/data/craftbook-templates/re/refactor-module/versions/2.0.6/craftbook.json +699 -0
  61. package/data/craftbook-templates/re/refactor-module/versions/2.0.6/test.json +241 -0
  62. package/data/craftbook-templates/re/refactor-module/versions/2.0.7/craftbook.json +753 -0
  63. package/data/craftbook-templates/re/refactor-module/versions/2.0.7/test.json +241 -0
  64. package/data/craftbook-templates/re/release-notes/versions/1.0.6/craftbook.json +339 -0
  65. package/data/craftbook-templates/re/release-notes/versions/1.0.6/test.json +107 -0
  66. package/data/craftbook-templates/re/research-report/versions/1.0.6/craftbook.json +417 -0
  67. package/data/craftbook-templates/re/research-report/versions/1.0.6/test.json +183 -0
  68. package/data/craftbook-templates/ro/rollback-plan/versions/1.0.6/craftbook.json +319 -0
  69. package/data/craftbook-templates/ro/rollback-plan/versions/1.0.6/test.json +87 -0
  70. package/data/craftbook-templates/ru/runbook/versions/1.0.5/craftbook.json +491 -0
  71. package/data/craftbook-templates/ru/runbook/versions/1.0.5/test.json +118 -0
  72. package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/craftbook.json +626 -0
  73. package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/test.json +225 -0
  74. package/data/craftbook-templates/sh/ship/versions/1.1.4/craftbook.json +353 -0
  75. package/data/craftbook-templates/sh/ship/versions/1.1.4/test.json +235 -0
  76. package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/craftbook.json +596 -0
  77. package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/test.json +195 -0
  78. package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/craftbook.json +596 -0
  79. package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/test.json +221 -0
  80. package/data/craftbook-templates/we/week-plan/versions/1.0.5/craftbook.json +313 -0
  81. package/data/craftbook-templates/we/week-plan/versions/1.0.5/test.json +175 -0
  82. package/data/gezel-templates/im/image-editor/manifest.json +21 -0
  83. package/data/gezel-templates/im/image-editor/versions/1.0.0/about.md +17 -0
  84. package/data/gezel-templates/im/image-editor/versions/1.0.0/manifest.json +14 -0
  85. package/data/gezel-templates/index.json +1 -1
  86. package/data/gezel-templates/raw-index.json +1 -1
  87. package/data/image-models/fl/flux-2-klein-4b-q4/manifest.json +3 -0
  88. package/data/image-models/index.json +1 -1
  89. package/data/image-models/qw/qwen-image-edit-2511-q4/manifest.json +44 -0
  90. package/data/image-models/qw/qwen-image-edit-2511-q4/versions/1.0.0/manifest.json +36 -0
  91. package/data/image-models/raw-index.json +1 -1
  92. package/package.json +1 -1
  93. package/schemas/image-model-identity.schema.json +16 -0
  94. package/schemas/image-model-version.schema.json +1 -0
@@ -0,0 +1,195 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "title": "Test backfill proven by mutants",
4
+ "objective": "The craftbook drives a risk-ranked backfill of an untested date-range module. The oracle proves the new tests bite: three seeded mutations (an exclusive boundary, a duration off-by-one, overlap collapsed to containment) are applied in copies and the model's suite must fail at least two of them while staying green on the real tree — with the module under test byte-identical to the fixture.",
5
+ "tags": [
6
+ "code",
7
+ "tests",
8
+ "coverage",
9
+ "tactical-fleet"
10
+ ],
11
+ "prompt": "Use the Test Suite Backfill craftbook: src/date-range.js schedules bookings across the product and has no tests at all — tests/ only covers the formatter. Backfill a meaningful suite for the date-range module in the existing test layout, highest-risk behavior first: its bounds are inclusive on both ends and an inverted range must throw.",
12
+ "setup": {
13
+ "projectName": "Booking Ranges",
14
+ "about": "A tiny scheduling library. Tests run with `npm run test` (node --test). src/date-range.js is untested; src/format.js has an existing test that shows the layout and style.",
15
+ "files": [
16
+ {
17
+ "path": "package.json",
18
+ "content": "{\n \"name\": \"booking-ranges\",\n \"private\": true,\n \"version\": \"1.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"test\": \"node --test\"\n }\n}\n"
19
+ },
20
+ {
21
+ "path": "src/date-range.js",
22
+ "content": "// Inclusive [start, end] day ranges. Days are ISO strings like '2026-03-14'.\nconst DAY_MS = 86400000;\n\nfunction dayValue(day) {\n if (typeof day !== 'string' || !/^\\d{4}-\\d{2}-\\d{2}$/.test(day)) {\n throw new Error(`invalid day: ${day}`);\n }\n const value = Date.parse(`${day}T00:00:00Z`);\n if (Number.isNaN(value)) throw new Error(`invalid day: ${day}`);\n return value;\n}\n\nfunction assertRange(range) {\n const start = dayValue(range.start);\n const end = dayValue(range.end);\n if (start > end) {\n throw new Error(`invalid range: ${range.start} is after ${range.end}`);\n }\n return { start, end };\n}\n\nexport function overlaps(a, b) {\n const ra = assertRange(a);\n const rb = assertRange(b);\n return ra.start <= rb.end && rb.start <= ra.end;\n}\n\nexport function containsDay(range, day) {\n const r = assertRange(range);\n const d = dayValue(day);\n return d >= r.start && d <= r.end;\n}\n\nexport function durationDays(range) {\n const r = assertRange(range);\n return Math.round((r.end - r.start) / DAY_MS) + 1;\n}\n"
23
+ },
24
+ {
25
+ "path": "src/format.js",
26
+ "content": "export function slugify(text) {\n return String(text)\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '');\n}\n"
27
+ },
28
+ {
29
+ "path": "tests/format.test.mjs",
30
+ "content": "import assert from 'node:assert/strict';\nimport { test } from 'node:test';\nimport { slugify } from '../src/format.js';\n\ntest('slugify collapses spaces and punctuation', () => {\n assert.equal(slugify('Walnut writing desk!'), 'walnut-writing-desk');\n});\n\ntest('slugify trims stray dashes', () => {\n assert.equal(slugify(' --Oak shelf-- '), 'oak-shelf');\n});\n"
31
+ },
32
+ {
33
+ "path": "tests/verify-backfill.mjs",
34
+ "content": "import assert from 'node:assert/strict';\nimport { execFileSync } from 'node:child_process';\nimport { cpSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nconst root = process.cwd();\nconst ORACLE = 'verify-backfill.mjs';\n\n// Bare `node --test` discovery: finds tests/**/*.test.* from cwd and skips\n// dot-directories, so the .oracle-* mutant copies never leak into a run.\n// (A literal `--test tests/` directory argument no longer resolves on\n// modern Node - it is treated as a module path.)\nfunction runSuite(cwd) {\n try {\n execFileSync(process.execPath, ['--test'], { cwd, stdio: 'pipe', timeout: 30000 });\n return 0;\n } catch (err) {\n return typeof err.status === 'number' ? err.status : 1;\n }\n}\n\n// 1) New tests exist in the real layout and target the date-range module.\nconst testFiles = readdirSync(join(root, 'tests'), { recursive: true })\n .map(String)\n .filter((f) => /\\.test\\.(mjs|js|cjs)$/.test(f) && !f.endsWith('format.test.mjs'));\nassert.ok(testFiles.length >= 1, 'no new test file found in tests/');\nconst newTestText = testFiles.map((f) => readFileSync(join(root, 'tests', f), 'utf8')).join('\\n');\nassert.ok(/date-range/.test(newTestText), 'the new tests never reference the date-range module');\nconsole.log('BACKFILL_ORACLE new tests found');\n\n// 2) The suite is green on the real tree.\nassert.equal(runSuite(root), 0, 'the suite must pass on the real tree');\nconsole.log('BACKFILL_ORACLE suite green');\n\n// 3) Seeded defects in copies must make the new suite fail - proof the tests bite.\nconst source = readFileSync(join(root, 'src', 'date-range.js'), 'utf8');\nfunction mutantCaught(name, mutate) {\n const mroot = join(root, `.oracle-${name}`);\n rmSync(mroot, { recursive: true, force: true });\n mkdirSync(mroot, { recursive: true });\n cpSync(join(root, 'src'), join(mroot, 'src'), { recursive: true });\n cpSync(join(root, 'tests'), join(mroot, 'tests'), { recursive: true });\n rmSync(join(mroot, 'tests', ORACLE), { force: true });\n cpSync(join(root, 'package.json'), join(mroot, 'package.json'));\n const mutated = mutate(source);\n assert.notEqual(mutated, source, `mutation ${name} failed to apply - src/date-range.js was altered`);\n writeFileSync(join(mroot, 'src', 'date-range.js'), mutated);\n const caught = runSuite(mroot) !== 0;\n console.log(`BACKFILL_ORACLE mutant ${name} ${caught ? 'caught' : 'MISSED'}`);\n return caught;\n}\n\nconst caught = [\n mutantCaught('boundary', (s) => s.replace('rb.start <= ra.end', 'rb.start < ra.end')),\n mutantCaught('duration', (s) => s.replace('/ DAY_MS) + 1', '/ DAY_MS)')),\n mutantCaught('containment', (s) => s.replace('ra.start <= rb.end && rb.start <= ra.end', 'ra.start <= rb.start && rb.end <= ra.end')),\n].filter(Boolean).length;\nassert.ok(caught >= 2, `the new tests caught only ${caught}/3 seeded defects - they do not pin real behavior`);\nconsole.log(`BACKFILL_ORACLE mutants ${caught}/3`);\nconsole.log('BACKFILL_ORACLE done');\n",
35
+ "surface": "harness"
36
+ }
37
+ ]
38
+ },
39
+ "mocks": [],
40
+ "success": {
41
+ "summary": "New tests for the date-range module live in the real layout, the whole suite is green on the untouched tree, and the tests catch at least two of three seeded mutations — with every fleet artifact present and honestly cited.",
42
+ "deliverables": [
43
+ {
44
+ "path": "{{task.dir}}/risk-map.md",
45
+ "kind": "markdown-notes",
46
+ "artifact": true,
47
+ "minBytes": 500,
48
+ "checks": [
49
+ {
50
+ "kind": "contains",
51
+ "file": "{{task.dir}}/risk-map.md",
52
+ "pattern": "^##\\s+Modules[\\s\\S]*^##\\s+Risks ranked[\\s\\S]*^##\\s+Chosen targets",
53
+ "flags": "im",
54
+ "label": "risk-map sections in order"
55
+ },
56
+ {
57
+ "kind": "contains",
58
+ "file": "{{task.dir}}/risk-map.md",
59
+ "pattern": "src/date-range\\.js",
60
+ "label": "names the real target module"
61
+ },
62
+ {
63
+ "kind": "citationsResolve",
64
+ "file": "{{task.dir}}/risk-map.md",
65
+ "minCitations": 2,
66
+ "artifact": true
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "path": "{{task.dir}}/test-notes.md",
72
+ "kind": "markdown-notes",
73
+ "artifact": true,
74
+ "minBytes": 600,
75
+ "checks": [
76
+ {
77
+ "kind": "contains",
78
+ "file": "{{task.dir}}/test-notes.md",
79
+ "pattern": "^##\\s+Tests added[\\s\\S]*^##\\s+Behaviors pinned[\\s\\S]*^##\\s+How each test would catch a realistic break",
80
+ "flags": "im",
81
+ "label": "test-notes sections in order"
82
+ },
83
+ {
84
+ "kind": "citationsResolve",
85
+ "file": "{{task.dir}}/test-notes.md",
86
+ "minCitations": 2,
87
+ "artifact": true
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "path": "{{task.dir}}/verification.md",
93
+ "kind": "markdown-notes",
94
+ "artifact": true,
95
+ "minBytes": 400,
96
+ "checks": [
97
+ {
98
+ "kind": "contains",
99
+ "file": "{{task.dir}}/verification.md",
100
+ "pattern": "^##\\s+Suite[\\s\\S]*^##\\s+Coverage summary[\\s\\S]*^##\\s+Result",
101
+ "flags": "im",
102
+ "label": "verification sections in order"
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "path": "{{task.dir}}/review.md",
108
+ "kind": "markdown-report",
109
+ "artifact": true,
110
+ "minBytes": 400,
111
+ "checks": [
112
+ {
113
+ "kind": "contains",
114
+ "file": "{{task.dir}}/review.md",
115
+ "pattern": "Verdict:\\s*(?:PASS|REVISE)",
116
+ "flags": "i",
117
+ "label": "explicit reviewer verdict"
118
+ }
119
+ ]
120
+ }
121
+ ],
122
+ "checks": [
123
+ {
124
+ "kind": "nodeRuns",
125
+ "file": "tests/format.test.mjs"
126
+ },
127
+ {
128
+ "kind": "nodeScriptPasses",
129
+ "script": "tests/verify-backfill.mjs",
130
+ "timeoutMs": 120000,
131
+ "requiredOutput": [
132
+ {
133
+ "pattern": "BACKFILL_ORACLE new tests found",
134
+ "label": "new tests exist in the real layout"
135
+ },
136
+ {
137
+ "pattern": "BACKFILL_ORACLE suite green",
138
+ "label": "the whole suite passes on the real tree"
139
+ },
140
+ {
141
+ "pattern": "BACKFILL_ORACLE mutants [23]/3",
142
+ "label": "the new tests catch seeded defects"
143
+ }
144
+ ]
145
+ }
146
+ ],
147
+ "taskNotes": {
148
+ "minBytes": 120,
149
+ "checks": [
150
+ {
151
+ "kind": "contains",
152
+ "file": "task-notes.md",
153
+ "pattern": "\\bDONE\\b[\\s\\S]*(npm\\s+run\\s+test|node\\s+--test)",
154
+ "flags": "i",
155
+ "label": "DONE note names the real test command"
156
+ }
157
+ ]
158
+ },
159
+ "taskGraph": {
160
+ "requireCraftbookTask": true,
161
+ "requireTerminalStep": true
162
+ },
163
+ "unchangedFixtures": [
164
+ "package.json",
165
+ "src/date-range.js",
166
+ "src/format.js",
167
+ "tests/format.test.mjs"
168
+ ]
169
+ },
170
+ "rubric": {
171
+ "artifact": {
172
+ "path": "{{task.dir}}/test-notes.md",
173
+ "kind": "markdown"
174
+ },
175
+ "axes": [
176
+ {
177
+ "name": "Risk-driven targeting",
178
+ "description": "The tests pin the behaviors whose silent breakage costs most — inclusive bounds, duration arithmetic, the invalid-range throw — following the risk map rather than the easiest paths."
179
+ },
180
+ {
181
+ "name": "Tests that bite",
182
+ "description": "Each test asserts real values, errors, and edge cases a wrong implementation would fail; no tautologies, and seeded mutations to the module are actually caught."
183
+ },
184
+ {
185
+ "name": "Layout fidelity and honesty",
186
+ "description": "Tests follow the existing layout and style, the suite result comes from real runs, the module under test is untouched, and uncovered targets are deferred honestly."
187
+ }
188
+ ]
189
+ },
190
+ "qualityFocus": [
191
+ "mutation-proof regression guards",
192
+ "risk-ranked coverage",
193
+ "enforced review of assertions"
194
+ ]
195
+ }