start-vibing 4.4.1 → 4.4.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/package.json +1 -1
- package/template/.claude/hooks/format-on-edit.sh +26 -0
- package/template/.claude/hooks/git-context-session-start.sh +22 -0
- package/template/.claude/hooks/mcp-usage-session-start.sh +4 -0
- package/template/.claude/hooks/quality-gate-stop.sh +46 -0
- package/template/.claude/settings.json +29 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "start-vibing",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.3",
|
|
4
4
|
"description": "Setup Claude Code with 9 plugins, 6 community skills, and 8 MCP servers. Parallel install, auto-accept, superpowers + ralph-loop. e2e-audit 0.2.0 refactor (skill-only, no agents): SessionStart hook + slash command make the skill keyword-invokable (\"e2e audit\", \"roda o e2e\", \"integration test\", \"test coverage gaps\"). Source-first discovery via detect-stack, discover-routes (Next app/pages/Remix/SvelteKit/Nuxt/Astro), discover-api-surface (HTTP handlers, tRPC procedures, GraphQL, server actions, middleware auth), inventory-existing-tests (preserve prior corpus + sha256 drift hash), and detect-uncovered (branch-diff vs origin/main finds changes not covered by existing specs). Report-then-ask between mapping and Playwright run; post-run-feedback report before writing findings. SHOT+TRACE+ASSERT+SOURCE evidence quad per non-meta finding; meta rules (coverage-gap-*, uncovered-*, test-drift, stack-detect, post-run-feedback) exempt. verify-audit.sh enforces schema + quad. Generic (no project leakage). super-design 0.7.0 carries over.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# PostToolUse hook: auto-formats files written/edited by Claude using prettier.
|
|
3
|
+
# Silently no-ops if prettier is unavailable or the file type isn't supported.
|
|
4
|
+
# Always exits 0 so it never blocks the workflow.
|
|
5
|
+
set -uo pipefail
|
|
6
|
+
|
|
7
|
+
INPUT=$(cat)
|
|
8
|
+
FILE=$(printf '%s' "$INPUT" | python3 -c 'import json,sys;d=json.load(sys.stdin);print(d.get("tool_input",{}).get("file_path",""))' 2>/dev/null || echo "")
|
|
9
|
+
|
|
10
|
+
[ -z "$FILE" ] && exit 0
|
|
11
|
+
[ ! -f "$FILE" ] && exit 0
|
|
12
|
+
|
|
13
|
+
case "$FILE" in
|
|
14
|
+
*.ts|*.tsx|*.js|*.jsx|*.mjs|*.cjs|*.json|*.md|*.css|*.scss|*.html|*.yml|*.yaml) ;;
|
|
15
|
+
*) exit 0 ;;
|
|
16
|
+
esac
|
|
17
|
+
|
|
18
|
+
cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null || exit 0
|
|
19
|
+
|
|
20
|
+
if command -v bunx >/dev/null 2>&1; then
|
|
21
|
+
bunx --bun prettier --write --log-level=silent "$FILE" 2>/dev/null || true
|
|
22
|
+
elif command -v npx >/dev/null 2>&1; then
|
|
23
|
+
npx --no-install prettier --write --log-level=silent "$FILE" 2>/dev/null || true
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
exit 0
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Injects current git context (branch, dirty files, last commits) into Claude's
|
|
3
|
+
# SessionStart context so the assistant opens the session already situated.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null || exit 0
|
|
7
|
+
command -v git >/dev/null 2>&1 || exit 0
|
|
8
|
+
git rev-parse --is-inside-work-tree >/dev/null 2>&1 || exit 0
|
|
9
|
+
|
|
10
|
+
BRANCH=$(git branch --show-current 2>/dev/null || echo "(detached)")
|
|
11
|
+
UPSTREAM=$(git rev-parse --abbrev-ref --symbolic-full-name '@{u}' 2>/dev/null || echo "(no upstream)")
|
|
12
|
+
AHEAD_BEHIND=$(git rev-list --left-right --count "@{u}...HEAD" 2>/dev/null || echo "? ?")
|
|
13
|
+
DIRTY=$(git status --porcelain 2>/dev/null | head -20)
|
|
14
|
+
DIRTY_COUNT=$(git status --porcelain 2>/dev/null | wc -l | tr -d ' ')
|
|
15
|
+
LAST_COMMITS=$(git log --oneline -5 2>/dev/null)
|
|
16
|
+
|
|
17
|
+
CONTEXT="GIT CONTEXT (auto-injected at session start)\n\nBranch: ${BRANCH} (upstream: ${UPSTREAM}, behind/ahead: ${AHEAD_BEHIND})\n\nUncommitted changes (${DIRTY_COUNT} files):\n${DIRTY:-(clean)}\n\nLast 5 commits:\n${LAST_COMMITS}\n\nUse this to ground your first response. Don't re-run git status unless the user asks for fresh state — this snapshot is from session start."
|
|
18
|
+
|
|
19
|
+
# Escape for JSON
|
|
20
|
+
CONTEXT_ESCAPED=$(printf '%s' "$CONTEXT" | python3 -c 'import json,sys;print(json.dumps(sys.stdin.read()))' 2>/dev/null || printf '%s' "$CONTEXT" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/' | tr -d '\n' | sed 's/\\n$//' | awk '{print "\"" $0 "\""}')
|
|
21
|
+
|
|
22
|
+
printf '{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":%s}}\n' "$CONTEXT_ESCAPED"
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
cat <<'EOF'
|
|
3
|
+
{"hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"MCP USAGE RULES (non-negotiable for this project):\n\n1. sequential-thinking — You MUST invoke `mcp__sequential-thinking__sequentialthinking` BEFORE proposing a solution whenever the task involves: multi-step implementation, architecture/design decisions, debugging a non-trivial bug, refactor planning, trade-off analysis, or any request where the path is not obvious in one step. Do not skip it because the answer 'feels clear' — use it to externalize the plan, then act. Skip ONLY for: trivial single-file edits, pure lookups, direct factual questions, or formatting/typo fixes.\n\n2. context7 — You MUST invoke `mcp__context7__resolve-library-id` followed by `mcp__context7__query-docs` BEFORE writing or modifying code that uses ANY external library, framework, SDK, API, or CLI tool — including well-known ones (React, Next.js, Mongoose, Zod, Tailwind, shadcn, TanStack Query, Playwright, Vitest, Bun, Express, Prisma, etc.). Your training data may be stale; context7 returns current docs. Skip ONLY for: pure language features (vanilla TS/JS), project-internal code with no library surface, or refactors that don't touch library APIs.\n\n3. Order of operations for a typical feature task: sequential-thinking (plan) → context7 (verify library APIs) → implement → quality gates. Do not invert.\n\n4. If you catch yourself about to write code without having called context7 for a library you're importing, STOP and call it first. If you catch yourself proposing a multi-step plan without sequential-thinking, STOP and call it first.\n\n5. These MCPs are already connected in this project (.mcp.json). There is no setup cost — just call them."}}
|
|
4
|
+
EOF
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Stop hook: runs available quality gates (typecheck, lint, test) before
|
|
3
|
+
# letting the session end. If any fail, exits 2 to force Claude to fix them.
|
|
4
|
+
# Respects stop_hook_active to avoid infinite loops.
|
|
5
|
+
# Skips gracefully if scripts aren't defined in package.json.
|
|
6
|
+
set -uo pipefail
|
|
7
|
+
|
|
8
|
+
INPUT=$(cat)
|
|
9
|
+
|
|
10
|
+
ACTIVE=$(printf '%s' "$INPUT" | python3 -c 'import json,sys;d=json.load(sys.stdin);print(d.get("stop_hook_active",False))' 2>/dev/null || echo "False")
|
|
11
|
+
[ "$ACTIVE" = "True" ] && exit 0
|
|
12
|
+
|
|
13
|
+
cd "${CLAUDE_PROJECT_DIR:-.}" 2>/dev/null || exit 0
|
|
14
|
+
[ ! -f package.json ] && exit 0
|
|
15
|
+
|
|
16
|
+
# Skip if no source files were touched in this branch vs origin
|
|
17
|
+
if command -v git >/dev/null 2>&1; then
|
|
18
|
+
CHANGED=$(git diff --name-only HEAD 2>/dev/null | grep -E '\.(ts|tsx|js|jsx|mjs|cjs)$' | head -1 || true)
|
|
19
|
+
STAGED=$(git diff --name-only --cached 2>/dev/null | grep -E '\.(ts|tsx|js|jsx|mjs|cjs)$' | head -1 || true)
|
|
20
|
+
if [ -z "$CHANGED" ] && [ -z "$STAGED" ]; then
|
|
21
|
+
exit 0
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
has_script() {
|
|
26
|
+
python3 -c "import json,sys;d=json.load(open('package.json'));sys.exit(0 if '$1' in d.get('scripts',{}) else 1)" 2>/dev/null
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
RUNNER="bun run"
|
|
30
|
+
command -v bun >/dev/null 2>&1 || RUNNER="npm run"
|
|
31
|
+
|
|
32
|
+
FAIL=""
|
|
33
|
+
for script in typecheck lint test; do
|
|
34
|
+
if has_script "$script"; then
|
|
35
|
+
if ! $RUNNER "$script" >/dev/null 2>&1; then
|
|
36
|
+
FAIL="$FAIL $script"
|
|
37
|
+
fi
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
if [ -n "$FAIL" ]; then
|
|
42
|
+
printf '{"decision":"block","reason":"Quality gate failed:%s. Run the failing script(s), fix the errors, and try again. Do not bypass — these run because TypeScript/lint/test errors block PRs."}\n' "$FAIL"
|
|
43
|
+
exit 0
|
|
44
|
+
fi
|
|
45
|
+
|
|
46
|
+
exit 0
|
|
@@ -43,6 +43,35 @@
|
|
|
43
43
|
{
|
|
44
44
|
"type": "command",
|
|
45
45
|
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/e2e-audit-session-start.sh\""
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"type": "command",
|
|
49
|
+
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/mcp-usage-session-start.sh\""
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "command",
|
|
53
|
+
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/git-context-session-start.sh\""
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"PostToolUse": [
|
|
59
|
+
{
|
|
60
|
+
"matcher": "Write|Edit",
|
|
61
|
+
"hooks": [
|
|
62
|
+
{
|
|
63
|
+
"type": "command",
|
|
64
|
+
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/format-on-edit.sh\""
|
|
65
|
+
}
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"Stop": [
|
|
70
|
+
{
|
|
71
|
+
"hooks": [
|
|
72
|
+
{
|
|
73
|
+
"type": "command",
|
|
74
|
+
"command": "bash \"$CLAUDE_PROJECT_DIR/.claude/hooks/quality-gate-stop.sh\""
|
|
46
75
|
}
|
|
47
76
|
]
|
|
48
77
|
}
|