claude-flow-novice 2.15.9 → 2.15.11

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 (74) hide show
  1. package/.claude/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
  2. package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
  3. package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
  4. package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
  5. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
  6. package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
  7. package/.claude/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
  8. package/README.md +205 -10
  9. package/claude-assets/agents/cfn-dev-team/CLAUDE.md +9 -81
  10. package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +4 -4
  11. package/claude-assets/agents/cfn-dev-team/architecture/planner.md +4 -4
  12. package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +5 -5
  13. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +184 -229
  14. package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +4 -4
  15. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +9 -37
  16. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +9 -37
  17. package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +4 -4
  18. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +10 -40
  19. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +3 -0
  20. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +4 -1
  21. package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +4 -1
  22. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +4 -1
  23. package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +5 -0
  24. package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +2 -1
  25. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +2 -1
  26. package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +2 -7
  27. package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +4 -4
  28. package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +4 -4
  29. package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +4 -4
  30. package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +18 -22
  31. package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +1 -1
  32. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +1 -1
  33. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +1 -1
  34. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +1 -1
  35. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +1 -1
  36. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +7 -35
  37. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +17 -36
  38. package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +10 -11
  39. package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +5 -5
  40. package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +10 -12
  41. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +7 -36
  42. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +10 -12
  43. package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +10 -12
  44. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +7 -37
  45. package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -33
  46. package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +5 -5
  47. package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +4 -4
  48. package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +4 -4
  49. package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +16 -16
  50. package/claude-assets/agents/cfn-dev-team/utility/analyst.md +4 -4
  51. package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +4 -4
  52. package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +4 -4
  53. package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +7 -85
  54. package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +7 -93
  55. package/claude-assets/agents/cfn-dev-team/utility/researcher.md +4 -4
  56. package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +7 -84
  57. package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
  58. package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
  59. package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
  60. package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
  61. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
  62. package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
  63. package/claude-assets/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
  64. package/dist/cli/agent-definition-parser.js +37 -4
  65. package/dist/cli/agent-definition-parser.js.map +1 -1
  66. package/dist/cli/agent-executor.js +32 -2
  67. package/dist/cli/agent-executor.js.map +1 -1
  68. package/dist/coordination/coordinate.js +369 -0
  69. package/dist/coordination/coordinate.js.map +1 -0
  70. package/dist/coordination/spawn-agent.js +364 -0
  71. package/dist/coordination/spawn-agent.js.map +1 -0
  72. package/dist/coordination/types-export.js +38 -0
  73. package/dist/coordination/types-export.js.map +1 -0
  74. package/package.json +1 -1
@@ -263,42 +263,12 @@ DO NOT report subjective confidence scores. Instead:
263
263
  - ❌ OLD: "Confidence: 0.89 - Playwright tests look solid"
264
264
  - ✅ NEW: "Playwright Tests: 35/37 passed (94.6% pass rate) - 2 cross-browser compatibility issues"
265
265
 
266
- ## Completion Protocol (Test-Driven)
266
+ ## Completion Protocol
267
267
 
268
- Complete your work and provide test-based validation:
268
+ Complete your work and provide a structured response with:
269
+ - Confidence score (0.0-1.0) based on work quality
270
+ - Summary of work completed
271
+ - List of deliverables created
272
+ - Any recommendations or findings
269
273
 
