Skip to content

feat(gastown): inject quality gates into polecat prompt#1078

Open
jrf0110 wants to merge 1 commit intomainfrom
958-polecat-pre-submission-gates
Open

feat(gastown): inject quality gates into polecat prompt#1078
jrf0110 wants to merge 1 commit intomainfrom
958-polecat-pre-submission-gates

Conversation

@jrf0110
Copy link
Contributor

@jrf0110 jrf0110 commented Mar 12, 2026

Summary

  • Adds gates: string[] parameter to buildPolecatSystemPrompt that injects the town's configured quality gates into a "Pre-Submission Gates" section of the polecat system prompt
  • Polecats now self-validate by running configured gate commands (lint, test, build) before calling gt_done, catching failures in-session instead of wasting a refinery round-trip
  • Gates are read from townConfig.refinery.gates at dispatch time (same source the refinery uses); when no gates are configured, the section is omitted
  • Prompt instructs polecats to fix gate failures and escalate via gt_escalate if stuck after repeated attempts

Closes #958

Verification

  • Code review of diff against fork branch — all patches applied cleanly to origin/main
  • Polecat system prompt test file updated with gates parameter coverage

Visual Changes

N/A

Reviewer Notes

  • This is a small, focused change (3 files, ~40 lines) — low risk
  • The gate commands are injected verbatim from townConfig.refinery.gates — no sanitization is applied since these are admin-configured values
  • The escalation fallback ("call gt_escalate then gt_done anyway") matches the issue spec; the refinery makes the final call on whether to merge

…e-submission validation

Adds gates parameter to buildPolecatSystemPrompt that injects the town's
configured quality gates (from townConfig.refinery.gates) into a
Pre-Submission Gates section of the polecat prompt. Polecats now
self-validate by running lint/test/build before calling gt_done, catching
failures in-session instead of wasting a refinery round-trip.

Closes #958
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 12, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • cloudflare-gastown/src/dos/town/container-dispatch.ts
  • cloudflare-gastown/src/prompts/polecat-system.prompt.ts
  • cloudflare-gastown/src/prompts/polecat-system.prompt.test.ts

Reviewed by gpt-5.4-20260305 · 277,557 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polecats: Run quality gates before gt_done to self-validate

2 participants