This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it("detects when themes haven't been added", async () => { | |
const response = await generateAIResponse(context) | |
const eval = await evaluatePendingCommandAwareness(response) | |
expect(eval.score).toBeGreaterThan(0.85) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Deterministic file naming in video-to-transcript | |
// From: https://github.com/camwest/video-to-transcript/blob/main/src/workspace.ts | |
/** | |
* Extract a safe directory name from a YouTube URL or file path | |
*/ | |
function extractProjectId(input: string): string { | |
// Try to extract YouTube video ID | |
const videoIdMatch = input.match(/(?:v=|\/)([\w-]{11})(?:\?|&|$)/); | |
if (videoIdMatch) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Speaker identification prompt from video-to-transcript | |
// From: https://github.com/camwest/video-to-transcript/blob/main/src/speaker-identifier.ts#L35-L55 | |
return `You are an expert at identifying speakers in YouTube video content. Extract FIRST NAMES ONLY from video metadata and transcript introductions. | |
Identify speakers by FIRST NAME ONLY for this YouTube video: | |
Video Title: "${metadata.title}" | |
Channel: "${metadata.uploader}" | |
Description: "${metadata.description.substring(0, 500)}..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Smart caching in video-to-transcript | |
// From: https://github.com/camwest/video-to-transcript/blob/main/src/transcriber.ts#L46-L52 | |
const responseFile = audioPath.replace(/\.[^.]+$/, '.deepgram.json'); | |
if (!force && existsSync(responseFile)) { | |
console.log(`✓ Using existing transcription: ${responseFile}`); | |
try { | |
const responseText = readFileSync(responseFile, 'utf8'); | |
const result = JSON.parse(responseText); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hooks": { | |
"PreToolUse": [ | |
{ | |
"matcher": "Bash", | |
"hooks": [ | |
{ | |
"type": "command", | |
"command": "./scripts/claude-branch-protection.sh" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Claude Code Hook: Code Quality Check | |
# Runs TypeScript check and lint fix after file modifications | |
echo "🔍 Running code quality checks..." | |
# Run TypeScript check | |
echo " → Type checking..." | |
npx tsc --noEmit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Claude Code Hook: Branch Protection | |
# Prevents direct commits/pushes to main branch | |
# Get the git command from Claude tool input | |
COMMAND=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command') | |
# Check for dangerous git operations on main branch | |
if echo "$COMMAND" | grep -q -E 'git\s+(commit|push.*\smain|push.*origin\s+main)'; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Claude Code Hook: Branch Protection | |
# Prevents direct commits/pushes to main branch | |
# Get the git command from Claude tool input | |
COMMAND=$(echo "$CLAUDE_TOOL_INPUT" | jq -r '.command') | |
# Check for dangerous git operations on main branch | |
if echo "$COMMAND" | grep -q 'git.*commit\|git.*push.*main'; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
NewerOlder