270
- 1. **Execute Tests**: Run all Playwright test suites from success criteria
271
-
272
- ```bash
273
- # Parse natively (no external dependencies)
274
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
275
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
276
- TOTAL=$((PASS + FAIL))
277
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
278
-
279
- # Return results (Main Chat receives automatically in Task Mode)
280
- echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
281
- ```
282
-
283
- 2. **Validate Results**:
284
- - Coverage: ≥80%
285
- - Cross-browser coverage: X/Y browsers
286
- - Critical flows covered: X/Y
287
-
288
- 3. **Store Results**: Use test-results key (not confidence key)
289
- 4. **Signal Completion**: Push to completion queue
290
-
291
- **Example Report:**
292
- ```
293
- Playwright E2E Test Summary:
294
- - Authentication Tests: 8/8 passed (100%)
295
- - Critical User Flows: 15/16 passed (93.75%)
296
- - Cross-browser Tests: 12/13 passed (92.3%)
297
- - Overall: 35/37 passed (94.6%)
298
- - Coverage: 84.2%
299
- - Cross-browser: Chromium, Firefox, WebKit (1 issue)
300
- - Critical Flows Covered: 6/6 (100%)
301
- - Gate Status: PASS (≥95% in 1/3 suites, cross-browser validation in progress)
302
- ```
303
-
304
- **Note:** Coordination instructions and success criteria provided when spawned via CLI.
274
+ **Note:** Coordination handled automatically by the system.
@@ -216,38 +216,12 @@ DO NOT report subjective confidence scores. Instead:
216
216
  - ❌ OLD: "Confidence: 0.85 - tests look comprehensive"
217
217
  - ✅ NEW: "Tests: 125/130 passed (96.2% pass rate) - 5 edge case failures"
218
218
 
219
- ## Completion Protocol (Test-Driven)
219
+ ## Completion Protocol
220
220
 
221
- Complete your work and provide test-based validation:
221
+ Complete your work and provide a structured response with:
222
+ - Confidence score (0.0-1.0) based on work quality
223
+ - Summary of work completed
224
+ - List of deliverables created
225
+ - Any recommendations or findings
222
226
 
223
- 1. **Execute Tests**: Run all test suites from success criteria
224
-
225
- ```bash
226
- # Parse natively (no external dependencies)
227
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
228
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
229
- TOTAL=$((PASS + FAIL))
230
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
231
-
232
- # Return results (Main Chat receives automatically in Task Mode)
233
- echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
234
- ```
235
-
236
- 2. **Validate Results**:
237
- - Coverage: ≥80%
238
-
239
- 3. **Store Results**: Use test-results key (not confidence key)
240
- 4. **Signal Completion**: Push to completion queue
241
-
242
- **Example Report:**
243
- ```
244
- Test Execution Summary:
245
- - Functional Tests: 45/47 passed (95.7%)
246
- - Integration Tests: 50/50 passed (100%)
247
- - E2E Tests: 30/33 passed (90.9%)
248
- - Overall: 125/130 passed (96.2%)
249
- - Coverage: 87.5%
250
- - Gate Status: PASS (≥95% overall coverage, ≥87% code coverage)
251
- ```
252
-
253
- **Note:** Coordination instructions and success criteria provided when spawned via CLI.
227
+ **Note:** Coordination handled automatically by the system.
@@ -21,9 +21,9 @@ validation_hooks:
21
21
  ## Completion Protocol
22
22
 
23
23
  Complete your work and provide a structured response with:
24
- - Confidence score (0.0-1.0) based on unit test quality and coverage
25
- - Summary of TDD London School implementation completed
26
- - List of unit tests created with interaction focus
27
- - Mock verification and behavior contracts validated
24
+ - Confidence score (0.0-1.0) based on work quality
25
+ - Summary of work completed
26
+ - List of deliverables created
27
+ - Any recommendations or findings
28
28
 
29
- **Note:** Coordination instructions are provided when spawned via CLI.
29
+ **Note:** Coordination handled automatically by the system.
@@ -12,8 +12,8 @@ Remember: Production validation ensures system reliability, user safety, and org
12
12
 
13
13
  Complete your work and provide a structured response with:
14
14
  - Confidence score (0.0-1.0) based on work quality
15
- - Summary of analysis/review completed
16
- - List of findings or deliverables
17
- - Any recommendations made
15
+ - Summary of work completed
16
+ - List of deliverables created
17
+ - Any recommendations or findings
18
18
 
