Add patrol awareness and wiring to gt rig add / gt doctor (gt-7923)
gt rig add changes: - Seed patrol molecules (Deacon, Witness, Refinery) when adding rig - Create plugin directories at town (~gt/plugins/) and rig levels - Update command documentation and structure output gt doctor changes: - patrol-molecules-exist: Verify patrol molecules exist - patrol-hooks-wired: Verify daemon triggers patrols - patrol-not-stuck: Detect stale wisps (>1h in_progress) - patrol-plugins-accessible: Verify plugin directories exist - patrol-roles-have-prompts: Verify role prompts exist All patrol checks support --fix where applicable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,13 @@ var doctorCmd = &cobra.Command{
|
||||
Doctor checks for common configuration issues, missing files,
|
||||
and other problems that could affect workspace operation.
|
||||
|
||||
Patrol checks:
|
||||
- patrol-molecules-exist Verify patrol molecules exist
|
||||
- patrol-hooks-wired Verify daemon triggers patrols
|
||||
- patrol-not-stuck Detect stale wisps (>1h)
|
||||
- patrol-plugins-accessible Verify plugin directories
|
||||
- patrol-roles-have-prompts Verify role prompts exist
|
||||
|
||||
Use --fix to attempt automatic fixes for issues that support it.
|
||||
Use --rig to check a specific rig instead of the entire workspace.`,
|
||||
RunE: runDoctor,
|
||||
@@ -71,6 +78,13 @@ func runDoctor(cmd *cobra.Command, args []string) error {
|
||||
d.Register(doctor.NewWispSizeCheck())
|
||||
d.Register(doctor.NewWispStaleCheck())
|
||||
|
||||
// Patrol system checks
|
||||
d.Register(doctor.NewPatrolMoleculesExistCheck())
|
||||
d.Register(doctor.NewPatrolHooksWiredCheck())
|
||||
d.Register(doctor.NewPatrolNotStuckCheck())
|
||||
d.Register(doctor.NewPatrolPluginsAccessibleCheck())
|
||||
d.Register(doctor.NewPatrolRolesHavePromptsCheck())
|
||||
|
||||
// Config architecture checks
|
||||
d.Register(doctor.NewSettingsCheck())
|
||||
d.Register(doctor.NewRuntimeGitignoreCheck())
|
||||
|
||||
@@ -45,12 +45,18 @@ This creates a rig container with:
|
||||
- config.json Rig configuration
|
||||
- .beads/ Rig-level issue tracking (initialized)
|
||||
- .beads-wisp/ Local wisp/molecule tracking (gitignored)
|
||||
- plugins/ Rig-level plugin directory
|
||||
- refinery/rig/ Canonical main clone
|
||||
- mayor/rig/ Mayor's working clone
|
||||
- crew/main/ Default human workspace
|
||||
- witness/ Witness agent directory
|
||||
- polecats/ Worker directory (empty)
|
||||
|
||||
The command also:
|
||||
- Seeds patrol molecules (Deacon, Witness, Refinery)
|
||||
- Creates ~/gt/plugins/ (town-level) if it doesn't exist
|
||||
- Creates <rig>/plugins/ (rig-level)
|
||||
|
||||
Example:
|
||||
gt rig add gastown https://github.com/steveyegge/gastown
|
||||
gt rig add my-project git@github.com:user/repo.git --prefix mp`,
|
||||
@@ -201,6 +207,7 @@ func runRigAdd(cmd *cobra.Command, args []string) error {
|
||||
fmt.Printf(" ├── config.json\n")
|
||||
fmt.Printf(" ├── .beads/ (prefix: %s)\n", newRig.Config.Prefix)
|
||||
fmt.Printf(" ├── .beads-wisp/ (local wisp/molecule tracking)\n")
|
||||
fmt.Printf(" ├── plugins/ (rig-level plugins)\n")
|
||||
fmt.Printf(" ├── refinery/rig/ (canonical main)\n")
|
||||
fmt.Printf(" ├── mayor/rig/ (mayor's clone)\n")
|
||||
fmt.Printf(" ├── crew/%s/ (your workspace)\n", rigAddCrew)
|
||||
|
||||
Reference in New Issue
Block a user