@dzhechkov/keysarium 1.7.14 → 1.7.18

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 (84) hide show
  1. package/.dz-manifest.json +215 -55
  2. package/README.md +35 -6
  3. package/README.ru.md +36 -16
  4. package/package.json +3 -3
  5. package/sbom.json +456 -56
  6. package/src/cli.js +32 -2
  7. package/src/commands/doctor.js +25 -1
  8. package/src/commands/init.js +46 -12
  9. package/src/utils.js +1 -0
  10. package/templates/.agents/skills/casarium/SKILL.md +29 -0
  11. package/templates/.claude/agents/code-goal-planner.md +9 -0
  12. package/templates/.claude/commands/analyst-manual.md +4 -2
  13. package/templates/.claude/commands/casarium.md +3 -1
  14. package/templates/.claude/commands/cjm-prototype.md +2 -2
  15. package/templates/.claude/commands/research.md +4 -1
  16. package/templates/.claude/rules/checkpoint-protocol.md +2 -1
  17. package/templates/.claude/rules/research-quality.md +11 -6
  18. package/templates/.claude/shards/phase-2-research.shard.md +12 -8
  19. package/templates/.claude/shards/phase-25-cjm.shard.md +5 -3
  20. package/templates/.claude/skills/analyst-manual-full/SKILL.md +65 -37
  21. package/templates/.claude/skills/feature-adr/SKILL.md +17 -15
  22. package/templates/.claude/skills/feature-adr/modules/03-adr.md +1 -1
  23. package/templates/.claude/skills/feature-adr/modules/03.5-ideation-swarm.md +1 -1
  24. package/templates/.claude/skills/feature-adr/modules/06-implementation-plan.md +2 -2
  25. package/templates/.claude/skills/feature-adr/modules/08-qe.md +1 -1
  26. package/templates/.claude/skills/feature-adr/modules/09-fleet-qe.md +12 -12
  27. package/templates/.claude/skills/feature-adr/references/agentic-qe/LICENSE.agentic-qe +21 -0
  28. package/templates/.claude/skills/feature-adr/references/agentic-qe/README.md +20 -16
  29. package/templates/.claude/skills/feature-adr/references/agentic-qe/UPSTREAM-MANIFEST.json +246 -0
  30. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/README.md +218 -0
  31. package/templates/.claude/skills/feature-adr/references/agentic-qe/{brutal-honesty-review.md → qe-ref-brutal-honesty-review/REFERENCE.md} +14 -1
  32. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/resources/assessment-rubrics.md +295 -0
  33. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/resources/review-template.md +102 -0
  34. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/schemas/output.json +291 -0
  35. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/assess-code.sh +179 -0
  36. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/assess-tests.sh +223 -0
  37. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-brutal-honesty-review/scripts/validate-config.json +34 -0
  38. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/REFERENCE.md +758 -0
  39. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/evals/enterprise-integration-testing.yaml +158 -0
  40. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/schemas/output.json +74 -0
  41. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-enterprise-integration-testing/scripts/validate-config.json +25 -0
  42. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/REFERENCE.md +226 -0
  43. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/evals/qcsd-ideation-swarm.yaml +138 -0
  44. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/schemas/output.json +568 -0
  45. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/scripts/validate-config.json +25 -0
  46. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/01-flag-detection.md +57 -0
  47. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/02-core-agents.md +29 -0
  48. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/03-batch1-results.md +15 -0
  49. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/04-conditional-agents.md +23 -0
  50. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/05-decision-synthesis.md +29 -0
  51. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/06-report-generation.md +18 -0
  52. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/07-learning-persistence.md +29 -0
  53. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qcsd-ideation-swarm/steps/08-final-output.md +18 -0
  54. package/templates/.claude/skills/feature-adr/references/agentic-qe/{qe-coverage-analysis.md → qe-ref-qe-coverage-analysis/REFERENCE.md} +42 -3
  55. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/evals/qe-coverage-analysis.yaml +494 -0
  56. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/schemas/output.json +286 -0
  57. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-coverage-analysis/scripts/validate-config.json +42 -0
  58. package/templates/.claude/skills/feature-adr/references/agentic-qe/{qe-requirements-validation.md → qe-ref-qe-requirements-validation/REFERENCE.md} +13 -3
  59. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/evals/qe-requirements-validation.yaml +598 -0
  60. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/schemas/output.json +587 -0
  61. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-qe-requirements-validation/scripts/validate-config.json +37 -0
  62. package/templates/.claude/skills/feature-adr/references/agentic-qe/{regression-testing.md → qe-ref-regression-testing/REFERENCE.md} +30 -49
  63. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/evals/regression-testing.yaml +504 -0
  64. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/schemas/output.json +311 -0
  65. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-regression-testing/scripts/validate-config.json +50 -0
  66. package/templates/.claude/skills/feature-adr/references/agentic-qe/{risk-based-testing.md → qe-ref-risk-based-testing/REFERENCE.md} +23 -52
  67. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/evals/risk-based-testing.yaml +141 -0
  68. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/schemas/output.json +480 -0
  69. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-risk-based-testing/scripts/validate-config.json +25 -0
  70. package/templates/.claude/skills/feature-adr/references/agentic-qe/{shift-left-testing.md → qe-ref-shift-left-testing/REFERENCE.md} +33 -88
  71. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/evals/shift-left-testing.yaml +145 -0
  72. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/schemas/output.json +459 -0
  73. package/templates/.claude/skills/feature-adr/references/agentic-qe/qe-ref-shift-left-testing/scripts/validate-config.json +25 -0
  74. package/templates/CLAUDE.md +3 -1
  75. package/templates/docs/feature-adr/04-admin-guide.md +1 -1
  76. package/templates/docs/improvement-directions.md +3 -3
  77. package/templates/docs/keysarium/02-admin-guide.md +2 -2
  78. package/templates/docs/keysarium/03-user-guide.md +3 -3
  79. package/templates/docs/keysarium/05-architecture.md +9 -8
  80. package/templates/docs/keysarium/06-user-flows.md +4 -4
  81. package/templates/lib/platform-templates/copilot.md +1 -1
  82. package/templates/lib/platform-templates/opencode.md +1 -1
  83. package/templates/.claude/skills/feature-adr/references/agentic-qe/enterprise-integration-testing.md +0 -111
  84. package/templates/.claude/skills/feature-adr/references/agentic-qe/qcsd-ideation-swarm.md +0 -126