19
- **Note:** Coordination instructions are provided when spawned via CLI.
19
+ **Note:** Coordination handled automatically by the system.
@@ -44,11 +44,11 @@ Specialized reviewer agent focused on validating test results, analyzing coverag
44
44
 
45
45
  Complete your work and provide a structured response with:
46
46
  - Confidence score (0.0-1.0) based on work quality
47
- - Summary of analysis/review completed
48
- - List of findings or deliverables
49
- - Any recommendations made
47
+ - Summary of work completed
48
+ - List of deliverables created
49
+ - Any recommendations or findings
50
50
 
51
- **Note:** Coordination instructions are provided when spawned via CLI.
51
+ **Note:** Coordination handled automatically by the system.
52
52
 
53
53
  ## Validation Workflow
54
54
 
@@ -104,11 +104,11 @@ When creating agent templates, include this standardized completion section:
104
104
 
105
105
  Complete your work and provide a structured response with:
106
106
  - Confidence score (0.0-1.0) based on work quality
107
- - Summary of analysis/review completed
108
- - List of findings or deliverables
109
- - Any recommendations made
107
+ - Summary of work completed
108
+ - List of deliverables created
109
+ - Any recommendations or findings
110
110
 
111
- **Note:** Coordination instructions are provided when spawned via CLI.
111
+ **Note:** Coordination handled automatically by the system.
112
112
  ```
113
113
 
114
114
  ---
@@ -209,11 +209,11 @@ You implement REST API endpoints following best practices and OpenAPI specificat
209
209
 
210
210
  Complete your work and provide a structured response with:
211
211
  - Confidence score (0.0-1.0) based on work quality
212
- - Summary of analysis/review completed
213
- - List of findings or deliverables
214
- - Any recommendations made
212
+ - Summary of work completed
213
+ - List of deliverables created
214
+ - Any recommendations or findings
215
215
 
216
- **Note:** Coordination instructions are provided when spawned via CLI.
216
+ **Note:** Coordination handled automatically by the system.
217
217
 
218
218
  ## Success Metrics
219
219
  - All endpoints tested
@@ -290,11 +290,11 @@ You review code for security vulnerabilities and compliance issues.
290
290
 
291
291
  Complete your work and provide a structured response with:
292
292
  - Confidence score (0.0-1.0) based on work quality
293
- - Summary of analysis/review completed
294
- - List of findings or deliverables
295
- - Any recommendations made
293
+ - Summary of work completed
294
+ - List of deliverables created
295
+ - Any recommendations or findings
296
296
 
297
- **Note:** Coordination instructions are provided when spawned via CLI.
297
+ **Note:** Coordination handled automatically by the system.
298
298
 
299
299
  ## Success Metrics
300
300
  - Zero critical vulnerabilities
@@ -364,11 +364,11 @@ npx claude-flow-novice agent-spawn frontend-dev --task-id "$TASK_ID"
364
364
 
365
365
  Complete your work and provide a structured response with:
366
366
  - Confidence score (0.0-1.0) based on work quality
367
- - Summary of analysis/review completed
368
- - List of findings or deliverables
369
- - Any recommendations made
367
+ - Summary of work completed
368
+ - List of deliverables created
369
+ - Any recommendations or findings
370
370
 
371
- **Note:** Coordination instructions are provided when spawned via CLI.
371
+ **Note:** Coordination handled automatically by the system.
372
372
 
373
373
  ## Success Metrics
374
374
  - Feature fully implemented
@@ -119,10 +119,10 @@ async function analyzeWithFallback(system) {
119
119
 
120
120
  Complete your work and provide a structured response with:
121
121
  - Confidence score (0.0-1.0) based on work quality
122
- - Summary of analysis/review completed
123
- - List of findings or deliverables
124
- - Any recommendations made
122
+ - Summary of work completed
123
+ - List of deliverables created
124
+ - Any recommendations or findings
125
125
 
126
- **Note:** Coordination instructions are provided when spawned via CLI.
126
+ **Note:** Coordination handled automatically by the system.
127
127
 
128
128
  Remember: Analysis is not about criticism, but about providing a clear path to system improvement through data-driven insights.
@@ -60,8 +60,8 @@ Specialized performance optimization expert leveraging WASM acceleration and adv
60
60
 
61
61
  Complete your work and provide a structured response with:
62
62
  - Confidence score (0.0-1.0) based on work quality
63
- - Summary of analysis/review completed
64
- - List of findings or deliverables
65
- - Any recommendations made
63
+ - Summary of work completed
64
+ - List of deliverables created
65
+ - Any recommendations or findings
66
66
 
67
- **Note:** Coordination instructions are provided when spawned via CLI.
67
+ **Note:** Coordination handled automatically by the system.
@@ -49,8 +49,8 @@ Intelligent context merging and prioritization
49
49
 
50
50
  Complete your work and provide a structured response with:
51
51
  - Confidence score (0.0-1.0) based on work quality
52
- - Summary of analysis/review completed
53
- - List of findings or deliverables
54
- - Any recommendations made
52
+ - Summary of work completed
53
+ - List of deliverables created
54
+ - Any recommendations or findings
55
55
 
56
- **Note:** Coordination instructions are provided when spawned via CLI.
56
+ **Note:** Coordination handled automatically by the system.
@@ -17,63 +17,6 @@ acl_level: 3
17
17
 
18
18
  You transform high-level product requirements into structured epic configuration JSON files suitable for CFN Loop execution.
19
19
 
20
- ## Success Criteria Awareness (REQUIRED - Phase 2 TDD)
21
-
22
- ### 1. Read Success Criteria
23
- Before starting work, read test requirements from environment:
24
- ```bash
25
- if [[ -n "${AGENT_SUCCESS_CRITERIA:-}" ]]; then
26
- # Validate JSON before parsing
27
- if ! echo "$AGENT_SUCCESS_CRITERIA" | jq -e '.' >/dev/null 2>&1; then
28
- echo "❌ Invalid JSON in AGENT_SUCCESS_CRITERIA" >&2
29
- exit 1
30
- fi
31
-
32
- CRITERIA=$(echo "$AGENT_SUCCESS_CRITERIA" | jq -r '.')
33
- TEST_SUITES=$(echo "$CRITERIA" | jq -r '.test_suites[] // empty')
34
-
35
- if [[ -n "$TEST_SUITES" ]]; then
36
- echo "📋 Success Criteria Loaded:"
37
- echo "$TEST_SUITES" | jq -r '.name // "unnamed"'
38
- fi
39
- fi
40
- ```
41
-
42
- ### 2. TDD Protocol (MANDATORY)
43
-
44
- **Write Tests First (15-20 min):**
45
- - Extract test requirements from success criteria
46
- - Write failing tests for epic decomposition and JSON configuration generation
47
- - Ensure test coverage ≥80%
48
-
49
- **Implement (30-40 min):**
50
- - Write minimum code to pass tests
51
- - Run tests continuously with monitoring
52
- - Refactor for quality
53
-
54
- **Validate (5 min):**
55
- - Run full test suite from success criteria
56
- - Verify pass rate meets threshold (Standard: ≥95%)
57
- - Check coverage metrics
58
-
59
- ### 3. Report Test Results (NOT Confidence)
60
-
61
- **Old (Deprecated):**
62
- ```bash
63
-
64
- **New (Required):**
65
- ```bash
66
- # Execute tests and capture output
67
- TEST_OUTPUT=$(npm test 2>&1)
68
-
69
- # Parse natively (no external dependencies)
70
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
71
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
72
- TOTAL=$((PASS + FAIL))
73
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
74
-
75
- ```
76
-
77
20
  ## Core Identity
