claude-flow-novice 2.15.1 → 2.15.3
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/agents/google-sheets-specialist.md +614 -0
- package/.claude/commands/cfn/create-handoff.md +224 -0
- package/.claude/hooks/cfn-BACKUP_USAGE.md +243 -243
- package/.claude/hooks/cfn-invoke-security-validation.sh +69 -69
- package/.claude/hooks/cfn-post-edit-cfn-retrospective.sh +78 -78
- package/.claude/hooks/cfn-post-edit.config.json +44 -44
- package/.claude/skills/agent-lifecycle/SKILL.md +60 -0
- package/.claude/skills/agent-lifecycle/execute-lifecycle-hook.sh +573 -0
- package/.claude/skills/agent-lifecycle/simple-audit.sh +31 -0
- package/.claude/skills/cfn-hybrid-routing/check-dependencies.sh +51 -51
- package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +252 -252
- package/.claude/skills/cfn-redis-coordination/agent-recovery.sh +74 -74
- package/.claude/skills/cfn-redis-coordination/get-context.sh +112 -112
- package/.claude/skills/cfn-transparency-middleware/middleware-config.sh +28 -28
- package/.claude/skills/cfn-transparency-middleware/performance-benchmark.sh +78 -78
- package/.claude/skills/cfn-transparency-middleware/test-integration.sh +161 -161
- package/.claude/skills/cfn-transparency-middleware/test-transparency-skill.sh +367 -367
- package/.claude/skills/cfn-transparency-middleware/tests/input-validation.sh +92 -92
- package/.claude/skills/cfn-transparency-middleware/wrap-agent.sh +131 -131
- package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +662 -0
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +29 -0
- package/claude-assets/cfn-extras/agents/google-sheets-specialist.md +614 -0
- package/claude-assets/commands/cfn/create-handoff.md +224 -0
- package/claude-assets/hooks/cfn-BACKUP_USAGE.md +243 -243
- package/claude-assets/hooks/cfn-invoke-security-validation.sh +69 -69
- package/claude-assets/hooks/cfn-post-edit-cfn-retrospective.sh +78 -78
- package/claude-assets/hooks/cfn-post-edit.config.json +44 -44
- package/claude-assets/hooks/cfn-post-execution/memory-cleanup.sh +19 -19
- package/claude-assets/hooks/cfn-pre-execution/memory-check.sh +19 -19
- package/claude-assets/skills/agent-lifecycle/execute-lifecycle-hook.sh +572 -572
- package/claude-assets/skills/agent-lifecycle/simple-audit.sh +30 -30
- package/claude-assets/skills/cfn-automatic-memory-persistence/persist-agent-output.sh +48 -48
- package/claude-assets/skills/cfn-automatic-memory-persistence/query-agent-history.sh +34 -34
- package/claude-assets/skills/cfn-deliverable-validation/confidence-calculator.sh +261 -261
- package/claude-assets/skills/cfn-expert-update/update-expert.sh +345 -345
- package/claude-assets/skills/cfn-hybrid-routing/check-dependencies.sh +51 -51
- package/claude-assets/skills/cfn-intervention-detector/detect-intervention.sh +110 -110
- package/claude-assets/skills/cfn-intervention-orchestrator/execute-intervention.sh +58 -58
- package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +252 -252
- package/claude-assets/skills/cfn-loop2-output-processing/process-validator-output.sh +275 -275
- package/claude-assets/skills/cfn-memory-management/check-memory.sh +159 -159
- package/claude-assets/skills/cfn-memory-management/cleanup-memory.sh +196 -196
- package/claude-assets/skills/cfn-node-heap-sizer/task-mode-heap-limiter.sh +325 -325
- package/claude-assets/skills/cfn-playbook-auto-update/auto-update-playbook.sh +85 -85
- package/claude-assets/skills/cfn-redis-coordination/agent-recovery.sh +74 -74
- package/claude-assets/skills/cfn-redis-coordination/get-context.sh +112 -112
- package/claude-assets/skills/cfn-scope-simplifier/simplify-scope.sh +67 -67
- package/claude-assets/skills/cfn-specialist-injection/recommend-specialist.sh +56 -56
- package/claude-assets/skills/cfn-standardized-error-handling/capture-agent-error.sh +86 -86
- package/claude-assets/skills/cfn-standardized-error-handling/test-error-handling.sh +165 -165
- package/claude-assets/skills/cfn-task-config-init/initialize-config.sh +264 -264
- package/claude-assets/skills/cfn-task-decomposition/task-decomposer.sh +278 -278
- package/claude-assets/skills/cfn-transparency-middleware/middleware-config.sh +28 -28
- package/claude-assets/skills/cfn-transparency-middleware/performance-benchmark.sh +78 -78
- package/claude-assets/skills/cfn-transparency-middleware/test-integration.sh +161 -161
- package/claude-assets/skills/cfn-transparency-middleware/test-transparency-skill.sh +367 -367
- package/claude-assets/skills/cfn-transparency-middleware/tests/input-validation.sh +92 -92
- package/claude-assets/skills/cfn-transparency-middleware/wrap-agent.sh +131 -131
- package/claude-assets/skills/docker-build/SKILL.md +96 -203
- package/claude-assets/skills/docker-build/build.sh +73 -73
- package/claude-assets/skills/integration/agent-handoff.sh +494 -0
- package/claude-assets/skills/integration/file-operations.sh +414 -0
- package/claude-assets/skills/workflow-codification/APPROVAL_WORKFLOW.md +806 -0
- package/claude-assets/skills/workflow-codification/COST_TRACKING.md +637 -0
- package/claude-assets/skills/workflow-codification/EDGE_CASE_TRACKING.md +404 -0
- package/claude-assets/skills/workflow-codification/README_PHASE4.md +457 -0
- package/claude-assets/skills/workflow-codification/SKILL.md +110 -0
- package/claude-assets/skills/workflow-codification/analyze-patterns.sh +899 -0
- package/claude-assets/skills/workflow-codification/approval-workflow.sh +514 -0
- package/claude-assets/skills/workflow-codification/generate-skill-update.sh +525 -0
- package/claude-assets/skills/workflow-codification/review-skill.sh +643 -0
- package/claude-assets/skills/workflow-codification/templates/email-notification.txt +114 -0
- package/claude-assets/skills/workflow-codification/templates/slack-notification.md +85 -0
- package/claude-assets/skills/workflow-codification/test-integration.sh +281 -0
- package/claude-assets/skills/workflow-codification/track-cost-savings.sh +445 -0
- package/claude-assets/skills/workflow-codification/track-edge-case.sh +323 -0
- package/dist/agents/agent-loader.js +165 -146
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/config-manager.js +91 -109
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/integration/DatabaseHandoff.js +507 -0
- package/dist/integration/DatabaseHandoff.js.map +1 -0
- package/dist/integration/StandardAdapter.js +291 -0
- package/dist/integration/StandardAdapter.js.map +1 -0
- package/dist/lib/agent-output-parser.js +518 -0
- package/dist/lib/agent-output-parser.js.map +1 -0
- package/dist/lib/agent-output-validator.js +950 -0
- package/dist/lib/agent-output-validator.js.map +1 -0
- package/dist/lib/artifact-registry.js +443 -0
- package/dist/lib/artifact-registry.js.map +1 -0
- package/dist/lib/config-validator.js +687 -0
- package/dist/lib/config-validator.js.map +1 -0
- package/dist/types/agent-output.js +44 -0
- package/dist/types/agent-output.js.map +1 -0
- package/dist/types/config.js +28 -0
- package/dist/types/config.js.map +1 -0
- package/package.json +2 -1
- package/scripts/artifact-cleanup.sh +392 -0
- package/scripts/build-linux.sh +78 -0
- package/scripts/deploy-production.sh +355 -355
- package/scripts/docker-playwright-fix.sh +311 -311
- package/scripts/docker-rebuild-all-agents.sh +127 -127
- package/scripts/memory-leak-prevention.sh +305 -305
- package/scripts/migrate-artifacts.sh +563 -0
- package/scripts/migrate-yaml-to-json.sh +465 -0
- package/scripts/run-marketing-tests.sh +42 -42
- package/scripts/update_paths.sh +46 -46
|
@@ -1,203 +1,96 @@
|
|
|
1
|
-
# Docker Build Skill
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
--tag my-project:latest
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Example 3: Force Rebuild
|
|
101
|
-
```bash
|
|
102
|
-
# Rebuild everything from scratch
|
|
103
|
-
./.claude/skills/docker-build/build.sh --no-cache
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## Integration Points
|
|
107
|
-
|
|
108
|
-
### Used By
|
|
109
|
-
- B10 TypeScript fix tests
|
|
110
|
-
- Docker agent testing
|
|
111
|
-
- CFN Loop container execution
|
|
112
|
-
- Development workflows
|
|
113
|
-
|
|
114
|
-
### Depends On
|
|
115
|
-
- `scripts/docker/build-from-linux.sh` (core build logic)
|
|
116
|
-
- `scripts/docker/linux-build.config` (configuration)
|
|
117
|
-
- Linux native filesystem at `/tmp/cfn-build`
|
|
118
|
-
|
|
119
|
-
## Error Handling
|
|
120
|
-
|
|
121
|
-
### Common Issues
|
|
122
|
-
|
|
123
|
-
**Issue**: Rsync fails
|
|
124
|
-
- **Cause**: Permission issues or disk space
|
|
125
|
-
- **Solution**: Check `/tmp` permissions and disk space
|
|
126
|
-
|
|
127
|
-
**Issue**: Docker build fails
|
|
128
|
-
- **Cause**: Syntax errors in Dockerfile or missing files
|
|
129
|
-
- **Solution**: Check Dockerfile and .dockerignore patterns
|
|
130
|
-
|
|
131
|
-
**Issue**: Image not tagged correctly
|
|
132
|
-
- **Cause**: Build failed but not caught
|
|
133
|
-
- **Solution**: Check build logs for errors
|
|
134
|
-
|
|
135
|
-
## Performance Monitoring
|
|
136
|
-
|
|
137
|
-
### Metrics Tracked
|
|
138
|
-
- Sync time (should be <1s)
|
|
139
|
-
- Build time (should be <30s)
|
|
140
|
-
- Total time
|
|
141
|
-
- Image size
|
|
142
|
-
|
|
143
|
-
### Expected Performance
|
|
144
|
-
```
|
|
145
|
-
Sync time: 0.1s
|
|
146
|
-
Build time: 15-20s
|
|
147
|
-
Total time: <25s
|
|
148
|
-
Image size: ~443MB
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Maintenance
|
|
152
|
-
|
|
153
|
-
### When to Update
|
|
154
|
-
- Agent definitions change
|
|
155
|
-
- Source code changes
|
|
156
|
-
- Dependencies update
|
|
157
|
-
- Dockerfile modifications
|
|
158
|
-
|
|
159
|
-
### Cleanup
|
|
160
|
-
```bash
|
|
161
|
-
# Remove old build directory
|
|
162
|
-
rm -rf /tmp/cfn-build
|
|
163
|
-
|
|
164
|
-
# Remove old images
|
|
165
|
-
docker image prune -f
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## Success Criteria
|
|
169
|
-
- ✅ Build completes in <30s
|
|
170
|
-
- ✅ Image tagged correctly
|
|
171
|
-
- ✅ Image size reasonable (<500MB)
|
|
172
|
-
- ✅ No build errors or warnings
|
|
173
|
-
|
|
174
|
-
## Skill Invocation from Main Chat
|
|
175
|
-
|
|
176
|
-
### Quick Commands
|
|
177
|
-
```bash
|
|
178
|
-
# Rebuild Docker image after agent changes
|
|
179
|
-
Skill: docker-build
|
|
180
|
-
|
|
181
|
-
# Rebuild with no cache
|
|
182
|
-
Skill: docker-build --no-cache
|
|
183
|
-
|
|
184
|
-
# Custom build
|
|
185
|
-
Skill: docker-build --tag my-image:v1
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### When to Use This Skill
|
|
189
|
-
- After modifying agent templates (`.claude/agents/`)
|
|
190
|
-
- After changing source code
|
|
191
|
-
- After updating dependencies
|
|
192
|
-
- Before running Docker-based tests
|
|
193
|
-
- When WSL2 build is too slow
|
|
194
|
-
|
|
195
|
-
## Related Skills
|
|
196
|
-
- `cfn-loop-orchestration`: Uses Docker images for agent execution
|
|
197
|
-
- `cfn-coordination`: Coordinates Docker container agents
|
|
198
|
-
|
|
199
|
-
## Notes
|
|
200
|
-
- **WSL2 Performance**: Direct Docker builds from Windows mounts are 96% slower
|
|
201
|
-
- **Linux Native**: Building from `/tmp/cfn-build` is near-instant
|
|
202
|
-
- **Automatic Sync**: Script handles sync automatically
|
|
203
|
-
- **Safe**: Original Windows files never modified
|
|
1
|
+
# Docker Build Skill - WSL2 Optimized
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0.0
|
|
4
|
+
**Purpose:** Build Docker images with 96% faster build times on WSL2 environments
|
|
5
|
+
**Location:** `.claude/skills/docker-build/`
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
This skill provides WSL2-optimized Docker image building by syncing build context to Linux native storage (`/tmp/cfn-build`) before building, avoiding severe I/O performance penalties from Windows mounts.
|
|
10
|
+
|
|
11
|
+
**Performance Impact:**
|
|
12
|
+
- Windows mount: 755 seconds build time
|
|
13
|
+
- Linux native: 20 seconds build time
|
|
14
|
+
- **96% faster builds**
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Build any Docker image (automatic detection)
|
|
20
|
+
./.claude/skills/docker-build/build.sh \
|
|
21
|
+
--dockerfile docker/Dockerfile.agent \
|
|
22
|
+
--tag cfn-agent:latest
|
|
23
|
+
|
|
24
|
+
# Build with custom context
|
|
25
|
+
./.claude/skills/docker-build/build.sh \
|
|
26
|
+
--dockerfile docker/Dockerfile.orchestrator \
|
|
27
|
+
--tag cfn-orchestrator:latest \
|
|
28
|
+
--context ./custom-context
|
|
29
|
+
|
|
30
|
+
# Specify platform
|
|
31
|
+
./.claude/skills/docker-build/build.sh \
|
|
32
|
+
--dockerfile docker/Dockerfile.coordinator \
|
|
33
|
+
--tag cfn-coordinator:latest \
|
|
34
|
+
--platform linux/amd64
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Parameters
|
|
38
|
+
|
|
39
|
+
| Parameter | Required | Description | Default |
|
|
40
|
+
|-----------|----------|-------------|---------|
|
|
41
|
+
| `--dockerfile` | Yes | Path to Dockerfile | - |
|
|
42
|
+
| `--tag` | Yes | Image tag to build | - |
|
|
43
|
+
| `--context` | No | Build context directory | Project root |
|
|
44
|
+
| `--platform` | No | Target platform | Current platform |
|
|
45
|
+
|
|
46
|
+
## How It Works
|
|
47
|
+
|
|
48
|
+
1. **Sync Phase:** Copies build context from Windows mount to `/tmp/cfn-build/`
|
|
49
|
+
2. **Build Phase:** Runs `docker build` from Linux native storage
|
|
50
|
+
3. **Cleanup Phase:** Returns built image to host, removes temp directory
|
|
51
|
+
|
|
52
|
+
## WSL2 Performance Context
|
|
53
|
+
|
|
54
|
+
WSL2 has severe I/O performance issues when Docker accesses Windows mounts:
|
|
55
|
+
- File enumeration: 0.1s (Linux) vs 755s (Windows)
|
|
56
|
+
- Context transfer becomes the bottleneck
|
|
57
|
+
- Every file operation crosses mount boundary
|
|
58
|
+
|
|
59
|
+
This skill eliminates the bottleneck by working entirely in Linux filesystem.
|
|
60
|
+
|
|
61
|
+
## Requirements
|
|
62
|
+
|
|
63
|
+
- WSL2 environment
|
|
64
|
+
- Docker installed and running
|
|
65
|
+
- `/tmp/` writable (standard Linux configuration)
|
|
66
|
+
- Sufficient disk space in `/tmp/` for build context
|
|
67
|
+
|
|
68
|
+
## Error Handling
|
|
69
|
+
|
|
70
|
+
- Validates Dockerfile exists
|
|
71
|
+
- Validates tag is provided
|
|
72
|
+
- Creates temp directory with cleanup trap
|
|
73
|
+
- Preserves error codes from docker build
|
|
74
|
+
- Automatic cleanup on success/failure
|
|
75
|
+
|
|
76
|
+
## Integration with CFN Docker Infrastructure
|
|
77
|
+
|
|
78
|
+
All CFN Docker images should use this skill:
|
|
79
|
+
```bash
|
|
80
|
+
# cfn-agent
|
|
81
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.agent --tag cfn-agent:latest
|
|
82
|
+
|
|
83
|
+
# cfn-orchestrator
|
|
84
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.orchestrator --tag cfn-orchestrator:latest
|
|
85
|
+
|
|
86
|
+
# cfn-coordinator
|
|
87
|
+
./.claude/skills/docker-build/build.sh --dockerfile docker/Dockerfile.coordinator --tag cfn-coordinator:latest
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## See Also
|
|
91
|
+
|
|
92
|
+
- `docker/Dockerfile.agent` - Base agent image
|
|
93
|
+
- `docker/Dockerfile.orchestrator` - Orchestration image
|
|
94
|
+
- `docker/Dockerfile.coordinator` - Coordination image
|
|
95
|
+
- `CLAUDE.md` lines 60-90 - Docker build requirements
|
|
96
|
+
- `docs/CFN_DOCKER_INFRASTRUCTURE_REQUIREMENTS_SPEC.md` - Full infrastructure spec
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# Docker Build Skill - Fast builds using Linux native storage
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
# Defaults
|
|
6
|
-
DOCKERFILE="Dockerfile.agent"
|
|
7
|
-
TAG="claude-flow-novice:agent"
|
|
8
|
-
NO_CACHE=""
|
|
9
|
-
|
|
10
|
-
# Parse arguments
|
|
11
|
-
while [[ $# -gt 0 ]]; do
|
|
12
|
-
case $1 in
|
|
13
|
-
--dockerfile)
|
|
14
|
-
DOCKERFILE="$2"
|
|
15
|
-
shift 2
|
|
16
|
-
;;
|
|
17
|
-
--tag)
|
|
18
|
-
TAG="$2"
|
|
19
|
-
shift 2
|
|
20
|
-
;;
|
|
21
|
-
--no-cache)
|
|
22
|
-
NO_CACHE="--no-cache"
|
|
23
|
-
shift
|
|
24
|
-
;;
|
|
25
|
-
*)
|
|
26
|
-
echo "Unknown option: $1"
|
|
27
|
-
echo "Usage: $0 [--dockerfile <path>] [--tag <name>] [--no-cache]"
|
|
28
|
-
exit 1
|
|
29
|
-
;;
|
|
30
|
-
esac
|
|
31
|
-
done
|
|
32
|
-
|
|
33
|
-
echo "🐳 Docker Build Skill"
|
|
34
|
-
echo "===================="
|
|
35
|
-
echo "Dockerfile: $DOCKERFILE"
|
|
36
|
-
echo "Tag: $TAG"
|
|
37
|
-
echo "No Cache: ${NO_CACHE:-false}"
|
|
38
|
-
echo ""
|
|
39
|
-
|
|
40
|
-
# Get project root (skill is in .claude/skills/docker-build/)
|
|
41
|
-
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
42
|
-
PROJECT_ROOT="$(cd "$SKILL_DIR/../../.." && pwd)"
|
|
43
|
-
|
|
44
|
-
cd "$PROJECT_ROOT"
|
|
45
|
-
|
|
46
|
-
# Check if Linux build script exists
|
|
47
|
-
if [ ! -f "./scripts/docker/build-from-linux.sh" ]; then
|
|
48
|
-
echo "❌ Error: scripts/docker/build-from-linux.sh not found"
|
|
49
|
-
exit 1
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
# Export settings for build script
|
|
53
|
-
export DOCKERFILE
|
|
54
|
-
export TAG
|
|
55
|
-
export DOCKER_BUILD_ARGS="$NO_CACHE"
|
|
56
|
-
|
|
57
|
-
# Run the build
|
|
58
|
-
echo "🚀 Starting build process..."
|
|
59
|
-
./scripts/docker/build-from-linux.sh
|
|
60
|
-
|
|
61
|
-
BUILD_EXIT=$?
|
|
62
|
-
|
|
63
|
-
if [ $BUILD_EXIT -eq 0 ]; then
|
|
64
|
-
echo ""
|
|
65
|
-
echo "✅ Build complete!"
|
|
66
|
-
echo " Image: $TAG"
|
|
67
|
-
echo ""
|
|
68
|
-
docker images | grep "$(echo $TAG | cut -d: -f1)" | head -3
|
|
69
|
-
else
|
|
70
|
-
echo ""
|
|
71
|
-
echo "❌ Build failed with exit code $BUILD_EXIT"
|
|
72
|
-
exit $BUILD_EXIT
|
|
73
|
-
fi
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Docker Build Skill - Fast builds using Linux native storage
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
# Defaults
|
|
6
|
+
DOCKERFILE="Dockerfile.agent"
|
|
7
|
+
TAG="claude-flow-novice:agent"
|
|
8
|
+
NO_CACHE=""
|
|
9
|
+
|
|
10
|
+
# Parse arguments
|
|
11
|
+
while [[ $# -gt 0 ]]; do
|
|
12
|
+
case $1 in
|
|
13
|
+
--dockerfile)
|
|
14
|
+
DOCKERFILE="$2"
|
|
15
|
+
shift 2
|
|
16
|
+
;;
|
|
17
|
+
--tag)
|
|
18
|
+
TAG="$2"
|
|
19
|
+
shift 2
|
|
20
|
+
;;
|
|
21
|
+
--no-cache)
|
|
22
|
+
NO_CACHE="--no-cache"
|
|
23
|
+
shift
|
|
24
|
+
;;
|
|
25
|
+
*)
|
|
26
|
+
echo "Unknown option: $1"
|
|
27
|
+
echo "Usage: $0 [--dockerfile <path>] [--tag <name>] [--no-cache]"
|
|
28
|
+
exit 1
|
|
29
|
+
;;
|
|
30
|
+
esac
|
|
31
|
+
done
|
|
32
|
+
|
|
33
|
+
echo "🐳 Docker Build Skill"
|
|
34
|
+
echo "===================="
|
|
35
|
+
echo "Dockerfile: $DOCKERFILE"
|
|
36
|
+
echo "Tag: $TAG"
|
|
37
|
+
echo "No Cache: ${NO_CACHE:-false}"
|
|
38
|
+
echo ""
|
|
39
|
+
|
|
40
|
+
# Get project root (skill is in .claude/skills/docker-build/)
|
|
41
|
+
SKILL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
42
|
+
PROJECT_ROOT="$(cd "$SKILL_DIR/../../.." && pwd)"
|
|
43
|
+
|
|
44
|
+
cd "$PROJECT_ROOT"
|
|
45
|
+
|
|
46
|
+
# Check if Linux build script exists
|
|
47
|
+
if [ ! -f "./scripts/docker/build-from-linux.sh" ]; then
|
|
48
|
+
echo "❌ Error: scripts/docker/build-from-linux.sh not found"
|
|
49
|
+
exit 1
|
|
50
|
+
fi
|
|
51
|
+
|
|
52
|
+
# Export settings for build script
|
|
53
|
+
export DOCKERFILE
|
|
54
|
+
export TAG
|
|
55
|
+
export DOCKER_BUILD_ARGS="$NO_CACHE"
|
|
56
|
+
|
|
57
|
+
# Run the build
|
|
58
|
+
echo "🚀 Starting build process..."
|
|
59
|
+
./scripts/docker/build-from-linux.sh
|
|
60
|
+
|
|
61
|
+
BUILD_EXIT=$?
|
|
62
|
+
|
|
63
|
+
if [ $BUILD_EXIT -eq 0 ]; then
|
|
64
|
+
echo ""
|
|
65
|
+
echo "✅ Build complete!"
|
|
66
|
+
echo " Image: $TAG"
|
|
67
|
+
echo ""
|
|
68
|
+
docker images | grep "$(echo $TAG | cut -d: -f1)" | head -3
|
|
69
|
+
else
|
|
70
|
+
echo ""
|
|
71
|
+
echo "❌ Build failed with exit code $BUILD_EXIT"
|
|
72
|
+
exit $BUILD_EXIT
|
|
73
|
+
fi
|