-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·73 lines (62 loc) · 2.04 KB
/
setup
File metadata and controls
executable file
·73 lines (62 loc) · 2.04 KB
1
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
#!/usr/bin/env bash
set -euo pipefail
# J Stack Installer
# Installs 7 skills (6 modes + 1 orchestrator) for Claude Code or Craft Agent
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SKILLS=(jstack plan architect tdd review iterate ship)
# Detect install target
CRAFT_AGENT=false
if [[ "${1:-}" == "--craft-agent" ]]; then
CRAFT_AGENT=true
fi
if [[ "$CRAFT_AGENT" == true ]]; then
# Craft Agent install
WORKSPACE_DIR="$HOME/.craft-agent/workspaces/my-workspace/skills"
if [[ ! -d "$WORKSPACE_DIR" ]]; then
echo "Error: Craft Agent workspace not found at $WORKSPACE_DIR"
echo "Make sure Craft Agent is installed and you have a workspace set up."
exit 1
fi
TARGET_DIR="$WORKSPACE_DIR"
echo "Installing J Stack for Craft Agent..."
else
# Claude Code install
TARGET_DIR="$HOME/.claude/skills"
mkdir -p "$TARGET_DIR"
echo "Installing J Stack for Claude Code..."
fi
# Copy each skill
for skill in "${SKILLS[@]}"; do
src="$SCRIPT_DIR/$skill"
dest="$TARGET_DIR/$skill"
if [[ ! -d "$src" ]]; then
echo " Warning: $skill not found in repo, skipping"
continue
fi
# Create destination if it doesn't exist
mkdir -p "$dest"
# Copy SKILL.md
if [[ -f "$src/SKILL.md" ]]; then
cp "$src/SKILL.md" "$dest/SKILL.md"
fi
# Copy icon if present
for icon in "$src"/icon.*; do
if [[ -f "$icon" ]]; then
cp "$icon" "$dest/$(basename "$icon")"
fi
done
echo " ✓ $skill"
done
echo ""
echo "J Stack installed successfully!"
echo ""
echo "Available modes:"
echo " /jstack — Orchestrator (shows all modes)"
echo " /plan — Founder Mode (what to build)"
echo " /architect — Tech Lead Mode (how to build it)"
echo " /tdd — TDD Mode (red → green → refactor)"
echo " /review — Staff Engineer Mode (production safety audit)"
echo " /iterate — Karpathy Mode (autonomous optimization loop)"
echo " /ship — Release Engineer Mode (sync → test → PR)"
echo ""
echo "Start with: /plan"