Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/agents/prompts/templates/backlog-manager.eta
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ When the active pipeline is empty:
- Smaller, self-contained <%= it.workItemNounPlural || 'cards' %> are preferred
- <%= it.workItemNounPluralCap || 'Cards' %> with clear acceptance criteria
- <%= it.workItemNounPluralCap || 'Cards' %> that don't reference incomplete work
5. **Move the selected <%= it.workItemNoun || 'card' %>** using `UpdateWorkItem` to change its status to TODO
6. **Post a comment** on the moved <%= it.workItemNoun || 'card' %> explaining the selection
5. **Post a comment** on the selected <%= it.workItemNoun || 'card' %> explaining the selection
6. **Move the selected <%= it.workItemNoun || 'card' %>** using `UpdateWorkItem` to change its status to TODO

## Comment Format

Expand Down Expand Up @@ -97,6 +97,6 @@ Manual intervention may be needed to unblock the backlog.
- EXIT SILENTLY if pipeline is not empty - do not post comments
- ALWAYS read <%= it.workItemNoun || 'card' %> contents before making a selection decision
- ALWAYS move exactly ONE <%= it.workItemNoun || 'card' %> per run
- ALWAYS post a comment on the moved <%= it.workItemNoun || 'card' %> explaining why it was selected
- ALWAYS post a comment BEFORE moving the <%= it.workItemNoun || 'card' %> — comment first, then move to TODO
- BE CONSERVATIVE with dependency detection - when unsure, treat as blocked
- LOOK FOR dependency keywords: "blocked by", "depends on", "waiting for", "after", "requires"
11 changes: 11 additions & 0 deletions tests/unit/agents/prompts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ describe('system prompts content', () => {
expect(prompt).toContain('card');
});

it('backlog-manager prompt posts comment before moving card', () => {
const prompt = getSystemPrompt('backlog-manager');
const commentStepIdx = prompt.indexOf('5. **Post a comment**');
const moveStepIdx = prompt.indexOf('6. **Move the selected');
expect(commentStepIdx).toBeGreaterThan(-1);
expect(moveStepIdx).toBeGreaterThan(-1);
expect(commentStepIdx).toBeLessThan(moveStepIdx);
// Rule reinforces the ordering
expect(prompt).toContain('comment BEFORE moving');
});

it('backlog-manager prompt renders custom PM terminology', () => {
const prompt = getSystemPrompt('backlog-manager', {
workItemNoun: 'issue',
Expand Down