feat(doctor): Add session-hooks check for settings.json consistency

Adds a new doctor check that verifies all settings.json files in the
town use session-start.sh wrapper for SessionStart and PreCompact hooks.

Without this wrapper, session_id passthrough fails, which breaks
gt seance discovery of sessions.

The check:
- Scans all settings.json files across town, rigs, crew, and polecats
- Warns if any file uses bare 'gt prime' without session-start.sh
- Provides fix hint pointing to the correct wrapper configuration

(gt-77fhi)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rictus
2026-01-02 12:46:49 -08:00
committed by Steve Yegge
parent 90e9a2dbcd
commit c327ea2ca2
2 changed files with 208 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ Rig checks (with --rig flag):
Routing checks (fixable):
- routes-config Check beads routing configuration
Session hook checks:
- session-hooks Check settings.json use session-start.sh
Patrol checks:
- patrol-molecules-exist Verify patrol molecules exist
- patrol-hooks-wired Verify daemon triggers patrols
@@ -128,6 +131,7 @@ func runDoctor(cmd *cobra.Command, args []string) error {
// Config architecture checks
d.Register(doctor.NewSettingsCheck())
d.Register(doctor.NewSessionHookCheck())
d.Register(doctor.NewRuntimeGitignoreCheck())
d.Register(doctor.NewLegacyGastownCheck())