Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .agents/skills/ship/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,7 @@ for targeted runs. Preserve the existing tests, audit policy, and hooks.
3. Wait in bounded intervals for CI, diagnose failures, and resolve review
findings. Squash-merge after all required checks pass and CI is green.
4. Verify the PR actually merged and report its URL.
5. Follow the [agent PR rules](../../../knowledge/operations/agent-pr-rules.md):
never merge an external contribution (report it ready and stop), never
merge while any review comment is unaddressed, and never reply on your own
to a human-written comment.
10 changes: 10 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ Use [Conventional Commits](https://www.conventionalcommits.org), with
[PR template](.github/pull_request_template.md) and squash-merge. Honor
requests for separate PRs. Keep session links out of commits and PR descriptions.

[Agent PR rules](knowledge/operations/agent-pr-rules.md), binding even with
green CI and when asked to review, watch, or ship:

- **Never merge external contributions.** A maintainer merges PRs from
non-maintainers or forks by hand. Review, comment when asked, and report.
- **Never merge with unaddressed review comments.** Every comment, from people
or bots, is fixed, answered on its thread, or deferred by a maintainer.
- **Never auto-reply to human-written comments.** Reply on your own only to
bots; bring a person's comment to the maintainer with a suggested answer.

### Commit Attribution

Attribute every commit, including the squash commit, to the real human
Expand Down
4 changes: 4 additions & 0 deletions knowledge/log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Bashkit Knowledge Update Log

## 2026-11-20

* **Agent pull request rules**: after an agent squash-merged external PR #2959 on green CI with a review-bot finding still open, the maintainer set three rules for agents: never merge external contributions (non-maintainers or forks; a maintainer merges by hand), never merge while any review comment is unaddressed, and never reply on their own to human-written comments (bring them to the maintainer instead). See [Agent Pull Request Rules](operations/agent-pr-rules.md).

## 2026-11-19

* **`realpath` resolves symlinks**: `realpath` only cleaned `.`/`..` lexically, so with `/l -> /a/b`, `realpath /l/c` printed `/l/c` where bash prints `/a/b/c`; it also could not see a symlink in `--relative-to`. It now shares `readlink -f`'s bounded symlink walk (40-hop cap, path limits), on operands and the relative base; `--relative-to` now prints `..`-style paths and `--relative-base` gates it, as GNU does (both were a bare prefix strip). `-s` keeps the old lexical behavior, a loop reports `Too many levels of symbolic links`, and `-e` failures continue to the next operand with the operand as given, like GNU. Spec case `realpath_follows_intermediate_symlink` matches real bash. Found while writing the #2933 separator tests. See [Virtual Filesystem](foundations/vfs.md).
Expand Down
73 changes: 73 additions & 0 deletions knowledge/operations/agent-pr-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
type: Playbook
title: Agent Pull Request Rules
description: When coding agents may merge pull requests and reply to review comments.
tags:
- bashkit
- operations
- review
- process
---

# Agent Pull Request Rules

These rules bind coding agents working on `everruns/bashkit`. They apply even
when CI is green, reviews are positive, and the agent was asked to review,
watch, or "ship" the pull request. Only an explicit instruction from a
maintainer for that specific pull request lifts them.

## Never merge external contributions

An external contribution is a pull request whose author is not a maintainer of
`everruns/bashkit`, including any pull request opened from a fork. Bot pull
requests (Dependabot, the drift workflows) are not external contributions.

Agents may:

- Review the pull request and report findings to the maintainer.
- Post review comments when the maintainer asks.
- Approve fork workflow runs when the maintainer asks, so CI runs.
- Report when CI is green and the pull request is ready, then stop.

Agents must not:

- Merge, enable auto-merge, or add the pull request to a merge queue.
- Promise a merge on the maintainer's behalf in a comment.
- Push commits to the contributor's branch, unless the maintainer asks for a
specific change.

## Never merge with unaddressed review comments

Before merging any pull request, every review comment, from people and bots,
must be addressed:

- fixed in the pull request, or
- answered on its thread with why no change is needed, or
- explicitly deferred by a maintainer to a named follow-up.

An unresolved thread counts as unaddressed until one of those is true. An
outdated thread counts as addressed only if the code it points at was removed
or changed in a way that settles it; check, do not assume. Nits and optional
findings count too: fix them or answer them.

## Never auto-reply to human-written comments

Agents reply on their own only to comments written by bots (review bots,
Copilot, CI bots). A comment written by a person, whether a maintainer, a
contributor, or anyone else, is brought to the maintainer with a suggested
answer. The agent posts a reply only when the maintainer asks, and in the words
the maintainer approves.

## Why

On 2026-11-20 an agent squash-merged external pull request #2959 after CI went
green, without an explicit go-ahead to merge, and with an open review-bot
finding (stale `wasm32-unknown-unknown` docs in `time_compat`) still
unaddressed. Merging outside code is a trust decision about the contributor
and the change, not a CI outcome, and replies to people speak for the
maintainer, so both stay with a person.

## See also

- [Maintenance](maintenance.md), which runs merges of the agent's own pull requests
- [Threat Model](../security/threat-model.md)
1 change: 1 addition & 0 deletions knowledge/operations/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [Known Limitations](limitations.md) - Intentional gaps, partial features, and Bash and POSIX compatibility stance.
* [Documentation Architecture](documentation.md) - User documentation and Rustdoc guide organization, embedding, and maintenance.
* [Maintenance](maintenance.md) - Pre-release dependency, security, compatibility, and artifact maintenance requirements.
* [Agent Pull Request Rules](agent-pr-rules.md) - When coding agents may merge pull requests and reply to review comments.
* [Release Process](release-process.md) - Versioning, validation, tagging, and publication to crates.io, PyPI, and npm.
* [Performance Results](performance-results.md) - Benchmark harnesses, result locations, naming, and publication contract.
* [Dependency Policy](dependencies.md) - Which third-party crates Bashkit keeps, which it trims, and which are deliberately not reimplemented in-house.
Expand Down
1 change: 1 addition & 0 deletions knowledge/operations/maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ block the gate. Review CI on `main` (audit, test, lint) separately.

## References

- [Agent Pull Request Rules](agent-pr-rules.md), when agents may merge and reply to comments
- [Release Process](release-process.md), release workflow
- [Known Limitations](limitations.md), negative spec (intentional gaps, partial features)
- [Threat Model](../security/threat-model.md), threat model
Loading