@qball-inc/the-bulwark 1.0.0

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 (175) hide show
  1. package/.claude-plugin/plugin.json +43 -0
  2. package/agents/bulwark-fix-validator.md +633 -0
  3. package/agents/bulwark-implementer.md +391 -0
  4. package/agents/bulwark-issue-analyzer.md +308 -0
  5. package/agents/bulwark-standards-reviewer.md +221 -0
  6. package/agents/plan-creation-architect.md +323 -0
  7. package/agents/plan-creation-eng-lead.md +352 -0
  8. package/agents/plan-creation-po.md +300 -0
  9. package/agents/plan-creation-qa-critic.md +334 -0
  10. package/agents/product-ideation-competitive-analyzer.md +298 -0
  11. package/agents/product-ideation-idea-validator.md +268 -0
  12. package/agents/product-ideation-market-researcher.md +292 -0
  13. package/agents/product-ideation-pattern-documenter.md +308 -0
  14. package/agents/product-ideation-segment-analyzer.md +303 -0
  15. package/agents/product-ideation-strategist.md +259 -0
  16. package/agents/statusline-setup.md +97 -0
  17. package/hooks/hooks.json +59 -0
  18. package/package.json +45 -0
  19. package/scripts/hooks/cleanup-stale.sh +13 -0
  20. package/scripts/hooks/enforce-quality.sh +166 -0
  21. package/scripts/hooks/implementer-quality.sh +256 -0
  22. package/scripts/hooks/inject-protocol.sh +52 -0
  23. package/scripts/hooks/suggest-pipeline.sh +175 -0
  24. package/scripts/hooks/track-pipeline-start.sh +37 -0
  25. package/scripts/hooks/track-pipeline-stop.sh +52 -0
  26. package/scripts/init-rules.sh +35 -0
  27. package/scripts/init.sh +151 -0
  28. package/skills/anthropic-validator/SKILL.md +607 -0
  29. package/skills/anthropic-validator/references/agents-checklist.md +131 -0
  30. package/skills/anthropic-validator/references/commands-checklist.md +102 -0
  31. package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
  32. package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
  33. package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
  34. package/skills/anthropic-validator/references/skills-checklist.md +85 -0
  35. package/skills/assertion-patterns/SKILL.md +296 -0
  36. package/skills/bug-magnet-data/SKILL.md +284 -0
  37. package/skills/bug-magnet-data/context/cli-args.md +91 -0
  38. package/skills/bug-magnet-data/context/db-query.md +104 -0
  39. package/skills/bug-magnet-data/context/file-contents.md +103 -0
  40. package/skills/bug-magnet-data/context/http-body.md +91 -0
  41. package/skills/bug-magnet-data/context/process-spawn.md +123 -0
  42. package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
  43. package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
  44. package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
  45. package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
  46. package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
  47. package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
  48. package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
  49. package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
  50. package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
  51. package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
  52. package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
  53. package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
  54. package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
  55. package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
  56. package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
  57. package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
  58. package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
  59. package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
  60. package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
  61. package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
  62. package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
  63. package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
  64. package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
  65. package/skills/bug-magnet-data/references/external-lists.md +115 -0
  66. package/skills/bulwark-brainstorm/SKILL.md +563 -0
  67. package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
  68. package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
  69. package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
  70. package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
  71. package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
  72. package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
  73. package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
  74. package/skills/bulwark-research/SKILL.md +298 -0
  75. package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
  76. package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
  77. package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
  78. package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
  79. package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
  80. package/skills/bulwark-scaffold/SKILL.md +330 -0
  81. package/skills/bulwark-statusline/SKILL.md +161 -0
  82. package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
  83. package/skills/bulwark-verify/SKILL.md +519 -0
  84. package/skills/code-review/SKILL.md +428 -0
  85. package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
  86. package/skills/code-review/examples/anti-patterns/security.ts +91 -0
  87. package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
  88. package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
  89. package/skills/code-review/examples/recommended/linting.ts +195 -0
  90. package/skills/code-review/examples/recommended/security.ts +154 -0
  91. package/skills/code-review/examples/recommended/standards.ts +231 -0
  92. package/skills/code-review/examples/recommended/type-safety.ts +181 -0
  93. package/skills/code-review/frameworks/angular.md +218 -0
  94. package/skills/code-review/frameworks/django.md +235 -0
  95. package/skills/code-review/frameworks/express.md +207 -0
  96. package/skills/code-review/frameworks/flask.md +298 -0
  97. package/skills/code-review/frameworks/generic.md +146 -0
  98. package/skills/code-review/frameworks/react.md +152 -0
  99. package/skills/code-review/frameworks/vue.md +244 -0
  100. package/skills/code-review/references/linting-patterns.md +221 -0
  101. package/skills/code-review/references/security-patterns.md +125 -0
  102. package/skills/code-review/references/standards-patterns.md +246 -0
  103. package/skills/code-review/references/type-safety-patterns.md +130 -0
  104. package/skills/component-patterns/SKILL.md +131 -0
  105. package/skills/component-patterns/references/pattern-cli-command.md +118 -0
  106. package/skills/component-patterns/references/pattern-database.md +166 -0
  107. package/skills/component-patterns/references/pattern-external-api.md +139 -0
  108. package/skills/component-patterns/references/pattern-file-parser.md +168 -0
  109. package/skills/component-patterns/references/pattern-http-server.md +162 -0
  110. package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
  111. package/skills/continuous-feedback/SKILL.md +327 -0
  112. package/skills/continuous-feedback/references/collect-instructions.md +81 -0
  113. package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
  114. package/skills/continuous-feedback/references/specialize-general.md +98 -0
  115. package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
  116. package/skills/create-skill/SKILL.md +359 -0
  117. package/skills/create-skill/references/agent-conventions.md +194 -0
  118. package/skills/create-skill/references/agent-template.md +195 -0
  119. package/skills/create-skill/references/content-guidance.md +291 -0
  120. package/skills/create-skill/references/decision-framework.md +124 -0
  121. package/skills/create-skill/references/template-pipeline.md +217 -0
  122. package/skills/create-skill/references/template-reference-heavy.md +111 -0
  123. package/skills/create-skill/references/template-research.md +210 -0
  124. package/skills/create-skill/references/template-script-driven.md +172 -0
  125. package/skills/create-skill/references/template-simple.md +80 -0
  126. package/skills/create-subagent/SKILL.md +353 -0
  127. package/skills/create-subagent/references/agent-conventions.md +268 -0
  128. package/skills/create-subagent/references/content-guidance.md +232 -0
  129. package/skills/create-subagent/references/decision-framework.md +134 -0
  130. package/skills/create-subagent/references/template-single-agent.md +192 -0
  131. package/skills/fix-bug/SKILL.md +241 -0
  132. package/skills/governance-protocol/SKILL.md +116 -0
  133. package/skills/init/SKILL.md +341 -0
  134. package/skills/issue-debugging/SKILL.md +385 -0
  135. package/skills/issue-debugging/references/anti-patterns.md +245 -0
  136. package/skills/issue-debugging/references/debug-report-schema.md +227 -0
  137. package/skills/mock-detection/SKILL.md +511 -0
  138. package/skills/mock-detection/references/false-positive-prevention.md +402 -0
  139. package/skills/mock-detection/references/stub-patterns.md +236 -0
  140. package/skills/pipeline-templates/SKILL.md +215 -0
  141. package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
  142. package/skills/pipeline-templates/references/code-review.md +336 -0
  143. package/skills/pipeline-templates/references/fix-validation.md +421 -0
  144. package/skills/pipeline-templates/references/new-feature.md +335 -0
  145. package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
  146. package/skills/pipeline-templates/references/research-planning.md +257 -0
  147. package/skills/pipeline-templates/references/test-audit.md +389 -0
  148. package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
  149. package/skills/plan-creation/SKILL.md +497 -0
  150. package/skills/product-ideation/SKILL.md +372 -0
  151. package/skills/product-ideation/references/analysis-frameworks.md +161 -0
  152. package/skills/session-handoff/SKILL.md +139 -0
  153. package/skills/session-handoff/references/examples.md +223 -0
  154. package/skills/setup-lsp/SKILL.md +312 -0
  155. package/skills/setup-lsp/references/server-registry.md +85 -0
  156. package/skills/setup-lsp/references/troubleshooting.md +135 -0
  157. package/skills/subagent-output-templating/SKILL.md +415 -0
  158. package/skills/subagent-output-templating/references/examples.md +440 -0
  159. package/skills/subagent-prompting/SKILL.md +364 -0
  160. package/skills/subagent-prompting/references/examples.md +342 -0
  161. package/skills/test-audit/SKILL.md +531 -0
  162. package/skills/test-audit/references/known-limitations.md +41 -0
  163. package/skills/test-audit/references/priority-classification.md +30 -0
  164. package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
  165. package/skills/test-audit/references/prompts/synthesis.md +57 -0
  166. package/skills/test-audit/references/rewrite-instructions.md +46 -0
  167. package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
  168. package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
  169. package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
  170. package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
  171. package/skills/test-audit/scripts/package.json +20 -0
  172. package/skills/test-audit/scripts/skip-detector.ts +211 -0
  173. package/skills/test-audit/scripts/verification-counter.ts +295 -0
  174. package/skills/test-classification/SKILL.md +310 -0
  175. package/skills/test-fixture-creation/SKILL.md +295 -0
