Scripts

Operational shell scripts in the scripts/ directory supporting development, CI, and repository management.

Build and Quality

ScriptPurpose
scripts/quality-checks-parallel.shParallel typecheck + lint + test (used by Makefile Commands)
scripts/check-changelog.shValidate bilingual changelog fragments (see Git Workflow)
scripts/compile-changelog.shBuild release changelog from fragments
scripts/check-migration-consistency.shValidate migration ordering and integrity
scripts/check-english-identifiers.shEnforce English naming in code (see Coding Guidelines)
scripts/validate-localized-text.shValidate LocalizedText patterns in schema

Git Hooks

Located in scripts/git-hooks/:

HookPhaseChecks
pre-commitBefore commit (~5s)Format, lint staged files, i18n parity, LocalizedText, migration consistency, block main
pre-pushBefore push (thorough)Conflict check, changelog fragments, full typecheck, affected tests
post-checkoutAfter checkoutDependency sync reminders
post-mergeAfter mergeDependency sync reminders

Installed via scripts/setup-git-hooks.sh. See Git Workflow for the two-tier hook strategy.

Repository Management

ScriptPurpose
scripts/cleanup-merged-worktrees.shClean stale worktrees (--dry-run to preview, --auto for no-prompt)
scripts/guard-root-dir.shProtect root repo from accidental commits
scripts/verify-root-clean.shVerify clean working directory
scripts/allocate-dev-ports.shDeterministic port allocation per worktree (range 10000-19999, see Docker Setup)
scripts/issue-to-worktree.shQuick start: issue number worktree + branch + make dev-init

Infrastructure

ScriptPurpose
scripts/manage-entra-redirect-uri.shAzure Entra ID SSO redirect URI management (see Authentication)

Project Management

ScriptPurpose
scripts/linear/linear-api.shLinear API operations
scripts/linear/batch-wsjf-score.shBatch WSJF scoring for Linear issues
scripts/linear/update-deployment-status.shUpdate Linear deployment status
scripts/jira-import.tsImport data from Jira

Usage Examples

# Create worktree from issue
./scripts/issue-to-worktree.sh 123 "add-payment-flow"
 
# Preview worktree cleanup
./scripts/cleanup-merged-worktrees.sh --dry-run
 
# Auto-cleanup without prompts
./scripts/cleanup-merged-worktrees.sh --auto
 
# Install git hooks
./scripts/setup-git-hooks.sh

Key Directories

  • scripts/ — top-level operational scripts
  • scripts/git-hooks/ — git hook implementations
  • scripts/linear/ — Linear project management integration

See Also