uv-suite 0.3.2 → 0.5.0
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/agents/claude-code/prototype-builder.md +12 -0
- package/agents/claude-code/test-writer.md +9 -0
- package/hooks/context-warning.sh +4 -0
- package/install.sh +62 -28
- package/package.json +1 -1
- package/uv.sh +106 -40
|
@@ -44,6 +44,18 @@ For presentation-style output:
|
|
|
44
44
|
- 16:9 aspect ratio for slides
|
|
45
45
|
- PDF export via Puppeteer with `printBackground: true`
|
|
46
46
|
|
|
47
|
+
## Visual Verification (Playwright)
|
|
48
|
+
|
|
49
|
+
If the Playwright MCP server is available, use it to verify the prototype after building:
|
|
50
|
+
|
|
51
|
+
1. Start the dev server: `npm run dev`
|
|
52
|
+
2. Use Playwright to navigate to the prototype URL
|
|
53
|
+
3. Verify key screens render correctly at mobile (375px), tablet (768px), and desktop (1920px)
|
|
54
|
+
4. Check that navigation works between pages
|
|
55
|
+
5. Report any visual issues found
|
|
56
|
+
|
|
57
|
+
This catches broken layouts, missing content, and navigation bugs before the human sees the prototype.
|
|
58
|
+
|
|
47
59
|
## Rules
|
|
48
60
|
|
|
49
61
|
- Always use React + Vite + Tailwind as the base stack
|
|
@@ -42,6 +42,15 @@ Never generate these patterns:
|
|
|
42
42
|
- Tests with no meaningful assertions
|
|
43
43
|
- Tests that test framework behavior
|
|
44
44
|
|
|
45
|
+
## E2E Tests (Playwright)
|
|
46
|
+
|
|
47
|
+
If the Playwright MCP server is available and the project has a UI:
|
|
48
|
+
|
|
49
|
+
1. Use Playwright to write e2e tests that verify user flows in a real browser
|
|
50
|
+
2. Test at mobile (375px) and desktop (1920px) viewports
|
|
51
|
+
3. Use accessibility-tree selectors (getByRole, getByLabel) over CSS selectors
|
|
52
|
+
4. Write Playwright tests in the project's test directory alongside unit tests
|
|
53
|
+
|
|
45
54
|
## Rules
|
|
46
55
|
|
|
47
56
|
- Match existing test patterns in the project
|
package/install.sh
CHANGED
|
@@ -75,11 +75,32 @@ mkdir -p "$TARGET_DIR/hooks"
|
|
|
75
75
|
mkdir -p "$TARGET_DIR/rules"
|
|
76
76
|
|
|
77
77
|
# --- Install agents (Claude Code subagent definitions) ---
|
|
78
|
-
echo "Installing 10 agent definitions..."
|
|
78
|
+
echo "Installing 10 Claude Code agent definitions..."
|
|
79
79
|
cp "$UV_SUITE_DIR/agents/claude-code/"*.md "$TARGET_DIR/agents/"
|
|
80
80
|
echo " ✓ cartographer, spec-writer, architect, reviewer, test-writer"
|
|
81
81
|
echo " ✓ eval-writer, anti-slop-guard, prototype-builder, devops, security"
|
|
82
82
|
|
|
83
|
+
# --- Install Codex agents (.codex/agents/*.toml + AGENTS.md) ---
|
|
84
|
+
PROJECT_ROOT="$(dirname "$TARGET_DIR")"
|
|
85
|
+
echo "Installing 10 Codex agent definitions..."
|
|
86
|
+
mkdir -p "$PROJECT_ROOT/.codex/agents"
|
|
87
|
+
cp "$UV_SUITE_DIR/agents/codex/"*.toml "$PROJECT_ROOT/.codex/agents/"
|
|
88
|
+
|
|
89
|
+
# Create AGENTS.md for Codex (it reads this instead of CLAUDE.md)
|
|
90
|
+
if [ ! -f "$PROJECT_ROOT/AGENTS.md" ]; then
|
|
91
|
+
cp "$PROJECT_ROOT/CLAUDE.md" "$PROJECT_ROOT/AGENTS.md" 2>/dev/null || touch "$PROJECT_ROOT/AGENTS.md"
|
|
92
|
+
echo " ✓ AGENTS.md created (Codex reads this)"
|
|
93
|
+
else
|
|
94
|
+
echo " ✓ AGENTS.md already exists"
|
|
95
|
+
fi
|
|
96
|
+
echo " ✓ .codex/agents/*.toml installed"
|
|
97
|
+
|
|
98
|
+
# --- Install Cursor rules (.cursor/rules/*.mdc) ---
|
|
99
|
+
echo "Installing 10 Cursor rule definitions..."
|
|
100
|
+
mkdir -p "$PROJECT_ROOT/.cursor/rules"
|
|
101
|
+
cp "$UV_SUITE_DIR/agents/cursor/"*.mdc "$PROJECT_ROOT/.cursor/rules/"
|
|
102
|
+
echo " ✓ .cursor/rules/*.mdc installed"
|
|
103
|
+
|
|
83
104
|
# --- Install skills (slash commands) ---
|
|
84
105
|
echo "Installing 9 skills..."
|
|
85
106
|
for skill_dir in "$UV_SUITE_DIR/skills/"*/; do
|
|
@@ -284,6 +305,26 @@ else
|
|
|
284
305
|
fi
|
|
285
306
|
fi
|
|
286
307
|
|
|
308
|
+
# --- Register Playwright MCP server ---
|
|
309
|
+
echo "Registering MCP servers..."
|
|
310
|
+
if command -v claude &>/dev/null; then
|
|
311
|
+
# Check if playwright MCP is already registered
|
|
312
|
+
if claude mcp list 2>/dev/null | grep -q "playwright"; then
|
|
313
|
+
echo " ✓ Playwright MCP (already registered)"
|
|
314
|
+
else
|
|
315
|
+
echo " Registering Playwright MCP (browser automation for Prototype Builder + Test Writer)..."
|
|
316
|
+
claude mcp add playwright -- npx @playwright/mcp@latest 2>/dev/null
|
|
317
|
+
if [ $? -eq 0 ]; then
|
|
318
|
+
echo " ✓ Playwright MCP registered"
|
|
319
|
+
else
|
|
320
|
+
echo " ✗ Playwright MCP failed — register manually: claude mcp add playwright -- npx @playwright/mcp@latest"
|
|
321
|
+
fi
|
|
322
|
+
fi
|
|
323
|
+
else
|
|
324
|
+
echo " · Claude Code CLI not found — skipping MCP registration"
|
|
325
|
+
echo " Register manually after installing Claude Code: claude mcp add playwright -- npx @playwright/mcp@latest"
|
|
326
|
+
fi
|
|
327
|
+
|
|
287
328
|
# --- Write UV Suite context to CLAUDE.md ---
|
|
288
329
|
if [ "$INSTALL_MODE" = "project" ]; then
|
|
289
330
|
PROJECT_ROOT="$(dirname "$TARGET_DIR")"
|
|
@@ -363,15 +404,17 @@ cat << 'HOOKS'
|
|
|
363
404
|
HOOKS
|
|
364
405
|
fi)
|
|
365
406
|
|
|
366
|
-
###
|
|
407
|
+
### Context management
|
|
408
|
+
|
|
409
|
+
If the conversation is getting long, proactively suggest running /compact or starting a new session. Use /cost to check token usage. The user's status line shows context window usage.
|
|
367
410
|
|
|
368
|
-
|
|
411
|
+
### Launching sessions
|
|
369
412
|
|
|
370
413
|
\`\`\`
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
414
|
+
uv claude pro # Claude Code, Professional persona
|
|
415
|
+
uv claude auto # Claude Code, Auto persona
|
|
416
|
+
uv codex pro # OpenAI Codex, Professional persona
|
|
417
|
+
uv codex sport # OpenAI Codex, Sport persona
|
|
375
418
|
\`\`\`
|
|
376
419
|
CLAUDEMD
|
|
377
420
|
|
|
@@ -392,14 +435,11 @@ echo "╚═══════════════════════
|
|
|
392
435
|
echo ""
|
|
393
436
|
echo "What was installed:"
|
|
394
437
|
echo ""
|
|
395
|
-
echo "
|
|
396
|
-
echo "
|
|
397
|
-
echo "
|
|
398
|
-
|
|
399
|
-
echo "
|
|
400
|
-
fi
|
|
401
|
-
echo " PERSONAS (4) $TARGET_DIR/personas/*.json"
|
|
402
|
-
echo " SETTINGS $TARGET_DIR/settings.json"
|
|
438
|
+
echo " Claude Code .claude/agents/*.md + skills/ + hooks/ + rules/"
|
|
439
|
+
echo " Codex .codex/agents/*.toml + AGENTS.md"
|
|
440
|
+
echo " Cursor .cursor/rules/*.mdc"
|
|
441
|
+
echo " Personas (4) .claude/personas/*.json"
|
|
442
|
+
echo " Launcher ./uv.sh"
|
|
403
443
|
echo ""
|
|
404
444
|
|
|
405
445
|
echo "Available slash commands:"
|
|
@@ -450,17 +490,11 @@ echo "Can write docs and analysis files. Cannot edit existing code, commit, or p
|
|
|
450
490
|
fi
|
|
451
491
|
|
|
452
492
|
echo ""
|
|
453
|
-
echo "Start a session
|
|
454
|
-
echo ""
|
|
455
|
-
echo " ./uv.sh spike Research & docs (Opus, max, doc-slop checked)"
|
|
456
|
-
echo " ./uv.sh sport New projects (Sonnet, high, lint only)"
|
|
457
|
-
echo " ./uv.sh pro Production code (all hooks, all guardrails)"
|
|
458
|
-
echo " ./uv.sh auto Fully autonomous (max effort, everything approved)"
|
|
459
|
-
echo " ./uv.sh Defaults to Professional"
|
|
460
|
-
echo ""
|
|
461
|
-
echo "Or launch Claude directly with a persona:"
|
|
493
|
+
echo "Start a session:"
|
|
462
494
|
echo ""
|
|
463
|
-
echo " claude
|
|
464
|
-
echo " claude
|
|
465
|
-
echo "
|
|
466
|
-
echo "
|
|
495
|
+
echo " ./uv.sh claude pro Claude Code, Professional"
|
|
496
|
+
echo " ./uv.sh claude auto Claude Code, Auto"
|
|
497
|
+
echo " ./uv.sh codex pro Codex, Professional"
|
|
498
|
+
echo " ./uv.sh codex auto Codex, Auto"
|
|
499
|
+
echo " ./uv.sh pro Shorthand (defaults to Claude Code)"
|
|
500
|
+
echo " ./uv.sh Claude Code, Professional"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uv-suite",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Portable framework for AI-assisted software development. 10 agents, 9 skills, 5 hooks, 4 personas. Works with Claude Code, Cursor, and Codex.",
|
|
5
5
|
"author": "Utsav Anand",
|
|
6
6
|
"license": "MIT",
|
package/uv.sh
CHANGED
|
@@ -1,56 +1,122 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
# UV Suite —
|
|
3
|
-
# Starts
|
|
2
|
+
# UV Suite — Unified session launcher
|
|
3
|
+
# Starts Claude Code or Codex with the specified persona.
|
|
4
4
|
#
|
|
5
5
|
# Usage:
|
|
6
|
-
# uv
|
|
7
|
-
# uv
|
|
8
|
-
# uv
|
|
9
|
-
# uv
|
|
10
|
-
# uv
|
|
6
|
+
# uv claude pro Claude Code, Professional persona
|
|
7
|
+
# uv claude auto Claude Code, Auto persona
|
|
8
|
+
# uv codex sport OpenAI Codex, Sport persona
|
|
9
|
+
# uv codex pro OpenAI Codex, Professional persona
|
|
10
|
+
# uv pro Shorthand — defaults to Claude Code
|
|
11
|
+
# uv Claude Code, Professional persona
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
TOOL=""
|
|
14
|
+
PERSONA=""
|
|
14
15
|
|
|
15
|
-
#
|
|
16
|
-
case "$
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
# Parse arguments
|
|
17
|
+
case "$1" in
|
|
18
|
+
claude|codex)
|
|
19
|
+
TOOL="$1"
|
|
20
|
+
PERSONA="${2:-pro}"
|
|
21
|
+
shift 2 2>/dev/null
|
|
20
22
|
;;
|
|
21
|
-
sport)
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
spike|sport|pro|professional|auto)
|
|
24
|
+
TOOL="claude"
|
|
25
|
+
PERSONA="$1"
|
|
26
|
+
shift
|
|
24
27
|
;;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
--help|-h)
|
|
29
|
+
echo ""
|
|
30
|
+
echo " uv — UV Suite session launcher"
|
|
31
|
+
echo ""
|
|
32
|
+
echo " Usage:"
|
|
33
|
+
echo " uv claude <persona> Start Claude Code with persona"
|
|
34
|
+
echo " uv codex <persona> Start OpenAI Codex with persona"
|
|
35
|
+
echo " uv <persona> Shorthand for uv claude <persona>"
|
|
36
|
+
echo " uv Defaults to uv claude pro"
|
|
37
|
+
echo ""
|
|
38
|
+
echo " Personas:"
|
|
39
|
+
echo " spike Research & docs (Opus, max effort)"
|
|
40
|
+
echo " sport New projects (Sonnet, high effort)"
|
|
41
|
+
echo " pro Production code (all hooks, all guardrails)"
|
|
42
|
+
echo " auto Fully autonomous (max effort, everything approved)"
|
|
43
|
+
echo ""
|
|
44
|
+
exit 0
|
|
45
|
+
;;
|
|
46
|
+
"")
|
|
47
|
+
TOOL="claude"
|
|
48
|
+
PERSONA="pro"
|
|
28
49
|
;;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
50
|
+
*)
|
|
51
|
+
echo "Unknown argument: $1"
|
|
52
|
+
echo "Usage: uv [claude|codex] [spike|sport|pro|auto]"
|
|
53
|
+
exit 1
|
|
32
54
|
;;
|
|
55
|
+
esac
|
|
56
|
+
|
|
57
|
+
# Normalize persona name
|
|
58
|
+
case "$PERSONA" in
|
|
59
|
+
pro|professional) PERSONA="professional" ;;
|
|
60
|
+
spike|sport|auto) ;; # already correct
|
|
33
61
|
*)
|
|
34
62
|
echo "Unknown persona: $PERSONA"
|
|
35
|
-
echo ""
|
|
36
|
-
echo "Usage: uv [spike|sport|pro|auto]"
|
|
37
|
-
echo ""
|
|
38
|
-
echo " spike Research & documentation (Opus, max, doc-slop hook)"
|
|
39
|
-
echo " sport New projects, prototyping (Sonnet, high, lint only)"
|
|
40
|
-
echo " pro Production code (all hooks, all guardrails, human-gated)"
|
|
41
|
-
echo " auto Fully autonomous (max effort, everything auto-approved)"
|
|
42
|
-
echo ""
|
|
43
|
-
echo " uv Defaults to 'pro'"
|
|
63
|
+
echo "Available: spike, sport, pro, auto"
|
|
44
64
|
exit 1
|
|
45
65
|
;;
|
|
46
66
|
esac
|
|
47
67
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
68
|
+
# Persona labels
|
|
69
|
+
case "$PERSONA" in
|
|
70
|
+
spike) LABEL="Spike — research & docs (Opus, max)" ;;
|
|
71
|
+
sport) LABEL="Sport — lightweight (Sonnet, high)" ;;
|
|
72
|
+
professional) LABEL="Professional — full rigor (all hooks, all guardrails)" ;;
|
|
73
|
+
auto) LABEL="Auto — autonomous (max, everything approved)" ;;
|
|
74
|
+
esac
|
|
75
|
+
|
|
76
|
+
SETTINGS=".claude/personas/$PERSONA.json"
|
|
53
77
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
if [ "$TOOL" = "claude" ]; then
|
|
79
|
+
# --- Claude Code ---
|
|
80
|
+
if ! command -v claude &>/dev/null; then
|
|
81
|
+
echo "Error: claude not found. Install Claude Code first."
|
|
82
|
+
exit 1
|
|
83
|
+
fi
|
|
84
|
+
|
|
85
|
+
if [ ! -f "$SETTINGS" ]; then
|
|
86
|
+
echo "Error: $SETTINGS not found. Run 'npx uv-suite install' first."
|
|
87
|
+
exit 1
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
echo "UV Suite | Claude Code | $LABEL"
|
|
91
|
+
echo ""
|
|
92
|
+
exec claude --settings "$SETTINGS" "$@"
|
|
93
|
+
|
|
94
|
+
elif [ "$TOOL" = "codex" ]; then
|
|
95
|
+
# --- OpenAI Codex ---
|
|
96
|
+
if ! command -v codex &>/dev/null; then
|
|
97
|
+
echo "Error: codex not found. Install OpenAI Codex first."
|
|
98
|
+
echo " npm install -g @openai/codex"
|
|
99
|
+
exit 1
|
|
100
|
+
fi
|
|
101
|
+
|
|
102
|
+
# Codex doesn't have --settings, but reads AGENTS.md and .codex/agents/
|
|
103
|
+
# We can pass model and approval mode based on persona
|
|
104
|
+
case "$PERSONA" in
|
|
105
|
+
spike)
|
|
106
|
+
CODEX_ARGS="--model o3 --approval-mode suggest"
|
|
107
|
+
;;
|
|
108
|
+
sport)
|
|
109
|
+
CODEX_ARGS="--approval-mode auto-edit"
|
|
110
|
+
;;
|
|
111
|
+
professional)
|
|
112
|
+
CODEX_ARGS="--approval-mode suggest"
|
|
113
|
+
;;
|
|
114
|
+
auto)
|
|
115
|
+
CODEX_ARGS="--approval-mode full-auto"
|
|
116
|
+
;;
|
|
117
|
+
esac
|
|
118
|
+
|
|
119
|
+
echo "UV Suite | Codex | $LABEL"
|
|
120
|
+
echo ""
|
|
121
|
+
exec codex $CODEX_ARGS "$@"
|
|
122
|
+
fi
|