Skip to content

Add agent guardrails for tool fallbacks, mutation bounds, logging, and branch safety - #17

Open
achatainga wants to merge 1 commit into
unclebob:masterfrom
achatainga:fix/agent-guardrails-and-fallbacks
Open

achatainga wants to merge 1 commit into
unclebob:masterfrom
achatainga:fix/agent-guardrails-and-fallbacks

Conversation

@achatainga

Copy link
Copy Markdown

Why

When running ub-mode with autonomous coding agents, a few terse rules can trigger predictable execution failures:

  • Rule collision: Laziness Protocol (smallest edit) vs. Redesign From First Principles has no explicit escalation boundary, and Mutator (cover the uncovered) can clash with the TDD impracticality clause.
  • Missing companion binaries & equivalent mutants: If crapper, dryer, or mutator are not on $PATH, agents stall or fabricate scores. Without a retry cap, agents loop indefinitely trying to kill mathematically equivalent mutants.
  • Context window exhaustion: Keep a Log in the main thread directly fights Guard the Context Window on longer sessions.
  • Destructive defaults: Worktree Cleanup without a dry-run/secrets check and unconditional Push to the main line at the end create unnecessary blast radius in protected repositories.

What Changed

Minimal, style-matched updates to SKILL.md only (preserving existing structure, * bullet formatting, and voice):

  • Added an escalation bullet in ## Laziness Protocol when minimal edits duplicate state or violate Boundary Discipline.
  • Added graceful $PATH fallbacks for crapper, dryer, and mutator, aligned Mutator with the TDD impracticality clause, and capped mutation passes at 3 per module to handle verified equivalent mutants.
  • Offloaded Keep a Log to an external gitignored file (e.g., .ub-mode.log) while keeping only the summary in the main thread.
  • Required listing candidates / sparing untracked secrets in Worktree Cleanup, and defaulted Commit and Push to the working branch unless pushing directly to the main line is explicitly authorized.

…d push safety

Why: Prevent autonomous coding agents from stalling on missing companion binaries, looping infinitely on equivalent mutants, exhausting the context window with in-thread logs, deleting untracked secrets, or pushing directly to protected main branches.

What changed:
- Added an escalation rule between Laziness Protocol and Redesign From First Principles.
- Added fallback guidance when crapper, dryer, or mutator are absent from PATH, capped Mutator retries at 3 passes for equivalent mutants, and aligned Mutator with the TDD impracticality clause.
- Directed Keep a Log to an external gitignored log file to align with Guard the Context Window.
- Added a dry-run/secrets check to Worktree Cleanup and defaulted Commit and Push to the working branch unless main-line push is explicitly authorized.

Proof:
- Verified minimal diff and clean formatting via git diff --check and confirmed all edits preserve existing headings and imperative style.
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