@bendyline/gilde 0.3.0 → 0.3.1

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 (24) hide show
  1. package/authoring/tactical/wave.json +18 -18
  2. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/craftbook.json +736 -0
  3. package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/test.json +221 -0
  4. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/craftbook.json +607 -0
  5. package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/test.json +252 -0
  6. package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/craftbook.json +625 -0
  7. package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/test.json +235 -0
  8. package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/craftbook.json +720 -0
  9. package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/test.json +239 -0
  10. package/data/craftbook-templates/index.json +1 -1
  11. package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/craftbook.json +699 -0
  12. package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/test.json +235 -0
  13. package/data/craftbook-templates/raw-index.json +1 -1
  14. package/data/craftbook-templates/re/refactor-module/versions/2.0.6/craftbook.json +699 -0
  15. package/data/craftbook-templates/re/refactor-module/versions/2.0.6/test.json +241 -0
  16. package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/craftbook.json +626 -0
  17. package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/test.json +225 -0
  18. package/data/craftbook-templates/sh/ship/versions/1.1.4/craftbook.json +353 -0
  19. package/data/craftbook-templates/sh/ship/versions/1.1.4/test.json +235 -0
  20. package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/craftbook.json +596 -0
  21. package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/test.json +195 -0
  22. package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/craftbook.json +596 -0
  23. package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/test.json +221 -0
  24. package/package.json +1 -1
