@bendyline/gilde 0.1.17 → 0.1.19

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 (160) hide show
  1. package/README.md +11 -2
  2. package/authoring/chat-models/README.md +26 -0
  3. package/authoring/chat-models/btl4-35b-q4.json +142 -0
  4. package/authoring/chat-models/btl4-compact-iq2.json +142 -0
  5. package/authoring/chat-models/deepseek-r1-8b-q4.json +53 -0
  6. package/authoring/chat-models/deepseek-v4-flash-284b-mxfp4.json +110 -0
  7. package/authoring/chat-models/deepseek-v4-flash-284b-q2.json +110 -0
  8. package/authoring/chat-models/deepseek-v4-flash-284b-q2q4.json +111 -0
  9. package/authoring/chat-models/deepseek-v4-flash-284b-q4.json +113 -0
  10. package/authoring/chat-models/gemma4-12b-q4.json +190 -0
  11. package/authoring/chat-models/gemma4-12b-q8.json +164 -0
  12. package/authoring/chat-models/gemma4-26b-q4.json +90 -0
  13. package/authoring/chat-models/gemma4-31b-q4.json +81 -0
  14. package/authoring/chat-models/gemma4-e2b-q4.json +76 -0
  15. package/authoring/chat-models/gemma4-e4b-q4.json +71 -0
  16. package/authoring/chat-models/glm-5.2-754b-q2.json +60 -0
  17. package/authoring/chat-models/gpt-oss-120b-q4.json +48 -0
  18. package/authoring/chat-models/gpt-oss-20b-q4.json +47 -0
  19. package/authoring/chat-models/laguna-s-2.1-118b-q4.json +127 -0
  20. package/authoring/chat-models/laguna-s-2.1-118b-q6.json +121 -0
  21. package/authoring/chat-models/laguna-s-2.1-118b-q8.json +127 -0
  22. package/authoring/chat-models/lfm2.5-2.6b-q4.json +39 -0
  23. package/authoring/chat-models/llama3.2-3b-q4.json +42 -0
  24. package/authoring/chat-models/mistral-7b-q4.json +53 -0
  25. package/authoring/chat-models/mistral-medium-3.5-128b-q4.json +57 -0
  26. package/authoring/chat-models/muse-glimmer-30b-q4.json +126 -0
  27. package/authoring/chat-models/nemotron3-nano-30b-q4.json +49 -0
  28. package/authoring/chat-models/nemotron3-super-120b-q4.json +41 -0
  29. package/authoring/chat-models/ornith-35b-q4.json +145 -0
  30. package/authoring/chat-models/ornith-35b-q8.json +145 -0
  31. package/authoring/chat-models/ornith-9b-q4.json +146 -0
  32. package/authoring/chat-models/qwen3.5-122b-a10b-q4.json +172 -0
  33. package/authoring/chat-models/qwen3.5-2b-q4.json +70 -0
  34. package/authoring/chat-models/qwen3.5-4b-q4.json +61 -0
  35. package/authoring/chat-models/qwen3.5-9b-q4.json +61 -0
  36. package/authoring/chat-models/qwen3.6-27b-q4.json +66 -0
  37. package/authoring/chat-models/qwen3.6-27b-q8.json +153 -0
  38. package/authoring/chat-models/qwen3.6-35b-a3b-q4.json +154 -0
  39. package/authoring/chat-models/qwen3.6-35b-a3b-q8.json +154 -0
  40. package/authoring/chat-models/talkie-1930-13b-q4.json +74 -0
  41. package/authoring/chat-models/ternary-bonsai-27b-q2.json +144 -0
  42. package/authoring/gstack/LICENSE.gstack +21 -0
  43. package/authoring/gstack/README.md +50 -0
  44. package/authoring/gstack/evals/cso.json +152 -0
  45. package/authoring/gstack/evals/design-consultation.json +201 -0
  46. package/authoring/gstack/evals/document-generate.json +174 -0
  47. package/authoring/gstack/evals/investigate.json +153 -0
  48. package/authoring/gstack/evals/office-hours.json +141 -0
  49. package/authoring/gstack/evals/plan-ceo-review.json +135 -0
  50. package/authoring/gstack/evals/qa-only.json +376 -0
  51. package/authoring/gstack/evals/retro.json +191 -0
  52. package/authoring/gstack/evals/spec.json +162 -0
  53. package/authoring/gstack/overlays/cso.json +132 -0
  54. package/authoring/gstack/overlays/design-consultation.json +153 -0
  55. package/authoring/gstack/overlays/document-generate.json +124 -0
  56. package/authoring/gstack/overlays/investigate.json +128 -0
  57. package/authoring/gstack/overlays/office-hours.json +119 -0
  58. package/authoring/gstack/overlays/plan-ceo-review.json +128 -0
  59. package/authoring/gstack/overlays/qa-only.json +145 -0
  60. package/authoring/gstack/overlays/retro.json +132 -0
  61. package/authoring/gstack/overlays/spec.json +140 -0
  62. package/authoring/gstack/persona-drafts/cso.about.md +9 -0
  63. package/authoring/gstack/persona-drafts/design-consultation.about.md +9 -0
  64. package/authoring/gstack/persona-drafts/office-hours.about.md +9 -0
  65. package/authoring/gstack/persona-drafts/qa-only.about.md +5 -0
  66. package/authoring/gstack/persona-drafts/spec.about.md +26 -0
  67. package/authoring/gstack/snapshots/cso/SKILL.md +1285 -0
  68. package/authoring/gstack/snapshots/design-consultation/SKILL.md +1230 -0
  69. package/authoring/gstack/snapshots/document-generate/SKILL.md +1252 -0
  70. package/authoring/gstack/snapshots/investigate/SKILL.md +1074 -0
  71. package/authoring/gstack/snapshots/office-hours/SKILL.md +1697 -0
  72. package/authoring/gstack/snapshots/plan-ceo-review/SKILL.md +1476 -0
  73. package/authoring/gstack/snapshots/qa-only/SKILL.md +1256 -0
  74. package/authoring/gstack/snapshots/retro/SKILL.md +1812 -0
  75. package/authoring/gstack/snapshots/spec/SKILL.md +2359 -0
  76. package/authoring/gstack/wave.json +103 -0
  77. package/data/chat-models/gl/glm-5.2-754b-q2/manifest.json +65 -0
  78. package/data/chat-models/gl/glm-5.2-754b-q2/versions/1.0.0/manifest.json +18 -0
  79. package/data/chat-models/gp/gpt-oss-120b-q4/manifest.json +5 -5
  80. package/data/chat-models/gp/gpt-oss-120b-q4/versions/1.1.0/manifest.json +135 -0
  81. package/data/chat-models/index.json +1 -1
  82. package/data/chat-models/mu/muse-glimmer-30b-q4/manifest.json +135 -0
  83. package/data/chat-models/mu/muse-glimmer-30b-q4/versions/1.0.0/manifest.json +20 -0
  84. package/data/connector-types/gi/github-releases/manifest.json +17 -0
  85. package/data/connector-types/gi/github-releases/versions/1.0.0/manifest.json +71 -0
  86. package/data/connector-types/index.json +1 -1
  87. package/data/craftbook-templates/br/branding-website/versions/1.1.0/craftbook.json +190 -0
  88. package/data/craftbook-templates/br/branding-website/versions/1.1.0/test.json +164 -0
  89. package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.0/craftbook.json +358 -0
  90. package/data/craftbook-templates/br/browser-qa-audit/versions/2.0.0/test.json +376 -0
  91. package/data/craftbook-templates/ca/careful-mode/versions/1.1.0/craftbook.json +43 -0
  92. package/data/craftbook-templates/ca/careful-mode/versions/1.1.0/test.json +110 -0
  93. package/data/craftbook-templates/ca/careful-mode/versions/1.2.0/craftbook.json +43 -0
  94. package/data/craftbook-templates/ca/careful-mode/versions/1.2.0/test.json +110 -0
  95. package/data/craftbook-templates/co/content-deck/versions/1.1.0/craftbook.json +185 -0
  96. package/data/craftbook-templates/co/content-deck/versions/1.1.0/test.json +166 -0
  97. package/data/craftbook-templates/co/content-deck/versions/1.2.0/craftbook.json +185 -0
  98. package/data/craftbook-templates/co/content-deck/versions/1.2.0/test.json +169 -0
  99. package/data/craftbook-templates/co/corpus-email-digest/versions/1.1.0/craftbook.json +189 -0
  100. package/data/craftbook-templates/co/corpus-email-digest/versions/1.1.0/test.json +182 -0
  101. package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.0/craftbook.json +189 -0
  102. package/data/craftbook-templates/co/corpus-email-digest/versions/1.2.0/test.json +187 -0
  103. package/data/craftbook-templates/de/design-system-consultation/versions/2.0.0/craftbook.json +385 -0
  104. package/data/craftbook-templates/de/design-system-consultation/versions/2.0.0/test.json +201 -0
  105. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.0/craftbook.json +353 -0
  106. package/data/craftbook-templates/en/engineering-retrospective/versions/2.0.0/test.json +191 -0
  107. package/data/craftbook-templates/ex/executive-level-review/versions/2.0.0/craftbook.json +347 -0
  108. package/data/craftbook-templates/ex/executive-level-review/versions/2.0.0/test.json +135 -0
  109. package/data/craftbook-templates/fr/freeze-scope/versions/1.2.0/craftbook.json +50 -0
  110. package/data/craftbook-templates/fr/freeze-scope/versions/1.2.0/test.json +131 -0
  111. package/data/craftbook-templates/fr/freeze-scope/versions/1.3.0/craftbook.json +50 -0
  112. package/data/craftbook-templates/fr/freeze-scope/versions/1.3.0/test.json +131 -0
  113. package/data/craftbook-templates/ht/html-arcade-game/versions/1.1.0/craftbook.json +197 -0
  114. package/data/craftbook-templates/ht/html-arcade-game/versions/1.1.0/test.json +173 -0
  115. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.0/craftbook.json +197 -0
  116. package/data/craftbook-templates/ht/html-arcade-game/versions/1.2.0/test.json +176 -0
  117. package/data/craftbook-templates/id/idea-office-hours/versions/2.0.0/craftbook.json +333 -0
  118. package/data/craftbook-templates/id/idea-office-hours/versions/2.0.0/test.json +141 -0
  119. package/data/craftbook-templates/im/image-set-index/versions/1.1.0/craftbook.json +163 -0
  120. package/data/craftbook-templates/im/image-set-index/versions/1.1.0/test.json +177 -0
  121. package/data/craftbook-templates/im/image-set-index/versions/1.2.0/craftbook.json +163 -0
  122. package/data/craftbook-templates/im/image-set-index/versions/1.2.0/test.json +180 -0
  123. package/data/craftbook-templates/index.json +1 -1
  124. package/data/craftbook-templates/pu/pull-request-review/manifest.json +5 -1
  125. package/data/craftbook-templates/pu/pull-request-review/versions/1.2.0/craftbook.json +159 -0
  126. package/data/craftbook-templates/pu/pull-request-review/versions/1.2.0/test.json +172 -0
  127. package/data/craftbook-templates/re/release-artifact-sanity-check/art.json +13 -0
  128. package/data/craftbook-templates/re/release-artifact-sanity-check/logo.webp +0 -0
  129. package/data/craftbook-templates/re/release-artifact-sanity-check/manifest.json +24 -0
  130. package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.0/craftbook.json +202 -0
  131. package/data/craftbook-templates/re/release-artifact-sanity-check/versions/1.0.0/test.json +138 -0
  132. package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.0/craftbook.json +348 -0
  133. package/data/craftbook-templates/ro/root-cause-investigation/versions/2.0.0/test.json +153 -0
  134. package/data/craftbook-templates/se/security-architecture-review/versions/2.0.0/craftbook.json +353 -0
  135. package/data/craftbook-templates/se/security-architecture-review/versions/2.0.0/test.json +152 -0
  136. package/data/craftbook-templates/sp/spec-authoring/versions/2.0.0/craftbook.json +391 -0
  137. package/data/craftbook-templates/sp/spec-authoring/versions/2.0.0/test.json +162 -0
  138. package/data/craftbook-templates/te/technical-documentation/versions/2.0.0/craftbook.json +343 -0
  139. package/data/craftbook-templates/te/technical-documentation/versions/2.0.0/test.json +174 -0
  140. package/data/craftbook-templates/tr/translate-content/versions/1.1.0/craftbook.json +84 -0
  141. package/data/craftbook-templates/tr/translate-content/versions/1.1.0/test.json +141 -0
  142. package/package.json +10 -4
  143. package/schemas/chat-model-identity.schema.json +44 -0
  144. package/schemas/chat-model-version.schema.json +3 -0
  145. package/schemas/connector-type-identity.schema.json +3 -0
  146. package/schemas/connector-type-version.schema.json +3 -0
  147. package/schemas/craftbook-doc.schema.json +3 -0
  148. package/schemas/craftbook-template-identity.schema.json +3 -0
  149. package/schemas/craftbook-template-version.schema.json +3 -0
  150. package/schemas/craftbook-test.schema.json +232 -3
  151. package/schemas/gezel-template-identity.schema.json +3 -0
  152. package/schemas/gezel-template-version.schema.json +3 -0
  153. package/schemas/image-model-identity.schema.json +3 -0
  154. package/schemas/image-model-version.schema.json +3 -0
  155. package/schemas/project-type-identity.schema.json +3 -0
  156. package/schemas/project-type-version.schema.json +3 -0
  157. package/schemas/toolset-identity.schema.json +3 -0
  158. package/schemas/toolset-version.schema.json +3 -0
  159. package/schemas/video-model-identity.schema.json +3 -0
  160. package/schemas/video-model-version.schema.json +3 -0