@@ -0,0 +1,179 @@
1
+ #!/bin/bash
2
+ # Brutal Honesty Code Assessment Script (Linus Mode)
3
+
4
+ set -e
5
+
6
+ # Colors
7
+ RED='\033[0;31m'
8
+ YELLOW='\033[1;33m'
9
+ GREEN='\033[0;32m'
10
+ NC='\033[0m' # No Color
11
+
12
+ echo "🔥 BRUTAL HONESTY CODE ASSESSMENT (Linus Mode)"
13
+ echo "================================================"
14
+ echo ""
15
+
16
+ # Check if file argument provided
17
+ if [ -z "$1" ]; then
18
+ echo "Usage: $0 <file-or-directory>"
19
+ exit 1
20
+ fi
21
+
22
+ TARGET="$1"
23
+
24
+ # Function to assess correctness
25
+ assess_correctness() {
26
+ echo "📊 CORRECTNESS CHECK"
27
+ echo "-------------------"
28
+
29
+ # Check for common bug patterns
30
+ if grep -r "TODO\|FIXME\|BUG\|HACK" "$TARGET" 2>/dev/null; then
31
+ echo -e "${RED}🔴 FAILING: Found TODO/FIXME/BUG/HACK comments${NC}"
32
+ echo " → This code admits it's broken. Fix it before review."
33
+ return 0
34
+ fi
35
+
36
+ # Check for error-prone patterns
37
+ if grep -r "null\|undefined" "$TARGET" 2>/dev/null | grep -v "!== null" | grep -v "!== undefined" > /dev/null; then
38
+ echo -e "${YELLOW}🟡 WARNING: Potential null/undefined issues${NC}"
39
+ echo " → Are you handling null cases properly?"
40
+ fi
41
+
42
+ echo -e "${GREEN}✓ No obvious correctness issues${NC}"
43
+ }
44
+
45
+ # Function to assess performance
46
+ assess_performance() {
47
+ echo ""
48
+ echo "⚡ PERFORMANCE CHECK"
49
+ echo "-------------------"
50
+
51
+ # Check for nested loops (potential O(n²))
52
+ nested_loops=$(grep -r "for.*{" "$TARGET" | wc -l)
53
+ if [ "$nested_loops" -gt 5 ]; then
54
+ echo -e "${RED}🔴 FAILING: Found $nested_loops loops${NC}"
55
+ echo " → Are you creating O(n²) complexity where O(n) exists?"
56
+ echo " → Use hash maps, sets, or better algorithms."
57
+ fi
58
+
59
+ # Check for synchronous I/O in hot paths
60
+ if grep -r "readFileSync\|writeFileSync" "$TARGET" 2>/dev/null; then
61
+ echo -e "${RED}🔴 FAILING: Synchronous file I/O detected${NC}"
62
+ echo " → You're blocking the event loop. Use async operations."
63
+ fi
64
+
65
+ echo -e "${GREEN}✓ No obvious performance issues${NC}"
66
+ }
67
+
68
+ # Function to assess error handling
69
+ assess_error_handling() {
70
+ echo ""
71
+ echo "🛡️ ERROR HANDLING CHECK"
72
+ echo "----------------------"
73
+
74
+ # Check for try/catch usage
75
+ try_count=$(grep -r "try\|catch" "$TARGET" 2>/dev/null | wc -l)
76
+ if [ "$try_count" -eq 0 ]; then
77
+ echo -e "${RED}🔴 FAILING: No error handling found${NC}"
78
+ echo " → What happens when this code fails? It crashes."
79
+ else
80
+ echo -e "${GREEN}✓ Found error handling (verify it's sufficient)${NC}"
81
+ fi
82
+
83
+ # Check for empty catch blocks
84
+ if grep -A 1 "catch" "$TARGET" 2>/dev/null | grep -q "^\s*}"; then
85
+ echo -e "${RED}🔴 FAILING: Empty catch blocks detected${NC}"
86
+ echo " → Swallowing errors silently is worse than crashing."
87
+ fi
88
+ }
89
+
90
+ # Function to assess concurrency
91
+ assess_concurrency() {
92
+ echo ""
93
+ echo "🔀 CONCURRENCY CHECK"
94
+ echo "-------------------"
95
+
96
+ # Check for global state mutations
97
+ if grep -r "global\.\|window\." "$TARGET" 2>/dev/null; then
98
+ echo -e "${YELLOW}🟡 WARNING: Global state mutations detected${NC}"
99
+ echo " → Are you handling concurrent access safely?"
100
+ fi
101
+
102
+ # Check for race condition patterns
103
+ if grep -r "setTimeout\|setInterval" "$TARGET" 2>/dev/null; then
104
+ echo -e "${YELLOW}🟡 WARNING: Timing-based code detected${NC}"
105
+ echo " → Are you creating race conditions?"
106
+ fi
107
+
108
+ echo -e "${GREEN}✓ Review concurrency manually${NC}"
109
+ }
110
+
111
+ # Function to assess testability
112
+ assess_testability() {
113
+ echo ""
114
+ echo "🧪 TESTABILITY CHECK"
115
+ echo "-------------------"
116
+
117
+ # Check if tests exist
118
+ if [ -d "tests" ] || [ -d "test" ] || [ -d "__tests__" ]; then
119
+ echo -e "${GREEN}✓ Test directory exists${NC}"
120
+ else
121
+ echo -e "${RED}🔴 FAILING: No test directory found${NC}"
122
+ echo " → Where are the tests? Did you even test this?"
123
+ fi
124
+
125
+ # Check for dependency injection
126
+ if grep -r "new\s\+\w\+(" "$TARGET" 2>/dev/null | grep -v "Error\|Date" > /dev/null; then
127
+ echo -e "${YELLOW}🟡 WARNING: Hard-coded dependencies detected${NC}"
128
+ echo " → Use dependency injection for testability."
129
+ fi
130
+ }
131
+
132
+ # Function to assess maintainability
133
+ assess_maintainability() {
134
+ echo ""
135
+ echo "🔧 MAINTAINABILITY CHECK"
136
+ echo "-----------------------"
137
+
138
+ # Check function length (should be <50 lines)
139
+ if [ -f "$TARGET" ]; then
140
+ long_functions=$(awk '/^function|^const.*=>/ {start=NR} /^}/ {if(NR-start>50) print "Line",start}' "$TARGET" | wc -l)
141
+ if [ "$long_functions" -gt 0 ]; then
142
+ echo -e "${YELLOW}🟡 WARNING: Found $long_functions functions >50 lines${NC}"
143
+ echo " → Break down complex functions."
144
+ fi
145
+ fi
146
+
147
+ # Check for magic numbers
148
+ if grep -rE "\s[0-9]{3,}" "$TARGET" 2>/dev/null | grep -v "1000\|2000" > /dev/null; then
149
+ echo -e "${YELLOW}🟡 WARNING: Magic numbers detected${NC}"
150
+ echo " → Use named constants."
151
+ fi
152
+
153
+ echo -e "${GREEN}✓ Review code clarity manually${NC}"
154
+ }
155
+
156
+ # Run all assessments
157
+ assess_correctness
158
+ assess_performance
159
+ assess_error_handling
160
+ assess_concurrency
161
+ assess_testability
162
+ assess_maintainability
163
+
164
+ # Final verdict
165
+ echo ""
166
+ echo "================================================"
167
+ echo "🎯 FINAL VERDICT"
168
+ echo "================================================"
169
+ echo ""
170
+ echo "Review the findings above. If you see multiple 🔴 FAILING marks,"
171
+ echo "this code is NOT ready for review."
172
+ echo ""
173
+ echo "Expected standards:"
174
+ echo " - All error paths handled"
175
+ echo " - No obvious performance issues"
176
+ echo " - Tests exist and pass"
177
+ echo " - Code is clear and maintainable"
178
+ echo ""
179
+ echo "If you wouldn't deploy this to production, don't submit it for review."
@@ -0,0 +1,223 @@
1
+ #!/bin/bash
2
+ # Brutal Honesty Test Assessment Script (Ramsay Mode)
3
+
4
+ set -e
5
+
6
+ # Colors
7
+ RED='\033[0;31m'
8
+ YELLOW='\033[1;33m'
9
+ GREEN='\033[0;32m'
10
+ NC='\033[0m' # No Color
11
+
12
+ echo "👨‍🍳 BRUTAL HONESTY TEST ASSESSMENT (Ramsay Mode)"
13
+ echo "=================================================="
14
+ echo ""
15
+
16
+ # Check if test directory argument provided
17
+ if [ -z "$1" ]; then
18
+ echo "Usage: $0 <test-directory>"
19
+ exit 1
20
+ fi
21
+
22
+ TEST_DIR="$1"
23
+
24
+ # Check if test directory exists
25
+ if [ ! -d "$TEST_DIR" ]; then
26
+ echo -e "${RED}🔴 FAILING: Test directory '$TEST_DIR' doesn't exist${NC}"
27
+ echo " → Where are the tests? Did you even write any?"
28
+ exit 1
29
+ fi
30
+
31
+ # Function to assess coverage
32
+ assess_coverage() {
33
+ echo "📊 COVERAGE CHECK"
34
+ echo "----------------"
35
+
36
+ # Run coverage if npm test with coverage exists
37
+ if [ -f "package.json" ] && grep -q "test:coverage" package.json; then
38
+ echo "Running coverage analysis..."
39
+ npm run test:coverage 2>/dev/null || true
40
+
41
+ # Extract coverage percentage
42
+ coverage=$(npm run test:coverage 2>&1 | grep -oP '\d+\.\d+(?=%)' | head -1 || echo "0")
43
+
44
+ if (( $(echo "$coverage < 50" | bc -l) )); then
45
+ echo -e "${RED}🔴 RAW: ${coverage}% coverage${NC}"
46
+ echo " → This is embarrassing. You're barely testing anything."
47
+ elif (( $(echo "$coverage < 80" | bc -l) )); then
48
+ echo -e "${YELLOW}🟡 ACCEPTABLE: ${coverage}% coverage${NC}"
49
+ echo " → Minimum is 80%. You're not there yet."
50
+ else
51
+ echo -e "${GREEN}🟢 MICHELIN STAR: ${coverage}% coverage${NC}"
52
+ fi
53
+ else
54
+ echo -e "${YELLOW}⚠️ No coverage command found${NC}"
55
+ echo " → Add 'test:coverage' script to package.json"
56
+ fi
57
+ }
58
+
59
+ # Function to assess edge cases
60
+ assess_edge_cases() {
61
+ echo ""
62
+ echo "🎯 EDGE CASE CHECK"
63
+ echo "-----------------"
64
+
65
+ # Check for common edge case patterns
66
+ edge_case_patterns=(
67
+ "null"
68
+ "undefined"
69
+ "empty"
70
+ "zero"
71
+ "negative"
72
+ "max"
73
+ "min"
74
+ "overflow"
75
+ "boundary"
76
+ )
77
+
78
+ found_count=0
79
+ for pattern in "${edge_case_patterns[@]}"; do
80
+ if grep -ri "$pattern" "$TEST_DIR" > /dev/null 2>&1; then
81
+ ((found_count++))
82
+ fi
83
+ done
84
+
85
+ if [ "$found_count" -eq 0 ]; then
86
+ echo -e "${RED}🔴 RAW: No edge cases tested${NC}"
87
+ echo " → You're only testing the happy path. That's not testing."
88
+ elif [ "$found_count" -lt 3 ]; then
89
+ echo -e "${YELLOW}🟡 ACCEPTABLE: Found $found_count edge case patterns${NC}"
90
+ echo " → Test more: null, empty, boundaries, overflow"
91
+ else
92
+ echo -e "${GREEN}🟢 MICHELIN STAR: Found $found_count edge case patterns${NC}"
93
+ fi
94
+ }
95
+
96
+ # Function to assess test clarity
97
+ assess_clarity() {
98
+ echo ""
99
+ echo "📖 CLARITY CHECK"
100
+ echo "---------------"
101
+
102
+ # Check for descriptive test names
103
+ unclear_tests=$(grep -r "test('test" "$TEST_DIR" 2>/dev/null | wc -l)
104
+ if [ "$unclear_tests" -gt 0 ]; then
105
+ echo -e "${RED}🔴 RAW: Found $unclear_tests unclear test names${NC}"
106
+ echo " → 'test1', 'test2' - What are you testing? Use descriptive names."
107
+ fi
108
+
109
+ # Check for describe/it blocks
110
+ if grep -r "describe\|it\|test" "$TEST_DIR" > /dev/null 2>&1; then
111
+ echo -e "${GREEN}✓ Tests have structure${NC}"
112
+ else
113
+ echo -e "${YELLOW}⚠️ No test framework patterns detected${NC}"
114
+ fi
115
+ }
116
+
117
+ # Function to assess test speed
118
+ assess_speed() {
119
+ echo ""
120
+ echo "⚡ SPEED CHECK"
121
+ echo "-------------"
122
+
123
+ echo "Running tests..."
124
+ start_time=$(date +%s)
125
+
126
+ # Run tests (suppress output)
127
+ if npm test > /dev/null 2>&1; then
128
+ end_time=$(date +%s)
129
+ duration=$((end_time - start_time))
130
+
131
+ if [ "$duration" -gt 60 ]; then
132
+ echo -e "${RED}🔴 RAW: Tests took ${duration}s${NC}"
133
+ echo " → Unit tests should run in seconds, not minutes."
134
+ echo " → Are you calling real databases/networks?"
135
+ elif [ "$duration" -gt 10 ]; then
136
+ echo -e "${YELLOW}🟡 ACCEPTABLE: Tests took ${duration}s${NC}"
137
+ echo " → Aim for <10s. Use mocks and in-memory operations."
138
+ else
139
+ echo -e "${GREEN}🟢 MICHELIN STAR: Tests took ${duration}s${NC}"
140
+ fi
141
+ else
142
+ echo -e "${RED}🔴 FAILING: Tests don't even pass${NC}"
143
+ echo " → Fix your broken tests before worrying about speed."
144
+ fi
145
+ }
146
+
147
+ # Function to assess stability
148
+ assess_stability() {
149
+ echo ""
150
+ echo "🎲 STABILITY CHECK"
151
+ echo "-----------------"
152
+
153
+ # Check for flaky patterns
154
+ if grep -ri "setTimeout\|sleep\|wait" "$TEST_DIR" > /dev/null 2>&1; then
155
+ echo -e "${RED}🔴 RAW: Timing-based tests detected${NC}"
156
+ echo " → You're creating flaky tests. Use proper async/await."
157
+ fi
158
+
159
+ # Run tests multiple times to detect flakes
160
+ echo "Running tests 3x to detect flakes..."
161
+ failures=0
162
+ for i in {1..3}; do
163
+ if ! npm test > /dev/null 2>&1; then
164
+ ((failures++))
165
+ fi
166
+ done
167
+
168
+ if [ "$failures" -gt 0 ]; then
169
+ echo -e "${RED}🔴 RAW: Tests failed $failures/3 times${NC}"
170
+ echo " → FLAKY TESTS. These are worse than no tests."
171
+ echo " → Fix the non-determinism before merging."
172
+ else
173
+ echo -e "${GREEN}🟢 MICHELIN STAR: Tests are stable${NC}"
174
+ fi
175
+ }
176
+
177
+ # Function to assess isolation
178
+ assess_isolation() {
179
+ echo ""
180
+ echo "🏝️ ISOLATION CHECK"
181
+ echo "------------------"
182
+
183
+ # Check for shared state patterns
184
+ if grep -ri "global\|beforeAll\|shared" "$TEST_DIR" > /dev/null 2>&1; then
185
+ echo -e "${YELLOW}🟡 WARNING: Shared state patterns detected${NC}"
186
+ echo " → Are your tests independent? Can they run in any order?"
187
+ fi
188
+
189
+ # Check for test order dependencies
190
+ if grep -r "\.only\|\.skip" "$TEST_DIR" > /dev/null 2>&1; then
191
+ echo -e "${YELLOW}🟡 WARNING: .only or .skip found${NC}"
192
+ echo " → Don't commit tests with .only or .skip"
193
+ fi
194
+
195
+ echo -e "${GREEN}✓ Review test isolation manually${NC}"
196
+ }
197
+
198
+ # Run all assessments
199
+ assess_coverage
200
+ assess_edge_cases
201
+ assess_clarity
202
+ assess_speed
203
+ assess_stability
204
+ assess_isolation
205
+
206
+ # Final verdict
207
+ echo ""
208
+ echo "=================================================="
209
+ echo "🎯 FINAL VERDICT"
210
+ echo "=================================================="
211
+ echo ""
212
+ echo "Look at the results above. If you see multiple 🔴 RAW marks,"
213
+ echo "these tests are NOT production-ready."
214
+ echo ""
215
+ echo "Expected standards:"
216
+ echo " - 80%+ branch coverage"
217
+ echo " - Edge cases tested (null, empty, boundaries)"
218
+ echo " - Clear test names"
219
+ echo " - <10s to run"
220
+ echo " - 0% flaky"
221
+ echo " - Independent tests"
222
+ echo ""
223
+ echo "You know what good tests look like. Why aren't you writing them?"
@@ -0,0 +1,34 @@
1
+ {
2
+ "skillName": "brutal-honesty-review",
3
+ "skillVersion": "1.0.0",
4
+ "requiredTools": [
5
+ "jq"
6
+ ],
7
+ "optionalTools": [],
8
+ "schemaPath": "schemas/output.json",
9
+ "requiredFields": [
10
+ "skillName",
11
+ "status",
12
+ "output",
13
+ "output.summary",
14
+ "output.reviewFindings",
15
+ "output.codeQuality"
16
+ ],
17
+ "requiredNonEmptyFields": [],
18
+ "mustContainTerms": [
19
+ "review",
20
+ "code"
21
+ ],
22
+ "mustNotContainTerms": [
23
+ "TODO",
24
+ "FIXME"
25
+ ],
26
+ "enumValidations": {
27
+ ".status": [
28
+ "success",
29
+ "partial",
30
+ "failed",
31
+ "skipped"
32
+ ]
33
+ }
34
+ }