@@ -0,0 +1,235 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "mode": "workflow",
4
+ "title": "Ship workflow processability",
5
+ "objective": "Prove that a medium local model can parse and execute the Ship craftbook, satisfy its declared runtime gates, and reach a terminal step using only local fixtures.",
6
+ "tags": [
7
+ "external"
8
+ ],
9
+ "prompt": "Use the `ship` (Ship) craftbook for this self-contained local evaluation. Open `source/craftbook-eval-brief.md` first, then follow the craftbook's actual steps and gates through its terminal step. Complete this request: End-to-end release procedure for an already-published feature branch. Six normal\nsteps + one halt step the branches divert to on failure:\n\n1. **Preflight** — verify branch, clean tree, upstream, and commit scope\n2. **Run tests** — project's primary test command\n3. **Self-review pass** — last walk through the published diff\n4. **Open PR** — create the PR from the published branch\n5. **Wait for CI** — poll until green or failure\n6. **Summary** — final DONE\n7. **Halt** (branched target) — DONE_WITH_CONCERNS on any failure\n\nThe branches are the load-bearing piece. If tests fail, PR creation fails,\nCI fails, or the poll times out, the recipe routes to `halt` rather than\nblasting through. The upstream procedure encoded that safety property in\nimperative if/else; the craftbook schema makes it explicit.\n\nScripts:\n- `run-tests.ts` — wraps `run_package_script` with the right test command\n- `open-pr.ts` — calls `github_pr_create` for the already-published branch\n- `wait-checks.ts` — polls `github_check_status` until settled\n\n## Applicability\n\nThe craftbook declares two manifest-level `requirements` so the launcher\nand command registry only offer it where it can actually run:\n\n- **github** — the project must be connected to a GitHub repo (the\n `open-pr` and `wait-checks` scripts call `github_pr_create` /\n `github_check_status` directly; without a connected repo they cannot\n create or observe the pull request).\n- **non-main-branch** — the project's checkout must be on a branch\n other than `main` / `master`. Preflight re-checks this snapshot, requires\n a clean tree and an existing upstream, and stops instead of inventing a\n push capability when the branch has not yet been published.\n\nRequires the github toolset configured. Both gates evaluate via\n`unmetCraftbookRequirements` in `@bendyline/gezel` and are surfaced\nthrough `/api/projects/:id/craftbooks` so the Commands panel hides the\ncraftbook in projects that do not qualify rather than letting the user\nlaunch it and watch PR creation fail.\n Produce the concrete deliverables named in this request. Use only seeded project files and installed local simulators. Do not call a real external service, fetch live data, or claim an external side effect occurred; an explicit dry-run record is the correct result when a dependency is unavailable.",
10
+ "setup": {
11
+ "projectName": "Ship Workflow Eval",
12
+ "about": "A hermetic workflow evaluation for the Ship craftbook. No live dependency or external network is authorized.",
13
+ "missionObjectives": "Run the Ship craftbook end to end, use the local evaluation brief and fixtures as truth, produce its declared outputs, and reach a terminal step without fabricating external effects.",
14
+ "managedWorkspaceWritePolicy": "allow",
15
+ "files": [
16
+ {
17
+ "path": "source/craftbook-eval-brief.md",
18
+ "content": "# Ship — local evaluation brief\n\nThis is a hermetic processability evaluation of the `ship` craftbook.\nDo not contact real services, use real credentials, or fetch live data. Treat\nthe project fixtures and installed local simulators as authoritative. If a\ndependency is intentionally unavailable, document an honest dry run instead\nof claiming a real side effect.\n\n## Request\n\nEnd-to-end release procedure for an already-published feature branch. Six normal\nsteps + one halt step the branches divert to on failure:\n\n1. **Preflight** — verify branch, clean tree, upstream, and commit scope\n2. **Run tests** — project's primary test command\n3. **Self-review pass** — last walk through the published diff\n4. **Open PR** — create the PR from the published branch\n5. **Wait for CI** — poll until green or failure\n6. **Summary** — final DONE\n7. **Halt** (branched target) — DONE_WITH_CONCERNS on any failure\n\nThe branches are the load-bearing piece. If tests fail, PR creation fails,\nCI fails, or the poll times out, the recipe routes to `halt` rather than\nblasting through. The upstream procedure encoded that safety property in\nimperative if/else; the craftbook schema makes it explicit.\n\nScripts:\n- `run-tests.ts` — wraps `run_package_script` with the right test command\n- `open-pr.ts` — calls `github_pr_create` for the already-published branch\n- `wait-checks.ts` — polls `github_check_status` until settled\n\n## Applicability\n\nThe craftbook declares two manifest-level `requirements` so the launcher\nand command registry only offer it where it can actually run:\n\n- **github** — the project must be connected to a GitHub repo (the\n `open-pr` and `wait-checks` scripts call `github_pr_create` /\n `github_check_status` directly; without a connected repo they cannot\n create or observe the pull request).\n- **non-main-branch** — the project's checkout must be on a branch\n other than `main` / `master`. Preflight re-checks this snapshot, requires\n a clean tree and an existing upstream, and stops instead of inventing a\n push capability when the branch has not yet been published.\n\nRequires the github toolset configured. Both gates evaluate via\n`unmetCraftbookRequirements` in `@bendyline/gezel` and are surfaced\nthrough `/api/projects/:id/craftbooks` so the Commands panel hides the\ncraftbook in projects that do not qualify rather than letting the user\nlaunch it and watch PR creation fail.\n\n\n## Required workflow\n\n1. Preflight\n2. Run tests\n3. Self-review pass\n4. Open PR\n5. Wait for CI\n6. Summary (terminal)\n7. Halted (terminal)\n\n## Declared outputs\n\n- The concrete user-requested outputs named in the kickoff.\n"
19
+ },
20
+ {
21
+ "path": "fixtures/local-test-output.log",
22
+ "content": "$ npm test\nlint: pass\nunit: pass (42 tests)\nplaywright-smoke: pass\nduration: 18.4s"
23
+ }
24
+ ],
25
+ "craftbookParams": {
26
+ "branch": "chore/packing-count-export"
27
+ },
28
+ "worker": {
29
+ "name": "Craftbook Runner",
30
+ "role": "Workflow Operator",
31
+ "about": "Execute the assigned craftbook exactly. Read local fixtures, satisfy each runtime gate, record honest dry-run evidence for unavailable dependencies, and continue until a terminal step is active or the task is complete."
32
+ }
33
+ },
34
+ "mocks": [
35
+ {
36
+ "kind": "http",
37
+ "id": "github",
38
+ "description": "Fake GitHub API for the co-op/returns-desk repository. POST a pull request for branch chore/packing-count-export; GET it back by number.",
39
+ "credential": {
40
+ "name": "mock.github"
41
+ },
42
+ "routes": [
43
+ {
44
+ "method": "POST",
45
+ "path": "/repos/co-op/returns-desk/pulls",
46
+ "status": 201,
47
+ "body": {
48
+ "number": 42,
49
+ "state": "open",
50
+ "branch": "chore/packing-count-export",
51
+ "html_url": "https://fake.github.local/co-op/returns-desk/pull/42"
52
+ }
53
+ },
54
+ {
55
+ "method": "GET",
56
+ "path": "/repos/co-op/returns-desk/pulls/42",
57
+ "status": 200,
58
+ "body": {
59
+ "number": 42,
60
+ "state": "open",
61
+ "branch": "chore/packing-count-export",
62
+ "html_url": "https://fake.github.local/co-op/returns-desk/pull/42"
63
+ }
64
+ }
65
+ ]
66
+ },
67
+ {
68
+ "kind": "http",
69
+ "id": "ci",
70
+ "description": "Fake CI API. Poll GET /runs/pr-42 for the pipeline attached to the fake PR.",
71
+ "credential": {
72
+ "name": "mock.ci"
73
+ },
74
+ "routes": [
75
+ {
76
+ "method": "GET",
77
+ "path": "/runs/pr-42",
78
+ "status": 200,
79
+ "body": {
80
+ "run": "pr-42",
81
+ "status": "success",
82
+ "checks": [
83
+ {
84
+ "name": "lint",
85
+ "status": "success"
86
+ },
87
+ {
88
+ "name": "unit",
89
+ "status": "success"
90
+ },
91
+ {
92
+ "name": "playwright-smoke",
93
+ "status": "success"
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ "method": "GET",
100
+ "path": "/runs/*",
101
+ "status": 200,
102
+ "body": {
103
+ "status": "pending"
104
+ }
105
+ }
106
+ ]
107
+ },
108
+ {
109
+ "kind": "cli",
110
+ "id": "probe",
111
+ "description": "Provenance-trusted project script `ship-mock-probe` that exercises both fake services through http.authed and returns their raw responses.",
112
+ "shim": {
113
+ "path": "scripts/ship-mock-probe.ts",
114
+ "content": "import { defineScript, gezel } from '@bendyline/gezel-sdk';\n\nexport const meta = defineScript({\n name: 'ship-mock-probe',\n description:\n 'Probe the live fake GitHub/CI services for this eval: opens the fake PR for branch chore/packing-count-export and polls CI for run pr-42. Outputs the raw JSON responses for the ship report.',\n inputs: {},\n outputs: {\n pr: { type: 'string', description: 'Raw JSON body from the fake GitHub PR creation.' },\n ci: { type: 'string', description: 'Raw JSON body from the fake CI status poll.' },\n },\n requires: ['workspace.read', 'network', 'credential:mock.github', 'credential:mock.ci'],\n});\n\nconst services = JSON.parse(await gezel.fs.read('mocks/services.json'));\nconst base = (id) => {\n const service = services.find((entry) => entry.id === id);\n if (!service) throw new Error(`mock service \"${id}\" is not listed in mocks/services.json`);\n return service.baseUrl;\n};\n\nconst pr = await gezel.http.authed(`${base('github')}/repos/co-op/returns-desk/pulls`, {\n credential: 'mock.github',\n method: 'POST',\n body: JSON.stringify({ branch: 'chore/packing-count-export', title: 'Packing count export' }),\n});\nif (!pr.ok) throw new Error(`fake GitHub PR creation failed: ${pr.status} ${pr.body}`);\n\nconst ci = await gezel.http.authed(`${base('ci')}/runs/pr-42`, { credential: 'mock.ci' });\nif (!ci.ok) throw new Error(`fake CI poll failed: ${ci.status} ${ci.body}`);\n\ngezel.output({ pr: pr.body, ci: ci.body });\n"
115
+ }
116
+ }
117
+ ],
118
+ "success": {
119
+ "summary": "The attributed ship task satisfied its own gates, produced its declared outputs, and reached a terminal step without using external services.",
120
+ "deliverables": [
121
+ {
122
+ "path": "ship-report.md",
123
+ "kind": "markdown-report",
124
+ "minBytes": 1200,
125
+ "checks": [
126
+ {
127
+ "kind": "contains",
128
+ "file": "ship-report.md",
129
+ "pattern": "preflight|local tests|npm test",
130
+ "flags": "i"
131
+ },
132
+ {
133
+ "kind": "contains",
134
+ "file": "ship-report.md",
135
+ "pattern": "lint|unit|playwright-smoke",
136
+ "flags": "i"
137
+ },
138
+ {
139
+ "kind": "contains",
140
+ "file": "ship-report.md",
141
+ "pattern": "https://fake\\.github\\.local/co-op/returns-desk/pull/42"
142
+ },
143
+ {
144
+ "kind": "contains",
145
+ "file": "ship-report.md",
146
+ "pattern": "chore/packing-count-export"
147
+ },
148
+ {
149
+ "kind": "contains",
150
+ "file": "ship-report.md",
151
+ "pattern": "CI|checks|green|success",
152
+ "flags": "i"
153
+ },
154
+ {
155
+ "kind": "contains",
156
+ "file": "ship-report.md",
157
+ "pattern": "stop|failure|do not ship",
158
+ "flags": "i"
159
+ },
160
+ {
161
+ "kind": "notContains",
162
+ "file": "ship-report.md",
163
+ "pattern": "github\\.com|real remote|pushed to origin",
164
+ "flags": "i"
165
+ }
166
+ ]
167
+ },
168
+ {
169
+ "path": "fake-pr.json",
170
+ "kind": "json",
171
+ "minBytes": 180,
172
+ "checks": [
173
+ {
174
+ "kind": "contains",
175
+ "file": "fake-pr.json",
176
+ "pattern": "42"
177
+ },
178
+ {
179
+ "kind": "contains",
180
+ "file": "fake-pr.json",
181
+ "pattern": "chore/packing-count-export"
182
+ },
183
+ {
184
+ "kind": "contains",
185
+ "file": "fake-pr.json",
186
+ "pattern": "https://fake\\.github\\.local/co-op/returns-desk/pull/42"
187
+ }
188
+ ]
189
+ }
190
+ ],
191
+ "taskGraph": {
192
+ "requireCraftbookTask": true,
193
+ "requireTerminalStep": true
194
+ },
195
+ "mocks": [
196
+ {
197
+ "service": "github",
198
+ "minRequests": 1,
199
+ "requiredPaths": [
200
+ "^/repos/co-op/returns-desk/pulls"
201
+ ]
202
+ },
203
+ {
204
+ "service": "ci",
205
+ "minRequests": 1,
206
+ "requiredPaths": [
207
+ "^/runs/"
208
+ ]
209
+ }
210
+ ]
211
+ },
212
+ "rubric": {
213
+ "artifact": {
214
+ "path": "ship-report.md",
215
+ "kind": "markdown"
216
+ },
217
+ "axes": [
218
+ {
219
+ "name": "workflow fidelity",
220
+ "description": "The result reflects the named craftbook sequence and its declared acceptance gates rather than a freehand substitute."
221
+ },
222
+ {
223
+ "name": "usefulness",
224
+ "description": "The deliverable is coherent, actionable, and suitable for the craftbook purpose stated in the local brief."
225
+ }
226
+ ],
227
+ "contextNote": "Advisory only. Deterministic pass/fail comes from the craftbook runtime gates, deliverable existence, attribution, and terminal progress."
228
+ },
229
+ "qualityFocus": [
230
+ "real ship craftbook task attribution",
231
+ "declared runtime gate satisfaction",
232
+ "terminal workflow progress",
233
+ "offline fixture and simulator discipline"
234
+ ]
235
+ }