Skip to content

feat(primitives): persist_changes, QuickCheck, adaptive advisor, auto_commit#1

Merged
ProtocolWarden merged 1 commit into
mainfrom
feat/primitives-1-4
May 19, 2026
Merged

feat(primitives): persist_changes, QuickCheck, adaptive advisor, auto_commit#1
ProtocolWarden merged 1 commit into
mainfrom
feat/primitives-1-4

Conversation

@ProtocolWarden
Copy link
Copy Markdown
Owner

Summary

  • Primitive 1 — persist_changes + worktree isolation: GoalStage.persist_changes=True causes parallel stages to run in isolated git worktrees (git_ops.py). After the batch completes, each worktree commit is cherry-picked back into the main working directory.
  • Primitive 2 — QuickCheck scripted verification: GoalStage.verification accepts "full" (agent verifiers, existing behaviour), "skip" (immediate accept), or list[QuickCheck] (shell commands). QuickCheck carries command, expected_exit_code, and description. quick_check.py handles timeout and FileNotFoundError cleanly.
  • Primitive 3 — Adaptive advisor: TeamConfig.adaptive_advisor=True enables advisor.py to ask the coordinator LLM after each sequential stage whether to "continue", "done" (early exit), or "add_stage" (inject a new GoalStage inline). Resilient: malformed JSON or call errors default to "continue".
  • Primitive 4 — auto_commit: TeamConfig.auto_commit=True triggers git_ops.commit_stage() after each successful sequential stage (no-op if nothing to commit).

Test plan

  • tests/test_primitives.py — 29 new tests covering all four primitives
  • Full suite: 108 tests passing (was 79)
  • No regressions in existing coordinator, verifier, checkpoint, or model tests

🤖 Generated with Claude Code

…auto_commit

1. persist_changes on GoalStage — parallel stages with persist_changes=True run in
   isolated git worktrees (git_ops.py); changes are committed and cherry-picked back
   into the main working directory after the batch completes.

2. QuickCheck scripted verification — GoalStage.verification accepts "full" (agent
   verifiers), "skip" (immediate accept), or list[QuickCheck] (shell commands checked
   against expected exit code). quick_check.py handles timeout and FileNotFoundError.

3. Adaptive advisor (advisor.py) — after each sequential stage, coordinator LLM decides
   "continue" / "done" (early exit) / "add_stage" (inject a new GoalStage inline).

4. auto_commit on TeamConfig — coordinator calls git_ops.commit_stage() after each
   successful sequential stage (skips if nothing to commit).

108 tests passing.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@ProtocolWarden ProtocolWarden merged commit 7d485f2 into main May 19, 2026
1 check failed
@ProtocolWarden ProtocolWarden deleted the feat/primitives-1-4 branch May 19, 2026 05:58
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