@@ -0,0 +1,138 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "title": "Release Artifact Sanity Check evidence-fixture eval",
4
+ "objective": "Verify that the craftbook reconciles release integrity, signing, and package-member evidence into a conservative go/no-go report without live services or executable artifacts.",
5
+ "tags": [
6
+ "corpus",
7
+ "release",
8
+ "security"
9
+ ],
10
+ "prompt": "Use the Release Artifact Sanity Check craftbook on the captured dry-run evidence in `source/release-artifacts/`. These fixtures describe artifacts and package contents but are deliberately non-executable; do not use the network or invent new verification results. Write the final report to `release-artifact-sanity-report.md`.",
11
+ "setup": {
12
+ "projectName": "Release Artifact Sanity Check Eval",
13
+ "about": "A self-contained release-artifact audit. The source folder contains captured hashes, signature-tool results, and safe package listings for Boreal Desk v2.4.0.",
14
+ "missionObjectives": "Use the Release Artifact Sanity Check craftbook, reconcile every supplied item, treat missing trust or coverage as NOT VERIFIED, and produce an evidence-backed release-artifact-sanity-report.md without network calls or executing package contents.",
15
+ "files": [
16
+ {
17
+ "path": "source/release-artifacts/release-v2.4.0.md",
18
+ "content": "# Boreal Desk v2.4.0\n\nTag: v2.4.0\nRelease URL: https://example.invalid/boreal/releases/v2.4.0\nTop-level uploaded artifacts: 3\n\n| Artifact | GitHub sha256 digest | Bytes |\n| --- | --- | ---: |\n| BorealDesk-2.4.0-macos.zip | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | 4100 |\n| BorealDeskSetup-2.4.0.msi | bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb | 5200 |\n| BorealDesk-2.4.0.AppImage | dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd | 6300 |\n"
19
+ },
20
+ {
21
+ "path": "source/release-artifacts/SHA256SUMS",
22
+ "content": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa BorealDesk-2.4.0-macos.zip\nbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb BorealDeskSetup-2.4.0.msi\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd BorealDesk-2.4.0.AppImage\n"
23
+ },
24
+ {
25
+ "path": "source/release-artifacts/computed-hashes.txt",
26
+ "content": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa BorealDesk-2.4.0-macos.zip\ncccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc BorealDeskSetup-2.4.0.msi\ndddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd BorealDesk-2.4.0.AppImage\n"
27
+ },
28
+ {
29
+ "path": "source/release-artifacts/signature-evidence.md",
30
+ "content": "# Captured signature verifier output\n\n- `BorealDesk-2.4.0-macos.zip` expanded app: `codesign --verify --deep --strict` exit 0; Developer ID Application signer Team ID BDESK12345; `spctl` accepted and reported notarized. Trusted Apple root chain captured.\n- `BorealDeskSetup-2.4.0.msi`: `Get-AuthenticodeSignature` Status = NotSigned.\n- `BorealDesk-2.4.0.AppImage`: detached signature produced `GOODSIG build@boreal.example`, but the fixture contains no trusted fingerprint or key-source record. Treat signer trust as NOT VERIFIED.\n"
31
+ },
32
+ {
33
+ "path": "source/release-artifacts/package-inventory.txt",
34
+ "content": "SAFE LISTING ONLY — DO NOT EXECUTE\nDeclared contained regular files: 12\n\nmacos/Boreal Desk.app/Contents/MacOS/BorealDesk | Mach-O arm64+x86_64 | executable | signature covered\nmacos/Boreal Desk.app/Contents/Frameworks/Electron Framework.framework/Electron Framework | Mach-O | signature covered\nmacos/Boreal Desk.app/Contents/Resources/app.asar | ASAR | data\nmacos/Boreal Desk.app/Contents/Resources/current -> ../../outside | symlink escapes package root\nwindows/BorealDesk.exe | PE32+ | executable | Authenticode NotSigned\nwindows/updater.exe | PE32+ | executable | Authenticode NotSigned\nwindows/config/defaults.env | text | contains API_TOKEN=demo-hardcoded-token\nwindows/LICENSE.txt | text\nlinux/BorealDesk | ELF x86_64 | executable | covered only by untrusted outer GOODSIG\nlinux/usr/lib/libcrypto.so.3 | ELF shared library\nlinux/resources/app.asar | ASAR | data\nlinux/updater | ELF x86_64 | executable | no inner signature evidence\n\nArchive preflight: no absolute or `..` entry names; one escaping symlink is listed above. Expansion ratio stayed below the supplied limit. Local malware scanner was unavailable in the captured environment.\n"
35
+ }
36
+ ],
37
+ "worker": {
38
+ "name": "Ada",
39
+ "role": "Release Security Reviewer"
40
+ }
41
+ },
42
+ "mocks": [],
43
+ "success": {
44
+ "summary": "The report reconciles all three artifacts and 12 package members, reaches NO-GO from the supplied integrity/signing/package blockers, and does not invent live verification.",
45
+ "deliverables": [
46
+ {
47
+ "path": "release-artifact-sanity-report.md",
48
+ "kind": "markdown-report",
49
+ "minBytes": 2000,
50
+ "checks": [
51
+ {
52
+ "kind": "contains",
53
+ "file": "release-artifact-sanity-report.md",
54
+ "pattern": "(?:^|\\n)#{1,3}\\s+\\S",
55
+ "flags": "i"
56
+ },
57
+ {
58
+ "kind": "contains",
59
+ "file": "release-artifact-sanity-report.md",
60
+ "pattern": "NO-GO|NO GO",
61
+ "flags": "i",
62
+ "label": "derive a no-go decision from hard blockers"
63
+ },
64
+ {
65
+ "kind": "contains",
66
+ "file": "release-artifact-sanity-report.md",
67
+ "pattern": "BorealDeskSetup-2\\.4\\.0\\.msi[\\s\\S]{0,500}(?:mismatch|cccc|FAIL)|(?:mismatch|cccc|FAIL)[\\s\\S]{0,500}BorealDeskSetup-2\\.4\\.0\\.msi",
68
+ "flags": "i",
69
+ "label": "catch the Windows installer digest mismatch"
70
+ },
71
+ {
72
+ "kind": "contains",
73
+ "file": "release-artifact-sanity-report.md",
74
+ "pattern": "NotSigned|not signed|unsigned",
75
+ "flags": "i",
76
+ "label": "report missing Authenticode signing"
77
+ },
78
+ {
79
+ "kind": "contains",
80
+ "file": "release-artifact-sanity-report.md",
81
+ "pattern": "GOODSIG[\\s\\S]{0,300}(?:NOT VERIFIED|untrusted|trust)|(?:NOT VERIFIED|untrusted|trust)[\\s\\S]{0,300}GOODSIG",
82
+ "flags": "i",
83
+ "label": "distinguish signature presence from trusted identity"
84
+ },
85
+ {
86
+ "kind": "contains",
87
+ "file": "release-artifact-sanity-report.md",
88
+ "pattern": "Resources/current|escaping symlink|symlink escapes",
89
+ "flags": "i"
90
+ },
91
+ {
92
+ "kind": "contains",
93
+ "file": "release-artifact-sanity-report.md",
94
+ "pattern": "API_TOKEN|hardcoded-token|credential",
95
+ "flags": "i"
96
+ },
97
+ {
98
+ "kind": "contains",
99
+ "file": "release-artifact-sanity-report.md",
100
+ "pattern": "3\\s+(?:top-level\\s+)?artifacts|12\\s+(?:contained\\s+)?(?:regular\\s+)?files",
101
+ "flags": "i",
102
+ "label": "reconcile top-level and contained-file counts"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ "rubric": {
109
+ "artifact": {
110
+ "path": "release-artifact-sanity-report.md",
111
+ "kind": "markdown"
112
+ },
113
+ "axes": [
114
+ {
115
+ "name": "coverage",
116
+ "description": "Every top-level artifact and all 12 supplied package members are reconciled."
117
+ },
118
+ {
119
+ "name": "integrity",
120
+ "description": "Digest comparisons are explicit and the Windows mismatch drives the decision."
121
+ },
122
+ {
123
+ "name": "authenticity",
124
+ "description": "Signature presence, cryptographic validity, and trusted signer identity are kept distinct."
125
+ },
126
+ {
127
+ "name": "package safety",
128
+ "description": "The escaping symlink, unsigned executables, hardcoded token, and unavailable scanner are handled conservatively."
129
+ }
130
+ ]
131
+ },
132
+ "qualityFocus": [
133
+ "complete artifact and package-member reconciliation",
134
+ "trust-aware signature verification",
135
+ "evidence-backed no-go decision",
136
+ "non-executing hostile-input inspection"
137
+ ]
138
+ }
@@ -0,0 +1,348 @@
1
+ {
2
+ "id": "root-cause-investigation",
3
+ "name": "Root-Cause Investigation",
4
+ "description": "Debug systematically: reproduce the failure and find the true root cause before changing any code, then fix and verify. Enforces a no-fix-without-diagnosis discipline.",
5
+ "basedOn": {
6
+ "name": "gstack",
7
+ "url": "https://github.com/garrytan/gstack"
8
+ },
9
+ "plan": "Reproduce first, diagnose second, change code only after the evidence identifies a root cause. Keep an explicit hypothesis ledger so plausible stories cannot silently become facts. Prefer the smallest experiment that separates competing explanations. The final report must connect symptom, causal mechanism, fix, and regression proof with inspectable paths and command results.",
10
+ "entryStepId": "reproduce",
11
+ "triggers": [
12
+ "debug this",
13
+ "fix this bug",
14
+ "why is this broken",
15
+ "root cause analysis",
16
+ "investigate this error"
17
+ ],
18
+ "command": "root-cause-investigation",
19
+ "steps": [
20
+ {
21
+ "id": "reproduce",
22
+ "name": "Reproduce and bound the failure",
23
+ "description": "Establish a stable failing case, expected behavior, environment, and blast radius.",
24
+ "prompt": "Read the request, relevant code, existing tests, logs, and configuration. Reproduce the problem with the smallest safe case you can run. Record exact inputs, expected and actual results, environment details, frequency, and whether the failure is deterministic. If it cannot be reproduced, document the attempts and the missing observation needed; do not invent a cause or edit production code.\n\nObservable handoff: write the completed result to `investigations/reproduction.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
25
+ "suggestedRole": "debugging engineer",
26
+ "advanceWhen": {
27
+ "file": "investigations/reproduction.md",
28
+ "minBytes": 700,
29
+ "sniff": "nonempty",
30
+ "requireChange": true,
31
+ "goto": "diagnose"
32
+ },
33
+ "gate": {
34
+ "at": "completion",
35
+ "checks": [
36
+ {
37
+ "kind": "minBytes",
38
+ "file": "investigations/reproduction.md",
39
+ "bytes": 700
40
+ },
41
+ {
42
+ "kind": "sniff",
43
+ "file": "investigations/reproduction.md",
44
+ "sniff": "nonempty"
45
+ },
46
+ {
47
+ "kind": "contains",
48
+ "file": "investigations/reproduction.md",
49
+ "pattern": "^##\\s+Symptom",
50
+ "flags": "im",
51
+ "label": "Symptom section"
52
+ },
53
+ {
54
+ "kind": "contains",
55
+ "file": "investigations/reproduction.md",
56
+ "pattern": "^##\\s+Minimal reproduction",
57
+ "flags": "im",
58
+ "label": "Minimal reproduction section"
59
+ },
60
+ {
61
+ "kind": "contains",
62
+ "file": "investigations/reproduction.md",
63
+ "pattern": "^##\\s+Expected",
64
+ "flags": "im",
65
+ "label": "Expected behavior section"
66
+ },
67
+ {
68
+ "kind": "contains",
69
+ "file": "investigations/reproduction.md",
70
+ "pattern": "^##\\s+Actual",
71
+ "flags": "im",
72
+ "label": "Actual behavior section"
73
+ },
74
+ {
75
+ "kind": "contains",
76
+ "file": "investigations/reproduction.md",
77
+ "pattern": "^##\\s+Evidence",
78
+ "flags": "im",
79
+ "label": "Evidence section"
80
+ }
81
+ ],
82
+ "onReject": "reproduce",
83
+ "maxAttempts": 3
84
+ },
85
+ "next": "diagnose"
86
+ },
87
+ {
88
+ "id": "diagnose",
89
+ "name": "Prove the root cause",
90
+ "description": "Test competing hypotheses and identify the causal mechanism before modifying code.",
91
+ "prompt": "Use `investigations/reproduction.md` to form at least two plausible hypotheses. Trace the relevant execution and data paths with workspace search and file-reading tools. For each hypothesis, run a discriminating experiment and record its predicted versus observed outcome. Name the first bad state or decision, explain how it produces the symptom, and check for sibling cases. Do not change source code in this phase.\n\nObservable handoff: write the completed result to `investigations/root-cause-analysis.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
92
+ "suggestedRole": "root-cause analyst",
93
+ "advanceWhen": {
94
+ "file": "investigations/root-cause-analysis.md",
95
+ "minBytes": 1000,
96
+ "sniff": "nonempty",
97
+ "requireChange": true,
98
+ "goto": "fix-and-verify"
99
+ },
100
+ "gate": {
101
+ "at": "completion",
102
+ "checks": [
103
+ {
104
+ "kind": "minBytes",
105
+ "file": "investigations/root-cause-analysis.md",
106
+ "bytes": 1000
107
+ },
108
+ {
109
+ "kind": "sniff",
110
+ "file": "investigations/root-cause-analysis.md",
111
+ "sniff": "nonempty"
112
+ },
113
+ {
114
+ "kind": "contains",
115
+ "file": "investigations/root-cause-analysis.md",
116
+ "pattern": "^##\\s+Hypotheses",
117
+ "flags": "im",
118
+ "label": "Hypotheses section"
119
+ },
120
+ {
121
+ "kind": "contains",
122
+ "file": "investigations/root-cause-analysis.md",
123
+ "pattern": "^##\\s+Experiments",
124
+ "flags": "im",
125
+ "label": "Experiments section"
126
+ },
127
+ {
128
+ "kind": "contains",
129
+ "file": "investigations/root-cause-analysis.md",
130
+ "pattern": "^##\\s+Root cause",
131
+ "flags": "im",
132
+ "label": "Root cause section"
133
+ },
134
+ {
135
+ "kind": "contains",
136
+ "file": "investigations/root-cause-analysis.md",
137
+ "pattern": "^##\\s+Causal chain",
138
+ "flags": "im",
139
+ "label": "Causal chain section"
140
+ },
141
+ {
142
+ "kind": "contains",
143
+ "file": "investigations/root-cause-analysis.md",
144
+ "pattern": "^##\\s+Blast radius",
145
+ "flags": "im",
146
+ "label": "Blast radius section"
147
+ }
148
+ ],
149
+ "onReject": "diagnose",
150
+ "maxAttempts": 3
151
+ },
152
+ "next": "fix-and-verify"
153
+ },
154
+ {
155
+ "id": "fix-and-verify",
156
+ "name": "Implement the smallest fix and verify it",
157
+ "description": "Correct the proven mechanism and demonstrate both regression coverage and non-regression.",
158
+ "prompt": "Read both investigation files. Implement the smallest maintainable change that breaks the documented causal chain. Add or strengthen a regression test that fails on the old behavior and passes with the fix. Run the focused test, relevant neighboring tests, and any proportionate static checks. Record exact changed paths and exact verification commands with exit results. If the environment prevents a check, label it unverified and explain what is needed to run it.\n\nObservable handoff: write the completed result to `reports/root-cause-investigation.md` in the workspace. Do not merely describe what the file would contain. Re-read it before finishing this phase and repair any incomplete sections.",
159
+ "suggestedRole": "software engineer",
160
+ "advanceWhen": {
161
+ "file": "reports/root-cause-investigation.md",
162
+ "minBytes": 1200,
163
+ "sniff": "nonempty",
164
+ "requireChange": true,
165
+ "goto": "evaluate"
166
+ },
167
+ "gate": {
168
+ "at": "completion",
169
+ "checks": [
170
+ {
171
+ "kind": "minBytes",
172
+ "file": "reports/root-cause-investigation.md",
173
+ "bytes": 1200
174
+ },
175
+ {
176
+ "kind": "sniff",
177
+ "file": "reports/root-cause-investigation.md",
178
+ "sniff": "nonempty"
179
+ },
180
+ {
181
+ "kind": "contains",
182
+ "file": "reports/root-cause-investigation.md",
183
+ "pattern": "^##\\s+Root cause",
184
+ "flags": "im",
185
+ "label": "Root cause section"
186
+ },
187
+ {
188
+ "kind": "contains",
189
+ "file": "reports/root-cause-investigation.md",
190
+ "pattern": "^##\\s+Fix",
191
+ "flags": "im",
192
+ "label": "Fix section"
193
+ },
194
+ {
195
+ "kind": "contains",
196
+ "file": "reports/root-cause-investigation.md",
197
+ "pattern": "^##\\s+Changed files",
198
+ "flags": "im",
199
+ "label": "Changed files section"
200
+ },
201
+ {
202
+ "kind": "contains",
203
+ "file": "reports/root-cause-investigation.md",
204
+ "pattern": "^##\\s+Regression coverage",
205
+ "flags": "im",
206
+ "label": "Regression coverage section"
207
+ },
208
+ {
209
+ "kind": "contains",
210
+ "file": "reports/root-cause-investigation.md",
211
+ "pattern": "^##\\s+Verification",
212
+ "flags": "im",
213
+ "label": "Verification section"
214
+ },
215
+ {
216
+ "kind": "contains",
217
+ "file": "reports/root-cause-investigation.md",
218
+ "pattern": "^##\\s+Rollback",
219
+ "flags": "im",
220
+ "label": "Rollback section"
221
+ }
222
+ ],
223
+ "onReject": "fix-and-verify",
224
+ "maxAttempts": 3
225
+ },
226
+ "next": "evaluate"
227
+ },
228
+ {
229
+ "id": "evaluate",
230
+ "name": "Evaluate the deliverable",
231
+ "description": "Independently grade the observable deliverable and route it to finish, repair, or user escalation.",
232
+ "prompt": "Review `reports/root-cause-investigation.md`, `investigations/reproduction.md`, `investigations/root-cause-analysis.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. The failure is reproducible or the report explicitly stops without claiming an unproven diagnosis.\n2. Competing hypotheses were separated by recorded experiments rather than intuition.\n3. The stated root cause includes a causal chain from first bad state to observed symptom.\n4. The change is limited to that causal mechanism and covers identified sibling cases.\n5. A regression test and neighboring checks have concrete, credible results with no fabricated execution evidence.\n6. The report identifies changed files, residual risk, and a viable rollback.\n\nWrite an evidence-backed review to `reviews/root-cause-investigation-review.md`. Give each criterion a PASS or FAIL with a concrete path, excerpt, measurement, or observed behavior. End with exactly `Verdict: PASS` or `Verdict: REVISE`. Then use `advance_task_step` for the active task: PASS routes to `finish`; REVISE routes to `repair` for review rounds 1 through 2, and the 3th REVISE routes to `needs-user`. Never route to finish while a criterion is unmet.",
233
+ "suggestedRole": "debugging reviewer",
234
+ "gate": {
235
+ "at": "completion",
236
+ "checks": [
237
+ {
238
+ "kind": "minBytes",
239
+ "file": "reviews/root-cause-investigation-review.md",
240
+ "bytes": 400
241
+ },
242
+ {
243
+ "kind": "contains",
244
+ "file": "reviews/root-cause-investigation-review.md",
245
+ "pattern": "Verdict:\\s*(?:PASS|REVISE)",
246
+ "flags": "i",
247
+ "label": "explicit PASS or REVISE verdict"
248
+ }
249
+ ],
250
+ "onReject": "evaluate",
251
+ "maxAttempts": 3
252
+ },
253
+ "next": "repair"
254
+ },
255
+ {
256
+ "id": "repair",
257
+ "name": "Repair the deliverable",
258
+ "description": "Fix only the concrete gaps from the latest independent review.",
259
+ "prompt": "Read `reviews/root-cause-investigation-review.md` and repair every failed criterion in `reports/root-cause-investigation.md`, `investigations/reproduction.md`, `investigations/root-cause-analysis.md`. Make the changes in the actual workspace files, not just in task notes or a reply. Preserve evidence that already passed. Re-run or re-check anything the reviewer found unproven. Ensure `reports/root-cause-investigation.md` is genuinely updated this turn so the repair is observable, then hand it back for independent evaluation.",
260
+ "suggestedRole": "software engineer",
261
+ "advanceWhen": {
262
+ "file": "reports/root-cause-investigation.md",
263
+ "minBytes": 1200,
264
+ "sniff": "nonempty",
265
+ "requireChange": true,
266
+ "goto": "evaluate"
267
+ },
268
+ "gate": {
269
+ "at": "completion",
270
+ "checks": [
271
+ {
272
+ "kind": "minBytes",
273
+ "file": "reports/root-cause-investigation.md",
274
+ "bytes": 1200
275
+ },
276
+ {
277
+ "kind": "sniff",
278
+ "file": "reports/root-cause-investigation.md",
279
+ "sniff": "nonempty"
280
+ },
281
+ {
282
+ "kind": "contains",
283
+ "file": "reports/root-cause-investigation.md",
284
+ "pattern": "^##\\s+Root cause",
285
+ "flags": "im",
286
+ "label": "Root cause section"
287
+ },
288
+ {
289
+ "kind": "contains",
290
+ "file": "reports/root-cause-investigation.md",
291
+ "pattern": "^##\\s+Fix",
292
+ "flags": "im",
293
+ "label": "Fix section"
294
+ },
295
+ {
296
+ "kind": "contains",
297
+ "file": "reports/root-cause-investigation.md",
298
+ "pattern": "^##\\s+Changed files",
299
+ "flags": "im",
300
+ "label": "Changed files section"
301
+ },
302
+ {
303
+ "kind": "contains",
304
+ "file": "reports/root-cause-investigation.md",
305
+ "pattern": "^##\\s+Regression coverage",
306
+ "flags": "im",
307
+ "label": "Regression coverage section"
308
+ },
309
+ {
310
+ "kind": "contains",
311
+ "file": "reports/root-cause-investigation.md",
312
+ "pattern": "^##\\s+Verification",
313
+ "flags": "im",
314
+ "label": "Verification section"
315
+ },
316
+ {
317
+ "kind": "contains",
318
+ "file": "reports/root-cause-investigation.md",
319
+ "pattern": "^##\\s+Rollback",
320
+ "flags": "im",
321
+ "label": "Rollback section"
322
+ }
323
+ ],
324
+ "onReject": "repair",
325
+ "maxAttempts": 3
326
+ },
327
+ "next": "evaluate"
328
+ },
329
+ {
330
+ "id": "finish",
331
+ "name": "Finish",
332
+ "description": "All deterministic and reviewer criteria passed.",
333
+ "prompt": "The independent review passed. Read `reviews/root-cause-investigation-review.md`, then use `write_task_note` to record a concise DONE summary with the final deliverable paths (`reports/root-cause-investigation.md`, `investigations/reproduction.md`, `investigations/root-cause-analysis.md`) and the evidence that each acceptance criterion passed. Report DONE without starting new work.",
334
+ "suggestedRole": "project lead",
335
+ "terminal": true
336
+ },
337
+ {
338
+ "id": "needs-user",
339
+ "name": "Escalate unresolved concerns",
340
+ "description": "The bounded repair loop ended without a defensible pass.",
341
+ "prompt": "The deliverable did not pass after 3 review rounds. Do not claim success. Read `reviews/root-cause-investigation-review.md`, 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.",
342
+ "suggestedRole": "project lead",
343
+ "terminal": true
344
+ }
345
+ ],
346
+ "version": "2.0.0",
347
+ "releasedAt": "2026-08-09T00:00:00Z"
348
+ }
@@ -0,0 +1,153 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "title": "Root-Cause Investigation — decimal cart total regression",
4
+ "objective": "Require the Root-Cause Investigation craftbook to reproduce a deterministic failure, identify the causal mechanism before editing, implement the smallest fix, and prove the regression test passes.",
5
+ "tags": [
6
+ "workflow",
7
+ "debugging",
8
+ "code-with-tests",
9
+ "node"
10
+ ],
11
+ "prompt": "Use the Root-Cause Investigation craftbook to diagnose the failing decimal cart-total behavior in this workspace. First reproduce it with the existing dependency-free test and preserve concrete evidence; do not edit until a causal hypothesis has been tested. Then make the smallest correct source change, keep the regression coverage, and write the craftbook's artifacts, including `reports/root-cause-investigation.md`. The final report must cite the files inspected, distinguish root cause from symptom, include the exact verification command and result, and describe a safe rollback.",
12
+ "setup": {
13
+ "projectName": "Decimal cart total regression",
14
+ "about": "A tiny dependency-free Node project with one reproducible arithmetic defect. The initial test is expected to fail.",
15
+ "missionObjectives": "Restore exact cent-based addition for decimal prices without broad refactoring and leave a passing regression test plus an evidence-backed investigation report.",
16
+ "files": [
17
+ {
18
+ "path": "package.json",
19
+ "content": "{\n \"name\": \"cart-total-fixture\",\n \"private\": true,\n \"type\": \"module\"\n}\n"
20
+ },
21
+ {
22
+ "path": "src/cart-total.js",
23
+ "content": "/** Sum display-price strings and return a two-decimal total. */\nexport function cartTotal(prices) {\n const cents = prices.reduce((sum, price) => sum + parseInt(price, 10) * 100, 0);\n return (cents / 100).toFixed(2);\n}\n"
24
+ },
25
+ {
26
+ "path": "tests/cart-total.test.mjs",
27
+ "content": "import test from 'node:test';\nimport assert from 'node:assert/strict';\nimport { cartTotal } from '../src/cart-total.js';\n\ntest('keeps cents when totaling decimal display prices', () => {\n assert.equal(cartTotal(['19.99', '5.50']), '25.49');\n});\n\ntest('handles a single whole-dollar price', () => {\n assert.equal(cartTotal(['7.00']), '7.00');\n});\n"
28
+ },
29
+ {
30
+ "path": "source/incident.md",
31
+ "content": "# Incident note\n\nCheckout preview showed **$24.00** for line items **$19.99** and **$5.50**. The expected total is **$25.49**. The defect appeared after price inputs changed from integer-dollar strings to two-decimal display strings. No production data migration is in scope.\n"
32
+ },
33
+ {
34
+ "path": "tests/verify-cart-total.mjs",
35
+ "content": "import assert from 'node:assert/strict';\nimport { cartTotal } from '../src/cart-total.js';\n\nconst cases = [\n [['19.99', '5.50'], '25.49'],\n [['0.10', '0.20'], '0.30'],\n [['12.34', '0.66'], '13.00'],\n [['7.00'], '7.00'],\n [['1.01', '2.02', '3.03'], '6.06'],\n];\nfor (const [prices, expected] of cases) assert.equal(cartTotal(prices), expected, prices.join(' + '));\nconsole.log('CART_TOTAL_ORACLE_OK 5/5');\n",
36
+ "surface": "harness"
37
+ }
38
+ ]
39
+ },
40
+ "mocks": [],
41
+ "success": {
42
+ "summary": "The decimal regression is fixed by a diagnosed causal change, the existing test passes, and the craftbook report preserves reproducible evidence.",
43
+ "deliverables": [
44
+ {
45
+ "path": "reports/root-cause-investigation.md",
46
+ "kind": "markdown-report",
47
+ "minBytes": 1200,
48
+ "checks": [
49
+ {
50
+ "kind": "contains",
51
+ "file": "reports/root-cause-investigation.md",
52
+ "pattern": "^#{1,3}\\s+Root cause\\b[\\s\\S]*^#{1,3}\\s+(Fix|Changed files)\\b[\\s\\S]*^#{1,3}\\s+(Regression coverage|Verification)\\b[\\s\\S]*^#{1,3}\\s+Rollback\\b",
53
+ "flags": "im",
54
+ "label": "root cause through rollback sections"
55
+ },
56
+ {
57
+ "kind": "contains",
58
+ "file": "reports/root-cause-investigation.md",
59
+ "pattern": "parseInt|truncat(?:e|ed|ion)|discard(?:s|ed)?\\s+(?:the\\s+)?(?:decimal|fractional|cent)",
60
+ "flags": "i",
61
+ "label": "causal mechanism"
62
+ },
63
+ {
64
+ "kind": "contains",
65
+ "file": "reports/root-cause-investigation.md",
66
+ "pattern": "node\\s+--test\\s+tests/cart-total\\.test\\.mjs[\\s\\S]*(pass|2\\s+tests?|exit(?:ed)?\\s+0)",
67
+ "flags": "i",
68
+ "label": "verification command and result"
69
+ },
70
+ {
71
+ "kind": "citationsResolve",
72
+ "file": "reports/root-cause-investigation.md",
73
+ "minCitations": 2
74
+ }
75
+ ]
76
+ }
77
+ ],
78
+ "checks": [
79
+ {
80
+ "kind": "notContains",
81
+ "file": "src/cart-total.js",
82
+ "pattern": "\\bparseInt\\s*\\(",
83
+ "label": "lossy integer parsing removed"
84
+ },
85
+ {
86
+ "kind": "sourceParses",
87
+ "file": "src/cart-total.js"
88
+ },
89
+ {
90
+ "kind": "nodeRuns",
91
+ "file": "tests/cart-total.test.mjs",
92
+ "timeoutMs": 20000
93
+ },
94
+ {
95
+ "kind": "nodeScriptPasses",
96
+ "script": "tests/verify-cart-total.mjs",
97
+ "requiredOutput": [
98
+ {
99
+ "pattern": "CART_TOTAL_ORACLE_OK 5/5",
100
+ "label": "hidden multi-case regression oracle"
101
+ }
102
+ ]
103
+ }
104
+ ],
105
+ "taskNotes": {
106
+ "minBytes": 180,
107
+ "checks": [
108
+ {
109
+ "kind": "contains",
110
+ "file": "task-notes.md",
111
+ "pattern": "\\bDONE\\b[\\s\\S]*(node\\s+--test|tests/cart-total\\.test\\.mjs)[\\s\\S]*reports/root-cause-investigation\\.md",
112
+ "flags": "i",
113
+ "label": "terminal note records proof and report"
114
+ }
115
+ ],
116
+ "requireCraftbookTask": true
117
+ },
118
+ "taskGraph": {
119
+ "requireCraftbookTask": true,
120
+ "requireTerminalStep": true
121
+ },
122
+ "unchangedFixtures": [
123
+ "package.json",
124
+ "tests/cart-total.test.mjs",
125
+ "source/incident.md"
126
+ ]
127
+ },
128
+ "rubric": {
129
+ "artifact": {
130
+ "path": "reports/root-cause-investigation.md",
131
+ "kind": "markdown"
132
+ },
133
+ "axes": [
134
+ {
135
+ "name": "Causal rigor",
136
+ "description": "The report explains why the observed inputs fail in this implementation and distinguishes causal evidence from guesses."
137
+ },
138
+ {
139
+ "name": "Fix discipline",
140
+ "description": "The source change is minimal, directly addresses the diagnosed mechanism, and avoids unrelated refactoring."
141
+ },
142
+ {
143
+ "name": "Verification quality",
144
+ "description": "Reproduction, regression coverage, final command result, blast radius, and rollback are concrete and auditable."
145
+ }
146
+ ]
147
+ },
148
+ "qualityFocus": [
149
+ "Diagnosis precedes source edits",
150
+ "The fix preserves decimal cents and passes the dependency-free test",
151
+ "The final report cites real workspace files and includes rollback"
152
+ ]
153
+ }