feat(escalate): align config schema with design doc

- Change EscalationConfig to use Routes map with action strings
- Rename severity "normal" to "medium" per design doc
- Move config from config/ to settings/escalation.json
- Add --source flag for escalation source tracking
- Add Source field to EscalationFields
- Add executeExternalActions() for email/sms/slack with warnings
- Add default escalation config creation in gt install
- Add comprehensive unit tests for config loading
- Update help text with correct severity levels and paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
mayor
2026-01-12 02:29:56 -08:00
committed by beads/crew/emma
parent b9ecb7b82e
commit 9779ae3190
7 changed files with 882 additions and 163 deletions

View File

@@ -268,6 +268,14 @@ func runInstall(cmd *cobra.Command, args []string) error {
}
}
// Create default escalation config in settings/escalation.json
escalationPath := config.EscalationConfigPath(absPath)
if err := config.SaveEscalationConfig(escalationPath, config.NewEscalationConfig()); err != nil {
fmt.Printf(" %s Could not create escalation config: %v\n", style.Dim.Render("⚠"), err)
} else {
fmt.Printf(" ✓ Created settings/escalation.json\n")
}
// Provision town-level slash commands (.claude/commands/)
// All agents inherit these via Claude's directory traversal - no per-workspace copies needed.
if err := templates.ProvisionCommands(absPath); err != nil {