feat: loop reviewer gate (writer≠judge) + trigger docs — Build 3 - #57
Merged
Conversation
…ont door - src/loop.ts: optional independent review gate — --reviewer "<cmd>" or a goal.md REVIEWER: line (explicit flag wins; opt-in only, unconfigured loop byte-identical). Runs AFTER verify passes and BEFORE a box ticks; both must exit 0 (no false green). Rejections feed the next cycle's prompt like verify failures — self-heal for free. Usage text documents both gates + triggers. - README: Loops leads with the headless front door; new Triggers section (knitbrain is the TARGET of schedulers, never the scheduler) with a copy-paste crontab example and scheduler-friendly exit-code contract. - tests: 6 new (red-reviewer no-tick/exit-1, green-reviewer tick, REVIEWER: line precedence, flag override, reject-then-approve retry, goalReviewer unit) + 10 existing pass unchanged (regression proof for the unconfigured path). verify EXIT=0 · live smoke: red reviewer → box stays unticked exit 1; green reviewer → ticked exit 0.
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.
What (Build 3 — loop front door, docs/LOOP-ENGINEERING.md Tier-2.3)
knitbrain loop --reviewer "<cmd>"or goal.mdREVIEWER:line — an independent second command that must ALSO exit 0 before a checkbox ticks (writer≠judge). Rejections feed the next attempt's prompt (self-heal). Opt-in: unconfigured behavior byte-identical (all 10 existing tests pass unchanged).knitbrain loop; exit codes are scheduler-friendly (0 done/clean, 1 red/infra). Copy-paste crontab example.Verification
rm -rf dist && npm run verifyEXIT=0 (568 tests). Live smoke on built binary: failing reviewer → box stays unticked, exit 1; passing reviewer → ticked, exit 0.No new MCP tools, no scheduler of our own (kill-list), no version bump.