refactor: remove redundant collaboration policy gates

Merged
RM
23d ago
+2354-1331

User description

Writ's helpers blocked ordinary parallel-agent work: PR readiness and update operations were treated as forbidden merges, remote GitHub actions required a local branch, and supervision required harness checkouts beneath writ's managed root. Contribution instructions added tracker setup, exact-base and checkpoint gates. This PR removes those mechanisms while preserving local ownership, WIP and coordination state. GitHub remains the authority for remote permissions.

Changes:

  • Admit remote gh pr merge, ready, update-branch, merge modes and API transport without a local expected-branch/origin gate. Preserve explicit owner-target checks and protection for commands that switch/delete the local checkout.
  • Accept existing harness-selected directories, canonical parent-component paths, host scripts and interpreters under bounded supervision. Remove the wrapper blacklist and managed-root ancestry requirement.
  • Keep direct Git branch/checkout/push-target checks, bare-force rejection and dirty-WIP protection. Remove branch-name-only local merge bans. Supervised mutation checks WIP after acquiring its permit and verifies the expected branch last.
  • Remove Beads startup hooks and mandatory tracker, registration, exact-base and checkpoint rituals. Simplify callers, CLI help, tests, issue templates and active docs together. Retain the Rust/companion architecture and link the retired operating policy at an immutable commit.
  • Share command-aware GitHub selector/operand parsing so payload URLs stay payloads and overloaded boolean flags cannot hide an explicit repository. Private git_safe/gh_options.rs separates finite option metadata from traversal; it adds no dependency or runtime CLI introspection. Documented built-in aliases and pre-subcommand values use the same command context, including the retained pr co checkout guard. Slash/hash-containing PR branch operands remain branches; bare repository inference is restricted to the actual issue-transfer destination. HTTP paths are percent-decoded once after query/fragment separation, and repository destinations use the same parsed operands, including repo-sync source values and pre-verb homepage flags.

Compatibility:

  • Lease storage, ownership/handoff state, conflict/recovery data, public signatures, error codes and JSON schemas are unchanged.
  • Direct git-safe --expected-branch remains optional on every branch name; omitting it does not prove assignment or consult registration. Supervised mutating Git still requires its explicit pin.
  • Optional helpers remain optional. Admission does not authorize an operator action. Scripts, configured user aliases, opaque GraphQL bodies and API node IDs are not recursively interpreted. Known literal REST owner targets remain checked. Explicit gh working directories are canonicalized without requiring a checkout.
  • Existing family-first CLI support and deprecated managed lifecycle compatibility/path rules remain. No credentials or GitHub settings changed; no remote merge or release was performed.

Regression evidence includes fail-before/fix-after tests, real local Git/shell execution, startup without tracker helpers, admitted remote-only operations, retained WIP/branch/owner failures, URL authority normalization, all 19 audited boolean collisions, payload values, multiple issue-transfer operands, end markers, short-option clusters, built-in aliases and flags preceding the verb, slash/hash PR branch operands, encoded/malformed URL paths and repository source/destination roles. The independent final review passed 57 scoped GitHub tests plus fresh public-library probes. GitHub mutation tests validate arguments only and perform no remote merge.

Final local native validation on 81d9bb22f953c4c96bf4f8597844fad2d86e4068 (base d79311c), pinned Rust 1.97.1 / workspace MSRV:

  • cargo fmt --all -- --check — passed.
  • CC=/usr/bin/gcc CARGO_BUILD_JOBS=4 cargo clippy --locked --offline --workspace --all-targets --all-features -- -D warnings — passed.
  • CC=/usr/bin/gcc CARGO_BUILD_JOBS=4 cargo test --locked --offline --workspace --all-features — 475 passed, zero failed/ignored.

