# SDD Preflight Common Issues

## PowerShell Core

### Q: `pwsh` is available but `.ps1` script execution fails

**Possible cause**: Execution policy restriction

**Solution**:
```powershell
# Check current policy
Get-ExecutionPolicy

# Temporarily allow local scripts
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
```

### Q: After installing on macOS, `pwsh` still cannot be found

**Possible cause**: PATH not updated

**Solution**:
```bash
# Reload shell configuration
source ~/.zshrc

# Or manually add PATH
export PATH="/usr/local/microsoft/powershell/7:$PATH"
```

### Q: Script output is garbled

**Possible cause**: Terminal encoding mismatch

**Solution**:
```powershell
# Add at the beginning of the script
$OutputEncoding = [Console]::OutputEncoding = [System.Text.Encoding]::UTF8
```

## Git

### Q: Cannot create a feature branch

**Possible cause**: Git user info not configured

**Solution**:
```bash
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
```

## .specify Directory

### Q: Workflow reports template file not found

**Possible cause**: `.specify/templates/` directory is incomplete

**Solution**:
1. Verify the project was created from a complete speckit template
2. Copy missing template files from another speckit project
3. Required templates: `spec-template.md`, `plan-template.md`, `agent-file-template.md`
