@kraftapps-ai/kai 1.2.0 → 1.3.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/kai +51 -0
- package/package.json +1 -1
package/kai
CHANGED
|
@@ -47,6 +47,55 @@ Add your project-specific context here. The more you provide, the better Kai per
|
|
|
47
47
|
EOF
|
|
48
48
|
fi
|
|
49
49
|
|
|
50
|
+
# ── Ensure Playwright MCP is available ────────────────
|
|
51
|
+
|
|
52
|
+
playwright_available=false
|
|
53
|
+
|
|
54
|
+
# Check if Playwright MCP is configured anywhere
|
|
55
|
+
for config in \
|
|
56
|
+
".mcp.json" \
|
|
57
|
+
".claude/settings.local.json" \
|
|
58
|
+
"$HOME/.claude/settings.local.json" \
|
|
59
|
+
"$HOME/.claude/settings.json"; do
|
|
60
|
+
if [ -f "$config" ] && grep -q "playwright" "$config" 2>/dev/null; then
|
|
61
|
+
playwright_available=true
|
|
62
|
+
break
|
|
63
|
+
fi
|
|
64
|
+
done
|
|
65
|
+
|
|
66
|
+
# Check Claude Code plugins
|
|
67
|
+
if [ "$playwright_available" = false ]; then
|
|
68
|
+
for plugin_dir in "$HOME/.claude/plugins"/*/external_plugins/playwright/; do
|
|
69
|
+
if [ -f "${plugin_dir}.mcp.json" ]; then
|
|
70
|
+
playwright_available=true
|
|
71
|
+
break
|
|
72
|
+
fi
|
|
73
|
+
done
|
|
74
|
+
fi
|
|
75
|
+
|
|
76
|
+
if [ "$playwright_available" = false ]; then
|
|
77
|
+
echo "Setting up Playwright browser testing..."
|
|
78
|
+
mkdir -p .playwright-mcp
|
|
79
|
+
|
|
80
|
+
# Add to project-level MCP config
|
|
81
|
+
if [ -f ".mcp.json" ]; then
|
|
82
|
+
# Merge with existing config
|
|
83
|
+
if ! grep -q "playwright" .mcp.json 2>/dev/null; then
|
|
84
|
+
jq '. + {"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}}' .mcp.json > .mcp.json.tmp && mv .mcp.json.tmp .mcp.json
|
|
85
|
+
fi
|
|
86
|
+
else
|
|
87
|
+
cat > .mcp.json << 'MCPEOF'
|
|
88
|
+
{
|
|
89
|
+
"playwright": {
|
|
90
|
+
"command": "npx",
|
|
91
|
+
"args": ["@playwright/mcp@latest"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
MCPEOF
|
|
95
|
+
fi
|
|
96
|
+
echo " Playwright MCP configured in .mcp.json"
|
|
97
|
+
fi
|
|
98
|
+
|
|
50
99
|
# ── Create the implementation loop script ─────────────
|
|
51
100
|
|
|
52
101
|
cat > "$LOOP_SCRIPT" << 'LOOPEOF'
|
|
@@ -235,6 +284,8 @@ Use browser_snapshot (accessibility tree) for actions, browser_take_screenshot f
|
|
|
235
284
|
|
|
236
285
|
When the developer asks you to test or QA the app, proactively navigate to every page and report what you find.
|
|
237
286
|
|
|
287
|
+
**IMPORTANT: When the developer asks you to \"take a look\", \"check\", \"investigate\", or \"look into\" a bug or issue, you MUST use Playwright browser tools FIRST to visually see the problem yourself before diving into code. You are a PM — see the bug with your own eyes, then diagnose.**
|
|
288
|
+
|
|
238
289
|
## Rules for good stories
|
|
239
290
|
- Each story: independently committable, 5-15 min of work
|
|
240
291
|
- Acceptance criteria must be objectively verifiable
|