@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.
- package/authoring/tactical/wave.json +18 -18
- package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.5/craftbook.json +418 -0
- package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.5/test.json +196 -0
- package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.6/craftbook.json +432 -0
- package/data/craftbook-templates/ab/ab-test-readout/versions/1.0.6/test.json +192 -0
- package/data/craftbook-templates/al/alert-rules/versions/1.0.5/craftbook.json +384 -0
- package/data/craftbook-templates/al/alert-rules/versions/1.0.5/test.json +145 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/craftbook.json +736 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.6/test.json +221 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.7/craftbook.json +799 -0
- package/data/craftbook-templates/bu/bug-fix-tdd/versions/2.0.7/test.json +221 -0
- package/data/craftbook-templates/ch/changelog-writeup/versions/1.0.3/craftbook.json +119 -0
- package/data/craftbook-templates/ch/changelog-writeup/versions/1.0.3/test.json +128 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/craftbook.json +607 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.5/test.json +252 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.6/craftbook.json +661 -0
- package/data/craftbook-templates/co/codemod-sweep/versions/1.0.6/test.json +252 -0
- package/data/craftbook-templates/co/cohort-analysis/versions/1.0.5/craftbook.json +416 -0
- package/data/craftbook-templates/co/cohort-analysis/versions/1.0.5/test.json +238 -0
- package/data/craftbook-templates/co/content-accuracy-review/versions/1.1.2/craftbook.json +494 -0
- package/data/craftbook-templates/co/content-accuracy-review/versions/1.1.2/test.json +167 -0
- package/data/craftbook-templates/co/corpus-synthesis/versions/1.0.5/craftbook.json +419 -0
- package/data/craftbook-templates/co/corpus-synthesis/versions/1.0.5/test.json +172 -0
- package/data/craftbook-templates/cs/csv-transformer/versions/1.2.6/craftbook.json +285 -0
- package/data/craftbook-templates/cs/csv-transformer/versions/1.2.6/test.json +102 -0
- package/data/craftbook-templates/da/data-quality-audit/versions/1.0.5/craftbook.json +431 -0
- package/data/craftbook-templates/da/data-quality-audit/versions/1.0.5/test.json +348 -0
- package/data/craftbook-templates/de/deep-security-review/versions/1.1.5/craftbook.json +452 -0
- package/data/craftbook-templates/de/deep-security-review/versions/1.1.5/test.json +184 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/craftbook.json +625 -0
- package/data/craftbook-templates/de/dependency-upgrade/versions/1.0.6/test.json +235 -0
- package/data/craftbook-templates/di/digest-from-feeds/versions/1.0.6/craftbook.json +312 -0
- package/data/craftbook-templates/di/digest-from-feeds/versions/1.0.6/test.json +87 -0
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.18/craftbook.json +702 -0
- package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.18/test.json +191 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/craftbook.json +720 -0
- package/data/craftbook-templates/fl/flaky-test-fix/versions/1.0.5/test.json +239 -0
- package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.5/craftbook.json +480 -0
- package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.5/test.json +176 -0
- package/data/craftbook-templates/in/investigate/versions/1.1.1/craftbook.json +85 -0
- package/data/craftbook-templates/in/investigate/versions/1.1.1/test.json +118 -0
- package/data/craftbook-templates/in/invoice-run/versions/1.1.9/craftbook.json +515 -0
- package/data/craftbook-templates/in/invoice-run/versions/1.1.9/test.json +140 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/ma/market-scan/versions/1.0.5/craftbook.json +480 -0
- package/data/craftbook-templates/ma/market-scan/versions/1.0.5/test.json +223 -0
- package/data/craftbook-templates/me/meeting-prep-brief/versions/1.0.5/craftbook.json +255 -0
- package/data/craftbook-templates/me/meeting-prep-brief/versions/1.0.5/test.json +140 -0
- package/data/craftbook-templates/mo/morning-brief/versions/1.0.6/craftbook.json +270 -0
- package/data/craftbook-templates/mo/morning-brief/versions/1.0.6/test.json +105 -0
- package/data/craftbook-templates/pe/perf-audit/versions/1.1.3/craftbook.json +320 -0
- package/data/craftbook-templates/pe/perf-audit/versions/1.1.3/test.json +94 -0
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/craftbook.json +699 -0
- package/data/craftbook-templates/pe/perf-optimization/versions/2.0.5/test.json +235 -0
- package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.19/craftbook.json +603 -0
- package/data/craftbook-templates/po/powerpoint-deck/versions/1.7.19/test.json +266 -0
- package/data/craftbook-templates/pr/press-release/versions/1.0.6/craftbook.json +450 -0
- package/data/craftbook-templates/pr/press-release/versions/1.0.6/test.json +356 -0
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/re/refactor-module/versions/2.0.6/craftbook.json +699 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.6/test.json +241 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.7/craftbook.json +753 -0
- package/data/craftbook-templates/re/refactor-module/versions/2.0.7/test.json +241 -0
- package/data/craftbook-templates/re/release-notes/versions/1.0.6/craftbook.json +339 -0
- package/data/craftbook-templates/re/release-notes/versions/1.0.6/test.json +107 -0
- package/data/craftbook-templates/re/research-report/versions/1.0.6/craftbook.json +417 -0
- package/data/craftbook-templates/re/research-report/versions/1.0.6/test.json +183 -0
- package/data/craftbook-templates/ro/rollback-plan/versions/1.0.6/craftbook.json +319 -0
- package/data/craftbook-templates/ro/rollback-plan/versions/1.0.6/test.json +87 -0
- package/data/craftbook-templates/ru/runbook/versions/1.0.5/craftbook.json +491 -0
- package/data/craftbook-templates/ru/runbook/versions/1.0.5/test.json +118 -0
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/craftbook.json +626 -0
- package/data/craftbook-templates/sc/schema-migration/versions/2.0.5/test.json +225 -0
- package/data/craftbook-templates/sh/ship/versions/1.1.4/craftbook.json +353 -0
- package/data/craftbook-templates/sh/ship/versions/1.1.4/test.json +235 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/craftbook.json +596 -0
- package/data/craftbook-templates/te/test-suite-backfill/versions/2.0.6/test.json +195 -0
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/craftbook.json +596 -0
- package/data/craftbook-templates/ty/type-safety-pass/versions/2.0.5/test.json +221 -0
- package/data/craftbook-templates/we/week-plan/versions/1.0.5/craftbook.json +313 -0
- package/data/craftbook-templates/we/week-plan/versions/1.0.5/test.json +175 -0
- package/data/gezel-templates/im/image-editor/manifest.json +21 -0
- package/data/gezel-templates/im/image-editor/versions/1.0.0/about.md +17 -0
- package/data/gezel-templates/im/image-editor/versions/1.0.0/manifest.json +14 -0
- package/data/gezel-templates/index.json +1 -1
- package/data/gezel-templates/raw-index.json +1 -1
- package/data/image-models/fl/flux-2-klein-4b-q4/manifest.json +3 -0
- package/data/image-models/index.json +1 -1
- package/data/image-models/qw/qwen-image-edit-2511-q4/manifest.json +44 -0
- package/data/image-models/qw/qwen-image-edit-2511-q4/versions/1.0.0/manifest.json +36 -0
- package/data/image-models/raw-index.json +1 -1
- package/package.json +1 -1
- package/schemas/image-model-identity.schema.json +16 -0
- package/schemas/image-model-version.schema.json +1 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"title": "Counted tightening of seeded unsafe patterns",
|
|
4
|
+
"objective": "The craftbook drives a counted type-safety pass over a module with three seeded unsafe patterns and their real consequences: a loose-equality guard that lets 0 through, an implicit string-number concat corrupting a total, and a swallowed catch hiding data loss. Verified mechanically: the patterns are structurally gone, the three behavioral consequences are fixed by probes, the suite is green, and the fleet artifacts quote honest before/after counts.",
|
|
5
|
+
"tags": [
|
|
6
|
+
"code",
|
|
7
|
+
"type-safety",
|
|
8
|
+
"tactical-fleet"
|
|
9
|
+
],
|
|
10
|
+
"prompt": "Use the Type-Safety Pass craftbook for this: src/expenses.js has unsafe patterns with real consequences - splitting across zero people returns Infinity, string amounts silently corrupt the running total, and corrupt imports vanish without a trace. The brief is in source/cleanup-brief.md. Tighten the module and fix those three consequences without breaking the pinned happy-path behavior.",
|
|
11
|
+
"setup": {
|
|
12
|
+
"projectName": "Expense Tracker",
|
|
13
|
+
"about": "A tiny expense-tracking module. Tests run with `npm run test` (node --test).",
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "package.json",
|
|
17
|
+
"content": "{\n \"name\": \"expense-tracker\",\n \"private\": true,\n \"version\": \"1.0.0\",\n \"type\": \"module\",\n \"scripts\": {\n \"test\": \"node --test\"\n }\n}\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "src/expenses.js",
|
|
21
|
+
"content": "const DEFAULT_CATEGORY = 'general';\n\nexport function splitEvenly(total, people) {\n if (people == null) throw new Error('people required');\n return Math.round((total / people) * 100) / 100;\n}\n\nexport function addExpense(report, entry) {\n report.total = report.total + entry.amount;\n report.entries.push({\n label: entry.label,\n amount: entry.amount,\n category: entry.category || DEFAULT_CATEGORY,\n });\n return report;\n}\n\nexport function importEntry(report, json) {\n try {\n const entry = JSON.parse(json);\n return addExpense(report, entry);\n } catch (err) {\n return report;\n }\n}\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "tests/expenses.test.mjs",
|
|
25
|
+
"content": "import assert from 'node:assert/strict';\nimport { test } from 'node:test';\nimport { addExpense, importEntry, splitEvenly } from '../src/expenses.js';\n\ntest('splits evenly with rounding', () => {\n assert.equal(splitEvenly(100, 4), 25);\n assert.equal(splitEvenly(100, 3), 33.33);\n});\n\ntest('adds numeric expenses', () => {\n const report = { total: 0, entries: [] };\n addExpense(report, { label: 'lunch', amount: 12 });\n assert.equal(report.total, 12);\n assert.equal(report.entries.length, 1);\n});\n\ntest('imports a valid entry', () => {\n const report = { total: 0, entries: [] };\n importEntry(report, '{\"label\":\"bus\",\"amount\":3}');\n assert.equal(report.entries.length, 1);\n});\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "source/cleanup-brief.md",
|
|
29
|
+
"content": "# Cleanup brief\n\nsrc/expenses.js has unsafe patterns with three consequences we can reproduce:\n\n1. `splitEvenly(100, 0)` returns `Infinity` - the loose `== null` guard lets `0` through. Splitting across zero people must throw, exactly like a missing count.\n2. Legacy JSON entries sometimes carry `amount` as a numeric string like `\"12.50\"`. `addExpense` then concatenates instead of adding and the running total silently becomes a string like `\"1012.50\"`. A string amount must be treated as the number it spells, and a total must always stay a number.\n3. `importEntry` swallows every parse error, so a corrupt import vanishes without a trace - we lost a day of expenses to this once. A corrupt import must throw, not return as if nothing happened.\n\nTighten the module: strict checks instead of loose equality, validate or normalize values at the boundary they cross, surface errors instead of swallowing them. Happy-path behavior pinned by the tests must not change. Do not silence anything to make a count fall.\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "tests/verify-expenses.mjs",
|
|
33
|
+
"content": "import assert from 'node:assert/strict';\nimport { execFileSync } from 'node:child_process';\nimport { readFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport { addExpense, importEntry, splitEvenly } from '../src/expenses.js';\n\n// 1) Structural: the seeded unsafe patterns are gone from the module.\nconst source = readFileSync(join(process.cwd(), 'src', 'expenses.js'), 'utf8');\nassert.ok(\n !/(^|[^=!<>])==[^=]|!=[^=]/.test(source),\n 'loose equality is still present in src/expenses.js',\n);\nassert.ok(\n !/catch[^{]*\\{\\s*\\}/.test(source),\n 'an empty catch still swallows errors in src/expenses.js',\n);\nassert.ok(\n !/@ts-ignore|@ts-expect-error|eslint-disable/.test(source),\n 'a suppression comment was introduced to move a count',\n);\nconsole.log('TYPE_SAFETY_PASS_ORACLE patterns gone');\n\n// 2) Behavior: the three declared consequences are fixed, happy path preserved.\nassert.equal(splitEvenly(100, 4), 25);\nassert.equal(splitEvenly(100, 3), 33.33);\nassert.throws(() => splitEvenly(100, 0), undefined, 'zero people must be rejected, not Infinity');\nassert.throws(() => splitEvenly(100, null));\nassert.throws(() => splitEvenly(100, undefined));\n\nconst stringAmounts = { total: 10, entries: [] };\naddExpense(stringAmounts, { label: 'taxi', amount: '12.50' });\nassert.equal(stringAmounts.total, 22.5, 'a string amount must be treated as the number it spells');\nassert.equal(typeof stringAmounts.total, 'number', 'the running total must stay a number');\n\nconst numeric = { total: 0, entries: [] };\naddExpense(numeric, { label: 'lunch', amount: 12 });\nassert.equal(numeric.total, 12);\n\nconst report = { total: 0, entries: [] };\nassert.throws(() => importEntry(report, 'not json {'), undefined, 'a corrupt import must throw, not vanish');\nimportEntry(report, '{\"label\":\"bus\",\"amount\":\"3.25\"}');\nassert.equal(report.total, 3.25);\nassert.equal(report.entries.length, 1);\nconsole.log('TYPE_SAFETY_PASS_ORACLE behavior ok');\n\n// 3) The whole suite is green after the pass (real run).\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}\nassert.equal(runSuite(process.cwd()), 0, 'the suite must be green after the pass');\nconsole.log('TYPE_SAFETY_PASS_ORACLE suite green');\nconsole.log('TYPE_SAFETY_PASS_ORACLE done');\n",
|
|
34
|
+
"surface": "harness"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"craftbookParams": {
|
|
38
|
+
"scope": "Tighten src/expenses.js: fix the loose-equality zero bug in splitEvenly, the string-amount concat bug in addExpense, and the swallowed catch in importEntry, per source/cleanup-brief.md."
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"mocks": [],
|
|
42
|
+
"success": {
|
|
43
|
+
"summary": "The seeded unsafe patterns are structurally gone, the three declared behavioral consequences are fixed (probes), the suite is green on a real run, and the fleet artifacts quote honest before/after counts gathered by the same method.",
|
|
44
|
+
"deliverables": [
|
|
45
|
+
{
|
|
46
|
+
"path": "{{task.dir}}/audit.md",
|
|
47
|
+
"kind": "markdown-notes",
|
|
48
|
+
"artifact": true,
|
|
49
|
+
"minBytes": 600,
|
|
50
|
+
"checks": [
|
|
51
|
+
{
|
|
52
|
+
"kind": "contains",
|
|
53
|
+
"file": "{{task.dir}}/audit.md",
|
|
54
|
+
"pattern": "^##\\s+Inventory[\\s\\S]*^##\\s+Targets[\\s\\S]*^##\\s+Guardrail",
|
|
55
|
+
"flags": "im",
|
|
56
|
+
"label": "audit sections in order"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "contains",
|
|
60
|
+
"file": "{{task.dir}}/audit.md",
|
|
61
|
+
"pattern": "^##\\s+Inventory[\\s\\S]*\\d",
|
|
62
|
+
"flags": "im",
|
|
63
|
+
"label": "inventory carries counts"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"kind": "citationsResolve",
|
|
67
|
+
"file": "{{task.dir}}/audit.md",
|
|
68
|
+
"minCitations": 2,
|
|
69
|
+
"artifact": true
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"path": "{{task.dir}}/change-notes.md",
|
|
75
|
+
"kind": "markdown-notes",
|
|
76
|
+
"artifact": true,
|
|
77
|
+
"minBytes": 600,
|
|
78
|
+
"checks": [
|
|
79
|
+
{
|
|
80
|
+
"kind": "contains",
|
|
81
|
+
"file": "{{task.dir}}/change-notes.md",
|
|
82
|
+
"pattern": "^##\\s+Patterns addressed[\\s\\S]*^##\\s+Files touched[\\s\\S]*^##\\s+Deviations",
|
|
83
|
+
"flags": "im",
|
|
84
|
+
"label": "change-notes sections in order"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"kind": "citationsResolve",
|
|
88
|
+
"file": "{{task.dir}}/change-notes.md",
|
|
89
|
+
"minCitations": 2,
|
|
90
|
+
"artifact": true
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"path": "{{task.dir}}/verification.md",
|
|
96
|
+
"kind": "markdown-notes",
|
|
97
|
+
"artifact": true,
|
|
98
|
+
"minBytes": 400,
|
|
99
|
+
"checks": [
|
|
100
|
+
{
|
|
101
|
+
"kind": "contains",
|
|
102
|
+
"file": "{{task.dir}}/verification.md",
|
|
103
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*^##\\s+Suite[\\s\\S]*^##\\s+Result",
|
|
104
|
+
"flags": "im",
|
|
105
|
+
"label": "verification sections in order"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"kind": "contains",
|
|
109
|
+
"file": "{{task.dir}}/verification.md",
|
|
110
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*\\d",
|
|
111
|
+
"flags": "im",
|
|
112
|
+
"label": "before/after counts quoted"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"path": "{{task.dir}}/review.md",
|
|
118
|
+
"kind": "markdown-report",
|
|
119
|
+
"artifact": true,
|
|
120
|
+
"minBytes": 400,
|
|
121
|
+
"checks": [
|
|
122
|
+
{
|
|
123
|
+
"kind": "contains",
|
|
124
|
+
"file": "{{task.dir}}/review.md",
|
|
125
|
+
"pattern": "Verdict:\\s*(?:PASS|REVISE)",
|
|
126
|
+
"flags": "i",
|
|
127
|
+
"label": "explicit reviewer verdict"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"checks": [
|
|
133
|
+
{
|
|
134
|
+
"kind": "notContains",
|
|
135
|
+
"file": "src/expenses.js",
|
|
136
|
+
"pattern": "(^|[^=!<>])==[^=]|!=[^=]",
|
|
137
|
+
"label": "loose equality is gone from the module"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"kind": "notContains",
|
|
141
|
+
"file": "src/expenses.js",
|
|
142
|
+
"pattern": "catch[^{]*\\{\\s*\\}",
|
|
143
|
+
"label": "no empty catch swallows errors"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"kind": "notContains",
|
|
147
|
+
"file": "src/expenses.js",
|
|
148
|
+
"pattern": "@ts-ignore|@ts-expect-error|eslint-disable",
|
|
149
|
+
"label": "no suppression comment bought the improvement"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"kind": "sourceParses",
|
|
153
|
+
"file": "src/expenses.js"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"kind": "nodeScriptPasses",
|
|
157
|
+
"script": "tests/verify-expenses.mjs",
|
|
158
|
+
"timeoutMs": 60000,
|
|
159
|
+
"requiredOutput": [
|
|
160
|
+
{
|
|
161
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE patterns gone",
|
|
162
|
+
"label": "seeded unsafe patterns structurally gone"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE behavior ok",
|
|
166
|
+
"label": "the three declared consequences are fixed"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE suite green",
|
|
170
|
+
"label": "suite green after the pass"
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
|
+
],
|
|
175
|
+
"taskNotes": {
|
|
176
|
+
"minBytes": 120,
|
|
177
|
+
"checks": [
|
|
178
|
+
{
|
|
179
|
+
"kind": "contains",
|
|
180
|
+
"file": "task-notes.md",
|
|
181
|
+
"pattern": "\\bDONE\\b[\\s\\S]*(npm\\s+run\\s+test|node\\s+--test)",
|
|
182
|
+
"flags": "i",
|
|
183
|
+
"label": "DONE note names the real test command"
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
"taskGraph": {
|
|
188
|
+
"requireCraftbookTask": true,
|
|
189
|
+
"requireTerminalStep": true
|
|
190
|
+
},
|
|
191
|
+
"unchangedFixtures": [
|
|
192
|
+
"source/cleanup-brief.md",
|
|
193
|
+
"package.json"
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
"rubric": {
|
|
197
|
+
"artifact": {
|
|
198
|
+
"path": "{{task.dir}}/verification.md",
|
|
199
|
+
"kind": "markdown"
|
|
200
|
+
},
|
|
201
|
+
"axes": [
|
|
202
|
+
{
|
|
203
|
+
"name": "Honest counting",
|
|
204
|
+
"description": "The audit counted real patterns with a stated, repeatable method, and verification re-counted with exactly that method, quoting before and after per pattern - no method swap, no adjectives standing in for counts."
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "No suppression",
|
|
208
|
+
"description": "Every count fell because the code got stronger: strict checks, boundary validation, surfaced errors - never a deleted assertion, silenced error path, cast, or ignore-comment."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"name": "Consequence-fix discipline",
|
|
212
|
+
"description": "The three declared consequences were fixed and named in the notes, happy-path behavior stayed pinned and green with real receipts, and anything unverified is labeled honestly."
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
"qualityFocus": [
|
|
217
|
+
"counts with their method",
|
|
218
|
+
"no suppression-by-cast",
|
|
219
|
+
"enforced review loop"
|
|
220
|
+
]
|
|
221
|
+
}
|
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "week-plan",
|
|
3
|
+
"name": "Plan the Week",
|
|
4
|
+
"description": "Start Monday with the week already shaped: every meeting seen, the ones needing prep flagged, the conflicts and overload called out, and real focus blocks defended — a plan you made once, on purpose, instead of a calendar you react to all week. Locks the week's events and the planning rules FIRST, then shapes the days, then writes the plan with its prep queue. Use for weekly planning, monday morning planning, 'what does my week look like', calendar reviews, and defending focus time.\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. Scope the week (planner) — the week's events, the flags, the planning rules locked → gated on artifact `{{workPath}}/scope.md` (markdown-notes)\n2. Shape the days (planner) — day-by-day plan, focus blocks placed, conflicts resolved on paper → gated on artifact `{{workPath}}/plan.md` (markdown-notes)\n3. Write the week plan (copywriter) — the Monday-morning page: days, prep queue, conflicts and calls → gated on artifact `{{workPath}}/report.md` (markdown-report)\n\nThe gates never advance with an unmet criterion, and loop back to the\nowning phase to fix named gaps.\n",
|
|
5
|
+
"entryStepId": "scope",
|
|
6
|
+
"triggers": [
|
|
7
|
+
"plan the week",
|
|
8
|
+
"plan my week",
|
|
9
|
+
"what does my week look like",
|
|
10
|
+
"monday planning",
|
|
11
|
+
"set up the week"
|
|
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": "scope",
|
|
27
|
+
"name": "Scope the week",
|
|
28
|
+
"description": "the week's events, the flags, the planning rules locked",
|
|
29
|
+
"prompt": "Define the week before shaping a single day. Step 1: read every event in the week. A synced calendar lives in the project artifacts under `data/`: call `list_artifacts` on `data/` (each subfolder is one synced source, and its `_meta.json` names it), then open the event records with `read_artifact`. Each record is one event: `title`, `date` and `end` in its frontmatter (UTC instants; give times in the record's `timezone`), `location`, `organizer`, `attendees`, and the agenda in the body (an empty body means nobody wrote one). With no synced calendar, read calendar.json in the workspace; with neither, say so and never invent an event. Then read followups.json for the open follow-ups carried into this week. Step 2: sweep the events for what needs attention: meetings with no agenda or unclear purpose (they need prep), pairs that overlap or butt against each other with no gap, and days so full that real work cannot happen. Step 3: lock the planning rules — every meeting that needs prep gets flagged with what to prepare, every conflict gets named with a proposed resolution, focus blocks get placed on the emptier days, and open follow-ups land on specific days. Step 4: write an acceptance-criteria checklist ('every event this week appears in the plan', 'each prep-needed meeting is flagged with what to prepare', 'every conflict named with a proposed fix', 'focus blocks placed in real gaps', 'the load picture is honest — no day pretends to have room it lacks'). Call write_task_note with the event count + flags + checklist and write {{workPath}}/scope.md. No planning yet.\n\nThe deliverable `{{workPath}}/scope.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}}/scope.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}}/scope.md",
|
|
43
|
+
"bytes": 120,
|
|
44
|
+
"artifact": true
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"kind": "sniff",
|
|
48
|
+
"file": "{{workPath}}/scope.md",
|
|
49
|
+
"sniff": "nonempty",
|
|
50
|
+
"artifact": true
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"onReject": "scope",
|
|
54
|
+
"maxAttempts": 3
|
|
55
|
+
},
|
|
56
|
+
"next": "plan",
|
|
57
|
+
"toolPolicy": {
|
|
58
|
+
"disallowBuiltinToolsets": [
|
|
59
|
+
"ai-apps",
|
|
60
|
+
"archives",
|
|
61
|
+
"audio",
|
|
62
|
+
"browser-automation",
|
|
63
|
+
"code-execution",
|
|
64
|
+
"craftbooks",
|
|
65
|
+
"data-tables",
|
|
66
|
+
"entity-intel",
|
|
67
|
+
"git",
|
|
68
|
+
"image-intel",
|
|
69
|
+
"images",
|
|
70
|
+
"role-delegation",
|
|
71
|
+
"role-delegation-escalation",
|
|
72
|
+
"security-intel",
|
|
73
|
+
"team-management",
|
|
74
|
+
"videos",
|
|
75
|
+
"web",
|
|
76
|
+
"workspace-fs-write"
|
|
77
|
+
],
|
|
78
|
+
"outputMedium": "artifact",
|
|
79
|
+
"additionalOutputMedia": [
|
|
80
|
+
"task-note"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "plan",
|
|
86
|
+
"name": "Shape the days",
|
|
87
|
+
"description": "day-by-day plan, focus blocks placed, conflicts resolved on paper",
|
|
88
|
+
"prompt": "Shape the week day by day against the locked rules. Step 1: lay out Monday through Friday — each day's meetings in order, with the gaps visible. Step 2: place the focus blocks into the real gaps, the biggest work into the biggest gap, and mark them as commitments, not leftovers. Step 3: for each flagged meeting, note what the prep is and which earlier day the prep happens. Step 4: resolve the conflicts on paper — which meeting moves, shortens, or gets a delegate — as a concrete proposal the owner can act on with one decision each. Step 5: distribute the open follow-ups onto specific days that have room for them. Write the day-by-day plan to {{workPath}}/plan.md and call write_task_note with the shape of the week in one line per day.\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.",
|
|
89
|
+
"suggestedRole": "planner",
|
|
90
|
+
"advanceWhen": {
|
|
91
|
+
"file": "{{workPath}}/plan.md",
|
|
92
|
+
"minBytes": 1,
|
|
93
|
+
"sniff": "nonempty",
|
|
94
|
+
"artifact": true
|
|
95
|
+
},
|
|
96
|
+
"gate": {
|
|
97
|
+
"at": "completion",
|
|
98
|
+
"checks": [
|
|
99
|
+
{
|
|
100
|
+
"kind": "minBytes",
|
|
101
|
+
"file": "{{workPath}}/plan.md",
|
|
102
|
+
"bytes": 120,
|
|
103
|
+
"artifact": true
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"kind": "sniff",
|
|
107
|
+
"file": "{{workPath}}/plan.md",
|
|
108
|
+
"sniff": "nonempty",
|
|
109
|
+
"artifact": true
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"onReject": "plan",
|
|
113
|
+
"maxAttempts": 3
|
|
114
|
+
},
|
|
115
|
+
"next": "report",
|
|
116
|
+
"toolPolicy": {
|
|
117
|
+
"disallowBuiltinToolsets": [
|
|
118
|
+
"ai-apps",
|
|
119
|
+
"archives",
|
|
120
|
+
"audio",
|
|
121
|
+
"browser-automation",
|
|
122
|
+
"code-execution",
|
|
123
|
+
"craftbooks",
|
|
124
|
+
"data-tables",
|
|
125
|
+
"entity-intel",
|
|
126
|
+
"git",
|
|
127
|
+
"image-intel",
|
|
128
|
+
"images",
|
|
129
|
+
"role-delegation",
|
|
130
|
+
"role-delegation-escalation",
|
|
131
|
+
"security-intel",
|
|
132
|
+
"videos",
|
|
133
|
+
"web",
|
|
134
|
+
"workspace-fs-write"
|
|
135
|
+
],
|
|
136
|
+
"outputMedium": "artifact",
|
|
137
|
+
"additionalOutputMedia": [
|
|
138
|
+
"task-note"
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"id": "report",
|
|
144
|
+
"name": "Write the week plan",
|
|
145
|
+
"description": "the Monday-morning page: days, prep queue, conflicts and calls",
|
|
146
|
+
"prompt": "Write the week plan the owner reads Monday morning. Step 1: open with the week in one honest paragraph — how heavy it is, where the crunch lands, where the room is. Step 2: the day-by-day plan — each weekday with its meetings, focus blocks, and follow-ups, readable at a glance. Step 3: the prep queue — every meeting needing prep, what to prepare, and the day the prep is scheduled. Step 4: the conflicts and calls — each overlap with its proposed fix, so resolving them is one decision each, not a puzzle. Step 5: keep it one page and warm; this is a plan made once, on purpose. Write {{workPath}}/report.md and call write_task_note with the focus-block count and the prep-queue length.\n\nThe deliverable `{{workPath}}/report.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.\n\nIf the task notes hold a review of an earlier pass, fix exactly the gaps it names and keep everything that already passed.",
|
|
147
|
+
"suggestedRole": "copywriter",
|
|
148
|
+
"advanceWhen": {
|
|
149
|
+
"file": "{{workPath}}/report.md",
|
|
150
|
+
"minBytes": 1,
|
|
151
|
+
"sniff": "nonempty",
|
|
152
|
+
"artifact": true
|
|
153
|
+
},
|
|
154
|
+
"gate": {
|
|
155
|
+
"at": "completion",
|
|
156
|
+
"checks": [
|
|
157
|
+
{
|
|
158
|
+
"kind": "minBytes",
|
|
159
|
+
"file": "{{workPath}}/report.md",
|
|
160
|
+
"bytes": 1500,
|
|
161
|
+
"artifact": true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"kind": "contains",
|
|
165
|
+
"file": "{{workPath}}/report.md",
|
|
166
|
+
"pattern": "(?:^|\\n)#{1,3}\\s+\\S",
|
|
167
|
+
"flags": "i",
|
|
168
|
+
"label": "at least one markdown heading",
|
|
169
|
+
"artifact": true
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"onReject": "report",
|
|
173
|
+
"maxAttempts": 4
|
|
174
|
+
},
|
|
175
|
+
"next": "evaluate",
|
|
176
|
+
"toolPolicy": {
|
|
177
|
+
"disallowBuiltinToolsets": [
|
|
178
|
+
"ai-apps",
|
|
179
|
+
"archives",
|
|
180
|
+
"audio",
|
|
181
|
+
"browser-automation",
|
|
182
|
+
"code-execution",
|
|
183
|
+
"craftbooks",
|
|
184
|
+
"data-tables",
|
|
185
|
+
"entity-intel",
|
|
186
|
+
"git",
|
|
187
|
+
"image-intel",
|
|
188
|
+
"images",
|
|
189
|
+
"role-delegation",
|
|
190
|
+
"role-delegation-escalation",
|
|
191
|
+
"security-intel",
|
|
192
|
+
"team-management",
|
|
193
|
+
"videos",
|
|
194
|
+
"web",
|
|
195
|
+
"workspace-fs-write"
|
|
196
|
+
],
|
|
197
|
+
"outputMedium": "artifact",
|
|
198
|
+
"additionalOutputMedia": [
|
|
199
|
+
"task-note"
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"id": "evaluate",
|
|
205
|
+
"name": "Evaluate",
|
|
206
|
+
"description": "Grade the deliverable against every acceptance criterion. All pass → finish; any fail → loop back and fix the gap.",
|
|
207
|
+
"prompt": "Open {{workPath}}/report.md and {{workPath}}/plan.md and verify every criterion from {{workPath}}/scope.md: every event in the week's calendar appears in the plan (count them against the events you read), each prep-needed meeting carries a concrete prep note scheduled on an earlier day, every conflict is named with a proposed resolution, focus blocks sit in real gaps on the page, follow-ups have landed on specific days, and the load picture is honest. Write PASS/FAIL per criterion; on any failure, name the gap and loop back to report.\n\nThe deliverable lives in the project's artifacts drawer — open `{{workPath}}/report.md` with `read_artifact`, not `read_file`.\n\nThen record your verdict — this is the whole point of the loop:\n\n1. If any criterion fails, first write the specific gaps to the task notes with `write_task_note`: which file, which part, and what is missing. The \"Write the week plan\" step reads them when it fixes the work.\n2. When you have graded every criterion, write `{{workPath}}/verdict.md` with `write_artifact`. One line per criterion and no preamble: the criterion, its one-line reason, then PASS or FAIL as the last word on the line. Writing verdict.md completes this step.\n\nThe runtime routes on the verdict: every line PASS moves the task to \"Finish\"; any FAIL sends it back to \"Write the week plan\" to fix those gaps, and a review that keeps failing pauses the task for the user. Mark a criterion PASS only when it is met. 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).",
|
|
208
|
+
"suggestedRole": "reviewer",
|
|
209
|
+
"consumes": [
|
|
210
|
+
{
|
|
211
|
+
"file": "{{workPath}}/report.md",
|
|
212
|
+
"artifact": true
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"advanceWhen": {
|
|
216
|
+
"file": "{{workPath}}/verdict.md",
|
|
217
|
+
"minBytes": 40,
|
|
218
|
+
"sniff": "nonempty",
|
|
219
|
+
"artifact": true
|
|
220
|
+
},
|
|
221
|
+
"gate": {
|
|
222
|
+
"at": "completion",
|
|
223
|
+
"checks": [
|
|
224
|
+
{
|
|
225
|
+
"kind": "contains",
|
|
226
|
+
"file": "{{workPath}}/verdict.md",
|
|
227
|
+
"pattern": "(?<!/\\s*)\\bPASS\\b(?!\\s*/)",
|
|
228
|
+
"label": "the verdict marks its criteria PASS",
|
|
229
|
+
"artifact": true
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"kind": "notContains",
|
|
233
|
+
"file": "{{workPath}}/verdict.md",
|
|
234
|
+
"pattern": "(?<!/\\s*)\\bFAIL\\b(?!\\s*/)",
|
|
235
|
+
"label": "no criterion is marked FAIL",
|
|
236
|
+
"artifact": true
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"onReject": "report",
|
|
240
|
+
"maxAttempts": 3
|
|
241
|
+
},
|
|
242
|
+
"next": "finish",
|
|
243
|
+
"toolPolicy": {
|
|
244
|
+
"disallowBuiltinToolsets": [
|
|
245
|
+
"ai-apps",
|
|
246
|
+
"archives",
|
|
247
|
+
"audio",
|
|
248
|
+
"browser-automation",
|
|
249
|
+
"code-execution",
|
|
250
|
+
"craftbooks",
|
|
251
|
+
"data-tables",
|
|
252
|
+
"entity-intel",
|
|
253
|
+
"git",
|
|
254
|
+
"image-intel",
|
|
255
|
+
"images",
|
|
256
|
+
"role-delegation",
|
|
257
|
+
"role-delegation-escalation",
|
|
258
|
+
"security-intel",
|
|
259
|
+
"team-management",
|
|
260
|
+
"videos",
|
|
261
|
+
"web",
|
|
262
|
+
"workspace-fs-write"
|
|
263
|
+
],
|
|
264
|
+
"outputMedium": "artifact",
|
|
265
|
+
"additionalOutputMedia": [
|
|
266
|
+
"task-note"
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "finish",
|
|
272
|
+
"name": "Finish",
|
|
273
|
+
"description": "All acceptance criteria met. Stamp a short summary and report DONE.",
|
|
274
|
+
"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.",
|
|
275
|
+
"suggestedRole": "developer",
|
|
276
|
+
"terminal": true,
|
|
277
|
+
"toolPolicy": {
|
|
278
|
+
"disallowBuiltinToolsets": [
|
|
279
|
+
"ai-apps",
|
|
280
|
+
"archives",
|
|
281
|
+
"artifacts",
|
|
282
|
+
"audio",
|
|
283
|
+
"browser-automation",
|
|
284
|
+
"code-execution",
|
|
285
|
+
"craftbooks",
|
|
286
|
+
"data-tables",
|
|
287
|
+
"entity-intel",
|
|
288
|
+
"git",
|
|
289
|
+
"image-intel",
|
|
290
|
+
"images",
|
|
291
|
+
"role-delegation",
|
|
292
|
+
"role-delegation-escalation",
|
|
293
|
+
"security-intel",
|
|
294
|
+
"team-management",
|
|
295
|
+
"videos",
|
|
296
|
+
"web",
|
|
297
|
+
"workspace-fs-write"
|
|
298
|
+
],
|
|
299
|
+
"outputMedium": "task-note"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"version": "1.0.5",
|
|
304
|
+
"releasedAt": "2026-10-21T00:00:00Z",
|
|
305
|
+
"minGezelVersion": "1.26233",
|
|
306
|
+
"connectors": [
|
|
307
|
+
{
|
|
308
|
+
"typeId": "calendar-google",
|
|
309
|
+
"optional": true,
|
|
310
|
+
"reason": "Read the synced calendar events the week is planned from."
|
|
311
|
+
}
|
|
312
|
+
]
|
|
313
|
+
}
|