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) |
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
Pyramid | |
Core App | |
investing -> Investing | |
data vault -> Data Vault | |
rewards -> Rewards | |
profile -> Profile | |
Investing | |
Data Vault |
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
R1 | |
iOS App | |
Logged Out | |
create account -> Create Account | |
login -> Logged In | |
sign in with apple -> Accept Terms | |
Create Account | |
enter credentials -> Validate Email | |
Validate Email | |
enter correct token -> Accept Terms |
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
// See https://xstate.js.org/viz/?gist=759a3ee0b7d85087b18be566a1f40224 for a visualization. | |
// It may need to be updated. To do so just copy & paste and remove the `export` keywords. | |
const States = { | |
START_EMAIL_AUTH: "START_EMAIL_AUTH", | |
LOGIN_OR_CREATE: "LOGIN_OR_CREATE", | |
LOGIN: "LOGIN", | |
LOGGED_OUT: "LOGGED_OUT", | |
CREATE_ACCOUNT: "CREATE_ACCOUNT", | |
ACCEPT_TERMS: "ACCEPT_TERMS", |
NewerOlder