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.
- package/.claude/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
- package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
- package/.claude/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
- package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
- package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
- package/.claude/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
- package/README.md +205 -10
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +9 -81
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +4 -4
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +4 -4
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +5 -5
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +184 -229
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +4 -4
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +9 -37
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +9 -37
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +4 -4
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +10 -40
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +3 -0
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +4 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +5 -0
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +2 -1
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +2 -1
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +2 -7
- package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +18 -22
- package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +1 -1
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +1 -1
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +1 -1
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +1 -1
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +7 -35
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +17 -36
- package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +10 -11
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +5 -5
- package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +10 -12
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +7 -36
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +10 -12
- package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +10 -12
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +7 -37
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -33
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +5 -5
- package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +4 -4
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +16 -16
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +7 -85
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +7 -93
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +7 -84
- package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +519 -0
- package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_IMPLEMENTATION.md +493 -0
- package/claude-assets/skills/cfn-loop-orchestration/ORCHESTRATOR_QUICK_START.md +499 -0
- package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +104 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +2 -2
- package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +648 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/orchestrate.test.ts +836 -0
- package/dist/cli/agent-definition-parser.js +37 -4
- package/dist/cli/agent-definition-parser.js.map +1 -1
- package/dist/cli/agent-executor.js +32 -2
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/coordination/coordinate.js +369 -0
- package/dist/coordination/coordinate.js.map +1 -0
- package/dist/coordination/spawn-agent.js +364 -0
- package/dist/coordination/spawn-agent.js.map +1 -0
- package/dist/coordination/types-export.js +38 -0
- package/dist/coordination/types-export.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://github.com/yourusername/claude-flow-novice/actions/workflows/ci.yml)
|
|
7
|
-
[](
|
|
7
|
+
[](.github/workflows)
|
|
8
8
|
|
|
9
9
|
Autonomous self-correcting AI agent orchestration with multi-domain support and intelligent learning capabilities.
|
|
10
10
|
|
|
@@ -437,25 +437,220 @@ See `readme/logs-tools.md` for complete documentation.
|
|
|
437
437
|
|
|
438
438
|
## Testing
|
|
439
439
|
|
|
440
|
+
Claude Flow Novice includes comprehensive test suites across multiple execution modes and test types. Choose the appropriate test runner based on your development context.
|
|
441
|
+
|
|
442
|
+
### Quick Start
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
# Run all npm-based tests (unit, integration, e2e)
|
|
446
|
+
npm test
|
|
447
|
+
|
|
448
|
+
# Run CLI mode test suite (test-driven validation)
|
|
449
|
+
./tests/cli-mode/run-all-tests.sh
|
|
450
|
+
|
|
451
|
+
# Run Docker mode test suite (45 production tests)
|
|
452
|
+
./tests/docker-mode/run-all-implementations.sh
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
### Test Execution Modes
|
|
456
|
+
|
|
457
|
+
#### CLI Mode Tests (Production)
|
|
458
|
+
Run the CLI mode test suite to validate end-to-end coordination, quality gates, and agent spawning:
|
|
459
|
+
|
|
460
|
+
```bash
|
|
461
|
+
# Full test suite with all assertions
|
|
462
|
+
./tests/cli-mode/run-all-tests.sh
|
|
463
|
+
|
|
464
|
+
# Expected runtime: ~5-10 minutes
|
|
465
|
+
# Tests: 8 suites, 159 total assertions
|
|
466
|
+
# Coverage: Redis coordination, threshold enforcement, agent spawning, path resolution
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Validates:**
|
|
470
|
+
- `/cfn-loop-cli` slash command workflow
|
|
471
|
+
- Coordinator spawning and orchestration
|
|
472
|
+
- Loop 3 → Loop 2 → Product Owner progression
|
|
473
|
+
- Quality gate enforcement (MVP/Standard/Enterprise modes)
|
|
474
|
+
- Redis coordination layer
|
|
475
|
+
- Agent tool access and permissions
|
|
476
|
+
|
|
477
|
+
**Prerequisites:**
|
|
478
|
+
- Redis running (`redis-server`)
|
|
479
|
+
- Project built (`npm run build`)
|
|
480
|
+
- Z.ai API key configured (`.env`) for integration tests
|
|
481
|
+
|
|
482
|
+
**Documentation:** See `tests/cli-mode/README.md` for detailed test descriptions and results.
|
|
483
|
+
|
|
484
|
+
#### Docker Mode Tests (Integration)
|
|
485
|
+
Run the Docker mode test suite to validate real container-based orchestration:
|
|
486
|
+
|
|
487
|
+
```bash
|
|
488
|
+
# Run all 45 Docker test implementations
|
|
489
|
+
./tests/docker-mode/run-all-implementations.sh
|
|
490
|
+
|
|
491
|
+
# Expected runtime: ~3-5 minutes
|
|
492
|
+
# Tests: 45 production tests across 3 suites
|
|
493
|
+
# Coverage: Coordinator spawning, orchestrator workflow, TDD compliance
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**Test Suites:**
|
|
497
|
+
- Coordinator Spawning (13 tests): Container cleanup, exit codes, service discovery
|
|
498
|
+
- Orchestrator Workflow (13 tests): Iteration management, monitoring, recovery
|
|
499
|
+
- TDD Compliance (19 tests): Test-driven validation, metrics collection, parallel execution
|
|
500
|
+
|
|
501
|
+
**Prerequisites:**
|
|
502
|
+
- Docker daemon running (`docker ps`)
|
|
503
|
+
- No port conflicts (Docker networks auto-created)
|
|
504
|
+
- ~2GB available memory for container execution
|
|
505
|
+
|
|
506
|
+
**Documentation:** See `tests/docker-mode/README.md` for test categories and patterns.
|
|
507
|
+
|
|
508
|
+
#### NPM-Based Tests (Development)
|
|
509
|
+
Run standard npm test commands for fast feedback during development:
|
|
510
|
+
|
|
440
511
|
```bash
|
|
441
512
|
# Run all tests
|
|
442
513
|
npm test
|
|
443
514
|
|
|
444
515
|
# Run specific test suites
|
|
445
|
-
npm run test:unit
|
|
446
|
-
npm run test:integration
|
|
447
|
-
npm run test:e2e
|
|
516
|
+
npm run test:unit # Unit tests only
|
|
517
|
+
npm run test:integration # Integration tests only
|
|
518
|
+
npm run test:e2e # End-to-end tests only
|
|
448
519
|
|
|
449
|
-
#
|
|
450
|
-
|
|
520
|
+
# Run with coverage
|
|
521
|
+
npm test -- --coverage
|
|
522
|
+
|
|
523
|
+
# Watch mode (re-run on file changes)
|
|
524
|
+
npm test -- --watch
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
**Expected runtime:**
|
|
528
|
+
- Unit tests: ~1-2 minutes
|
|
529
|
+
- Integration tests: ~2-3 minutes
|
|
530
|
+
- E2E tests: ~3-5 minutes
|
|
531
|
+
|
|
532
|
+
#### CFN Loop End-to-End Tests
|
|
533
|
+
Run specialized CFN Loop tests for validation and debugging:
|
|
534
|
+
|
|
535
|
+
```bash
|
|
536
|
+
# Validate CFN Loop coordinator handoffs
|
|
451
537
|
./tests/cfn-v3/test-coordinator-handoffs.sh
|
|
538
|
+
|
|
539
|
+
# Full CFN Loop e2e test
|
|
540
|
+
./tests/cfn-v3/test-e2e-cfn-loop.sh
|
|
541
|
+
|
|
542
|
+
# Enterprise change management tests
|
|
543
|
+
./tests/enterprise/run-all-enterprise-tests.sh
|
|
452
544
|
```
|
|
453
545
|
|
|
454
|
-
|
|
546
|
+
### Test Organization
|
|
547
|
+
|
|
548
|
+
```
|
|
549
|
+
tests/
|
|
550
|
+
├── cli-mode/ # CLI mode validation (8 tests, 159 assertions)
|
|
551
|
+
│ ├── README.md # CLI test documentation
|
|
552
|
+
│ ├── run-all-tests.sh # Test runner
|
|
553
|
+
│ └── test-*.sh # Individual test suites
|
|
554
|
+
├── docker-mode/ # Docker integration tests (45 tests)
|
|
555
|
+
│ ├── README.md # Docker test documentation
|
|
556
|
+
│ ├── run-all-implementations.sh # Test runner
|
|
557
|
+
│ └── implementations/
|
|
558
|
+
│ ├── coordinator-spawning-real-tests.sh
|
|
559
|
+
│ ├── orchestrator-workflow-real-tests.sh
|
|
560
|
+
│ └── tdd-compliance-real-tests.sh
|
|
561
|
+
├── docker/ # Docker-based core tests
|
|
562
|
+
│ ├── coordination/ # Redis coordination tests
|
|
563
|
+
│ ├── lifecycle/ # Container lifecycle tests
|
|
564
|
+
│ └── perf/ # Performance benchmarks
|
|
565
|
+
├── cfn-v3/ # CFN Loop validation tests
|
|
566
|
+
├── enterprise/ # Enterprise mode tests
|
|
567
|
+
├── CLAUDE.md # Test authoring standards
|
|
568
|
+
├── test-utils.sh # Shared test utilities
|
|
569
|
+
└── README.md # Test suite documentation
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
### Test Coverage Matrix
|
|
573
|
+
|
|
574
|
+
| Mode | Type | Tests | Duration | Prerequisites |
|
|
575
|
+
|------|------|-------|----------|---|
|
|
576
|
+
| CLI | Unit + Integration + E2E | 159 assertions | 5-10 min | Redis, npm build |
|
|
577
|
+
| Docker | Production integration | 45 tests | 3-5 min | Docker daemon |
|
|
578
|
+
| NPM | Development | Variable | 1-5 min | Node.js, npm |
|
|
579
|
+
| CFN Loop | Workflow validation | Variable | 5-15 min | Full environment |
|
|
580
|
+
|
|
581
|
+
### Test Authoring Guidelines
|
|
582
|
+
|
|
583
|
+
For developers writing new tests, see `tests/CLAUDE.md` which documents:
|
|
584
|
+
- Boilerplate template structure
|
|
585
|
+
- GIVEN/WHEN/THEN assertion patterns
|
|
586
|
+
- Production testing requirements (BUG #21)
|
|
587
|
+
- Infrastructure vs integration test patterns
|
|
588
|
+
- Cleanup and resource management
|
|
589
|
+
- Review checklist for test quality
|
|
590
|
+
|
|
591
|
+
Key principles:
|
|
592
|
+
- Infrastructure tests (mocks OK): Docker networking, volumes, Redis connectivity
|
|
593
|
+
- Integration tests (real images/scripts): Agent spawning, CLI execution, production workflows
|
|
594
|
+
- Always use `set -euo pipefail` and `trap cleanup EXIT`
|
|
595
|
+
- Route output through `log_step`, `log_info`, `annotate`, `assert_success` helpers
|
|
596
|
+
- Cite relevant bugs in test comments for future context
|
|
597
|
+
|
|
598
|
+
### CI/CD Integration
|
|
599
|
+
|
|
600
|
+
Tests run automatically in GitHub Actions on every push and pull request. See [CI/CD Pipeline Documentation](.github/workflows) for:
|
|
601
|
+
- Coverage gates (80%+ lines/statements/functions)
|
|
602
|
+
- Test failure notifications
|
|
603
|
+
- Performance benchmarking
|
|
604
|
+
- Security scanning
|
|
605
|
+
- Deployment workflows
|
|
606
|
+
|
|
607
|
+
### Troubleshooting
|
|
608
|
+
|
|
609
|
+
**Redis not available:**
|
|
610
|
+
```bash
|
|
611
|
+
# Start Redis in background
|
|
612
|
+
redis-server --daemonize yes
|
|
613
|
+
|
|
614
|
+
# Or run in Docker
|
|
615
|
+
docker run -d -p 6379:6379 redis:7-alpine
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
**Docker permission denied:**
|
|
619
|
+
```bash
|
|
620
|
+
# Add user to docker group
|
|
621
|
+
sudo usermod -aG docker $USER
|
|
622
|
+
newgrp docker
|
|
623
|
+
```
|
|
624
|
+
|
|
625
|
+
**Port conflicts:**
|
|
626
|
+
```bash
|
|
627
|
+
# Stop and remove existing containers
|
|
628
|
+
docker stop $(docker ps -aq)
|
|
629
|
+
docker rm $(docker ps -aq)
|
|
630
|
+
|
|
631
|
+
# Clean up Docker networks
|
|
632
|
+
docker network prune -f
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
**Test failures with unclear messages:**
|
|
636
|
+
```bash
|
|
637
|
+
# Run with verbose output
|
|
638
|
+
DEBUG=true ./tests/cli-mode/run-all-tests.sh
|
|
639
|
+
DEBUG=true ./tests/docker-mode/run-all-implementations.sh
|
|
640
|
+
|
|
641
|
+
# Check test logs in .artifacts/
|
|
642
|
+
tail -100 .artifacts/logs/test-execution.log
|
|
643
|
+
```
|
|
455
644
|
|
|
456
|
-
|
|
645
|
+
### Related Documentation
|
|
457
646
|
|
|
458
|
-
|
|
647
|
+
- **Test Suite Overview:** `tests/README.md`
|
|
648
|
+
- **Test Authoring Standards:** `tests/CLAUDE.md`
|
|
649
|
+
- **CLI Mode Details:** `tests/cli-mode/README.md`
|
|
650
|
+
- **Docker Mode Details:** `tests/docker-mode/README.md`
|
|
651
|
+
- **Test Coverage Analysis:** `tests/TEST_COVERAGE_MATRIX.md`
|
|
652
|
+
- **CFN Loop Architecture:** `docs/CFN_LOOP_ARCHITECTURE.md`
|
|
653
|
+
- **CI/CD Pipeline:** `.github/workflows`
|
|
459
654
|
|
|
460
655
|
### Development Setup
|
|
461
656
|
|
|
@@ -476,7 +671,7 @@ npm run build
|
|
|
476
671
|
|
|
477
672
|
### CI/CD Pipeline
|
|
478
673
|
|
|
479
|
-
Comprehensive GitHub Actions automation with unit testing, integration testing, coverage gates (80%+ lines/statements/functions), security scanning, and deployment workflows. See [CI/CD Pipeline Documentation](
|
|
674
|
+
Comprehensive GitHub Actions automation with unit testing, integration testing, coverage gates (80%+ lines/statements/functions), security scanning, and deployment workflows. See [CI/CD Pipeline Documentation](.github/workflows) for details.
|
|
480
675
|
|
|
481
676
|
---
|
|
482
677
|
|
|
@@ -603,14 +603,14 @@ npx claude-flow-novice agent-spawn backend-dev --task-id "${TASK_ID}"
|
|
|
603
603
|
npx claude-flow-novice agent-spawn reviewer --task-id "${TASK_ID}"
|
|
604
604
|
```
|
|
605
605
|
|
|
606
|
-
### Signaling Pattern
|
|
606
|
+
### Signaling Pattern
|
|
607
607
|
```bash
|
|
608
|
-
#
|
|
608
|
+
# Signal completion (when coordination is required)
|
|
609
609
|
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
610
610
|
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
611
611
|
fi
|
|
612
612
|
|
|
613
|
-
#
|
|
613
|
+
# Wait for other agent (zero-token blocking)
|
|
614
614
|
if [[ -n "${TASK_ID:-}" ]]; then
|
|
615
615
|
redis-cli blpop "swarm:${TASK_ID}:other-agent:done" 30
|
|
616
616
|
fi
|
|
@@ -656,11 +656,11 @@ Agents participate in 3-loop validation:
|
|
|
656
656
|
|
|
657
657
|
Complete your work and provide a structured response with:
|
|
658
658
|
- Confidence score (0.0-1.0) based on work quality
|
|
659
|
-
- Summary of
|
|
660
|
-
- List of
|
|
661
|
-
- Any recommendations
|
|
659
|
+
- Summary of work completed
|
|
660
|
+
- List of deliverables created
|
|
661
|
+
- Any recommendations or findings
|
|
662
662
|
|
|
663
|
-
**Note:** Coordination
|
|
663
|
+
**Note:** Coordination handled automatically by the system.
|
|
664
664
|
```
|
|
665
665
|
|
|
666
666
|
### Validation Hooks
|
|
@@ -994,79 +994,7 @@ Now that you understand agent creation, explore:
|
|
|
994
994
|
|
|
995
995
|
---
|
|
996
996
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
**Date:** 2025-11-06
|
|
1000
|
-
**Status:** Memory Leak Fix Applied - ANTI-023 Resolution
|
|
1001
|
-
|
|
1002
|
-
### ⚠️ CRITICAL: Mode-Specific Completion Required
|
|
1003
|
-
|
|
1004
|
-
Agents MUST use different completion protocols based on how they were spawned:
|
|
1005
|
-
|
|
1006
|
-
### Task Mode (Spawned via Task() tool in Main Chat)
|
|
1007
|
-
|
|
1008
|
-
**Simply complete your work and return structured output.**
|
|
1009
|
-
|
|
1010
|
-
```json
|
|
1011
|
-
{
|
|
1012
|
-
"confidence": 0.85,
|
|
1013
|
-
"status": "COMPLETE|NEEDS_WORK",
|
|
1014
|
-
"summary": "Brief summary of work completed",
|
|
1015
|
-
"deliverables": ["file1.ts", "file2.test.ts"]
|
|
1016
|
-
}
|
|
1017
|
-
```
|
|
1018
|
-
|
|
1019
|
-
**❌ DO NOT:**
|
|
1020
|
-
- Use Redis commands (redis-cli)
|
|
1021
|
-
- Execute bash scripts for completion
|
|
1022
|
-
- Signal completion via CLI tools
|
|
1023
|
-
- **Main Chat receives your output automatically**
|
|
1024
|
-
|
|
1025
|
-
### CLI Mode (Spawned via `npx claude-flow-novice agent-spawn`)
|
|
1026
|
-
|
|
1027
|
-
**Step 1: Complete Work**
|
|
1028
|
-
Execute assigned task (implementation, validation, review, etc.)
|
|
1029
|
-
|
|
1030
|
-
**Step 2: Signal Completion (CLI Mode Only)**
|
|
1031
|
-
```bash
|
|
1032
|
-
# CLI Mode: Signal completion
|
|
1033
|
-
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
1034
|
-
redis-cli lpush "swarm:${TASK_ID}:${AGENT_ID}:done" "complete"
|
|
1035
|
-
fi
|
|
1036
|
-
```
|
|
1037
|
-
|
|
1038
|
-
**Step 3: Report Confidence Score and Exit (CLI Mode Only)**
|
|
1039
|
-
```bash
|
|
1040
|
-
# CLI Mode: Report confidence
|
|
1041
|
-
if [[ -n "${TASK_ID:-}" && -n "${AGENT_ID:-}" ]]; then
|
|
1042
|
-
./.claude/skills/cfn-redis-coordination/invoke-waiting-mode.sh report \
|
|
1043
|
-
--task-id "$TASK_ID" \
|
|
1044
|
-
--agent-id "$AGENT_ID" \
|
|
1045
|
-
--confidence [0.0-1.0] \
|
|
1046
|
-
--iteration 1
|
|
1047
|
-
fi
|
|
1048
|
-
```
|
|
1049
|
-
|
|
1050
|
-
### How to Tell Which Mode You're In
|
|
1051
|
-
|
|
1052
|
-
- **Task Mode**: You were spawned via `Task("agent-name", "...")` in Main Chat
|
|
1053
|
-
- **CLI Mode**: You were spawned via `npx claude-flow-novice agent-spawn ...` command
|
|
1054
|
-
|
|
1055
|
-
### Why This Matters
|
|
1056
|
-
|
|
1057
|
-
- **Task Mode**: Main Chat handles everything, just return results
|
|
1058
|
-
- **CLI Mode**: Coordinator needs Redis signals to collect confidence scores
|
|
1059
|
-
- **Mixed protocols cause memory leaks** (ANTI-023 pattern)
|
|
1060
|
-
|
|
1061
|
-
### Related Documentation
|
|
1062
|
-
|
|
1063
|
-
- **Memory Leak Fix:** `docs/bugs/BUG_MEMORY_LEAK_VALIDATOR_FIX.md`
|
|
1064
|
-
- **Agent Lifecycle:** `.claude/agents/AGENT_LIFECYCLE.md`
|
|
1065
|
-
- **Main Documentation:** `CLAUDE.md:333-357` (Mode-specific protocols)
|
|
1066
|
-
|
|
1067
|
-
---
|
|
1068
|
-
|
|
1069
|
-
**Document Version:** 4.2.0 (Memory Leak Fix - Mode-Specific Protocols)
|
|
1070
|
-
**Last Updated:** 2025-11-06
|
|
997
|
+
**Document Version:** 4.3.0 (Unified Completion Protocol)
|
|
998
|
+
**Last Updated:** 2025-11-19
|
|
1071
999
|
**Maintained By:** Claude Flow Novice Team
|
|
1072
1000
|
**Feedback:** We'd love to hear how you're using agents! Share your creations.
|
|
@@ -142,8 +142,8 @@ When generating templates, always consider the broader project context, existing
|
|
|
142
142
|
|
|
143
143
|
Complete your work and provide a structured response with:
|
|
144
144
|
- Confidence score (0.0-1.0) based on work quality
|
|
145
|
-
- Summary of
|
|
146
|
-
- List of
|
|
147
|
-
- Any recommendations
|
|
145
|
+
- Summary of work completed
|
|
146
|
+
- List of deliverables created
|
|
147
|
+
- Any recommendations or findings
|
|
148
148
|
|
|
149
|
-
**Note:** Coordination
|
|
149
|
+
**Note:** Coordination handled automatically by the system.
|
|
@@ -123,9 +123,9 @@ Remember: A good plan executed now is better than a perfect plan executed never.
|
|
|
123
123
|
|
|
124
124
|
Complete your work and provide a structured response with:
|
|
125
125
|
- Confidence score (0.0-1.0) based on work quality
|
|
126
|
-
- Summary of
|
|
127
|
-
- List of
|
|
128
|
-
- Any recommendations
|
|
126
|
+
- Summary of work completed
|
|
127
|
+
- List of deliverables created
|
|
128
|
+
- Any recommendations or findings
|
|
129
129
|
|
|
130
|
-
**Note:** Coordination
|
|
130
|
+
**Note:** Coordination handled automatically by the system.
|
|
131
131
|
|
|
@@ -115,10 +115,10 @@ await sqlite.memoryAdapter.set(
|
|
|
115
115
|
**Core Insight:** Great architecture balances technical excellence with business needs, making informed trade-offs that enable long-term system health and adaptability.
|
|
116
116
|
## Completion Protocol
|
|
117
117
|
|
|
118
|
-
Complete your
|
|
119
|
-
- Confidence score (0.0-1.0) based on
|
|
120
|
-
- Summary of
|
|
118
|
+
Complete your work and provide a structured response with:
|
|
119
|
+
- Confidence score (0.0-1.0) based on work quality
|
|
120
|
+
- Summary of work completed
|
|
121
121
|
- List of deliverables created
|
|
122
|
-
- Any
|
|
122
|
+
- Any recommendations or findings
|
|
123
123
|
|
|
124
|
-
**Note:** Coordination
|
|
124
|
+
**Note:** Coordination handled automatically by the system.
|