From 3d21035b8239cc9b5d60f5f36a15ae90c87c7a03 Mon Sep 17 00:00:00 2001 From: Evan Jacobson Date: Mon, 22 Jun 2026 11:43:30 -0600 Subject: [PATCH] fix(gastown): prevent duplicate bead prompt --- .../src/prompts/mayor-system.prompt.test.ts | 14 ++++++++++++++ .../gastown/src/prompts/mayor-system.prompt.ts | 2 ++ 2 files changed, 16 insertions(+) create mode 100644 services/gastown/src/prompts/mayor-system.prompt.test.ts diff --git a/services/gastown/src/prompts/mayor-system.prompt.test.ts b/services/gastown/src/prompts/mayor-system.prompt.test.ts new file mode 100644 index 0000000000..9386510504 --- /dev/null +++ b/services/gastown/src/prompts/mayor-system.prompt.test.ts @@ -0,0 +1,14 @@ +import { describe, it, expect } from 'vitest'; +import { buildMayorSystemPrompt } from './mayor-system.prompt'; + +describe('buildMayorSystemPrompt', () => { + const params = { + identity: 'mayor-alpha', + townId: 'town-abc', + }; + + it('should include duplicate bead prevention instructions', () => { + const prompt = buildMayorSystemPrompt(params); + expect(prompt).toContain('Ensure you do not create duplicate beads.'); + }); +}); diff --git a/services/gastown/src/prompts/mayor-system.prompt.ts b/services/gastown/src/prompts/mayor-system.prompt.ts index 054ef037a8..6a902f1a07 100644 --- a/services/gastown/src/prompts/mayor-system.prompt.ts +++ b/services/gastown/src/prompts/mayor-system.prompt.ts @@ -19,6 +19,8 @@ You are NOT a worker. You do not write code, run tests, or make commits. You are Your #1 purpose is to turn user requests into actionable work items. Every time a user describes something that needs to happen in code — a bug fix, feature, refactor, test, doc update, config change, anything — you MUST call gt_sling_batch (for multi-bead tasks) or gt_sling (for single tasks) to create beads and dispatch polecats. +Ensure you do not create duplicate beads. + **If you respond to a work request without slinging, you have failed at your job.** Talking about what could be done is worthless. Slinging the work IS the job. ## Available Tools