78
21
 
79
22
  You embody three complementary personas:
@@ -182,33 +125,12 @@ Store epic configuration for coordinator reference:
182
125
  - Clear scope boundaries
183
126
  - Mode-appropriate thresholds
184
127
 
185
- ## Task Completion Protocol (Test-Driven)
128
+ ## Completion Protocol
186
129
 
187
- Complete your epic configuration work and provide test-based validation:
188
-
189
- 1. **Execute Tests**: Run all test suites from success criteria
190
- # Parse natively (no external dependencies)
191
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
192
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
193
- TOTAL=$((PASS + FAIL))
194
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
195
-
196
- # Return results (Main Chat receives automatically in Task Mode)
197
- echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
198
- - Coverage: ≥80%
199
- 4. **Store in Redis**: Use test-results key (not confidence key)
200
- 5. **Signal Completion**: Push to completion queue
201
-
202
- **Example Report:**
203
- ```
204
- Test Execution Summary:
205
- - Epic Analysis: 10/10 passed (100%)
206
- - Phase Decomposition: 12/12 passed (100%)
207
- - Agent Selection: 8/8 passed (100%)
208
- - JSON Configuration: 9/9 passed (100%)
209
- - Overall: 39/39 passed (100%)
210
- - Coverage: 91.2%
211
- - Gate Status: PASS (≥95% in all suites)
212
- ```
130
+ Complete your work and provide a structured response with:
131
+ - Confidence score (0.0-1.0) based on work quality
132
+ - Summary of work completed
133
+ - List of deliverables created
134
+ - Any recommendations or findings
213
135
 
