@bendyline/gilde 0.1.40 → 0.1.41
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/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,428 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "type-safety-pass",
|
|
3
|
+
"name": "Type-Safety Pass",
|
|
4
|
+
"description": "Tighten code against the unsafe patterns that turn into 3am bugs, with the improvement proven by counting rather than claiming. First AUDIT: inventory the patterns in scope WITH COUNTS gathered by a stated, repeatable method (a grep per pattern, expressions quoted) — loose equality against null or undefined, implicit string/number coercions, swallowed catches that hide real errors, untyped or unvalidated boundaries, and in TypeScript projects any-casts and ignore-comments. The audit picks the concrete targets, names which behavioral consequences of these patterns are bugs this pass is expected to fix, records the guardrail, and captures the suite green before any change. Then CHANGE: fix pattern by pattern at the real sites — and never buy a lower count by weakening the code: no deleted assertions, no silenced error paths, no bare casts, no ignore-comments; a count that falls that way is a regression wearing a metric. Then VERIFY: re-count with exactly the audit's method, quote before and after per pattern, and show the suite green. Finally an independent reviewer grades the chain — counts genuinely fell by the same method, no suppression, behavior preserved except the declared consequence fixes — and a REVISE verdict routes the work back automatically with concrete findings. Small enough to run as night-shift work. Needs a project whose tests run via `npm run test`. Works identically whether the run edits the project directly or drafts a change proposal for the user to apply.",
|
|
5
|
+
"plan": "Audit the unsafe patterns with counts and a stated method, pick targets, record the guardrail and a green suite -> fix pattern by pattern at the real sites without silencing anything -> re-count with the same method, quote before/after, suite green -> enforced independent review.",
|
|
6
|
+
"entryStepId": "audit",
|
|
7
|
+
"triggers": [
|
|
8
|
+
"tighten the types",
|
|
9
|
+
"kill any types",
|
|
10
|
+
"add type annotations",
|
|
11
|
+
"make this type-safe",
|
|
12
|
+
"fix type errors"
|
|
13
|
+
],
|
|
14
|
+
"runModes": {
|
|
15
|
+
"nightShift": "supported"
|
|
16
|
+
},
|
|
17
|
+
"commands": [
|
|
18
|
+
{
|
|
19
|
+
"scope": "script",
|
|
20
|
+
"name": "test",
|
|
21
|
+
"reason": "The suite is the guardrail: it must be green before the pass starts and green at the end, so tightened checks provably did not break pinned behavior. The gates verify the green-before/green-after receipts from real runs, not the author's claims."
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"paramSchema": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"scope": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"title": "Where to tighten",
|
|
30
|
+
"description": "The module, folder, or area to audit for unsafe patterns. Leave empty when the task description already carries it.",
|
|
31
|
+
"default": ""
|
|
32
|
+
},
|
|
33
|
+
"workPath": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"title": "Working folder",
|
|
36
|
+
"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.",
|
|
37
|
+
"default": "{{task.dir}}"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"steps": [
|
|
42
|
+
{
|
|
43
|
+
"id": "audit",
|
|
44
|
+
"name": "Audit with counts",
|
|
45
|
+
"description": "Inventory the unsafe patterns in scope with counts by a stated method, pick concrete targets, record the guardrail, and capture the suite green.",
|
|
46
|
+
"prompt": "The area to tighten: {{scope}}\n\nInventory the unsafe patterns before fixing any of them — the improvement will be proven by re-counting later, so the counts and the exact method are the deliverable here. Read the involved source, then count each pattern class in scope with a stated, repeatable method (a grep per pattern works; quote the exact expressions you used): loose equality against null or undefined (`==`/`!=` where a strict check belongs), implicit string/number coercions (arithmetic or concatenation on values that may arrive as strings), swallowed catches (a catch that hides the error and carries on as if nothing failed), untyped or unvalidated boundaries (inputs used without a shape check), and in TypeScript projects `any`-casts and ignore-comments. Record the count per pattern and where each hit lives.\n\nPick the concrete targets for this pass and state the guardrail: which behavior is pinned by tests and must not change, and which behavioral CONSEQUENCES of these patterns are bugs this pass is expected to fix — name each one. Then find how the project runs its tests (`list_package_scripts`), run the suite with `run_package_script` (`test`), and record it green before any change; if it is already red, stop and report that honestly. If the command needs first-use approval, say so and wait rather than guessing.\n\nWrite `{{workPath}}/audit.md` with exactly these sections: `## Inventory` (counts by pattern with the exact method and grep expressions used), `## Targets` (the hits this pass will fix, with backtick paths), `## Guardrail` (what must not change, and the declared consequence fixes that may). Cite the real files with backtick paths.\n\nObservable handoff: write the completed result to `{{workPath}}/audit.md` in the project's artifacts drawer with `write_artifact`. Do not merely describe what the file would contain. Re-read it with `read_artifact` before finishing this phase and repair any incomplete sections.",
|
|
47
|
+
"suggestedRole": "code auditor",
|
|
48
|
+
"capabilityFloor": "small",
|
|
49
|
+
"advanceWhen": {
|
|
50
|
+
"file": "{{workPath}}/audit.md",
|
|
51
|
+
"minBytes": 600,
|
|
52
|
+
"sniff": "nonempty",
|
|
53
|
+
"requireChange": true,
|
|
54
|
+
"artifact": true,
|
|
55
|
+
"goto": "change"
|
|
56
|
+
},
|
|
57
|
+
"gate": {
|
|
58
|
+
"at": "completion",
|
|
59
|
+
"checks": [
|
|
60
|
+
{
|
|
61
|
+
"kind": "minBytes",
|
|
62
|
+
"file": "{{workPath}}/audit.md",
|
|
63
|
+
"bytes": 600,
|
|
64
|
+
"artifact": true
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "sniff",
|
|
68
|
+
"file": "{{workPath}}/audit.md",
|
|
69
|
+
"sniff": "nonempty",
|
|
70
|
+
"artifact": true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"kind": "contains",
|
|
74
|
+
"file": "{{workPath}}/audit.md",
|
|
75
|
+
"pattern": "^##\\s+Inventory[\\s\\S]*\\d",
|
|
76
|
+
"flags": "im",
|
|
77
|
+
"label": "Inventory section with counts",
|
|
78
|
+
"artifact": true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"kind": "contains",
|
|
82
|
+
"file": "{{workPath}}/audit.md",
|
|
83
|
+
"pattern": "^##\\s+Targets",
|
|
84
|
+
"flags": "im",
|
|
85
|
+
"label": "Targets section",
|
|
86
|
+
"artifact": true
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"kind": "contains",
|
|
90
|
+
"file": "{{workPath}}/audit.md",
|
|
91
|
+
"pattern": "^##\\s+Guardrail",
|
|
92
|
+
"flags": "im",
|
|
93
|
+
"label": "Guardrail section",
|
|
94
|
+
"artifact": true
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"kind": "citationsResolve",
|
|
98
|
+
"file": "{{workPath}}/audit.md",
|
|
99
|
+
"minCitations": 2,
|
|
100
|
+
"artifact": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"kind": "commandEvidence",
|
|
104
|
+
"script": "test",
|
|
105
|
+
"expect": "pass",
|
|
106
|
+
"label": "green before the work starts"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"onReject": "audit",
|
|
110
|
+
"maxAttempts": 4
|
|
111
|
+
},
|
|
112
|
+
"next": "change"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "change",
|
|
116
|
+
"name": "Fix pattern by pattern",
|
|
117
|
+
"description": "Fix the targeted patterns at the real sites, never silencing a check or weakening an assertion to move a count.",
|
|
118
|
+
"prompt": "Read `{{workPath}}/audit.md` and fix the targeted patterns at the REAL sites with `read_file` plus `write_file`/`replace_in_file`, pattern by pattern. Replace loose equality with strict checks that state what they mean; normalize or validate values at the boundary they cross instead of coercing mid-calculation; make swallowed catches surface the error — rethrow, or report it the way the audit's guardrail declares — rather than carrying on as if nothing failed. Never buy a lower count by weakening the code: no deleting an assertion, no silencing an error path, no bare casts, and in TypeScript no `any` or ignore-comment to make a diagnostic disappear — a count that falls that way is a regression wearing a metric. Behavior changes only where the audit declared a consequence fix, and each one gets named in your notes. Run the suite with `run_package_script` (`test`) as you go and keep it green; a change that goes red gets narrowed, not stacked on. If a targeted hit turns out to be correct as written, record why and leave it — honesty beats a moved count.\n\nWrite `{{workPath}}/change-notes.md` with exactly these sections: `## Patterns addressed` (each pattern class, what the fix was, and any declared consequence fix it delivered), `## Files touched` (backtick path per line), `## Deviations` (targets handled differently than the audit planned, or `none`, honestly). Before working, open `{{workPath}}/audit.md` with `read_artifact`.\n\nObservable handoff: write the completed result to `{{workPath}}/change-notes.md` in the project's artifacts drawer with `write_artifact`. Do not merely describe what the file would contain. Re-read it with `read_artifact` before finishing this phase and repair any incomplete sections.",
|
|
119
|
+
"suggestedRole": "software engineer",
|
|
120
|
+
"capabilityFloor": "small",
|
|
121
|
+
"consumes": [
|
|
122
|
+
{
|
|
123
|
+
"file": "{{workPath}}/audit.md",
|
|
124
|
+
"artifact": true
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"advanceWhen": {
|
|
128
|
+
"file": "{{workPath}}/change-notes.md",
|
|
129
|
+
"minBytes": 600,
|
|
130
|
+
"sniff": "nonempty",
|
|
131
|
+
"requireChange": true,
|
|
132
|
+
"artifact": true,
|
|
133
|
+
"goto": "verify"
|
|
134
|
+
},
|
|
135
|
+
"gate": {
|
|
136
|
+
"at": "completion",
|
|
137
|
+
"checks": [
|
|
138
|
+
{
|
|
139
|
+
"kind": "minBytes",
|
|
140
|
+
"file": "{{workPath}}/change-notes.md",
|
|
141
|
+
"bytes": 600,
|
|
142
|
+
"artifact": true
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"kind": "sniff",
|
|
146
|
+
"file": "{{workPath}}/change-notes.md",
|
|
147
|
+
"sniff": "nonempty",
|
|
148
|
+
"artifact": true
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"kind": "contains",
|
|
152
|
+
"file": "{{workPath}}/change-notes.md",
|
|
153
|
+
"pattern": "^##\\s+Patterns addressed",
|
|
154
|
+
"flags": "im",
|
|
155
|
+
"label": "Patterns addressed section",
|
|
156
|
+
"artifact": true
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"kind": "contains",
|
|
160
|
+
"file": "{{workPath}}/change-notes.md",
|
|
161
|
+
"pattern": "^##\\s+Files touched",
|
|
162
|
+
"flags": "im",
|
|
163
|
+
"label": "Files touched section",
|
|
164
|
+
"artifact": true
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"kind": "contains",
|
|
168
|
+
"file": "{{workPath}}/change-notes.md",
|
|
169
|
+
"pattern": "^##\\s+Deviations",
|
|
170
|
+
"flags": "im",
|
|
171
|
+
"label": "Deviations section",
|
|
172
|
+
"artifact": true
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"kind": "citationsResolve",
|
|
176
|
+
"file": "{{workPath}}/change-notes.md",
|
|
177
|
+
"minCitations": 2,
|
|
178
|
+
"artifact": true
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"onReject": "change",
|
|
182
|
+
"maxAttempts": 4
|
|
183
|
+
},
|
|
184
|
+
"next": "verify"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"id": "verify",
|
|
188
|
+
"name": "Re-count and verify",
|
|
189
|
+
"description": "Re-count every pattern with exactly the audit's method, quote before/after counts, and record the suite green.",
|
|
190
|
+
"prompt": "Prove the pass with fresh eyes. Read `{{workPath}}/audit.md` and RE-COUNT every pattern with EXACTLY the method and grep expressions it records — same expressions, same scope; a changed method voids the comparison, and if the recorded method cannot be reproduced that is a finding to report, not a license to substitute one. Quote the audit's count and the new count for each pattern side by side. Run the whole suite with `run_package_script` (`test`) and record the green result. Spot-check the fixed sites: the checks got stronger, not deleted, and no cast or ignore-comment crept in. Anything you could not actually re-run gets labeled unverified, never claimed.\n\nWrite `{{workPath}}/verification.md` with exactly these sections: `## Before / after counts` (per pattern, the audit count next to the re-count, same greps), `## Suite` (the full-suite result from the real run), `## Result` (which declared consequences are now fixed, and anything unverified). Before working, open `{{workPath}}/audit.md` with `read_artifact`.\n\nObservable handoff: write the completed result to `{{workPath}}/verification.md` in the project's artifacts drawer with `write_artifact`. Do not merely describe what the file would contain. Re-read it with `read_artifact` before finishing this phase and repair any incomplete sections.",
|
|
191
|
+
"suggestedRole": "software engineer",
|
|
192
|
+
"capabilityFloor": "small",
|
|
193
|
+
"consumes": [
|
|
194
|
+
{
|
|
195
|
+
"file": "{{workPath}}/audit.md",
|
|
196
|
+
"artifact": true
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"advanceWhen": {
|
|
200
|
+
"file": "{{workPath}}/verification.md",
|
|
201
|
+
"minBytes": 400,
|
|
202
|
+
"sniff": "nonempty",
|
|
203
|
+
"requireChange": true,
|
|
204
|
+
"artifact": true,
|
|
205
|
+
"goto": "evaluate"
|
|
206
|
+
},
|
|
207
|
+
"gate": {
|
|
208
|
+
"at": "completion",
|
|
209
|
+
"checks": [
|
|
210
|
+
{
|
|
211
|
+
"kind": "minBytes",
|
|
212
|
+
"file": "{{workPath}}/verification.md",
|
|
213
|
+
"bytes": 400,
|
|
214
|
+
"artifact": true
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"kind": "sniff",
|
|
218
|
+
"file": "{{workPath}}/verification.md",
|
|
219
|
+
"sniff": "nonempty",
|
|
220
|
+
"artifact": true
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"kind": "contains",
|
|
224
|
+
"file": "{{workPath}}/verification.md",
|
|
225
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*\\d",
|
|
226
|
+
"flags": "im",
|
|
227
|
+
"label": "Before / after counts with figures",
|
|
228
|
+
"artifact": true
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"kind": "contains",
|
|
232
|
+
"file": "{{workPath}}/verification.md",
|
|
233
|
+
"pattern": "^##\\s+Suite",
|
|
234
|
+
"flags": "im",
|
|
235
|
+
"label": "Suite section",
|
|
236
|
+
"artifact": true
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"kind": "contains",
|
|
240
|
+
"file": "{{workPath}}/verification.md",
|
|
241
|
+
"pattern": "^##\\s+Result",
|
|
242
|
+
"flags": "im",
|
|
243
|
+
"label": "Result section",
|
|
244
|
+
"artifact": true
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"kind": "commandEvidence",
|
|
248
|
+
"script": "test",
|
|
249
|
+
"expect": "pass",
|
|
250
|
+
"label": "green after the pass (verified run receipt)"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"onReject": "verify",
|
|
254
|
+
"maxAttempts": 4
|
|
255
|
+
},
|
|
256
|
+
"next": "evaluate"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"id": "evaluate",
|
|
260
|
+
"name": "Evaluate the deliverable",
|
|
261
|
+
"description": "Independently grade the observable deliverable and route it to finish, repair, or user escalation.",
|
|
262
|
+
"prompt": "Review `{{workPath}}/verification.md`, `{{workPath}}/audit.md`, `{{workPath}}/change-notes.md` against every criterion below. Inspect the underlying evidence files named by the workflow; do not grade from the author's summary alone.\n\n1. audit.md counts real patterns in real files with the exact method recorded (grep expressions quoted), and a green suite receipt exists from before the work started.\n2. Counts genuinely fell and the re-count method matches the audit's exactly: verification.md quotes before and after per pattern — the measured target moved against the recorded baseline using the same method.\n3. No suppression bought the improvement: open the touched files and confirm no assertion was weakened, no check deleted, no error path silenced, and no cast or ignore-comment introduced to move a count.\n4. Observable behavior unchanged (or changed only as the audit declared): each consequence fix the audit named happened and is recorded in change-notes.md, and nothing else moved.\n5. No stage left the suite red (receipts, not claims): green before the pass and green after it, from real runs.\n6. change-notes.md names every touched file (paths that exist) and records its deviations honestly, including targets left alone because they were correct as written.\n\nOpen `{{workPath}}/verification.md`, `{{workPath}}/audit.md`, `{{workPath}}/change-notes.md` with `read_artifact`. Write the evidence-backed review to `{{workPath}}/review.md` in the artifacts drawer with `write_artifact`.\n\nList the findings as a markdown table with columns `| Severity | File | Line | Problem | Fix |` (severities: critical/major/minor/nit; empty table only on PASS). Give each criterion a PASS or FAIL with a concrete path, excerpt, measurement, or observed behavior. End with exactly `Verdict: PASS` or `Verdict: REVISE`. The gate ENFORCES the verdict: a well-formed REVISE is rejected and routed back to `repair` automatically, carrying your findings — so list every finding in the table with a concrete fix. On PASS, `advance_task_step` to `finish`. Never write PASS while a criterion is unmet.",
|
|
263
|
+
"suggestedRole": "code-quality reviewer",
|
|
264
|
+
"consumes": [
|
|
265
|
+
{
|
|
266
|
+
"file": "{{workPath}}/verification.md",
|
|
267
|
+
"artifact": true
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"file": "{{workPath}}/audit.md",
|
|
271
|
+
"artifact": true
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"file": "{{workPath}}/change-notes.md",
|
|
275
|
+
"artifact": true
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"gate": {
|
|
279
|
+
"at": "completion",
|
|
280
|
+
"checks": [
|
|
281
|
+
{
|
|
282
|
+
"kind": "minBytes",
|
|
283
|
+
"file": "{{workPath}}/review.md",
|
|
284
|
+
"bytes": 400,
|
|
285
|
+
"artifact": true
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"kind": "contains",
|
|
289
|
+
"file": "{{workPath}}/review.md",
|
|
290
|
+
"pattern": "Verdict:\\s*(?:PASS|REVISE)",
|
|
291
|
+
"flags": "i",
|
|
292
|
+
"label": "explicit PASS or REVISE verdict",
|
|
293
|
+
"artifact": true
|
|
294
|
+
}
|
|
295
|
+
],
|
|
296
|
+
"scripts": [
|
|
297
|
+
{
|
|
298
|
+
"name": "checkFixReview",
|
|
299
|
+
"scope": "standard",
|
|
300
|
+
"inputs": {
|
|
301
|
+
"reviewPath": "{{workPath}}/review.md",
|
|
302
|
+
"fixStepId": "repair"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
"onReject": "evaluate",
|
|
307
|
+
"maxAttempts": 4
|
|
308
|
+
},
|
|
309
|
+
"next": "finish"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"id": "repair",
|
|
313
|
+
"name": "Repair the deliverable",
|
|
314
|
+
"description": "Fix only the concrete gaps from the latest independent review.",
|
|
315
|
+
"prompt": "Read `{{workPath}}/review.md` with `read_artifact` and repair every failed criterion in `{{workPath}}/verification.md`, `{{workPath}}/audit.md`, `{{workPath}}/change-notes.md`. Make changes on each file's declared surface (`write_artifact` for artifact inputs, `write_file` for workspace inputs), not in task notes or a reply. Preserve evidence that already passed. Re-run or re-check anything the reviewer found unproven. Ensure `{{workPath}}/verification.md` is genuinely updated this turn so the repair is observable, then hand it back for independent evaluation.",
|
|
316
|
+
"suggestedRole": "software engineer",
|
|
317
|
+
"consumes": [
|
|
318
|
+
{
|
|
319
|
+
"file": "{{workPath}}/review.md",
|
|
320
|
+
"artifact": true
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"file": "{{workPath}}/verification.md",
|
|
324
|
+
"artifact": true
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"file": "{{workPath}}/audit.md",
|
|
328
|
+
"artifact": true
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"file": "{{workPath}}/change-notes.md",
|
|
332
|
+
"artifact": true
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"advanceWhen": {
|
|
336
|
+
"file": "{{workPath}}/verification.md",
|
|
337
|
+
"minBytes": 400,
|
|
338
|
+
"sniff": "nonempty",
|
|
339
|
+
"requireChange": true,
|
|
340
|
+
"artifact": true,
|
|
341
|
+
"goto": "evaluate"
|
|
342
|
+
},
|
|
343
|
+
"gate": {
|
|
344
|
+
"at": "completion",
|
|
345
|
+
"checks": [
|
|
346
|
+
{
|
|
347
|
+
"kind": "minBytes",
|
|
348
|
+
"file": "{{workPath}}/verification.md",
|
|
349
|
+
"bytes": 400,
|
|
350
|
+
"artifact": true
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"kind": "sniff",
|
|
354
|
+
"file": "{{workPath}}/verification.md",
|
|
355
|
+
"sniff": "nonempty",
|
|
356
|
+
"artifact": true
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "contains",
|
|
360
|
+
"file": "{{workPath}}/verification.md",
|
|
361
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*\\d",
|
|
362
|
+
"flags": "im",
|
|
363
|
+
"label": "Before / after counts with figures",
|
|
364
|
+
"artifact": true
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
"kind": "contains",
|
|
368
|
+
"file": "{{workPath}}/verification.md",
|
|
369
|
+
"pattern": "^##\\s+Suite",
|
|
370
|
+
"flags": "im",
|
|
371
|
+
"label": "Suite section",
|
|
372
|
+
"artifact": true
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"kind": "contains",
|
|
376
|
+
"file": "{{workPath}}/verification.md",
|
|
377
|
+
"pattern": "^##\\s+Result",
|
|
378
|
+
"flags": "im",
|
|
379
|
+
"label": "Result section",
|
|
380
|
+
"artifact": true
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"kind": "commandEvidence",
|
|
384
|
+
"script": "test",
|
|
385
|
+
"expect": "pass",
|
|
386
|
+
"label": "green after the pass (verified run receipt)"
|
|
387
|
+
}
|
|
388
|
+
],
|
|
389
|
+
"onReject": "repair",
|
|
390
|
+
"maxAttempts": 4
|
|
391
|
+
},
|
|
392
|
+
"next": "evaluate"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"id": "finish",
|
|
396
|
+
"name": "Finish",
|
|
397
|
+
"description": "All deterministic and reviewer criteria passed.",
|
|
398
|
+
"prompt": "The independent review passed. Read `{{workPath}}/review.md` with `read_artifact`, then use `write_task_note` to record a concise DONE summary with the final deliverable paths (`{{workPath}}/verification.md`, `{{workPath}}/audit.md`, `{{workPath}}/change-notes.md`) and the evidence that each acceptance criterion passed. Report DONE without starting new work.",
|
|
399
|
+
"suggestedRole": "project lead",
|
|
400
|
+
"consumes": [
|
|
401
|
+
{
|
|
402
|
+
"file": "{{workPath}}/review.md",
|
|
403
|
+
"artifact": true
|
|
404
|
+
}
|
|
405
|
+
],
|
|
406
|
+
"terminal": true
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
"id": "needs-user",
|
|
410
|
+
"name": "Escalate unresolved concerns",
|
|
411
|
+
"description": "The bounded repair loop ended without a defensible pass.",
|
|
412
|
+
"prompt": "The deliverable did not pass after 3 review rounds. Do not claim success. Read `{{workPath}}/review.md` with `read_artifact`, then use `write_task_note` to record DONE_WITH_CONCERNS: the unmet criteria, what was attempted, the affected paths, and the smallest user decision or missing input needed to continue.",
|
|
413
|
+
"suggestedRole": "project lead",
|
|
414
|
+
"consumes": [
|
|
415
|
+
{
|
|
416
|
+
"file": "{{workPath}}/review.md",
|
|
417
|
+
"artifact": true
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"terminal": true
|
|
421
|
+
}
|
|
422
|
+
],
|
|
423
|
+
"diffpackCapable": true,
|
|
424
|
+
"capabilityFloor": "small",
|
|
425
|
+
"version": "2.0.0",
|
|
426
|
+
"releasedAt": "2026-08-24T00:00:00.000Z",
|
|
427
|
+
"minGezelVersion": "1.26236"
|
|
428
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
"workPath": "tasks/eval",
|
|
39
|
+
"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."
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"mocks": [],
|
|
43
|
+
"success": {
|
|
44
|
+
"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.",
|
|
45
|
+
"deliverables": [
|
|
46
|
+
{
|
|
47
|
+
"path": "tasks/eval/audit.md",
|
|
48
|
+
"kind": "markdown-notes",
|
|
49
|
+
"artifact": true,
|
|
50
|
+
"minBytes": 600,
|
|
51
|
+
"checks": [
|
|
52
|
+
{
|
|
53
|
+
"kind": "contains",
|
|
54
|
+
"file": "tasks/eval/audit.md",
|
|
55
|
+
"pattern": "^##\\s+Inventory[\\s\\S]*^##\\s+Targets[\\s\\S]*^##\\s+Guardrail",
|
|
56
|
+
"flags": "im",
|
|
57
|
+
"label": "audit sections in order"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"kind": "contains",
|
|
61
|
+
"file": "tasks/eval/audit.md",
|
|
62
|
+
"pattern": "^##\\s+Inventory[\\s\\S]*\\d",
|
|
63
|
+
"flags": "im",
|
|
64
|
+
"label": "inventory carries counts"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"kind": "citationsResolve",
|
|
68
|
+
"file": "tasks/eval/audit.md",
|
|
69
|
+
"minCitations": 2,
|
|
70
|
+
"artifact": true
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"path": "tasks/eval/change-notes.md",
|
|
76
|
+
"kind": "markdown-notes",
|
|
77
|
+
"artifact": true,
|
|
78
|
+
"minBytes": 600,
|
|
79
|
+
"checks": [
|
|
80
|
+
{
|
|
81
|
+
"kind": "contains",
|
|
82
|
+
"file": "tasks/eval/change-notes.md",
|
|
83
|
+
"pattern": "^##\\s+Patterns addressed[\\s\\S]*^##\\s+Files touched[\\s\\S]*^##\\s+Deviations",
|
|
84
|
+
"flags": "im",
|
|
85
|
+
"label": "change-notes sections in order"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"kind": "citationsResolve",
|
|
89
|
+
"file": "tasks/eval/change-notes.md",
|
|
90
|
+
"minCitations": 2,
|
|
91
|
+
"artifact": true
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"path": "tasks/eval/verification.md",
|
|
97
|
+
"kind": "markdown-notes",
|
|
98
|
+
"artifact": true,
|
|
99
|
+
"minBytes": 400,
|
|
100
|
+
"checks": [
|
|
101
|
+
{
|
|
102
|
+
"kind": "contains",
|
|
103
|
+
"file": "tasks/eval/verification.md",
|
|
104
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*^##\\s+Suite[\\s\\S]*^##\\s+Result",
|
|
105
|
+
"flags": "im",
|
|
106
|
+
"label": "verification sections in order"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"kind": "contains",
|
|
110
|
+
"file": "tasks/eval/verification.md",
|
|
111
|
+
"pattern": "^##\\s+Before\\s*/\\s*after counts[\\s\\S]*\\d",
|
|
112
|
+
"flags": "im",
|
|
113
|
+
"label": "before/after counts quoted"
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"path": "tasks/eval/review.md",
|
|
119
|
+
"kind": "markdown-report",
|
|
120
|
+
"artifact": true,
|
|
121
|
+
"minBytes": 400,
|
|
122
|
+
"checks": [
|
|
123
|
+
{
|
|
124
|
+
"kind": "contains",
|
|
125
|
+
"file": "tasks/eval/review.md",
|
|
126
|
+
"pattern": "Verdict:\\s*(?:PASS|REVISE)",
|
|
127
|
+
"flags": "i",
|
|
128
|
+
"label": "explicit reviewer verdict"
|
|
129
|
+
}
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"checks": [
|
|
134
|
+
{
|
|
135
|
+
"kind": "notContains",
|
|
136
|
+
"file": "src/expenses.js",
|
|
137
|
+
"pattern": "(^|[^=!<>])==[^=]|!=[^=]",
|
|
138
|
+
"label": "loose equality is gone from the module"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"kind": "notContains",
|
|
142
|
+
"file": "src/expenses.js",
|
|
143
|
+
"pattern": "catch[^{]*\\{\\s*\\}",
|
|
144
|
+
"label": "no empty catch swallows errors"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"kind": "notContains",
|
|
148
|
+
"file": "src/expenses.js",
|
|
149
|
+
"pattern": "@ts-ignore|@ts-expect-error|eslint-disable",
|
|
150
|
+
"label": "no suppression comment bought the improvement"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"kind": "sourceParses",
|
|
154
|
+
"file": "src/expenses.js"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"kind": "nodeScriptPasses",
|
|
158
|
+
"script": "tests/verify-expenses.mjs",
|
|
159
|
+
"timeoutMs": 60000,
|
|
160
|
+
"requiredOutput": [
|
|
161
|
+
{
|
|
162
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE patterns gone",
|
|
163
|
+
"label": "seeded unsafe patterns structurally gone"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE behavior ok",
|
|
167
|
+
"label": "the three declared consequences are fixed"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"pattern": "TYPE_SAFETY_PASS_ORACLE suite green",
|
|
171
|
+
"label": "suite green after the pass"
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
"taskNotes": {
|
|
177
|
+
"minBytes": 120,
|
|
178
|
+
"checks": [
|
|
179
|
+
{
|
|
180
|
+
"kind": "contains",
|
|
181
|
+
"file": "task-notes.md",
|
|
182
|
+
"pattern": "\\bDONE\\b[\\s\\S]*(npm\\s+run\\s+test|node\\s+--test)",
|
|
183
|
+
"flags": "i",
|
|
184
|
+
"label": "DONE note names the real test command"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"taskGraph": {
|
|
189
|
+
"requireCraftbookTask": true,
|
|
190
|
+
"requireTerminalStep": true
|
|
191
|
+
},
|
|
192
|
+
"unchangedFixtures": [
|
|
193
|
+
"source/cleanup-brief.md",
|
|
194
|
+
"package.json"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
"rubric": {
|
|
198
|
+
"artifact": {
|
|
199
|
+
"path": "tasks/eval/verification.md",
|
|
200
|
+
"kind": "markdown"
|
|
201
|
+
},
|
|
202
|
+
"axes": [
|
|
203
|
+
{
|
|
204
|
+
"name": "Honest counting",
|
|
205
|
+
"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."
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "No suppression",
|
|
209
|
+
"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."
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "Consequence-fix discipline",
|
|
213
|
+
"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."
|
|
214
|
+
}
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
"qualityFocus": [
|
|
218
|
+
"counts with their method",
|
|
219
|
+
"no suppression-by-cast",
|
|
220
|
+
"enforced review loop"
|
|
221
|
+
]
|
|
222
|
+
}
|