Open
Conversation
Guard per-criterion thresholds to the 0-10 score range and fall back to the default threshold when contracts contain metric-style values. Clarify negotiation/evaluation prompts so threshold remains a score gate, preventing false sprint failures on resume.
Introduce criterion lock state, inconclusive handling, and focused retry prompts so flaky re-evaluations do not regress already verified criteria. Add CLI/config controls and persisted stability snapshots while keeping strict mode available for full regression checks.
Retry evaluation once when the first response is not parseable JSON, including stricter retry instructions and better Claude result-event text capture. Raise Claude max turns and document the new evaluator reliability behavior in the README.
Clear sprint stability snapshots when using --resume=reset-contract so locked criterion state cannot leak into a newly negotiated contract.
Add iterative multi-round contract negotiation with fail-closed parsing and retry-on-invalid output, plus case-insensitive APPROVED detection. Trigger mid-sprint renegotiation on clearly misaligned evaluations and guard evaluators against empty feedback arrays.
This reverts commit 92729e3.
Add iterative multi-round contract negotiation with fail-closed parsing and retry-on-invalid output, plus case-insensitive APPROVED detection. Trigger mid-sprint renegotiation on clearly misaligned evaluations and guard evaluators against empty feedback arrays.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a focused contract negotiation hardening feature to the existing harness architecture.
Inspired by ideas from @lliWcWill in
coleam00/adversarial-devPR #3, this implementation is adapted to my current codebase and integrated with my existing resume + stabilized retry logic.What’s included
APPROVED...responses.Why
In difficult sprints, contracts can become misaligned with real implementation constraints.
This feature reduces wasted retry loops and improves harness resilience by renegotiating when quality signals indicate the current contract is no longer actionable.
Scope
Updated files:
claude-harness/harness.tscodex-harness/harness.tsclaude-harness/evaluator.tscodex-harness/evaluator.tsREADME.mdCredit
Design inspiration and several hardening concepts were inspired by:
https://github.com/coleam00/adversarial-dev/pull/3