claude-flow-novice 2.14.6 → 2.14.8
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/commands/cfn/run-tests.md +119 -0
- package/.claude/hooks/cfn-post-edit.config.json +11 -4
- package/.claude/skills/cfn-agent-selector/SKILL.md +3 -2
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +1 -1
- package/.claude/skills/cfn-product-owner-decision/execute-decision.sh +207 -113
- package/.claude/skills/cfn-product-owner-decision/test-backlog-integration.sh +148 -0
- package/.claude/skills/cfn-redis-coordination/report-completion.sh +86 -0
- package/.claude/skills/cfn-redis-coordination/store-context.sh +34 -0
- package/.claude/skills/pre-edit-backup/backup.sh +130 -0
- package/.claude/skills/pre-edit-backup/cleanup.sh +155 -0
- package/.claude/skills/pre-edit-backup/restore.sh +128 -0
- package/.claude/skills/pre-edit-backup/revert-file.sh +168 -0
- package/claude-assets/agents/README-AGENT_LIFECYCLE.md +522 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +13 -8
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +1 -1
- package/claude-assets/agents/cfn-dev-team/test-agent.md +141 -0
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +35 -0
- package/claude-assets/commands/cfn/run-tests.md +119 -0
- package/claude-assets/hooks/cfn-post-edit.config.json +11 -4
- package/claude-assets/skills/agent-name-validation/README.md +28 -0
- package/claude-assets/skills/agent-name-validation/SKILL.md +168 -0
- package/claude-assets/skills/agent-name-validation/validate-agent-names.sh +47 -0
- package/claude-assets/skills/cfn-agent-selector/SKILL.md +3 -2
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +1 -1
- package/claude-assets/skills/cfn-product-owner-decision/execute-decision.sh +207 -113
- package/claude-assets/skills/cfn-product-owner-decision/test-backlog-integration.sh +148 -0
- package/claude-assets/skills/cfn-redis-coordination/report-completion.sh +86 -0
- package/claude-assets/skills/cfn-redis-coordination/store-context.sh +34 -0
- package/claude-assets/skills/cfn-task-classifier/SKILL.md +1 -1
- package/claude-assets/skills/cfn-test-runner/SKILL.md +288 -0
- package/claude-assets/skills/cfn-test-runner/detect-regressions.sh +55 -0
- package/claude-assets/skills/cfn-test-runner/init-benchmark-db.sh +48 -0
- package/claude-assets/skills/cfn-test-runner/run-all-tests.sh +222 -0
- package/claude-assets/skills/cfn-test-runner/store-benchmarks.sh +55 -0
- package/claude-assets/skills/cfn-test-runner/validate-redis-keys.sh +143 -0
- package/claude-assets/skills/hook-pipeline/bash-dependency-checker.sh +89 -0
- package/claude-assets/skills/hook-pipeline/bash-pipe-safety.sh +69 -0
- package/claude-assets/skills/hook-pipeline/enforce-lf.sh +36 -0
- package/claude-assets/skills/hook-pipeline/js-promise-safety.sh +110 -0
- package/claude-assets/skills/hook-pipeline/python-async-safety.py +124 -0
- package/claude-assets/skills/hook-pipeline/python-import-checker.py +114 -0
- package/claude-assets/skills/hook-pipeline/python-subprocess-safety.py +77 -0
- package/claude-assets/skills/hook-pipeline/rust-command-safety.sh +38 -0
- package/claude-assets/skills/hook-pipeline/rust-dependency-checker.sh +50 -0
- package/claude-assets/skills/hook-pipeline/rust-future-safety.sh +50 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-executor.js +1 -1
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +40 -30
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/package.json +2 -1
- package/scripts/init-project.js +4 -1
- package/scripts/switch-api.sh +7 -7
- package/claude-assets/agents/cfn-dev-team/developers/dev-backend-api.md +0 -147
- package/claude-assets/agents/cfn-dev-team/developers/frontend/spec-mobile-react-native.md +0 -199
- package/claude-assets/agents/cfn-dev-team/documentation/docs-api-openapi.md +0 -98
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner-agent.md +0 -155
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/analyze-code-quality.md +0 -141
- /package/claude-assets/agents/cfn-dev-team/developers/{backend-dev.md → backend-developer.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/documentation/{api-docs.md → api-documentation.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/documentation/{specification.md → specification-agent.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/reviewers/quality/{code-analyzer.md → code-quality-validator.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/testers/e2e/{playwright-agent.md → playwright-tester.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/testers/unit/{tdd-london-swarm.md → tdd-london-unit-swarm.md} +0 -0
- /package/claude-assets/agents/cfn-dev-team/testers/validation/{production-validator.md → validation-production-validator.md} +0 -0
|
@@ -108,7 +108,7 @@ fi
|
|
|
108
108
|
**Agent Selection:**
|
|
109
109
|
```bash
|
|
110
110
|
# Query registry and select agents
|
|
111
|
-
AGENTS=$(bash ./.claude/skills/agent-selector/select-agents.sh \
|
|
111
|
+
AGENTS=$(bash ./.claude/skills/cfn-agent-selector/select-agents.sh \
|
|
112
112
|
--task-type "$TASK_TYPE" \
|
|
113
113
|
--description "$TASK_DESCRIPTION" \
|
|
114
114
|
--agent-registry ".claude/skills/agent-discovery/agents-registry.json")
|
|
@@ -267,6 +267,9 @@ echo "Estimated Iterations: $ESTIMATED_ITERATIONS"
|
|
|
267
267
|
**CRITICAL CLI Mode Requirement:**
|
|
268
268
|
You MUST invoke the orchestrator by iteration 3. Do not spend more than 2 iterations on setup. If agent discovery/selection fails, use hardcoded defaults and proceed to orchestrator invocation.
|
|
269
269
|
|
|
270
|
+
**MANDATORY FOR E2E TESTING:**
|
|
271
|
+
When spawned with --task-id parameter, you MUST ALWAYS invoke the orchestrator to ensure full CFN Loop execution. Even for simple tasks, delegate to orchestrator to test all coordination points (Loop 3, gate check, Loop 2, Product Owner decision).
|
|
272
|
+
|
|
270
273
|
### CLI Mode (Streamlined for Orchestrator Invocation)
|
|
271
274
|
|
|
272
275
|
**STEP 1: Task Classification (1 iteration max)**
|
|
@@ -277,13 +280,13 @@ TASK_TYPE=$(bash ./.claude/skills/task-classifier/classify-task.sh "$TASK_DESCRI
|
|
|
277
280
|
**STEP 2: Agent Selection with Fallback (1 iteration max)**
|
|
278
281
|
```bash
|
|
279
282
|
# Try agent selector (fail fast if broken)
|
|
280
|
-
if AGENTS=$(bash ./.claude/skills/agent-selector/select-agents.sh --task-type "$TASK_TYPE" --description "$TASK_DESCRIPTION" 2>/dev/null); then
|
|
283
|
+
if AGENTS=$(bash ./.claude/skills/cfn-agent-selector/select-agents.sh --task-type "$TASK_TYPE" --description "$TASK_DESCRIPTION" 2>/dev/null); then
|
|
281
284
|
LOOP3_AGENTS=$(echo "$AGENTS" | jq -r '.loop3 | join(",")')
|
|
282
285
|
LOOP2_AGENTS=$(echo "$AGENTS" | jq -r '.loop2 | join(",")')
|
|
283
286
|
PRODUCT_OWNER=$(echo "$AGENTS" | jq -r '.loop4')
|
|
284
287
|
else
|
|
285
288
|
# FALLBACK: Use hardcoded defaults for software-development
|
|
286
|
-
LOOP3_AGENTS="
|
|
289
|
+
LOOP3_AGENTS="backend-developer"
|
|
287
290
|
LOOP2_AGENTS="reviewer,tester"
|
|
288
291
|
PRODUCT_OWNER="product-owner"
|
|
289
292
|
fi
|
|
@@ -291,16 +294,18 @@ fi
|
|
|
291
294
|
|
|
292
295
|
**STEP 3: INVOKE ORCHESTRATOR (REQUIRED - NOT OPTIONAL)**
|
|
293
296
|
|
|
294
|
-
|
|
297
|
+
**CRITICAL:** You MUST invoke orchestrator by iteration 3. DO NOT complete tasks yourself.
|
|
298
|
+
|
|
299
|
+
Execute this immediately after Step 2 (use hardcoded fallback if agent selector fails):
|
|
295
300
|
|
|
296
301
|
```bash
|
|
297
|
-
#
|
|
302
|
+
# ALWAYS invoke orchestrator - do NOT complete task directly
|
|
298
303
|
./.claude/skills/cfn-loop-orchestration/orchestrate.sh \
|
|
299
304
|
--task-id "$TASK_ID" \
|
|
300
305
|
--mode "standard" \
|
|
301
|
-
--loop3-agents "
|
|
302
|
-
--loop2-agents "
|
|
303
|
-
--product-owner "
|
|
306
|
+
--loop3-agents "backend-developer" \
|
|
307
|
+
--loop2-agents "reviewer,tester" \
|
|
308
|
+
--product-owner "product-owner" \
|
|
304
309
|
--max-iterations 10 \
|
|
305
310
|
--success-criteria '{"deliverables":[],"acceptanceCriteria":["Implementation complete"]}'
|
|
306
311
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: product-owner
|
|
3
3
|
description: "CFN Loop Product Owner using Goal-Oriented Action Planning (GOAP) for autonomous scope enforcement and decision authority."
|
|
4
4
|
tools: [Read, Write, Edit, Bash, TodoWrite]
|
|
5
|
-
model:
|
|
5
|
+
model: sonnet
|
|
6
6
|
color: purple
|
|
7
7
|
type: strategic
|
|
8
8
|
keywords: [product-owner, cfn-loop, goap, scope-enforcement, decision-authority, strategic-planning, autonomous-execution, consensus-validation]
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Epic Creator Deletion Issue - Complete Summary
|
|
2
|
+
|
|
3
|
+
**Date:** 2025-11-03
|
|
4
|
+
**Status:** RESOLVED
|
|
5
|
+
**Versions:** v2.14.5 (epic-creator added), v2.14.6 (init bug fixed)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
The `epic-creator.md` coordinator agent kept getting deleted from `.claude/agents/cfn-dev-team/coordinators/` after being created and committed.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Root Cause
|
|
16
|
+
|
|
17
|
+
**Every `npx claude-flow-novice` command triggered `cfn-init`**, which overwrote the entire `.claude/agents/cfn-dev-team/` directory from the npm package.
|
|
18
|
+
|
|
19
|
+
### Why It Happened
|
|
20
|
+
|
|
21
|
+
1. `package.json` has `"postinstall": "node scripts/init-project.js"`
|
|
22
|
+
2. Running `npx claude-flow-novice agent backend-dev` triggers postinstall
|
|
23
|
+
3. `init-project.js` ran `cfn-init` unconditionally
|
|
24
|
+
4. cfn-init copied package version of cfn-dev-team/, overwriting local files
|
|
25
|
+
5. epic-creator.md (and other local customizations) got deleted
|
|
26
|
+
|
|
27
|
+
### Trigger Pattern
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Each of these triggered cfn-init:
|
|
31
|
+
npx claude-flow-novice agent backend-dev
|
|
32
|
+
npx claude-flow-novice agent reviewer
|
|
33
|
+
npx claude-flow-novice agent epic-creator
|
|
34
|
+
|
|
35
|
+
# In test sessions running hundreds of npx commands:
|
|
36
|
+
# = hundreds of cfn-init runs = constant file deletion
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Solution
|
|
42
|
+
|
|
43
|
+
### Phase 1: Add epic-creator to Package (v2.14.5)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Copy epic-creator to package assets
|
|
47
|
+
cp .claude/agents/cfn-dev-team/coordinators/epic-creator.md \
|
|
48
|
+
claude-assets/agents/cfn-dev-team/coordinators/
|
|
49
|
+
|
|
50
|
+
# Publish to npm
|
|
51
|
+
npm version patch
|
|
52
|
+
npm publish
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Result:** Users can now get epic-creator via normal installation.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
### Phase 2: Fix Init-on-Every-NPX Bug (v2.14.6)
|
|
60
|
+
|
|
61
|
+
**Changes to `scripts/init-project.js`:**
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
async function initializeCfnProject() {
|
|
65
|
+
// Skip initialization if already initialized
|
|
66
|
+
const markerPath = '.claude/.cfn-initialized';
|
|
67
|
+
if (fs.existsSync(markerPath)) {
|
|
68
|
+
// Silently skip - already initialized
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// ... existing init logic ...
|
|
73
|
+
|
|
74
|
+
// Create marker file after successful init
|
|
75
|
+
fs.writeFileSync('.claude/.cfn-initialized', new Date().toISOString());
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**How It Works:**
|
|
80
|
+
1. First `npx claude-flow-novice` command → runs full init → creates marker
|
|
81
|
+
2. Subsequent commands → sees marker → skips init → files preserved
|
|
82
|
+
3. Force reinit: `rm .claude/.cfn-initialized && npx cfn-init`
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Epic Creator Agent
|
|
87
|
+
|
|
88
|
+
**Purpose:** Transforms natural language epic descriptions into structured JSON configs for CFN Loop execution.
|
|
89
|
+
|
|
90
|
+
**Three Personas:**
|
|
91
|
+
- **CTO:** Technical architecture, dependencies, risk assessment
|
|
92
|
+
- **Product Owner:** Value prioritization, scope boundaries
|
|
93
|
+
- **Project Manager:** Phase decomposition, deliverables, estimates
|
|
94
|
+
|
|
95
|
+
**Key Features:**
|
|
96
|
+
- Decomposes epics into 3-7 focused phases
|
|
97
|
+
- Selects appropriate Loop 3/Loop 2 agents per phase
|
|
98
|
+
- Defines concrete deliverables with file paths
|
|
99
|
+
- Sets mode-appropriate thresholds (MVP/Standard/Enterprise)
|
|
100
|
+
- Validates configuration completeness
|
|
101
|
+
|
|
102
|
+
**Location:** `.claude/agents/cfn-dev-team/coordinators/epic-creator.md` (3.7KB)
|
|
103
|
+
|
|
104
|
+
**Usage:**
|
|
105
|
+
```bash
|
|
106
|
+
npx claude-flow-novice agent epic-creator \
|
|
107
|
+
--prompt "Create epic for user authentication system with JWT and OAuth2"
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Published Versions
|
|
113
|
+
|
|
114
|
+
**v2.14.5** (Published 2025-11-03)
|
|
115
|
+
- Includes epic-creator in package distribution
|
|
116
|
+
- Users get it automatically on install
|
|
117
|
+
|
|
118
|
+
**v2.14.6** (Published 2025-11-03)
|
|
119
|
+
- Fixes init-on-every-npx bug
|
|
120
|
+
- Preserves local customizations
|
|
121
|
+
- Faster CLI performance
|
|
122
|
+
|
|
123
|
+
**Install Latest:**
|
|
124
|
+
```bash
|
|
125
|
+
npm install claude-flow-novice@latest
|
|
126
|
+
npx cfn-init # Only runs once, creates marker
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Current Status
|
|
132
|
+
|
|
133
|
+
**RESOLVED:** Both epic-creator availability and init-on-every-npx bug are fixed.
|
|
134
|
+
|
|
135
|
+
**Users on v2.14.6+ will:**
|
|
136
|
+
- Get epic-creator automatically
|
|
137
|
+
- Experience fast npx startup
|
|
138
|
+
- Keep local customizations safe
|
|
139
|
+
- Have stable cfn-dev-team directory
|
|
140
|
+
|
|
141
|
+
**No further action required.**
|
|
@@ -499,6 +499,41 @@ Before finalizing an agent template, verify:
|
|
|
499
499
|
- [ ] Bash variables use `\$VARIABLE` in template examples
|
|
500
500
|
- [ ] Multi-line strings properly indented
|
|
501
501
|
|
|
502
|
+
## Post-Creation Validation
|
|
503
|
+
|
|
504
|
+
**CRITICAL: After creating or updating any agent file, run agent name validation:**
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
This ensures:
|
|
511
|
+
- Filename matches frontmatter `name:` field
|
|
512
|
+
- Agent can be discovered by spawning system
|
|
513
|
+
- Naming consistency across codebase
|
|
514
|
+
|
|
515
|
+
**Example:**
|
|
516
|
+
```bash
|
|
517
|
+
# After creating new agent
|
|
518
|
+
Write: file_path=".claude/agents/cfn-dev-team/developers/api-developer.md"
|
|
519
|
+
|
|
520
|
+
# Validate filename matches frontmatter
|
|
521
|
+
./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
522
|
+
|
|
523
|
+
# Check result
|
|
524
|
+
if [ $? -eq 0 ]; then
|
|
525
|
+
echo "✅ Agent name validation passed"
|
|
526
|
+
else
|
|
527
|
+
echo "❌ Agent name mismatch detected - review output"
|
|
528
|
+
fi
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
**Common Issues:**
|
|
532
|
+
- Filename: `backend-dev.md` but frontmatter: `name: backend-developer` ❌
|
|
533
|
+
- Filename: `backend-developer.md` and frontmatter: `name: backend-developer` ✅
|
|
534
|
+
|
|
535
|
+
See: `.claude/skills/agent-name-validation/SKILL.md` for full documentation
|
|
536
|
+
|
|
502
537
|
---
|
|
503
538
|
|
|
504
539
|
## Success Metrics
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: run-tests
|
|
3
|
+
description: Run CFN test suites with benchmarking and regression detection
|
|
4
|
+
category: testing
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Run CFN Tests
|
|
8
|
+
|
|
9
|
+
Execute CFN test suites (Hello World + CFN E2E) with automatic benchmarking and regression detection.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Run all tests
|
|
15
|
+
/run-tests
|
|
16
|
+
|
|
17
|
+
# Run specific suite
|
|
18
|
+
/run-tests hello-world
|
|
19
|
+
/run-tests cfn-e2e
|
|
20
|
+
|
|
21
|
+
# With benchmarking
|
|
22
|
+
/run-tests --benchmark
|
|
23
|
+
|
|
24
|
+
# With regression detection
|
|
25
|
+
/run-tests --detect-regressions --threshold 0.10
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Execution
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
./.claude/skills/cfn-test-runner/run-all-tests.sh \
|
|
32
|
+
--suite {{arg1:-all}} \
|
|
33
|
+
{{#if benchmark}}--benchmark{{/if}} \
|
|
34
|
+
{{#if detect-regressions}}--detect-regressions --threshold {{threshold:-0.10}}{{/if}}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Test Suites
|
|
38
|
+
|
|
39
|
+
### Hello World (4 tests)
|
|
40
|
+
- Layer 0: Tool Validation (60s)
|
|
41
|
+
- Layer 5: Coordinator Spawning (120s)
|
|
42
|
+
- Layer 6: Review Handoff (180s)
|
|
43
|
+
- Layer 7: Error Retry (150s)
|
|
44
|
+
|
|
45
|
+
### CFN E2E (9 tests)
|
|
46
|
+
- Coordinator → Orchestrator handoff
|
|
47
|
+
- Loop 3 → Gate Check
|
|
48
|
+
- Gate Pass → Loop 2
|
|
49
|
+
- Loop 2 → Product Owner
|
|
50
|
+
- Product Owner Decision
|
|
51
|
+
- Iteration Cycle
|
|
52
|
+
- Redis Key Structure
|
|
53
|
+
- Error Recovery
|
|
54
|
+
- Cleanup
|
|
55
|
+
|
|
56
|
+
## Benchmarking
|
|
57
|
+
|
|
58
|
+
Results stored in `.artifacts/test-benchmarks.db`:
|
|
59
|
+
- Test run history (30 days)
|
|
60
|
+
- Success rate trends
|
|
61
|
+
- Duration tracking
|
|
62
|
+
- Git commit correlation
|
|
63
|
+
|
|
64
|
+
## Regression Detection
|
|
65
|
+
|
|
66
|
+
Automatic alerts for:
|
|
67
|
+
- Test failures (was passing)
|
|
68
|
+
- Performance degradation (>10% slower)
|
|
69
|
+
- Success rate drops (>10% decrease)
|
|
70
|
+
|
|
71
|
+
View regressions:
|
|
72
|
+
```sql
|
|
73
|
+
sqlite3 .artifacts/test-benchmarks.db "SELECT * FROM regression_alerts WHERE acknowledged = 0"
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Examples
|
|
77
|
+
|
|
78
|
+
**Standard test run:**
|
|
79
|
+
```
|
|
80
|
+
/run-tests
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**With full benchmarking:**
|
|
84
|
+
```
|
|
85
|
+
/run-tests --benchmark --detect-regressions
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Specific suite only:**
|
|
89
|
+
```
|
|
90
|
+
/run-tests cfn-e2e --benchmark
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Output
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
==========================================
|
|
97
|
+
CFN Test Suite Runner
|
|
98
|
+
==========================================
|
|
99
|
+
Suite: all
|
|
100
|
+
Benchmark: true
|
|
101
|
+
Detect Regressions: true
|
|
102
|
+
Git: main @ abc123
|
|
103
|
+
|
|
104
|
+
Hello World: 4 passed, 0 failed, 0 skipped (494s)
|
|
105
|
+
CFN E2E: 7 passed, 0 failed, 2 skipped (356s)
|
|
106
|
+
|
|
107
|
+
==========================================
|
|
108
|
+
Test Summary
|
|
109
|
+
==========================================
|
|
110
|
+
Total: 13 tests
|
|
111
|
+
Passed: 11
|
|
112
|
+
Failed: 0
|
|
113
|
+
Skipped: 2
|
|
114
|
+
Duration: 850s
|
|
115
|
+
Success Rate: 84.6%
|
|
116
|
+
|
|
117
|
+
✅ Benchmark stored (run_id: 42)
|
|
118
|
+
✅ No regressions detected
|
|
119
|
+
```
|
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
"version": "2.0.0",
|
|
4
4
|
"pipeline": "config/hooks/post-edit-pipeline.js",
|
|
5
5
|
"triggerOn": ["Edit", "Write", "MultiEdit"],
|
|
6
|
-
"fileTypes": [".ts", ".tsx", ".js", ".jsx", ".json", ".md"],
|
|
6
|
+
"fileTypes": [".ts", ".tsx", ".js", ".jsx", ".json", ".md", ".sh", ".bash", ".py", ".rs"],
|
|
7
7
|
"blocking": false,
|
|
8
8
|
"exitCodes": {
|
|
9
9
|
"0": "SUCCESS",
|
|
10
10
|
"1": "ERROR",
|
|
11
|
-
"2": "SYNTAX_ERROR"
|
|
11
|
+
"2": "SYNTAX_ERROR",
|
|
12
|
+
"9": "BASH_VALIDATOR_ERROR",
|
|
13
|
+
"10": "BASH_VALIDATOR_WARNING"
|
|
12
14
|
},
|
|
13
15
|
"redis": {
|
|
14
16
|
"enabled": true,
|
|
@@ -26,12 +28,17 @@
|
|
|
26
28
|
"enabled": true,
|
|
27
29
|
"noEmit": true,
|
|
28
30
|
"skipLibCheck": true
|
|
31
|
+
},
|
|
32
|
+
"bash": {
|
|
33
|
+
"enabled": true,
|
|
34
|
+
"validators": ["pipe-safety", "dependency-checker", "line-endings"],
|
|
35
|
+
"timeout": 5000
|
|
29
36
|
}
|
|
30
37
|
},
|
|
31
38
|
"feedback": {
|
|
32
39
|
"provideSuggestions": true,
|
|
33
40
|
"autoFixable": ["LINT_ISSUES"],
|
|
34
|
-
"nonBlocking": ["TYPE_WARNING", "LINT_ISSUES"],
|
|
35
|
-
"blocking": ["SYNTAX_ERROR"]
|
|
41
|
+
"nonBlocking": ["TYPE_WARNING", "LINT_ISSUES", "BASH_VALIDATOR_WARNING"],
|
|
42
|
+
"blocking": ["SYNTAX_ERROR", "BASH_VALIDATOR_ERROR"]
|
|
36
43
|
}
|
|
37
44
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Agent Name Validation Skill
|
|
2
|
+
|
|
3
|
+
## Quick Start
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## What It Does
|
|
10
|
+
|
|
11
|
+
Validates that agent filenames match their frontmatter `name:` field across the entire `.claude/agents/` directory.
|
|
12
|
+
|
|
13
|
+
## Integration
|
|
14
|
+
|
|
15
|
+
This skill is automatically run by the `agent-builder` agent after:
|
|
16
|
+
- Creating new agents
|
|
17
|
+
- Updating agent frontmatter
|
|
18
|
+
- Renaming agent files
|
|
19
|
+
|
|
20
|
+
## Files
|
|
21
|
+
|
|
22
|
+
- `SKILL.md` - Complete documentation
|
|
23
|
+
- `validate-agent-names.sh` - Validation script
|
|
24
|
+
- `README.md` - This file
|
|
25
|
+
|
|
26
|
+
## Usage in Agent Builder
|
|
27
|
+
|
|
28
|
+
See `agent-builder.md` Post-Creation Validation section for integration details.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Agent Name Validation Skill
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Last Updated:** 2025-11-04
|
|
5
|
+
**Owner:** agent-builder
|
|
6
|
+
**Status:** Production
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Validates that agent filenames match their frontmatter `name:` field to ensure consistency and prevent discovery issues.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
- Ensures agent files can be discovered correctly by the agent spawning system
|
|
15
|
+
- Prevents mismatches between filename and agent identity
|
|
16
|
+
- Maintains naming consistency across the codebase
|
|
17
|
+
- Runs automatically after agent creation/updates
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### Basic Validation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Output Format
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Validating agent filenames match frontmatter names...
|
|
31
|
+
==============================================
|
|
32
|
+
❌ MISMATCH: /path/to/backend-dev.md
|
|
33
|
+
Filename: backend-dev
|
|
34
|
+
Frontmatter: backend-developer
|
|
35
|
+
|
|
36
|
+
⚠️ WARNING: No frontmatter name found in /path/to/README.md
|
|
37
|
+
==============================================
|
|
38
|
+
✅ All agent files have matching names!
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Integration with Agent Builder
|
|
42
|
+
|
|
43
|
+
The agent-builder agent automatically runs this validation after:
|
|
44
|
+
|
|
45
|
+
1. Creating new agent files
|
|
46
|
+
2. Updating agent frontmatter
|
|
47
|
+
3. Renaming agent files
|
|
48
|
+
|
|
49
|
+
### Post-Creation Validation
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# After creating/updating an agent
|
|
53
|
+
./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
54
|
+
|
|
55
|
+
# Check exit code
|
|
56
|
+
if [ $? -ne 0 ]; then
|
|
57
|
+
echo "⚠️ Agent name validation failed - please review mismatches"
|
|
58
|
+
fi
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Validation Rules
|
|
62
|
+
|
|
63
|
+
### ✅ Valid Patterns
|
|
64
|
+
|
|
65
|
+
- Filename: `backend-developer.md` → Frontmatter: `name: backend-developer`
|
|
66
|
+
- Filename: `api-tester.md` → Frontmatter: `name: api-tester`
|
|
67
|
+
|
|
68
|
+
### ❌ Invalid Patterns
|
|
69
|
+
|
|
70
|
+
- Filename: `backend-dev.md` → Frontmatter: `name: backend-developer` (mismatch)
|
|
71
|
+
- Filename: `APITester.md` → Frontmatter: `name: api-tester` (case mismatch)
|
|
72
|
+
|
|
73
|
+
### Ignored Files
|
|
74
|
+
|
|
75
|
+
- `CLAUDE.md` - Documentation file, not an agent
|
|
76
|
+
- Files without frontmatter (templates, READMEs)
|
|
77
|
+
|
|
78
|
+
## Exit Codes
|
|
79
|
+
|
|
80
|
+
- `0` - All agent files validated successfully
|
|
81
|
+
- `1` - One or more mismatches found
|
|
82
|
+
|
|
83
|
+
## Configuration
|
|
84
|
+
|
|
85
|
+
### Excluded Files
|
|
86
|
+
|
|
87
|
+
Edit the validation script to exclude additional files:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Skip specific files
|
|
91
|
+
if [ "$filename" = "CLAUDE" ] || [ "$filename" = "README" ]; then
|
|
92
|
+
continue
|
|
93
|
+
fi
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Examples
|
|
97
|
+
|
|
98
|
+
### Example 1: Successful Validation
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
$ ./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
102
|
+
Validating agent filenames match frontmatter names...
|
|
103
|
+
==============================================
|
|
104
|
+
✅ All agent files have matching names!
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### Example 2: Mismatch Detected
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
$ ./.claude/skills/agent-name-validation/validate-agent-names.sh
|
|
111
|
+
Validating agent filenames match frontmatter names...
|
|
112
|
+
==============================================
|
|
113
|
+
❌ MISMATCH: .claude/agents/cfn-dev-team/developers/backend-dev.md
|
|
114
|
+
Filename: backend-dev
|
|
115
|
+
Frontmatter: backend-developer
|
|
116
|
+
==============================================
|
|
117
|
+
❌ Found 1 mismatch(es)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Troubleshooting
|
|
121
|
+
|
|
122
|
+
### Issue: False Positives
|
|
123
|
+
|
|
124
|
+
**Symptom:** Valid agent files reported as mismatches
|
|
125
|
+
|
|
126
|
+
**Solution:** Verify frontmatter format:
|
|
127
|
+
```yaml
|
|
128
|
+
---
|
|
129
|
+
name: agent-name # Must be on line 2, no extra spaces
|
|
130
|
+
---
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Issue: AWK Parsing Errors
|
|
134
|
+
|
|
135
|
+
**Symptom:** No frontmatter names detected
|
|
136
|
+
|
|
137
|
+
**Solution:** Check for:
|
|
138
|
+
- Windows line endings (run `dos2unix` on files)
|
|
139
|
+
- Missing `---` delimiters
|
|
140
|
+
- Malformed YAML
|
|
141
|
+
|
|
142
|
+
## Related Skills
|
|
143
|
+
|
|
144
|
+
- **Agent Creation** (`.claude/skills/agent-creation/`) - Creates new agents
|
|
145
|
+
- **Template Validation** (`.claude/skills/template-validation/`) - Validates agent structure
|
|
146
|
+
- **Pre-Edit Backup** (`.claude/skills/pre-edit-backup/`) - Backup system for file changes
|
|
147
|
+
|
|
148
|
+
## Maintenance
|
|
149
|
+
|
|
150
|
+
### Adding New Validations
|
|
151
|
+
|
|
152
|
+
To add additional validation rules, modify `validate-agent-names.sh`:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Example: Validate agent type matches directory structure
|
|
156
|
+
if [[ "$agent_file" == *"/testers/"* ]]; then
|
|
157
|
+
expected_type="validator"
|
|
158
|
+
actual_type=$(awk 'BEGIN{in_fm=0} /^---$/{in_fm++; next} in_fm==1 && /^type:/{print $2; exit}' "$agent_file")
|
|
159
|
+
|
|
160
|
+
if [ "$actual_type" != "$expected_type" ]; then
|
|
161
|
+
echo "⚠️ Type mismatch in $agent_file"
|
|
162
|
+
fi
|
|
163
|
+
fi
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## Version History
|
|
167
|
+
|
|
168
|
+
- **1.0.0** (2025-11-04) - Initial release with filename validation
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Script to validate agent filenames match frontmatter names
|
|
4
|
+
# Usage: ./scripts/validate-agent-names.sh
|
|
5
|
+
|
|
6
|
+
AGENTS_DIR="/mnt/c/Users/masha/Documents/claude-flow-novice/.claude/agents"
|
|
7
|
+
MISMATCHES=0
|
|
8
|
+
|
|
9
|
+
echo "Validating agent filenames match frontmatter names..."
|
|
10
|
+
echo "=============================================="
|
|
11
|
+
|
|
12
|
+
# Find all .md files in agents directory recursively
|
|
13
|
+
while IFS= read -r -d '' agent_file; do
|
|
14
|
+
# Get filename without extension
|
|
15
|
+
filename=$(basename "$agent_file" .md)
|
|
16
|
+
|
|
17
|
+
# Skip CLAUDE.md files
|
|
18
|
+
if [ "$filename" = "CLAUDE" ]; then
|
|
19
|
+
continue
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
# Extract frontmatter name (between --- blocks, look for 'name:' field)
|
|
23
|
+
frontmatter_name=$(awk 'BEGIN{in_fm=0} /^---$/{in_fm++; next} in_fm==1 && /^name:/{print $2; exit}' "$agent_file")
|
|
24
|
+
|
|
25
|
+
# Skip if no frontmatter name found
|
|
26
|
+
if [ -z "$frontmatter_name" ]; then
|
|
27
|
+
echo "⚠️ WARNING: No frontmatter name found in $agent_file"
|
|
28
|
+
continue
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# Compare filename with frontmatter name
|
|
32
|
+
if [ "$filename" != "$frontmatter_name" ]; then
|
|
33
|
+
echo "❌ MISMATCH: $agent_file"
|
|
34
|
+
echo " Filename: $filename"
|
|
35
|
+
echo " Frontmatter: $frontmatter_name"
|
|
36
|
+
echo ""
|
|
37
|
+
((MISMATCHES++))
|
|
38
|
+
fi
|
|
39
|
+
done < <(find "$AGENTS_DIR" -name "*.md" -type f -print0)
|
|
40
|
+
|
|
41
|
+
echo "=============================================="
|
|
42
|
+
if [ $MISMATCHES -eq 0 ]; then
|
|
43
|
+
echo "✅ All agent files have matching names!"
|
|
44
|
+
else
|
|
45
|
+
echo "❌ Found $MISMATCHES mismatch(es)"
|
|
46
|
+
exit 1
|
|
47
|
+
fi
|
|
@@ -13,7 +13,7 @@ Recommends Loop 3 (producers) and Loop 2 (evaluators) agents based on:
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
AGENTS=$(./.claude/skills/agent-selector/select-agents.sh \
|
|
16
|
+
AGENTS=$(./.claude/skills/cfn-agent-selector/select-agents.sh \
|
|
17
17
|
--task-type "software-development" \
|
|
18
18
|
--description "Implement JWT authentication with refresh tokens")
|
|
19
19
|
|
|
@@ -87,4 +87,5 @@ echo "$AGENTS" | jq '.loop2[]' # ["reviewer", "tester", "security-auditor"]
|
|
|
87
87
|
## Integration
|
|
88
88
|
|
|
89
89
|
Used by:
|
|
90
|
-
- `.claude/agents/cfn-v3-coordinator.md` - Agent selection
|
|
90
|
+
- `.claude/agents/cfn-v3-coordinator.md` - Agent selection
|
|
91
|
+
- `.claude/skills/cfn-agent-selector/select-agents.sh` - Primary selection script
|
|
@@ -635,7 +635,7 @@ function spawn_product_owner() {
|
|
|
635
635
|
# BLOCKER #2 FIX: Match execute-decision.sh actual parameters
|
|
636
636
|
# Required: --task-id, --agent-id, --consensus, --threshold, --iteration, --max-iterations
|
|
637
637
|
local decision_output
|
|
638
|
-
decision_output=$("$SCRIPT_DIR/.claude/skills/cfn-
|
|
638
|
+
decision_output=$("$SCRIPT_DIR/.claude/skills/cfn-product-owner-decision/execute-decision.sh" \
|
|
639
639
|
--task-id "$task_id" \
|
|
640
640
|
--agent-id "$PRODUCT_OWNER" \
|
|
641
641
|
--consensus "$LOOP2_FINAL_CONSENSUS" \
|