Skip to content

feat: add foreman role differentiation to crew template#2702

Open
rileywhite wants to merge 7 commits intosteveyegge:mainfrom
rileywhite:main
Open

feat: add foreman role differentiation to crew template#2702
rileywhite wants to merge 7 commits intosteveyegge:mainfrom
rileywhite:main

Conversation

@rileywhite
Copy link

Summary

  • Adds conditional foreman-specific instructions to crew.md.tmpl
  • Foreman crew members now get explicit triage-and-dispatch instructions instead of generic crew context
  • Prevents foremen from diving into code investigation/implementation when they should be filing beads and slinging work to polecats

Changes

  • internal/templates/roles/crew.md.tmpl: Added {{ if eq .Polecat "foreman" }} block with foreman-specific workflow instructions

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./internal/templates/... passes
  • Manual test: gt prime as a foreman crew member shows foreman-specific context

Closes: hq-jsi

🤖 Generated with Claude Code

Foreman crew members now get explicit triage-and-dispatch instructions
instead of generic crew context. This prevents foremen from diving into
code investigation/implementation when they should be filing beads and
slinging work to polecats.

Closes: hq-jsi

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the status/needs-triage Inbox — we haven't looked at it yet label Mar 12, 2026
rileywhite and others added 6 commits March 12, 2026 19:33
Foreman is now positioned as the Mayor of a specific rig — an expert
in that rig's codebase who coordinates all work within it. Key changes:
- Rig-scoped beads: foreman files beads only for their own rig
- Cross-rig routing: nudge other rig's foreman or town mayor instead
  of filing beads directly in other rigs
- Expanded responsibilities: rig expertise, architectural oversight
- Relaxed direct-fix threshold from 2min to 5min

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All code changes — crew, polecats, any agent — now merge via pull
request. Removes the "push directly to main, no PRs" instructions
and replaces with feature branch + gh pr create workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both templates now mention that slung polecats use the rig's configured
workflow.default_formula from settings/config.json, with --formula flag
as override.

Related: gt-boc (sling ignores this setting — currently hardcoded)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Default scope is now explicitly the foreman's own rig — questions
  and status checks assume the local rig unless told otherwise
- Added status check command block so foremen inspect their running
  polecats, convoys, and beads when asked for status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ComputeRedirectTarget() short-circuited to HQ beads when townBeadsHasDB
was true, even when the rig had its own .beads/redirect file. This caused
all crew workers and polecats in Dolt-server rigs to silently read/write
the wrong database (HQ instead of rig-level beads).

Now checks for rig .beads/redirect before the town fallback, allowing the
rig redirect chain (lines 222+) to be reached and followed correctly.
RunSetupHooks was called during polecat spawn but missing from crew
creation. Crew members (like foreman) had to manually copy gitignored
files that the setup hook handles automatically.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/needs-triage Inbox — we haven't looked at it yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant