Skip to content

Guard in-place starts behind explicit allow flag#8

Closed
NagyVikt wants to merge 3 commits intomainfrom
agent/protocol/inplace-guard
Closed

Guard in-place starts behind explicit allow flag#8
NagyVikt wants to merge 3 commits intomainfrom
agent/protocol/inplace-guard

Conversation

@NagyVikt
Copy link
Copy Markdown
Collaborator

Summary\n- block \ by default\n- require explicit \ override\n- keep default flow worktree-first and parse options reliably even after positional args\n- add regression tests for default worktree behavior + in-place guard/override\n- document the in-place guard in README\n\n## Verification\n- npm test\n- node --check bin/multiagent-safety.js\n- npm pack --dry-run

NagyVikt added 3 commits April 10, 2026 13:45
The branch start helper now requires explicit --allow-in-place alongside --in-place, keeping the default path isolated in agent worktrees.\n\nAlso added regression tests for default worktree behavior and the in-place guard/override flow, and documented the explicit override in README.

Constraint: Preserve existing default branch/worktree flow for current users

Rejected: Remove --in-place entirely | some advanced local workflows still need an explicit escape hatch

Confidence: high

Scope-risk: narrow

Reversibility: clean

Directive: Keep main/dev workflows worktree-first; do not relax in-place guard without adding equivalent safety

Tested: npm test; node --check bin/multiagent-safety.js; npm pack --dry-run

Not-tested: End-to-end GitHub Actions run for this commit
Pre-commit now blocks Codex/OMX session commits on non-agent branches by default, while allowing human branch workflows to continue.\n\nSetup and doctor now auto-refresh managed safety files ( and ) when templates drift, so rerunning musafety applies the latest branch-safety logic without requiring manual force flags. Added regression coverage for the Codex guard plus auto-refresh behavior.

Constraint: Keep existing human VS Code commits on non-protected feature branches working

Rejected: Block all non-agent branch commits for everyone | would break normal human trunk/feature workflows

Confidence: high

Scope-risk: moderate

Reversibility: clean

Directive: Treat Codex branch guard and template auto-refresh as safety-critical defaults; do not weaken without replacement controls

Tested: npm test; node --check bin/multiagent-safety.js; npm pack --dry-run

Not-tested: GitHub Actions run for this new commit
This update tightens branch lifecycle guardrails around in-place work while
keeping the finish flow ergonomic. It adds managed hook/script updates and
test coverage so setup/doctor can auto-heal drift and the finish lifecycle
remains deterministic across local/remote cleanup.

Constraint: Must preserve existing agent-branch UX while adding safety rails
Rejected: Force all flows through extra interactive prompts | would slow scripted and CI usage
Confidence: high
Scope-risk: moderate
Reversibility: clean
Directive: Keep hook templates and lifecycle tests in sync when changing branch-finish semantics
Tested: npm test (55/55 pass)
Not-tested: Manual VS Code Source Control merge path after install
@NagyVikt
Copy link
Copy Markdown
Collaborator Author

Closing as superseded by newer merged PRs (#10, #12, and later main updates). This branch now conflicts with current guardrail logic and would revert current behavior; no unique required changes remain to merge safely.

@NagyVikt NagyVikt closed this Apr 11, 2026
@NagyVikt NagyVikt deleted the agent/protocol/inplace-guard branch April 20, 2026 07:45
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