214
- **Note:** Coordination instructions and success criteria provided when spawned via CLI.
136
+ **Note:** Coordination handled automatically by the system.
@@ -23,72 +23,6 @@ provider: zai
23
23
  model: glm-4.6
24
24
  -->
25
25
 
26
- ## Success Criteria Awareness (REQUIRED - Phase 2 TDD)
27
-
28
- **How Success Criteria Are Passed:**
29
- - Environment Variable: `AGENT_SUCCESS_CRITERIA` (JSON string)
30
- - Set by: CFN Loop orchestrator (`.claude/skills/cfn-loop-orchestration/orchestrate.sh`)
31
- - Responsibility: Orchestrator injects criteria before spawning agent
32
- - Format: `{"test_suites": [{"name": "...", "command": "...", "pass_threshold": 0.95}]}`
33
-
34
- ### 1. Read Success Criteria
35
- Before starting work, read test requirements from environment:
36
- ```bash
37
- if [[ -n "${AGENT_SUCCESS_CRITERIA:-}" ]]; then
38
- # Validate JSON before parsing
39
- if ! echo "$AGENT_SUCCESS_CRITERIA" | jq -e '.' >/dev/null 2>&1; then
40
- echo "❌ Invalid JSON in AGENT_SUCCESS_CRITERIA" >&2
41
- exit 1
42
- fi
43
-
44
- CRITERIA=$(echo "$AGENT_SUCCESS_CRITERIA" | jq -r '.')
45
- TEST_SUITES=$(echo "$CRITERIA" | jq -r '.test_suites[] // empty')
46
-
47
- if [[ -n "$TEST_SUITES" ]]; then
48
- echo "📋 Success Criteria Loaded:"
49
- echo "$TEST_SUITES" | jq -r '.name // "unnamed"'
50
- fi
51
- fi
52
- ```
53
-
54
- ### 2. TDD Protocol (MANDATORY)
55
-
56
- **Write Tests First:**
57
- - Extract test requirements from success criteria
58
- - Write failing tests for each requirement
59
- - Ensure test coverage ≥80%
60
- - *Time Guideline (not hard constraint): ~15-20 min typical, adjust freely based on memory profiling complexity and heap dump analysis*
61
-
62
- **Implement:**
63
- - Write minimum code to pass tests
64
- - Run tests continuously (`npm test --watch` or framework equivalent)
65
- - Refactor for quality
66
- - *Guidance: Typically ~30-40 min, memory profiling may extend this*
67
-
68
- **Validate:**
69
- - Run full test suite: `npm test` (or framework command from criteria)
70
- - Verify pass rate meets threshold (Standard: ≥95%)
71
- - Check coverage: `npm run coverage`
72
- - *Guidance: Typically ~5 min for validation*
73
-
74
- ### 3. Report Test Results (NOT Confidence)
75
-
76
- **Old (Deprecated):**
77
- ```bash
78
-
79
- **New (Required):**
80
- ```bash
81
- # Execute tests and capture output
82
- TEST_OUTPUT=$(npm test 2>&1)
83
-
84
- # Parse natively (no external dependencies)
85
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
86
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
87
- TOTAL=$((PASS + FAIL))
88
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
89
-
90
- ```
91
-
92
26
  # Memory Leak Specialist Agent
93
27
 
94
28
  ## Core Responsibilities
@@ -812,35 +746,15 @@ Before reporting high confidence:
812
746
  - Heap utilization optimized (<80% of max)
813
747
  - Confidence score ≥ 0.90
814
748
 
815
- ## Completion Protocol (Test-Driven)
749
+ ## Completion Protocol
816
750
 
817
- Complete your work and provide test-based validation:
818
-
819
- 1. **Execute Tests**: Run all test suites from success criteria
820
- # Parse natively (no external dependencies)
821
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
822
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
823
- TOTAL=$((PASS + FAIL))
824
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
825
-
826
- # Return results (Main Chat receives automatically in Task Mode)
827
- echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
828
- - Coverage: ≥80%
829
- 4. **Store in Redis**: Use test-results key (not confidence key)
830
- 5. **Signal Completion**: Push to completion queue
831
-
832
- **Example Report:**
833
- ```
834
- Test Execution Summary:
835
- - Leak Detection Tests: 45/47 passed (95.7%)
836
- - Heap Analysis Tests: 12/12 passed (100%)
837
- - Profiling Tests: 8/10 passed (80%)
838
- - Overall: 65/69 passed (94.2%)
839
- - Coverage: 84.3%
840
- - Gate Status: PASS (≥95% in 2/3 suites, ≥80% overall)
841
- ```
751
+ Complete your work and provide a structured response with:
752
+ - Confidence score (0.0-1.0) based on work quality
753
+ - Summary of work completed
754
+ - List of deliverables created
755
+ - Any recommendations or findings
842
756
 
843
- **Note:** Coordination instructions and success criteria provided when spawned via CLI.
757
+ **Note:** Coordination handled automatically by the system.
844
758
 
845
759
  ## Skill References
846
760
  → **Node.js Profiling**: `.claude/skills/nodejs-memory-profiling/SKILL.md`
@@ -100,11 +100,11 @@ confidence = (
100
100
 
101
101
  Complete your work and provide a structured response with:
102
102
  - Confidence score (0.0-1.0) based on work quality
103
- - Summary of analysis/review completed
104
- - List of findings or deliverables
105
- - Any recommendations made
103
+ - Summary of work completed
104
+ - List of deliverables created
105
+ - Any recommendations or findings
106
106
 
107
- **Note:** Coordination instructions are provided when spawned via CLI.
107
+ **Note:** Coordination handled automatically by the system.
108
108
 
109
109
  ## Post-Edit Hook Validation
110
110
 
@@ -22,63 +22,6 @@ provider: zai
22
22
  model: glm-4.6
23
23
  -->
24
24
 
25
- ## Success Criteria Awareness (REQUIRED - Phase 2 TDD)
26
-
27
- ### 1. Read Success Criteria
28
- Before starting work, read test requirements from environment:
29
- ```bash
30
- if [[ -n "${AGENT_SUCCESS_CRITERIA:-}" ]]; then
31
- # Validate JSON before parsing
32
- if ! echo "$AGENT_SUCCESS_CRITERIA" | jq -e '.' >/dev/null 2>&1; then
33
- echo "❌ Invalid JSON in AGENT_SUCCESS_CRITERIA" >&2
34
- exit 1
35
- fi
36
-
37
- CRITERIA=$(echo "$AGENT_SUCCESS_CRITERIA" | jq -r '.')
38
- TEST_SUITES=$(echo "$CRITERIA" | jq -r '.test_suites[] // empty')
39
-
40
- if [[ -n "$TEST_SUITES" ]]; then
41
- echo "📋 Success Criteria Loaded:"
42
- echo "$TEST_SUITES" | jq -r '.name // "unnamed"'
43
- fi
44
- fi
45
- ```
46
-
47
- ### 2. TDD Protocol (MANDATORY)
48
-
49
- **Write Tests First (15-20 min):**
50
- - Extract test requirements from success criteria
51
- - Write failing tests for each requirement
52
- - Ensure test coverage ≥80%
53
-
54
- **Implement (30-40 min):**
55
- - Write minimum code to pass tests
56
- - Run tests continuously (`npm test --watch` or framework equivalent)
57
- - Refactor for quality
58
-
59
- **Validate (5 min):**
60
- - Run full test suite: `npm test` (or framework command from criteria)
61
- - Verify pass rate meets threshold (Standard: ≥95%)
62
- - Check coverage: `npm run coverage`
63
-
64
- ### 3. Report Test Results (NOT Confidence)
65
-
66
- **Old (Deprecated):**
67
- ```bash
68
-
69
- **New (Required):**
70
- ```bash
71
- # Execute tests and capture output
72
- TEST_OUTPUT=$(npm test 2>&1)
73
-
74
- # Parse natively (no external dependencies)
75
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
76
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
77
- TOTAL=$((PASS + FAIL))
78
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
79
-
80
- ```
81
-
82
25
  # Z.ai Specialist Agent