@@ -0,0 +1,187 @@
1
+ metadata:
2
+ version: "1.0.0"
3
+ last_updated: "2026-02-01"
4
+ source_urls: []
5
+
6
+ category: formats
7
+ subcategory: json
8
+ tier: T2
9
+
10
+ bugs_caught:
11
+ - "JSON parsing errors"
12
+ - "Edge case handling"
13
+ - "Security issues"
14
+
15
+ values:
16
+ # Valid edge cases
17
+ empty_object:
18
+ value: "{}"
19
+ valid: true
20
+ bugs_caught:
21
+ - "Empty object handling"
22
+ safe_for_automation: true
23
+
24
+ empty_array:
25
+ value: "[]"
26
+ valid: true
27
+ bugs_caught:
28
+ - "Empty array handling"
29
+ safe_for_automation: true
30
+
31
+ nested_deep:
32
+ value: "[[[[[[[[[[]]]]]]]]]]"
33
+ valid: true
34
+ bugs_caught:
35
+ - "Deep nesting"
36
+ - "Stack overflow"
37
+ safe_for_automation: true
38
+
39
+ large_number:
40
+ value: "{\"n\": 9999999999999999999999999999999}"
41
+ valid: true
42
+ bugs_caught:
43
+ - "Large number precision"
44
+ safe_for_automation: true
45
+
46
+ scientific_notation:
47
+ value: "{\"n\": 1e100}"
48
+ valid: true
49
+ bugs_caught:
50
+ - "Scientific notation"
51
+ safe_for_automation: true
52
+
53
+ negative_zero:
54
+ value: "{\"n\": -0}"
55
+ valid: true
56
+ bugs_caught:
57
+ - "Negative zero"
58
+ safe_for_automation: true
59
+
60
+ unicode_escape:
61
+ value: "{\"s\": \"\\u0041\"}"
62
+ valid: true
63
+ bugs_caught:
64
+ - "Unicode escape"
65
+ safe_for_automation: true
66
+
67
+ escaped_chars:
68
+ value: "{\"s\": \"\\\"\\\\\\n\\r\\t\"}"
69
+ valid: true
70
+ bugs_caught:
71
+ - "Escape sequence handling"
72
+ safe_for_automation: true
73
+
74
+ null_value:
75
+ value: "{\"n\": null}"
76
+ valid: true
77
+ bugs_caught:
78
+ - "JSON null handling"
79
+ safe_for_automation: true
80
+
81
+ boolean_values:
82
+ value: "{\"t\": true, \"f\": false}"
83
+ valid: true
84
+ bugs_caught:
85
+ - "Boolean handling"
86
+ safe_for_automation: true
87
+
88
+ # Invalid JSON
89
+ trailing_comma_object:
90
+ value: "{\"a\": 1,}"
91
+ valid: false
92
+ bugs_caught:
93
+ - "Trailing comma (invalid in JSON)"
94
+ safe_for_automation: true
95
+
96
+ trailing_comma_array:
97
+ value: "[1, 2, 3,]"
98
+ valid: false
99
+ bugs_caught:
100
+ - "Trailing comma array"
101
+ safe_for_automation: true
102
+
103
+ single_quotes:
104
+ value: "{'a': 1}"
105
+ valid: false
106
+ bugs_caught:
107
+ - "Single quotes (invalid JSON)"
108
+ safe_for_automation: true
109
+
110
+ unquoted_key:
111
+ value: "{a: 1}"
112
+ valid: false
113
+ bugs_caught:
114
+ - "Unquoted key (invalid JSON)"
115
+ safe_for_automation: true
116
+
117
+ comments:
118
+ value: "{\"a\": 1 /* comment */}"
119
+ valid: false
120
+ bugs_caught:
121
+ - "Comments (invalid JSON)"
122
+ safe_for_automation: true
123
+
124
+ undefined:
125
+ value: "{\"a\": undefined}"
126
+ valid: false
127
+ bugs_caught:
128
+ - "undefined (invalid JSON)"
129
+ safe_for_automation: true
130
+
131
+ nan:
132
+ value: "{\"a\": NaN}"
133
+ valid: false
134
+ bugs_caught:
135
+ - "NaN (invalid JSON)"
136
+ safe_for_automation: true
137
+
138
+ infinity:
139
+ value: "{\"a\": Infinity}"
140
+ valid: false
141
+ bugs_caught:
142
+ - "Infinity (invalid JSON)"
143
+ safe_for_automation: true
144
+
145
+ unclosed_object:
146
+ value: "{\"a\": 1"
147
+ valid: false
148
+ bugs_caught:
149
+ - "Unclosed object"
150
+ safe_for_automation: true
151
+
152
+ unclosed_array:
153
+ value: "[1, 2, 3"
154
+ valid: false
155
+ bugs_caught:
156
+ - "Unclosed array"
157
+ safe_for_automation: true
158
+
159
+ unclosed_string:
160
+ value: "{\"a\": \"hello}"
161
+ valid: false
162
+ bugs_caught:
163
+ - "Unclosed string"
164
+ safe_for_automation: true
165
+
166
+ empty:
167
+ value: ""
168
+ valid: false
169
+ bugs_caught:
170
+ - "Empty input"
171
+ safe_for_automation: true
172
+
173
+ whitespace_only:
174
+ value: " "
175
+ valid: false
176
+ bugs_caught:
177
+ - "Whitespace only"
178
+ safe_for_automation: true
179
+
180
+ # Security concerns
181
+ proto_pollution:
182
+ value: "{\"__proto__\": {\"polluted\": true}}"
183
+ valid: true
184
+ bugs_caught:
185
+ - "Prototype pollution via JSON"
186
+ safe_for_automation: true
187
+ severity: security
@@ -0,0 +1,165 @@
1
+ metadata:
2
+ version: "1.0.0"
3
+ last_updated: "2026-02-01"
4
+ source_urls: []
5
+
6
+ category: formats
7
+ subcategory: url
8
+ tier: T2
9
+
10
+ bugs_caught:
11
+ - "URL parsing errors"
12
+ - "Protocol handling"
13
+ - "Encoding issues"
14
+
15
+ values:
16
+ # Valid URLs often mishandled
17
+ no_www:
18
+ value: "https://example.com"
19
+ valid: true
20
+ bugs_caught:
21
+ - "Missing www handling"
22
+ safe_for_automation: true
23
+
24
+ with_port:
25
+ value: "https://example.com:8080"
26
+ valid: true
27
+ bugs_caught:
28
+ - "Port number handling"
29
+ safe_for_automation: true
30
+
31
+ with_auth:
32
+ value: "https://user:pass@example.com"
33
+ valid: true
34
+ bugs_caught:
35
+ - "URL authentication"
36
+ - "Credential exposure"
37
+ safe_for_automation: true
38
+
39
+ with_query:
40
+ value: "https://example.com?foo=bar&baz=qux"
41
+ valid: true
42
+ bugs_caught:
43
+ - "Query string parsing"
44
+ safe_for_automation: true
45
+
46
+ with_fragment:
47
+ value: "https://example.com#section"
48
+ valid: true
49
+ bugs_caught:
50
+ - "Fragment handling"
51
+ safe_for_automation: true
52
+
53
+ encoded_space:
54
+ value: "https://example.com/path%20with%20spaces"
55
+ valid: true
56
+ bugs_caught:
57
+ - "URL encoding"
58
+ safe_for_automation: true
59
+
60
+ unicode_path:
61
+ value: "https://example.com/cafรฉ"
62
+ valid: true
63
+ bugs_caught:
64
+ - "Unicode in path"
65
+ - "IRI handling"
66
+ safe_for_automation: true
67
+
68
+ idn:
69
+ value: "https://mรผnchen.de"
70
+ valid: true
71
+ bugs_caught:
72
+ - "International domain"
73
+ - "Punycode"
74
+ safe_for_automation: true
75
+
76
+ ipv4:
77
+ value: "http://192.168.1.1"
78
+ valid: true
79
+ bugs_caught:
80
+ - "IPv4 address"
81
+ safe_for_automation: true
82
+
83
+ ipv6:
84
+ value: "http://[::1]"
85
+ valid: true
86
+ bugs_caught:
87
+ - "IPv6 address"
88
+ - "Bracket notation"
89
+ safe_for_automation: true
90
+
91
+ localhost:
92
+ value: "http://localhost"
93
+ valid: true
94
+ bugs_caught:
95
+ - "Localhost handling"
96
+ safe_for_automation: true
97
+
98
+ file_protocol:
99
+ value: "file:///etc/passwd"
100
+ valid: true
101
+ bugs_caught:
102
+ - "File protocol"
103
+ - "Local file access"
104
+ safe_for_automation: true
105
+
106
+ data_uri:
107
+ value: "data:text/plain;base64,SGVsbG8="
108
+ valid: true
109
+ bugs_caught:
110
+ - "Data URI"
111
+ - "Embedded data"
112
+ safe_for_automation: true
113
+
114
+ javascript_uri:
115
+ value: "javascript:alert(1)"
116
+ valid: true
117
+ bugs_caught:
118
+ - "JavaScript protocol"
119
+ - "XSS via URL"
120
+ safe_for_automation: true
121
+ severity: security
122
+
123
+ # Malformed URLs
124
+ no_protocol:
125
+ value: "example.com"
126
+ bugs_caught:
127
+ - "Missing protocol"
128
+ safe_for_automation: true
129
+
130
+ double_slash_path:
131
+ value: "https://example.com//path"
132
+ bugs_caught:
133
+ - "Double slash in path"
134
+ safe_for_automation: true
135
+
136
+ backslash:
137
+ value: "https://example.com\\path"
138
+ bugs_caught:
139
+ - "Backslash in URL"
140
+ safe_for_automation: true
141
+
142
+ newline:
143
+ value: "https://example.com/\npath"
144
+ bugs_caught:
145
+ - "Newline in URL"
146
+ - "Header injection"
147
+ safe_for_automation: true
148
+
149
+ tab:
150
+ value: "https://example.com/\tpath"
151
+ bugs_caught:
152
+ - "Tab in URL"
153
+ safe_for_automation: true
154
+
155
+ empty:
156
+ value: ""
157
+ bugs_caught:
158
+ - "Empty URL"
159
+ safe_for_automation: true
160
+
161
+ whitespace_only:
162
+ value: " "
163
+ bugs_caught:
164
+ - "Whitespace URL"
165
+ safe_for_automation: true
@@ -0,0 +1,182 @@
1
+ metadata:
2
+ version: "1.0.0"
3
+ last_updated: "2026-02-01"
4
+ source_urls: []
5
+
6
+ category: language-specific
7
+ subcategory: javascript
8
+ tier: T2
9
+
10
+ bugs_caught:
11
+ - "JavaScript type coercion"
12
+ - "Equality comparison bugs"
13
+ - "Truthy/falsy confusion"
14
+
15
+ values:
16
+ # Equality quirks
17
+ eq_vs_strict:
18
+ comparisons:
19
+ - expr: "0 == ''"
20
+ result: true
21
+ - expr: "0 === ''"
22
+ result: false
23
+ bugs_caught:
24
+ - "== vs === confusion"
25
+ - "Type coercion in comparison"
26
+ safe_for_automation: true
27
+
28
+ null_undefined_eq:
29
+ comparisons:
30
+ - expr: "null == undefined"
31
+ result: true
32
+ - expr: "null === undefined"
33
+ result: false
34
+ bugs_caught:
35
+ - "null/undefined equivalence"
36
+ safe_for_automation: true
37
+
38
+ array_comparison:
39
+ comparisons:
40
+ - expr: "[] == []"
41
+ result: false
42
+ - expr: "[] == false"
43
+ result: true
44
+ - expr: "[] == ''"
45
+ result: true
46
+ bugs_caught:
47
+ - "Array comparison by reference"
48
+ - "Array coercion"
49
+ safe_for_automation: true
50
+
51
+ object_comparison:
52
+ comparisons:
53
+ - expr: "{} == {}"
54
+ result: false
55
+ - expr: "{} == '[object Object]'"
56
+ result: false
57
+ bugs_caught:
58
+ - "Object comparison by reference"
59
+ safe_for_automation: true
60
+
61
+ # Type coercion
62
+ plus_operator:
63
+ expressions:
64
+ - expr: "'5' + 3"
65
+ result: "'53'"
66
+ - expr: "5 + '3'"
67
+ result: "'53'"
68
+ - expr: "5 - '3'"
69
+ result: 2
70
+ bugs_caught:
71
+ - "+ operator string coercion"
72
+ - "Inconsistent arithmetic"
73
+ safe_for_automation: true
74
+
75
+ array_to_number:
76
+ expressions:
77
+ - expr: "+[]"
78
+ result: 0
79
+ - expr: "+[1]"
80
+ result: 1
81
+ - expr: "+[1,2]"
82
+ result: "NaN"
83
+ bugs_caught:
84
+ - "Array coercion to number"
85
+ safe_for_automation: true
86
+
87
+ # Truthy/falsy edge cases
88
+ empty_array_truthy:
89
+ value: "[]"
90
+ truthy: true
91
+ bugs_caught:
92
+ - "Empty array is truthy"
93
+ - "Need length check"
94
+ safe_for_automation: true
95
+
96
+ empty_object_truthy:
97
+ value: "{}"
98
+ truthy: true
99
+ bugs_caught:
100
+ - "Empty object is truthy"
101
+ - "Need Object.keys check"
102
+ safe_for_automation: true
103
+
104
+ nan_falsy:
105
+ value: "NaN"
106
+ truthy: false
107
+ bugs_caught:
108
+ - "NaN is falsy"
109
+ safe_for_automation: true
110
+
111
+ # typeof quirks
112
+ typeof_null:
113
+ expr: "typeof null"
114
+ result: "'object'"
115
+ bugs_caught:
116
+ - "typeof null is 'object'"
117
+ safe_for_automation: true
118
+
119
+ typeof_array:
120
+ expr: "typeof []"
121
+ result: "'object'"
122
+ bugs_caught:
123
+ - "Arrays are 'object' not 'array'"
124
+ safe_for_automation: true
125
+
126
+ typeof_nan:
127
+ expr: "typeof NaN"
128
+ result: "'number'"
129
+ bugs_caught:
130
+ - "NaN is type 'number'"
131
+ safe_for_automation: true
132
+
133
+ # Array methods
134
+ array_sort_numeric:
135
+ expr: "[10, 2, 1].sort()"
136
+ result: "[1, 10, 2]"
137
+ bugs_caught:
138
+ - "Default sort is lexicographic"
139
+ safe_for_automation: true
140
+
141
+ array_includes_nan:
142
+ expr: "[NaN].includes(NaN)"
143
+ result: true
144
+ bugs_caught:
145
+ - "includes works with NaN"
146
+ safe_for_automation: true
147
+
148
+ array_indexof_nan:
149
+ expr: "[NaN].indexOf(NaN)"
150
+ result: -1
151
+ bugs_caught:
152
+ - "indexOf fails with NaN"
153
+ safe_for_automation: true
154
+
155
+ # Number edge cases
156
+ parseint_leading_zero:
157
+ expr: "parseInt('08')"
158
+ result: 8
159
+ bugs_caught:
160
+ - "parseInt octal (fixed in ES5)"
161
+ safe_for_automation: true
162
+
163
+ parsefloat_trailing:
164
+ expr: "parseFloat('3.14abc')"
165
+ result: 3.14
166
+ bugs_caught:
167
+ - "parseFloat ignores trailing chars"
168
+ safe_for_automation: true
169
+
170
+ number_constructor:
171
+ expressions:
172
+ - expr: "Number('')"
173
+ result: 0
174
+ - expr: "Number(' ')"
175
+ result: 0
176
+ - expr: "Number(null)"
177
+ result: 0
178
+ - expr: "Number(undefined)"
179
+ result: "NaN"
180
+ bugs_caught:
181
+ - "Number() edge cases"
182
+ safe_for_automation: true
@@ -0,0 +1,174 @@
1
+ metadata:
2
+ version: "1.0.0"
3
+ last_updated: "2026-02-01"
4
+ source_urls: []
5
+
6
+ category: language-specific
7
+ subcategory: python
8
+ tier: T2
9
+
10
+ bugs_caught:
11
+ - "Python-specific gotchas"
12
+ - "Mutable default arguments"
13
+ - "None vs False confusion"
14
+
15
+ values:
16
+ # None vs False
17
+ none_vs_false:
18
+ comparisons:
19
+ - expr: "None == False"
20
+ result: "False"
21
+ - expr: "not None"
22
+ result: "True"
23
+ - expr: "bool(None)"
24
+ result: "False"
25
+ bugs_caught:
26
+ - "None == False is False"
27
+ - "None is falsy but != False"
28
+ safe_for_automation: true
29
+
30
+ # Empty containers
31
+ empty_list_falsy:
32
+ value: "[]"
33
+ bool_value: "False"
34
+ bugs_caught:
35
+ - "Empty list is falsy"
36
+ safe_for_automation: true
37
+
38
+ empty_dict_falsy:
39
+ value: "{}"
40
+ bool_value: "False"
41
+ bugs_caught:
42
+ - "Empty dict is falsy"
43
+ safe_for_automation: true
44
+
45
+ empty_string_falsy:
46
+ value: "''"
47
+ bool_value: "False"
48
+ bugs_caught:
49
+ - "Empty string is falsy"
50
+ safe_for_automation: true
51
+
52
+ zero_falsy:
53
+ value: "0"
54
+ bool_value: "False"
55
+ bugs_caught:
56
+ - "Zero is falsy"
57
+ safe_for_automation: true
58
+
59
+ # Mutable default arguments
60
+ mutable_default:
61
+ code: |
62
+ def append_to(item, lst=[]):
63
+ lst.append(item)
64
+ return lst
65
+ issue: "Default list shared between calls"
66
+ bugs_caught:
67
+ - "Mutable default argument"
68
+ - "State accumulation between calls"
69
+ safe_for_automation: true
70
+
71
+ # Integer caching
72
+ integer_identity:
73
+ comparisons:
74
+ - expr: "256 is 256"
75
+ result: "True"
76
+ - expr: "257 is 257"
77
+ result: "False or True"
78
+ bugs_caught:
79
+ - "Integer caching -5 to 256"
80
+ - "is vs == for numbers"
81
+ safe_for_automation: true
82
+ note: "Result varies by context in Python 3.8+"
83
+
84
+ string_interning:
85
+ comparisons:
86
+ - expr: "'hello' is 'hello'"
87
+ result: "True"
88
+ - expr: "'hello world' is 'hello world'"
89
+ result: "False or True"
90
+ bugs_caught:
91
+ - "String interning"
92
+ - "is vs == for strings"
93
+ safe_for_automation: true
94
+
95
+ # Division
96
+ floor_division:
97
+ expressions:
98
+ - expr: "7 // 2"
99
+ result: 3
100
+ - expr: "-7 // 2"
101
+ result: -4
102
+ bugs_caught:
103
+ - "Floor division with negatives"
104
+ safe_for_automation: true
105
+
106
+ # Chained comparisons
107
+ chained_comparison:
108
+ expressions:
109
+ - expr: "1 < 2 < 3"
110
+ result: "True"
111
+ - expr: "1 < 2 > 0"
112
+ result: "True"
113
+ bugs_caught:
114
+ - "Chained comparison evaluation"
115
+ safe_for_automation: true
116
+
117
+ # List comprehension scope
118
+ list_comp_scope:
119
+ code: |
120
+ x = 10
121
+ [x for x in range(5)]
122
+ print(x) # What is x?
123
+ issue: "List comp variable scope"
124
+ bugs_caught:
125
+ - "Loop variable scope in comprehension"
126
+ safe_for_automation: true
127
+ note: "Python 3: x is still 10. Python 2: x is 4"
128
+
129
+ # Late binding closures
130
+ closure_late_binding:
131
+ code: |
132
+ funcs = [lambda: i for i in range(3)]
133
+ [f() for f in funcs]
134
+ result: "[2, 2, 2]"
135
+ bugs_caught:
136
+ - "Late binding in closures"
137
+ - "All lambdas return same value"
138
+ safe_for_automation: true
139
+
140
+ # Exception handling
141
+ exception_in_finally:
142
+ code: |
143
+ def f():
144
+ try:
145
+ return 1
146
+ finally:
147
+ return 2
148
+ result: "returns 2"
149
+ bugs_caught:
150
+ - "finally overrides return"
151
+ safe_for_automation: true
152
+
153
+ # Dictionary iteration
154
+ dict_modification:
155
+ code: |
156
+ d = {'a': 1, 'b': 2}
157
+ for k in d:
158
+ del d[k]
159
+ issue: "RuntimeError: dictionary changed size"
160
+ bugs_caught:
161
+ - "Dict modification during iteration"
162
+ safe_for_automation: true
163
+
164
+ # Unicode
165
+ unicode_length:
166
+ expressions:
167
+ - expr: "len('๐Ÿ˜€')"
168
+ result: 1
169
+ - expr: "len('๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ')"
170
+ result: 7
171
+ bugs_caught:
172
+ - "Emoji length counting"
173
+ - "ZWJ sequence handling"
174
+ safe_for_automation: true