Skip to content

feat(prompts): add staleness detection to refiner prompt#44

Merged
HonestMajority merged 1 commit intomainfrom
refiner-remove-outdated
Feb 23, 2026
Merged

feat(prompts): add staleness detection to refiner prompt#44
HonestMajority merged 1 commit intomainfrom
refiner-remove-outdated

Conversation

@HonestMajority
Copy link
Copy Markdown
Owner

When a user makes manual code changes between agman iterations, the refiner receives a TASK.md whose Plan section is out of sync with the actual codebase — steps marked "Remaining" may already be done, and "Completed" steps may have been rewritten.

The refiner already receives git diff and commit log context, but its instructions didn't tell it to use that context to reconcile the overall plan. This adds a new instruction (inserted as #3, with subsequent instructions renumbered) that tells the refiner to compare TASK.md's plan against the git diff, commit log, and actual codebase before rewriting, treating the code as the source of truth when they diverge.

Prompt-only change — no Rust logic modified.

Add instruction 3 to the refiner prompt that tells it to detect and
reconcile stale TASK.md content when the user has made manual code
changes between agman iterations. The refiner now compares the Plan's
Completed/Remaining steps against the git diff, commit log, and actual
codebase, treating code as the source of truth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HonestMajority HonestMajority merged commit 4e9502e into main Feb 23, 2026
1 check passed
@HonestMajority HonestMajority deleted the refiner-remove-outdated branch February 23, 2026 15:01
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.

1 participant