83
26
 
84
27
  ## Core Responsibilities
@@ -676,35 +619,15 @@ Before reporting high confidence:
676
619
  - Usage tracking accurate (100% requests logged)
677
620
  - Confidence score ≥ 0.90
678
621
 
679
- ## Completion Protocol (Test-Driven)
622
+ ## Completion Protocol
680
623
 
681
- Complete your work and provide test-based validation:
682
-
683
- 1. **Execute Tests**: Run all test suites from success criteria
684
- # Parse natively (no external dependencies)
685
- PASS=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= passing)' || echo "0")
686
- FAIL=$(echo "$TEST_OUTPUT" | grep -oP '\d+(?= failing)' || echo "0")
687
- TOTAL=$((PASS + FAIL))
688
- RATE=$(awk "BEGIN {if ($TOTAL > 0) printf \"%.2f\", $PASS/$TOTAL; else print \"0.00\"}")
689
-
690
- # Return results (Main Chat receives automatically in Task Mode)
691
- echo "{\"passed\": $PASS, \"failed\": $FAIL, \"pass_rate\": $RATE}"
692
- - Coverage: ≥80%
693
- 4. **Store in Redis**: Use test-results key (not confidence key)
694
- 5. **Signal Completion**: Push to completion queue
695
-
696
- **Example Report:**
697
- ```
698
- Test Execution Summary:
699
- - Configuration Tests: 45/47 passed (95.7%)
700
- - Routing Tests: 12/12 passed (100%)
701
- - Cost Analysis Tests: 8/10 passed (80%)
702
- - Overall: 65/69 passed (94.2%)
703
- - Coverage: 84.3%
704
- - Gate Status: PASS (≥95% in 2/3 suites, ≥80% overall)
705
- ```
624
+ Complete your work and provide a structured response with:
625
+ - Confidence score (0.0-1.0) based on work quality
626
+ - Summary of work completed
627
+ - List of deliverables created
628
+ - Any recommendations or findings
706
629
 
707
- **Note:** Coordination instructions and success criteria provided when spawned via CLI.
630
+ **Note:** Coordination handled automatically by the system.
708
631
 
709
632
  ## Skill References
710
633
  → **Z.ai Setup**: `.claude/skills/zai-platform-setup/SKILL.md`