claude-flow-novice 2.16.0 → 2.16.1
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/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +1 -1
- package/.claude/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +1 -1
- package/.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +1 -1
- package/.claude/cfn-extras/skills/google-sheets-progress/SKILL.md +1 -1
- package/.claude/commands/CFN_LOOP_FRONTEND.md +1 -1
- package/.claude/commands/cfn-loop-cli.md +124 -46
- package/.claude/commands/cfn-loop-frontend.md +1 -1
- package/.claude/commands/cfn-loop-task.md +2 -2
- package/.claude/commands/deprecated/cfn-loop.md +2 -2
- package/.claude/hooks/cfn-invoke-post-edit.sh +31 -5
- package/.claude/hooks/cfn-post-edit.config.json +9 -2
- package/.claude/root-claude-distribute/CFN-CLAUDE.md +1 -1
- package/.claude/skills/cfn-backlog-management/SKILL.md +1 -1
- package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +1 -1
- package/claude-assets/agents/cfn-dev-team/analysts/root-cause-analyst.md +2 -2
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +1 -1
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +2 -2
- package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +1 -1
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +1 -1
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +2 -2
- package/claude-assets/agents/cfn-dev-team/dev-ops/github-commit-agent.md +2 -2
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +1 -1
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/documentation/pseudocode.md +1 -1
- package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +1 -1
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +1 -1
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.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 +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +11 -0
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/claude-code-expert.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +1 -1
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +1 -1
- package/claude-assets/agents/custom/cfn-docker-expert.md +1 -0
- package/claude-assets/agents/custom/cfn-loops-cli-expert.md +326 -17
- package/claude-assets/agents/custom/cfn-redis-operations.md +529 -529
- package/claude-assets/agents/custom/cfn-system-expert.md +1 -1
- package/claude-assets/agents/custom/trigger-dev-expert.md +369 -0
- package/claude-assets/agents/docker-team/micro-sprint-planner.md +747 -747
- package/claude-assets/agents/project-only-agents/npm-package-specialist.md +1 -1
- package/claude-assets/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +1 -1
- package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +1 -1
- package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +1 -1
- package/claude-assets/cfn-extras/skills/google-sheets-progress/SKILL.md +1 -1
- package/claude-assets/commands/CFN_LOOP_FRONTEND.md +1 -1
- package/claude-assets/commands/cfn-loop-cli.md +124 -46
- package/claude-assets/commands/cfn-loop-frontend.md +1 -1
- package/claude-assets/commands/cfn-loop-task.md +2 -2
- package/claude-assets/commands/deprecated/cfn-loop.md +2 -2
- package/claude-assets/hooks/GIT-HOOKS-USAGE-EXAMPLES.md +116 -0
- package/claude-assets/hooks/README-GIT-HOOKS.md +443 -0
- package/claude-assets/hooks/cfn-invoke-post-edit.sh +31 -5
- package/claude-assets/hooks/cfn-post-edit.config.json +9 -2
- package/claude-assets/hooks/install-git-hooks.sh +243 -0
- package/claude-assets/hooks/subagent-start.sh +98 -0
- package/claude-assets/hooks/subagent-stop.sh +93 -0
- package/claude-assets/hooks/validators/credential-scanner.sh +172 -0
- package/claude-assets/root-claude-distribute/CFN-CLAUDE.md +1 -1
- package/claude-assets/skills/cfn-backlog-management/SKILL.md +1 -1
- package/claude-assets/skills/cfn-dependency-ingestion/SKILL.md +41 -13
- package/claude-assets/skills/cfn-dependency-ingestion/ingest.sh +237 -0
- package/claude-assets/skills/cfn-dependency-ingestion/manifests/cli-mode-dependencies.txt +73 -0
- package/claude-assets/skills/cfn-dependency-ingestion/manifests/shared-dependencies.txt +57 -0
- package/claude-assets/skills/cfn-dependency-ingestion/manifests/trigger-dev-dependencies.txt +82 -0
- package/claude-assets/skills/cfn-dependency-ingestion/manifests/trigger-mode-dependencies.txt +80 -0
- package/claude-assets/skills/cfn-environment-sanitization/sanitize-environment.sh +14 -4
- package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +1 -1
- package/claude-assets/skills/cfn-provider-routing/SKILL.md +23 -0
- package/claude-assets/skills/docker-build/build.sh +1 -1
- package/dist/agent/skill-mcp-selector.js +2 -1
- package/dist/agent/skill-mcp-selector.js.map +1 -1
- package/dist/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-executor.js +470 -26
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +2 -2
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/dist/cli/agent-spawn.js +7 -4
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/agent-spawner.js +51 -4
- package/dist/cli/agent-spawner.js.map +1 -1
- package/dist/cli/agent-token-manager.js +2 -1
- package/dist/cli/agent-token-manager.js.map +1 -1
- package/dist/cli/anthropic-client.js +117 -11
- package/dist/cli/anthropic-client.js.map +1 -1
- package/dist/cli/cfn-context.js +2 -1
- package/dist/cli/cfn-context.js.map +1 -1
- package/dist/cli/cfn-metrics.js +2 -1
- package/dist/cli/cfn-metrics.js.map +1 -1
- package/dist/cli/cfn-redis.js +2 -1
- package/dist/cli/cfn-redis.js.map +1 -1
- package/dist/cli/cli-agent-context.js +2 -0
- package/dist/cli/cli-agent-context.js.map +1 -1
- package/dist/cli/config-manager.js +4 -252
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/conversation-fork-cleanup.js +2 -1
- package/dist/cli/conversation-fork-cleanup.js.map +1 -1
- package/dist/cli/conversation-fork.js +2 -1
- package/dist/cli/conversation-fork.js.map +1 -1
- package/dist/cli/coordination/agent-messaging.js +415 -0
- package/dist/cli/coordination/agent-messaging.js.map +1 -0
- package/dist/cli/coordination/wait-for-threshold.js +232 -0
- package/dist/cli/coordination/wait-for-threshold.js.map +1 -0
- package/dist/cli/iteration-history.js +2 -1
- package/dist/cli/iteration-history.js.map +1 -1
- package/dist/cli/process-lifecycle.js +5 -1
- package/dist/cli/process-lifecycle.js.map +1 -1
- package/dist/cli/spawn-agent-cli.js +41 -6
- package/dist/cli/spawn-agent-cli.js.map +1 -1
- package/dist/coordination/redis-waiting-mode.js +4 -0
- package/dist/coordination/redis-waiting-mode.js.map +1 -1
- package/dist/lib/artifact-registry.js +4 -0
- package/dist/lib/artifact-registry.js.map +1 -1
- package/dist/lib/connection-pool.js +390 -0
- package/dist/lib/connection-pool.js.map +1 -0
- package/dist/lib/environment-contract.js +258 -0
- package/dist/lib/environment-contract.js.map +1 -0
- package/dist/lib/query-optimizer.js +388 -0
- package/dist/lib/query-optimizer.js.map +1 -0
- package/dist/lib/result-cache.js +285 -0
- package/dist/lib/result-cache.js.map +1 -0
- package/dist/mcp/auth-middleware.js +2 -1
- package/dist/mcp/auth-middleware.js.map +1 -1
- package/dist/mcp/playwright-mcp-server-auth.js +2 -1
- package/dist/mcp/playwright-mcp-server-auth.js.map +1 -1
- package/package.json +3 -1
- package/scripts/build-agent-image.sh +1 -1
- package/scripts/cost-allocation-tracker.sh +632 -0
- package/scripts/docker-rebuild-all-agents.sh +2 -2
- package/scripts/reorganize-tests.sh +280 -0
- package/scripts/trigger-dev-setup.sh +12 -0
- package/tests/README.md +45 -0
- package/.claude/commands/cost-savings-status.md +0 -34
- package/.claude/commands/metrics-summary.md +0 -58
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +0 -768
- package/claude-assets/agents/custom/test-mcp-access.md +0 -24
- package/claude-assets/commands/cost-savings-status.md +0 -34
- package/claude-assets/commands/metrics-summary.md +0 -58
- package/tests/test-memory-leak-task-mode.sh +0 -435
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: npm-package-specialist
|
|
3
|
-
description: MUST BE USED for npm package
|
|
3
|
+
description: MUST BE USED for npm package development, publishing, dependency management. Use PROACTIVELY for package configuration. Keywords - npm, package, dependencies, publishing
|
|
4
4
|
tools: [Read, Write, Edit, Bash, Grep, Glob, TodoWrite]
|
|
5
5
|
model: haiku
|
|
6
6
|
provider: zai
|
|
@@ -371,7 +371,7 @@ find ./.claude/cfn-extras/skills/google-sheets-* -name "*.sh" \
|
|
|
371
371
|
|
|
372
372
|
## Related Documentation
|
|
373
373
|
|
|
374
|
-
- **CFN Loop Guide**: `.claude/commands/
|
|
374
|
+
- **CFN Loop Guide**: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
375
375
|
- **Progress Tracking**: `.claude/cfn-extras/skills/google-sheets-progress/SKILL.md`
|
|
376
376
|
- **Validation Rules**: `.claude/cfn-extras/skills/google-sheets-validation/SKILL.md`
|
|
377
377
|
- **Formula Templates**: `.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md`
|
|
@@ -269,4 +269,4 @@ Rate limit state stored in: `.claude/cfn-extras/.gs-api-quota.json`
|
|
|
269
269
|
- **Google Sheets API**: https://developers.google.com/sheets/api
|
|
270
270
|
- **Rate Limiting Guide**: https://developers.google.com/sheets/api/guides/limits
|
|
271
271
|
- **Quota Documentation**: `google-sheets-validation` skill
|
|
272
|
-
- **CFN Loop Guide**: `.claude/commands/
|
|
272
|
+
- **CFN Loop Guide**: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
@@ -234,4 +234,4 @@ fi
|
|
|
234
234
|
|
|
235
235
|
- **Google Sheets API**: https://developers.google.com/sheets/api/reference/rest
|
|
236
236
|
- **Formula Validation**: `google-sheets-validation` skill
|
|
237
|
-
- **CFN Loop Guide**: `.claude/commands/
|
|
237
|
+
- **CFN Loop Guide**: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
@@ -281,7 +281,7 @@ The skill includes comprehensive test coverage:
|
|
|
281
281
|
|
|
282
282
|
## References
|
|
283
283
|
|
|
284
|
-
- **CFN Loop Documentation**: `.claude/commands/
|
|
284
|
+
- **CFN Loop Documentation**: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
285
285
|
- **State Management Pattern**: `.claude/skills/cfn-automatic-memory-persistence/SKILL.md`
|
|
286
286
|
- **Coordination Protocols**: `.claude/skills/cfn-coordination/SKILL.md`
|
|
287
287
|
- **Agent Output Standards**: `docs/AGENT_OUTPUT_STANDARDS.md`
|
|
@@ -732,7 +732,7 @@ Not generic advice - specific fixes only.`
|
|
|
732
732
|
|
|
733
733
|
## Related Documentation
|
|
734
734
|
|
|
735
|
-
- **Task Mode Guide**: `.claude/commands/
|
|
735
|
+
- **Task Mode Guide**: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
736
736
|
- **Standard CFN Loop**: `.claude/commands/cfn/cfn-loop.md`
|
|
737
737
|
- **Coordinator Parameters**: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
|
|
738
738
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: "Execute CFN Loop in simplified CLI mode (Main Chat coordination, provider routing)"
|
|
3
|
-
argument-hint: "<task description> [--mode=mvp|standard|enterprise] [--provider=zai|kimi|anthropic|openrouter] [--model=<model>]"
|
|
3
|
+
argument-hint: "<task description> [--mode=mvp|standard|enterprise] [--provider=zai|kimi|anthropic|openrouter] [--model=<model>] [--agents=N] [--threshold=0.75]"
|
|
4
4
|
allowed-tools: ["Task", "TodoWrite", "Read", "Bash", "SlashCommand"]
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# CFN Loop CLI Mode -
|
|
7
|
+
# CFN Loop CLI Mode - Parallel Agent Coordination
|
|
8
8
|
|
|
9
|
-
🚨 **
|
|
9
|
+
🚨 **v2.0 ARCHITECTURE:** Main Chat spawns parallel CLI agents with threshold-based completion
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
@@ -18,6 +18,8 @@ TASK_DESCRIPTION: $ARGUMENTS (extract task, remove flags)
|
|
|
18
18
|
MODE: Parse from --mode flag or default to "standard"
|
|
19
19
|
PROVIDER: Parse from --provider flag or use Main Chat setting
|
|
20
20
|
MODEL: Parse from --model flag or use provider default
|
|
21
|
+
AGENTS: Parse from --agents flag or default to 4
|
|
22
|
+
THRESHOLD: Parse from --threshold flag or default to 0.75 (3/4 agents)
|
|
21
23
|
```
|
|
22
24
|
|
|
23
25
|
**Step 2: Set Environment Variables**
|
|
@@ -27,6 +29,7 @@ TASK_ID="cfn-cli-$(date +%s%N | tail -c 7)-${RANDOM}"
|
|
|
27
29
|
echo "📋 Task ID: $TASK_ID"
|
|
28
30
|
echo "🎯 Mode: $MODE"
|
|
29
31
|
echo "🤖 Provider: $PROVIDER (from --provider or Main Chat setting)"
|
|
32
|
+
echo "👥 Agents: $AGENTS (threshold: $THRESHOLD)"
|
|
30
33
|
if [ -n "$MODEL" ]; then
|
|
31
34
|
echo "🧠 Model: $MODEL"
|
|
32
35
|
fi
|
|
@@ -53,55 +56,88 @@ fi
|
|
|
53
56
|
echo "✅ Redis available for Main Chat coordination"
|
|
54
57
|
```
|
|
55
58
|
|
|
56
|
-
**Step 4: Spawn
|
|
59
|
+
**Step 4: Spawn Parallel CLI Agents**
|
|
57
60
|
```bash
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
|
|
61
|
+
# Define agent types based on task complexity
|
|
62
|
+
# For comprehensive tasks, spawn multiple specialized agents
|
|
63
|
+
AGENT_TYPES=("backend-developer" "tester" "code-reviewer" "security-specialist")
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
echo "🚀 Spawning CLI agent: $AGENT_TYPE"
|
|
65
|
+
echo "🚀 Spawning $AGENTS parallel CLI agents..."
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
${
|
|
69
|
-
${MODEL:+--model "$MODEL"} \
|
|
70
|
-
--background
|
|
67
|
+
# Spawn agents in BACKGROUND (use & to allow Main Chat to continue)
|
|
68
|
+
for i in $(seq 1 $AGENTS); do
|
|
69
|
+
AGENT_TYPE="${AGENT_TYPES[$((i-1)) % ${#AGENT_TYPES[@]}]}"
|
|
70
|
+
AGENT_ID="${AGENT_TYPE}-${TASK_ID}-${i}"
|
|
71
71
|
|
|
72
|
-
echo "
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
**Step 5: Wait for Agent Completion (Main Chat BLPOP Pattern)**
|
|
76
|
-
```bash
|
|
77
|
-
# Main Chat waits for completion signal via Redis BLPOP
|
|
78
|
-
echo "⏳ Waiting for CLI agent completion..."
|
|
72
|
+
echo " → Spawning agent $i: $AGENT_TYPE ($AGENT_ID)"
|
|
79
73
|
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
npx claude-flow-novice agent "$AGENT_TYPE" \
|
|
75
|
+
--task-id "$TASK_ID" \
|
|
76
|
+
--mode "$MODE" \
|
|
77
|
+
--provider "$PROVIDER" \
|
|
78
|
+
--context "$TASK_DESCRIPTION" \
|
|
79
|
+
</dev/null >/tmp/agent-${AGENT_ID}.log 2>&1 &
|
|
80
|
+
done
|
|
82
81
|
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
echo "✅ All $AGENTS CLI agents spawned with Task ID: $TASK_ID"
|
|
83
|
+
```
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
**Step 5: Wait for Threshold Completion (FOREGROUND - Required for Main Chat)**
|
|
86
|
+
```bash
|
|
87
|
+
# CRITICAL: Run monitor in FOREGROUND so Main Chat receives completion signal
|
|
88
|
+
# DO NOT use run_in_background for this monitoring loop
|
|
89
|
+
|
|
90
|
+
COMPLETION_QUEUE="cfn:cli:${TASK_ID}:completion"
|
|
91
|
+
REQUIRED=$(echo "$AGENTS * $THRESHOLD" | bc | cut -d. -f1)
|
|
92
|
+
|
|
93
|
+
echo "⏳ Monitoring for completion (${REQUIRED}/$AGENTS agents)..."
|
|
94
|
+
echo "📊 Queue: $COMPLETION_QUEUE"
|
|
95
|
+
echo ""
|
|
96
|
+
|
|
97
|
+
COMPLETED=0
|
|
98
|
+
END_TIME=$(($(date +%s) + 300)) # 5 minute timeout
|
|
99
|
+
|
|
100
|
+
while [ $(date +%s) -lt $END_TIME ] && [ $COMPLETED -lt $REQUIRED ]; do
|
|
101
|
+
QUEUE_LEN=$(redis-cli LLEN "$COMPLETION_QUEUE" 2>/dev/null || echo "0")
|
|
102
|
+
|
|
103
|
+
if [ "$QUEUE_LEN" -gt 0 ]; then
|
|
104
|
+
SIGNAL=$(redis-cli LPOP "$COMPLETION_QUEUE")
|
|
105
|
+
if [ -n "$SIGNAL" ] && [ "$SIGNAL" != "(nil)" ]; then
|
|
106
|
+
COMPLETED=$((COMPLETED + 1))
|
|
107
|
+
AGENT_ID=$(echo "$SIGNAL" | jq -r '.agentId' 2>/dev/null || echo "unknown")
|
|
108
|
+
CONFIDENCE=$(echo "$SIGNAL" | jq -r '.confidence' 2>/dev/null || echo "N/A")
|
|
109
|
+
PROVIDER=$(echo "$SIGNAL" | jq -r '.provider' 2>/dev/null || echo "N/A")
|
|
110
|
+
|
|
111
|
+
echo "✅ Agent $COMPLETED completed: $AGENT_ID"
|
|
112
|
+
echo " Confidence: $CONFIDENCE, Provider: $PROVIDER"
|
|
113
|
+
echo ""
|
|
114
|
+
|
|
115
|
+
if [ $COMPLETED -ge $REQUIRED ]; then
|
|
116
|
+
echo "🎉 THRESHOLD MET! ($COMPLETED/$AGENTS agents)"
|
|
117
|
+
echo "✅ CFN Loop CLI task completed"
|
|
118
|
+
exit 0
|
|
119
|
+
fi
|
|
120
|
+
fi
|
|
121
|
+
fi
|
|
122
|
+
|
|
123
|
+
sleep 3
|
|
124
|
+
done
|
|
125
|
+
|
|
126
|
+
echo "⏰ Timeout: Only $COMPLETED/$AGENTS agents completed"
|
|
127
|
+
exit 1
|
|
128
|
+
```
|
|
89
129
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
130
|
+
**Step 6: Query Agent Status (Optional - Interactive)**
|
|
131
|
+
```bash
|
|
132
|
+
# Main Chat can query individual agent status during execution
|
|
133
|
+
# Example: npx tsx src/cli/coordination/agent-messaging.ts status --task-id "$TASK_ID" --agent-id <agent-id>
|
|
93
134
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
echo "🎉 CFN Loop CLI task completed"
|
|
97
|
-
else
|
|
98
|
-
echo "⚠️ CLI agent did not complete within timeout ($TIMEOUT_SECONDS seconds)"
|
|
99
|
-
echo "💡 Check agent logs or increase timeout if needed"
|
|
100
|
-
fi
|
|
135
|
+
# Or send commands to running agents:
|
|
136
|
+
# npx tsx src/cli/coordination/agent-messaging.ts send --task-id "$TASK_ID" --agent-id <agent-id> --command status
|
|
101
137
|
```
|
|
102
138
|
|
|
103
|
-
**Step
|
|
104
|
-
Report completion status and any additional information.
|
|
139
|
+
**Step 7: Inform User**
|
|
140
|
+
Report completion status, which agents completed, and any additional information.
|
|
105
141
|
|
|
106
142
|
---
|
|
107
143
|
|
|
@@ -111,13 +147,55 @@ Report completion status and any additional information.
|
|
|
111
147
|
|
|
112
148
|
## What is CLI Mode?
|
|
113
149
|
|
|
114
|
-
**
|
|
115
|
-
- **Main Chat**
|
|
150
|
+
**v2.0 CLI Mode Architecture (Parallel + Messaging):**
|
|
151
|
+
- **Main Chat** spawns multiple CLI agents in parallel
|
|
116
152
|
- **CLI agents** execute tasks and send Redis completion signals
|
|
117
|
-
- **Main Chat** waits
|
|
118
|
-
- **
|
|
153
|
+
- **Main Chat** waits for threshold completion (e.g., 3/4 agents)
|
|
154
|
+
- **Bidirectional messaging** - Main Chat can send commands to running agents
|
|
119
155
|
- **Provider routing** via `--provider` and `--model` flags
|
|
120
|
-
- **
|
|
156
|
+
- **Graceful degradation** - continues when threshold met, doesn't wait for stragglers
|
|
157
|
+
|
|
158
|
+
## New Features (v2.0)
|
|
159
|
+
|
|
160
|
+
### Parallel Agent Spawning
|
|
161
|
+
- Spawn multiple agents simultaneously (default: 4)
|
|
162
|
+
- Each agent works independently on the task
|
|
163
|
+
- Different agent types for comprehensive coverage
|
|
164
|
+
|
|
165
|
+
### Threshold-Based Completion
|
|
166
|
+
- Exit when N/M agents complete (default: 75%)
|
|
167
|
+
- Don't wait for slow/stuck agents
|
|
168
|
+
- Configurable via `--threshold` flag
|
|
169
|
+
|
|
170
|
+
### Bidirectional Messaging
|
|
171
|
+
Main Chat can communicate with running agents:
|
|
172
|
+
|
|
173
|
+
**Query agent status:**
|
|
174
|
+
```bash
|
|
175
|
+
npx tsx src/cli/coordination/agent-messaging.ts status \
|
|
176
|
+
--task-id "$TASK_ID" --agent-id <agent-id>
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Send commands to agents:**
|
|
180
|
+
```bash
|
|
181
|
+
# Request status update
|
|
182
|
+
npx tsx src/cli/coordination/agent-messaging.ts send \
|
|
183
|
+
--task-id "$TASK_ID" --agent-id <agent-id> --command status
|
|
184
|
+
|
|
185
|
+
# Redirect agent to new task
|
|
186
|
+
npx tsx src/cli/coordination/agent-messaging.ts send \
|
|
187
|
+
--task-id "$TASK_ID" --agent-id <agent-id> --command redirect \
|
|
188
|
+
--payload '{"newTask": "Focus on security tests"}'
|
|
189
|
+
|
|
190
|
+
# Abort agent
|
|
191
|
+
npx tsx src/cli/coordination/agent-messaging.ts send \
|
|
192
|
+
--task-id "$TASK_ID" --agent-id <agent-id> --command abort
|
|
193
|
+
|
|
194
|
+
# Pause agent
|
|
195
|
+
npx tsx src/cli/coordination/agent-messaging.ts send \
|
|
196
|
+
--task-id "$TASK_ID" --agent-id <agent-id> --command pause \
|
|
197
|
+
--payload '{"seconds": 30}'
|
|
198
|
+
```
|
|
121
199
|
|
|
122
200
|
## Prerequisites
|
|
123
201
|
|
|
@@ -561,7 +561,7 @@ Before running frontend CFN Loop:
|
|
|
561
561
|
|
|
562
562
|
- Guide: `.claude/commands/cfn/CFN_LOOP_FRONTEND.md` (742 lines, complete workflow)
|
|
563
563
|
- Coordinator: `.claude/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md`
|
|
564
|
-
- Task Mode: `.claude/commands/
|
|
564
|
+
- Task Mode: `.claude/commands/CFN_LOOP_TASK_MODE.md`
|
|
565
565
|
- Standard CFN Loop: `.claude/commands/cfn/cfn-loop.md`
|
|
566
566
|
|
|
567
567
|
---
|
|
@@ -106,7 +106,7 @@ You must execute this CFN Loop directly using the Task() tool to spawn agents.
|
|
|
106
106
|
Read the complete Task Mode guide for detailed workflow:
|
|
107
107
|
|
|
108
108
|
```
|
|
109
|
-
Read('.claude/commands/
|
|
109
|
+
Read('.claude/commands/CFN_LOOP_TASK_MODE.md')
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
**Expected output:** Complete guide with agent selection, workflow steps, helper scripts
|
|
@@ -450,7 +450,7 @@ parse-decision.sh --output "$PO_OUTPUT"
|
|
|
450
450
|
|
|
451
451
|
## Related Documentation
|
|
452
452
|
|
|
453
|
-
- **Task Mode Guide**: `.claude/commands/
|
|
453
|
+
- **Task Mode Guide**: `.claude/commands/CFN_LOOP_TASK_MODE.md` (complete reference)
|
|
454
454
|
- Coordinator Parameters: `.claude/commands/cfn/CFN_COORDINATOR_PARAMETERS.md`
|
|
455
455
|
- Agent Output Standards: `docs/AGENT_OUTPUT_STANDARDS.md`
|
|
456
456
|
- ACE System: `.claude/skills/cfn-ace-system/SKILL.md`
|
|
@@ -95,7 +95,7 @@ Extract parameters from command:
|
|
|
95
95
|
|
|
96
96
|
```javascript
|
|
97
97
|
// Read Task Mode guide for agent specialization and workflow
|
|
98
|
-
const taskModeGuide = await Read('.claude/commands/
|
|
98
|
+
const taskModeGuide = await Read('.claude/commands/CFN_LOOP_TASK_MODE.md');
|
|
99
99
|
|
|
100
100
|
// Guide provides:
|
|
101
101
|
// - Agent specialization (Loop 3: implementers, Loop 2: validators, Loop 4: PO)
|
|
@@ -274,7 +274,7 @@ Main Chat does NOT spawn a coordinator. Instead, it coordinates directly followi
|
|
|
274
274
|
|
|
275
275
|
```javascript
|
|
276
276
|
// Step 1: Read Task Mode Guide
|
|
277
|
-
const guide = await Read('.claude/commands/
|
|
277
|
+
const guide = await Read('.claude/commands/CFN_LOOP_TASK_MODE.md');
|
|
278
278
|
|
|
279
279
|
// Step 2: Analyze Task Complexity (from guide)
|
|
280
280
|
const complexity = analyzeComplexity({
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Git Hooks: Usage Examples
|
|
2
|
+
|
|
3
|
+
Real-world examples of the pre-commit credential detection system in action.
|
|
4
|
+
|
|
5
|
+
## Example 1: Developer Accidentally Commits API Key
|
|
6
|
+
|
|
7
|
+
Developer edits a configuration file and forgets to redact their Anthropic API key.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
$ git add config.ts
|
|
11
|
+
$ git commit -m "feat: add anthropic integration"
|
|
12
|
+
|
|
13
|
+
Pre-Commit Hook: Scanning for credential exposure...
|
|
14
|
+
|
|
15
|
+
COMMIT BLOCKED: 1 credential(s) detected
|
|
16
|
+
|
|
17
|
+
CREDENTIAL DETECTED:
|
|
18
|
+
File: config.ts
|
|
19
|
+
Line: 1
|
|
20
|
+
Match: ANTHROPIC_API_KEY=[CREDENTIAL_REDACTED]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Resolution: Replace with placeholder, move to .env, use environment variable.
|
|
24
|
+
|
|
25
|
+
## Example 2: Database Password in Connection String
|
|
26
|
+
|
|
27
|
+
Hardcoded PostgreSQL password in database configuration.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
$ git commit -m "chore: database configuration"
|
|
31
|
+
|
|
32
|
+
COMMIT BLOCKED: 1 credential(s) detected
|
|
33
|
+
|
|
34
|
+
CREDENTIAL DETECTED:
|
|
35
|
+
File: database.ts
|
|
36
|
+
Line: 4
|
|
37
|
+
Match: password: [CREDENTIAL_REDACTED]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Resolution: Replace with process.env.DB_PASSWORD.
|
|
41
|
+
|
|
42
|
+
## Example 3: Test File with Mock Credentials (Whitelisted)
|
|
43
|
+
|
|
44
|
+
Tests with legitimate test credentials that are whitelisted.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
$ git add auth.test.ts
|
|
48
|
+
$ git commit -m "test: add API key format validation"
|
|
49
|
+
|
|
50
|
+
No credentials detected - proceeding with commit
|
|
51
|
+
|
|
52
|
+
# Success! 'sk-ant-mock' and 'npm_MockTestKey'
|
|
53
|
+
# are whitelisted patterns for testing
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Example 4: Documentation with [REDACTED] Placeholder
|
|
57
|
+
|
|
58
|
+
Documentation showing API setup with redacted values.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
$ git add API_SETUP.md
|
|
62
|
+
$ git commit -m "docs: add API setup instructions"
|
|
63
|
+
|
|
64
|
+
No credentials detected - proceeding with commit
|
|
65
|
+
|
|
66
|
+
# Success! [REDACTED] is a whitelisted pattern
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Example 5: Multiple Files Scanned
|
|
70
|
+
|
|
71
|
+
Multiple files scanned before commit.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
$ git add src/auth.ts src/config.ts docs/SETUP.md tests/auth.test.ts
|
|
75
|
+
$ git commit -m "feat: complete authentication setup"
|
|
76
|
+
|
|
77
|
+
Pre-Commit Hook: Scanning for credential exposure...
|
|
78
|
+
|
|
79
|
+
Scanning: src/auth.ts
|
|
80
|
+
Scanning: src/config.ts
|
|
81
|
+
Scanning: docs/SETUP.md
|
|
82
|
+
Scanning: tests/auth.test.ts
|
|
83
|
+
|
|
84
|
+
Scanned: 4 files
|
|
85
|
+
|
|
86
|
+
No credentials detected - proceeding with commit
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Example 6: Bypassing the Hook (Emergency Only)
|
|
90
|
+
|
|
91
|
+
Emergency override when absolutely necessary.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
$ git commit --no-verify -m "emergency: temporary workaround"
|
|
95
|
+
|
|
96
|
+
# WARNING: CI/CD will still catch credentials!
|
|
97
|
+
# This should only be used in true emergencies
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Example 7: Audit Trail Review
|
|
101
|
+
|
|
102
|
+
Security team reviewing credential detection history.
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
$ cat .artifacts/logs/git-hooks.log
|
|
106
|
+
|
|
107
|
+
2025-11-23T10:30:45Z | PRE-COMMIT BLOCKED | CREDENTIALS:1 | FILES_SCANNED:1
|
|
108
|
+
2025-11-23T10:31:12Z | PRE-COMMIT SUCCESS | FILES_SCANNED:2
|
|
109
|
+
2025-11-23T10:32:15Z | PRE-COMMIT SUCCESS | FILES_SCANNED:4
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Related Documentation
|
|
113
|
+
|
|
114
|
+
- Complete Guide: `.claude/hooks/README-GIT-HOOKS.md`
|
|
115
|
+
- Installation: `.claude/hooks/install-git-hooks.sh`
|
|
116
|
+
- Pre-Commit Hook: `.git/hooks/pre-commit`
|