No crate feature switches are declared. Hosted validation on this exact head is complete: Ubuntu/macOS/Windows, fmt/Clippy, cargo audit, CodeQL, Codacy, CodeScene, Codecov and qlty pass. Patch coverage is 97.98%. CodeRabbit's current pass completed with no actionable findings, and no unresolved review threads remain. New automated Codex reviews were unavailable due usage limits; independent scoped reviews of the functional repairs are complete. Local gitleaks passed. The configured Aikido hook reported a network/telemetry error, so its local result is unavailable. No tests/checks were weakened and no performance claim is made.

Existing policy PR assessment:

  • #213 / #215: useful checkpoint/optional-task wording, but retained runtime merge restrictions, registration/alignment prerequisites and Beads wrappers. Their restrictions are not combined here; branches and histories are preserved.
  • #183: useful CI observations can remain a separate optional classifier; additional scheduling and worktree controls are not imported.
  • #196: explicit allowlist propagation remains a narrow independently owned fix, not a prerequisite.

Related: #1 and #22 (partial collaboration/safety work; no broad closing reference). Current milestone: Linear writ — Collaboration MVP; historical GitHub milestones remain unassigned.
Linear: RM-1956


Summary by cubic

Removes redundant collaboration gates that blocked ordinary parallel-agent work: remote GitHub mutations no longer require a local branch or origin binding, and supervised commands no longer need to live under writ's managed root or avoid wrappers and interpreters. Local ownership, dirty-WIP, and bare-force checks remain, and GitHub stays the remote permission authority.

  • Admits gh pr merge, ready, update-branch, merge modes, and gh api without a local expected-branch gate; owner checks stay, and gh forms that switch or delete the local checkout remain guarded, including gh issue develop --checkout and -c.
  • Validates optional gh cwd and explicit REST owner targets via command-aware parsing with case-normalized owner and host matching and a private per-command option-arity table; slash/hash PR branch operands stay branches while bare inference is limited to the actual issue-transfer destination.
  • Supervision accepts harness-selected directories and host scripts or interpreters; the wrapper blacklist and managed-root ancestry rule are removed.
  • Retains direct git expected-branch/checkout/push-target checks, bare-force rejection, and dirty-WIP protection; supervised operations verify WIP before branch identity, and the supervised-merge path runs its WIP check after acquiring its concurrency permit.
  • Removes Beads startup hooks and mandatory tracker, registration, exact-base, and checkpoint rituals; Linear links become optional in issue templates and contribution guidance.
  • Preserves the lease store and ownership, handoff, and conflict/recovery data; no new shared state, dependencies, public signatures, error codes, or JSON schemas.

Summary by CodeRabbit

  • Workflow Updates

    • Local merges and pulls are allowed when branch and working-tree safeguards are met; local checkout changes and destructive operations remain guarded.
    • Supported GitHub CLI actions, including pull request and API operations, are checked against repository-owner rules. GitHub permissions and operator authorization govern remote actions.
    • Host scripts and native tools can be used without optional coordination helpers or hooks.
  • Contribution Guidance

    • Linear links are optional in issue templates and contribution workflows.
    • Updated guidance clarifies checkout ownership, validation expectations, and PR handoff reporting.

Devin Review


CodeAnt-AI Description

Allow GitHub-authorized PR actions without local checkout gates

What Changed

  • Remote PR merges, readiness changes, branch updates, merge modes, and API requests can reach GitHub’s permission checks without a local branch or origin match. Explicit repository owners remain subject to the configured owner allowlist.
  • Local merges are no longer blocked just because the branch is named main or master; dirty-work protections and supervised Git branch checks remain. Local checkout-changing GitHub actions are still blocked.
  • Supervision accepts harness-selected checkout paths and host scripts or interpreters, with timeouts still enforced.
  • Contributions no longer require Beads startup hooks, a tracker account, a managed checkout location, or exact-base and checkpoint rituals.

Impact

✅ Remote PR actions follow GitHub permissions
✅ Fewer blocks on clean local branch integration
✅ Contributions without tracker or managed-checkout setup

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.