Skip to content

feat: loop reviewer gate (writer≠judge) + trigger docs — Build 3 - #57

Merged
PDgit12 merged 1 commit into
mainfrom
feat/loop-reviewer
Jul 6, 2026
Merged

feat: loop reviewer gate (writer≠judge) + trigger docs — Build 3#57
PDgit12 merged 1 commit into
mainfrom
feat/loop-reviewer

Conversation

@PDgit12

@PDgit12 PDgit12 commented Jul 6, 2026

Copy link
Copy Markdown
Owner

What (Build 3 — loop front door, docs/LOOP-ENGINEERING.md Tier-2.3)

  • Reviewer gate: knitbrain loop --reviewer "<cmd>" or goal.md REVIEWER: 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).
  • Triggers: README section + usage text — cron/launchd/CI/agent schedulers point at knitbrain loop; exit codes are scheduler-friendly (0 done/clean, 1 red/infra). Copy-paste crontab example.
  • Positioning: Loops section leads with the headless front door.

Verification

rm -rf dist && npm run verify EXIT=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.

…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.
Copilot AI review requested due to automatic review settings July 6, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@PDgit12
PDgit12 merged commit b827ef4 into main Jul 6, 2026
5 checks passed
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.

2 participants